!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/   drwxr-xr-x
Free 52.82 GB of 127.8 GB (41.33%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     course.php (19.68 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

	/**  Define Validate Access  */
	define( '_VALID_ACCESS', 1 );
	
	/**  Configuration  */
	include( "configuration.php" );
	require_once( $_Config_absolute_path . "/includes/framework.php" );
	require_once( $_Config_absolute_path . "/includes/FunctionDB.php" );

	/**  Create Database Object  */
	$dbObj = new DBConn;
	
	/**  Course */
	include_once "./class/clsProgram.php";
	include_once "./class/clsSysSemesterDes.php";
	include_once "./class/clsSysStudentYearDes.php";
	include_once "./class/clsAcadYearConfig.php";
	include_once "./class/clsClass.php";
	include_once "./class/clsCourse.php";
	include_once "./class/clsClassTimeTable.php";
	include_once "./class/clsPeriod.php";
	include_once "class/clsDay.php";
	include_once "class/clsRoom.php";
	include_once "global.php";
	
	$conn = new Connection();
	$oPg = new Program();
	$oPg2 = new Program();
	$oSs = new SysSemesterDes();
	$oSy = new SysStudentYearDes();
	$oAc = new AcadYearConfig();
	$oCl = new Class1();
	$oCo = new Course();
	$oCo2 = new Course();
	$oCtb = new ClassTimeTable();
	$oCtb2 = new ClassTimeTable();
	$oCtb3 = new ClassTimeTable();
	$oPr = new Period();
	$oPr2 = new Period();
	$oDy = new Day();
	$oRm = new Room();
	confirmSubmit();
	openNewWindow();
	
?>
<!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" />
<title><?=$_Config_sitename;?> - รายวิชาที่เปิดสอน - รายวิชาลงทะเบียนเรียน</title>
<script type="text/javascript" src="./js/utilities.js"></script>
<link href="./css/default.css" rel="stylesheet" type="text/css" />
</head>

<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">
<?php
	include( "./templates/incHeader.php" );
?>
<table width="1003" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="215" align="left" valign="top" style="padding:10px 0px 0px 5px"><?php include( "templates/incMainMenuLeft.php" );?></td>
    <td width="788" height="300" align="center" valign="top" style="padding:10px 0px 5px 10px"><fieldset><table width="770" border="0" cellspacing="0" cellpadding="0">
     <form id="myForm" name="myForm" method="post" action="<?=$PHP_SELF;?>?page=<?=$page;?>&amp;<?=$param;?>">
      <tr>
        <td height="5"></td>
      </tr>
      <tr>
        <td height="30" background="images/background/bg-head-topic-w780.gif"><span class="PADDING-LEFT-10"><strong><a href="index.php">หน้าหลัก</a></strong> <strong>&raquo; <a href="Menu_Edu.php">ข้อมูลฝ่ายวิชาการ</a> &raquo; <span class="NOTE">รายวิชาลงทะเบียนเรียน</span></strong></span></td>
        </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="center" valign="top"><table width="750" border="0" cellspacing="2" cellpadding="0" align="center">
			  <tr> 
				  	<td height="22"><font color="<?php echo $GLOBALS['COLOR_FONT_3']; ?>" size="3" class="TEXT-CLIMSON10"><b>ค้นหารายวิชาที่เปิดสอนตามหลักสูตร</b></font></td>
				</tr>				
				<?php
                //	if($method!='search'){
                ?>				
				<tr> 
				  	<td><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>"><b>หลักสูตร : </b>				
					<select name="programId">	
					<?php
                        if( $programId != '' ) {
                            $oPg->SearchByKey($programId);
                            $oPg->GetRecord();
                    ?>									
					<option value="<?php echo $programId;?>" selected><?php echo $oPg->programId1." ".$oPg->programName;?></option>
					<?php
                        } else {
                    ?>					
					<option value="" selected>--เลือกหลักสูตร--</option>
					<?php
                        } // end..else
                        
                        $i = 0;
                        $oPg->RSProgram();
                        while( $oPg->GetRecord() ) {
                    ?>
                    <option value="<?php echo $oPg->programId;?>"><?php echo $oPg->programCode1."  ".$oPg->programName;?></option>
					<?php	
                            $i++;	
                        } // end..while
                    ?>
					</select>					
					</font></td>
				</tr>
				<tr> 
				  	<td><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>"><b>ปีการศึกษา : 					
					<select name="acadYear">
					<?php
                        if( $acadYear != '' ) {
                    ?>									
					<option value="<?php echo $acadYear;?>" selected><?php echo $acadYear;?></option>
					<?php
                        } else {
                    ?>					
					<option value="" selected>--เลือกปีการศึกษา--</option>
					<?php
                        } // end..else
                    
                        $i = 0;
                        $oAc->RSAcadYearConfigGroupAcY();
                        while( $oAc->GetRecord() ) {
                    ?>
                    <option value="<?php echo $oAc->acadYear;?>"><?php echo $oAc->acadYear;?></option>
					<?php
                            $i++;	
                        } // end..while
                    ?>
					</select> 
					&nbsp; ภาคการศึกษา : 
					<select name="semester">					
					<?php
                        if($semester!='') {
                            $oSs->SearchByKey($semester);
                            $oSs->GetRecord();
                    ?>									
					<option value="<?php echo $semester;?>" selected><?php echo $semester1."  ".$oSs->semesterName;?></option>
					<?php
                        } else {
                    ?>					
					<option value="" selected>--เลือกภาคการศึกษา--</option>
					<?php
                        }
                        
                        $i = 0;
                        $oSs->RSSysSemesterDes();
                        while( $oSs->GetRecord() ) {
                    ?>
                    <option value="<?php echo $oSs->semester;?>"><?php echo $oSs->semester1."  ".$oSs->semesterName;?></option>
					<?php
                            $i++;	
                        } // end..while
                    ?>
					</select>										
					</b></font></td>
				</tr>
				<tr>
					<td><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>"><b>ชั้นปีที่ : </b></font>
					<select name="studentYear">
					<?php
                        if( $studentYear !='' ) {
                            $oSy->SearchByKey($studentYear);
                            $oSy->GetRecord();
                    ?>									
					<option value="<?php echo $studentYear;?>" selected><?php echo $studentYear1."  ".$oSy->studentYearName;?></option>
					<?php
                        } else {
                    ?>					
					<option value="" selected>--เลือกชั้นปีที่--</option>
					<?php
                        }
                    
                        $i = 0;
                        $oSy->RSSysStudentYearDes();
                        while( $oSy->GetRecord() ) {
                    ?>
                    <option value="<?php echo $oSy->studentYear;?>"><?php echo $oSy->studentYear1." ".$oSy->studentYearName;?></option>
					<?php
                            $i++;	
                        } // end..while
                    ?>
					</select>					
					<input type="submit" name="search00" value="ค้นหา"><input type="hidden" name="method" value="search00"><input type="hidden" name="courseCode"><input type="hidden" name="courseName"></td>
				</tr>				
				<tr><td>&nbsp;</td></tr>
				<tr> 
				  	<td height="22"><font color="<?php echo $GLOBALS['COLOR_FONT_3']; ?>" size="3" class="TEXT-CLIMSON10"><b>ค้นหารายวิชาที่เปิดสอนตามรหัสรายวิชาและชื่อรายวิชา</b></font></td>
				</tr>												
				<tr><td><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>"><b>รหัสวิชา : <input type="text" name="courseCode" size="5" maxlength="15" value="<?php echo $courseCode;?>"> &nbsp; ชื่อวิชา (ไทย) : </b><input type="text" name="courseName" size="25" value="<?php echo $courseName;?>"></font></td></tr>
				<tr><td><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>"><b>ชื่อวิชา (อังกฤษ) : <input type="text" name="courseNameEng" size="25" value="<?php echo $courseNameEng;?>"><input type="submit" name="search" value="ค้นหา"></b></font></td></tr>				
				<?php
                //	}else{
                        if($search00){
                            $oPg2->SearchByKey($programId);
                            $oPg2->GetRecord();
                ?>					
				<tr><td align="center">
					<table width="750" border="0" align="center" cellpadding="1" cellspacing="1" style="border:1px solid #CCCCCC">														
					<tr bgcolor="#CCCCCC">
						<td width="70" height="22" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1']; ?>"><b>รหัสวิชา</b></font></td>
						<td width="254" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1']; ?>"><b>ชื่อวิชา</b></font></td>
						<td width="60" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1']; ?>"><b>หน่วยกิต</b></font></td>
						<td width="230" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1']; ?>"><b>วัน/เวลา/ห้องเรียน</b></font></td>
						<td width="50" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1']; ?>"><b>กลุ่ม</b></font></td>
						<td width="65" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1']; ?>"><b>รับ/ลง</b></font></td>																								
					</tr>
					<?php
                            $c=0;
                            $oCl->RSClassByPgIdAndStYAndSeAndAcY($programId, $studentYear, $semester, $acadYear);
                            while($oCl->GetRecord()){
                    			//echo "ClassId22 -> ".$oCtb->classId."<br>";		
                                $oCo2->SearchByKey($oCl->courseId);
                                $oCo2->GetRecord();
                                
                                $oCtb->RSClassTimeTableByClId($oCl->classId);
                                $oCtb->GetRecord();
                            
                    			//while($oCtb->GetRecord()){
                                    if( ($c%2) == 0 )
                                        echo '<tr>';
                                    else
                                        echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_4"].'">';		
                    ?>
						<td height="22" align="center" class="BORDER-TOP"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>"><b><a href="#" onClick="openNewWindow('showDetailClass.php?classId=<?php echo $oCl->classId;?>','','scrollbars=yes,width=500,height=350')" class="nav"><?php echo $oCo2->courseCode;?></a></b></font></td>
						<td class="BORDER-TOP-LEFT-RIGHT PADDING-LEFT-3"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>"><?php echo $oCo2->courseName."<br>".$oCo2->courseNameEng;?></font></td>
						<td align="center" class="BORDER-TOP"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>"><?php echo $oCo2->courseUnit;?></font></td>
						<td class="BORDER-TOP-LEFT-RIGHT PADDING-LEFT-3"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>">						
						<?php
                                    $oCtb3->RSClassTimeTableByClId($oCl->classId);
                                    while( $oCtb3->GetRecord() ) {
                                        $oCtb2->SearchByKey($oCtb3->sequenceId,$oCtb3->classId);
                                        $oCtb2->GetRecord();
                                            
                                        $oDy->SearchByKey($oCtb2->weekDay);
                                        $oDy->GetRecord();
                                        
                                        $oPr->SearchByKey($oCtb2->timeSlotStart);
                                        $oPr->GetRecord();
                                        
                                        $oPr2->SearchByKey($oCtb2->timeSlotEnd);
                                        $oPr2->GetRecord();
                                        
                                        $oRm->SearchByKey($oCtb2->roomId);			
                                        $oRm->GetRecord();
                                        
                                        echo $oDy->dayName." / ".$oPr->startTime."-".$oPr2->endTime." / ".$oRm->roomNo."<br>";
                                    } // end..while 
                        ?>
						</font></td>
						<td align="center" class="BORDER-TOP"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>"><?php echo $oCl->section;?></font></td>
						<td align="center" class="BORDER-TOP-LEFT"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>"><?php echo $oCl->totalSeat." / ".$oCl->enrollSeat;?></font></td>																								
					</tr>
					<?php		
                                        $c++;
                    				// }
                                } // end..while 
                                
                                if( $c==0 ) {
                    ?>
					<tr><td height="22" colspan="6" align="center" class="TEXT-RED10"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3']; ?>">** ไม่ปรากฏรายวิชาที่ค้นหา **</font></td>
					</tr>					
					<?php			
                                } // end..if
                    ?>
					<tr>
					  <td height="10" colspan="6"></td>
					</tr>
                    <tr><td colspan="6" align="center"><input type="button" name="back" value="&laquo; ย้อนกลับ" onClick="location.href='<?php echo $PHP_SELF;?>?method=no'"></td>
					</tr>			
				</table>
				</td></tr>
				<?php										
                        } else if( $search ) {
                ?>				
				<tr><td align="center"><table width="750" border="0" cellpadding="1" cellspacing="1" style="border:1px solid #CCCCCC">
					<tr bgcolor="#CCCCCC">
						<td width="70" height="22" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1']; ?>"><b>รหัสวิชา</b></font></td>
						<td width="254" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1']; ?>"><b>ชื่อวิชา</b></font></td>
						<td width="60" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1']; ?>"><b>หน่วยกิต</b></font></td>
						<td width="230" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1']; ?>"><b>วัน/เวลา/ห้องเรียน</b></font></td>
						<td width="50" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1']; ?>"><b>กลุ่ม</b></font></td>
						<td width="65" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1']; ?>"><b>รับ/ลง</b></font></td>																								
					</tr>				
					<?php
                                //echo "CoCo -> ".$courseCode."<br>";
                                $oCo->SearchByCourseCodeAndCourseName($courseCode,$courseName,$courseNameEng);
                                while($oCo->GetRecord()){
                                    //echo "CoId -> ".$oCo->courseId."<br>";
                                    $oCl->RSClassByCoId($oCo->courseId);
                                    while($oCl->GetRecord()){
                                        $oCo2->SearchByKey($oCl->courseId);
                                        $oCo2->GetRecord();
                                        
                                        $oCtb->RSClassTimeTableByClId($oCl->classId);
                                        $oCtb->GetRecord();
                                    
                            			// while($oCtb->GetRecord()){
                                            if(($c%2) == 0)
                                                echo '<tr>';
                                            else
                                                echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_4"].'">';		
                    ?>
						<td height="22" align="center" class="BORDER-TOP"><font size="1" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>"><b><a href="#" onClick="openNewWindow('showDetailClass.php?classId=<?php echo $oCl->classId;?>','','scrollbars=yes,width=500,height=350')" class="nav"><?php echo $oCo2->courseCode;?></a></b></font></td>
						<td  class="BORDER-TOP-LEFT-RIGHT PADDING-LEFT-3"><font size="1" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>"><?php echo $oCo2->courseName."<br>".$oCo2->courseNameEng;?></font></td>
						<td align="center" class="BORDER-TOP"><font size="1" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>"><?php echo $oCo2->courseUnit;?></font></td>
						<td class="BORDER-TOP-LEFT-RIGHT PADDING-LEFT-3"><font size="1" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>">						
						<?php
                                            $oCtb3->RSClassTimeTableByClId($oCl->classId);
                                            while($oCtb3->GetRecord()){
                                                $oCtb2->SearchByKey($oCtb3->sequenceId,$oCtb3->classId);
                                                $oCtb2->GetRecord();
                                                    
                                                $oDy->SearchByKey($oCtb2->weekDay);
                                                $oDy->GetRecord();
                                                
                                                $oPr->SearchByKey($oCtb2->timeSlotStart);
                                                $oPr->GetRecord();
                                                
                                                $oPr2->SearchByKey($oCtb2->timeSlotEnd);
                                                $oPr2->GetRecord();
                                                
                                                $oRm->SearchByKey($oCtb2->roomId);			
                                                $oRm->GetRecord();
                                                
                                                echo $oDy->dayName." / ".$oPr->startTime."-".$oPr2->endTime." / ".$oRm->roomNo."<br>";
                                            } // end while
                        ?>
						</font></td>
						<td align="center" class="BORDER-TOP"><font size="1" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>"><?php echo $oCl->section;?></font></td>
						<td align="center" class="BORDER-TOP-LEFT"><font size="1" color="<?php echo $GLOBALS['COLOR_FONT_4']; ?>"><?php echo $oCl->totalSeat." / ".$oCl->enrollSeat;?></font></td>																								
					</tr>
					<?php		
                                        $c++;					
                                    } // loop class
                                } // loop course
                                
                                if( $c == 0 ) {
                    ?>
					<tr><td height="21" colspan="6" align="center" class="TEXT-RED10"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3']; ?>">** ไม่ปรากฏรายวิชาที่ค้นหา **</font></td>
					</tr>
					<?php			
                                } // end if
                    ?>
					<tr>
					  <td height="10" colspan="6"></td>
					</tr>
					<tr><td colspan="6" align="center"><input type="button" name="back" value="&laquo; ย้อนกลับ" onClick="location.href='<?php echo $PHP_SELF;?>?method=no'"></td>
					</tr>			
					</table>				
				</td>
				</tr>
				<?php
                        } // end if
                //	}
                ?>
		  </table>
        </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr></form>
    </table>
    </fieldset></td>
  </tr>
</table>
<?php include( "./templates/incFooter.php" ); ?>
</body>
</html>
<?php
	/**  Free Resource */
	$dbObj->freeresult($result);

	$oPg->Destroy();
	$conn->Disconnect();

	/**  Close the Database  */
	$dbObj->disconn();
	
	/**  Unset Class  */
	unset($dbObj);
?>

:: 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.0057 ]--