1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
|
// delete bad threads & boards
if ($badThreadIDs != '') $db->query("DELETE FROM bb".$n."_subscribethreads WHERE threadid IN (0".$badThreadIDs.")");
if ($badBoardIDs != '') $db->query("DELETE FROM bb".$n."_subscribeboards WHERE boardid IN (0".$badBoardIDs.")");
if (!$threadbit) $lang->items['LANG_USERCP_FAVORITES_NO_NEWPOSTS'] = $lang->get("LANG_USERCP_FAVORITES_NO_NEWPOSTS", array('$daysprune' => $daysprune));
eval("\$tpl->output(\"".$tpl->get("usercp_favorites")."\");");
}
/** Away Message Hack by Andy1988 **/
if ($action == 'away') {
if($wbbuserdata['can_set_away_message'] == 1){
if(!$_POST['send']){
$lang->load('POSTINGS,REGISTER');
/*$result = $db->unbuffered_query("SELECT be_away, away_message, away_from, away_to FROM bb".$n."_users WHERE userid='$wbbuserdata[userid]';");
$row = $db->fetch_array($result);
$datefrom = explode("-",$row['away_from']);
$dateto = explode("-",$row['away_to']);
$away_message = $row['away_message'];*/
$datefrom = explode("-",$wbbuserdata[away_from]);
$dateto = explode("-",$wbbuserdata[away_to]);
$away_message = $wbbuserdata[away_message];
if($wbbuserdata['be_away']==0){
$selected1 = "selected=\"selected\"";
}else{
$selected0 = "selected=\"selected\"";
}
$yearfrom = $datefrom[0];
$yearto = $dateto[0];
$day_options_from = '';
for ($i = 1; $i <= 31; $i++) $day_options_from .= makeoption($i, $i, $datefrom[2]);
$month_options_from = '';
for ($i = 1; $i <= 12; $i++) $month_options_from .= makeoption($i, getmonth($i), $datefrom[1]);
$day_options_to = '';
for ($i = 1; $i <= 31; $i++) $day_options_to .= makeoption($i, $i, $dateto[2]);
$month_options_to = '';
for ($i = 1; $i <= 12; $i++) $month_options_to .= makeoption($i, getmonth($i), $dateto[1]);
eval("\$tpl->output(\"".$tpl->get("usercp_away")."\");");
}else{
$db->unbuffered_query("UPDATE `bb".$n."_users` SET `away_message` = '".$_POST['away_message']."',`away_from` = '".$_POST['yearfrom']."-".$_POST['monthfrom']."-".$_POST['dayfrom']."',`away_to` = '".$_POST['yearto']."-".$_POST['monthto']."-".$_POST['dayto']."', `be_away` = '".$_POST['be_away']."' WHERE `userid` = '".$wbbuserdata[userid]."';");
header("Location: usercp.php?action=away".$SID_ARG_2ND_UN);
exit();
}
}else{
access_error();
}
}
/** Away Message Hack by Andy1988 ENDE **/ |