This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once 'dbconfig.php'; | |
if (!isset($_SESSION['id'])) { | |
echo '<script>'. 'alert("Please login");'. '</script>'; | |
echo '<script>'. 'window.location.href="login.php";'. '</script>'; | |
} | |
$user_id = $_SESSION['id']; | |
$stmt = $conn->prepare("SELECT * FROM users WHERE id=:user_id"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'dbconfig.php'; | |
if (isset($_POST['btn-login'])) { | |
$user = $_POST['username']; | |
$password = $_POST['password']; | |
if($user == '') { | |
$errmsg_arr[] = 'You must enter your Username'; | |
$errflag = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Contact</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
<!-- Optional theme --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'config.php'; | |
if (!isset($_SESSION['id'])) { | |
header("Location: login.php"); | |
} | |
if (isset($_POST['search'])) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = "http://admin.ariffazmi.my"; | |
/** | |
* | |
*/ | |
class NotUrlException extends Exception |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'config.php'; | |
$class_id = $mysqli->real_escape_string($_GET['id']); | |
$send_mail = "SELECT * FROM book WHERE id = '" . $class_id . "'"; | |
$r_mail = $mysqli->query($send_mail); | |
while ($row = $r_mail->fetch_assoc()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'config.php'; | |
if (isset($_POST['update']) && $_FILES['logo_name']) { | |
$menu_id = $mysqli->real_escape_string($_POST['menu_id']); | |
$menu_name = $mysqli->real_escape_string($_POST['menu_name']); | |
$menu_price = $mysqli->real_escape_string($_POST['menu_price']); | |
$menu_description = $mysqli->real_escape_string($_POST['menu_description']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'config.php'; | |
include 'owner.php'; | |
if (!isset($_SESSION['restaurant_id'])) { | |
header("Location: index.php"); | |
} | |
$menu_id = $mysqli->real_escape_string($_GET['id']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'config.php'; | |
if (isset($_SERVER['HTTP_ORIGIN'])) { | |
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}"); | |
header('Access-Control-Allow-Credentials: true'); | |
header('Access-Control-Max-Age: 86400'); // cache for 1 day | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package incometax; | |
import java.util.Scanner; | |
public class IncomeTax | |
{ | |
public static void main(String[] args) | |
{ | |
String name; | |
double salary, result; |