first of all login mod for theme
Tiger Login
cleaned images without tiger in cleaned.zip
other mods will be posted later or won't
theme is puted up on moded pmbt so there might be some errors witch u need to report me ad noone else since i know what is what
preview is attached (u can see profile image is not fiting but that's because it's assigned in other file for other template)
1. create backup of folder themes/pmbt
2. unzip pmbt.zip and move it to themes/ folder
. alow to replace all files
3. enjoy and report errors
4. say thanks ore i will tell ur mother ur a bad boy

index.php mod with cools news mod
1. open index.php
2. deleate it all
3. copy and paste this code in it
PHP Code:
<?php
if (defined('IN_PMBT'))die ("You can't include this file");
define("IN_PMBT",true);
?>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script>
<script type="text/javascript" src="js/jquery.localscroll-min.js"></script>
<script type="text/javascript" src="js/jquery.scrollTo-min.js"></script>
<script type="text/javascript" src="js/vtip-min.js"></script>
<script type="text/javascript" src="js/custom.js"></script>
<?php
include("header.php");
////////////////////////////MOD ARCADE/////////////////////
$player = getuserid($btuser);
if(isset($_GET["act"]) AND $_GET["act"]=="Arcade")
{
if($_POST['gname'] == "asteroids")
{
$game = 1;
$level = 1;
$score = $_POST['score'];
}
if($_POST['gname'] == "breakout")
{
$game = 2;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "hexxagon")
{
$game = 3;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "invaders")
{
$game = 4;
$level = 1;
$score = $_POST['score'];
}
if($_POST['gname'] == "moonlander")
{
$game = 5;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "pacman")
{
$game = 6;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "psol")
{
$game = 7;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "simon")
{
$game = 8;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "snake")
{
$game = 9;
if($_POST['levelName'] == "LEVEL: SLUG")
{
$level = 1;
}
if($_POST['levelName'] == "LEVEL: WORM")
{
$level = 2;
}
if($_POST['levelName'] == "LEVEL: PYTHON")
{
$level = 3;
}
$score = $_POST['score'];
}
if($_POST['gname'] == "tetris")
{
$game = 10;
$level = $_POST['level'];
$score = $_POST['gscore'];
}
$db->sql_query("INSERT INTO `".$db_prefix."_flashscores` ( `ID` , `game` , `user` , `level` , `score`, `date`) VALUES ( '', '".$game."', '".$player."', '".$level."', '".$score."', '" . get_date_time() . "');") OR DIE(MySQL_ERROR());
$urlc="flashscores.php";
print("<html><head><meta http-equiv=refresh content='0;url=$urlc'></head></html>\n");
die;
}
if (isset($has_newpm) AND $has_newpm) {
OpenTable2(_btpm);
echo "<h3>"._btyougotpm."</h3>";
CloseTable2();
}
if ($welcome_message != ""){
OpenTable2(_btsitenews);
$welcome_message = format_comment($welcome_message);
parse_smiles($welcome_message);
echo "
<div id=\"nav\">
<a href=\"#about\" class=\"vtip\" title=\"Lapas ziņas\"><img src=\"themes/pmbt/global/human.png\" alt=\"about\">Ziņas</a>
<a href=\"#contact\" class=\"vtip\" title=\"Nesen reģistrejušies lietotāji\"><img src=\"themes/pmbt/global/iphone.png\" alt=\"contact\">Lietotāji</a>
<a href=\"#social\" class=\"vtip\" title=\"Nesen pievienotie video\"><img src=\"themes/pmbt/global/cloud.png\" alt=\"social\">Video</a>
</div>
<div id=\"content\">
<div id=\"about\">".$welcome_message."</div><div id=\"contact\">";
global $db_prefix;
$file = "cache/cache_newestmemberblock.txt";
$expire = 60; // time in seconds
if (file_exists($file) &&
filemtime($file) > (time() - $expire)) {
$newestmemberrecords = unserialize(file_get_contents($file));
}else{
$newestmemberquery = mysql_query("SELECT * FROM ".$db_prefix."_users WHERE active = 1 AND ban ='0' ORDER BY id DESC LIMIT 5") or die(mysql_error());
while ($newestmemberrecord = mysql_fetch_array($newestmemberquery) ) {
$newestmemberrecords[] = $newestmemberrecord;
}
$OUTPUT = serialize($newestmemberrecords);
$fp = fopen($file,"w");
fputs($fp, $OUTPUT);
fclose($fp);
} // end else
if ($newestmemberrecords == ""){
echo "No new members";
}else{
echo "<marquee onMouseOver=\"this.stop();\" onMouseOut=\"this.start();\" width=\"100%\" direction=\"left\" loop=\"infinite\" scrollamount=\"2\">\n";
echo "<table class=\"torrenttable\" border=\"0\" cellpadding=\"3\" width=\"100%\"><tr>";
foreach ($newestmemberrecords as $id=>$row) {
echo "<td><center>";
if ($row["avatar"] != "blank.gif") echo "<img height=\"100px\" src=\"avatars/".$row["avatar"]."\" alt=\"".($row["name"] == "")."\" style=\"border:1px solid #dfbe88\">";
else echo "<img height=\"100px\" src=\"themes/pmbt/pics/noavatar.png\"style=\"border:1px solid #dfbe88\">";
echo "<br />";
echo "<a href='user.php?op=profile&id=".$row['id']."'><font color=\"".getusercolor($row["can_do"])."\">".(($row["name"] == "") ? htmlspecialchars($row["username"]):htmlspecialchars($row["name"]))."</font></a>".
"</center></td>\n";
}
echo "</tr></table>\n";
echo "</marquee>\n";
}
echo"</div><div id=\"social\">";
$query = "SELECT * FROM ".$db_prefix."_youtubevideo ORDER BY addtime";
$sql = $db->sql_query($query);
echo "<marquee onMouseOver=\"this.stop();\" onMouseOut=\"this.start();\" width=\"100%\" direction=\"left\" loop=\"infinite\" scrollamount=\"2\">\n";
echo"<table border=\"0\">\n<tr>";
while ($row = $db->sql_fetchrow($sql)) {
$link = str_replace("http://youtube.com/v/","",$row["link"]);
$name = $row['name'];
echo"<td style=\"text-align: center;\">\n<a href=\"".$siteurl."/youtube.php?op=show&video=".$row["link"]."\">\n<img title=\"".$name."\" src=\"http://i3.ytimg.com/vi/".$link."/default.jpg\" class=\"vimg120\" qlicon=\"".$link."\" alt=\"".$name."\" >\n</a>\n<br />\n<p>$name</p>\n</td>\n";
}
echo"</tr>\n</table>\n";
echo "</marquee>\n";
echo"</div></div>";
echo "<table width=\"100%\"></table>";
CloseTable2();
}
if ($user->user) {
include ("torrents-needseed.php");
}
echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td width=\"50%\">";
echo "<a name=\"infotracker\"></a>";
OpenTable(_btinfotracker);
$legend = '<b>';
$sqlev = "SELECT name, color FROM ".$db_prefix."_levels";
$reslev = $db->sql_query($sqlev);
while ($rowlev = $db->sql_fetchrow($reslev)) {
$legend .='<a href="memberslist.php?mode=group&g='.$rowlev['name'].'" style="color: '.$rowlev['color'].'; font-weight: bold;">'.$rowlev['name'].'</a> ';
}
$legend .= '</b>';
$db->sql_freeresult($reslev);
$sql = "SELECT O.id AS id, O.page AS page, UNIX_TIMESTAMP(O.logged_in) AS logged_in, IF(U.name IS NULL, U.username, U.name) as name, U.donator AS donator, U.warned AS warned, U.can_do as can_do, U.level AS level, U.Show_online AS Show_online, U.uploaded as uploaded, U.downloaded AS downloaded FROM ".$db_prefix."_online_users O LEFT JOIN ".$db_prefix."_users U ON O.id = U.id WHERE UNIX_TIMESTAMP(NOW()-U.lastlogin) < 1800 AND U.Show_online = true;";
$res = $db->sql_query($sql);
$tot = $db->sql_numrows($res);
$i = 1;
$simple = "\n<p>";
$advanced = "<table border=\"0\" width=\"377px\" cellpadding=\"0\" cellspacing=\"0\">\n";
$advanced .= "<thead><tr><td><p align=\"center\"><b>"._btusername."</b></p></td><td><p align=\"center\"><b>"._btratio."</b></p></td><td><p align=\"center\"><b>"._btpagename."</b></p></td><td><p align=\"center\"><b>"._btloggedinfor."</b></p></td></tr></thead>\n<tbody>\n";
$user_now = $db->sql_numrows($res);
if ($user_now == 0) $simple .= _btnouseronline;
else {
while ($row = $db->sql_fetchrow($res)) {
//if($row[id] == $user->id)break;
if($row["donator"] == 'true')$donator = true;
else
$donator = false;
$simple .= "<a href=\"user.php?op=profile&id=".$row["id"]."\"><font color=\"".getusercolor($row["can_do"])."\">";
$simple .= htmlspecialchars($row["name"])."</font></a>";
if ($row["level"] == "premium") $simple .= pic("icon_premium.gif",'','premium');
elseif ($row["level"] == "moderator") $simple .= pic("icon_moderator.gif",'','moderator');
elseif ($row["level"] == "admin") $simple .= pic("icon_admin.gif",'','admin');
if($donator) $simple .= '<img src="http://bvlist.com/images/donator.gif" height="16" width="16" title="donator" alt="donator" />';
if($row["warned"] == "1") $simple .= '<img src="http://bvlist.com/images/warning.gif" title="warned" alt="warned" />';
if ($i < $tot) $simple .= ", ";
$i++;
$advanced .= "<tr>";
$advanced .= "<td><p><a href=\"user.php?op=profile&id=".$row["id"]."\"><font color=\"".getusercolor($row["can_do"])."\">";
$advanced .= htmlspecialchars($row["name"])."</font></a>";
if ($row["level"] == "premium") $advanced .= pic("icon_premium.gif",'','premium');
elseif ($row["level"] == "moderator") $advanced .= pic("icon_moderator.gif",'','moderator');
elseif ($row["level"] == "admin") $advanced .= pic("icon_admin.gif",'','admin');
if($donator) $advanced .= '<img src="http://bvlist.com/images/donator.gif" height="16" width="16" title="donator" alt="donator" />';
if($row["warned"] == "1") $advanced .= '<img src="http://bvlist.com/images/warning.gif" title="warned" alt="warned" />';
$advanced .= "</p></td>";
if ($row["uploaded"] == 0 AND $row["downloaded"] == 0) $ratio = "---";
elseif ($row["downloaded"] == 0) $ratio = "∞";
else {
$ratio = $row["uploaded"]/$row["downloaded"];
if ($ratio < 0.1) $ratio = "<font color=\"#ff0000\">" . number_format($ratio, 2) . "</font>";
elseif ($ratio < 0.2) $ratio = "<font color=\"#ee0000\">" . number_format($ratio, 2) . "</font>";
elseif ($ratio < 0.3) $ratio = "<font color=\"#dd0000\">" . number_format($ratio, 2) . "</font>";
elseif ($ratio < 0.4) $ratio = "<font color=\"#cc0000\">" . number_format($ratio, 2) . "</font>";
elseif ($ratio < 0.5) $ratio = "<font color=\"#bb0000\">" . number_format($ratio, 2) . "</font>";
elseif ($ratio < 0.6) $ratio = "<font color=\"#aa0000\">" . number_format($ratio, 2) . "</font>";
elseif ($ratio < 0.7) $ratio = "<font color=\"#990000\">" . number_format($ratio, 2) . "</font>";
elseif ($ratio < 0.8) $ratio = "<font color=\"#880000\">" . number_format($ratio, 2) . "</font>";
elseif ($ratio < 0.9) $ratio = "<font color=\"#770000\">" . number_format($ratio, 2) . "</font>";
elseif ($ratio < 1) $ratio = "<font color=\"#660000\">" . number_format($ratio, 2) . "</font>";
else $ratio = "<font color=\"#00FF00\">". number_format($ratio, 2) . "</font>";
}
$advanced .= "<td><p>".$ratio."</p></td>";
$advanced .= "<td><p>";
if (defined("_btpage_".$row["page"])) $advanced .= constant("_btpage_".$row["page"]);
else
$advanced .= str_replace('.php','',$row['page']);
$advanced .= "</p></td>";
$advanced .= "<td><p>".mkprettytime(time()-$row["logged_in"])."</p></td>";
$advanced .= "</tr>\n";
}
$simple .="<br><br><p>Legend: ".$legend."</p><div style='font-size: 8pt;' align=\"center\"><a href=\"javascript:advanced();\">"._btadvancedmode."</a></div>";
$simple .= "";
}
$advanced .= "</tbody></table>\n";
$db->sql_freeresult($res);
//Simple mode
echo "<div id=\"users_simple\" class=\"show\" >";
echo $simple;
echo "</div>";
//Advanced mode
echo "<div id=\"users_advanced\" class=\"hide\">";
echo $advanced;
echo "<br><p>Legend: ".$legend."</p><div style='font-size: 8pt;' align=\"center\"><a href=\"javascript:simple();\">"._btsimplemode."</a></div>";
echo "</div>";
echo "<br><div><span class=\"genmed\"><p>"._btindex_legend."<b>$user_now</b>"._btindex_legend1."<strong>$most_users_online</strong> on $most_users_online_when</p></span></div>";
echo "<p>";
//Total users
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_users WHERE `active` = 1 AND UNIX_TIMESTAMP(lastlogin) > UNIX_TIMESTAMP(NOW()) - 86400;";
$res = $db->sql_query($sql);
list ($totuser) = $db->sql_fetchrow($res);
$db->sql_freeresult($res);
echo "<b>"._btindex_total24."</b> ".$totuser."<br />\n";
//Total users
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_users WHERE `active` = 1 AND UNIX_TIMESTAMP(regdate) > UNIX_TIMESTAMP(NOW()) - 86400*7;";
$res = $db->sql_query($sql);
list ($totuser) = $db->sql_fetchrow($res);
$db->sql_freeresult($res);
echo "<b>"._btindex_register7."</b> ".$totuser."<br />\n";
//Total users
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_users WHERE `active` = 1 AND UNIX_TIMESTAMP(regdate) > UNIX_TIMESTAMP(NOW()) - 86400;";
$res = $db->sql_query($sql);
list ($totuser) = $db->sql_fetchrow($res);
$db->sql_freeresult($res);
echo "<b>"._btindex_register24."</b> ".$totuser."<br />\n";
//Total users
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_users;";
$res = $db->sql_query($sql);
list ($totuser) = $db->sql_fetchrow($res);
$db->sql_freeresult($res);
echo "<b>"._btindex_totalregister."</b> ".$totuser."<br />\n";
//Total Torrents and their size
$sql = "SELECT COUNT(id), SUM(size) FROM ".$db_prefix."_torrents;";
$res = $db->sql_query($sql);
list ($tottorrent, $totshare) = $db->sql_fetchrow($res);
$db->sql_freeresult($res);
echo "<b>"._btindex_totaltorrents."</b> ".$tottorrent."<br />\n";
echo "<b>"._btindex_totalshare."</b> ".mksize($totshare)."<br />\n";
//Total peers and their speed
$sql = "SELECT COUNT(id), (SUM(upload_speed)+SUM(download_speed))/2 FROM ".$db_prefix."_peers;";
$res = $db->sql_query($sql);
list ($totpeers, $totspeed) = $db->sql_fetchrow($res);
$db->sql_freeresult($res);
echo "<b>"._btindex_totalpeers."</b> ".$totpeers."<br />\n";
echo "<b>"._btindex_speed."</b> ".mksize($totspeed)."/s<br />\n";
//Total seeders and total leechers
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_peers GROUP BY seeder ORDER BY seeder ASC;";
$res = $db->sql_query($sql);
list ($totseeders) = $db->sql_fetchrow($res);
list ($totleechers) = $db->sql_fetchrow($res);
$db->sql_freeresult($res);
echo "<b>"._btindex_totalseeders."</b> ".$totseeders."<br />\n";
echo "<b>"._btindex_totalleechers."</b> ".$totleechers."<br />\n";
$sql = "SELECT COUNT(id) as cnt, client FROM ".$db_prefix."_peers WHERE client IS NOT NULL GROUP BY client ORDER BY cnt DESC LIMIT 1;";
$res = $db->sql_query($sql);
list ($cnt, $client) = $db->sql_fetchrow($res);
$db->sql_freeresult($res);
echo "<b>"._btindex_client."</b> ".$client." (".$cnt.")<br />\n";
echo "</p>\n";
CloseTable();
echo"</td><td width=\"50%\">";
include("poll.php");
echo"</td></tr></table>";
//if($forumshare)include ("forumposts.php");
OpenTable("last 10 uploads");
$sql = "SELECT ".$db_prefix."_torrents.*, IF(".$db_prefix."_torrents.numratings < '".$minvotes."', NULL, ROUND(".$db_prefix."_torrents.ratingsum / ".$db_prefix."_torrents.numratings, 1)) AS rating, ".$db_prefix."_categories.name AS cat_name, ".$db_prefix."_categories.image AS cat_pic, U.username, IF(U.name IS NULL, U.username, U.name) as user_name, U.level as user_level FROM ".$db_prefix."_torrents LEFT JOIN ".$db_prefix."_categories ON category = ".$db_prefix."_categories.id LEFT JOIN ".$db_prefix."_users U ON ".$db_prefix."_torrents.owner = U.id WHERE banned = 'no' AND ".$db_prefix."_torrents.password IS NULL ORDER BY ".$db_prefix."_torrents.added DESC LIMIT 10;";
$res = $db->sql_query($sql) or btsqlerror($sql);
if ($db->sql_numrows($res) > 0) {
torrenttable($res,"usertorrent");
} else {
echo ""._btnotorrents."";
}
CloseTable();
if($search_cloud)include('blocks/searchcloud.php');
include("footer.php");
?>
4. download
http://www.failiem.lv/down.php?i=aceipu&n=js.zip
5. unzip js.zip and move js folder to ur pmbt location
6. report if sumthing is missing
ok here goes usercp mod
1. open blocks/usercp.php
2. deleate it all :D
3. copy and paste in this
PHP Code:
<?php
if ($user->user) {
echo"<div id=\"leftcolumn\">";
$sql = "SELECT avatar FROM ".$db_prefix."_users WHERE id = '".$user->id."';";
$res = $db->sql_query($sql);
list ($avatar) = $db->sql_fetchrow($res);
$db->sql_freeresult($res);
echo "<div id=\"picbg\"><a href=\"user.php?op=editprofile\"><img src=\"themes/$theme/pics/picbg.png\" border=\"0\" /></a></div>";
echo "<div id=\"nickline\"><a href=\"user.php?op=profile&id=\">".$user->name."</a></div>";
echo "<b><img src=\"avatars/".$avatar."\" alt=\"".$user->name."\" style=\"margin-top:1px; margin-left:14px; border:0; \"></b><br />";
echo "<p> </p>";
echo '<div id="usernav">';
if ($has_newpm) {
echo "<li><a href=\"pm.php\"><b>Vestules</b></a></li>";
} else {
echo "<li><a href=\"pm.php\">Vestules</a></li>";
}
echo '<li><a href="mytorrents.php">Mani torrenti</a></li>
<li><a href="viewrequests.php">Pieprasijumi</a></li>
<li><a href="offers.php">Piedavajumi</a></li>
<li><a href="faq.php">F.A.Q.</a></li>';
if ($user->admin) {
echo "<li><a href=\"admin.php\">Panelis</a></li>";
}
echo "</div>";
echo"</div>";
}
?>
5. translate links ore some stuff like that
6. save file
help desk mod
1. open up helpdesk.php
2. deleate it all

3. copy in this
PHP Code:
<?php
if (defined('IN_PMBT'))die ("You can't include this file");
define("IN_PMBT",true);
include("header.php");
global $db, $db_prefix;
if(!isset($op)) $op="";
$sql="SELECT status FROM ".$db_prefix."_helpdesk";
$res=$db->sql_query($sql);
$pendin = $solved = $inprog = $not_go = $waiting = 0;
while ($ticket=$db->sql_fetchrow($res)) {
if($ticket['status']=='Solved')$solved = $solved+1;
if($ticket['status']=='Inprogress')$inprog = $inprog+1;
if($ticket['status']=='Not Going To Solve')$not_go = $not_go+1;
if($ticket['status']=='Waiting On More Info')$waiting = $waiting+1;
if($ticket['status']=='New')$pendin = $pendin+1;
}
$all_tik = $pendin + $solved + $inprog + $not_go + $waiting;
echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width='100%'><tr><td width=\"50%\">";
OpenTable3('Summary');
echo "
<table cellpadding=\"0\" class=\"DashboardTable\" cellspacing=\"0\" border=\"0\" width='100%'>
<tr class=\"DashboardTableColor\" height=\"24\">
<th colspan='4'><nobr><b>Summary</b></nobr></th>
</tr>
<tr class=\"summarylist_gradbg_3\">
<td width=\"10%\"><img src=\"$siteurl/images/spacer.gif\" border=\"0\" hspace=\"5\" class=\"summary_overdue_icon_3\"></td>
<td><a href=\"./problems.php?viewName=Pending\">Pending Tickets</a></td>
<td class='myview-count'><a href=\"./problems.php?viewName=Pending\">$pendin</a></td>
<td> </td>
</tr>
<tr class=\"summarylist_gradbg_3\">
<td width=\"10%\"><img src=\"$siteurl/images/spacer.gif\" border=\"0\" hspace=\"5\" class=\"summary_duetoday_3\"></td>
<td><a href=\"./problems.php?viewName=Completed\">Completed Tickets</a></td>
<td class='myview-count'><a href=\"./problems.php?viewName=Completed\">$solved</a></td>
<td> </td>
</tr>
<tr class=\"summarylist_gradbg_3\">
<td width=\"10%\"><img src=\"$siteurl/images/spacer.gif\" border=\"0\" hspace=\"5\" class=\"summary_open_3\"></td>
<td><a href=\"./problems.php?viewName=Inprogress\">Inprogress</a></td>
<td class='myview-count'><a href=\"./problems.php?viewName=Inprogress\">$inprog</a></td>
<td> </td>
</tr>
<tr class=\"summarylist_gradbg_3\">
<td width=\"10%\"><img src=\"$siteurl/images/spacer.gif\" border=\"0\" hspace=\"5\" class=\"summary_open_3\"></td>
<td><a href=\"./problems.php?viewName=Waiting\">Waiting On More Info</a></td>
<td class='myview-count'><a href=\"./problems.php?viewName=Waiting\">$waiting</a></td>
<td> </td>
</tr>
<tr class=\"summarylist_gradbg_3\">
<td width=\"10%\"><img src=\"$siteurl/images/spacer.gif\" border=\"0\" hspace=\"5\" class=\"summary_open_3\"></td>
<td><a href=\"./problems.php?viewName=Not\">Not Going To Solve</a></td>
<td class='myview-count'><a href=\"./problems.php?viewName=Not\">$not_go</a></td>
<td> </td>
</tr>
<tr class=\"summarylist_gradbg_3\">
<td width=\"10%\"><img src=\"$siteurl/images/spacer.gif\" border=\"0\" hspace=\"5\" class=\"summary_open_3\"></td>
<td><a href=\"./problems.php?viewName=All_Requester\">All Tickets</a></td>
<td class='myview-count'><a href=\"./problems.php?viewName=All_Requester\">$all_tik</a></td>
<td> </td>
</tr>
</table>";
CloseTable3();
echo"</td><td width=\"50%\">";
$problem = (isset($_POST["problem"])) ? trim($_POST["problem"]) : false;
if ($op == "ticket" ){
$errmsg = Array();
if($title =="")$errmsg[] = 'No TiTle';
if($problem =="") $errmsg[] = 'No Problem listed';
if($category =="0")$errmsg[] = "Category Not Set";
if($priority =="0")$errmsg[] = "Priority Not Set";
if (count($errmsg) > 0)
bterror($errmsg,'Help Ticket');
$upd_sql = "INSERT INTO ".$db_prefix."_helpdesk (`uid`, `title`, `problem`, `category`, `priority`, `open_date`) VALUES ('".$user->id."', '".$title."', '".$problem."', ".$category.", '".$priority."', NOW())";
$db->sql_query($upd_sql) or btsqlerror($upd_sql);
$id = $db->sql_nextid();
$db->sql_query("INSERT INTO `phpMyBitTorrent`.`torrent_help_responce` (
`ticket` ,
`reps` ,
`responce`)
VALUES (
'".$id."', '".$user->id."', '".$problem."');");
echo "<meta http-equiv=\"refresh\" content=\"3;url=problems.php\">";
OpenSuccTable('Help desk');
echo "Message sent! Await for reply.";
CloseSuccTable();
exit();
}
OpenTableT("Jauna zina");
print("<center><a href=problems.php><h1>View Posted Tickerts</h1></a></center><br/>");
?>
<script language="javascript" type="text/javascript">
function setMessage() {
var newmessage = document.replyForm.responses.value;
document.replyForm.message.value += newmessage;
document.replyForm.message.focus();
}
function resizer(inc,eid) {
var txtarea = document.getElementById(eid);
if (inc==1) {
txtarea.rows = txtarea.rows + 5;
} else {
txtarea.rows = txtarea.rows - 5;
}
document.getElementById("textarea_next_time").value=txtarea.rows;
}
</script>
<?php
echo "<center><font color=\"red\" size=\"2\"><blockquote>Pirms sis sadalas lietosanas <br>Ludzu izlasi <a href=\"faq.php\"><b>FAQ</b></a> un vai pamekle <a href=\"phpBB.php\"><b>Foruma</b></a><br>Uzmanibu si sadala darbojas testa versija</blockquote></font><br/></center>
<form method=\"post\" action=\"helpdesk.php\">
<input type=\"hidden\" name=\"op\" value=\"ticket\" >
<table border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td align=\"left\" width=\"150\">Category: <font class=\"important\">*</font></td>
<td><select name=\"category\">
<option value=\"0\">(Choose)</option>
<option value=\"1\">Uploading</option>
<option value=\"2\">DownLoading</option>
<option value=\"3\">Shouts</option>
<option value=\"4\">Forum</option>
<option value=\"5\">Other</option>
</select>
</td>
</tr>
<tr>
<td align=\"left\" width=\"150\">Priority: <font class=\"important\">*</font></td>
<td><select name=\"priority\">
<option value=\"0\">(Choose)</option>
<option value=\"Low\">Low</option>
<option value=\"Medium\">Medium</option>
<option value=\"High\">High</option>
</select></td>
</tr>
<tr>
<td align=\"left\">Title: <font class=\"important\">*</font></td>
<td><input type=\"text\" size=\"35\" maxlength=\"60\" name=\"title\"></td>
</tr>
<tr>
<td align=\"left\">Problem: <font class=\"important\">*</font></td>
<td><textarea name=\"problem\" id=\"message\" cols=\"32\" rows=\"6\"></textarea>
<div style=\"text-align: right\" class=\"resizer\">
<a href=\"javascript:resizer(1,'message')\" id=\"bigger\">Bigger</a>
<a href=\"javascript:resizer(-1,'message')\" id=\"smaller\">Smaller</a>
</div>
</td>
</tr>
<tr>
<td><input class=\"button\" type=\"submit\" value=\"SEND\"></td>
</tr>
</table>
</form>";
CloseTableT();
echo"</td></tr></table>";
include("footer.php");
?>
shoutbox mod
1. create file called "shoutit.php" without quotes
2. copy and paste this in it
PHP Code:
<?php
if (defined('IN_PMBT'))die ("You can't include this file");
define("IN_PMBT",true);
include("header.php");
if ($user->user AND $user->can_shout =="true")
{
include ("blocks/shoutbox.php");
}
include("footer.php");
?>
3. save and move it to directory of ur script
4. open blocks/shoutbox.php
5. deleate it all

6. add this to it
PHP Code:
<?php
if (!defined('IN_PMBT')) die ("You can't access this file directly");
if($shout_config['turn_on'] == "yes"){
echo"<script type=\"text/javascript\" src=\"bbcode.js\"></script>";
OpenTable3(_btshoutbox);
$usql = "SELECT id FROM ".$db_prefix."_online_users WHERE page='index.php' AND UNIX_TIMESTAMP(NOW()-last_action) < 600";
$ures = $db->sql_query($usql)or print(mysql_error());
$utot = $db->sql_numrows($ures);
$ucount = $utot;
echo"<span id='shoutTD'></span>\n";
echo"<div id=\"shoutidle\"></div>\n";
echo"<div class=\"alt2\" style=\"border: 0px none ! important; margin: 0px; padding: 0px;\">";
echo"<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">";
echo"<tr>";
echo"<td style=\"border: 0px none ! important; margin: 0px; padding: 0px;\" class=\"alt2\"><div class=\"alt2\" style=\"border: 0px none ! important; margin: 0px; padding: 0px;\"><span style=\"border: 0px none ! important; margin: 0px; padding: 0px; float: right;\"><span class=\"alt1\" style=\"border: 0px none ! important; margin: 0px; padding: 0px; display: block;\"><span class=\"alt2\" style=\"border: 0px none ! important; margin: 0px; padding: 0px; overflow: hidden; width: 1px; height: 1px; display: block;\"></span><span class=\"alt2\" style=\"border: 0px none ! important; margin: 0px; padding: 0px; overflow: hidden; width: 2px; height: 1px; display: block;\"></span><span class=\"alt2\" style=\"border: 0px none ! important; margin: 0px; padding: 0px; overflow: hidden; width: 3px; height: 1px; display: block;\"></span></span></span><span class=\"alt1\" style=\"border: 0px none ! important; margin: 0px; padding: 0px; overflow: hidden; width: 3px; height: 1px; display: block;\"></span><span class=\"alt1\" style=\"border: 0px none ! important; margin: 0px; padding: 0px; overflow: hidden; width: 2px; height: 1px; display: block;\"></span><span class=\"alt1\" style=\"border: 0px none ! important; margin: 0px; padding: 0px; overflow: hidden; width: 1px; height: 1px; display: block;\"></span></div><div class=\"smallfont\" style=\"border: 0px none ! important; margin: 0px; padding: 0px 5px 4px; background: transparent none repeat scroll 0% 0%; text-align: center; white-space: nowrap; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;\"><span id=\"shoutthisch\" onclick=\"sndReq('op=view_shout', 'shout_out');\" style=\"cursor: pointer;\">"._btshoutboxshow."</span></div></td><td style=\"border: 0px none ! important; margin: 0px; padding: 0px;\" class=\"alt1\"> </td><td style=\"border: 0px none ! important; margin: 0px; padding: 0px;\" class=\"alt2\"><div class=\"alt2\" style=\"border: 0px none ! important; margin: 0px; padding: 0px;\"><span style=\"border: 0px none ! important; margin: 0px; padding: 0px; float: right;\"><span class=\"alt1\" style=\"border: 0px none ! important; margin: 0px; padding: 0px; display: block;\"><span class=\"alt2\" style=\"border: 0px none ! important; margin: 0px; padding: 0px; overflow: hidden; width: 1px; height: 1px; display: block;\"></span><span class=\"alt2\" style=\"border: 0px none ! important; margin: 0px; padding: 0px; overflow: hidden; width: 2px; height: 1px; display: block;\"></span><span class=\"alt2\" style=\"border: 0px none ! important; margin: 0px; padding: 0px; overflow: hidden; width: 3px; height: 1px; display: block;\"></span></span></span><span class=\"alt1\" style=\"border: 0px none ! important; margin: 0px; padding: 0px; overflow: hidden; width: 3px; height: 1px; display: block;\"></span><span class=\"alt1\" style=\"border: 0px none ! important; margin: 0px; padding: 0px; overflow: hidden; width: 2px; height: 1px; display: block;\"></span><span class=\"alt1\" style=\"border: 0px none ! important; margin: 0px; padding: 0px; overflow: hidden; width: 1px; height: 1px; display: block;\"></span></div><div class=\"smallfont\" style=\"border: 0px none ! important; margin: 0px; padding: 0px 5px 4px; background: transparent none repeat scroll 0% 0%; text-align: center; white-space: nowrap; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;\"><span onclick=\"sndReq('op=activeusers', 'shout_out');\" style=\"cursor: pointer;\" />"._btshactive.": <span id=\"shoutbox_activity\">".$ucount."</span></span></div></td><td style=\"border: 0px none ! important; margin: 0px; padding: 0px;\" class=\"alt1\"> </td><td class=\"alt1\" style=\"border: 0px none ! important; margin: 0px; padding: 0px;\" width=\"100%\"> </td>";
echo"</tr>";
echo"</table>";
echo"</div>";
echo"<span id=\"active_user\" class='shoutbox'>";
echo"<span id=\"shout_out\" class='shoutbox'>";
echo"<span id=\"Private_shout\" class='shoutbox'>";
$utc3 = "od";
$ucs =0;
$shoutannounce = format_comment($shout_config['announce_ment'], false, true);
parse_smiles($shoutannounce);
echo "<div class=\"".$utc3."\" onMouseOver=\"this.className='over';\" onMouseOut=\"this.className='$utc3';\"><p class=\"shout\" bgcolor=\"#53B54F\">".$shoutannounce."</p></div>";
$utc2 = $btback1;
$sql = "SELECT S.*, U.id as uid, U.can_do as can_do, U.donator AS donator, U.warned as warned, U.level as level, IF(U.name IS NULL, U.username, U.name) as user_name FROM ".$db_prefix."_shouts S LEFT JOIN ".$db_prefix."_users U ON S.user = U.id ORDER BY posted DESC LIMIT ".$shout_config['shouts_to_show']."";
$shoutres = $db->sql_query($sql) or btsqlerror($sql);
$num2s = $db->sql_numrows($shoutres);
if ($num2s > 0) {
while ($shout = $db->sql_fetchrow($shoutres)) {
$donator ='';
if($shout['donator'] == 'true')$donator ='<img src="http://bvlist.com/images/donator.gif" height="16" width="16" title="donator" alt="donator" />';
$i = 0;
if ($num2s > 1)
{
$ucs++;
}
if($ucs%2 == 0)
{
$utc3 = "od";
$utc2 = $btback1;
}
else
{
$utc3 = "even";
$utc2 = $btback2;
}
$i++;
$caneditshout = false;
$candeleteshout = false;
if ($user->moderator) $caneditshout = true;
if ($user->moderator) $candeleteshout = true;
if ($user->id == $shout['uid'] AND $shout_config['canedit_on'] =="yes") $caneditshout = true;
if ($user->id == $shout['uid'] AND $shout_config['candelete_on'] =="yes") $candeleteshout = true;
if ($shout['id_to']!=0){
if ($user->id == $shout['id_to'] OR $user->id == $shout['uid']){
echo "<p>";
$warn = "";
$quote = addslashes($shout["text"]);
$text = format_comment($shout["text"], false, true);
parse_smiles($text);
if($shout["warned"] == "1") $warn = '<img src="http://bvlist.com/images/warning.gif" alt="warned" />';
$shout_time = gmdate("Y-m-d H:i:s", sql_timestamp_to_unix_timestamp($shout['posted'])+(60 * get_user_timezone($user->id)));
echo "<div class=\"".$utc3."\" onMouseOver=\"this.className='over';\" onMouseOut=\"this.className='$utc3';\"><p class=\"shout\" bgcolor=\"#53B54F\">";
if(preg_match("/\/notice (.*)/",$text,$m)){
$text = preg_replace('/\/notice/','',$text);
}elseif(preg_match("/\/me (.*)/",$text,$m)){
$text = preg_replace('/\/me/','',$text);
echo _btprivates."<b><span ondblclick=\"sndReq('op=private__chat&to=".$shout['uid']."', 'shout_out'); toggleprivate('shout_send','".$shout['uid']."');\"><font color=\"".getusercolor($shout["can_do"])."\">".htmlspecialchars($shout["user_name"])."</font></span></b>".$warn.$donator.":";
}else{
echo ($candeleteshout ? "<a ondblclick=\"if(confirm('Delete Shout?')==true)sndReq('op=take_delete_shout&shout=".$shout['id']."', 'shoutTD')\">" . pic("drop.gif","",_btalt_edit) ."</a>" : "").($caneditshout ? "<a ondblclick=\"sndReq('op=edit_shout&shout=".$shout['id']."', 'shoutTD')\">" . pic("edit.gif","",_btalt_edit) ."</a>" : "").($shout_config['bbcode_on'] =="yes" ? "<a onclick=\"comment_smile('<<<@!1!@>>>',Shoutform.text);\"><img src=\"http://bvlist.com/images/bbcode/bbcode_quote.gif\" border=\"0\" alt=\"quote\"></a>":"")."[<span class=\"shout_time\">".$shout_time."</span>]"._btprivates." <b><span ondblclick=\"sndReq('op=private__chat&to=".$shout['uid']."', 'shout_out'); toggleprivate('shout_send','".$shout['uid']."');\"><font color=\"".getusercolor($shout["can_do"])."\">".htmlspecialchars($shout["user_name"])."</font></span></b>".$warn.$donator.": ";
}
echo str_replace("\n","<br />",$text);
echo "</p>";
echo "<hr></div></p>\n";
}
}
if ($shout['id_to']==0){
echo "<p>";
$warn = "";
$quote = addslashes($shout["text"]);
$text = format_comment($shout["text"], false, true);
parse_smiles($text);
if($shout["warned"] == "1") $warn = '<img src="http://bvlist.com/images/warning.gif" alt="warned" />';
$shout_time = gmdate("Y-m-d H:i:s", sql_timestamp_to_unix_timestamp($shout['posted'])+(60 * get_user_timezone($user->id)));
echo "<div class=\"".$utc3."\" onMouseOver=\"this.className='over';\" onMouseOut=\"this.className='$utc3';\"><p class=\"shout\" bgcolor=\"#53B54F\">";
if(preg_match("/\/notice (.*)/",$text,$m)){
$text = preg_replace('/\/notice/','',$text);
}elseif(preg_match("/\/me (.*)/",$text,$m)){
$text = preg_replace('/\/me/','',$text);
echo"<b><span ondblclick=\"sndReq('op=private__chat&to=".$shout['uid']."', 'shout_out'); toggleprivate('shout_send','".$shout['uid']."');\"><font color=\"".getusercolor($shout["can_do"])."\">".htmlspecialchars($shout["user_name"])."</font></span></b>".$warn.$donator.":";
}else{
echo ($candeleteshout ? "<a ondblclick=\"if(confirm('Delete Shout?')==true)sndReq('op=take_delete_shout&shout=".$shout['id']."', 'shoutTD')\">" . pic("drop.gif","",_btalt_edit) ."</a>" : "").($caneditshout ? "<a ondblclick=\"sndReq('op=edit_shout&shout=".$shout['id']."', 'shoutTD')\">" . pic("edit.gif","",_btalt_edit) ."</a>" : "").($shout_config['bbcode_on'] =="yes" ? "<a onclick=\"comment_smile('<<<@!2!@>>>',Shoutform.text);\"><img src=\"http://bvlist.com/images/bbcode/bbcode_quote.gif\" border=\"0\" alt=\"quote\"></a>":"")."[<span class=\"shout_time\">".$shout_time."</span>] <b><span onclick=\"sndReq('op=private__chat&to=".$shout['uid']."', 'shout_out'); toggleprivate('shout_send','".$shout['uid']."');\"><font color=\"".getusercolor($shout["can_do"])."\">".htmlspecialchars($shout["user_name"])."</font></span></b>".$warn.$donator.": ";
}
echo str_replace("\n","<br />",$text);
echo "</p>";
echo "<hr></div></p>\n";
}
}
} else {
echo "<p align=\"center\">"._btnoshouts."</p>\n";
}
$db->sql_freeresult($shoutres);
echo"</span>";
echo"</span>";
echo"</span>";
unset($shout, $shoutres);
if ($user->user AND $user->can_shout == "true") {
echo "<form name=\"Shoutform\" method=\"POST\" action=\"frame.php\" rel="nofollow" target=\"Shoutbox\" onsubmit=\"sendshout(text.value);\">\n";
echo "<input type=\"hidden\" name=\"op\" value=\"shout\">\n";
echo "<textarea id=\"shout_text_area\" name=\"text\" rows=\"1\" onkeyup=\" if (event.keyCode == 13) {this.value=''}\" onkeypress=\"if (event.keyCode == 13) {sendshoutout(this.value, 'shout_out');}\"></textarea>
<input class=\"button\" type=\"button\" id=\"shout_send\" onclick=\"sendshoutout(text.value, 'shout_out'); text.value = '';\" value=\""._btshoutnow."\" />\n";
//echo "<textarea name=\"text\" rows=\"5\" cols=\"19\"></textarea>\n";
$sql = "SELECT * FROM ".$db_prefix."_smiles WHERE id > '1' GROUP BY file ORDER BY id ASC LIMIT 31;";
$smile_res = $db->sql_query($sql);
if ($db->sql_numrows($smile_res) > 0) {
$smile_rows = $db->sql_fetchrowset($smile_res);
echo "<p>";
foreach ($smile_rows as $smile) {
echo " <a onclick=\"comment_smile('".$smile["code"]."',Shoutform.text);\"><img src=\"smiles/".$smile["file"]."\" border=\"0\" title=\"".$smile['code']."\" alt=\"".$smile["alt"]."\"></a>\n";
}
echo "</p>";
}
$db->sql_freeresult($smile_res);
echo "<input type=\"button\" onclick=\"sndReq('op=view_shout', 'shout_out');\" value=\""._btrefresh."\" />\n";
echo "<input type=\"button\" onclick=\"sndReq('op=more_smiles', 'shoutTD')\" value=\""._btmoresmiles."\" />\n";
echo "</form>\n";
}
CloseTable3();
}
?>