browser_info=$HTTP_POST_VARS['browser_info']; #include("client/host.php"); $doDebug=0; if($doDebug==1)setStartTime(); if($style=='print' || $printing=='true')$doDebug=0; include ("include/classes.php"); $PORTAL_INIT=new DBmysql; $PORTAL_INIT->dbConnect(); $SYS->initPortal($PORTAL_INIT); #if($SYS->SESSION_VAL[DEBUG]==1 && $doDebug==1)error_reporting(E_ALL); if($app=='login' )include('login.php'); if($action=='logout') { #echo "LOGOUT"; $_quest=$USER->logout(); $app='user'; $action='logout'; } if(empty($app))$app=$SYS->value[start_modul]; #if($SYS->SESSION_VAL['LOGIN']=='test')#TEST if(!$USER->validLogin()) { $form[login_message]=$SYS->SESSION_VAL['login_message']."
"; $form[_continue]=$HTTP_REFERER; $form[main_app]=$app; if($SYS->value['new_register_box']==''){ $form[new_register_box_start]='WER'; } $form[login_box]=$TPL->get('login_box',$_row,$form); $SYS->loginbox=$form[login_box]; } else { #echo "IS-LOGON"; $form[main_app]=$app; $form[user_id]=$SYS->SESSION_VAL['user_id']; $form[user_content]=$SYS->user_files; $form[user_menu]=$TPL->get('user_menu',$_row,$form); } $SYS->application=getApplication($app).".php"; #echo "AP:".$SYS->application; $TPL->addStyle('def'); /* if($debug==1) { $PORTAL_URI='http://'.$HTTP_HOST.'?_sid='.$SYS->SID; include('include/debug.php'); exit; } */ #if($SYS->SESSION_VAL[DEBUG]==1 && $doDebug==1)include('include/debug_panel.php'); #$style=="diabook" || if($style=="diabook" || $style=="diashow" || $app=="colors" || $style=='single') { include('single.php'); } elseif($style=="print") { // $_printer_link='http://'.$HTTP_HOST.ereg_replace("style=print","printing=true",$REQUEST_URI); $_printer_link='http://'.$HTTP_HOST.preg_replace("/style=print/","printing=true",$REQUEST_URI); $_panel_link='http://'.$HTTP_HOST.'/index.php?app=printer&printing=true&panel=1'.$SYS->link; include('printer.php'); exit; } elseif($_GET['style']=='ajax') { include($SYS->application); } else { if($_SESSION['test']==1){ if(file_exists('client/_menu.php')){ include('client/_menu.php'); }else{ include('_menu.php'); } } else { include('menu.php'); } if($SYS->application == 'start.php') { include("frame.php"); } elseif($printing == false) { include("frame.php"); } else { include($SYS->application); } } //$TPL->body=ereg_replace('_USER_LOGIN_NAME_',$SYS->SESSION_VAL['user_id'],$TPL->body); $TPL->body=preg_replace('/_USER_LOGIN_NAME_/',$SYS->SESSION_VAL['user_id'],$TPL->body); if($SYS->SESSION_VAL['user_login'] == 'valid' && $SYS->SESSION_VAL['userid'] != 3) { #echo "KUNDEN-MENU"; $km_link="index.php?app=user".$SYS->link; $USER_LOGIN_MENU="".Kunden.""; } else { #$km_link="index.php?app=user".$SYS->link; #$USER_LOGIN_MENU="".$SYS->wording['login'].""; } //$TPL->body=ereg_replace('#USER_LOGIN_MENU#',$USER_LOGIN_MENU,$TPL->body); $TPL->body=preg_replace('/#USER_LOGIN_MENU#/',$USER_LOGIN_MENU,$TPL->body); $TPL->output(); #if($SYS->SESSION_VAL[DEBUG]==1 && $doDebug==1)viewDebug(); $PORTAL_INIT=new DBmysql; $PORTAL_INIT->dbConnect(); $SYS->addSESSION_VAL('start_logger',1,$PORTAL_INIT); $PORTAL_INIT->dbDisconnect(); exit; function getApplication($_app) { if(file_exists('client/'.$_app.'.php')) { return('client/'.$_app); } elseif(file_exists($_app.'.php')) { return($_app); } else { die("(NO EXISTS: $_app) APPLICATION PANIK!!!"); } } function viewDebug() { return(false); global $con_count,$REQUEST_URI,$SYS; $SYS->getDebVal('SYS',$SYS); $_sesval=$SYS->SESSION_VAL; if($con_count <= 1) { $_dbcol="silver"; } elseif($con_count == 2) { $_dbcol="orange"; } else { $_dbcol="red"; } $_RUNTIME=viewRunTime(); $fp_dbc = fopen ("tmp/".$SYS->SID."_debug_dbcon.html","a"); fwrite($fp_dbc,"
DB-CON:$con_count $_RUNTIME => ".htmlspecialchars($REQUEST_URI)."
"); fclose($fp_dbc); for($i=0;$i < count($_sesval);$i++) { $_valout.=key($_sesval).'='.current($_sesval).'
'; next($_sesval); } $fp_dbc = fopen ("tmp/".$SYS->SID."_debug_session.html","a"); fwrite($fp_dbc,"
SESSION_VAL: ".htmlspecialchars($REQUEST_URI)."
".$_valout); fclose($fp_dbc); echo ""; } function setStartTime() { global $time_start; $time_start = microtime_float(); } function microtime_float() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } function viewRunTime() { global $time_start; $time_end = microtime_float(); $time = $time_end - $time_start; $runtime_info.=" (RT: $time sec.) "; return($runtime_info); } ?>