Ejemplo n.º 1
0
<?php

// Check to see if the user is logged in.
$pathtoroot = str_repeat('../', substr_count(pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME), '/') - 1);
require_once $pathtoroot . "includes/check-login.php";
require_once $pathtoroot . "classes/dao.php";
$daoMethodOfCapture = new MethodOfCapture();
?>

<html lang="en">
  <head>
    <title>Bug a Boo</title>
  
<?php 
// Check whether the user is logged in or send them back to the main menu.
$pathtoroot = str_repeat('../', substr_count(pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME), '/') - 1);
//Bootstrap links to Metadata, CSS, JS, etc. and navigation bar
require_once $pathtoroot . "includes/doc-setup.php";
// Link to javascript google library and external javascript files. -->
require_once $pathtoroot . "includes/js-load.php";
//Menu based on whether the individual is logged in or not.
require_once $pathtoroot . "includes/menu.php";
?>

    </head>

    <body>
    
        <br><br><br>
        <div class="admin">
            <div class="row">
Ejemplo n.º 2
0
<?php

/* Set up error handling. */
error_reporting(E_ALL);
ini_set("display_errors", 1);
/* Set up the data access object for the method of capture. */
require_once "../login/config/config.php";
require_once "../classes/dao.php";
$daoMethodOfCapture = new MethodOfCapture();
/*
  The CRUD for the Method of Capture table.
*/
echo $_GET['action'];
if (isset($_GET["addMOC"])) {
    $daoMethodOfCapture->addMethodOfCapture(isset($_GET['addMethodOfCapture']) ? $_GET['addMethodOfCapture'] : NULL);
} else {
    if (isset($_GET["deleteMOC"])) {
        $results = isset($_GET["moc"]) ? $_GET["moc"] : NULL;
        if ($results != NULL) {
            foreach ($results as $row) {
                $daoMethodOfCapture->deleteMethodOfCapture($row);
            }
        }
    } else {
        if (isset($_GET["editMOC"])) {
            $daoMethodOfCapture->editMethodOfCapture(isset($_GET['editMethodOfCaptureId']) ? $_GET['editMethodOfCaptureId'] : NULL);
        } else {
            if (isset($_GET["getMOC"])) {
                $results = isset($_GET["moc"]) ? $_GET["moc"] : NULL;
                if ($results != NULL) {
                    foreach ($results as $row) {