Ejemplo n.º 1
0
function print_list($list)
{
    $str = '';
    global $space;
    if ($space == null) {
        $space = '';
    } else {
        $space .= '  ';
    }
    foreach ($list as $key => $val) {
        if (!is_array($val) && !is_object($val)) {
            $str .= $space . $key . ':' . $val . '<br/>';
        } else {
            $str .= $space . $key . ':<br/>';
            $str .= print_list($val);
        }
    }
    return $str;
}
Ejemplo n.º 2
0
/**
 * FusionForge document search engine
 *
 * Copyright 2005, Fabio Bertagnin
 *
 * This file is part of FusionForge.
 *
 * FusionForge is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published
 * by the Free Software Foundation; either version 2 of the License,
 * or (at your option) any later version.
 * 
 * FusionForge is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with FusionForge; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 */
function parser_text($fichin)
{
    $tstart = microtime_float();
    if (!is_file($fichin)) {
        return "";
    }
    $fp = fopen($fichin, "r");
    $buff = fread($fp, filesize($fichin));
    // tout en minuscules
    $buff = mb_strtolower($buff);
    // élimination d'éventuels caractères unicode encore présents
    $buff = mb_convert_encoding($buff, "ascii");
    // élimination caractères avec accents
    // et caractères spéciaux
    $buff = suppression_diacritics($buff);
    // tous les mots dans un tableau
    $a = explode(" ", $buff);
    //sort($a);
    // élimination des doublons
    $a = array_unique($a);
    // envoi du résultat sur stdout
    $rep = print_list($a);
    return $rep;
}
Ejemplo n.º 3
0
function list_latest($num)
{
    $result = db('SELECT "time","title","slug" from "public"."notes" ORDER BY "time" DESC LIMIT ' . $num);
    include "tpl/post_list.php";
    print_list($result);
}
Ejemplo n.º 4
0
?>

<!--------------------------------------------------------------------->

<?php 
print_link("Documentation list", "docs");
?>

<P>This list is used for the documentation group.  <?php 
red("Subscribers");
?>
 are welcome to post any topics dealing with the
documentation of Open MPI.</p>

<?php 
print_list("docs");
?>

<!--------------------------------------------------------------------->

<?php 
print_link("Git commit list (<font\ncolor=red>USERS CANNOT POST TO THIS LIST</font>)", "ompi-commits");
?>

<p>A mail is sent to this list for every Git push to Github commit in
the Open MPI code base.  The mail includes a list of files that were
changed, the developer's commit message, and a diff of the changes.
<strong>Only the automated git-email-bot can post to this
list;</strong> all other posts are automatically discarded.

</UL>
Ejemplo n.º 5
0
print_link("PMIx developers list", "pmix-devel");
?>

<P>This list is used for general questions and discussion of PMIx.
Please see the "<a href="<?php 
printf("{$topdir}/community/help/");
?>
">Getting Help</a>" page for details on submitting requests for
help.  <?php 
red("Subscribers");
?>
 can post questions, comments,
suspected bug reports, etc. to the list at the following address:</p>

<?php 
print_list("pmix-devel");
?>

<?php 
print_link("Git commit list (<font color=red>USERS\nCANNOT POST TO THIS LIST</font>)", "pmix-commits");
?>

<p>A mail is sent to this list for every Git push to Github commit in
the PMIx code base.  The mail includes a list of files that were
changed, the developer's commit message, and a diff of the changes.
<strong>Only the automated git-email-bot can post to this
list;</strong> all other posts are automatically discarded.

</UL>

<?php 
Ejemplo n.º 6
0
function print_agg_list($list)
{
    print_list($list, $use_nickname = True);
}
Ejemplo n.º 7
0
echo html_writer::end_tag('div');
if (isset($list)) {
    echo html_writer::start_tag('div', array('class' => 'boxwidthwide boxaligncenter', 'style' => 'padding:20px;'));
    if ($sitevoting) {
        echo '<div style="margin-left:20%;margin-right:20%;text-align:center;font-size:0.9em;">';
        if (!isloggedin() || isguestuser()) {
            echo 'Sites can be marked "Cool" if three or more people vote for them.  Cool sites are promoted around moodle.org and other places. To vote on sites you need to be <a href="/login/index.php">logged in</a>.';
            echo "<br />";
        } else {
            $options = array();
            $options['country'] = $country;
            if ($isadmin && $USER->siteediting) {
                $options['edit'] = 'on';
            }
            if (empty($USER->sitevoting)) {
                echo 'Sites can be marked "Cool" if three or more people vote for them.  Cool sites are promoted around moodle.org and other places. To see the voting controls, use this button:</p>';
                $options['voting'] = 1;
                $button = new single_button(new moodle_url('/sites/index.php', $options), 'Show voting buttons for these sites');
            } else {
                $options['voting'] = -1;
                $button = new single_button(new moodle_url('/sites/index.php', $options), 'Hide voting buttons for these sites');
            }
            $OUTPUT->render($button);
        }
        echo "<br /></div>";
    }
    print_list($list);
    echo "<p align=\"right\" style='clear:both'><a href=\"#top\"><img src=\"/pix/t/up.png\" border=0 alt=\"Up to top\"></a></p>";
    echo html_writer::end_tag('div');
}
echo $OUTPUT->footer();
Ejemplo n.º 8
0
IFRAME;
    }
}
switch ($do) {
    case 'list':
        print print_list();
        break;
    case 'add':
        if ($uid > 0 && $tid > 0) {
            $c = 'SELECT count(id) FROM thanks WHERE userid = ' . sqlesc($uid) . ' AND torrentid = ' . sqlesc($tid);
            $result = sql_query($c);
            $arr = $result->fetch_row();
            if ($arr[0] == 0) {
                if (sql_query('INSERT INTO thanks(userid,torrentid) VALUES(' . sqlesc($uid) . ',' . sqlesc($tid) . ')')) {
                    echo print_list();
                } else {
                    $msg = 'There was an error with the query,contact the staff. Mysql error ' . (is_object($GLOBALS["___mysqli_ston"]) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
                    echo $ajax ? json_encode(array('status' => false, 'err' => $msg)) : $msg;
                }
            }
        }
        header("Refresh: 0; url=details.php?id={$id}");
        if ($INSTALLER09['seedbonus_on'] == 1) {
            // ===add karma
            sql_query("UPDATE users SET seedbonus = seedbonus+" . sqlesc($INSTALLER09['bonus_per_thanks']) . " WHERE id =" . sqlesc($uid)) or sqlerr(__FILE__, __LINE__);
            $sql = sql_query('SELECT seedbonus ' . 'FROM users ' . 'WHERE id = ' . sqlesc($uid)) or sqlerr(__FILE__, __LINE__);
            $User = mysqli_fetch_assoc($sql);
            $update['seedbonus'] = $User['seedbonus'] + $INSTALLER09['bonus_per_thanks'];
            //header("Refresh: 1; url=details.php?id=$id");
            $mc1->begin_transaction('userstats_' . $uid);
Ejemplo n.º 9
0
print_link("hwloc developers list", "hwloc-devel");
?>

<P>This list is used for general questions and discussion of hwloc.
Please see the "<a href="<?php 
printf("{$topdir}/community/help/");
?>
">Getting Help</a>" page for details on submitting requests for
help.  <?php 
red("Subscribers");
?>
 can post questions, comments,
suspected bug reports, etc. to the list at the following address:</p>

<?php 
print_list("hwloc-devel");
?>

<?php 
print_link("Git commit list (<font color=red>USERS\nCANNOT POST TO THIS LIST</font>)", "hwloc-commits");
?>

<p>A mail is sent to this list for every git push to Github in the
hwloc code base.  The mail includes a list of files that were changed,
the developer's commit message, and a diff of the changes.  <strong>Only the
automated Github web hook post to this list;</strong> all other posts
are automatically discarded.

</UL>

<?php 
Ejemplo n.º 10
0
print_link("ORCM developers list", "orcm-devel");
?>

<P>This list is used for general questions and discussion of ORCM.
Please see the "<a href="<?php 
printf("{$topdir}/community/help/");
?>
">Getting Help</a>" page for details on submitting requests for
help.  <?php 
red("Subscribers");
?>
 can post questions, comments,
suspected bug reports, etc. to the list at the following address:</p>

<?php 
print_list("orcm-devel");
?>

<?php 
print_link("Git commit list (<font color=red>USERS\nCANNOT POST TO THIS LIST</font>)", "orcm-commits");
?>

<p>A mail is sent to this list for every Git push to Github commit in
the ORCM code base.  The mail includes a list of files that were
changed, the developer's commit message, and a diff of the changes.
<strong>Only the automated git-email-bot can post to this
list;</strong> all other posts are automatically discarded.

</UL>

<?php 
Ejemplo n.º 11
0
print_link("netloc developers list", "netloc-devel");
?>

<P>This list is used for general questions and discussion of netloc.
Please see the "<a href="<?php 
printf("{$topdir}/community/help/");
?>
">Getting Help</a>" page for details on submitting requests for
help.  <?php 
red("Subscribers");
?>
 can post questions, comments,
suspected bug reports, etc. to the list at the following address:</p>

<?php 
print_list("netloc-devel");
?>

<?php 
print_link("Git commit list (<font color=red>USERS\nCANNOT POST TO THIS LIST</font>)", "netloc-commits");
?>

<p>A mail is sent to this list for every Git commit in the netloc code
base.  The mail includes a list of files that were changed, the
developer's commit message, and a diff of the changes.  <strong>This
list only accepts automated commit emails only; users and developers
cannot post to this list.</strong>

</UL>

<?php 
Ejemplo n.º 12
0
			<div id="tab-pages" class="tab">
				<table class="posts above" cellspacing="0">
					<tr class="new">
						<td><input type="radio" name="post" id="rbPost-2" value="-2" data-status="" data-type="page" data-tk="<?php 
echo wp_create_nonce("zedity-addcontent-page");
?>
"></td>
						<td><label for="rbPost-2"><?php 
_e('New Page', 'zedity');
?>
</label></td>
						<td></td>
					</tr>
				</table>
				<?php 
print_list($pages);
?>
			</div>
		</div>
		<div>
			<div class="ui-widget-content ui-corner-all ui-widget options statusfilter">
				<table>
					<tr>
						<td><?php 
_e('Filter status:', 'zedity');
?>
</td>
						<td>
							<input type="checkbox" id="cbPublished" class="cbStatus" value="publish" checked="checked"><label for="cbPublished"><?php 
_e('Published', 'zedity');
?>
Ejemplo n.º 13
0
print_link("otpo user list", "otpo-users");
?>

<P>This list is used for general questions and discussion of otpo.
Please see the "<a href="<?php 
printf("{$topdir}/community/help/");
?>
">Getting Help</a>" page for details on submitting requests for
help.  <?php 
red("Subscribers");
?>
 can post questions, comments,
suspected bug reports, etc. to the list at the following address:</p>

<?php 
print_list("otpo-users");
?>


<?php 
print_link("Git commit list (<font color=red>USERS\nCANNOT POST TO THIS LIST</font>)", "otpo-svn");
?>

<p>A mail is sent to this list for every Git push to Github commit in
the OTPO code base.  The mail includes a list of files that were
changed, the developer's commit message, and a diff of the changes.
<strong>Only the automated git-email-bot can post to this
list;</strong> all other posts are automatically discarded.

</UL>
Ejemplo n.º 14
0
if (count($devices = dbFetchColumn('SELECT `hostname` FROM `devices` WHERE last_polled_timetaken > 300 AND `ignore` = 0 AND `disabled` = 0 AND `status` = 1')) > 0) {
    print_fail("Some devices have not completed their polling run in 5 minutes, this will create gaps in data.\n        Check your poll log and refer to http://docs.librenms.org/Support/Performance/");
    print_list($devices, "\t %s\n");
}
if ($versions['local_branch'] != 'master') {
    print_warn("Your local git branch is not master, this will prevent automatic updates.");
}
// check for modified files
$modifiedcmd = 'git diff --name-only --exit-code';
if ($username === 'root') {
    $modifiedcmd = 'su ' . $config['user'] . ' -c "' . $modifiedcmd . '"';
}
exec($modifiedcmd, $cmdoutput, $code);
if ($code !== 0 && !empty($cmdoutput)) {
    print_warn("Your local git contains modified files, this could prevent automatic updates.\nModified files:");
    print_list($cmdoutput, "\t %s\n");
}
// Modules test
$modules = explode(',', $options['m']);
foreach ($modules as $module) {
    switch ($module) {
        case 'mail':
            if ($config['alert']['transports']['mail'] === true) {
                $run_test = 1;
                if (empty($config['alert']['default_mail'])) {
                    print_fail('default_mail config option needs to be specified to test email');
                    $run_test = 0;
                } elseif ($config['email_backend'] == 'sendmail') {
                    if (empty($config['email_sendmail_path'])) {
                        print_fail("You have selected sendmail but not configured email_sendmail_path");
                        $run_test = 0;
Ejemplo n.º 15
0
print_link("GlassBottom developers list", "devel-glassbottom");
?>

<P>This list is used for general questions and discussion of GlassBottom.
Please see the "<a href="<?php 
printf("{$topdir}/community/help/");
?>
">Getting Help</a>" page for details on submitting requests for
help.  <?php 
red("Subscribers");
?>
 can post questions, comments,
suspected bug reports, etc. to the list at the following address:</p>

<?php 
print_list("devel-glassbottom");
?>

<?php 
print_link("Git commit list (<font color=red>USERS\nCANNOT POST TO THIS LIST</font>)", "glassbottom-commits");
?>

<p>A mail is sent to this list for every Git push to Github commit in
the GlassBottom code base.  The mail includes a list of files that were
changed, the developer's commit message, and a diff of the changes.
<strong>Only the automated git-email-bot can post to this
list;</strong> all other posts are automatically discarded.

</UL>

<?php 
Ejemplo n.º 16
0
<?php

session_start();
include "setting.php";
if (!isset($_SESSION['id']) || !isset($_SESSION['ipaddress'])) {
    gotoindex();
}
check_login();
$_GET['pagename'] = 'log';
include "header.php";
$result = get_my_answers($_SESSION['id']);
print_list($result);
include "footer.php";
function print_list($result)
{
    $num = pg_num_rows($result);
    if ($num == 0) {
        print "まだ診断を行っていません。<br>\n";
    } else {
        print "<table>\n";
        print "<tr><th>診断名</th><th>回答</th><th>結果</th></tr>\n";
        for ($i = 0; $i < $num; $i++) {
            $row = pg_fetch_assoc($result, $i);
            $ans = getAnswer($row['answer']);
            print "<tr><td>{$row['content']}</td><td>{$row['choice']}</td><td>{$ans}</td></tr>\n";
        }
        print "</table>\n";
    }
}
function get_my_answers($id)
{
Ejemplo n.º 17
0
</style>
<title>::</title>
</head>
<body>
{$out}{$form}
</body>
</html>
IFRAME;
    }
}
switch ($do) {
    case 'list':
        print print_list();
        break;
    case 'add':
        if ($uid > 0 && $tid > 0) {
            $c = mysql_result(mysql_query('SELECT count(id) FROM thanks WHERE userid = ' . $uid . ' AND torrentid = ' . $tid), 0);
            if ($c == 0) {
                if (mysql_query('INSERT INTO thanks(userid,torrentid) VALUES(' . $uid . ',' . $tid . ')')) {
                    print print_list();
                } else {
                    $msg = 'There was an error with the query,contatct the staff. Mysql error ' . mysql_error();
                    print $ajax ? json_encode(array('status' => false, 'err' => $msg)) : $msg;
                }
            }
        }
        // ===add karma
        @mysql_query("UPDATE users SET seedbonus = seedbonus+5.0 WHERE id =" . $uid . "") or sqlerr(__FILE__, __LINE__);
        // ===end
        break;
}
Ejemplo n.º 18
0
                                    $i++;
                                }
                            }
                        }
                        // Sortiere die gefundenen Seriennummern alphabetisch und entferne Dubletten.
                        $seriennr = array_unique($seriennr);
                        sort($seriennr);
                        // Falls die Suche nicht erfolgreich war, gebe entprechende Meldung aus.
                        if (count($seriennr) == 0) {
                            print_nomatch();
                        } else {
                            if (count($seriennr) == 1) {
                                print_seriennummer($record);
                            } else {
                                if (count($seriennr) > 1) {
                                    print_list($seriennr);
                                }
                            }
                        }
                        // Gebe Hilfetext aus (Format der Suche,
                        // Hinweise zum Internet Explorer, Abspeichern der Dateien)
                    } else {
                        print_description();
                    }
                }
            }
        }
    }
}
// Funktion zum Ausgeben der Liste von Typen bzw. Seriennummern.
function print_list($liste)
Ejemplo n.º 19
0
/**
 * Can be used to print a list into the page
 *
 * <b>Creating the print list object</b>
 * 
 * In order to create a list object you simply need to instatiate a stdClass object
 * and set the required properties as detailed below.
 *
 * <b>$list->style</b> <i>optional</i> Sets the style of the list this defaults to <b>ul</b> but can
 * be set to <b>ol</b> if you want an ordered list instead
 *
 * <b>$list->heading</b> <i>optional</i> Sets a heading before the list and should be a string
 *
 * <b>$list->data</b> Is an array of strings to display in the list, nested lists
 * are supported please read below for information on how to print nested lists.
 *
 * <b>$list->printanchors</b> <i>optional</i> If set to true an alphabetical anchor line is printed
 * at the top of the list allowing the user to <i>jump</i> to a particular letter.
 * 
 * <b>$list->printanchorsbothends</b> <i>optional</i> If set to true and printanchors set to true then
 * this prints the alphabetical anchor line at the bottom of the list as well
 *
 * <code>
 * $list = new stdClass;
 * $list->style = ''
 * $list->heading = 'Learn to count';
 * $list->data = Array('one','two','three','four','five');
 * print_list($list);
 * </code>
 *
 * <b>Creating nested lists</b>
 *
 * If you want to creata a nested list you simply need to create the second list
 * object and add it to the data array in the appropriate place.
 * 
 * The following option is also available and allows you to print a string before
 * the nested list.
 * 
 * <b>$list->title</b> <i>optional</i> Is the string to print before the nested list
 * <code>
 * $list = new stdClass;
 * $list->style = ''
 * $list->heading = 'Learn to count';
 * $list->data = Array();
 * $list->data[] = 'one';
 * $list->data[] = 'two';
 * $sublist = new stdClass;
 * $sublist->title = 'three';
 * $sublist->data = Array('a','b','c','d','e');
 * $list->data[] = $sublist;
 * $list->data[] = 'four';
 * $list->data[] = 'five';
 * print_list($list);
 * </code>
 *
 * @param stdClass $list
 * @param bool $return If set to true HTML is returned rather than printed
 * @param bool $disableanchors Only used for recursion don't bother setting
 */
function print_list($list, $return = false, $disableanchors = false)
{
    $html = '';
    $style = 'ul';
    if (isset($list->style) && $list->style != 'ul') {
        $style = 'ol';
    }
    if (isset($list->heading) && !empty($list->heading)) {
        $html .= sprintf("<h3 class='headingblock header'>%s</h3>\n", $list->heading);
    }
    if (isset($list->printanchors) && $list->printanchors === true && $disableanchors === false) {
        $html .= "<p>#PRINTANCHORS#</p>";
        $anchors = array('#' => 0, 'A' => 0, 'B' => 0, 'C' => 0, 'D' => 0, 'E' => 0, 'F' => 0, 'G' => 0, 'H' => 0, 'I' => 0, 'J' => 0, 'K' => 0, 'L' => 0, 'M' => 0, 'N' => 0, 'O' => 0, 'P' => 0, 'Q' => 0, 'R' => 0, 'S' => 0, 'T' => 0, 'U' => 0, 'V' => 0, 'W' => 0, 'X' => 0, 'Y' => 0, 'Z' => 0);
    } else {
        $list->printanchors = false;
    }
    $html .= sprintf("<%s style='list-style:none;list-spacing:10px;'>\n", $style);
    foreach ($list->data as $line) {
        if (is_object($line) && get_class($line) == 'stdClass') {
            if (isset($line->title) && !empty($line->title)) {
                $line = $line->title . "<br />" . print_list($line, true, true);
            } else {
                $line = print_list($line, true, true);
            }
        } else {
            if ($list->printanchors === true) {
                if (preg_match('/^(\\s*<[^>]+>\\s*)*([a-zA-Z])/', $line, $m)) {
                    $firstletter = strtoupper($m[2]);
                } else {
                    $firstletter = '#';
                }
                if ($anchors[$firstletter] === 0) {
                    $line = "<a nohref='nohref' name='{$firstletter}'></a>" . $line;
                }
                $anchors[$firstletter]++;
            }
        }
        $html .= sprintf("<li>%s</li>\n", $line);
    }
    $html .= sprintf("</%s>\n", $style);
    if ($list->printanchors) {
        if (isset($list->printanchorsbothends) && $list->printanchorsbothends === true) {
            $html .= "<p>#PRINTANCHORS#</p>";
        }
        $anchorlinks = array();
        foreach ($anchors as $letter => $count) {
            if ($count > 0) {
                $anchorlinks[] = "<a href='#{$letter}' title='{$count}'>{$letter}</a>";
            } else {
                $anchorlinks[] = "{$letter}";
            }
        }
        $html = str_replace('#PRINTANCHORS#', join(' ', $anchorlinks), $html);
    }
    if ($return === true) {
        return $html;
    } else {
        echo $html;
        return true;
    }
}
Ejemplo n.º 20
0
?>
">Getting Help</a>" page for details on submitting requests for
help.  <?php 
red("Subscribers");
?>
 can post questions, comments,
suspected bug reports, etc. to the list at the following address:</p>

<?php 
print_list("mtt-devel");
?>

<?php 
print_link("MTT developers list", "mtt-devel");
?>

<P>This list is used for developers who are working with the internals
of MTT itself.  <?php 
red("Subscribers");
?>
 are welcome to post
any topics dealing with the internal code of MTT are welcome on
this list: questions, comments, bug reports, etc.</p>

<?php 
print_list("mtt-devel");
?>
</UL>

<?php 
include_once "{$topdir}/includes/footer.inc";
Ejemplo n.º 21
0
<?php

function print_list($items)
{
    echo '<ul>';
    foreach ($items as $item) {
        echo '<li>' . $item . '</li>';
    }
    echo '</ul>';
}
$A = array(1, 2, 'pie');
print_list($A);
Ejemplo n.º 22
0
<?php

require "common.php";
# find the table
$table = isset($_REQUEST['table']) ? $_REQUEST['table'] : "";
$section = $sections[$table];
if (empty($section)) {
    #header("Location: index.php");
    die("Invalid table.");
}
# Make sure we can get here.
if (get_page_acccess_level() > $section['level']['show']) {
    #header("Location: index.php");
    die("Not authorized.");
}
# print top
print_header($table);
print_menu($section);
# create query to show things
$msg = print_list($table, $sections[$table]['list']);
# print footer of html
print_footer($msg);