function performMapping($map, $outputXml) { $outputMap = []; foreach ($map as $label => $xpath) { //$xpath = '//datafield[@tag="020"]/subfield[@code="a"]'; if (is_string($xpath)) { $values = $outputXml->xpath($xpath); if ($values) { $values = array_map("getValues", $values); $values = array_unique($values); //beim array_unique sind die keys nicht mehr unbedingt aufeinanderfolgend, //daher kopieren wir die Werte in ein neues Array: $values = array_values($values); $outputMap[$label] = $values; } else { $outputMap[$label] = ''; } } else { //$label, $xpath['mainPart'], $xpath['value'], $xpath['key'] $mainPart = $outputXml->xpath($xpath['mainPart']); $outputArray = []; foreach ($mainPart as $singleMainPart) { $value = $singleMainPart->xpath($xpath['value']); $key = $singleMainPart->xpath($xpath['key']); $additional = $singleMainPart->xpath($xpath['additional']); if ($value) { $valueText = getValues($value[0]); if ($additional) { $additionalText = getValues($additional[0]); if (strpos($additionalText, ':') == 1) { $additionalText = substr($additionalText, 2); } $valueText = $valueText . ' <' . $additionalText . '>'; } if ($key) { $outputArray[$valueText] = getValues($key[0]); } else { $outputArray[$valueText] = true; } } } $outputMap[$label] = $outputArray; } } return cleanUp($outputMap); }
function checkIfUserExists($emailCheck, $sql) { $table = 'UserInfo'; $queryType = 'Select'; $condition = array('Email', $emailCheck, 'text'); $types = array('text'); $columns = array('Email'); $values = array(null); $args = array('column' => $columns, 'value' => $values, 'type' => $types); $xml = createXML($table, $args); $res = $sql->query($xml, $queryType, $condition); $checkValues = getValues($res); if (count($checkValues) > 0) { return true; } else { return false; } }
/** * @param $contactIDs */ function run(&$contactIDs) { $chunks =& splitContactIDs($contactIDs); foreach ($chunks as $chunk) { $values = array(); getValues($chunk, $values); $xml =& generateSolrJSON($values); echo $xml; } }
/** * @param $values * @param $contactIDs * @param $allContactIDs */ function run(&$values, &$contactIDs, &$allContactIDs) { $chunks =& splitContactIDs($contactIDs); $additionalContactIDs = array(); foreach ($chunks as $chunk) { getValues($chunk, $values, $allContactIDs, $additionalContactIDs); } if (!empty($additionalContactIDs)) { $allContactIDs = $allContactIDs + $additionalContactIDs; run($values, $additionalContactIDs, $allContactIDs); } }
?> ); var chart3 = new google.visualization.LineChart(document.getElementById('chart3_div')); <?php break; } } ?> <?php //PM 10 checked? if (isset($_POST['PM10'])) { if ($_POST['PM10'] == "PM10_CONCENTRATION") { ?> var data3 = new google.visualization.DataTable(<?php getValues("PM10_CONCENTRATION"); ?> ); var chart3 = new google.visualization.LineChart(document.getElementById('chart3_div')); <?php } } ?> <?php lanuvChartOptions(); ?> } }
function sqlAddOperation($partOperations, $partID) { global $opBeginDelimiter; global $opEndDelimiter; global $dataDelimiter; global $allBeginDelimiters; global $toolBeginDelimiter; global $progBeginDelimiter; global $machineBeginDelimiter; global $holderBeginDelimiter; global $toolHolderBeginDelimiter; if ($partOperations == NULL || $partOperations == "") { return; } $operationValues = getValues($partOperations, $opBeginDelimiter, $opEndDelimiter); $opOnlyDataCount = 0; $holderOnlyDataCount = 0; $mainProgramId = 0; $numOperationValues = count($operationValues); $numToolHolderOnlyData = 0; for ($idx = 0; $idx < $numOperationValues; $idx++) { $operationTokens = $operationValues[$idx]; $numOpTokens = count($operationTokens); for ($curOpToken = 0; $curOpToken < $numOpTokens; $curOpToken++) { $beginDelimiter = getBeginDelimiter($operationTokens[$curOpToken]); if ($beginDelimiter != "") { if ($beginDelimiter == $progBeginDelimiter) { $progId = sqlAddProgramForOperation($operationTokens[$curOpToken], $mainProgramId); if ($mainProgramId == 0) { $mainProgramId = $progId; } } else if ($beginDelimiter == $toolHolderBeginDelimiter) { $toolHolderOnlyData[$numToolHolderOnlyData++] = sqlAddAndGetToolHolderData($operationTokens[$curOpToken]); } else if ($beginDelimiter == $machineBeginDelimiter) { sqlAddMachine($operationTokens[$curOpToken]); } } else { $operationOnlyData[$opOnlyDataCount++] = $operationTokens[$curOpToken]; } } $operationName = $operationOnlyData[0]; $operationMachineID = $operationOnlyData[1]; $operationDescription = $operationOnlyData[2]; $operationCuttingTime = $operationOnlyData[3]; $operationClampingTime = $operationOnlyData[4]; $query = "INSERT INTO OPERATIONS (PartID, Name, Machine, Description, CuttingTime, ClampingTime) VALUES ('$partID', '$operationName', '$operationMachineID', '$operationDescription', '$operationCuttingTime', '$operationClampingTime');"; $result = sqlQuery($query); $opId = mysql_insert_id(); if (IsSet($toolHolderOnlyData)) { $numToolHolderOnlyData = count($toolHolderOnlyData); for ($idx = 0; $idx < $numToolHolderOnlyData; $idx++) { $toolHolderData = $toolHolderOnlyData[$idx]; $toolPartNumber = $toolHolderData[0]; $toolId = sqlGetToolIdFromDB($toolPartNumber); $holderName = $toolHolderData[1]; $holderId = sqlGetHolderIdFromDB($holderName); $toolRemarks = $toolHolderData[2]; $toolOverHang = $toolHolderData[3]; $toolLife = $toolHolderData[4]; $query = "INSERT INTO OPERATION_TOOL_HOLDER_MAPPING (OperationID, ToolID, HolderID, ToolLife, ToolOverHang, ToolRemark) VALUES ('$opId', '$toolId', '$holderId', '$toolLife', '$toolOverHang', '$toolRemark');"; $result = sqlQuery($query); } } } }
<?php include 'vehicle.php'; $vehicle = new vehicle(); $vehicle . getValues($_POST['data']['id']); echo json_encode($vehicle);
} } // authors $authors = getValues($dbs, 'SELECT a.author_name FROM biblio_author AS ba LEFT JOIN mst_author AS a ON ba.author_id=a.author_id WHERE ba.biblio_id=' . $biblio_d[0]); $buffer .= $encloser . $authors . $encloser; $buffer .= $sep; // topics $topics = getValues($dbs, 'SELECT t.topic FROM biblio_topic AS bt LEFT JOIN mst_topic AS t ON bt.topic_id=t.topic_id WHERE bt.biblio_id=' . $biblio_d[0]); $buffer .= $encloser . $topics . $encloser; $buffer .= $sep; // item code $items = getValues($dbs, 'SELECT item_code FROM item AS i WHERE i.biblio_id=' . $biblio_d[0]); $buffer .= $encloser . $items . $encloser; echo $buffer; echo $rec_sep; } exit; } else { utility::jsAlert(__('There is no record in bibliographic database yet, Export FAILED!')); } } } exit; } ?> <fieldset class="menuBox"> <div class="menuBoxInner exportIcon">
/** * @deprecated use getValues */ function getParams() { return getValues(); }
?> '> <div class="chart" data-type="age"></div> </div> <div class="sex"> <h4>Sexes of Participants</h4> <input type="hidden" id="sex-values" value='<?php echo getValues($db, "sex"); ?> '> <div class="chart" data-type="sex"></div> </div> <div class="usage"> <h4>Usage by Participants</h4> <input type="hidden" id="amount-values" value='<?php echo getValues($db, "amount"); ?> '> <div class="chart" data-type="amount"></div> </div> </div> <?php } ?> </main> <footer> </footer>
function debugValue() { print_r(getValues()); }
$result[(string) $lang[0]]['value'] = (string) $prefix . (string) $entry; } else { $result[(string) $lang[0]]['value'] = (string) $entry; } foreach ($entry->attributes() as $k => $v) { $result[(string) $lang[0]][(string) $k] = (string) $v; } } return $result; } // vraci JSON multilingualni seznam if (isset($_REQUEST['request']) && $_REQUEST['request'] == 'getValues') { $type = htmlspecialchars($_REQUEST['type']); $code = htmlspecialchars($_REQUEST['id']); header("Content-type: application/json; charset=utf-8"); echo json_encode(getValues($type, $code)); exit; } ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="<?php echo substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/')) . '/themes/' . MICKA_THEME; ?> /micka.css" /> <title>MICKA - <?php echo $title; ?> </title>
function getNumberOfLogins($f_params) { //Consumer, number of logins, for all users, current user or all but current user $intervalsql = sqlGetInterval("esl.time_created", $f_params); $privacysql = sqlGetPrivacyLevel($f_params); $sql = " SELECT count(*) AS value" . $intervalsql . $privacysql . " FROM elgg_system_log AS esl"; $sql = sqlAddPrivacyLevelInnerJoin($sql, $f_params); $sql .= " WHERE esl.event='login'"; $sql = sqlExcludeUserGuids($sql, "esl.performed_by_guid", $f_params); $sql = sqlAddUserCollectionConstraint1($sql, "esl.performed_by_guid", $f_params); $sql = sqlAddMemberOfGroupConstraint($sql, "esl.performed_by_guid", $f_params); $sql = sqlAddEpochConstraints($sql, "esl.time_created", $f_params); $sql = sqlAddPrivacyLevelAnd($sql, "esl.performed_by_guid", $f_params); $sql = sqlAddGroupBy($sql, "eue.guid", "intervalnumber", $f_params); $sql = sqlAddOrderBy($sql, "eue.guid", "intervalnumber", $f_params); return getValues($sql, $f_params); }
require_once __DIR__ . '/classes/checkAPI.php'; require_once __DIR__ . '/classes/Sync.php'; require_once __DIR__ . '/classes/PushMessage.php'; $page_level = 2; $admin_level = 0; if (isset($_REQUEST['api']) && checkAPI($_REQUEST['api'], $page_level)) { switch ($_SERVER['REQUEST_METHOD']) { case 'POST': if ($_FILES) { upload($_REQUEST, $_FILES); } else { echo discover(); } break; case 'GET': echo json_encode(getValues()); http_response_code(202); break; case 'PUT': if (isset($_REQUEST['id'])) { if (isset($_REQUEST['title'])) { update($_REQUEST); } } else { echo getLiveValues(); } break; case 'DELETE': if (checkAPI($_REQUEST['api'], $admin_level)) { delete($_REQUEST); }
} } catch (mysqli_sql_exception $e) { echo $e->__toString(); } } // MAIN START FUNCTION // Check if it is from the submit or initial load if ($_SERVER["REQUEST_METHOD"] == "POST") { //Check userID and password. $userID = $_POST['userID']; $referenceID = $_POST['referenceID']; if (empty($userID) || empty($referenceID)) { echo "User ID or Reference ID is missing"; } else { // Get Variable Values getValues(); if (empty($userID) || empty($referenceID) || empty($relationship) || empty($companyName) || empty($rating)) { echo "Required Field is missing (User ID,Reference ID, Company Name, Relationship)"; } else { //Check if Update or Create if ($mode == 'Update') { // Update Information $success = updateInformation('Update', $conn); if ($success == 1) { // Successful Update return to the user information page $conn->close(); header('Location: main.php'); exit; } } else { // Create
$this->draw->pathMoveToAbsolute($positions[0][0], $positions[0][1]); //Scale that by the 'value' of each point aka the distance from the chart's centre. //Also scale it by how rounded you want the chart. for ($i = 0; $i < $numberOfPoints; $i++) { list($nextPositionX, $nextPositionY) = $positions[($i + 1) % $numberOfPoints]; list($controlPoint1X, $controlPoint1Y) = $this->getControlPoint($points[$i], $positions[$i], $tangents[$i], 1, $roundness, count($points)); list($controlPoint2X, $controlPoint2Y) = $this->getControlPoint($points[($i + 1) % $numberOfPoints], $positions[($i + 1) % $numberOfPoints], $tangents[($i + 1) % $numberOfPoints], -1, $roundness, count($points)); $this->draw->pathCurveToAbsolute($controlPoint1X, $controlPoint1Y, $controlPoint2X, $controlPoint2Y, $nextPositionX, $nextPositionY); } $this->draw->pathClose(); $this->draw->pathFinish(); foreach ($this->points as $point) { $this->draw->circle($point[0], $point[1], $point[2], $point[3]); } } } function getValues() { $coordinates_1 = [200, 200, 100, 200, 220, 200]; return $coordinates_1; } $spiderChart = new SpiderChart(); $spiderChart->drawChartBackground(); $points = getValues(); //$spiderChart->drawBlendedChart($points, 0.2); $spiderChart->drawBezierChart($points, 0.4); $image->drawImage($spiderChart->getDraw()); if (!debug) { header('Content-Type: image/png'); echo $image; }
<?php error_reporting(E_ALL); ini_set('display_errors', 1); if ($_POST['action']) { if ($_POST['action'] == 'load') { load($_POST['table']); } else { if ($_POST['action'] == 'add') { add($_POST['table']); } else { if ($_POST['action'] == 'remove') { remove($_POST['table'], $_POST['id']); } else { if ($_POST['action'] == 'getValues') { getValues($_POST['table'], $_POST['field']); } else { if ($_POST['action'] == 'getRecord') { getRecord($_POST['table'], $_POST['id']); } } } } } } else { // Error ET0001: No action key specified in POST array echo 'ET0001'; } function getRecord($table, $id) { require 'storedInfo.php';
You should have received a copy of the GNU General Public License along with reports. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ $USEDBREPLICATE = 1; $DBCONNECTION_REQUIRED = 0; // Not really a big SQL request include "../../../../inc/includes.php"; includeLocales("equipmentbygroups"); //TRANS: The name of the report = List all devices of a group, ordered by users Html::header(__('equipmentbygroups_report_title', 'reports'), $_SERVER['PHP_SELF'], "utils", "report"); Report::title(); if (isset($_GET["reset_search"])) { resetSearch(); } $_GET = getValues($_GET, $_POST); displaySearchForm(); $sql = "SELECT `id` AS group_id,\n `name` AS group_name\n FROM `glpi_groups`\n WHERE `entities_id` = " . $_SESSION["glpiactive_entity"] . (isset($_GET["groups_id"]) && $_GET["groups_id"] ? " AND `glpi_groups`.`id` = " . $_GET["groups_id"] : "") . "\n ORDER BY `name`"; $result = $DB->query($sql); $last_group_id = -1; while ($datas = $DB->fetch_array($result)) { if ($last_group_id != $datas["group_id"]) { echo "<table class='tab_cadre' cellpadding='5'>"; echo "<tr><th>" . sprintf(__('%1$s: %2$s'), __('Group'), $datas['group_name']) . "</th></th></tr>"; $last_group_id = $datas["group_id"]; echo "</table>"; } getObjectsByGroupAndEntity($datas["group_id"], $_SESSION["glpiactive_entity"]); } Html::footer(); /**
for ($i = 0; $i < $final_limit; $i++) { $values[] = rand(0, $max_height); } return $values; } function getData($moving_limit, $final_limit, $averages, $values, $max_height) { $data = array(); for ($index = $moving_limit; $index < $final_limit; $index++) { $data[$index] = getItem($index, $averages, $values, $max_height); } return $data; } $moving_limit = 5; $sample_size = 100; $max_height = 100; $final_limit = $sample_size + $moving_limit; //$_SESSION["data"] = null; if (!isset($_SESSION["data"])) { $values = getValues($max_height, $final_limit); $averages = getMovingAverage($values, $moving_limit); $data = getData($moving_limit, $final_limit, $averages, $values, $max_height); $_SESSION["data"] = $data; $_SESSION["index"] = $moving_limit; } echo json_encode(array("data" => array($_SESSION["data"][$_SESSION["index"]]))); $_SESSION["index"]++; if ($_SESSION["index"] > $final_limit) { $_SESSION["data"] = null; $_SESSION["index"] = $moving_limit; }