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


PHP show_results函数代码示例

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


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

示例1: show_results

function show_results($result, $id, $indent = null)
{
    foreach ($result[$id] as $value) {
        echo "{$indent}{$value}<br/>";
        if (isset($result["{$value}"])) {
            show_results($result, $value, $indent . implode('&nbsp;', array_fill(0, 12, '')));
        }
    }
}
开发者ID:clearvox,项目名称:TableDnD,代码行数:9,代码来源:ajaxJSONTest.php

示例2: start_benchmark

function start_benchmark()
{
    $pdo = new PDO(BENCHMARK_DSN, BENCHMARK_USER, BENCHMARK_PASS);
    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    $queue = new MyQueue($pdo, BENCHMARK_QNAME);
    setup_table($pdo, BENCHMARK_QNAME);
    $results = array();
    try {
        $results['push'] = benchmark_push($queue, BENCHMARK_MSG_NUM);
        $results['pop'] = benchmark_pop($queue, BENCHMARK_MSG_NUM);
    } catch (Exception $e) {
        drop_table($pdo, BENCHMARK_QNAME);
        throw $e;
    }
    show_results($results, BENCHMARK_MSG_NUM);
    drop_table($pdo, BENCHMARK_QNAME);
}
开发者ID:kotas,项目名称:myqueue,代码行数:17,代码来源:benchmark.php

示例3: str_replace

                }
                $sel_search_form = str_replace("!!bouton_ajouter!!", $bouton_ajouter, $sel_search_form);
                $sel_search_form = str_replace("!!deb_rech!!", htmlentities(stripslashes($f_user_input), ENT_QUOTES, $charset), $sel_search_form);
                print $sel_search_form;
                show_results($dbh, $user_input, $nbr_lignes, $page);
            } else {
                print "<script type='text/javascript'>\n\t\t\t\t\t\twindow.close();\n\t\t\t\t\t</script>";
            }
        }
        break;
    default:
        $sel_search_form = str_replace("!!bouton_ajouter!!", $bouton_ajouter, $sel_search_form);
        $sel_search_form = str_replace("!!deb_rech!!", htmlentities(stripslashes($f_user_input), ENT_QUOTES, $charset), $sel_search_form);
        print $sel_search_form;
        print $jscript;
        show_results($dbh, $user_input, $nbr_lignes, $page);
        break;
}
function show_results($dbh, $user_input, $nbr_lignes = 0, $page = 0, $id = 0)
{
    global $nb_per_page;
    global $base_url;
    global $caller;
    global $charset;
    global $msg;
    global $expl_list_id;
    // on récupére le nombre de lignes qui vont bien
    if (!$id) {
        if ($user_input == "") {
            $requete = "SELECT COUNT(1) FROM groupexpl";
        } else {
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:groupexpl.inc.php

示例4: array

$form->add('label', 'label_room', 'room', 'Which room would you like to reserve:');
$obj = $form->add('radios', 'room', array('A' => 'Room A', 'B' => 'Room B', 'C' => 'Room C'));
$obj->set_rule(array('required' => array('error', 'Room selection is required!')));
// "extra"
$form->add('label', 'label_extra', 'extra', 'Extra requirements:');
$obj = $form->add('checkboxes', 'extra[]', array('flipchard' => 'Flipchard and pens', 'plasma' => 'Plasma TV screen', 'beverages' => 'Coffee, tea and mineral water'));
// "date"
$form->add('label', 'label_date', 'date', 'Reservation date');
$date = $form->add('date', 'date');
$date->set_rule(array('required' => array('error', 'Date is required!'), 'date' => array('error', 'Date is invalid!')));
// date format
// don't forget to use $date->get_date() if the form is valid to get the date in YYYY-MM-DD format ready to be used
// in a database or with PHP's strtotime function!
$date->format('M d, Y');
// selectable dates are starting with the current day
$date->direction(1);
$form->add('note', 'note_date', 'date', 'Date format is M d, Y');
// "time"
$form->add('label', 'label_time', 'time', 'Reservation time :');
$form->add('time', 'time', '', array('hours' => array(9, 10, 11, 12, 13, 14, 15, 16, 17), 'minutes' => array(0, 30)));
// "submit"
$form->add('submit', 'btnsubmit', 'Submit');
// if the form is valid
if ($form->validate()) {
    // show results
    show_results();
    // otherwise
} else {
    // generate output using a custom template
    $form->render('includes/custom-templates/reservation.php');
}
开发者ID:bodiski,项目名称:Zebra_Form,代码行数:31,代码来源:reservation-custom.php

示例5: array

    $res = $db->query("select * from games\n        where pb like '%{$query}%' or pw like '%{$query}%' or ev like '%{$query}%' or date like '%{$query}%'\n        order by date desc\n        limit 300");
    $games = array();
    while ($game = $res->fetchArray()) {
        $games[] = $game;
    }
    if (!count($games)) {
        echo "<p>No games found matching &quot;{$query}&quot;.</p>";
        return;
    }
    echo "<p>" . count($games) . " games found, newest listed first:</p>\n        <table id='tourney-games'>\n        <tr><th>Date</th><th>Event</th><th>White</th><th>Black</th><th>Result</th></tr>";
    $class = "";
    foreach ($games as $game) {
        $class = $class == "odd" ? "even" : "odd";
        $gn = str_replace(".sgf", "", $game['filename']);
        echo "<tr class='{$class}'>\n";
        echo join("", array_map(create_function('$s', 'return "<td><a href=\\"./#' . $gn . '\\">" . $s . "</a></td>\\n";'), array($game['date'], $game['EV'], $game['PW'], $game['PB'], $game['RE'])));
        echo "</tr>";
    }
}
if ($_GET['q']) {
    show_results($_GET['q']);
} else {
    echo "<p>The game archive contains a representative sample of games from the last few hundred years.\n        Enter a query above to search by player name, event name, or date.</p>\n        <p>Many games come from GoGoD, with their permission. If you are interested in having a full\n        collection of well over 50,000 pro games along with other enriching materials, please purchase their\n        product (<a href='http://www.gogod.co.uk'>http://www.gogod.co.uk</a>).</p>";
}
?>
</table>

</div>

<?php 
include "footer.phtml";
开发者ID:icehong,项目名称:eidogo,代码行数:31,代码来源:games.php

示例6: die

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: coordonnees.inc.php,v 1.5 2009-05-16 10:52:44 dbellamy Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
// la variable $caller, passée par l'URL, contient le nom du form appelant
$base_url = "./select.php?what=coord&caller={$caller}&param1={$param1}&param2={$param2}&param3={$param3}&id_bibli={$id_bibli}&no_display={$no_display}&bt_ajouter={$bt_ajouter}";
// contenu popup sélection fournisseur
require_once './selectors/templates/sel_coordonnees.tpl.php';
require_once $class_path . '/entites.class.php';
// affichage du header
print $sel_header;
print $jscript;
show_results($dbh, $nbr_lignes, $page);
// affichage des membres de la page
function show_results($dbh, $nbr_lignes = 0, $page = 0)
{
    global $nb_per_page;
    global $base_url;
    global $caller;
    global $charset;
    global $msg;
    global $id_bibli;
    // on récupére le nombre de lignes qui vont bien
    $nbr_lignes = entites::count_coordonnees($id_bibli);
    if (!$page) {
        $page = 1;
    }
    $debut = ($page - 1) * $nb_per_page;
开发者ID:bouchra012,项目名称:PMB,代码行数:31,代码来源:coordonnees.inc.php

示例7: pmb_bidi

            print pmb_bidi("\n \t\t\t<a href='#' onclick=\"set_parent('{$caller}', '{$empr->id_empr}', '" . htmlentities(addslashes($empr_entry), ENT_QUOTES, $charset) . " ({$empr->empr_cb})')\">\n\t\t\t\t{$empr_entry}</a>");
            print pmb_bidi(' <i><small>' . $empr->lieu . '</small></i> (' . $empr->empr_cb . ')');
            print "<br />";
        }
        mysql_free_result($res);
        // constitution des liens
        $nbepages = ceil($nbr_lignes / $nb_per_page);
        $suivante = $page + 1;
        $precedente = $page - 1;
        // affichage du lien précédent si nécéssaire
        print '<hr /><div align=center>';
        if ($precedente > 0) {
            print "<a href='{$base_url}&page={$precedente}&nbr_lignes={$nbr_lignes}&user_input={$user_input}'><img src='./images/left.gif' border='0' title='{$msg['48']}' alt='[{$msg['48']}]' hspace='3' align='middle' /></a>";
        }
        for ($i = 1; $i <= $nbepages; $i++) {
            if ($i == $page) {
                print "<b>{$i}/{$nbepages}</b>";
            }
        }
        if ($suivante <= $nbepages) {
            print "<a href='{$base_url}&page={$suivante}&nbr_lignes={$nbr_lignes}&user_input={$user_input}'><img src='./images/right.gif' border='0' title='{$msg['49']}' alt='[{$msg['49']}]' hspace='3' align='middle' /></a>";
        }
    }
    print '</div>';
}
// affichage des membres de la page
$sel_search_form = str_replace("!!deb_rech!!", stripslashes($f_user_input), $sel_search_form);
print $sel_search_form;
print $jscript;
show_results($dbh, $user_input, $nbr_lignes, $page, $rech_regexp);
print $sel_footer;
开发者ID:bouchra012,项目名称:PMB,代码行数:31,代码来源:empr.inc.php

示例8: 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

示例9: array

$reqs['Clone Objects check'] = array("impact" => MUSTHAVE, "evaluate" => "!ini_get('zend.ze1_compatibility_mode');", "tip" => "set zend.ze1_compatibility_mode to Off");
$reqs['Magic quotes check'] = array("impact" => MUSTHAVE, "evaluate" => "!ini_get('magic_quotes_runtime');", "tip" => "set magic_quotes_runtime to Off");
?>
<html>
<head></head>
<body>
<pre>

<?php 
echo APPLICATION_NAME;
?>
 REQUIREMENTS CHECKER $Revision: 1.3 $  $Date: 2005/06/18 12:27:06 $
--------------------------------------------------------------

<?php 
show_results(check_requirements($reqs));
?>

--------------------------------------------------------------
* Fix all the <b>blocking</b> requirements.
* Fix all the <b>musthave</b> requirements.
* Try to fix all the <b>shouldhave</b> requirements.

Finished!
</pre>
</body>
</html>
<?php 
/** Base functions **/
/**
 * Checks requirements by evaluating an expression. If the result is true,
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:31,代码来源:requirements.php

示例10: show_results

        ?>
        <div class="tab-pane" id="failed">
          <?php 
        print "<table id='errors' class='table-striped'><thead><th>Test</th><th>Result</th></thead><tbody>";
        echo show_results($json, $fails);
        print "</tbody></table>";
        ?>
        </div>
      <?php 
    }
    ?>
      
      <div class="tab-pane" id="warnings">
        <?php 
    print "<table id='errors' class='table-striped'><thead><th>Test</th><th>Result</th></thead><tbody>";
    echo show_results($json, $all_warnings, TRUE);
    print "</tbody></table>";
    ?>
      </div>

  </div><!-- /tab-content-->
 
<?php 
}
/*
 * 
 * name: count_results
 * @param array $results  An array of result data
 * @param string $type    Type of result we're interested in
 * @param int             0=fail, 1=pass, 2=all Specify if we are interested in passes or fails
 * @return
开发者ID:rolfkleef,项目名称:IATI-Public-Validator,代码行数:31,代码来源:compliance1.php

示例11: error_reporting

error_reporting(E_ALL);
ini_set('display_errors', 'On');
if (empty($settings['show_res_secret'])) {
    die("Not configured\n");
}
if ($argv[2] != $settings['show_res_secret']) {
    die("Usage: php show_res.php <mode> <secret>\n");
}
if ($argv[1] == "db") {
    $res = get_db_results();
}
if ($argv[1] == "file") {
    $res = get_file_results();
}
$res = transcode_results($res);
show_results($res);
exit;
function get_db_results()
{
    $db = db_connect();
    $res = $db->query("SELECT choice FROM ballot_box");
    $out = array();
    while ($obj = $res->fetch_object()) {
        $out[] = $obj->choice;
    }
    $res->close();
    db_close($db);
    return $out;
}
function get_file_results()
{
开发者ID:johnfelipe,项目名称:nabuvote,代码行数:31,代码来源:show_res.php


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