<?php $post = get_post(); $pelanggan = db_fetch_one('SELECT * FROM pelanggan WHERE email = ?', array($post['email'])); $result = array('success' => false, 'message' => 'Email atau password salah !'); if ($pelanggan && md5($post['password']) == $pelanggan['password']) { csrf_protect(); $result['success'] = true; $result['message'] = ''; unset($pelanggan['password']); set_session('pelanggan', $pelanggan); } sleep(1); // test doank print json_encode($result);
$version = "1.056"; //$version = rand(); //for reset cache /* Path to imgs and js */ $static = "static"; /* Path to OCR service */ $ocr_host = "http://homebuh.pro/api/ocr/recognize.php"; if ($debug) { error_reporting(~E_NOTICE); } $settings = array(); require_once $root . 'lib/functions.php'; require_once $root . 'lib/error.php'; require_once $root . 'lib/db/db.php'; require_once $root . 'lib/db/sqlite.php'; /* csrf token protection */ $settings['csrf'] = csrf_protect(); if (empty($settings['csrf'])) { exit; } /* Max uploaded file size */ $max_file_size = get_max_fileupload_size(); if (!extension_loaded('sqlite3')) { echo "SqLite3 module not loaded"; throw new Error("SqLite3 module not loaded"); } $db = new SQLITE_DB($sqlite_path); $db->connect(); if ((bool) $short) { return; } require_once $root . 'lib/lang.php';