Jump to content
MakeWebGames

Uridium

Members
  • Posts

    2,667
  • Joined

  • Last visited

  • Days Won

    75

Everything posted by Uridium

  1. Re: [MMCODES V2] HACKING ATTEMPTS LOGGED now open sglobals.php and where you see the die(403); statement overwrite the whole function with.   if($ir['user_level'] <= 1) { include "denied.php"; die(); exit; }   Use the method that you did here on pages that DECLINE users less than level 2 and that should be it..
  2. Re: [MMCODES V2] HACKING ATTEMPTS LOGGED SQLS   CREATE TABLE IF NOT EXISTS `hacklog` ( `id` int(11) NOT NULL auto_increment, `user` int(11) NOT NULL default '0', `time` int(11) NOT NULL default '0', `action` varchar(255) NOT NULL default '', `ip` varchar(15) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;   Now open up global_func.php and add this near bottom.   function hacklog_add($text) { global $db, $ir; $IP = $_SERVER['REMOTE_ADDR']; $text=$db->escape($text); $db->query("INSERT INTO hacklog VALUES(NULL, {$ir['userid']}, unix_timestamp(), '$text', '$IP')"); }   NOW CALL THIS FILE denied.php   <html> <body bgcolor="#000000"> <STYLE type="text/css"> <!-- BODY { scrollbar-face-color: #000000; scrollbar-highlight-color: #00FF00; scrollbar-3dlight-color: #000000; scrollbar-darkshadow-color: #00FF00; scrollbar-shadow-color: #000000; scrollbar-arrow-color: #FF3300; scrollbar-track-color: #000000; } --> </STYLE> </html> <?php //include_once(DIRNAME(__FILE__) . '/globals.php'); echo "<h1 style='text-align:center;'><font color='red'>Sorry ".$ir['username']." You dont have ACCESS to VIEW ".$_SERVER['REQUEST_URI']."</font></h1>"; $log = sprintf("<span style='color:red;'>%s tried to access %s?%s</span>", $ir['username'], $_SERVER['PHP_SELF'], $_SERVER['REQUEST_URI']); hacklog_add($log); die(); exit; ?>   Now open up staff.php and add this   print " <h3>Last 10 Hack Attempts</h3><hr /> <table width='100%' cellspacing='1' class='table'> <tr> <th>User</th> <th>Action</th> <th>Time</th> <th>IP</th> <th><h3>Jail User</h3><form action='staff_punit.php?action=fedsub' method='post'> User: ".user_dropdown($c,'user',$_GET['XID'])." Days: <input type='text' name='days' /> Reason: <input type='text' name='reason' /> <input type='submit' value='Jail User' /></form></th> <th><h3>Unjailing User</h3> The user will be taken out of fed jail. <form action='staff_punit.php?action=unfedsub' method='post'> User: ".fed_user_dropdown($c,'user')." <input type='submit' value='Unjail User' /></form></th> </tr>"; $p=$db->query("SELECT s.*, u.* FROM hacklog AS s LEFT JOIN users AS u ON s.user=u.userid ORDER BY s.time DESC LIMIT 10"); while($r=$db->fetch_row($p)) { print "<tr><td>{$r['username']} [{$r['user']}]</td> <td>{$r['action']}</td> <td>".date('F j Y g:i:s a', $r['time'])."</td> <td>{$r['ip']}</td><td>{$r['fed_reason']}</td><td>UNFED</td></tr>"; } print "</table><hr />";     PART 2 NEXT
  3. Thought this might come in handy for some people it shows staff whos been trying to access pages they shouldnt be looking at LOGS the users name and ID and staff have choice from Option to Jail the person... SCREENIE Will post script once i have them together,,,
  4. Re: [MCCODES V2] Mobile text messaging I'll fix the problem and update the page on here
  5. Re: Small mod to header [any version] Nice mod Lith :) +1 can't add it to my test site but im sure it works great :)
  6. Re: [mccode v2] Items Pic mod check your SQL on phpmyadmin make sure its VARCHAR (255) and not INT
  7. Re: [MCCODES V2] Mobile text messaging Nicely done Plintu :) and a +1 from me :)
  8. Re: [MCCODES V2] Mobile text messaging if( $pack != 1 and $pack != 2 and $pack != 3 and $pack != 4 and $pack != 5 and $pack != 6) { fclose($fp);die(""); } if(($pack == 1 || $pack == 2 || $pack == 3) && $payment_amount != "3.00") { fclose ($fp);die(""); } if($pack == 4 && $payment_amount != "5.00") { fclose ($fp);die(""); } if($pack == 5 && $payment_amount != "10.00") {fclose ($fp);die(""); } if($pack == 6 && $payment_amount != "5.00") {fclose ($fp);die(""); } Make sure you change the Price values to suit your game or if you have more than 6 packs then just rename 6 to the next available number for yout packs.
  9. Re: [MCCODES V2] Mobile text messaging if you want to use the Donation part to give users Credits... Use this,,,, open donator.php and add   [b]TEXT MESSAGING CREDITS ONLY[/b]<ul> [*]\$5.00 = 250 TEXT MESSAGING UNITS <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="{$set['paypal']}"> <input type="hidden" name="item_name" value="{$domain}|250 TEXT MESSAGING UNITS|{$userid}"> <input type="hidden" name="amount" value="5.00"> // SET PRICE FOR CREDITS <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="return" value="http://{$domain}/donatordone.php?action=done&type=tendollars"> <input type="hidden" name="cancel_return" value="http://{$domain}/donatordone.php?action=cancel"> <input type="hidden" name="notify_url" value="http://{$domain}/ipn_donator.php"> <input type="hidden" name="cn" value="Your Player ID"> <input type="hidden" name="currency_code" value="USD"> //CHANGE TO GBP FOR GREAT BRITAIN <input type="hidden" name="tax" value="0"> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form>   Now open ipn_donator.php and overwrite the packs part with this one   if( $pack != 1 and $pack != 2 and $pack != 3 and $pack != 4 and $pack != 5 and $pack != 6) { fclose($fp);die(""); } if(($pack == 1 || $pack == 2 || $pack == 3) && $payment_amount != "3.00") { fclose ($fp);die(""); } if($pack == 4 && $payment_amount != "5.00") { fclose ($fp);die(""); } if($pack == 5 && $payment_amount != "10.00") {fclose ($fp);die(""); } if($pack == 6 && $payment_amount != "5.00") {fclose ($fp);die(""); }   And add this to the bottom after pack 5   else if($pack==6) { $db->query("UPDATE users SET tcredits=250 WHERE userid={$for}"); $d=0; $t="fivedollars"; }
  10. Re: Need Items sql   Ok im confused now :) are you wanting the staff_items.php file and not the SQLS file...
  11. Re: Need Items sql do you just want the standard V2 sqls for items ?   CREATE TABLE `items` ( `itmid` int(11) NOT NULL auto_increment, `itmtype` int(11) NOT NULL default '0', `itmname` varchar(255) NOT NULL default '', `itmdesc` text NOT NULL, `itmbuyprice` int(11) NOT NULL default '0', `itmsellprice` int(11) NOT NULL default '0', `itmbuyable` int(11) NOT NULL default '0', `effect1_on` tinyint(4) NOT NULL default '0', `effect1` text NOT NULL, `effect2_on` tinyint(4) NOT NULL default '0', `effect2` text NOT NULL, `effect3_on` tinyint(4) NOT NULL default '0', `effect3` text NOT NULL, `weapon` int(11) NOT NULL default '0', `armor` int(11) NOT NULL default '0', PRIMARY KEY (`itmid`) ) ENGINE=MyISAM ;   CREATE TABLE `itemtypes` ( `itmtypeid` int(11) NOT NULL auto_increment, `itmtypename` varchar(255) NOT NULL default '', PRIMARY KEY (`itmtypeid`) ) ENGINE=MyISAM ;
  12. Re: [MCCODES V2] Mobile text messaging I'll update the prefs and repost when its done
  13. Re: [MCCODES V2] Mobile text messaging   kk and where do we add that line? lol That is just an example of the SQL youd need to add to update the credits per user.
  14. Re: [MCCODES V2] Mobile text messaging Ooops i knew there was something id forgotten i'll write up a script for it SORRY about that was also trying to do other tasks aswell...
  15. Re: [MCCODES V2] Mobile text messaging PART 2 open up mainmenu.php find $mc=$ir['new_mail']; near top of page Underneath add $tm=$ir['new_textmessage']; Now goto the Announcements part on the same file after the fine } Add   if($tm > 0) { print "[url='textmessage.php']Text Message ($tm)[/url] "; } else { print "[url='textmessage.php']Create Text message[/url] "; }   Now open up preferences.php wheres the Cases are Under the pass_change and after the break(); } add case 'mobilenumchange2': do_mobilenum_change(); break; case 'mobilenumchange': mobilenum_change(); break; Now for the link add this with the rest of the links Create or Change Mobile Number And after the Password function section add this...   function mobilenum_change() { global $db, $ir,$c,$userid,$h; $mobi=$db->query("SELECT mobilenumber FROM users WHERE userid=$userid"); if($db->fetch_row($mobi)) { print "<h2>Your Current Mobile Number Is: </h2><h1>".$ir['mobilenumber']."</h1><h3>Change Mobile Number</h3> If this is your first visit Then please change your number to one other than the selected <form action='preferences.php?action=mobilenumchange2' method='post'>Current Mobile Number: <input type='text' name='oldmobinum' value=".$ir['mobilenumber']." > New Mobile Number: <input type='text' name='newmobic' /> Confirm: <input type='text' name='newmobid' /> <input type='submit' value='Change Mobile Number' /></form>"; } } function do_mobilenum_change() { global $db, $ir,$c,$userid,$h; if($_POST['oldmobinum'] != $ir['mobilenumber']) { print "The current Mobile Number you entered was wrong. [url='preferences.php?action=mobilenumchange']> Back[/url]"; } else if($_POST['newmobic'] !== $_POST['newmobid']) { print "The new Mobile Numbers you entered did not match! [url='preferences.php?action=mobilenumchange']> Back[/url]"; } else { $db->query("UPDATE users SET mobilenumber='{$_POST['newmobic']}' WHERE userid=$userid"); print "<h2>Mobile Number changed to </h2><h1>".$_POST['newmobic']."</h1><h2> Keep note for future Reference</h2> [url='preferences.php?action=mobilenumchange']> Back[/url]"; } }   And your done if you want to make it so users have to donate then the $ for this is $db->query("UPDATE users SET tcredits=10 WHERE userid=$userid"); im using 10 as a guidline you can use what you want and thats it your done,.
  16. Re: [MCCODES V2] Mobile text messaging SQLS   CREATE TABLE `textmessage` ( `textmessage_id` int(11) NOT NULL auto_increment, `textmessage_read` int(11) NOT NULL default '0', `textmessage_from` int(11) NOT NULL default '0', `textmessage_to` int(11) NOT NULL default '0', `textmessage_time` int(11) NOT NULL default '0', `textmessage_subject` int(11) NOT NULL default '555656565', `textmessage_text` text NOT NULL, PRIMARY KEY (`textmessage_id`) ) ENGINE=MyISAM ; CREATE TABLE `textcontacts` ( `cl_ID` int(11) NOT NULL auto_increment, `cl_ADDER` int(11) NOT NULL default '0', `cl_ADDED` int(11) NOT NULL default '0', PRIMARY KEY (`cl_ID`) ) ENGINE=MyISAM ; ALTER TABLE users ADD new_textmessage int(11) NOT NULL default '0'; ALTER TABLE users ADD mobilenumber int(11) NOT NULL default '0'; ALTER TABLE users ADD tcredits int(11) NOT NULL default '0';   call this file textmessage.php   <?php include "globals.php"; /*if($ir['tcredits'] < 0) { print"<font color=red><h1>! TOPUP REQUIRED</h1> <h2>You have run out of Text Credits you can read but cannot Reply</h2> </font>[/b]"; }*/ if($ir['mobilenumber'] < 1) { echo '<font color=red><h3>You Dont Have A Mobile Number</h3> <h2>You will need one to start sending texts</h2> </font>[/b] '; //$h->endpage(); exit; } $_GET['ID'] = abs((int) $_GET['ID']); print "<font size+3> Your Mobile Number is ".$ir['mobilenumber']." </font> <table width=85% class='table' cellspacing='1'><tr><td>[url='textmessage.php?action=inbox']Inbox[/url]</td> <td>[url='textmessage.php?action=outbox']Sent Texts[/url]</td> <td>[url='textmessage.php?action=compose']Compose Text[/url]</td> <td>[url='textmessage.php?action=delall']Delete All Texts[/url]</td> <td>[url='textmessage.php?action=archive']Archive Texts[/url]</td><td>[url='textcontacts.php']My Contacts[/url]</td></tr> </table> "; switch($_GET['action']) { case 'inbox': textmessage_inbox(); break; case 'outbox': textmessage_outbox(); break; case 'compose': textmessage_compose(); break; case 'delete': textmessage_delete(); break; case 'send': textmessage_send(); break; case 'delall': textmessage_delall(); break; case 'delall2': textmessage_delall2(); break; case 'archive': textmessage_archive(); break; default: textmessage_inbox(); break; } function textmessage_inbox() { global $db,$ir,$c,$userid,$h; print <<<OUT Only the last 25 Mobile Messages sent to you are visible. <table width=75% class="table" border="0" cellspacing="1"> <tr> <td class="h" width="30%">From</td> <td class="h" width="70%">Subject/Message</td> </tr> OUT; $q=$db->query("SELECT m.*,u.* FROM textmessage m LEFT JOIN users u ON m.textmessage_from=u.mobilenumber WHERE m.textmessage_to=$userid ORDER BY textmessage_time DESC LIMIT 25"); while($r=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['textmessage_time']); print "<tr><td>"; if($r['userid']) { print "[url='viewuser.php?u={$r[']0{$r['mobilenumber']}[/url]"; } else { print "SYSTEM"; } $fm=urlencode($r['textmessage_text']); print <<<EOF </td> <td>{$r['textmessage_subject']}</td> </tr> <tr> <td>Sent at: {$sent} [url='textmessage.php?action=compose&ID={$r[']Reply[/url] [url='textmessage.php?action=delete&ID={$r[']Delete[/url] [url='preport.php?ID={$r[']Report[/url] </td> <td>{$r['textmessage_text']}</td> </tr> EOF; } if($ir['new_textmessage'] > 0) { $db->query("UPDATE textmessage SET textmessage_read=1 WHERE textmessage_to=$userid"); $db->query("UPDATE users SET new_textmessage=0 WHERE userid=$userid"); } echo '</table>'; } function textmessage_outbox() { global $db,$ir,$c,$userid,$h; print "Only the last 25 messages you have sent are visible. <table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>To</th><th>Subject/Message</th></tr>"; $q=$db->query("SELECT m.*,u.* FROM textmessage m LEFT JOIN users u ON m.textmessage_to=u.mobilenumber WHERE m.textmessage_from=$userid ORDER BY textmessage_time DESC LIMIT 25"); while($r=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['textmessage_time']); print "<tr><td>[url='viewuser.php?u={$r[']{$r['mobilenumber']}[/url] [{$r['mobilenumber']}]</td><td>{$r['textmessage_subject']}</td></tr><tr><td>Sent at: $sent </td><td>{$r['textmessage_text']}</td></tr>"; } } function textmessage_compose() { global $db,$ir; if($ir['tcredits'] < 1) { echo '<font color=red><h3>Thats not going to work</h3> <h2>You need to Top Up Your Credits</h2> </font>[/b] '; //$h->endpage(); exit; } global $db,$ir,$c,$userid,$h; print "<form action='textmessage.php?action=send' method='post'> <table width=75% cellspacing=1 class='table'> <tr> <td>Contact to send to:</td> <td>"; $q=$db->query("SELECT c.*, u.mobilenumber FROM textcontacts c LEFT JOIN users u ON c.cl_ADDED=u.mobilenumber WHERE c.cl_ADDER={$userid} ORDER BY u.username ASC"); if($db->num_rows($q) == 0) { print "You have no contacts!"; } else { print "<select name='user1' type='dropdown'><option value=''><select a contact...></option>"; while($r=$db->fetch_row($q)) { print "<option value='{$r['mobilenumber']}'>{$r['mobilenumber']}</option>"; } print "</select>"; } if($_GET['ID']) { $user=$db->fetch_single($db->query("SELECT mobilenumber FROM users WHERE userid={$_GET['ID']}")); } print "</td></tr><tr> <td>[b]OR[/b] Enter a mobilenumber to send to:</td><td><input type='text' name='user2' value='{$user}' /></td></tr><tr> <td>Subject:</td> <td><input type='text' name='subject' /></td></tr><tr> <td>Message:</td> <td><textarea rows=5 cols=40 name='message'></textarea></td></tr><tr> <td colspan=2><input type='submit' value='Send' /></td></tr></table></form>"; if($_GET['ID']) { print " <table width=75% border=2><tr><td colspan=2>[b]Your last 5 text messages to/from this person:[/b]</td></tr>"; $q=$db->query("SELECT m.*,u1.mobilenumber as sender from textmessage m left join users u1 on m.textmessage_from=u1.userid WHERE (m.textmessage_from=$userid AND m.textmessage_to={$_GET['ID']}) OR (m.textmessage_to=$userid AND m.textmessage_from={$_GET['ID']}) ORDER BY m.textmessage_time DESC LIMIT 5"); while($r=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['textmessage_time']); print "<tr><td>$sent</td> <td>[b]{$r['sender']} wrote:[/b] {$r['textmessage_text']}</td></tr>"; } print "</table>"; } } function textmessage_send() { global $db,$ir,$c,$userid,$h; $subj=str_replace(array("\n"),array(" "),strip_tags($_POST['subject'])); $msg=str_replace(array("\n"),array(" "),strip_tags($_POST['message'])); if($_POST['user1'] && $_POST['user2']) { die("Please do not select a contact AND enter a mobilenumber, only do one. [url='textmessage.php']> Back[/url]"); } if(!$_POST['user1'] && !$_POST['user2']) { die("You must select a contact or enter a mobilenumber. [url='textmessage.php']> Back[/url]"); } $sendto=($_POST['user1']) ? $_POST['user1'] : $_POST['user2']; $q=$db->query("SELECT userid FROM users WHERE mobilenumber='{$sendto}'"); if($db->num_rows($q)==0) { die("<h2>That Mobile Number does not Exsist Sorry</h2> . [url='textmessage.php']> Back[/url]"); } $to=$db->fetch_single($q); $db->query("INSERT INTO textmessage VALUES ('',0,{$ir['mobilenumber']},$to,unix_timestamp(),'$subj','$msg')"); $db->query("UPDATE users SET new_textmessage=new_textmessage+1 WHERE userid={$to}"); $db->query("UPDATE users SET tcredits=tcredits-1 WHERE userid={$ir['userid']}"); print "Your Message was sent to <font size='3'> ".$r['username']." </font>and one Mobile Credit was deducted from your account you have You have ".$ir['tcredits']." Credits Remaining [url='textmessage.php']> Back[/url]"; } function textmessage_delete() { global $db,$ir,$c,$userid,$h; $db->query("DELETE FROM textmessage WHERE textmessage_id={$_GET['ID']} AND textmessage_to=$userid"); print "Message deleted. [url='textmessage.php']> Back[/url]"; } function textmessage_delall() { global $ir,$c,$userid,$h; print "This will delete all the messages in your inbox. There is [b]NO[/b] undo, so be sure. [url='textmessage.php?action=delall2']> Yes, delete all messages[/url] [url='textmessage.php']> No, go back[/url]"; } function textmessage_delall2() { global $db,$ir,$c,$userid,$h; $db->query("DELETE FROM textmessage WHERE textmessage_to=$userid"); print "All ".$db->affected_rows()." textmessages in your inbox were deleted. [url='textmessage.php']> Back[/url]"; } function textmessage_archive() { global $ir,$c,$userid,$h; print "This tool will download an archive of all your messages. [url='textdlarchive.php?a=inbox']> Download Inbox[/url] [url='textdlarchive.php?a=outbox']> Download Outbox[/url]"; } $h->endpage(); ?>   Call this file textcontacts.php   <?php include "globals.php"; print "<h3>My Contacts</h3>"; print "<table width=85% class='table' cellspacing='1'><tr><td>[url='textmessage.php?action=inbox']Inbox[/url]</td> <td>[url='textmessage.php?action=outbox']Sent Messages[/url]</td> <td>[url='textmessage.php?action=compose']Compose Message[/url]</td> <td>[url='textmessage.php?action=delall']Delete All Messages[/url]</td> <td>[url='textmessage.php?action=archive']Archive Messages[/url]</td><td>[url='textcontacts.php']My Contacts[/url]</td></tr> </table> "; switch($_GET['action']) { case "add": add_friend(); break; case "remove": remove_friend(); break; default: friends_list(); break; } function friends_list() { global $db,$ir,$c,$userid; print "[url='textcontacts.php?action=add']> Add a Contact[/url] These are the people on your contact list. "; print " <table width=90% class='table' cellspacing='1'><tr style='background:gray'> <th>Mobile Number</th> <th>Contacts Name</th> <th>Send Text</th> <th>Remove</th> </tr>"; $q=$db->query("SELECT fl.*,u.* FROM textcontacts fl LEFT JOIN users u ON fl.cl_ADDED=u.mobilenumber WHERE fl.cl_ADDER=$userid ORDER BY u.username ASC"); while($r=$db->fetch_row($q)) { $d=""; if($r['donatordays']) { $r['username'] = "<font color=red>{$r['username']}</font>";$d="[img=donator.gif]"; } print "<tr> <td>{$r['mobilenumber']}</td> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] $d</td> <td>[url='textmessage.php?action=compose&ID={$r[']Mail[/url]</td> <td>[url='textcontacts.php?action=remove&cl={$r[']Remove[/url]</td> </tr>"; } print "</table>"; } function add_friend() { global $db,$ir,$c,$userid; $_POST['ID'] = abs((int) $_POST['ID']); if($_POST['ID']) { $qc=$db->query("SELECT * FROM textcontacts WHERE cl_ADDER=$userid AND cl_ADDED={$_POST['ID']}"); $q=$db->query("SELECT * FROM users WHERE mobilenumber={$_POST['ID']}"); if($db->num_rows($qc)) { print "You cannot add the same person twice."; } else if($userid==$_POST['ID']) { print "There is no point in adding yourself to your own list."; } else if($db->num_rows($q)==0) { print "That Mobile Number does not Exsist Sorry [url='textcontacts.php'] >> BACK << [/url]"; } else { $db->query("INSERT INTO textcontacts VALUES('', $userid, {$_POST['ID']})"); $r=$db->fetch_row($q); print "{$r['username']} was added to your contact list. [url='textcontacts.php']> Back[/url]"; } } else { print "Adding a contact!<form action='textcontacts.php?action=add' method='post'> Contact's Mobile Number: <input type='text' name='ID' value='{$_GET['ID']}' /> <input type='submit' value='Add Contact' /></form>"; } } function remove_friend() { global $db,$ir,$c,$userid; $db->query("DELETE FROM textcontacts WHERE cl_ID={$_GET['cl']} AND cl_ADDER=$userid"); print "Contact list entry removed! [url='textcontacts.php']> Back[/url]"; } $h->endpage(); ?>   call this file textdlarchive.php   <?php session_start(); if(get_magic_quotes_gpc() == 0) { foreach($_POST as $k => $v) { $_POST[$k]=addslashes($v); } foreach($_GET as $k => $v) { $_GET[$k]=addslashes($v); } } require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $is=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid"); $ir=$db->fetch_row($is); if($_GET['a']=='inbox') { // We'll be outputting a PDF header('Content-type: text/html'); // It will be called downloaded.pdf header('Content-Disposition: attachment; filename="inbox_archive_'.$userid.'_'.time().'.htm"'); print "<table width=75% border=2><tr style='background:gray'><th>From</th><th>Subject/Message</th></tr>"; $q=$db->query("SELECT m.*,u.* FROM textmessage m LEFT JOIN users u ON m.textmessage_from=u.userid WHERE m.textmessage_to=$userid ORDER BY textmessage_time DESC "); while($r=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['textmessage_time']); print "<tr><td>"; if($r['userid']) { print "{$r['username']} [{$r['userid']}]"; } else { print "SYSTEM"; } print "</td>\n<td>{$r['textmessage_subject']}</td></tr><tr><td>Sent at: $sent </td><td>{$r['textmessage_text']}</td></tr>"; } print "</table>"; } else if($_GET['a']=='outbox') { // We'll be outputting a PDF header('Content-type: text/html'); // It will be called downloaded.pdf header('Content-Disposition: attachment; filename="outbox_archive_'.$userid.'_'.time().'.htm"'); print "<table width=75% border=2><tr style='background:gray'><th>To</th><th>Subject/Message</th></tr>"; $q=$db->query("SELECT m.*,u.* FROM textmessage m LEFT JOIN users u ON m.textmessage_to=u.userid WHERE m.textmessage_from=$userid ORDER BY textmessage_time DESC"); while($r=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['textmessage_time']); print "<tr><td>{$r['username']} [{$r['userid']}]</td><td>{$r['textmessage_subject']}</td></tr><tr><td>Sent at: $sent </td><td>{$r['textmessage_text']}</td></tr>"; } print "</table>"; } ?>   Part 2 Below
  17. Re: [MCCODES V2] Mobile text messaging I'll post the script in a few just need some people on the TESTSITE to test the texts and stuff are woking for them
  18. Re: [MCCODES V2] Mobile text messaging Working Demo each user when regd or those that are reg are given 10 credits you will need to goto Preferences and Create your mobile number make sure its not your own just make one up...... the send a message via the normal mailbox to the person you want to contact giving your mobile number... My mobile number on the test site is 07772323 http://www.mccode.doom-nights.com
  19. Re: Gang Orginised Request .... Ahh those dodgey MCC copies will always bite you in the butt :)
  20. Was bored so came up with this little addition it allows users to send Text Messages to each other. users must register a Mobile number (Not Thier Personal one) just one thats made up by themselves All users start with 10 credits and they depleet as they send messages. Once they are out of Credit they can either purchase more with cash or crystals or use as donator based addition for extra cash. Users that dont have credit can read texts but cant send texts. Users can change their Mobile Number when ever they wish. But bare in mind once changed they will have to tell their friends or they will be sending messages to a number thats no longer vaild... heres a few screenies.... yes its the MAILBOX but with a little more fun.
  21. This little fix will show Ranks, number of posts per user and fix the Delete error from the orig V2 fourms open up forums.php find $rank=forums_rank($memb['posts']); if($memb['forums_avatar']) { $av="[img={$memb[]"; } else { $av="[img=noav.gif]"; } if(!$memb['forums_signature']) { $memb['forums_signature']="No Signature"; } else {$memb['forums_signature']=$bbc->bbcode_parse($memb['forums_signature']); } $r['fp_text']=$bbc->bbcode_parse($r['fp_text']); print "<tr> <th align='center'>Post #{$no}</th> <th align='center'>Subject: {$r['fp_subject']} Posted at: $t $qlink$elink$dlink</th> </tr> <tr> <td valign=top>[url='viewuser.php?u={$r[']{$r['fp_poster_name']}[/url] [{$r['fp_poster_id']}] $av Level: {$memb['level']}</td> <td valign=top>{$r['fp_text']} {$edittext} ------------------- {$memb['forums_signature']}</td> </tr>"; } Overwrite with $rank=forums_rank($memb['posts']); if($memb['forums_avatar']) { $av="[img={$memb[]"; } else { $av="[img=noav.gif]"; } if(!$memb['forums_signature']) { $memb['forums_signature']="No Signature"; } else {$memb['forums_signature']=$bbc->bbcode_parse($memb['forums_signature']); } $r['fp_text']=$bbc->bbcode_parse($r['fp_text']); print "<tr> <th align='center'>Post #{$no}</th> <th align='center'>Subject: {$r['fp_subject']} Posted at: $t $qlink$elink$dlink</th> </tr> <tr> <td valign=top>[url='viewuser.php?u={$r[']{$r['fp_poster_name']}[/url] [{$r['fp_poster_id']}] $av Level: {$memb['level']} Post Count: $rank Posts: ".$memb['posts']."</td> <td valign=top>{$r['fp_text']} {$edittext} ------------------- {$memb['forums_signature']}</td> </tr>"; } Ranks now fixed to fix the delete topic find function deletopic() { Just underneath that add global $db; And move recache_forum($topic['ft_forum_id']); so its underneath the stafflog_add statement and your done SCREENIE
  22. Re: Mafia Text Based Game? Putting this Post in the Correct fourm whould help all your doing is cluttering this one up.
  23. Re: New Houses Mod [Mccodes V2] They dont really need to be online. I did a script for Streets that uses the same principal where by users could be attacked whilst searching streets.
  24. Re: New Houses Mod [Mccodes V2] I dont really know much about the upgrade script and if its a paid mod its best not to post extracts on here but send to my mailbox wht you think maybe the error script and i'll take a look
  25. Re: New Houses Mod [Mccodes V2]   I just moved the functions around to match the case types in order and moved the defaul statement up with the cases.
×
×
  • Create New...