├── skin ├── booking │ ├── loader.html │ ├── main.html │ ├── welcome.html │ ├── page.html │ ├── login.html │ ├── member.html │ ├── settings.php │ ├── forgotfrm.html │ ├── loginfrm.html │ ├── registerfrm.html │ ├── privacy_en.html │ ├── privacy_la.html │ ├── privacy_th.html │ ├── index.html │ └── 404.html ├── default │ ├── loader.html │ ├── welcome.html │ ├── login.html │ ├── page.html │ ├── member.html │ ├── settings.php │ ├── main.html │ ├── index.html │ ├── forgotfrm.html │ ├── privacy_en.html │ ├── privacy_la.html │ ├── privacy_th.html │ ├── loginfrm.html │ ├── registerfrm.html │ └── 404.html ├── ext │ ├── c.png │ ├── avi.png │ ├── bmp.png │ ├── cpp.png │ ├── css.png │ ├── dll.png │ ├── doc.png │ ├── exe.png │ ├── flv.png │ ├── gif.png │ ├── htm.png │ ├── iso.png │ ├── jpg.png │ ├── js.png │ ├── mov.png │ ├── mp3.png │ ├── mpg.png │ ├── ogg.png │ ├── pdf.png │ ├── php.png │ ├── png.png │ ├── ppt.png │ ├── psd.png │ ├── rar.png │ ├── rm.png │ ├── rtf.png │ ├── sql.png │ ├── swf.png │ ├── tar.png │ ├── tgz.png │ ├── txt.png │ ├── wav.png │ ├── wma.png │ ├── wmv.png │ ├── xls.png │ ├── xml.png │ ├── zip.png │ ├── aiff.png │ ├── docx.png │ ├── file.png │ ├── html.png │ ├── jpeg.png │ ├── midi.png │ ├── pptx.png │ ├── tiff.png │ ├── webp.png │ ├── xlsx.png │ └── xvid.png ├── img │ ├── blank.gif │ ├── noicon.png │ └── kotchasan.png ├── fonts │ ├── icomoon.eot │ ├── icomoon.ttf │ ├── icomoon.woff │ ├── leelawad.ttf │ ├── supermarket-webfont.eot │ ├── supermarket-webfont.ttf │ ├── supermarket-webfont.woff │ ├── supermarket-webfont.woff2 │ ├── thsarabunnew-webfont.eot │ ├── thsarabunnew-webfont.ttf │ ├── thsarabunnew-webfont.woff │ ├── thsarabunnew_bold-webfont.eot │ ├── thsarabunnew_bold-webfont.ttf │ ├── thsarabunnew_bold-webfont.woff │ ├── thsarabunnew_italic-webfont.eot │ ├── thsarabunnew_italic-webfont.ttf │ ├── thsarabunnew_italic-webfont.woff │ ├── thsarabunnew_bolditalic-webfont.eot │ ├── thsarabunnew_bolditalic-webfont.ttf │ └── thsarabunnew_bolditalic-webfont.woff ├── .htaccess └── dark.css ├── robots.txt ├── favicon.ico ├── language ├── en.gif ├── la.gif ├── th.gif ├── en.js ├── th.js └── la.js ├── install ├── img │ ├── en.gif │ ├── th.gif │ ├── help.png │ ├── valid.png │ ├── invalid.png │ └── white-grad.png ├── complete.php ├── settings │ ├── database.php │ └── config.php ├── style.css ├── upgrade1.php ├── step2.php ├── index.php ├── upgrade0.php └── step1.php ├── .gitignore ├── modules ├── car │ ├── img │ │ └── noimage.png │ ├── controllers │ │ ├── init.php │ │ ├── vehicles.php │ │ ├── setup.php │ │ ├── approve.php │ │ └── settings.php │ ├── style.css │ ├── models │ │ ├── category.php │ │ ├── categories.php │ │ ├── checker.php │ │ └── chauffeur.php │ ├── views │ │ ├── tools.php │ │ └── home.php │ └── script.js └── index │ ├── controllers │ ├── api.php │ ├── login.php │ ├── privacy.php │ ├── export.php │ ├── otp.php │ ├── member.php │ ├── page.php │ ├── welcome.php │ ├── memberstatus.php │ ├── register.php │ ├── permission.php │ ├── language.php │ ├── modules.php │ ├── sms.php │ ├── theme.php │ ├── linesettings.php │ ├── apis.php │ ├── loginpage.php │ ├── telegramsettings.php │ ├── usage.php │ ├── system.php │ ├── mailserver.php │ ├── consentsettings.php │ ├── editprofile.php │ ├── write.php │ └── categories.php │ ├── models │ ├── category.php │ ├── province.php │ ├── telegram.php │ ├── activate.php │ ├── checker.php │ ├── forgot.php │ ├── log.php │ └── consentsettings.php │ └── views │ ├── otp.php │ ├── login.php │ ├── tabmenus.php │ └── consent.php ├── Kotchasan ├── Psr │ └── Log │ │ ├── LoggerAwareInterface.php │ │ ├── LogLevel.php │ │ └── NullLogger.php ├── ApiException.php ├── Http │ ├── Message.php │ └── NotFound.php ├── InputItemException.php ├── Cache │ ├── Exception.php │ ├── Cache.php │ └── CacheItem.php ├── Database │ ├── Exception.php │ ├── Db.php │ └── Schema.php ├── Controller.php ├── KBase.php ├── Grid.php ├── Model.php └── Singleton.php ├── loader.php ├── api.php ├── index.php ├── export.php ├── line ├── webhook.php └── callback.php ├── Gcms ├── Router.php └── Sms.php ├── .htaccess ├── README.md ├── load.php ├── Thaibluksms └── Sms.php └── js ├── google.js ├── facebook.js ├── pdpa.js └── ddpanel.js /skin/booking/loader.html: -------------------------------------------------------------------------------- 1 | {CONTENT} -------------------------------------------------------------------------------- /skin/booking/main.html: -------------------------------------------------------------------------------- 1 | {CONTENT} -------------------------------------------------------------------------------- /skin/default/loader.html: -------------------------------------------------------------------------------- 1 | {CONTENT} -------------------------------------------------------------------------------- /skin/booking/welcome.html: -------------------------------------------------------------------------------- 1 | {CONTENT} -------------------------------------------------------------------------------- /skin/default/welcome.html: -------------------------------------------------------------------------------- 1 | {CONTENT} -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / 3 | -------------------------------------------------------------------------------- /skin/booking/page.html: -------------------------------------------------------------------------------- 1 |
{CONTENT}
-------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/favicon.ico -------------------------------------------------------------------------------- /skin/ext/c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/c.png -------------------------------------------------------------------------------- /language/en.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/language/en.gif -------------------------------------------------------------------------------- /language/la.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/language/la.gif -------------------------------------------------------------------------------- /language/th.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/language/th.gif -------------------------------------------------------------------------------- /skin/ext/avi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/avi.png -------------------------------------------------------------------------------- /skin/ext/bmp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/bmp.png -------------------------------------------------------------------------------- /skin/ext/cpp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/cpp.png -------------------------------------------------------------------------------- /skin/ext/css.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/css.png -------------------------------------------------------------------------------- /skin/ext/dll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/dll.png -------------------------------------------------------------------------------- /skin/ext/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/doc.png -------------------------------------------------------------------------------- /skin/ext/exe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/exe.png -------------------------------------------------------------------------------- /skin/ext/flv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/flv.png -------------------------------------------------------------------------------- /skin/ext/gif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/gif.png -------------------------------------------------------------------------------- /skin/ext/htm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/htm.png -------------------------------------------------------------------------------- /skin/ext/iso.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/iso.png -------------------------------------------------------------------------------- /skin/ext/jpg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/jpg.png -------------------------------------------------------------------------------- /skin/ext/js.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/js.png -------------------------------------------------------------------------------- /skin/ext/mov.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/mov.png -------------------------------------------------------------------------------- /skin/ext/mp3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/mp3.png -------------------------------------------------------------------------------- /skin/ext/mpg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/mpg.png -------------------------------------------------------------------------------- /skin/ext/ogg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/ogg.png -------------------------------------------------------------------------------- /skin/ext/pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/pdf.png -------------------------------------------------------------------------------- /skin/ext/php.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/php.png -------------------------------------------------------------------------------- /skin/ext/png.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/png.png -------------------------------------------------------------------------------- /skin/ext/ppt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/ppt.png -------------------------------------------------------------------------------- /skin/ext/psd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/psd.png -------------------------------------------------------------------------------- /skin/ext/rar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/rar.png -------------------------------------------------------------------------------- /skin/ext/rm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/rm.png -------------------------------------------------------------------------------- /skin/ext/rtf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/rtf.png -------------------------------------------------------------------------------- /skin/ext/sql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/sql.png -------------------------------------------------------------------------------- /skin/ext/swf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/swf.png -------------------------------------------------------------------------------- /skin/ext/tar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/tar.png -------------------------------------------------------------------------------- /skin/ext/tgz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/tgz.png -------------------------------------------------------------------------------- /skin/ext/txt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/txt.png -------------------------------------------------------------------------------- /skin/ext/wav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/wav.png -------------------------------------------------------------------------------- /skin/ext/wma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/wma.png -------------------------------------------------------------------------------- /skin/ext/wmv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/wmv.png -------------------------------------------------------------------------------- /skin/ext/xls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/xls.png -------------------------------------------------------------------------------- /skin/ext/xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/xml.png -------------------------------------------------------------------------------- /skin/ext/zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/zip.png -------------------------------------------------------------------------------- /install/img/en.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/install/img/en.gif -------------------------------------------------------------------------------- /install/img/th.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/install/img/th.gif -------------------------------------------------------------------------------- /skin/ext/aiff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/aiff.png -------------------------------------------------------------------------------- /skin/ext/docx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/docx.png -------------------------------------------------------------------------------- /skin/ext/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/file.png -------------------------------------------------------------------------------- /skin/ext/html.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/html.png -------------------------------------------------------------------------------- /skin/ext/jpeg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/jpeg.png -------------------------------------------------------------------------------- /skin/ext/midi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/midi.png -------------------------------------------------------------------------------- /skin/ext/pptx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/pptx.png -------------------------------------------------------------------------------- /skin/ext/tiff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/tiff.png -------------------------------------------------------------------------------- /skin/ext/webp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/webp.png -------------------------------------------------------------------------------- /skin/ext/xlsx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/xlsx.png -------------------------------------------------------------------------------- /skin/ext/xvid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/ext/xvid.png -------------------------------------------------------------------------------- /skin/img/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/img/blank.gif -------------------------------------------------------------------------------- /skin/img/noicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/img/noicon.png -------------------------------------------------------------------------------- /install/img/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/install/img/help.png -------------------------------------------------------------------------------- /install/img/valid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/install/img/valid.png -------------------------------------------------------------------------------- /install/img/invalid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/install/img/invalid.png -------------------------------------------------------------------------------- /skin/fonts/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/icomoon.eot -------------------------------------------------------------------------------- /skin/fonts/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/icomoon.ttf -------------------------------------------------------------------------------- /skin/fonts/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/icomoon.woff -------------------------------------------------------------------------------- /skin/fonts/leelawad.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/leelawad.ttf -------------------------------------------------------------------------------- /skin/img/kotchasan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/img/kotchasan.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Kotchasan 2 | 3 | .vscode 4 | datas/ 5 | settings/* 6 | requirement/* 7 | skin/kanit/* 8 | -------------------------------------------------------------------------------- /install/img/white-grad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/install/img/white-grad.png -------------------------------------------------------------------------------- /skin/.htaccess: -------------------------------------------------------------------------------- 1 | DirectoryIndex index.html 2 | 3 | RewriteEngine Off 4 | 5 | -------------------------------------------------------------------------------- /skin/default/login.html: -------------------------------------------------------------------------------- 1 | {LNG_Please login} -------------------------------------------------------------------------------- /modules/car/img/noimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/modules/car/img/noimage.png -------------------------------------------------------------------------------- /skin/booking/login.html: -------------------------------------------------------------------------------- 1 |
  • {LNG_Login}
  • -------------------------------------------------------------------------------- /skin/fonts/supermarket-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/supermarket-webfont.eot -------------------------------------------------------------------------------- /skin/fonts/supermarket-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/supermarket-webfont.ttf -------------------------------------------------------------------------------- /skin/fonts/supermarket-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/supermarket-webfont.woff -------------------------------------------------------------------------------- /skin/fonts/supermarket-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/supermarket-webfont.woff2 -------------------------------------------------------------------------------- /skin/fonts/thsarabunnew-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/thsarabunnew-webfont.eot -------------------------------------------------------------------------------- /skin/fonts/thsarabunnew-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/thsarabunnew-webfont.ttf -------------------------------------------------------------------------------- /skin/fonts/thsarabunnew-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/thsarabunnew-webfont.woff -------------------------------------------------------------------------------- /skin/fonts/thsarabunnew_bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/thsarabunnew_bold-webfont.eot -------------------------------------------------------------------------------- /skin/fonts/thsarabunnew_bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/thsarabunnew_bold-webfont.ttf -------------------------------------------------------------------------------- /skin/fonts/thsarabunnew_bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/thsarabunnew_bold-webfont.woff -------------------------------------------------------------------------------- /skin/fonts/thsarabunnew_italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/thsarabunnew_italic-webfont.eot -------------------------------------------------------------------------------- /skin/fonts/thsarabunnew_italic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/thsarabunnew_italic-webfont.ttf -------------------------------------------------------------------------------- /skin/fonts/thsarabunnew_italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/thsarabunnew_italic-webfont.woff -------------------------------------------------------------------------------- /skin/fonts/thsarabunnew_bolditalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/thsarabunnew_bolditalic-webfont.eot -------------------------------------------------------------------------------- /skin/fonts/thsarabunnew_bolditalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/thsarabunnew_bolditalic-webfont.ttf -------------------------------------------------------------------------------- /skin/fonts/thsarabunnew_bolditalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goragodwiriya/carbooking/HEAD/skin/fonts/thsarabunnew_bolditalic-webfont.woff -------------------------------------------------------------------------------- /skin/default/page.html: -------------------------------------------------------------------------------- 1 |
    2 |

    3 | 4 |

    5 |
    {CONTENT}
    6 |
    -------------------------------------------------------------------------------- /install/complete.php: -------------------------------------------------------------------------------- 1 | ติดตั้งเรียบร้อยแล้ว'; 3 | echo '

    คุณได้ทำการติดตั้ง Kotchasan เป็นที่เรียบร้อยแล้ว

    '; 4 | echo '

    เพื่อความปลอดภัย กรุณาลบไดเร็คทอรี่ install/ ออกก่อนดำเนินการต่อ

    '; 5 | echo '

    เข้าระบบ

    '; 6 | -------------------------------------------------------------------------------- /Kotchasan/Psr/Log/LoggerAwareInterface.php: -------------------------------------------------------------------------------- 1 | 2 | {LNG_Welcome} {DISPLAYNAME} 3 | 7 | -------------------------------------------------------------------------------- /skin/default/member.html: -------------------------------------------------------------------------------- 1 | 2 | {USERICON} 3 | 7 | 8 | -------------------------------------------------------------------------------- /Kotchasan/ApiException.php: -------------------------------------------------------------------------------- 1 | 8 | * @package Kotchasan 9 | */ 10 | 11 | namespace Kotchasan; 12 | 13 | /** 14 | * Exception class for handling API errors. 15 | * 16 | * @see https://www.kotchasan.com/ 17 | */ 18 | class ApiException extends \Exception 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /Kotchasan/Http/Message.php: -------------------------------------------------------------------------------- 1 | 8 | * @package Kotchasan\Http 9 | */ 10 | 11 | namespace Kotchasan\Http; 12 | 13 | /** 14 | * HTTP messages class (PSR-7) 15 | * 16 | * @see https://www.kotchasan.com/ 17 | */ 18 | class Message extends AbstractMessage 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /Kotchasan/InputItemException.php: -------------------------------------------------------------------------------- 1 | 8 | * @package Kotchasan 9 | */ 10 | 11 | namespace Kotchasan; 12 | 13 | /** 14 | * Exception class for handling InputItem errors. 15 | * 16 | * @see https://www.kotchasan.com/ 17 | */ 18 | class InputItemException extends \Exception 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /loader.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright 2016 Goragod.com 8 | * @license https://www.kotchasan.com/license/ 9 | * 10 | * @see https://www.kotchasan.com/ 11 | */ 12 | // load Kotchasan 13 | include 'load.php'; 14 | // Initial Kotchasan Framework 15 | $app = Kotchasan::createWebApplication('Gcms\Config'); 16 | $app->defaultController = 'Index\Loader\Controller'; 17 | $app->run(); 18 | -------------------------------------------------------------------------------- /Kotchasan/Cache/Exception.php: -------------------------------------------------------------------------------- 1 | 8 | * @package Kotchasan 9 | */ 10 | 11 | namespace Kotchasan\Cache; 12 | 13 | /** 14 | * Cache Exception class 15 | * 16 | * This class is used to handle cache-related exceptions. 17 | * 18 | * @see https://www.kotchasan.com/ 19 | */ 20 | class Exception extends \Exception 21 | { 22 | } 23 | -------------------------------------------------------------------------------- /modules/index/controllers/api.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | * @since 1.0 19 | */ 20 | class Controller extends \Kotchasan\ApiController 21 | { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Kotchasan/Database/Exception.php: -------------------------------------------------------------------------------- 1 | 8 | * @package Kotchasan 9 | */ 10 | 11 | namespace Kotchasan\Database; 12 | 13 | /** 14 | * Database Exception class 15 | * 16 | * Exception class for handling database errors. 17 | * 18 | * @see https://www.kotchasan.com/ 19 | */ 20 | class Exception extends \Exception 21 | { 22 | } 23 | -------------------------------------------------------------------------------- /skin/booking/settings.php: -------------------------------------------------------------------------------- 1 | 'Booking', 5 | 'header_bg_color' => '#769E51', 6 | 'warpper_bg_color' => '#D2D2D2', 7 | 'content_bg' => '#FFFFFF', 8 | 'header_color' => '#FFFFFF', 9 | 'footer_color' => '#7E7E7E', 10 | 'logo_color' => '#000000', 11 | 'login_header_color' => '#000000', 12 | 'login_footer_color' => '#7E7E7E', 13 | 'login_color' => '#000000', 14 | 'login_bg_color' => '#D2D2D2', 15 | 'theme_width' => 'wide' 16 | ); 17 | -------------------------------------------------------------------------------- /api.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright 2016 Goragod.com 8 | * @license https://www.kotchasan.com/license/ 9 | * 10 | * @see https://www.kotchasan.com/ 11 | */ 12 | // load Kotchasan 13 | include 'load.php'; 14 | // Initial Kotchasan Framework 15 | $app = Kotchasan::createWebApplication('Gcms\Config'); 16 | $app->defaultRouter = 'Gcms\Router'; 17 | $app->defaultController = 'Index\Api\Controller'; 18 | $app->run(); 19 | -------------------------------------------------------------------------------- /skin/default/settings.php: -------------------------------------------------------------------------------- 1 | 'Default', 5 | 'header_bg_color' => '#769E51', 6 | 'warpper_bg_color' => '#F9F9F9', 7 | 'content_bg' => '#FFFFFF', 8 | 'header_color' => '#FFFFFF', 9 | 'footer_color' => '#7E7E7E', 10 | 'logo_color' => '#FFFFFF', 11 | 'login_header_color' => '#FFFFFF', 12 | 'login_footer_color' => '#FFFFFF', 13 | 'login_color' => '#FFFFFF', 14 | 'login_bg_color' => '#769E51', 15 | 'theme_width' => 'default' 16 | ); 17 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 6 | * @copyright 2016 Goragod.com 7 | * @license https://www.kotchasan.com/license/ 8 | * 9 | * @see https://www.kotchasan.com/ 10 | */ 11 | if (!is_file('settings/config.php')) { 12 | // ติดตั้งครั้งแรก 13 | header('Location: install/index.php'); 14 | } else { 15 | // load Kotchasan 16 | include 'load.php'; 17 | // Initial Kotchasan Framework 18 | $app = Kotchasan::createWebApplication('Gcms\Config'); 19 | $app->run(); 20 | } 21 | -------------------------------------------------------------------------------- /export.php: -------------------------------------------------------------------------------- 1 | 8 | * @copyright 2016 Goragod.com 9 | * @license https://www.kotchasan.com/license/ 10 | * 11 | * @see https://www.kotchasan.com/ 12 | */ 13 | // load Kotchasan 14 | include 'load.php'; 15 | // Initial Kotchasan Framework 16 | $app = Kotchasan::createWebApplication('Gcms\Config'); 17 | $app->defaultController = 'Index\Export\Controller'; 18 | $app->run(); 19 | -------------------------------------------------------------------------------- /line/webhook.php: -------------------------------------------------------------------------------- 1 | 8 | * @copyright 2016 Goragod.com 9 | * @license https://www.kotchasan.com/license/ 10 | * 11 | * @see https://www.kotchasan.com/ 12 | */ 13 | // load Kotchasan 14 | include '../load.php'; 15 | // Initial Kotchasan Framework 16 | $app = Kotchasan::createWebApplication('Gcms\Config'); 17 | $app->defaultController = 'Index\Linewebhook\Controller'; 18 | $app->run(); 19 | -------------------------------------------------------------------------------- /Kotchasan/Controller.php: -------------------------------------------------------------------------------- 1 | 8 | * @package Kotchasan 9 | */ 10 | 11 | namespace Kotchasan; 12 | 13 | /** 14 | * Controller base class 15 | * 16 | * @see https://www.kotchasan.com/ 17 | */ 18 | class Controller extends \Kotchasan\KBase 19 | { 20 | /** 21 | * create class 22 | * 23 | * @return static 24 | */ 25 | public static function create() 26 | { 27 | return new static; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /line/callback.php: -------------------------------------------------------------------------------- 1 | 8 | * @copyright 2016 Goragod.com 9 | * @license https://www.kotchasan.com/license/ 10 | * 11 | * @see https://www.kotchasan.com/ 12 | */ 13 | // load Kotchasan 14 | include '../load.php'; 15 | // Initial Kotchasan Framework 16 | $app = Kotchasan::createWebApplication('Gcms\Config'); 17 | $app->defaultController = 'Index\Linecallback\Controller'; 18 | $app->run(); 19 | -------------------------------------------------------------------------------- /install/settings/database.php: -------------------------------------------------------------------------------- 1 | [ 6 | 'dbdriver' => 'mysql', 7 | 'username' => 'root', 8 | 'password' => '', 9 | 'dbname' => 'car_booking', 10 | 'prefix' => 'app' 11 | ], 12 | 'tables' => [ 13 | 'category' => 'category', 14 | 'language' => 'language', 15 | 'line' => 'line', 16 | 'car_reservation' => 'car_reservation', 17 | 'car_reservation_data' => 'car_reservation_data', 18 | 'vehicles' => 'vehicles', 19 | 'vehicles_meta' => 'vehicles_meta', 20 | 'user' => 'user' 21 | ] 22 | ]; 23 | -------------------------------------------------------------------------------- /modules/index/models/category.php: -------------------------------------------------------------------------------- 1 | 19 | * 20 | * @since 1.0 21 | */ 22 | class Model extends \Gcms\Category 23 | { 24 | /** 25 | * init Class 26 | */ 27 | public function __construct() 28 | { 29 | // ชื่อหมวดหมู่ 30 | $this->categories = Language::get('CATEGORIES', []); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Kotchasan/Psr/Log/NullLogger.php: -------------------------------------------------------------------------------- 1 | logger) { }` 10 | * blocks. 11 | */ 12 | class NullLogger extends AbstractLogger 13 | { 14 | /** 15 | * Logs with an arbitrary level. 16 | * 17 | * @param mixed $level 18 | * @param string $message 19 | * @param array $context 20 | */ 21 | public function log($level, $message, array $context = []) 22 | { 23 | // noop 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Gcms/Router.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | * @since 1.0 19 | */ 20 | class Router extends \Kotchasan\Router 21 | { 22 | /** 23 | * กฏของ Router สำหรับการแยกหน้าเว็บไซต์ 24 | * 25 | * @var array 26 | */ 27 | protected $rules = [ 28 | // api.php/// 29 | '/api\.php\/([a-z0-9]+)\/([a-z]+)\/([a-z]+)/i' => ['module', 'method', 'action'] 30 | ]; 31 | } 32 | -------------------------------------------------------------------------------- /Kotchasan/KBase.php: -------------------------------------------------------------------------------- 1 | 8 | * @package Kotchasan 9 | */ 10 | 11 | namespace Kotchasan; 12 | 13 | /** 14 | * The base class for Kotchasan framework. 15 | * 16 | * @see https://www.kotchasan.com/ 17 | */ 18 | #[\AllowDynamicProperties] 19 | class KBase 20 | { 21 | /** 22 | * Config class instance. 23 | * 24 | * @var object 25 | */ 26 | protected static $cfg; 27 | 28 | /** 29 | * Server request class instance. 30 | * 31 | * @var \Kotchasan\Http\Request 32 | */ 33 | protected static $request; 34 | } 35 | -------------------------------------------------------------------------------- /modules/car/controllers/init.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | * @since 1.0 19 | */ 20 | class Controller 21 | { 22 | /** 23 | * รายการ permission ของโมดูล 24 | * 25 | * @param array $permissions 26 | * 27 | * @return array 28 | */ 29 | public static function updatePermissions($permissions) 30 | { 31 | $permissions['can_manage_car'] = '{LNG_Can manage the} {LNG_Vehicle}'; 32 | return $permissions; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /modules/car/style.css: -------------------------------------------------------------------------------- 1 | .calendar_links { 2 | margin: 10px 0 0; 3 | } 4 | .calendar_links a { 5 | color: inherit; 6 | align-items: center; 7 | display: -webkit-box; 8 | } 9 | .calendar_links a > span { 10 | width: 1em; 11 | height: 1em; 12 | border-radius: 50em; 13 | display: inline-block; 14 | margin-right: 10px; 15 | } 16 | .modal_detail { 17 | padding: 10px; 18 | } 19 | .modal_detail .td { 20 | border-bottom: 1px dashed rgba(0, 0, 0, 0.1); 21 | } 22 | .modal_detail p.item { 23 | margin: 5px; 24 | } 25 | .modal_detail table tbody th, 26 | .modal_detail table td { 27 | vertical-align: top; 28 | text-align: left; 29 | } 30 | .modal_detail table tbody th { 31 | font-weight: bold; 32 | } 33 | .modal_detail .bg { 34 | background-color: #f5f5f5; 35 | } 36 | .modal_detail figure { 37 | margin-top: 0; 38 | } 39 | -------------------------------------------------------------------------------- /modules/car/models/category.php: -------------------------------------------------------------------------------- 1 | 19 | * 20 | * @since 1.0 21 | */ 22 | class Model extends \Gcms\Category 23 | { 24 | /** 25 | * init Class 26 | */ 27 | public function __construct() 28 | { 29 | // ชื่อหมวดหมู่ 30 | $this->categories = Language::get('CAR_OPTIONS', []); 31 | $this->categories += Language::get('CAR_SELECT', []); 32 | $this->categories += Language::get('CATEGORIES', []); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /install/settings/config.php: -------------------------------------------------------------------------------- 1 | '6.9.0', 5 | 'web_title' => 'CRS', 6 | 'web_description' => 'Car Reservation Service', 7 | 'timezone' => 'Asia/Bangkok', 8 | 'member_status' => [ 9 | 0 => 'สมาชิก', 10 | 1 => 'ผู้ดูแลระบบ', 11 | 2 => 'พนักงานขับรถ' 12 | ], 13 | 'color_status' => [ 14 | 0 => '#259B24', 15 | 1 => '#FF0000', 16 | 2 => '#0E0EDA' 17 | ], 18 | 'default_icon' => 'icon-shipping', 19 | 'user_forgot' => 0, 20 | 'user_register' => 0, 21 | 'welcome_email' => 0, 22 | 'car_w' => 600, 23 | 'chauffeur_status' => 2, 24 | 'car_approving' => 0, 25 | 'car_delete' => [3], 26 | 'car_notifications' => 0, 27 | 'car_cancellation' => 0, 28 | 'car_approve_status' => [ 29 | 1 => 0 30 | ], 31 | 'car_approve_department' => [ 32 | 1 => '1' 33 | ] 34 | ]; 35 | -------------------------------------------------------------------------------- /modules/car/models/categories.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | * @since 1.0 19 | */ 20 | class Model extends \Index\Categories\Model 21 | { 22 | /** 23 | * เมธอดเมื่อมีการบันทึกข้อมูลเรียบร้อยแล้ว 24 | * 25 | * @param string $type 26 | * @param array $login 27 | */ 28 | protected function onSaved($type, $login) 29 | { 30 | // หมวดหมู่ของโมดูล 31 | $category = \Car\Category\Model::create(); 32 | // บันทึกการดำเนินการบันทึกหมวดหมู่ 33 | \Index\Log\Model::add(0, 'car', 'Save', '{LNG_Save} '.$category->name($type), $login['id']); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /skin/default/main.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 |

    5 |
    6 | {LINE} 7 | 8 |
    9 |
      {LANGUAGES}
    10 |
    11 | {LOGIN} 12 |
    13 |
    14 | 19 |
    20 | 23 |
    24 | 29 | -------------------------------------------------------------------------------- /modules/index/controllers/login.php: -------------------------------------------------------------------------------- 1 | 19 | * 20 | * @since 1.0 21 | */ 22 | class Controller extends \Gcms\Controller 23 | { 24 | /** 25 | * จัดการกรอบ login 26 | * 27 | * @param Request $request 28 | * @param array $login 29 | * 30 | * @return string 31 | */ 32 | public static function init(Request $request, $login) 33 | { 34 | if ($login) { 35 | return \Index\Login\View::member($request, $login); 36 | } else { 37 | return \Index\Login\View::login($request); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /modules/index/models/province.php: -------------------------------------------------------------------------------- 1 | 19 | * 20 | * @since 1.0 21 | */ 22 | class Model extends \Kotchasan\Model 23 | { 24 | /** 25 | * คืนค่ารายชื่อจังหวัด 26 | * 27 | * @param Request $request 28 | * 29 | * @return JSON 30 | */ 31 | public function toJSON(Request $request) 32 | { 33 | // referer, ajax 34 | if ($request->isReferer() && $request->isAjax()) { 35 | echo json_encode([ 36 | 'province' => \Kotchasan\Province::all($request->post('country')->filter('A-Z')) 37 | ]); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /modules/index/models/telegram.php: -------------------------------------------------------------------------------- 1 | 19 | * 20 | * @since 1.0 21 | */ 22 | class Model extends \Kotchasan\KBase 23 | { 24 | /** 25 | * ทดสอบการส่ง Telegram 26 | * 27 | * @param Request $request 28 | */ 29 | public function test(Request $request) 30 | { 31 | // referer 32 | if ($request->isReferer() && $request->isAjax()) { 33 | $bot_token = $request->post('bot_token')->topic(); 34 | $chat_id = $request->post('chat_id')->topic(); 35 | // ทดสอบส่งข้อความ Telegram 36 | echo \Gcms\Telegram::sendTo($chat_id, strip_tags(self::$cfg->web_title), $bot_token); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /skin/booking/forgotfrm.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    {LNG_Forgot}

    4 | 5 |
    6 | 9 |

    {LNG_Enter your registered username. A new password will be sent to this username.}

    10 |
    11 |
    12 | 13 | 14 | 15 |
    16 |
    17 | {LOGINMENU} 18 |
    19 |
    20 | {LOGIN_MESSAGE} 21 | 22 |
    -------------------------------------------------------------------------------- /skin/dark.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --wrapper-background-color: #000000; 3 | --background: #000000; 4 | --overlay: rgba(255, 255, 255, 0.01); 5 | --secondary-background: rgba(0, 0, 0, 0.01); 6 | --background-transparent: rgba(255, 255, 255, 0.4); 7 | --color: #eeeeee; 8 | --border: rgba(255, 255, 255, 0.3); 9 | --border-highlight: rgba(0, 0, 0, 0.1); 10 | --field: #191C20; 11 | --fieldtext: #eeeeee; 12 | --shadow: rgba(255, 255, 255, 0.2); 13 | --label-bg: rgba(255, 255, 255, 0.05); 14 | --label-shadow: rgba(255, 255, 255, 0.1); 15 | --th-background-color: rgba(255, 255, 255, 0.2); 16 | --th-shadow: #191C20; 17 | --disabled-bg: #2D3035; 18 | --content-bg: #2D3035; 19 | --inputgroups-bg: rgba(255, 255, 255, 0.05); 20 | --inputgroups-button: rgba(255, 255, 255, 0.1); 21 | --inputgroups-button-highlight: rgba(255, 255, 255, 0.15); 22 | --hover-bg: rgba(255, 255, 255, 0.2); 23 | --darker-color: rgba(255, 255, 255, 0.05); 24 | --faded-color: rgba(0, 0, 0, 0.05); 25 | --select-bg: #cccccc; 26 | --select-text: #333333; 27 | --button: rgba(255, 255, 255, 0.1); 28 | } 29 | -------------------------------------------------------------------------------- /skin/default/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {TITLE} 10 | 11 | 12 | 13 | 14 | 15 |
    16 |
    17 |
    18 |
    {MAIN}
    19 |
    20 |
    21 |

    22 | Copyright 2023 ©, {LNG_Version} {VERSION} Created by Kotchasan 23 |

    24 |
    25 |
    26 |
    27 | ^ 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | 4 | RewriteCond %{REQUEST_FILENAME} !-f 5 | RewriteCond %{REQUEST_FILENAME} !-d 6 | RewriteRule . index.php [L,QSA] 7 | 8 | # redirect Authorization to $_SERVER 9 | #RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last] 10 | 11 | 12 | Options -MultiViews 13 | 14 | 15 | # Cross domain access for API 16 | #Header add Access-Control-Allow-Origin "*" 17 | #Header add Access-Control-Allow-Headers "origin, Authorization, x-requested-with, content-type" 18 | #Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS" 19 | 20 | Header set X-XSS-Protection "1; mode=block" 21 | Header append X-FRAME-OPTIONS "SAMEORIGIN" 22 | 23 | # cache 1 week 24 | 25 | Header set Cache-Control "max-age=604800, public" 26 | 27 | 28 | Header set Cache-Control "max-age=604800, public" 29 | 30 | 31 | -------------------------------------------------------------------------------- /Kotchasan/Http/NotFound.php: -------------------------------------------------------------------------------- 1 | 8 | * @package Kotchasan\Http 9 | */ 10 | 11 | namespace Kotchasan\Http; 12 | 13 | /** 14 | * NotFound Class 15 | * 16 | * This class represents a Not Found HTTP response. 17 | * It extends the Response class. 18 | * 19 | * @see https://www.kotchasan.com/ 20 | */ 21 | class NotFound extends Response 22 | { 23 | /** 24 | * Send HTTP Error 404 response. 25 | * 26 | * @param string|null $message The error message (optional). If not specified, a default message is used. 27 | * @param int $code The error code (default: 404). 28 | */ 29 | public function __construct($message = null, $code = 404) 30 | { 31 | $message = empty($message) ? '404 Not Found' : $message; 32 | parent::__construct($code); 33 | $response = $this->withProtocolVersion('1.0'); 34 | if ($message) { 35 | $response->withContent($message); 36 | } 37 | $response->send(); 38 | exit; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /modules/index/models/activate.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | * @since 1.0 19 | */ 20 | class Model extends \Kotchasan\Model 21 | { 22 | /** 23 | * ยืนยันสมาชิก 24 | * สำเร็จคืนค่า true ไม่พบคืนค่า false 25 | * 26 | * @param string $activatecode 27 | * 28 | * @return object|bool 29 | */ 30 | public static function execute($activatecode) 31 | { 32 | // Model 33 | $model = new static(); 34 | // table 35 | $table = $model->getTableName('user'); 36 | // ตรวจสอบรายการที่ activate 37 | $user = $model->db()->first($table, ['activatecode', $activatecode]); 38 | if ($user) { 39 | // activate 40 | $model->db()->update($table, $user->id, ['activatecode' => '']); 41 | return true; 42 | } 43 | return false; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Gcms/Sms.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | * @since 1.0 19 | */ 20 | class Sms 21 | { 22 | /** 23 | * เมธอดส่งข้อความไปยัง SMS 24 | * คืนค่าข้อความว่างถ้าสำเร็จ หรือ คืนค่าข้อความผิดพลาด 25 | * 26 | * @param string $msisdn หมายเลขโทรศัพท์ 27 | * @param string $message ข้อความที่จะส่ง 28 | * 29 | * @return string 30 | */ 31 | public static function send($msisdn, $message) 32 | { 33 | // เขียนคำสั่งเพื่อส่ง SMS ที่นี่ 34 | return \Thaibluksms\Sms::send($msisdn, strip_tags($message)); 35 | } 36 | 37 | /** 38 | * ตรวจสอบเครดิต 39 | * 40 | * @param $premium 41 | * 42 | * @return string 43 | */ 44 | public static function check_credit() 45 | { 46 | return [ 47 | 'standard' => 'Standard ('.\Thaibluksms\Sms::check_credit(false).')', 48 | 'premium' => 'Premium ('.\Thaibluksms\Sms::check_credit(true).')' 49 | ]; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /install/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #333; 3 | font-size: 18px; 4 | color: #333333; 5 | font-family: "THSarabunNew", Tahoma, Loma; 6 | } 7 | body, 8 | li { 9 | line-height: 2; 10 | } 11 | main { 12 | -moz-border-radius: 11px; 13 | -webkit-border-radius: 11px; 14 | border-radius: 11px; 15 | background-color: #ffffff; 16 | border: 1px solid #dfdfdf; 17 | margin: 2em auto; 18 | padding: 1em 2em; 19 | width: 800px; 20 | max-width: 85%; 21 | } 22 | h1 { 23 | font-size: 250%; 24 | text-shadow: 1px 1px 5px #666; 25 | } 26 | h2 { 27 | color: #999; 28 | display: block; 29 | border-bottom: 1px solid #bbbbbb; 30 | padding-bottom: 5px; 31 | } 32 | ul { 33 | list-style-type: none; 34 | padding: 0; 35 | } 36 | li { 37 | border-bottom: 1px dashed #ddd; 38 | } 39 | .correct { 40 | background: transparent url(img/valid.png) 0 50% no-repeat; 41 | color: #093; 42 | padding-left: 20px; 43 | } 44 | .incorrect { 45 | background: transparent url(img/invalid.png) 0 50% no-repeat; 46 | color: #f00; 47 | padding-left: 20px; 48 | } 49 | .footer { 50 | text-align: center; 51 | color: #999; 52 | margin-top: 10px; 53 | padding: 1em 2em 0 2em; 54 | border-top: solid 1px #ddd; 55 | } 56 | a.icon-help { 57 | color: red; 58 | font-size: 1.4em; 59 | } 60 | form .item { 61 | padding-bottom: 0; 62 | } -------------------------------------------------------------------------------- /language/en.js: -------------------------------------------------------------------------------- 1 | var ACCEPT_ALL = 'Accept all'; 2 | var ADD = 'Add'; 3 | var CANCEL = 'Cancel'; 4 | var CHANGE_COLOR = 'change color'; 5 | var CHECK = 'check'; 6 | var CHECKBOX = 'Checkbox'; 7 | var COOKIES_SETTINGS = 'Cookies settings'; 8 | var DELETE = 'delete'; 9 | var DISABLE = 'Disable'; 10 | var DRAG_AND_DROP_TO_REORDER = 'Drag and drop to reorder'; 11 | var ENABLE = 'Enable'; 12 | var GO_TO_PAGE = 'go to page'; 13 | var INVALID_DATA = 'XXX Invalid data'; 14 | var ITEM = 'item'; 15 | var ITEMS = 'items'; 16 | var NEXT_MONTH = 'Next Month'; 17 | var PLEASE_BROWSE_FILE = 'Please browse file'; 18 | var PLEASE_FILL_IN = 'Please fill in'; 19 | var PLEASE_SAVE_BEFORE_CONTINUING = 'Please save before continuing'; 20 | var PLEASE_SELECT = 'Please select'; 21 | var PLEASE_SELECT_AT_LEAST_ONE_ITEM = 'Please select XXX at least one item'; 22 | var PREV_MONTH = 'Prev Month'; 23 | var SELECT_ALL = 'select all'; 24 | var SELECT_NONE = 'select none'; 25 | var SHOWING_PAGE = 'showing page'; 26 | var SORRY_XXX_NOT_FOUND = 'Sorry XXX not found'; 27 | var SUCCESSFULLY_COPIED_TO_CLIPBOARD = 'Successfully copied to clipboard'; 28 | var SUCCESSFULLY_UPLOADED_XXX_FILES = 'Successfully uploaded XXX files'; 29 | var THE_TYPE_OF_FILE_IS_INVALID = 'The type of file is invalid'; 30 | var UNCHECK = 'uncheck'; 31 | var YOU_WANT_TO_XXX = 'You want to XXX ?'; 32 | var YOU_WANT_TO_XXX_THE_SELECTED_ITEMS = 'You want to XXX the selected items ?'; -------------------------------------------------------------------------------- /language/th.js: -------------------------------------------------------------------------------- 1 | var ACCEPT_ALL = 'ยอมรับทั้งหมด'; 2 | var ADD = 'เพิ่ม'; 3 | var CANCEL = 'ยกเลิก'; 4 | var CHANGE_COLOR = 'เปลี่ยนสี'; 5 | var CHECK = 'เลือก'; 6 | var CHECKBOX = 'ตัวเลือก'; 7 | var COOKIES_SETTINGS = 'ตั้งค่าคุกกี้'; 8 | var DELETE = 'ลบ'; 9 | var DISABLE = 'ปิดใช้งาน'; 10 | var DRAG_AND_DROP_TO_REORDER = 'ลากและวางเพื่อจัดลำดับใหม่'; 11 | var ENABLE = 'เปิดใช้งาน'; 12 | var GO_TO_PAGE = 'ไปหน้าที่'; 13 | var INVALID_DATA = 'ข้อมูล XXX ไม่ถูกต้อง'; 14 | var ITEM = 'รายการ'; 15 | var ITEMS = 'รายการ'; 16 | var NEXT_MONTH = 'เดือนถัดไป'; 17 | var PLEASE_BROWSE_FILE = 'กรุณาเลือกไฟล์'; 18 | var PLEASE_FILL_IN = 'กรุณากรอก'; 19 | var PLEASE_SAVE_BEFORE_CONTINUING = 'กรุณาบันทึก ก่อนดำเนินการต่อ'; 20 | var PLEASE_SELECT = 'กรุณาเลือก'; 21 | var PLEASE_SELECT_AT_LEAST_ONE_ITEM = 'กรุณาเลือก XXX อย่างน้อย 1 รายการ'; 22 | var PREV_MONTH = 'เดือนก่อนหน้า'; 23 | var SELECT_ALL = 'เลือกทั้งหมด'; 24 | var SELECT_NONE = 'ไม่เลือกรายการใดเลย'; 25 | var SHOWING_PAGE = 'กำลังแสดงหน้าที่'; 26 | var SORRY_XXX_NOT_FOUND = 'ขออภัย ไม่พบ XXX ที่ต้องการ'; 27 | var SUCCESSFULLY_COPIED_TO_CLIPBOARD = 'สำเนาไปยังคลิปบอร์ดเรียบร้อย'; 28 | var SUCCESSFULLY_UPLOADED_XXX_FILES = 'อัปโหลดเรียบร้อย XXX ไฟล์'; 29 | var THE_TYPE_OF_FILE_IS_INVALID = 'ชนิดของไฟล์ไม่ถูกต้อง'; 30 | var UNCHECK = 'ไม่เลือก'; 31 | var YOU_WANT_TO_XXX = 'คุณต้องการ XXX ?'; 32 | var YOU_WANT_TO_XXX_THE_SELECTED_ITEMS = 'คุณต้องการ XXX รายการที่เลือก ?'; -------------------------------------------------------------------------------- /language/la.js: -------------------------------------------------------------------------------- 1 | var ACCEPT_ALL = 'ຍອມຮັບທັງຫມົດ'; 2 | var ADD = 'ເພີ່ມ​ຂຶ້ນ'; 3 | var CANCEL = 'ຍົກເລີກ'; 4 | var CHANGE_COLOR = 'ປ່ຽນສີ'; 5 | var CHECK = 'ເລືອກ'; 6 | var CHECKBOX = 'ກ່ອງກາເຄື່ອງໝາຍ'; 7 | var COOKIES_SETTINGS = 'ຕັ້ງຄ່າຄຸກກີ'; 8 | var DELETE = 'ລຶບ'; 9 | var DISABLE = 'ປິດໃຊ້ການ'; 10 | var DRAG_AND_DROP_TO_REORDER = 'ລາກແລ້ວວາງລົງເພື່ອຈັດຮຽງໃໝ່'; 11 | var ENABLE = 'ເປີດໃຊ້ການ'; 12 | var GO_TO_PAGE = 'ໄປ​ຫນ້າ​ທີ່​'; 13 | var INVALID_DATA = 'ຂໍ້ມູນ XXX ບໍ່ຖືກຕ້ອງ'; 14 | var ITEM = 'ລາຍການ'; 15 | var ITEMS = 'ລາຍການ'; 16 | var NEXT_MONTH = 'ເດືອນຕໍ່ໄປ'; 17 | var PLEASE_BROWSE_FILE = 'ກະລຸນາເລືອກແຟ້ມຂໍ້ມູນ'; 18 | var PLEASE_FILL_IN = 'ກະລຸນາພີ່ມ'; 19 | var PLEASE_SAVE_BEFORE_CONTINUING = 'ກະລຸນາບັນທຶກກ່ອນດຳເນີນການຕໍ່'; 20 | var PLEASE_SELECT = 'ກະລຸນາເລືອກ'; 21 | var PLEASE_SELECT_AT_LEAST_ONE_ITEM = 'ກະລຸນາເລືອກ XXX ຢ່າງໜ້ອຍໜຶ່ງລາຍການ'; 22 | var PREV_MONTH = 'ເດືອນທີ່ຜ່ານມາ'; 23 | var SELECT_ALL = 'ເລືອກທັງໝົດ'; 24 | var SELECT_NONE = 'ບໍ່ເລືອກລາຍການໃດເລີຍ'; 25 | var SHOWING_PAGE = 'ສະແດງໜ້າທີ່'; 26 | var SORRY_XXX_NOT_FOUND = 'ຂໍອະໄພບໍ່ພົບ XXX ທີ່ຕ້ອງການ'; 27 | var SUCCESSFULLY_COPIED_TO_CLIPBOARD = 'ສຳເນົາໄປຍັງຄິບບອດຮຽບຮ້ອຍ'; 28 | var SUCCESSFULLY_UPLOADED_XXX_FILES = 'ອັບໂຫຼດຮຽບຮ້ອຍ XXX ແຟ້ມ'; 29 | var THE_TYPE_OF_FILE_IS_INVALID = 'ຊະນິດຂອງແຟ້ມບໍ່ຖືກຕ້ອງ'; 30 | var UNCHECK = 'ບໍ່ເລືອກ'; 31 | var YOU_WANT_TO_XXX = 'ທ່ານບໍ່ຕ້ອງການ XXX ?'; 32 | var YOU_WANT_TO_XXX_THE_SELECTED_ITEMS = 'ທ່ານຕ້ອງການ XXX ລາຍການທີ່ເລືອກ?'; -------------------------------------------------------------------------------- /modules/index/controllers/privacy.php: -------------------------------------------------------------------------------- 1 | 20 | * 21 | * @since 1.0 22 | */ 23 | class Controller extends \Gcms\Controller 24 | { 25 | /** 26 | * @param Request $request 27 | */ 28 | public function render(Request $request) 29 | { 30 | // template ตามภาษาที่เลือก ถ้าไม่มีใช้ภาษาไทย 31 | $template = ROOT_PATH.self::$cfg->skin.'/privacy_'.Language::name().'.html'; 32 | if (!file_exists($template)) { 33 | $template = ROOT_PATH.self::$cfg->skin.'/privacy_th.html'; 34 | } 35 | // content 36 | $content = file_get_contents($template); 37 | // title, menu 38 | if (preg_match('/]{0,}>(.*)<\/h1>/', $content, $match)) { 39 | $this->title = strip_tags($match[1]); 40 | } 41 | $this->menu = 'privacy'; 42 | // คืนค่า HTML 43 | $data_controller = empty(self::$cfg->data_controller) ? '' : self::$cfg->data_controller; 44 | return str_replace('{DATACONTROLLER}', $data_controller, $content); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /skin/default/forgotfrm.html: -------------------------------------------------------------------------------- 1 |
    2 | 6 |
    7 |

    8 | {LNG_Forgot} 9 | 10 |
      {LANGUAGES}
    11 |
    12 |

    13 | 14 |
    15 | 18 |

    {LNG_Enter your registered username. A new password will be sent to this username.}

    19 |
    20 |
    21 | 22 | 23 | 24 |
    25 |
    26 | {LOGINMENU} 27 |
    28 |
    29 | {LOGIN_MESSAGE} 30 | 31 |
    32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ระบบจองยานพาหนะออนไลน์ Car Reservation Service (CRS) 2 | 3 | ระบบจองยานพาหนะออนไลน์ ออกแบบโดยใช้ คชสาร เฟรมเวอร์ค (PHP) รองรับ 3 ภาษา ไทย อังกฤษ และ ลาว สามารถตรวจสอบการจองซ้ำได้ แสดงผลการจองรูปแบบปฏิทิน 4 | 5 | รายละเอียดเพิ่มเติม https://www.kotchasan.com/index.php?module=knowledge&id=104 6 | 7 | ## ความต้องการของระบบ 8 | 9 | - PHP 5.6 ขึ้นไป 10 | - ext-mbstring 11 | - PDO Mysql 12 | 13 | ## การติดตั้งและการอัปเกรด 14 | 15 | 1. ให้อัปโหลดโค้ดทั้งหมดจากที่ดาวน์โหลด ขึ้นไปบน Server 16 | 2. เรียกตัวติดตั้ง http://domain.tld/install/ (เปลี่ยน domain.tld เป็นโดเมนรวมพาธที่ทำการติดตั้งไว้) และดำเนินการตามขั้นตอนการติดตั้งหรืออัปเกรดจนกว่าจะเสร็จสิ้น 17 | 3. ลบไดเร็คทอรี่ install/ ออก 18 | 19 | ## การใช้งาน 20 | 21 | - เข้าระบบเป็นผู้ดูแลระบบ : `admin@localhost` และ Password : `admin` 22 | - เข้าระบบเป็นสมาชิก : `demo@localhost` และ Password : `demo` 23 | 24 | ## ข้อตกลงการนำไปใช้งาน 25 | 26 | - สามารถนำไปใช้งานส่วนตัวได้ 27 | - สามารถพัฒนาต่อยอดได้ 28 | - มีข้อสงสัยสามารถสอบถามได้ที่บอร์ดของคชสาร https://www.kotchasan.com 29 | - ต้องการให้ผู้เขียนพัฒนาเพิ่มเติม ติดต่อผู้เขียนได้โดยตรง (อาจมีค่าใช้จ่าย) 30 | - ผู้เขียนไม่รับผิดชอบข้อผิดพลาดใดๆในการใช้งาน 31 | - ห้ามขาย ถ้าต้องการนำไปพัฒนาต่อเพื่อขายให้ติดต่อผู้เขียนก่อน (เพื่อบริจาค) 32 | 33 | ## หากต้องการสนับสนุนผู้เขียน สามารถบริจาคช่วยเหลือค่า Server ได้ที่ 34 | 35 | ``` 36 | ธนาคาร กสิกรไทย สาขากาญจนบุรี 37 | เลขที่บัญชี 221-2-78341-5 38 | ชื่อบัญชี กรกฎ วิริยะ 39 | ``` 40 | -------------------------------------------------------------------------------- /install/upgrade1.php: -------------------------------------------------------------------------------- 1 | '; 6 | echo '

    สมาชิกผู้ดูแลระบบ

    '; 7 | echo '

    คุณจะต้องระบุข้อมูลสมาชิกผู้ดูแลระบบสูงสุด

    '; 8 | echo '

    '; 9 | if (empty($username)) { 10 | echo '

    กรุณากรอกชื่อผู้ใช้ของผู้ดูแลระบบสูงสุด

    '; 11 | } else { 12 | echo '

    กรุณากรอกชื่อผู้ใช้ของผู้ดูแลระบบสูงสุด

    '; 13 | } 14 | echo '

    '; 15 | if (empty($password)) { 16 | echo '

    กรุณากรอกรหัสผ่านของผู้ดูแลระบบสูงสุด

    '; 17 | } else { 18 | echo '

    กรุณากรอกรหัสผ่านของผู้ดูแลระบบสูงสุด

    '; 19 | } 20 | echo ''; 21 | echo '

    '; 22 | echo ''; 23 | } 24 | -------------------------------------------------------------------------------- /Kotchasan/Grid.php: -------------------------------------------------------------------------------- 1 | 8 | * @package Kotchasan 9 | */ 10 | 11 | namespace Kotchasan; 12 | 13 | /** 14 | * This class represents a grid system used for layout purposes. 15 | * 16 | * @see https://www.kotchasan.com/ 17 | */ 18 | class Grid extends \Kotchasan\Template 19 | { 20 | /** 21 | * @var int The number of columns in the grid 22 | */ 23 | protected $cols; 24 | 25 | /** 26 | * Constructor 27 | */ 28 | public function __construct() 29 | { 30 | // Set the default number of columns to 1 31 | $this->cols = 1; 32 | } 33 | 34 | /** 35 | * Get the number of columns in the grid. 36 | * 37 | * @return int The number of columns 38 | */ 39 | public function getCols() 40 | { 41 | return $this->cols; 42 | } 43 | 44 | /** 45 | * Set the number of columns in the grid. 46 | * 47 | * @param int $cols The number of columns (must be greater than 0) 48 | * 49 | * @return static This Grid instance for method chaining 50 | */ 51 | public function setCols($cols) 52 | { 53 | // Ensure the number of columns is at least 1 54 | $this->cols = max(1, (int) $cols); 55 | // Set the value of 'num' property to match the number of columns 56 | $this->num = $this->cols; 57 | return $this; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /load.php: -------------------------------------------------------------------------------- 1 | 6 | * @copyright 2016 Goragod.com 7 | * @license https://www.kotchasan.com/license/ 8 | * 9 | * @see https://www.kotchasan.com/ 10 | */ 11 | /** 12 | * document root (full path) 13 | * eg /home/user/public_html/ 14 | * 15 | * @var string 16 | */ 17 | define('ROOT_PATH', str_replace('\\', '/', dirname(__FILE__)).'/'); 18 | /** 19 | * โฟลเดอร์เก็บข้อมูล 20 | * 21 | * @var string 22 | */ 23 | define('DATA_FOLDER', 'datas/'); 24 | /** 25 | * 0 (default) บันทึกเฉพาะข้อผิดพลาดร้ายแรงลง error_log.php 26 | * 1 บันทึกข้อผิดพลาดและคำเตือนลง error_log.php 27 | * 2 แสดงผลข้อผิดพลาดและคำเตือนออกทางหน้าจอ (ใช้เฉพาะตอนออกแบบเท่านั้น) 28 | * 29 | * @var int 30 | */ 31 | define('DEBUG', 0); 32 | /** 33 | * false (default) 34 | * true บันทึกการ query ฐานข้อมูลลง log (ใช้เฉพาะตอนออกแบบเท่านั้น) 35 | * 36 | * @var bool 37 | */ 38 | define('DB_LOG', false); 39 | /** 40 | * ภาษาเริ่มต้น 41 | * auto = อัตโนมัติจากบราวเซอร์ 42 | * th, en ตามภาษาที่เลือก 43 | * 44 | * @var string 45 | */ 46 | define('INIT_LANGUAGE', 'th'); 47 | /** 48 | * เปิด/ปิดการใช้งาน Session บน Database 49 | * ต้องติดตั้งตาราง sessions ด้วย 50 | * 51 | * @var bool 52 | */ 53 | define('USE_SESSION_DATABASE', false); 54 | /* 55 | * ระบุ SQL Mode ที่ต้องการ 56 | * หากพบปัญหาการใช้งาน 57 | * 58 | * @var string 59 | */ 60 | //define('SQL_MODE', ''); 61 | /** 62 | * load Kotchasan 63 | */ 64 | include 'Kotchasan/load.php'; 65 | -------------------------------------------------------------------------------- /Thaibluksms/Sms.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | * @since 1.0 19 | */ 20 | class Sms extends \Kotchasan\KBase 21 | { 22 | /** 23 | * ส่ง SMS. 24 | * 25 | * @param $msisdn 26 | * @param $message 27 | * 28 | * @return string 29 | */ 30 | public static function send($msisdn, $message) 31 | { 32 | if (!empty(self::$cfg->sms_username) && !empty(self::$cfg->sms_password)) { 33 | include_once 'sms.class.php'; 34 | 35 | return \sms::send_sms(self::$cfg->sms_username, self::$cfg->sms_password, $msisdn, $message, self::$cfg->sms_sender, '', self::$cfg->sms_type); 36 | } 37 | 38 | return ''; 39 | } 40 | 41 | /** 42 | * ตรวจสอบเครดิต 43 | * 44 | * @param $premium 45 | * 46 | * @return string 47 | */ 48 | public static function check_credit($premium) 49 | { 50 | if (!empty(self::$cfg->sms_username) && !empty(self::$cfg->sms_password)) { 51 | include_once 'sms.class.php'; 52 | $type = $premium ? 'credit_remain_premium' : 'credit_remain'; 53 | 54 | return \sms::check_credit(self::$cfg->sms_username, self::$cfg->sms_password, $type); 55 | } 56 | 57 | return ''; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /modules/car/models/checker.php: -------------------------------------------------------------------------------- 1 | 19 | * 20 | * @since 1.0 21 | */ 22 | class Model 23 | { 24 | /** 25 | * ตรวจสอบรถว่าง 26 | * คืนค่า true ถ้ารถว่าง 27 | * ไม่ว่าง คืนค่า false 28 | * 29 | * @param array $save 30 | * 31 | * @return bool 32 | */ 33 | public static function availability($save) 34 | { 35 | $where = [ 36 | ['vehicle_id', $save['vehicle_id']], 37 | Sql::create('(`status`=1 OR `approve`>1)') 38 | ]; 39 | if (!empty($save['id'])) { 40 | $where[] = ['id', '!=', $save['id']]; 41 | } 42 | $search = \Kotchasan\Model::createQuery() 43 | ->from('car_reservation') 44 | ->where($where) 45 | ->andWhere([ 46 | Sql::create("('$save[end]' BETWEEN `begin` AND `end`)"), 47 | Sql::create("('$save[begin]' BETWEEN `begin` AND `end`)"), 48 | Sql::create("(`begin` BETWEEN '$save[begin]' AND '$save[end]' AND `end` BETWEEN '$save[begin]' AND '$save[end]')") 49 | ], 'OR') 50 | ->first('id'); 51 | return $search === false ? true : false; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /install/step2.php: -------------------------------------------------------------------------------- 1 | '; 6 | echo '

    สมาชิกผู้ดูแลระบบ

    '; 7 | echo '

    คุณจะต้องระบุข้อมูลสมาชิกผู้ดูแลระบบ ซึ่งจะมีสิทธิสูงสุดในระบบ ห้ามลืม ห้ามหาย

    '; 8 | echo '

    '; 9 | if (empty($username)) { 10 | echo '

    กรุณากรอกชื่อผู้ใช้ที่ต้องการ ใช้ในการเข้าระบบเป็นผู้ดูแลสูงสุด

    '; 11 | } else { 12 | echo '

    กรุณากรอกชื่อผู้ใช้ที่ต้องการ ใช้ในการเข้าระบบเป็นผู้ดูแลสูงสุด

    '; 13 | } 14 | echo '

    '; 15 | if (empty($password)) { 16 | echo '

    กรุณากรอกรหัสผ่านที่ต้องการ ใช้ในการเข้าระบบเป็นผู้ดูแลสูงสุด

    '; 17 | } else { 18 | echo '

    กรุณากรอกรหัสผ่านที่ต้องการ ใช้ในการเข้าระบบเป็นผู้ดูแลสูงสุด

    '; 19 | } 20 | echo ''; 21 | echo '

    '; 22 | echo ''; 23 | } 24 | -------------------------------------------------------------------------------- /modules/index/controllers/export.php: -------------------------------------------------------------------------------- 1 | 20 | * 21 | * @since 1.0 22 | */ 23 | class Controller extends \Kotchasan\Controller 24 | { 25 | /** 26 | * Controller สำหรับส่งออกข้อมูล 27 | * 28 | * @param Request $request 29 | */ 30 | public function index(Request $request) 31 | { 32 | // ตัวแปรป้องกันการเรียกหน้าเพจโดยตรง 33 | define('MAIN_INIT', 'export'); 34 | // session cookie 35 | $request->initSession(); 36 | // กำหนด skin ให้กับ template 37 | Template::init(self::$cfg->skin); 38 | // ตรวจสอบโมดูลที่เรียก 39 | $className = \Index\Main\Controller::parseRequest($request); 40 | $ret = false; 41 | if ($className && method_exists($className, 'export')) { 42 | // create Class 43 | $ret = createClass($className)->export($request); 44 | } 45 | if ($ret === false) { 46 | // ไม่พบโมดูล หรือ ไม่สามารถทำรายการได้ 47 | new \Kotchasan\Http\NotFound(); 48 | } elseif (is_string($ret)) { 49 | // คืนค่าเป็น string มา เช่น พิมพ์ 50 | echo $ret; 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /modules/index/views/otp.php: -------------------------------------------------------------------------------- 1 | 21 | * 22 | * @since 1.0 23 | */ 24 | class View extends \Gcms\View 25 | { 26 | /** 27 | * ฟอร์มยืนยันหมายเลขโทรศัพท์ (OTP) 28 | * 29 | * @param Request $request 30 | * @param array $payload 31 | * @param string $token 32 | * 33 | * @return string 34 | */ 35 | public static function render(Request $request, $payload, $token) 36 | { 37 | // otp.html 38 | $template = Template::createFromFile(ROOT_PATH.self::$cfg->skin.'/otp.html'); 39 | $template->add([ 40 | '/{ID}/' => $token, 41 | '/{TIME}/' => \Gcms\View::getTimeElapsed($payload['expired']), 42 | '/{TOKEN}/' => $request->createToken(), 43 | /* ภาษา */ 44 | '/{LNG_([^}]+)}/e' => '\Kotchasan\Language::parse(array(1=>"$1"))', 45 | /* ภาษา ที่ใช้งานอยู่ */ 46 | '/{LANGUAGE}/' => Language::name(), 47 | /* template name */ 48 | '/{SKIN}/' => self::$cfg->skin, 49 | /* website URL */ 50 | '/{WEBURL}/' => WEB_URL, 51 | // เลขเวอร์ชั่นของไฟล์ 52 | '/{REV}/' => isset(self::$cfg->reversion) ? self::$cfg->reversion : '' 53 | ]); 54 | // คืนค่า HTML 55 | return $template->render(); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /js/google.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Google signin Script 3 | * 4 | * @filesource js/google.js 5 | * @link https://www.kotchasan.com/ 6 | * @copyright 2018 Goragod.com 7 | * @license https://www.kotchasan.com/license/ 8 | */ 9 | function initGooleSignin(google_client_id) { 10 | window.setTimeout(function() { 11 | loadJavascript( 12 | "apis-google", 13 | "https://accounts.google.com/gsi/client", 14 | googleSigninLoad 15 | ); 16 | }, 100); 17 | window.google_client_id = google_client_id; 18 | } 19 | 20 | var googleSigninLoad = function() { 21 | var handleCredentialResponse = function(response) { 22 | let responsePayload = jwt_decode(response.credential), 23 | q = []; 24 | if ($E("token")) { 25 | q.push("token=" + $E("token").value); 26 | } 27 | q.push("id=" + encodeURIComponent(responsePayload.sub)); 28 | q.push("name=" + encodeURIComponent(responsePayload.name)); 29 | q.push("image=" + encodeURIComponent(responsePayload.picture)); 30 | q.push("email=" + encodeURIComponent(responsePayload.email)); 31 | send(WEB_URL + "index.php/" + ($E("google_action") ? $E("google_action").value : "index/model/gglogin/chklogin"), q.join("&"), socialLoginSubmit); 32 | }; 33 | google.accounts.id.initialize({ 34 | client_id: window.google_client_id + ".apps.googleusercontent.com", 35 | callback: handleCredentialResponse 36 | }); 37 | if ($E("google_login")) { 38 | var o = { 39 | theme: "outline", 40 | size: "large" 41 | }; 42 | var datas = $E("google_login").dataset; 43 | for (var prop in datas) { 44 | o[prop] = datas[prop]; 45 | } 46 | google.accounts.id.renderButton($E("google_login"), o); 47 | } 48 | }; 49 | -------------------------------------------------------------------------------- /skin/booking/loginfrm.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    4 | 5 |
    6 | 9 | 12 |
    13 |
    14 | 15 | 16 | 17 | 20 | 21 | 22 |
    23 | {LINELOGIN} 24 | 25 |
    26 |
    27 | {LOGINMENU} 28 | 29 | 30 |
    31 |
    32 | 35 | {LOGIN_MESSAGE} 36 |
    -------------------------------------------------------------------------------- /modules/car/views/tools.php: -------------------------------------------------------------------------------- 1 | 20 | * 21 | * @since 1.0 22 | */ 23 | class View extends \Gcms\View 24 | { 25 | /** 26 | * คืนค่าเวลาจอง 27 | * 28 | * @param array $item 29 | * 30 | * @return string 31 | */ 32 | public static function dateRange($item) 33 | { 34 | if ( 35 | preg_match('/([0-9]{4,4}\-[0-9]{2,2}\-[0-9]{2,2})\s[0-9\:]+$/', $item['begin'], $begin) && 36 | preg_match('/([0-9]{4,4}\-[0-9]{2,2}\-[0-9]{2,2})\s[0-9\:]+$/', $item['end'], $end) 37 | ) { 38 | if ($begin[1] == $end[1]) { 39 | return Date::format($item['begin'], 'd M Y').' {LNG_Time} '.Date::format($item['begin'], 'TIME_FORMAT').' {LNG_to} '.Date::format($item['end'], 'TIME_FORMAT'); 40 | } else { 41 | return Date::format($item['begin']).' {LNG_to} '.Date::format($item['end']); 42 | } 43 | } 44 | } 45 | 46 | /** 47 | * คืนค่าข้อความสถานะการลา 48 | * 49 | * @param array $item 50 | * @param bool $color 51 | * 52 | * @return string 53 | */ 54 | public static function toStatus($item, $color = false) 55 | { 56 | $text = Language::get('BOOKING_STATUS', '', $item['status']); 57 | if ($color) { 58 | return ''.$text.''; 59 | } else { 60 | return $text; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /skin/booking/registerfrm.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    {LNG_Register}

    4 |
    5 | 8 | 11 | 14 | 17 | {CATEGORIES} 18 |
    19 |
    20 | 21 | 22 | 23 |
    24 |
    25 | {LOGINMENU} 26 |
    27 |
    28 | {LOGIN_MESSAGE} 29 | 30 |
    31 | -------------------------------------------------------------------------------- /Kotchasan/Model.php: -------------------------------------------------------------------------------- 1 | 8 | * @package Kotchasan 9 | */ 10 | 11 | namespace Kotchasan; 12 | 13 | use Kotchasan\Database\Query; 14 | 15 | /** 16 | * This class serves as the base class for all models in the application. 17 | * It extends the Query class and provides common functionality for interacting with the database. 18 | * 19 | * @see https://www.kotchasan.com/ 20 | */ 21 | class Model extends Query 22 | { 23 | /** 24 | * The name of the database connection to be used. 25 | * This is used to load the connection settings from settings/database.php. 26 | * 27 | * @var string 28 | */ 29 | protected $conn = 'mysql'; 30 | 31 | /** 32 | * Class constructor 33 | */ 34 | public function __construct() 35 | { 36 | parent::__construct($this->conn); 37 | } 38 | 39 | /** 40 | * Create a new instance of the model. 41 | * 42 | * @return static 43 | */ 44 | public static function create() 45 | { 46 | return new static; 47 | } 48 | 49 | /** 50 | * Create a new database connection instance. 51 | * 52 | * @return \Kotchasan\Database\Driver 53 | */ 54 | public static function createDb() 55 | { 56 | $model = new static; 57 | return $model->db(); 58 | } 59 | 60 | /** 61 | * Create a new QueryBuilder instance. 62 | * 63 | * @return \Kotchasan\Database\QueryBuilder 64 | */ 65 | public static function createQuery() 66 | { 67 | $model = new static; 68 | return $model->db()->createQuery(); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /modules/index/views/login.php: -------------------------------------------------------------------------------- 1 | stored_img_type)) { 27 | $usericon = '{DISPLAYNAME}{DISPLAYNAME}'; 28 | } else { 29 | $username = empty($login['username']) ? $login['name'] : $login['username']; 30 | if ($username == '') { 31 | $usericon = '{DISPLAYNAME}{DISPLAYNAME}'; 32 | } else { 33 | $usericon = '{DISPLAYNAME}'; 34 | } 35 | } 36 | // member.html 37 | $template = Template::create('', '', 'member'); 38 | $template->add([ 39 | '/{USERICON}/' => $usericon, 40 | '/{DISPLAYNAME}/' => empty($login['name']) ? $login['username'] : $login['name'] 41 | ]); 42 | return $template->render(); 43 | } 44 | 45 | /** 46 | * กรอบ login 47 | * 48 | * @param Request $request 49 | * 50 | * @return string 51 | */ 52 | public static function login(Request $request) 53 | { 54 | // login.html 55 | return Template::load('', '', 'login'); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /modules/index/models/checker.php: -------------------------------------------------------------------------------- 1 | 20 | * 21 | * @since 1.0 22 | */ 23 | class Model extends \Kotchasan\Model 24 | { 25 | /** 26 | * ฟังก์ชั่นตรวจสอบความถูกต้องของ username และตรวจสอบ username ซ้ำ 27 | */ 28 | public function username() 29 | { 30 | // referer 31 | if (self::$request->isReferer()) { 32 | try { 33 | // ค่าที่ส่งมา 34 | $id = self::$request->post('id')->toInt(); 35 | $value = self::$request->post('value')->url(); 36 | if (count(self::$cfg->login_fields) == 1 && in_array('email', self::$cfg->login_fields) && !Validator::email($value)) { 37 | // อีเมล์เท่านั้น ตรวจสอบ Email 38 | echo Language::replace('Invalid :name', [':name' => Language::get('Email')]); 39 | } else { 40 | // ตรวจสอบ username ซ้ำ 41 | $search = $this->db()->first($this->getTableName('user'), ['username', $value]); 42 | if ($search && ($id == 0 || $id != $search->id)) { 43 | echo Language::replace('This :name already exist', [':name' => Language::get('Username')]); 44 | } 45 | } 46 | } catch (\Kotchasan\InputItemException $e) { 47 | echo Language::replace('Invalid :name', [':name' => Language::get('Username')]); 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Kotchasan/Database/Db.php: -------------------------------------------------------------------------------- 1 | 8 | * @package Kotchasan 9 | */ 10 | 11 | namespace Kotchasan\Database; 12 | 13 | use Kotchasan\Database; 14 | 15 | /** 16 | * Database base class 17 | * 18 | * Provides the base functionality for database operations. 19 | * 20 | * @see https://www.kotchasan.com/ 21 | */ 22 | abstract class Db extends \Kotchasan\KBase 23 | { 24 | /** 25 | * Database connection. 26 | * 27 | * @var \Kotchasan\Database\Driver 28 | */ 29 | protected $db; 30 | 31 | /** 32 | * Class constructor. 33 | * 34 | * @param string $conn The connection name. If not specified, no database connection will be made. 35 | */ 36 | public function __construct($conn) 37 | { 38 | $this->db = Database::create($conn); 39 | } 40 | 41 | /** 42 | * Get the database connection. 43 | * 44 | * @return \Kotchasan\Database\Driver The database connection. 45 | */ 46 | public function db() 47 | { 48 | return $this->db; 49 | } 50 | 51 | /** 52 | * Get the value of a database setting. 53 | * 54 | * @param string $key The setting key. 55 | * 56 | * @return mixed The value of the setting. 57 | */ 58 | public function getSetting($key) 59 | { 60 | if (isset($this->db->settings->$key)) { 61 | return $this->db->settings->$key; 62 | } 63 | } 64 | 65 | /** 66 | * Get all database settings. 67 | * 68 | * @return object The database settings object. 69 | */ 70 | public function getAllSettings() 71 | { 72 | return $this->db->settings; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /modules/index/controllers/otp.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Controller extends \Gcms\Controller 26 | { 27 | /** 28 | * forgot, login register 29 | * 30 | * @param Request $request 31 | * 32 | * @return string 33 | */ 34 | public function render(Request $request) 35 | { 36 | try { 37 | // ID 38 | $token = $request->get('id', '')->toString(); 39 | // JWT 40 | $jwt = Jwt::create(self::$cfg->password_key); 41 | // decode JWT 42 | $payload = $jwt->decode($token); 43 | if ($payload) { 44 | // อ่าน USER ตามที่เลือก (OTP) 45 | $user = \Index\Otp\Model::get($payload['username']); 46 | if ($user && preg_match('/^([0-9]{4,4}):([0-9]+)$/', $user->activatecode, $codes)) { 47 | // เวลาหมดอายุ 48 | $payload['expired'] = (int) $codes[2]; 49 | // otp.html 50 | $content = \Index\Otp\View::create()->render($request, $payload, $token); 51 | // ส่งออก เป็น HTML 52 | $response = new Response(); 53 | $response->withContent($content)->send(); 54 | exit; 55 | } 56 | } 57 | } catch (\Exception $ex) { 58 | } 59 | // 404 60 | return \Index\Error\Controller::execute($this); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /modules/car/views/home.php: -------------------------------------------------------------------------------- 1 | 19 | * 20 | * @since 1.0 21 | */ 22 | class View extends \Gcms\View 23 | { 24 | /** 25 | * หน้า Home 26 | * 27 | * @param object $index 28 | * @param array $login 29 | * 30 | * @return string 31 | */ 32 | public function render($index, $login) 33 | { 34 | $section = Html::create('div'); 35 | $section->add('header', [ 36 | 'innerHTML' => '

    {LNG_Booking calendar} {LNG_Vehicle}

    ' 37 | ]); 38 | $div = $section->add('div', [ 39 | 'class' => 'setup_frm' 40 | ]); 41 | $div->add('div', [ 42 | 'id' => 'car-calendar' 43 | ]); 44 | // สีทั้งหมด (ที่เผยแพร่) 45 | $query = \Car\Vehicles\Model::toDataTable()->cacheOn(); 46 | $cars = ''; 47 | foreach ($query->execute() as $item) { 48 | $cars .= 'id.' class="item cuttext">'.$item->number.''; 49 | } 50 | $div->add('div', [ 51 | 'id' => 'car_links', 52 | 'class' => 'calendar_links document-list col3', 53 | 'innerHTML' => $cars 54 | ]); 55 | // คืนค่าปีที่มีการจองสูงสุดและต่ำสุด 56 | $range = \Car\Home\Model::getYearRange(); 57 | /* Javascript */ 58 | $section->script('initCarCalendar('.$range->min.', '.$range->max.');'); 59 | // คืนค่า HTML 60 | return $section->render(); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /js/facebook.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Facebook Script 3 | * 4 | * @filesource js/facebook.js 5 | * @link https://www.kotchasan.com/ 6 | * @copyright 2018 Goragod.com 7 | * @license https://www.kotchasan.com/license/ 8 | */ 9 | function initFacebookButton(button) { 10 | callClick(button, function() { 11 | FB.login( 12 | function(response) { 13 | if (response.authResponse) { 14 | var accessToken = response.authResponse.accessToken; 15 | var uid = response.authResponse.userID; 16 | FB.api( 17 | "/" + uid, 18 | { 19 | access_token: accessToken, 20 | fields: "id,first_name,last_name,picture" 21 | }, 22 | function(response) { 23 | if (!response.error) { 24 | var q = new Array(); 25 | if ($E("token")) { 26 | q.push("token=" + encodeURIComponent($E("token").value)); 27 | } 28 | for (var prop in response) { 29 | if (prop == 'picture') { 30 | q.push('image=' + encodeURIComponent(response[prop]['data']['url'])); 31 | } else { 32 | q.push(prop + '=' + encodeURIComponent(response[prop])); 33 | } 34 | } 35 | send(WEB_URL + "index.php/" + ($E("facebook_action") ? $E("facebook_action").value : "index/model/fblogin/chklogin"), q.join("&"), socialLoginSubmit); 36 | } 37 | } 38 | ); 39 | } 40 | }, {scope: "public_profile"} 41 | ); 42 | }); 43 | } 44 | 45 | function initFacebook(appId, lng) { 46 | window.fbAsyncInit = function() { 47 | FB.init({ 48 | appId: appId, 49 | cookie: true, 50 | status: true, 51 | xfbml: true, 52 | version: "v20.0" 53 | }); 54 | }; 55 | loadJavascript("facebook-jssdk", "//connect.facebook.net/" + (lng == "th" ? "th_TH" : "en_US") + "/sdk.js"); 56 | } -------------------------------------------------------------------------------- /modules/index/controllers/member.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Controller extends \Gcms\Controller 26 | { 27 | /** 28 | * รายชื่อสมาชิก 29 | * 30 | * @param Request $request 31 | * 32 | * @return string 33 | */ 34 | public function render(Request $request) 35 | { 36 | // ข้อความ title bar 37 | $this->title = Language::get('Member list'); 38 | // เลือกเมนู 39 | $this->menu = 'member'; 40 | // แอดมิน, ไม่ใช่สมาชิกตัวอย่าง 41 | if (Login::notDemoMode(Login::isAdmin())) { 42 | // แสดงผล 43 | $section = Html::create('section'); 44 | // breadcrumbs 45 | $breadcrumbs = $section->add('nav', [ 46 | 'class' => 'breadcrumbs' 47 | ]); 48 | $ul = $breadcrumbs->add('ul'); 49 | $ul->appendChild('
  • {LNG_Users}
  • '); 50 | $ul->appendChild('
  • '.$this->title.'
  • '); 51 | $section->add('header', [ 52 | 'innerHTML' => '

    '.$this->title.'

    ' 53 | ]); 54 | $div = $section->add('div', [ 55 | 'class' => 'content_bg' 56 | ]); 57 | // แสดงตาราง 58 | $div->appendChild(\Index\Member\View::create()->render($request)); 59 | // คืนค่า HTML 60 | return $section->render(); 61 | } 62 | // 404 63 | return \Index\Error\Controller::execute($this, $request->getUri()); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /modules/index/controllers/page.php: -------------------------------------------------------------------------------- 1 | 21 | * 22 | * @since 1.0 23 | */ 24 | class Controller extends \Gcms\Controller 25 | { 26 | /** 27 | * หน้าเว็บไซต์เปล่าๆ 28 | * 29 | * @param Request $request 30 | * 31 | * @return string 32 | */ 33 | public function render(Request $request) 34 | { 35 | // หน้าที่เลือก 36 | $src = $request->request('src')->filter('a-z'); 37 | $pages = Language::get('PAGES', []); 38 | if (isset($pages[$src])) { 39 | if (file_exists(ROOT_PATH.DATA_FOLDER.'pages/'.$src.'_'.LANGUAGE.'.html')) { 40 | // content 41 | $content = file_get_contents(ROOT_PATH.DATA_FOLDER.'pages/'.$src.'_'.LANGUAGE.'.html'); 42 | // title, menu, bodyClass 43 | if (preg_match('/]{0,}>(.*)<\/h1>/', $content, $match)) { 44 | $this->title = strip_tags($match[1]); 45 | } else { 46 | $this->title = $pages[$src]; 47 | } 48 | $this->menu = $src; 49 | $this->bodyClass = 'page'; 50 | // page.html 51 | $template = Template::create('', '', 'page'); 52 | $template->add([ 53 | '/{CONTENT}/' => $content 54 | ]); 55 | // คืนค่า HTML 56 | return $template->render(); 57 | } 58 | } 59 | // 404 60 | return \Index\Error\Controller::execute($this, $request->getUri()); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /modules/index/models/forgot.php: -------------------------------------------------------------------------------- 1 | 19 | * 20 | * @since 1.0 21 | */ 22 | class Model extends \Kotchasan\KBase 23 | { 24 | /** 25 | * ฟังก์ชั่นส่งอีเมลขอรหัสผ่านใหม่ 26 | * 27 | * @param int $id 28 | * @param string $username 29 | * 30 | * @return string 31 | */ 32 | public static function execute($id, $username) 33 | { 34 | // รหัสผ่านใหม่ 35 | $password = \Kotchasan\Password::uniqid(6); 36 | // ข้อมูลอีเมล 37 | $subject = '['.self::$cfg->web_title.'] '.Language::get('Get new password'); 38 | $msg = $username.' '.Language::get('Your new password is').' : '.$password; 39 | if (preg_match('/^[0-9]{10,10}$/', $username)) { 40 | // send SMS 41 | $err = \Gcms\Sms::send($username, $msg); 42 | } else { 43 | // send mail 44 | $err = \Kotchasan\Email::send($username, self::$cfg->noreply_email, $subject, $msg); 45 | $err = $err->error() ? $err->getErrorMessage() : ''; 46 | } 47 | if ($err != '') { 48 | // คืนค่า error 49 | return strip_tags($err); 50 | } else { 51 | // อัปเดตรหัสผ่านใหม่ 52 | $model = new \Kotchasan\Model(); 53 | $salt = \Kotchasan\Password::uniqid(); 54 | $model->db()->update($model->getTableName('user'), (int) $id, [ 55 | 'salt' => $salt, 56 | 'password' => sha1(self::$cfg->password_key.$password.$salt) 57 | ]); 58 | // สำเร็จ คืนค่าข้อความว่าง 59 | return ''; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /js/pdpa.js: -------------------------------------------------------------------------------- 1 | /** 2 | * PDPA 3 | * 4 | * @filesource js/pdpa.js 5 | * @link https://www.kotchasan.com/ 6 | * @copyright 2016 Goragod.com 7 | * @license https://www.kotchasan.com/license/ 8 | */ 9 | (function() { 10 | "use strict"; 11 | window.PDPA = GClass.create(); 12 | PDPA.prototype = { 13 | initialize: function() { 14 | $G(window).Ready(function() { 15 | send(WEB_URL + 'index.php/index/model/consent/execute', null, function(xhr) { 16 | if (xhr.responseText != '') { 17 | let ds = xhr.responseText.toJSON(); 18 | if (ds) { 19 | var div = document.createElement('div'), 20 | innerDiv = document.createElement('div'), 21 | footer = document.createElement('div'), 22 | accept = document.createElement('a'), 23 | settings = document.createElement('a'); 24 | div.className = 'pdpa_consent'; 25 | footer.className = 'pdpa_consent_footer'; 26 | div.appendChild(innerDiv); 27 | div.appendChild(footer); 28 | document.body.appendChild(div); 29 | innerDiv.innerHTML = ds.payload; 30 | settings.innerHTML = trans('Cookies settings'); 31 | settings.id = 'pdpa_consent_settings'; 32 | footer.appendChild(settings); 33 | accept.innerHTML = trans('Accept all'); 34 | accept.className = 'button orange accept'; 35 | accept.id = 'pdpa_consent_accept'; 36 | footer.appendChild(accept); 37 | var doClick = function() { 38 | div.style.opacity = 0; 39 | send(WEB_URL + 'index.php/index/model/consent/action', 'action=' + this.id.replace('pdpa_consent_', ''), doFormSubmit, this); 40 | window.setTimeout(function() {document.body.removeChild(div);}, 300); 41 | }; 42 | callClick(accept, doClick); 43 | callClick(settings, doClick); 44 | } 45 | } 46 | }); 47 | }); 48 | } 49 | }; 50 | })(); 51 | -------------------------------------------------------------------------------- /modules/index/controllers/welcome.php: -------------------------------------------------------------------------------- 1 | 20 | * 21 | * @since 1.0 22 | */ 23 | class Controller extends \Gcms\Controller 24 | { 25 | /** 26 | * forgot, login register 27 | * 28 | * @param Request $request 29 | * 30 | * @return string 31 | */ 32 | public function render(Request $request) 33 | { 34 | $page = $this->execute($request); 35 | return $page->detail(); 36 | } 37 | 38 | /** 39 | * ประมวลผลหน้าที่เลือกจาก action ที่ส่งมา 40 | * forgot, login register 41 | * 42 | * @param Request $request 43 | * 44 | * @return static 45 | */ 46 | public function execute(Request $request) 47 | { 48 | // action ที่เลือก 49 | $action = $request->request('action')->toString(); 50 | // ตรวจสอบ method ที่กำหนดไว้เท่านั้น 51 | if ($action == 'register' && !empty(self::$cfg->user_register)) { 52 | $action = 'register'; 53 | } elseif ($action == 'forgot' && !empty(self::$cfg->user_forgot)) { 54 | $action = 'forgot'; 55 | } else { 56 | $action = 'login'; 57 | } 58 | // ประมวลผลหน้าที่เรียก 59 | $page = \Index\Welcome\View::$action($request); 60 | // welcome.html 61 | $template = Template::create('', '', 'welcome'); 62 | $template->add([ 63 | '/{CONTENT}/' => $page->detail 64 | ]); 65 | $this->detail = $template->render(); 66 | $this->title = $page->title; 67 | $this->bodyClass = $page->bodyClass; 68 | // คืนค่า Controller 69 | return $this; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /modules/car/models/chauffeur.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | * @since 1.0 19 | */ 20 | class Model extends \Kotchasan\Model 21 | { 22 | /** 23 | * @var array 24 | */ 25 | private $datas = []; 26 | 27 | /** 28 | * อ่านรายชื่อคนขับรถจากฐานข้อมูล 29 | * สำหรับการแสดงผล 30 | * 31 | * @param int $id 32 | * 33 | * @return static 34 | */ 35 | public static function init($id = 0) 36 | { 37 | // Model 38 | $model = new static; 39 | // Query 40 | $query = $model->db()->createQuery() 41 | ->select('id', 'name') 42 | ->from('user') 43 | ->where([ 44 | ['status', self::$cfg->chauffeur_status], 45 | ['active', 1] 46 | ]) 47 | ->cacheOn(); 48 | if ($id > 0) { 49 | $query->orWhere(['id', $id]); 50 | } 51 | foreach ($query->execute() as $item) { 52 | $model->datas[$item->id] = $item->name; 53 | } 54 | return $model; 55 | } 56 | 57 | /** 58 | * ลิสต์รายการ คนขับรถ 59 | * สำหรับใส่ลงใน select 60 | * 61 | * @return array 62 | */ 63 | public function toSelect() 64 | { 65 | $result = []; 66 | foreach ($this->datas as $id => $item) { 67 | $result[$id] = $item; 68 | } 69 | return $result; 70 | } 71 | 72 | /** 73 | * อ่านชื่อ คนขับรถ จาก $id 74 | * ไม่พบ คืนค่าว่าง 75 | * 76 | * @param int $id 77 | * 78 | * @return string 79 | */ 80 | public function get($id) 81 | { 82 | return isset($this->datas[$id]) ? $this->datas[$id] : ''; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /skin/booking/privacy_en.html: -------------------------------------------------------------------------------- 1 |
    2 |

    นโยบายความเป็นส่วนตัว Privacy Policy

    3 | {WEBTITLE} ให้ความสำคัญกับการคุ้มครองข้อมูลส่วนบุคคลของคุณ โดยนโยบายความเป็นส่วนตัวฉบับนี้ได้อธิบายแนวปฏิบัติเกี่ยวกับการเก็บรวบรวม ใช้ หรือเปิดเผยข้อมูลส่วนบุคคล รวมถึงสิทธิต่าง ๆ ของเจ้าของข้อมูลส่วนบุคคล ตามกฎหมายคุ้มครองข้อมูลส่วนบุคคล
      4 |

    ข้อมูลที่ทางเว็บไซต์จัดเก็บ

    5 | {WEBTITLE} จัดเก็บข้อมูลส่วนบุคคลโดยมีจุดประสงค์เพื่อใช้ในการดำเนินการภายในเว็บไซต์เท่านั้น โดยมีการจัดเก็บผ่านทางช่องทาง 6 | 7 |
      8 |
    • การสมัครสมาชิก
    • 9 |
    • Facebook Login
    • 10 |
    • Google Login
    • 11 |
    • Line Login
    • 12 |
    13 |
    ข้อมูลที่จัดเก็บได้แก่ 14 |
      15 |
    • ข้อมูลส่วนบุคคล เช่น ชื่อ นามสกุล เป็นต้น
    • 16 |
    • ข้อมูลการติดต่อ เช่น ที่อยู่ หมายเลขโทรศัพท์ อีเมล เป็นต้น
    • 17 |
    • บัญชีผู้ใช้งาน ประวัติการใช้งาน เช่น IP address, Cookie เป็นต้น
    • 18 |
    19 |
    20 |

    จุดประสงค์ในการเก็บข้อมูลส่วนบุคคล

    21 | ทางเว็บไซต์ไม่มีนโยบายเปิดเผยข้อมูลไปยังบุคคลที่สาม เราจัดเก็บข้อมูลส่วนบุคคลเพื่อใช้ในบริการต่างๆของเว็บไซต์ของเราเท่านั้น โดยมีจุดประสงค์เพื่อ 22 |
    23 |
      24 |
    • สร้างและจัดการบัญชีผู้ใช้งาน
    • 25 |
    • ปฏิบัติตามกฎหมายและกฎระเบียบของหน่วยงานราชการ
    • 26 |
    27 |
    28 |

    คุกกี้ (Cookies)

    29 | เราใช้คุกกี้ (Cookies) หรือเทคโนโลยีที่คล้ายคลึงกันเท่าที่จำเป็น เพื่อใช้ในการเข้าถึงสินค้าหรือบริการ และติดตามการใช้งานของคุณเท่านั้น หากคุณไม่ต้องการให้มีคุกกี้ไว้ในคอมพิวเตอร์ของคุณ คุณสามารถตั้งค่าบราวเซอร์เพื่อปฏิเสธการจัดเก็บคุกกี้ก่อนที่จะใช้งานเว็บไซต์ หรือใช้โหมดไม่ระบุตัวตนเพื่อเข้าใช้งานเว็บไซต์ก็ได้
      30 |

    การขอลบข้อมูลผู้ใช้

    31 | คุณสามารถติดต่อมายังผู้ควบคุมข้อมูลเพื่อขอลบบัญชีผู้ใช้งานของคุณบนเว็บไซต์นี้ได้ ตามที่อยู่อีเมลนี้ {DATACONTROLLER} เราจะรีบดำเนินการโดยเร็วที่สุด
    32 |
    นโยบายความเป็นส่วนตัว อาจมีการแก้ไขเปลี่ยนแปลงนโยบายนี้เป็นครั้งคราว คุณสามารถทราบข้อกำหนดและเงื่อนไขนโยบายที่มีการแก้ไขเปลี่ยนแปลงนี้ได้ผ่านทางเว็บไซต์เท่านั้น
    33 |
    นโยบายนี้แก้ไขล่าสุดเมื่อ 30 พค. 2565 34 |
    -------------------------------------------------------------------------------- /skin/booking/privacy_la.html: -------------------------------------------------------------------------------- 1 |
    2 |

    นโยบายความเป็นส่วนตัว Privacy Policy

    3 | {WEBTITLE} ให้ความสำคัญกับการคุ้มครองข้อมูลส่วนบุคคลของคุณ โดยนโยบายความเป็นส่วนตัวฉบับนี้ได้อธิบายแนวปฏิบัติเกี่ยวกับการเก็บรวบรวม ใช้ หรือเปิดเผยข้อมูลส่วนบุคคล รวมถึงสิทธิต่าง ๆ ของเจ้าของข้อมูลส่วนบุคคล ตามกฎหมายคุ้มครองข้อมูลส่วนบุคคล
      4 |

    ข้อมูลที่ทางเว็บไซต์จัดเก็บ

    5 | {WEBTITLE} จัดเก็บข้อมูลส่วนบุคคลโดยมีจุดประสงค์เพื่อใช้ในการดำเนินการภายในเว็บไซต์เท่านั้น โดยมีการจัดเก็บผ่านทางช่องทาง 6 | 7 |
      8 |
    • การสมัครสมาชิก
    • 9 |
    • Facebook Login
    • 10 |
    • Google Login
    • 11 |
    • Line Login
    • 12 |
    13 |
    ข้อมูลที่จัดเก็บได้แก่ 14 |
      15 |
    • ข้อมูลส่วนบุคคล เช่น ชื่อ นามสกุล เป็นต้น
    • 16 |
    • ข้อมูลการติดต่อ เช่น ที่อยู่ หมายเลขโทรศัพท์ อีเมล เป็นต้น
    • 17 |
    • บัญชีผู้ใช้งาน ประวัติการใช้งาน เช่น IP address, Cookie เป็นต้น
    • 18 |
    19 |
    20 |

    จุดประสงค์ในการเก็บข้อมูลส่วนบุคคล

    21 | ทางเว็บไซต์ไม่มีนโยบายเปิดเผยข้อมูลไปยังบุคคลที่สาม เราจัดเก็บข้อมูลส่วนบุคคลเพื่อใช้ในบริการต่างๆของเว็บไซต์ของเราเท่านั้น โดยมีจุดประสงค์เพื่อ 22 |
    23 |
      24 |
    • สร้างและจัดการบัญชีผู้ใช้งาน
    • 25 |
    • ปฏิบัติตามกฎหมายและกฎระเบียบของหน่วยงานราชการ
    • 26 |
    27 |
    28 |

    คุกกี้ (Cookies)

    29 | เราใช้คุกกี้ (Cookies) หรือเทคโนโลยีที่คล้ายคลึงกันเท่าที่จำเป็น เพื่อใช้ในการเข้าถึงสินค้าหรือบริการ และติดตามการใช้งานของคุณเท่านั้น หากคุณไม่ต้องการให้มีคุกกี้ไว้ในคอมพิวเตอร์ของคุณ คุณสามารถตั้งค่าบราวเซอร์เพื่อปฏิเสธการจัดเก็บคุกกี้ก่อนที่จะใช้งานเว็บไซต์ หรือใช้โหมดไม่ระบุตัวตนเพื่อเข้าใช้งานเว็บไซต์ก็ได้
      30 |

    การขอลบข้อมูลผู้ใช้

    31 | คุณสามารถติดต่อมายังผู้ควบคุมข้อมูลเพื่อขอลบบัญชีผู้ใช้งานของคุณบนเว็บไซต์นี้ได้ ตามที่อยู่อีเมลนี้ {DATACONTROLLER} เราจะรีบดำเนินการโดยเร็วที่สุด
    32 |
    นโยบายความเป็นส่วนตัว อาจมีการแก้ไขเปลี่ยนแปลงนโยบายนี้เป็นครั้งคราว คุณสามารถทราบข้อกำหนดและเงื่อนไขนโยบายที่มีการแก้ไขเปลี่ยนแปลงนี้ได้ผ่านทางเว็บไซต์เท่านั้น
    33 |
    นโยบายนี้แก้ไขล่าสุดเมื่อ 30 พค. 2565 34 |
    -------------------------------------------------------------------------------- /skin/booking/privacy_th.html: -------------------------------------------------------------------------------- 1 |
    2 |

    นโยบายความเป็นส่วนตัว Privacy Policy

    3 | {WEBTITLE} ให้ความสำคัญกับการคุ้มครองข้อมูลส่วนบุคคลของคุณ โดยนโยบายความเป็นส่วนตัวฉบับนี้ได้อธิบายแนวปฏิบัติเกี่ยวกับการเก็บรวบรวม ใช้ หรือเปิดเผยข้อมูลส่วนบุคคล รวมถึงสิทธิต่าง ๆ ของเจ้าของข้อมูลส่วนบุคคล ตามกฎหมายคุ้มครองข้อมูลส่วนบุคคล
      4 |

    ข้อมูลที่ทางเว็บไซต์จัดเก็บ

    5 | {WEBTITLE} จัดเก็บข้อมูลส่วนบุคคลโดยมีจุดประสงค์เพื่อใช้ในการดำเนินการภายในเว็บไซต์เท่านั้น โดยมีการจัดเก็บผ่านทางช่องทาง 6 | 7 |
      8 |
    • การสมัครสมาชิก
    • 9 |
    • Facebook Login
    • 10 |
    • Google Login
    • 11 |
    • Line Login
    • 12 |
    13 |
    ข้อมูลที่จัดเก็บได้แก่ 14 |
      15 |
    • ข้อมูลส่วนบุคคล เช่น ชื่อ นามสกุล เป็นต้น
    • 16 |
    • ข้อมูลการติดต่อ เช่น ที่อยู่ หมายเลขโทรศัพท์ อีเมล เป็นต้น
    • 17 |
    • บัญชีผู้ใช้งาน ประวัติการใช้งาน เช่น IP address, Cookie เป็นต้น
    • 18 |
    19 |
    20 |

    จุดประสงค์ในการเก็บข้อมูลส่วนบุคคล

    21 | ทางเว็บไซต์ไม่มีนโยบายเปิดเผยข้อมูลไปยังบุคคลที่สาม เราจัดเก็บข้อมูลส่วนบุคคลเพื่อใช้ในบริการต่างๆของเว็บไซต์ของเราเท่านั้น โดยมีจุดประสงค์เพื่อ 22 |
    23 |
      24 |
    • สร้างและจัดการบัญชีผู้ใช้งาน
    • 25 |
    • ปฏิบัติตามกฎหมายและกฎระเบียบของหน่วยงานราชการ
    • 26 |
    27 |
    28 |

    คุกกี้ (Cookies)

    29 | เราใช้คุกกี้ (Cookies) หรือเทคโนโลยีที่คล้ายคลึงกันเท่าที่จำเป็น เพื่อใช้ในการเข้าถึงสินค้าหรือบริการ และติดตามการใช้งานของคุณเท่านั้น หากคุณไม่ต้องการให้มีคุกกี้ไว้ในคอมพิวเตอร์ของคุณ คุณสามารถตั้งค่าบราวเซอร์เพื่อปฏิเสธการจัดเก็บคุกกี้ก่อนที่จะใช้งานเว็บไซต์ หรือใช้โหมดไม่ระบุตัวตนเพื่อเข้าใช้งานเว็บไซต์ก็ได้
      30 |

    การขอลบข้อมูลผู้ใช้

    31 | คุณสามารถติดต่อมายังผู้ควบคุมข้อมูลเพื่อขอลบบัญชีผู้ใช้งานของคุณบนเว็บไซต์นี้ได้ ตามที่อยู่อีเมลนี้ {DATACONTROLLER} เราจะรีบดำเนินการโดยเร็วที่สุด
    32 |
    นโยบายความเป็นส่วนตัว อาจมีการแก้ไขเปลี่ยนแปลงนโยบายนี้เป็นครั้งคราว คุณสามารถทราบข้อกำหนดและเงื่อนไขนโยบายที่มีการแก้ไขเปลี่ยนแปลงนี้ได้ผ่านทางเว็บไซต์เท่านั้น
    33 |
    นโยบายนี้แก้ไขล่าสุดเมื่อ 30 พค. 2565 34 |
    -------------------------------------------------------------------------------- /skin/default/privacy_en.html: -------------------------------------------------------------------------------- 1 |
    2 |

    นโยบายความเป็นส่วนตัว Privacy Policy

    3 | {WEBTITLE} ให้ความสำคัญกับการคุ้มครองข้อมูลส่วนบุคคลของคุณ โดยนโยบายความเป็นส่วนตัวฉบับนี้ได้อธิบายแนวปฏิบัติเกี่ยวกับการเก็บรวบรวม ใช้ หรือเปิดเผยข้อมูลส่วนบุคคล รวมถึงสิทธิต่าง ๆ ของเจ้าของข้อมูลส่วนบุคคล ตามกฎหมายคุ้มครองข้อมูลส่วนบุคคล
      4 |

    ข้อมูลที่ทางเว็บไซต์จัดเก็บ

    5 | {WEBTITLE} จัดเก็บข้อมูลส่วนบุคคลโดยมีจุดประสงค์เพื่อใช้ในการดำเนินการภายในเว็บไซต์เท่านั้น โดยมีการจัดเก็บผ่านทางช่องทาง 6 | 7 |
      8 |
    • การสมัครสมาชิก
    • 9 |
    • Facebook Login
    • 10 |
    • Google Login
    • 11 |
    • Line Login
    • 12 |
    13 |
    ข้อมูลที่จัดเก็บได้แก่ 14 |
      15 |
    • ข้อมูลส่วนบุคคล เช่น ชื่อ นามสกุล เป็นต้น
    • 16 |
    • ข้อมูลการติดต่อ เช่น ที่อยู่ หมายเลขโทรศัพท์ อีเมล เป็นต้น
    • 17 |
    • บัญชีผู้ใช้งาน ประวัติการใช้งาน เช่น IP address, Cookie เป็นต้น
    • 18 |
    19 |
    20 |

    จุดประสงค์ในการเก็บข้อมูลส่วนบุคคล

    21 | ทางเว็บไซต์ไม่มีนโยบายเปิดเผยข้อมูลไปยังบุคคลที่สาม เราจัดเก็บข้อมูลส่วนบุคคลเพื่อใช้ในบริการต่างๆของเว็บไซต์ของเราเท่านั้น โดยมีจุดประสงค์เพื่อ 22 |
    23 |
      24 |
    • สร้างและจัดการบัญชีผู้ใช้งาน
    • 25 |
    • ปฏิบัติตามกฎหมายและกฎระเบียบของหน่วยงานราชการ
    • 26 |
    27 |
    28 |

    คุกกี้ (Cookies)

    29 | เราใช้คุกกี้ (Cookies) หรือเทคโนโลยีที่คล้ายคลึงกันเท่าที่จำเป็น เพื่อใช้ในการเข้าถึงสินค้าหรือบริการ และติดตามการใช้งานของคุณเท่านั้น หากคุณไม่ต้องการให้มีคุกกี้ไว้ในคอมพิวเตอร์ของคุณ คุณสามารถตั้งค่าบราวเซอร์เพื่อปฏิเสธการจัดเก็บคุกกี้ก่อนที่จะใช้งานเว็บไซต์ หรือใช้โหมดไม่ระบุตัวตนเพื่อเข้าใช้งานเว็บไซต์ก็ได้
      30 |

    การขอลบข้อมูลผู้ใช้

    31 | คุณสามารถติดต่อมายังผู้ควบคุมข้อมูลเพื่อขอลบบัญชีผู้ใช้งานของคุณบนเว็บไซต์นี้ได้ ตามที่อยู่อีเมลนี้ {DATACONTROLLER} เราจะรีบดำเนินการโดยเร็วที่สุด
    32 |
    นโยบายความเป็นส่วนตัว อาจมีการแก้ไขเปลี่ยนแปลงนโยบายนี้เป็นครั้งคราว คุณสามารถทราบข้อกำหนดและเงื่อนไขนโยบายที่มีการแก้ไขเปลี่ยนแปลงนี้ได้ผ่านทางเว็บไซต์เท่านั้น
    33 |
    นโยบายนี้แก้ไขล่าสุดเมื่อ 30 พค. 2565 34 |
    35 | -------------------------------------------------------------------------------- /skin/default/privacy_la.html: -------------------------------------------------------------------------------- 1 |
    2 |

    นโยบายความเป็นส่วนตัว Privacy Policy

    3 | {WEBTITLE} ให้ความสำคัญกับการคุ้มครองข้อมูลส่วนบุคคลของคุณ โดยนโยบายความเป็นส่วนตัวฉบับนี้ได้อธิบายแนวปฏิบัติเกี่ยวกับการเก็บรวบรวม ใช้ หรือเปิดเผยข้อมูลส่วนบุคคล รวมถึงสิทธิต่าง ๆ ของเจ้าของข้อมูลส่วนบุคคล ตามกฎหมายคุ้มครองข้อมูลส่วนบุคคล
      4 |

    ข้อมูลที่ทางเว็บไซต์จัดเก็บ

    5 | {WEBTITLE} จัดเก็บข้อมูลส่วนบุคคลโดยมีจุดประสงค์เพื่อใช้ในการดำเนินการภายในเว็บไซต์เท่านั้น โดยมีการจัดเก็บผ่านทางช่องทาง 6 | 7 |
      8 |
    • การสมัครสมาชิก
    • 9 |
    • Facebook Login
    • 10 |
    • Google Login
    • 11 |
    • Line Login
    • 12 |
    13 |
    ข้อมูลที่จัดเก็บได้แก่ 14 |
      15 |
    • ข้อมูลส่วนบุคคล เช่น ชื่อ นามสกุล เป็นต้น
    • 16 |
    • ข้อมูลการติดต่อ เช่น ที่อยู่ หมายเลขโทรศัพท์ อีเมล เป็นต้น
    • 17 |
    • บัญชีผู้ใช้งาน ประวัติการใช้งาน เช่น IP address, Cookie เป็นต้น
    • 18 |
    19 |
    20 |

    จุดประสงค์ในการเก็บข้อมูลส่วนบุคคล

    21 | ทางเว็บไซต์ไม่มีนโยบายเปิดเผยข้อมูลไปยังบุคคลที่สาม เราจัดเก็บข้อมูลส่วนบุคคลเพื่อใช้ในบริการต่างๆของเว็บไซต์ของเราเท่านั้น โดยมีจุดประสงค์เพื่อ 22 |
    23 |
      24 |
    • สร้างและจัดการบัญชีผู้ใช้งาน
    • 25 |
    • ปฏิบัติตามกฎหมายและกฎระเบียบของหน่วยงานราชการ
    • 26 |
    27 |
    28 |

    คุกกี้ (Cookies)

    29 | เราใช้คุกกี้ (Cookies) หรือเทคโนโลยีที่คล้ายคลึงกันเท่าที่จำเป็น เพื่อใช้ในการเข้าถึงสินค้าหรือบริการ และติดตามการใช้งานของคุณเท่านั้น หากคุณไม่ต้องการให้มีคุกกี้ไว้ในคอมพิวเตอร์ของคุณ คุณสามารถตั้งค่าบราวเซอร์เพื่อปฏิเสธการจัดเก็บคุกกี้ก่อนที่จะใช้งานเว็บไซต์ หรือใช้โหมดไม่ระบุตัวตนเพื่อเข้าใช้งานเว็บไซต์ก็ได้
      30 |

    การขอลบข้อมูลผู้ใช้

    31 | คุณสามารถติดต่อมายังผู้ควบคุมข้อมูลเพื่อขอลบบัญชีผู้ใช้งานของคุณบนเว็บไซต์นี้ได้ ตามที่อยู่อีเมลนี้ {DATACONTROLLER} เราจะรีบดำเนินการโดยเร็วที่สุด
    32 |
    นโยบายความเป็นส่วนตัว อาจมีการแก้ไขเปลี่ยนแปลงนโยบายนี้เป็นครั้งคราว คุณสามารถทราบข้อกำหนดและเงื่อนไขนโยบายที่มีการแก้ไขเปลี่ยนแปลงนี้ได้ผ่านทางเว็บไซต์เท่านั้น
    33 |
    นโยบายนี้แก้ไขล่าสุดเมื่อ 30 พค. 2565 34 |
    35 | -------------------------------------------------------------------------------- /skin/default/privacy_th.html: -------------------------------------------------------------------------------- 1 |
    2 |

    นโยบายความเป็นส่วนตัว Privacy Policy

    3 | {WEBTITLE} ให้ความสำคัญกับการคุ้มครองข้อมูลส่วนบุคคลของคุณ โดยนโยบายความเป็นส่วนตัวฉบับนี้ได้อธิบายแนวปฏิบัติเกี่ยวกับการเก็บรวบรวม ใช้ หรือเปิดเผยข้อมูลส่วนบุคคล รวมถึงสิทธิต่าง ๆ ของเจ้าของข้อมูลส่วนบุคคล ตามกฎหมายคุ้มครองข้อมูลส่วนบุคคล
      4 |

    ข้อมูลที่ทางเว็บไซต์จัดเก็บ

    5 | {WEBTITLE} จัดเก็บข้อมูลส่วนบุคคลโดยมีจุดประสงค์เพื่อใช้ในการดำเนินการภายในเว็บไซต์เท่านั้น โดยมีการจัดเก็บผ่านทางช่องทาง 6 | 7 |
      8 |
    • การสมัครสมาชิก
    • 9 |
    • Facebook Login
    • 10 |
    • Google Login
    • 11 |
    • Line Login
    • 12 |
    13 |
    ข้อมูลที่จัดเก็บได้แก่ 14 |
      15 |
    • ข้อมูลส่วนบุคคล เช่น ชื่อ นามสกุล เป็นต้น
    • 16 |
    • ข้อมูลการติดต่อ เช่น ที่อยู่ หมายเลขโทรศัพท์ อีเมล เป็นต้น
    • 17 |
    • บัญชีผู้ใช้งาน ประวัติการใช้งาน เช่น IP address, Cookie เป็นต้น
    • 18 |
    19 |
    20 |

    จุดประสงค์ในการเก็บข้อมูลส่วนบุคคล

    21 | ทางเว็บไซต์ไม่มีนโยบายเปิดเผยข้อมูลไปยังบุคคลที่สาม เราจัดเก็บข้อมูลส่วนบุคคลเพื่อใช้ในบริการต่างๆของเว็บไซต์ของเราเท่านั้น โดยมีจุดประสงค์เพื่อ 22 |
    23 |
      24 |
    • สร้างและจัดการบัญชีผู้ใช้งาน
    • 25 |
    • ปฏิบัติตามกฎหมายและกฎระเบียบของหน่วยงานราชการ
    • 26 |
    27 |
    28 |

    คุกกี้ (Cookies)

    29 | เราใช้คุกกี้ (Cookies) หรือเทคโนโลยีที่คล้ายคลึงกันเท่าที่จำเป็น เพื่อใช้ในการเข้าถึงสินค้าหรือบริการ และติดตามการใช้งานของคุณเท่านั้น หากคุณไม่ต้องการให้มีคุกกี้ไว้ในคอมพิวเตอร์ของคุณ คุณสามารถตั้งค่าบราวเซอร์เพื่อปฏิเสธการจัดเก็บคุกกี้ก่อนที่จะใช้งานเว็บไซต์ หรือใช้โหมดไม่ระบุตัวตนเพื่อเข้าใช้งานเว็บไซต์ก็ได้
      30 |

    การขอลบข้อมูลผู้ใช้

    31 | คุณสามารถติดต่อมายังผู้ควบคุมข้อมูลเพื่อขอลบบัญชีผู้ใช้งานของคุณบนเว็บไซต์นี้ได้ ตามที่อยู่อีเมลนี้ {DATACONTROLLER} เราจะรีบดำเนินการโดยเร็วที่สุด
    32 |
    นโยบายความเป็นส่วนตัว อาจมีการแก้ไขเปลี่ยนแปลงนโยบายนี้เป็นครั้งคราว คุณสามารถทราบข้อกำหนดและเงื่อนไขนโยบายที่มีการแก้ไขเปลี่ยนแปลงนี้ได้ผ่านทางเว็บไซต์เท่านั้น
    33 |
    นโยบายนี้แก้ไขล่าสุดเมื่อ 30 พค. 2565 34 |
    35 | -------------------------------------------------------------------------------- /modules/index/controllers/memberstatus.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Controller extends \Gcms\Controller 26 | { 27 | /** 28 | * จัดการสถานะสมาชิก 29 | * 30 | * @param Request $request 31 | * 32 | * @return string 33 | */ 34 | public function render(Request $request) 35 | { 36 | // ข้อความ title bar 37 | $this->title = Language::get('The members status of the site'); 38 | // เลือกเมนู 39 | $this->menu = 'member'; 40 | // แอดมิน, ไม่ใช่สมาชิกตัวอย่าง 41 | if (Login::notDemoMode(Login::isAdmin())) { 42 | // แสดงผล 43 | $section = Html::create('section'); 44 | // breadcrumbs 45 | $breadcrumbs = $section->add('nav', [ 46 | 'class' => 'breadcrumbs' 47 | ]); 48 | $ul = $breadcrumbs->add('ul'); 49 | $ul->appendChild('
  • {LNG_Users}
  • '); 50 | $ul->appendChild('
  • {LNG_Member status}
  • '); 51 | $section->add('header', [ 52 | 'innerHTML' => '

    '.$this->title.'

    ' 53 | ]); 54 | $div = $section->add('div', [ 55 | 'class' => 'content_bg' 56 | ]); 57 | // แสดงฟอร์ม 58 | $div->appendChild(\Index\Memberstatus\View::create()->render()); 59 | // คืนค่า HTML 60 | return $section->render(); 61 | } 62 | // 404 63 | return \Index\Error\Controller::execute($this, $request->getUri()); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /modules/index/models/log.php: -------------------------------------------------------------------------------- 1 | 17 | * 18 | * @since 1.0 19 | */ 20 | class Model 21 | { 22 | /** 23 | * เพิ่ม log 24 | * 25 | * @param int $id 26 | * @param string $module 27 | * @param string $action 28 | * @param string $topic 29 | * @param int $member_id 30 | * @param string $reason 31 | * @param mixed $datas 32 | */ 33 | public static function add($id, $module, $action, $topic, $member_id, $reason = null, $datas = null) 34 | { 35 | $model = new \Kotchasan\Model; 36 | $model->db()->insert($model->getTableName('logs'), [ 37 | 'src_id' => $id, 38 | 'module' => $module, 39 | 'action' => $action, 40 | 'create_date' => date('Y-m-d H:i:s'), 41 | 'topic' => $topic, 42 | 'member_id' => $member_id, 43 | 'datas' => is_array($datas) ? json_encode($datas, JSON_UNESCAPED_UNICODE) : $datas, 44 | 'reason' => $reason 45 | ]); 46 | } 47 | 48 | /** 49 | * Query ข้อมูลสำหรับส่งให้กับ DataTable 50 | * 51 | * @param int $id 52 | * @param string $module 53 | * @param string|array $actions 54 | * 55 | * @return \Kotchasan\Database\QueryBuilder 56 | */ 57 | public static function toDataTable($id, $module, $actions = '') 58 | { 59 | $where = [ 60 | ['O.src_id', $id], 61 | ['O.module', $module] 62 | ]; 63 | if (!empty($actions)) { 64 | $where[] = ['O.action', $actions]; 65 | } 66 | return \Kotchasan\Model::createQuery() 67 | ->select('O.id', 'O.create_date', 'O.topic', 'O.reason', 'U.name') 68 | ->from('logs O') 69 | ->join('user U', 'LEFT', ['U.id', 'O.member_id']) 70 | ->where($where); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /modules/car/controllers/vehicles.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Controller extends \Gcms\Controller 26 | { 27 | /** 28 | * ตารางรายการ รถยนต์ 29 | * 30 | * @param Request $request 31 | * 32 | * @return string 33 | */ 34 | public function render(Request $request) 35 | { 36 | // ข้อความ title bar 37 | $this->title = Language::trans('{LNG_List of} {LNG_Vehicle}'); 38 | // เลือกเมนู 39 | $this->menu = 'vehicles'; 40 | // สมาชิก 41 | $login = Login::isMember(); 42 | if ($login || empty(self::$cfg->car_login_type)) { 43 | // แสดงผล 44 | $section = Html::create('section'); 45 | // breadcrumbs 46 | $breadcrumbs = $section->add('nav', [ 47 | 'class' => 'breadcrumbs' 48 | ]); 49 | $ul = $breadcrumbs->add('ul'); 50 | $ul->appendChild('
  • {LNG_Vehicle}
  • '); 51 | $ul->appendChild('
  • {LNG_List of}
  • '); 52 | $section->add('header', [ 53 | 'innerHTML' => '

    '.$this->title.'

    ' 54 | ]); 55 | $div = $section->add('div', [ 56 | 'class' => 'content_bg' 57 | ]); 58 | // แสดงตาราง 59 | $div->appendChild(\Car\Vehicles\View::create()->render($request, $login)); 60 | // คืนค่า HTML 61 | return $section->render(); 62 | } 63 | // 404 64 | return \Index\Error\Controller::execute($this, $request->getUri()); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /modules/index/controllers/register.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Controller extends \Gcms\Controller 26 | { 27 | /** 28 | * ลงทะเบียนสมาชิกใหม่ 29 | * 30 | * @param Request $request 31 | * 32 | * @return string 33 | */ 34 | public function render(Request $request) 35 | { 36 | // ข้อความ title bar 37 | $this->title = Language::get('Create new account'); 38 | // เลือกเมนู 39 | $this->menu = 'member'; 40 | // แอดมิน, ไม่ใช่สมาชิกตัวอย่าง 41 | if (Login::notDemoMode(Login::isAdmin())) { 42 | // แสดงผล 43 | $section = Html::create('section'); 44 | // breadcrumbs 45 | $breadcrumbs = $section->add('nav', [ 46 | 'class' => 'breadcrumbs' 47 | ]); 48 | $ul = $breadcrumbs->add('ul'); 49 | $ul->appendChild('
  • {LNG_Users}
  • '); 50 | $ul->appendChild('
  • {LNG_Member list}
  • '); 51 | $ul->appendChild('
  • {LNG_Register}
  • '); 52 | $section->add('header', [ 53 | 'innerHTML' => '

    '.$this->title.'

    ' 54 | ]); 55 | $div = $section->add('div', [ 56 | 'class' => 'content_bg' 57 | ]); 58 | // แสดงฟอร์ม 59 | $div->appendChild(\Index\Register\View::create()->render($request)); 60 | // คืนค่า HTML 61 | return $section->render(); 62 | } 63 | // 404 64 | return \Index\Error\Controller::execute($this, $request->getUri()); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Kotchasan/Cache/Cache.php: -------------------------------------------------------------------------------- 1 | 8 | * @package Kotchasan 9 | */ 10 | 11 | namespace Kotchasan\Cache; 12 | 13 | use Kotchasan\Cache\CacheItem as Item; 14 | use Psr\Cache\CacheItemInterface; 15 | use Psr\Cache\CacheItemPoolInterface; 16 | 17 | /** 18 | * Kotchasan Caching Class (base class) 19 | * 20 | * This is an abstract base class that implements the PSR-16 CacheItemPoolInterface. 21 | * 22 | * @see https://www.kotchasan.com/ 23 | */ 24 | abstract class Cache extends \Kotchasan\KBase implements CacheItemPoolInterface 25 | { 26 | /** 27 | * Deferred cache items 28 | * 29 | * @var array 30 | */ 31 | protected $deferred = []; 32 | 33 | /** 34 | * Commit the cached items in the deferred queue 35 | * 36 | * @return bool 37 | */ 38 | public function commit() 39 | { 40 | $success = true; 41 | foreach ($this->deferred as $item) { 42 | if (!$this->save($item)) { 43 | $success = false; 44 | } 45 | } 46 | return $success; 47 | } 48 | 49 | /** 50 | * Delete a cache item 51 | * 52 | * @param string $key 53 | * 54 | * @return bool 55 | */ 56 | public function deleteItem($key) 57 | { 58 | return $this->deleteItems([$key]); 59 | } 60 | 61 | /** 62 | * Get a cache item 63 | * 64 | * @param string $key 65 | * 66 | * @return CacheItemInterface 67 | */ 68 | public function getItem($key) 69 | { 70 | $items = $this->getItems([$key]); 71 | return isset($items[$key]) ? $items[$key] : new Item($key); 72 | } 73 | 74 | /** 75 | * Save a cache item for deferred saving 76 | * 77 | * @param CacheItemInterface $item 78 | * 79 | * @return bool 80 | */ 81 | public function saveDeferred(CacheItemInterface $item) 82 | { 83 | $this->deferred[$item->getKey()] = $item; 84 | return true; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /modules/index/controllers/permission.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Controller extends \Gcms\Controller 26 | { 27 | /** 28 | * รายชื่อสมาชิก 29 | * 30 | * @param Request $request 31 | * 32 | * @return string 33 | */ 34 | public function render(Request $request) 35 | { 36 | // ข้อความ title bar 37 | $this->title = Language::get('Permission'); 38 | // เลือกเมนู 39 | $this->menu = 'member'; 40 | // แอดมิน 41 | $login = Login::isAdmin(); 42 | // แอดมิน, ไม่ใช่สมาชิกตัวอย่าง 43 | if (Login::notDemoMode($login)) { 44 | // แสดงผล 45 | $section = Html::create('section'); 46 | // breadcrumbs 47 | $breadcrumbs = $section->add('nav', [ 48 | 'class' => 'breadcrumbs' 49 | ]); 50 | $ul = $breadcrumbs->add('ul'); 51 | $ul->appendChild('
  • {LNG_Users}
  • '); 52 | $ul->appendChild('
  • '.$this->title.'
  • '); 53 | $section->add('header', [ 54 | 'innerHTML' => '

    '.$this->title.'

    ' 55 | ]); 56 | $div = $section->add('div', [ 57 | 'class' => 'content_bg' 58 | ]); 59 | // แสดงตาราง 60 | $div->appendChild(\Index\Permission\View::create()->render($request)); 61 | // คืนค่า HTML 62 | return $section->render(); 63 | } 64 | // 404 65 | return \Index\Error\Controller::execute($this, $request->getUri()); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /skin/default/loginfrm.html: -------------------------------------------------------------------------------- 1 |
    2 | 6 |
    7 |

    8 | 9 | 10 |
      {LANGUAGES}
    11 |
    12 |

    13 | 14 |
    15 | 18 | 21 |
    22 |
    23 | 24 | 25 | 26 | 29 | 30 | 31 | {LINELOGIN} 32 | 33 |
    34 |
    35 |
    36 | {LOGINMENU} 37 | 38 | 39 |
    40 |
    41 | {LOGIN_MESSAGE} 42 | 45 |
    -------------------------------------------------------------------------------- /modules/index/controllers/language.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Controller extends \Gcms\Controller 26 | { 27 | /** 28 | * รายการภาษา 29 | * 30 | * @param Request $request 31 | * 32 | * @return string 33 | */ 34 | public function render(Request $request) 35 | { 36 | // ข้อความ title bar 37 | $this->title = Language::get('Manage languages'); 38 | // เลือกเมนู 39 | $this->menu = 'settings'; 40 | // สามารถตั้งค่าระบบได้ 41 | if (Login::checkPermission(Login::isMember(), 'can_config')) { 42 | // แสดงผล 43 | $section = Html::create('section'); 44 | // breadcrumbs 45 | $breadcrumbs = $section->add('nav', [ 46 | 'class' => 'breadcrumbs' 47 | ]); 48 | $ul = $breadcrumbs->add('ul'); 49 | $ul->appendChild('
  • {LNG_Settings}
  • '); 50 | $ul->appendChild('
  • {LNG_Language}
  • '); 51 | $section->add('header', [ 52 | 'innerHTML' => '

    '.$this->title.'

    ' 53 | ]); 54 | // menu 55 | $section->appendChild(\Index\Tabmenus\View::render($request, 'settings', 'language')); 56 | $div = $section->add('div', [ 57 | 'class' => 'content_bg' 58 | ]); 59 | // แสดงตาราง 60 | $div->appendChild(\Index\Language\View::create()->render($request)); 61 | // คืนค่า HTML 62 | return $section->render(); 63 | } 64 | // 404 65 | return \Index\Error\Controller::execute($this, $request->getUri()); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /skin/default/registerfrm.html: -------------------------------------------------------------------------------- 1 |
    2 | 6 |
    7 |

    8 | {LNG_Register} 9 | 10 |
      {LANGUAGES}
    11 |
    12 |

    13 |
    14 | 17 | 20 | 23 | 26 | {CATEGORIES} 27 |
    28 |
    29 | 30 | 31 | 32 |
    33 |
    34 | {LOGINMENU} 35 |
    36 |
    37 | {LOGIN_MESSAGE} 38 | 39 |
    40 | -------------------------------------------------------------------------------- /modules/index/controllers/modules.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Controller extends \Gcms\Controller 26 | { 27 | /** 28 | * โมดูลที่ติดตั้ง 29 | * 30 | * @param Request $request 31 | * 32 | * @return string 33 | */ 34 | public function render(Request $request) 35 | { 36 | // ข้อความ title bar 37 | $this->title = Language::get('Module'); 38 | // เลือกเมนู 39 | $this->menu = 'modules'; 40 | // แอดมิน, ไม่ใช่สมาชิกตัวอย่าง 41 | if (Login::notDemoMode(Login::isAdmin())) { 42 | // แสดงผล 43 | $section = Html::create('section'); 44 | // breadcrumbs 45 | $breadcrumbs = $section->add('nav', [ 46 | 'class' => 'breadcrumbs' 47 | ]); 48 | $ul = $breadcrumbs->add('ul'); 49 | $ul->appendChild('
  • {LNG_Settings}
  • '); 50 | $ul->appendChild('
  • {LNG_Module}
  • '); 51 | $ul->appendChild('
  • '.$this->title.'
  • '); 52 | $section->add('header', [ 53 | 'innerHTML' => '

    '.$this->title.'

    ' 54 | ]); 55 | // menu 56 | $section->appendChild(\Index\Tabmenus\View::render($request, 'settings', 'modules')); 57 | $div = $section->add('div', [ 58 | 'class' => 'content_bg' 59 | ]); 60 | // แสดงตาราง 61 | $div->appendChild(\Index\Modules\View::create()->render($request)); 62 | // คืนค่า HTML 63 | return $section->render(); 64 | } 65 | // 404 66 | return \Index\Error\Controller::execute($this, $request->getUri()); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /modules/index/controllers/sms.php: -------------------------------------------------------------------------------- 1 | 23 | * 24 | * @since 1.0 25 | */ 26 | class Controller extends \Gcms\Controller 27 | { 28 | /** 29 | * ตั้งค่า SMS 30 | * 31 | * @param Request $request 32 | * 33 | * @return string 34 | */ 35 | public function render(Request $request) 36 | { 37 | // ข้อความ title bar 38 | $this->title = Language::get('SMS Settings'); 39 | // เลือกเมนู 40 | $this->menu = 'settings'; 41 | // แอดมิน, ไม่ใช่สมาชิกตัวอย่าง 42 | if (Login::notDemoMode(Login::isAdmin())) { 43 | // แสดงผล 44 | $section = Html::create('section'); 45 | // breadcrumbs 46 | $breadcrumbs = $section->add('nav', [ 47 | 'class' => 'breadcrumbs' 48 | ]); 49 | $ul = $breadcrumbs->add('ul'); 50 | $ul->appendChild('
  • {LNG_Settings}
  • '); 51 | $ul->appendChild('
  • {LNG_SMS Settings}
  • '); 52 | $section->add('header', [ 53 | 'innerHTML' => '

    '.$this->title.'

    ' 54 | ]); 55 | // menu 56 | $section->appendChild(\Index\Tabmenus\View::render($request, 'settings', 'sms')); 57 | // โหลด config 58 | $config = Config::load(ROOT_PATH.'settings/config.php'); 59 | $div = $section->add('div', [ 60 | 'class' => 'content_bg' 61 | ]); 62 | // แสดงฟอร์ม 63 | $div->appendChild(\Index\Sms\View::create()->render($config)); 64 | // คืนค่า HTML 65 | return $section->render(); 66 | } 67 | // 404 68 | return \Index\Error\Controller::execute($this, $request->getUri()); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /install/index.php: -------------------------------------------------------------------------------- 1 | '; 38 | echo ''; 39 | echo ''; 40 | echo ''; 41 | echo ''.$title.''; 42 | echo ''; 43 | echo ''; 44 | echo ''; 45 | echo ''; 46 | echo ''; 47 | echo ''; 48 | echo '
    '; 49 | echo '

    '.$h1.'

    '; 50 | // เนื้อหา 51 | include $file; 52 | // footer 53 | echo ''; 54 | echo '
    '; 55 | echo ''; 56 | echo ''; 57 | -------------------------------------------------------------------------------- /modules/index/controllers/theme.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Controller extends \Gcms\Controller 26 | { 27 | /** 28 | * ตั้งค่า template (theme.php) 29 | * 30 | * @param Request $request 31 | * 32 | * @return string 33 | */ 34 | public function render(Request $request) 35 | { 36 | // ข้อความ title bar 37 | $this->title = Language::get('Website template'); 38 | // เลือกเมนู 39 | $this->menu = 'settings'; 40 | // สมาชิก 41 | $login = Login::isMember(); 42 | // สามารถตั้งค่าระบบได้ 43 | if (Login::checkPermission($login, 'can_config')) { 44 | // แสดงผล 45 | $section = Html::create('section'); 46 | // breadcrumbs 47 | $breadcrumbs = $section->add('nav', [ 48 | 'class' => 'breadcrumbs' 49 | ]); 50 | $ul = $breadcrumbs->add('ul'); 51 | $ul->appendChild('
  • {LNG_Settings}
  • '); 52 | $ul->appendChild('
  • {LNG_Website template}
  • '); 53 | $section->add('header', [ 54 | 'innerHTML' => '

    '.$this->title.'

    ' 55 | ]); 56 | // menu 57 | $section->appendChild(\Index\Tabmenus\View::render($request, 'settings', 'theme')); 58 | $div = $section->add('div', [ 59 | 'class' => 'content_bg' 60 | ]); 61 | // แสดงฟอร์ม 62 | $div->appendChild(\Index\Theme\View::create()->render($request)); 63 | // คืนค่า HTML 64 | return $section->render(); 65 | } 66 | // 404 67 | return \Index\Error\Controller::execute($this, $request->getUri()); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /modules/index/controllers/linesettings.php: -------------------------------------------------------------------------------- 1 | 23 | * 24 | * @since 1.0 25 | */ 26 | class Controller extends \Gcms\Controller 27 | { 28 | /** 29 | * ตั้งค่า LINE 30 | * 31 | * @param Request $request 32 | * 33 | * @return string 34 | */ 35 | public function render(Request $request) 36 | { 37 | // ข้อความ title bar 38 | $this->title = Language::get('LINE settings'); 39 | // เลือกเมนู 40 | $this->menu = 'settings'; 41 | // แอดมิน, ไม่ใช่สมาชิกตัวอย่าง 42 | if (Login::notDemoMode(Login::isAdmin())) { 43 | // แสดงผล 44 | $section = Html::create('section'); 45 | // breadcrumbs 46 | $breadcrumbs = $section->add('nav', [ 47 | 'class' => 'breadcrumbs' 48 | ]); 49 | $ul = $breadcrumbs->add('ul'); 50 | $ul->appendChild('
  • {LNG_Settings}
  • '); 51 | $ul->appendChild('
  • {LNG_LINE settings}
  • '); 52 | $section->add('header', [ 53 | 'innerHTML' => '

    '.$this->title.'

    ' 54 | ]); 55 | // menu 56 | $section->appendChild(\Index\Tabmenus\View::render($request, 'settings', 'linesettings')); 57 | // โหลด config 58 | $config = Config::load(ROOT_PATH.'settings/config.php'); 59 | $div = $section->add('div', [ 60 | 'class' => 'content_bg' 61 | ]); 62 | // แสดงฟอร์ม 63 | $div->appendChild(\Index\Linesettings\View::create()->render($config)); 64 | // คืนค่า HTML 65 | return $section->render(); 66 | } 67 | // 404 68 | return \Index\Error\Controller::execute($this, $request->getUri()); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /skin/booking/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {TITLE} 10 | 11 | 12 | 13 | 14 | 15 |
    16 |
    17 |
    18 |
    19 |
    20 | 25 |
    26 | {LINE} 27 | 28 |
    29 |
      {LANGUAGES}
    30 |
    31 |
    32 |
    33 |
    34 | 38 |
    39 |
    40 | 43 |
    44 |
    45 |

    46 | Copyright 2023 ©, {LNG_Version} {VERSION} Created by Kotchasan 47 |

    48 |
    49 |
    50 |
    51 | ^ 52 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /modules/index/controllers/apis.php: -------------------------------------------------------------------------------- 1 | 23 | * 24 | * @since 1.0 25 | */ 26 | class Controller extends \Gcms\Controller 27 | { 28 | /** 29 | * ฟอร์มตั้งค่า api 30 | * 31 | * @param Request $request 32 | * 33 | * @return string 34 | */ 35 | public function render(Request $request) 36 | { 37 | // ข้อความ title bar 38 | $this->title = Language::get('API settings'); 39 | // เลือกเมนู 40 | $this->menu = 'settings'; 41 | // แอดมิน, ไม่ใช่สมาชิกตัวอย่าง 42 | if (Login::notDemoMode(Login::isAdmin())) { 43 | // แสดงผล 44 | $section = Html::create('section'); 45 | // breadcrumbs 46 | $breadcrumbs = $section->add('nav', [ 47 | 'class' => 'breadcrumbs' 48 | ]); 49 | $ul = $breadcrumbs->add('ul'); 50 | $ul->appendChild('
  • {LNG_Settings}
  • '); 51 | $ul->appendChild('
  • API
  • '); 52 | $section->add('header', [ 53 | 'innerHTML' => '

    '.$this->title.'

    ' 54 | ]); 55 | // menu 56 | $section->appendChild(\Index\Tabmenus\View::render($request, 'settings', 'apis')); 57 | // โหลด config 58 | $config = Config::load(ROOT_PATH.'settings/config.php'); 59 | $div = $section->add('div', [ 60 | 'class' => 'content_bg' 61 | ]); 62 | // แสดงฟอร์ม 63 | $div->appendChild(\Index\Apis\View::create()->render($config)); 64 | // คืนค่า HTML 65 | return $section->render(); 66 | } 67 | // 404 68 | return \Index\Error\Controller::execute($this, $request->getUri()); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /modules/index/controllers/loginpage.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Controller extends \Gcms\Controller 26 | { 27 | /** 28 | * ตั้งค่าหน้า login (loginpage.php) 29 | * 30 | * @param Request $request 31 | * 32 | * @return string 33 | */ 34 | public function render(Request $request) 35 | { 36 | // ข้อความ title bar 37 | $this->title = Language::trans('{LNG_Settings} {LNG_Login page}'); 38 | // เลือกเมนู 39 | $this->menu = 'settings'; 40 | // สมาชิก 41 | $login = Login::isMember(); 42 | // สามารถตั้งค่าระบบได้ 43 | if (Login::checkPermission($login, 'can_config')) { 44 | // แสดงผล 45 | $section = Html::create('section'); 46 | // breadcrumbs 47 | $breadcrumbs = $section->add('nav', [ 48 | 'class' => 'breadcrumbs' 49 | ]); 50 | $ul = $breadcrumbs->add('ul'); 51 | $ul->appendChild('
  • {LNG_Settings}
  • '); 52 | $ul->appendChild('
  • {LNG_Login page}
  • '); 53 | $section->add('header', [ 54 | 'innerHTML' => '' 55 | ]); 56 | // menu 57 | $section->appendChild(\Index\Tabmenus\View::render($request, 'settings', 'loginpage')); 58 | $div = $section->add('div', [ 59 | 'class' => 'content_bg' 60 | ]); 61 | // แสดงฟอร์ม 62 | $div->appendChild(\Index\Loginpage\View::create()->render()); 63 | // คืนค่า HTML 64 | return $section->render(); 65 | } 66 | // 404 67 | return \Index\Error\Controller::execute($this, $request->getUri()); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Kotchasan/Singleton.php: -------------------------------------------------------------------------------- 1 | 8 | * @package Kotchasan 9 | */ 10 | 11 | namespace Kotchasan; 12 | 13 | /** 14 | * This class provides the base functionality for creating singleton classes. 15 | * 16 | * @see https://www.kotchasan.com/ 17 | */ 18 | abstract class Singleton 19 | { 20 | /** 21 | * @var Singleton|null The instance of the class. 22 | * This variable holds the single instance of the class. 23 | */ 24 | private static $instance = null; 25 | 26 | /** 27 | * Get the instance of the class. 28 | * 29 | * This method returns the instance of the class. 30 | * If the instance doesn't exist, it creates a new one. 31 | * 32 | * @return static The instance of the class. 33 | */ 34 | public static function &getInstance() 35 | { 36 | if (null === static::$instance) { 37 | static::$instance = new static; 38 | } 39 | return static::$instance; 40 | } 41 | 42 | /** 43 | * Initialize the class. 44 | * 45 | * This method is called when the class is loaded. 46 | * 47 | * @return void 48 | */ 49 | abstract protected function init(); 50 | 51 | /** 52 | * Clone method. 53 | * 54 | * This method is private to prevent cloning of the instance. 55 | * 56 | * @return void 57 | */ 58 | private function __clone() 59 | { 60 | // Do nothing 61 | } 62 | 63 | /** 64 | * Constructor. 65 | * 66 | * This method is private to prevent direct instantiation of the class. 67 | * It initializes the class by calling the `init` method. 68 | * 69 | * @return void 70 | */ 71 | private function __construct() 72 | { 73 | // Initial class 74 | static::init(); 75 | } 76 | 77 | /** 78 | * Wakeup method. 79 | * 80 | * This method is private to prevent deserialization of the instance. 81 | * 82 | * @return void 83 | */ 84 | private function __wakeup() 85 | { 86 | // Do nothing 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /modules/index/controllers/telegramsettings.php: -------------------------------------------------------------------------------- 1 | 23 | * 24 | * @since 1.0 25 | */ 26 | class Controller extends \Gcms\Controller 27 | { 28 | /** 29 | * ตั้งค่า Telegram Bot 30 | * 31 | * @param Request $request 32 | * 33 | * @return string 34 | */ 35 | public function render(Request $request) 36 | { 37 | // ข้อความ title bar 38 | $this->title = Language::get('Telegram settings'); 39 | // เลือกเมนู 40 | $this->menu = 'settings'; 41 | // แอดมิน, ไม่ใช่สมาชิกตัวอย่าง 42 | if (Login::notDemoMode(Login::isAdmin())) { 43 | // แสดงผล 44 | $section = Html::create('section'); 45 | // breadcrumbs 46 | $breadcrumbs = $section->add('nav', [ 47 | 'class' => 'breadcrumbs' 48 | ]); 49 | $ul = $breadcrumbs->add('ul'); 50 | $ul->appendChild('
  • {LNG_Settings}
  • '); 51 | $ul->appendChild('
  • {LNG_Telegram settings}
  • '); 52 | $section->add('header', [ 53 | 'innerHTML' => '

    '.$this->title.'

    ' 54 | ]); 55 | // menu 56 | $section->appendChild(\Index\Tabmenus\View::render($request, 'settings', 'telegramsettings')); 57 | // โหลด config 58 | $config = Config::load(ROOT_PATH.'settings/config.php'); 59 | $div = $section->add('div', [ 60 | 'class' => 'content_bg' 61 | ]); 62 | // แสดงฟอร์ม 63 | $div->appendChild(\Index\Telegramsettings\View::create()->render($config)); 64 | // คืนค่า HTML 65 | return $section->render(); 66 | } 67 | // 404 68 | return \Index\Error\Controller::execute($this, $request->getUri()); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /modules/index/controllers/usage.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Controller extends \Gcms\Controller 26 | { 27 | /** 28 | * ตารางรายการ Log 29 | * 30 | * @param Request $request 31 | * 32 | * @return string 33 | */ 34 | public function render(Request $request) 35 | { 36 | // ข้อความ title bar 37 | $this->title = Language::get('Usage history'); 38 | // เลือกเมนู 39 | $this->menu = 'settings'; 40 | // สมาชิก 41 | $login = Login::isMember(); 42 | // สามารถดูประวัติการใช้งานได้, ไม่ใช่สมาชิกตัวอย่าง 43 | if (Login::notDemoMode(Login::checkPermission($login, 'can_view_usage_history'))) { 44 | // แสดงผล 45 | $section = Html::create('section'); 46 | // breadcrumbs 47 | $breadcrumbs = $section->add('nav', [ 48 | 'class' => 'breadcrumbs' 49 | ]); 50 | $ul = $breadcrumbs->add('ul'); 51 | $ul->appendChild('
  • {LNG_Settings}
  • '); 52 | $ul->appendChild('
  • {LNG_Usage history}
  • '); 53 | $ul->appendChild('
  • {LNG_List of}
  • '); 54 | $section->add('header', [ 55 | 'innerHTML' => '

    '.$this->title.'

    ' 56 | ]); 57 | // menu 58 | $section->appendChild(\Index\Tabmenus\View::render($request, 'settings', 'usage')); 59 | $div = $section->add('div', [ 60 | 'class' => 'content_bg' 61 | ]); 62 | // แสดงตาราง 63 | $div->appendChild(\Index\Usage\View::create()->render($request, $login)); 64 | // คืนค่า HTML 65 | return $section->render(); 66 | } 67 | // 404 68 | return \Index\Error\Controller::execute($this, $request->getUri()); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /modules/index/controllers/system.php: -------------------------------------------------------------------------------- 1 | 23 | * 24 | * @since 1.0 25 | */ 26 | class Controller extends \Gcms\Controller 27 | { 28 | /** 29 | * ตั้งค่าเว็บไซต์ 30 | * 31 | * @param Request $request 32 | * 33 | * @return string 34 | */ 35 | public function render(Request $request) 36 | { 37 | // ข้อความ title bar 38 | $this->title = Language::get('General site settings'); 39 | // เลือกเมนู 40 | $this->menu = 'settings'; 41 | // สมาชิก 42 | $login = Login::isMember(); 43 | // สามารถตั้งค่าระบบได้ 44 | if (Login::checkPermission($login, 'can_config')) { 45 | // แสดงผล 46 | $section = Html::create('section'); 47 | // breadcrumbs 48 | $breadcrumbs = $section->add('nav', [ 49 | 'class' => 'breadcrumbs' 50 | ]); 51 | $ul = $breadcrumbs->add('ul'); 52 | $ul->appendChild('
  • {LNG_Settings}
  • '); 53 | $ul->appendChild('
  • {LNG_Site settings}
  • '); 54 | $section->add('header', [ 55 | 'innerHTML' => '

    '.$this->title.'

    ' 56 | ]); 57 | // menu 58 | $section->appendChild(\Index\Tabmenus\View::render($request, 'settings', 'system')); 59 | // โหลด config 60 | $config = Config::load(ROOT_PATH.'settings/config.php'); 61 | $div = $section->add('div', [ 62 | 'class' => 'content_bg' 63 | ]); 64 | // แสดงฟอร์ม 65 | $div->appendChild(\Index\System\View::create()->render($config, $login)); 66 | // คืนค่า HTML 67 | return $section->render(); 68 | } 69 | // 404 70 | return \Index\Error\Controller::execute($this, $request->getUri()); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /skin/default/404.html: -------------------------------------------------------------------------------- 1 |
    2 |

    {CODE}

    3 |

    {DETAIL}

    4 |
    5 | 101 | -------------------------------------------------------------------------------- /modules/car/controllers/setup.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Controller extends \Gcms\Controller 26 | { 27 | /** 28 | * ตารางรายการ รถยนต์ 29 | * 30 | * @param Request $request 31 | * 32 | * @return string 33 | */ 34 | public function render(Request $request) 35 | { 36 | // ข้อความ title bar 37 | $this->title = Language::trans('{LNG_List of} {LNG_Vehicle}'); 38 | // เลือกเมนู 39 | $this->menu = 'settings'; 40 | // สมาชิก 41 | $login = Login::isMember(); 42 | // สามารถจัดการโมดูลได้ 43 | if (Login::checkPermission($login, 'can_manage_car')) { 44 | // แสดงผล 45 | $section = Html::create('section'); 46 | // breadcrumbs 47 | $breadcrumbs = $section->add('nav', [ 48 | 'class' => 'breadcrumbs' 49 | ]); 50 | $ul = $breadcrumbs->add('ul'); 51 | $ul->appendChild('
  • {LNG_Settings}
  • '); 52 | $ul->appendChild('
  • {LNG_Book a vehicle}
  • '); 53 | $ul->appendChild('
  • {LNG_List of}
  • '); 54 | $section->add('header', [ 55 | 'innerHTML' => '

    '.$this->title.'

    ' 56 | ]); 57 | // menu 58 | $section->appendChild(\Index\Tabmenus\View::render($request, 'settings', 'car')); 59 | $div = $section->add('div', [ 60 | 'class' => 'content_bg' 61 | ]); 62 | // แสดงตาราง 63 | $div->appendChild(\Car\Setup\View::create()->render($request, $login)); 64 | // คืนค่า HTML 65 | return $section->render(); 66 | } 67 | // 404 68 | return \Index\Error\Controller::execute($this, $request->getUri()); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /modules/index/controllers/mailserver.php: -------------------------------------------------------------------------------- 1 | 23 | * 24 | * @since 1.0 25 | */ 26 | class Controller extends \Gcms\Controller 27 | { 28 | /** 29 | * ตั้งค่าระบบอีเมล 30 | * 31 | * @param Request $request 32 | * 33 | * @return string 34 | */ 35 | public function render(Request $request) 36 | { 37 | // ข้อความ title bar 38 | $this->title = Language::get('Setting up the email system'); 39 | // เลือกเมนู 40 | $this->menu = 'settings'; 41 | // แอดมิน, ไม่ใช่สมาชิกตัวอย่าง 42 | if (Login::notDemoMode(Login::isAdmin())) { 43 | // แสดงผล 44 | $section = Html::create('section'); 45 | // breadcrumbs 46 | $breadcrumbs = $section->add('nav', [ 47 | 'class' => 'breadcrumbs' 48 | ]); 49 | $ul = $breadcrumbs->add('ul'); 50 | $ul->appendChild('
  • {LNG_Settings}
  • '); 51 | $ul->appendChild('
  • {LNG_Email settings}
  • '); 52 | $section->add('header', [ 53 | 'innerHTML' => '

    '.$this->title.'

    ' 54 | ]); 55 | // menu 56 | $section->appendChild(\Index\Tabmenus\View::render($request, 'settings', 'mailserver')); 57 | // โหลด config 58 | $config = Config::load(ROOT_PATH.'settings/config.php'); 59 | $div = $section->add('div', [ 60 | 'class' => 'content_bg' 61 | ]); 62 | // แสดงฟอร์ม 63 | $div->appendChild(\Index\Mailserver\View::create()->render($config)); 64 | // คืนค่า HTML 65 | return $section->render(); 66 | } 67 | // 404 68 | return \Index\Error\Controller::execute($this, $request->getUri()); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /modules/index/controllers/consentsettings.php: -------------------------------------------------------------------------------- 1 | 23 | * 24 | * @since 1.0 25 | */ 26 | class Controller extends \Gcms\Controller 27 | { 28 | /** 29 | * นโยบายคุกกี้ 30 | * 31 | * @param Request $request 32 | * 33 | * @return string 34 | */ 35 | public function render(Request $request) 36 | { 37 | // ข้อความ title bar 38 | $this->title = Language::get('Cookie Policy'); 39 | // เลือกเมนู 40 | $this->menu = 'settings'; 41 | // สมาชิก 42 | $login = Login::isMember(); 43 | // สามารถตั้งค่าระบบได้ 44 | if (Login::checkPermission($login, 'can_config')) { 45 | // แสดงผล 46 | $section = Html::create('section'); 47 | // breadcrumbs 48 | $breadcrumbs = $section->add('nav', [ 49 | 'class' => 'breadcrumbs' 50 | ]); 51 | $ul = $breadcrumbs->add('ul'); 52 | $ul->appendChild('
  • {LNG_Settings}
  • '); 53 | $ul->appendChild('
  • {LNG_Cookie Policy}
  • '); 54 | $section->add('header', [ 55 | 'innerHTML' => '

    '.$this->title.'

    ' 56 | ]); 57 | // menu 58 | $section->appendChild(\Index\Tabmenus\View::render($request, 'settings', 'consentsettings')); 59 | // โหลด config 60 | $config = Config::load(ROOT_PATH.'settings/config.php'); 61 | $div = $section->add('div', [ 62 | 'class' => 'content_bg' 63 | ]); 64 | // แสดงฟอร์ม 65 | $div->appendChild(\Index\Consentsettings\View::create()->render($config, $login)); 66 | // คืนค่า HTML 67 | return $section->render(); 68 | } 69 | // 404 70 | return \Index\Error\Controller::execute($this, $request->getUri()); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Kotchasan/Database/Schema.php: -------------------------------------------------------------------------------- 1 | 8 | * @package Kotchasan 9 | */ 10 | 11 | namespace Kotchasan\Database; 12 | 13 | /** 14 | * Database schema class 15 | * 16 | * This class is responsible for retrieving and managing database schema information. 17 | * 18 | * @see https://www.kotchasan.com/ 19 | */ 20 | class Schema 21 | { 22 | /** 23 | * Database object 24 | * 25 | * @var Driver 26 | */ 27 | private $db; 28 | /** 29 | * List of loaded schemas 30 | * 31 | * @var array 32 | */ 33 | private $tables = []; 34 | 35 | /** 36 | * Create Schema Class 37 | * 38 | * @param Driver $db The database driver object 39 | * 40 | * @return static 41 | */ 42 | public static function create(Driver $db) 43 | { 44 | $obj = new static; 45 | $obj->db = $db; 46 | return $obj; 47 | } 48 | 49 | /** 50 | * Get the field names of a table 51 | * 52 | * Retrieve all field names in the specified table. 53 | * 54 | * @param string $table The table name 55 | * 56 | * @return array The array of field names 57 | * 58 | * @throws \InvalidArgumentException if the table name is empty 59 | */ 60 | public function fields($table) 61 | { 62 | if (empty($table)) { 63 | throw new \InvalidArgumentException('Table name is empty in fields'); 64 | } else { 65 | $this->init($table); 66 | return array_keys($this->tables[$table]); 67 | } 68 | } 69 | 70 | /** 71 | * Initialize the schema data for a table 72 | * 73 | * @param string $table The table name 74 | */ 75 | private function init($table) 76 | { 77 | if (empty($this->tables[$table])) { 78 | $sql = "SHOW FULL COLUMNS FROM $table"; 79 | $columns = $this->db->cacheOn()->customQuery($sql, true); 80 | if (empty($columns)) { 81 | throw new \InvalidArgumentException($this->db->getError()); 82 | } else { 83 | $datas = []; 84 | foreach ($columns as $column) { 85 | $datas[$column['Field']] = $column; 86 | } 87 | $this->tables[$table] = $datas; 88 | } 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /install/upgrade0.php: -------------------------------------------------------------------------------- 1 | ตรวจสอบไฟล์และโฟลเดอร์ที่จำเป็นสำหรับการติดตั้ง'; 4 | echo '

    ไฟล์และโฟลเดอร์ทั้งหมดตามรายการด้านล่างต้องถูกสร้างขึ้น และกำหนดค่าให้สามารถเขียนได้

    '; 5 | echo '
      '; 6 | $folders = []; 7 | $folders[] = ROOT_PATH.'datas/'; 8 | $folders[] = ROOT_PATH.'settings/'; 9 | $folders[] = ROOT_PATH.'datas/cache/'; 10 | $folders[] = ROOT_PATH.'datas/logs/'; 11 | $folders[] = ROOT_PATH.'datas/images/'; 12 | foreach ($folders as $folder) { 13 | makeDirectory($folder, 0755); 14 | if (is_writable($folder)) { 15 | echo '
    • โฟลเดอร์ '.str_replace(ROOT_PATH, '', $folder).' สามารถใช้งานได้
    • '; 16 | } else { 17 | $error = true; 18 | echo '
    • โฟลเดอร์ '.str_replace(ROOT_PATH, '', $folder).' ไม่สามารถเขียนหรือสร้างได้ กรุณาสร้างและปรับ chmod ให้สามารถเขียนได้
    • '; 19 | } 20 | } 21 | $files = []; 22 | $files[] = ROOT_PATH.'settings/config.php'; 23 | $files[] = ROOT_PATH.'settings/database.php'; 24 | foreach ($files as $file) { 25 | if (!is_file($file)) { 26 | $f = @fopen($file, 'wb'); 27 | if ($f) { 28 | fclose($f); 29 | } 30 | } 31 | if (is_writable($file)) { 32 | echo '
    • ไฟล์ '.str_replace(ROOT_PATH, '', $file).' สามารถใช้งานได้
    • '; 33 | } else { 34 | $error = true; 35 | echo '
    • ไฟล์ '.str_replace(ROOT_PATH, '', $file).' ไม่สามารถเขียนหรือสร้างได้ กรุณาสร้างไฟล์นี้และปรับ chmod ให้เป็น 755 ด้วยตัวเอง
    • '; 36 | } 37 | } 38 | echo '
    '; 39 | echo '

    ตรวจสอบใหม่ ดำเนินการต่อ

    '; 40 | } 41 | 42 | /** 43 | * @param $dir 44 | * @param $mode 45 | * 46 | * @return mixed 47 | */ 48 | function makeDirectory($dir, $mode = 0755) 49 | { 50 | if (!is_dir($dir)) { 51 | $old = umask(0); 52 | @mkdir($dir, $mode, true); 53 | umask($old); 54 | } 55 | $old = umask(0); 56 | $f = @chmod($dir, $mode); 57 | umask($old); 58 | return $f; 59 | } 60 | -------------------------------------------------------------------------------- /modules/index/views/tabmenus.php: -------------------------------------------------------------------------------- 1 | 19 | * 20 | * @since 1.0 21 | */ 22 | class View extends \Gcms\View 23 | { 24 | /** 25 | * Menus 26 | * 27 | * @param Request $request 28 | * @param string $menu 29 | * @param string $tab 30 | * 31 | * @return string 32 | */ 33 | public static function render(Request $request, $menu, $tab) 34 | { 35 | // เมนูที่ต้องการ 36 | $menu_tabs = \Index\Index\Controller::menus()->getTopLvlMenu($menu); 37 | $content = ''; 38 | if (!empty($menu_tabs['submenus'])) { 39 | // สร้างเมนู tab 40 | $content = '
      '; 41 | foreach ($menu_tabs['submenus'] as $name => $item) { 42 | $hasSubmenu = empty($item['submenus']) ? false : true; 43 | if ($hasSubmenu) { 44 | $sel = $tab == $name ? 'select menu-arrow' : 'menu-arrow'; 45 | } else { 46 | $sel = $tab == $name ? 'select' : ''; 47 | } 48 | $content .= '
    • '; 56 | if ($hasSubmenu) { 57 | $content .= '
        '; 58 | foreach ($item['submenus'] as $submenu) { 59 | $content .= '
      • '.$submenu['text'].'
      • '; 60 | } 61 | $content .= '
      '; 62 | } 63 | $content .= '
    • '; 64 | } 65 | $content .= '
    '; 66 | } 67 | // คืนค่า HTML 68 | return $content; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /modules/car/controllers/approve.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Controller extends \Car\Base\Controller 26 | { 27 | /** 28 | * รายละเอียดการจอง (admin) 29 | * 30 | * @param Request $request 31 | * 32 | * @return string 33 | */ 34 | public function render(Request $request) 35 | { 36 | // สมาชิก 37 | $login = Login::isMember(); 38 | // ตรวจสอบรายการที่เลือก 39 | $index = \Car\Approve\Model::get($request->request('id')->toInt()); 40 | // ข้อความ title bar 41 | $this->title = Language::trans('{LNG_Approve} {LNG_Book a vehicle}'); 42 | // เลือกเมนู 43 | $this->menu = 'report'; 44 | // สิทธิ์ผู้อนุมัติ 45 | if ($index && self::reportApprove($login) !== 0) { 46 | // แสดงผล 47 | $section = Html::create('section'); 48 | // breadcrumbs 49 | $breadcrumbs = $section->add('nav', [ 50 | 'class' => 'breadcrumbs' 51 | ]); 52 | $ul = $breadcrumbs->add('ul'); 53 | $ul->appendChild('
  • {LNG_Book a vehicle}
  • '); 54 | $ul->appendChild('
  • {LNG_Report}
  • '); 55 | $ul->appendChild('
  • {LNG_Approve}
  • '); 56 | $section->add('header', [ 57 | 'innerHTML' => '

    '.$this->title.'

    ' 58 | ]); 59 | // menu 60 | $section->appendChild(\Index\Tabmenus\View::render($request, 'report', 'car')); 61 | $div = $section->add('div', [ 62 | 'class' => 'content_bg' 63 | ]); 64 | // แสดงฟอร์ม 65 | $div->appendChild(\Car\Approve\View::create()->render($index, $login)); 66 | // คืนค่า HTML 67 | return $section->render(); 68 | } 69 | // 404 70 | return \Index\Error\Controller::execute($this, $request->getUri()); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /install/step1.php: -------------------------------------------------------------------------------- 1 | ตรวจสอบไฟล์และโฟลเดอร์ที่จำเป็นสำหรับการติดตั้ง'; 4 | echo '

    ไฟล์และโฟลเดอร์ทั้งหมดตามรายการด้านล่างต้องถูกสร้างขึ้น และกำหนดค่าให้สามารถเขียนได้

    '; 5 | echo '
      '; 6 | $folders = []; 7 | $folders[] = ROOT_PATH.'datas/'; 8 | $folders[] = ROOT_PATH.'settings/'; 9 | $folders[] = ROOT_PATH.'datas/cache/'; 10 | $folders[] = ROOT_PATH.'datas/logs/'; 11 | $folders[] = ROOT_PATH.'datas/images/'; 12 | foreach ($folders as $folder) { 13 | makeDirectory($folder, 0755); 14 | if (is_writable($folder)) { 15 | echo '
    • โฟลเดอร์ '.str_replace(ROOT_PATH, '', $folder).' สามารถใช้งานได้
    • '; 16 | } else { 17 | $error = true; 18 | echo '
    • โฟลเดอร์ '.str_replace(ROOT_PATH, '', $folder).' ไม่สามารถเขียนหรือสร้างได้ กรุณาสร้างและปรับ chmod ให้สามารถเขียนได้
    • '; 19 | } 20 | } 21 | $files = []; 22 | $files[] = ROOT_PATH.'settings/config.php'; 23 | $files[] = ROOT_PATH.'settings/database.php'; 24 | foreach ($files as $file) { 25 | if (!is_file($file)) { 26 | $f = @fopen($file, 'wb'); 27 | if ($f) { 28 | fclose($f); 29 | } 30 | } 31 | if (is_writable($file)) { 32 | echo '
    • ไฟล์ '.str_replace(ROOT_PATH, '', $file).' สามารถใช้งานได้
    • '; 33 | } else { 34 | $error = true; 35 | echo '
    • ไฟล์ '.str_replace(ROOT_PATH, '', $file).' ไม่สามารถเขียนหรือสร้างได้ กรุณาสร้างไฟล์นี้และปรับ chmod ให้เป็น 755 ด้วยตัวเอง
    • '; 36 | } 37 | } 38 | echo '
    '; 39 | echo '

    ตรวจสอบใหม่ ดำเนินการต่อ

    '; 40 | } 41 | 42 | /** 43 | * @param string $dir 44 | * @param mixed $mode 45 | * 46 | * @return bool 47 | */ 48 | function makeDirectory($dir, $mode = 0755) 49 | { 50 | if (!is_dir($dir)) { 51 | $old = umask(0); 52 | @mkdir($dir, $mode, true); 53 | umask($old); 54 | } 55 | $old = umask(0); 56 | $f = @chmod($dir, $mode); 57 | umask($old); 58 | return $f; 59 | } 60 | -------------------------------------------------------------------------------- /modules/car/controllers/settings.php: -------------------------------------------------------------------------------- 1 | 23 | * 24 | * @since 1.0 25 | */ 26 | class Controller extends \Gcms\Controller 27 | { 28 | /** 29 | * ตั้งค่าโมดูล 30 | * 31 | * @param Request $request 32 | * 33 | * @return string 34 | */ 35 | public function render(Request $request) 36 | { 37 | // ข้อความ title bar 38 | $this->title = Language::trans('{LNG_Module settings} {LNG_Book a vehicle}'); 39 | // เลือกเมนู 40 | $this->menu = 'settings'; 41 | // สมาชิก 42 | $login = Login::isMember(); 43 | // สามารถตั้งค่าระบบได้ 44 | if (Login::checkPermission($login, 'can_config')) { 45 | // แสดงผล 46 | $section = Html::create('section'); 47 | // breadcrumbs 48 | $breadcrumbs = $section->add('nav', [ 49 | 'class' => 'breadcrumbs' 50 | ]); 51 | $ul = $breadcrumbs->add('ul'); 52 | $ul->appendChild('
  • {LNG_Settings}
  • '); 53 | $ul->appendChild('
  • {LNG_Book a vehicle}
  • '); 54 | $ul->appendChild('
  • {LNG_Module settings}
  • '); 55 | $section->add('header', [ 56 | 'innerHTML' => '

    '.$this->title.'

    ' 57 | ]); 58 | // menu 59 | $section->appendChild(\Index\Tabmenus\View::render($request, 'settings', 'car')); 60 | // โหลด config 61 | $config = Config::load(ROOT_PATH.'settings/config.php'); 62 | $div = $section->add('div', [ 63 | 'class' => 'content_bg' 64 | ]); 65 | // แสดงฟอร์ม 66 | $div->appendChild(\Car\Settings\View::create()->render($config, $login)); 67 | // คืนค่า HTML 68 | return $section->render(); 69 | } 70 | // 404 71 | return \Index\Error\Controller::execute($this, $request->getUri()); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /js/ddpanel.js: -------------------------------------------------------------------------------- 1 | /** 2 | * GDPanel 3 | * Javascript dropdown panel 4 | * 5 | * @filesource js/gdpanel.js 6 | * @link https://www.kotchasan.com/ 7 | * @copyright 2016 Goragod.com 8 | * @license https://www.kotchasan.com/license/ 9 | */ 10 | (function() { 11 | "use strict"; 12 | var GDPanels = []; 13 | var gdpanels_len = 0; 14 | window.GDPanel = GClass.create(); 15 | GDPanel.prototype = { 16 | initialize: function(a, div, prefix) { 17 | this.prefix = prefix || "gdpanel"; 18 | var self = this; 19 | $E(div).className = this.prefix + " " + this.prefix + gdpanels_len; 20 | $E(a).className = this.prefix + "-arrow " + this.prefix + gdpanels_len; 21 | gdpanels_len++; 22 | GDPanels[a] = div; 23 | callClick(a, function() { 24 | self.show(this); 25 | return false; 26 | }); 27 | 28 | function _isPanel(src) { 29 | var c, 30 | tag = src.tagName.toLowerCase(); 31 | var test = self.prefix + " gcalendar gddcolor " + self.prefix + "-arrow"; 32 | while (src && src != document.body) { 33 | c = $G(src).hasClass(test); 34 | if (c) { 35 | return c == self.prefix + "-arrow" || 36 | c == "gcalendar" || 37 | c == "gddcolor" || 38 | tag == "input" || 39 | tag == "select" || 40 | tag == "textarea" || 41 | tag == "label" || 42 | tag == "button" ? 43 | src : 44 | null; 45 | } else { 46 | src = src.parentNode; 47 | } 48 | } 49 | return null; 50 | } 51 | $G(document.body).addEvent("click", function(e) { 52 | if (_isPanel(GEvent.element(e)) === null) { 53 | self.show(null); 54 | } 55 | }); 56 | }, 57 | show: function(src) { 58 | var c = "", 59 | a, 60 | div; 61 | if (src) { 62 | c = src.className.replace(this.prefix + "-arrow ", this.prefix + " "); 63 | } 64 | for (a in GDPanels) { 65 | div = $E(GDPanels[a]); 66 | if (div) { 67 | if (div.className == c) { 68 | $G(a).addClass("hover"); 69 | $G(div).addClass("show"); 70 | } else { 71 | $G(a).removeClass("hover"); 72 | $G(div).removeClass("show"); 73 | } 74 | } 75 | } 76 | }, 77 | hide: function() { 78 | this.show(null); 79 | } 80 | }; 81 | })(); -------------------------------------------------------------------------------- /modules/car/script.js: -------------------------------------------------------------------------------- 1 | function initCarCalendar(min, max) { 2 | var y = new Date().getFullYear(); 3 | new Calendar("car-calendar", { 4 | minYear: Math.min(min, y), 5 | maxYear: Math.max(max, y), 6 | url: WEB_URL + "index.php/car/model/calendar/toJSON", 7 | onclick: function() { 8 | send( 9 | WEB_URL + "index.php/car/model/index/action", 10 | "action=detail&id=" + this.id, 11 | doFormSubmit 12 | ); 13 | } 14 | }); 15 | forEach($E('car_links').getElementsByTagName('a'), function() { 16 | callClick(this, function() { 17 | send( 18 | WEB_URL + "index.php/car/model/vehicles/action", 19 | 'action=detail&id=' + this.id.replace('car_', ''), 20 | doFormSubmit, 21 | this 22 | ); 23 | }); 24 | }); 25 | } 26 | 27 | function initCarApprove() { 28 | $G('begin_date').addEvent("change", function() { 29 | if (this.value) { 30 | $G('end_date').min = this.value; 31 | } 32 | }); 33 | var doApprove = function() { 34 | var id = floatval($E('id').value), 35 | value = this.id.replace('change_status', ''); 36 | if (confirm(trans("YOU_WANT_TO_XXX").replace("XXX", this.innerHTML))) { 37 | if (id > 0) { 38 | let q = 'action=approve&id=' + id + '&status=' + value; 39 | send(WEB_URL + 'index.php/car/model/report/action', q, doFormSubmit, this) 40 | } 41 | } 42 | }; 43 | callClick('change_status1', doApprove); 44 | callClick('change_status2', doApprove); 45 | } 46 | 47 | function initCarApproved() { 48 | var doChanged = function() { 49 | let status = $E('approved_status').value; 50 | $E('approved_reason').parentNode.parentNode.style.display = status == 2 ? null : 'none'; 51 | $E('approved_chauffeur').parentNode.parentNode.style.display = status == 1 ? null : 'none'; 52 | }; 53 | $G('approved_status').addEvent('change', doChanged); 54 | doChanged.call(this); 55 | } 56 | 57 | function initCarSettings() { 58 | let doChanged = function() { 59 | let level = $E('car_approve_level').value.toInt(); 60 | forEach($E('verfied').getElementsByTagName('select'), function() { 61 | let ds = /car_approve_status([0-9]+)/.exec(this.id); 62 | if (ds) { 63 | $E('car_approve_department' + ds[1]).parentNode.parentNode.parentNode.parentNode.style.display = level > 0 && level >= ds[1].toInt() ? null : 'none'; 64 | } 65 | }); 66 | }; 67 | $G('car_approve_level').addEvent('change', doChanged); 68 | doChanged.call(this); 69 | } 70 | -------------------------------------------------------------------------------- /modules/index/controllers/editprofile.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Controller extends \Gcms\Controller 26 | { 27 | /** 28 | * แก้ไขข้อมูลส่วนตัวสมาชิก 29 | * 30 | * @param Request $request 31 | * 32 | * @return string 33 | */ 34 | public function render(Request $request) 35 | { 36 | // ข้อความ title bar 37 | $this->title = Language::get('Editing your account'); 38 | // เลือกเมนู 39 | $this->menu = 'member'; 40 | // สมาชิก, ไม่ใช่สมาชิกตัวอย่าง 41 | if ($login = Login::notDemoMode(Login::isMember())) { 42 | // อ่านข้อมูลสมาชิก 43 | $user = \Index\Editprofile\Model::get($request->request('id', $login['id'])->toInt()); 44 | // ตัวเอง, แอดมินแก้ไขได้ทุกคน ยกเว้น ID 1 45 | if ($user && $user['id'] > 0 && ($login['id'] == $user['id'] || Login::isAdmin())) { 46 | // แสดงผล 47 | $section = Html::create('section'); 48 | // breadcrumbs 49 | $breadcrumbs = $section->add('nav', [ 50 | 'class' => 'breadcrumbs' 51 | ]); 52 | $ul = $breadcrumbs->add('ul'); 53 | $ul->appendChild('
  • {LNG_Users}
  • '); 54 | $ul->appendChild('
  • {LNG_Member list}
  • '); 55 | $ul->appendChild('
  • {LNG_Edit}
  • '); 56 | $section->add('header', [ 57 | 'innerHTML' => '

    '.$this->title.'

    ' 58 | ]); 59 | $div = $section->add('div', [ 60 | 'class' => 'content_bg' 61 | ]); 62 | // แสดงฟอร์ม 63 | $div->appendChild(\Index\Editprofile\View::create()->render($request, $user, $login)); 64 | // คืนค่า HTML 65 | return $section->render(); 66 | } 67 | } 68 | // 404 69 | return \Index\Error\Controller::execute($this, $request->getUri()); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /modules/index/views/consent.php: -------------------------------------------------------------------------------- 1 | 21 | * 22 | * @since 1.0 23 | */ 24 | class View extends \Gcms\View 25 | { 26 | /** 27 | * แสดง PDPA Consent 28 | * 29 | * @param Request $request 30 | * 31 | * @return object 32 | */ 33 | public function render(Request $request) 34 | { 35 | $form = Html::create('form', [ 36 | 'id' => 'consent_frm', 37 | 'class' => 'consent_frm', 38 | 'autocomplete' => 'off', 39 | 'action' => 'index.php/index/model/consent/submit', 40 | 'onsubmit' => 'doFormSubmit', 41 | 'ajax' => true, 42 | 'token' => true 43 | ]); 44 | $form->add('header', [ 45 | 'innerHTML' => '

    {LNG_Cookie Policy}

    ' 46 | ]); 47 | $fieldset = $form->add('fieldset'); 48 | $fieldset->add('aside', [ 49 | 'innerHTML' => '{LNG_COOKIE_POLICY_DETAILS}' 50 | ]); 51 | $fieldset = $form->add('fieldset', [ 52 | 'class' => 'info' 53 | ]); 54 | $fieldset->add('div', [ 55 | 'class' => 'table fullwidth collapse', 56 | 'innerHTML' => '{LNG_Necessary cookies}{LNG_Always enabled}' 57 | ]); 58 | $fieldset->add('aside', [ 59 | 'innerHTML' => '{LNG_COOKIE_NECESSARY_DETAILS}' 60 | ]); 61 | $fieldset = $form->add('fieldset', [ 62 | 'class' => 'submit right' 63 | ]); 64 | $fieldset->add('a', [ 65 | 'href' => WEB_URL.'index.php?module=privacy', 66 | 'innerHTML' => '{LNG_Privacy Policy} ' 67 | ]); 68 | // submit 69 | $fieldset->add('submit', [ 70 | 'class' => 'button orange large', 71 | 'value' => '{LNG_Accept all}', 72 | 'id' => 'consent_submit' 73 | ]); 74 | // Javascript 75 | $form->script('$E("consent_submit").focus();'); 76 | // คืนค่า HTML 77 | return Language::trans($form->render()); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /skin/booking/404.html: -------------------------------------------------------------------------------- 1 |
    2 |

    {CODE}

    3 |

    {DETAIL}

    4 |
    5 | -------------------------------------------------------------------------------- /modules/index/controllers/write.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Controller extends \Gcms\Controller 26 | { 27 | /** 28 | * แก้ไขหน้าเพจ 29 | * 30 | * @param Request $request 31 | * 32 | * @return string 33 | */ 34 | public function render(Request $request) 35 | { 36 | $params = [ 37 | 'src' => $request->request('src')->filter('a-z'), 38 | 'pages' => Language::get('PAGES') 39 | ]; 40 | if (!isset($params['pages'][$params['src']])) { 41 | $params['src'] = \Kotchasan\ArrayTool::getFirstKey($params['pages']); 42 | } 43 | // ข้อความ title bar 44 | $this->title = Language::get('Details of').' '.$params['pages'][$params['src']]; 45 | // เลือกเมนู 46 | $this->menu = 'settings'; 47 | // แอดมิน, ไม่ใช่สมาชิกตัวอย่าง 48 | if (Login::notDemoMode(Login::isAdmin())) { 49 | // ckeditor 50 | self::$view->addJavascript(WEB_URL.'ckeditor/ckeditor.js'); 51 | // แสดงผล 52 | $section = Html::create('section'); 53 | // breadcrumbs 54 | $breadcrumbs = $section->add('nav', [ 55 | 'class' => 'breadcrumbs' 56 | ]); 57 | $ul = $breadcrumbs->add('ul'); 58 | $ul->appendChild('
  • {LNG_Settings}
  • '); 59 | $ul->appendChild('
  • '.$params['pages'][$params['src']].'
  • '); 60 | $section->add('header', [ 61 | 'innerHTML' => '

    '.$this->title.'

    ' 62 | ]); 63 | // menu 64 | $section->appendChild(\Index\Tabmenus\View::render($request, 'settings', 'write'.$params['src'])); 65 | $div = $section->add('div', [ 66 | 'class' => 'content_bg' 67 | ]); 68 | // แสดงฟอร์ม 69 | $div->appendChild(\Index\Write\View::create()->render($request, $params)); 70 | // คืนค่า HTML 71 | return $section->render(); 72 | } 73 | // 404 74 | return \Index\Error\Controller::execute($this, $request->getUri()); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /modules/index/models/consentsettings.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Model extends \Kotchasan\KBase 26 | { 27 | /** 28 | * นโยบายคุกกี้ (consentsettings.php) 29 | * 30 | * @param Request $request 31 | */ 32 | public function submit(Request $request) 33 | { 34 | $ret = []; 35 | // session, token, member, can_config, ไม่ใช่สมาชิกตัวอย่าง 36 | if ($request->initSession() && $request->isSafe() && $login = Login::isMember()) { 37 | if (Login::checkPermission($login, 'can_config') && Login::notDemoMode($login)) { 38 | try { 39 | // โหลด config 40 | $config = Config::load(ROOT_PATH.'settings/config.php'); 41 | if (empty($ret)) { 42 | $config->data_controller = $request->post('data_controller')->url(); 43 | $config->cookie_policy = $request->post('cookie_policy')->toBoolean(); 44 | // save config 45 | if (Config::save($config, ROOT_PATH.'settings/config.php')) { 46 | // log 47 | \Index\Log\Model::add(0, 'index', 'Save', '{LNG_Cookie Policy}', $login['id']); 48 | // คืนค่า 49 | $ret['alert'] = Language::get('Saved successfully'); 50 | $ret['location'] = 'reload'; 51 | // เคลียร์ 52 | $request->removeToken(); 53 | } else { 54 | // ไม่สามารถบันทึก config ได้ 55 | $ret['alert'] = Language::replace('File %s cannot be created or is read-only.', 'settings/config.php'); 56 | } 57 | } 58 | } catch (\Kotchasan\InputItemException $e) { 59 | $ret['alert'] = $e->getMessage(); 60 | } 61 | } 62 | } 63 | if (empty($ret)) { 64 | $ret['alert'] = Language::get('Unable to complete the transaction'); 65 | } 66 | // คืนค่าเป็น JSON 67 | echo json_encode($ret); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Kotchasan/Cache/CacheItem.php: -------------------------------------------------------------------------------- 1 | 8 | * @package Kotchasan 9 | */ 10 | 11 | namespace Kotchasan\Cache; 12 | 13 | use Psr\Cache\CacheItemInterface; 14 | 15 | /** 16 | * This class represents a cache item that implements the PSR-16 CacheItemInterface. 17 | * 18 | * @see https://www.kotchasan.com/ 19 | */ 20 | class CacheItem implements CacheItemInterface 21 | { 22 | /** 23 | * @var bool 24 | */ 25 | private $hit; 26 | /** 27 | * Cache Key 28 | * 29 | * @var string 30 | */ 31 | private $key; 32 | /** 33 | * Cache value 34 | * 35 | * @var mixed 36 | */ 37 | private $value; 38 | 39 | /** 40 | * Class constructor 41 | * 42 | * @param string $key Cache Key 43 | */ 44 | public function __construct($key) 45 | { 46 | $this->key = $key; 47 | $this->value = null; 48 | $this->hit = false; 49 | } 50 | 51 | /** 52 | * Set the expiration time of the cache item (in seconds) 53 | * 54 | * @param int|\DateInterval $time 55 | * 56 | * @return static 57 | */ 58 | public function expiresAfter($time) 59 | { 60 | return $this; 61 | } 62 | 63 | /** 64 | * Set the expiration date and time of the cache item 65 | * 66 | * @param \DateTimeInterface $expiration 67 | * 68 | * @return static 69 | */ 70 | public function expiresAt($expiration) 71 | { 72 | return $this; 73 | } 74 | 75 | /** 76 | * Get the value of the cache item 77 | * 78 | * @return mixed 79 | */ 80 | public function get() 81 | { 82 | return $this->value; 83 | } 84 | 85 | /** 86 | * Get the key of the cache item 87 | * 88 | * @return string 89 | */ 90 | public function getKey() 91 | { 92 | return $this->key; 93 | } 94 | 95 | /** 96 | * Check if the cache item has a value 97 | * 98 | * @return bool 99 | */ 100 | public function isHit() 101 | { 102 | return $this->hit; 103 | } 104 | 105 | /** 106 | * Set the value of the cache item 107 | * 108 | * @param mixed $value 109 | * 110 | * @return static 111 | */ 112 | public function set($value) 113 | { 114 | $this->value = $value; 115 | $this->hit = true; 116 | return $this; 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /modules/index/controllers/categories.php: -------------------------------------------------------------------------------- 1 | 22 | * 23 | * @since 1.0 24 | */ 25 | class Controller extends \Gcms\Controller 26 | { 27 | /** 28 | * หมวดหมู่ 29 | * 30 | * @param Request $request 31 | * 32 | * @return string 33 | */ 34 | public function render(Request $request) 35 | { 36 | $params = [ 37 | // ประเภทที่ต้องการ 38 | 'type' => $request->request('type')->topic(), 39 | // ชื่อหมวดหมู่ที่สามารถใช้งานได้ 40 | 'categories' => Language::get('CATEGORIES', []) 41 | ]; 42 | if (!isset($params['categories'][$params['type']])) { 43 | $params['type'] = \Kotchasan\ArrayTool::getFirstKey($params['categories']); 44 | } 45 | // ข้อความ title bar 46 | $title = $params['categories'][$params['type']]; 47 | $this->title = Language::trans('{LNG_List of} '.$title); 48 | // เลือกเมนู 49 | $this->menu = 'settings'; 50 | // สมาชิก 51 | $login = Login::isMember(); 52 | // สามารถตั้งค่าระบบได้ 53 | if (Login::checkPermission($login, 'can_config')) { 54 | // แสดงผล 55 | $section = Html::create('section'); 56 | // breadcrumbs 57 | $breadcrumbs = $section->add('nav', [ 58 | 'class' => 'breadcrumbs' 59 | ]); 60 | $ul = $breadcrumbs->add('ul'); 61 | $ul->appendChild('
  • {LNG_Settings}
  • '); 62 | $ul->appendChild('
  • '.$title.'
  • '); 63 | $section->add('header', [ 64 | 'innerHTML' => '

    '.$this->title.'

    ' 65 | ]); 66 | // menu 67 | $section->appendChild(\Index\Tabmenus\View::render($request, 'settings', $params['type'])); 68 | $div = $section->add('div', [ 69 | 'class' => 'content_bg' 70 | ]); 71 | // แสดงฟอร์ม 72 | $div->appendChild(\Index\Categories\View::create()->render($request, $params)); 73 | // คืนค่า HTML 74 | return $section->render(); 75 | } 76 | // 404 77 | return \Index\Error\Controller::execute($this, $request->getUri()); 78 | } 79 | } 80 | --------------------------------------------------------------------------------