コード例 #1
0
ファイル: AboutUser.php プロジェクト: pranphy/Blog
<?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 
コード例 #2
0
ファイル: Register.php プロジェクト: pranphy/Blog
<?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>