コード例 #1
0
ファイル: karma.php プロジェクト: stof/pearweb
    $table = new HTML_Table('style="width: 100%"');
    $table->setCaption("Grant karma to " . htmlspecialchars($handle), 'style="background-color: #CCCCCC;"');
    $form = new HTML_QuickForm2('karma_grant', 'post', array('action' => 'karma.php?action=grant'));
    $form->removeAttribute('name');
    $form->addElement('text', 'level')->setLabel('Level: ');
    $form->addElement('hidden', 'handle')->setValue(htmlspecialchars($handle));
    $form->addElement('submit', 'submit')->setLabel('Submit Changes');
    $csrf_token_value = create_csrf_token($csrf_token_name);
    $form->addElement('hidden', $csrf_token_name)->setValue($csrf_token_value);
    $table->addRow(array((string) $form));
    echo $table->toHTML();
}
echo "<p>&nbsp;</p><hr />";
$table = new HTML_Table('style="width: 90%"');
$table->setCaption("Karma Statistics", 'style="background-color: #CCCCCC;"');
if (!empty($_GET['a']) && $_GET['a'] == "details" && !empty($_GET['level'])) {
    $table->addRow(array('Handle', 'Granted'), null, 'th');
    foreach ($karma->getUsers($_GET['level']) as $user) {
        $detail = sprintf("Granted by <a href=\"/user/%s\">%s</a> on %s", htmlspecialchars($user['granted_by']), htmlspecialchars($user['granted_by']), htmlspecialchars($user['granted_at']));
        $table->addRow(array(make_link("/user/" . htmlspecialchars($user['user']), htmlspecialchars($user['user'])), $detail));
    }
} else {
    $table->addRow(array('Level', '# of users'));
    foreach ($karma->getLevels() as $level) {
        $table->addRow(array(make_link("karma.php?a=details&amp;level=" . htmlspecialchars($level['level']), htmlspecialchars($level['level'])), htmlspecialchars($level['sum'])));
    }
}
echo $table->toHTML();
echo '<br /><br />';
echo make_link('/admin/karma.php', 'Back');
response_footer();
コード例 #2
0
ファイル: index.php プロジェクト: stof/pearweb
<h1>The PEAR Quality Assurance Initiative</h1>

<p>The PEAR Quality Assurance Initiative is designed to promote quality within PEAR.
You can find out more about how the <abbr title="Quality Assurance">QA</abbr>
team works in the <a href="/pepr/pepr-proposal-show.php?id=60">appendant RFC</a>, and the <a href="http://wiki.php.net/pear/qa">wiki</a>.
</p>

<p>The current members of the
 <abbr title="Quality Assurance">QA</abbr> Team are:
</p>

<ul>
<?php 
$karma = new Damblan_Karma($dbh);
foreach ($karma->getUsers('pear.qa') as $user) {
    echo ' <li>' . user_link(htmlspecialchars($user['user']), true) . "</li>\n";
}
?>
</ul>

<p>If you are interested in helping out, or if you have questions
concerning the <abbr title="Quality Assurance">QA</abbr>
initiative, you can contact the team using the mailing list
<a href="mailto:<?php 
echo PEAR_QA_EMAIL;
?>
"><?php 
echo PEAR_QA_EMAIL;
?>
</a>