} else { /*echo "<pre>"; print_r($_REQUEST); echo "</pre>"; exit; */ set_time_limit(0); $report_id = POST('report_id'); $section = POST('section'); ossim_valid($report_id, OSS_SCORE, OSS_NULLABLE, OSS_ALPHA, OSS_PUNC, 'illegal:' . _('Report name')); ossim_valid($section, 'forensics, assets', 'illegal:' . _('Report section')); if (ossim_error()) { echo 'error###' . ossim_get_error_clean(); exit; } $chk_parameters = check_parameters($report_id, $_REQUEST, $section); if ($chk_parameters['error'] == TRUE) { echo "error###<div style='padding-left: 15px; text-align:left;'>" . _('We found the followings errors') . ':</div>'; echo "<div style='padding-left: 15px; text-align:left;'>"; echo "<div style='padding-left: 30px;'>" . implode('</div><div style="padding-left: 30px;">', $chk_parameters['error_msg']) . "</div>"; echo "</div>"; exit; } Session::logcheck('report-menu', 'ReportsReportServer'); $TBackground = "#7B7B7B"; $TForeground = "#FFFFFF"; $SBackground = "#8CC221"; $SForeground = "#FFFFFF"; // Load css $styleCss = array('Title' => array('Background' => $TBackground, 'Foreground' => $TForeground), 'Subtitle' => array('Background' => $SBackground, 'Foreground' => $SForeground)); // Make header - footer with replacements
<?php include "common.php"; $username = $_POST["username"]; $first_name = $_POST["first_name"]; $last_name = $_POST["last_name"]; $password = $_POST["password"]; if (check_parameters($username, $first_name, $last_name, $password)) { echo register_user($username, $password, $first_name, $last_name); } else { echo "Missing parameters. Contact your sysadmin."; }
if ($_GET['ID'] && 'delete' == $_GET['action']) { $query_str = "SELECT * FROM `ProfilesDesc` ORDER BY `order` ASC"; $res = db_res($query_str); // Process deleting delete_field($_GET['ID'], $res); echo "<p><span style=\"color:#ff6666;font-weight:bold\">Field deleted.</span></p>\n"; } // Display add or edit form if ('add' == $_GET['action'] || 'edit' == $_GET['action']) { // Display if user just got into the page, or refreshed field type, // otherwise if the user pressed 'Add' button, add new field. if (!$_POST['add_button']) { display_controls(); } else { // Check input parameters. $errors = check_parameters($_POST['field_type']); if (count($errors) > 0) { // Display error messages and controls for entering. foreach ($errors as $value) { echo "<span style=\"color:#ff6666;font-weight:bold\">Error: {$value}</span><br />"; } display_controls(); } else { // Perform database actions edit_or_add_field(); } } } else { echo "<p class=text><a href=\"profile_fields.php?action=add\">Add new field</a></p>\n"; // Get a list of all fields. $query_str = "SELECT * FROM `ProfilesDesc` ORDER BY `order` ASC";
$meeting_times = "[\"TBA\"]"; $rooms = "[0]"; break; case SECTION_TYPE_ONLINE: $meeting_times = "[\"ONLINE\"]"; $rooms = "[0]"; break; case SECTION_TYPE_ODD: case SECTION_TYPE_EVEN: break; default: $meeting_type = SECTION_TYPE_NORMAL; break; } // Check to make sure the required information is present if (!check_parameters($identifier, $rooms, $semester, $class, $professor, $meeting_times)) { die("{\"response\": \"You must specify the section id, rooms, semester, class, professor and meeting times.\"}"); } // and for max_capacity if (is_null($max_capacity)) { $max_capacity = "NULL"; } if (is_null($tl_credits)) { $tl_credits = "NULL"; } if (is_null($credit_hours)) { $credit_hours = "NULL"; } // Check to see if the section already exists in the database if (!$database_id) { $result = $conn->query("SELECT *\n FROM `Section`\n WHERE `UserID` = {$userId}\n AND `Identifier`='{$identifier}'\n AND `Class`='{$class}'\n AND `Semester`='{$semester}'");
<?php $xmlRootPath = dirname(__FILE__) . '/'; require $xmlRootPath . '../bvs-lib/common/scripts/php/xslt.php'; require $xmlRootPath . '../admin/auth_check.php'; require $xmlRootPath . '../php/include.php'; require $xmlRootPath . "./xmlRoot_functions.php"; $checked = array(); $xml = $xml != "" ? $xml : $_REQUEST['xml']; $xsl = $xsl != "" ? $xsl : $_REQUEST['xsl']; $lang = $lang != "" ? $lang : $_REQUEST['lang']; $page = $page != "" ? $page : $_REQUEST['page']; $xslSave = $_REQUEST['xslSave']; $xmlSave = $_REQUEST['xmlSave']; check_parameters(); if (eregi("(adm.xml)|(users.xml)", $checked['xml']) || eregi("adm", $checked['xsl']) || isset($xmlSave)) { auth_check_login(); } $xmlContent = BVSDocXml("root", $checked['xml']); if (isset($_REQUEST['debug'])) { debug($_REQUEST['debug']); } if (isset($xslSave)) { $xslSave = "../" . $checked['xslSave']; $sucessWriteXml = xmlWrite($xmlContent, $xslSave, $checked['xmlSave']); if ($sucessWriteXml != '' && $checked['page'] != 'users') { // generate html htmlWrite($sucessWriteXml); // generate ini iniWrite($sucessWriteXml); if ($checked['page'] == 'collection' || $checked['page'] == 'topic') {
<?php // Import the "Grab Bag" require "common.php"; // Open an (OO) MySQL Connection $conn = new mysqli($GLOBALS["dbhost"], $GLOBALS["dbuser"], $GLOBALS["dbpass"], $GLOBALS["dbname"]); // Check connection if ($conn->connect_error || !session_start()) { die("{\"response\": \"Connection failed: " . $conn->connect_error . "\"}"); } // Get the values from the POST parameters $username = $_POST["username"]; $firstname = $_POST["firstname"]; $lastname = $_POST["lastname"]; $password = $_POST["password"]; if (!check_parameters($username, $firstname, $lastname)) { die("{\"response\": \"You must specify the username, firstname and lastname!\"}"); } // If we are updating the password, change it accordingly if ($password && ($result = change_user_password($conn, $username, $password)) != "Successful") { die("{\"response\": \"{$result}\"}"); } // Finally, update the other user information and die... $result = update_user_info($conn, $username, $firstname, $lastname); die("{\"response\": \"{$result}\"}");