예제 #1
0
파일: update.php 프로젝트: loopzy/my
}
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);
예제 #2
0
파일: search_1.php 프로젝트: loopzy/my
// 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);
            }
        }