= 1){ while($row=mysql_fetch_row($result)) { $nid=$row[0]; $pagename=$row[1]; $category=$row[2]; $title=$row[3]; $metakeyword=$row[4]; $metadescription=$row[5]; $content=$row[6]; $ranking=$row[7]; $systemname=$row[8]; $parentcat = $row[9]; $uname=$row[11]; $upass=$row[12]; $category22=$row[2]; $pagename22=$row[1]; $content22=$row[6]; }//end while } // // Display Page Content // if ($pagename != "/" && $pagename != "/index.html") { $content=ereg_replace( "`", "'", $content); // // Figure out if page is passworded. // if ($uname != "") { $cookiename=ereg_replace( ".html", "", $pagename); $cookiename=ereg_replace( "/", "", $cookiename); $passpagename=ereg_replace( ".html", "", $pagename); $passpagename=ereg_replace( "/", "", $passpagename); $cookiename2 = ${$passpagename}; $cookievalue = $$cookiename; $cookiename3 = $$passpagename; if (${$passpagename} != "accon") { Header("Location: login.php?pageid=$pagename"); //echo "Diag: $cookiename | $cookievalue | $cookiename2 | $passpagename | $cookiename3"; exit(); } if ($cookiename2 == "accon") { include('inc/header.php'); echo "$content22"; include('inc/footer.php'); exit(); } } include('inc/header.php'); echo "$content22"; include('inc/footer.php'); } // // Index Page Content // if ($pagename == "/" ) { mysql_connect("$DBHost","$DBUser","$DBPass"); $result=mysql("$DBName","SELECT * FROM cms WHERE id = 13"); while($row=mysql_fetch_row($result)) { $nid=$row[0]; $category=$row[2]; $title=$row[3]; $metakeyword=$row[4]; $metadescription=$row[5]; $contenta=$row[6]; $ranking=$row[7]; $systemname=$row[8]; }//end while include('inc/header.php'); //$content=ereg_replace( "`", "'", $content); echo "$contenta"; include('inc/footer.php'); } if ($pagename == "/index.html" ) { mysql_connect("$DBHost","$DBUser","$DBPass"); $result=mysql("$DBName","SELECT * FROM cms WHERE id = 13"); while($row=mysql_fetch_row($result)) { $nid=$row[0]; $category=$row[2]; $title=$row[3]; $metakeyword=$row[4]; $metadescription=$row[5]; $contenta=$row[6]; $ranking=$row[7]; $systemname=$row[8]; }//end while include('inc/header.php'); //$content=ereg_replace( "`", "'", $content); echo "$contenta"; include('inc/footer.php'); } ?>