Search the Community
Showing results for tags 'game'.
-
Best, I am currently working on a mafia crime game. But there is something wrong with my script. I have 1 error on my news. php, and will you even error + the script here. I know that my script is messy but am still but a novice It would be great if this solved hit! And sorry for my bad English. (IM a Belgian) Here the error + script: error: Parse error: syntax error, unexpected $end in C:\xampp\htdocs\_menu_l.php on line 881 and here the script: <?php $__admin = 16; $__gmod = 8; $__fmod = 4; $__help = 2; include("./includes/_mysql_connection.php"); include("./includes/_functions.php"); include("_functies.php"); if(!isset($_SESSION['__id'])){ header("location: index.php"); } define("ID", $_SESSION['__id']); $select = mysql_query("SELECT `username`, `ip`, `lastclick`, `id` FROM `users` WHERE `id` = ".ID." LIMIT 1") or die(mysql_error()); if(mysql_num_rows($select) == 0){ header("location: index.php"); } $res = mysql_fetch_assoc($select); $naam = $res['username']; $SESSID = $_COOKIE['PHPSESSID']; $s = mysql_query("SELECT `id` FROM `sessions` WHERE `id`=".ID." AND `SESSID`='".mr($SESSID)."' LIMIT 1") or die(mysql_error()); if(mysql_num_rows($s) == 0){ $sql = mysql_query("SELECT `id` FROM `sessions` WHERE `id`=".ID." LIMIT 1") or die(mysql_error()); if(mysql_num_rows($sql) == 0){ mysql_query("INSERT INTO `sessions`(`id`, `SESSID`) VALUES (".ID.", '".mr($_COOKIE['PHPSESSID'])."')") or die(mysql_error()); } /* else { unset($_SESSION); header("location: index.php"); }*/ if(mysql_num_rows($s) > 0 AND !isset($_SESSION['logged'])) { unset($_SESSION); header("location: index.php"); } } mysql_query("UPDATE `sessions` SET `SESSID`='".$SESSID."' WHERE `id`=".ID." LIMIT 1") or die(mysql_error()); // Selecteer wat data $sql = mysql_query("SELECT `speldata`. * , `landen`.`land` , `familie`.`naam` FROM `speldata` LEFT JOIN `landen` ON ( `speldata`.`land_id` = `landen`.`id` ) LEFT JOIN `familie` ON ( `speldata`.`familie_id` = `familie`.`id` ) WHERE `speldata`.`id` =".ID." LIMIT 1 ") or die(mysql_error()); $res = mysql_fetch_assoc($sql); /* Data invullen */ if(!is_null($res['naam'])){ $hasfam = true; } else { $hasfam = false; } $sql = mysql_query("SELECT COUNT(`id`) FROM `familie` WHERE `baas_id`=".ID." LIMIT 1") or die(mysql_error()); if(mysql_result($sql, 0) == 1){ $famboss = true; } else { $famboss = false; } $sql = mysql_query("SELECT COUNT(`id`) FROM `familie` WHERE `onderbaas_id`=".ID." LIMIT 1") or die(mysql_error()); if(mysql_result($sql, 0) == 1){ $famunderboss = true; } else { $famunderboss = false; } $sql = mysql_query("SELECT COUNT(`id`) FROM `familie` WHERE `shoutboxmod`=".ID." LIMIT 1") or die(mysql_error()); if(mysql_result($sql, 0) == 1){ $shoutmod = true; } else { $shoutmod = false; } $sql = mysql_query("SELECT COUNT(`id`) FROM `familie` WHERE `onderbaas_id2`=".ID." LIMIT 1") or die(mysql_error()); if(mysql_result($sql, 0) == 1){ $famunderboss2 = true; } else { $famunderboss2 = false; } $s = mysql_query("SELECT `misdaden_s`, `misdaden_g`, `auto_s`, `auto_g`, `wapenervaring`, `hoerenpimpen`, `kracht`, `fam_overvallen`, `bombaderen`, `stem`, `route66`, `computer` FROM `usertimes` WHERE `id`=".ID) or die(mysql_error()); $r = mysql_fetch_assoc($s); $sql_sd = mysql_query("SELECT `donateur`, `status` FROM `status` WHERE `id`=".ID) or die(mysql_error()); $rs = mysql_fetch_assoc($sql_sd); $__status = $rs['status']; $__dona = $rs['donateur']; $__rank = $rs['status']; if(isset($_COOKIE['banned']) && $__status > 0){ setcookie("banned", "true", time()); mysql_query("UPDATE `status` SET `status`=1 WHERE `id`=".ID) or die(mysql_error()); mysql_query("DELETE FROM `ip_banned` WHERE `ip`='".mr($_SERVER['REMOTE_ADDR'])."'") or die(mysql_error()); mysql_query("DELETE FROM `bans` WHERE `id`=".ID) or die(mysql_error()); } $v_id = array(); $v_ip = array(); $v_reden = "Hacken"; $v_names = array(""); if(in_array(ID, $v_id) || in_array($_SERVER['REMOTE_ADDR'], $v_ip) || in_array($naam, $v_names)){ die("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html> <head> <meta http-equiv='content-type' content='text/html; charset=iso-8859-1' /> <meta name='author' content='$naam' /> <link rel='shortcut icon' href='favicon.ico'> <link rel='icon' href='favicon.ico'> <link href='styles.css' rel='stylesheet' type='text/css' /> <title>Verbannen!</title> </head> <body style='background-color: #464646; text-align: center; margin-top: 7%'> <img src='IMG/ban.jpg' alt=''> <br><br> <font size='2'> <b> Je bent verbannen! <br><br> </font> Reden:</b> ".$v_reden."<br><br> </body> </html>"); } $_s = mysql_query("SELECT COUNT(`ip`) FROM `ip_banned` WHERE `ip`='".mr($_SERVER['REMOTE_ADDR'])."'") or die(mysql_error()); if($__status == 0 || isset($_COOKIE['banned']) || mysql_result($_s, 0) >= 1){ $sql = mysql_query("SELECT `reden` FROM `bans` WHERE `id`=".ID) or die(mysql_error()); $res = mysql_fetch_assoc($sql); if(!isset($_COOKIE['banned'])){ setcookie("banned", "true", (time() + (60*60*24*200))); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv='content-type' content='text/html; charset=iso-8859-1' /> <meta name='author' content='$naam' /> <link rel='shortcut icon' href='favicon.ico'> <link rel='icon' href='favicon.ico'> <link href='styles.css' rel='stylesheet' type='text/css' /> <title>Verbannen!</title> </head> <body style='background-color: #464646; text-align: center; margin-top: 7%'> <img src="IMG/ban.jpg" alt=""> <br><br> <font size='2'> <b> Je bent verbannen! <br><br> </font> Reden:</b> <?=$res['reden'];?><br><br> </body> </html> <? die(); } /* Zet er een nieuwe tijd in, om te zien dat ie online is */ if(!isset($_COOKIE['offline']) || $__status <= 1){ mysql_query("UPDATE `users` SET `lastclick`=".time()." WHERE `id`=".ID) or die(mysql_error()); } /*$poll = mysql_query("SELECT `user_id` FROM `poll_answers` WHERE `user_id`=".ID) or die(mysql_error()); if(mysql_num_rows($poll) == 0 AND $_SERVER['REQUEST_URI'] != "/poll.php"){ header("location: poll.php"); } */ $adminpagina = array("/famshoutbox.php", "/nieuws.php"); if($_SERVER['REQUEST_URI'] == $adminpagina){ header("location: nieuws.php"); } $st = cname(ID, $naam, true); $status = $st['status']; $familie = $res['naam']; $famID = $res['familie_id']; $staatID = $res['land_id']; $staat = $res['land']; if($staatID < 1 || $staatID > 11){ mysql_query("UPDATE `speldata` SET `land_id`=1 WHERE `id`=".ID) or die(mysql_error()); } $contant = $res['cashmoney']; $bank = $res['bankmoney']; /* Aantal hoeren, eerpunten, kills */ $hoeren = $res['hoeren_straat']; $hoeren_count = $res['count_hoeren']; $eerpunten = $res['eerpunten']; $killed = $res['kills']; mysql_query("UPDATE speldata SET cashmoney='0' WHERE cashmoney<'0'"); mysql_query("UPDATE speldata SET bankmoney='0' WHERE bankmoney<'0'"); /* Rank */ $leven = $res['leven']; if($leven == 0){ if(isset($_POST['reset'])){ $newname = trim($_POST['name']); $id = getid($newname); if(!is_name($newname)){ $msg = "Je hebt ongeldige tekens in je nieuwe naam gedaan!"; } elseif($id != false && $id != ID){ $msg = "Deze naam is al bezet!"; } else { cname(ID, $newname, false, true); mysql_query("UPDATE `speldata` SET `leven`=100, `hoeren_straat`=0, `rank`=0.5, `cashmoney`=2500, `bankmoney`=10000 WHERE `id`=".ID) or die(mysql_error()); mysql_query("UPDATE `status` SET `bescherming`=0 WHERE `id`=".ID) or die(mysql_error()); mysql_query("UPDATE `users` SET registerDate=NOW(),`username`='".$newname."' WHERE `id`=".ID) or die(mysql_error()); mysql_query("UPDATE `vrienden_blokkeren` SET `who`='".$newname."' WHERE `who`=".ID) or die(mysql_error()); mysql_query("UPDATE `uitrust` SET `kogels`=10, `huizen_gehad`='', `woning`=0, `wapen`=0, `verd`=0, `vliegtuig`=0 WHERE `id`=".ID) or die(mysql_error()); mysql_query("UPDATE `userstats` SET `misdaden_s`=0, `misdaden_g`=0, `auto_s`=0, `auto_g`=0, `kracht`=0, `winst`=0, `verlies`=0, `wapenervaring`=0, `wapentraining`=0, `hacken`=0, `hack_s`=0, `program`=0, `program_s`=0, `beheer`=0, `beheer_s`=0 WHERE `id`=".ID); mysql_query("UPDATE `usertimes` SET `misdaden_s`=0, `misdaden_g`=0, `auto_s`=0, `auto_g`=0, `wapenervaring`=0, `hoerenpimpen`=0, `reizen`=0, `kracht`=0 WHERE `id`=".ID); mysql_query("DELETE FROM `hoeren_rld` WHERE `id`=".ID) or die(mysql_error()); mysql_query("DELETE FROM `hoeren_voorbereiding` WHERE `id`=".ID) or die(mysql_error()); mysql_query("DELETE FROM `gevangenis` WHERE `user_id`=".ID) or die(mysql_error()); mysql_query("DELETE FROM `garage` WHERE `user_id`=".ID) or die(mysql_error()); mysql_query("DELETE FROM `crusher_converter` WHERE `user_id`=".ID) or die(mysql_error()); mysql_query("DELETE FROM `drugs_drank` WHERE `user_id`=".ID) or die(mysql_error()); // mysql_query("UPDATE plattegrond SET owner='0',Gevangenis='0',Red_Light_District='0',Ziekenhuis='0',Casino='0' WHERE owner='".ID."'"); mysql_query("UPDATE speldata SET platte='0' WHERE id='".ID."'"); header("location: nieuws.php"); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv='content-type' content='text/html; charset=iso-8859-1' /> <meta name='author' content='$naam' /> <link rel='shortcut icon' href='favicon.ico'> <link rel='icon' href='favicon.ico'> <link href='styles.css' rel='stylesheet' type='text/css' /> </head> <body style='background-color: #303030; text-align: center; margin-top: 7%'> <form method='post' action='nieuws.php'> <img src="IMG/grave_rip.jpg" alt=""> <br><br> <font size='2'> <b> Je bent vermoord! <br><br> <?php if(isset($msg)){ echo $msg; } ?> Naam: <input type='text' name='name' value='<?=$naam;?>' maxlength='12' /><br><br> <input type='submit' name='reset' value='Opnieuw Beginnen!' /> </b> </font> </form> </body> </html> <? die(); } $rank = getRank($res['rank']); $rankID = $rank['rankID']; $gSql = mysql_query("SELECT `tijd` FROM `gevangenis` WHERE `user_id`=".ID." AND `tijd`>".time()." LIMIT 1") or die(mysql_error()); if(mysql_num_rows($gSql) == 1){ $gevangen = true; $gRes = mysql_fetch_assoc($gSql); $seconden = $gRes['tijd'] - time(); } else { $gevangen = false; } $rSql = mysql_query("SELECT `reizen` FROM `usertimes` WHERE `id`=".ID) or die(mysql_error()); $rRes = mysql_fetch_assoc($rSql); if($rRes['reizen'] > time()) { $reizen = true; $reistijd = $rRes['reizen'] - time(); } else { $reizen = false; } include("_mainMenus.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv='content-type' content='text/html; charset=iso-8859-1' /> <meta name='author' content='$naam' /> <link href='styles.css' rel='stylesheet' type='text/css' /> <link rel='shortcut icon' href='favicon.ico'> <link rel='icon' href='favicon.ico'> <title>MyWay</title> </head> <body> <table width='100%' cellspacing='0' style='margin: 0px;'> <tr> <td width='14%' style='vertical-align: top;'> <table border='0' cellspacing='1' width='100%' bgcolor='#000'> <?php foreach($menuleft AS $cat => $subCats){ echo " <tr><td class='menutop'>".$cat."</td></tr>"; if(is_array($subCats)){ foreach($subCats AS $url => $name){ if($url == "donatieshop.php"){ echo " <tr><td class='menu'><img src='IMG/star.jpg' alt=''><a href='".$url."'>".$name."</a></td></tr>"; } else { echo " <tr><td class='menu'><a href='".$url."'> - ".$name."</a></td></tr>"; } } } } ?> </table> </td> <td width='72%' style='vertical-align: top; height: 0px; text-align:center;' align='center'> <table border='0' cellspacing='0' width='100%' align='center'> <tr> <td> <table border='0' cellspacing='1' width='96%' bgcolor='#000' align='center'> <tr> <td class='header' style='padding: 0px;'> <table style="margin:0px; padding:0px;vertical-align: bottom;" cellpadding="0" cellspacing="0" width="100%"> <tr> <td style="padding:0px; margin:0px;"> <img src="/IMG/header_image.jpg" alt="" /> </td> <td> <div class="counter_view"> <table cellpadding="0" cellspacing="0" style="margin: 0px; padding: 0px;"> <tr> <td style="width: 54px;"> <table border='0' cellspacing='0' style='margin: 0px;'> <tr> <td> <img src='/images/icons/gun.png' alt='' title='Misdaden/Familie misdaad' border='0'> </td> <td><?php if($r['misdaden_s'] < time()){ echo "<a href='misdaad.php'>Nu</a>"; } else { echo "<span id='cdmisdaad_s'>".($r['misdaden_s'] - time())."</span>".countDown("misdaad_s", ($r['misdaden_s'] - time())); } ?></td> </tr> </table> </td> <td style="width: 50px;"> <table border='0' cellspacing='0' style='margin: 0px;'> <tr> <td> <img src='/images/icons/gun_anchor.png' alt='' title='Wapen Training' border='0'> </td> <td> <?php if($r['wapenervaring'] < time()){ echo "<a href='wapenervaring.php'>Nu</a>"; } else { echo "<span id='cdwapenervaring'>".($r['wapenervaring'] - time())."</span>".countDown("wapenervaring", ($r['wapenervaring'] - time())); } ?> </td> </tr> </table> </td> <td style="width: 54px;"> <table border='0' cellspacing='0' style='margin: 0px;'> <tr> <td> <img src='/images/icons/anchor.png' alt='' title='Sportschool Training' border='0'> </td> <td> <?php if($r['kracht'] < time()){ echo "<a href='sportschool.php'>Nu</a>"; } else { echo "<span id='cdkracht'>".($r['kracht'] - time())."</span>".countDown("kracht", ($r['kracht'] - time())); } ?> </td> </tr> </table> </td> </tr> <tr> <td style="width: 54px;"> <table border='0' cellspacing='0' style='margin: 0px;'> <tr> <td> <img src='/images/icons/car.png' alt='' title='Voertuigen Beginners' border='0'> </td> <td> <?php if($r['auto_s'] < time()){ echo "<a href='stealcar.php'>Nu</a>"; } else { echo "<span id='cdauto_s'>".($r['auto_s'] - time())."</span>".countDown("auto_s", ($r['auto_s'] - time())); } ?> </td> </tr> </table> </td> <td style="width: 54px;"> <table border='0' cellspacing='0' style='margin: 0px;'> <tr> <td> <img src='/images/icons/car_add.png' alt='' title='Voertuigen Gevorderden' border='0'> </td> <td> <table border='0' cellspacing='0' style='margin: 0px;'> <tr> <td> <?php if($rank['rankID']< 5){ ?> <img src='/images/icons/cross_small.png' alt='' border='0'> <?php } else { if($r['auto_g'] < time()){ echo "<a href='stealcar.php'>Nu</a>"; } else { echo "<span id='cdauto_g'>".($r['auto_g'] - time())."</span>".countDown("auto_g", ($r['auto_g'] - time())); } } ?> </td> <td> </td> </tr> </table> </td> </tr> </table> </td> <td style="width: 50px;" colspan="2"> <table border='0' cellspacing='0' style='margin: 0px;'> <tr> <td> <img src='/images/icons/user_female.png' alt='' title='Hoeren Pimpen' border='0'> </td> <td> <?php if($r['hoerenpimpen'] < time()){ echo "<a href='rld.php'>Nu</a>"; } else { echo "<span id='cdhoerenpimpen'>".($r['hoerenpimpen'] - time())."</span>".countDown("hoerenpimpen", ($r['hoerenpimpen'] - time())); } ?> </td> </tr> </table> </td> </tr> <tr> <td style="width: 54px;"> <table border='0' cellspacing='0' style='margin: 0px;'> <tr> <td> <img src='/images/icons/group.png' alt='' title='Familie Overval' border='0'> </td> <td> <table border='0' cellspacing='0' style='margin: 0px;'> <tr> <td> <?php if($famID == 0){ ?> <img src='/images/icons/cross_small.png' alt='' border='0'> <?php } else { if($r['fam_overvallen'] < time()){ echo "<a href='famoverval.php'>Nu</a>"; } else { echo "<span id='cdfam_overvallen'>".($r['fam_overvallen'] - time())."</span>".countDown("fam_overvallen", ($r['fam_overvallen'] - time())); } } ?> </td> <td> </td> </tr> </table> </td> </tr> </table> </td> <td style="width: 54px;"> <table border='0' cellspacing='0' style='margin: 0px;'> <tr> <td> <img src='/images/icons/group_gun.png' alt='' title='Route 66' border='0'> </td> <td> <table border='0' cellspacing='0' style='margin: 0px;'> <tr> <td> <?php if($r['route66'] < time()){ echo "<a href='route66.php'>Nu</a>"; } else { echo "<span id='cdroute66'>".($r['route66'] - time())."</span>".countDown("route66", ($r['route66'] - time())); } ?> </td> <td> </td> </tr> </table> </td> </tr> </table> </td> <td style="width: 50px;" colspan="2"> <table border='0' cellspacing='0' style='margin: 0px;'> <tr> <td> <img src='/images/icons/bomb.png' alt='' title='Aanslag Plegen' border='0'> </td> <td> <?php if($r['bombaderen'] < time()){ echo "<a href='plattegrond.php'>Nu</a>"; } else { echo "<span id='cdbombaderen'>".($r['bombaderen'] - time())."</span>".countDown("bombaderen", ($r['bombaderen'] - time())); } ?> </td> </tr> </table> </td> </tr> </table> </div> </td> </tr> </table> </td> </tr> <td class='subheader'> <table width='100%' border='0' cellspacing='0' style='margin: 0px;' cellpadding='0'> <tr> <td style='text-align: left;'> <a href='fambericht.php'><img src='IMG/tab/fambericht.jpg' alt='' border='0' /></a><? if($__status >= 16){echo "<a href='hqadminbasis.php'><img src='IMG/tab/admin.jpg' alt='' border='0' /></a>"; } ?> <? if($__status == { echo "<a href='gmod.php'><img src='IMG/tab/gamemod.jpg' alt='' border='0' /></a>"; } ?> <? if($__status == 4){ echo "<a href='forummod.php'><img src='IMG/tab/forummod.jpg' alt='' border='0' /></a>"; } ?> <? if($__status == 2){ echo "<a href='hdbasis.php'><img src='IMG/tab/helpdesk.jpg' alt='' border='0' /></a>"; } ?> <?php $sql = mysql_query("SELECT `id` FROM `berichten` WHERE `gelezen`=0 AND `ontvanger_id`=".ID." AND `in_inbox`=0 LIMIT 1") or die(mysql_error()); if(mysql_num_rows($sql) == 1){ echo "<a href='berichten.php?x=inbox'><img src='IMG/tab/inbox_n.jpg' alt='' border='0' /></a>"; } else { echo "<a href='berichten.php?x=inbox'><img src='IMG/tab/inbox.jpg' alt='' border='0' /></a>"; } ?><a href='berichten.php?x=outbox'><img src='IMG/tab/outbox.jpg' alt='' border='0' /></a><a href='berichten.php?x=new'><img src='IMG/tab/new.jpg' alt='' border='0' /></a> </td> <td style='text-align: right;'> <?php if($gevangen){ echo " <table border='0' cellspacing='0' cellpadding='0' align='right'> <tr> <td> <img src='IMG/gevang.jpg' alt='' style='margin: 0px;'> </td> <td> <b><span id='cdgevang'>".$seconden."</span></b> </td> </tr> </table> ".countDown("gevang", $seconden); } if($reizen){ echo " <table border='0' cellspacing='0' cellpadding='0' align='right'> <tr> <td> <img src='IMG/reizen.jpg' alt='' style='margin: 0px;'> </td> <td> <b><span id='cdreis'>".$reistijd."</span></b> </td> </tr> </table> ".countDown("reis", $reistijd); } ?> </td> </tr> </table> </td> </tr> </table> </td> </tr> <?php $SSQl = mysql_query("SELECT status FROM speldata WHERE id=".ID) or die(mysql_error()); $QREs = mysql_fetch_assoc($SSQl); $statu = $QREs['status']; $MSQL = mysql_query("SELECT m_12 FROM count_missions WHERE id=".ID) or die(mysql_error()); $QrSl = mysql_fetch_assoc($MSQL); $m12 = $QrSl['m_12']; if($statu == 0){ $plrstatus = Online; } elseif($statu == 1){ $plrstatus = Online; } elseif($statu == 2){ $plrstatus = Bezet; } elseif($statu == 3){ $plrstatus = Afwezig; } elseif($statu == 4){ $plrstatus = Smokkelen; } elseif($statu == 5){ $plrstatus = Designen; } elseif($statu == 6){ $plrstatus = Druk; } elseif($statu == 7){ $plrstatus = Eten; } elseif($statu == 99){ $plrstatus = Scripten; } elseif($statu == 100){ $plrstatus = Legend; } if(isset($_POST['go'])){ $actie = $_POST['actie']; if($actie == 1){ mysql_query("UPDATE speldata SET status = 1 WHERE id=".ID); } elseif($actie == 2){ mysql_query("UPDATE speldata SET status = 2 WHERE id=".ID); } elseif($actie == 3){ mysql_query("UPDATE speldata SET status = 3 WHERE id=".ID); } elseif($actie == 4){ mysql_query("UPDATE speldata SET status = 4 WHERE id=".ID); } elseif($actie == 5){ mysql_query("UPDATE speldata SET status = 5 WHERE id=".ID); } elseif($actie == 6){ mysql_query("UPDATE speldata SET status = 6 WHERE id=".ID); } elseif($actie == 7){ mysql_query("UPDATE speldata SET status = 7 WHERE id=".ID); } elseif($actie == 99){ mysql_query("UPDATE speldata SET status = 99 WHERE id=".ID); } elseif($actie == 100){ mysql_query("UPDATE speldata SET status = 100 WHERE id=".ID); } } ?> <tr> <form method='post' actie='".$_SERVER['SCRIPT_NAME']."?".$_SERVER['QUERY_STRING']."'> <td style='text-align: right; padding-right: 27px; padding-top: 5px; padding-bottom: 5px;'> <select name='actie'> <option value='0'>-- <?=$plrstatus;?> --</option> <option value='1'>Online</option> <option value='2'>Bezet</option> <option value='3'>Afwezig</option> <option value='4'>Smokkelen</option> <option value='5'>Designen</option> <option value='6'>Druk</option> <option value='7'>Eten</option> <?php if($__status == 16){ ?> <option value='99'>Scripten</option> <? } ?> <?php if($m_12 == 1){ ?> <option value='100'>Legend</option> <? } ?> </select> <input type='submit' name='go' value='Update!' /> </td> </tr> </form> </html> <tr> <td style='text-align: center;'> <?php $sql = mysql_query("SELECT `bankmoney`, `cashmoney` FROM `speldata` WHERE `id`=".ID) or die(mysql_error()); $res = mysql_fetch_assoc($sql); if(ID == ''){ //Logboek script als je iemand niet vertrouwd! $logQuery = "INSERT INTO `logboek`(`id_user`, `ip`,`date`, `page`, `money`) VALUES (".ID.", '".$_SERVER['REMOTE_ADDR']."', NOW(), '".mr($_SERVER['REQUEST_URI'])."', ".($res['bankmoney'] + $res['cashmoney']).")"; mysql_query($logQuery) or die(mysql_error()); } if($res['cashmoney'] < 0){ mysql_query("UPDATE `speldata` SET `cashmoney`=0, `bankmoney`=`bankmoney`+".$res['cashmoney']." WHERE `id`=".ID) or die(mysql_error()); $menu_rechts_top['Contant'] = "\$0"; $menu_rechts_top['Bank'] = "\$".number_format($bank + $res['cashmoney']); } if($res['bankmoney'] < 0){ if($_GET['p'] == "famdonate"){ mysql_query("UPDATE `familie` SET `geld`=`geld`+".$res['bankmoney']." WHERE `id`=".$famID) or die(mysql_error()); mysql_query("UPDATE `speldata` SET `bankmoney`=0 WHERE `id`=".ID) or die(mysql_error()); mysql_query("UPDATE `famdonaties` SET `total`=`total`+".$res['bankmoney']." WHERE `user_id`=".ID." AND `fam_id`=".$famID) or die(mysql_error()); $menu_rechts_top['Bank'] = "\$0"; } elseif($url == "markt.php"){ $min = (int) str_replace("-", "", $res['bankmoney']); $s = mysql_query("UPDATE `markt_alg` SET `bieder`=0, `high_bod`=`bied_bod` WHERE `bieder`=".ID." AND `high_bod`>=".$min." LIMIT 1") or die(mysql_error()); if(mysql_affected_rows($s) == 0){ $s = mysql_query("SELECT `id` FROM `markt_alg` WHERE `bieder` =".ID." AND `high_bod` <".$min." ORDER BY `high_bod` DESC LIMIT 1 ") or die(mysql_error()); $r = mysql_fetch_assoc($s); mysql_query("UPDATE `markt_alg` SET `bieder`=0, `high_bod`=`bied_bod` WHERE `id`=".$r['id']) or die(mysql_error()); mysql_query("UPDATE `speldata` SET `bankmoney`=0 WHERE `id`=".ID) or die(mysql_error()); } else { mysql_query("UPDATE `speldata` SET `bankmoney`=0 WHERE `id`=".ID) or die(mysql_error()); } } else { mysql_query("UPDATE `speldata` SET `bankmoney`=0, `cashmoney`=`cashmoney`+".$res['bankmoney']." WHERE `id`=".ID) or die(mysql_error()); $menu_rechts_top['Bank'] = "\$0"; $menu_rechts_top['Contant'] = "\$".number_format($contant + $res['bankmoney']); } } ?> Thanks in advance for the help! _menu_l.php
-
Hello, I am building an online game(users make a character and move on a map and so on...) All user data is stored in a mySQL database and I want the users to interact in real-time, but there can be a 1-3 second delay between the communication, but not exceed 3 seconds even if 500 players are playing at the same time. But for the purpose of the question let's say the users can only chat between one another, if I'll have a solution for that then I can use the same method for more parts of the game. I can't use websockets because my webhost doesn't support it( I don't want to use pusher.com). I know I can make real-time apps with ajax long polling, but I think that with 500 players playing at the same time it's not the best solution. So, finally: How can I make user interaction as close as possible to a real-time game? (Without too much load on the hosting server) (I am sorry if some of my terms are not correct - I am just getting back to coding after a long time...)
-
hi there is this game i play and i am trying to accomplish a code which adds items coming from the games xml. the game is called zwinky and i'm having a small problem which can maybe be easily fixed. Here are the codes: http://paste.ee/p/JHMow http://paste.ee/p/pIEUt they are written differently. Okay So the problem is a little message when used on my webhost comes up on browser saying : "HTTP/1.1 100 Continue HTTP/1.1 200 OK Date: Sat, 24 May 2014 22:52:31 GMT Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8c DAV/2 mod_jk/1.2.28 Cache-Control: max-age=0, must-revalidate Expires: Thu, 01 Jan 1970 00:00:00 GMT Set-Cookie: anx="os=-&g=-&oc=-&sn=dfprdzwinky4&od=none&op=-&fv=1400971951270&ob=-&om=-&lv=1400971951270&ok=-&nv=1"; Version=1; Domain=.zwinky.com; Max-Age=7776000; Expires=Fri, 22-Aug-2014 22:52:31 GMT; Path=/ Content-Language: en-US Content-Length: 92 Connection: close Content-Type: application/xml;charset=UTF-8 User not signed in" as you can see it says "user not signed in" yet i am signed in into the game.. So i believe somewhere in the code the cookies are wrong or the code doesn't have the necessary elements to show that you are being logged in. to get the cookies/ login info you need to create a game account which takes 10-20 seconds: http://registration..../register.jhtml and then using fiddler/charles or any other method displaying the accounts cookies it should show them up. I don't know what is needed to add to the code to make it work here our other topics on this issue never solved which might help: http://forum.ragezon...44/help-920369/ http://www.webdevelo...129-php-execute if anyone could help please! it's not hard making the game accounts and viewing the cookies, please and thank you!!!!
-
Hello! I was assigned to create a simple php game as a part of my grade. I'm not really a php expert and this isnt really working. I copied some of the code from this website, but this isn't really working for me. I don't really know how to solve the problem and connect that two files. Part 1: <html> <head> <title>PHP based example Game - Earth & Wind & Fire (aka Paper-Scissors-Rock)</title> </head> <body> <center> <div id="game"> <a href="?item=earth">Earth<br /><img src="images/sand.png" width="135" height="135" alt="Earth"></a><br /><a href="?item=wind">Wind<br /><img src="images/wind.png" width="135" height="135" alt="Wind"></a><br /><a href="?item=fire">Fire<br /><img src="images/fire.png" width="135" height="135" alt="Fire"></a><br /></div> </center> </body> </html> Part 2: <?php function showComponents($items = null) { $pictures = array( "earth" => '<a href="?item=earth">Earth<br /><img src="images/sand.png" width="135" height="135" alt="Earth"></a><br />', "wind" => '<a href="?item=wind">Wind<br /><img src="images/wind.png" width="135" height="135" alt="Wind"></a><br />', "fire" => '<a href="?item=fire">Fire<br /><img src="images/fire.png" width="135" height="135" alt="Fire"></a><br />', ); if ($items == null) : foreach( $pictures as $items => $value ): echo $value; endforeach; else: echo str_replace("?item={$items}", "#", $pictures[$items]); endif; } function game() { if ( isset($_GET['item']) == TRUE ) : $pictures = array('earth','wind','fire'); $playerPic = strtolower($_GET['item']); $computerPic = $pictures[rand(0, 2)]; echo '<div><a href="http://mapswidgets.com/game.php">New game</a></div>'; if (in_array($playerPic, $pictures) == FALSE): echo "Play as either Earth, Wind or Fire."; die; endif; if ( $playerPic == 'fire' && $computerPic == 'wind' OR $playerPic == 'earth' && $computerPic == 'fire' OR $playerPic == 'wind' && $computerPic == 'earth' ): echo '<h2>You Win!</h2>'; endif; if ( $computerPic == 'fire' && $playePic == 'wind' OR $computerPic == 'earth' && $playerPic == 'fire' OR $computerPic == 'wind' && $playerPic == 'earth' ): echo '<h2>Computer wins!</h2>'; endif; if ($playerPic == $computerPic) : echo '<h2>House wins! =)</h2>'; endif; showComponents($playerPic); showComponents($computerPic); else : showComponents(); endif; } ?> Thanks for your time and help!
-
Hi! I was assigned to create a simple php game as a part of my grade, but i got stuck. I'm not really a php expert and this isnt really working. I managed to get some of the code/game working, but it's pointless imo. I'm looking for someone who would take 3 mins and fix this code for me. The game is called "Random number guessing game." From the title you can see that the game is not really complicated. Code: <html> <head> <title></title> </head> <body> <h1> Ugani Random!</h1> <? php if(isset($_POST['submit'])) $x = $_POST['x']; $num = $_POST['num']; $x = rand(1, 10) if($num<$x) { echo " Your number is higher! "<br /> } if($num==$x) { echo " Correct! Press Reset to try again! "<br /> } if($num>$x) { echo " Your number is lower! "<br /> } ?> <p> <form> <input type="number" name="quantity"> <br /> <button type="submit" value="<? echo $x?>">Submit</button> <button type="reset" value="<? echo $num?>">Reset</button> </form> </p> </body> </html> Computer basically generates a random number and compares it to the input part of <p> but it's not working as intended.
-
hi there is this game i play and i am trying to accomplish a code which adds items coming from the games xml. the game is called zwinky and i'm having a small problem which can maybe be easily fixed. Here are the codes: http://paste.ee/p/JHMow http://paste.ee/p/pIEUt they are written differently. Okay So the problem is a little message when used on my webhost comes up on browser saying : "HTTP/1.1 100 Continue HTTP/1.1 200 OK Date: Sat, 24 May 2014 22:52:31 GMT Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8c DAV/2 mod_jk/1.2.28 Cache-Control: max-age=0, must-revalidate Expires: Thu, 01 Jan 1970 00:00:00 GMT Set-Cookie: anx="os=-&g=-&oc=-&sn=dfprdzwinky4&od=none&op=-&fv=1400971951270&ob=-&om=-&lv=1400971951270&ok=-&nv=1"; Version=1; Domain=.zwinky.com; Max-Age=7776000; Expires=Fri, 22-Aug-2014 22:52:31 GMT; Path=/ Content-Language: en-US Content-Length: 92 Connection: close Content-Type: application/xml;charset=UTF-8 User not signed in" as you can see it says "user not signed in" yet i am signed in into the game.. So i believe somewhere in the code the cookies are wrong or the code doesn't have the necessary elements to show that you are being logged in. to get the cookies/ login info you need to create a game account which takes 10-20 seconds: http://registration.zwinky.com/registration/register.jhtml and then using fiddler/charles or any other method displaying the accounts cookies it should show them up. I don't know what is needed to add to the code to make it work here our other topics on this issue never solved which might help: http://forum.ragezone.com/f144/help-920369/ http://www.webdeveloper.com/forum/showthread.php?268129-php-execute if anyone could help please! it's not hard making the game accounts and viewing the cookies, please and thank you!!!!
-
i need help with a login i have on my site. I'm new to this so i dont know if i'll get any help
-
Hi i am trying to make a bto for a game i play with my friends we play in a group of 4 in the game there is a line of letters 4-5 of them you then need to make words from thos letters and the one with the most words wins i have created my own anagram solver and created a bot for entering these into the flash game but now i want to make it fully auto i am looking for a way to get the letters from the flash game ? i have looked at the page source code and nothing is stored there so i am wondering if there is any way to inspect the game as it runs inside vb.net ?
-
Hey im trying to make a small little game for my self at the moment, to test my self a little, the game i creating is based a little on the game http://ogame.org, im trying to find out how i can make the ressources auto increase on each member created on my site as the site ogame has, i dont need the javescript so you can see it auto increase, but just need to refresh it and then i can see that it has gone up, in my game im using Gold, Silver and Copper as ressources atm, and im not sure how to make the number in my database auto increase while the user have logged out, i was thinking about using some kind of function that would increse copper with 1 for each sec there goes with a timestamp or something like that, any of you guys knows how this could be possible? Regards Dan Larsen
-
This may sound like a weird one. I'm in the process of making a HTML5 game where I need to make contact with a MYSQL database. I planned on doing this using PHP scripts that the game sends AJAX requests to with post data. Is there a way of securing these scripts so no one on the outside can access (or just run) them, but the game can. The game will be ran on the same server as the scripts. Does this sound ridiculous or is it possible? Or am I going about this the entirely wrong way, thanks for any answers in advance!!
-
I want to create a text based real time strategy game. I would like to know how I can create an ingame mine that produces x amount of resources/h. And then to make the mine upgrade able. Witch wil take y amount of time to upgrade and cost z amount of resources to upgrade. And then increase the production per hour by a new amount per hour. Any one willing to help or even show me code that will do this or even direct me to a tutorial please.