本文整理汇总了PHP中Captcha::create_transaction方法的典型用法代码示例。如果您正苦于以下问题:PHP Captcha::create_transaction方法的具体用法?PHP Captcha::create_transaction怎么用?PHP Captcha::create_transaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Captcha
的用法示例。
在下文中一共展示了Captcha::create_transaction方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generate_overview
function generate_overview($filecats = '', $offset = '', $subcatID = 0)
{
global $_language;
$rubrics = safe_query("SELECT * FROM " . PREFIX . "files_categorys WHERE subcatID = '" . $subcatID . "' ORDER BY name");
$i = 1;
$CAPCLASS = new Captcha();
$CAPCLASS->create_transaction();
$hash = $CAPCLASS->get_hash();
while ($ds = mysql_fetch_array($rubrics)) {
if ($i % 2) {
$td = 'td1';
} else {
$td = 'td2';
}
$filecats .= '<tr>
<td class="' . $td . '">' . $offset . getinput($ds['name']) . '</td>
<td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=filecategorys&action=edit&filecatID=' . $ds['filecatID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
<input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=filecategorys&delete=true&filecatID=' . $ds['filecatID'] . '&captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
</tr>';
$i++;
if (mysql_num_rows(safe_query("SELECT * FROM " . PREFIX . "files_categorys WHERE subcatID = '" . $ds['filecatID'] . "'"))) {
$filecats .= generate_overview("", $offset . getinput($ds['name']) . " » ", $ds['filecatID']);
}
}
return $filecats;
}
示例2: Captcha
$CAPCLASS = new Captcha();
if ($CAPCLASS->check_captcha(0, $_POST['captcha_hash'])) {
if (mysql_num_rows(safe_query("SELECT * FROM " . PREFIX . "about"))) {
safe_query("UPDATE " . PREFIX . "about SET about='" . $about . "'");
} else {
safe_query("INSERT INTO " . PREFIX . "about (about) values( '" . $about . "') ");
}
redirect("admincenter.php?site=about", "", 0);
} else {
echo $_language->module['transaction_invalid'];
}
} else {
$ergebnis = safe_query("SELECT * FROM " . PREFIX . "about");
$ds = mysql_fetch_array($ergebnis);
$CAPCLASS = new Captcha();
$CAPCLASS->create_transaction();
$hash = $CAPCLASS->get_hash();
$_language->read_module('bbcode', true);
echo '<script language="JavaScript" type="text/javascript">
<!--
function chkFormular() {
if(!validbbcode(document.getElementById(\'message\').value, \'admin\')){
return false;
}
}
-->
</script>';
echo '<form method="post" id="post" name="post" action="admincenter.php?site=about" onsubmit="return chkFormular();">
<b>' . $_language->module['about'] . '</b><br /><small>' . $_language->module['you_can_use_html'] . '</small><br /><br />';
eval("\$addbbcode = \"" . gettemplate("addbbcode", "html", "admin") . "\";");
eval("\$addflags = \"" . gettemplate("flags_admin", "html", "admin") . "\";");