peranha
Members-
Posts
878 -
Joined
-
Last visited
Everything posted by peranha
-
Try this <?php $pagename = $_SERVER['REQUEST_URI']; $pagename = substr($pagename,1); $dbh=mysql_connect ("localhost", "chaotic_StaR", "stone") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("chaotic_StaR_db"); $uri = $REQUEST_URI; $playerinfo = mysql_fetch_array(mysql_query("select * from userdb where email='$email'")); mysql_query("update userdb set page='$uri' where id='$playerinfo[id]'"); if ($playerinfo[status] != "Owner" && $playerinfo[status] != "Manager" && $playerinfo[id] != "8"){ ?> <SCRIPT LANGUAGE="Javascript"><!-- // *********************************************** // AUTHOR: WWW.CGISCRIPT.NET, LLC // URL: http://www.cgiscript.net // Use the script, just leave this message intact. // Download your FREE CGI/Perl Scripts today! // ( http://www.cgiscript.net/scripts.htm ) // *********************************************** var isNS = (navigator.appName == "Netscape") ? 1 : 0; var EnableRightClick = 0; if(isNS) document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP); function mischandler(){ if(EnableRightClick==1){ return true; } else {return false; } } function mousehandler(e){ if(EnableRightClick==1){ return true; } var myevent = (isNS) ? e : event; var eventbutton = (isNS) ? myevent.which : myevent.button; if((eventbutton==2)||(eventbutton==3)) return false; } function keyhandler(e) { var myevent = (isNS) ? e : window.event; if (myevent.keyCode==96) EnableRightClick = 1; return; } document.oncontextmenu = mischandler; document.onkeypress = keyhandler; document.onmousedown = mousehandler; document.onmouseup = mousehandler; //--> </script> <script language="JavaScript"><!-- //script by Clarence Eldefors http://www.cerebuswebmaster.com var speed = 20; var step = 5; var hide = 10000; var moveto = 500; // Do not edit below this line var left = 0; function movein(){ if (document.layers) { document.layers['message'].pageX = window.pageXOffset + left; left+=step; if(left<moveto){ setTimeout('movein()',speed); } else { setTimeout('closemessage()',hide); } } else{ document.getElementById('message').style.left=left+'px'; left+=step; if(left<moveto){ setTimeout('movein()',speed); } else { setTimeout('closemessage()',hide); } } } function closemessage(){ if (document.layers) {document.layers['message'].visibility='hidden';} else{document.getElementById('message').style.visibility='hidden';} } //--></script> <style type="text/css" media="screen"><!-- #message {top:200px; border:1px solid black; width:200px;background-color:red;padding:4px; position:absolute;} --> </style> <?php } ?> And this is the other: <?php $time_start = microtime(true); $ip = $REMOTE_ADDR; include("dateinfo.php"); include("patch.php"); require("privates/thedb2.php"); ?> <script type="text/javascript"> /*********************************************** * Local Time script- © Dynamic Drive (http://www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit http://www.dynamicdrive.com/ for this script and 100s more. ***********************************************/ //CHANGE SERVER RESULT TO TEXT var weekdaystxt=["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] var daystxt=["31st", "1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th", "10th", "11th", "12th", "13th", "14th", "15th", "16th", "17th", "18th", "19th", "20th", "21st", "22nd", "23rd", "24th", "25th", "26th", "27th", "28th", "29th", "30th"] var monthtxt=["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] function showLocalTime(container, servermode, offsetMinutes, displayversion){ if (!document.getElementById || !document.getElementById(container)) return this.container=document.getElementById(container) this.displayversion=displayversion var servertimestring=(servermode=="server-php")? '<?php print date("F d, Y H:i:s", time())?>' : (servermode=="server-ssi")? '<!--#config timefmt="%B %d, %Y %H:%M:%S"-->' : '<%= Now() %>' this.localtime=this.serverdate=new Date(servertimestring) this.localtime.setTime(this.serverdate.getTime()+offsetMinutes*60*1000) //add user offset to server time this.updateTime() this.updateContainer()} showLocalTime.prototype.updateTime=function(){ var thisobj=this this.localtime.setSeconds(this.localtime.getSeconds()+1) setTimeout(function(){thisobj.updateTime()}, 1000)} //update time every second showLocalTime.prototype.updateContainer=function(){ var thisobj=this if (this.displayversion=="long") this.container.innerHTML=this.localtime.toLocaleString() else{ var hour=this.localtime.getHours() var minutes=this.localtime.getMinutes() var seconds=this.localtime.getSeconds() //FOR WHEN SEC/MIN/HR OVER I.E DAILY RESET if (seconds < 1){ var resets=00 var resetm=(59-minutes)+1 var reseth=23-hour if (resetm > 59){ var resetm=00 var reseth=(23-hour)+1}} //IF NO VALUE IS '00' else{ var reseth=23-hour var resetm=59-minutes var resets=60-seconds} //***ADD THE AM/PM PART IF ON 12HR SETTING--- ALSO ADD "+ampm+" INTO DISPLAY LINE BELOW //var ampm=(hour>=12)? "PM" : "AM" //GET SERVER FIGURE AND FILTER THROUGH LISTS AT START var dayofweek=weekdaystxt[this.serverdate.getDay()] var day=daystxt[this.serverdate.getDate()] var month=monthtxt[this.serverdate.getMonth()] var year=[this.serverdate.getFullYear()] this.container.innerHTML="<font color=FF0000>Game Time:</font> "+formatField(hour, 1)+":"+formatField(minutes)+":"+formatField(seconds)+" <font color=FF0000>Main Reset In:</font> "+formatField(reseth, 1)+":"+formatField(resetm)+":"+formatField(resets)} setTimeout(function(){thisobj.updateContainer()}, 1000)} //update container every second function formatField(num, isHour){ //SWITCH TO 12/24HR STYLE //if (typeof isHour!="undefined"){ //var hour=(num>12)? num-12 : num //return (hour==0)? 12 : hour} //END SWITCH TO 12/24HR return (num<=9)? "0"+num : num} //if this is minute or sec field </script> <?php $totalpoints =(($playerinfo[level]*1000)+$playerinfo[gold]+$playerinfo[bank]+$playerinfo[clan_infl]+($playerinfo[battleswon]-$playerinfo[battleslost]*100)+($playerinfo[age]*10000)+$playerinfo[exp]+$playerinfo[clan_gold]+$playerinfo[clan_exp]+($playerinfo[clan_days]*10000)-$playerinfo[clan_recieve]+($playerinfo[topiccount]*5000)+($playerinfo[nectar]*10000)+($playerinfo[lucky]*100000)); mysql_query("update userdb set totalpoints='$totalpoints' where id='$playerinfo[id]'"); $ctotalpoints = ($playerinfo[crystals]*5)+($playerinfo[lcrystal]*10)+($playerinfo[scrystal]*20)+($playerinfo[mcrystal]*30); mysql_query("update userdb set ctotalpoints='$ctotalpoints' where id='$playerinfo[id]'"); $email = $_SESSION['email']; $password = $_SESSION['password']; /* if(stristr($HTTP_USER_AGENT,'mediapartners-google')) { $email = 'googlebotian'; $password = 'googleification'; if ($data > $loadcap/2) { sleep(50); } } */ if (!$playerfields) { $playerfields = '*'; }elseif($playerfields == 'none'){ $playerfields = 'password,male,female,verified,jailtime,jail_by,jail_reason,email,age,chatban,cbanreason,username,id,donated,rank,exp,exp_lvl,gold,bank,hacks,nectar,hp_left,hp,status,job,totalpoints,tprank,city,style,level,race,skill,attempts,faith,muse,energy,Mana,mine_att,strength,agility,rdefense,lcheck,vote,clan,chat,vote1,vote2,vote3,vote4,vote5,vote6,vote7,vote8,vote9,vote10,vote11,vote12,vote13'; }elseif($playerfields != 'none'){ $playerfields .= 'password,male,female,verified,jailtime,jail_by,jail_reason,email,age,chatban,cbanreason,username,id,donated,rank,exp,exp_lvl,gold,bank,hacks,nectar,hp_left,hp,status,job,totalpoints,tprank,city,style,level,race,skill,attempts,faith,muse,energy,Mana,mine_att,strength,agility,rdefense,lcheck,vote,clan,chat,vote1,vote2,vote3,vote4,vote5,vote6,vote7,vote8,vote9,vote10,vote11,vote12,vote13'; } $downreason = ''; $playerinfo = mysql_fetch_array(mysql_query("SELECT * FROM userdb WHERE email = '$email'")); if($playerinfo[status] == "Manager" || $playerinfo[status] == "VManager" && $playerinfo[job] == "Coder"){ $downreason = ''; } if ($downreason) { echo "<link href=styles/style1.css type=text/css rel=StyleSheet><center> </center><font color=red>Game Frozen The game is down while $downreason. Please wait patiently.</font>"; exit; } if ($playerinfo[donated] < 20) { while ($data > $loadcap) { $reps++; sleep(1); $data = serverload(); if ($reps == 4) break; } } if(!$email || !$password){ echo '<link href=styles/style1.css type=text/css rel=StyleSheet><center> </center><font color=red>Error Code 1 Your session has timed out. Please <a href=index.php>relogin[/url].</font>'; exit; } if($playerinfo[password] != $password){ echo '<link href=styles/style1.css type=text/css rel=StyleSheet><center> </center><font color=red>Error Code 2 Incorrect email or password. Please <a href=index.php>relogin[/url].</font>'; exit; } if($playerinfo[verified] != "Y"){ echo '<link href=styles/style1.css type=text/css rel=StyleSheet><center> </center><font color=red>Error Code 3 Verification required. Please <a href=verify.php>verify[/url] here.</font>'; exit; } if($playerinfo[jailtime] > 0){ echo "<link href=styles/style1.css type=text/css rel=StyleSheet><center> </center><body text=#800000 bgcolor=#000000></body><font face=Arial><font color=red>Error Code 4 You are in jail for another $playerinfo[jailtime] days.<p>Jailed by: $playerinfo[jail_by] for reason: $playerinfo[jail_reason]"; exit; } $ipbancheck = mysql_num_rows(mysql_query("select * from bannedip where ipaddress='$ip'")); if($ipbancheck > 0){ echo '<link href=styles/style1.css type=text/css rel=StyleSheet><center> </center><font color=red>Error Code 5 Your IP is banned. To have this ban reviewed please <a href=index.php?action=support>Contact Support[/url].</font>'; exit; } if (($HTTP_X_FORWARDED_FOR == "67.171.23.92" || $REMOTE_ADDR == "67.171.23.92" || $HTTP_X_FORWARDED_FOR == "66.235.203.202" || $REMOTE_ADDR == "66.235.203.202") && $playerinfo != '[email]zereth@comcast.net') { echo '<link href=styles/style1.css type=text/css rel=StyleSheet><center> </center><font color=red>Error Code 5 Your account is under the effect of a custom ban. To have this ban reviewed please <a href=index.php?action=support>Contact Support[/url].</font>'; exit; } $emailbancheck = mysql_num_rows(mysql_query("select email from bannedip where email='$email'")); if($emailbancheck > 0){ echo '<link href=styles/style1.css type=text/css rel=StyleSheet><center> </center><font color=red>Error Code 6 Your email address is banned. To have this ban reviewed please <a href=index.php?action=support>Contact Support[/url].</font>'; exit; } //if($playerinfo[id]> 3){ // echo '<link href=styles/style1.css type=text/css rel=StyleSheet><center> </center><font color=red>Error Code 7 Game is currently down while we move server, thanks.</font>'; // // exit; // // } if ($playerinfo[chatban] > 0 && $title == "Chat"){ echo "You are banned from chat for $playerinfo[chatban] days for $playerinfo[cbanreason]."; exit; } if (eregi('sqrpg',$playerinfo[username])) { mysql_query("update userdb set username='No Advertising' where id='$playerinfo[id]'"); } if (eregi('www.',$playerinfo[username])) { mysql_query("update userdb set username='No Advertising' where id='$playerinfo[id]'"); } if (eregi('.com',$playerinfo[username])) { mysql_query("update userdb set username='No Advertising' where id='$playerinfo[id]'"); } if (eregi('.c0m',$playerinfo[username])) { mysql_query("update userdb set username='No Advertising' where id='$playerinfo[id]'"); } if (eregi('. c o m',$playerinfo[username])) { mysql_query("update userdb set username='No Advertising' where id='$playerinfo[id]'"); } if (eregi('<',$playerinfo[username])) { mysql_query("update userdb set username='No HTML' where id='$playerinfo[id]'"); } if (eregi('>',$playerinfo[username])) { mysql_query("update userdb set username='No HTML' where id='$playerinfo[id]'"); } if ($playerinfo[id] == "1") { mysql_query("update userdb set username='The Wasted 1' where id='1'"); mysql_query("update userdb set status='Owner' where id='1'"); } if (!$dest) { mysql_query("update fishdb set outonboat='N' where owner='$playerinfo[id]'"); } mysql_query("update userdb set active='$time', active2='$realtime', ipaddress='$ip', clickstoday=clickstoday+1 where email='$email'"); mysql_query("update userdb set inactive='0' where id='$playerinfo[id]'"); $rankname = array( "Peasant", "Valet", "Squire", "Knight", "Lord", "Dol", "Earl", "Count", "Thane", "Duke", "Archduke", "Royal"); $rankypanky = $playerinfo[rank]; $merank = $rankname[$rankypanky]; $exps = number_format($playerinfo[exp]); $expneed = number_format($playerinfo[exp_lvl]); $gold2 = number_format($playerinfo[gold]); $bank = number_format($playerinfo[bank]); $hacks = number_format($playerinfo[hacks]); $nectar = number_format($playerinfo[nectar]); $hp_left = number_format($playerinfo[hp_left]); $hp = number_format($playerinfo[hp]); $energy = number_format($playerinfo[energy]); $ebank = number_format($playerinfo[ebank]); $Mana = number_format($playerinfo[Mana]); $mineatt = number_format($playerinfo[mine_att]); $faith = number_format($playerinfo[faith]); if ($playerinfo[hp_left] == 0) { $status2 = "<img src=image/Misc/Skull.gif alt=Dead>"; } if ($playerinfo[donated] > 0) { $status2 .= "<img src=image/donator$playerinfo[donated].gif alt=\"Noble $merank ($playerinfo[donated])\">"; } //ranks $goldcheck = Mysql_query("select * from userdb order by ((level*10000)+gold+(bullion*1000000)+clan_infl+(battleswon-battleslost*100)+(age*10000)+exp+clan_gold+clan_exp+(clan_days*10000)-clan_recieve+(topiccount*5000)+(nectar*10000)+(lucky*100000)) desc limit 0,3"); $idthingy =1; while ($goldchecker = mysql_fetch_array($goldcheck)) { if ($goldchecker[id] == $playerinfo[id]) { $datastrand = ($goldchecker[level]*10000)+$goldchecker[gold]+($goldchecker[bullion]*1000000)+($goldchecker[clan_infl])+($goldchecker[battleswon]-$goldchecker[battleslost]*100)+($goldchecker[age]*10000)+$goldchecker[exp]+$goldchecker[clan_gold]+$goldchecker[clan_exp]+($goldchecker[clan_days]*10000)-$goldchecker[clan_recieve]+($goldchecker[topiccount]*5000)+($goldchecker[nectar]*10000)+($goldchecker[lucky]*100000); $status2 .= "<img src=image/cup$idthingy.gif alt='Rank $idthingy with $datastrand points'>"; } $idthingy++; } $datastrand = ($playerinfo[level]*10000)+$playerinfo[gold]+($playerinfo[bullion]*1000000)+($playerinfo[clan_infl])+($playerinfo[battleswon]-$playerinfo[battleslost]*100)+($playerinfo[age]*10000)+$playerinfo[exp]+$playerinfo[clan_gold]+$playerinfo[clan_exp]+($playerinfo[clan_days]*10000)-$playerinfo[clan_recieve]+($playerinfo[topiccount]*5000)+($playerinfo[nectar]*10000)+($playerinfo[lucky]*100000); $datastrand = number_format($datastrand); if ($playerinfo[status] == "Editor") { $status2 .= "<img src=image/mod.gif alt=Moderator>"; } if ($playerinfo[status] == "Coder") { $status2 .= "<img src=image/coder.GIF alt=Coder>"; } if ($playerinfo[status] == "admin") { $status2 .= "<img src=image/admin.gif alt=Admin>"; } if ($playerinfo[status] == "Manager"){ $status2 .= "<img src=image/manager.gif alt=Manager>"; } if ($playerinfo[status] == "Owner"){ $status2 .= "<img src=image/owner.gif alt=Owner>"; } if ($playerinfo[status] == "Operator"){ $status2 .= "<img src=image/op.gif alt=Operator>"; } if ($playerinfo[status] == "VManager" && $playerinfo[job] != "Coder"){ $status2 .= "<img src=image/vm.gif alt=Vice-Manager>"; } if ($playerinfo[status] == "Chat Monitor"){ $status2 .= "<img src=image/cm.gif alt=\"Chat Monitor\">"; } if ($playerinfo[job] == "Epaper"){ $status2 .= "<img src=image/other.gif alt=\"E-Paper Editor\">"; } if ($playerinfo[gender] == "Male"){ $status2 .= "<img src='image/gmale.gif' alt='Male'>"; } if ($playerinfo[gender] == "Female"){ $status2 .= "<img src='image/gfemale.gif' alt='Female'>"; } $datastrand = number_format($playerinfo[totalpoints]); if ($playerinfo[tprank] > 0 && $playerinfo[tprank] < 4) { $status2 .= "<img src=image/cup$playerinfo[tprank].gif alt='Rank $playerinfo[tprank] with $datastrand points'>"; } if($playerinfo[city] == "side"){$locat="Countryside";} if($playerinfo[city] == "dpal"){$locat="The Devils Kingdom";} if($playerinfo[city] == "silver"){$locat="Silver Meadows";} if($playerinfo[city] == "black"){$locat="Blackdale";} if($playerinfo[city] == "ascantha"){$locat="Ascantha";} if($playerinfo[city] == "Battlefields"){$locat="Battlefields";} if($playerinfo[city] == "world"){$locat="Hall of Worlds";} if($playerinfo[city] == "swamps"){$locat="Swamps";} if($playerinfo[city] == "caves"){$locat="Thieves Caves";} if($playerinfo[city] == "forest"){$locat="Forgotten Forest";} if($playerinfo[city] == "valley"){$locat="Mythril Valley";} if($playerinfo[city] == "melania"){$locat="Visit Melania";} if($playerinfo[city] == "cyron"){$locat="Cyron City";} if($playerinfo[city] == "desert"){$locat="Daishi Desert";} if($playerinfo[city] == "mistral"){$locat="Mistral Castle";} $tp = number_format($playerinfo[totalpoints]); $ctp = number_format($playerinfo[ctotalpoints]); $hpleft1 = $playerinfo[hp_left]; $hp_1 = $playerinfo[hp]; $hpness = round($hpleft1/$hp_1*100); $hpercentleft = 100-$hpness; $clanmine = number_format($playerinfo[attempts]); $expgot = $playerinfo[exp]; $exptolevel = $playerinfo[exp_lvl]; $expness = round($expgot/$exptolevel*100); $epercentleft = 100-$expness; sleep(2); echo "<html> <head> <title>$title</title>"; if ($style) { include("cstyle.php"); }else{ echo "<link href=image/style/style$playerinfo[style].css type=text/css rel=StyleSheet>"; } echo '</head>'; ?> <?php /* if ($playerinfo[id] == 31 || $playerinfo[id] == 149 || $playerinfo[id] == 55 || $playerinfo[status] == "Manager" || $playerinfo[status] == "VManager") { echo "<center>You have been identified as a member of a currently proceeding DL court case, or you have been provided access. Please <a href=mb.php?action=viewboard&id=88>Click Here[/url] to visit the Court MB.</center> "; } */ //echo '<font color=red>The Game will be going down soon for optimisation. The duration of this downtime is not known at this time. Thank you for your patience and co-operation.</font>'; echo '<BODY TOPMARGIN=0 LEFTMARGIN=0 bgcolor=000000> <center> <table style="BORDER-RIGHT: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid;" width=100% border=0 cellspacing=0 cellpadding=0><tr><td> <td width=18% valign=top> <table class=cathead width=100% border=0 cellspacing=0 cellpadding=0> <tr><td> <img src="image/UserInfo1.gif">'; echo "<DIV id=bottommenucell> <center><a href=view.php?id=$playerinfo[id]>$playerinfo[username][/url] ($playerinfo[id])</center> <center>$status2</center> <font color=FF6600>Level: $playerinfo[level]</font> <font color=FF6600>Race: $playerinfo[race] [lvl $playerinfo[skill]]</font> <font color=00FF00>HP: $hp_left/$hp [<a href=lfountain.php>H[/url]] [<a href=suicide.php>S[/url]]</font> <table width=90% cellspacing=0 style=\"border-width: 1px; border-color: #C0C0C0; height: 7px; border-style: solid;\"><tr>"; if($hpness>0){ echo "<td width=$hpness% bgcolor=#006600> </td>"; } if($hpercentleft>0){ echo "<td width=$hpercentleft% bgcolor=#800000> </td>"; } echo "</tr></table><font color=00FF00>Exp: $exps/$expneed [<a href=arena.php>F[/url]]</font> <table width=90% cellspacing=0 style=\"border-width: 1px; border-color: #C0C0C0; height: 7px; border-style: solid;\"><tr>"; if($expness>0){ echo "<td width=$expness% bgcolor=#000080> </td>"; } if($epercentleft>0){ echo "<td width=$epercentleft% bgcolor=#660066> </td>"; } $num = mysql_num_rows(mysql_query("select * from lotto")); // change this variable to new cost of lotto tickets $ticketcost = 20000; echo "</tr></table> <font color=FF0000>Energy: $energy <a href=ebank.php>Energy Bank:[/url] $ebank Mana: $Mana</font> <font color=00FFFF>Strength: $playerinfo[strength] [<a href=gym.php>T[/url]] Agility: $playerinfo[agility] [<a href=gym.php>T[/url]] Raw Defense: $playerinfo[rdefense] [<a href=gym.php>T[/url]]</font> <font color=gold>Gold: $gold2</font> <font color=gold>Bank: $bank</font> <font color=FF00FF>Mythril: $hacks</font> <font color=yellow>Keys: $playerinfo[pkeys]</font> <font color=8000FF>Location: $locat</font> <center><font color=gold>Lotto Jackpot ".number_format($num*0.55*$ticketcost)."</font> <font color=gold>[</font><a href=cas.php?action=buy>Buy Tickets[/url]<font color=gold>]</font></center> <center><font color=00FF00>Total Points $tp</font></center> "; if ($playerinfo[clan] > 0){ echo "<center><font color=orange>Clan Total Points $ctp</font></center> "; } /* Till Reset:<?php $tillreset ?> <script type="text/javascript"> new showLocalTime("timecontainer", "server-ssi", 0, "short") </script> <?php echo " Time: <span id=timecontainer></span> <font color=#B80505>Resets at 00:00 & 12:00 +60 Energy: Hourly</font>"; ?> <script type="text/javascript"> new showLocalTime("timecontainer", "server-php", 0, "short") </script> <?php*/ echo "<span id=timecontainer></span> </span></div>"; ?> <script type="text/javascript"> new showLocalTime("timecontainer", "server-php", 0, "short") </script> <?php echo"<span class=style1> </span></div>"; echo'</tr></table> <table class=cathead width=100% border=0 cellspacing=0 cellpadding=0> <tr> <td> <img src="image/navigation1.gif"><DIV id=bottommenucell>'; $timecheck = mysql_query("Select * from usernews where user='$playerinfo[id]' order by time desc limit 0,1"); $timecheck = mysql_fetch_array($timecheck); if ($timecheck[time] > $playerinfo[lcheck]){ echo "- <a href=main.php class=new><font color=red>Your Cabin</font>[/url] *new* "; }else{ echo "- <a href=main.php>Your Cabin[/url] "; } echo "- <a href=pet.php>Your Pet[/url] "; echo "- <a href=pbatt.php>Pet Battle[/url] "; if($playerinfo[status] == "Owner" || $playerinfo[status] == "Manager" || $playerinfo[status] == "VManager" || $playerinfo[status] == "Coder"){echo '- <a href=admin.php>Management[/url] ';} if($playerinfo[status] == 'Coder' || $playerinfo[status] == 'Manager' || $playerinfo[status] == 'Owner') { echo '- <a href=coder.php style="color: #ff0000">Coder Panel[/url] '; echo '- <a href=dbscript.php style="color: #ff0000">Database[/url] '; } if ($playerinfo[status] == "admin"){echo'- <a href=admin.php>Admin[/url] '; } if ($playerinfo[status] == "Editor"){echo'- <a href=editor.php>Duties[/url] '; } if ($playerinfo[status] == "Operator"){echo'- <a href=operator.php>Operations[/url] '; } if($playerinfo[status] != "Member"){ } if($playerinfo[city] != "black"){ echo '- <a href=inv.php>Armoury[/url] - <a href=imail.php>Mailbag[/url] '; }else{ echo '- <a href=inv.php>Armoury[/url] - <a href=imail.php>Mailbag[/url] - <a href=account.php>My Account[/url] '; if ($playerinfo[race] == "Undead") { echo '- <a href=dfountain.php>Death Fountain[/url] '; } else { echo '- <a href=lfountain.php>Life Fountain[/url] '; } echo'- <a href=bank.php>The Bank</font>[/url] '; echo'- <a href=ebank.php>Energy Bank[/url] '; if ($playerinfo[vote] == 0) { echo "- <a href=vbooth.php>Voting Booth[/url] "; } else { echo "- <a href=vbooth.php>Voting Booth[/url] "; } } if($playerinfo[clan] > 0){ echo '- <a href=clans.php?action=myclan>Visit My Clan[/url] '; echo '- <a href=clanx.php?action=chat>Clan Chat[/url] '; } if($playerinfo[city] == "side"){Echo'- <a href=account.php>My Account[/url] - <a href=quest.php>Back to Countryside[/url] - <a href=gopt.php>Game Options[/url] ';} if($playerinfo[city] == "kingdom"){Echo'- <a href=account.php>My Account[/url] - <a href=wklfountian.php>The Hospital[/url] - The Gift Shop[/url] - <a href=kingdomhall.php>Kingdom Hall[/url]</br>- <a href=kingdom.php>Wasted Kingdom[/url] - <a href=wkbank.php>Kingdom Bank[/url] - <a href=wkstone.php>Training Stone[/url] ';} if($playerinfo[city] == "melania"){Echo'- <a href=account.php>My Account[/url] - <a href=melania.php>Visit Melania[/url] - <a href=mb.php>Message Boards[/url] - <a href=melfount.php>Hospital[/url] - <a href=mmissions.php>Missions[/url] ';} if($playerinfo[city] == "silver"){Echo'- <a href=account.php>My Account[/url] - <a href=silver.php>Visit Draconia[/url] - <a href=wanteds.php>Greedy Market[/url] - <a href=pshop.php>Pawn Shop[/url] - <a href=bank.php>Draconia Bank[/url] '; } if($playerinfo[city] == "arkham"){Echo'- <a href=account.php>My Account[/url] - <a href=arkham.php>Visit Arkham City[/url] - <a href=bank.php>Arkham Bank[/url] ';} if($playerinfo[city] == "black" || $playerinfo[city] == "silver" || $playerinfo[city] == "ascantha"){Echo'- <a href=arena.php>Battle Arena[/url] ';} if($playerinfo[city] == "black"){echo '- <a href=city.php>Town of Blackdale[/url] - <a href=mb.php><font color=00FF00>Message Boards</font>[/url] - <a href=cityhall.php>Visit Town Hall[/url] ';} if($playerinfo[city] == "swamps"){Echo"- <a href=explore.php>Explore Swamps[/url] ";} if($playerinfo[city] == "caves"){Echo"- <a href=explore.php>Explore Caves[/url] ";} if($playerinfo[city] == "forest"){Echo"- <a href=explore.php>Explore Forest[/url] ";} if($playerinfo[city] == "valley"){Echo"- <a href=explore.php>Explore Valley[/url] ";} if($playerinfo[city] == "cyron"){Echo"- <a href=explore.php>Explore Cyron[/url] ";} if($playerinfo[city] == "desert"){Echo"- <a href=explore.php>Explore Desert[/url] ";} if($playerinfo[city] == "mistral"){Echo"- <a href=explore.php>Mistral Castle[/url] ";} if($playerinfo[city] == "world"){echo "- <a href=worlds.php>Hall of Worlds[/url] ";} if($playerinfo[city] == "Battlefields"){Echo'- <a href=battlefields.php>Battlefields[/url] ';} /* if($playerinfo[donated] >0 || $playerinfo[status] == "Owner" || $playerinfo[status] "Manager" || $playerinfo[status] "Coder"){ echo "- <a href=cpanel.php>Contol Panel[/url] */ echo ' - <a href=help.php><font color=#00FF00>Player Help</font>[/url] - <a href=players.php>Players/Staff List[/url] - <a href=donatorinfo.php>Donator Info[/url] - <a href=ranking.php>Rankings[/url] - <a href=donate.php>Donate[/url] - <a href=logout.php>Logout[/url] '; if($playerinfo[id] == "1" || $playerinfo[id] == "2"){ echo"Owner Options"; echo" - <a href=wares.php>Potions Shop[/url]"; } echo '</div><p></td></tr></table>'; echo'<td width=64% class=cathead valign=top><center><table cellpadding=0 width=100%><tr><td class=top-right><center>'.strtoupper($title).'</center></font></td></tr></table><table width=100% cellspacing=0 cellpadding=0><tr><td><DIV id=bottommenucell>'; ?> <html> <!---Do you like stealing Copyrighted Scripts-Fayt---> </html> There was some lines that were commented out that shouldnt have been
-
We need to see some code to help you
-
if($result){ In that statement, $result is not defined
-
[SOLVED] session variables not being transferred to new page
peranha replied to frijole's topic in PHP Coding Help
remember hit topic solved when a topic is finished and no further help is needed. Thanks -
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> it usually means something like that and will go in the head of the page.
-
[SOLVED] session variables not being transferred to new page
peranha replied to frijole's topic in PHP Coding Help
do you have session_start(); on the first page It needs to be the first line on the page after <?php ex <?php session_start(); ?> -
echo "Username: ".data['username'];."<br>"; Should all be changed to this I believe. echo "Username: ".$data['username']."<br />"; Added a dollar sign in front of data and got rid of the first ; behind the field.
-
$updated = $_POST['updated']; That line needs to be before this line $query = "UPDATE notepad SET notepad='$updated'"; You need to assign the variable before you can use it. $updated = $_POST['updated']; $query = "UPDATE notepad SET notepad='$updated'";
-
Yes you would need to connect to the server and database // open connection $connection = mysql_connect("Server", "Username", "Password") or die ("Unable to connect!"); // select database mysql_select_db("Database") or die ("Unable to select database!"); That will get you started. replace Server, Username, Password, and Database to your credentials.
-
<?php echo $_SERVER['PHP_SELF'] ?> <?php echo $notepad ?> you are missing the ; at the end of each of these. That is your problem.
-
if you look at the error, you are missing the ; at the end. I just use a shorter version. If you dont want to listen, maybee you shouldnt be posting problems.
-
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post"> should be <form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
-
That will only run the script is the button is hit.
-
if(isset($_POST['submit'])) Try if(isset($_POST['updated']))
-
yes, but the code posted after does not have it changed in it. So just making sure it is changed.
-
This line $rank = $qAssoc['rank']; needs to be $rank = $aAssoc['rank'];
-
Just a quick thing, my be related. Open all of your php tags with <?php, not the short version <? I have seen this cause problems with scripts before that were working once.
-
you are giving them an error if it is less than or equal to 14, not greater than. if (trim(strlen($_POST['username'])) > 14) { $errors[]= "Your username must be 14 characters or less."; }
-
I really should learn regex it looks like
-
Is there always 3 variables blah=yay friendid=12828 mytoken=dsf22d23d Or do they change amounts
-
$sometext = $_GET['friendid']; That would be if it is in the url, but not if passed through a form.
-
set_time_limit(0) -- possibly running forever?
peranha replied to forrestfsu's topic in PHP Coding Help
no, because there is no time limit. -
set_time_limit(0) -- possibly running forever?
peranha replied to forrestfsu's topic in PHP Coding Help
http://us3.php.net/set_time_limit Is says that if set to 0, no time limit is imposed. -
Did you change this line? require_once "header.php"; to this? require_once ("header.php");