SQL_Query_exec("INSERT INTO warnings (userid, reason, added, expiry, warnedby, type) VALUES ($user,'".$reason."','".get_date_time()."','".$expiretime."','0','HnR')");
to
SQL_Query_exec("INSERT INTO warnings (userid, reason, added, expiry, warnedby, type) VALUES ($user,".sqlesc($reason).",".sqlesc(get_date_time()).",".sqlesc($expiretime).",'0','HnR')"); error_reporting(E_ALL ^ E_NOTICE);in the top of pages i am working on and just rem it out if done working on the page, and its fine.. If you did not change anything lol then should not error out..
//update seedbox
if(get_user_class($CURUSER) > 4) {
if ($_POST["seedbox"] == "yes") {
$updateset[] = "seedbox = 'yes'";
}else{
$updateset[] = "seedbox = 'no'";
}
}
change to
//update seedbox
if($CURUSER["class") > 4) {
if ($_POST["seedbox"] == "yes") {
$seedbox = 'yes';
}else{
$seedbox = 'no';
}
}
an little more work but closer to who has an seed box is to add an new db like
ALTER TABLE `users` ADD `has_seedbox` enum('yes','no') NOT NULL default 'no';
but then you would have to have an way to edit it on account-details.. but its not really that hard lol
then once you set it up with the people that have an seedbox use
//update seedbox
if($CURUSER["has_seedbox") > 4) {
if ($_POST["seedbox"] == "yes") {
$seedbox = 'yes';
}else{
$seedbox = 'no';
}
}
De <b><?php echo $sender;?></b> le <?php echo $arr["added"];?> [il y a <?php echo $elapsed;?> ]
to
De <b><?php echo $sender;?></b> le <?php echo utc_to_tz($arr["added"]);?> [il y a <?php echo $elapsed;?> ]
//=== Remove donor status if time up and set class to power user ===//
$res = SQL_Query_exec("SELECT id, modcomment FROM users WHERE donor='yes' AND donoruntil < NOW() AND donoruntil <> '0000-00-00 00:00:00'");
if (mysql_num_rows($res) > 0) {
$dt = sqlesc(get_date_time());
$subject = sqlesc("VIP status removed by System.");
$msg = sqlesc("Your VIP status has timed out and has been auto-removed by the System. We would like to thank you once again for supporting " . $site_config['SITENAME'] . ". If you wish to re-new your VIP, you can do so by clicking [url=".%20%24site_config%5B"] . "/donate.php]HERE[/url]. Cheers!n");
while ($arr = mysql_fetch_assoc($res)) {
///--- Autosystem modcomment ---//
$modcomment = htmlspecialchars($arr["modcomment"]);
$modcomment = gmdate("Y-m-d H:i") . " - VIP status removed by System.n" . $modcomment;
$modcom = sqlesc($modcomment);
SQL_Query_exec("UPDATE users SET class = '2', donor = 'no', donoruntil = '0000-00-00 00:00:00', modcomment = $modcom WHERE id = $arr[id]");
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject, poster) VALUES(0, $arr[id], $dt, $msg, $subject, 0)");
}
}
//=== Remove donor status if time up and set class to power user ===//
$res = SQL_Query_exec("SELECT id, modcomment,class FROM users WHERE donor='yes' AND donoruntil < NOW() AND donoruntil <> '0000-00-00 00:00:00'");
if (mysql_num_rows($res) > 0) {
$dt = sqlesc(get_date_time());
$subject = sqlesc("VIP status removed by System.");
$msg = sqlesc("Your VIP status has timed out and has been auto-removed by the System. We would like to thank you once again for supporting " . $site_config['SITENAME'] . ". If you wish to re-new your VIP, you can do so by clicking [url=".%20%24site_config%5B"] . "/donate.php]HERE[/url]. Cheers!n");
while ($arr = mysql_fetch_assoc($res)) {
///--- Autosystem modcomment ---//
$modcomment = htmlspecialchars($arr["modcomment"]);
$modcomment = gmdate("Y-m-d H:i") . " - VIP status removed by System.n" . $modcomment;
$modcom = sqlesc($modcomment);
if ($arr["class"]<=3) // Change this to your vip class if well diferent...
SQL_Query_exec("UPDATE users SET class = '2', donor = 'no', donoruntil = '0000-00-00 00:00:00', modcomment = $modcom WHERE id = $arr[id]");
else
SQL_Query_exec("UPDATE users SET donor = 'no', donoruntil = '0000-00-00 00:00:00', modcomment = $modcom WHERE id = $arr[id]");
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject, poster) VALUES(0, $arr[id], $dt, $msg, $subject, 0)");
}
}
if ($CURUSER["class"]<=$site_config['maxmotm']) {
$motm_current_query = @mysql_fetch_row(@SQL_Query_exec("SELECT motm.points FROM motm WHERE month = " . date("m") . " && year = " . date("y") . " && id = ".$CURUSER["id"]));
$motm_current = number_format(0+$motm_current_query[0],1);
print ("<br />Current Member of the Month Points: ".$motm_current);
}
to do away with the query and all if under maxmotm class.. I dont like hardcoding classes into pages incase down the road change and/or add classes.. if ($user["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes") || ($CURUSER["id"] == $user["id"])) {
<tr>
<td colspan="5"> </td>
</tr>
<tr>
<td align="center"><a href="inactiveusers.php"><img src="images/admin/inactiveusers.png" border="0" width="32" height="32"><br /><?php echo T_("USURSINACTIVE"); ?></a><br /></td>
</tr>
after
<tr>
<td align="center"><a href="admincp.php?action=warned"><img src="images/admin/warned_user.png" border="0" width="32" height="32" alt="" /><br /><?php echo T_("WARNED_USERS"); ?></a><br /></td>
<td align="center"><a href="admincp.php?action=whoswhere"><img src="images/admin/whos_where.png" border="0" width="32" height="32" alt="" /><br /><?php echo T_("WHOS_WHERE"); ?></a><br /></td>
<td align="center"><a href="admincp.php?action=censor"><img src="images/admin/word_censor.png" border="0" width="32" height="32" alt="" /><br /><?php echo T_("WORD_CENSOR"); ?></a><br /></td>
<td align="center"><a href="admincp.php?action=forum"><img src="images/admin/forums.png" border="0" width="32" height="32" alt="" /><br /><?php echo T_("FORUM_MANAGEMENT"); ?><br /></a></td>
<td align="center"><a href="admincp.php?action=users"><img src="images/admin/simple_user_search.png" border="0" width="32" height="32" alt="" /><br />Simple User Search<br /></a></td>
</tr>
so I have room to add stuff without messing up layout.
Just remeber to keep those blocks in max of 5 for best layout.
like
<tr>
<td>
<td>
<td>
<td>
<td>
</tr>, support=$support, supportfor=$supportforhe has not defined support...