if(isset($ses_userid)) { header("Location:homepage.php?cmd=1"); exit; } include_once("classes.php"); if ($err=="XYABC") { $file = "login.php"; $title = "Login"; } else if ($err=="XYABA") { $file = "login.php"; $title = "Login"; } else if ($err=="XYABB") { $file = "login.php"; $title = "Login"; } else if(strlen($cmd)==0 || $cmd=="0") { $file = "mindex.htm"; $title = "HOME"; } else if($cmd=="1") { $file = "login.php"; $title = "LOGIN"; } else if($cmd=="2") { $file = "newmember.php"; $title = "REGISTRATION"; } else if($cmd=="3") { $file = "welcomepage.php"; $title = "WELCOME"; } else if($cmd=="4") { $file = "forgotpassword.php"; $title = "FORGOT PASSWORD"; } else if($cmd=="5") { $MemCon = new Member(); $sql="SELECT hint FROM atlas_member WHERE username='$userid'"; $res = $MemCon->MemberValidation($sql); if(mysql_num_rows($res)) { $row = mysql_fetch_object($res); $hint = $row->hint; } else { header("Location:startpage.php?cmd=4&err=XZC"); exit; } $file = "askhint.php"; $title = "FORGOT PASSWORD"; } else if($cmd=="6") { $file = "message.php"; $title = "FORGOT PASSWORD"; } else if($cmd=="7") { $file = "services.php"; $title = "SERVICES"; } else if($cmd=="8") { $file = "contactatlas.php"; $title = "CONTACT"; } else if($cmd=="9") { $file = "profile.php"; $title = "PROFILE"; } else if($cmd=="10") { $file = "policy.php"; $title = "POLICY"; } else if($cmd=="11") { $file = "faqs.php"; $title = "FAQ"; } else if($cmd=="12") { $file = "news.php"; $title = "NEWS"; } else if($cmd=="13") { $file = "contactdetails.php"; $title = "CONTACTDETAILS"; } //Writing to the Table if($flag==1) { $MemCon = new Member(); $sql="SELECT memid FROM atlas_member WHERE username='$userid'"; $res = $MemCon->MemberValidation($sql); if(mysql_num_rows($res)) { $alert = "The UserId already exists. Enter some other UserId."; } else { $rdate = date("Y-m-d"); $sql = "INSERT INTO atlas_member (username,password,fname,lname,email,address,address2,city,state,country,zipcode,regdate,hint,answer) VALUES ('$userid','$password1','$fname','$lname','$email','$address1','$address2','$city','$state','$country','$zip','$rdate','$hint','$answer')"; $MemCon->InsertMember($sql); header("Location:startpage.php?cmd=3&uname=$userid&pwd=$password1&email=$email"); exit; } } ?>
include_once("top.php"); ?> |
include_once($file); ?> |
include_once("bottom.php"); ?> |