-
Notifications
You must be signed in to change notification settings - Fork 3
/
nagment_pwd.php
55 lines (55 loc) · 1.87 KB
/
nagment_pwd.php
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
session_start();
include("phpconf.php");
include("func.php");
conDB();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<title>ÃкºÍÔ¹·ÃÒà¹çµ | <?php echo " ".$Hospname." "; ?> | - - Magnement User - - |</title>
<style type="text/css">
<!--
body { margin: 0px 0px; padding: 0px 0px}
body{font-family:MS Sans Serif;font-size:10pt}
table,td{font-family:MS Sans Serif;font-size:10pt}
form{font-family:MS Sans Serif;font-size:10pt}
-->
</style>
<?php
//set theme
print "<link href='css/$Theme.css' rel='stylesheet' type='text/css'>";
?>
</head>
<body>
<?php
$ip=get_ip();//func get ip from computer
$online=Check_Online($ip); //func check online
if (!$online){ //ch login
if (!$_SESSION['ip_Log'] or $_SESSION['ip_Log']){
echo "<center><h2><font color=red>·èÒ¹äÁèÁÕÊÔ·¸Ôãªé§Ò¹Ë¹éÒ¹Õé</font></h2></center>";
session_unregister("ip_Log");
echo "<META HTTP-EQUIV='REFRESH' CONTENT='1; URL=index.php'>";}
}else{
$user=$_POST['s_user']; //user at select
$s_user=$_SESSION['ip_Log']; //self user
$sql1="DELETE FROM web_pwd WHERE loginname ='$user' ";
$sql2="DELETE FROM web_pwd WHERE loginname ='$s_user' ";
if($_POST['s_clear']=="user"){
//select "user";
mysql_query($sql2)
or die("¡ÒõԴµèÍ°Ò¹¢éÍÁÙżԴ¾ÅÒ´".mysql_error());
echo "<center><font color=red><h2>¡àÅÔ¡ÃËÑʼèÒ¹ àÕÃÕºÃéÍÂáÅéÇ</h2></font><br><a href=result_chlogin.php>Âé͹¡ÅѺ</a>
<a href=".$PHP_SELF.">·ÓÃÒ¡ÒÃãËÁè</a></center>";
}elseif($_POST['s_clear']=="self"){
//select user is admin on self
mysql_query($sql2)
or die("¡ÒõԴµèÍ°Ò¹¢éÍÁÙżԴ¾ÅÒ´".mysql_error());
echo "<center><font color=red><h2>¡àÅÔ¡ÃËÑʼèÒ¹ àÕÃÕºÃéÍÂáÅéÇ</h2></font><br><a href=result_chlogin.php>Âé͹¡ÅѺ</a>
<a href=managment_user.php>·ÓÃÒ¡ÒÃãËÁè</a></center>";
}//if
}//ch login
closeDB;
?>
</body>
</html>