''){ //found user $uid=$uname[uid]; $ok=TRUE; }//end found user else{$ok=FALSE;} }//end cookie is set ?> "") {//print"p is set
"; $temp=stristr($HostID,'P'); $page=substr($temp,1); $temp=stripos($HostID,'P'); $HostID=substr($HostID,0,$temp-1); } else{// print"p is not set
"; } if ($page==''){$page=1;} if ((checkid($HostID) == TRUE) AND (checkpage($HostID,$page) == TRUE)){include"review_body.php";}else{write_error();} //if (checkid($HostID) == TRUE){print"id correct
";} //if (checkpage($HostID,$page) == TRUE){print"page correct
";} function checkpage($HostID,$page) { if (is_numeric($page)){// page is a number $result=mysql_query("SELECT COUNT(`ID`) FROM `review` WHERE`ID`='$HostID'"); $maximum=mysql_fetch_array($result); //print"maximum post are $maximum[0]
"; $maximum=ceil($maximum[0]/5);//print"maximum page is $maximum
"; if ($maximum==0){$maximum=1;} if (($page<1) OR ($page>$maximum)){return FALSE;break;}else {return TRUE;break;} } else{// page is not a number return FALSE;break; } } function write_error() { print"No required page found

No required page found.
Please go to Free Hosting Free Web Hosting Review

"; } function checkid($HostID) { if (is_numeric($HostID)){ $result=mysql_query("select MAX(`ID`) FROM `hostname` where 1"); $maximum=mysql_fetch_array($result); //print"maximum host are $maximum[0]
"; if ($HostID<1){return FALSE;break;}else{ if ($HostID >$maximum[0]){return FALSE;break;}else{return TRUE;break;} } //mysql_free_result($result); }// end $HostID is a number else{// $HostID is not a number return FALSE;break; } } mysql_close($link);// close database connection ?>