Empty commit

This commit is contained in:
Git 2013-08-05 08:00:44 +00:00
parent a6162d22e2
commit 64ebccd602
2 changed files with 25 additions and 0 deletions

View File

@ -1,5 +1,8 @@
CHANGELOG CHANGELOG
2013-08-05 by Ajax
Search email blacklist
2013-07-30 by Y 2013-07-30 by Y
Collage API additions. Collage API additions.

View File

@ -6,6 +6,20 @@
list ($Page, $Limit) = Format::page_limit(EMAILS_PER_PAGE); list ($Page, $Limit) = Format::page_limit(EMAILS_PER_PAGE);
View::show_header('Manage email blacklist'); View::show_header('Manage email blacklist');
$Where = "";
if (!empty($_POST['email'])) {
$Email = db_string($_POST['email']);
$Where .= " WHERE eb.Email LIKE '%$Email%'";
}
if (!empty($_POST['comment'])) {
$Comment = db_string($_POST['comment']);
if (!empty($Where)) {
$Where .= " AND";
} else {
$Where .= " WHERE";
}
$Where .= " eb.Comment LIKE '%$Comment%'";
}
$DB->query(" $DB->query("
SELECT SELECT
SQL_CALC_FOUND_ROWS SQL_CALC_FOUND_ROWS
@ -15,6 +29,7 @@
eb.Email, eb.Email,
eb.Comment eb.Comment
FROM email_blacklist AS eb FROM email_blacklist AS eb
$Where
ORDER BY eb.Time DESC ORDER BY eb.Time DESC
LIMIT $Limit"); LIMIT $Limit");
$Results = $DB->to_array(false, MYSQLI_ASSOC, false); $Results = $DB->to_array(false, MYSQLI_ASSOC, false);
@ -24,6 +39,13 @@
<div class="header"> <div class="header">
<h2>Email Blacklist</h2> <h2>Email Blacklist</h2>
</div> </div>
<br />
<form action="tools.php" method="POST">
<input type="hidden" name="action" value="email_blacklist" />
<input type="text" name="email" size="30" placeholder="Email"/>
<input type="text" name="comment" size="60" placeholder="Comment"/>
<input type="submit" value="Search" />
</form>
<div class="linkbox pager"> <div class="linkbox pager">
<br /> <br />
<? <?