<header> <?php require_once TEMPLATES_PATH . "/header.php"; ?> </header> <main> <div class="container-fluid"> <?php if (getPage($_GET['id'])) { ?> <div class="row"> <div class="col m2"> <?php getPanel($sidePanel); ?> </div> <div class="col m10"> <?php getContent($content); ?> <script type="text/javascript" src="js/refreshChat.js"></script> </div> </div> <?php } else { getPage($_GET['id']); } ?> </div>
function getRespS($rs, $useprice) { global $resp, $useprice, $clientcode, $special; for ($i = 0; $i < count($rs); $i++) { $row = (array) $rs[$i]; if ($i == 0) { $strId = "'" . $row['ID'] . "'"; $strCode = "'" . $row['CODE'] . "'"; } else { $strId .= ",'" . $row['ID'] . "'"; $strCode .= ",'" . $row['CODE'] . "'"; } } $result = getPanel($strId, $strCode, $useprice); for ($i = 0; $i < count($result); $i++) { $result[$i]["title"] = flr($result[$i]["title"]); if ($useprice) { $resp = "{ \"bioset\": \"\", \"bio\": \"" . $result[$i]['MAT_TYPES'] . "\", \"biodef\": \"" . $result[$i]['MATTYPE_ID'] . "\", \"icon\": \"" . $result[$i]["IMG_SRC"] . "\", \"color\": \"" . $result[$i]['COLOR'] . "\", \"label\": \"[" . $result[$i]["code"] . "] " . str_replace("\"", "`", $result[$i]["title"]) . "\", \"value\": \"" . $result[$i]["code"] . "\", \"code\":\"" . $result[$i]["code"] . "\", \"id\":\"" . $result[$i]["id"] . "\" },"; } else { if (in_array($clientcode, $special)) { if (arr_search($result[$i]["code"], $special[$clientcode]["show"])) { $resp = "{ \"bioset\": \"\", \"bio\": \"" . $result[$i]['MAT_TYPES'] . "\", \"biodef\": \"" . $result[$i]['MATTYPE_ID'] . "\", \"icon\": \"" . $result[$i]["IMG_SRC"] . "\", \"color\": \"" . $result[$i]['COLOR'] . "\", \"label\": \"[" . $result[$i]["code"] . "] " . str_replace("\"", "`", $result[$i]["title"]) . "\", \"value\": \"" . $result[$i]["code"] . "\", \"code\":\"" . $result[$i]["code"] . "\", \"id\":\"" . $result[$i]["id"] . "\" },"; } else { if (arr_search($result[$i]["code"], $special[$clientcode]["hide"])) { // } else { if (intval($result["panelcatid"]) !== 0) { $resp = "{ \"bioset\": \"\", \"bio\": \"" . $result[$i]['MAT_TYPES'] . "\", \"biodef\": \"" . $result[$i]['MATTYPE_ID'] . "\", \"icon\": \"" . $result[$i]["IMG_SRC"] . "\", \"color\": \"" . $result[$i]['COLOR'] . "\", \"label\": \"[" . $result[$i]["code"] . "] " . str_replace("\"", "`", $result[$i]["title"]) . "\", \"value\": \"" . $result[$i]["code"] . "\", \"code\":\"" . $result[$i]["code"] . "\", \"id\":\"" . $result[$i]["id"] . "\" },"; } } } } else { if (arr_search($result[$i]["code"], $special["all"]["show"])) { $resp = "{ \"bioset\": \"\", \"bio\": \"" . $result[$i]['MAT_TYPES'] . "\", \"biodef\": \"" . $result[$i]['MATTYPE_ID'] . "\", \"icon\": \"" . $result[$i]["IMG_SRC"] . "\", \"color\": \"" . $result[$i]['COLOR'] . "\", \"label\": \"[" . $result[$i]["code"] . "] " . str_replace("\"", "`", $result[$i]["title"]) . "\", \"value\": \"" . $result[$i]["code"] . "\", \"code\":\"" . $result[$i]["code"] . "\", \"id\":\"" . $result[$i]["id"] . "\" },"; } else { if (arr_search($result[$i]["code"], $special["all"]["hide"])) { // } else { if (intval($result[$i]["panelcatid"]) !== 0) { $resp = "{ \"bioset\": \"\", \"bio\": \"" . $result[$i]['MAT_TYPES'] . "\", \"biodef\": \"" . $result[$i]['MATTYPE_ID'] . "\", \"icon\": \"" . $result[$i]["IMG_SRC"] . "\", \"color\": \"" . $result[$i]['COLOR'] . "\", \"label\": \"[" . $result[$i]["code"] . "] " . str_replace("\"", "`", $result[$i]["title"]) . "\", \"value\": \"" . $result[$i]["code"] . "\", \"code\":\"" . $result[$i]["code"] . "\", \"id\":\"" . $result[$i]["id"] . "\" },"; } } } } } } return $resp; }