-
Posts
207 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by grant
-
make a file 5050points.php <?php include 'header.php'; if ($_POST['takebet'] != ""){ $result = mysql_query("SELECT * FROM `5050points` WHERE `id`='".$_POST['bet_id']."'"); $worked = mysql_fetch_array($result); if ($worked['owner'] == $user_class->id) { echo Message("You can't take your own bet."); include 'footer.php'; die(); } $amount = $worked['amount']; $user_points = new User($worked['owner']); if ($amount > $user_class->points){ echo Message("You don't have enough points to match their bet."); } if($amount <= $user_class->points){ $newpoints = $user_class->points - $amount; $result = mysql_query("UPDATE `grpgusers` 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 Message("You have lost."); $amount = $amount * 2; $newpoints = $user_points->points + $amount; $newgpoints = $user_points->gpoints + 1; $newgpointsl = $user_class->gpointsl + 1; $result = mysql_query("UPDATE `grpgusers` SET `points` = '".$newpoints."',`gpoints` = '".$newgpoints."' WHERE `id`='".$user_points->id."'"); Send_Event($user_points->id, "You won the points bid you placed."); } else { //the person who accepted the bid won echo Message( "You have won!"); $amount = $amount * 1; $newpoints = $user_class->points + $amount; $newgpoints = $user_class->gpoints + 1; $newgpointsl = $user_points->gpointsl + 1; $result = mysql_query("UPDATE `grpgusers` SET `points` = '".$newpoints."',`gpointsl` = '".$newgpointsl."' WHERE `id`='".$user_class->id."'"); Send_Event($user_points->id, "You lost the points bid you placed."); } $result = mysql_query("DELETE FROM `5050points` WHERE `id`='".$worked['id']."'"); } } if ($_POST['makebet']){ $amount = abs(intval($_POST['amount'])); if ($amount > $user_class->points) { echo Message("You do not have that much money."); } if ($amount < 5){ echo Message("Please enter a valid amount."); } if ($amount <= $user_class->points && $amount > 0) { echo Message("You Added $amount points"); $result= mysql_query("INSERT INTO `5050points` (owner, amount)"."VALUES ('$user_class->id', '$_POST[amount]')"); $newpoints = $user_class->points - $_POST['amount']; $result = mysql_query("UPDATE `grpgusers` SET `points` = '".$newpoints."' WHERE `id`='".$user_class->id."'"); $user_class = new User($_SESSION['id']); } } ?> <link href="style.css" rel="stylesheet" type="text/css" /> <tr> <td class="contenthead">[[b][url="5050game.php"]5050 cash[/url][/b]][5050 points]</td></tr> <tr><td class="contentcontent"> This game is simple. 2 people bet the same amount of points, then a winner is randomly picked. The winner recieves all of the points! </td></tr> <tr><td align="center" class="contentcontent"> <form method='post'> </p> Amount of points to bid. <input name='amount' type='text' class="areatest" value='0' size='10' maxlength='20'> (minimum of 5 points bet) <input name='makebet' type='submit' class="buttong" value='Make Bet'> [[url="5050points.php"]Refresh[/url]]</p> </form> </td></tr> <tr><td class="contentcontent"> <?php $result = mysql_query("SELECT * FROM `5050points` ORDER BY `amount` DESC"); while($line = mysql_fetch_array($result, MYSQL_ASSOC)) { $user_points = new User($line['owner']); echo "<form method='post'>"; echo " ".$user_points->formattedname." - ".$line['amount']." points<input type='hidden' name='bet_id' value='".$line['id']."'> <input type='submit' name='takebet' value='Take Bet'></form>"; } ?> </td></tr> <?php include 'footer.php'; ?> SQL CREATE TABLE IF NOT EXISTS `5050points` ( `owner` int(10) NOT NULL default '0', `amount` int(3) NOT NULL default '0', `id` int(10) NOT NULL auto_increment, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; all secure as far as i know
-
well yes i have all my money / points items logged so that i see wot users are Transfeing to other users but i feel this is not enuff :D
-
wot about stop them from sending points or money from the same ip ?
-
yes i see that point of view so i mite as well just check all users ip ;)
-
need help am trying to stop muttis on my game but the code i have dont seem to be working any help would be great $checkip = mysql_query("SELECT * FROM `grpgusers` WHERE `ip`='$ip'"); $ip_exist = mysql_num_rows($checkip); if($ip_exist > 0){ $message .= "<div>I'm sorry but you already have an account with this Game</div>"; }
-
<? include 'header.php'; if (isset($_POST['submit'])) { $_POST['message'] = smilie($_POST['message']); $error = ($_POST['message'] == "") ? "You need to have a message!" : $error; if($user_class->shoutban == 1) { echo ' <tr><td class="contenthead">Shoutban</td></tr> <tr><td class="contentcontent"> <b style="font-size:12px"><center>You have been banned from chat<span style="color:#FF0000;">'; ?> </span>[/b] <link href="style.css" rel="stylesheet" type="text/css" /> </center> <? die(); } if($error == ""){ $time = time(); $chat = $user_class->chat + 1; $result = mysql_query("UPDATE `grpgusers` SET `chat` = '".$chat."' WHERE `id` = '".$user_class->id."'"); ?> <? $result= mysql_query("INSERT INTO `ads` VALUES('".$time."', '$user_class->id', '".$time."', '".$_POST['message']."')"); echo Message("You have posted a classified"); } else { echo Message($error); } } if ($_GET['delete'] != ""){ $deletemsg = $_GET['delete']; $result = mysql_query("DELETE FROM `ads` WHERE `when`='".$deletemsg."'"); echo Message("Message Deleted!"); } ?> <? function smilie($string) { global $dir; $smilie = array(":)) " => '[img=smileys/21.gif]', ":-? " => '[img=smileys/39.gif]', ":P " => '[img=smileys/10.gif]', ":-> " => '[img=smileys/15.gif]', ":D " => '[img=smileys/4.gif]', ":f: " => '[img=smileys/23.gif]', "=)) " => '[img=smileys/24.gif]', ":| " => '[img=smileys/22.gif]', ":-J " => '[img=smileys/78.gif]', ":-O " => '[img=smileys/13.gif]', ":-$ " => '[img=smileys/32.gif]', "6543 " => '[img=smileys/65.gif]', ":-: " => '[img=smileys/46.gif]', ":__: " => '[img=smileys/6.gif]', ":o0" => '[img=smileys/112.gif]', ":12" => '[img=smileys/77.gif]', ":65" => '[img=smileys/68.gif]', ":((" => '[img=smileys/20.gif]', ":ang" => '[img=smileys/14.gif]', ":ang" => '[img=smileys/14.gif]', ":657" => '[img=smileys/19.gif]', "xD" => '[img=smileys/]' ); return strtr($string, $smilie); } function bbCode($string) { $bb = array("[b]" => "[b]", "[/b]" => "[/b]", "[u]" => "<u>", "[/u]" => "</u>", "[s]" => "<s>", "[img]" => "[img]", "[/img]" => "[/img]", "[/s]" => "<s>", "[sup]" => "<sup>", "[/sup]" => "</sup>", "[sub]" => "<sub>", "[/sub]" => "</sub>", "[time]" => date('G:i (A)') ); return strtr($string, $bb); } ?> <link href="style.css" rel="stylesheet" type="text/css" /> <tr><td class="contenthead">Warriors Chat</td></tr> <tr><td class="contentcontent"></td></tr> <tr> <tr><td class="contentcontentnob"> <form method='post'><table width='100%' border="0" class="contentcontent"> <tr> <td align="center">[b]Welcome to Mafia-warriors Chat <? echo $user_class->formattedname; ?> Any Spaming u will Get chat Banned [/b]</td> </tr> <tr> <td height="86" align="center"><textarea class='areatest' name='message' rows='6' id='message' style="width: 510px"></textarea></td> </tr> <tr> <td align="center"> [img=smileys/21.gif] [img=smileys/39.gif] [img=smileys/10.gif] [img=smileys/15.gif]')" /> [img=smileys/4.gif] [img=smileys/23.gif] [img=smileys/24.gif] [img=smileys/22.gif] [img=smileys/78.gif] [img=smileys/13.gif] [img=smileys/32.gif] [img=smileys/65.gif] [img=smileys/46.gif] [img=smileys/6.gif] [img=smileys/112.gif] [img=smileys/20.gif] [img=smileys/14.gif] [img=smileys/19.gif] [img=68.gif][b] <?= ($user_class->admin == 1) ? '[[url="control.php?page=setplayerstatus"]chatban[/url]] </div> ' : "" ?> [/b]</td> </tr> <tr> <td width='25%' height="33" align="center">[[url="classifieds.php"]Refresh[/url]] <input class='buttong' type='submit' name='submit' value='Post'></td> </tr></table> </form></td></tr> <? $result = mysql_query("SELECT * from `ads` ORDER BY `when` DESC LIMIT 30"); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $user_ads = New User($row['poster']); ?> <tr> <td class="contentcontent"> <table width='100%' class="contentcontent"> <tr> <td colspan="2" valign="top"><?= $user_ads->formattedname ?> Posted <?php echo date(g.":".i.":".sa,$row['when']) ?>[b] [[url="classifieds.php?delete=<?= $row['when'] ?>"]Delete][/url][/b]</td> </tr> <tr> <td width='7%' height="70" valign="top"> [img=<? echo $user_ads->avatar ?>]</p></td> <td width="93%" height="70" align="left" valign="bottom"><?= $row['message'] ?></td> </tr> <tr> <td height="1" colspan="0" align="center" valign="middle" class="pos"></p></td> </tr> </table> </td></tr> <? } ?> <? include 'footer.php'; ?> just change it to the way you feel its a start :rolleyes:
-
<? include 'header.php'; $result = mysql_query("SELECT * FROM `grpgusers` ORDER BY `id` ASC"); $totalmobsters = mysql_num_rows($result); $result2 = mysql_query("SELECT * FROM `grpgusers` WHERE `rmdays`!='0'"); $totalrm = mysql_num_rows($result2); $result2 = mysql_query("SELECT * FROM `grpgusers` WHERE `wp`!='0'"); $totalwp = mysql_num_rows($result2); $result = mysql_query("SELECT SUM(bank) FROM `grpgusers`") or trigger_error(mysql_error(),E_USER_ERROR); $bank = mysql_result($result,0); $result = mysql_query("SELECT SUM(money) FROM `grpgusers`") or trigger_error(mysql_error(),E_USER_ERROR); $money = mysql_result($result,0); $result = mysql_query("SELECT SUM(points) FROM `grpgusers`") or trigger_error(mysql_error(),E_USER_ERROR); $points = mysql_result($result,0); $result = mysql_query("SELECT SUM(bank1) FROM `grpgusers`") or trigger_error(mysql_error(),E_USER_ERROR); $pointsbank = mysql_result($result,0); $result = mysql_query("SELECT SUM(bank1) FROM `grpgusers`") or trigger_error(mysql_error(),E_USER_ERROR); $pbank = mysql_result($result,0); $result = mysql_query("SELECT SUM(vault2) FROM `gangs`") or trigger_error(mysql_error(),E_USER_ERROR); $gangpoints = mysql_result($result,0); $result = mysql_query("SELECT SUM(vault) FROM `gangs`") or trigger_error(mysql_error(),E_USER_ERROR); $gangmoney = mysql_result($result,0); $result = mysql_query("SELECT SUM(freinds) FROM `grpgusers`") or trigger_error(mysql_error(),E_USER_ERROR); $freinds = mysql_result($result,0); $result = mysql_query("SELECT SUM(enemy) FROM `grpgusers`") or trigger_error(mysql_error(),E_USER_ERROR); $enemy = mysql_result($result,0); ?> <link href="style.css" rel="stylesheet" type="text/css" /> <tr> <td class=""><table width="100%" border="0" class="contenthead"> <tr> <td align="center">[b]warriors Stats[/b]</td> </tr> </table> <table width="100%" border="0" class="contentcontent"> <tr> <td><span class="textl">[b]total Warriors: <?= $totalmobsters ?> [/b]</span></td> <td></td> </tr> <tr> <td><span class="textl">[b]witness protection Warriors: <?= $totalwp ?> [/b]</span></td> <td></td> </tr> <tr> <td><span class="textl">[b]Respected Warriors: <?= $totalrm ?> [/b]</span></td> <td></td> </tr> <tr> <td>[b]total Freinds: <? echo prettynum($freinds) ?>[/b]</td> <td></td> </tr> <tr> <td>[b]total enemys: <? echo prettynum($enemy) ?>[/b]</td> <td></td> </tr> </table> <table width="100%" border="0" class="contenthead"> <tr> <td height="1" align="center"><span class="textl">[b]Money..points...gangbanks[/b]</span></td> </tr> </table></td></tr> <tr> <td class="contentcontent"> <table width='100%' cellpadding='4' cellspacing='0' class="contentcontent"> <tr> <td colspan="2" align="center" class='textl'></td> <td class='textr'></td> </tr> <tr> <td class='textl'>[b]total money <? echo prettynum($money) ?>[/b]</td> <td width="45%" class='textl'>[b]toal gang money banked <? echo prettynum($gangmoney) ?>[/b]</td> <td width="1%" class='textr'></td> </tr> <tr> <td class='textl'>total points [b]<? echo prettynum($points) ?>[/b]</td> <td class='textl'>[b]total gang points banked <? echo prettynum($gangpoints) ?>[/b]</td> <td class='textr'></td> </tr> <tr> <td height="26" class='textl'>[b]total banekd <? echo prettynum($bank) ?>[/b]</td> <td class='textl'>[b]total gang wars won (soon)[/b]</td> <td class='textr'></td> </tr> <tr> <td height="26" class='textl'>[b]total points banked <? echo prettynum($pbank) ?>[/b]</td> <td class='textl'>[b]total gang wars lost (soon)[/b]</td> <td class='textr'></td> </tr> <tr> <td width='54%' height="26" class='textl'></td> <td class='textl'></td> <td class='textr'></td> </tr> </table> </td></tr> <? include 'footer.php'; ?> just change it to suit your self :D most of my game stuff in there
-
you want my chat ??? it shows the avi and time you can chat ban them :S
-
103 view's is they any one that can show me plz 8)
-
ok can u give me some code or so to get me started ?(
-
i can help if needed had many website just let me no :D
-
have u tryed to update the drivers ? :D i had that sometime ago i change from wireless to direct and had the same problem that you are having it was my wireless that was stoping me from gong direct :P
-
some times i cant get on the site at all :S never mind the pages been slow
-
ok i have this to call back to paypal but when i buy a item its not giveing the users they item or points ? any help plz <?php include "dbcon.php"; function Send_Event ($id, $text){ $timesent = time(); $text = mysql_real_escape_string($text); $result= mysql_query("INSERT INTO `events` (`to`, `timesent`, `text`)". "VALUES ('$id', '$timesent', '$text')"); } function microtime_float() { $time = microtime(); return (double)substr( $time, 11 ) + (double)substr( $time, 0, 8 ); } $time = microtime_float(); // read the post from PayPal system and add 'cmd' $req = 'cmd=_notify-validate'; foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } // post back to PayPal system to validate $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30); // assign posted variables to local variables $item_name = $_POST['item_name']; $item_number = $_POST['item_number']; $payment_status = $_POST['payment_status']; $payment_amount = $_POST['mc_gross']; $payment_currency = $_POST['mc_currency']; $txn_id = $_POST['txn_id']; $receiver_email = $_POST['receiver_email']; $payer_email = $_POST['payer_email']; $first = $_POST['first_name']; $last = $_POST['last_name']; $quantity = $_POST['quantity']; $user_id = $_POST['custom']; $result1000 = mysql_query("INSERT INTO `ipn` (`itemname`, `date`, `itemnumber`, `paymentstatus`, `paymentamount`, `currency`, `txnid`, `receiveremail`, `payeremail`, `first`, `last`, `quantity`, `user_id`)"."VALUES ('".$item_name."', '$time', '".$item_number."', '".$payment_status."', '".$payment_amount."', '".$payment_currency."', '".$txn_id."', '".$receiver_email."', '".$payer_email."', '".$first."', '".$last."', '".$quantity."', '".$user_id."')"); $result2 = mysql_query("SELECT*FROM `grpgusers` WHERE `id`='".$user_id."'"); $worked = mysql_fetch_array($result2); if ($item_number == 1 && $payment_status == "Completed"){ $usermoney = $worked['bank'] + 10000; $userpoints = $worked['points'] + 50; $userrmdays = $worked['rmdays'] + 30; $result = mysql_query("UPDATE `grpgusers` SET `rmdays`='".$userrmdays."', `points`='".$userpoints."', `bank`='".$usermoney."' WHERE `id`='".$user_id."'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if ($item_number == 2 && $payment_status == "Completed"){ $usermoney = $worked['bank'] + 25000; $userpoints = $worked['points'] + 125; $userrmdays = $worked['rmdays'] + 60; $result = mysql_query("UPDATE `grpgusers` SET `rmdays`='".$userrmdays."', `points`='".$userpoints."', `bank`='".$usermoney."' WHERE `id`='".$user_id."'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if ($item_number == 3 && $payment_status == "Completed"){ $usermoney = $worked['bank'] + 75000; $userpoints = $worked['points'] + 300; $userrmdays = $worked['rmdays'] + 90; $result = mysql_query("UPDATE `grpgusers` SET `rmdays`='".$userrmdays."', `points`='".$userpoints."', `bank`='".$usermoney."' WHERE `id`='".$user_id."'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if ($item_number == 4 && $payment_status == "Completed"){ $userpoints = $worked['points'] + 250; $result = mysql_query("UPDATE `grpgusers` SET `points`='".$userpoints."' WHERE `id`='".$user_id."'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if ($item_number == 5 && $payment_status == "Completed"){ $userpoints = $worked['points'] + 500; $result = mysql_query("UPDATE `grpgusers` SET `points`='".$userpoints."' WHERE `id`='".$user_id."'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if ($item_number == 6 && $payment_status == "Completed"){ $userpoints = $worked['points'] + 1000; $result = mysql_query("UPDATE `grpgusers` SET `points`='".$userpoints."' WHERE `id`='".$user_id."'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if ($item_number == 7 && $payment_status == "Completed"){ $userpoints = $worked['points'] + 2500; $result = mysql_query("UPDATE `grpgusers` SET `points`='".$userpoints."' WHERE `id`='".$user_id."'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if ($item_number == 8 && $payment_status == "Completed"){ $userpoints = $worked['points'] + 5000; $result = mysql_query("UPDATE `grpgusers` SET `points`='".$userpoints."' WHERE `id`='".$user_id."'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if ($item_number == 9 && $payment_status == "Completed"){ $userpoints = $worked['points'] + 10000; $result = mysql_query("UPDATE `grpgusers` SET `points`='".$userpoints."' WHERE `id`='".$user_id."'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if ($item_number == 10 && $payment_status == "Completed"){ $userpoints = $worked['points'] + 20000; $result = mysql_query("UPDATE `grpgusers` SET `points`='".$userpoints."' WHERE `id`='".$user_id."'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if ($item_number == 11 && $payment_status == "Completed"){ $userpoints = $worked['points'] + 30000; $result = mysql_query("UPDATE `grpgusers` SET `points`='".$userpoints."' WHERE `id`='".$user_id."'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if ($item_number == 12 && $payment_status == "Completed"){ $userpoints = $worked['points'] + 50000; $result = mysql_query("UPDATE `grpgusers` SET `points`='".$userpoints."' WHERE `id`='".$user_id."'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if ($item_number == 13 && $payment_status == "Completed"){ $userpoints = $worked['points'] + 85000; $result = mysql_query("UPDATE `grpgusers` SET `points`='".$userpoints."' WHERE `id`='".$user_id."'"); Send_Event($user_id, "Your ".$item_name." has just been cedited. Transaction id: ".$txn_id." "); } if ($item_number == 14 && $payment_status == "Completed"){ $userpoints = $worked['points'] + 100000; $result = mysql_query("UPDATE `grpgusers` SET `points`='".$userpoints."' WHERE `id`='".$user_id."'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if ($item_number == 15 && $payment_status == "Completed"){ $userpoints = $worked['points'] + 250000; $result = mysql_query("UPDATE `grpgusers` SET `points`='".$userpoints."' WHERE `id`='".$user_id."'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } $result = mysql_query("SELECT * FROM `inventory` WHERE `userid`='".$user_id."' AND `itemid`='42'"); $worked2 = mysql_fetch_array($result); $itemexist = mysql_num_rows($result); if($item_number == 16 && $itemexist == 0 && $payment_status == "Completed"){ $result= mysql_query("INSERT INTO `inventory` (`itemid`, `userid`, `quantity`)"."VALUES ('42', '".$user_id."', '1')"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if($item_number == 16 && $itemexist > 0 && $payment_status == "Completed"){ $quantity = $worked2['quantity'] + 1; $result = mysql_query("UPDATE `inventory` SET `quantity` = '".$quantity."' WHERE `userid`='".$user_id."' AND `itemid`='42'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if($item_number == 17 && $itemexist == 0 && $payment_status == "Completed"){ $result= mysql_query("INSERT INTO `inventory` (`itemid`, `userid`, `quantity`)"."VALUES ('42', '".$user_id."', '5')"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if($item_number == 17 && $itemexist > 0 && $payment_status == "Completed"){ $quantity = $worked2['quantity'] + 5; $result = mysql_query("UPDATE `inventory` SET `quantity` = '".$quantity."' WHERE `userid`='".$user_id."' AND `itemid`='42'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if($item_number == 18 && $itemexist == 0 && $payment_status == "Completed"){ $result= mysql_query("INSERT INTO `inventory` (`itemid`, `userid`, `quantity`)"."VALUES ('42', '".$user_id."', '20')"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if($item_number > 18 && $itemexist == 0 && $payment_status == "Completed"){ $quantity = $worked2['quantity'] + 25; $result = mysql_query("UPDATE `inventory` SET `quantity` = '".$quantity."' WHERE `userid`='".$user_id."' AND `itemid`='42'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if($item_number == 19 && $itemexist == 0 && $payment_status == "Completed"){ $result= mysql_query("INSERT INTO `inventory` (`itemid`, `userid`, `quantity`)"."VALUES ('42', '".$user_id."', '50')"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if($item_number == 19 && $itemexist > 0 && $payment_status == "Completed"){ $quantity = $worked2['quantity'] + 50; $result = mysql_query("UPDATE `inventory` SET `quantity` = '".$quantity."' WHERE `userid`='".$user_id."' AND `itemid`='42'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if($item_number == 20 && $payment_status == "Completed"){ $quantity = $worked['colordays'] + 30; $result = mysql_query("UPDATE `grpgusers` SET `colordays` = '".$quantity."' WHERE `id`='$user_id'"); Send_Event($user_id, "Your 30 name color days has just been credited. Transaction id: ".$txn_id." "); } if($item_number == 21 && $payment_status == "Completed"){ $quantity = $worked['colordays'] + 60; $result = mysql_query("UPDATE `grpgusers` SET `colordays` = '".$quantity."' WHERE `userid`='".$user_id."'"); Send_Event($user_id, "Your 60 name color days has just been credited. Transaction id: ".$txn_id." "); } if($item_number == 22 && $payment_status == "Completed"){ $quantity = $worked['colordays'] + 90; $result = mysql_query("UPDATE `grpgusers` SET `colordays` = '".$quantity."' WHERE `userid`='".$user_id."'"); Send_Event($user_id, "Your 90 name color days has just been credited. Transaction id: ".$txn_id." "); } $result = mysql_query("SELECT * FROM `inventory` WHERE `userid`='".$user_id."' AND `itemid`='81'"); $worked2 = mysql_fetch_array($result); $itemexist = mysql_num_rows($result); if($item_number == 23 && $itemexist == 0 && $payment_status == "Completed"){ $result= mysql_query("INSERT INTO `inventory` (`itemid`, `userid`, `quantity`)"."VALUES ('81', '".$user_id."', '10')"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if($item_number == 23 && $itemexist > 0 && $payment_status == "Completed"){ $quantity = $worked2['quantity'] + 10; $result = mysql_query("UPDATE `inventory` SET `quantity` = '".$quantity."' WHERE `userid`='".$user_id."' AND `itemid`='81'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } $result = mysql_query("SELECT * FROM `inventory` WHERE `userid`='".$user_id."' AND `itemid`='82'"); $worked2 = mysql_fetch_array($result); $itemexist = mysql_num_rows($result); if($item_number == 24 && $itemexist == 0 && $payment_status == "Completed"){ $result= mysql_query("INSERT INTO `inventory` (`itemid`, `userid`, `quantity`)"."VALUES ('82', '".$user_id."', '10')"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if($item_number == 24 && $itemexist > 0 && $payment_status == "Completed"){ $quantity = $worked2['quantity'] + 10; $result = mysql_query("UPDATE `inventory` SET `quantity` = '".$quantity."' WHERE `userid`='".$user_id."' AND `itemid`='82'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } $result = mysql_query("SELECT * FROM `inventory` WHERE `userid`='".$user_id."' AND `itemid`='83'"); $worked2 = mysql_fetch_array($result); $itemexist = mysql_num_rows($result); if($item_number == 25 && $itemexist == 0 && $payment_status == "Completed"){ $result= mysql_query("INSERT INTO `inventory` (`itemid`, `userid`, `quantity`)"."VALUES ('83', '".$user_id."', '10')"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } if($item_number == 25 && $itemexist > 0 && $payment_status == "Completed"){ $quantity = $worked2['quantity'] + 10; $result = mysql_query("UPDATE `inventory` SET `quantity` = '".$quantity."' WHERE `userid`='".$user_id."' AND `itemid`='83'"); Send_Event($user_id, "Your ".$item_name." has just been credited. Transaction id: ".$txn_id." "); } ?> and this is wot users are buy it from not sure if this is set up wright <table width="100%" border="0" align="center" class="contenthead"> <tr> <td height="21" align="center">[b]Points buy[/b]</td> </tr> </table> <table width="100%" border="0" class="contentcontent"> <tr> <td height="40"><td align="center">3,500 Point Pack</td> <td align="center">3,500</td> <td align="center">$10.00</td> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <td align="center"> <input type=hidden name=cmd value=_xclick> <input type="hidden" name="business" value="....my paypal acount...."> <input type="hidden" name="item_name" value="mafia-warriors.net|DP|4|<? echo $user_class->id ?>"> <input type="hidden" name="amount" value="10.00"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="return" value="http://www.mafia-warriors.net/donatordone.php?payment=done"> <input type="hidden" name="cancel_return" value="http://www.mafia-warriors.net/donatordone.php"> <input type="hidden" name="notify_url" value="http://www.mafia-warriors.net/vote.php"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="tax" value="0"> <input type="hidden" name="on0" value="username"> <input type="hidden" name="os0" value="<? echo $user_class->username ?>" maxlength="60" > <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" width="68" height="23" border="0" name="submit" alt=""> </td> </form> </td> </tr>
-
this will change it from saying 1 week 2 weeks its will now say 7 days or 14 days 8) function howlongago($ts) { $ts=time()-$ts; if ($ts<1) // <1 second return " NOW"; elseif ($ts==1) // <1 second return $ts." second"; elseif ($ts<60) // <1 minute return $ts." seconds"; elseif ($ts<120) // 1 minute return "1 minute"; elseif ($ts<60*60) // <1 hour return floor($ts/60)." minutes"; elseif ($ts<60*60*2) // <2 hour return "1 hour"; elseif ($ts<60*60*24) // <24 hours = 1 day return floor($ts/(60*60))." hours"; elseif ($ts<60*60*24*2) // <2 days return "1 day"; elseif ($ts<(60*60*24*7)) // <7 days = 1 week return floor($ts/(60*60*24))." days"; elseif ($ts<60*60*24*30.5) // <30.5 days ~ 1 month return floor($ts/(60*60*24))." days"; elseif ($ts<60*60*24*365) // <365 days = 1 year return floor($ts/(60*60*24))." days"; else // more than 1 year return floor($ts/(60*60*24))." days"; }; function howlongtil($ts) { $ts=$ts - time(); if ($ts<1) // <1 second return " NOW"; elseif ($ts==1) // <1 second return $ts." second"; elseif ($ts<60) // <1 minute return $ts." seconds"; elseif ($ts<120) // 1 minute return "1 minute"; elseif ($ts<60*60) // <1 hour return floor($ts/60)." minutes"; elseif ($ts<60*60*2) // <2 hour return "1 hour"; elseif ($ts<60*60*24) // <24 hours = 1 day return floor($ts/(60*60))." hours"; elseif ($ts<60*60*24*2) // <2 days return ""; elseif ($ts<(60*60*24*7)) // <7 days = 1 week return floor($ts/(60*60*24))." days"; elseif ($ts<60*60*24*30.5) // <30.5 days ~ 1 month return floor($ts/(60*60*24))." days"; elseif ($ts<60*60*24*30.5) // <365 days = 1 year return floor($ts/(60*60*24*30.5))." Days"; else // more than 1 year return floor($ts/(60*60*24))." days"; };
-
i have a forum script but dont have any SQL with it can someone plz help me :rolleyes: jyust mail me and i send u the script
-
its all dun in classes find if ($this->rmdays != 0){ $this->type = "Respected Warrior"; $whichfont = $this->color; } add under it if ($this->hospital !=0) { $this->h = "[img=ADD YOU CROSS]formattedname .= "[b]<a title='Respected Warrior [".$this->rmdays." RM Days Left]' href='profiles.php?id=".$this->id."'><font color = '".$whichfont."'>".$this->username." </a></font>[/b]"; $this->formattedname .= "[b]<a title='Respected Warrior [".$this->rmdays." RM Days Left]' href='profiles.php?id=".$this->id."'><font color = '".$whichfont."'>".$this->username." </a></font>[/b]"; } elseif ($this->admin != 0) { $this->formattedname .= "[b][url='profiles.php?id=".$this->id."']<font color = '".$whichfont."'>".$this->username." ".$this->h."[/url]</font>[/b]"; } else { $this->formattedname .= "[url='profiles.php?id=".$this->id."']<font color = '".$whichfont."'>".$this->username." [/url]</font>"; } and replace with this $this->formattedname .= "[b]<a title='Respected Warrior [".$this->rmdays." RM Days Left]' href='profiles.php?id=".$this->id."'><font color = '".$whichfont."'>".$this->username." ".$this->h."</a></font>[/b]"; $this->formattedname .= "[b]<a title='Respected Warrior [".$this->rmdays." RM Days Left]' href='profiles.php?id=".$this->id."'><font color = '".$whichfont."'>".$this->username." ".$this->h."</a></font>[/b]"; } elseif ($this->admin != 0) { $this->formattedname .= "[b][url='profiles.php?id=".$this->id."']<font color = '".$whichfont."'>".$this->username." ".$this->h."[/url]</font>[/b]"; } else { $this->formattedname .= "[url='profiles.php?id=".$this->id."']<font color = '".$whichfont."'>".$this->username." ".$this->h."[/url]</font>"; } all done if there are other ways uses them this is my way 8)
-
av been messing around and made my self a new mod its a mod where u can see if the users are in Er it comes up a little redcross Beside there name :P
-
Y not make a iframe not sure if this will work put the iframe in your header along with the code 8)
-
and how all the radios on here dont work mines works if u had no idea how to set your own radio up y not mail me :D
-
old post sorry 8)
-
you will need to change all the emotes to sute your self this is classifieds.php over write with this <? include 'header.php'; include 'bbcodes.php'; if (isset($_POST['submit'])) { $cost = (strlen($_POST['title']) + strlen($_POST['message'])) * 50; $_POST['message'] = bbCode($_POST['message']); $_POST['message'] = smilie($_POST['message']); $error = ($_POST['message'] == "") ? "You need to have a message!" : $error; if($error == ""){ $time = time(); $newsql = mysql_query("UPDATE `grpgusers` SET `money` = '".$newmoney."' WHERE `id`= '".$user_class->id."'"); $result= mysql_query("INSERT INTO `ads` VALUES('".$time."', '$user_class->id', '".$_POST['title']."', '".$_POST['message']."')"); echo Message("You have posted a classified"); } else { echo Message($error); } } ?> <? function smilie($string) { global $dir; $smilie = array(":)) " => '[img=smileys/21.gif]', ":-? " => '[img=smileys/39.gif]', ":P " => '[img=smileys/10.gif]', ":-> " => '[img=smileys/15.gif]', ":D " => '[img=smileys/4.gif]', ":f: " => '[img=smileys/23.gif]', "=)) " => '[img=smileys/24.gif]', ":| " => '[img=smileys/22.gif]', ":-J " => '[img=smileys/78.gif]', ":-O " => '[img=smileys/13.gif]', ":-$ " => '[img=smileys/32.gif]', ":-' " => '[img=smileys/65.gif]', ":-: " => '[img=smileys/46.gif]', ":__: " => '[img=smileys/6.gif]', ":o0" => '[img=smileys/112.gif]', ":12" => '[img=smileys/77.gif]', ":65" => '[img=smileys/68.gif]', ":((" => '[img=smileys/20.gif]', ":ang" => '[img=smileys/14.gif]', ":ang" => '[img=smileys/14.gif]', ":657" => '[img=smileys/19.gif]', "xD" => '[img=smileys/]' ); return strtr($string, $smilie); } function bbCode($string) { $bb = array("[b]" => "[b]", "[/b]" => "[/b]", "[u]" => "<u>", "[/u]" => "</u>", "[s]" => "<s>", "[img]" => "[img]", "[/img]" => "[/img]", "[/s]" => "<s>", "[sup]" => "<sup>", "[/sup]" => "</sup>", "[sub]" => "<sub>", "[/sub]" => "</sub>", "[time]" => date('G:i (A)') ); return strtr($string, $bb); } ?> <link href="style.css" rel="stylesheet" type="text/css" /> <tr><td class="contenthead">Warriors Chat</td></tr> <tr><td class="contentcontent"></td></tr> <tr> <tr><td class="contentcontentnob"> <form method='post'><table width='100%' class="contentcontent"> <tr> <td align="center">Welcome to Mafia-warriors Chat <? echo $user_class->formattedname; ?> Keep It Clean in here Or u will Get chat Banned</td> </tr> <tr> <td align="center"><textarea class='areatest' name='message' rows='4' id='message' style="width: 510px"></textarea></td> </tr> <tr> <td align="center"> [img=smileys/21.gif] [img=smileys/39.gif] [img=smileys/10.gif] [img=smileys/15.gif]')" /> [img=smileys/4.gif] [img=smileys/23.gif] [img=smileys/24.gif] [img=smileys/22.gif] [img=smileys/78.gif] [img=smileys/13.gif] [img=smileys/32.gif] [img=smileys/65.gif] [img=smileys/46.gif] [img=smileys/6.gif] [img=smileys/112.gif] [img=smileys/77] [img=smileys/20.gif] [img=smileys/14.gif] [img=smileys/19.gif] [img=smileys/] [img=smileys] [img=68.gif]</td> </tr> <tr> <td width='25%' align="center">[[url="classifieds.php"]Refresh[/url]] <input class='buttong' type='submit' name='submit' value='Post'></td> </tr></table></form> </td></tr> <? $result = mysql_query("SELECT * from `ads` ORDER BY `when` DESC LIMIT 10"); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $user_ads = New User($row['poster']); ?> <tr><td class="contentcontent"> <table width='100%' class="contentcontent"> <tr> <td width='15%'> <?= $user_ads->formattedname ?> </p></td> <td width='15%'></td> <td width='45%'></td> </tr> <tr> <td width='100%' colspan='4'><?= $row['message'] ?></td> </tr> </table> </td></tr> <? } ?> <? include 'footer.php'; ?> add in header <style type="text/css"> @import url("style.css"); </style> <script type="text/javascript"> function insertSmiley(smiley){ var currentText = document.getElementById("message"); var smileyWithPadding = " " + smiley + " "; currentText.value += smileyWithPadding; currentText.focus();} checked = false; function checkAll () { if (checked == false){checked = true}else{checked = false} for (var i = 0; i < document.getElementById('pms1').elements.length; i++) { document.getElementById('pms1').elements[i].checked = checked; } } function HideContent(d) { if(d.length < 1) { return; } document.getElementById(d).style.display = "none"; } function ShowContent(d) { if(d.length < 1) { return; } document.getElementById(d).style.display = "block"; } function ReverseContentDisplay(d) { if(d.length < 1) { return; } if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; } else { document.getElementById(d).style.display = "none"; } } function getPann(uid,int) { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","pann.php?ch="+int+'&uid='+uid+'&random='+Math.random(),true); xmlhttp.send(); } </script> and that you all done
-
can some one plz help me add smilys on my chat box ? :D
-
i dont seem to be haveing any luck with someone with a throne script anyone i buy it for $10 just mail me asp :D