function getRecords() { $gdbo = new ArcDb(); $gdbo->dbConStr = $GLOBALS['globalDBCON']; $gdbo->dbType = $GLOBALS['globalDBTP']; $gdbo->dbSchema = $GLOBALS['globalDB']; if (is_null($this->filter) || is_null($this->id)) { return false; } $gdbo->sql = "\nSELECT\nid_hr_degree,\nid_hr_degree_level,\nid_hr_emp,\nhr_degree_ds,\nhr_degree_da,\nid_hr_degree_status,\nhr_degree,\nid_cust_company,\nid_cust_branch,\nhr_degree_hours\nFROM\n_hr_degree\nWHERE " . $this->filter . "=" . $this->id; $gdbo->getRec(); $results = $gdbo->getAssociative(); return $results; }
function getRecords() { $gdbo = new ArcDb(); $gdbo->dbConStr = $GLOBALS['globalDBCON']; $gdbo->dbType = $GLOBALS['globalDBTP']; $gdbo->dbSchema = $GLOBALS['globalDB']; if (is_null($this->filter) || is_null($this->id)) { return false; } $gdbo->sql = "SELECT\n_contract_payment.id_contract_payment,\n_contract_payment.contract_payment,\ncontract_payment_dr,\ncontract_payment_dp,\n_contract_payment.id_contract_payment_method_tp,\n_contract_payment.id_contract\nFROM _contract_payment\nWHERE " . $this->filter . "=" . $this->id . " ORDER BY contract_payment_dr ASC, id_contract_payment ASC"; $gdbo->getRec(); $results = $gdbo->getAssociative(); return $results; }
function getRecords() { $gdbo = new ArcDb(); $gdbo->dbConStr = $GLOBALS['globalDBCON']; $gdbo->dbType = $GLOBALS['globalDBTP']; $gdbo->dbSchema = $GLOBALS['globalDB']; if (is_null($this->filter) || is_null($this->id)) { return false; } $gdbo->sql = "SELECT \nid_purchaseorder_payment,\npurchaseorder_payment,\npurchaseorder_payment_refNumber,\nid_sys_user,\nid_contract,\npurchaseorder_payment_dreceived,\npurchaseorder_payment_dcleared,\n_purchaseorder_payment.id_purchaseorder_payment_tp\nFROM _purchaseorder_payment\nWHERE " . $this->filter . "=" . $this->id . " ORDER BY purchaseorder_payment_dreceived ASC"; $gdbo->getRec(); $results = $gdbo->getAssociative(); return $results; }
function getrec() { $gdbo = new ArcDb(); $gdbo->dbConStr = $GLOBALS['globalDBCON']; $gdbo->dbType = $GLOBALS['globalDBTP']; $gdbo->dbSchema = $GLOBALS['globalDB']; if (is_null($this->filter) || is_null($this->id)) { return false; } $gdbo->sql = "SELECT \nid_invoice_item,\ninvoice_item,\ninvoice_item_qty,\ninvoice_item_dservice,\ninvoice_item_rate,\nid_invoice_qty_tp,\nid_contract,\nid_sys_user,\ninvoice_item_amount,\ninvoice_item_totalAmount,\ninvoice_item_percentTax,\ninvoice_item_lastModifiedBy,\nid_invoice\nFROM _invoice_item\nWHERE " . $this->filter . "=" . $this->id . " ORDER BY id_invoice_item"; $gdbo->getRec(); $rec = $gdbo->getAssociative(); return $rec; }
function getRecords() { $gdbo = new ArcDb(); $gdbo->dbConStr = $GLOBALS['globalDBCON']; $gdbo->dbType = $GLOBALS['globalDBTP']; $gdbo->dbSchema = $GLOBALS['globalDB']; if (is_null($this->filter) || is_null($this->id)) { return false; } $gdbo->sql = "SELECT\nid_hr_certification,\nid_hr_certification_tp,\nid_hr_emp,\nid_hr_certification_status,\nhr_certification_ds,\nhr_certification_da,\nid_hr_certification_provider,\nhr_certification_hours\nFROM\n_hr_certification\nWHERE " . $this->filter . "=" . $this->id; $gdbo->getRec(); $results = $gdbo->getAssociative(); return $results; }
function getRecords() { $gdbo = new ArcDb(); $gdbo->dbConStr = $GLOBALS['globalDBCON']; $gdbo->dbType = $GLOBALS['globalDBTP']; $gdbo->dbSchema = $GLOBALS['globalDB']; if (is_null($this->filter) || is_null($this->id)) { return false; } $gdbo->sql = "SELECT \nid_hr_insurance,\nid_hr_emp,\nid_cust_company,\nid_hr_insurance_plan,\nid_hr_insurance_coverage,\nhr_insurance_ds,\nhr_insurance_de\nFROM _hr_insurance\nWHERE " . $this->filter . "=" . $this->id; $gdbo->getRec(); $results = $gdbo->getAssociative(); return $results; }
function getRecords() { $gdbo = new ArcDb(); $gdbo->dbConStr = $GLOBALS['globalDBCON']; $gdbo->dbType = $GLOBALS['globalDBTP']; $gdbo->dbSchema = $GLOBALS['globalDB']; if (is_null($this->filter) || is_null($this->id)) { return false; } $gdbo->sql = "SELECT\n_addr.id_addr,\n_addr.addr_line1,\n_addr.addr_line2,\n_addr.addr_line3,\n_addr.id_loc_region,\n_addr.loc_city,\n_addr.loc_postal_code,\n_addr.addr_dc,\n_addr.addr_dr,\n_addr.addr_label,\n_addr.id_loc_country\nFROM\n_addr\nWHERE " . $this->filter . "=" . $this->id; $gdbo->getRec(); $results = $gdbo->getAssociative(); if ($gdbo->dbRows > 0) { return $results; } else { return false; } }
$end = strtotime("{$curYear}-{$curMonth}-{$dayCount} 23:59:59"); $arc = new ArcDb(); $arc->dbConStr = $globalDBCON; $arc->dbOffset = 0; $arc->dbType = $globalDBTP; $arc->dbSchema = $globalDB; if (isset($_POST["start_date"]) && isset($_POST["end_date"])) { $start = strtotime($_POST["start_date"]); $end = strtotime($_POST["end_date"]); } $daterange = "{$start} and {$end}"; $daterangeFriendly = date('F j, Y', $start) . " through " . date('F j, Y', $end); $filter = $start != "" ? "where UNIX_TIMESTAMP(a.srv_dc)+{$gmtOffset} between " . $daterange : ""; $arc->sql = "\nSELECT * FROM(\nSELECT\nFROM_UNIXTIME(UNIX_TIMESTAMP(a.srv_dc)+{$gmtOffset},'%m-%d-%y') name,\ncount(id_srv) as data\nFROM _srv a {$filter} group by name order by name desc) as derived WHERE data >=1"; $arc->getRec(); $arcData = $arc->getAssociative(); $arcJSON = json_encode($arcData); ?> <script type="text/javascript"> var chartData=<?php echo $arcJSON; ?> ; var chart = AmCharts.makeChart("chartdiv", { "theme": "none", "type": "serial", "dataProvider": chartData, "chartCursor": {}, "pathToImages": "/_thirdparty/amcharts/images/", "valueAxes": [{ "title": "Tickets"
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"; $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";
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"; $gdbo = new ArcDb(); $gdbo->dbConStr = $globalDBCON; $gdbo->dbType = $globalDBTP; $gdbo->dbSchema = $globalDB; # Record $gdbo->sql = "SELECT\na.id_cfg_device,\na.id_hr_emp,\na.id_device,\na.cfg_device,\na.id_cfg,\na.cfg_device_serialnumber,\nUNHEX(a.cfg_device_notes) as \"cfg_device_notes\",\nFROM_UNIXTIME(UNIX_TIMESTAMP(a.cfg_device_dc)+{$gmtOffset}) as \"cfg_device_dc\",\nFROM_UNIXTIME(UNIX_TIMESTAMP(a.cfg_device_du)+{$gmtOffset}) as \"cfg_device_du\",\na.cfg_device_dr,\na.id_sys_status,\na.cfg_device_keyenabled,\na.cfg_device_key,\nb.id_device_grp,\na.cfg_device_os\nFROM\n_cfg_device a\nLEFT JOIN\n_device b ON a.id_device=b.id_device\nWHERE a.id_cfg_device=" . $_POST["id_cfg_device"]; $gdbo->getRec(); $rec = $gdbo->getAssociative(); # Device Group $gdbo->sql = "SELECT \nid_device_grp,\ndevice_grp\nFROM _device_grp"; $gdbo->getRec(); $listDeviceGroup = $gdbo->dbData; # Users $gdbo->sql = "SELECT\na.id_hr_emp,\nconcat(b.cust_contact_givenName,' ',b.cust_contact_familyName) as \"fullname\" \nFROM\n_hr_emp as a\nLEFT JOIN _cust_contact b ON a.id_cust_contact=b.id_cust_contact\nORDER BY b.cust_contact_givenName,b.cust_contact_familyName"; $gdbo->getRec(); $listUsers = $gdbo->dbData; # Status $gdbo->sql = "SELECT \nid_sys_status,\nsys_status\nFROM _sys_status \nWHERE id_sys_status_tp=7"; $gdbo->getRec(); $listStatus = $gdbo->dbData; # Configuration $gdbo->sql = "SELECT \nid_cfg,\ncfg FROM _cfg;"; $gdbo->getRec();
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"; require_once "_includes/optionstoolbar.php"; /**************************************************/ $arcdb = new ArcDb(); $arcdb->dbConStr = $globalDBCON; $arcdb->dbType = $globalDBTP; $arcdb->dbSchema = $globalDB; $id = $_POST["id_con"]; /**************************************************/ $arcdb->sql = "\nSELECT\nid_con,\ncon,\nid_con_db_tp,\ncon_alias,\ncon_user,\ncon_enabledbit,\ncon_password,\ncon_host,\ncon_port,\nUNHEX(con_options) as con_options,\ncon_catalog\nFROM _con\nWHERE id_con={$id}"; $arcdb->getRec(); $connections = $arcdb->getAssociative(); $arcdb->sql = "\nSELECT \nid_con_db_tp,\ncon_db_tp_alias\nFROM _con_db_tp\n"; $arcdb->getRec(); $dbtypes = $arcdb->dbData; /**************************************************/ $password = $connections[0]["con_password"] != "" ? decrypt($connections[0]["con_password"]) : ""; $enabledBoo = array(array(1, "Enable"), array(0, "Disable")); $conFields = array(array(array('Friendly Name', 'con_alias', null, 0, null, $connections[0]["con_alias"]), array('Database Type', 'id_con_db_tp', null, 1, $dbtypes, $connections[0]["id_con_db_tp"]), array('Status', 'con_enabledbit', null, 4, $enabledBoo, $connections[0]["con_enabledbit"])), array(array('Database', 'con', null, 0, null, $connections[0]["con"]), array('Table Schema', 'con_catalog', null, 0, null, $connections[0]["con_catalog"])), array(array('Username', 'con_user', null, 0, null, $connections[0]["con_user"]), array('Password', 'con_password', null, 7, null, $password)), array(array('Host', 'con_host', null, 0, null, $connections[0]["con_host"]), array('Port', 'con_port', null, 0, null, $connections[0]["con_port"])), array(array('Options', 'con_options', null, 6, null, $connections[0]["con_options"]))); ?> <!-- begin forms --> <form method="post" name="dbcon" id="dbcon" action="javascript:submitFrmVals('content','/_mod/smod_22/sql.php',null,'&id_con=<?php echo $id; ?> &form=dbcon&action=update','dbcon')"> <fieldset id="database_connection"> <legend>Database Connection</legend>
$curYear = date('Y', strtotime($dtTimeCurrent)); $curDay = date('j', strtotime($dtTimeCurrent)); $curMonth = date('n', strtotime($dtTimeCurrent)); $yearID = isset($yearID) ? $yearID : $curYear; $monthID = isset($monthID) ? $monthID : $curMonth; $firstDayofMonth = date("l", mktime(0, 0, 0, $monthID, 1, $yearID)); $dayCount = cal_days_in_month(CAL_GREGORIAN, $monthID, $yearID); $todayTime = strtotime("{$yearID}-{$monthID}-{$curDay} 00:00:00 "); /************************************************************************/ $arc = new ArcDb(); $arc->dbType = $globalDBTP; $arc->dbSchema = $globalDB; $arc->dbConStr = $globalDBCON; $arc->sql = "\nSELECT\nid_tm_timesheet,\ntm_timesheet_ds,\ntm_timesheet_de,\nid_hr_emp,\ntm_timesheet_approved\nFROM\n_tm_timesheet WHERE\nid_hr_emp={$id_hr_emp_derived} AND\ntm_timesheet_ds={$periodStart} AND\ntm_timesheet_de={$periodEnd} \n"; $arc->getRec(); $timesheet = $arc->getAssociative(); if ($arc->dbRows > 0) { /*timesheet has been submitted. validate what the current state*/ switch ($timesheet[0]["tm_timesheet_approved"]) { case 0: $status = "Submitted"; break; case 1: $status = "Approved"; break; case 2: $status = "Rejected"; break; default: break; }
/*********************************************************************/ /*Get Time Card Data*/ require_once "bootstrap.php"; date_default_timezone_set('UTC'); $gmtOffset = "-21600"; //Central Time $dtCurrent = date("l, F j, Y e"); $dtTimeCurrent = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $gmtOffset); $id_tm_timesheet = decrypt(trim(preg_replace("/.+?\\|.+?\\|(.*)/", "\$1", $subject))); $arc = new ArcDb(); $arc->dbType = $globalDBTP; $arc->dbSchema = $globalDB; $arc->dbConStr = $globalDBCON; $arc->sql = "\nSELECT\nc.id_cust_contact,\nconcat(c.cust_contact_givenName,' ',c.cust_contact_familyName) as fullName,\nc.cust_contact_givenName,\nc.cust_contact_familyName\nFROM\n_sys_user_emp a \nLEFT JOIN _hr_emp b ON a.id_cust_contact=b.id_cust_contact\nLEFT JOIN _cust_contact c ON a.id_cust_contact=c.id_cust_contact\nLEFT JOIN _sys_user d ON a.id_sys_user=d.id_sys_user\nWHERE d.id_sys_status=21 AND d.sys_user_tmEmail='" . $fromEmail . "'"; $arc->getRec(); $approver = $arc->getAssociative(); $approverFull = $approver[0]["fullName"]; $approverFirst = $approver[0]["cust_contact_givenName"]; $approverLast = $approver[0]["cust_contact_familyName"]; $approverCount = $arc->dbRows; $arc->sql = "\nSELECT\nconcat(b.cust_contact_givenName,' ',b.cust_contact_familyName) as fullName\nFROM\n_tm_timesheet a\nLEFT JOIN\n_hr_emp c ON a.id_hr_emp=c.id_hr_emp\nLEFT JOIN\n_cust_contact b ON c.id_cust_contact=b.id_cust_contact\nWHERE\na.id_tm_timesheet={$id_tm_timesheet}\n"; $arc->getRec(); $timesheetdetail = $arc->getAssociative(); if ($approverCount > 0) { /*********************************************************************/ /*The correct approver was matched*/ /*********************************************************************/ if (preg_match("/I.+?" . $approverFirst . ".+?" . $approverLast["cust_contact_familyName"] . ".*/i", $body, $matches)) { $arc->dbTable = "_tm_timesheet"; if (preg_match("/\\sapprove|\\saccept|\\sapproved/i", $matches[0])) { $response = "Thank you for approving the time sheet for " . $timesheetdetail[0]["fullName"] . ".";
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"; $timecard = preg_replace("/onclick=\".+?\"|onmouseover=\".+?\"|onmouseout=\".+?\"|style=\".+?\"/i", "", hex2str($_POST["data"])); $gdbo = new ArcDb(); $gdbo->dbConStr = $globalDBCON; $gdbo->dbSchema = $globalDB; $gdbo->dbType = $globalDBTP; /*Get Employee Data*/ $gdbo->sql = "\nSELECT\na.hr_emp_timeApprover\nFROM _hr_emp a WHERE id_hr_emp={$id_hr_emp_derived} AND a.hr_emp_timeApprover is not null;"; $gdbo->getRec(); $employee = $gdbo->getAssociative(); if ($gdbo->dbRows > 0) { $gdbo->sql = "\nSELECT \na.id_sys_user,\na.sys_user_tmEmail,\nb.cust_contact_givenName\nFROM _sys_user a\nLEFT JOIN _sys_user_emp c ON a.id_sys_user=c.id_sys_user\nLEFT JOIN _cust_contact b ON c.id_cust_contact=b.id_cust_contact\nWHERE b.id_cust_contact=" . $employee[0]["hr_emp_timeApprover"]; $gdbo->getRec(); $approver = $gdbo->getAssociative(); $gdbo->sql = "\nSELECT \nid_tm_timesheet,\nid_hr_emp,\ntm_timesheet_ds,\ntm_timesheet_de,\ntm_timesheet_approved\nFROM _tm_timesheet\nWHERE tm_timesheet_ds=" . $_POST["datestart"] . " AND tm_timesheet_de=" . $_POST["dateend"] . " AND id_hr_emp=" . $id_hr_emp_derived; $gdbo->getRec(); $timesheet = $gdbo->getAssociative(); $timesheetCount = $gdbo->dbRows; if ($timesheetCount == 0) { $gdbo->dbTable = "_tm_timesheet"; $_POST["tm_timesheet_ds"] = $_POST["datestart"]; $_POST["tm_timesheet_de"] = $_POST["dateend"]; $_POST["id_hr_emp"] = $id_hr_emp_derived; $_POST["tm_timesheet"] = bin2hex($timecard); $gdbo->insertRec();
* @dependency ArcTbl-13.3.0.0.php * @dependency ArcDbFilter.php * @dependency auth.php (Contains references for preceding *.php) * * */ require_once "_lib/php/auth.php"; /* define database */ $ip = new ArcDb(); $ip->dbConStr = $globalDBCON; $ip->dbType = $globalDBTP; $ip->dbSchema = $globalDB; /* return all interfaces with the same address */ $ip->sql = "\nSELECT\nid_cfg_device_interface,\nid_cfg_device_ip4netaddress,\na.id_cfg_device,\na.id_device_interfacelabel,\nid_device_ifspeedduplex,\ncfg_device_interface_ip4hostaddress,\ncfg_device_interface_enabled,\nd.device,\ne.cfg,\nc.device_interfacelabel\nFROM\n_cfg_device_interface a\nINNER JOIN\n_cfg_device b \nON a.id_cfg_device=b.id_cfg_device\nINNER JOIN\n_device_interfacelabel c \nON a.id_device_interfacelabel=c.id_device_interfacelabel\nINNER JOIN\n_device d \nON b.id_device=d.id_device\nINNER JOIN\n_cfg e \nON b.id_cfg=e.id_cfg\nWHERE\ncfg_device_interface_enabled=1\nAND cfg_device_interface_ip4hostaddress=" . $_POST["cfg_device_interface_ip4hostaddress"]; $ip->getRec(); if ($ip->dbRows > 0) { $existingInterfaceAssignments = $ip->getAssociative(); } else { die('<script>prepSaveChanges("' . $_POST["form"] . '")</script>'); } /* evaluate returned results */ if (count($existingInterfaceAssignments) > 0) { /* matches were found */ /* * search array for network id passed via POST */ $netIsDefined = multiArraySearch($existingInterfaceAssignments, $_POST["id_cfg_device_ip4netaddress"]); if ($netIsDefined !== false) { $errorMsg = long2ip($_POST["cfg_device_interface_ip4hostaddress"]) . " already exists."; $errorMsg .= "</br> The address is assigned to the following device interface."; $errorMsg .= "<pre>" . print_r($existingInterfaceAssignments[$netIsDefined], true) . "</pre>"; } else { die('<script>prepSaveChanges("' . $_POST["form"] . '")</script>'); }