mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-31 02:21:36 +00:00
Fix sentbox search
Incorrect hash used in RSS news feed links JS ctrl+f-ish search on upload rules page
This commit is contained in:
parent
c58f94a36f
commit
7a64bf0d36
@ -65,7 +65,7 @@
|
|||||||
if (strtotime($NewsTime) >= time()) {
|
if (strtotime($NewsTime) >= time()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
echo $Feed->item($Title, $Text->strip_bbcode($Body), 'index.php#'.$NewsID, SITE_NAME.' Staff','','',$NewsTime);
|
echo $Feed->item($Title, $Text->strip_bbcode($Body), 'index.php#news'.$NewsID, SITE_NAME.' Staff','','',$NewsTime);
|
||||||
if (++$Count > 4) {
|
if (++$Count > 4) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -58,16 +58,16 @@
|
|||||||
}
|
}
|
||||||
$sql .= " WHERE ";
|
$sql .= " WHERE ";
|
||||||
if(!empty($_GET['search'])) {
|
if(!empty($_GET['search'])) {
|
||||||
$Search = db_string($_GET['search']);
|
$Search = db_string($_GET['search']);
|
||||||
if($_GET['searchtype'] == "user") {
|
if($_GET['searchtype'] == "user") {
|
||||||
$sql .= "um.Username LIKE '".$Search."' AND ";
|
$sql .= "um.Username LIKE '".$Search."' AND ";
|
||||||
} elseif($_GET['searchtype'] == "subject") {
|
} elseif($_GET['searchtype'] == "subject") {
|
||||||
$Words = explode(' ', $Search);
|
$Words = explode(' ', $Search);
|
||||||
$sql .= "c.Subject LIKE '%".implode("%' AND c.Subject LIKE '%", $Words)."%' AND ";
|
$sql .= "c.Subject LIKE '%".implode("%' AND c.Subject LIKE '%", $Words)."%' AND ";
|
||||||
} elseif($_GET['searchtype'] == "message") {
|
} elseif($_GET['searchtype'] == "message") {
|
||||||
$Words = explode(' ', $Search);
|
$Words = explode(' ', $Search);
|
||||||
$sql .= "m.Body LIKE '%".implode("%' AND m.Body LIKE '%", $Words)."%' AND ";
|
$sql .= "m.Body LIKE '%".implode("%' AND m.Body LIKE '%", $Words)."%' AND ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sql .= ($Section == 'sentbox')? ' cu.InSentbox' : ' cu.InInbox';
|
$sql .= ($Section == 'sentbox')? ' cu.InSentbox' : ' cu.InInbox';
|
||||||
$sql .="='1'";
|
$sql .="='1'";
|
||||||
@ -95,25 +95,26 @@
|
|||||||
<? if($DB->record_count()==0) { ?>
|
<? if($DB->record_count()==0) { ?>
|
||||||
<h2>Your <?= ($Section == 'sentbox') ? 'sentbox' : 'inbox' ?> is currently empty</h2>
|
<h2>Your <?= ($Section == 'sentbox') ? 'sentbox' : 'inbox' ?> is currently empty</h2>
|
||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<form action="inbox.php" method="get" id="searchbox">
|
<form action="inbox.php" method="get" id="searchbox">
|
||||||
<div>
|
<div>
|
||||||
<input type="radio" name="searchtype" value="user" checked="checked" /> User
|
<input type="hidden" name="action" value="<?=$Section?>" />
|
||||||
<input type="radio" name="searchtype" value="subject" /> Subject
|
<input type="radio" name="searchtype" value="user" checked="checked" /> User
|
||||||
<input type="radio" name="searchtype" value="message" /> Message
|
<input type="radio" name="searchtype" value="subject" /> Subject
|
||||||
<span style="float: right;">
|
<input type="radio" name="searchtype" value="message" /> Message
|
||||||
|
<span style="float: right;">
|
||||||
<? if(empty($_GET['sort']) || $_GET['sort'] != "unread") { ?>
|
<? if(empty($_GET['sort']) || $_GET['sort'] != "unread") { ?>
|
||||||
<a href="<?=$CurURL?>sort=unread">List unread first</a>
|
<a href="<?=$CurURL?>sort=unread">List unread first</a>
|
||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<a href="<?=$CurURL?>">List latest first</a>
|
<a href="<?=$CurURL?>">List latest first</a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</span>
|
</span>
|
||||||
<br />
|
<br />
|
||||||
<input type="text" name="search" value="Search <?= ($Section == 'sentbox') ? 'Sentbox' : 'Inbox' ?>" style="width: 98%;"
|
<input type="text" name="search" value="Search <?= ($Section == 'sentbox') ? 'Sentbox' : 'Inbox' ?>" style="width: 98%;"
|
||||||
onfocus="if (this.value == 'Search <?= ($Section == 'sentbox') ? 'Sentbox' : 'Inbox' ?>') this.value='';"
|
onfocus="if (this.value == 'Search <?= ($Section == 'sentbox') ? 'Sentbox' : 'Inbox' ?>') this.value='';"
|
||||||
onblur="if (this.value == '') this.value='Search <?= ($Section == 'sentbox') ? 'Sentbox' : 'Inbox' ?>';"
|
onblur="if (this.value == '') this.value='Search <?= ($Section == 'sentbox') ? 'Sentbox' : 'Inbox' ?>';"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<form action="inbox.php" method="post" id="messageform">
|
<form action="inbox.php" method="post" id="messageform">
|
||||||
<input type="hidden" name="action" value="masschange" />
|
<input type="hidden" name="action" value="masschange" />
|
||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user