<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"; global $USER; if (!$USER->isAuthorized() && !in_array(1, $USER->GetUserGroupArray())) { LocalRedirect("/bitrix/"); exit; } else { $arSteps = array("archive", "iblock", "sections", "products", "actionproducts", "price"); if ($_REQUEST["STEP"] && in_array($_REQUEST["STEP"], $arSteps)) { include_once $_SERVER["DOCUMENT_ROOT"] . "/include/1c_catalog/addProcess.php"; $params = ""; if ($_GET) { $params = json_encode($_GET); } $ID_RESULT = addResult($_REQUEST["STEP"], $params); echo $ID_RESULT; } }
$edate = time(); $name = $_POST['name']; $email = $_POST['email']; $companyName = $_POST['company_name']; $location = $_POST['location']; $quizName = $xml->Configuration->Activity; $status = $_POST['status']; $rawScr = $_POST['rawScr']; $gameTime = $_POST['gameTime']; $passScr = $_POST['passScr']; $maxScr = $_POST['maxScr']; $minScr = $_POST['minScr']; $time = $_POST['null']; $jic = $_POST['jic']; $hashtag = hash('md5', "hashtag"); $result = addResult($edate, $name, $email, $companyName, $location, $quizName, $userAns, $correctAns, $status, $rawScr, $gameTime, $passScr, $maxScr, $minScr, $time, $jic, $hashtag); echo $result; } elseif (isset($_POST['deletePicture'])) { deletePicture($_POST['deletePicture']); } } function logRatings($name, $email, $stars) { include_once "database_class.php"; $db = Database::getInstance(); $log_ratings = $db->logRatings($name, $email, $stars); return $log_ratings; } function getRatings($email) { include_once "database_class.php";
function calculateAllValue() { global $output; $count = 0; $ip = 0; foreach ($output->results as $result) { $count++; $ip += $result['value']; } $ip = $ip / $count; addResult('All', $ip); }