-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatus.php
More file actions
41 lines (35 loc) · 1.45 KB
/
Copy pathstatus.php
File metadata and controls
41 lines (35 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
header("Content-Type: text/html; charset=gbk");
include_once ("smarty_header.php");
include_once ("connect.php");
include_once ("check_session.php");
$name = $_SESSION ["name"];
//echo $name;
$sql = "select * from user where name = '$name'";
$result = mysql_query ( $sql );
$in_user = mysql_fetch_array ( $result );
$smarty->assign ( "name", $in_user ['name'] );
$smarty->assign ( "password", $in_user ['password'] );
$smarty->assign ( "paytime", $in_user ['paytime'] );
$smarty->assign ( "overtime", $in_user ['overtime'] );
$smarty->assign ( "taobao_name", $in_user ['taobao_name'] );
$smarty->assign ( "qq", $in_user ['qq'] );
$smarty->assign ( "email", $in_user ['email'] );
$smarty->assign ( "regtime", $in_user ['regtime'] );
$today = date ( "Y-m-d" );
$r = substr ( $today, 8, 2 ); //日
$y = substr ( $today, 5, 2 ); //月
$n = substr ( $today, 0, 4 ); //年
$yestoday = date ( "Y-m-d", mktime ( 0, 0, 0, $y, $r - 1, $n ) );
$daybeyes = date ( "Y-m-d", mktime ( 0, 0, 0, $y, $r - 2, $n ) );
if ($in_user ['regtime'] == $today || $in_user ['regtime'] == $yestoday || $in_user ['regtime'] == $daybeyes) {
$sql = "select * from user where name = 'test'";
$result = mysql_query ( $sql );
$test = mysql_fetch_array ( $result );
$smarty->assign ( "testpassword", $test ['password'] );
}
if($_GET[method] == 'reg')
echo "<font color=red>注册成功!!并已登陆进系统</font>";
$smarty->display ( "status.html" );
//print_r($in_user);
?>