hoe bedoel je voor/na ?
waar moet ik die / neerzetten?
Posts by godkiller
-
-
regel 8 t/m 14
function is_name($i){
if(!preg_match("/^[A-Za-z0-9-]{3,25}$/", $i)){
return FALSE;
} else {
return TRUE;
}
} -
hoe zou ik dat kunnen opzoeken?
is_name staat in iedergeval niet 2x in het script. -
nu heb ik nog een vraag over hetzelfde stukje.
Cannot redeclare is_name() (previously declared in /home/....../domains/...../public_html/includes/_functions.php:8) in /home/...../domains/.../public_html/includes/_functions.php on line 14
is dit een zelfde soort fout wat ik moet vervangen door iets nieuws?
-
dit krijg ik voor fout als ik ereg vervan door preg mach.
hoe los ik deze fout op?Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/....../domains/...../public_html/includes/_functions.php on line 9
function is_name($i){ if(!preg_mach"^[A-Za-z0-9-]{3,25}$", $i)){ return FALSE; } else { return TRUE; }}
-
hallo,
ik heb volgens mij een veroudert script.
ik zal hier een stukje posten.
waar de fout in zit en wat die aangeeft als fouthij geeft aan dat de fout is:
deprecated: function ereg() is deprecated in home/...../domains/..../public_html/includes/_functions on line 9 -
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
dit is de foutmelding die hij geeft als ik dit script upload.
ik weet uberhaubt niet waar het aan ligt
waar zou ik dit kunnen vinden dan zou ik de code kunnen vinden zodat jullie me kunnen helpen -
HEEY,
hij geeft nu een andere foutmelding weer.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
hoe los ik dat op
-
heey mensen. ik blijf maar een foutmelding krijgen bij while($aRow = mysql_fetch_assoc($rResult))
ik weet neit wat ik fout doe wie kan me helpen
dit is een script van een open source crime gamePHP
Toon Meer<?php session_start(); ob_start(); include("./_menu_l.php"); ?> <?php $adds = array( "", "WHERE `rank`<5", "WHERE `rank`>=5 && `rank`<12", "WHERE `rank`>=12 && `rank`<22", "WHERE `rank`>=22 && `rank`<47", "WHERE `rank`>=47 && `rank`<77", "WHERE `rank`>=77 && `rank`<110", "WHERE `rank`>=110 && `rank`<160", "WHERE `rank`>=160 && `rank`<260", "WHERE `rank`>=260 && `rank`<510", "WHERE `rank`>=510 && `rank`<860", "WHERE `rank`>=860 && `rank`<1310", "WHERE `rank`>=1310");$x = 0;if(isset($_GET['x']) && array_key_exists($_GET['x'], $adds)){ $add = $adds[$_GET['x']]; $add2 = "LEFT JOIN `speldata` ON `speldata`.`id`=`users`.`id` ".$add; $x = $_GET['x'];} $total = mysql_query("SELECT COUNT(`users`.`id`) FROM `users` ".$add2) or ($msg_geen);$tf = mysql_result($total, 0) or ($msg_geen); $pp = 25; $pages = ceil($tf / $pp); if(isset($_GET['page']) && ctype_digit($_GET['page']) && $_GET['page'] >= 0 && $_GET['page'] < $pages){ $page = $_GET['page'];} else { $page = 0;} if(!isset($_GET['page'])){ $score = getScore(ID); $page = floor($score / $pp);} $start = $page * $pp; $sql = mysql_query("SELECT `username`, `users`.`id`, `bankmoney`+`cashmoney` AS `money`, `leven`, `rank`, `naam` FROM `speldata` LEFT JOIN `familie` ON `familie`.`id` =`speldata`.`familie_id` LEFT JOIN `users` ON `users`.`id`=`speldata`.`id` LEFT JOIN `status` ON `status`.`id`=`speldata`.`id` ".$add." ORDER BY `speldata`.`score` DESC LIMIT ".$start.", ".$pp) or die("We zijn bezig met een aanpassing!"); ?><form method="post" action="/ledenlijst.php"><table border="0" cellspacing="1" width="96%" bgcolor="#000" align="center"> <tr> <td class="top" colspan="2"> Leden </td> </tr> <tr> <td class="tab_on" width="50%"> <center><table border='0' cellspacing='0' style='margin: 0px;'> <tr> <td> <img src='/images/icons/group.png' alt='' border='0'> </td> <td> <a href="/ledenlijst.php"><b>Leden Lijst</a></b> </td> </tr> </table></center> </td> <td class="tab" width="50%"> <center><table border='0' cellspacing='0' style='margin: 0px;'> <tr> <td> <img src='/images/icons/group_add.png' alt='' border='0'> </td> <td> <a href="/online.php"><b>Online Spelers</a></b> </td> </tr> </table></center> </td> </tr> <tr> <td colspan="2" class="container"> <table border="0" cellspacing="1" width="96%" bgcolor="#000" align="center"> <tr> <td class="subtop" colspan="6"> Leden Lijst </td> </tr> <tr> <td colspan="6" class="inhoud_r"> Lid zoeken: <input type="text" name="lid" value="" maxlength="25" /> <input type="submit" name="search_lid" value="Zoek!" /> </td> </tr> <tr> <td class="subtop" width="5%"> # </td> <td class="subtop" width="19%"> Naam </td> <td class="subtop" width="19%"> Rank </td> <td class="subtop" width="19%"> Geld Rank </td> <td class="subtop" width="19%"> Familie </td> <td class="subtop" width="19%"> Leven </td> </tr> <?php if(isset($_POST['search_lid'])){ $i = 0 + 1; $lid = $_POST['lid']; $sqlS = mysql_query("SELECT `username`, `users`.`id`, `bankmoney`+`cashmoney` AS `money`, `leven`, `rank`, `naam` FROM `speldata` LEFT JOIN `familie` ON `familie`.`id` =`speldata`.`familie_id` LEFT JOIN `users` ON `users`.`id`=`speldata`.`id` LEFT JOIN `status` ON `status`.`id`=`speldata`.`id` WHERE `username` LIKE '".mr($lid)."%' ORDER BY `username` ASC LIMIT 0, 15 ") or die("We zijn bezig met een aanpassing!"); if($lid == ""){ $msgS = bad("Je hebt niks ingevuld!"); } elseif(mysql_num_rows($sqlS) == 0){ $msgS = bad("Er zijn geen resultaten gevonden!"); } if(isset($msgS)){ echo "<tr> <td class='inhoud' colspan='6'> ".$msgS." </td> </tr>"; } else { while($resS = mysql_fetch_assoc($sqlS)){ $rnk = getRank($resS['rank']); echo " <tr> <td class='inhoud_c' width='5%' style='vertical-align: middle; ".(($resS['id'] == ID) ? "background-color: #606060" : "").";'> ".$i." </td> <td class='inhoud' width='20%' ".(($res['id'] == ID) ? "style='background-color: #606060;'" : "")."> ".cname($resS['id'], $resS['username'])." </td> <td class='inhoud' width='20%' ".(($resS['id'] == ID) ? "style='background-color: #606060;'" : "")."> ".$rnk['rank']." </td> <td class='inhoud' width='20%' ".(($resS['id'] == ID) ? "style='background-color: #606060;'" : "")."> ".geldrank($resS['money'])." </td> <td class='inhoud' width='20%' ".(($resS['id'] == ID) ? "style='background-color: #606060;'" : "")."> ".(is_null($resS['naam']) ? "Geen" : "<a href='fampage.php?x=".$resS['naam']."'>".$resS['naam']."</a>")." </td> <td class='inhoud' width='15%' ".(($resS['id'] == ID) ? "style='background-color: #606060;'" : "")."> ".createBalk($resS['leven'])." </td> </tr> "; $i++; } } } else { $i = $start + 1; while($res = mysql_fetch_assoc($sql)){ $rnk = getRank($res['rank']); echo " <tr> <td class='inhoud_c' width='5%' style='vertical-align: middle; ".(($res['id'] == ID) ? "background-color: #606060" : "").";'> ".$i." </td> <td class='inhoud' width='20%' ".(($res['id'] == ID) ? "style='background-color: #606060;'" : "")."> ".cname($res['id'], $res['username'])." </td> <td class='inhoud' width='20%' ".(($res['id'] == ID) ? "style='background-color: #606060;'" : "")."> ".$rnk['rank']." </td> <td class='inhoud' width='20%' ".(($res['id'] == ID) ? "style='background-color: #606060;'" : "")."> ".geldrank($res['money'])." </td> <td class='inhoud' width='20%' ".(($res['id'] == ID) ? "style='background-color: #606060;'" : "")."> ".(is_null($res['naam']) ? "Geen" : "<a href='fampage.php?x=".$res['naam']."'>".$res['naam']."</a>")." </td> <td class='inhoud' width='15%' ".(($res['id'] == ID) ? "style='background-color: #606060;'" : "")."> ".createBalk($res['leven'])." </td> </tr> "; $i++; }if(mysql_num_rows($sql) == "0"){echo"<tr><td class='inhoud' colspan='6'>";echo bad("Spelers hebben deze rank nog niet!");echo "</td></tr>";}}?> </table> </td> </tr> </table> <br /> <table border="0" cellspacing="1" width="96%" bgcolor="#000" align="center"> <tr> <td class="inhoud_c" width="33%" colspan="2"> <select onChange='location="ledenlijst.php?page=<?=$page;?>&x=" + this.value'> <?php $options = array("Allemaal", "Scum", "Pee Wee", "Thug", "Gangster", "Hitman", "Assassin", "Boss", "Godfather", "Legendary Godfather", "Don", "Respectable Don", "Legendary Don"); foreach($options AS $k => $name){ if($k == $x){ echo "<option value='".$k."' selected='selected'>".$name."</option>"; } else { echo "<option value='".$k."'>".$name."</option>"; } } ?> </select></td> <td class="inhoud_c" width="33%" colspan="2"> <select onChange='location="ledenlijst.php?x=<?=$x;?>&page=" + this.value'> <?php for($j = 0; $j < $pages; $j++){ if($j == $page){ echo "<option value='".$j."' selected='selected'>".($j + 1)."</option>"; } else { echo "<option value='".$j."'>".($j + 1)."</option>"; } } ?> </select> </td> <td class="inhoud_c" width="33%" colspan="2"> <a href='ledenlijst.php?page=0&x=<?=$x;?>'>Top <b>25</b></a> </td> </tr> </table> </td> </tr> <? include ("_menu_r.php"); ?>