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 :  /home/pathumthani_integration/integration/application/indicator/back/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/pathumthani_integration/integration/application/indicator/back/Copy of demo1_insert.php
<? session_start() ; 
#START
###### This Program is copyright Sapphire Research and Development co.,ltd ########
$ApplicationName	= "demo1";
$module_code 		= "demo1"; 
$process_id			= "demo1";
$VERSION 				= "1";
$BypassAPP 			= true;

//$_SESSION[secid];
	###################################################################
	## COMPETENCY  MANAGEMENT SUPPORTING SYSTEM
	###################################################################
	## Version :		20090703.001 (Created/Modified; Date.RunNumber)
	## Created Date :		2009-07-03 09:49
	## Created By :		MR.TANAPAT TABOONDEE
	## E-mail :			
	## Tel. :			
	## Company :		Sappire Research and Development Co.,Ltd. (C)All Right Reserved
	###################################################################
	## Version :		20090703.002
	## Modified Detail :		˹ѧÊ×ͤÓÊÑè§
	## Modified Date :		2009-07-03 09:49
	## Modified By :		MR.TANAPAT TABOONDEE
###################################################################


set_time_limit(0) ; 
if ( $_SESSION[siteid]   != ""){ 
	# $_SESSION[reportsecid]
} 
if ($xsiteid == ""){ $xsiteid = $_SESSION[siteid]  ;    $xxsiteid = $xsiteid  ; } 

if ($loginid != ""){   $xxsiteid = $loginid  ; } 
if ($_SESSION[reportsecid] == "cmss-otcsc" ){
	########### ok 
} ### END if ($_SESSION[reportsecid] == "cmss-otcsc" ){
//
/*echo "<pre>";
print_r($_SESSION);
*/
//if($xsiteid != ""){ $xsiteid = $xsiteid;}else{ $xsiteid = "5006";}; // ¡Ã³Õ·´Êͺã¹à¤Ã×èͧ

$cmss_master = "demo" ; 
$lead_general = "operator";
$view_general = "operator";
$now_dbname = "demo"; 

include("../../config/conndb_nonsession.inc.php");
include("../../common/common_competency.inc.php");

include("../../common/class_create_temp.php");
//$time_start = getmicrotime();

function swap_date($date){ 
    list($d, $m, $y) = split("-", $date);
    return sprintf("%s-%s-%s", $y, $m, $d);
}

function Show_date($date){
		if($date != "" && $date != "0000-00-00"){
				$arr = explode("-",$date);
				return $arr[2]."/".$arr[1]."/".($arr[0]+543);
		}else{
				return "";	
		}
}
function Save_date($date){
		if($date != ""){
				$arr = explode("/",$date);
				return ($arr[2]-543)."-".$arr[1]."-".($arr[0]);
		}else{
				return "";	
		}
}


$arrIdUser = explode(".",$session_username);// µÇÃǨÊͺÇèÒà»ç¹¡Òà login ¨Ò¡à¢µÁÑéÂ
$numCheck = $arrIdUser[1];
	if($numCheck != ""){
		$print_t = "Y";
		$id = $xsiteid;
		$xcol = 0;
		$Disp = "aumphur";
		$action="province";
}

ob_start();
$Disp=$_REQUEST[Disp];
$siteid=$_REQUEST[id];                
$addrid=$_REQUEST[addrid];   
	$month = array("","Á¡ÃÒ¤Á", "¡ØÁÀҾѹ¸ì", "ÁÕ¹Ò¤Á", "àÁÉÒ¹", "¾ÄÉÀÒ¤Á", "ÁԶعÒ¹", "¡Ã¡®Ò¤Á", "ÊÔ§ËÒ¤Á", "¡Ñ¹ÂÒ¹", "µØÅÒ¤Á", "¾ÄȨԡÒ¹", "¸Ñ¹ÇÒ¤Á");
	$dd = date("j")   ; 
	$mm1 = date("n")  ; 
	$mm =  $month[$mm1] ; 
	$yy = date("Y") + 543 ; 
	$nowdd = " $dd $mm  $yy "  ; 
	$view_general = "view_general" ; 

$getdepid = $depid ;



?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<link href="../libary/style.css" type="text/css" rel="stylesheet">
<link href="../hr_report/images/style.css" type="text/css" rel="stylesheet">
<link href="../hr_report/images/style.css" type="text/css" rel="stylesheet" /><title>demo1</title>
<script language="javascript">
function mOvr(src,clrOver){ 
	if (!src.contains(event.fromElement)) src.bgColor = clrOver; 
} 

function mOut(src,clrIn){ 
	if (!src.contains(event.toElement)) src.bgColor = clrIn; 
} 
</script>
<style type="text/css">
<!--
A:link {
	FONT-SIZE: 12px;color: #000000;	FONT-FAMILY: Tahoma,  "Microsoft Sans Serif";TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:visited {
	FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Tahoma,  "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:active {
	FONT-SIZE: 12px; COLOR: #014d5f; FONT-FAMILY: Tahoma,  "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:hover {
	FONT-SIZE: 12px; COLOR: #f3960b; FONT-FAMILY: Tahoma,  "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
.style1 {color: #FF0000}
-->
</style>
<script type="text/javascript">
document.write('<style type="text/css">.tabber{display:none;}<\/style>');
</script>
<script language=JavaScript> 

function CheckIsIE() 
{ 
if (navigator.appName.toUpperCase() == 'MICROSOFT INTERNET EXPLORER') { return true;} 
else { return false; } 
} 


function PrintThisPage() 
{ 

if (CheckIsIE() == true) 
{ 
parent.iframe1.focus(); 
parent.iframe1.print(); 
} 
else 
{ 
window.frames['iframe1'].focus(); 
window.frames['iframe1'].print(); 
} 

} 


 var updateIframe = function() {
      document.getElementById( 'myIframe' ).src = 'book_insert_attach.php';
    }
	
	

</script> 
<script language="JavaScript">
	var imgDir = "calendar/images/calendar/";			// directory for images ... e.g. var imgDir="/img/"
</script>
<script language="JavaScript" src="calendar/daily_popcalendar.js"></script>
<script language="JavaScript" src="calendar/displayelement.js"></script>
</head>
<body>
<? include("header.php"); ?>
<p>
  <?


######### ÊÓËÃѺ ¹Óàʹ͵͹Êè§§Ò¹ ########
if($_SESSION['xsiteid'] == ''){
  $_SESSION['xsiteid'] = $_GET['xsiteid'];
  $proDigi = substr($_GET['xsiteid'],0,2);
}else{
  $proDigi = substr($_SESSION['xsiteid'],0,2);
}
####################################




function dateFormat($value,$type){
			if($type=="engthai"){
			
				$day = explode("-",$value);
				$date = $day[2].'-'.$day[1].'-'.($day[0]+543);			
					
			}else if($type=="thaieng"){
			
				$day = explode("-",$value);
				$date = ($day[2]-543).'-'.$day[1].'-'.$day[0];
				
			}else if($type=="thaidot"){
			
				$Month = array("", "Á.¤.", "¡.¾.", "ÁÕ.¤.", "àÁ.Â.", "¾.¤.", "ÁÔ.Â.", "¡.¤.", "Ê.¤.", "¡.Â.", "µ.¤.", "¾.Â.", "¸.¤.");
				$day = explode("-",$value);
				$Y = $day[0];
				$m = $day[1];
				if($m<10){
					$m = str_replace("0","",$m);
				}
				$d = $day[2];
				$date = $d.' '.$Month[$m].' '.($Y+543);
				
			}else if($type==""){
			
				$date = explode("-",$value);
				
			}
			
			return $date;
		}
		
		function random($ran) {
			$randomstring = substr(str_shuffle('ABCDEFGHIJKLMNOPQRSTUVWXYZ23456789'),0,$ran);
			return $randomstring;
		}
		$ranid = random(5);
		
		$staff = "";
		$dateadd = date("Y-m-d H:i:s");
		//echo ($_POST['Submit']);
		$chk_year_arr = array();
		$txt_point_arr = array();

		if($_POST['Submit']){

			$txt_index=$_POST['txt_index'];
			$txt_source=$_POST['txt_source'];

			$chk_year_arr[0]=$_POST['hid_year_0'];
			$chk_year_arr[1]=$_POST['hid_year_1'];
			$chk_year_arr[2]=$_POST['hid_year_2'];
			$chk_year_arr[3]=$_POST['hid_year_3'];
			$chk_year_arr[4]=$_POST['hid_year_4'];

			$txt_point_arr[0]=$_POST['txt_point_0'];
			$txt_point_arr[1]=$_POST['txt_point_1'];
			$txt_point_arr[2]=$_POST['txt_point_2'];
			$txt_point_arr[3]=$_POST['txt_point_3'];
			$txt_point_arr[4]=$_POST['txt_point_4'];

			$txt_upd_freq=$_POST['txt_upd_freq'];
			$txt_remark=$_POST['txt_remark'];
			
			//$letter_date = Save_date($_POST['letter_date']);
			
			//mysql_query("INSERT INTO command_letter (secid,letter_name,letter_code,letter_code2,letter_date,letter_type,letter_by,dateadd,staff)VALUES('".$_POST['secid']."','$letter_name','$letter_code','$letter_code2','$letter_date','$letter_type','$letter_by','$dateadd','$staff')");
			$sql="";
			$chk_year="";
			$affected_rows=0;
			for($i=0;$i<count($chk_year_arr);$i++)
			{	
				if($txt_point_arr[$i] !="")
				{
					$sql="INSERT INTO OPERATOR(index_name,source,y_text,point,upd_freq,remark)VALUES('$txt_index','$txt_source','$chk_year_arr[$i]','$txt_point_arr[$i]','$txt_upd_freq','$txt_remark');";			
					//echo "<br>sql:$sql";
					//exit();
					$ret = mysql_query($sql);
					if($ret>0)
					{
						$affected_rows++;
					}
				}
			}
			//echo $sql;
			//exit();

			//echo "$affected_rows affected rows ";

			//echo "<br>sql:$sql";
			//exit();
			


			/*
			$letter_id = mysql_insert_id();
			######## ºÑ¹·Ö¡¤ÓÊѧÍéÒ§ÍÔ§
			if(count($ref_name) > 0){
					foreach($ref_name as $k => $v){
						$sql_ref = "INSERT INTO command_letter_ref(ref_name,letter_id)VALUES('$v','$letter_id')";
						mysql_query($sql_ref);
					}//end foreach($ref_name as $k => $v){
			}//end if(count($ref_name) > 0){
			*/
			print"<meta http-equiv=\"refresh\" content=\"0;URL=index.php\">\n";
			
		}
?>
</p>
<p align="center"><strong>Ẻ¿ÍÃìÁºÑ¹·Ö¡ demo1 </strong></p>
<script language="JavaScript">
<!--
/*
	function CreateXmlHttp(){
		//Creating object of XMLHTTP in IE
		try {
			XmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e){
			try{
				XmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch(oc) {
				XmlHttp = null;
			}
		}
		//Creating object of XMLHTTP in Mozilla and Safari 
		if(!XmlHttp && typeof XMLHttpRequest != "undefined") {
			XmlHttp = new XMLHttpRequest();
		}
	} // end function CreateXmlHttp
	
	
	function chkRepeat() {
		if ( form1.letter_code.value && form1.letter_code2.value ) {
			CreateXmlHttp();
			XmlHttp.open("get", "ajax.chk_cmdlid_repeat.php?cmdCode1="+form1.letter_code.value+"&cmdCode2="+form1.letter_code2.value+"&SecID="+form1.secid.value, true);
			XmlHttp.onreadystatechange=function() {
				if (XmlHttp.readyState==4) {
					if (XmlHttp.status==200) {
						var res = XmlHttp.responseText; //alert(res);
						if ( res == "false" ) {
							alert("àÅ¢·Õè¤ÓÊÑè§«éÓ\n¾ºàÅ¢·Õè "+form1.letter_code.value+"/"+form1.letter_code2.value+" ÍÂÙèã¹ÃкºáÅéÇ\n¡ÃسҵÃǨÊͺ");
							form1.letter_code.focus();
						}
					} else if (XmlHttp.status==404) {
						alert("äÁèÊÒÁÒö·Ó¡ÒÃáÊ´§¢éÍÁÙÅä´é");
					} else {
						alert("Error : "+XmlHttp.status);
					}
				}
			};
			XmlHttp.send(null);
		}
	}
*/
	function CheckForm ( form ) {
		 return true;
		 if ( form.txt_index.value == "" ) {
		 	alert("¡Ãسһé͹ µÑǪÕéÑÇÑ´");
			form.txt_index.focus();
			return false;
		} else if ( form.txt_source.value == "" ) {
			alert("¡Ãسһé͹ áËÅè§¢éÍÁÙÅ/˹èǧҹ·ÕèÃѺ¼Ô´ªÍº");
			form.txt_source.focus();
			return false;
		} else if ( form.txt_upd_freq.value == "" ) {
			alert("¡Ãسһé͹ ¤ÇÒÁ¶Õè㹡Òà update ¢éÍÁÙÅ");
			form.txt_upd_freq.focus();
			return false;
		} else {
			return true;
		}
		
		var ret="";
		for(i=0;i<5;i++)
		{
			ret =ret  + eval("form.txt_upd_freq_"+i+".value");
		}
		
		if(ret=="")
		{
			alert("¡Ãسһé͹ ¢éÍÁÙÅ¡ÒôÓà¹Ô¹¡ÒÃÂé͹ËÅѧ ÍÂèÒ§¹éÍ 1 ¤èÒ");
			form.txt_upd_freq_0.focus();
			return false
		}
	}
//-->

var gFiles = 0;
function addFile() {
var li = document.createElement('li');
li.setAttribute('id', 'file-' + gFiles);
li.innerHTML = '<input name="ref_name[]" type="text" id="ref_name" size="50"><span onclick="removeFile(\'file-' + gFiles + '\')" style="cursor:pointer;">ź <img src=../hr3/hr_report/bimg/profile_expanded.gif border=0></span>';
document.getElementById('files-root').appendChild(li);
gFiles++;
}
function removeFile(aId){
var obj = document.getElementById(aId);
obj.parentNode.removeChild(obj);
}

</script>
<script language="javascript" src="js/daily_popcalendar.js"></script>
<script language="javascript" src="js/displayelement.js"></script>
<form id="form1" name="form1" method="post" action="" onSubmit="return CheckForm(this)">
  <table width="100%" border="0">
    <tr>
      <td width="30%">&nbsp;</td>
      <td width="62%">&nbsp;</td>
      <td width="11%">&nbsp;</td>
    </tr>
    
    <tr>
      <td height="25" align="right"><span class="style1">*</span> µÑǪÕéÇÑ´</td>
      <td><input name="txt_index" type="text" id="txt_index" size="100" onfocus="this.select();" /></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td align="right"><span class="style1">*</span> áËÅè§¢éÍÁÙÅ/˹èǧҹ·ÕèÃѺ¼Ô´ªÍº</td>
      <td><input name="txt_source" type="text" id="txt_source" size="100" /></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td align="right" valign="top"><span class="style1">*</span>¢éÍÁÙżšÒôÓà¹Ô¹¡ÒÃÂé͹ËÅѧ/áÅлѨ¨ØºÑ¹ »Õ ¾.È.</td>
      <td> <p>
        <!--<input name="letter_date" type="text" id="letter_date" value="<?//=swap_date((($row['letter_date'])?$row['letter_date']:date("Y-m-d")))?>" size="10" maxlength="10" onkeypress="chk_key_in(this.value);" />
                <img src="calendar/calendar2.gif" alt="Çѹ/à´×͹/»Õ" width="20" height="20" border="0" align="absmiddle"  onclick="popUpCalendar(this, form1.letter_date, 'dd-mm-yyyy')" onmouseover="this.style.cursor='hand'"value="Çѹ à´×͹ »Õ" /> <font color="#006699">&nbsp; </font> &nbsp;<font color="#006699"> ÃٻẺ &quot;dd-mm-yyyy&quot;,&nbsp;»Õ¤ÃÔʵìÈÑ¡ÃÒª</font>-->

 		<?=$yy;?>
        <input name="txt_point_0" type="text" id="txt_point_0" size="10
	  " onfocus="this.select();" />
        <br />
        <?=--$yy;?>
		<input name="txt_point_1" type="text" id="txt_point_1" size="10
	  " onfocus="this.select();" />
        
        <br />
		<?=--$yy;?>
        <input name="txt_point_2" type="text" id="txt_point_2" size="10
	  " onfocus="this.select();" />
          <br>
<?=--$yy;?>
          <input name="txt_point_3" type="text" id="txt_point_3" size="10
	  " onfocus="this.select();" />
          <br />
<?=--$yy;?>
          <input name="txt_point_4" type="text" id="txt_point_4" size="10
	  " onfocus="this.select();" />
        
      </td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td align="right"><span class="style1">*</span> ¤ÇÒÁ¶Õè㹡Òà Update ¢éÍÁÙÅ</td>
      <td><input name="txt_upd_freq" type="text" id="txt_upd_freq" size="10
	  " onfocus="this.select();" /></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td align="right">ËÁÒÂà˵Ø</td>
      <td><input name="txt_remark" type="text" id="txt_remark" size="100" onfocus="this.select();" /></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td align="right" valign="top">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td align="right">&nbsp;</td>
      <td><input type="submit" name="Submit" value="ºÑ¹·Ö¡" />
          <input type="reset" name="Submit2" value="¡àÅÔ¡" /> <input type="button" name="Submit3"  onclick="window.location='index.php'"value="¡ÅѺ˹éÒËÅÑ¡" /></td>
      <td>&nbsp;</td>
    </tr>
  </table>
  <input type="hidden" name="hid_year_0"  value="<?=date("Y") + 543;?>"/>
  <input type="hidden" name="hid_year_1" value="<?=date("Y") + 542;?>"/>
  <input type="hidden" name="hid_year_2" value="<?=date("Y") + 541;?>"/>
  <input type="hidden" name="hid_year_3" value="<?=date("Y") + 540;?>"/>
  <input type="hidden" name="hid_year_4" value="<?=date("Y") + 539;?>"/>
</form>	
<p>&nbsp;</p>
</body>
</html>

Anon7 - 2021