One Hat Cyber Team
Your IP :
216.73.216.152
Server IP :
27.254.111.200
Server :
Linux wh-sh59.csloxinfo.com 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64
Server Software :
Apache
PHP Version :
5.5.38
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
vhosts
/
oakwine.co.th
/
httpdocs
/
controller
/
View File Name :
honor_customersController.php
<?php SYS::DOMAIN("Honor_customers"); $action = isset($_GET["action"]) ? $_GET["action"] : null ; switch ($action) { case "save" : if($_FILES["image"]["name"] != ""){ is_dir(CREATELINK::FILE("Honor_customers")) ? null : mkdir(CREATELINK::FILE("Honor_customers"),0777); is_dir(CREATELINK::FILE("Honor_customers/image")) ? null : mkdir(CREATELINK::FILE("Honor_customers/image"),0777); if(is_file(CREATELINK::FILE("Honor_customers/image/$_FILES[image][name]"))){ $list = explode(".",$_FILES["image"]["name"]); $fileName = $list[0]."_".date("U").".".$list[1]; }else{ $fileName = $_FILES["image"]["name"]; } move_uploaded_file($_FILES["image"]["tmp_name"],CREATELINK::FILE("Honor_customers/image/$fileName")); $_POST["image"] = $fileName; } $honor_customersInstance = new Honor_customers(); $excute = $honor_customersInstance->save($_POST); if($excute) { $honor_customersInstance->lastRow(); header("location:?page=Honor_customers/show&id=$honor_customersInstance->id"); } break; case "update" : $honor_customersInstance = new Honor_customers(); $honor_customersInstance->get($_GET["id"]); if($_FILES["image"]["name"] != ""){ is_dir(CREATELINK::FILE("Honor_customers")) ? null : mkdir(CREATELINK::FILE("Honor_customers"),0777); is_dir(CREATELINK::FILE("Honor_customers/image")) ? null : mkdir(CREATELINK::FILE("Honor_customers/image"),0777); $file = "Honor_customers/image/".$honor_customersInstance->image; is_file(CREATELINK::FILE($file)) ? unlink(CREATELINK::FILE($file)) : null; if(is_file(CREATELINK::FILE("Honor_customers/image/$_FILES[image][name]"))){ $list = explode(".",$_FILES["image"]["name"]); $fileName = $list[0]."_".date("U").".".$list[1]; }else{ $fileName = $_FILES["image"]["name"]; } move_uploaded_file($_FILES["image"]["tmp_name"],CREATELINK::FILE("Honor_customers/image/$fileName")); $_POST["image"] = $fileName; } $excute = $honor_customersInstance->update($_POST); if($excute) { header("location:?page=Honor_customers/show&id=$honor_customersInstance->id"); } break; case "delete" : $honor_customersInstance = new Honor_customers(); $honor_customersInstance->get($_GET["id"]); $excute = $honor_customersInstance->delete(); if($excute) { header("location:?page=Honor_customers/list"); } break; } ?>