"; //print_r($_SESSION); //print ""; //print_r($_SERVER); require '../engine/inc/sands.class.php'; require '../engine/smarty/libs/Smarty.class.php'; $sands = new sands; $tpl = new Smarty; $tpl->assign('session',$_SESSION); $tpl->assign('fullUrl',$_SERVER['REQUEST_URI']); $tpl->assign('txt',$sands->txt); $tpl->assign('moda',$sands->monthday[$_SESSION['site']['lang']]); switch ($_GET['p']) { case "login": $tplf = 'login'; break; case "new": $tplf = 'new'; break; case "clienterrors": $tplf = 'clienterrors'; break; case "errors": $tplf = 'errors'; break; case "allerrors": $tplf = 'allerrors'; break; case "edit": $tplf = 'edit'; break; case "email": $tplf = 'email'; break; case "registered": $tplf = 'registered'; break; case "remarks": $tplf = 'remarks'; break; case "users": $tplf = 'users'; break; case "archive": $tplf = 'archive'; break; case "allarchive": $tplf = 'allarchive'; break; case "newpass": $tplf = 'newpass'; break; default: $tplf = 'main'; break; } if ($tplf == 'new') { $tpl->assign('clients',$sands->getClients()); $tpl->assign('collegues',$sands->getCollegues($_SESSION['user']['companyid'])); } if ($tplf == 'errors') { // juzer eddig bejelentett hibai - csak akkor, ha admin $tpl->assign('errors',$sands->getClientErrors($_SESSION['user']['companyid'])); } if ($tplf == 'archive') { // juzer eddig bejelentett regi hibai - csak akkor, ha admin $tpl->assign('errors',$sands->getClientErrors($_SESSION['user']['companyid'],'archive')); } if ($tplf == 'allarchive') { $tpl->assign('errors',$sands->listClientErrors('archive')); $tpl->assign('clients',$sands->getCompanies()); $tpl->assign('archivepage','y'); } if ($tplf == 'allerrors' && ($_SESSION['user']['companyid'] == '1' || $_SESSION['user']['companyid'] == '2')) { $tpl->assign('errors',$sands->listClientErrors()); $tpl->assign('clients',$sands->getCompanies()); } if ($tplf == 'edit' && ($_SESSION['user']['companyid'] == '1' || $_SESSION['user']['companyid'] == '2')) { $data = $sands->getError($_GET['id']); $tpl->assign('data',$data); $tpl->assign('collegues',$sands->getCollegues($_SESSION['user']['companyid'])); } if ($tplf == 'email' && ($_SESSION['user']['companyid'] == '1' || $_SESSION['user']['companyid'] == '2')) { $data = $sands->getError($_GET['id']); $tpl->assign('data',$data); $tpl->assign('collegues',$sands->getCollegues($_SESSION['user']['companyid'])); } if ($tplf == 'remarks') { $data = $sands->getError($_GET['e'],$_SESSION['user']['companyid']); $tpl->assign('collegues',$sands->getCollegues(2)); $tpl->assign('data',$data); } if ($tplf == 'users') { if ($_GET['do'] == 'editcompany') { $tpl->assign('companydata',$sands->getCompanyData($_GET['id'])); $tpl->assign('collegues',$sands->getCollegues($_GET['id'])); } if ($_GET['do'] == 'edituser') { $tpl->assign('udata',$sands->getUserData($_GET['id'])); } $tpl->assign('clients',$sands->getCompanies()); $tpl->assign('users',$sands->getUsers()); } $tpl->assign('emaillogin',$_COOKIE['sandsloginemail']); if ($_COOKIE['sandsloginemail'] != '') { $tpl->assign('dofocus',' onload="passlogin.focus();"'); } $tpl->assign('page',$tplf.'.tpl'); $tpl->assign('get',$_GET); $tpl->display('index.tpl'); $_SESSION['site']['notemessage']=NULL; $_SESSION['site']['clienterrorlist']=NULL; //print_r($_SESSION); //print $_SESSION['site']['maxstep']; $_SESSION['site']['adminpages'] = NULL; ?>