if ($arr["invited_by"] != $CURUSER['id']) {
with:
if ($arr["invited_by"] != $CURUSER['id'] && $CURUSER["class"] < 5) {
function get_ratio_color($ratio) {
if ($ratio < 0.1) return "#ff0000";
if ($ratio < 0.2) return "#ee0000";
if ($ratio < 0.3) return "#dd0000";
if ($ratio < 0.4) return "#cc0000";
if ($ratio < 0.5) return "#bb0000";
if ($ratio < 0.6) return "#aa0000";
if ($ratio < 0.7) return "#990000";
if ($ratio < 0.8) return "#880000";
if ($ratio < 0.9) return "#770000";
if ($ratio < 1) return "#660000";
return "#000000";
}
<?php
require_once("backend/functions.php");
dbconn(true);
loggedinonly();
$id = $_GET["id"];
if (!is_valid_id($id))
$id = $CURUSER["id"];
$res = SQL_Query_exec("SELECT * FROM users WHERE status = 'confirmed' AND invited_by = $id ORDER BY username");
$num = mysql_num_rows($res);
stdhead("Invite Tree for ".$id."");
$invitees = number_format(get_row_count("users", "WHERE status = 'confirmed' && invited_by = $id"));
if ($invitees == 0)
show_error_msg("Nothing to see here!", "<div style='margin-top:10px; margin-bottom:10px' align='center'><font size=2>This member has no invitees</font></div>
<div style='margin-bottom:10px' align='center'>[<a href=account-details.php?id=$id>Go Back to User Profile</a>]</div>");
if ($id != $CURUSER["id"]) {
begin_frame("Invite Tree for [<a href=account-details.php?id=$id>".$id."</a>]");
} else {
begin_frame("You have [$invitees] invitees ".class_user($CURUSER["username"])."");
}
print("<br />"); //one small space here!
print("<table class=table_table border=1 cellspacing=0 cellpadding=5 align=center>n");
print("<tr>
<td class=table_head><b>Invited Members</b></td>
<td class=table_head><b>Class</b></td>
<td class=table_head align=center><b>Registered</b></td>
<td class=table_head align=center><b>Last access</b></td>
<td class=table_head align=center><b>Downloaded</b></td>
<td class=table_head align=center><b>Uploaded<b></td>
<td class=table_head align=center><b>Ratio</b></td>
<td class=table_head align=center><b>Warned</b></td>
</tr>n");
for ($i = 1; $i <= $num; $i++) {
$arr = mysql_fetch_assoc($res);
if ($arr["invited_by"] != $CURUSER['id'] && $CURUSER["class"] < 5) {
print("<tr><td class=table_col1 align=center colspan=8><font color=red><b>Access Denied</b>.</font> You don't have permission to view the invitees of other users!</td></tr>n");
print("</table>n");
print("<br />"); //one small space here!
end_frame();
stdfoot();
}
if ($arr['added'] == '0000-00-00 00:00:00')
$arr['added'] = '---';
if ($arr['last_access'] == '0000-00-00 00:00:00')
$arr['last_access'] = '---';
if($arr["downloaded"] != 0){
$ratio = number_format($arr["uploaded"] / $arr["downloaded"], 2);
} else {
$ratio="---";
}
$ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";
if ($arr["warned"] !== "yes"){
$warned = "<font color=limegreen><b>No</b></font>";
} else {
$warned = "<font color=red><b>Yes</b></font>";
}
$class=get_user_class_name($arr["class"]);
$added = substr($arr['added'],0,10);
$last_access = substr($arr['last_access'],0,10);
$downloaded = mksize($arr["downloaded"]);
$uploaded = mksize($arr["uploaded"]);
print("<tr><td class=table_col1 align=left><a href=account-details.php?id=$arr[id]><b>".class_user($arr[username])."</b></a></td>
<td class=table_col2 align=left>$class</td>
<td class=table_col1 align=center>$added</td>
<td class=table_col2 class=table_col1 align=center>$last_access</td>
<td class=table_col1 align=center><font color=orangered>$downloaded</font></td>
<td class=table_col2 align=center><font color=limegreen>$uploaded</font></td>
<td class=table_col1 align=center>$ratio</td>
<td class=table_col2 align=center>$warned</td>
</tr>n");
}
print("</table>n");
if ($arr["invited_by"] != $CURUSER['id']) {
print("<div style='margin-top:10px' align='center'>[<a href=account-details.php?id=$id><b>Go Back to User Profile</b></a>]</div>");
}
print("<br />"); //one small space here!
end_frame();
stdfoot();
?>
Replace the invite_block.php code with this one:
<?php
if (($site_config["INVITEONLY"] || $site_config["ENABLEINVITES"]) && $CURUSER) {
$invites = $CURUSER["invites"];
begin_block(T_("INVITES"));
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<?php printf(P_("YOU_HAVE_INVITES", $invites), $invites); ?>
</td>
</tr>
<?php if ($invites > 0 ){?>
<tr>
<td align="center">
<a href="invite.php"><?php echo T_("SEND_AN_INVITE"); ?></a>
</td>
</tr>
<?php } ?>
<?php if ($CURUSER["invitees"] > 0 ){ ?>
<tr>
<td align="center">
<a href='invitetree.php'>Invite Tree</a>
</td>
</tr>
<?php } ?>
</table>
<?php
end_block();
}
?>
In account-details.php replace this code:
<?php echo T_("USERNAME"); ?>: <?php echo htmlspecialchars($user["username"])?><br />
With this one:
<?php echo T_("USERNAME"); ?>: <?php echo htmlspecialchars($user["username"])?>
<?php if ($CURUSER["class"] >= 5 && $CURUSER["class"] > $user["class"]) { ?>[<a href="invitetree.php?id=<?php echo $user["id"]?>">Invite Tree</a>]<?php } ?><br />
I use class colors function: ".class_user($row["username"])."
with:
".$row["username"]."


if ($site_config["MIDDLENAV"]){
middleblocks();
For private messages:
// Start Announcement for Private Messages
if ($unreadmail){
$res_messages = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " and unread='yes' AND location IN ('in','both')") or print(mysql_error());
$arr_messages = mysql_fetch_row($res_messages);
$num_messages = $arr_messages[0];
if ($num_messages > 0)
echo"<div style='margin-bottom:5px'><table align=center width=100% border=0 cellspacing=0 cellpadding=10 bgcolor=red><tr><td style='padding: 10px; background: #AB0000' align=center><div style='font: bold 14px Times New Roman; color:#FFBF00'>
Hey $CURUSER[username], $num_messages message" . ($num_messages > 1 ? "s" : "") . " is waiting for you to read. Click <a href=mailbox.php?inbox><font size=3 color=#CBCBCB>HERE</font></a> to see!
</div></td></tr></table></div>\n";
}
// End Announcement for Private Messages
For reports:
// Start Announcement for Reports
if ($CURUSER["control_panel"]=="yes") {
$res_reports = mysql_query("SELECT COUNT(*) FROM reports WHERE dealtwith = '0'");
$arr_reports = mysql_fetch_row($res_reports);
$num_reports = $arr_reports[0];
if ($num_reports > 0)
echo"<div style='margin-bottom:5px'><table align=center width=100% border=0 cellspacing=0 cellpadding=10><tr><td style='padding: 10px; background: #AB0000' align=center><div style='font: bold 14px Times New Roman; color:#FFBF00'>
Hey $CURUSER[username], $num_reports Report" . ($num_reports > 1 ? "s" : "") . " must be solved. Click <a href=admincp.php?action=reports&do=view><font size=3 color=#CBCBCB>HERE</font></a> to view reports!
</div></td></tr></table></div>\n";
}
// End Announcement for Reports
For staff messages (if you have installed this mod: https://www.torrenttrader.org/topic/9584-mod-contact-staff):
// Start Announcement for Staff Messages
if ($CURUSER["control_panel"]=="yes") {
$res_staffmessages = mysql_query("SELECT COUNT(*) FROM staffmessages WHERE answered = '0'");
$arr_staffmessages = mysql_fetch_row($res_staffmessages);
$num_staffmessages = $arr_staffmessages[0];
if ($num_staffmessages > 0)
echo"<div style='margin-bottom:5px'><table align=center width=100% border=0 cellspacing=0 cellpadding=10><tr><td style='padding: 10px; background: #AB0000' align=center><div style='font: bold 14px Times New Roman; color:#FFBF00'>
Hey $CURUSER[username], $num_staffmessages message" . ($num_staffmessages > 1 ? "s" : "") . " for Staff waiting an answer. Click <a href=staffbox.php><font size=3 color=#CBCBCB>HERE</font></a> to see!
</div></td></tr></table></div>\n";
}
// End Announcement for Staff Messages
For announcements (if you have installed this addon: http://www.torrenttrader.org/topic/10965-addon-announcements):
// Site Anouncements
if ($CURUSER && $CURUSER["announce_read"] == "no" && $arr = announcement()) {
?>
<script type="text/javascript" src="scripts/announcement.js"></script>
<script type="text/javascript" src="scripts/preview.js"></script>
<!-- annoucement start #<?=$arr[id];?> -->
<div id="dropin" style="position:absolute;visibility:hidden;center;top:100px;width:800;height:100px">
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="error" align="center">
<tbody><tr><td class="none" style="padding: 2px 0 0 10px; background: #FFBF00">
<font color=black><b>Title:</b> <?=$arr["subject"]?> -- <b>Created on"</b> <?=$arr["added"]?></font></td>
<td align="right" class="none" style="padding: 5px; background: #FFBF00"><a href="#" onclick="dismissbox();return false"><img src="images/close.jpg" border="0"></a></td></tr>
<tr><td colspan="2" class=none width="100%" style="padding: 0 0 0 10px;" bgcolor="#252525">
<div style="margin-bottom:5px"><font size=2 color=#CBCBCB><?=format_comment($arr["message"])?></font></div>
<img id="loading" style=" visibility: hidden" src="images/load.gif">
<span style="color:#CBCBCB" name="preview" id="previewr" align="left">
<center>[ <a href="#" onclick="javascript:clearannouncement(this.parentNode,'clear_ann.php')"><font color=#FFBF00><b>Delete Announcement</b></font></a> ]</center>
</span><br><br></form></td></tr></tbody></table></div>
<!-- annoucement end #<?=$arr[id];?>-->
<span id="new_ann" style="visibility: visible"><table border=0 cellspacing=0 cellpadding=10 bgcolor=#AB0000 width=100% align=center><tr><td style='padding: 10px; background: #AB0000' align='center'>
<div style='font: bold 14px Times New Roman; color:#FFBF00'>There is a New Announcement! Please click <a href="javascript:show_announcement()"><font size=3 color=#CBCBCB>HERE</font></a> to read!</div></td></tr></table></span><br />
<?php
}
// End Site Announcements


<tr>
<td>Humans:</td>
<td><div class="clr"></div><div id="QapTcha"></div></td>
</tr>
And after </form>:
<script type="text/javascript" src="jquery/jquery.js"></script>
<script type="text/javascript" src="jquery/jquery-ui.js"></script>
<script type="text/javascript" src="jquery/QapTcha.jquery.js"></script>
<!-- JS -->
<script type="text/javascript">
$(document).ready(function(){
$('#QapTcha').QapTcha({disabledSubmit:true});
});
</script>
#======================================================================#
# Avatar Log - Updated by BigMax (17-11-2012)
#======================================================================#
if ($action=="avatars"){
stdhead("Avatar Log");
navmenu();
begin_frame("Avatar Log");
if (!$CURUSER || $CURUSER["control_panel"]!="yes"){
show_error_msg(T_("ERROR"), T_("SORRY_NO_RIGHTS_TO_ACCESS"), 1);
}
$query = SQL_Query_exec("SELECT count(*) FROM users WHERE enabled='yes' AND avatar !=''");
$count = mysql_fetch_row($query);
$count = $count[0];
print("<div style='margin-top:10px; margin-bottom:10px' align=center><font size=2>The gallery of avatars. Click on image to view owner profile.</font></div>");
list($pagertop, $pagerbottom, $limit) = pager(50, $count, 'admincp.php?action=avatars&');
echo ($pagertop);
$query = "SELECT id, username, avatar FROM users WHERE enabled='yes' AND avatar !='' $limit;";
$res = SQL_Query_exec($query);
?>
<table align=center cellpadding=5>
<?php
$cols = 5; //set cols number here
while($arr = mysql_fetch_array($res))
{
if (($cols % 5) == 0) echo "<tr>";
echo "<td class=embedded width=150><center><a href="account-details.php?id=".$arr['id'].""><br>";
if (!$arr['avatar'])
echo "<img width="150" src='images/default_avatar.png' alt='' /></td>";
else
echo "<img width="150" src="".htmlspecialchars($arr["avatar"])."" border=0 alt=".$arr['username']." title=".$arr['username']."></a></center></td>";
if (($cols % 1) != 0)
echo "</tr>";
$cols++;
}
?>
</table>
<?php
echo ($pagerbottom);
end_frame();
stdfoot();
}
#======================================================================#
# End Avatar Log
#======================================================================#
if ($action=="messagespy"){
if ($do == "del") {
if ($_POST["delall"])
SQL_Query_exec("DELETE FROM `messages`");
else {
if (!@count($_POST["del"])) show_error_msg(T_("ERROR"), "Nothing selected", 1);
$ids = array_map("intval", $_POST["del"]);
$ids = implode(", ", $ids);
SQL_Query_exec("DELETE FROM `messages` WHERE `id` IN ($ids)");
}
header("Refresh: 2;url=admincp.php?action=messagespy");
stdhead();
show_error_msg("Success", "Entries deleted", 0);
stdfoot();
die;
}
stdhead("Message Spy");
navmenu();
$res2 = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE location in ('in', 'both')");
$row = mysql_fetch_array($res2);
$count = $row[0];
$perpage = 50;
list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "admincp.php?action=messagespy&");
begin_frame("Message Spy");
$res = SQL_Query_exec("SELECT * FROM messages WHERE location in ('in', 'both') ORDER BY id DESC $limit");
$mess = number_format(get_row_count("messages"),0);
$read = number_format(get_row_count("messages", "WHERE unread = 'no'"));
$unread = number_format(get_row_count("messages", "WHERE unread = 'yes'"));
print("<div style='margin-top:10px' align='center'><font size='2'>Messages: <b>$mess</b> | Read: <b>$read</b> | Unread: <b>$unread</b></font</div>");
print("<br /><br />");
echo $pagertop;
print("<form id='messagespy' method='post' action='?action=messagespy&do=del'><table border='0' cellspacing='0' cellpadding='3' align='center' class='table_table'>n");
print("<tr>
<th class='table_head' align='left'><input type='checkbox' name='checkall' onclick='checkAll(this.form.id);' /></th>
<th class='table_head' align='left'>INFO</th>
<th class='table_head' align='left'>Text</th>
<th class='table_head' align='center' width='10%'>Date</th>
</tr>n");
while ($arr = mysql_fetch_assoc($res)){
$res2 = SQL_Query_exec("SELECT username FROM users WHERE id=" . $arr["receiver"]);
if ($arr2 = mysql_fetch_assoc($res2))
$receiver = "<a href='account-details.php?id=" . $arr["receiver"] . "'><b>" . $arr2["username"] . "</b></a>";
else
$receiver = "<i>Deleted</i>";
$res3 = SQL_Query_exec("SELECT username FROM users WHERE id=" . $arr["sender"]);
$arr3 = mysql_fetch_assoc($res3);
$sender = "<a href='account-details.php?id=" . $arr["sender"] . "'><b>" . $arr3["username"] . "</b></a>";
if( $arr["sender"] == 0 )
$sender = "<b>System</b>";
$msg = format_comment($arr["msg"]);
$added = utc_to_tz($arr["added"]);
print("<tr>
<td class='table_col2'><input type='checkbox' name='del[]' value='$arr[id]' /></td>
<td align='left' class='table_col1'>
Sender: $sender
<div style='margin-top:5px; margin-bottom:5px'>Receiver: $receiver</div>
Read: ".($arr["unread"] != "yes" ? "<b><font color=limegreen>Yes</font></b>" : "<b><font color=red>No</font></b>")."
</td>
<td align='left' class='table_col1'>$msg</td>
<td align='center' class='table_col2'>$added</td>
</tr>");
}
print("</table><br />");
echo "<input type='submit' value='Delete Checked' /> <input type='submit' value='Delete All' name='delall' /></form>";
print($pagerbottom);
end_frame();
stdfoot();
}
<input type='checkbox' name='hideshoutbox' value='yes' ".($CURUSER['hideshoutbox'] == 'yes' ? 'checked="checked"' : '')."
Delete entire line.
<input name='forumbanned' value='yes' type='radio' " . ($forumbanned ? " checked='checked'" : "") . " />Yes <input name='forumbanned' value='no' type='radio' " . (!$forumbanned ? " checked='checked'" : "") . " />No</td>
Add after this, a new line:
print("<tr><td>Shoutbox Banned:</td><td align='left'><input type='checkbox' name='hideshoutbox' value='yes' ".($user['hideshoutbox'] == 'yes' ? 'checked="checked"' : '')." /></td></tr>\n");
In admin-modtasks.php search:
$forumbanned = sqlesc($_POST["forumbanned"]);
Add after:
$hideshoutbox = sqlesc($_POST["hideshoutbox"]);
In the most long line that begin with:
SQL_Query_exec("UPDATE users SET email='$email', title=$title, downloaded='$downloaded', uploaded='$uploaded', ...
Add:
hideshoutbox=$hideshoutbox
In index.php search:
printf(T_("SHOUTBOX_REFRESH"), 5)."<br />";
end_frame();
}
Replace with:
printf(T_("SHOUTBOX_REFRESH"), 5)."<br />";
end_frame();
} else {
begin_frame(T_("SHOUTBOX"));
print("<div class='f-border comment' align='center'>
<div style='margin-top:10px; margin-bottom:10px'><b><font size='2'><font color='red'>Access Denied.</font> You are banned on ShoutBox!</font><b></div>
</div>");
end_frame();
}
In admincp.php, for Staff CP, add the following command line:
<td align="center"><a href="admincp.php?action=punished"><img src="images/admin/punished.png" border="0" width="32" height="32"><BR>Punished Users</a><BR></td>
On the most bottom place, before ?> copy the following code:
#======================================================================#
# Punished members - Added by BigMax (12-11-2012)
#======================================================================#
if ($action == "punished")
{
stdhead("Punished members");
navmenu();
$punished = number_format(get_row_count("users", "WHERE hideshoutbox='yes' || forumbanned='yes'"));
$shoutbox_banned = number_format(get_row_count("users", "WHERE hideshoutbox='yes'"));
$forum_banned = number_format(get_row_count("users", "WHERE forumbanned='yes'"));
begin_frame("Punished members: $punished", true);
print("<div style='margin-top:15px' align=center><font size=2>List of members that are banned on <b>ShoutBox</b> and/or <b>Forum</b>, order by join date.</font></div>");
print("<div style='margin-top:10px; margin-bottom:10px' align=center>Bans on ShoutBox: <b>$shoutbox_banned</b> Bans on Forum: <b>$forum_banned</b></div>");
$count = get_row_count("users", "WHERE hideshoutbox='yes' || forumbanned='yes'");
if ($count == 0)
print("<div style='margin-bottom:15px' align=center><font size=2><b>No punished members!</b></font></div>");
else { list($pagertop, $pagerbottom, $limit) = pager(25, $count, "admincp.php?action=punished&"); }
$res = SQL_Query_exec("SELECT * FROM users WHERE hideshoutbox='yes' || forumbanned='yes' AND status='confirmed' ORDER BY users.added $limit");
$num = mysql_num_rows($res);
print("<div align=center>$pagertop</div>");
print("<table class=table_table border=1 cellspacing=0 cellpadding=4 align=center>\n");
print("<tr>
<td class=table_head><b>User name</b></td>
<td class=table_head><b>User class</b></td>
<td class=table_head align=center><b>Registered</b></td>
<td class=table_head align=center><b>Last access</b></td>
<td class=table_head align=center><b>Downloaded</b></td>
<td class=table_head align=center><b>Uploaded<b></td>
<td class=table_head align=center><b>Ratio</b></td>
<td class=table_head align=center><b>ShoutBox<br /><small>Banned</small></b></td>
<td class=table_head align=center><b>Forum<br /><small>Banned</small></b></td>
</tr>\n");
for ($i = 1; $i <= $num; $i++){
$arr = mysql_fetch_assoc($res);
if ($arr['added'] == '0000-00-00 00:00:00')
$arr['added'] = '---';
if ($arr['last_access'] == '0000-00-00 00:00:00')
$arr['last_access'] = '---';
if ($arr['hideshoutbox'] == 'yes'){
$arr['hideshoutbox'] = '<font color=red><b>Yes</b></font>';
} else {
$arr['hideshoutbox'] = '<font color=limegreen><b>No</b></font>';
}
if ($arr['forumbanned'] == 'yes'){
$arr['forumbanned'] = '<font color=red><b>Yes</b></font>';
} else {
$arr['forumbanned'] = '<font color=limegreen><b>No</b></font>';
}
if($arr["downloaded"] != 0){
$ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);
} else {
$ratio="---";
}
$ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";
$class=get_user_class_name($arr["class"]);
$added = substr($arr['added'],0,10);
$last_access = substr($arr['last_access'],0,10);
$downloaded = mksize($arr["downloaded"]);
$uploaded = mksize($arr["uploaded"]);
print("<tr>
<td class=table_col1 align=left><a href=account-details.php?id=$arr[id]><b>$arr[username]</b></a></td>
<td class=table_col2 align=left>$class</td>
<td class=table_col1 align=center>$added</td>
<td class=table_col2 class=table_col1 align=center>$last_access</td>
<td class=table_col1 align=center><font color=orangered>$downloaded</font></td>
<td class=table_col2 align=center><font color=limegreen>$uploaded</font></td>
<td class=table_col1 align=center>$ratio</td>
<td class=table_col2 align=center>$arr[hideshoutbox]</td>
<td class=table_col1 align=center>$arr[forumbanned]</td>
</tr>\n");
}
print("</table>\n");
print("<div align=center>$pagerbottom</div>");
end_frame();
stdfoot();
}
#======================================================================#
# End Punished members
#======================================================================#
<?php
begin_block("Radio");
?>
<center>
<script type="text/javascript"><!--
function song(){
document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+document.getElementById('cancion').value+"' name='MediaPlayer1' width='170' height='50' controltype='1' showcontrols='1' showstatusbar='1' AutoStart='true'></embed>";
}
//-->
</script>
<div id="jukebox"><br>
<select id="cancion" onchange="song()" size="1">
<option value="none">Select Station</option>
<option value="http://www.nonstopplay.com/listen.ram">NonStopPlay</option>
<option value="http://www.977music.com/tunein/web/comedy.asx">Comedy-Classic</option>
<option value="http://www.977music.com/tunein/web/jamz.asx">Jamz Channel</option>
<option value="http://100xr.redirectme.net/100xr.asx">Rock Web Station</option>
<option value="http://wm15.spacialnet.com/hassu157520">Bollywood</option>
<option value="http://radio2.desi-radio.com:80/">Indian Musics</option>
</select><br><br>
<span id="music1"><embed type="application/x-mplayer2" id="music1"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
src=""
name="MediaPlayer1"
width="170"
height="50"
controltype="1"
showcontrols="1"
showstatusbar="1"
AutoStart="0">
</embed></span>
</div>
</center>
<?
end_block();
?>
//=== 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=".%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)");
}
}
[/code]
$supportfor = sqlesc($_POST["supportfor"]);
$support = sqlesc($_POST["support"]);
<script type="text/javascript" src="js/ncode_imageresizer.js"></script>
<script type="text/javascript">
<!--
NcodeImageResizer.MODE = 'newwindow';
NcodeImageResizer.MAXWIDTH = 640;
NcodeImageResizer.MAXHEIGHT = 0;
NcodeImageResizer.Msg1 = 'Click this bar to view the full image.';
NcodeImageResizer.Msg2 = 'This image has been resized. Click this bar to view the full image.';
NcodeImageResizer.Msg3 = 'This image has been resized. Click this bar to view the full image.';
NcodeImageResizer.Msg4 = 'Click this bar to view the small image.';
//-->
</script>
theme.css copy this code:
/* === Start Resize images === */
table.ncode_imageresizer_warning {
background: #000000;
color: #FF8000;
border: 1px solid #000000;
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 12px;
color: #FF2000;
vertical-align: middle;
text-decoration: bold;
}
table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}
table.ncode_imageresizer_warning td.td1 {
padding: 2px;
}
/* ==== End Resize images ==== */
// [img=http://www/image.gif]
$s = preg_replace("/\[img\]((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\[\/img\]/i", "<img border='0' src=\"\\1\" alt='' />", $s);
// [img=http://www/image.gif]
$s = preg_replace("/\[img=((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\]/i", "<img border='0' src=\"\\1\" alt='' />", $s);
// [img=http://www/image.gif]
$s = preg_replace("/\[img\]((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\[\/img\]/i", "<img border=\"0\" src=\"\\1\" alt=\"\" onload=\"NcodeImageResizer.createOn(this);\">", $s);
// [img=http://www/image.gif]
$s = preg_replace("/\[img=((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\]/i", "<img border=\"0\" src=\"\\1\" alt=\"\" onload=\"NcodeImageResizer.createOn(this);\">", $s);
// [imgw][url="http://www/image.gif%5B/imgw%5D"]http://www/image.gif[/imgw][/url]
$s = preg_replace("/[imgw](http://[^s'"<>]+(.(jpg|gif|png)))[/imgw]/i","<a class="light" target="_blank" href="1 "><img width="240" src="1" alt="" / border="0"></a><br /><font size="1" color="#FF2000" style="margin-left:5px">Click on image to see it in full size!</font>", $s);
// [imgw=[url="http://www/image.gif%5D"]http://www/image.gif][/url]
$s = preg_replace("/[imgw=(http://[^s'"<>]+(.(jpg|gif|png)))]/i","<a class="light" target="_blank" href="1 "><img width="240" src="1" alt="" / border="0"></a><br /><font size="1" color="#FF2000" style="margin-left:5px">Click on image to see it in full size!</font>", $s);
// YouTube Vids
$s = preg_replace("/*youtube.com.*v=([^s'"<>]+)]/ims", "<object width="640" height="480"><param name="movie" value="[url="http://www.youtube.com/watch?v=1%22"]http://www.youtube.com/watch?v=1"></param><param[/url] name="allowscriptaccess" value="never"></param><param name="allowFullScreen" value="true"></param><param name="allowNetworking" value="internal"></param><embed src="[url="http://www.youtube.com/watch?v=1%22"]http://www.youtube.com/watch?v=1"[/url] type="application/x-shockwave-flash" allowscriptaccess="never" allowfullscreen="true" allowNetworking="internal" width="640" height="480"></embed></object>", $s);
// YouTube small Vids [videow=URL]
$s = preg_replace("/[videow=[^s'"<>]*youtube.com.*v=([^s'"<>]+)]/ims", "<object width="320" height="240"><param name="movie" value="[url="http://www.youtube.com/watch?v=1%22"]http://www.youtube.com/watch?v=1"></param><param[/url] name="allowscriptaccess" value="never"></param><param name="allowFullScreen" value="true"></param><param name="allowNetworking" value="internal"></param><embed src="[url="http://www.youtube.com/watch?v=1%22"]http://www.youtube.com/watch?v=1"[/url] type="application/x-shockwave-flash" allowscriptaccess="never" allowfullscreen="true" allowNetworking="internal" width="320" height="240"></embed></object>", $s);
// Google Vids
$s = preg_replace("/*video.google.com.*docid=(-?[0-9]+).*]/ims", "<embed style="width:640px; height:480px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="[url="http://video.google.com/googleplayer.swf?docId=1%22"]http://video.google.com/googleplayer.swf?docId=1"[/url] allowScriptAccess="sameDomain" quality="best" bgcolor="#ffffff" scale="noScale" wmode="window" salign="TL" FlashVars="playerMode=embedded"> </embed>", $s);
// Google small Vids [videow=URL]
$s = preg_replace("/[videow=[^s'"<>]*video.google.com.*docid=(-?[0-9]+).*]/ims", "<embed style="width:320px; height:240px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="[url="http://video.google.com/googleplayer.swf?docId=1%22"]http://video.google.com/googleplayer.swf?docId=1"[/url] allowScriptAccess="sameDomain" quality="best" bgcolor="#ffffff" scale="noScale" wmode="window" salign="TL" FlashVars="playerMode=embedded"> </embed>", $s);
//
Text
$s = preg_replace("/((s|.)+?)/", "<center>1</center>", $s);
//[align=(left, center, right, justify)]Text[/align]