<?php require_once __DIR__ . "/../config.php"; require_once filepath() . "app/config/sdConfig.php"; require_once filepath() . "app/api.php"; $input = "<Operation>\n <Details>\n <parameter>\n <name>requesttemplate</name>\n <value>API</value>\n </parameter>\n <parameter>\n <name>Priority</name>\n <value>Normal</value>\n </parameter>\n <parameter>\n <name>Requester</name>\n <value>Russian, Regina</value>\n </parameter>\n <parameter>\n <name>Description</name>\n <value>This is a test</value>\n </parameter>\n <parameter>\n <name>Due Date</name>\n <value>24 September 2015, 12:00:00</value>\n </parameter>\n <parameter>\n <name>Subject</name>\n <value>API Test Part 3</value>\n </parameter>\n </Details>\n</Operation>"; $key = getSDkey(); $method = "ADD_REQUEST"; $postvars = array("OPERATION_NAME" => $method, "TECHNICIAN_KEY" => $key, "INPUT_DATA" => $input); $url = getSDBaseURL() . "sdpapi/request/"; var_dump($url); var_dump(postAPI($url, $postvars, null, false));
function IMuTmpImageLoc() { return filepath() . "tmpimgs/"; }
<?php require_once __DIR__ . "/../config.php"; require_once filepath() . "plugins/tcpdf/tcpdf.php"; function generateBarcode($text, $w = 9, $h = 9) { /* $barcodeobj = new TCPDFBarcode($text, 'C128'); return $barcodeobj->getBarcodeHTML(2, 30, 'black'); */ $barLoc = sitepath() . "resources/img/barcode"; $text = strtoupper(strval($text)); if (strlen($text) >= 1) { $html = "<div class=\"barcode\">\n\t\t\n\t\t\t\t\t<img src=\"{$barLoc}/!bookend.gif\" width=\"{$w}\" height=\"{$h}\" alt=\"*\"/>"; for ($i = 0; $i < strlen($text); $i++) { $char = $text[$i]; $html .= "\n\t\t\t\t\t\t<img src=\"{$barLoc}/{$char}.gif\" width=\"{$w}\" height=\"{$h}\" alt=\"{$char}\"/>\n\t\t\t"; } $html .= "\n\t\t\t\t\t<img src=\"{$barLoc}/!bookend.gif\" width=\"{$w}\" height=\"{$h}\" alt=\"*\"/>\n\t\t\t<p class=\"barcode-text\">{$text}</p>\n\t\t\n</div>"; return $html; } return null; }
<?php require_once '../config.php'; require_once filepath() . "app/project.php"; require_once filepath() . "app/auth.php"; if (checkAuth()) { } else { redirect(sitepath()); } if (!isset($_SESSION['project'])) { //Return to home redirect(sitepath() . "home/"); } $info = getProjectInfo(); ?> <!DOCTYPE html> <html> <head> <?php head(); ?> <script type="text/javascript" src="search.js"></script> </head> <body> <?php topbar($info['title'], true); ?> <div class='padded'> <ul id="tabs" class="nav nav-tabs" data-tabs="tabs"> <li class="active"><a href="#single" data-toggle="tab">Single Object</a></li> <li ><a href="#holder" data-toggle="tab">Holder</a></li>
<?php require_once '../config.php'; require_once filepath() . "app/sql.php"; require_once filepath() . "app/barcode.php"; function getProjectID($hash) { $hash = sqlSafe($hash); $query = "SELECT id FROM projects WHERE hash={$hash}"; $result = readQuery($query); if (hasSQLerrors()) { var_dump(getSQLerrors()); } if ($result) { while ($row = $result->fetch_assoc()) { return $row['id']; } } return null; } function getProjectInfo($id) { $query = "SELECT p.id, p.duedate, p.title, p.notes, a.fullname as name, p.moveto, p.sdurl, a.email FROM projects p LEFT JOIN accounts a on (a.id = p.account_id) WHERE p.id = " . sqlSafe($id); $result = readQuery($query); $return = array(); while ($row = $result->fetch_assoc()) { $return = $row; } //var_dump($query . " = "); //var_dump($return); return $return;
<?php require_once "../config.php"; require_once filepath() . "app/sql.php"; require_once "genSD.php"; require_once "genPDF.php"; /* Handles calls from the edit page. get - Gets items from project delete - Delets an itme from the project update - Update project details pdf - Creates a PDF servicedesk - Creates a SD ticket */ header('Content-Type: application/json'); /* Check variable */ if (!isset($_GET['action'])) { $errors = array("source" => "main", "error" => "Action not set, exiting"); throwError($errors); } if (!isset($_SESSION['project'])) { $errors = array("source" => "main", "error" => "Session not set, exiting"); throwError($errors); } $action = $_GET['action']; $project = $_SESSION['project']; switch ($action) { case 'get': getItems(); break;
<?php error_reporting(0); require_once "../config.php"; require_once filepath() . "app/imu.php"; if (isset($_GET["m"])) { $mode = $_GET["m"]; switch ($mode) { case 'single': searchObject(); break; case 'holder': searchHolder(); break; case 'group': searchGroup(); break; case 'event': searchEvent(); break; default: exit; break; } } function searchObject() { $mySession = IMuConnect(); $terms = new IMuTerms(); $columns = array('SummaryData', 'image.resource{height:100,source:thumbnail,source:master}'); if (isset($_GET["accnum"])) {
function clearTempDir() { $path = filepath() . "temp/*"; clearDir($path); }