Ejemplo n.º 1
0
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require_once "_lib/php/auth.php";
$sql = isset($_POST["sqlbox"]) ? hex2str($_POST["sqlbox"]) : "";
if (isset($_POST["id_con"]) && $_POST["id_con"] != "") {
    $arcdb = new ArcDb();
    $arcdb->dbConStr = $globalDBCON;
    $arcdb->dbType = $globalDBTP;
    $arcdb->dbSchema = $globalDB;
    /**************************************************/
    $arcdb->sql = "\nSELECT\na.id_con, \na.con, \na.id_con_db_tp,\na.con_alias,\na.con_user,\na.con_enabledbit,\na.con_password,\na.con_host,\na.con_port,\na.con_catalog,\na.con_options,\nb.con_db_tp\nFROM _con a\nLEFT JOIN _con_db_tp b ON a.id_con_db_tp=b.id_con_db_tp\nWHERE a.id_con =" . $_POST["id_con"];
    $arcdb->getRec();
    $con = $arcdb->getAssociative();
}
$arcCon = new ArcTbl();
$arcCon->dbLimit = 23;
$arcCon->dbOffset = 0;
$arcCon->dbCatalog = isset($con[0]["con_catalog"]) ? $con[0]["con_catalog"] : $arcCon->dbCatalog;
$arcCon->oCon = isset($con[0]["con"]) ? $con[0]["con"] : $arcCon->oCon;
$arcCon->dbTable = $arcCon->oCon;
$arcCon->dbSchema = isset($con[0]["con"]) ? $con[0]["con"] : $arcCon->dbSchema;
$arcCon->oUser = isset($con[0]["con_user"]) ? $con[0]["con_user"] : $arcCon->oUser;
$arcCon->oPassword = isset($con[0]["con_password"]) && !empty($con[0]["con_password"]) ? decrypt($con[0]["con_password"]) : $arcCon->oPassword;
$arcCon->oHost = isset($con[0]["con_host"]) ? $con[0]["con_host"] : $arcCon->oHost;
$arcCon->oPort = isset($con[0]["con_port"]) ? $con[0]["con_port"] : $arcCon->oPort;
$arcCon->oOptions = isset($con[0]["con_options"]) ? $con[0]["con_options"] : $arcCon->oOptions;
$arcCon->dbType = isset($con[0]["con_db_tp"]) ? $con[0]["con_db_tp"] : $arcCon->dbType;
$arcCon->ajDestination = "queryReport";
$arcCon->ajPage = $path . "view_customquery.php";
$arcCon->ignoreCols = array();
Ejemplo n.º 2
0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require_once "_lib/php/auth.php";
$arctbl = new ArcTbl();
$arctbl->dbConStr = $globalDBCON;
$arctbl->dbOffset = 0;
$arctbl->dbLimit = 23;
$arctbl->dbType = $globalDBTP;
$arctbl->dbSchema = $globalDB;
$arctbl->recLink = $path . "edit.php";
$arctbl->actionFilterKey = "id_cust_department";
$arctbl->recIndex = "id_cust_department";
$arctbl->ignoreCols = array("id_cust_department");
$arctbl->recQuery = "\nSELECT\na.id_cust_department,\na.cust_department as \"Department\",\nc.cust_branch_tp as \"Type\",\nb.cust_branch as \"Branch\"\nFROM _cust_department a\nJOIN _cust_branch b ON a.id_cust_branch=b.id_cust_branch\nJOIN _cust_branch_tp c ON b.id_cust_branch_tp=c.id_cust_branch_tp";
$arctbl->actionDestination = "content";
$arctbl->ajDestination = "list03";
$arctbl->ajPage = $path . "list.php";
$arctbl->build();
echo hex2str($arctbl->tblNav);
Ejemplo n.º 3
0
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
# POST variables
$ajCfgDevice = null;
$ajCfgDevice = isset($_POST["id_cfg_device"]) ? "&id_cfg_device=" . $_POST["id_cfg_device"] : "";
$ajCfgDevice .= isset($_POST["id_device"]) ? "&id_device=" . $_POST["id_device"] : "";
$ajCfgDevice .= isset($_POST["id_cfg"]) ? "&id_cfg=" . $_POST["id_cfg"] : "";
if (!isset($_POST["id_device"])) {
    $_POST["id_device"] = "";
}
require_once "_lib/php/auth.php";
$gdbo = new ArcTbl();
$gdbo->dbConStr = $globalDBCON;
$gdbo->dbLimit = 25;
$gdbo->dbOffset = 0;
$gdbo->dbType = $globalDBTP;
$gdbo->dbSchema = $globalDB;
#$gdbo->recDetail="hex2str(\$record['Notes'])";
$gdbo->recOrder = "asc";
$gdbo->tblKey = "iflabel";
$gdbo->elements = array(array("Label", "device_interfacelabel"));
$gdbo->recOrderCol = "id_device_interfacelabel";
$gdbo->recQuery = "\nSELECT \nid_device_interfacelabel,\ndevice_interfacelabel as Label,\nid_device\nFROM _device_interfacelabel WHERE id_device=" . $_POST["id_device"];
$gdbo->dbTable = "_device_interfacelabel";
$gdbo->recIndex = $gdbo->getPrimaryKey();
$gdbo->updateAction = '"updateTable(\'rc".$rowIndex."_".$tblKey."\',\'". $this -> dbTable. "\',\'".$this->primaryKey."\',".$rowIndex.",1,\'' . $path . 'sql.php\',\'fs_labels\',\'&form=frmIFLabel&action=edit' . $ajCfgDevice . '\')"';
$gdbo->deleteAction = '"updateTable(\'rc".$rowIndex."_".$tblKey."\',\'". $this -> dbTable. "\',\'".$this->primaryKey."\',".$rowIndex.",2,\'' . $path . 'sql.php\',\'fs_labels\',\'&form=frmIFLabel&action=delete' . $ajCfgDevice . '\')"';
Ejemplo n.º 4
0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require_once "_lib/php/auth.php";
$arctbl = new ArcTbl();
$arctbl->dbType = $globalDBTP;
$arctbl->dbConStr = $globalDBCON;
$arctbl->dbSchema = $globalDB;
$arctbl->control = '/_mod/smod_12/sqlInsert.php';
$arctbl->editable = true;
$arctbl->dbOffset = 0;
$arctbl->dbLimit = 23;
if (isset($_POST["table"])) {
    $table = $_POST["table"];
    $arctbl->dbTable = $table;
    $arctbl->recQuery = "SELECT * FROM " . $table;
    $arctbl->recIndex = $arctbl->getPrimaryKey();
}
$arctbl->ajDestination = "list12";
$arctbl->actionDestination = "status";
Ejemplo n.º 5
0
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require_once "_lib/php/auth.php";
if (!isset($_POST["id_cfg"])) {
    $_POST["id_cfg"] = "";
}
$device = new ArcTbl();
$device->dbConStr = $globalDBCON;
$device->dbLimit = 10;
$device->dbOffset = 0;
$device->dbType = $globalDBTP;
$device->dbSchema = $globalDB;
$device->recIndex = "id_cfg_device";
$device->recOrder = "asc";
$device->actionDestination = "popWindow";
$device->recOrderCol = "Label";
$device->recLink = $path . "edit_cfgdevice.php";
$device->actionFilterKey = "id_cfg_device";
$device->recQuery = "\nSELECT\na.cfg_device as \"Device Label\",\na.id_cfg_device,\nc.device_grp as \"Type\",\nb.device as \"Device\",\na.cfg_device_os as \"OS\",\nconcat(f.cust_contact_familyName,',',f.cust_contact_givenName) as \"Admin\",\na.cfg_device_serialnumber as \"Serial Number\",\nUNHEX(a.cfg_device_notes) as \"Notes\",\nFROM_UNIXTIME(UNIX_TIMESTAMP(a.cfg_device_dc)+" . $gmtOffset . ",'%Y-%m-%d') as \"Date Entered\",\nFROM_UNIXTIME(UNIX_TIMESTAMP(a.cfg_device_du)+" . $gmtOffset . ") as \"Last Update\",\nd.sys_status as \"Status\",\nCASE\nWHEN a.cfg_device_keyenabled = 1\nTHEN 'Yes'\nELSE 'No'\nEND as \"Manageable\",\na.id_cfg,\nconcat('\n<input type=\"button\" value=\"Interfaces\" onclick=\"arc(''popWindow'',''/_mod/smod_18/manage_interface.php'',''id_cfg=',cast(id_cfg as char),'&id_cfg_device=',cast(a.id_cfg_device as char),'&id_device=',cast(a.id_device as char),''',1,1)\"/>\n<input type=\"button\" value=\"Delete\" onclick=\"delCfgDevice(',cast(id_cfg as char),',',cast(a.id_cfg_device as char),')\"/>\n') as \"\" FROM _cfg_device a\nLEFT JOIN\n_device b ON a.id_device=b.id_device\nLEFT JOIN\n_device_grp c ON b.id_device_grp=c.id_device_grp\nLEFT JOIN\n_sys_status d ON a.id_sys_status=d.id_sys_status\nLEFT JOIN\n_hr_emp e ON a.id_hr_emp = e.id_hr_emp\nLEFT JOIN\n_cust_contact f ON e.id_cust_contact = f.id_cust_contact\nWHERE a.id_cfg=" . $_POST["id_cfg"] . " ORDER by a.cfg_device";
$device->ajDestination = "list18-0";
$device->ajPage = "/_mod/smod_18/list_cfgdevice.php";
$device->recOrder = "asc";
Ejemplo n.º 6
0
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require_once "_lib/php/auth.php";
# POST variables
$ajCfgDevice = null;
$ajCfgDevice = isset($_POST["id_cfg_device"]) ? "&id_cfg_device=" . $_POST["id_cfg_device"] : "";
$ajCfgDevice .= isset($_POST["id_device"]) ? "&id_device=" . $_POST["id_device"] : "";
$ajCfgDevice .= isset($_POST["id_cfg"]) ? "&id_cfg=" . $_POST["id_cfg"] : "";
$definedNetworks = new ArcTbl();
$definedNetworks->dbConStr = $globalDBCON;
$definedNetworks->dbType = $globalDBTP;
$definedNetworks->dbSchema = $globalDB;
$definedNetworks->recQuery = "\nSELECT\nid_cfg_device_ip4netaddress,\ninet_ntoa(cfg_device_ip4netaddress) as \"Network\",\ncfg_device_ip4netaddress_nmbits as \"Netmask\",\ncfg_device_netgroup as \"NetGroup\",\nCONCAT('<input type=\"button\" value=\"Delete\" onclick=\"updateTable(this,''_cfg_device_ip4netaddress'',''id_cfg_device_ip4netaddress'',',id_cfg_device_ip4netaddress,',2,''" . $path . "sql.php'',''fs_networks'',''&form=frmNetwork&action=delete" . $ajCfgDevice . "'')\"/>') as \"\" \nFROM _cfg_device_ip4netaddress\nINNER JOIN _cfg_device_netgroup on _cfg_device_ip4netaddress.id_cfg_device_netgroup=_cfg_device_netgroup.id_cfg_device_netgroup\nWHERE cfg_device_ip4netaddress_enabled=1";
$definedNetworks->recIndex = "id_cfg_device_ip4netaddress";
$definedNetworks->ignoreCols = array("id_cfg_device_ip4netaddress", "Enabled");
$definedNetworks->ignoreFilterCols = array("id_cfg_device_ip4netaddress", "");
$definedNetworks->recOrderCol = "Network";
$definedNetworks->recOrder = "asc";
$definedNetworks->dbLimit = 10;
$definedNetworks->dbOffset = 0;
$definedNetworks->ajDestination = "tblnetwork";
$definedNetworks->ajPage = "/_mod/smod_18/list_network.php";
$definedNetworks->build();
echo hex2str($definedNetworks->tblNav);
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require_once "_lib/php/auth.php";
$ajCfgDevice = null;
$ajCfgDevice = isset($_POST["id_cfg_device"]) ? "&id_cfg_device=" . $_POST["id_cfg_device"] : "";
$ajCfgDevice .= isset($_POST["id_device"]) ? "&id_device=" . $_POST["id_device"] : "";
$ajCfgDevice .= isset($_POST["id_cfg"]) ? "&id_cfg=" . $_POST["id_cfg"] : "";
$ifrecordset = new ArcTbl();
$ifrecordset->dbConStr = $globalDBCON;
$ifrecordset->dbLimit = 10;
$ifrecordset->dbOffset = 0;
$ifrecordset->dbType = $globalDBTP;
$ifrecordset->dbSchema = $globalDB;
$ifrecordset->recOrder = "asc";
$ifrecordset->recOrderCol = "`IF Label`";
$ifrecordset->recIndex = "id_cfg_device_interface";
$filterCFG = isset($_POST["id_cfg"]) ? " AND id_cfg=" . $_POST["id_cfg"] : "";
$ifrecordset->recQuery = "\nSELECT\nc.cfg_device as \"Device Label\",\na.device_interfacelabel as \"IF Label\",\ng.cfg_device_interface_mac as \"MAC\",\nb.device_ifspeedduplex as \"Speed/Duplex\",\nf.cfg_device_netgroup as \"NetGroup\",\nd.device as \"Device\",\nid_cfg_device_interface,\nconcat(inet_ntoa(e.cfg_device_ip4netaddress),'/',cast(e.cfg_device_ip4netaddress_nmbits as char)) as \"Network\",\ninet_ntoa(cfg_device_interface_ip4hostaddress) as Address,\ng.id_cfg_device,\ncfg_device_interface_enabled as \"Enabled\",\nc.id_cfg,\nCONCAT('<input type=\"button\" value=\"Delete\" onclick=\"updateTable(this,''_cfg_device_interface'',''id_cfg_device_interface'',',id_cfg_device_interface,',2,''" . $path . "sql.php'',''list18-1'',''&id_cfg_device_interface=',id_cfg_device_interface,'&form=frmInterface&action=delete" . $ajCfgDevice . "'')\"/>') as \"\",\nc.id_device\nFROM\n_cfg_device_interface g\nLEFT JOIN _device_interfacelabel a ON g.id_device_interfacelabel=a.id_device_interfacelabel\nLEFT JOIN _device_ifspeedduplex b ON g.id_device_ifspeedduplex=b.id_device_ifspeedduplex\nLEFT JOIN _cfg_device c ON g.id_cfg_device=c.id_cfg_device\nLEFT JOIN _device d ON c.id_device=d.id_device\nLEFT JOIN _cfg_device_ip4netaddress e ON g.id_cfg_device_ip4netaddress=e.id_cfg_device_ip4netaddress\nLEFT JOIN _cfg_device_netgroup f ON e.id_cfg_device_netgroup=f.id_cfg_device_netgroup\nwhere cfg_device_interface_enabled=1" . $filterCFG . " order by c.cfg_device asc";
$ifrecordset->ajDestination = "list18-1";
$ifrecordset->ajPage = "/_mod/smod_18/list_interface_filtered.php";
$ifrecordset->ignoreCols = array("id_cfg_device_interface", "id_cfg_device", "id_device", "Enabled", "id_cfg");
$ifrecordset->ignoreFilterCols = array("id_cfg_device_interface", "id_cfg_device", "id_device", "Action", "Enabled", "id_cfg");
$ifrecordset->build();