} require_once "./mysql_query.php"; $s = "<form id='form' enctype='multipart/form-data'>"; echo $s; $type = array(); $des = array(); $per = array(); $type = array_unique(search0(array("type"), array())["type"]); // print "t:".$tselect."<br>"; // print "d:".$dselect."<br>"; // print "p:".$pselect."<br>"; // print_r($_GET); if ($tselect == "") { $des = array_unique(search0(array("description"), array())["description"]); } else { $des = array_unique(search0(array("description"), array("type" => "{$tselect}"))["description"]); } if ($tselect == "" || $dselect == "") { $per = array_unique(search1(array("per"), array())["per"]); } else { $per = array_unique(search0_1(array("per"), array("type" => "{$tselect}", "description" => "{$dselect}"))["per"]); // print_r($per); if (!$per) { $p = array(); if ($tselect) { $p["type"] = $tselect; } if ($dselect) { $p["description"] = $dselect; } $result = search_print(array("*"), $p);
// require "alice.inc"; if ($_POST) { $item = array(); $type = ""; $des = ""; $per = ""; if ($_POST["type"] == "all" || $_POST["type"] == "") { $type = search0(array("type"), array())['type']; } else { $type = array($_POST["type"]); } foreach ($type as $t) { // print $_POST["des"]; // print "<br>"; if ($_POST["des"] == "all" || $_POST["des"] == "") { $des = search0(array("description"), array("type" => $t))['description']; } else { $des = array($_POST["des"]); } // var_dump($des); foreach ($des as $d) { if ($_POST["per"] == "all" || $_POST["per"] == "") { $per = search0_1(array("per"), array("type" => $t, "description" => $d))['per']; } else { $per = array($_POST["per"]); } // var_dump($per); foreach ($per as $p) { $item[] = array("type" => $t, "description" => $d, "per" => $p); } }