• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_status函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_status函数的典型用法代码示例。如果您正苦于以下问题:PHP get_status函数的具体用法?PHP get_status怎么用?PHP get_status使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_status函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: bodyToString

 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();
 }
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:26,代码来源:class.cserverinfo.php


示例2: add_card_owner_status

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);
                        }
                    }
                }
            }
        }
    }
}
开发者ID:aymericbouzy,项目名称:cluedo-solver,代码行数:57,代码来源:owned.php


示例3: doDisplay

 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);
 }
开发者ID:rogerioleal1,项目名称:ci_base,代码行数:53,代码来源:d6a3c8af8dc9a5ade28b7c3aed8c8ec07e79dc88706aa8bf5074368ed7399cd0.php


示例4: bodyToString

 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();
 }
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:16,代码来源:class.cserverinfo.php


示例5: _initialize

 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('登陆超时,请重新登陆');
     }
 }
开发者ID:vimalmistry,项目名称:Exam,代码行数:17,代码来源:BaseAction.class.php


示例6: get

 /**
  * 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')));
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:27,代码来源:CScreenServerInfo.php


示例7: get_deal_user

            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);
            ?>
&nbsp; <?php 
            echo get_edit_1($deal["id"], $deal);
            ?>
&nbsp;<a href="javascript: foreverdel('<?php 
            echo $deal["id"];
            ?>
')">彻底删除</a>&nbsp;</div><a href="javascript:void(0);" class="opration"><span>操作</span><i></i></a></td></tr><?php 
        }
    }
} else {
    echo "";
开发者ID:BruceJi,项目名称:fanwe,代码行数:31,代码来源:d093cd34ca23dcf155e0d027ace56f79.php


示例8: whois_online

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;
}
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:49,代码来源:shout.php


示例9: get_advance_grading

    $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;
    }
}
开发者ID:jorgecabane93,项目名称:eMarkingWeb,代码行数:31,代码来源:reports.php


示例10:

                        <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>
开发者ID:batman1292,项目名称:linhainan,代码行数:31,代码来源:edit_mother_form.php


示例11: tr

                            <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 
开发者ID:xemmex,项目名称:codeigniter3-website-template,代码行数:30,代码来源:edit.php


示例12: foreach

    ?>
</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));
    }
开发者ID:beholder17,项目名称:rich.files,代码行数:31,代码来源:orders_v.php


示例13: get_server_status

	function get_server_status()
	{
		echo get_status();
	}
开发者ID:rithyskun,项目名称:vBilling,代码行数:4,代码来源:freeswitch.php


示例14: isset

 }
 $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='{$_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'] . ')');
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:know.php


示例15: get_totalsubmissions

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;
}
开发者ID:eduagdo,项目名称:emarking,代码行数:6,代码来源:reportsquerylib.php


示例16: get_status

    } 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>
开发者ID:kimniyom,项目名称:transport,代码行数:30,代码来源:view.php


示例17: do_ticket

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 ? "&nbsp;&nbsp;<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 .= "&nbsp;&nbsp;" . 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 .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$nature}:&nbsp;&nbsp;" . 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 ? "" : "&nbsp;&nbsp;&nbsp;&nbsp;({$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 ? "" : "&nbsp;&nbsp;by " . get_owner($theRow['call_taker']) . "&nbsp;&nbsp;";
    // 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 .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Updated:&nbsp;&nbsp;" . 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'>&nbsp;\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 .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End:&nbsp;&nbsp;" . format_date($theRow['problemend']) . "&nbsp;&nbsp;({$elaped_str})</TD></TR>\n";
    $locale = get_variable('locale');
    // 08/03/09
    switch ($locale) {
        case "0":
            $grid_type = "&nbsp;&nbsp;&nbsp;&nbsp;USNG&nbsp;&nbsp;" . LLtoUSNG($theRow['lat'], $theRow['lng']);
            break;
        case "1":
            $grid_type = "&nbsp;&nbsp;&nbsp;&nbsp;OSGB&nbsp;&nbsp;" . 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 = "&nbsp;&nbsp;&nbsp;&nbsp;UTM&nbsp;&nbsp;" . 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']) . "&nbsp;&nbsp;&nbsp;" . 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;
}
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:88,代码来源:functions_major.inc.php


示例18: type_select

         $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']);
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:news.inc.php


示例19: make_status_of_zbx


                      

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_status_color函数代码示例发布时间:2022-05-15
下一篇:
PHP get_stats函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap