• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP spam_protect函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: smarty_modifier_spam_protect

function smarty_modifier_spam_protect($text, $value)
{
    # defined in mt.php itself
    if (isset($value) && $value) {
        return spam_protect($text);
    } else {
        return $text;
    }
}
开发者ID:kjacobs,项目名称:oneocean_blog,代码行数:9,代码来源:modifier.spam_protect.php


示例2: smarty_function_mtcommentauthorlink

function smarty_function_mtcommentauthorlink($args, &$ctx)
{
    $mt = MT::get_instance();
    $comment = $ctx->stash('comment');
    $name = $comment->comment_author;
    if (!$name && isset($args['default_name'])) {
        $name = $args['default_name'];
    }
    $name or $name = $mt->translate("Anonymous");
    require_once "MTUtil.php";
    $name = encode_html($name);
    $email = $comment->comment_email;
    $url = $comment->comment_url;
    if (isset($args['show_email'])) {
        $show_email = $args['show_email'];
    } else {
        $show_email = 0;
    }
    if (isset($args['show_url'])) {
        $show_url = $args['show_url'];
    } else {
        $show_url = 1;
    }
    $target = isset($args['new_window']) && $args['new_window'] ? ' target="_blank"' : '';
    _comment_follow($args, $ctx);
    $cmntr = $ctx->stash('commenter');
    if (!isset($cmntr) && isset($comment->comment_commenter_id)) {
        $cmntr = $comment->commenter();
    }
    if ($cmntr) {
        $name = isset($cmntr->author_nickname) ? encode_html($cmntr->author_nickname) : $name;
        if ($cmntr->author_url) {
            return sprintf('<a title="%s" href="%s"%s>%s</a>', encode_html($cmntr->author_url), encode_html($cmntr->author_url), $target, $name);
        }
        return $name;
    } elseif ($show_url && $url) {
        require_once "function.mtcgipath.php";
        $cgi_path = smarty_function_mtcgipath($args, $ctx);
        $comment_script = $ctx->mt->config('CommentScript');
        $name = strip_tags($name);
        $url = encode_html(strip_tags($url));
        if ($comment->comment_id && (!isset($args['no_redirect']) || isset($args['no_redirect']) && !$args['no_redirect']) && (!isset($args['nofollowfy']) || isset($args['nofollowfy']) && !$args['nofollowfy'])) {
            return sprintf('<a title="%s" href="%s%s?__mode=red;id=%d"%s>%s</a>', $url, $cgi_path, $comment_script, $comment->comment_id, $target, $name);
        } else {
            return sprintf('<a title="%s" href="%s"%s>%s</a>', $url, $url, $target, $name);
        }
    } elseif ($show_email && $email && is_valid_email($email)) {
        $email = encode_html(strip_tags($email));
        $str = 'mailto:' . $email;
        if ($args['spam_protect']) {
            $str = spam_protect($str);
        }
        return sprintf('<a href="%s">%s</a>', $str, $name);
    }
    return $name;
}
开发者ID:benvanstaveren,项目名称:movabletype,代码行数:56,代码来源:function.mtcommentauthorlink.php


示例3: smarty_function_mtcommentemail

function smarty_function_mtcommentemail($args, &$ctx)
{
    $comment = $ctx->stash('comment');
    $email = $comment->comment_email;
    $email = strip_tags($email);
    if (!preg_match('/@/', $email)) {
        return '';
    }
    return isset($args['spam_protect']) && $args['spam_protect'] ? spam_protect($email) : $email;
}
开发者ID:benvanstaveren,项目名称:movabletype,代码行数:10,代码来源:function.mtcommentemail.php


示例4: smarty_function_mtentryauthoremail

function smarty_function_mtentryauthoremail($args, &$ctx)
{
    // status: incomplete
    // parameters: spam_protect
    $entry = $ctx->stash('entry');
    if (isset($args['spam_protect']) && $args['spam_protect']) {
        return spam_protect($entry->author()->email);
    } else {
        return $entry->author()->email;
    }
}
开发者ID:benvanstaveren,项目名称:movabletype,代码行数:11,代码来源:function.mtentryauthoremail.php


示例5: smarty_function_mtentryauthorlink

function smarty_function_mtentryauthorlink($args, &$ctx)
{
    $entry = $ctx->stash('entry');
    if (!$entry) {
        return '';
    }
    $type = $args['type'];
    $displayname = encode_html($entry->author()->nickname);
    if (isset($args['show_email'])) {
        $show_email = $args['show_email'];
    } else {
        $show_email = 0;
    }
    if (isset($args['show_url'])) {
        $show_url = $args['show_url'];
    } else {
        $show_url = 1;
    }
    require_once "MTUtil.php";
    # Open the link in a new window if requested (with new_window="1").
    $target = $args['new_window'] ? ' target="_blank"' : '';
    if (!$type) {
        if ($show_url && $entry->author()->url && $displayname != '') {
            $type = 'url';
        } elseif ($show_email && $entry->author()->email && $displayname != '') {
            $type = 'email';
        }
    }
    if ($type == 'url') {
        if ($entry->author()->url && $displayname != '') {
            return sprintf('<a href="%s"%s>%s</a>', encode_html($entry->author()->url), $target, $displayname);
        }
    } elseif ($type == 'email') {
        if ($entry->author()->email && $displayname != '') {
            $str = "mailto:" . encode_html($entry->author()->email);
            if ($args['spam_protect']) {
                $str = spam_protect($str);
            }
            return sprintf('<a href="%s">%s</a>', $str, $displayname);
        }
    } elseif ($type == 'archive') {
        require_once "function.mtarchivelink.php";
        $link = smarty_function_mtarchivelink(array('type' => 'Author'), $ctx);
        if ($link) {
            return sprintf('<a href="%s"%s>%s</a>', $link, $target, $displayname);
        }
    }
    return $displayname;
}
开发者ID:benvanstaveren,项目名称:movabletype,代码行数:49,代码来源:function.mtentryauthorlink.php


示例6: format_author

function format_author($a, $charset)
{
    $a = recode_header($a, $charset);
    if (preg_match("/^\\s*(.+)\\s+\\(\"?(.+?)\"?\\)\\s*\$/", $a, $ar)) {
        return "<a href=\"mailto:" . htmlspecialchars(urlencode(spam_protect($ar[1])), ENT_QUOTES, "UTF-8") . "\" class=\"email fn n\">" . str_replace(" ", "&nbsp;", htmlspecialchars($ar[2], ENT_QUOTES, "UTF-8")) . "</a>";
    }
    if (preg_match("/^\\s*\"?(.+?)\"?\\s*<(.+)>\\s*\$/", $a, $ar)) {
        return "<a href=\"mailto:" . htmlspecialchars(urlencode(spam_protect($ar[2])), ENT_QUOTES, "UTF-8") . "\" class=\"email fn n\">" . str_replace(" ", "&nbsp;", htmlspecialchars($ar[1], ENT_QUOTES, "UTF-8")) . "</a>";
    }
    if (strpos("@", $a) !== false) {
        $a = spam_protect($a);
        return "<a href=\"mailto:" . htmlspecialchars(urlencode($a), ENT_QUOTES, "UTF-8") . "\" class=\"email fn n\">" . htmlspecialchars($a, ENT_QUOTES, "UTF-8") . "</a>";
    }
    return str_replace(" ", "&nbsp;", htmlspecialchars($a, ENT_QUOTES, "UTF-8"));
}
开发者ID:ramsey,项目名称:web-news,代码行数:15,代码来源:common.php


示例7: get_old_comments

/**
 * Produces a string containing the bug's prior comments
 *
 * @param int $bug_id	the bug's id number
 * @param int $all		should all existing comments be returned?
 *
 * @return string	the comments
 */
function get_old_comments($bug_id, $all = 0)
{
    global $dbh, $site_method, $site_url, $basedir;
    $divider = str_repeat('-', 72);
    $max_message_length = 10 * 1024;
    $max_comments = 5;
    $output = '';
    $count = 0;
    $res = $dbh->prepare("\n\t\tSELECT ts, email, comment\n\t\tFROM bugdb_comments\n\t\tWHERE bug = ? AND comment_type != 'log'\n\t\tORDER BY ts DESC\n\t")->execute(array($bug_id));
    // skip the most recent unless the caller wanted all comments
    if (!$all) {
        $row = $res->fetchRow(MDB2_FETCHMODE_ORDERED);
        if (!$row) {
            return '';
        }
    }
    while (($row = $res->fetchRow(MDB2_FETCHMODE_ORDERED)) && strlen($output) < $max_message_length && $count++ < $max_comments) {
        $email = spam_protect($row[1], 'text');
        $output .= "[{$row[0]}] {$email}\n\n{$row[2]}\n\n{$divider}\n";
    }
    if (strlen($output) < $max_message_length && $count < $max_comments) {
        $res = $dbh->prepare("SELECT ts1, email, ldesc FROM bugdb WHERE id = ?")->execute(array($bug_id));
        if (!$res) {
            return $output;
        }
        $row = $res->fetchRow(MDB2_FETCHMODE_ORDERED);
        if (!$row) {
            return $output;
        }
        $email = spam_protect($row[1], 'text');
        return "\n\nPrevious Comments:\n{$divider}\n{$output}[{$row[0]}] {$email}\n\n{$row[2]}\n\n{$divider}\n\n";
    } else {
        return "\n\nPrevious Comments:\n{$divider}\n{$output}\n\nThe remainder of the comments for this report are too long. To view\nthe rest of the comments, please view the bug report online at\n\n    {$site_method}://{$site_url}{$basedir}/bug.php?id={$bug_id}\n";
    }
    return '';
}
开发者ID:reeze,项目名称:web-bugs,代码行数:44,代码来源:functions.php


示例8: urlencode

            ?>
        revision <a href="patch-display.php?bug_id=<?php 
            echo $bug_id;
            ?>
&amp;patch=<?php 
            echo urlencode($pname);
            ?>
&amp;revision=<?php 
            echo $rev[0];
            ?>
&amp;display=1"><?php 
            echo format_date($rev[0]);
            ?>
</a>
        by <?php 
            echo spam_protect($rev[1]);
            ?>
</a><br />
   <?php 
        }
        //foreach ($revs as $rev);
        ?>
  </td>
 </tr>
<?php 
    }
    ?>
</table>
</div>
<?php 
}
开发者ID:reeze,项目名称:web-bugs,代码行数:31,代码来源:listpatches.php


示例9: wordwrap

            } else {
                $mailfrom = $_POST['in']['handle'];
            }
            $report = <<<REPORT
From:             {$mailfrom}
Operating system: {$_POST['in']['php_os']}
PHP version:      {$_POST['in']['php_version']}
Package:          {$package_name}
Bug Type:         {$_POST['in']['bug_type']}
Bug description:
REPORT;
            $ascii_report = "{$report}{$_POST['in']['sdesc']}\n\n" . wordwrap($fdesc, 72);
            $ascii_report .= "\n-- \nEdit bug report at ";
            $ascii_report .= "{$site_method}://{$site_url}{$basedir}/bug.php?id={$cid}&edit=";
            list($mailto, $mailfrom, $bcc, $params) = get_package_mail($package_name, false, $_POST['in']['bug_type']);
            $protected_email = '"' . spam_protect($_POST['in']['email'], 'text') . '"' . "<{$mailfrom}>";
            $extra_headers = "From: {$protected_email}\n";
            $extra_headers .= "X-PHP-BugTracker: {$siteBig}bug\n";
            $extra_headers .= "X-PHP-Bug: {$cid}\n";
            $extra_headers .= "X-PHP-Type: {$_POST['in']['bug_type']}\n";
            $extra_headers .= "X-PHP-Version: {$_POST['in']['php_version']}\n";
            $extra_headers .= "X-PHP-Category: {$package_name}\n";
            $extra_headers .= "X-PHP-OS: {$_POST['in']['php_os']}\n";
            $extra_headers .= "X-PHP-Status: Open\n";
            $extra_headers .= "Message-ID: <bug-{$cid}@{$site_url}>";
            if (isset($bug_types[$_POST['in']['bug_type']])) {
                $type = $bug_types[$_POST['in']['bug_type']];
            } else {
                $type = 'unknown';
            }
            $project = !empty($_GET['project']) ? $_GET['project'] : false;
开发者ID:jabiinfante,项目名称:web-bugs,代码行数:31,代码来源:report.php


示例10: output_note

function output_note($com_id, $ts, $email, $comment, $comment_type, $comment_name, $is_hidden = false)
{
    global $edit, $bug_id, $dbh, $is_trusted_developer, $logged_in;
    $display = !$is_hidden ? '' : 'style="display:none;"';
    echo "<div class='comment type_{$comment_type}' {$display}>";
    echo '<a name="', urlencode($ts), '">&nbsp;</a>';
    echo "<strong>[", format_date($ts), "] ";
    echo link_to_people($email, spam_protect(htmlspecialchars($email))), "</strong>\n";
    switch ($comment_type) {
        case 'log':
            echo "<div class='log_note'>{$comment}</div>";
            break;
        default:
            // Delete comment action only for trusted developers
            echo $edit == 1 && $com_id !== 0 && $is_trusted_developer ? "<a href='bug.php?id={$bug_id}&amp;edit=1&amp;delete_comment={$com_id}'>[delete]</a>\n" : '';
            $comment = make_ticket_links(addlinks($comment));
            echo "<pre class='note'>{$comment}\n</pre>\n";
    }
    echo '</div>';
}
开发者ID:phpsource,项目名称:web-bugs,代码行数:20,代码来源:bug.php


示例11: date

        $desc .= date(DATE_ATOM, $row['submitted']) . "\n";
        $desc .= "PHP: {$row['php_version']}, OS: {$row['php_os']}\n\n";
        $desc .= $row['ldesc'];
        $desc = '<pre>' . clean($desc) . '</pre>';
        echo "\t  <rdf:li rdf:resource=\"{$site_method}://{$site_url}{$basedir}/{$row['id']}\" />\n";
        $items .= "  <item rdf:about=\"{$site_method}://{$site_url}{$basedir}/{$row['id']}\">\n";
        $items .= '	<title>' . clean("{$row['bug_type']} {$row['id']} [{$row['status']}] {$row['sdesc']}") . "</title>\n";
        $items .= "\t<link>{$site_method}://{$site_url}{$basedir}/{$row['id']}</link>\n";
        $items .= '	<content:encoded><![CDATA[' . $desc . "]]></content:encoded>\n";
        $items .= '	<description><![CDATA[' . $desc . "]]></description>\n";
        if (!$row['unchanged']) {
            $items .= '	<dc:date>' . date(DATE_ATOM, $row['submitted']) . "</dc:date>\n";
        } else {
            $items .= '	<dc:date>' . date(DATE_ATOM, $row['modified']) . "</dc:date>\n";
        }
        $items .= '	<dc:creator>' . clean(spam_protect($row['email'])) . "</dc:creator>\n";
        $items .= '	<dc:subject>' . clean($row['package_name']) . ' ' . clean($row['bug_type']) . "</dc:subject>\n";
        $items .= "  </item>\n";
    }
} else {
    $warnings[] = "No bugs matched your criteria";
}
echo <<<DATA
\t </rdf:Seq>
\t</items>
  </channel>

  <image rdf:about="{$site_method}://{$site_url}{$basedir}/images/{$site}-logo.gif">
\t<title>{$siteBig} Bugs</title>
\t<url>{$site_method}://{$site_url}{$basedir}/images/{$site}-logo.gif</url>
\t<link>{$site_method}://{$site_url}{$basedir}</link>
开发者ID:phpsource,项目名称:web-bugs,代码行数:31,代码来源:search.php


示例12: bugs_gen_passwd

        // Run the query
        $row = $dbh->prepare($query)->execute()->fetchRow(MDB2_FETCHMODE_ASSOC);
        if (is_null($row)) {
            $errors[] = "Invalid bug id provided: #{$bug_id}";
        } else {
            if (empty($row['passwd'])) {
                $errors[] = "No password found for #{$bug_id} bug report, sorry.";
            } else {
                $new_passwd = bugs_gen_passwd();
                $dbh->prepare('UPDATE bugdb
				 SET passwd = ?
				 WHERE id = ?
				')->execute(array(bugs_get_hash($new_passwd), $bug_id));
                $resp = bugs_mail($row['email'], "Password for {$siteBig} bug report #{$bug_id}", "The password for {$siteBig} bug report #{$bug_id} has been set to: {$new_passwd}", 'From: [email protected]');
                if ($resp) {
                    $success = "The password for bug report #{$bug_id} has been sent to " . spam_protect($row['email'], 'text');
                } else {
                    $errors[] = 'Sorry. Mail can not be sent at this time, please try again later.';
                }
            }
        }
    }
}
response_header('Bug Report Password Finder');
echo "<h1>Bug Report Password Finder</h1>\n";
display_bug_error($errors);
if ($success) {
    display_bug_success($success);
}
$captcha = $numeralCaptcha->getOperation();
$_SESSION['answer'] = $numeralCaptcha->getAnswer();
开发者ID:reeze,项目名称:web-bugs,代码行数:31,代码来源:bug-pwd-finder.php


示例13: get_rating

$rating_info = get_rating($row['score'], $row['votes']);
if (!is_admin() && $row['submitter'] != is_user()) {
    update_views($global_id);
}
//$modheader .= '<link rel="stylesheet" type="text/css" href="modules/'.$module_name.'/include/style.css" />';
$pagetitle .= $module_title . ' ' . _BC_DELIM . ' ' . $row['title'];
if ($row['img_url']) {
    if (ereg('://', $row['img_url'])) {
        $row['img_url'] .= '" width="' . $dl_config['dimension_thumb'];
    } else {
        $row['img_url'] = dl_thumbimage($row['img_url']);
    }
}
$can_dl = can_download($row['active'], $row['access']);
//$submitter_count = $db->sql_count($dl_prefix.'_downloads', "submitter='".Fix_Quotes($row['submitter'])."'")-1;
$cpgtpl->assign_vars(array('L_SUBMITTEDBY' => _DLP_SUBMITTEDBY, 'L_AUTHORNAME' => _AUTHORNAME, 'L_AUTHOREMAIL' => _AUTHOREMAIL, 'L_PUBLISHED' => _DLP_PUBLISHED, 'L_UPDATED' => _DLP_UPDATED, 'L_DESCRIPTION' => _DESCRIPTION, 'L_CATEGORY' => _CATEGORY, 'L_RATING' => _RATING, 'L_VOTES' => _VOTES, 'L_DOWNLOADS' => _DOWNLOADS, 'L_ACTIVE' => _ACTIVE, 'L_EDIT' => _EDIT, 'L_DELETE' => _DELETE, 'L_ISDLOWNER' => sprintf(_DLP_ISDLOWNER, URL::index('&amp;file=manage&amp;edit=' . $global_id)), 'L_MIRSUB' => sprintf(_DLP_MIRSUB, URL::index('&amp;file=manage&amp;mirrors=' . $global_id)), 'L_EDNOTE' => _DLP_EDNOTE, 'L_MEMREVIEWS' => _DLP_MEMREVIEWS, 'L_PENDREVIEWS' => _DLP_PENDREVIEWS, 'L_BY' => _BY, 'L_ON' => _ON, 'L_PAGE' => _DLP_PAGE, 'L_VIEWALLSCREENS' => _DLP_VIEWALLSCREENS, 'L_POPULARITY' => _POPULARITY, 'L_PAGEVIEWS' => _DLP_PAGEVIEWS, 'L_ADMINTOOLS' => _ADMINISTRATION, 'L_EDPICK' => _DLP_EDPICK, 'DL_MENU' => dl_detail_menu($global_id, $row['title'], $row['pick'], $row['active'], 1), 'DL_CATEGORY' => DL_Cat::breadcrumb($row['cid']), 'DL_SUBMITTER' => is_numeric($row['submitter']) ? '<a href="' . URL::index('&amp;file=search&amp;sa=' . $row['submitter']) . '">' . $row['username'] . '</a>' : $row['submitter'], 'DL_AUTHORNAME' => $row['name'], 'DL_AUTHOREMAIL' => $row['email'] ? spam_protect($row['email']) : false, 'DL_PUBLISHED' => generate_date($row['date']), 'DL_PUBLISHTYPE' => mark_date($row['date'], 3, 1, 'right'), 'DL_UPDATED' => $row['updated'] > $row['date'] ? generate_date($row['updated']) : false, 'DL_UPDATE_TYPE' => $row['updated'] > $row['date'] ? mark_date($row['updated'], 3, 2, 'right') : false, 'DL_DESCRIPTION' => nl2br($row['desc_short']) . (!empty($row['desc_long']) ? decode_bbcode("\n\n" . $row['desc_long'], true) : ''), 'DL_NOTES' => decode_bbcode($row['notes']), 'DL_REVIEWS_ACTIVE' => $dl_config['r_active'], 'IMG_DL_RATING' => $rating_info['image'], 'DL_VOTES' => intval($row['votes']), 'DL_POPULARITY' => popularity($global_id), 'DL_HITS' => intval($row['hits']), 'DL_VIEWS' => intval($row['views']), 'DL_SUB_MIRRORS' => $dl_config['pub_mirror'], 'U_DL_SCREENSHOT' => URL::index('&amp;screen=' . $row['screen']), 'IMG_DL_SCREENSHOT' => $row['img_url'], 'B_DL_ADMIN' => can_admin($module_name), 'DL_IS_OWNER' => $row['submitter'] == $userinfo['user_id'], 'U_DL_DELETE' => URL::admin('&amp;del_dl=' . $global_id), 'U_DL_EDIT' => URL::index('&amp;file=manage&amp;edit=' . $global_id), 'U_DL_MIRSUB' => URL::index('&amp;file=manage&amp;mirrors=' . $global_id), 'U_DL_MIRROR' => URL::index('&amp;mirror=' . $global_id), 'U_DL_MIRRORS' => URL::index('&amp;get=' . $global_id), 'U_DL_ACTIVE' => URL::admin('&amp;active=' . $global_id), 'U_DL_PICK' => URL::admin('&amp;pick=' . $global_id), 'IMG_DL_MIRRORS' => dl_image($can_dl ? 'download.png' : 'register.png'), 'IMG_DL_ACTIVE' => dl_image($row['active'] == 1 ? 'checked.png' : 'unchecked.png'), 'IMG_DL_PICK' => dl_image($row['pick'] ? 'checked.png' : 'unchecked.png'), 'S_DL_ACTIVE' => $row['active'] == 1 ? _YES : _NO, 'S_DL_PICK' => $row['pick'] ? _YES : _NO, 'S_DL_MIRRORS' => $can_dl ? _DLP_DLNOW : _DLP_NADL));
$result = $db->sql_query("SELECT field, title, type FROM " . $dl_prefix . "_fields \n\tWHERE type!=3 AND visible > 0");
if ($db->sql_numrows($result)) {
    while ($row2 = $db->sql_fetchrow($result)) {
        if ($row2['type'] == 1) {
            $row[$row2['field']] = $row[$row2['field']] ? _YES : _NO;
        }
        if ($row[$row2['field']]) {
            $row2['title'] = defined($row2['title']) ? constant($row2['title']) : $row2['title'];
            if ($row2['field'] == 'homepage' && $row[$row2['field']]) {
                $row[$row2['field']] = '<a href="' . $row[$row2['field']] . '" target="_blank">' . shrink_url($row[$row2['field']]) . '</a>';
            }
            $cpgtpl->assign_block_vars('dl_field', array('TITLE' => $row2['title'], 'VALUE' => $row[$row2['field']]));
        }
    }
}
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:details.php


示例14: defined

$cve_id = !empty($_GET['cve_id']) ? $_GET['cve_id'] : '';
$cve_id_not = !empty($_GET['cve_id_not']) ? 'not' : '';
$patch = !empty($_GET['patch']) ? $_GET['patch'] : '';
$pull = !empty($_GET['pull']) ? $_GET['pull'] : '';
$private = !empty($_GET['private']) ? $_GET['private'] : '';
$begin = (int) (!empty($_GET['begin']) && $_GET['begin'] > 0 ? $_GET['begin'] : 0);
$limit = defined('MAX_BUGS_RETURN') ? MAX_BUGS_RETURN : 30;
$project = !empty($_GET['project']) && $_GET['project'] != 'All' ? $_GET['project'] : '';
if (!empty($_GET['limit'])) {
    $limit = $_GET['limit'] == 'All' ? 'All' : ($_GET['limit'] > 0 ? (int) $_GET['limit'] : $limit);
}
$direction = !empty($_GET['direction']) && $_GET['direction'] != 'DESC' ? 'ASC' : 'DESC';
$order_by = !empty($_GET['order_by']) && array_key_exists($_GET['order_by'], $order_options) ? $_GET['order_by'] : '';
$reorder_by = !empty($_GET['reorder_by']) && array_key_exists($_GET['reorder_by'], $order_options) ? $_GET['reorder_by'] : '';
$assign = !empty($_GET['assign']) ? $_GET['assign'] : '';
$author_email = !empty($_GET['author_email']) ? spam_protect($_GET['author_email'], 'reverse') : '';
$package_name = isset($_GET['package_name']) && is_array($_GET['package_name']) ? $_GET['package_name'] : array();
$package_nname = isset($_GET['package_nname']) && is_array($_GET['package_nname']) ? $_GET['package_nname'] : array();
if (isset($_GET['cmd']) && $_GET['cmd'] == 'display') {
    $query = '
		SELECT SQL_CALC_FOUND_ROWS 
		bugdb.*,
		TO_DAYS(NOW())-TO_DAYS(bugdb.ts2) AS unchanged,
		UNIX_TIMESTAMP(ts1) AS submitted,
		UNIX_TIMESTAMP(ts2) AS modified
		FROM bugdb
	';
    if (in_array($order_by, array('votes_count', 'avg_score'))) {
        $query .= 'LEFT JOIN bugdb_votes v ON bugdb.id = v.bug';
    }
    $where_clause = ' WHERE 1 = 1 ';
开发者ID:phpsource,项目名称:web-bugs,代码行数:31,代码来源:query.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP spamcheck函数代码示例发布时间:2022-05-23
下一篇:
PHP spamProtection函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap