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/eoffice/application/document/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/eoffice/application/document/q1.php
<?
session_start();
//include("../../../eoffice_sapphire/config/config.inc.php");
include("../../config/config.inc.php");
include("../../common/function.php");
include("../../common/eoffice.inc.php");

/*
$sql="
select staffid , staffname from epm_staff_2 
";
$rs=mysql_query($sql);
while($result=mysql_fetch_assoc($rs)){

//UPDATE `epm_staff` SET `staffname`='Administrator สำหรับระบบ ' WHERE (`staffid`='31')  
echo "UPDATE `epm_staff`SET `staffname`='$result[staffname]' where (`staffid`='$result[staffid]');<br>";

}
*/
$num_arr=array("0","1","2","3","4","5","6","7","8","9");
$thai_arr=array("๐","๑","๒","๓","๔","๕","๖","๗","๘","๙");

/*

$sql="
SELECT
epm_groupmember_2.gid,
epm_staff_2.refid_info
FROM
epm_staff_2
Inner Join epm_groupmember_2 ON epm_staff_2.staffid = epm_groupmember_2.staffid
";
$rs=mysql_query($sql);
if($rs)
while($result=mysql_fetch_assoc($rs)){

$text=explode("/",$result[refid_info]);

if($text[0]){
$texta=$text[0]."/";
$text_len=strlen($texta);
	for($i=0;$i<9;$i++){
		$texta=str_replace("$thai_arr[$i]","$num_arr[$i]","$texta");
	}
	$texta=str_replace("O","0","$texta");
	$texta=str_replace("o","0","$texta");
}
//UPDATE `epm_staff` SET `staffname`='Administrator สำหรับระบบ ' WHERE (`staffid`='31')  
echo "INSERT INTO `ref_digit` (`id`,`digit`,`value`,`type`,`gid`) VALUES (NULL,'1','$texta','1','$result[gid]');<br>";

}

*/

/*
$sql="
SELECT
doc_history.id,
epm_staff.prename,
epm_staff.staffname,
epm_staff.staffsurname,
doc_history.doc_owner,
doc_history.owner_label
FROM
doc_history
Inner Join epm_staff ON doc_history.staffid = doc_history.doc_owner AND doc_history.doc_owner = epm_staff.staffid
";
$rs=mysql_query($sql);
if($rs)
while($result=mysql_fetch_assoc($rs)){

$text=explode("/",$result[refid_info]);

if($text[0]){
$texta=$text[0]."/";
$text_len=strlen($texta);
	for($i=0;$i<9;$i++){
		$texta=str_replace("$thai_arr[$i]","$num_arr[$i]","$texta");
	}
	$texta=str_replace("O","0","$texta");
	$texta=str_replace("o","0","$texta");
}
//UPDATE `epm_staff` SET `staffname`='Administrator สำหรับระบบ ' WHERE (`staffid`='31')  
echo "UPDATE `epm_staff` SET `staffname`='' WHERE (`staffid`='31');<br>";

}
*/





$sql="
SELECT
epm_staff.staffid,
epm_staff_25520402_1413.title
FROM
epm_staff
Inner Join epm_staff_25520402_1413 ON epm_staff.staffid = epm_staff_25520402_1413.staffid
WHERE
epm_staff.staffid >=  '406'
";

$rs=mysql_query($sql);
if($rs)
while($result=mysql_fetch_assoc($rs)){

echo "UPDATE `epm_staff` SET `title`='$result[title]' WHERE (`staffid`='$result[staffid]');<br>";

}
?>

Anon7 - 2021