Ejemplo n.º 1
0
<?php

if (!isset($_SERVER['HTTP_REFERER'])) {
    header("location: ../../access_denied.php?data=You don't have direct access to this page");
}
require_once '../../db/spc_executive_class.php';
require_once '../../db/site_log_class.php';
require_once '../../db/user_class.php';
session_start();
if (!isset($_GET['id'])) {
    die("first go to SPC management page.");
}
$ti = $_GET['id'];
$ob = Spc_Executive::deleteSpcExecutive($ti);
$_SESSION['answer'] = $ob;
$l = new site_log(NULL, NULL, $_SESSION['user']->username, $_SERVER['REMOTE_ADDR'], $ti . " spc details deleted");
$l->insertlog();
header('Location: ../../spc_manage_detail.php');
Ejemplo n.º 2
0
<?php

//if(!isset($_SERVER['HTTP_REFERER'])){
//    header("location: ../../access_denied.php?data=You don't have direct access to this page");
//}
require_once 'db/spc_executive_class.php';
$a = Spc_Executive::getAllSpcExecutive();
echo "<table><tr><th>ID</th><th>Name</th><th>Year</th><th colspan='2'>Manage Detail</th></tr>";
if ($a != 0) {
    foreach ($a as $arr) {
        echo "<tr><td>{$arr->spc_executive_id}</td><td>{$arr->spc_executive_prefix} {$arr->spc_executive_name}</td><td>{$arr->spc_executive_year}</td>\r\n        <td><a href='spc_update_detail.php?id={$arr->spc_executive_id}'>update</a></td><td><a id='delete' href='server/spc/spc_delete_detail.php?id={$arr->spc_executive_id}'>delete</a></td></tr>";
    }
}
Ejemplo n.º 3
0
require_once '../../db/user_class.php';
session_start();
if (isset($_POST['id'])) {
    $id = $_POST['id'];
} else {
    die("choose prefix");
}
if (isset($_POST['prefix'])) {
    $prefix = $_POST['prefix'];
} else {
    die("choose prefix");
}
if (isset($_POST['name'])) {
    $name = $_POST['name'];
} else {
    die("Insert Name");
}
if (isset($_POST['phno'])) {
    $phno = $_POST['phno'];
} else {
    die("insert phone number");
}
if (isset($_POST['year'])) {
    $year = $_POST['year'];
} else {
    die("insert year");
}
$spc = new Spc_Executive($id, $prefix, $name, $phno, $year);
echo $spc->updateSpcExecutive();
$l = new site_log(NULL, NULL, $_SESSION['user']->username, $_SERVER['REMOTE_ADDR'], $id . " spc details updated");
$l->insertlog();
Ejemplo n.º 4
0
<?php

//if(!isset($_SERVER['HTTP_REFERER'])){
//    header("location: ../../access_denied.php?data=You don't have direct access to this page");
//}
require_once 'db/spc_executive_class.php';
define('INCLUDE_CHECK', true);
if (isset($_GET['id'])) {
    $ti = $_GET['id'];
} else {
    die("First Go to spc managemant page");
}
$b = Spc_Executive::getAllSpcExecutiveobject($ti);
if ($b === 0) {
    die("invalid spc executive");
}
?>
<form method="post" id="updateform" enctype="multipart/form-data" action="server/spc/spc_update_server.php"> 
      
       <label for="id">Id<span style="color:red;">*</span>:</label>
       <input type="number" readonly="true" value="<?php 
echo $b->spc_executive_id;
?>
" name="id" class="text ui-widget-content ui-corner-all" id="name" required maxlength="40" />

    
    <label for="prefix">Prefix<span style="color:red;">*</span>:</label>
      <select name="prefix" id="prefix" class="text ui-widget-content ui-corner-all" required="true">    

         <option value="Mr." <?php 
if ($b->spc_executive_prefix == "Mr.") {
Ejemplo n.º 5
0
    header("location: ../../access_denied.php?data=You don't have direct access to this page");
}
define('INCLUDE_CHECK', true);
require_once '../../db/spc_executive_class.php';
require_once '../../db/site_log_class.php';
require_once '../../db/user_class.php';
session_start();
if (isset($_POST['prefix'])) {
    $prefix = $_POST['prefix'];
} else {
    die("choose prefix");
}
if (isset($_POST['name'])) {
    $name = $_POST['name'];
} else {
    die("Insert Name");
}
if (isset($_POST['phno'])) {
    $phno = $_POST['phno'];
} else {
    die("insert phone number");
}
if (isset($_POST['year'])) {
    $year = $_POST['year'];
} else {
    die("insert year");
}
$spc = new Spc_Executive(NULL, $prefix, $name, $phno, $year);
echo $spc->InsertSpcExecutive();
$l = new site_log(NULL, NULL, $_SESSION['user']->username, $_SERVER['REMOTE_ADDR'], $name . " spc details added");
$l->insertlog();