Skip to content

Commit

Permalink
Fix some php notice and change some template
Browse files Browse the repository at this point in the history
  • Loading branch information
domen111 committed Apr 26, 2015
1 parent c0a7d8c commit 9975f5a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion login.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
$expire = 0;
else
$expire = time()+60*60*24*$config["session"]["expire"];
setcookie("login",$hash,$expire,$config["session"]["cookie_path"],$config["session"]["domain"],false,true);
setcookie("login",$hash,$expire,$config["session"]["cookie_path"],$config["session"]["cookie_domain"],false,true);

//set DB
$db = PDO_prepare("INSERT INTO `table:session` (`id`, `expire`, `cookie`) VALUES (:id, DATE_ADD(CURDATE(),INTERVAL :expire DAY), :cookie)");
Expand Down
4 changes: 2 additions & 2 deletions template/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
<td height="25" valign="middle" bgcolor="#0000FF" style="color: #FFF">
<div style="float:left;">
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="./" target="_parent" style="color:#FFF" >首頁</a>
<a href="./" target="_parent" style="color:#FFF" >Home</a>
</div>
</td>
<td height="25" valign="middle" bgcolor="#0000FF" style="text-align: right; color: #FFF;">
<?php if($E["login"]===true){ ?>
<?php if(isset($E["login"]) && $E["login"]===true){ ?>
<?=$E["nick"]?>(<?=$E["acct"]?>)
<a href="logout.php?continue=index.php" style="color:#FFF">logout</a>
<?php }else{ ?>
Expand Down
8 changes: 1 addition & 7 deletions template/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@
<?php require("header.php"); ?>

<center>
<?php if($E["login"]===true){ ?>
your nickname: <?=$E["nick"]?><br>
your account: <?=$E["acct"]?>
<a href="logout.php?continue=index.php">logout</a>
<?php }else{ ?>
<a href="login.php">login</a>
<?php } ?>
This is the homepage of TFcis Login Integration System.
</center>

<?php require("footer.php"); ?>
6 changes: 3 additions & 3 deletions template/signup.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

<center>
<form method="POST">
Account: <input type="text" name="account" required value="<?=$E["POST"]["account"]?>"><br>
Account: <input type="text" name="account" required value="<?=@$E["POST"]["account"]?>"><br>
Password: <input type="password" required name="password"><br>
Confirm: <input type="password" required name="password2"><br>
Nickname: <input type="text" name="nickname" required value="<?=$E["POST"]["nickname"]?>"><br>
E-mail: <input type="email" name="email" required value="<?=$E["POST"]["email"]?>"><br>
Nickname: <input type="text" name="nickname" required value="<?=@$E["POST"]["nickname"]?>"><br>
E-mail: <input type="email" name="email" required value="<?=@$E["POST"]["email"]?>"><br>
<input type="submit" value="signup">
</form>
</center>
Expand Down

0 comments on commit 9975f5a

Please sign in to comment.