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,11 +16,12 @@ $type = getValue($_GET['type']);
|
|||||||
if ($type !== false) $type = (int)$type;
|
if ($type !== false) $type = (int)$type;
|
||||||
$text = getvalue($_GET['text']);
|
$text = getvalue($_GET['text']);
|
||||||
|
|
||||||
$text = explode(' ', $text);
|
|
||||||
$textTitleSql = "";
|
$textTitleSql = "";
|
||||||
$textPostSql = "";
|
$textPostSql = "";
|
||||||
$textAuthorSql = "";
|
$textAuthorSql = "";
|
||||||
for ($i = 0; $i < count($text); $i++) {
|
if ($text !== false) {
|
||||||
|
$text = explode(' ', $text);
|
||||||
|
for ($i = 0; $i < count($text); $i++) {
|
||||||
if ($i != count($text) -1) {
|
if ($i != count($text) -1) {
|
||||||
$textTitleSql .= "`title` LIKE '%". $text[$i] ."%' AND ";
|
$textTitleSql .= "`title` LIKE '%". $text[$i] ."%' AND ";
|
||||||
$textPostSql .= "`text` LIKE '%". $text[$i] ."%' AND ";
|
$textPostSql .= "`text` LIKE '%". $text[$i] ."%' AND ";
|
||||||
@ -30,10 +31,10 @@ for ($i = 0; $i < count($text); $i++) {
|
|||||||
$textPostSql .= "`text` LIKE '%". $text[$i] ."%'";
|
$textPostSql .= "`text` LIKE '%". $text[$i] ."%'";
|
||||||
$textAuthorSql .= "`player_name` 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>
|
<h1>Search forum</h1>
|
||||||
<form method="" type="get">
|
<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 "No results.";
|
||||||
} else echo "<br><b>You must fill in all fields!</b>";
|
} 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