function buildForm() { $sender = $GLOBALS["usermail"]; $recepient = $this->getContactMethods($this->receiverid); if (count($recepient) > 0 && count($recepient) > 0 && !empty($sender)) { $formName = "email_" . rand(); $fsEmail = array(array(array("From", "fromEmail", "readonly='readonly'", 0, null, $sender), array("To", "toEmail", null, 1, $recepient, null), array(null, "from", null, 3, null, $this->sendername)), array(array("Subject", "subject", 'style="width:100% !important"', 0, null, null, null, null, null, null, null, 'style="width:100%"')), array(array("Message", "message", null, 6)), array(array(null, null, "onclick='clearPop()'", 2, null, 'Close'), array(null, null, 'onclick="prepSaveChanges(\'' . $formName . '\')"', 2, null, 'Send'))); $form = '<style>.frmcol.text {clear:both;width:100%}</style>'; $form .= '<form class="' . $this->className . '" method="post" id="' . $formName . '" name="' . $formName . '" action="javascript:submitFrmVals(\'emailDebug\',\'' . $this->path . '\',\'email_to\',null,\'' . $formName . '\')">'; $form .= '<fieldset><legend>Email</legend>'; $form .= frmElements($fsEmail); $form .= '</fieldset></form><div id="emailDebug"> </div>'; $form .= '<script>CKEDITOR.replace( "message" ,{toolbarStartupExpanded : true});</script>'; return $form; } else { $fsEmail = array(array(array(null, null, "onclick='clearPop()'", 2, null, 'Close'))); $form = '<form action="#" method="post" class="' . $this->className . '">'; $form .= '<fieldset><legend>Email</legend>'; $form .= '<div class="clEmailError">Sorry. You have not defined an E-Mail address for either your account or the contact your are trying to reach.</div>'; $form .= frmElements($fsEmail); $form .= '</fieldset></form>'; return $form; } }
$listStatus = $gdbo->dbData; # Filterable Objects ## Branches $gdbo = new ArcDb(); $gdbo->dbConStr = $globalDBCON; $gdbo->dbType = $globalDBTP; $gdbo->dbSchema = $globalDB; $gdbo->sql = "SELECT\nid_cust_branch,\ncust_branch\nFROM _cust_branch"; $gdbo->dbFilter = " WHERE id_cust_company="; $gdbo->type = "list"; $gdbo->id = "id_cust_branch"; $gdbo->attributes = 'class="chBranch"'; $branchdboJSON = encrypt(json_encode((array) $gdbo)); # Fieldsets $configData = array(array(array('Company', 'id_cust_company', 'onChange="filterRec(this,\'' . $branchdboJSON . '\',\'dBranch\')"', 1, $listCompanies), array('Branch', 'id_cust_branch', 'disabled=\\"disabled\\" class=\\"chBranch\\" onchange="cpSelToTxt(this,\'cfg\',16)"', 1, null, null, 'dBranch')), array(array('Catalog', 'cfg', null, 0), array('Category', 'id_cfg_grp', null, 1, $listConfigGroups), array('Status', 'id_sys_status', null, 1, $listStatus)), array(array('Description', 'cfg_descr', null, 6))); ?> <script type="text/javascript">$(".icoadd").remove();</script> <form name="frmConfig" id="frmConfig" method="post" action="javascript:submitFrmVals('content','/_mod/smod_18/sql.php','id_cust_company,id_cust_branch,id_cfg_grp,id_sys_status,cfg','&action=insert&form=frmConfig','frmConfig')"> <fieldset id="catalog"> <legend> Catalog </legend> <?php echo frmElements($configData); ?> </fieldset> </form> <script type="text/javascript"> CKEDITOR.replace("cfg_descr"); </script>
?> <script type="text/javascript">$(".icoadd").remove();</script> <form method="post" id="frmpurchaseorder" name="frmpurchaseorder" action="javascript:submitFrmVals('content','/_mod/smod_29/sql.php','<?php echo $requiredFields; ?> ','&action=insert&form=frmpurchaseorder','frmpurchaseorder')"> <fieldset id="customer"> <legend>Vendor</legend> <?php echo frmElements($fsCustomer); ?> </fieldset> <fieldset id="vendor"> <legend>Summary</legend> <?php echo frmElements($fspurchaseorder); ?> </fieldset> <?php $lineItem = new POLineItem(); $lineItem->build(); $payment = new POPayment(); $payment->build(); ?> </form> <script type="text/javascript"> <?php echo $icoCollapse; ?> $("#oOptions").append(icoCollapse);
function getFooter() { $elements = array(array(array(null, 'payment_mText', null, 6, null, null, null, null, ' style="display:none" '))); $footerElements = frmElements($elements); return $footerElements; }
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"; require_once "_includes/optionstoolbar.php"; /**************************************************/ $arcdb = new ArcDb(); $arcdb->dbConStr = $globalDBCON; $arcdb->dbType = $globalDBTP; $arcdb->dbSchema = $globalDB; /**************************************************/ $arcdb->sql = "\nSELECT \nid_con_db_tp,\ncon_db_tp_alias\nFROM _con_db_tp\n"; $arcdb->getRec(); $dbtypes = $arcdb->dbData; /**************************************************/ $enabledBoo = array(array(1, "Enable"), array(0, "Disable")); $conFields = array(array(array('Friendly Name', 'con_alias', null, 0), array('Database Type', 'id_con_db_tp', null, 1, $dbtypes), array('Status', 'con_enabledbit', null, 4, $enabledBoo, 0)), array(array('Database', 'con', null, 0), array('Table Schema', 'con_catalog', null, 0, null)), array(array('Username', 'con_user', null, 0), array('Password', 'con_password', null, 7)), array(array('Host', 'con_host', null, 0), array('Port', 'con_port', null, 0)), array(array('Options', 'con_options', null, 6))); ?> <script type="text/javascript">$(".icoadd").remove();</script> <form method="post" name="dbcon" id="dbcon" action="javascript:submitFrmVals('content','/_mod/smod_22/sql.php',null,'&form=dbcon&action=insert','dbcon')"> <fieldset id="database_connection"> <legend>Database Connection</legend> <?php echo frmElements($conFields); ?> </div> </fieldset> </form>
?> <script type="text/javascript">$(".icoadd").remove();</script> <form method="post" id="frmInvoice" name="frmInvoice" action="javascript:submitFrmVals('content','/_mod/smod_27/sql.php','<?php echo $requiredFields; ?> ','&action=insert&form=frmInvoice','frmInvoice')"> <fieldset id="customer"> <legend>Customer</legend> <?php echo frmElements($fsCustomer); ?> </fieldset> <fieldset id="summary"> <legend>Summary</legend> <?php echo frmElements($fsInvoice); ?> </fieldset> <?php $lineItem = new LineItem(); $lineItem->build(); $payment = new InvoicePayment(); $payment->build(); ?> </form> <script type="text/javascript"> <?php echo $icoCollapse; ?> $("#oOptions").append(icoCollapse);
$gdbo->id = "id_device"; $gdbo->attributes = 'class="chDevice"'; $devicedboJSON = encrypt(json_encode((array) $gdbo)); # Actions $deviceAction = array(array(array(null, 'deviceSubmit', 'onclick="prepSaveChanges(\'frmDevice\')"', 2, null, 'Save Changes'), array(null, 'deviceClose', 'onclick="clearPop()"', 2, null, 'Close'))); # Fieldsets $deviceForm = array(array(array('Parent Configuration', 'id_cfg', null, 1, $listConfiguration, $rec[0]["id_cfg"]), array('Key Enabled', 'cfg_device_keyenabled', null, 8, null, $rec[0]["cfg_device_keyenabled"]), array(null, 'id_cfg_device', null, 3, null, $_POST["id_cfg_device"])), array(array('Device Label', 'cfg_device', null, 0, null, $rec[0]["cfg_device"]), array('Operating System', 'cfg_device_os', null, 0, null, $rec[0]["cfg_device_os"]), array('Administrator', 'id_hr_emp', null, 1, $listUsers, $rec[0]["id_hr_emp"])), array(array('Type', 'id_device_grp', 'onchange="filterRec(this,\'' . $devicedboJSON . '\',\'dDevice\')"', 1, $listDeviceGroup, $rec[0]["id_device_grp"]), array('Device', 'id_device', 'class="chDevice"', 1, $listDevice, $rec[0]["id_device"], 'dDevice')), array(array('Serial Number', 'cfg_device_serialnumber', null, 0, null, $rec[0]["cfg_device_serialnumber"]), array('Status', 'id_sys_status', null, 1, $listStatus, $rec[0]["id_sys_status"])), array(array('Date Created', null, 'disabled=\\"disabled\\"', 0, null, $rec[0]["cfg_device_dc"]), array('Date Updated', null, 'disabled=\\"disabled\\"', 0, null, $rec[0]["cfg_device_du"])), array(array('Notes', 'cfg_device_notes', 'onkeydown="detectTab(this,event)"', 6, null, $rec[0]["cfg_device_notes"])), array(array('Management Key', 'cfg_device_key', null, 6, null, $rec[0]["cfg_device_key"]))); ?> <div id="popBox"> <form name="frmDevice" id="frmDevice" method="post" action="javascript:submitFrmVals('popWindow','/_mod/smod_18/sql.php','id_sys_status,id_device_grp,id_device','&action=edit&form=frmDevice','frmDevice')"> <fieldset id="Edit Device"> <legend> Edit Device </legend> <?php echo frmElements($deviceAction); echo frmElements($deviceForm); ?> <h3>Configured Interfaces</h3> <div id="tblinterface" class="fieldsettable"> <?php include "list_interface.php"; ?> </div> </fieldset> </form> </div> <script type="text/javascript"> CKEDITOR.replace("cfg_device_notes"); </script>
$gdbo->getRec(); $listContractStatus = $gdbo->dbData; # Fieldset Variables $buttonDate = '<div class="elementIconBox" onclick="openCalendar(this,\'interface\',null,\'dateFld\')"><i class="fa fa-calendar"></i></div>'; # Fieldsets $fsContract = array(array(array("*Organization", "id_cust_company", null, 1, $listCompany, $rec[0]["id_cust_company"]), array("*Status", "id_sys_status", null, 1, $listContractStatus, $rec[0]["id_sys_status"]), array(null, "id_contract", null, 3, null, $rec[0]["id_contract"])), array(array("*Type", "id_contract_tp", null, 1, $listContractTp, $rec[0]["id_contract_tp"]), array("*Category", "id_contract_cat", null, 1, $listContractCat, $rec[0]["id_contract_cat"])), array(array("*Contract", "contract", null, 0, null, $rec[0]["contract"]), array("*Label", "contract_label", null, 0, null, $rec[0]["contract_label"])), array(array("*Value", "contract_value", 'onblur="validateElement(\'money\',this)"', 0, null, $rec[0]["contract_value"]), array("Paid to Date", "paid", 'disabled="disabled"', 0, null, $rec[0]["contract_paid"])), array(array('Award Date', 'contract_da', 'class="dateFld elementIcon" onblur="validateElement(\'date\',this)"', 0, null, $rec[0]["contract_da"], null, $buttonDate, null, 'YYYY-MM-DD'), array("Date Updated", "contract_du", 'disabled="disabled"', 0, null, $rec[0]["contract_du"])), array(array('Execution Date', 'contract_ds', 'class="dateFld elementIcon" onblur="validateElement(\'date\',this)"', 0, null, $rec[0]["contract_ds"], null, $buttonDate, null, 'YYYY-MM-DD'), array("Date Terminated", "contract_dr", 'disabled="disabled"', 0, null, $rec[0]["contract_dr"])), array(array('Expiration Date', 'contract_de', 'class="dateFld elementIcon" onblur="validateElement(\'date\',this)"', 0, null, $rec[0]["contract_ds"], null, $buttonDate, null, 'YYYY-MM-DD')), array(array('General Notes', 'contract_notes', 'onkeydown="detectTab(this,event)"', 6, null, hex2str($rec[0]["contract_notes"]))), array(array('Billing Notes', 'contract_billingNotes', 'onkeydown="detectTab(this,event)"', 6, null, hex2str($rec[0]["contract_billingNotes"])))); $requiredFields = "contract_value,id_cust_company,id_sys_status,contract_label,contract,id_contract_cat,id_contract_tp"; ?> <form method="post" id="frmContract" name="frmContract" action="javascript:submitFrmVals('content','/_mod/smod_08/sql.php','<?php echo $requiredFields; ?> ','&form=frmContract&action=update','frmContract')"> <fieldset id="contract_detail"> <legend>Contract Detail</legend> <?php echo frmElements($fsContract); ?> </fieldset> </form> <form action="#"> <fieldset id="Files"> <legend>Files</legend> <div id="listFiles"> <?php require "listFiles.php"; ?> </div></fieldset></form> <script type="text/javascript"> oREC = '{"oRec":[{"module":"08","filter":"id_contract","recid":"<?php echo $_POST["id_contract"]; ?>
$gdbo->getRec(); $fsoRec = $gdbo->dbData; if (isset($fsoRec[0][0]) && $fsoRec[0][0]) { $base64 = shell_exec("base64 " . $avatarWritePath . $fsoRec[0][0]); $avatar = "data:image/png;base64," . $base64; } else { $avatar = "/_img/device.png"; } ?> <div style="float:right;text-align:center;"><?php include "add_avatar.php"; ?> </div> </div> <?php echo frmElements($fsDescription); ?> </fieldset> </form> <form action="#"> <fieldset id="Files"> <legend>Files</legend> <div id="listFiles"> <?php require "listFiles.php"; ?> </div></fieldset></form> <script type="text/javascript"> oREC = '{"oRec":[{"module":"26","filter":"id_device","recid":"<?php echo $_POST["id_device"]; ?>
$gdbo->getRec(); $listServiceStatus = $gdbo->dbData; # Filterable Objects ## Branches $branchesdbo = new ArcDb(); $branchesdbo->dbConStr = $globalDBCON; $branchesdbo->dbType = $globalDBTP; $branchesdbo->dbSchema = $globalDB; $branchesdbo->sql = "SELECT id_cust_branch, cust_branch FROM _cust_branch"; $branchesdbo->dbFilter = "WHERE id_cust_company="; $branchesdbo->type = "list"; $branchesdbo->id = "id_cust_branch"; $branchesdbo->attributes = 'class="chBranch"'; $branchesdboJSON = encrypt(json_encode((array) $branchesdbo)); # Contracts $gdbo->sql = "SELECT\na.id_contract,\na.contract,\nb.id_cust_company,\nb.cust_company\nFROM _contract a\nLEFT JOIN _cust_company b ON a.id_cust_company = b.id_cust_company\nORDER BY b.cust_company,a.contract"; $gdbo->getRec(); $listContract = $gdbo->dbData; $fsService = array(array(array('Point of Contact', 'id_cust_contact', null, 1, $listContact, null, "dPOC"), array('Organization', 'id_cust_company', 'onchange="filterRec(this,\'' . $branchesdboJSON . '\',\'dBranch\')"', 1, $listCompany), array('Branch', 'id_cust_branch', 'disabled=\'disabled\' class=\'chBranch\'', 1, null, null, "dBranch")), array(array("Contract", "id_contract", null, 1, $listContract), array("Service Board", "id_srv_board", null, 1, $listBoard), array("Status", "id_srv_status", null, 1, $listServiceStatus)), array(array("Severity", "id_srv_severity", null, 1, $listSeverity), array("Impact", "id_srv_impact", null, 1, $listImpact)), array(array("Type", "id_srv_tp", null, 1, $listType), array("Source", "id_srv_src", null, 1, $listSource)), array(array("Summary", "srv_summary", 'style="width:100% !important"', 0, null, null, null, null, null, null, null, 'style="width:100% !important"'))); ?> <!-- begin forms --> <script type="text/javascript">$(".icoadd").remove();</script> <form method="post" id="frmService" name="frmService" action="javascript:submitFrmVals('content','/_mod/smod_10/sql.php','service_detail.id_cust_company,service_detail.id_cust_branch,service_detail.id_srv_board,service_detail.id_srv_status,service_detail.id_srv_severity,service_detail.id_srv_impact,service_detail.id_srv_tp,service_detail.srv_summary,service_detail.srv_descr','&form=frmService&action=insert','frmService')"> <fieldset id="service_detail"> <legend>Service Detail</legend> <?php echo frmElements($fsService); ?> </fieldset> </form>
<form id="popBox"> <fieldset> <legend>Invoice Series</legend> <?php require_once "_lib/php/auth.php"; $buttonAdd = '<div class="elementIconBox" onclick="arc(\'listInvoiceSeries\',\'/_mod/smod_27/controls/sql_invoice_series.php\',\'invoice_series=\'+$(\'#invoice_series\').val()+\'&form=frminvoiceseries&action=insert\')"><i class="fa fa-plus"></i></div>'; $deviceAction = array(array(array(null, 'deviceClose', 'onclick="clearPop()"', 2, null, 'Close'))); $fs = array(array(array('Series Name', 'invoice_series', 'class="elementIcon"', 0, null, null, null, $buttonAdd))); echo frmElements($fs); ?> <div id="listInvoiceSeries"> <?php require "_mod/smod_27/models/list_invoice_series.php"; ?> </div> <?php echo frmElements($deviceAction); ?> </fieldset> </form>
$buttonAdd = '<a id="buttonAddNetwork" class="elementIconBox disableButton" title="Add Network"><i class="fa fa-plus"></i></a>'; $buttonValidate = '<a id="buttonValidateNetwork" class="elementIconBox" title="Validate Network" onclick="validateNetwork(\'cfg_device_ip4netaddress\',\'cfg_device_ip4netaddress_nmbits\',\'id_cfg_device_netgroup\',window.listNetwork,null,\'frmNetwork\');return false;"><i class="fa fa-check"></i></a>'; $mnunetwork = array(array(array('NetGroup', 'id_cfg_device_netgroup', 'class="clNetGroups"', 1, $listnetgroup), array('Netmask', 'cfg_device_ip4netaddress_nmbits', null, 1, $listnetmask), array('Network', 'cfg_device_ip4netaddress', 'class="elementIcon" style="width:140px!important" onblur="validateElement(\'ip\',this)"', 0, null, null, null, $buttonValidate . $buttonAdd, null, "IP Address"))); /**************************************************/ ?> <style type="text/css"> .disableButton,.disableButton:hover { background-color:#fafafa !important; color:#d5d3d1 !important; border:1px solid #fff !important; -moz-box-shadow:none !important; -webkit-box-shadow:none !important; box-shadow:v !important; } </style> <legend> Add Network </legend> <?php echo frmElements($mnunetwork); ?> <h3>Configured Networks</h3> <div id="tblnetwork" class="fieldsettable"> <?php include "list_network.php"; ?> </div> <script type="text/javascript"> $("#buttonAddNetwork").unbind( "click" ); </script>
<fieldset id="job_description"> <legend>Job Description</legend> <?php echo frmElements($fsJobDescription); ?> </fieldset> <fieldset id="duties"> <legend>Duties</legend> <?php echo frmElements($fsDuties); ?> </fieldset> <fieldset id="qualifications"> <legend>Qualifications</legend> <?php echo frmElements($fsQualifications); ?> </fieldset> </form> </div> <script type="text/javascript"> <?php echo $icoCollapse; ?> oREC = '{"oRec":[{"module":"06","filter":"id_hr_position","recid":"<?php echo $_POST["id_hr_position"]; ?> ","formname":"frmPosition"}]}'; <?php echo $icoDelete; echo $icoCollapse;
$filterDBO->sql = "SELECT \nid_cust_contact, \nconcat(cust_contact_familyName,',',cust_contact_givenName) as cust_contact FROM _cust_contact"; $filterDBO->dbFilter = "WHERE id_cust_company="; $filterDBO->type = "list"; $filterDBO->id = "id_cust_contact"; $filterDBO->attributes = "class='chContact'"; $contactJSON = encrypt(json_encode((array) $filterDBO)); # Fieldsets $fsSystemUser = array(array(array("Username", "sys_user", null, 0, null, $rec[0]["sys_user"]), array("Status", "id_sys_status", null, 1, $listStatus, $rec[0]["id_sys_status"]), array(null, "id_sys_user", null, 3, null, $rec[0]["id_sys_user"])), array(array("Organization", "id_cust_company", 'onchange="filterRec(this,\'' . $contactJSON . '\',\'dContact\')"', 1, $listCompany, $rec[0]["id_cust_company"]), array("User Record", "id_cust_contact", 'class="chContact"', 1, $listContact, $rec[0]["id_cust_contact"], 'dContact')), array(array("E-Mail", "sys_user_recovery", 'onblur="validateElement(\'email\',this)"', 0, null, $rec[0]["sys_user_recovery"]), array("Time Approval E-Mail", "sys_user_tmEmail", 'onblur="validateElement(\'email\',this)"', 0, null, $rec[0]["sys_user_tmEmail"]))); ?> <form method="post" name="frmUser" id="frmuser" action="javascript:submitFrmVals('content','/_mod/smod_14/sql.php','sys_user,sys_user_pw,id_hr_emp','&form=frmUser&action=update','frmUser')"> <fieldset id="user_management"> <legend> User Management </legend> <?php echo frmElements($fsSystemUser); ?> </fieldset> <fieldset id="permissions"> <legend> Permissions </legend> <?php include "editPermissions.php"; ?> </fieldset> </form> <script type="text/javascript"> <?php echo $icoCollapse; ?>
function getElements() { $records = $this->getRecords(); if ($records !== false) { $dataElements = ""; $regionFiltered = array(); $listRegions = $this->listRegions; for ($i = 0; $i < count($listRegions); $i++) { if ($listRegions[$i][2] == $records[0]["id_loc_country"]) { $regionFiltered[] = array($listRegions[$i][0], $listRegions[$i][1]); } } $elements = array(array(array('Country', 'id_loc_country', 'onchange="filterRec(this,\'' . $this->regionDBO . '\',\'dRegion\')"', 1, $this->listCountries, $records[0]["id_loc_country"]), array('State/Region', 'id_loc_region', 'class=\'chRegion\'', 1, $regionFiltered, $records[0]["id_loc_region"], "dRegion")), array(array('Address Line 1', 'addr_line1', null, 0, null, $records[0]["addr_line1"]), array(null, 'id_addr', null, 3, null, $records[0]['id_addr'])), array(array('Address Line 2', 'addr_line2', null, 0, null, $records[0]["addr_line2"])), array(array('City', 'loc_city', null, 0, null, $records[0]["loc_city"])), array(array('Postal Code', 'loc_postal_code', 'onblur="validateElement(\'zip\',this)"', 0, null, $records[0]["loc_postal_code"]))); $dataElements = frmElements($elements); } else { $dataElements = null; } return $dataElements; }
# Filterable Objects ## Network $gdbo = new ArcDb(); $gdbo->dbConStr = $globalDBCON; $gdbo->dbType = $globalDBTP; $gdbo->dbSchema = $globalDB; $gdbo->sql = "SELECT\nid_cfg_device_ip4netaddress,\nCONCAT(CAST(inet_ntoa(cfg_device_ip4netaddress) as CHAR),'/',CAST(cfg_device_ip4netaddress_nmbits as CHAR)) as Network\nFROM _cfg_device_ip4netaddress"; $gdbo->dbFilter = " WHERE id_cfg_device_netgroup="; $gdbo->type = "list"; $gdbo->id = "id_cfg_device_ip4netaddress"; $gdbo->attributes = 'class="chNetwork" onchange="IPInNetwork(document.getElementById(\'cfg_device_interface_ip4hostaddress\'),document.getElementById(\'id_cfg_device_ip4netaddress\'))"'; $networkdboJSON = encrypt(json_encode((array) $gdbo)); $buttonAdd = '<a id="addInterface" onclick="IPIsUnique(document.getElementById(\'cfg_device_interface_ip4hostaddress\'),\'id_cfg_device_ip4netaddress\',null,null,\'frminterfacesubmit\',\'frmInterface\')" class="elementIconBox" title="Add Interface"><i class="fa fa-plus"></i></a>'; # Fieldsets $mnuinterface = array(array(array('Interface Label', 'id_device_interfacelabel', 'class="clInterfaceLabel"', 1, $listiflabel), array('Speed/Duplex', 'id_device_ifspeedduplex', '', 1, $listifspeedduplex), array("MAC Address", "cfg_device_interface_mac", 'onblur="validateElement(\'mac\',this)"', 0), array(null, 'id_device', null, 3, null, $_POST["id_device"]), array(null, 'id_cfg', null, 3, null, $_POST["id_cfg"]), array(null, 'id_device', null, 3, null, $_POST["id_cfg_device"])), array(array('NetGroup', 'id_cfg_device_netgroup', 'class="clNetGroups" onChange="filterRec(this,\'' . $networkdboJSON . '\',\'dNetwork\');IPInNetwork(document.getElementById(\'cfg_device_interface_ip4hostaddress\'),document.getElementById(\'id_cfg_device_ip4netaddress\'))"', 1, $listnetgroup), array('Network Assignment', 'id_cfg_device_ip4netaddress', 'class="chNetwork" disabled="disabled"', 1, null, null, 'dNetwork'), array('Address', 'cfg_device_interface_ip4hostaddress', 'onblur="validateElement(\'ip\',this)" disabled="disabled" class="elementIcon"', 0, null, null, null, $buttonAdd))); /**************************************************/ ?> <legend> Add Interface </legend> <?php echo frmElements($mnuinterface); ?> <h3>Configured Interfaces</h3> <div id="tblinterface" class="fieldsettable"> <?php include "list_interface.php"; ?> </div> <div id="intfInsertError" style="display:none"></div>
$gdbo->sql = "SELECT id_cust_branch_tp,cust_branch_tp FROM _cust_branch_tp ORDER BY cust_branch_tp"; $gdbo->getRec(); $listBranchTp = $gdbo->dbData; # Fieldsets $fsBranch = array(array(array('*Tag', 'id_cust_company_tp', 'onchange="childListFilter(this,\'list\',window.listcompany,2,\'0-1\',\'id_cust_company\',\'chCompany\')"', 1, $listCompanyTp), array('*Organization', 'id_cust_company', 'disabled=\'disabled\' class=\'chCompany\'', 1, $listCompany)), array(array('*Branch', 'cust_branch', null, 0), array('*Branch Type', 'id_cust_branch_tp', null, 1, $listBranchTp))); $requiredFields = "id_cust_company,cust_branch,id_cust_company_tp,id_cust_branch_tp"; ?> <script type="text/javascript">$(".icoadd").remove();</script> <form method="post" name="frmBranch" id="frmBranch" action="javascript:submitFrmVals('content','/_mod/smod_02/sql.php','<?php echo $requiredFields; ?> ','&form=frmBranch&action=insert','frmBranch')"> <fieldset id="branch_detail"> <legend>Branch Detail</legend> <?php echo frmElements($fsBranch); ?> </fieldset> <?php $contacts = new ContactMethods(); $contacts->build(); $address = new ArcAddress(); $address->build(); ?> </form> <script type="text/javascript"> <?php echo $icoCollapse; ?> $("#oOptions").append(icoCollapse); collapseTabs();
# Branch require "_model/dboParentBranch.php"; $gdbo->getRec(); $listBranch = $gdbo->dbData; # Fieldsets $fsDepartment = array(array(array('*Branch', 'id_cust_branch', null, 1, $listBranch, $recDepartment[0]["id_cust_branch"]), array('*Department', 'cust_department', null, 0, null, $recDepartment[0]["cust_department"]), array(null, 'id_cust_department', null, 3, null, $recDepartment[0]["id_cust_department"]))); $requiredFields = "id_cust_branch,cust_department"; ?> <form method="post" name="frmDepartment" id="frmDepartment" action="javascript:submitFrmVals('content','/_mod/smod_03/sql.php','<?php echo $requiredFields; ?> ','&form=frmDepartment&action=update','frmDepartment')"> <fieldset id="department_detail"> <legend>Department Detail</legend> <?php echo frmElements($fsDepartment); ?> </fieldset> </form> </div> <script type="text/javascript"> oREC = '{"oRec":[{"module":"03","filter":"id_cust_department","recid":"<?php echo $_POST["id_cust_department"]; ?> ","formname":"frmDepartment"}]}'; <?php echo $icoDelete; echo $icoPreview; ?> $("#oOptions").append(icoDelete+icoPreview);
<fieldset id="business"> <legend>Business</legend> <?php echo frmElements($fsBusiness); ?> </fieldset> <fieldset id="private"> <legend>Private</legend> <?php echo frmElements($fsPrivate); ?> </fieldset> <fieldset id="timekeeping"> <legend>Time Keeping</legend> <?php echo frmElements($fsTimeKeeping); ?> </fieldset> <?php $address = new ArcAddress(); $address->filter = "id_addr"; $address->id = $rec[0]["id_addr"]; $address->build(); $education = new Education(); $education->filter = "id_hr_emp"; $education->id = $rec[0]["id_hr_emp"]; $education->build(); $certification = new Certification(); $certification->filter = "id_hr_emp"; $certification->id = $rec[0]["id_hr_emp"]; $certification->build();
/* Copyright (c) 2010-2016 Carlos Omar Villanueva 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"; require_once "_includes/optionstoolbar.php"; # Fieldsets $fsGroup = array(array(array('Group', 'sys_group', null, 0))); ?> <script type="text/javascript">$(".icoadd").remove();</script> <form method="post" name="frmGroup" id="frmGroup" action="javascript:submitFrmVals('content','/_mod/smod_24/sql.php',null,'&form=frmGroup&action=insert','frmGroup')"> <fieldset id="group"> <legend>Group</legend> <?php echo frmElements($fsGroup); ?> </fieldset> </form>
$iflabel = new ArcDb(); $iflabel->dbConStr = $globalDBCON; $iflabel->dbType = $globalDBTP; $iflabel->dbSchema = $globalDB; $iflabel->sql = "SELECT id_cfg_device_netgroup,cfg_device_netgroup from _cfg_device_netgroup order by cfg_device_netgroup"; $iflabel->getRec(); $listiflabel = $iflabel->dbData; /**************************************************/ $buttonAdd = '<div class="elementIconBox" onclick="prepSaveChanges(\'frmIFLabel\')"><i class="fa fa-plus"></i></div>'; /**************************************************/ $mnuiflabel = array(array(array("Interface Label", "device_interfacelabel", 'class="elementIcon"', 0, null, null, null, $buttonAdd, null, 'Network Interface'))); /**************************************************/ ?> <legend> Add Inteface Label </legend> <form name="frmIFLabel" id="frmIFLabel" method="post" action="javascript:submitFrmVals('fs_labels','/_mod/smod_18/sql.php','device_interfacelabel','<?php echo $ajCfgDevice; ?> &action=insert&form=frmIFLabel','frmIFLabel')"> <?php echo frmElements($mnuiflabel); ?> </form> <h3>Configured Interface Labels</h3> <div id="tbliflabel" class="fieldsettable"> <?php include "list_iflabel.php"; ?> </div>
$netgroup->sql = "SELECT id_cfg_device_netgroup,cfg_device_netgroup from _cfg_device_netgroup order by cfg_device_netgroup"; $netgroup->getRec(); $listnetgroup = $netgroup->dbData; /**************************************************/ $netgroup->sql = "\nSELECT \ninet_ntoa(a.cfg_device_ip4netaddress) as \"Network\",\na.cfg_device_ip4netaddress_nmbits as \"Netmask\",\na.id_cfg_device_netgroup,\nb.cfg_device_netgroup\nFROM _cfg_device_ip4netaddress a\nINNER JOIN _cfg_device_netgroup b\nON a.id_cfg_device_netgroup=b.id_cfg_device_netgroup \nWHERE cfg_device_ip4netaddress_enabled=1"; $netgroup->getRec(); $listnetwork = $netgroup->dbData; echo "<script type='text/javascript'>window.listNetwork=" . json_encode($listnetwork) . ";</script>"; /**************************************************/ $buttonAdd = '<div class="elementIconBox" onclick="prepSaveChanges(\'frmNetGroup\')"><i class="fa fa-plus"></i></div>'; $mnunetgroup = array(array(array("Network Group", "cfg_device_netgroup", "class=\"elementIcon\"", 0, null, null, null, $buttonAdd, null, 'Network Group'))); /**************************************************/ ?> <legend> Add Network Group </legend> <form name="frmNetGroup" id="frmNetGroup" method="post" action="javascript:submitFrmVals('fs_network_groups','/_mod/smod_18/sql.php','cfg_device_netgroup','<?php echo $ajCfgDevice; ?> &action=insert&form=frmNetGroup','frmNetGroup')"> <?php echo frmElements($mnunetgroup); ?> </form> <h3>Configured Network Groups</h3> <div id="tblnetgroup" class="fieldsettable"> <?php include "list_netgroup.php"; ?> </div>
$gdbo->sql = "SELECT id_device_grp,device_grp FROM _device_grp"; $gdbo->getRec(); $listDeviceGroup = $gdbo->dbData; # Filterable Objects ## Internal Parts $partsDBO = new ArcDb(); $partsDBO->dbConStr = $globalDBCON; $partsDBO->dbType = $globalDBTP; $partsDBO->dbSchema = $globalDB; $partsDBO->sql = "SELECT id_part_model,part_model_internalpartnumber FROM _part_model"; $partsDBO->dbFilter = "WHERE part_model_partnumber="; $partsDBO->type = "text"; $partsDBO->id = "id_part_model_"; $partsDBO->attributes = 'class="chPart"'; $partsDBOJSON = encrypt(json_encode((array) $partsDBO)); # Fieldsets $fs = array(array(array('Manufacturer', 'id_cust_company', null, 1, $listCompany), array('Device Group', 'id_device_grp', null, 1, $listDeviceGroup)), array(array('Model', 'device', null, 0), array('Label', 'device_altname', null, 0)), array(array('Manufacturer Part Number', 'device_mfrpartnumber', 'onkeyup="filterRec(this,\'' . $partsDBOJSON . '\',\'dInternalPart\')"', 0), array('Internal Part Number', 'id_part_model_', 'disabled="disabled" class="chPart"', 0, null, null, 'dInternalPart')), array(array('Description', 'device_descr', null, 6))); ?> <script type="text/javascript">$(".icoadd").remove();</script> <form method="post" name="frmDevice" id="frmDevice" action="javascript:submitFrmVals('content','/_mod/smod_26/sql.php','device,id_cust_company','&form=frmDevice&action=insert','frmDevice')"> <fieldset id="Device"> <legend>Device</legend> <?php echo frmElements($fs); ?> </fieldset> </form> <script type="text/javascript"> CKEDITOR.replace("device_descr"); </script>
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"; require_once "_includes/heading.php"; require_once "_includes/optionstoolbar.php"; # Company Type $gdbo->sql = "SELECT id_cust_company_tp,cust_company_tp FROM _cust_company_tp WHERE id_cust_company_tp !=1 ORDER BY cust_company_tp;"; $gdbo->getRec(); $listCompanyTp = $gdbo->dbData; # Fieldsets $fsOrganization = array(array(array('*Organization', 'cust_company', null, 0), array('*Tag', 'id_cust_company_tp', null, 1, $listCompanyTp))); $requiredFields = "cust_company,id_cust_company_tp"; ?> <script type="text/javascript">$(".icoadd").remove();</script> <form method="post" name="frmOrganization" id="frmOrganization" action="javascript:submitFrmVals('content','/_mod/smod_01/sql.php','<?php echo $requiredFields; ?> ','&form=frmOrganization&action=insert','frmOrganization')"> <fieldset id="organization_detail"> <legend>Organization Detail</legend> <?php echo frmElements($fsOrganization); ?> </fieldset> </form>
# Insurance Plan Type require "_model/dboInsurancePlanType.php"; $gdbo->getRec(); $listInsuranceTp = $gdbo->dbData; # Fieldsets $fsInsurance = array(array(array('*Provider', 'id_cust_company', null, 1, $listInsuranceProvider, $recInsurancePlan[0]["id_cust_company"]), array(null, 'id_hr_insurance_plan', null, 3, null, $recInsurancePlan[0]["id_hr_insurance_plan"])), array(array('*Plan Type', 'id_hr_insurance_plan_tp', null, 1, $listInsuranceTp, $recInsurancePlan[0]["id_hr_insurance_plan_tp"])), array(array('*Plan Name', 'hr_insurance_plan', null, 0, null, $recInsurancePlan[0]["hr_insurance_plan"])), array(array('Plan Description', 'hr_insurance_plan_descr', 'onkeydown="detectTab(this,event)"', 6, null, $recInsurancePlan[0]["hr_insurance_plan_descr"]))); $requiredFields = "id_cust_company,id_hr_insurance_plan_tp,hr_insurance_plan"; ?> <form method="post" name="frmInsurance" id="frmInsurance" action="javascript:submitFrmVals('content','/_mod/smod_07/sql.php','<?php echo $requiredFields; ?> ','&form=frmInsurance&action=update','frmInsurance')"> <fieldset id="insurance_detail"> <legend>Insurance Detail</legend> <?php echo frmElements($fsInsurance); ?> </fieldset> </form> <script type="text/javascript"> oREC = '{"oRec":[{"module":"07","filter":"id_hr_insurance_plan","recid":"<?php echo $_POST["id_hr_insurance_plan"]; ?> ","formname":"frmInsurance"}]}'; <?php echo $icoDelete; echo $icoPreview; ?> $("#oOptions").append(icoDelete+icoPreview); CKEDITOR.replace("hr_insurance_plan_descr");
?> </fieldset> <?php $contacts = new ContactMethods(); $contacts->build(); ?> <fieldset id="business"> <legend>Business</legend> <?php echo frmElements($fsBusiness); ?> </fieldset> <fieldset id="personal"> <legend>Personal</legend> <?php echo frmElements($fsPrivate); ?> </fieldset> <?php $address = new ArcAddress(); $address->build(); ?> </form> <script type="text/javascript"> <?php echo $icoCollapse; ?> $("#oOptions").append(icoCollapse); collapseTabs(); CKEDITOR.replace("cust_contact_notes"); </script>
$buttonAdd = '<div class="elementIconBox" onclick="arc(\'content\',\'' . $path . 'sql.php\',\'form=frmMember&action=insert&id_sys_group=\'+$(\'#id_sys_group\').val()+\'&id_sys_user=\'+$(\'#id_sys_user\').val())"><i class="fa fa-plus"></i></div>'; # Fieldsets $fsGroup = array(array(array('Group', 'sys_group', null, 0, null, $rec[0]["sys_group"]), array(null, 'id_sys_group', null, 3, null, $rec[0]["id_sys_group"]))); $fsMember = array(array(array('Add Member', 'id_sys_user', 'class="elementIcon"', 1, $listUser, null, null, $buttonAdd))); ?> <form method="post" name="frmGroup" id="frmGroup" action="javascript:submitFrmVals('content','/_mod/smod_24/sql.php',null,'&form=frmGroup&action=update','frmGroup')"> <fieldset id="group"> <legend>Group</legend> <?php echo frmElements($fsGroup); ?> </fieldset> <fieldset id="members"> <legend>Members</legend> <?php echo frmElements($fsMember); ?> <div id="list24-01"> <?php include "listMembers.php"; ?> </div> </fieldset> <fieldset id="permissions"> <legend> Permissions </legend> <?php include "editPermissions.php"; ?> </fieldset>
$gdbo->sql = "SELECT id_cust_contact,concat(_cust_contact.cust_contact_familyName,',',\n_cust_contact.cust_contact_givenName) as Name FROM _cust_contact WHERE id_cust_company = 1"; $gdbo->getRec(); $listContacts = $gdbo->dbData; # Variables $dateFiscal = '<div class="elementIconBox" onclick="openCalendar(this,\'interface\',null,\'clFiscal\')"><i class="fa fa-calendar"></i></div>'; $dateTax = '<div class="elementIconBox" onclick="openCalendar(this,\'interface\',null,\'clTax\')"><i class="fa fa-calendar"></i></div>'; # Arrays $listTIN = array(array("EIN", "Employer Identification Number"), array("SSN", "Social Security Number"), array("ITIN", "Individual Taxpayer Identification Number"), array("ATIN", "Taxpayer Identification Number for Pending U.S. Adoptions"), array("PTIN", "Preparer Taxpayer Identification Number ")); # Fieldsets $fsTaxData = array(array(array("TIN Type", "sys_company_tin_tp", null, 1, $listTIN, $rec[0]["sys_company_tin_tp"]), array("Tax Payer Identification", "sys_company_tin", null, 0, null, $rec[0]["sys_company_tin"])), array(array("NAICS Code", "sys_company_naicsCode", null, 0, null, $rec[0]["sys_company_naicsCode"]), array("State TaxID", "sys_company_stateTaxID", null, 0, null, $rec[0]["sys_company_stateTaxID"]))); $fsPayroll = array(array(array("Payroll Contact", "sys_company_payrollContact", null, 1, $listContacts, $rec[0]["sys_company_payrollContact"]), array("Registered Agent", "sys_company_registeredAgent", null, 1, $listContacts, $rec[0]["sys_company_registeredAgent"]))); ?> <form method="post" id="frmCompany" name="frmCompany" action="javascript:submitFrmVals('content','/_mod/smod_13/sql.php',null,'&action=update&form=frmCompany','frmCompany')"> <fieldset> <legend>Tax Data</legend> <?php echo frmElements($fsTaxData); ?> </fieldset> <fieldset> <legend>Company Contacts</legend> <?php echo frmElements($fsPayroll); ?> </fieldset> </form> <script type="text/javascript"> icoSave = '<span class="icoSave" onclick="prepSaveChanges()"><img alt="save" style="margin:0 4px" height="16" width="16" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAsdJREFUeNp8U0tIlFEU/u7jn/nnn4ej5LvSBve9oGihYYo7N4URRgguqk0bKaJo0SpoG7QwaFEEKZJCUrhpKbXwVWGFhOOkoThNOqmN48x/b+dejYgeFw73v+f+53zf+c657MGTYSilDmutbyutWqDx52IAZ/wFY+wq53x8x2VNUnCv4zjn6+vqUVoShxsKgZL9imUMm7kcVrKrLXOpubFCoXBPcH5BcsBhGux+/5A+uP8QDDIxgP4LA7bNwEJOvZmAKwULS6Bz0gM3aPv21CAej4JzRv8oa5xMGGMKjmAoK42ioa4GDiGFhca5KQ8xqSEZBb0aG0dDoh41VeUIh1xbW5CCJN2ZQz6Xx2p2DdNTE4gQ8llCDttg0sDUaFjMpRYQcIJw3SDiYQ83Rj9j4O2iLc2arYPKkEF4sqCLdCb0VWlIkyiQQkAI2qUwNWJgegkvL7djq6jQVCt/02R00YcXEGi7OxLnK18zz959mMFSOo31jQ0Si1ktDGKQ+Wh+lERmJYu+wWFr5rvp4SyEKlL7qQzHCeQ7OzrwcTaJxcVlpFKfsOYFLVI6p1AZEfALCkePNVqf+Ta+9KZv9ZHhSOTk2NRrK2IiUYcIiegK+vP5U6zmfFR4EiOpPI5XbZcxslC0vmzOdIoSmCy+72M2OY9gIICQ66IiFrad+FbUKKNsvTNF3HlfJC01JaeWuhxZYmIZGBFNvZIEFFyA026GxmixsaUQC3J0JiROHyinlAp9k2k8Tiq60xaEr2Qyg18yX7Ce+w5fKUokbUfMfGwqhmjIQeteF9eu38T88jpO1AYQdSXd7byFnovdPWe6uocam1svhTzvCNuZNEeEiJhAdcRFWUkA1bsiqIy7ELpAPtKD7gxLZl5j16l2j5LtJov+7HX0Sv+tUDTWpmjIippDm4GjtjF6L/YhcTNIWGP490qQleL/y/8hwAB52QNlkuILOAAAAABJRU5ErkJggg==">Save</span>'; $("#oOptions").html(icoSave); </script>
$gdbo->getRec(); $listSrvBoard = $gdbo->dbData; # Filterable Objects ## Service $servicedbo = new ArcDb(); $servicedbo->dbConStr = $globalDBCON; $servicedbo->dbType = $globalDBTP; $servicedbo->dbSchema = $globalDB; $servicedbo->sql = "SELECT id_srv, srv_summary FROM _srv"; $servicedbo->dbFilter = "WHERE id_srv_board="; $servicedbo->type = "list"; $servicedbo->id = "id_srv"; $servicedboJSON = encrypt(json_encode((array) $servicedbo)); $buttonDate = '<div class="elementIconBox" onclick="openCalendar(this,\'interface\',null,\'dateFld\')"><i class="fa fa-calendar"></i></div>'; $buttonTime = '<div class="elementIconBox" onclick="insertTime(this)"><i class="fa fa-clock-o"></i></div>'; $fsTime = array(array(array("Role", "id_tm_work_role", null, 1, $listTmWorkRole, null)), array(array("Charge Code", "id_tm_charge", null, 1, $listTmCharge, null), array("Charge Type", "id_tm_work_tp", null, 1, $listTmWorkTp, null)), array(array("Service Board", "id_srv_board", 'onchange="filterRec(this,\'' . $servicedboJSON . '\',\'dService\')"', 1, $listSrvBoard, $rec[0]["id_srv_board"]), array("Service Ticket", "id_srv", $disabled, 1, $listService, $rec[0]["id_srv"], "dService")), array(array("Start Date", "tm_ds", 'class="dateFld elementIcon" onblur="validateElement(\'date\',this)"', 0, null, $rec[0]['gmtDateStart'], null, $buttonDate), array("Start Time", "tm_ts", 'class="timeFld elementIcon" onblur="validateElement(\'time\',this)"', 0, null, null, null, $buttonTime), array("Total Time", "tm_total", 'disabled="disabled"', 0)), array(array("End Date", "tm_de", 'class="dateFld elementIcon" onblur="validateElement(\'date\',this)"', 0, null, null, null, $buttonDate), array("End Time", "tm_te", 'class="timeFld elementIcon" onblur="validateElement(\'time\',this)"', 0, null, null, null, $buttonTime), array("Deduct", "tm_deduction", null, 0, null, null)), array(array("Internal Notes", "tm_internalNotes", null, 6, null, null)), array(array("Public Notes", "tm_publicNotes", null, 6, null, null))); ?> <form method="post" id="frmTime" name="frmTime" action="javascript:submitFrmVals('blTime','/_mod/smod_10/sql_timeEntries.php','id_tm_charge,time_dc,tm_ts,tm_ds,id_tm_work_role,id_tm_work_tp,tm_start','&action=insert&form=frmTime','frmTime')"> <legend> Time Entry </legend> <?php echo frmElements($fsTime); ?> </form> <script type="text/javascript"> CKEDITOR.replace("tm_internalNotes"); CKEDITOR.replace("tm_publicNotes"); $('.dateFld,.timeFld,#tm_deduction').each(function() {var elem = $(this);$(elem).on("propertychange change click keyup input paste", function(){estTime();});}); </script>
$timereport .= $userdata . $internalnotes; if ($i == $end || $timedata[$i][2] != $timedata[$next][2]) { $timereport . "</div>"; } } $timereport .= "</div>"; } else { $timereport = '<div class="clReportContainer"><h1>There are no time entries</h1>'; } ?> <form class="popBox" method="POST" action="#"> <fieldset class="timesummary"> <legend>Time Summary</legend> <?php echo $timereport; echo frmElements($fsCommands); ?> </fieldset> </form> <script type="text/javascript"> $(function() { $(".popBox").resizable({ }); $(".popBox").resize(function() { lineWrap(); }); }); </script> <style> .syntaxhighlighter table td.code .line { white-space: pre-wrap !important;