function deleteCableLine($CableLineId, $tmpT = FALSE) { /* $wr[ 'CableLine' ] = $CableLineId; $query = 'DELETE FROM "'.tmpTable( 'CableLinePoint', $tmpT ).'"'.genWhere( $wr ); PQuery( $query ); $query = 'DELETE FROM "'.tmpTable( 'OpticalFiber', $tmpT ).'"'.genWhere( $wr ); PQuery( $query ); unset( $wr );*/ $wr['id'] = $CableLineId; CableLine_DELETE($wr, $tmpT); // $query = 'DELETE FROM "'.tmpTable( 'CableLine', $tmpT ).'"'.genWhere( $wr ); // PQuery( $query ); }
showMessage($message, 0); } $smarty->assign("mode", "add_change"); $smarty->assign("mod", "2"); $smarty->assign("back", getenv("HTTP_REFERER")); $smarty->assign("id", ''); $smarty->assign("length", '0.00'); $smarty->assign("comment", ''); $smarty->assign("name", ''); $res = CableType_SELECT('', ''); $rows = $res['rows']; $i = -1; while (++$i < $res['count']) { $comboBox_CableType_Values[] = $rows[$i]['id']; $comboBox_CableType_Text[] = $rows[$i]['marking']; } $smarty->assign("combobox_cabletype_values", $comboBox_CableType_Values); $smarty->assign("combobox_cabletype_text", $comboBox_CableType_Text); $smarty->assign("combobox_cabletype_selected", ''); } elseif ($_GET['mode'] == 'delete' and isset($_GET['cablelineid'])) { if ($_SESSION['class'] > 1) { die("!!!"); } $wr['id'] = $_GET['cablelineid']; CableLine_DELETE($wr); header("Refresh: 2; url=" . getenv("HTTP_REFERER")); $message = "Кабель удален!"; showMessage($message, 0); } $smarty->display('CableLine.tpl'); }