Jump to content
MakeWebGames

SMOKEY_TEK

Members
  • Posts

    126
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by SMOKEY_TEK

  1. <?php } function submit_freeze() { $result2 = mysql_query("SELECT `id` FROM `users` WHERE `username` = '".$_POST['searchPlayerText']."'"); $worked = mysql_fetch_array($result2); $freeze = new User($worked['id']); if($_POST['searchPlayerText'] == "GIOVANNI"){ echo " <div class='content'> <h3>Freeze Player</h3> <p>You can't freeze player ".$freeze->formattedname.", as he his the Owner. <br> <a href='staff_panel.php?action=freeze'>Back</a></p></div>"; die(); } else if($_POST['searchPlayerText'] == "Divers1oN"){ echo " <div class='content'> <h3>Freeze Player</h3> <p>You can't freeze player ".$freeze->formattedname.", as they are the Owner. <br> <a href='staff_panel.php?action=freeze'>Back</a></p></div>"; die(); } else if(is_numeric($_POST['days'])){ $result = mysql_query("UPDATE `users` SET `frozen` = '1', `fr_reason` = '".$_POST['reason']."', `days` = '".$_POST['days']."', `admin` = '11', `staff` = '0' WHERE `username` = '".$_POST['searchPlayerText']."'"); echo " <div class='content'> <h3>Freeze Player</h3> <p>".$freeze->formattedname."'s account has been successfully frozen for ".$_POST['days']." day(s). <br> <a href='staff_panel.php?action=freeze'>Back</a></p></div>"; die(); } else { echo " <div class='content'> <h3>Freeze Player</h3> <p>You must enter a valid amount of days. <br> <a href='staff_panel.php?action=freeze'>Back</a></p></div>"; die(); } } function revoke_freeze() { ?> <div class='content'> <h3>Revoke Freeze</h3> <table width='100%'> <tr> <td colspan='2'><h4>Revoke Freeze</h4></td> </tr> </table> <table width='100%'> <form action='staff_panel.php?action=submitfreezerevoke' method='post' name='revokefreeze'> <tr> <td width='20%'><h4 onmouseover="TagToTip('formA')" onmouseout="UnTip()">Name</h4></td> <td width='27%'><input type='hidden' name='searchPlayer' value=''> <input type='text' name='searchPlayerText' value="" size='14' class='itNoB' readonly> <a href='act_select.php?t=revokemail' class='lbOn'>select</a></td> <td width='3%'>[<b class='qmark' onmouseover="TagToTip('formA')" onmouseout="UnTip()">?</b>]</td> </tr> <tr> <td> </td> <td><input type='submit' value='Revoke Freeze' /></td> </tr> </form> <span id="formA">Choose the player you want to revoke their freeze.</span> </table> </div>
  2. <div class='content'> <h3>Revoke Forum Ban</h3> <table width='100%'> <tr> <td colspan='2'><h4>Revoke Forum Ban</h4></td> </tr> </table> <table width='100%'> <form action='staff_panel.php?action=submitforumrevoke' method='post' name='revokeforumban'> <tr> <td width='20%'><h4 onmouseover="TagToTip('formA')" onmouseout="UnTip()">Name</h4></td> <td width='27%'><input type='hidden' name='searchPlayer' value=''> <input type='text' name='searchPlayerText' value="" size='14' class='itNoB' readonly> <a href='act_select.php?t=revokeforum' class='lbOn'>select</a></td> <td width='3%'>[<b class='qmark' onmouseover="TagToTip('formA')" onmouseout="UnTip()">?</b>]</td> </tr> <tr> <td> </td> <td><input type='submit' value='Revoke Forum Ban' /></td> </tr> </form> <span id="formA">Choose the player you want to revoke their forum ban.</span> </table> </div> <?php } function submit_forumrevoke() { $result = mysql_query("UPDATE `users` SET `forumban` = '0' WHERE `username` = '".$_POST['searchPlayerText']."'"); $result2 = mysql_query("SELECT `id` FROM `users` WHERE `username` = '".$_POST['searchPlayerText']."'"); $worked = mysql_fetch_array($result2); $forumbanRevoke = new User($worked['id']); echo " <div class='content'> <h3>Revoke Forum Ban</h3> <p>".$forumbanRevoke->formattedname."'s forum ban has been successfully revoked. <br> <a href='staff_panel.php?action=revokeforum'>Back</a></p></div>"; die(); } function freeze_player() { ?> <div class='content'> <h3>Freeze Player</h3> <table width='100%'> <tr> <td colspan='2'><h4>Freeze Player</h4></td> </tr> </table> <table width='100%'> <form action='staff_panel.php?action=submitfreeze' method='post' name='freeze'> <tr> <td width='20%'><h4 onmouseover="TagToTip('formA')" onmouseout="UnTip()">Name</h4></td> <td width='27%'> <input type='hidden' name='searchPlayer' value=''> <input type='text' name='searchPlayerText' value="" size='14' class='itNoB' readonly> <a href="act_select.php?t=freeze" class="lbOn">select</a> </td> <td width='3%'>[<b class='qmark' onmouseover="TagToTip('formA')" onmouseout="UnTip()">?</b>]</td> </tr> <tr> <td><h4 onmouseover="TagToTip('formC')" onmouseout="UnTip()">Days</h4></td> <td><input type='text' name='days' size='40' maxlength='50' value=""></td> <td>[<b class='qmark' onmouseover="TagToTip('formC')" onmouseout="UnTip()">?</b>]</td> </tr> <tr> <td width='20%'><h4 onmouseover="TagToTip('formB')" onmouseout="UnTip()">Reason</h4></td> <td width='27%'><input type='text' name='reason' size='40' maxlength='100' value=""></td> <td width='3%'>[<b class='qmark' onmouseover="TagToTip('formB')" onmouseout="UnTip()">?</b>]</td> </tr> <tr> <td colspan='6' align='center'><input type='submit' value='Freeze Account' /></td> </tr> </form> </table> <span id="formA">Choose the player you want to freeze.</span> <span id="formB">Enter a reason why their getting their account frozen.</span> <span id="formC">Enter the number of days their account is frozen.</span> </div>
  3. <div class='content'> <h3>Forum Ban Player</h3> <table width='100%'> <tr> <td colspan='2'><h4>Forum Ban Player</h4></td> </tr> </table> <table width='100%'> <form action='staff_panel.php?action=submitforumban' method='post' name='forumban'> <tr> <td width='20%'><h4 onmouseover="TagToTip('formA')" onmouseout="UnTip()">Name</h4></td> <td width='27%'> <input type='hidden' name='searchPlayer' value=''> <input type='text' name='searchPlayerText' value="" size='14' class='itNoB' readonly> <a href="act_select.php?t=forumban" class="lbOn">select</a> </td> <td width='3%'>[<b class='qmark' onmouseover="TagToTip('formA')" onmouseout="UnTip()">?</b>]</td> </tr> <tr> <td><h4 onmouseover="TagToTip('formC')" onmouseout="UnTip()">Days</h4></td> <td><input type='text' name='days' size='40' maxlength='50' value=""></td> <td>[<b class='qmark' onmouseover="TagToTip('formC')" onmouseout="UnTip()">?</b>]</td> </tr> <tr> <td width='20%'><h4 onmouseover="TagToTip('formB')" onmouseout="UnTip()">Reason</h4></td> <td width='27%'><input type='text' name='reason' size='40' maxlength='100' value=""></td> <td width='3%'>[<b class='qmark' onmouseover="TagToTip('formB')" onmouseout="UnTip()">?</b>]</td> </tr> <tr> <td colspan='6' align='center'><input type='submit' value='Issue Forum Ban' /></td> </tr> </form> </table> <span id="formA">Choose the player you want to forum ban.</span> <span id="formB">Enter a reason why their getting forum banned.</span> <span id="formC">Enter the number of days their forum banned.</span> </div> <?php } function submit_forumban() { $result2 = mysql_query("SELECT `id` FROM `users` WHERE `username` = '".$_POST['searchPlayerText']."'"); $worked = mysql_fetch_array($result2); $forumban = new User($worked['id']); $reason = mysql_real_escape_string($_POST["reason"]); $days = mysql_real_escape_string($_POST["searchDaysText"]); if($_POST['searchPlayerText'] == "GIOVANNI"){ echo " <div class='content'> <h3>Forum Ban Player</h3> <p>You can't forum ban player ".$forumban->formattedname.", as he his the Owner. <br> <a href='staff_panel.php?action=forum'>Back</a></p></div>"; die(); } else if($_POST['searchPlayerText'] == "Divers1oN"){ echo " <div class='content'> <h3>Forum Ban Player</h3> <p>You can't forum ban player ".$forumban->formattedname.", as they are the Owner. <br> <a href='staff_panel.php?action=forum'>Back</a></p></div>"; die(); } if(is_numeric($_POST['days'])){ $result = mysql_query("UPDATE `users` SET `forumban` = '1', `fb_reason` = '".$_POST['reason']."', `days` = '".$_POST['days']."' WHERE `username`= '".$_POST['searchPlayerText']."'"); echo " <div class='content'> <h3>Forum Ban Player</h3> <p>".$forumban->formattedname." has been successfully forum banned for ".$_POST['days']." day(s). <br> <a href='staff_panel.php?action=forumban'>Back</a></p></div>"; die(); } else { echo " <div class='content'> <h3>Forum Ban Player</h3> <p>You must enter a valid amount of days. <br> <a href='staff_panel.php?action=forum'>Back</a></p></div>"; die(); } } function revoke_forumban() { ?>
  4. <?php } function submit_mailban() { $result2 = mysql_query("SELECT `id` FROM `users` WHERE `username` = '".$_POST['searchPlayerText']."'"); $worked = mysql_fetch_array($result2); $mailban = new User($worked['id']); $reason = mysql_real_escape_string($_POST["reason"]); $days = mysql_real_escape_string($_POST["searchDaysText"]); if($_POST['searchPlayerText'] == "GIOVANNI"){ echo " <div class='content'> <h3>Mailban Player</h3> <p>You can't mailban player ".$mailban->formattedname.", as he his the Owner. <br> <a href='staff_panel.php?action=mail'>Back</a></p></div>"; die(); } else if($_POST['searchPlayerText'] == "Divers1oN"){ echo " <div class='content'> <h3>Mailban Player</h3> <p>You can't mailban player ".$mailban->formattedname.", as they are the Owner. <br> <a href='staff_panel.php?action=mail'>Back</a></p></div>"; die(); } if(is_numeric($_POST['days'])){ $result = mysql_query("UPDATE `users` SET `mailban` = '1', `mb_reason` = '".$_POST['reason']."', `days` = '".$_POST['days']."' WHERE `username`= '".$_POST['searchPlayerText']."'"); echo " <div class='content'> <h3>Mailban Player</h3> <p>".$mailban->formattedname." has been successfully mailbanned for ".$_POST['days']." day(s). <br> <a href='staff_panel.php?action=mailban'>Back</a></p></div>"; die(); } else { echo " <div class='content'> <h3>Mailban Player</h3> <p>You must enter a valid amount of days. <br> <a href='staff_panel.php?action=mail'>Back</a></p></div>"; die(); } } function revoke_mailban() { ?> <div class='content'> <h3>Revoke Mailban</h3> <table width='100%'> <tr> <td colspan='2'><h4>Revoke Mailban</h4></td> </tr> </table> <table width='100%'> <form action='staff_panel.php?action=submitmailrevoke' method='post' name='revokemailban'> <tr> <td width='20%'><h4 onmouseover="TagToTip('formA')" onmouseout="UnTip()">Name</h4></td> <td width='27%'><input type='hidden' name='searchPlayer' value=''> <input type='text' name='searchPlayerText' value="" size='14' class='itNoB' readonly> <a href='act_select.php?t=revokemail' class='lbOn'>select</a></td> <td width='3%'>[<b class='qmark' onmouseover="TagToTip('formA')" onmouseout="UnTip()">?</b>]</td> </tr> <tr> <td> </td> <td><input type='submit' value='Revoke Mailban' /></td> </tr> </form> <span id="formA">Choose the player you want to revoke their mailban.</span> </table> </div> <?php } function submit_mailrevoke() { $result = mysql_query("UPDATE `users` SET `mailban` = '0' WHERE `username` = '".$_POST['searchPlayerText']."'"); $result2 = mysql_query("SELECT `id` FROM `users` WHERE `username` = '".$_POST['searchPlayerText']."'"); $worked = mysql_fetch_array($result2); $mailbanRevoke = new User($worked['id']); echo " <div class='content'> <h3>Revoke Mailban</h3> <p>".$mailbanRevoke->formattedname."'s mailban has been successfully revoked. <br> <a href='staff_panel.php?action=revokemail'>Back</a></p></div>"; die(); } function forum_ban() { ?>
  5. echo " <table width='100%'> <tr> <td colspan='2'><h4>Last 10 Staff Events</h4></td> </tr> </table> <table width='100%'> <tr> <td><h4>Staff</h4></td> <td><h4>Action</h4></td> <td><h4>Date/Time</h4></td> </tr>"; $result2 = mysql_query("SELECT * FROM `stafflog` ORDER BY `timesent` DESC LIMIT 10"); while ($line = mysql_fetch_array($result2)) { $staff_logs = new User($line['user']); $events = mysql_num_rows($result2); echo " <tr> <td align='center'>".$staff_logs->formattedname."</td> <td align='center'>".$line['action']."</td> <td align='center'>".date(d." ".M.", ".y." ".g.":".i."".a,$line['timesent'])."</td> </tr>"; } if($events < 1){ echo " <table width='100%'> <tr> <td colspan='2'><div style='text-align:center;'><i>There are no staff events.</i></div></td> </tr> </table> </div>"; } } function mail_ban() { ?> <div class='content'> <h3>Mailban Player</h3> <table width='100%'> <tr> <td colspan='2'><h4>Mailban Player</h4></td> </tr> </table> <table width='100%'> <form action='staff_panel.php?action=submitmailban' method='post' name='mailban'> <tr> <td width='20%'><h4 onmouseover="TagToTip('formA')" onmouseout="UnTip()">Name</h4></td> <td width='27%'> <input type='hidden' name='searchPlayer' value=''> <input type='text' name='searchPlayerText' value="" size='14' class='itNoB' readonly> <a href="act_select.php?t=mailban" class="lbOn">select</a> </td> <td width='3%'>[<b class='qmark' onmouseover="TagToTip('formA')" onmouseout="UnTip()">?</b>]</td> </tr> <tr> <td><h4 onmouseover="TagToTip('formC')" onmouseout="UnTip()">Days</h4></td> <td><input type='text' name='days' size='40' maxlength='50' value=""></td> <td>[<b class='qmark' onmouseover="TagToTip('formC')" onmouseout="UnTip()">?</b>]</td> </tr> <tr> <td width='20%'><h4 onmouseover="TagToTip('formB')" onmouseout="UnTip()">Reason</h4></td> <td width='27%'><input type='text' name='reason' size='40' maxlength='100' value=""></td> <td width='3%'>[<b class='qmark' onmouseover="TagToTip('formB')" onmouseout="UnTip()">?</b>]</td> </tr> <tr> <td colspan='6' align='center'><input type='submit' value='Issue Mailban' /></td> </tr> </form> </table> <span id="formA">Choose the player you want to mail ban.</span> <span id="formB">Enter a reason why their getting mail banned.</span> <span id="formC">Enter the number of days their mail banned.</span> </div>
  6. </div><!-- end .header --> <div class='left'> <ul class="menu"> <li><a href="."> Users</a> <ul> <li><a href='staff_panel.php?action=mailban'> Mailban Player</a></li> <li><a href='staff_panel.php?action=revokemail'> Revoke Mailban</a></li> <li><a href='staff_panel.php?action=forumban'> Forum Ban Player</a></li> <li><a href='staff_panel.php?action=revokeforum'> Revoke Forum Ban</a></li> <li><a href='staff_panel.php?action=freeze'> Freeze Player</a></li> <li><a href='staff_panel.php?action=revokefreeze'> Revoke Freeze</a></li> <li><a href='staff_panel.php?action=playernotes'> View Player Notes</a></li> </ul> </li> <li><a href="."> Logs</a> <ul> <li><a href='staff_panel.php?action=attacklog'> Attack Logs</a></li> <li><a href='staff_panel.php?action=moneylog'> Money Xfer Logs</a></li> <li><a href='staff_panel.php?action=pointlog'> Points Xfer Logs</a></li> <li><a href='staff_panel.php?action=itemlog'> Item Xfer Logs</a></li> <li><a href='staff_panel.php?action=maillog'> Mail Logs</a></li> </ul> </li> <li><a href="." id="collapsed"> Other Tools</a> <ul> <li><a href='staff_panel.php?action=contactmessages'> Contact Messages <!_-contactmessages-_!></a></li> <li><a href='staff_panel.php?action=supporttickets'> Support Tickets <!_-support-_!></a></li> <li><a href='staff_panel.php?action=staffnotes'> View Staff Notes</a></li> <li><a href='staff_panel.php?action=addnote'> Add Staff Note</a></li> <li><a href='staff_panel.php?action=ipsearch'> Ip Search</a></li> <li><a href='home.php'> Back To Game</a></li> </ul> </li> </ul> </div> <?php $_GET['action'] = isset($_GET['action']) && ctype_alpha($_GET['action']) ? trim($_GET['action']) : 'staff_index'; switch($_GET['action']) { case 'mailban' : mail_ban(); break; case 'submitmailban' : submit_mailban(); break; case 'revokemail' : revoke_mailban(); break; case 'submitmailrevoke' : submit_mailrevoke(); break; case 'forumban' : forum_ban(); break; case 'submitforumban' : submit_forumban(); break; case 'revokeforum' : revoke_forumban(); break; case 'submitforumrevoke' : submit_forumrevoke(); break; case 'freeze' : freeze_player(); break; case 'submitfreeze' : submit_freeze(); break; case 'revokefreeze' : revoke_freeze(); break; case 'submitfreezerevoke' : submit_freezerevoke(); break; case 'ipsearch' : ip_search(); break; case 'ipsubmit' : ipsearch_submit(); break; case 'contactmessages' : contact_messages(); break; case 'attacklog' : attack_logs(); break; case 'moneylog' : money_logs(); break; case 'pointlog' : point_logs(); break; case 'itemlog' : item_logs(); break; case 'maillog' : mail_logs(); break; case 'submitmaillog' : submit_maillog(); break; case 'staffnotes' : staff_notes(); break; case 'addnote' : add_note(); break; case 'submitnote' : submit_note(); break; case 'supporttickets' : support_tickets(); break; default : staff_index(); break; } function staff_index() { echo " <div class='content'> <h3>Staff Panel</h3> <table width='100%'> <tr> <td colspan='2'><h4>Last 3 Staff Notes</h4></td> </tr>"; $result = mysql_query("SELECT * FROM `staffnotes` ORDER BY `timesent` DESC LIMIT 3"); while ($line = mysql_fetch_array($result)){ $staff_notes = new User($line['user']); $notes = mysql_num_rows($result); echo " <tr> <td class='forumSide' align='center' valign='top'>".date(d." ".M.", ".y." ".g.":".i."".a,$line['timesent'])." <br> ".$staff_notes->formattedname."</td> <td class='forumPost' valign='top'>".$line['note']."</td> </tr>"; } if($notes < 1){ echo " <table width='100%'> <tr> <td colspan='2'><div style='text-align:center;'><i>There are no staff notes.</i></div></td> </tr> </table>"; }
  7. <script type='text/javascript' src='/javascript/wz_tooltip.js'></script> <div class="wrapper"> <div class="header"> <img style="float:left" src="/images/ingamebanner.png" /> <div class="stats"> <table> <tr> <td colspan="2">[<? echo $user_class->id; ?>] <a href="profiles.php?id=<? echo $user_class->id; ?>" class="userlink" rel="<? echo $user_class->id; ?>"><?php echo $user_class->formattedname; ?></a></td> <td>HP:</td> <td width="145px"> <table width="100%" height="5px" style="border: solid 1px #660000"> <tr height="5px"> <td width="100%" style="background-color: #ec0303;" title="<!_-formhp-_!>"></td> <td width="<!_-hpperc-_!>%" style="background-color: #343434;" title="<!_-formhp-_!>"><td> </div><td> </tr> </table> </td> <td> <span style='color:#999'><!_-hpperc-_!>%</span></td> </tr> <tr> <td width="55px">Level:</td> <td width="170px"><!_-level-_!></td> <td>Energy:</td> <td width="145px"> <table width="100%" height="5px" style="border: solid 1px #660000"> <tr height="5px"> <td width="100%" style="background-color: #ec0303;" title="<!_-formenergy-_!>"></td> <td width="<!_-energyperc-_!>%" style="background-color: #343434;" title="<!_-formenergy-_!>"><td> </div><td> </tr> </table> </td> <td> <span style='color:#999'><!_-energyperc-_!>%</span></td> </tr> <tr> <td width="55px">Money:</td> <td width="170px">$<!_-money-_!></td> <td>Stamina:</td> <td width="145px"> <table width="100%" height="5px" style="border: solid 1px #660000"> <tr height="5px"> <td width="100%" style="background-color: #ec0303;" title="<!_-formstamina-_!>"></td> <td width="<!_-staminaperc-_!>%" style="background-color: #343434;" title="<!_-formstamina-_!>"><td> </div></td> </tr> </table> </td> <td> <span style='color:#999'><!_-staminaperc-_!>%</span></td> </tr> <tr> <td width="55px">Bank:</td> <td width="170px">$<!_-bank-_!></td> <td>Nerve:</td> <td width="145px"> <table width="100%" height="5px" style="border: solid 1px #660000"> <tr height="5px"> <td width="100%" style="background-color: #ec0303;" title="<!_-formnerve-_!>"></td> <td width="<!_-nerveperc-_!>%" style="background-color: #343434;" title="<!_-formnerve-_!>"><td> </div></td> </tr> </table> </td> <td> <span style='color:#999'><!_-nerveperc-_!>%</span></td> </tr> <tr> <td width="55px">Points:</td> <td width="170px"><!_-points-_!> [<a href = "spendpoints.php">use</a>] [<a href = "rmstore.php">buy</a>]</td> <td>EXP:</td> <td width="145px"> <table width="100%" height="5px" style="border: solid 1px #660000"> <tr height="5px"> <td width="<!_-expperc-_!>%" style="background-color: #ec0303;" title="<!_-formexp-_!>"></td> <td width="100%" style="background-color: #343434;" title="<!_-formexp-_!>"><td> </div></td> </tr> </table> </td> <td> <span style='color:#999'><!_-expperc-_!>%</span></td> </tr> </tr> </table> </div><!-- end .stats --> <div class="newsbar"> <span><a href="refer.php">Refer For Points</a> | <a href="upgrade.php">Upgrade Account</a> | <a href='dailyreward.php'>Daily Reward</a></span><? echo $time; ?> | Day Update: 12:00am </div>
  8. You might need to change some stuff, as my css is way different from the GRPG css.. I should have uploaded the file instead of posting it all here, but I don't know how to do that so you guys will just have to enjoy my spam for this one. An Image will be provide also. And one more thing, this is not secured, so you might get someone to secure it for you. I saved this as staff_panel.php <?php session_start(); if ($user_class->admin == 3) { echo " <div class='content'> <h3>Staff Panel</h3> <div style='text-align:center;'> You have no access to the Staff Panel. </div></div>"; die(); } if ($user_class->admin == 2) { echo " <div class='content'> <h3>Staff Panel</h3> <div style='text-align:center;'> You have no access to the Staff Panel. </div></div>"; die(); } if ($user_class->admin == 12) { echo " <div class='content'> <h3>Staff Panel</h3> <div style='text-align:center;'> You have no access to the Staff Panel. </div></div>"; die(); } if (!isset($_SESSION['id'])){ include('home.php'); die(); } include (DIRNAME(__FILE__) . '/dbcon.php'); include (DIRNAME(__FILE__) . '/classes.php'); include (DIRNAME(__FILE__) . '/updates.php'); include (DIRNAME(__FILE__) . '/parser.php'); function microtime_float() { $time = microtime(); return (double)substr( $time, 11 ) + (double)substr( $time, 0, 8 ); } microtime_float(); $starttime = microtime_float(); $user_class = new User($_SESSION['id']); $time = date(F." ".d.", ".Y." ".g.":".i.":".sa,time()); $result = mysql_query("UPDATE `users` SET `lastactive` = '".time()."', `ip` = '".$_SERVER['REMOTE_ADDR']."' WHERE `id`='".$_SESSION['id']."'"); function callback($buffer){ $user_class = new User($_SESSION['id']); $check_contact = mysql_query("SELECT * FROM `contact_messages` WHERE `viewed`='1'"); $num_mails = mysql_num_rows($check_contact); if($num_mails != 0) { $new_contacts = "<span class='newNotify'>NEW</span>"; } else if ($num_mails < 1) { $new_contacts = "-"; } $contactmessages = "[".$new_contacts."]"; $check_staffapps = mysql_query("SELECT * FROM `staff_apps` WHERE `viewed` = '1'"); $num_mails = mysql_num_rows($check_staffapps); if($num_mails != 0) { $new_apps = "<span class='newNotify'>NEW</span>"; } else if ($num_mails < 1) { $new_apps = "-"; } $staffapps = "[".$new_apps."]"; $out = $buffer; $out = str_replace("<!_-money-_!>", number_format($user_class->money), $out); $out = str_replace("<!_-bank-_!>", number_format($user_class->bank), $out); $out = str_replace("<!_-formhp-_!>", $user_class->formattedhp, $out); $out = str_replace("<!_-hpperc-_!>", $user_class->hppercent, $out); $out = str_replace("<!_-formenergy-_!>", $user_class->formattedenergy, $out); $out = str_replace("<!_-energyperc-_!>", $user_class->energypercent, $out); $out = str_replace("<!_-formstamina-_!>", $user_class->formattedstamina, $out); $out = str_replace("<!_-staminaperc-_!>", $user_class->staminapercent, $out); $out = str_replace("<!_-formnerve-_!>", $user_class->formattednerve, $out); $out = str_replace("<!_-nerveperc-_!>", $user_class->nervepercent, $out); $out = str_replace("<!_-formexp-_!>", $user_class->formattedexp, $out); $out = str_replace("<!_-expperc-_!>", $user_class->exppercent, $out); $out = str_replace("<!_-points-_!>", number_format($user_class->points), $out); $out = str_replace("<!_-level-_!>", $user_class->level, $out); $out = str_replace("<!_-hospital-_!>", $hospital, $out); $out = str_replace("<!_-jail-_!>", $jail, $out); $out = str_replace("<!_-contactmessages-_!>", $contactmessages, $out); $out = str_replace("<!_-staffapps-_!>", $staffapps, $out); $out = str_replace("<!_-effects-_!>", $effects, $out); $out = str_replace("<!_-cityname-_!>", $user_class->cityname, $out); return $out; } ob_start("callback"); define("DATE_FORMAT","d-m-Y H:i:s"); define("LOG_FILE","ip.php"); $userIp = ( isset($_SERVER['REMOTE_ADDR']) && ($_SERVER['REMOTE_ADDR'] != "")) ? $_SERVER['REMOTE_ADDR'] : "Unknown"; $refferer = ( isset($_SERVER['HTTP_REFERER']) && ($_SERVER['HTTP_REFERER'] != "")) ? $_SERVER['HTTP_REFERER'] : "Unknown"; $uri = ( isset($_SERVER['REQUEST_URI']) && ($_SERVER['REQUEST_URI'] != "")) ? $_SERVER['REQUEST_URI'] : "Unknown"; $hostName = gethostbyaddr($userIp); $logEntry = " <tr> <td width='35%'><center>$time</center></td> <td width='35%'><center><a href=http://whatismyipaddress.com/ip/$userIp>$userIp</a></center></td> <td width='35%'><center>$user_class->formattedname</center></td> <td width='35%'><center>$refferer</center></td> </tr>\n"; if (!file_exists(LOG_FILE)) { $logFile = fopen(LOG_FILE,"w"); fwrite($logFile); } else { $logFile = fopen(LOG_FILE,"a"); } fwrite($logFile,$logEntry); fclose($logFile); if(!get_magic_quotes_gpc()) { $_GET = array_map('mysql_real_escape_string', $_GET); $_POST = array_map('mysql_real_escape_string', $_POST); $_COOKIE = array_map('mysql_real_escape_string', $_COOKIE); } else { $_GET = array_map('stripslashes', $_GET); $_POST = array_map('stripslashes', $_POST); $_COOKIE = array_map('stripslashes', $_COOKIE); $_GET = array_map('mysql_real_escape_string', $_GET); $_POST = array_map('mysql_real_escape_string', $_POST); $_COOKIE = array_map('mysql_real_escape_string', $_COOKIE); } ?> <html> <head> <title>Hitman Massacre - Staff Panel</title> <link rel="shortcut icon" href="/images/favicon.ico?" type="image/x-icon" /> <link rel="stylesheet" href="style.css" media="screen,projection" type="text/css" /> <link rel="stylesheet" href="css/lightbox.css" type="text/css" /> <script src="scripts/lightbox.js" type="text/javascript"></script> <style type="text/css" media="screen,print"> /* Disable properties specified in the imported CSS file */ .menu a { border:none; font-weight:normal; } /* Actual menu CSS starts here */ .menu, .menu ul { margin:0; padding:0; list-style:none; } .menu {width:170px;} .menu li { display:block; margin:0; margin-bottom:1px; padding: 0 0 0 0px; background-repeat: no-repeat; background-position: 8px 8px; list-style: none; } .menu a { display:block; line-height: 20px; color:#FFF; padding-left:0px; font-weight: bold; background:#282828; text-decoration:none; } .menu a:hover, .menu a:focus, .menu ul li { padding-left:0px;} .menu ul a {color:#000; background:#FFF; background-repeat: no-repeat; background-position: 8px 8px;} .menu ul a:hover {background:#606060;} .hidden {display:none;} </style> </head> <body>
  9. urbanmafia, have you got the chance to upload that forum for Grpg yet? I really apologize for keep bugging you on this..
  10. Thanks Mate, had difficulties trying to use an AJAX delete function.. So I just took that out and just placed a link to delete it.. I just don't know how I wanna have the Online User list... x_x
  11. I'm currently working on an AJAX, MYSQL shoutbox.. Almost done with it, it will include staff being able to delete messages, might try to get an Online Users list working. I'll post it as soon as I get it 100% completed. I'm just looking up how to delete a message with AJAX, think I found something.. Here's a preview without the Online Users list:
  12. Because the one I coded looks a lot better and it includes Money & Points instead of having two links
  13. Lawls, I guess not.. I'll just figure it out on my own, thanks for nothing :|
  14. I don't see one skooda, free feel to code one and post in on here :)
  15. Anybody know if they can help me out?
  16. I made or well attempted to make a different 50/50 Chance, but I can't seem to get it to work right.. It works, but when someone tries to match my bet it doesn't do anything.. And when I try to remove my bet, nothing.. Can someone fix it for me, lol   <?php include (DIRNAME(__FILE__) . '/header.php'); echo "<div class='content'><h3>50/50 Chance</h3>"; if($_GET['match'] != ""){ $result = mysql_query("SELECT * FROM `5050chance` WHERE `id` = '".$_GET['match']."'"); $worked = mysql_fetch_array($result); $betAmount = $worked['betAmount']; $chance = new User($worked['owner_id']); if($worked['betType'] == 1){ if($betAmount > $user_class->money){ echo " <p>You don't have enough to match their bet. <br><br> <a href='5050chance.php'>Back</a></p></div>"; die(); } elseif($betAmount <= $user_class->money){ $newmoney = $user_class->money - $betAmount; $result = mysql_query("UPDATE `users` SET `money` = '".$newmoney."' WHERE `id` = '".$user_class->id."'"); $user_class = new User($_SESSION['id']); $winner = rand(0,1); if($winner == 0){ //original poster wins echo " <p>You lost the bet. <br><br> <a href='5050chance.php'>Back</a></p></div>"; die(); $betAmount = $betAmount * 2; $newmoney = $user_class->money + $betAmount; $result = mysql_query("UPDATE `users` SET `money` = '".$newmoney."' WHERE `id` = '".$user_class->id."'"); Send_Event($chance->id, "You won your $".$betAmount." bet."); } else { //the person who accepted the bid won echo " <p>You won the bet. <br><br> <a href='5050chance.php'>Back</a></p></div>"; die(); $betAmount = $betAmount * 2; $newmoney = $user_class->money + $betAmount; $result = mysql_query("UPDATE `users` SET `money` = '".$newmoney."' WHERE `id` = '".$user_class->id."'"); Send_Event($chance->id, "You lost your $".$betAmount." bet."); } $result = mysql_query("DELETE FROM `5050chance` WHERE `id` = '".$_GET['match']."'") or die(mysql_error()); } } elseif($worked['betType'] == 2){ if($betAmount > $user_class->points){ echo " <p>You don't have enough to match their bet. <br><br> <a href='5050chance.php'>Back</a></p></div>"; die(); } elseif($betAmount <= $user_class->money){ $newpoints = $user_class->points - $betAmount; $result = mysql_query("UPDATE `users` SET `points` = '".$newpoints."' WHERE `id` = '".$user_class->id."'"); $user_class = new User($_SESSION['id']); $winner = rand(0,1); if($winner == 0){ //original poster wins echo " <p>You lost ",$betAmount." points from the bet. <br><br> <a href='5050chance.php'>Back</a></p></div>"; die(); $betAmount = $betAmount * 2; $newpoints = $user_class->money + $betAmount; $result = mysql_query("UPDATE `users` SET `points` = '".$newpoints."' WHERE `id` = '".$user_class->id."'"); Send_Event($chance->id, "You won your $".$betAmount." bet."); } else { //the person who accepted the bid won echo " <p>You won ".$betAmount." points from the bet. <br><br> <a href='5050chance.php'>Back</a></p></div>"; die(); $betAmount = $betAmount * 2; $newpoints = $user_class->points + $betAmount; $result = mysql_query("UPDATE `users` SET `points` = '".$newpoints."' WHERE `id` = '".$user_class->id."'"); Send_Event($chance->id, "You lost your $".$betAmount." bet."); } $result = mysql_query("DELETE FROM `5050chance` WHERE `id` = '".$_GET['match']."'") or die(mysql_error()); } } } if($_GET['remove'] != ""){ $result = mysql_query("SELECT * FROM `5050chance` WHERE `id` = '".$_GET['remove']."'"); $worked = mysql_fetch_array($result); if($row['betType'] == 1){ $newmoney = $user_class->money + $row['betAmount']; $result1 = mysql_query("UPDATE `users` SET `money` = '".$newmoney."' WHERE `id` = '".$user_class->id."'") or die(mysql_error()); $result2 = mysql_query("DELETE FROM `5050chance` WHERE `id` = '".$_GET['remove']."'") or die(mysql_error()); } elseif($row['betType'] == 2){ $newpoints = $user_class->points + $row['betAmount']; $result1 = mysql_query("UPDATE `users` SET `points` = '".$newpoints."' WHERE `id` = '".$user_class->id."'") or die(mysql_error()); $result2 = mysql_query("DELETE FROM `5050chance` WHERE `id` = '".$_GET['remove']."'") or die(mysql_error()); } } if(isset($_POST['betMoney'])){ $betAmount = abs(@intval($_POST['betAmount'])); if($betAmount > $user_class->money){ echo " <p>You can't bet more than you have. <br><br> <a href='5050chance.php'>Back</a></p></div>"; die(); } elseif($betAmount < 99){ echo " <p>You can't bet less than the minimum. <br><br> <a href='5050chance.php'>Back</a></p></div>"; die(); } elseif($betAmount > 9999){ echo " <p>You can't bet more than the maximum. <br><br> <a href='5050chance.php'>Back</a></p></div>"; die(); } else { $newmoney = $user_class->money - $betAmount; $result = mysql_query("INSERT INTO `5050chance` (`owner_id`, `betAmount`, `betType`)"."VALUES ('".$user_class->id."', '".$betAmount."', '1')") or die(mysql_error()); $result = mysql_query("UPDATE `users` SET `money` = '".$newmoney."' WHERE `id` = '".$user_class->id."'"); $user_class = new User($_SESSION[' ']); echo " <p>You have successfully placed a bet. <br><br> <a href='5050chance.php'>Back</a></p></div>"; die(); } } if(isset($_POST['betPoints'])){ $betAmount = abs(@intval($_POST['betAmount'])); if($betAmount > $user_class->points){ echo " <p>You can't bet more than you have. <br><br> <a href='5050chance.php'>Back</a></p></div>"; die(); } elseif($betAmount < 9){ echo " <p>You can't bet less than the minimum. <br><br> <a href='5050chance.php'>Back</a></p></div>"; die(); } elseif($betAmount > 999){ echo " <p>You can't bet more than the maximum. <br><br> <a href='5050chance.php'>Back</a></p></div>"; die(); } else { $newpoints = $user_class->points - $betAmount; $result = mysql_query("INSERT INTO `5050chance` (`owner_id`, `betAmount`, `betType`)"."VALUES ('".$user_class->id."', '".$betAmount."', '2')") or die(mysql_error()); $result = mysql_query("UPDATE `users` SET `points` = '".$newpoints."' WHERE `id` = '".$user_class->id."'"); $user_class = new User($_SESSION[' ']); echo " <p>You have successfully placed a bet. <br><br> <a href='5050chance.php'>Back</a></p></div>"; die(); } } ?> <p align='center'> Try your luck at 50/50- either place a bet of your own or match someone else's!<br /> If you win, you end up with 100% of the pot. </p> <table width='100%'> <tr> <td width='50%'><h4>Money</h4></td> <td width='50%'><h4>Points</h4></td> </tr> <tr> <form method='post'> <td align='center'> <input type='text' name='betAmount' size='14' maxlength='10' value='0.00'> <input type='submit' name='betMoney' value='Bet'> <br /> min: $100.00<br /> max: $10,000.00 </td> </form> <form method='post'> <td align='center'> <input type='text' name='betAmount' size='14' maxlength='6' value='0'> <input type='submit' name='betPoints' value='Bet'> <br /> min: 10<br /> max: 1,000 </td> </form> </tr> </table> <table width='100%'> <tr> <td width='40%'><h4>Player</h4></td> <td width='40%'><h4>Bet</h4></td> <td width='20%'><h4>Action</h4></td> </tr> <?php $result = mysql_query("SELECT * FROM `5050chance` ORDER BY `id` DESC"); while ($row = mysql_fetch_array($result)){ $chance = new User($row['owner_id']); $betAmount = number_format($row['betAmount']); if($row['betType'] == 1) { $bet = "$"; } elseif($row['betType'] == 2){ $bet = ""; } if($row['betType'] == 1) { $betType = "<i>($".$betAmount.")</i>"; } elseif($row['betType'] == 2){ $betType = "points";} if($user_class->id == $row['owner_id']){ $betAction = "<a href='5050chance.php?remove=".$row['id']."'>remove</a>"; } else { $betAction = "<a href='5050chance.php?match=".$row['id']."'>match</a>"; } echo " <tr> <td align='center'>".$chance->formattedname."</td> <td align='center'>".$bet."".$betAmount." ".$betType."</td> <td align='center'>".$betAction."</td> </tr>"; } ?> </table> </div><!-- end .content -->
  17. Hey illusions, This would be for GRPG. Your Friend, SMOKEY_TEK
  18. 1. When I click on a thread, for example Introductions I get this in the url area http://www.yourgame.com/forums.php?viewforum=1%20style 2. When I click on the backspace button I get this Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/hitmanm1/public_html/forums.php on line 323 3. When I try to make a new topic it doesn't really work, doesn't insert into the database... I tried inserting by hand a topic and post in the database, but can't be seen in the actual forums in game..
  19. I made a Mccode V2 forum to work on GRPG, but it's not really working... I tried creating topics and it's not even showing up in anything.. Could someone either help me fix this or let me buy a copy of their forum for GRPG.   <?php include (DIRNAME(__FILE__) . '/header.php'); include (DIRNAME(__FILE__) . '/parser.php'); echo "<div class='content'><h3>Forums</h3>"; function forums_rank($tp) { if ( $tp < 3 ) { return "#1 Absolute Newbie"; } else if ( $tp < 7 ) { return "#2 Newbie"; } else if ( $tp < 12 ) { return "#3 Beginner"; } else if ( $tp < 18 ) { return "#4 Not Experienced"; } else if ( $tp < 25 ) { return "#5 Rookie"; } else if ( $tp < 50 ) { return "#6 Average"; } else if ( $tp < 100 ) { return "#7 Good"; } else if ( $tp< 200 ) { return "#8 Very Good"; } else if ( $tp < 350 ) { return "#9 Greater Than Average"; } else if ( $tp < 500 ) { return "#10 Experienced"; } else if ( $tp < 750 ) { return "#11 Highly Experienced"; } else if ( $tp < 1200 ) { return "#12 Honoured"; } else if ( $tp < 1800 ) { return "#13 Highly Hounoured"; } else if ( $tp < 2500 ) { return "#14 Respect King"; } else if ( $tp < 5000) { return "#15 True Champion"; } } $_GET['action'] = isset($_GET['action']) && ctype_alpha($_GET['action']) ? trim($_GET['action']) : 'forum_index'; $_GET['viewforum']=(int) $_GET['viewforum']; if($_GET['viewtopic'] and $_GET['action'] != 'quote') { $_GET['action']='viewtopic'; } if($_GET['viewforum']) { $_GET['action']='viewforum'; } if($_GET['reply']) { $_GET['action']='reply'; } if($_GET['empty']==1 && $_GET['code']=='kill' && $_SESSION['owner']) { emptyallforums(); } switch($_GET['action']) { case 'viewforum' : view_forum(); break; case 'viewtopic' : view_topic(); break; case 'reply' : reply_reply(); break; case 'newtopicform' : new_topicform(); break; case 'newtopic' : new_topic(); break; case 'quote' : quote_quote(); break; case 'edit' : edit_edit(); break; case 'editsubmit' : edit_submit(); break; case 'lock' : lock(); break; case 'delepost' : delete_post(); break; case 'deletopic' : delete_topic(); break; case 'pin' : pin_pin(); break; case 'recache' : recache_forum($_GET['forum']); break; default : forum_index(); break; } function forum_index() { echo " <table width='100%' id='forum'> <tr> <td colspan='4' class='forumBreadTrail'><a href='forums.php'>Forum</a></td> </tr> <tr> <td width='50%'><h4>Forum</h4></td> <td width='12%'><h4>Topics</h4></td> <td width='12%'><h4>Posts</h4></td> <td width='26%'><h4>Last Post</h4></td> </tr>"; $result = mysql_query("SELECT * FROM `forum_forums` WHERE `ff_auth` = 'public' ORDER BY `ff_id` ASC") or die(mysql_error()); while( $row = mysql_fetch_array($result)){ $date = date(d." ".M." ".y.", ".g.":".i." ".a,$row['ff_lp_time']); echo " <tr> <td width='50%' align='center'><a href='forums.php?viewforum=".$row['ff_id']." style='font-weight: 800'>".$row['ff_name']."</a><br><small>".$row['ff_desc']."</small></td> <td width='12%' align='center'>".$row['ff_topics']."</td> <td width='12%' align='center'>".$row['ff_posts']."</td> <td width='26%' align='center'>".$date." <br> In: <a href='forums.php?viewtopic=".$row['ff_lp_t_id']."&lastpost=1' style='font-weight: 800'>".$row['ff_lp_t_name']."</a><br> By: <a href='profiles.php?id=".$row['ff_lp_poster_id']."'>".$row['ff_lp_poster_name']."</a></td> </tr>"; } echo "</table>"; if($user_class->staff == 1){ echo " <h3>Staff Only Forums</h3> <table width='100%'> <tr> <td width='50%'><h4>Forum</h4></td> <td width='12%'><h4>Topics</h4></td> <td width='12%'><h4>Posts</h4></td> <td width='26%'><h4>Last Post</h4></td> </tr>"; $result = mysql_query("SELECT * FROM `forum_forums` WHERE `ff_auth` = 'staff' ORDER BY `ff_id` ASC") or die(mysql_error()); while($row = mysql_fetch_array($result)){ $lastPost = new User($row['ff_lp_poster_id']); $date = date(d." ".M." ".y.", ".g.":".i." ".a,$row['ff_lp_time']); echo " <tr> <td width='50%' align='center'><a href='forums.php?viewforum=".$row['ff_id']."' style='font-weight: 800'>".$row['ff_name']."</a> <br> <small>".$row['ff_desc']."</small></td> <td width='12%' align='center'>".$row['ff_topics']."</td> <td width='12%' align='center'>".$row['ff_topics']."</td> <td width='12%' align='center'>".$row['ff_posts']."</td> <td width='26%' align='center'>".$date." <br> In: <a href='forums.php?viewtopic=".$row['ff_lp_t_id']."&lastpost=1' style='font-weight: 800'>".$row['ff_lp_t_name']."</a> <br> By: <a href='profiles.php?id=".$row['ff_lp_poster_id']."'>".$lastPost->formattedname."</a></td> </tr>"; } echo "</table>"; } } function view_forum() { $result = mysql_query("SELECT * FROM `forum_forums` WHERE `ff_id` = '".$_GET['viewforum']."'"); $row = mysql_fetch_array($result); if($_GET['viewforum'] <> 1 OR $user_class->staff == 1) { $ntl=" [<a href='forums.php?action=newtopicform&forum=".$_GET['viewforum']."'>New Topic</a>]"; } else { $ntl=""; } echo " <table width='100%'> <tr> <td colspan='4' class='forumBreadTrail'><a href='forums.php'>Forums</a> » <a href='forums.php?viewforum=".$_GET['viewforum']."'>".$row['ff_name']."</a></td> </tr> </table> <table width='100%'> <tr> <td width=25%><h4>Topic</h4></td> <td width=25%><h4>Starter</h4></td> <td width='10%'><h4>Posts</h4></td> <td width=15%><h4>Last Post</h4></td> </tr> </table>"; echo " <h3>New Topic</h3> <form action='forums.php?action=newtopic&forum=".$_GET['viewforum']."' method='post'> <table width='100%'> <tr> <td width='25%'><h4>Topic Title</h4></td> <td><input type='text' name='title' size='70'></td> </tr> <tr> <td colspan='2'><h4>Body</h4></td> </tr> <tr> <td colspan='2' align='center'><textarea name='message' cols='70' rows='10'></textarea></td> </tr> <tr> <td colspan='2' align='center'><input type='submit' value='Post' /></td> </tr> </form> </table>"; $result = mysql_query("SELECT * FROM `forum_topics` WHERE `ft_forum_id` = '".$_GET['viewforum']."' ORDER BY `ft_pinned` DESC, `ft_last_time` DESC") or die(mysql_error()); while ($row2 = mysql_fetch_row($result)){ $threadOwner = new User($row2['ft_owner_id']); $lastPoster = new User($row2['ft_last_id']); $t1 = date('F j Y, g:i:s a',$row2['ft_start_time']); $t2 = date('F j Y, g:i:s a',$row2['ft_last_time']); if($row2['ft_pinned']) { $pt="<b>Pinned:</b> "; } else { $pt=""; } if($row2['ft_locked']) { $lt=" <b>Locked:</b>"; } else { $lt=""; } echo " <table width='100%'> <tr> <td width='25%' align='center'>".$pt." ".$lt." <a href='forums.php?viewtopic=".$row2['ft_id']."&lastpost=1'>".$r2['ft_name']."</a></td> <td width='25%' align='center'><a href='profiles.php?id=".$row2['ft_owner_id']."'>".$threadOwner->formattedname."</a></td> <td width='10%' align='center'>".$row2['ft_posts']."</td> <td width='15%' align='center'>".$t2." <br> By: <a href='profiles.php?id=".$row2['ft_last_id']."'>".$lastPoster->formattedname."</a></td> </tr>"; } echo "</table>"; } function view_topic() { $result = mysql_query("SELECT * FROM `forum_topics` WHERE `ft_id` = '".$_GET['viewtopic']."'"); $topic = mysql_fetch_array($result); $result2 = mysql_query("SELECT * FROM `forum_forums` WHERE `ff_id` = '".$topic['ft_forum_id']."'"); $forum = mysql_fetch_array($result2); echo " <table width='100%'> <tr> <td colspan='4' class='forumBreadTrail'><a href='forums.php'>Forums</a> » <a href='forums.php?viewforum=".$forum['ff_id']."'>".$forum['ff_name']."</a> » <a href='forums.php?viewtopic=".$_GET['viewtopic']."'>".$topic['ft_name']."</a></td> </tr> </table>"; $posts_per_page=20; $posts_topic=$topic['ft_posts']; $pages=ceil($posts_topic/$posts_per_page); $st= ($_GET['st']) ? $_GET['st'] : 0; if($_GET['lastpost']) { $st=($pages-1)*20; } $pst=-20; echo "Pages: "; for($i=1;$i<=$pages;$i++){ $pst+=20; echo "<a href='forums.php?viewtopic=".$topic['ft_id']."&st=".$pst."'>"; if($pst == $st) { echo "<b>"; } echo $i; if($pst == $st) { echo "</b>"; } echo "</a> "; if($i % 25 == 0) { echo "<br />"; } } echo "<br />"; if($user_class->staff > 1){ echo " <form action='forums.php?action=move&topic=".$_GET['viewtopic']."' method='post'><b>Move topic to:</b> ".forum_dropdown($c, 'forum', -1)."<input type='submit' value='Move' /></form><br /> <a href='forums.php?action=pin&topic=".$_GET['viewtopic']."'><img src='sticky.jpg' alt='Pin/Unpin Topic' title='Pin/Unpin Topic' /></a><a href='forums.php?action=lock&topic=".$_GET['viewtopic']."'><img src='lock.jpg' alt='Lock/Unlock Topic' title='Lock/Unlock Topic' /></a><a href='forums.php?action=deletopic&topic=".$_GET['viewtopic']."'><img src='delete.gif' alt='Delete Topic' title='Delete Topic' /></a><br />"; } echo " <table width='100%'>"; $result = mysql_query("SELECT * FROM `forum_posts` WHERE `fp_topic_id` = '".$topic['ft_id']."' ORDER BY `fp_time` ASC LIMIT $st, 20"); $no=$st; while( $row = mysql_fetch_array($result)){ $poster = new User($row['fp_poster_id']); $qlink = "[<a href='forums.php?action=quote&viewtopic=".$_GET['viewtopic']."&quotename=". strip_tags($row['fp_poster_name']). "&quotetext=".urlencode($row['fp_text']). "'>Quote Post</a>]"; if($user_class->staff > 1 || $user_class->id == $row['fp_poster_id']){ $elink="<a href='forums.php?action=edit&post=".$row['fp_id']."&topic=".$_GET['viewtopic']."'>EDIT POST</a>"; } else { $elink=""; } $no++; if($no > 1 and $user_class->staff > 1) { $dlink="[<a href='forums.php?action=delepost&post=".$r['fp_id']."'>Delete Post</a>]"; } else { $dlink=""; } $t = date('F j Y, g:i:s a',$row2['fp_time']); if($r['fp_edit_count'] > 0) { $edittext="\n<br /><i>Last edited by <a href='viewuser.php?u={$r['fp_editor_id']}'>{$r['fp_editor_name']}</a> at ".date('F j Y, g:i:s a',$r['fp_editor_time']).", edited <b>{$r['fp_edit_count']}</b> times in total.</i>"; } else { $edittext=""; } if(!$precache[$r['fp_poster_id']]['userid']){ $membq = mysql_query("SELECT * FROM `users` WHERE `id` = '".$row['fp_poster_id']."'"); $memb = mysql_fetch_array($membq); $precache[$memb['id']] = $memb; } else { $memb = $precache[$row['fp_poster_id']]; } $rank = forums_rank($memb['posts']); if($user_class->avatar) { $avatar = "<img src='".$user_class->avatar."' width='100' height='100'>"; } else { $avatar = ""; } echo " <tr> <td class='forumSide' align='center' valign='top'> ".$elink." <br> ".$t." <br> <a href='profile.php?id=".$row['fp_poster_id']."'>".$avatar."</a><br /> ".$poster->formattedname."<br /> ".$rank." <br /></td> <td class='forumPost' valign='top'>"; $formatted_text=bb_code(bbcode(nl2br($row['fp_text']))); echo $formatted_text; echo "</td> </tr>"; } echo "</table>"; $pst=-20; echo "Pages: "; for($i=1;$i<=$pages;$i++){ $pst+=20; echo "<a href='forums.php?viewtopic=".$topic['ft_id']."&st=".$pst."'>"; if($pst == $st) { echo "<b>"; } echo $i; if($pst == $st) { echo "</b>"; } echo "</a> "; if($i % 25 == 0) { echo "<br />"; } } if(!$topic['ft_locked']){ echo "<br><br> <h3>New Reply</h3> <form action='forums.php?reply=".$topic['ft_id']."' method='post'> <table width='100%'> <tr> <td colspan='2' align='center'><textarea name='forumPost' cols='70' rows='10'></textarea></td> </tr> <tr> <td colspan='2' align='center'><input type='submit' value='Post' /></td> </tr> </form> </table>"; } else { echo "<p align='center'>This thread is locked.</p>"; die(); } } function reply_reply() { if(!$topic['ft_locked']){ $result = mysql_query("SELECT * FROM `forum_topics` WHERE `ft_id` = '".$_GET['reply']."'"); $topic = mysql_fetch_array($result); $result2 = mysql_query("SELECT * FROM `forum_forums` WHERE `ff_id` = '".$topic['ft_forum_id']."'"); $forum = mysql_fetch_row($result2); $timestamp = time(); $result = mysql_query("INSERT INTO `forum_posts` (`fp_topic_id`, `fp_forum_id`, `fp_poster_id`, `fp_poster_name`, `fp_time`, `fp_suject`, `fp_text`, `fp_editor_id`, `fp_editor_name`, `fp_editor_time`, `fp_editor_count`)"."VALUES('".$_GET['reply']."', '".$forum['ff_id']."', '".$user_class->id."', '".$user_class->username."', '".$timestamp."', '".$_POST['fp_subject']."', '".$_POST['fp_text']."', 0, '', 0, 0)") or die(mysql_error()); $result = mysql_query("UPDATE `forum_topics` SET `ft_last_id` = '".$user_class->id."', `ft_last_name` = '".$user_class->username."', `ft_last_time` = '".$timestamp."', `ft_posts` = ft_posts+1 WHERE `ft_id` = '".$_GET['reply']."'"); $result = mysql_query("UPDATE `forum_forums` SET `ff_lp_time` = '".$timestamp."', `ff_posts` = ff_posts+1, `ff_lp_poster_id` = '".$user_class->id."', `ff_lp_poster_name` = '".$user_class->username."', `ff_lp_t_id` = '".$_GET['reply']."', `ff_lp_t_name` = '".$topic['ft_name']."' WHERE `ff_id` = '".$forum['ff_id']."'"); $result = mysql_query("UPDATE `users` SET `posts` = posts+1 WHERE `id` = '".$user_class->id."'"); $_GET['lastpost'] = 1; $_GET['viewtopic'] = $_GET['reply']; view_topic(); } else { echo " This thread is locked. <br> <a href='forums.php?viewtopic=".$_GET['reply']."'>Back</a>"; } } function new_topic() { $result = mysql_query("SELECT * FROM `forum_forums` WHERE `ff_id` = '".$_GET['forum']."'"); $r = mysql_fetch_array($result); $timestamp = time(); $result = mysql_query("INSERT INTO `forum_topics` (`ft_forum_id`, `ft_name`, `ft_posts`, `ft_owner_id`, `ft_owner_name`, ft_start_time`, `ft_last_id`, `ft_last_name`, `ft_last_time`, `ft_pinned`, `ft_locked`)"."VALUES ('', '".$_GET['forum'].", '".$_POST['ft_name']."', 0, '".$user_class->id."', '".$user_class->username."', '".$timestamp."', 0, '', 0, 0, 0)"); $i = mysql_insert_id(); $result = mysql_query("INSERT INTO `forum_posts` (`fp_topic_id`, `fp_forum_id`, `fp_poster_id`, `fp_poster_name`, `fp_time`, `fp_subject`, `fp_text`, `fp_editor_id`, `fp_editor_name`, `fp_editor_time`, `fp_edit_count`)"."VALUES ('', '".$i."', '".$r['ff_id']."', '".$user_class->id."', '".$user_class->username."', '".$timestamp."', '".$_POST['message']."', 0, '', 0, 0)") or die(mysql_error()); $result = mysql_query("UPDATE `forum_topics` SET `ft_last_id` = '".$user_class->id."', `ft_last_name` = '".$user_class->username."', `ft_last_time` = '".$timestamp."', `ft_posts` = ft_posts+1 WHERE `ft_id` = '".$i."'"); $result = mysql_query("UPDATE `forum_forums` SET `ff_lp_time` = '".$timestamp."', `ff_posts` = ff_posts+1, `ff_topics` = ff_topics+1, `ff_lp_poster_id` = '".$user_class->id."', `ff_lp_poster_name` = '".$user_class->username."', `ff_lp_t_id` = '".$i."', `ff_lp_t_name` = '".$_POST['ft_name']."' WHERE `ff_id` = ".$r['ff_id']."'"); $result = mysql_query("UPDATE `users` SET `posts` = posts+1 WHERE `id` = '".$user_class->id."'"); $_GET['viewtopic'] = $i; view_topic(); } ?> <body onload="alternate('forum')"> </div>
  20. Any ideas when it will be posted mate?
  21. I play this some what new text-based game, all mostly in Javascript and Ajax. And they have a custom name where you can pick a color and then pick a letter for where you want that color at, and so on.. Just not really certain on how to do this.. I really like the idea that they have, and want to incorporate that into my game if I'm able to find a solution to it.
  22. Okay, I know I am asking a lot, but how would I go about getting different colors up to 16 different colors? For example: SMEXEH JAMES
  23. I got runthis's code to work in my class file now. So again I want to thank each one that helped me accomplish this.
  24. I get this error: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/hitmanm1/public_html/spicedup.php on line 6 Line 6 follows: $colours = array (
  25. Would you be able to add this to my classes for me? I am trying, but not so successful, lol Please let me know! I can get it to work if I put it in it's own file, but can't figure this out.. So frustrating..
×
×
  • Create New...