mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-30 03:09:22 +02:00
fixed warning if text is false.
This commit is contained in:
parent
3082c27bc8
commit
af09b01f59
@ -16,24 +16,25 @@ $type = getValue($_GET['type']);
|
||||
if ($type !== false) $type = (int)$type;
|
||||
$text = getvalue($_GET['text']);
|
||||
|
||||
$text = explode(' ', $text);
|
||||
$textTitleSql = "";
|
||||
$textPostSql = "";
|
||||
$textAuthorSql = "";
|
||||
for ($i = 0; $i < count($text); $i++) {
|
||||
if ($i != count($text) -1) {
|
||||
$textTitleSql .= "`title` LIKE '%". $text[$i] ."%' AND ";
|
||||
$textPostSql .= "`text` LIKE '%". $text[$i] ."%' AND ";
|
||||
$textAuthorSql .= "`player_name` LIKE '%". $text[$i] ."%' AND ";
|
||||
} else {
|
||||
$textTitleSql .= "`title` LIKE '%". $text[$i] ."%'";
|
||||
$textPostSql .= "`text` LIKE '%". $text[$i] ."%'";
|
||||
$textAuthorSql .= "`player_name` LIKE '%". $text[$i] ."%'";
|
||||
if ($text !== false) {
|
||||
$text = explode(' ', $text);
|
||||
for ($i = 0; $i < count($text); $i++) {
|
||||
if ($i != count($text) -1) {
|
||||
$textTitleSql .= "`title` LIKE '%". $text[$i] ."%' AND ";
|
||||
$textPostSql .= "`text` LIKE '%". $text[$i] ."%' AND ";
|
||||
$textAuthorSql .= "`player_name` LIKE '%". $text[$i] ."%' AND ";
|
||||
} else {
|
||||
$textTitleSql .= "`title` LIKE '%". $text[$i] ."%'";
|
||||
$textPostSql .= "`text` LIKE '%". $text[$i] ."%'";
|
||||
$textAuthorSql .= "`player_name` LIKE '%". $text[$i] ."%'";
|
||||
}
|
||||
}
|
||||
//data_dump($text, array($textTitleSql, $textPostSql, $textAuthorSql), "search");
|
||||
}
|
||||
|
||||
data_dump($text, array($textTitleSql, $textPostSql, $textAuthorSql), "search");
|
||||
|
||||
?>
|
||||
<h1>Search forum</h1>
|
||||
<form method="" type="get">
|
||||
@ -204,4 +205,5 @@ if ($type !== false && $text !== false && $type <= 4 || $type > 4 && $type <= 6)
|
||||
} else echo "No results.";
|
||||
} else echo "<br><b>You must fill in all fields!</b>";
|
||||
|
||||
include 'layout/overall/footer.php'; ?>
|
||||
include 'layout/overall/footer.php';
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user