") != 0) { $pwforconfig = str_replace("","",$pwconfig[$i]); break; } } //echo $pwforconfig . $pw; if($pw != $pwforconfig) { header("Location: /admin/login.php"); exit; } } } function makepermalink($thisurl) { $thisurl=str_replace ( " ", "-", $thisurl); $thisurl = preg_replace("/[^a-z0-9-_]/i","",$thisurl); return strtolower(trim($thisurl)); } function pagecount() { $d="../articles/"; $dir = opendir($d); while ($f = readdir($dir)) { $contentcenter = $contentcenter+1; } $contentcenter=$contentcenter-3; return $contentcenter; } function myconfig($findwhat) { $d="./"; $dir = opendir($d); while ($f = readdir($dir)) { $thefile="config.php"; $pos = strpos($f, $thefile); if ($pos === false) { } else { //found so go get the details $myFile = $thefile; $fh = fopen($myFile, 'r'); $data = fread($fh, filesize($myFile)); fclose($fh); switch ($findwhat) { case "template": $text = explode("",$data); break; case "index": $text = explode("",$data); break; case "sitename": $text = explode("",$data); break; case "password": $text = explode("",$data); break; case "email": $text = explode("",$data); break; } $contentcenter .= trim($text[1]); } } return $contentcenter; } //had to do because relative is different, this works for folder one deep function adminmyconfig($findwhat) { $d="../"; $dir = opendir($d); while ($f = readdir($dir)) { $thefile="config.php"; $pos = strpos($f, $thefile); if ($pos === false) { } else { //found so go get the details $myFile = "../" . $thefile; $fh = fopen($myFile, 'r'); $data = fread($fh, filesize($myFile)); fclose($fh); switch ($findwhat) { case "template": $text = explode("",$data); break; case "index": $text = explode("",$data); break; case "sitename": $text = explode("",$data); break; case "password": $text = explode("",$data); break; case "email": $text = explode("",$data); break; } $contentcenter .= trim($text[1]); } } return $contentcenter; } ?>
Fatal error: Call to undefined function myconfig() in /var/www/la-osteoporosis.com/index.php on line 11