// // Pipecode is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Pipecode. If not, see <http://www.gnu.org/licenses/>. // $top_root = substr(dirname(__FILE__), 0, -8); $doc_root = "{$top_root}/www"; $main_root = "{$top_root}/main"; $user_root = "{$top_root}/user"; set_include_path("{$top_root}/include"); include "{$top_root}/lib/tools/tools.php"; if (fs_is_file("{$top_root}/conf.php")) { include "{$top_root}/conf.php"; } else { include "{$top_root}/setup.php"; die; } $db_table["captcha"]["key"] = "captcha_id"; $db_table["captcha"]["col"][] = "captcha_id"; $db_table["captcha"]["col"][] = "question"; $db_table["captcha"]["col"][] = "answer"; $db_table["captcha_challenge"]["key"] = "remote_ip"; $db_table["captcha_challenge"]["col"][] = "remote_ip"; $db_table["captcha_challenge"]["col"][] = "captcha_id"; $db_table["email_challenge"]["key"] = "challenge"; $db_table["email_challenge"]["col"][] = "challenge"; $db_table["email_challenge"]["col"][] = "username";
if (fs_is_file("{$root}/{$s1}.php")) { include "{$root}/{$s1}.php"; die; } else { if (fs_is_dir("{$root}/{$s1}")) { if ($s2 == "") { if (fs_is_file("{$root}/{$s1}/index.php")) { include "{$root}/{$s1}/index.php"; die; } } else { if (fs_is_file("{$root}/{$s1}/{$s2}.php")) { include "{$root}/{$s1}/{$s2}.php"; die; } if ($s3 != "" && fs_is_file("{$root}/{$s1}/{$s3}.php")) { include "{$root}/{$s1}/{$s3}.php"; die; } if (fs_is_file("{$root}/{$s1}/root.php")) { include "{$root}/{$s1}/root.php"; die; } } } } http_response_code(404); print_header(); writeln('<h1>404</h1>'); writeln('request_uri [' . $request_uri . ']'); print_footer();