public function bodyToString() { global $USER_DETAILS; $this->cleanItems(); $status = get_status(); if ($status['zabbix_server'] == S_YES) { $server = new CSpan(S_RUNNING, 'off'); } else { $server = new CSpan(S_NOT_RUNNING, 'on'); } $header = new CCol('Zabbix ' . S_SERVER_INFO, 'header'); $this->addRow($header); $this->addRow('Updated: ' . date('r', time())); $this->addRow(new CCol(array('Refreshed every: ' . $USER_DETAILS['refresh'] . ' sec ', '(', new CLink('refresh now', 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']), ')'))); $this->addRow(S_NUMBER_OF_USERS_SHORT . ': ' . $status['users_count'] . '(' . $status['users_online'] . ')'); $this->addRow(new CCol(array('Logged in as ', new CLink($USER_DETAILS['alias'], 'profile.php')))); $this->addRow(new CCol(array(new CLink('Zabbix server', 'report1.php'), ' is ', $server)), 'status'); //$this->addRow(S_VALUES_STORED.': '.$status['history_count']); //$this->addRow(S_TRENDS_STORED.': '.$status['trends_count']); $this->addRow(new CCol(array(S_NUMBER_OF_HOSTS_SHORT . ': ' . $status['hosts_count'] . '(', new CSpan($status['hosts_count_monitored'], 'off'), '/', new CSpan($status['hosts_count_not_monitored'], 'on'), '/', new CSpan($status['hosts_count_template'], 'unknown'), ')'))); $this->addRow(new CCol(array(S_NUMBER_OF_ITEMS_SHORT . ': ' . $status['items_count'] . '(', new CSpan($status['items_count_monitored'], 'off'), '/', new CSpan($status['items_count_disabled'], 'on'), '/', new CSpan($status['items_count_not_supported'], 'unknown'), ')'))); $this->addRow(new CCol(array(S_NUMBER_OF_TRIGGERS_SHORT . ': ' . $status['triggers_count'] . '(' . $status['triggers_count_enabled'] . '/' . $status['triggers_count_disabled'] . ')' . '[', new CSpan($status['triggers_count_on'], 'on'), '/', new CSpan($status['triggers_count_unknown'], 'unknown'), '/', new CSpan($status['triggers_count_off'], 'off'), ']'))); // $this->addRow(S_NUMBER_OF_EVENTS.': '.$status['events_count']); // $this->addRow(S_NUMBER_OF_ALERTS.': '.$status['alerts_count']); return parent::bodyToString(); }
function add_card_owner_status($card, $player, $status) { if (get_status($card, $player) != $status) { $values["player"] = $player; $values["card"] = $card; $values["game"] = game; $values["turn"] = turn; $values["status"] = $status; create_entry("owned", array("card", "game", "player", "status", "turn"), array(), $values); $card_type = select_card($card, array("type"))["type"]; $all_typed_cards = array_of_ids(select_cards(array("type" => $card_type))); if ($status == owned) { foreach (select_suspects() as $other_player) { if ($other_player["id"] != $player) { add_card_owner_status($card, $other_player["id"], not_owned); } } $known_cards = known_cards_player($player); if (count($known_cards) == select_cards_player($player)) { foreach (select_cards(array("id" => array("NOT IN", $known_cards))) as $other_card) { add_card_owner_status($other_card["id"], $player, not_owned); } } $known_cards = known_cards_type($card_type); if (count($known_cards) + 1 == count($all_typed_cards)) { foreach (array_diff($all_typed_cards, $known_cards) as $left_out_card) { foreach (select_suspects() as $other_player) { add_card_owner_status($left_out_card, $other_player["id"], not_owned); } } } } elseif ($status == not_owned) { foreach (select_turns() as $turn) { $turn = select_turn($turn["id"], array("weapon", "room", "suspect", "witness")); if ($turn["witness"] == $player) { if ($turn["weapon"] == $card && get_status($turn["room"], $player) == not_owned || $turn["room"] == $card && get_status($turn["weapon"], $player) == not_owned) { add_card_owner_status($turn["suspect"], $player, owned); } elseif ($turn["weapon"] == $card && get_status($turn["suspect"], $player) == not_owned || $turn["suspect"] == $card && get_status($turn["weapon"], $player) == not_owned) { add_card_owner_status($turn["room"], $player, owned); } elseif ($turn["suspect"] == $card && get_status($turn["room"], $player) == not_owned || $turn["room"] == $card && get_status($turn["suspect"], $player) == not_owned) { add_card_owner_status($turn["weapon"], $player, owned); } } } if (exists_murder_card($card_type)) { foreach (select_cards(array("type" => $card_type)) as $other_card) { $unknown_owners = select_unknown_owners($other_card["id"]); if (count($unknown_owners) == 1) { foreach ($unknown_owners as $owner) { add_card_owner_status($other_card["id"], $owner, owned); } } } } } } }
protected function doDisplay(array $context, array $blocks = array()) { // line 1 echo "<div class=\"content-wrapper\">\n <section class=\"content-header\">\n <h1>\n <a href=\"javascript:openInDiv('"; // line 4 echo twig_escape_filter($this->env, current_url(), "html", null, true); echo "', 'content')\" class=\"head\">\n "; // line 5 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["menu"]) ? $context["menu"] : null, "name", array()), "html", null, true); echo "\n </a>\n <small>Listagem</small>\n </h1>\n <ol class=\"breadcrumb\">\n <li><a href=\""; // line 10 echo twig_escape_filter($this->env, site_url("app/home"), "html", null, true); echo "\">Menus</a></li>\n <li class=\"active\">"; // line 11 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["menu"]) ? $context["menu"] : null, "name", array()), "html", null, true); echo "</li>\n </ol>\n <hr class=\"divider\">\n </section>\n <section class=\"content\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n "; // line 18 $this->loadTemplate("app/base/buttons.php", "app/users/list.php", 18)->display($context); // line 19 echo " <table id=\"datatable\" class=\"table table-striped table-bordered table-hover\">\n <thead>\n <tr>\n <th class=\"text-center\">\n <input type=\"checkbox\" value=\"s\" onclick=\"markAll(this)\">\n </th>\n <th>Nome</th>\n <th>Login</th>\n <th>Grupo</th>\n <th>Data de Ult. Login</th>\n <th class=\"text-center\">Status</th>\n </tr>\n </thead>\n <tbody>\n "; // line 33 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable(isset($context["users"]) ? $context["users"] : null); foreach ($context['_seq'] as $context["_key"] => $context["user"]) { // line 34 echo " <tr>\n <td class=\"text-center\">\n <input type=\"checkbox\" name=\"sel[]\" value=\""; // line 36 echo twig_escape_filter($this->env, $this->getAttribute($context["user"], "id", array()), "html", null, true); echo "\" onclick=\"scoreLine(this)\">\n </td>\n <td>"; // line 38 echo twig_escape_filter($this->env, $this->getAttribute($context["user"], "name", array()), "html", null, true); echo "</td>\n <td>"; // line 39 echo twig_escape_filter($this->env, $this->getAttribute($context["user"], "username", array()), "html", null, true); echo "</td>\n <td>"; // line 40 echo twig_escape_filter($this->env, $this->getAttribute($context["user"], "group", array()), "html", null, true); echo "</td>\n <td>"; // line 41 echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($context["user"], "last_login", array()), "d/m/Y H:i:s"), "html", null, true); echo "</td>\n <td class=\"text-center\">\n "; // line 43 echo get_status($this->getAttribute($context["user"], "status", array())); echo "\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['user'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 47 echo " </tbody>\n </table>\n </div>\n </div>\n </section>\n</div>\n"; // line 53 $this->loadTemplate("app/base/datatables.php", "app/users/list.php", 53)->display($context); }
public function bodyToString() { $this->cleanItems(); $status = get_status(); $server = $status['zabbix_server'] == _('Yes') ? new CSpan(_('running'), 'off') : new CSpan(_('not running'), 'on'); $serverLink = CWebUser::$data['type'] == USER_TYPE_SUPER_ADMIN ? new CLink(_('Zabbix server'), 'report1.php') : _('Zabbix server'); $this->addRow(new CCol(_('Zabbix server info'), 'nowrap ui-corner-all ui-widget-header')); $this->addRow(_('Updated') . NAME_DELIMITER . zbx_date2str(SERVER_INFO_DATE_FORMAT, time())); $this->addRow(_('Users (online)') . NAME_DELIMITER . $status['users_count'] . '(' . $status['users_online'] . ')'); $this->addRow(new CCol(array(_('Logged in as') . SPACE, new CLink(CWebUser::$data['alias'], 'profile.php')))); $this->addRow(new CCol(array($serverLink, SPACE . _('is') . SPACE, $server)), 'status'); $this->addRow(new CCol(array(_('Hosts (m/n/t)') . NAME_DELIMITER . $status['hosts_count'] . '(', new CSpan($status['hosts_count_monitored'], 'off'), '/', new CSpan($status['hosts_count_not_monitored'], 'on'), '/', new CSpan($status['hosts_count_template'], 'unknown'), ')'))); $this->addRow(new CCol(array(_('Items (m/d/n)') . NAME_DELIMITER . $status['items_count'] . '(', new CSpan($status['items_count_monitored'], 'off'), '/', new CSpan($status['items_count_disabled'], 'on'), '/', new CSpan($status['items_count_not_supported'], 'unknown'), ')'))); $this->addRow(new CCol(array(_('Triggers (e/d)[p/o]') . NAME_DELIMITER . $status['triggers_count'] . '(' . $status['triggers_count_enabled'] . '/' . $status['triggers_count_disabled'] . ')[', new CSpan($status['triggers_count_on'], 'on'), '/', new CSpan($status['triggers_count_off'], 'off'), ']'))); return parent::bodyToString(); }
public function _initialize() { //系统状态控制该方法是否可用 $Status = D('Status'); $data = $Status->where("statusid = '" . get_status() . "' and usertype = '" . GROUP_NAME . "' and classname = '" . MODULE_NAME . "' and actionname = '" . ACTION_NAME . "'")->find(); if ($data) { if ($data['istrue'] != 1) { $this->error('该方法在现阶段无法使用,错误状态为:' . GROUP_NAME . '/' . MODULE_NAME . '/' . ACTION_NAME); } } //判断当前用户是否重复登陆 $User = D('User'); $data = $User->where('id=' . session('username'))->find(); if ($data['sessionid'] != session_id()) { $this->error('登陆超时,请重新登陆'); } }
/** * Process screen. * * @return CDiv (screen inside container) */ public function get() { $status = get_status(); $server = $status['zabbix_server'] == _('Yes') ? (new CSpan(_('running')))->addClass(ZBX_STYLE_GREEN) : (new CSpan(_('not running')))->addClass(ZBX_STYLE_RED); $user_link = CWebUser::$data['alias']; if (!CWebUser::isGuest()) { $user_link = new CLink($user_link, 'profile.php'); } $server_link = _('Zabbix server'); if (CWebUser::$data['type'] == USER_TYPE_SUPER_ADMIN) { $server_link = new CLink($server_link, 'zabbix.php?action=report.status'); } $table = new CTableInfo(); $table->addRow(_('Users (online)') . NAME_DELIMITER . $status['users_count'] . '(' . $status['users_online'] . ')'); $table->addRow(new CCol([_('Logged in as'), SPACE, $user_link])); $table->addRow(new CCol([$server_link, SPACE, _('is'), SPACE, $server])); $table->addRow(new CCol([_('Hosts (m/n/t)') . NAME_DELIMITER . $status['hosts_count'] . '(', (new CSpan($status['hosts_count_monitored']))->addClass(ZBX_STYLE_GREEN), '/', (new CSpan($status['hosts_count_not_monitored']))->addClass(ZBX_STYLE_RED), '/', (new CSpan($status['hosts_count_template']))->addClass(ZBX_STYLE_GREY), ')'])); $table->addRow(new CCol([_('Items (m/d/n)') . NAME_DELIMITER . $status['items_count'] . '(', (new CSpan($status['items_count_monitored']))->addClass(ZBX_STYLE_GREEN), '/', (new CSpan($status['items_count_disabled']))->addClass(ZBX_STYLE_RED), '/', (new CSpan($status['items_count_not_supported']))->addClass(ZBX_STYLE_GREY), ')'])); $table->addRow(new CCol([_('Triggers (e/d)[p/o]') . NAME_DELIMITER . $status['triggers_count'] . '(' . $status['triggers_count_enabled'] . '/' . $status['triggers_count_disabled'] . ')[', (new CSpan($status['triggers_count_on']))->addClass(ZBX_STYLE_GREEN), '/', (new CSpan($status['triggers_count_off']))->addClass(ZBX_STYLE_RED), ']'])); $footer = (new CList())->addItem(_s('Updated: %s', zbx_date2str(TIME_FORMAT_SECONDS)))->addClass(ZBX_STYLE_DASHBRD_WIDGET_FOOT); return $this->getOutput((new CUiWidget(uniqid(), [$table, $footer]))->setHeader(_('Zabbix server info'))); }
echo get_deal_user($deal["user_id"]); ?> </td><td><?php echo format_price($deal["limit_price"]); ?> </td><td><?php echo $deal["deal_days"]; ?> </td><td><?php echo to_date($deal["create_time"]); ?> </td><td><?php echo get_edit($deal["is_edit"], $deal); ?> </td><td><?php echo get_status($deal["is_effect"]); ?> </td><td class="op_action"><div class="viewOpBox_demo"> <?php echo get_item($deal["id"], $deal); ?> <?php echo get_edit_1($deal["id"], $deal); ?> <a href="javascript: foreverdel('<?php echo $deal["id"]; ?> ')">彻底删除</a> </div><a href="javascript:void(0);" class="opration"><span>操作</span><i></i></a></td></tr><?php } } } else { echo "";
function whois_online() { global $db, $template, $user; global $delay, $last_post, $session_time; $check_time = time() - $session_time; $sql_ary = array( 'username' => $user->data['username'], 'user_colour' => $user->data['user_colour'], 'user_lastupdate' => time(), ); $sql = 'UPDATE ' . CHAT_SESSIONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE user_id = {$user->data['user_id']}"; $result = $db->sql_query($sql); $sql = 'DELETE FROM ' . CHAT_SESSIONS_TABLE . " WHERE user_lastupdate < $check_time"; $db->sql_query($sql); $status_time = false; $sql = 'SELECT * FROM ' . CHAT_SESSIONS_TABLE . " WHERE user_lastupdate > $check_time ORDER BY username ASC"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { if ($row['user_id'] == $user->data['user_id']) { $last_post = $row['user_lastpost']; $login_time = $row['user_login']; $status_time = ($last_post > $login_time) ? $last_post : $login_time; } $status = get_status($row['user_lastpost']); $template->assign_block_vars('whoisrow', array( 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $user->lang['GUEST']), 'USER_STATUS' => $status, )); $user_ary[] = $row['user_id']; } $db->sql_freeresult($result); $template->assign_vars(array( 'DELAY' => ($status_time) ? $delay[get_status($status_time)] : $delay['idle'], 'LAST_TIME' => time(), 'S_WHOISONLINE' => true, )); return false; }
$advancegrading = get_advance_grading($cmid, $emarking->id); $markeradvance_marker = get_markeradvance_marker($cmid, $emarking->id); $markeradvance_corregido = get_markeradvance_corregido($cmid, $emarking->id); $markeradvance_porcorregir = get_markeradvance_porcorregir($cmid, $emarking->id); $markeradvance_porrecorregir = get_markeradvance_porrecorregir($cmid, $emarking->id); $final = array("Grading" => $grading, "Contributioners" => $contributioners, "Contributions" => $contributions, "Advancedescription" => $advancedescription, "Advanceresponded" => $advanceresponded, "Advanceregrading" => $advanceregrading, "Advancegrading" => $advancegrading, "MarkeradvanceMarker" => $markeradvance_marker, "MarkeradvanceCorregido" => $markeradvance_corregido, "MarkeradvancePorcorregir" => $markeradvance_porcorregir, "MarkeradvancePorrecorregir" => $markeradvance_porrecorregir); $output = $final; $jsonOutputs = array('error' => '', 'values' => $output); $jsonOutput = json_encode($jsonOutputs); if ($callback) { $jsonOutput = $callback . "(" . $jsonOutput . ");"; } echo $jsonOutput; } else { if ($action == "gradereport") { $grading = get_status($cmid, $emarking->id); $marks = get_marks($cmid, $emarking->id, $cmid, $ids); $coursemarks = get_courses_marks($cmid, $emarking->id, $cmid, $ids); $pass_ratio = get_pass_ratio($cmid, $emarking->id, $cmid, $ids); $efficiencycriterion = get_efficiency_criterion($cmid, $emarking->id, $cmid, $ids); $efficiencyrate = get_efficiency_rate($cmid, $emarking->id, $cmid, $ids); $final = array("Marks" => $marks, "CourseMarks" => $coursemarks, "PassRatio" => $pass_ratio, "EfficiencyCriterion" => $efficiencycriterion, "EfficiencyRate" => $efficiencyrate); $output = $final; $jsonOutputs = array('error' => '', 'values' => $output); $jsonOutput = json_encode($jsonOutputs); if ($callback) { $jsonOutput = $callback . "(" . $jsonOutput . ");"; } echo $jsonOutput; } }
<datalist id="list_parent" class="list_parent"> </datalist> </div> <div class="col-xs-1 col-xs-offset-1"> <h5>สถานะ</h5> </div> <div class="col-xs-3" style="margin-top: 5px;"> <input type="radio" name="parent_status" value="1" <?php if (get_status($person['MOTHER_ID']) == 1) { echo "checked"; } ?> >ยังมีชีวิตอยู่ <input type="radio" name="parent_status" value="2" <?php if (get_status($person['MOTHER_ID']) == 2) { echo "checked"; } ?> >เสียชีวิต </div> </div> <div class="row" style="margin-top: 0px"> <div class="col-xs-2 col-xs-offset-8"> <a class="btn btn-danger" role="button" onClick="javascript :window.close()">ยกเลิก</a> </div> <div class="col-xs-2"> <button class="btn btn-success" type="submit" name="search">บันทึก</button>
<div class="box-body"> <div class="form-group"> <label for="status" class="col-sm-3 control-label"><?php echo tr('_GLOBAL_status_'); ?> </label> <div class="col-sm-5"> <select name="status" id="status" class="form-control" <?php echo $data['user']['id'] == user('uID') ? 'disabled="disabled"' : ''; ?> > <?php foreach (get_status() as $status_id => $status) { ?> <option value="<?php echo $status_id; ?> " <?php echo set_select('status', $status_id, $status_id == $data['user']['status_id']); ?> ><?php echo $status; ?> </option> <?php } ?> <?php
?> </td> <td><?php foreach ($cart as $item) { $link_img = base_url() . 'assets/img/products/thumbs/' . $item['image']; $link_product = base_url() . $this->uri->segment(1) . '/catalog/' . $item['category_alias'] . '/' . $item['subcategory_alias'] . '/' . $item['id']; echo "<a href='{$link_product}'><img class='preview_img' src='" . $link_img . "'></a>"; } ?> </td> <td><?php echo date('d.m.Y <br> H:i', $value['date_order_create']); ?> </td> <td><?php echo get_status($value['status']); ?> </td> <td><?php echo get_qty($cart); ?> </td> <td><?php echo get_sum($cart) . ' ' . get_currency($cart); ?> </td> <td><?php if ($value['status'] == 1) { //echo "<a href='".base_url()."template/pay/robokassa/demo2.php'>Оплатить</a>"; echo pay($value['id'], get_sum($cart)); }
function get_server_status() { echo get_status(); }
} $need_captcha = $MOD['captcha_answer'] == 2 ? $MG['captcha'] : $MOD['captcha_answer']; $need_question = $MOD['question_answer'] == 2 ? $MG['question'] : $MOD['question_answer']; if ($need_question) { $need_captcha = 1; } if (isset($_POST['ok'])) { require_once DT_ROOT . '/include/post.func.php'; $captcha = isset($captcha) ? convert(input_trim($captcha), 'UTF-8', DT_CHARSET) : ''; $msg = captcha($captcha, $need_captcha, true); if ($msg) { exit('captcha'); } $content = isset($content) ? convert(input_trim(nl2br($content)), 'UTF-8', DT_CHARSET) : ''; $need_check = $MOD['check_answer'] == 2 ? $MG['check'] : $MOD['check_answer']; $status = get_status(3, $need_check); $db->query("INSERT INTO {$table}_answer (qid,content,username,addtime,ip,status) VALUES ('{$itemid}', '{$content}', '{$_username}', '{$DT_TIME}', '{$DT_IP}', '{$status}')"); if ($status == 3) { $db->query("UPDATE {$table} SET answer=answer+1 WHERE itemid={$itemid}"); } if ($MOD['credit_answer'] && $_username && $status == 3) { $could_credit = true; if ($MOD['credit_maxanswer'] > 0) { $r = $db->get_one("SELECT SUM(amount) AS total FROM {$DT_PRE}finance_credit WHERE username='******' AND addtime>{$DT_TIME}-86400 AND reason='" . $L['answer'] . "'"); if ($r['total'] > $MOD['credit_maxanswer']) { $could_credit = false; } } if ($could_credit) { credit_add($_username, $MOD['credit_answer']); credit_record($_username, $MOD['credit_answer'], 'system', $L['answer'], 'ID:' . $itemid . '(' . $L['know_by_mobile'] . ')');
function get_totalsubmissions($cmid, $emarkingid) { $grading = get_status($cmid, $emarkingid); $totalsubmissions = $grading[0]['missing'] + $grading[0]['submitted'] + $grading[0]['grading'] + $grading[0]['graded'] + $grading[0]['regrading']; return $totalsubmissions; }
} else { $status = "<i class='fa fa-ban text-red'></i>ไม่ใช้งาน"; } return $status; } ?> <div class="panel panel-primary"> <div class="panel-heading"> <i class="fa fa-book"></i> <?php echo Html::encode($this->title); ?> </div> <div class="panel-body"> <p class="pull-right"> <?php echo Html::a('แก้ไข', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']); ?> <?php echo Html::a('ลบรายการ', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'คุณต้องการลบรายนี้ใช่มั้ย?', 'method' => 'post']]); ?> </p> <?php echo DetailView::widget(['model' => $model, 'attributes' => ['account_number', 'account_name', 'saving_type', 'bank_name', 'brance', ['attribute' => 'status', 'format' => 'raw', 'value' => get_status($model->status), 'displayOnly' => true]]]); ?> </div> </div>
function do_ticket($theRow, $theWidth, $search = FALSE, $dist = TRUE) { // returns table - 6/26/10 global $iw_width, $nature, $disposition, $patient, $incident, $incidents; // 12/3/10 $tickno = get_variable('serial_no_ap') == 0 ? " <I>(#" . $theRow['id'] . ")</I>" : ""; // 1/25/09 switch ($theRow['severity']) { //color tickets by severity case $GLOBALS['SEVERITY_MEDIUM']: $severityclass = 'severity_medium'; break; case $GLOBALS['SEVERITY_HIGH']: $severityclass = 'severity_high'; break; default: $severityclass = 'severity_normal'; break; } $print = "<TABLE BORDER='0' ID='left' width='" . $theWidth . "'>\n"; // $print .= "<TR CLASS='even'><TD ALIGN='left' CLASS='td_data' COLSPAN=2 ALIGN='center'><B>{$incident}: <I>" . highlight($search, $theRow['scope']) . "</B>" . $tickno . "</TD></TR>\n"; $print .= "<TR CLASS='odd' ><TD ALIGN='left'>" . get_text("Addr") . ":</TD>\t\t<TD ALIGN='left'>" . highlight($search, $theRow['tick_street']) . "</TD></TR>\n"; $print .= "<TR CLASS='even' ><TD ALIGN='left'>" . get_text("City") . ":</TD>\t\t\t<TD ALIGN='left'>" . highlight($search, $theRow['tick_city']); $print .= " " . highlight($search, $theRow['tick_state']) . "</TD></TR>\n"; $print .= "<TR CLASS='odd' ><TD ALIGN='left'>" . get_text("Priority") . ":</TD> <TD ALIGN='left' CLASS='" . $severityclass . "'>" . get_severity($theRow['severity']); $print .= " {$nature}: " . get_type($theRow['in_types_id']); $print .= "</TD></TR>\n"; $print .= "<TR CLASS='even' VALIGN='top'><TD ALIGN='left'>" . get_text("Synopsis") . ":</TD>\t<TD ALIGN='left'>" . replace_quotes(highlight($search, nl2br($theRow['tick_descr']))) . "</TD></TR>\n"; // 8/12/09 $print .= "<TR CLASS='odd' ><TD ALIGN='left'>" . get_text("Protocol") . ":</TD> <TD ALIGN='left' CLASS='{$severityclass}'>{$theRow['protocol']}</TD></TR>\n"; // 7/16/09 $print .= "<TR CLASS='even' VALIGN='top'><TD ALIGN='left'>" . get_text("911 Contacted") . ":</TD>\t<TD ALIGN='left'>" . highlight($search, nl2br($theRow['nine_one_one'])) . "</TD></TR>\n"; // 6/26/10 $print .= "<TR CLASS='odd'><TD ALIGN='left'>" . get_text("Reported by") . ":</TD>\t<TD ALIGN='left'>" . highlight($search, $theRow['contact']) . "</TD></TR>\n"; $print .= "<TR CLASS='even' ><TD ALIGN='left'>" . get_text("Phone") . ":</TD>\t\t\t<TD ALIGN='left'>" . format_phone($theRow['phone']) . "</TD></TR>\n"; $end_date = intval($theRow['problemend']) > 1 ? $theRow['problemend'] : time() - intval(get_variable('delta_mins')) * 60; $elapsed = my_date_diff($theRow['problemstart'], $end_date); $elaped_str = intval($theRow['problemend']) > 1 ? "" : " ({$elapsed})"; $print .= "<TR CLASS='odd'><TD ALIGN='left'>" . get_text("Status") . ":</TD>\t\t<TD ALIGN='left'>" . get_status($theRow['status']) . "{$elaped_str}</TD></TR>\n"; $by_str = $theRow['call_taker'] == 0 ? "" : " by " . get_owner($theRow['call_taker']) . " "; // 1/7/10 $print .= "<TR CLASS='even'><TD ALIGN='left'>" . get_text("Written") . ":</TD>\t\t<TD ALIGN='left'>" . format_date($theRow['date']) . $by_str; $print .= " Updated: " . format_date($theRow['updated']) . "</TD></TR>\n"; $print .= empty($theRow['booked_date']) ? "" : "<TR CLASS='odd'><TD ALIGN='left'>Scheduled date:</TD>\t\t<TD ALIGN='left'>" . format_date($theRow['booked_date']) . "</TD></TR>\n"; // 10/6/09 $print .= "<TR CLASS='even' ><TD ALIGN='left' COLSPAN='2'> \t<TD ALIGN='left'></TR>\n"; // separator $print .= empty($theRow['fac_name']) ? "" : "<TR CLASS='odd' ><TD ALIGN='left'>{$incident} at Facility:</TD>\t\t<TD ALIGN='left'>" . highlight($search, $theRow['fac_name']) . "</TD></TR>\n"; // 8/1/09 $print .= empty($theRow['rec_fac_name']) ? "" : "<TR CLASS='even' ><TD ALIGN='left'>Receiving Facility:</TD>\t\t<TD ALIGN='left'>" . highlight($search, $theRow['rec_fac_name']) . "</TD></TR>\n"; // 10/6/09 $print .= empty($theRow['comments']) ? "" : "<TR CLASS='odd' VALIGN='top'><TD ALIGN='left'>{$disposition}:</TD>\t<TD ALIGN='left'>" . replace_quotes(highlight($search, nl2br($theRow['comments']))) . "</TD></TR>\n"; $print .= "<TR CLASS='even' ><TD ALIGN='left'>" . get_text("Run Start") . ":</TD>\t\t\t\t\t<TD ALIGN='left'>" . format_date($theRow['problemstart']); $elaped_str = intval($theRow['problemend']) > 1 ? $elapsed : ""; $print .= " End: " . format_date($theRow['problemend']) . " ({$elaped_str})</TD></TR>\n"; $locale = get_variable('locale'); // 08/03/09 switch ($locale) { case "0": $grid_type = " USNG " . LLtoUSNG($theRow['lat'], $theRow['lng']); break; case "1": $grid_type = " OSGB " . LLtoOSGB($theRow['lat'], $theRow['lng']); // 8/23/08, 10/15/08, 8/3/09 break; case "2": $coords = $theRow['lat'] . "," . $theRow['lng']; // 8/12/09 $grid_type = " UTM " . toUTM($coords); // 8/23/08, 10/15/08, 8/3/09 break; default: print "ERROR in " . basename(__FILE__) . " " . __LINE__ . "<BR />"; } $print .= "<TR CLASS='odd'><TD ALIGN='left' onClick = 'javascript: do_coords(" . $theRow['lat'] . "," . $theRow['lng'] . ")'><U>" . get_text("Position") . "</U>: </TD>\n\t\t<TD ALIGN='left'>" . get_lat($theRow['lat']) . " " . get_lng($theRow['lng']) . $grid_type . "</TD></TR>\n"; // 9/13/08 $print .= "<TR><TD colspan=2 ALIGN='left'>"; $print .= show_log($theRow[0]); // log $print .= "</TD></TR>"; $print .= "<TR STYLE = 'display:none;'><TD colspan=2><SPAN ID='oldlat'>" . $theRow['lat'] . "</SPAN><SPAN ID='oldlng'>" . $theRow['lng'] . "</SPAN></TD></TR>"; $print .= "</TABLE>\n"; $print .= show_assigns(0, $theRow[0]); // 'id' ambiguity - 7/27/09 $print .= show_actions($theRow[0], "date", FALSE, FALSE); return $print; }
$type_select = type_select($TYPE, 0, 'post[typeid]', $L['default_type']); $head_title = $L['news_title_add']; } break; case 'edit': $itemid or message(); $do->itemid = $itemid; $r = $do->get_one(); if (!$r || $r['username'] != $_username) { message(); } if ($submit) { if ($do->pass($post)) { $post['username'] = $_username; $need_check = $MOD['news_check'] == 2 ? $MG['check'] : $MOD['news_check']; $post['status'] = get_status($r['status'], $need_check); $post['level'] = $r['level']; $do->edit($post); dmsg($L['op_edit_success'], $forward); } else { message($do->errmsg); } } else { extract($r); $addtime = timetodate($addtime); $type_select = type_select($TYPE, 0, 'post[typeid]', $L['default_type'], $typeid); $head_title = $L['news_title_edit']; } break; case 'delete': $itemid or message($L['news_msg_choose']);
function make_status_of_zbx() { global $ZBX_SERVER, $ZBX_SERVER_PORT; $table = new CTableInfo(); $table->setHeader(array(_('Parameter'), _('Value'), _('Details'))); show_messages(); // because in function get_status(); function clear_messages() is called when fsockopen() fails. $status = get_status(); $table->addRow(array(_('Zabbix server is running'), new CSpan($status['zabbix_server'], $status['zabbix_server'] == _('Yes') ? 'off' : 'on'), isset($ZBX_SERVER, $ZBX_SERVER_PORT) ? $ZBX_SERVER . ':' . $ZBX_SERVER_PORT : _('Zabbix server IP or port is not set!'))); $title = new CSpan(_('Number of hosts (monitored/not monitored/templates)')); $title->setAttribute('title', 'asdad'); $table->addRow(array(_('Number of hosts (monitored/not monitored/templates)'), $status['hosts_count'], array(new CSpan($status['hosts_count_monitored'], 'off'), ' / ', new CSpan($status['hosts_count_not_monitored'], 'on'), ' / ', new CSpan($status['hosts_count_template'], 'unknown')))); $title = new CSpan(_('Number of items (monitored/disabled/not supported)')); $title->setAttribute('title', _('Only items assigned to enabled hosts are counted')); $table->addRow(array($title, $status['items_count'], array(new CSpan($status['items_count_monitored'], 'off'), ' / ', new CSpan($status['items_count_disabled'], 'on'), ' / ', new CSpan($status['items_count_not_supported'], 'unknown')))); $title = new CSpan(_('Number of triggers (enabled/disabled) [problem/ok]')); $title->setAttribute('title', _('Only triggers assigned to enabled hosts and depending on enabled items are counted')); $table->addRow(array($title, $status['triggers_count'], array($status['triggers_count_enabled'], ' / ', $status['triggers_count_disabled'], ' [', new CSpan($status['triggers_count_on'], 'on'), ' / ', new CSpan($status['triggers_count_off'], 'off'), ']'))); $table->addRow(array(_('Number of users (online)'), $status['users_count'], new CSpan($status['users_online'], 'green'))); $table->addRow(array(_('Required server performance, new values per second'), $status['qps_total'], ' - ')); // check requirements if (CWebUser::$data['type'] == USER_TYPE_SUPER_ADMIN) { $frontendSetup = new FrontendSetup(); $reqs = $frontendSetup->checkRequirements(); foreach ($reqs as $req) { if ($req['result'] != FrontendSetup::CHECK_OK) { $class = $req['result'] == FrontendSetup::CHECK_WARNING ? 'notice' : 'fail'; $table->addRow(array(new CSpan($req['name'], $class), new CSpan($req['current'], $class), new CSpan($req['error'], $class))); } } } $script = new CJSScript(get_js("jQuery('#hat_stszbx_footer').html('" . _s('Updated: %s', zbx_date2str(_('H:i:s'))) . "')")); return new CDiv(array($table, $script)); }
if (!empty($_POST)) { dump($_POST); } } // $remotes = get_current(); // set auto-refresh if any mobile units // $interval = intval(get_variable('auto_poll')); // $refresh = ((($remotes['aprs']) || ($remotes['instam']) || ($remotes['locatea']) || ($remotes['gtrack']) || ($remotes['glat'])) && ($interval>0))? "\t<META HTTP-EQUIV='REFRESH' CONTENT='" . intval($interval*60) . "'>\n": ""; $temp = get_variable('auto_poll'); $poll_val = $temp == 0 ? "none" : $temp; $id = array_key_exists('id', $_GET) ? $_GET['id'] : NULL; $result = mysql_query("SELECT * FROM `{$GLOBALS['mysql_prefix']}ticket` WHERE id='{$id}'"); $row = mysql_fetch_assoc($result); $title = $row['scope']; $ticket_severity = get_severity($row['severity']); $ticket_type = get_type($row['in_types_id']); $ticket_status = get_status($row['status']); $ticket_updated = format_date_time($row['updated']); $ticket_addr = "{$row['street']}, {$row['city']} {$row['state']} "; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <HEAD><TITLE>Incident Popup - Incident <?php print $title; ?> <?php print $ticket_updated; ?> </TITLE> <LINK REL=StyleSheet HREF="stylesheet.php?version=<?php print time(); ?>
function handle_commit_req() { global $enable_stats, $author; echo html_header_message('checking, before doing commit...'); echo html_form_start(); $status = get_status(true, false, false); if ($status['hash'] != $_POST['statushash']) { error('something changed in the directory and/or repository, not doing any changes ! Sorry'); } else { do_commit($_POST['commit_message'], $author); $max = count($_POST['filename']); for ($i = 0; $i < $max; $i++) { echo html_js_remove_container($status['lines'][$i]['prefix']); } $status = get_status(); } view_result($status); }
} } ?> <!DOCTYPE html> <html> <head> <title>Voting System - Ballot</title> <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" /> <link href="misc/css/index.css" rel="stylesheet" media="screen" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link href="bootsrap/assets/css/bootstrap-responsive.css" rel="stylesheet" /> </head> <body> <?php if (in_array($_SESSION['studID'], get_voters($_GET['bid'])) || get_status($_GET['bid']) === '1' && $_SESSION['userGroup'] !== 'admin' || isActive($_GET['bid']) === '0' && $_SESSION['userGroup'] !== 'admin') { ?> <div class="container-fluid" id="base"> <div class="row-fluid"> <div class="span8 offset2" id="content" style="position: fixed; top: 35%; max-height: 200px;"> <p> <br /> <br /> <h1 style="text-align: center;">This ballot is no longer available for you.</h1> </p> </div> </div> </div> <?php
</td> <td ><?php echo "<strong>Orginal Address</strong> <br />" . $row['address'] . "<br /><br /><strong>Changed From</strong><br />" . $row['previous_adrs']; ?> </td> <td ><?php echo "<strong>Orginal Pincode</strong> <br />" . $row['mail_zip'] . "<br /><br /><strong>Changed From</strong><br />" . $row['previous_pincode']; ?> </td> <td ><?php echo $row['fe'] . "<br /><span class=sub_mobile>" . $fes_contact_no . "</span><br /><br />Requested By<br />\r\n" . $row['previous_fes'] . "<br /><span class=sub_mobile>" . $pre_fes_contact_no . "</span>"; ?> </td> <td ><?php echo get_status($row['ivr_flag']); ?> </td> <td ><?php echo date_time($row['upload_date_time']); ?> </td> </tr> <?php } } else {
#!/usr/local/bin/php-cgi -q <?php $last_text = ""; while (!stristr($status, "Done")) { $status = get_status(); if ($status != "") { echo $status . "\n"; } sleep(1); } function get_status() { global $last_text; $status = file_get_contents("/var/run/filter_reload_status"); $status = str_replace("...", "", $status); $status .= "..."; if ($status != $last_text) { $last_text = $status; return $status; } return ""; }
function make_status_of_zbx() { $table = new CTableInfo(); $table->setHeader(array(S_PARAMETER, S_VALUE, S_DETAILS)); show_messages(); //because in function get_status(); function clear_messages() is called when fsockopen() fails. $status = get_status(); $table->addRow(array(S_ZABBIX_SERVER_IS_RUNNING, new CSpan($status['zabbix_server'], $status['zabbix_server'] == S_YES ? 'off' : 'on'), ' - ')); // $table->addRow(array(S_VALUES_STORED,$status['history_count']));$table->addRow(array(S_TRENDS_STORED,$status['trends_count'])); $title = new CSpan(S_NUMBER_OF_HOSTS); $title->setAttribute('title', 'asdad'); $table->addRow(array(S_NUMBER_OF_HOSTS, $status['hosts_count'], array(new CSpan($status['hosts_count_monitored'], 'off'), ' / ', new CSpan($status['hosts_count_not_monitored'], 'on'), ' / ', new CSpan($status['hosts_count_template'], 'unknown')))); $title = new CSpan(S_NUMBER_OF_ITEMS); $title->setAttribute('title', S_NUMBER_OF_ITEMS_TOOLTIP); $table->addRow(array($title, $status['items_count'], array(new CSpan($status['items_count_monitored'], 'off'), ' / ', new CSpan($status['items_count_disabled'], 'on'), ' / ', new CSpan($status['items_count_not_supported'], 'unknown')))); $title = new CSpan(S_NUMBER_OF_TRIGGERS); $title->setAttribute('title', S_NUMBER_OF_TRIGGERS_TOOLTIP); $table->addRow(array($title, $status['triggers_count'], array($status['triggers_count_enabled'], ' / ', $status['triggers_count_disabled'] . SPACE . SPACE . '[', new CSpan($status['triggers_count_on'], 'on'), ' / ', new CSpan($status['triggers_count_unknown'], 'unknown'), ' / ', new CSpan($status['triggers_count_off'], 'off'), ']'))); /* $table->addRow(array(S_NUMBER_OF_EVENTS,$status['events_count'],' - ')); $table->addRow(array(S_NUMBER_OF_ALERTS,$status['alerts_count'],' - '));*/ //Log Out 10min $sql = 'SELECT DISTINCT u.userid, MAX(s.lastaccess) as lastaccess, MAX(u.autologout) as autologout, s.status ' . ' FROM users u ' . ' LEFT JOIN sessions s ON s.userid=u.userid AND s.status=' . ZBX_SESSION_ACTIVE . ' WHERE ' . DBin_node('u.userid') . ' GROUP BY u.userid,s.status'; $db_users = DBSelect($sql); $usr_cnt = 0; $online_cnt = 0; while ($user = DBFetch($db_users)) { $online_time = $user['autologout'] == 0 || ZBX_USER_ONLINE_TIME < $user['autologout'] ? ZBX_USER_ONLINE_TIME : $user['autologout']; if (!is_null($user['lastaccess']) && $user['lastaccess'] + $online_time >= time() && ZBX_SESSION_ACTIVE == $user['status']) { $online_cnt++; } $usr_cnt++; } $table->addRow(array(S_NUMBER_OF_USERS, $usr_cnt, new CSpan($online_cnt, 'green'))); $table->addRow(array(S_REQUIRED_SERVER_PERFORMANCE_NVPS, $status['qps_total'], ' - ')); $table->setFooter(new CCol(S_UPDATED . ': ' . date("H:i:s", time()))); return $table; }
$query->whois_query(); $ret['Ret'] = 0; $ret['RetMsg'] = ""; $ret['BeginDate'] = get_begintime($query); $ret['EndDate'] = get_endtime($query); if ($ret['BeginDate'] == '未收录' && $ret['EndDate'] == '未收录') { $ret['Ret'] = 1; $ret['RetMsg'] = "该域名暂无相关信息<br/>请检查域名填写格式是否正确<br/>(例:不要携带如 ‘www’ 等子域名)"; print_r(json_encode($ret)); return; } $ret['Updated'] = get_updatetime($query); $ret['Nameservers'] = get_nameserver($query); $beginday = $ret['BeginDate']; $endday = $ret['EndDate']; $beginday = str_replace('年', '-', $beginday); $beginday = str_replace('月', '-', $beginday); $endday = str_replace('年', '-', $endday); $endday = str_replace('月', '-', $endday); $beginday = get_mktime($beginday); $endday = get_mktime($endday); $now = time(); $LDays = round(($endday - $now) / 3600 / 24); $TDays = round(($endday - $beginday) / 3600 / 24); $ret['LeaveDays'] = $LDays; $ret['TotalDays'] = $TDays; $ret['StatusInfo'] = get_status($query); $ret['OriginalInfo'] = $query->whois_get_context(); $ret['OriginalInfo'] = '<br/>' . str_replace("\n", '<br/>', $ret['OriginalInfo']); #print_r($ret); print_r(json_encode($ret));
function get_comment($time, $type, $commentid, $userid) { global $db, $events, $last_timestamp, $foo_link, $max_items, $globals; $event = $db->get_row("select user_login, comment_user_id, comment_type, comment_order, link_id, link_title, link_uri, link_status, link_date, link_votes, link_anonymous, link_comments, media.size as media_size from comments LEFT JOIN media ON (media.type='comment' and media.id = comments.comment_id and media.version = 0), links, users where comment_id = {$commentid} and link_id = comment_link_id and user_id={$userid} "); if (!$event) { return; } $foo_link->id = $event->link_id; $foo_link->uri = $event->link_uri; $json['link'] = $foo_link->get_relative_permalink() . "/c0{$event->comment_order}#c-{$event->comment_order}"; $json['id'] = $commentid; $json['status'] = get_status($event->link_status); $json['ts'] = $time; $json['type'] = $type; $json['votes'] = $event->link_votes + $event->link_anonymous; $json['com'] = $event->link_comments; $json['title'] = $event->link_title; if ($event->comment_type == 'admin') { $json['who'] = get_server_name(); $userid = 0; } else { $json['who'] = $event->user_login; } $json['uid'] = $userid; if ($userid > 0) { $json['icon'] = get_avatar_url($userid, -1, 20); } if ($event->media_size > 0) { $json['thumb'] = $globals['base_static'] . Upload::get_cache_relative_dir($commentid) . "/media_thumb-comment-{$commentid}.jpg"; } $key = $time . ':' . $type . ':' . $commentid; $events[$key] = $json; if ($time > $last_timestamp) { $last_timestamp = $time; } }
?> <tr> <td><?php echo $row['name']; ?> </td> <td class="hidden-480"><?php echo $row['email']; ?> </td> <td class="hidden-480"><?php echo get_role_string($row['role_id']); ?> </td> <td class="hidden-phone"><?php echo get_status($row['status']); ?> </td> <td class="hidden-phone"><?php echo $row['created_at']; ?> </td> <td class="hidden-phone"><?php echo $row['updated_at']; ?> </td> <?php if ($this->session->userdata('user_data')->email == ADMIN_EMAIL) { echo "<td class='hidden-phone'><a href='" . base_url() . "admin/change_status/" . $row['id'] . "/" . $row['status'] . "'>" . change_status($row['status']) . "</a></td>"; } ?>
case room: add_card_owner_status($_POST["room"], $_POST["witness"], owned); break; case weapon: add_card_owner_status($_POST["weapon"], $_POST["witness"], owned); break; case suspect: add_card_owner_status($_POST["suspect"], $_POST["witness"], owned); break; } } if (get_status($_POST["room"], $_POST["witness"]) == not_owned && get_status($_POST["weapon"], $_POST["witness"]) == not_owned) { add_card_owner_status($_POST["suspect"], $_POST["witness"], owned); } elseif (get_status($_POST["weapon"], $_POST["witness"]) == not_owned && get_status($_POST["suspect"], $_POST["witness"]) == not_owned) { add_card_owner_status($_POST["room"], $_POST["witness"], owned); } elseif (get_status($_POST["room"], $_POST["witness"]) == not_owned && get_status($_POST["suspect"], $_POST["witness"]) == not_owned) { add_card_owner_status($_POST["weapon"], $_POST["witness"], owned); } increment_turn(); redirect_to_action("show"); break; case "skip": increment_turn(); redirect_to_action("show"); break; case "show": break; case "daybook": break; case "revert": $turn = max(array_of_ids(select_turns()));
function index() { $offset = $this->lib_general->value_get('offset', 0); $limit = $this->lib_general->value_get('limit', 10); $data['title'] = 'ACS - Security'; $data['action'] = site_url('user/search' . $this->_filter()); $data['add_btn'] = anchor('user/add' . $this->_filter(), '<span class="glyphicon glyphicon-plus"></span> New', array('class' => 'btn btn-primary btn-sm')); $this->table->set_template(tbl_tmp()); $head_data = array('fullname' => 'Fullname', 'username' => 'Username', 'level' => 'Level', 'ip_login' => 'Last IP Login', 'user_agent' => 'Last User Agent', 'date_login' => 'Last Login', 'status' => 'Status'); $heading[] = 'No'; foreach ($head_data as $r => $value) { $heading[] = anchor('user' . $this->_filter(array('order_column' => $r, 'order_type' => $this->lib_general->order_type($r))), $value . " " . $this->lib_general->order_icon($r)); } $heading[] = 'Action'; $this->table->set_heading($heading); $result = $this->mdl_user->get()->result(); $i = 1 + $offset; foreach ($result as $r) { $this->table->add_row($i++, anchor('user/edit/' . $r->id . $this->_filter(), $this->template->get_user_image($r->photo, 'user-image-table img-circle') . ' ' . $r->fullname), $r->username, get_level($r->level), $r->ip_login, $r->user_agent, $r->date_login, get_status($r->status), anchor('user/edit/' . $r->id . $this->_filter(), '<span class="glyphicon glyphicon-edit"></span> Edit') . " | " . anchor('user/delete/' . $r->id . $this->_filter(), '<span class="glyphicon glyphicon-trash"></span> Delete', array('onclick' => "return confirm('Are you sure')"))); } $data['table'] = $this->table->generate(); $total = $this->mdl_user->count_all(); $config = pag_tmp(); $config['base_url'] = site_url("user" . $this->_filter()); $config['total_rows'] = $total; $config['per_page'] = $limit; $this->pagination->initialize($config); $data['pagination'] = $this->pagination->create_links(); $data['total'] = page_total($offset, $limit, $total); $this->template->display('user', $data); }