コード例 #1
0
ファイル: delete.php プロジェクト: jpbalderas17/ams
<?php

require_once 'support/config.php';
if (!isLoggedIn()) {
    toLogin();
    die;
}
if (!AllowUser(array(1, 2))) {
    redirect("index.php");
}
if (empty($_GET['id']) || empty($_GET['t'])) {
    redirect('index.php');
    die;
} else {
    $table = "";
    switch ($_GET['t']) {
        case 'a':
            $table = "assets";
            $page = "assets.php";
            $activity_input['admin_id'] = $_SESSION[WEBAPP]['user']['id'];
            $activity_input['item_id'] = $_GET['id'];
            $con->myQuery("INSERT INTO activities(admin_id,action,action_date,category_type_id,item_id) VALUES(:admin_id,'Deleted Asset',NOW(),1,:item_id)", $activity_input);
            break;
        case 'am':
            $table = "asset_models";
            $page = "asset_models.php";
            break;
        case 'c':
            $table = "consumables";
            $page = "consumables.php";
            break;
コード例 #2
0
ファイル: view_asset.php プロジェクト: jpbalderas17/ams
        <h1>
            View Asset <?php 
echo htmlspecialchars($asset['asset_name']);
?>
 (<?php 
echo htmlspecialchars($asset['category']);
?>
)
        </h1>
    </section>
    <section class='content'>
        <div class="row">
                <div class="col-lg-12">
                    <h3 class="page-header"> 
                            <?php 
if (AllowUser(array(1, 2)) && $asset['is_deleted'] == 0) {
    ?>
  
                                <div class="dropdown" style='display:inline'>
                                  <button class="btn btn-flat btn-success dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                                    Actions
                                    <span class="caret"></span>
                                  </button>
                                  <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
                                    <li><a href="frm_assets.php?id=<?php 
    echo $asset['id'];
    ?>
">Edit Asset</a></li>
                                    <li><a href="delete.php?id=<?php 
    echo $asset['id'];
    ?>
コード例 #3
0
<?php

require_once 'support/config.php';
if (!isLoggedIn()) {
    toLogin();
    die;
}
if (!AllowUser(array(1, 2, 3))) {
    redirect("index.php");
}
if (!empty($_GET['date_start'])) {
    $date_start = date_create($_GET['date_start']);
} else {
    $date_start = "";
}
if (!empty($_GET['date_end'])) {
    $date_end = date_create($_GET['date_end']);
} else {
    $date_end = "";
}
makeHead("Asset Depreciation Report");
require_once "template/header.php";
require_once "template/sidebar.php";
?>
<div class='content-wrapper'>
    <div class='content-header'>
        <h1 class='page-header text-center text-green'>Asset Maintenance Report</h1>
    </div>
    <section class='content'>
        <div class="row">
                <div class='col-lg-12'>
コード例 #4
0
ファイル: create_users.php プロジェクト: jpbalderas17/crm
<?php

require_once 'support/config.php';
if (!isLoggedIn()) {
    toLogin();
    die;
}
if (!AllowUser(array(1))) {
    redirect("index.php");
}
if (!empty($_POST)) {
    //Validate form inputs
    $inputs = $_POST;
    $errors = "";
    if (empty($_POST['user_type_id'])) {
        $errors .= "Select user type. <br/>";
    }
    if (empty($_POST['first_name'])) {
        $errors .= "Enter first name. <br/>";
    }
    if (empty($_POST['middle_name'])) {
        $errors .= "Enter middle name. <br/>";
    }
    if (empty($_POST['last_name'])) {
        $errors .= "Enter last name. <br/>";
    }
    if (empty($_POST['username'])) {
        $errors .= "Enter username. <br/>";
    }
    if (empty($_POST['password'])) {
        $errors .= "Enter password. <br/>";