0 ) || (strlen($spamrid2['host'])>0 ) ) exit ('Here is the answer ...'); if(empty($lan)) $lan = 'en'; $cale = $lan . '/' . $m; $tpath = $lan . '/' .$m; // ------------------------------------------------------------------------------------- ActionPerform(); // ------------------------------------------------------------------------------------- // If User is not logged, but tries to access a page inside Control Panel we display an error if ( ($_SESSION['UserId']==0) and ($page!='') ) $mmsg[0] = $HtmlErrorStart2 . $msgErrorNotLogged . $HtmlErrorEnd2; // ------------------------------------------------------------------------------------- // If user tries to login, we verify credientials if ( ($_SESSION['UserId'] == 0) AND ($action == 'login') ) UserLogin(); // ------------------------------------------------------------------------------------- // If user appears to be logged, check the loguser table to make sure //if ( ($_SESSION['UserId'] > 0) && ($v == '') ) loguserCheck(); if ( ($_SESSION['UserId'] == 0) || ($pt == 'popup') || ($v != '') ) { // ------------------------------------------------------------------------------------- // Show User home page as the user is not logged // If v is empty, initialize it if(empty($v)) $v = 'home'; // Procesing pages that have not been submited via post switch ($v) { case 'signupconfirm' : UserSignupConfirm(); break; case 'deleteaccount' : GetDeleteAccount(); break; } if ($_POST) // A plangeri has been submited switch ($v) { case 'signup' : if ($action=='vsignup') UserSignup(); break; case 'lostpassword' : if ($action=='reset') UserPasswordReset(); break; case 'contact' : if ($action=='sendfeedback') SendFeedBack(); break; case 'deleteaccount' : DeleteUser(); break; } // display the home page include $tpath . 'hheadstart.html'; if ($pt != 'popup') include $tpath . 'head' . $v . '.html'; include $tpath . 'hheadend.html'; if ($pt != 'popup') include $tpath . 'header.html'; include $tpath . 'body' . $v . '.html'; if ($pt != 'popup') include $tpath . 'footer.html'; include $tpath . 'hend.html'; } else { // ------------------------------------------------------------------------------------- // Show control pannel as user is logged if ( ( $page !='' ) and ($page != $_SESSION['page'] ) and ($pt != 'popup' ) ) $_SESSION['lastpage'] = $_SESSION['page']; if ($page == '' ) { $page = $_SESSION['page']; } else { if ($pt != 'popup' ) $_SESSION['page'] = $page; } DeleteAskedRecords(); // Delete any records asked $rsclass = 'rswhite'; $UserId = $_SESSION['UserId']; // Load Plan from database $query="SELECT Plan FROM user WHERE UserId='$UserId'"; $result=mysql_query($query); if ($row=mysql_fetch_assoc($result)) $Plan = $row['Plan']; if ($_POST) { // Forms were submitted SavePage(); // Save data from curent page } else GetPage(); // Read data from database for curent page // display the control pannel include $tpath . 'hheadstart.html'; include $tpath . 'headcp.html'; include $tpath . 'hheadendcp.html'; if ( $pt != 'popup' ) { // Window is normal, show header and left menu include $tpath . 'header.html'; } else include $tpath . 'popstart.html'; // Window is popop, show popup header if ($page == '' ) $page = 'home'; // control panel page include $tpath . 'page' . $page . '.html'; if ( $pt != 'popup' ) { // Window is normal, show footer include $tpath . 'footercp.html'; include $tpath . 'hendcp.html'; } else include $tpath . 'popend.html'; // Window is popop, show popup footer } // end control panel ?>