If you guess what it's for and what it does, you can have a cookie.
Moved by Agesilaus (Forum Moderator) from Designing & Development: Please post in the correct forum next time.PHP Code:<?php
session_start();
$start_count = microtime();
include("core/conf_global.php");
include("core/class_core.php");
include("core/class_db.php");
include("core/class_template.php");
// Include the code + the DB thingy... doodad >_>
$core = new main_core;
$core->db = new db_core;
$core->template = new template_core;
$core->db->core =& $core;
$core->template->core =& $core;
$core->template->db =& $core->db;
$core->db->init_db();
$start_compile_time = microtime();
switch( $_GET["act"] )
{
case "login":
$core->process_login( $_POST["username"], $_POST["password"] );
break;
case "main":
// As this will take on multiple pages, we need to do things a little differently.
// First is just a page verification check, then we can move on, then we'll move on.
if( file_exists( "pages/" . $_GET["page"] . ".php" ) )
{
$core->template->compile_template( $_GET["page"], "kp_blue", "main" );
}
else
{
$core->template->compile_template( "welcome", "kp_blue", "main" );
}
break;
default:
$core->template->compile_template( "", "kp_blue", "login" );
break;
}
$end_compile_time = microtime();
$end_count = microtime();
echo("<!--\nTotal time to complete entire script: " . ($end_count - $start_count) . " Seconds\n" .
"Total time to complete page functions: " . ($end_compile_time - $start_compile_time) . " Seconds\n-->");
?>![]()






Reply With Quote





