gmtime() || $pl['my_hosp'] > gmtime()) { echo "

Sorry this page is not viewable while in jail or hospital!
"; include ('./includes/style_bottom.php'); exit(); } if($_GET['action']) { if(!in_array($_GET['action'], array('interview','quit','promote','special'))) { echo "
Invalid action!
"; include ('./includes/style_bottom.php'); exit(); } } $_GET['action'] = isset($_GET['action']) && ctype_alpha($_GET['action']) ? trim($_GET['action']) : 'index'; switch($_GET['action']) { case 'interview': job_interview(); break; case 'quit': quit_job(); break; case 'special': job_specials(); break; case 'promote': promote_me(); break; default: job_index(); break; } function job_index() { global $pl; $job = array(); $q_ry = array(); $q_ry = "SELECT `my_job`,`my_job_rank`,`armypoints`,`grocpoints`,`casipoints`, `medipoints`,`educpoints`,`lawpoints`,`my_comp` FROM `members_extra` WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; $job = mysql_query($q_ry); $job = mysql_fetch_array($job); if(!$job['my_job']) { if(!$job['my_job'] && !$job['my_comp']) { header('location:newspaper.php?page=jobs'); } else { header('location:companies.php'); } } else { $myjob = array(); $mj = array(); $q_ry = array(); $q_ry = "SELECT * FROM `system_jobs` WHERE `job_ID` = '".mysql_real_escape_string($job['my_job'])."'"; $myjob = mysql_query($q_ry) or die(mysql_error()); $mj = mysql_fetch_array($myjob); echo "
",htmlentities($mj['job_NAME']),"

"; $stat = array(); $st = array(); $q_ry = array(); $q_ry = "SELECT `my_labor`,`my_intelligence`,`my_endurance` FROM `memberstats` WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; $stat = mysql_query($q_ry); $st = mysql_fetch_array($stat); $rank = array(); $q_ry = array(); $q_ry = "SELECT * FROM `system_job_ranks` WHERE `r_ID` = '".mysql_real_escape_string($job['my_job_rank'])."'"; $rank = mysql_query($q_ry); $mjr = array(); $mjr = mysql_fetch_array($rank); echo "
 
You are currently in the ",htmlentities($mj['job_NAME']),"! You receive ".money_alter($mjr['r_WAGES'])." at midnight RC time every day!
You also get ",number_format($mjr['r_MANUALGAIN'])," Manual labour, ",number_format($mjr['r_INTELGAIN'])," Intelligence, ",number_format($mjr['r_ENDURGAIN'])," Endurance and ".($mjr['r_POINTS']*$pl['my_level'])." ",htmlentities($mj['job_NAME'])," points!
 

"; $pr = array(); $jbr = array(); $q_ry = array(); $q_ry = "SELECT * FROM `system_job_ranks` WHERE `r_ID` > '".mysql_real_escape_string($mjr['r_ID'])."' AND `r_MANUALNEED` <= '".mysql_real_escape_string($st['my_labor'])."' AND `r_INTELNEED` <= '".mysql_real_escape_string($st['my_intelligence'])."' AND `r_ENDURNEED` <= '".mysql_real_escape_string($st['my_endurance'])."' AND `r_JOB` = '".mysql_real_escape_string($mj['job_ID'])."' ORDER BY `r_ID` ASC LIMIT 1"; $pr = mysql_query($q_ry); if(!mysql_num_rows($pr)) { echo ""; } else { $jbr=mysql_fetch_array($pr); echo "
 
You can upgrade to ",htmlentities($jbr['r_NAME']),"! Click the 'Get promoted' link! It will cost ".number_format($jbr['r_UPCOST'])." ",htmlentities($mj['job_NAME'])," points to upgrade.
 

"; } if($mj['job_NAME']=='Army') { $job['points']=$job['armypoints']; } if($mj['job_NAME']=='Grocer') { $job['points']=$job['grocpoints']; } if($mj['job_NAME']=='Casino') { $job['points']=$job['casipoints']; } if($mj['job_NAME']=='Medical') { $job['points']=$job['medipoints']; } if($mj['job_NAME']=='Education') { $job['points']=$job['educpoints']; } if($mj['job_NAME']=='Law') { $job['points']=$job['lawpoints']; } echo "
 
Rank: ",htmlentities($mjr['r_NAME'])," Income: +".money_alter($mjr['r_WAGES'])." ",htmlentities($mj['job_NAME'])," points: ".number_format($job['points'])."
Endurance: ".number_format($st['my_endurance'])." Intelligence: ".number_format($st['my_intelligence'])." Manual labour: ".number_format($st['my_labor'])."
 

"; echo "
"; $num = array(); $jranks = array(); $rks = array(); $num=0; $q_ry = array(); $q_ry = "SELECT * FROM `system_job_ranks` WHERE `r_JOB` = '".mysql_real_escape_string($mj['job_ID'])."' ORDER BY `r_ID` ASC"; $jranks = mysql_query($q_ry); while($rks = mysql_fetch_array($jranks)) { $num++; $odd="#CCCCCC"; $even="#e3e3e3"; if ($num % 2) { $color="$even"; } else { $color="$odd"; } echo ""; } echo "
 
Ranks:
 
Job Stats needed
Rank: ",htmlentities($rks['r_NAME'])," Income: ".money_alter($rks['r_WAGES'])." a day Manual: ".number_format($rks['r_MANUALNEED'])." Intelligence: ".number_format($rks['r_INTELNEED'])." Endurance: ".number_format($rks['r_ENDURNEED'])."
 
 

"; echo "
"; $num = array(); $js = array(); $sp = array(); $q_ry = array(); $q_ry = "SELECT * FROM `job_specials` WHERE `jsJOB` = '".mysql_real_escape_string($mj['job_ID'])."' AND `jsRANK` <= '".mysql_real_escape_string($mjr['r_ID'])."' ORDER BY `jsID` ASC"; $num=0; $js = mysql_query($q_ry); if(!mysql_num_rows($js)) { print ""; } else { while($sp = mysql_fetch_array($js)) { $num++; $odd="#CCCCCC"; $even="#e3e3e3"; if ($num % 2) { $color="$even"; } else { $color="$odd"; } echo ""; } } echo "
 
Specials unlocked:
 
 
This Job has no Speacials
",htmlentities($sp['jsNAME']),"
 

> Get Promoted > Quit job

"; } } function job_interview() { echo "
Interview

"; global $pl; $myjob = array(); $q_ry = array(); $q_ry = "SELECT `my_job`,`my_comp` FROM `members_extra` WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'";; $myjob = mysql_query($q_ry); $mj = array(); $mj = mysql_fetch_array($myjob); if(valid_XID($_GET['XID'])!=TRUE) { echo "
".errors_(XID)."
"; include('./includes/style_bottom.php'); exit(); } else if($mj['my_job']) { echo "You already have a job! Leave that one before trying to start another job.
>Back
"; include('./includes/style_bottom.php'); exit(); } else if($mj['my_comp']) { echo "
You already have a job! Leave that one before trying to start another job.
"; include('./includes/style_bottom.php'); exit(); } else { $_GET['XID']=abs(intval($_GET['XID'])); $thisjob = array(); $job = array(); $q_ry = array(); $q_ry = "SELECT * FROM `system_jobs` WHERE `job_ID` = '".mysql_real_escape_string($_GET['XID'])."'"; $thisjob = mysql_query($q_ry); if(!mysql_num_rows($thisjob)) { echo "
".errors_(XID)."
"; include('./includes/style_bottom.php'); exit(); } else { $job = mysql_fetch_array($thisjob); echo "
Hello ",htmlentities($pl['playername']),", i am ",htmlentities($job['job_OWNER']),"

",htmlentities($job['job_DESC']),"

"; $wrank = array(); if($_GET['XID'] == '1') { $wrank = "toparmyrank"; } if($_GET['XID'] == '2') { $wrank = "topgrocerrank"; } if($_GET['XID'] == '3') { $wrank = "topcasinorank"; } if($_GET['XID'] == '4') { $wrank = "medicaltoprank"; } if($_GET['XID'] == '5') { $wrank = "educationtoprank"; } if($_GET['XID'] == '6') { $wrank = "lawtoprank"; } $alrank = array(); $ar = array(); $q_ry = array(); $q_ry = "SELECT {$wrank} FROM `members_extra` WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; $alrank = mysql_query($q_ry); $ar = mysql_fetch_array($alrank); if($ar[$wrank]>0) { $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `my_job` = '".mysql_real_escape_string($_GET['XID'])."', `my_job_rank` = '".mysql_real_escape_string($ar[$wrank])."' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); echo "Thank you. You can start now.

>Okay
"; include('./includes/style_bottom.php'); exit(); } else { $stat = array(); $st = array(); $q_ry = array(); $q_ry = "SELECT `my_labor`,`my_intelligence`,`my_endurance` FROM `memberstats` WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; $stat = mysql_query($q_ry); $st = mysql_fetch_array($stat); $rank = array(); $rk = array(); $q_ry = array(); $q_ry = "SELECT * FROM `system_job_ranks` WHERE `r_JOB` = '".mysql_real_escape_string($_GET['XID'])."' AND `r_MANUALNEED` <= '".mysql_real_escape_string($st['my_labor'])."' AND `r_INTELNEED` <= '".mysql_real_escape_string($st['my_intelligence'])."' AND `r_ENDURNEED` <= '".mysql_real_escape_string($st['my_endurance'])."' ORDER BY `r_ID` ASC LIMIT 1"; $rank = mysql_query($q_ry); $rk = mysql_fetch_array($rank); if(!mysql_num_rows($rank)) { echo "Sorry, Your stats are not good enough yet.
>Okay"; include('./includes/style_bottom.php'); exit(); } else { $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `my_job` = '".mysql_real_escape_string($_GET['XID'])."', `my_job_rank` = '".mysql_real_escape_string($rk['r_ID'])."' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); echo "Thank you. You can start now.
>Okay"; include('./includes/style_bottom.php'); exit(); } } } } } function quit_job() { echo "
Quit job

"; $gotjob = array(); $q_ry = array(); $q_ry = "SELECT `my_job` FROM `members_extra` WHERE `my_job` > 0 AND `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; $gotjob = mysql_query($q_ry); if(!mysql_num_rows($gotjob)) { echo "
You dont have a job to quit!
>Okay
"; include('./includes/style_bottom.php'); exit(); } else { $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `my_job` = '0', `my_job_rank` = '0' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); echo "
You have quit your job!
>Okay
"; include('./includes/style_bottom.php'); exit(); } } function promote_me() { global $pl; echo "
Promotion

"; $gotjob = array(); $gj = array(); $q_ry = array(); $q_ry = "SELECT `my_job`,`my_job_rank` FROM `members_extra` WHERE `my_job` > 0 AND `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; $gotjob = mysql_query($q_ry); if(!mysql_num_rows($gotjob)) { echo "
You dont have a job to get promoted with!
>Okay
"; include('./includes/style_bottom.php'); exit(); } else { $gj = mysql_fetch_array($gotjob); $stat = array(); $st = array(); $q_ry = array(); $q_ry = "SELECT `my_labor`,`my_intelligence`,`my_endurance` FROM `memberstats` WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; $stat = mysql_query($q_ry); $st = mysql_fetch_array($stat); $pr = array(); $jbr = array(); $q_ry = array(); $q_ry = "SELECT * FROM `system_job_ranks` WHERE `r_ID` > '".mysql_real_escape_string($gj['my_job_rank'])."' AND `r_MANUALNEED` <= '".mysql_real_escape_string($st['my_labor'])."' AND `r_INTELNEED` <= '".mysql_real_escape_string($st['my_intelligence'])."' AND `r_ENDURNEED` <= '".mysql_real_escape_string($st['my_endurance'])."' AND `r_JOB` = '".mysql_real_escape_string($gj['my_job'])."' ORDER BY `r_ID` ASC LIMIT 1"; $pr = mysql_query($q_ry); if(!mysql_num_rows($pr)) { echo "
You dont have enough stats to get promoted yet!
>Okay
"; include('./includes/style_bottom.php'); exit(); } else { $jbr=mysql_fetch_array($pr); $wrank = array(); if($gj['my_job'] == '1') { $wrank = "toparmyrank"; } if($gj['my_job'] == '2') { $wrank = "topgrocerrank"; } if($gj['my_job'] == '3') { $wrank = "topcasinorank"; } if($gj['my_job'] == '4') { $wrank = "medicaltoprank"; } if($gj['my_job'] == '5') { $wrank = "educationtoprank"; } if($gj['my_job'] == '6') { $wrank = "lawtoprank"; } if($gj['my_job']=='1') { $job['points']='armypoints'; } if($gj['my_job']=='2') { $job['points']="grocpoints"; } if($gj['my_job']=='3') { $job['points']="casipoints"; } if($gj['my_job']=='4') { $job['points']="medipoints"; } if($gj['my_job']=='5') { $job['points']="educpoints"; } if($gj['my_job']=='6') { $job['points']="lawpoints"; } $epoints = array(); $q_ry = array(); $q_ry = "SELECT {$job['points']} FROM `members_extra` WHERE {$job['points']} >= '".mysql_real_escape_string($jbr['r_UPCOST'])."' AND `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; $epoints = mysql_query($q_ry); if(!mysql_num_rows($epoints)) { echo "
Sorry ",htmlentities($pl['playername']),", You dont have enough points to be promoted to a ",htmlentities($jbr['r_NAME']),"!
>Okay
"; include('./includes/style_bottom.php'); exit(); } else { $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `my_job_rank` = '".mysql_real_escape_string($jbr['r_ID'])."', {$wrank} = '".mysql_real_escape_string($jbr['r_ID'])."', {$job['points']} = {$job['points']} - '".mysql_real_escape_string($jbr['r_UPCOST'])."' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); echo "
Congratulations ",htmlentities($pl['playername']),", You have been promoted to a ",htmlentities($jbr['r_NAME']),"!
>Okay
"; include('./includes/style_bottom.php'); exit(); } } } } function job_specials() { global $pl; $_POST['ID'] = abs(intval($_POST['ID'])); echo "
Job specials

"; if(!$_POST['ID']) { echo "Error, Invalid ID!"; } else { $q_ry = array(); $q_ry = "SELECT `my_job`,`my_job_rank`, `armypoints`,`grocpoints`,`casipoints`,`medipoints`,`educpoints`,`lawpoints` FROM `members_extra` WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; $myjob = array(); $myjob = mysql_query($q_ry); $mj = array(); $mj = mysql_fetch_array($myjob); if(!$mj['my_job'] || !$mj['my_job_rank']) { echo "Error, You dont have a job!"; } else { $valid_array = array(1=>array(1,2,3,4,5,6), 2=>array(7,8), 3=>array(9,10), 4=>array(11,12,13,14,15), 5=>array(16), 6=>array(17)); $valid_array = $valid_array[$mj['my_job']]; if(!in_array($_POST['ID'], $valid_array)) { echo "Error, Invalid ID!"; } else { //Army job specials!!!!!!!!!!!! if($mj['my_job'] == '1') { $needed_rank = array(1=>1,2=>2,3=>4,4=>5,5=>7,6=>8); $points = "army|" . $mj['armypoints']; $points = explode("|", $points); if($needed_rank[$_POST['ID']] > $mj['my_job_rank']) { echo "Error, You have not earnt this job special yet!"; } else { //Army job special 1 if($_POST['ID'] == '1') { if(!$_POST['use']) { echo "
Below you can swap each ".$points[0]." point for 0.001 strength
You have ".number_format($points[1])." ".$points[0]." points
"; } else { $_POST['amount'] = abs(intval($_POST['amount'])); if(!$_POST['amount']) { echo "Error, You must select a valid ammount!"; } else { if($mj['armypoints'] < $_POST['amount']) { echo "Error, You dont have enough army points!"; } else { if(!$_POST['confirm']) { echo "
Are you sure you wish to swap ".number_format($_POST['amount'])." ".$points[0]." points for ".($_POST['amount']*0.001)." strength?
"; } else { $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `armypoints` = `armypoints` - '".mysql_real_escape_string($_POST['amount'])."' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); $q_ry = array(); $q_ry = "UPDATE `memberstats` SET `my_strength` = `my_strength` + '".mysql_real_escape_string($_POST['amount']*0.001)."' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); echo "You have swapped ".number_format($_POST['amount'])." ".$points[0]." points for ".($_POST['amount']*0.001)." strength!"; } } } } } //Army job special 1 //Army job special 2 if($_POST['ID'] == '2') { if(!$_POST['use']) { echo "
Below you can swap each ".$points[0]." point for 0.001 defence
You have ".number_format($points[1])." ".$points[0]." points
"; } else { $_POST['amount'] = abs(intval($_POST['amount'])); if(!$_POST['amount']) { echo "Error, You must select a valid ammount!"; } else { if($mj['armypoints'] < $_POST['amount']) { echo "Error, You dont have enough army points!"; } else { if(!$_POST['confirm']) { echo "
Are you sure you wish to swap ".number_format($_POST['amount'])." ".$points[0]." points for ".($_POST['amount']*0.001)." defence?
"; } else { $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `armypoints` = `armypoints` - '".mysql_real_escape_string($_POST['amount'])."' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); $q_ry = array(); $q_ry = "UPDATE `memberstats` SET `my_defence` = `my_defence` + '".mysql_real_escape_string($_POST['amount']*0.001)."' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); echo "You have swapped ".number_format($_POST['amount'])." ".$points[0]." points for ".($_POST['amount']*0.001)." defence!"; } } } } } //Army job special 2 //Army job special 3 if($_POST['ID'] == '3') { if(!$_POST['use']) { echo "
Below you can swap 10,000 ".$points[0]." point + \$5,000 to spy
Enter the id of the person you wish to spy on below
You have ".number_format($points[1])." ".$points[0]." points & ".money_alter($pl['wallet'])."
"; } else { $_POST['user'] = abs(intval($_POST['user'])); if(!$_POST['user']) { echo "Error, You must select a valid id!"; } else { $q_ry = array(); $q_ry = "SELECT m.playername,m.wallet,s.* FROM `members` AS m INNER JOIN `memberstats` AS s ON m.playerid = s.playerid WHERE m.playerid = '".mysql_real_escape_string($_POST['user'])."'"; $real = array(); $real = mysql_query($q_ry); if(!mysql_num_rows($real)) { echo "Error, Id not reconised!"; } else { if($pl['wallet'] < 5000) { echo "Error, You dont have enough money!"; } else { if($mj['armypoints'] < 10000) { echo "Error, You dont have enough army points!"; } else { $r = array(); $r = mysql_fetch_array($real); if(!$_POST['confirm']) { echo "
Are you sure you wish to spy on ".htmlentities($r['playername'])."?
"; } else { $cshi=rand(1,9); $s=rand(1,9); $g=rand(1,9); $d=rand(1,9); $sp=rand(1,9); if($cshi > 7) { $money="".money_alter($r['wallet']).""; } else { $money="failed to retrieve"; } if($s > 5) { $strength=$r['my_strength']; } else { $strength="failed to retrieve"; } if($g > 5) { $defence=$r['my_defence']; } else { $defence="failed to retrieve"; } if($d > 5) { $dexterity=$r['my_dexterity']; } else { $dexterity="failed to retrieve"; } if($sp > 5) { $speed=$r['my_speed']; } else { $speed="failed to retrieve"; } echo "You pay the spy to spy on ",htmlentities($r['playername']),", The spy manages to get the following information!.

",htmlentities($r['playername']),"'s Money: $money
",htmlentities($r['playername']),"'s Speed: $speed
",htmlentities($r['playername']),"'s Strength: $strength
",htmlentities($r['playername']),"'s Defence: $defence
",htmlentities($r['playername']),"'s Dexterity: $dexterity"; $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `armypoints` = `armypoints` - '10000' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); $q_ry = array(); $q_ry = "UPDATE `members` SET `wallet` = `wallet` - '5000' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); } } } } } } } //Army job special 3 //Army job special 4 if($_POST['ID'] == '4') { if(!$_POST['use']) { echo "
Below you can swap each ".$points[0]." point for 0.001 speed
You have ".number_format($points[1])." ".$points[0]." points
"; } else { $_POST['amount'] = abs(intval($_POST['amount'])); if(!$_POST['amount']) { echo "Error, You must select a valid ammount!"; } else { if($mj['armypoints'] < $_POST['amount']) { echo "Error, You dont have enough army points!"; } else { if(!$_POST['confirm']) { echo "
Are you sure you wish to swap ".number_format($_POST['amount'])." ".$points[0]." points for ".($_POST['amount']*0.001)." speed?
"; } else { $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `armypoints` = `armypoints` - '".mysql_real_escape_string($_POST['amount'])."' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); $q_ry = array(); $q_ry = "UPDATE `memberstats` SET `my_speed` = `my_speed` + '".mysql_real_escape_string($_POST['amount']*0.001)."' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); echo "You have swapped ".number_format($_POST['amount'])." ".$points[0]." points for ".($_POST['amount']*0.001)." speed!"; } } } } } //Army job special 4 //Army job special 5 if($_POST['ID'] == '5') { if(!$_POST['use']) { echo "
Below you can swap 25,000 ".$points[0]." points for a weapon
You have ".number_format($points[1])." ".$points[0]." points
"; } else { if($mj['armypoints'] < 25000) { echo "Error, You dont have enough army points!"; } else { if(!$_POST['confirm']) { echo "
Are you sure you wish to swap 25,000 army points for a weapon?
"; } else { $giveout = array(); $itid = array(); $giveout=rand(1,3); if($giveout == 1) { $itid=22; } else if($giveout == 2) { $itid=25; } else if($giveout == 3) { $itid=60; } $iti = array(); $ii = array(); $q_ry = array(); $q_ry = "SELECT * FROM `items` WHERE `item_id` = '".mysql_real_escape_string($itid)."'"; $iti = mysql_query($q_ry); $ii = mysql_fetch_array($iti); i_credit($_SESSION['playerid'], $itid, 1); echo "You walk in the army inventory room where you find many guns.
You hear someone coming and decide to grab the first gun at hand.
You manage to gain a ".htmlentities($ii['item_name'])."!"; $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `armypoints` = `armypoints` - '25000' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); } } } } //Army job special 5 //Army job special 6 if($_POST['ID'] == '6') { if(!$_POST['use']) { echo "
Below you can swap each ".$points[0]." point for 0.001 dexterity
You have ".number_format($points[1])." ".$points[0]." points
"; } else { $_POST['amount'] = abs(intval($_POST['amount'])); if(!$_POST['amount']) { echo "Error, You must select a valid ammount!"; } else { if($mj['armypoints'] < $_POST['amount']) { echo "Error, You dont have enough army points!"; } else { if(!$_POST['confirm']) { echo "
Are you sure you wish to swap ".number_format($_POST['amount'])." ".$points[0]." points for ".($_POST['amount']*0.001)." dexterity?
"; } else { $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `armypoints` = `armypoints` - '".mysql_real_escape_string($_POST['amount'])."' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); $q_ry = array(); $q_ry = "UPDATE `memberstats` SET `my_dexterity` = `my_dexterity` + '".mysql_real_escape_string($_POST['amount']*0.001)."' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); echo "You have swapped ".number_format($_POST['amount'])." ".$points[0]." points for ".($_POST['amount']*0.001)." dexterity!"; } } } } } //Army job special 6 } } //Army job specials!!!!!!!!!!!! //Grocer job specials!!!!!!!!!!!! if($mj['my_job'] == '2') { $needed_rank = array(7=>11,8=>13); $points = "grocer|" . $mj['grocpoints']; $points = explode("|", $points); if($needed_rank[$_POST['ID']] > $mj['my_job_rank']) { echo "Error, You have not earnt this job special yet!"; } else { //Grocer job special 1 if($_POST['ID'] == '7') { if(!$_POST['use']) { echo "
Below you can swap each ".$points[0]." point for 0.001 speed
You have ".number_format($points[1])." ".$points[0]." points
"; } else { $_POST['amount'] = abs(intval($_POST['amount'])); if(!$_POST['amount']) { echo "Error, You must select a valid ammount!"; } else { if($mj['grocpoints'] < $_POST['amount']) { echo "Error, You dont have enough grocer points!"; } else { if(!$_POST['confirm']) { echo "
Are you sure you wish to swap ".number_format($_POST['amount'])." ".$points[0]." points for ".($_POST['amount']*0.001)." speed?
"; } else { $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `grocpoints` = `grocpoints` - '".mysql_real_escape_string($_POST['amount'])."' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); $q_ry = array(); $q_ry = "UPDATE `memberstats` SET `my_speed` = `my_speed` + '".mysql_real_escape_string($_POST['amount']*0.001)."' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); echo "You have swapped ".number_format($_POST['amount'])." ".$points[0]." points for ".($_POST['amount']*0.001)." speed!"; } } } } } //Grocer job special 1 //Grocer job special 2 if($_POST['ID'] == '8') { if(!$_POST['use']) { echo "
Below you can swap 100 ".$points[0]." points for cash
You have ".number_format($points[1])." ".$points[0]." points
The amount you gain is random!
"; } else { if($mj['grocpoints'] < 100) { echo "Error, You dont have enough grocer points!"; } else { if(!$_POST['confirm']) { echo "
Are you sure you wish to swap 100 ".$points[0]." points for cash?
"; } else { $gain = rand(1000,5000); $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `grocpoints` = `grocpoints` - '100' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); $q_ry = array(); $q_ry = "UPDATE `members` SET `wallet` = `wallet` + '".mysql_real_escape_string($gain)."' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); echo "You walk in the shop office.
You see a petty cash box and grab it.
You manage to gain a ".money_alter($gain)."!"; } } } } //Grocer job special 2 } } //Grocer job specials!!!!!!!!!!!! //Casino job specials!!!!!!!!!!!! if($mj['my_job'] == '3') { $needed_rank = array(9=>16,10=>19); $points = "casino|" . $mj['casipoints']; $points = explode("|", $points); if($needed_rank[$_POST['ID']] > $mj['my_job_rank']) { echo "Error, You have not earnt this job special yet!"; } else { //Casino job special 1 if($_POST['ID'] == '9') { if(!$_POST['use']) { echo "
Below you can swap 1,000 ".$points[0]." points for 25 ".$points[0]." tokens
You have ".number_format($points[1])." ".$points[0]." points
"; } else { $_POST['amount'] = abs(intval($_POST['amount'])); if($mj['casipoints'] < 1000) { echo "Error, You dont have enough casino points!"; } else { if(!$_POST['confirm']) { echo "
Are you sure you wish to swap 1,000 ".$points[0]." points for 25 casino tokens?
"; } else { $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `casipoints` = `casipoints` - '1000', `my_ctokens` = `my_ctokens` + '25' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); echo "You have swapped 1,000 ".$points[0]." points for 25 casino tokens!"; } } } } //Casino job special 1 //Casino job special 2 if($_POST['ID'] == '10') { if(!$_POST['use']) { echo "
Below you can swap 100 ".$points[0]." points for cash
You have ".number_format($points[1])." ".$points[0]." points
The amount you gain is random!
"; } else { if($mj['casipoints'] < 100) { echo "Error, You dont have enough casino points!"; } else { if(!$_POST['confirm']) { echo "
Are you sure you wish to swap 100 ".$points[0]." points for cash?
"; } else { $gain = rand(800,6000); $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `casipoints` = `casipoints` - '100' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); $q_ry = array(); $q_ry = "UPDATE `members` SET `wallet` = `wallet` + '".mysql_real_escape_string($gain)."' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); echo "You walk in the casino office.
You see a box of chips.
You cash them in at the cashing in booth.
You manage to gain a ".money_alter($gain)."!"; } } } } //Casino job special 2 } } //Casino job specials!!!!!!!!!!!! //Medical job specials!!!!!!!!!!!! if($mj['my_job'] == '4') { $needed_rank = array(11=>22,12=>21,13=>23,14=>24,15=>28); $points = "medical|" . $mj['medipoints']; $points = explode("|", $points); if($needed_rank[$_POST['ID']] > $mj['my_job_rank']) { echo "Error, You have not earnt this job special yet!"; } else { //Medical job special 1 if($_POST['ID'] == '11') { if(!$_POST['use']) { echo "
Below you can swap 1,000 ".$points[0]." points for +1 life
You have ".number_format($points[1])." ".$points[0]." points
"; } else { if($mj['medipoints'] < 1000) { echo "Error, You dont have enough medical points!"; } else { if(!$_POST['confirm']) { echo "
Are you sure you wish to swap ".number_format(1000)." ".$points[0]." points for +1 life?
"; } else { $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `medipoints` = `medipoints` - '1000' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); $q_ry = array(); $q_ry = "UPDATE `members` SET `my_maxlife` = `my_maxlife` + '1' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); echo "You have swapped ".number_format(1000)." ".$points[0]." points for +1 life!"; } } } } //Medical job special 1 //Medical job special 2 if($_POST['ID'] == '12') { if(!$_POST['use']) { echo "
Below you can swap 2,000 ".$points[0]." points for a small first aid kit
You have ".number_format($points[1])." ".$points[0]." points
"; } else { if($mj['medipoints'] < 2000) { echo "Error, You dont have enough medical points!"; } else { if(!$_POST['confirm']) { echo "
Are you sure you wish to swap ".number_format(2000)." ".$points[0]." points for a small first aid kit?
"; } else { $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `medipoints` = `medipoints` - '2000' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); i_credit($_SESSION['playerid'], 17, 1); echo "You have swapped ".number_format(2000)." ".$points[0]." points for a small first aid kit!"; } } } } //Medical job special 2 //Medical job special 3 if($_POST['ID'] == '13') { if(!$_POST['use']) { echo "
Below you can swap 4,000 ".$points[0]." points for a first aid kit
You have ".number_format($points[1])." ".$points[0]." points
"; } else { if($mj['medipoints'] < 4000) { echo "Error, You dont have enough medical points!"; } else { if(!$_POST['confirm']) { echo "
Are you sure you wish to swap ".number_format(4000)." ".$points[0]." points for a first aid kit?
"; } else { $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `medipoints` = `medipoints` - '4000' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); i_credit($_SESSION['playerid'], 29, 1); echo "You have swapped ".number_format(4000)." ".$points[0]." points for a first aid kit!"; } } } } //Medical job special 3 //Medical job special 4 if($_POST['ID'] == '14') { if(!$_POST['use']) { echo "
Below you can swap 7,500 ".$points[0]." points for a morphine
You have ".number_format($points[1])." ".$points[0]." points
"; } else { if($mj['medipoints'] < 7500) { echo "Error, You dont have enough medical points!"; } else { if(!$_POST['confirm']) { echo "
Are you sure you wish to swap ".number_format(7500)." ".$points[0]." points for a morphine?
"; } else { $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `medipoints` = `medipoints` - '7500' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); i_credit($_SESSION['playerid'], 8, 1); echo "You have swapped ".number_format(7500)." ".$points[0]." points for a morphine!"; } } } } //Medical job special 4 } } //Medical job specials!!!!!!!!!!!! //Education job specials!!!!!!!!!!!! if($mj['my_job'] == '5') { $points = "education|" . $mj['educpoints']; $points = explode("|", $points); if(29 > $mj['my_job_rank']) { echo "Error, You have not earnt this job special yet!"; } else { //Education job special 1 if($_POST['ID'] == '16') { if(!$_POST['use']) { echo "
Below you can swap 10,000 ".$points[0]." points for +100 intelligence
You have ".number_format($points[1])." ".$points[0]." points
"; } else { if($mj['educpoints'] < 10000) { echo "Error, You dont have enough education points!"; } else { if(!$_POST['confirm']) { echo "
Are you sure you wish to swap ".number_format(10000)." ".$points[0]." points for +100 intelligence?
"; } else { $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `educpoints` = `educpoints` - '10000' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); $q_ry = array(); $q_ry = "UPDATE `memberstats` SET `my_intelligence` = `my_intelligence` + '100' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); echo "You have swapped ".number_format(10000)." ".$points[0]." points for +100 intelligence!"; } } } } //Education job special 1 } } //Education job specials!!!!!!!!!!!! //Law job specials!!!!!!!!!!!! if($mj['my_job'] == '6') { $points = "law|" . $mj['lawpoints']; $points = explode("|", $points); if(36 > $mj['my_job_rank']) { echo "Error, You have not earnt this job special yet!"; } else { //Law job special 1 if($_POST['ID'] == '17') { if(!$_POST['use']) { echo "
Below you can swap 10,000 ".$points[0]." points for +100 endurance
You have ".number_format($points[1])." ".$points[0]." points
"; } else { if($mj['lawpoints'] < 10000) { echo "Error, You dont have enough law points!"; } else { if(!$_POST['confirm']) { echo "
Are you sure you wish to swap ".number_format(10000)." ".$points[0]." points for +100 endurance?
"; } else { $q_ry = array(); $q_ry = "UPDATE `members_extra` SET `lawpoints` = `lawpoints` - '10000' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); $q_ry = array(); $q_ry = "UPDATE `memberstats` SET `my_endurance` = `my_endurance` + '100' WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; mysql_query($q_ry); echo "You have swapped ".number_format(10000)." ".$points[0]." points for +100 endurance!"; } } } } //Law job special 1 } } //Law job specials!!!!!!!!!!!! } } } echo "
>Back
"; } include('./includes/style_bottom.php'); ?>