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>";
|
||||||
|
if ($GBcategoryfield) {
|
||||||
echo "<input type=text name=\"serachq\" value=\"\" maxlength=255 list=\"browsers\">";
|
echo "<input type=text name=\"serachq\" value=\"\" maxlength=255 list=\"browsers\">";
|
||||||
echo "<datalist id=\"browsers\">";
|
echo "<datalist id=\"browsers\">";
|
||||||
foreach ($GBcategoryfield as $category) echo " <option value=\"",$category,"\">";
|
foreach ($GBcategoryfield as $category) echo " <option value=\"",$category,"\">";
|
||||||
echo "</datalist>";
|
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>";
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>";
|
||||||
|
if ($GBcategoryfield) {
|
||||||
echo "<input type=text name=\"serachq\" value=\"\" maxlength=255 list=\"browsers\">";
|
echo "<input type=text name=\"serachq\" value=\"\" maxlength=255 list=\"browsers\">";
|
||||||
echo "<datalist id=\"browsers\">";
|
echo "<datalist id=\"browsers\">";
|
||||||
foreach ($GBcategoryfield as $category) echo " <option value=\"",$category,"\">";
|
foreach ($GBcategoryfield as $category) echo " <option value=\"",$category,"\">";
|
||||||
echo "</datalist>";
|
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