Added condition for category search in admin panel (if disabled categories)

This commit is contained in:
ivan 2017-10-01 13:08:05 +03:00
parent 76bf9b113d
commit 5a0ecd8a72
2 changed files with 12 additions and 8 deletions

View File

@ -53,10 +53,12 @@ function AddSearchBar() {
global $GBcategoryfield;
if ($GBsearch) if (!(isset($_SESSION["EditStatus"]) or (isset($_SESSION["DeleteStatus"])?($_SESSION["DeleteStatus"]=="deletion"):(false)))) {
echo "<form action=administration.php method=post>";
echo "<input type=text name=\"serachq\" value=\"\" maxlength=255 list=\"browsers\">";
echo "<datalist id=\"browsers\">";
foreach ($GBcategoryfield as $category) echo " <option value=\"",$category,"\">";
echo "</datalist>";
if ($GBcategoryfield) {
echo "<input type=text name=\"serachq\" value=\"\" maxlength=255 list=\"browsers\">";
echo "<datalist id=\"browsers\">";
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 "</form>";
}

View File

@ -184,10 +184,12 @@ function AddSearchBar() {
global $GBcategoryfield;
if ($GBsearch) {
echo "<form action=index.php method=post>";
echo "<input type=text name=\"serachq\" value=\"\" maxlength=255 list=\"browsers\">";
echo "<datalist id=\"browsers\">";
foreach ($GBcategoryfield as $category) echo " <option value=\"",$category,"\">";
echo "</datalist>";
if ($GBcategoryfield) {
echo "<input type=text name=\"serachq\" value=\"\" maxlength=255 list=\"browsers\">";
echo "<datalist id=\"browsers\">";
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 "</form>";
}