Ejemplo n.º 1
0
         $invNum .= " (" . $rows[$i]['marking'] . ")";
         $comboBox_Box_Values[] = $rows[$i]['id'];
         $comboBox_Box_Text[] = $invNum;
     }
     $smarty->assign("combobox_box_values", $comboBox_Box_Values);
     $smarty->assign("combobox_box_text", $comboBox_Box_Text);
     $smarty->assign("combobox_box_selected", $networkBox);
 } elseif ($_GET['mode'] == 'add') {
     if ($_SESSION['class'] > 1) {
         $message = '!!!';
         showMessage($message, 0);
     }
     $smarty->assign("mode", "add_change");
     $smarty->assign("mod", "2");
     $smarty->assign("back", getenv("HTTP_REFERER"));
     $res = getFreeNetworkBoxes(-1);
     $rows = $res['rows'];
     $i = -1;
     while (++$i < $res['count']) {
         $invNum = $rows[$i]['inventoryNumber'];
         if ($invNum == "") {
             $invNum = "---";
         }
         $invNum .= " (" . $rows[$i]['marking'] . ")";
         $comboBox_Box_Values[] = $rows[$i]['id'];
         $comboBox_Box_Text[] = $invNum;
     }
     $smarty->assign("combobox_box_values", $comboBox_Box_Values);
     $smarty->assign("combobox_box_text", $comboBox_Box_Text);
     $smarty->assign("id", '');
     $smarty->assign("name", '');
Ejemplo n.º 2
0
    print $res;
} elseif ($_GET['mode'] == "GetNodes") {
    require_once "backend/NetworkNode.php";
    $res = NetworkNode_SELECT(0, '', '', TRUE);
    $rows = $res['rows'];
    $nodesJSON['Nodes'] = array();
    $i = -1;
    while (++$i < $res['count']) {
        $nodesJSON['Nodes'][$i]['id'] = (int) $rows[$i]['id'];
        $nodesJSON['Nodes'][$i]['name'] = $rows[$i]['name'];
    }
    $res = json_encode($nodesJSON);
    print $res;
} elseif ($_GET['mode'] == "GetNetworkBoxes") {
    require_once "backend/NetworkNode.php";
    $res = getFreeNetworkBoxes(-1, TRUE);
    $rows = $res['rows'];
    $boxesJSON['Boxes'] = array();
    $i = -1;
    while (++$i < $res['count']) {
        $invNum = $rows[$i]['inventoryNumber'];
        if ($invNum == "") {
            $invNum = "---";
        }
        $invNum .= " (" . $rows[$i]['marking'] . ")";
        $boxesJSON['Boxes'][$i]['id'] = (int) $rows[$i]['id'];
        $boxesJSON['Boxes'][$i]['inventoryNumber'] = $invNum;
    }
    $res = json_encode($boxesJSON);
    print $res;
} elseif ($_GET['mode'] == "GetNetworkBoxTypes") {