hi friends in the file list.php
makes me this error: Parse error: syntax error, unexpected $end in /membri/universal3000/afta/web/lists.php on line 302
how can I resolve? thanks to whom answers me
Code:
<?php header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); //header('Content-type: application/vnd.wap.xhtml+xml'); echo "<?xml version=\"1.0\"?>"; echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">"; ?> <html xmlns="http://www.w3.org/1999/xhtml"> <?php include("config.php"); include("core.php"); connectdb(); $action = $_GET["action"]; $sid = $_GET["sid"]; $page = $_GET["page"]; $uid = getuid_sid($sid); $theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'")); $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'")); $sitename = $sitename[0]; if($action != "") { if(islogged($sid)==false) { echo "<head>"; echo "<title>Error!!!</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/white_medium.css\">"; echo "</head>"; echo "<body>"; echo "<p align=\"center\">"; echo "You are not logged in "; echo "Or Your session has been expired "; echo "<a href=\"index.php\">Login</a>"; echo "</p>"; echo "</body>"; echo "</html>"; exit(); } } if(isbanned($uid)) { echo "<head>"; echo "<title>Error!!!</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; echo "</head>"; echo "<body>"; echo "<p align=\"center\">"; echo "<img src=\"../images/notok.gif\" alt=\"x\"/> "; echo "[b]You are Banned[/b] "; $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1' OR uid='".$uid."' AND penalty='2'")); $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'")); $remain = $banto[0]- time(); $rmsg = gettimemsg($remain); echo "[b]Time Left: [/b]$rmsg "; $nick = getnick_uid($banto[2]); echo "[b]By: [/b]$nick "; echo "[b]Reason: [/b]$banto[1]"; //echo "<a href=\"index.php\">Login</a>"; echo "</p>"; echo "</body>"; echo "</html>"; exit(); } //////////////////////////////////Members List if($action=="members") { addonline(getuid_sid($sid),"Viewing Members List",""); $view = $_GET["view"]; if($view=="")$view="date"; echo "<head>"; echo "<title>Members List</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; echo "</head>"; echo "<body>"; echo "<p align=\"center\">"; echo "<img src=\"../images/bdy.gif\" alt=\"*\"/> "; echo "<a href=\"lists.php?action=members&view=name&sid=$sid\">Order By Name</a> "; echo "<a href=\"lists.php?action=members&view=date&sid=$sid\">Order By Join Date</a> "; echo "</p>"; //////ALL LISTS SCRIPT << if($page=="" || $page<=0)$page=1; $num_items = regmemcount(); //changable $items_per_page= 10; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; //changable sql if($view=="name") { $sql = "SELECT id, name, regdate FROM ibwf_users ORDER BY name LIMIT $limit_start, $items_per_page"; }else{ $sql = "SELECT id, name, regdate FROM ibwf_users ORDER BY regdate DESC LIMIT $limit_start, $items_per_page"; } echo " "; $items = mysql_query($sql); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { $jdt = date("d-m-y", $item[2]); $lnk = "<a href=\"index.php?action=viewuser&who=$item[0]&sid=$sid\">$item[1]</a> [size="1"]joined: $jdt[/size]"; echo "$lnk "; } } echo "</p>"; echo "<p align=\"center\">"; if($page>1) { $ppage = $page-1; echo "<a href=\"lists.php?action=members&page=$ppage&sid=$sid&view=$view\">«PREV</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href=\"lists.php?action=members&page=$npage&sid=$sid&view=$view\">Next»</a>"; } echo " $page/$num_pages "; if($num_pages>2) { $rets = "<form action=\"lists.php\" method=\"get\">"; $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>"; $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>"; $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>"; $rets .= "<input type=\"hidden\" name=\"view\" value=\"$view\"/>"; $rets .= "<input type=\"submit\" value=\"Go To Page\"/>"; $rets .= "</form>"; echo $rets; } echo "</p>"; ////// UNTILL HERE >> echo "<p align=\"center\">"; echo "[b]9 [/b]<a accesskey=\"9\" href=\"index.php?action=stats&sid=$sid\"><img src=\"../images/stat.gif\" alt=\"\"/>Site Stats</a> "; echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; echo "</p>"; echo "</body>"; } //////////////////////////////////List users by IP if($action=="byip") { addonline(getuid_sid($sid),"Mod CP",""); echo "<head>"; echo "<title>Ip List</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; echo "</head>"; echo "<body>"; //////ALL LISTS SCRIPT << $who = $_GET["who"]; $whoinfo = mysql_fetch_array(mysql_query("SELECT ipadd, browserm FROM ibwf_users WHERE id='".$who."'")); if(ismod(getuid_sid($sid))){ if($page=="" || $page<=0)$page=1; $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE ipadd='".$whoinfo[0]."' AND browserm='".$whoinfo[1]."'")); $num_items = $noi[0]; //changable $items_per_page= 10; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; //changable sql $sql = "SELECT id, name FROM ibwf_users WHERE ipadd='".$whoinfo[0]."' AND browserm='".$whoinfo[1]."' ORDER BY name LIMIT $limit_start, $items_per_page"; echo " "; $items = mysql_query($sql); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { $lnk = "<a href=\"index.php?action=viewuser&who=$item[0]&sid=$sid\">$item[1]</a>"; echo "$lnk "; } } echo "</p>"; echo "<p align=\"center\">"; if($page>1) { $ppage = $page-1; echo "<a href=\"lists.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href=\"lists.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>"; } echo " $page/$num_pages "; if($num_pages>2) { echo $rets; $rets = "<form action=\"lists.php\" method=\"get\">"; $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>"; $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>"; $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>"; $rets .= "<input type=\"hidden\" name=\"who\" value=\"$who\"/>"; $rets .= "<input type=\"submit\" value=\"Go To Page\"/>"; $rets .= "</form>"; echo $rets; } echo "</p>"; }else{ echo "<p align=\"center\">"; echo "You can't view this list"; echo "</p>"; } ////// UNTILL HERE >> echo "<p align=\"center\">"; echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; echo "</p>"; echo "</body>"; } //////////////////////////////////Top Posters List else if($action=="topp") { addonline(getuid_sid($sid),"Top Forum Posters",""); echo "<head>"; echo "<title>Top Posters</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; echo "</head>"; echo "<body>"; echo "<p align=\"center\">"; echo "[b]Our Top Posters[/b] [size="1"]Thank you all for keeping this site alive "; $weekago = time(); $weekago -= 7*24*60*60; $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM ibwf_posts WHERE dtpost>'".$weekago."';")); echo "<a href=\"lists.php?action=tpweek&sid=$sid\">This week($noi[0])</a> "; $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM ibwf_posts;")); echo "<a href=\"lists.php?action=tptime&sid=$sid\">All the time($noi[0])</a>[/size] "; echo "</p>"; //////ALL LISTS SCRIPT << if($page=="" || $page<=0)$page=1; $num_items = regmemcount(); //changable $items_per_page= 10; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; //changable sql $sql = "SELECT id, name, posts FROM ibwf_users ORDER BY posts DESC LIMIT $limit_start, $items_per_page"; echo " "; $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { $lnk = "<a href=\"index.php?action=viewuser&who=$item[0]&sid=$sid\">$item[1]</a> [size="1"]Posts: $item[2][/size]"; echo "$lnk "; } } echo "</p>"; echo "<p align=\"center\">"; if($page>1) { $ppage = $page-1; echo "<a href=\"lists.php?action=topp&page=$ppage&sid=$sid&view=$view\">«PREV</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href=\"lists.php?action=topp&page=$npage&sid=$sid&view=$view\">Next»</a>"; } echo " $page/$num_pages "; if($num_pages>2) { $rets = "<form action=\"lists.php\" method=\"get\">"; $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>"; $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>"; $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>"; $rets .= "<input type=\"submit\" value=\"Go To Page\"/>"; $rets .= "</form>"; echo $rets; } echo "</p>"; ////// UNTILL HERE >> echo "<p align=\"center\">"; echo "[b]9 [/b]<a accesskey=\"9\" href=\"index.php?action=stats&sid=$sid\"><img src=\"../images/stat.gif\" alt=\"\"/>Site Stats</a> "; echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=stats&sid=$sid\"><img src=\"../images/stat.gif\" alt=\"\"/>Site Stats</a> "; echo "</p>"; echo "</body>"; ?> </html>
how can I resolve? thanks to whom answers me
Comment