
Joel
Members-
Posts
1,169 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Joel
-
Re: Counting (nr game) 2073???
-
Re: Counting in 5 backwards 8930
-
Re: Counting (nr game) 2071?
-
Re: Counting (nr game) 2069
-
Re: [requests] Bot online 24hours I was correcting 03laceys code...
-
Re: Counting (nr game) 2066 - Bored -_-
-
Re: Counting (nr game) 2064
-
Re: [requests] Bot online 24hours if($ir['user_level'] == "2") { echo "online"; } else { echo "offline"; }
-
Re: Counting (nr game) 2062
-
Re: Please review My Game Its a bit off a mess :?
-
Re: any and all help needed I think you have a problem with the level cap, go to phpmyadmin > users > and edit the level query and change it to BIGINT 50, something like that, I once had a problem similar until I changed it, post back if it doesn't work I'll try and help you even more! :-)
-
Re: [mccodes lite] Gangs :-)
-
Re: [mccodes lite] Gangs I don't no why your getting that, I think its to do with your host but the script should be this: <?php session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); print "<font face='Arial' size='4'>Factions</font><hr width='90%'>"; switch ($_GET['step']) { case 'create': create_faction(); break; case 'profile': faction_profile(); break; case 'users': faction_members(); break; case 'search': search_factions(); break; case 'apply': faction_apply(); break; default: factions_index(); break; } function factions_index() { global $ir,$c,$userid,$h; $sql = sprintf("SELECT * FROM `factions` fa LEFT JOIN `users` u ON (u.userid = fa.faLEADER) ORDER BY faID DESC"); $q = mysql_query($sql); print "This is a list of all factions by ID <table width='90%' cellspacing='1'><tr bgcolor='#AAAAAA'><th width='25%'>Name</th><th width='13%'>Members</th><th width='12%'>Reputation</th><th width='50%'>Image</th></tr>"; while($r = mysql_fetch_array($q)) { print "<tr><td>[url='factions.php?step=profile&ID={$r[']<h3>{$r['faNAME']}</h3>[/url]</td><td>"; $membs = sprintf("SELECT * FROM `users` WHERE faction = %u", mysql_real_escape_string($r['faID'])); $mems = mysql_query($membs); print mysql_num_rows($mems)."</td> <td>{$r['faREPUTATION']}</td> <td>[img={$r[]</td></tr>"; } print "</table> <hr width='90%'>> [url='explore.php']Back[/url]<hr width='90%'>"; } function create_faction() { global $ir,$c,$userid,$h; $sql = sprintf("SELECT * FROM `factions` WHERE faID > 0"); $q = mysql_query($sql); $fcs = mysql_num_rows($q); $r['faCOST'] = ($fcs*10000); if($ir['money'] < $r['faCOST']) { print " You don't have enough money. It costs ".money_formatter($r['faCOST'])." to create a new Faction. <hr width='90%'>> [url='explore.php']Back[/url]<hr width='90%'>"; } else if($ir['faction'] > 0) { print " You are already part of a Faction. Leave before creating a new one. <hr width='90%'>> [url='explore.php']Back[/url]<hr width='90%'>"; } else if($_POST['name'] AND $_POST['description'] AND $_POST['status']) { $ins = sprintf("INSERT INTO `factions` (`faID`, `faNAME`, `faDESC`, `faSTATUS`, `faLEADER`, `faCOLEADER`, `faCAPACITY`, `faREPUTATION`) VALUES ('NULL','%s', '%s', '%s', '%d', '%d', '%d', '%d')", mysql_real_escape_string($_POST['name']), mysql_real_escape_string($_POST['description']), mysql_real_escape_string($_POST['status']), $userid, $userid, 10, 100); mysql_query($ins); $r['insID'] = mysql_insert_id($c); $fac = sprintf("UPDATE `users` SET faction = %d, money=money-%d WHERE (userid = %u)", $r['insID'], $r['faCOST'], $userid); mysql_query($fac); print " The {$_POST['name']} faction was successfully created. <hr width='90%'>> [url='factions.php?step=manage']Back[/url]<hr width='90%'>"; } else { print " <form action='factions.php?step=create' method='post'> A new faction will cost $10,000 times the amount of factions in existence. The current price is [b]".money_formatter($r['faCOST'])."[/b]. Name your Faction <input type='text' name='name' /> Choose a Status <select type='dropdown' name='status'> <option value='Peaceful'>Peaceful</option> <option value='Aggressive'>Aggressive</option> </select> Description <textarea name='description' cols='40' rows='7'></textarea> <input type='submit' value='Create' /></form> <hr width='90%'>> [url='factions.php']Back[/url]<hr width='90%'>"; } } function faction_profile() { global $ir,$c,$userid,$h; $sql = sprintf("SELECT * FROM `factions` fa LEFT JOIN `users` u ON (u.userid = fa.faLEADER) WHERE (fa.faID = %u)", mysql_real_escape_string($_GET['ID'])); $q = mysql_query($sql); $r = mysql_fetch_array($q); print " <table width='400' bgcolor='#DFDFDF'><tr><td align='center'>[b]<font size='5'>{$r['faNAME']}</font>[/b]</td></tr></table> [img={$r[] <table width='400' bgcolor='#DFDFDF'><tr><td valign='middle' align='center'><font size='5'>[b]{$r['faREPUTATION']}[/b]</font></td></tr></table> <table width='400' bgcolor='#DFDFDF'><tr><td width='200' valign='middle'> [b]Leader: [/b][url='viewuser.php?u={$r[']{$r['username']}[/url] "; $col = sprintf("SELECT * FROM `users` WHERE (userid = %u)", mysql_real_escape_string($r['faCOLEADER'])); $q2 = mysql_query($col); $co = mysql_fetch_array($q2); print "[b]Co-Leader: [/b][url='viewuser.php?u={$r[']{$co['username']}[/url] "; $membs = sprintf("SELECT * FROM `users` WHERE faction = %u", mysql_real_escape_string($r['faID'])); $mems = mysql_query($membs); print "[b]Members: [/b]".mysql_num_rows($mems)." [b]Reputation: [/b]{$r['faREPUTATION']} [b]Current chain: [/b]{$r['faCHAIN']} attacks [b]Best chain: [/b]{$r['faBCHAIN']} attacks [b]Status: [/b]"; if ($r['faSTATUS'] == 'Peaceful') { print "<font color='green'>[b]Peaceful[/b]</font>"; } else { print "<font color='red'>[b]Aggressive[/b]</font>"; } print " </td> <td valign='top' align='right' width='200'>[url='factions.php?step=users&ID={$r[']User list[/url] < [url='factions.php?step=apply&ID={$r[']Apply[/url] < </td></tr></table> <table width='400' bgcolor='#DFDFDF'><tr> <td width='50%' height='100%'> <table width='100%' height='100%'><tr> <td align='center'> {$r['faDESC']} </td> </tr></table></td></tr></table> <hr width='90%'>> [url='factions.php']Back[/url]<hr width='90%'>"; } function faction_members() { global $ir,$c,$userid,$h; $sql = sprintf("SELECT * FROM `factions` fa LEFT JOIN `users` u ON (u.faction = fa.faID) WHERE (fa.faID = %u)", mysql_real_escape_string($_GET['ID'])); $q = mysql_query($sql); print "<table width='90%' cellspacing='1'><tr bgcolor='#AAAAAA'><th width='25%'>Num</th><th width='25%'>Name</th><th width='25%'>Level</th><th width='25%'>Days in Faction</th></tr>"; while ($r = mysql_fetch_array($q)) { $cn++; print "<tr><td>$cn.</td><td>[url='viewuser.php?u={$r[']{$r['username']}[/url]</td><td>{$r['level']}</td><td>{$r['faction_days']}</td></tr>"; } print "</table> <hr width='90%'>> [url='factions.php?step=profile&ID={$_GET[']Back[/url]<hr width='90%'>"; } function search_factions() { global $ir,$c,$userid,$h; if (!$_POST['name']) { print "<form action='factions.php?step=search' method='post'> [b]Search by Keyword[/b] Insert the keyword that you'd like to search for Factions: <input type='text' name='name'> <input type='submit' value='Search'></form> <hr width='90%'>> [url='factions.php']Back[/url]<hr width='90%'>"; } else { $sql = sprintf("SELECT * FROM `factions` fa LEFT JOIN `users` u ON (u.userid = fa.faLEADER) WHERE (`faNAME` LIKE '%%%s%%')", mysql_real_escape_string($_POST['name'])); $q = mysql_query($sql); print "[b]Search by Keyword[/b] Keyword: {$_POST['name']} <table width='90%' cellspacing='1'><tr bgcolor='#AAAAAA'><th width='25%'>Name</th><th width='13%'>Members</th><th width='12%'>Reputation</th><th width='50%'>Image</th></tr>"; while($r = mysql_fetch_array($q)) { print "<tr><td>[url='factions.php?step=profile&ID={$r[']<h3>{$r['faNAME']}</h3>[/url]</td><td>"; $membs = sprintf("SELECT * FROM `users` WHERE faction = %u", mysql_real_escape_string($r['faID'])); $mems = mysql_query($membs); print mysql_num_rows($mems)."</td> <td>{$r['faREPUTATION']}</td> <td>[img={$r[]</td></tr>"; } print "</table> <hr width='90%'>> [url='factions.php?step=search']Back[/url]<hr width='90%'>"; } } function faction_apply() { global $ir,$c,$userid,$h; if ($ir['faction']) { print " You are already in a faction at this time. <hr width='90%'>> [url='factions.php']Back[/url]<hr width='90%'>"; } else if (!$_GET['act']) { print " Please type an application to this faction below: <form action='factions.php?step=apply&act=submit&ID={$_GET['ID']}' method='post'> <textarea type='text' name='app' cols='50' rows='8'>Type your application here</textarea> <input type='submit' value='Submit'></form> <hr width='90%'>> [url='factions.php?step=profile&ID={$_GET[']Back[/url]<hr width='90%'>"; } else if ($_GET['act'] == 'submit') { if ($_POST['app']) { $ins = sprintf("INSERT INTO `faction_apps` (`fpID`, `fpUSER`, `fpFACTION`, `fpAPP`, `fpTIME`) VALUES ('NULL','%d', '%d', '%s', '%d')", mysql_real_escape_string($ir['userid']), mysql_real_escape_string($_GET['ID']), mysql_real_escape_string($_POST['app']), time()); mysql_query($ins); print " Your application was submitted! <hr width='90%'>> [url='factions.php?step=profile&ID={$_GET[']Back[/url]<hr width='90%'>"; } else { print " You did not type an application to send! <hr width='90%'>> [url='factions.php?step=apply&ID={$_GET[']Back[/url]<hr width='90%'>"; } } } $h->endpage(); ?> ^^ That's Richards original script :|
-
Re: [mccodes lite] Gangs Well it seems to me you haven't created the files yet :|
-
Re: Guess the next poster No no no! ArmageddonDude next...
-
Re: [mccodes lite] Gangs <?php /* MCCodes Lite mainmenu.php Rev 1.0.0 Copyright (C) 2006 Dabomstew This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ global $c,$ir; print "[url='index.php']Home[/url] [url='inventory.php']Items[/url] [url='explore.php']Explore[/url] <a href='events.php'>"; $d=mysql_query("SELECT COUNT(*) as cnt FROM events WHERE evUSER={$ir['userid']} AND evREAD=0",$c) or die(mysql_error()); $r=mysql_fetch_array($d); if($r['cnt'] > 0) { print "[b]Events ({$r['cnt']})[/b]"; } else { print "Events (0)"; } print "</a> <a href='mailbox.php'>"; $d2=mysql_query("SELECT COUNT(*) as cnt FROM mail WHERE mail_to={$ir['userid']} AND mail_read=0",$c) or die(mysql_error()); $r=mysql_fetch_array($d2); if($r['cnt'] > 0) { print "[b]Mail ({$r['cnt']})[/b]"; } else { print "Mail (0)"; } print "</a> [url='gym.php']Gym[/url] [url='criminal.php']Crimes[/url] [url='refills.php']Refills[/url] [url='announcement.php']Announcements[/url] [url='search.php']Search[/url] [url='usersonline.php']Users Online[/url] "; if($ir['faction']) { print "[url='manage_faction.php']Your Faction[/url] "; } if($ir['user_level'] > 1) { print "<hr />[b]Admin[/b] n"; } if($ir['user_level']==2) { print "[url='admin.php']Admin Panel[/url] n"; } if($ir['user_level'] > 1) { print "<hr />[b]Admins Online:[/b] "; $q=mysql_query("SELECT * FROM users WHERE laston>(unix_timestamp()-15*60) AND user_level>1 ORDER BY userid ASC",$c); while($r=mysql_fetch_array($q)) { $la=time()-$r['laston']; $unit="secs"; if($la >= 60) { $la=(int) ($la/60); $unit="mins"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } print "[url='viewuser.php?u={$r[']{$r['username']}[/url] ($la $unit) "; } } print "<hr /> [url='preferences.php']Preferences[/url] <a href='useronline.php>Users online</a> [url='logout.php']Logout[/url] Time is now "; echo date ('F j, Y')." ".date('g:i:s a'); ?> I had to update the code because it seemed you had more errors
-
Re: [mccodes lite] Gangs <?php /* MCCodes Lite mainmenu.php Rev 1.0.0 Copyright (C) 2006 Dabomstew This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ global $c,$ir; print "[url='index.php']Home[/url] [url='inventory.php']Items[/url] [url='explore.php']Explore[/url] <a href='events.php'>"; $d=mysql_query("SELECT COUNT(*) as cnt FROM events WHERE evUSER={$ir['userid']} AND evREAD=0",$c) or die(mysql_error()); $r=mysql_fetch_array($d); if($r['cnt'] > 0) { print "[b]Events ({$r['cnt']})[/b]"; } else { print "Events (0)"; } print "</a> <a href='mailbox.php'>"; $d2=mysql_query("SELECT COUNT(*) as cnt FROM mail WHERE mail_to={$ir['userid']} AND mail_read=0",$c) or die(mysql_error()); $r=mysql_fetch_array($d2); if($r['cnt'] > 0) { print "[b]Mail ({$r['cnt']})[/b]"; } else { print "Mail (0)"; } print "</a> [url='gym.php']Gym[/url] [url='criminal.php']Crimes[/url] [url='refills.php']Refills[/url] [url='announcement.php']Announcements[/url] [url='search.php']Search[/url] [url='usersonline.php']Users Online[/url] "; if($ir['faction']) { print "[url='manage_faction.php']Your Faction[/url] "; } if($ir['user_level'] > 1) { print "<hr />[b]Admin[/b] n"; } if($ir['user_level']==2) { print "[url='admin.php']Admin Panel[/url] n"; } if($ir['user_level'] > 1) { print "<hr />[b]Admins Online:[/b] "; $q=mysql_query("SELECT * FROM users WHERE laston>(unix_timestamp()-15*60) AND user_level>1 ORDER BY userid ASC",$c); while($r=mysql_fetch_array($q)) { $la=time()-$r['laston']; $unit="secs"; if($la >= 60) { $la=(int) ($la/60); $unit="mins"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } print "[url='viewuser.php?u={$r[']{$r['username']}[/url] ($la $unit) "; } } print "<hr /> [url='preferences.php']Preferences[/url] <a href='useronline.php>Users online</a> [url='logout.php']Logout[/url] Time is now "; echo date ('F j, Y')." ".date('g:i:s a'); ?> Updated for Rusher1
-
Re: Counting (nr game) 2059
-
Re: Counting (nr game) 2057
-
I'm at a dead end with my mccode modifications please help...
Joel replied to winfidel's topic in General Discussion
Re: I'm at a dead end with my mccode modifications please help... Well I think it would be something like this: if($ir['cityid'] == "1") { echo "[url='example.php']Example[/url]"; } That will get the City ID, so if you have a created city then would have to go into "phpmyadmin" and check the ID of that city or you could do it like this: if($ir['cityname'] == "THE NAME OF YOUR CITY") { echo "[url='example.php']Example[/url]"; } That will get then name of the city etc, but if none of them work then I suggest using this: $sql = sprintf("SELECT * FROM `cities`",$c); $sql = mysql_query($sql); while($city = mysql_fetch_array($sql)) { if($city['cityid'] == "1") { echo "[url='example.php']Example[/url]"; } } Something like that, hope that's what your looking for :? -
Re: [mccodes V2] Bounty Hunter Game Nice mod War_Hero :-)
-
Re: [mccode] Page Tutorials [$5.00] Lol your funny... I made my own "Page Tutorials Mod" and decided to give it away for free because its a 5 minute job, and I am not selling it. Absolute Zero's is probably different to mine, so stop complaining!
-
Re: Race. Help! Whats the errors?
-
Re: [mccodes v2] Tournement PvP [$10.00] Why so many files when you can put all those files in 1 lol :-o
-
Re: [mccode v2] Secure Bank! Good work! :-)