|
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 : |
<?
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");
// include ("inc/conndb.inc.php") ;
// include ("inc/std_function.inc.php") ;
$vcserverip = "123.242.173.131" ;
//--------------------- ปิดระบบ ----------------------------------
//Data Pulled From Database
$database ="2018-07-14 18:00:00";
//Expire in hours
$expirehour = 8;
//Split Time & Date
$splitdatetime = explode(" ", $database);
$date = $splitdatetime[0];
$time = $splitdatetime[1];
//Split Date
$splitdate = explode("-", $date);
$year = $splitdate[0];
$month = $splitdate[1];
$day = $splitdate[2];
//Split Time
$splittime = explode(":", $time);
$hour = $splittime[0];
$min = $splittime[1];
$sec = $splittime[2];
//When does the time expire ?
$expiretime = date("Y-m-d H:i:s", mktime($hour+$expirehour,$min,$sec,$month,$day,$year));
$timenow = date("Y-m-d H:i:s");
if ($timenow > $expiretime) {
echo "<script>top.location.href='http://123.242.173.131/pathumthani_vc/login.php';</script>";
exit;
}
#######################################
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(0000=>1,0001=>1) ; ######### Array site id
#$arr_notallow ="";
# if ($arr_notallow[$x[$lastarr]] != ""){ ###### site id อยู่ใน array ไม่อนุญาติให้เข้า @ ชา
$lockalllogin = "1300" ;
//echo $lockalllogin."<br>";
if ($lockalllogin == ""){ ###### ปิดระบบไม่ให้เข้าทุกหน่วย @ ชา 24 กุมภา 2552
//echo "xxxx";
# if ($arr_notallow[$xarea_name] != "") {
# if ($x[0] == "infoadmin" && $txtusername != "infoadmin"){
// infoadmin ไม่สามารถเข้าได้ @22/8/2550
// เขตไม่สามารถเข้าได้ @6/8/2550
?>
<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>
<style type="text/css">
<!--
.head_text {font-family:Tahoma;
font-size:16px;
font-weight:bold;
color: #124677;
}
-->
</style>
</head>
<body>
<BR><BR><BR>
<P align=CENTER>
<H4 style="color: #333399"><center>
Login ของท่าน ไม่สามารถเข้าใช้ได้ในขณะนี้ </center>
</H4>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><strong>หมด เวลาการรายงานผล</strong>
<table width="20%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
<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.103") { echo " ขออภัย ปิดระบบเพื่อสำรองข้อมูล <br> ตั้งแต่วันที่ 7 ก.ค. 2551 8.00 น. - 7 ก.ค. 2551 13.00 น. "; die; }
# if ($xip == "") $xip=$IP_CAT1;
if ($xip == "") $xip="123.242.173.131";
//$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/pathumthani_vc/loginall.php?txtusername=" . urlencode($txtusername) . "&txtpass=" . urlencode($txtpass) . "&loginstep=1&Login=1";
//echo "url == ".$url;die;
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=""
}
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("") //Instead, perform a custom alert
}
return displaystring
}
</script>
<link href="common/style.css" rel="stylesheet" type="text/css">
<p>
<style type="text/css">
<!--
.style5 {
color: #FF0000;
font-weight: bold;
}
.style7 { color: #FF0000;
font-weight: bold;
font-size: 16px;
}
.style12 {font-size: 16}
-->
</style>
<body>
<!--<form action="http://<?=$vcserverip?>/pathumthani_vc/loginall.php" method="post" name="form1" onSubmit="return checkFields()">-->
<form action="?" method="post" name="form1" onSubmit="return checkFields()" >
<p>
<!--
<table width="480" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
<tr>
<td align="center" class="headerTB">
ประกาศ<br>
<span class="header">ปิดระบบเพื่ออัพเดตโปรแกรม <br>
วัน ศุกร์ ที่ 4 กรกฎาคม 2550 เวลา 19.00 น.<br>
เปิดให้บริการในวัน ศุกร์ ที่ 4 กรกฎาคม 2550 เวลา 21.00 น. </span>
</td>
</tr>
</table>
-->
<br>
<br>
</p>
</p>
<table width="651" border="0" align="center" cellpadding="0" cellspacing="0" style="border:1px #999999 solid">
<tr>
<td><img src="images/rbm_03.jpg" width="149" height="189"><img src="images/rbm_04.jpg" width="149" height="189"><img src="images/rbm_05.jpg" width="149" height="189"><img src="images/rbm_06.jpg" width="204" height="189"></td>
</tr>
<tr>
<td style="padding-top:30px" height="225" align="center" valign="top" background="images/rbm_08.jpg"><table border="0" cellpadding="2" cellspacing="2">
<tr>
<td><strong>รหัสผู้ใช้</strong></td>
<td><input name="txtusername" type="text" id="txtusername"></td>
</tr>
<tr>
<td><strong>รหัสผ่าน</strong></td>
<td><input name="txtpass" type="password" id="txtpass"></td>
</tr>
<tr>
<td> </td>
<td>
<!-------- ------->
<input name="Login" type="submit" id="Login" value="เข้าสู่ระบบ" disable >
<input type="button" name="Button" value="ยกเลิก" onClick="history.go(-1) " > </td>
</tr>
</table>
<br>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> <a href="manual/ptn_rbmsv2.pdf"><img src="images/vc_17.gif" alt="ดาวน์โหลดคู่มือการใช้งาน" width="182" height="21" border="0"></a></td>
</tr>
</table></td>
</tr>
</table>
<!-----------
<table width="480" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" align="center"><strong>ประกาศ ปิดระบบเพื่อสำรองข้อมูล ของ สพท.ในจังหวัดต่อไปนี้<br>
ตั้งแต่วันเสาร์ที่ <u>21 มิ.ย. 2551 18.00 น.</u> - อาทิตย์ที่ <u>22 มิ.ย. 2551 09.00 น.</u> </strong></td>
</tr>
<tr>
<td width="76"> </td>
<td width="404"><br>
1. ขอนแก่น<br>
2. ชัยภูมิ<br>
3. นครราชสีมา<br>
4. บุรีรัมย์<br>
5. ยโสธร<br>
6. ศรีสะเกษ<br>
7. สระแก้ว<br>
8. สุรินทร์<br>
9. หนองบัวลำภู<br>
10. อำนาจเจริญ<br>
11. อุบลราชธานี</td>
</tr>
</table>
--------------->
<br>
<tr>
<td width="983">
</td>
</tr>
</body>