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/loginapprove.php
<? 
session_start();
	include ("inc/conndb_nonsession.inc.php")  ;
	session_register("session_tmp_user");
	session_register("session_tmp_pass");

	// SET IP Address ตามภาค กลาง(1) ใต้(2) อีสาน(3) หนือ(4)
	$IP_TTT = "202.69.143.76";
	$IP_CAT1 = "61.7.155.244";
	$IP_CAT2 = "61.7.155.245";

/*
//	$IP_TTT = "www.pdc-obec.com";
//	$IP_CAT1 = $IP_TTT;

	$IP_LIST = array(
		""=>"$IP_CAT2",
		"0"=>"$IP_TTT",
		"1"=>"$IP_CAT1",
		"2"=>"$IP_CAT2",
		"3"=>"$IP_TTT",
		"4"=>"$IP_CAT1"
	);

*/

if ($Login != "" ){


	$x = explode(".", $txtusername) ; 
	$lastarr = count($x)-1 ; ############### Get Last record
	if ($lastarr ==0){
		$xarea_name = "obec" ; 
	}else{
		$xarea_name =  $x[$lastarr] ; 
		echo " ขออภัยครับ สำหรับการรับรองข้อมูล โดยสำนักจากส่วนกลาง เท่านั้น ";
		die ; 
	}
	$_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 == "") $xip=$IP_CAT1;
		//$result = @file("http://$xip/vc_master/loginall.php?txtusername=" . urlencode($txtusername) . "&txtpass=" . urlencode($txtpass));


		$url = "http://$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; 

}





?>

<html>
<head>
<title>เข้าสู่ระบบฐานข้อมูล</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<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>

<script type="text/javascript">

/***********************************************
* Dynamic Countdown script- ฉ Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function cdtime(container, targetdate){
if (!document.getElementById || !document.getElementById(container)) return
this.container=document.getElementById(container)
this.currentTime=new Date("<?=date("F j, Y H:i:s");?>")
this.targetdate=new Date(targetdate)
this.timesup=false
this.updateTime()
}

cdtime.prototype.updateTime=function(){
var thisobj=this
this.currentTime.setSeconds(this.currentTime.getSeconds()+1)
setTimeout(function(){thisobj.updateTime()}, 1000) //update time every second
}

cdtime.prototype.displaycountdown=function(baseunit, functionref){
this.baseunit=baseunit
this.formatresults=functionref
this.showresults()
}

cdtime.prototype.showresults=function(){
var thisobj=this


var timediff=(this.targetdate-this.currentTime)/1000 //difference btw target date and current date, in seconds
if (timediff<0){ //if time is up
this.timesup=true
this.container.innerHTML=this.formatresults()
return
}
var oneMinute=60 //minute unit in seconds
var oneHour=60*60 //hour unit in seconds
var oneDay=60*60*24 //day unit in seconds
var dayfield=Math.floor(timediff/oneDay)
var hourfield=Math.floor((timediff-dayfield*oneDay)/oneHour)
var minutefield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour)/oneMinute)
var secondfield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour-minutefield*oneMinute))
if (this.baseunit=="hours"){ //if base unit is hours, set "hourfield" to be topmost level
hourfield=dayfield*24+hourfield
dayfield="n/a"
}
else if (this.baseunit=="minutes"){ //if base unit is minutes, set "minutefield" to be topmost level
minutefield=dayfield*24*60+hourfield*60+minutefield
dayfield=hourfield="n/a"
}
else if (this.baseunit=="seconds"){ //if base unit is seconds, set "secondfield" to be topmost level
var secondfield=timediff
dayfield=hourfield=minutefield="n/a"
}
this.container.innerHTML=this.formatresults(dayfield, hourfield, minutefield, secondfield)
setTimeout(function(){thisobj.showresults()}, 1000) //update results every second
}

/////CUSTOM FORMAT OUTPUT FUNCTIONS BELOW//////////////////////////////

//Create your own custom format function to pass into cdtime.displaycountdown()
//Use arguments[0] to access "Days" left
//Use arguments[1] to access "Hours" left
//Use arguments[2] to access "Minutes" left
//Use arguments[3] to access "Seconds" left

//The values of these arguments may change depending on the "baseunit" parameter of cdtime.displaycountdown()
//For example, if "baseunit" is set to "hours", arguments[0] becomes meaningless and contains "n/a"
//For example, if "baseunit" is set to "minutes", arguments[0] and arguments[1] become meaningless etc


function formatresults(){
if (this.timesup==false){//if target date/time not yet met
var displaystring=" คุณสามารถใช้งานระบบได้อีก "+arguments[0]+" วัน "+arguments[1]+" ชั่วโมง "+arguments[2]+" นาที "+arguments[3]+" วินาที"
}
else{ //else if target date/time met
var displaystring="Future date is here!"
}
return displaystring
}

function formatresults2(){
if (this.timesup==false){ //if target date/time not yet met
var displaystring="<span class='lcdstyle'>"+arguments[0]+" <sup>days</sup> "+arguments[1]+" <sup>hours</sup> "+arguments[2]+" <sup>minutes</sup> "+arguments[3]+" <sup>seconds</sup></span> left until this Christmas"
}
else{ //else if target date/time met
var displaystring="" //Don't display any text
alert("Christmas is here!") //Instead, perform a custom alert
}
return displaystring
}

</script>

<link href="common/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {color: #FFCC00}
.style4 {
	color: #000099;
	font-weight: bold;
}
.style5 {
	color: #FF0000;
	font-weight: bold;
}
.style10 {
	color: #0099CC;
	font-weight: bold;
}
-->
</style>
</head>

<body>
<form action="?" method="post" name="form1"     onSubmit="return checkFields()"     >
<br>
<table width="480" border="0" align="center" cellpadding="5" cellspacing="5" bgcolor="#F2F3F5">
<tr align="center">
  <td colspan="2">เข้าสู่ระบบสำหรับผู้รับรองข้อมูล สำนักต่าง ๆ </td>
</tr>
  <tr>
    <td colspan="2" align="center">
    </td>
  </tr>
  <tr>
    <td width="294" align="center"><img src="images_sys/secu.png" width="64" height="64"  ><br>
      กรุณากรอกชื่อผู้ใช้และรหัสผ่านเข้าสู่ระบบ</td>
    <td width="271" align="right"><table border="0" cellpadding="2" cellspacing="2" bgcolor="#F8F8F8">
      <tr align="center">
        <td colspan="2"    class="headerTB style2"   >&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><input name="Login" type="submit" id="Login" value="เข้าสู่ระบบ"     >
		
		<input type="button" name="Button" value="ยกเลิก" onClick="history.go(-1) ">		</td>
      </tr>
    </table></td>
  </tr>
</table>
<tr>
<tr><td width="983"><p>

Anon7 - 2021