Пример #1
0
<?php

include_once "User.Class.php";
$Array = array("FirstName" => "Prakash", "LastName" => "Gautam", "Age" => 22, "Sex" => "M", "PhoneNumber" => 9841434548, "EmailAddress" => "*****@*****.**", "Username" => "pranphy", "Password" => "Password", "SchoolName" => "Siddhartha Higher Secondary School", "SLCPercentage" => 90.125, "PlusTwoName" => "SOS HGS Sanothimi", "PlusTwoPercentage" => 82);
$User = new CommonUser($Array);
//$User->WriteToDatabase();
$User->DisplayBasicInfo();
Пример #2
0
 public function search()
 {
     $input = Input::all();
     $inputUser = CommonUser::seachUser($input);
     return View::make('admin.user.index')->with(compact('inputUser'));
 }
Пример #3
0
 /**
  * Returns the static model of the specified AR class.
  * @return User the static model class
  */
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }
Пример #4
0
<?php

if (!isset($_COOKIE["User"])) {
    header("Location: Login.php");
} else {
    require_once "User.Class.php";
    require_once "./include/Functions.php";
    $Username = strstr(Encrypt($_COOKIE["User"], true), " ", true);
    $Array = array("Username" => $Username);
    $User = new CommonUser($Array);
    $Message = $User->Exists();
    $FirstName = $User->BasicInfo["FirstName"];
    $LastName = $User->BasicInfo["LastName"];
    $PageTitle = "Ulitmate Entrance :: User Details ";
    $ContentTitle = "Details of Mr. {$FirstName} {$LastName} ";
    $TabName = "Welcome  {$FirstName}";
    //Double space here betn Welcome and FirstName
    if ($Message == NO_USERNAME) {
        header("Location: Login.php");
    } else {
        $Flag = 1;
    }
}
if ($Flag) {
    echo Headers($PageTitle, $ContentTitle, $TabName);
    ?>
    
		<table align="center" class="AboutMeTable">
          <tr>
            <td>First Name </td>
            <td><?php 
Пример #5
0
<?php

require_once "./include/Functions.php";
$PageTitle = "Ultimate Entrance :: Register New User ";
$ContentTitle = "Enter your registration details ";
$RegisterSuccessFlag = 0;
$Message = "Please, Fill in the following form ";
if (isset($_POST["SubmitButton"])) {
    require_once "User.Class.php";
    $CurrentUser = new CommonUser($_POST);
    $Message = $CurrentUser->Exists();
    if ($Message == NO_USERNAME) {
        $CurrentUser->WriteToDatabase();
    }
}
echo Headers($PageTitle, $ContentTitle, "Register");
?>
<table class="AllQuestionTable">
<tr>
	<td width="50%"><img height="100%" width="100%" src="images/RegisterCommunity.png" alt="Community register image" /></td>
<td align="center">	    
    <?php 
if ($Message == NO_USERNAME) {
    echo "Successfully registered ";
} else {
    echo $Message;
    require_once "include/RegisterForm.php";
}
?>
</td>
</tr>
Пример #6
0
<?php

require_once "./include/Constants.php";
require_once "User.Class.php";
if (isset($_COOKIE['User'])) {
    header("Location: AboutUser.php");
}
require_once "include/Functions.php";
$PageTitle = "Welcome to the login page";
$ContentTitle = " Existing users log on";
$LoginSuccessFlag = 0;
$Message = "";
if (isset($_POST['LoginButton'])) {
    $CurrentUser = new CommonUser($_POST);
    $Message = $CurrentUser->Exists();
    if ($Message == LOGIN_SUCCESS) {
        $UserName = $CurrentUser->LoginCredential["Username"] . " " . $CurrentUser->BasicInfo['FirstName'];
        $CookieValue = Encrypt($UserName);
        setcookie("User", $CookieValue, time() + 20 * 60);
        $Reference = "Location: index.php";
        header($Reference);
    }
}
echo Headers($PageTitle, $ContentTitle, "Log On");
?>
<table class="LoginTable">
<tr>
<td>
	<?php 
echo '<a href="Register.php">Or Create Account</a><br/>';
if ($Message != "") {