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


PHP show_status函数代码示例

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


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

示例1: mn_status

function mn_status()
{
    echo '<div class="wrap"><h2>MoIP Status</h2>';
    if (isset($_POST['mn_submit'])) {
        update_option('mn_moip_login', $_POST['mn_moip_login']);
        update_option('mn_moip_pass', $_POST['mn_moip_pass']);
        show_status();
    }
    ?>
	
	<p>O MoIPStatus é uma ferramenta que permite a consulta de saldo e a lista das dez últimas transações sem a necessidade de efetuar login no MoIP</p>
	
	<?php 
    if (!get_option('mn_moip_login') or !get_option('mn_moip_pass')) {
        ?>
		<p>Você precisa configurar a sua conta no MoIP antes de usar este plugin:</p>
		<form action="" method="post">
			<?php 
        credentials_table();
        ?>
			
			<div class="submit">
			    <input type="submit" name="mn_submit" id="mn_submit" value="<?php 
        _e('Verificar Status &raquo;');
        ?>
" />
			</div>
		</form>

	<?php 
    } else {
        ?>
		<a href="#" onclick="jQuery('#tbl_credentials').show(); jQuery(this).hide(); return false;" />Alterar login/senha</a>
		<form action="" method="post">
			<div id="tbl_credentials" style="display:none">
				<?php 
        credentials_table();
        ?>
			</div>
			<div class="submit">
			    <input type="submit" name="mn_submit" id="mn_submit" value="<?php 
        _e('Verificar Status &raquo;');
        ?>
" />
			</div>
		</form>
	<?php 
    }
    echo '</div>';
}
开发者ID:rodrigoluizgenz,项目名称:wp-moip,代码行数:50,代码来源:status.php

示例2: testShow_consultants

 function testShow_consultants()
 {
     global $db, $t, $bx;
     $db_config = new mock_db_configure(2);
     $db_q = array(0 => "SELECT * FROM consultants,auth_user WHERE " . "proid='%s' AND username=consultant ORDER " . "BY creation");
     $dat = $this->_generate_records(array("proid"), 2);
     $rows = $this->_generate_records(array("username", "status", "creation"), 3);
     $db_config->add_query(sprintf($db_q[0], $dat[0]["proid"]), 0);
     $db_config->add_query(sprintf($db_q[0], $dat[1]["proid"]), 1);
     $db_config->add_num_row(0, 0);
     $db_config->add_num_row(3, 1);
     $db_config->add_record($rows[0], 1);
     $db_config->add_record($rows[1], 1);
     $db_config->add_record($rows[2], 1);
     // first test: no data to list, print error message
     $db = new DB_SourceAgency();
     $bx = new box();
     $this->set_msg("test 1");
     $this->capture_call('show_consultants', 64, &$dat[0]);
     $this->_testFor_pattern("No developers have offered " . "themselves as consultants yet");
     // second test: three pieces of data
     $db = new DB_SourceAgency();
     $bx = $this->_create_default_box();
     $this->set_msg('test 2');
     $this->capture_call('show_consultants', 3573, &$dat[1]);
     $this->_checkFor_a_box('Consultants');
     $this->_checkFor_columns(4);
     $this->_checkFor_column_titles(array("Number", "Username", "Status", "Creation"), '', '', '');
     $colors = array(1 => 'gold', 0 => '#FFFFFF');
     for ($idx = 1; $idx < 4; $idx++) {
         $row = $rows[$idx - 1];
         $this->set_msg("Test {$idx}");
         $this->_testFor_box_next_row_of_columns();
         $this->_checkFor_column_values(array('<b>' . $idx . '</b>', '<b>' . lib_nick($row['username']), '<b>' . show_status($row["status"]) . '</b>', '<b>' . timestr(mktimestamp($row["creation"])) . '</b>'), '', '', $colors[$idx % 2]);
     }
     $this->_check_db($db_config);
 }
开发者ID:BackupTheBerlios,项目名称:sourceagency,代码行数:37,代码来源:TestConsultantslib.php

示例3: isset

<?php

$status = isset($_GET["status"]);
page_header($status ? lang('Status') : lang('Variables'));
$variables = $status ? show_status() : show_variables();
if (!$variables) {
    echo "<p class='message'>" . lang('No rows.') . "\n";
} else {
    echo "<table cellspacing='0'>\n";
    foreach ($variables as $key => $val) {
        echo "<tr>";
        echo "<th><code class='jush-" . $jush . ($status ? "status" : "set") . "'>" . h($key) . "</code>";
        echo "<td>" . nbsp($val);
    }
    echo "</table>\n";
}
开发者ID:ly95,项目名称:adminer,代码行数:16,代码来源:variables.inc.php

示例4: show_status

    case "BUILDING":
        show_status($ci_status, "images/build.png", "green");
        break;
    case "DEPLOYING":
        show_status($ci_status, "images/deploy.png", "orange");
        break;
    case "FUNCTEST_PREP":
        show_status($ci_status, "images/test.png", "red");
        break;
    case "FUNCTEST_TEMPEST":
        show_status($ci_status, "images/test.png", "red");
        break;
    case "FUNCTEST_RALLY":
        show_status($ci_status, "images/test.png", "red");
        break;
    case "FUNCTEST_ODL":
        show_status($ci_status, "images/test.png", "red");
        break;
    case "FUNCTEST_VPING":
        show_status($ci_status, "images/test.png", "red");
        break;
    case "CLEANING":
        show_status($ci_status, "images/clean.png", "blue");
        break;
}
echo "</pre>";
?>
    </p>
  </body>
</html>
开发者ID:jonasbjurel,项目名称:OPNFV-Playground,代码行数:30,代码来源:status.php

示例5: mysql_query

            $gid = $_REQUEST['gid'];
            $uid = $_REQUEST['uid'];
            mysql_query("INSERT INTO usergroup (uid, gid) VALUES " . "('" . mysql_real_escape_string($uid) . "', '" . mysql_real_escape_string($gid) . "')") or die('Error adding user to group: ' . mysql_error());
            show_status('Added user ' . $uid . " to group " . $gid);
            break;
        case 'delfromgrp':
            $gid = $_REQUEST['gid'];
            $uid = $_REQUEST['uid'];
            mysql_query("DELETE FROM usergroup WHERE gid='" . mysql_real_escape_string($gid) . "' AND " . "uid='" . mysql_real_escape_string($uid) . "'") or die('Error deleting group associations: ' . mysql_error());
            show_status('Removed user ' . $uid . " from group " . $gid);
            break;
        case 'login':
            # Used to require login
            break;
        default:
            show_status('Invalid Command');
            break;
    }
}
echo "<div id='users'>";
echo "<h2>Change Password:</h2>";
echo "<table>";
echo "<form action='{$_SERVER['PHP_SELF']}' METHOD='post'>\n";
echo "<tr><th>User:</th><td>";
if ($admin) {
    get_name_options();
} else {
    echo $user;
    echo "<input type='hidden' value='" . $user . "'/>";
}
echo "</td></tr>";
开发者ID:CauldronDevelopmentLLC,项目名称:webserver,代码行数:31,代码来源:chpasswd.php

示例6: format_date

            echo format_date($_obj['publish_time']);
            ?>
</td>
						<td><div admin_type="text"
		              	admin_para="m=update&table=item&column=status&id=<?php 
            echo $_obj['item_id'];
            ?>
" 
		                    admin_select_value="<?php 
            echo $_obj['status'];
            ?>
"
		                    admin_select_source_id="status_select"
		                    admin_trigger="click"
							><?php 
            echo show_status($_obj['status']);
            ?>
</div></td>
                        <td>
                        	<a href="admin.php?p=item&action=edit_item&item_id=<?php 
            echo $_obj['item_id'];
            ?>
"> 编辑</a>&nbsp;
                            <a href="javascript:;" onclick="if (confirm(' 确定要删除吗?')) delete_item(<?php 
            echo $_obj['item_id'];
            ?>
,this);"> 删除</a>&nbsp;
                            	<?php 
            if ($_obj['status'] == "0") {
                ?>
								<?php 
开发者ID:TopGrd,项目名称:newxb,代码行数:31,代码来源:qs_38f9704f515d6ecc4e107c8569da8cd7.php

示例7: _checkFor_show_proposals

 function _checkFor_show_proposals($proid, &$row, $count_star_1, $count_star_2)
 {
     global $t, $sess;
     $strings = array('><b>' . $t->translate('Developing Proposal') . '</b><', '<b>' . lib_nick($row['username']) . ' - ' . timestr(mktimestamp($row['creation'])) . "</b>\n");
     foreach ($strings as $str) {
         $this->_testFor_pattern($this->_to_regexp($str));
     }
     $tv = array('Cost' => $row['cost'] . " euros", 'License' => $row['license'], 'Status' => show_status($row['status']), 'Valid' => timestr_middle(mktimestamp($row['valid'])), 'Start' => timestr_middle(mktimestamp($row['start'])), 'Duration' => $row['duration'] . " weeks");
     while (list($key, $val) = each($tv)) {
         $str = sprintf("<b>%s:</b> %s\n", $t->translate($key), $val);
         $this->_testFor_pattern("[<]..?[>]" . $this->_to_regexp($str));
     }
     /** check for a cooperation link or not .... **/
     $str1 = html_link('cooperation.php3', array('proid' => $proid, 'devid' => $row['devid']), 'Cooperation') . ' [' . $count_star_1 . ']';
     $str2 = 'Cooperation [' . $count_star_1 . ']';
     if ($row['cooperation'] != 'No') {
         if ($count_star_1) {
             $this->_testFor_pattern($this->_to_regexp($str1));
             $this->reverse_next_test();
             $this->_testFor_pattern($this->_to_regexp($str2));
         } else {
             $this->reverse_next_test();
             $this->_testFor_pattern($this->_to_regexp($str1));
             $this->_testFor_pattern($this->_to_regexp($str2));
         }
     } else {
         $this->reverse_next_test();
         $this->_testFor_pattern($this->_to_regexp($str1));
         $this->reverse_next_test();
         $this->_testFor_pattern($this->_to_regexp($str2));
     }
     /** check for a comments link **/
     $str1 = html_link('comments.php3', array('proid' => $proid, 'type' => 'proposals', 'number' => $row['devid']), 'Comments') . ' [' . $count_star_2 . "]\n";
     $str2 = 'Comments [0]';
     if ($count_star_2 > 0) {
         $this->_testFor_pattern($this->_to_regexp($str1));
         $this->reverse_next_test();
         $this->_testFor_pattern($this->_to_regexp($str2));
     } else {
         $this->reverse_next_test();
         $this->_testFor_pattern($this->_to_regexp($str1));
         $this->_testFor_pattern($this->_to_regexp($str2));
     }
     $str = "<FONT SIZE=-1>[ <a href=\"" . $sess->url("comments_edit.php3") . $sess->add_query(array("proid" => $proid, "type" => "proposal", "number" => $row["devid"])) . "\">Comment This Proposal</a> ]</FONT><p>\n";
     $this->_testFor_pattern($this->_to_regexp($str));
 }
开发者ID:BackupTheBerlios,项目名称:sourceagency,代码行数:46,代码来源:TestContentlib.php

示例8: header

     if (defined('SAE_ACCESSKEY')) {
         header('Location: sae.php');
         exit;
     } elseif (getenv('OPENSHIFT_APP_NAME')) {
         $extra_script = '<script type="text/javascript">if(confirm("要使用 OpenShift 一键安装向导吗?")) location.href="openshift.php";</script>';
     }
     $content = '<p>欢迎使用 贴吧签到助手 安装向导!</p><p>本程序将会指引你在服务器上配置好“贴吧签到助手”</p><p>点击右侧的“下一步”按钮开始</p><p class="btns"><button onclick="location.href=\'./?step=check\';">下一步 &raquo;</button>';
     show_install_page('Welcome', $content);
     break;
 case 'check':
     $content = '<p>安装前,程序需要检查当前的服务器环境是否允许运行“贴吧签到助手”</p><p>请确保表格中每一行均为绿色,以避免可能带来的问题</p><table><thead><tr><td>项目</td><td>要求</td><td>当前状态</td></tr></thead><tbody>';
     $content .= '<tr><td>PHP 版本</td><td><span class="status on">5.2</span></td><td><span class="status ' . (version_compare('5.2.0', PHP_VERSION, '<') ? 'on' : 'off') . '">' . PHP_VERSION . '</span></td></tr>';
     $content .= '<tr><td>PHP: allow_url_fopen</td><td>' . show_status(true) . '</td><td>' . show_status(ini_get('allow_url_fopen')) . '</td></tr>';
     $content .= '<tr><td>CURL</td><td>' . show_status(true) . '</td><td>' . show_status(function_exists('curl_init')) . '</td></tr>';
     $content .= '<tr><td>Socket 连接</td><td>' . show_status(true) . '</td><td>' . show_status(function_exists('fsockopen') || function_exists('pfsockopen')) . '</td></tr>';
     $content .= '<tr><td>system/config.inc.php</td><td>' . show_status(true, '可写') . '</td><td>' . show_status(is_writable($config_file), '可写', '不可写') . '</td></tr>';
     $content .= '</tbody></table>';
     if (function_exists('curl_init') && (function_exists('fsockopen') || function_exists('pfsockopen')) && is_writable($config_file)) {
         $content .= '<br><p class="btns"><button onclick="location.href=\'./?step=database\';">下一步 &raquo;</button></p>';
     }
     show_install_page('服务器兼容性检查', $content);
     break;
 case 'database':
     $content = '<div class="config"><p>请填写数据库连接信息</p><br>';
     $content .= '<form action="./?step=install" method="post" onsubmit="show_waiting();">';
     $content .= '<p><span>数据库服务器:</span><input type="text" name="db_server" value="localhost" /></p>';
     $content .= '<p><span>数据库端口:</span><input type="text" name="db_port" value="3306" /></p>';
     $content .= '<p><span>数据库用户名:</span><input type="text" name="db_username" value="root" /></p>';
     $content .= '<p><span>数据库密码:</span><input type="password" name="db_password" /></p>';
     $content .= '<p><span>数据库名:</span><input type="text" name="db_name" value="kk_sign" /></p>';
     if (function_exists('mysql_pconnect')) {
开发者ID:istobran,项目名称:Tieba_Sign,代码行数:31,代码来源:index.php

示例9: CheckHash

function CheckHash($Dictionary = array(), $HashAlgo, $Hash, $LogFile = false)
{
    if ($LogFile) {
        LogToFile(Log_Start($Hash), $LogFile);
    }
    foreach ($Dictionary as $Value) {
        if ($LogFile) {
            LogToFile(Log_Dictionary($Value), $LogFile);
        }
        $Count = 0;
        $NrPasswords = 0;
        print_r("\n-----------------------------------------------------------------------------\n\t\tUsing {$Value} as dictionary\n-----------------------------------------------------------------------------\r\n");
        $NrPasswords = CountLines($Value);
        $Count = 1;
        $Dict = fopen($Value, "rb");
        while (!feof($Dict)) {
            $Password = fgets($Dict);
            $Password = str_replace(array("\r", "\n"), '', $Password);
            if (($Result = hash($HashAlgo, $Password)) === $Hash) {
                show_status($NrPasswords, $NrPasswords);
                // Finish the progressbar
                if ($LogFile) {
                    LogToFile(Log_End("[+] MATCH FOUND! for " . $Hash . " -> " . $Password), $LogFile);
                }
                return array($Result, $Password);
            }
            show_status($Count, $NrPasswords);
            // Show a progress bar for each password -> dictionary is empty.
            $Count++;
        }
        fclose($Dict);
    }
    return false;
}
开发者ID:CodeBarbarian,项目名称:PHP,代码行数:34,代码来源:index.php

示例10: elseif

    if ($mem['char_role'] == '9223372036854775807' && $mem['char_id'] != $G_site_admin) {
        if ($mem['sec_site_admin']) {
            $siterole = ' <a href="./?module=data&part=users&a=remove&id=' . $mem['char_id'] . '">Remove Access</a>';
        } else {
            $siterole = ' <a href="./?module=data&part=users&a=give&id=' . $mem['char_id'] . '">Give Access</a>';
        }
    } elseif ($mem['char_role'] == '9223372036854775807' && $mem['char_id'] == $G_site_admin) {
        $siterole = ' Main';
    } else {
        $siterole = ' No Access';
    }
    $wrt .= '<tr class="hilite">';
    $wrt .= '<td>' . $mem['char_name'] . '</td>';
    $wrt .= '<td>' . show_status('yn', $verified) . '</td>';
    $wrt .= '<td>' . show_status('yn', $gpwd) . '</td>';
    $wrt .= '<td>' . show_status('yn', $adm) . '' . $siterole . '</td>';
    $wrt .= '';
    $wrt .= '';
    $wrt .= '';
    $wrt .= '</td>';
}
$wrt .= '';
$wrt .= '';
$wrt .= '';
$wrt .= '</table>';
$wrt .= '
<script type="text/javascript">
       $(document).ready(function(){
		$(\'.hilite\').hover(function(){
			$(this).children().addClass(\'datahighlight\');
		},function(){
开发者ID:CraXyOW3,项目名称:eve_cms,代码行数:31,代码来源:index.php

示例11: intval

            $putsk .= "\t\tInterval: " . intval($skunit['Interval'][$key]) . "\n";
        }
        if (isset($skunit['Target'][$key]) && $skunit['Target'][$key] != "noone") {
            $putsk .= "\t\tTarget: \"" . trim(ucfirst($skunit['Target'][$key])) . "\"\n";
        }
        if (isset($skunit['Flag'][$key]) && $skunit['Flag'][$key] != "") {
            $putsk .= "\t\tFlag: " . getunitflag($skunit['Flag'][$key], $id) . "\n";
        }
        $putsk .= "\t}\n";
    }
    // close skill
    $putsk .= "},\n";
    // Display progress bar
    show_status($i++, $linecount);
}
show_status($linecount, $linecount);
/**
 * Print final messages and exit the script, conversion has completed.
 */
print "\n";
print "The skill database has been [1;32msuccessfully[0m converted to Hercules' libconfig\n";
print "format and has been saved as '" . DIRPATH . "skill_db.conf'.\n";
print "The following files are now deprecated and can be deleted -\n";
print DIRPATH . "skill_db.txt\n";
print DIRPATH . "skill_cast_db.txt\n";
print DIRPATH . "skill_castnodex_db.txt\n";
print DIRPATH . "skill_require_db.txt\n";
print DIRPATH . "skill_unit_db.txt\n";
$putsk .= ")";
$skconf = "skill_db.conf";
file_put_contents(DIRPATH . $skconf, $putsk);
开发者ID:KirieZ,项目名称:Hercules,代码行数:31,代码来源:skilldbconverter.php

示例12: wpa_cli

<!doctype html>
<html>
 <head>
  <title>wpa_cli_php demo</title>
 </head>
 <body>
 <?php 
include "wpa_cli.php";
$wpa_cli = new wpa_cli();
while (true) {
    if ($wpa_cli->scan() === true) {
        show_status($wpa_cli);
        show_results($wpa_cli);
        break;
    } else {
        sleep(0.5);
    }
}
function show_status($wpa_cli)
{
    $status = $wpa_cli->status();
    echo <<<EOF
 <h2>status()</h2>
 <table>
  <thead>
   <tr>
    <th>key</th>
    <th>value</th>
   </tr>
  </thead>
  <tbody>
开发者ID:realies,项目名称:wpa_cli_php,代码行数:31,代码来源:demo.php

示例13: testShow_sponsorings

 function testShow_sponsorings()
 {
     global $db, $auth, $bx, $t;
     $func_name = 'show_sponsorings';
     $auth->set_uname("this is the username");
     $auth->set_perm("this is the permission");
     $db_config = new mock_db_configure(9);
     $db_q = array(0 => "SELECT * FROM sponsoring,auth_user WHERE " . "proid='%s' AND sponsor=username ORDER " . "BY sponsoring.creation ASC", 1 => "SELECT * FROM sponsoring WHERE proid='%s' " . "AND status='A' AND sponsor='%s'");
     $db_d = $this->_generate_records(array("proid"), 4);
     $rows = $this->_generate_records(array("creation", "username", "budget", "status", "valid", "begin", "finish", "spoid", "sponsoring_text"), 3);
     // first call initialisations
     $db_config->add_query(sprintf($db_q[0], $db_d[0]["proid"]), 0);
     $db_config->add_record(false, 0);
     $db_config->add_num_row(0, 0);
     // second call configurations
     $db_config->add_query(sprintf($db_q[0], $db_d[1]["proid"]), 1);
     $rows[0]["status"] = "D";
     // status is deleted
     $db_config->add_record($rows[0], 1);
     $db_config->add_record(false, 1);
     $db_config->add_num_row(1, 1);
     // instance two of the database is the one used for doing
     // the lib_show_comments_on_it on the second call which is already
     // tested so there is no need to test it here, therefore configure
     // its database to ignore all errors.
     $db_config->ignore_all_errors(2);
     // third call configuration, here is_accepted_sponsor is called and
     // returns true
     $db_config->add_query(sprintf($db_q[0], $db_d[2]["proid"]), 3);
     $rows[1]["status"] = "P";
     $db_config->add_record($rows[1], 3);
     $db_config->add_record(false, 3);
     $db_config->add_num_row(1, 3);
     $db_config->add_query(sprintf($db_q[1], $db_d[2]["proid"], $auth->auth["uname"]), 4);
     $db_config->add_num_row(1, 4);
     // is_accepted_sponsor returns true
     // instance for the lib_show_comments_on_it call
     $db_config->ignore_all_errors(5);
     // fourth call configuration, is_accepted_sponsor returns false
     $db_config->add_query(sprintf($db_q[0], $db_d[3]["proid"]), 6);
     $rows[2]["status"] = "P";
     $db_config->add_record($rows[2], 6);
     $db_config->add_record(false, 6);
     $db_config->add_num_row(1, 6);
     $db_config->add_query(sprintf($db_q[1], $db_d[3]["proid"], $auth->auth["uname"]), 7);
     $db_config->add_num_row(0, 7);
     // is_accepted_sponsor returns true
     // instance for the lib_show_comments_on_it call
     $db_config->ignore_all_errors(8);
     // first call, no records
     $bx = $this->_create_default_box();
     $db = new DB_SourceAgency();
     $this->capture_call($func_name, 84, $db_d[0]);
     $this->set_msg('test 1');
     $this->_testFor_pattern("<p>There have not been posted any" . " sponsoring involvement wishes " . "to this project.<p>");
     // second call, one record but don't do is_accepted_sponsor call
     // i.e. status is not 'P'
     $bx = $this->_create_default_box();
     $db = new DB_SourceAgency();
     $this->capture_call($func_name, 1090, $db_d[1]);
     $this->set_msg('test 2');
     $this->_checkFor_a_box('Sponsor Involvement');
     $this->_testFor_lib_nick($rows[0]['username']);
     $v = array('Status' => show_status($rows[0]['status']), 'Validity' => timestr_middle(mktimestamp($rows[0]['valid'])), 'Finish before' => timestr_middle(mktimestamp($rows[0]['finish'])), 'Begin wished' => timestr_middle(mktimestamp($rows[0]['begin'])), 'Max. sum of money' => $rows[0]['budget'] . " euros", 'Comments to the involvement' => $rows[0]['sponsoring_text']);
     while (list($key, $val) = each($v)) {
         $this->_testFor_pattern($this->_to_regexp('<b>' . $t->translate($key) . ':</b> ' . $val));
     }
     $this->_testFor_lib_comment_it($db_d[1]["proid"], 'Sponsoring', $rows[0]['spoid'], '0', 'Comment on Sponsor Involvement #' . $rows[0]['spoid'], $t->translate('Comment it!'));
     // third call, is_accepted_sponsor returns true after being called
     $bx = $this->_create_default_box();
     $db = new DB_SourceAgency();
     $this->capture_call($func_name, 1426, $db_d[2]);
     $this->set_msg('test 3');
     $this->_checkFor_a_box('Sponsor Involvement');
     $this->_testFor_lib_nick($rows[1]['username']);
     $v = array('Status' => show_status($rows[1]['status']), 'Validity' => timestr_middle(mktimestamp($rows[1]['valid'])), 'Finish before' => timestr_middle(mktimestamp($rows[1]['finish'])), 'Begin wished' => timestr_middle(mktimestamp($rows[1]['begin'])), 'Max. sum of money' => $rows[1]['budget'] . " euros", 'Comments to the involvement' => $rows[1]['sponsoring_text']);
     while (list($key, $val) = each($v)) {
         $this->_testFor_pattern($this->_to_regexp('<b>' . $t->translate($key) . ':</b> ' . $val));
     }
     $ps = array(0 => "<b><a href=\"sponsoring_accepted.php3[?]proid=" . "proid_2&sponsor=username_1\" class=\"\">" . $t->translate("Accept this sponsor involvement") . "<\\/a>");
     $this->_testFor_patterns($ps, 1);
     $this->_testFor_lib_comment_it($db_d[2]["proid"], 'Sponsoring', $rows[1]['spoid'], '0', 'Comment on Sponsor Involvement #' . $rows[1]['spoid'], $t->translate('Comment it!'));
     // fourth call, is_accepted_sponsor is called and returns false
     $bx = $this->_create_default_box();
     $db = new DB_SourceAgency();
     $this->capture_call($func_name, 1125, $db_d[3]);
     $this->set_msg('test 4');
     $this->_checkFor_a_box('Sponsor Involvement');
     $this->_testFor_lib_nick($rows[2]['username']);
     $v = array('Status' => show_status($rows[2]['status']), 'Validity' => timestr_middle(mktimestamp($rows[2]['valid'])), 'Finish before' => timestr_middle(mktimestamp($rows[2]['finish'])), 'Begin wished' => timestr_middle(mktimestamp($rows[2]['begin'])), 'Max. sum of money' => $rows[2]['budget'] . " euros", 'Comments to the involvement' => $rows[2]['sponsoring_text']);
     while (list($key, $val) = each($v)) {
         $this->_testFor_pattern($this->_to_regexp('<b>' . $t->translate($key) . ':</b> ' . $val));
     }
     $this->_testFor_lib_comment_it($db_d[3]["proid"], 'Sponsoring', $rows[2]['spoid'], '0', 'Comment on Sponsor Involvement #' . $rows[2]['spoid'], $t->translate('Comment it!'));
     // finally check that everything went smoothly with the DB
     $this->_check_db($db_config);
 }
开发者ID:BackupTheBerlios,项目名称:sourceagency,代码行数:97,代码来源:TestSponsoringlib.php

示例14: while

while ($row = mysqli_fetch_assoc($result)) {
    ?>
								<tr>
									<td><strong><?php 
    echo $row['name'];
    ?>
</strong><br />&nbsp;&nbsp;&nbsp;<small><?php 
    echo $row['url'];
    ?>
</small></td>
									<td><?php 
    echo show_fetch_type($row['fetch_type']);
    ?>
</td>
									<td><?php 
    echo show_status($row['status']);
    ?>
</td>
									<td><?php 
    echo $row['last_fetch_date'] != NULL ? relative_time(strtotime($row['last_fetch_date'])) : 'Mai';
    ?>
</td>
									<td><strong><?php 
    echo show_last_result($row['last_fetch_result'], $row['last_fetch_increment']);
    ?>
</strong></td>
								</tr>
<?php 
}
mysqli_free_result($result);
?>
开发者ID:Ereza,项目名称:Fansubs.cat,代码行数:31,代码来源:status.php

示例15: load_txt_strings

}
load_txt_strings();
// Setup the information
// The keys on these entries need to match
// what is in the $txt keys/brackets above
// Makes for easy adding of extra info, or deleting
$context['smfinfo'] = array('db_last_error' => !empty($db_last_error) ? date(DATE_RFC822, $db_last_error) : $txt['none'], 'auto_fix_db' => get_smf_setting('autoFixDatabase', 'on'), 'db_persist' => get_smf_setting('db_persist', 'off'), 'db_debug' => get_smf_setting('db_show_debug', 'off'), 'enable_error' => get_smf_setting('enableErrorLogging', 'on'), 'database_sessions' => get_smf_setting('databaseSession_enable'), 'database_loose' => get_smf_setting('databaseSession_loose'), 'session_timeout' => !empty($modSettings['databaseSession_lifetime']) ? $modSettings['databaseSession_lifetime'] . ' ' . $txt['seconds'] : '<i>' . $txt['empty'] . '</i>&nbsp;<strong>(' . $txt['recommended'] . ': >300)</strong>', 'maintenance_mode' => get_smf_setting('maintenance'), 'time_load' => get_smf_setting('timeLoadPageEnable'), 'hostname_lookup' => get_smf_setting('disableHostnameLookup'), 'cache' => (!empty($modSettings['cache_enable']) ? $txt['cache_level'] . ' ' . $modSettings['cache_enable'] : $txt['off']) . ($modSettings['cache_enable'] != '1' ? '&nbsp;<strong>(' . $txt['recommended'] . ': ' . $txt['cache_level'] . ' 1)</strong>' : ''), 'memcached_settings' => isset($modSettings['cache_memcached']) && trim($modSettings['cache_memcached']) != '' ? trim($modSettings['cache_memcached']) : '<i>' . $txt['empty'] . '</i>', 'cookie_name' => !empty($cookiename) ? $cookiename : '<i>' . $txt['empty'] . '</i>&nbsp;<strong>(' . $txt['recommended'] . ': SMFCookie' . rand(100, 999) . ')</strong>', 'local_cookies' => get_smf_setting('localCookies', 'off'), 'global_cookies' => get_smf_setting('globalCookies'), 'log_pruning' => get_smf_setting('pruningOptions', 'on'), 'sef_urls' => get_smf_setting('queryless_urls'), 'compressed_output' => get_smf_setting('enableCompressedOutput'));
$context['phpinfo'] = array('safe_mode' => get_php_setting('safe_mode', 'off'), 'open_base' => ($ob = ini_get('open_basedir')) ? $ob : $txt['none'], 'display_errors' => get_php_setting('display_errors', 'off'), 'file_uploads' => get_php_setting('file_uploads', 'on'), 'magic_quotes' => get_php_setting('magic_quotes_gpc', 'off'), 'register_globals' => get_php_setting('register_globals', 'off'), 'output_buffering' => get_php_setting('output_handler'), 'session_save' => ($path = ini_get('session.save_path')) ? $path : $txt['none'], 'session_auto' => (int) ini_get('session.auto_start'), 'xml_enabled' => extension_loaded('xml') ? $txt['on'] : $txt['off'], 'zlib_enabled' => extension_loaded('zlib') ? $txt['on'] : $txt['off']);
show_header();
show_system_info();
show_php_info();
show_detailed_file();
show_detailed_db();
show_mods();
show_error_log();
show_status();
show_footer();
function show_header()
{
    global $txt, $smfInfo, $context, $smfinfo_version;
    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>

		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
		<title>', $txt['title'], '</title>
		<style type="text/css">
			body
			{
				background-color: #E5E5E8;
				margin: 0px;
开发者ID:Rupurudu,项目名称:tools,代码行数:31,代码来源:smfinfo.php


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