本文整理汇总了PHP中print_test_result函数的典型用法代码示例。如果您正苦于以下问题:PHP print_test_result函数的具体用法?PHP print_test_result怎么用?PHP print_test_result使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_test_result函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: print_test_row
function print_test_row($p_description, $p_pass)
{
echo '<tr>';
echo '<td bgcolor="#ffffff">';
echo $p_description;
echo '</td>';
if ($p_pass) {
print_test_result(GOOD);
} else {
print_test_result(BAD);
}
echo '</tr>';
}
示例2: print_test_result
<td bgcolor="#ffffff">
Write settings to database
</td>
<?php
$result = true;
$sql = "update {$db_prefix}config set val='" . $_POST['skin'] . '\' where name=\'skin\'';
$result = $g_db->Execute($sql);
$sql = "update {$db_prefix}config set val='" . $_POST['lang'] . '\' where name=\'language\'';
$result = $result && $g_db->Execute($sql);
if ($result) {
print_test_result(GOOD);
} else {
print_test_result(BAD);
}
?>
</tr>
</table>
<p align="center">
[ <a href="index.php">Back to Administration</a> ]
</p>
示例3: print_test_warn_row
function print_test_warn_row($p_description, $p_pass, $p_info = null)
{
global $f_showall;
if ($f_showall == false && $p_pass == true) {
return $p_pass;
}
echo '<tr><td bgcolor="#ffffff">' . $p_description;
if ($p_info != null) {
if (is_array($p_info)) {
echo '<br /><i>' . $p_info[$p_pass] . '</i>';
} else {
echo '<br /><i>' . $p_info . '</i>';
}
}
echo '</td>';
if ($p_pass) {
print_test_result(GOOD);
} else {
print_test_result(WARN);
}
echo '</tr>';
return $p_pass;
}
示例4: exit
echo "failed\n";
exit(1);
}
echo "OK\n";
$g_db_connected = true;
# fake out database access routines used by config_get
$t_last_update = config_get('database_version', -1, ALL_USERS, ALL_PROJECTS);
$lastid = count($upgrade) - 1;
$i = $t_last_update + 1;
while ($i <= $lastid && !$g_failed) {
echo 'Create Schema ( ' . $upgrade[$i][0] . ' on ' . $upgrade[$i][1][0] . ' )';
$dict = NewDataDictionary($g_db);
if ($upgrade[$i][0] == 'InsertData') {
$sqlarray = call_user_func_array($upgrade[$i][0], $upgrade[$i][1]);
} else {
$sqlarray = call_user_func_array(array($dict, $upgrade[$i][0]), $upgrade[$i][1]);
}
$ret = $dict->ExecuteSQLArray($sqlarray);
if ($ret == 2) {
print_test_result(GOOD);
config_set('database_version', $i);
} else {
print_test_result(BAD, true, $sqlarray[0] . '<br />' . $g_db->ErrorMsg());
}
$i++;
}
if (false == $g_failed) {
exit(0);
}
exit(1);
# vim: noexpandtab tabstop=4 softtabstop=0:
示例5: print_test
/**
* Print Test result
*
* @param string $p_test_description Test Description.
* @param integer $p_result Result - BAD|GOOD.
* @param boolean $p_hard_fail Fail installation or soft warning.
* @param string $p_message Message to display to user.
* @return void
*/
function print_test($p_test_description, $p_result, $p_hard_fail = true, $p_message = '')
{
echo '<tr><td bgcolor="#ffffff">' . $p_test_description . '</td>';
print_test_result($p_result, $p_hard_fail, $p_message);
echo '</tr>' . "\n";
}
示例6: print_test
function print_test($p_test_description, $p_result, $p_hard_fail = true, $p_message = '')
{
echo "\n<tr><td bgcolor=\"#ffffff\">{$p_test_description}</td>";
print_test_result($p_result, $p_hard_fail, $p_message);
echo "</tr>\n";
}
示例7: print_test_row
function print_test_row($p_description, $p_pass, $p_info = null)
{
$t_output = NULL;
$f_showall = FALSE;
if ($f_showall == false && $p_pass == true) {
return $t_output;
}
$t_output .= '<tr><td bgcolor="#ffffff">' . $p_description;
if ($p_info != null) {
if (is_array($p_info)) {
if (isset($p_info[$p_pass])) {
$t_output .= '<br /><i>' . $p_info[$p_pass] . '</i>';
}
} else {
$t_output .= '<br /><i>' . $p_info . '</i>';
}
}
$t_output .= '</td>';
if ($p_pass) {
$t_output .= print_test_result(GOOD);
} else {
$t_output .= print_test_result(BAD);
}
$t_output .= '</tr>';
return $t_output;
}
示例8: call_user_func
}
echo 'Schema step ' . $i . ': ' . $g_upgrade[$i][0] . ' ( ' . $t_target . ' ) ';
if ($t_sql) {
$t_ret = $t_dict->ExecuteSQLArray($t_sqlarray, false);
} else {
if (isset($t_sqlarray[1])) {
$t_ret = call_user_func('install_' . $t_sqlarray[0], $t_sqlarray[1]);
} else {
$t_ret = call_user_func('install_' . $t_sqlarray[0]);
}
}
if ($t_ret == 2) {
print_test_result(GOOD);
config_set('database_version', $i);
} else {
$t_msg = $t_sqlarray[0];
if (!is_blank($g_db->ErrorMsg())) {
$t_msg .= "\n" . $g_db->ErrorMsg();
}
print_test_result(BAD, true, $t_msg);
}
$i++;
$t_count_done++;
}
echo $t_count_done . ' schema upgrades executed.' . "\n";
if (false == $g_failed) {
echo 'Done.' . "\n";
exit(0);
}
echo "Failed.\n";
exit(1);