
Karlos
Members-
Posts
951 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Karlos
-
Re: [MC Code V2] Custom Error Pages Note: you can't test it under windows machines unless you already have PHP 5.3 (can be get on the daily CVS) i am using windows so i can't test it unless i have PHP 5.3, which i do on my WAMP server..
-
Re: [MC Code V2] Custom Error Pages Dosen't work :wink: takes me straight to login. They won't see the menu.. and anyway if they not logged in globals.php have already a function to kick them to login if they aren't loggedin. I have aleady thought od numerous idea's and suggestions. My way is good enough and will be good enough to everyone else. And thanks Killah to state that obvious point.
-
[McCodes][v2] Staff Menu Mod (1st Mod ive made)
Karlos replied to Dayo's topic in Free Modifications
Re: [McCodes][v2] Staff Menu Mod (1st Mod ive made) When i installed this on my template (XHTML) this didn't work and it went everywhere.. so i just went rhough it all. <?php global $db, $c, $ir, $Set; echo ' <script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script> <link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } .style2 { font-size: 12; font-weight: bold; } a:link { color: #000000; text-decoration: none; } a:visited { text-decoration: none; color: #000000; } a:hover { text-decoration: underline; color: #666666; } a:active { text-decoration: none; color: #000000; } .style3 { font-size: 12px; font-weight: bold; } --> </style> <div> <div id="CollapsiblePanel17" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> [b]User Options[/b] </div> <div class="CollapsiblePanelContent"> [url="index.php"]Back To Game[/url] [url="staff.php"]Index[/url] [url="logout.php"]Logout[/url] </div> </div'; if($ir['user_level'] == '2') { echo ' <div id="CollapsiblePanel1" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> [b]General[/b] </div> <div class="CollapsiblePanelContent"> [url="staff.php?action=basicset"]Basic Settings[/url] [url="staff.php?action=announce"]Add Announcement[/url] </div> </div> <div id="CollapsiblePanel2" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> [b]Users[/b] </div> <div class="CollapsiblePanelContent"> [url="staff_users.php?action=newuser"]Create New User[/url] [url="staff_users.php?action=edituser"]Edit User[/url] [url="staff_users.php?action=deluser"]Delete User[/url] [url="staff_users.php?action=invbeg"]View User Inventory[/url] [url="staff_users.php?action=creditform"]Credit User[/url] <a href="staff_users.php?action=masscreditv>Mass Payment</a> [url="staff_users.php?action=forcelogout"]Force User Logout[/url] [url="staff_users.php?action=reportsview"]Player Reports[/url] </div> </div> <div id="CollapsiblePanel3" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> [b]Items[/b] </div> <div class="CollapsiblePanelContent"> [url="staff_items.php?action=newitem"]Create New Item[/url] [url="staff_items.php?action=giveitem"]Give Item To User[/url] [url="staff_items.php?action=edititem"]Edit Item[/url] [url="staff_items.php?action=killitem"]Delete An Item[/url] [url="staff_items.php?action=newitemtype"]Add Item Type[/url] </div> </div>'; } echo ' <div id="CollapsiblePanel4" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> [b]Logs[/b] </div> <div class="CollapsiblePanelContent"> [url="staff_logs.php?action=atklogs"]Attack Logs[/url] [url="staff_logs.php?action=cashlogs"]Cash Xfer Logs[/url] [url="staff_logs.php?action=cryslogs"]Crystal Xfer Logs[/url] [url="staff_logs.php?action=banklogs"]Bank Xfer Logs[/url] [url="staff_logs.php?action=itmlogs"]Item Xfer Logs[/url] [url="staff_logs.php?action=maillogs"]Mail Logs[/url] '; if($ir['user_level'] == '2') { echo '[url="staff_logs.php?action=stafflogs"]Staff Logs[/url]'; } echo ' </div> </div>'; if($ir['user_level'] <= '3') { echo ' <div id="CollapsiblePanel5" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> [b]Gangs[/b] </div> <div class="CollapsiblePanelContent"> [url="staff_gangs.php?action=grecord"]Gang Record[/url] [url="staff_gangs.php?action=gcredit"]Credit Gang[/url] [url="staff_gangs.php?action=gwar"]Manage Gang Wars[/url] [url="staff_gangs.php?action=gedit"]Edit Gang[/url] </div> </div>'; } if($ir['user_level'] == '2') { echo ' <div id="CollapsiblePanel6" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> [b]Shops[/b] </div> <div class="CollapsiblePanelContent"> [url="staff_shops.php?action=newshop"]Create New Shop[/url] [url="staff_shops.php?action=newstock"]Add Item To Shop[/url] [url="staff_shops.php?action=delshop"]Delete Shop[/url] </div> </div> <div id="CollapsiblePanel7" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> [b]Polls[/b] </div> <div class="CollapsiblePanelContent"> [url="staff_polls.php?action=spoll"]Start Poll[/url] [url="staff_polls.php?action=endpoll"]End A Poll[/url] </div> </div> <div id="CollapsiblePanel8" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> [b]Jobs[/b] </div> <div class="CollapsiblePanelContent"> [url="staff_jobs.php?action=newjob"]Make a new Job[/url] [url="staff_jobs.php?action=jobedit"]Edit a Job[/url] [url="staff_jobs.php?action=jobdele"]Delete a Job[/url] [url="staff_jobs.php?action=newjobrank"]Make a new Job Rank[/url] [url="staff_jobs.php?action=jobrankedit"]Edit a Job Rank[/url] [url="staff_jobs.php?action=jobrankdele"]Delete a Job Rank[/url] </div> </div> <div id="CollapsiblePanel9" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> [b]Houses[/b] </div> <div class="CollapsiblePanelContent"> [url="staff_houses.php?action=addhouse"]Add House[/url] [url="staff_houses.php?action=edithouse"]Edit House[/url] [url="staff_houses.php?action=delhouse"]Delete House[/url] </div> </div> <div id="CollapsiblePanel10" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> [b]Cities[/b] </div> <div class="CollapsiblePanelContent"> [url="staff_cities.php?action=addcity"]Add City[/url] [url="staff_cities.php?action=editcity"]Edit City[/url] [url="staff_cities.php?action=delcity"]Delete City[/url] </div> </div> <div id="CollapsiblePanel11" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> [b]Forums[/b] </div> <div class="CollapsiblePanelContent"> [url="staff_forums.php?action=addforum"]Add Forum[/url] [url="staff_forums.php?action=editforum"]Edit Forum[/url] [url="staff_forums.php?action=delforum"]Delete Forum[/url] </div> </div> <div id="CollapsiblePanel12" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> [b]Courses[/b] </div> <div class="CollapsiblePanelContent"> [url="staff_courses.php?action=addcourse"]Add Course[/url] [url="staff_courses.php?action=editcourse"]Edit Course[/url] [url="staff_courses.php?action=delcourse"]Delete Course[/url] </div> </div> <div id="CollapsiblePanel13" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> [b]Crimes[/b] </div> <div class="CollapsiblePanelContent"> [url="staff_crimes.php?action=newcrime"]Create New Crime[/url] [url="staff_crimes.php?action=editcrime"]Edit Crime[/url] [url="staff_crimes.php?action=delcrime"]Delete Crime[/url] [url="staff_crimes.php?action=newcrimegroup"]Create New Crime Group[/url] [url="staff_crimes.php?action=editcrimegroup"]Edit Crime Group[/url] [url="staff_crimes.php?action=delcrimegroup"]Delete Crime Group[/url] [url="staff_crimes.php?action=reorder"]Reorder Crime Groups[/url] </div> </div> <div id="CollapsiblePanel14" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> [b]Battle Tent[/b] </div> <div class="CollapsiblePanelContent"> [url="staff_battletent.php?action=addbot"]Add Challenge Bot[/url] [url="staff_battletent.php?action=editbot"]Edit Challenge Bot[/url] [url="staff_battletent.php?action=delbot"]Remove Challenge Bot[/url] </div> </div>'; } echo ' <div id="CollapsiblePanel15" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> [b]Punishments[/b] </div> <div class="CollapsiblePanelContent"> [url="staff_punit.php?action=mailform"]Mail Ban User[/url] [url="staff_punit.php?action=unmailform"]Un-Mailban User[/url] [url="staff_punit.php?action=forumform"]Forum Ban User[/url] [url="staff_punit.php?action=unforumform"]Un-Forumban User[/url] [url="staff_punit.php?action=fedform"]Jail User[/url] [url="staff_punit.php?action=fedeform"]Edit Fedjail Sentence[/url] [url="staff_punit.php?action=unfedform"]Unjail User[/url] [url="staff_punit.php?action=ipform"]Ip Search[/url] </div> </div>'; if($ir['user_level'] == '2') { echo ' <div class="CollapsiblePanel" id="CollapsiblePanel16"> <div class="CollapsiblePanelTab" tabindex="0"> Special </div> <div class="CollapsiblePanelContent"> [url="staff_special.php?action=editnews"]Edit Newspaper[/url] [url="staff_special.php?action=massmailer"]Mass mailer[/url] [url="staff_special.php?action=stafflist"]Staff List[/url] [url="staff_special.php?action=userlevelform"]Adjust User Level[/url] [url="staff_special.php?action=givedpform"]Give User Donator Pack[/url] </div> </div> <span class="style3"> [url="logout.php"]Logout[/url] Time</span><span class="style2"> '; } echo date ('F j, Y')." ".date('g:i:s a').'</span> <script type="text/javascript"> <!-- var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false}); var CollapsiblePanel2 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel2", {contentIsOpen:false}); var CollapsiblePanel3 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel3", {contentIsOpen:false}); var CollapsiblePanel4 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel4", {contentIsOpen:false}); var CollapsiblePanel5 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel5", {contentIsOpen:false}); var CollapsiblePanel6 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel6", {contentIsOpen:false}); var CollapsiblePanel7 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel7", {contentIsOpen:false}); var CollapsiblePanel8 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel8", {contentIsOpen:false}); var CollapsiblePanel9 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel9", {contentIsOpen:false}); var CollapsiblePanel10 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel10", {contentIsOpen:false}); var CollapsiblePanel11 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel11", {contentIsOpen:false}); var CollapsiblePanel12 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel12", {contentIsOpen:false}); var CollapsiblePanel13 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel13", {contentIsOpen:false}); var CollapsiblePanel14 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel14", {contentIsOpen:false}); var CollapsiblePanel15 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel15", {contentIsOpen:false}); var CollapsiblePanel16 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel16", {contentIsOpen:false}); var CollapsiblePanel17 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel17", {contentIsOpen:true}); //--> </script> </div>'; ?> Edit: Added new panel user options: Back to game, index, and logout. shows from start as condition is true. -
[McCodes][v2] Staff Menu Mod (1st Mod ive made)
Karlos replied to Dayo's topic in Free Modifications
Re: [McCodes][v2] Staff Menu Mod (1st Mod ive made) I personally like this, however i will need to edit it. Well done. Edit: However the tab's are easily read so try this: Find this in your css file: .CollapsiblePanelTab { font: bold 0.7em sans-serif; and replace with .CollapsiblePanelTab { font: bold 0.9em sans-serif; -
Well i choose the main 5 error the clients and we ourseleves see: 400, 403, 404, 500 and 505. Add this into your .htaccess ## Error Pages ## Options +FollowSymlinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d ErrorDocument 400 /errors.php?act=FourZeroZero ErrorDocument 403 /errors.php?act=FourZeroThree ErrorDocument 404 /errors.php?act=FourZeroFour ErrorDocument 500 /errors.php?act=FiveZeroZero ErrorDocument 505 /errors.php?act=FiveZeroFive and create a file called errors.php and place the following in: <?php $menuhide = '1'; include_once (DIRNAME(__FILE__) . '/globals.php'); $_GET['act'] = isset($_GET['act']) && is_string($_GET['act']) ? trim($_GET['act']) : ""; switch($_GET['act']) { case 'FourZeroZero': FourZeroZero(); break; case 'FourZeroThree': FourZeroThree(); break; case 'FourZeroFour': FourZeroFour(); break; case 'FiveZeroZero': FiveZeroZero(); break; case 'FiveZeroFive': FiveZeroFive(); break; default: echo '<font color="#FF0000">[b]Error[/b] [i]This script requires an action.[/i]</font>'; break; } function FourZeroZero() { echo '<font color="#FF0000">[b]Error[/b] [i]Bad Request...[/i]</font> <META HTTP-EQUIV=Refresh CONTENT="5;url=login.php">'; } function FourZeroThree() { echo '<font color="#FF0000">[b]Error[/b] [i]Forbidden...[/i]</font> <META HTTP-EQUIV=Refresh CONTENT="5;url=login.php">'; } function FourZeroFour() { echo '<font color="#FF0000">[b]Error[/b] [i]File Not Found...[/i]</font> <META HTTP-EQUIV=Refresh CONTENT="5;url=login.php">'; } function FiveZeroZero() { echo '<font color="#FF0000">[b]Error[/b] [i]Internal Server Error...[/i]</font> <META HTTP-EQUIV=Refresh CONTENT="5;url=login.php">'; } function FiveZeroFive() { echo '<font color="#FF0000">[b]Error[/b] [i]HTTP Version Not Supported...[/i]</font> <META HTTP-EQUIV=Refresh CONTENT="5;url=login.php">'; } $h->endpage(); ?>
-
Re: What FTP Client do you use? The one built into Notepad++ :wink:
-
[Mccodes V2] How to get the users to fill up the ID's
Karlos replied to SpEcKs's topic in General Discussion
Re: [Mccodes V2] How to get the users to fill up the ID's MySQL returned an empty result set (i.e. zero rows). (Query took 0.0183 sec) SQL query: SELECT l.userid +1 AS START , Min( fr.userid ) -1 AS STOP FROM users AS l LEFT OUTER JOIN users AS r ON l.userid = r.userid -1 LEFT OUTER JOIN users AS fr ON l.userid < fr.userid WHERE r.userid IS NULL AND fr.userid IS NOT NULL GROUP BY l.userid, r.userid LIMIT 0 , 30 I still have no clue what this does xD -
Re: [McCodes] Duplicate IP block Proxies :wink:
-
[Mccodes V2] How to get the users to fill up the ID's
Karlos replied to SpEcKs's topic in General Discussion
Re: [Mccodes V2] How to get the users to fill up the ID's I was looking for a bit more in-depth view though -
[Mccodes V2] How to get the users to fill up the ID's
Karlos replied to SpEcKs's topic in General Discussion
Re: [Mccodes V2] How to get the users to fill up the ID's Well i haven't seen these either but here are some links i have come up with: Left Inner Join - Couldn't find one. Right Join Inner Join Left Outer Join -
Exp from leaving people not working
Karlos replied to EineyEntertainment's topic in General Discussion
Re: Exp from leaving people not working That's the main bit you'll change to make it higher... $qe = $r['level']*$r['level']*$r['level']; $expgain = rand($qe/2,$qe); $expperc = (int) ($expgain/$ir['exp_needed']*100); -
Re: sprintf() Query.. To clarify are you talking about "It doesn't matter if you use %d or %u." that part in particular?
-
Re: [McCodes] Duplicate IP block i can tell you didn't make it //Please Keep This Notice //Coded By: GoldenZero //Website:GoldenZero.net //E-mail: joshisthebest1ca[AT]msn[DOT]com
-
Re: [McCodes]No right click script Crtl + U View > Page Source Edit > Cut Edit > Copy ect.
-
Re: [Mccodes V2] New Jobs Screenshot of my re-code: http://cursed-islands.com/Karlos/Jobs/
-
Re: Hosp And Jail Change Background error For one, i personally always prefer to do > '1' :wink:
-
Re: Hosp And Jail Change Background error $back = (($ir['jail'] > '1') || ($ir['hospital'] > '1')) ? "#FF0000" : "#CCCCCC";
-
Re: [Mccodes V2] Top 5 Users I guess he didn't close his print :lol:
-
Re: [Mccodes V2] Top 5 Users Use POG's... You'll see no NPC's amd it show's it like: 1. Username | Level 2. Username | Level 3. Username | Level 4. Username | Level 5. Username | Level But in a table.
-
Re: [Mccodes V2] New Jobs Neater, and optimized. (NOTE: Tested but error may occour as i use a modded globals.php) <?php $jobquery = '1'; include_once (DIRNAME(__FILE__) . '/globals.php'); $_GET['interview'] = abs(@intval($_GET['interview'])); if(!$ir['job']) { if(!$_GET['interview']) { echo 'You do not yet have a job. A list of jobs is available below. '; $Select1 = $db->query("SELECT `jID`, `jNAME`, `jDESC` FROM `jobs`"); while($r = $db->fetch_row($Select1)) { echo ' <table width="80%" cellspacing="0" border="1" class="table"> <tr style="text-align:center;"> <th width="30%">Job Name:</th> <td>'.stripslashes($r['jNAME']).'</th> </tr> <tr style="text-align:center;"> <th width="30%">Job Desciption:</th> <td>'.stripslashes($r['jDESC']).'</th> </tr> <tr style="text-align:center;"> <td colspan="2">[url="'.$_SERVER['PHP_SELF'].'?interview='.@intval($r['jID']).'"]Go to interview[/url]</td> </table> '; } } else { $r = $db->fetch_row($db->query(sprintf("SELECT j.`jID`, j.`jFIRST`, j.`jOWNER`, jr.`jrID`, jr.`jrNAME`, jr.`jrJOB`, jr.`jrPAY`, jr.`jrIQG`, jr.`jrLABOURG`, jr.`jrSTRG`, jr.`jrIQN`, jr.`jrLABOURN`, jr.`jrSTRN` FROM `jobs` j LEFT JOIN `jobranks` jr ON j.`jFIRST` = jr.`jrID` WHERE j.`jID`='%u'", @intval($_GET['interview'])))); echo stripslashes($r['jOWNER']).': So '.stripslashes($ir['username']).', you were looking for a job with us? '.stripslashes($ir['username']).': Yes please! '; if($ir['strength'] >= $r['jrSTRN'] && $ir['labour'] >= $r['jrLABOURN'] && $ir['IQ'] >= $r['jrIQN']) { $db->query(sprintf("UPDATE `users` SET `job`='%u', `jobrank`='%u' WHERE `userid`='%u'", @intval($_GET['interview']), @intval($r['jrID']), @intval($userid))); echo stripslashes($r['jOWNER']).': Okay '.stripslashes($ir['username']).', we\'re good to go, see you tomorrow. '.stripslashes($ir['username']).': Thanks! [url="'.$_SERVER['PHP_SELF'].'"]Check Out Your New Job![/url]'; } else { echo stripslashes($r['jOWNER']).': Sorry '.stripslashes($ir['username']).', you\'re not far enough in the game to work in this job. You\'ll need: <ul>'; if($ir['strength'] < $r['jrSTRN']) { $Diff1 = $r['jrSTRN'] - $ir['strength']; echo '[*]'.@intval($Diff1).' More Strength Needed!'; } if($ir['labour'] < $r['jrLABOURN']) { $Diff2 = $r['jrLABOURN'] - $ir['labour']; echo '[*]'.@intval($Diff2).' More Labour Needed!'; } if($ir['IQ'] < $r['jrIQN']) { $Diff3 = $r['jrIQN'] - $ir['IQ']; echo '[*]'.@intval($Diff3).' More IQ Needed!'; } echo '[/list] Before you\'ll be able to work here! [url="'.$_SERVER['PHP_SELF'].'"]> Look At Other Jobs[/url] [url="index.php"]> Go Home...[/url]'; } } } else { $_GET['act'] = isset($_GET['act']) && is_string($_GET['act']) ? strtolower(trim($_GET['act'])) : ""; switch($_GET['act']) { case 'quit': quit(); break; case 'promote': promote(); break; default: index(); break; } } function index() { global $db, $ir,$c,$userid,$h; $Select2 = NULL; echo ' <h3>Your Job</h3> You currently work in the '.stripslashes($ir['jNAME']).'! You receive '.number_format($ir['jrPAY']).' gold each day at 5pm! You also receive '.number_format($ir['jrIQG']).' IQ, '.number_format($ir['jrSTRG']).' strength and '.number_format($ir['jrLABOURG']).' labour! <table border="1" width="50%" class="table" cellspacing="0" cellpadding="2"> <tr> <td>Strength: '.number_format($ir['strength']).'</td> <td>IQ: '.number_format($ir['IQ']).'</td> </tr> <tr> <td>Labour: '.number_format($ir['labour']).'</td> <td>Job Rank: '.stripslashes($ir['jrNAME']).'</td> </tr> </table> [b]Job Ranks[/b] <table border="1" width="50%" class="table" cellspacing="0" cellpadding="2"> <tr style="text-align:center;"> <th>Title</th> <th>Pay</th> <th>Strength Reqd</th> <th>IQ Reqd</th> <th>Labour Reqd</th> </tr>'; $Select3 = $db->query(sprintf("SELECT `jrID`, `jrNAME`, `jrJOB`, `jrPAY`, `jrIQN`, `jrLABOURN`, `jrSTRN` FROM `jobranks` WHERE `jrJOB`='%u' ORDER BY `jrPAY` ASC", @intval($ir['job']))); while($r = $db->fetch_row($Select3)) { echo ' <tr> <td>'.stripslashes($r['jrNAME']).'</td> <td>'.number_format($r['jrPAY']).' Gold</td> <td>'.number_format($r['jrSTRN']).'</td> <td>'.number_format($r['jrIQN']).'</td> <td>'.number_format($r['jrLABOURN']).'</td> </tr>'; } echo ' </table> [url="'.$_SERVER['PHP_SELF'].'?act=promote"]> Try To Get Promoted[/url] [url="'.$_SERVER['PHP_SELF'].'?act=quit"]> Quit[/url]'; } function promote() { global $db, $ir, $c, $userid, $h; $Select4 = $db->query(sprintf("SELECT `jrJOB`, `jrPAY`, `jrIQN`, `jrLABOURN`, `jrSTRN` FROM `jobranks` WHERE `jrPAY` > '%u' AND jrSTRN <= '%u' AND jrLABOURN <= '%u' AND jrIQN <= '%u' AND jrJOB = '%u' ORDER BY jrPAY DESC LIMIT 1", @intval($ir['jrPAY']), @intval($ir['strength']), @intval($ir['labour']), @intval($ir['IQ']), @intval($ir['job']))); if($db->num_rows($Select4) == '0') { echo 'Sorry, you cannot be promoted at this time. [url="'.$_SERVER['PHP_SELF'].'"]> Back[/url]'; } else { $r = $db->fetch_row($Select4); $db->query(sprintf("UPDATE `users` SET `jobrank`='%u' WHERE `userid`='%u'", @intval($r['jrID']), @intval($userid))); echo 'Congrats, you have been promoted to '.stripslashes($r['jrNAME']).' [url="'.$_SERVER['PHP_SELF'].'"]> Back[/url]'; } } function quit() { global $db, $ir, $c, $userid, $h; $db->query(sprintf("UPDATE `users` SET `job`='0', `jobrank`='0' WHERE `userid`='%u'", @intval($userid))); echo 'You have quit your job! [url="'.$_SERVER['PHP_SELF'].'"]> Go Back To Job Listings[/url] [url="index.php"]> Go Home[/url]'; } $h->endpage(); ?>
-
Re: Error Game! lol There had to be a good point xD
-
mccode-v2 New and improved inventory code sources for free!
Karlos replied to MDK666's topic in Free Modifications
Re: [mccodes v2]New and improved inventory code sources for free! Yea.... Everyone has a "better" everything nowadays... -
Re: Strange Ip problem Ahh good point. I've used it isset() before but i haven't fully got grasp on when and where to use it. EDIT: If you have error_reporting(E_ALL); on use this: function validip($IP) { if (!empty($IP) && ip2long($IP)!=-1) { $ReservedIps = array ( array('0.0.0.0','2.255.255.255'), array('10.0.0.0','10.255.255.255'), array('127.0.0.0','127.255.255.255'), array('169.254.0.0','169.254.255.255'), array('172.16.0.0','172.31.255.255'), array('192.0.2.0','192.0.2.255'), array('192.168.0.0','192.168.255.255'), array('255.255.255.0','255.255.255.255') ); foreach ($ReservedIps as $R) { $Min = ip2long($R[0]); $Max = ip2long($R[1]); if ((ip2long($IP) >= $Min) && (ip2long($IP) <= $Max)) return false; } return true; } else { return false; } } function getip() { if (validip(isset($_SERVER['HTTP_CLIENT_IP']))) { return $_SERVER['HTTP_CLIENT_IP']; } foreach (explode(",", isset($_SERVER['HTTP_X_FORWARDED_FOR'])) as $IP) { if (validip(trim($IP))) { return $IP; } } if (validip(isset($_SERVER['HTTP_X_FORWARDED']))) { return $_SERVER['HTTP_X_FORWARDED']; } else if (validip(isset($_SERVER['HTTP_FORWARDED_FOR']))) { return $_SERVER['HTTP_FORWARDED_FOR']; } else if (validip(isset($_SERVER['HTTP_FORWARDED']))) { return $_SERVER['HTTP_FORWARDED']; } else if (validip(isset($_SERVER['HTTP_X_FORWARDED']))) { return $_SERVER['HTTP_X_FORWARDED']; } else { return $_SERVER['REMOTE_ADDR']; } }
-
Re: Strange Ip problem I have used MD's idea and i have error_reporting(E_ALL); on my WAMP server i get a bunch Undefined index does anyone know how to fix this and leave error_reporting(E_ALL); on? Notice: Undefined index: HTTP_CLIENT_IP in C:\wamp\www\Cursed-Islands (Re-Make)\global_func.php on line 417 Notice: Undefined index: HTTP_X_FORWARDED_FOR in C:\wamp\www\Cursed-Islands (Re-Make)\global_func.php on line 421 Notice: Undefined index: HTTP_X_FORWARDED in C:\wamp\www\Cursed-Islands (Re-Make)\global_func.php on line 428 Notice: Undefined index: HTTP_FORWARDED_FOR in C:\wamp\www\Cursed-Islands (Re-Make)\global_func.php on line 432 Notice: Undefined index: HTTP_FORWARDED in C:\wamp\www\Cursed-Islands (Re-Make)\global_func.php on line 436 Notice: Undefined index: HTTP_X_FORWARDED in C:\wamp\www\Cursed-Islands (Re-Make)\global_func.php on line 440
-
Re: Error Game! $Host = 'localhost'; $User = 'root'; $Pass = ''; $DB = 'Custom Engine'; $Connect = mysql_connect($Host, $User, $Pass); if (!isset($Conect)) { echo 'Failure To Establish A Connection:' . mysql_error(); exit; } else { $Conect; mysq_select_db($DB); }