Added condition for category search in admin panel (if disabled categories)
This commit is contained in:
parent
76bf9b113d
commit
5a0ecd8a72
|
@ -53,10 +53,12 @@ function AddSearchBar() {
|
||||||
global $GBcategoryfield;
|
global $GBcategoryfield;
|
||||||
if ($GBsearch) if (!(isset($_SESSION["EditStatus"]) or (isset($_SESSION["DeleteStatus"])?($_SESSION["DeleteStatus"]=="deletion"):(false)))) {
|
if ($GBsearch) if (!(isset($_SESSION["EditStatus"]) or (isset($_SESSION["DeleteStatus"])?($_SESSION["DeleteStatus"]=="deletion"):(false)))) {
|
||||||
echo "<form action=administration.php method=post>";
|
echo "<form action=administration.php method=post>";
|
||||||
echo "<input type=text name=\"serachq\" value=\"\" maxlength=255 list=\"browsers\">";
|
if ($GBcategoryfield) {
|
||||||
echo "<datalist id=\"browsers\">";
|
echo "<input type=text name=\"serachq\" value=\"\" maxlength=255 list=\"browsers\">";
|
||||||
foreach ($GBcategoryfield as $category) echo " <option value=\"",$category,"\">";
|
echo "<datalist id=\"browsers\">";
|
||||||
echo "</datalist>";
|
foreach ($GBcategoryfield as $category) echo " <option value=\"",$category,"\">";
|
||||||
|
echo "</datalist>";
|
||||||
|
} else echo "<input type=text name=\"serachq\" value=\"\" maxlength=255>";
|
||||||
echo "<input type=submit name=\"search\" value=\"",$Titles["Search"],"\">";
|
echo "<input type=submit name=\"search\" value=\"",$Titles["Search"],"\">";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
}
|
}
|
||||||
|
|
10
index.php
10
index.php
|
@ -184,10 +184,12 @@ function AddSearchBar() {
|
||||||
global $GBcategoryfield;
|
global $GBcategoryfield;
|
||||||
if ($GBsearch) {
|
if ($GBsearch) {
|
||||||
echo "<form action=index.php method=post>";
|
echo "<form action=index.php method=post>";
|
||||||
echo "<input type=text name=\"serachq\" value=\"\" maxlength=255 list=\"browsers\">";
|
if ($GBcategoryfield) {
|
||||||
echo "<datalist id=\"browsers\">";
|
echo "<input type=text name=\"serachq\" value=\"\" maxlength=255 list=\"browsers\">";
|
||||||
foreach ($GBcategoryfield as $category) echo " <option value=\"",$category,"\">";
|
echo "<datalist id=\"browsers\">";
|
||||||
echo "</datalist>";
|
foreach ($GBcategoryfield as $category) echo " <option value=\"",$category,"\">";
|
||||||
|
echo "</datalist>";
|
||||||
|
} else echo "<input type=text name=\"serachq\" value=\"\" maxlength=255>";
|
||||||
echo "<input type=submit name=\"search\" value=\"",$Titles["Search"],"\">";
|
echo "<input type=submit name=\"search\" value=\"",$Titles["Search"],"\">";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue