Quote:// [pic]http://www/image.gif[/pic]$s = preg_replace("/\[pic\](http:\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\[\/pic\]/i", "<a href=\"\\1\" rel=\"lightbox[vacation]\"><IMG border=\"0\" src=\"\\1\" width=172 title=\"Click to enlarge\"></a>", $s);
// [pic=http://www/image.gif]
$s = preg_replace("/\[pic=(http:\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\]/i", "<a href=\"\\1\" rel=\"lightbox[vacation]\"><IMG border=\"0\" src=\"\\1\" width=172 title=\"Click to enlarge\"></a>", $s);
$ret = mysql_query("INSERT INTO torrents (filename, owner, name, descr, vip, image1, category, tube, added, info_hash, size, numfiles, save_as, announce, external, nfo, torrentlang, torrentage, anon, timages) VALUES (" .
implode(",", array_map("sqlesc", array($fname, $CURUSER['id'], $name, $descr, $vip, $inames[0], $inames[1], $type, $tube, get_date_time(), $infohash, $torrentsize, $filecount, $fname, $announce, $external, $nfo, $langid, $ageid, $anon, $timages))).")"); ALTER TABLE `torrents` ADD `timages` TEXT NOT NULL;., ., ., ., ., ., torrents.freeleech,
Add
torrents.timages,
example
., ., ., ., ., ., torrents.freeleech, torrents.timages,
Find
" . format_comment($row['descr']) . "
Add after:
print ("<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"6\"><tr>
<td class=table_col2 colspan=\"2\">
<center>".format_comment($row['timages'])."</center>
</td>
</tr>");
In torrents-upload.php find:
, anon and add timages
example: , anon, timages
Find:
, $anon and add $timages
example: , $anon, $timages
Find:
$category = "<select name=\"type\">\n<option value=\"0\">" . CHOOSE_ONE . "</option>\n";
Add above:
print ("<tr><td align=right>Images: </td><td align=left><textarea name=\"timages\" rows=\"4\" cols=\"80\">[img=image] [img=image]
[img=image] [img=image] </textarea><br></td></tr>");
In torrents-edit.php find:
$updateset[] = "category = " . (0 + $type);
After add
$updateset[] = "timages = " . sqlesc($timages);
Find
$updateset[] = "visible = '" . ($_POST["visible"] ? "yes" : "no") . "'";
if (!empty($_POST['tube']))
$tube = unesc($_POST['tube']);
$updateset[] = "tube = " . sqlesc($tube);
After add:
$timages = $_POST["timages"];
if ($timages) {
if (!preg_match('(gif|jpg|jpeg|png|JPG|PNG|GIF)', $timages))
stderr("Bad format");
}
Find:
echo "<tr><td align=right width=60><B>Name: </b></TD><TD><input type=\"text\" name=\"name\" value=\"" . htmlspecialchars($row["name"]) . "\" size=\"55\" /></td></tr>";
After add:
echo "<tr><td align=right><B>Images: </b></td><td><textarea name=\"timages\" rows=\"4\" cols=\"80\">".$row['timages']."</textarea></td></tr>";

ALTER TABLE `users` ADD `timeswarned` int(10) NOT NULL default '0';Now go to userdetails.php print("<tr><td class=rowhead>Class</td><td align=left>" . get_user_class_name($user["class"]) . "</td></tr>\n");
add this
//===Warned Progress Bar by TripleH @ TBDEV.NET
$UserTimesWarned = $user["timeswarned"];
switch($UserTimesWarned)
{
case 0:
$warnedbar = "<img src=pic/warn_0.png>";
break;
case 1:
$warnedbar = "<img src=pic/warn_1.png> - <b>30%</b>";
break;
case 2:
$warnedbar = "<img src=pic/warn_2.png> - <b>60%</b>";
break;
case 3:
$warnedbar = "<img src=pic/warn_3.png - <b>90% - <font class=small>Be careful! One more warning and your account will be disabled</font></b>";
break;
case ($UserTimesWarned > 4):
$warnedbar = "<img src=pic/warn_max.png> - <b>100% - Disabled</b>";
break;
}
print("<tr><td class=rowhead>Warned level</td><td align=left>$warnedbar <font class=small>(".$UserTimesWarned." warning" . ($UserTimesWarned > 1 ? "s" : "") . ")</font></td></tr>\n");
//===Warned Progress Bar by TripleH @ TBDEV.NET
And now not understand
Now go over to modtask.php, and search for
$updateset[] = "warned = 'yes'
and replace it with
$updateset[] = "warned = 'yes', timeswarned = timeswarned+1";
where modtask on torrenttrader
Now, in order to auto disable the account when a user gets the 4th warning, add this part into cleanup.php
//=== Warned Level Mod - TripleH @ TBDev.Net (Thanks arcticwolf44 for this piece of code)
$res = mysql_query("SELECT id, modcomment FROM users WHERE timeswarned = 4 AND enabled = 'yes'") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) > 0)
{
$dt = sqlesc(get_date_time());
while ($arr = mysql_fetch_assoc($res))
{
$modcomment = htmlspecialchars($arr["modcomment"]);
$modcomment = gmdate("Y-m-d") . " - Auto Disabled for having over 3 Warning by -AutoSystem.\n". $modcomment;
$modcom = sqlesc($modcomment);
mysql_query("UPDATE users SET enabled='no', modcomment = $modcom WHERE id = $arr[id]") or sqlerr(__FILE__, __LINE__);
}
}
//===