示例#1
1
<?php

include "../controllers/memo.php";
$memo = new memo();
session_start();
$username = $_SESSION['username'];
$stat = $_SESSION['stat'];
$admin = $_SESSION['admin'];
$pic = $_SESSION['pic'];
@($msg = $_SESSION['msg']);
if ($admin == 3 || $admin == "") {
    header("Location:http://localhost/gobs/");
    $_SESSION['msg'] = "You Are Not Authorized ";
} elseif ($stat == 0 || $stat == "") {
    header("Location:http://localhost/gobs/");
    $_SESSION['msg'] = "You Are Inactive Admin";
} elseif ($admin == 1 || $admin == 2) {
    echo "&nbsp;";
} else {
    header("Location:http://localhost/gobs/");
    $_SESSION['msg'] = "You Are Not Authorized ";
}
$m_id = $_GET['id'];
include 'layouts/header.php';
include 'layouts/sidebar_layout.php';
$date = date('d-m-Y', strtotime('now' - 2));
$time = date('h:i:s A', strtotime('now' - 2));
?>
<div class="main_body">
<div class="col-sm-12" id="contact-background">
	<div class="form-head col-sm-12">
示例#2
0
<?php

include "../controllers/memo.php";
$item = new memo();
session_start();
$username = $_SESSION['username'];
$stat = $_SESSION['stat'];
$admin = $_SESSION['admin'];
$pic = $_SESSION['pic'];
@($msg = $_SESSION['msg']);
if ($admin == 3 || $admin == "") {
    header("Location:http://localhost/gobs/");
    $_SESSION['msg'] = "You Are Not Authorized ";
} elseif ($stat == 0 || $stat == "") {
    header("Location:http://localhost/gobs/");
    $_SESSION['msg'] = "You Are Inactive Admin";
} elseif ($admin == 1 || $admin == 2) {
    echo "&nbsp;";
} else {
    header("Location:http://localhost/gobs/");
    $_SESSION['msg'] = "You Are Not Authorized ";
}
if (isset($_GET['edit'])) {
    if (isset($_POST['update'])) {
        $edit = $_GET['edit'];
        $id = $_GET['id'];
        extract($_POST);
        $update = $item->update_costs($edit, $title, $details, $amount, $time, $date);
        if ($update) {
            header("Location:costs.php?id={$id}");
            $_SESSION['msg'] = "Update Successful";
示例#3
0
<?php

include "../controllers/memo.php";
$memo = new memo();
session_start();
$username = $_SESSION['username'];
$stat = $_SESSION['stat'];
$admin = $_SESSION['admin'];
$pic = $_SESSION['pic'];
@($msg = $_SESSION['msg']);
if ($admin == 3 || $admin == "") {
    header("Location:http://localhost/gobs/");
    $_SESSION['msg'] = "You Are Not Authorized ";
} elseif ($stat == 0 || $stat == "") {
    header("Location:http://localhost/gobs/");
    $_SESSION['msg'] = "You Are Inactive Admin";
} elseif ($admin == 1 || $admin == 2) {
    echo "&nbsp;";
} else {
    header("Location:http://localhost/gobs/");
    $_SESSION['msg'] = "You Are Not Authorized ";
}
if (isset($_GET['del'])) {
    $id = $_GET['id'];
    $del = $_GET['del'];
    $delete = $memo->delete_customer($del);
    if ($delete) {
        $delete_customer_info_also = $memo->delete_customer_info_also($del);
        header("Location:todaymemo.php?id={$id}");
        $_SESSION['msg'] = "Customer Delete Successful";
    }
示例#4
0
$admin = $_SESSION['admin'];
$pic = $_SESSION['pic'];
@($msg = $_SESSION['msg']);
if ($admin == 3 || $admin == "") {
    header("Location:http://localhost/gobs/");
    $_SESSION['msg'] = "You Are Not Authorized ";
} elseif ($stat == 0 || $stat == "") {
    header("Location:http://localhost/gobs/");
    $_SESSION['msg'] = "You Are Inactive Admin";
} elseif ($admin == 1 || $admin == 2) {
    echo "&nbsp;";
} else {
    header("Location:http://localhost/gobs/");
    $_SESSION['msg'] = "You Are Not Authorized ";
}
$memo = new memo();
if (isset($_GET['del'])) {
    $del = $_GET['del'];
    $mmid = $_GET['mmid'];
    $delete = $memo->delete_memo($del);
    if ($delete) {
        $delete_cost_also = $memo->delete_cost_also($del);
        $delete_customer_also = $memo->delete_customer_also($del);
        if ($delete_customer_also) {
            $delete_sub_memo_also = $memo->delete_sub_memo_also($mmid);
            header("Location:memo.php");
            $_SESSION['msg'] = "Memo Delete Successfull";
        }
    } else {
        $msg = "Memo Delete Fail";
    }