session_start(); $path = "/home/sm3k1rnvpb27/public_html"; require $path."/cgi/importFile.php"; // first thing in this page make the generated random numbers invalid // set the logged in flag $invalidInput235790L = "no23457890MN"; /* loginOk=0: user is not logged in. loginOk=2: login failed. loginOk=1: user is logged in. */ $loginOk = 0; $user = ""; $fname =""; if($_SESSION['user234loggedin5L'] != "userLoggedIn57259MnLN"){ // check if the user sent login information. if(isset($_POST['user']) && isset($_POST['pass'])){ $user = $_POST['user']; $user = strtolower($user); $pass = $_POST['pass']; $array = isUserValid($user, $pass); $val = $array[0]; $fname = $array[1]; $lname = $array[2]; $is_business = $array[3]; $user_id = $array[4]; $can_post = $array[5]; if($val == 1){ if(isset($_COOKIE["mn23mollmn7890Lm"])){ $_SESSION['user234loggedin5L'] = "userLoggedIn57259MnLN"; $_SESSION['user5237Id']=$user_id; $_SESSION['is_business']=$is_business; $loginOk = 1; $_SESSION['user5237']=$user; $_SESSION['firstname'] = $fname; $_SESSION['canPostNews'] = $can_post; } } else $loginOk = 2; //check the user and password validity. } $invalidInput235790L = "yes"; } else{ $user = $_SESSION['user5237']; $fname = $_SESSION['firstname']; $loginOk = 1; $can_post_news=canSubmitNews($user); $_SESSION['canPostNews'] = $can_post_news; } ?>
| include "left.include"; ?> | - |
Login failed.} else{ ?> You are not logged in.You should log in to submit your article.} include "login.include"; } else{ ?> if($_SESSION['canPostNews'] == 0){ ?> You can not post news.} else{ ?>Please before submitting your news, read news guidelines. Please select the file contianing your article by clicking on the browse button. Once selected click on Upload File button to upload the file. } } ?> |
include ""; ?> | ||||