echo "<HR NOSHADE COLOR=#000000 SIZE=1>\n<BR>\n"; show_detail($link, $id, $_GET['site']); show_tail(); @mysql_close($link); exit; } else { show_head(); list($month, $year) = get_month_year(); // echo "1. Введено: $PHP_AUTH_USER : $PHP_AUTH_PW <br>"; // echo "2. Введено: $ulogin : $passwd "; echo "<H1>{$web_client_your_stat} {$month} {$year}</H1>\n"; $result = mysql_query("SELECT id FROM users where login='******'", $link); $id = mysql_result($result, 0, "id"); show_info($link, $id); echo "<HR NOSHADE COLOR=#000000 SIZE=1>\n<BR>\n"; show_stat($link, $id); echo "<HR NOSHADE COLOR=#000000 SIZE=1>\n"; if (!isset($no_mail)) { show_mailstat($link, $PHP_AUTH_USER); } echo "<HR NOSHADE COLOR=#000000 SIZE=1>\n"; // show_form(); show_tail(); @mysql_close($link); } } else { Header("WWW-Authenticate: Basic realm=\"{$web_client_auth_realm}\""); Header("HTTP/1.0 401 Unauthorized"); show_head(); echo "1. Введено: {$PHP_AUTH_USER} : {$PHP_AUTH_PW} <br>"; echo "{$msg} {$msg2}";
function show_packages($systemid, $page = "ms_computer") { global $l, $pages_refs, $ii, $td3, $td2, $td4; $query = "SELECT a.name, d.tvalue,d.ivalue,d.comments,e.fileid, e.pack_loc,h.name as name_server,h.id,a.comment\n\t\t\tFROM devices d left join download_enable e on e.id=d.ivalue\n\t\t\t\t\t\tLEFT JOIN download_available a ON e.fileid=a.fileid\n\t\t\t\t\t\tLEFT JOIN hardware h on h.id=e.server_id\n\t\t\tWHERE d.name='DOWNLOAD' and a.name != '' and pack_loc != '' AND d.hardware_id=%s\n\t\t\tunion\n\t\t\tSELECT '%s', d.tvalue,d.ivalue,d.comments,e.fileid, '%s',h.name,h.id,a.comment \n\t\t\tFROM devices d left join download_enable e on e.id=d.ivalue\n\t\t\t\t\t\tLEFT JOIN download_available a ON e.fileid=a.fileid\n\t\t\t\t\t\tLEFT JOIN hardware h on h.id=e.server_id\n\t\t\tWHERE d.name='DOWNLOAD' and a.name is null and pack_loc is null AND d.hardware_id=%s"; $arg_query = array($systemid, $l->g(1129), $l->g(1129), $systemid); $resDeploy = mysql2_query_secure($query, $_SESSION['OCS']["readServer"], $arg_query); if (mysqli_num_rows($resDeploy) > 0) { while ($valDeploy = mysqli_fetch_array($resDeploy)) { $ii++; $td3 = $ii % 2 == 0 ? $td2 : $td4; if (strpos($valDeploy["comment"], "[VISIBLE=1]") or strpos($valDeploy["comment"], "[VISIBLE=]") or !$_SESSION['OCS']['profile']->getRestriction('TELEDIFF_VISIBLE') and strpos($valDeploy["comment"], "[VISIBLE=0]") or !strpos($valDeploy["comment"], "[VISIBLE") or $_SESSION['OCS']['profile']->getRestriction('TELEDIFF_VISIBLE', 'NO') == "NO" and preg_match("[VISIBLE=0]", $valDeploy["comment"])) { //echo $valDeploy["comment"]; // echo $_SESSION['OCS']['profile']->getRestriction('TELEDIFF_VISIBLE'); echo "<tr>"; echo "<td bgcolor='white' align='center' valign='center'><img width='15px' src='image/red.png'></td>"; echo $td3 . $l->g(498) . " <b>" . $valDeploy["name"] . "</b>"; if (isset($valDeploy["fileid"])) { echo "(<small>" . $valDeploy["fileid"] . "</small>)"; } if ($valDeploy["name_server"] != "") { echo " (" . $l->g(499) . " redistrib: <a href='index.php?" . PAG_INDEX . "=" . $pages_refs[$page] . "&head=1&systemid=" . $valDeploy["id"] . "' target='_blank'><b>" . $valDeploy["name_server"] . "</b></a>"; } else { echo " (" . $l->g(499) . ": " . $valDeploy["pack_loc"] . " "; } echo ")</td>"; if ($page == "ms_computer") { echo $td3 . $l->g(81) . ": " . ($valDeploy["tvalue"] != "" ? $valDeploy["tvalue"] : $l->g(482)); echo $valDeploy["comments"] != "" ? " (" . $valDeploy["comments"] . ")" : ""; echo "</td>"; if ($_SESSION['OCS']['profile']->getConfigValue('TELEDIFF') == "YES") { echo "{$td3} <a href='index.php?" . PAG_INDEX . "=" . $pages_refs[$page] . "&head=1&suppack=" . $valDeploy["ivalue"] . "&systemid=" . urlencode($systemid) . "&option=cd_configuration'>" . $l->g(122) . "</a></td>"; } elseif (strstr($valDeploy["tvalue"], 'ERR_') or strstr($valDeploy["tvalue"], 'EXIT_CODE')) { echo $td3 . "<a href='index.php?" . PAG_INDEX . "=" . $pages_refs[$page] . "&head=1&affect_reset=" . $valDeploy["ivalue"] . "&systemid=" . urlencode($systemid) . "&option=cd_configuration'>" . $l->g(113) . "</a>"; if ($valDeploy["name"] != $l->g(1129)) { echo $td3 . "<a href='index.php?" . PAG_INDEX . "=" . $pages_refs[$page] . "&head=1&affect_again=" . $valDeploy["ivalue"] . "&systemid=" . urlencode($systemid) . "&option=cd_configuration'>" . $l->g(1246) . "</a></td>"; } } elseif (strstr($valDeploy["tvalue"], 'NOTIFIED')) { if (isset($valDeploy["comments"]) and strtotime($valDeploy["comments"]) < strtotime("-12 week")) { echo $td3 . "<a href='index.php?" . PAG_INDEX . "=" . $pages_refs[$page] . "&head=1&reset_notified=" . $valDeploy["ivalue"] . "&systemid=" . urlencode($systemid) . "&option=cd_configuration'><img src=image/delete-small.png></a>"; } } } else { if ($_SESSION['OCS']['profile']->getConfigValue('TELEDIFF') == "YES") { echo "{$td3} <a href='index.php?" . PAG_INDEX . "=" . $pages_refs[$page] . "&popup=1&suppack=" . $valDeploy["ivalue"] . "&systemid=" . urlencode($systemid) . "&option=" . urlencode($l->g(500)) . "'>" . $l->g(122) . "</a></td>"; } show_stat($valDeploy["fileid"]); echo "</tr>"; //print_r($valDeploy); } echo "</tr>"; } } } }