Exemplo n.º 1
0
if (isset($_GET['lang'])) {
    $thulit['lang'] = $_GET['lang'];
}
if (isset($_GET['action']) && $_GET['action'] == "logout" && $a->checkAuth()) {
    $a->logout();
    $a->start();
}
$user = get_user();
$smarty->assign('_user', $user);
//var_dump($_POST);
//echo $_GET['site'];
if (isset($_POST['edit'])) {
    save_edit();
}
$thulit['site'] = $_SERVER["HTTP_HOST"];
if (isset($_GET["lang"])) {
    $thulit['lang'] = $_GET["lang"];
}
if (isset($_GET["page"])) {
    $thulit['page'] = $_GET["page"];
}
display_site($thulit['site'], null);
//display_root($_GET['page'],null);
//echo $_GET['edit'];
//initialization of page time counter
//$timer_start=Time()+SubStr(MicroTime(),0,8);
// log access
//phpOpenTracker::log();
//echo "\n\n\n\n\n\n<br /><br /><br /><br /><br /><br /><a href='admin.php'>admin</a>";
//echo page creation time
//echo "<div id='time_value'><br /><br />".SubStr((Time()+SubStr(MicroTime(),0,8)-$timer_start),0,7)."<br /></div>";
Exemplo n.º 2
0
 private function check_redirects()
 {
     global $thulit;
     if (isset($this->properties['redirect']) && $this->properties['redirect'] != "") {
         $redirect = $this->properties['redirect'];
         unset($this->properties['redirect']);
         //because properties are heritable and I don't want infinite loop
         header("Location: http://" . $redirect . "/" . $thulit["lang"] . "/" . $thulit["page"]);
         exit;
     }
     if (isset($this->properties['rewrite']) && $this->properties['rewrite'] != "") {
         $rewrite = $this->properties['rewrite'];
         unset($this->properties['rewrite']);
         //because properties are heritable and I don't want infinite loop
         display_site($rewrite, $this);
     }
 }