function trigger_liveports() { $breed = detectDeviceBreed(getBypassValue()); foreach (array('getportstatus', 'getmaclist') as $command) { if (validBreedFunction($breed, $command) and permitted(NULL, 'liveports', $command)) { return 'std'; } } return ''; }
function renderConfigMainpage() { global $pageno, $page; echo '<ul>'; foreach ($page as $cpageno => $cpage) { if (isset($cpage['parent']) and $cpage['parent'] == $pageno && permitted($cpageno)) { echo "<li><a href='index.php?page={$cpageno}'>" . $cpage['title'] . "</li>\n"; } } echo '</ul>'; }
/** * Checks current user's permissions against the given action, exiting if user * isn't allowed to perform the given action */ function must_allow($action) { // Tell the renderer we've checked auth global $renderer; $renderer->authorize(); // Special case to allow for fully public pages if ($action == NULL) { return; } if (!permitted(get_user(), $action)) { header("HTTP/1.0 403 Forbidden"); $renderer->render("forbidden"); exit; } }
function renderInterfacesStats($object_id) { global $nextorder; global $port_use_age; addCSS("/* Live Interfaces */\n\t\t.text_green { color: #00cc00; }\n\t\t.text_yellow { color: #ff9900; }\n\t\t.text_red { color: #ff0000; }", TRUE); startPortlet('Interfaces statistics'); //get data: show version try { $uptime = queryDevice($object_id, 'getuptime'); } catch (RackTablesError $e) { } echo "<table width='100%'><tr>"; if (permitted(NULL, NULL, 'get_link_status')) { //get data: show interfaces try { $interfaces = queryDevice($object_id, 'getinterfaces'); } catch (RackTablesError $e) { } if (!empty($interfaces)) { $last_reboot = time_convert($uptime); echo "<td"; echo $last_reboot < $port_use_age ? " class='text_red'>" : $last_reboot > 262080 ? " class='text_green'>" : ">"; echo $uptime . "</tr>"; echo "<table width='80%' class='widetable' cellspacing=0 cellpadding='5px' align='center'><tr><th>Port<th>Link status<th>Last input<th>Last clear<th>Input packets<th>Output packets<th>Description</tr>"; $order = 'even'; foreach ($interfaces as $pn => $int) { echo "<tr class='row_{$order}'>"; $order = $nextorder[$order]; echo '<td>' . $pn . '<td'; echo $int['status'] == "connected" ? " class='text_green'>" : ">"; echo $int['status'] . '<td'; echo time_convert($int['last']) > $port_use_age ? " class='text_yellow'>" : ">"; echo $int['last'] . '<td'; echo time_convert($int['clear']) > 0 ? time_convert($int['clear']) < $port_use_age ? " class='text_red'>" : ">" : ">"; echo $int['clear']; echo '<td>' . $int['in_pkts']; echo '<td>' . $int['out_pkts']; echo '<td>' . $int['desc']; echo '</tr>'; } echo "</table></td>"; } } echo "</td></tr></table>"; finishPortlet(); }
function content_5778b6e53bcf54_59272631($_smarty_tpl) { if (!is_callable('smarty_block_m')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/block.m.php'; } ?> <div class="fldTitle"><?php $_smarty_tpl->smarty->_tag_stack[] = array('m', array()); $_block_repeat = true; echo smarty_block_m(array(), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> Fax<?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_m(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> #</div> <input type="text" readonly="readonly" style="width:90px" value="<?php echo $_smarty_tpl->tpl_vars['value']->value; ?> " /> <?php if ($_smarty_tpl->tpl_vars['value']->value) { ?> <a href="/leadsmail.php?cmd=compose&lead_id=<?php echo $_smarty_tpl->tpl_vars['lead_id']->value; ?> &fax=<?php echo $_smarty_tpl->tpl_vars['value']->value; ?> " <?php if (!permitted('allowFax')) { ?> onclick="alert('You must configure your Fax settings in your user profile page first before you can use this feature.');return false;"<?php } ?> > <img style="vertical-align:middle" src="/assets/images/fax_icon.jpg" width="21" height="21" border="0"></a> <?php } }
function content_5778b6e52b7705_27809830($_smarty_tpl) { ?> <div class="fldTitle"><?php echo $_smarty_tpl->getSubTemplate('fields/req.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); echo $_smarty_tpl->tpl_vars['title']->value; ?> <?php if (permitted('confEnableCanada')) { ?> (Postal Code)<?php } ?> </div> <input type="text" readonly="readonly" class="inpWide" value="<?php echo $_smarty_tpl->tpl_vars['value']->value; ?> "/> <?php }
public function __construct() { $this->loader = new Twig_Loader_Filesystem(__DIR__ . '/../templates'); $this->twig = new Twig_Environment($this->loader, array("debug" => true)); $this->variables = array(); $this->twig->addExtension(new Twig_Extension_Debug()); $this->authorized = FALSE; $this->add_function('permitted', function ($user, $action) { return permitted($user, $action); }); $this->add_function('can_give_role', function ($user, $role) { return can_give_role($user, $role); }); $this->add_function('iiif_page_top_url', 'iiif_page_top_url'); $this->add_function('iiif_page_bottom_url', 'iiif_page_bottom_url'); $this->add_function('iiif_info_url', 'iiif_info_url'); $this->twig->addGlobal("ROLE_ADMIN", ROLE_ADMIN); $this->twig->addGlobal("ROLE_TITLE_MANAGER", ROLE_TITLE_MANAGER); $this->twig->addGlobal("ROLE_ISSUE_CURATOR", ROLE_ISSUE_CURATOR); $this->twig->addGlobal("ROLE_ISSUE_REVIEWER", ROLE_ISSUE_REVIEWER); $this->twig->addGlobal("ROLE_USER_MANAGER", ROLE_USER_MANAGER); $this->twig->addGlobal("ROLE_MOC_MANAGER", ROLE_MOC_MANAGER); }
function content_5778b6e5271ea7_87612051($_smarty_tpl) { if (!is_callable('smarty_modifier_date')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.date.php'; } ?> <div class="fldTitle"><?php echo $_smarty_tpl->getSubTemplate('fields/req.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); echo $_smarty_tpl->tpl_vars['title']->value; ?> <?php if (permitted('confEnableCanada')) { ?> (Postal Code)<?php } ?> </div> <input type="text" readonly="readonly" class="inpWide" value="<?php echo smarty_modifier_date($_smarty_tpl->tpl_vars['value']->value); ?> "/> <?php }
function content_5778b6e577b464_23448108($_smarty_tpl) { ?> <div class="d1" > <div class="fldTitle"><?php echo $_smarty_tpl->getSubTemplate('fields/req.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); echo $_smarty_tpl->tpl_vars['title']->value; ?> <?php if (permitted('confEnableCanada')) { ?> (Postal Code)<?php } ?> </div> <input name="<?php echo $_smarty_tpl->tpl_vars['name']->value; ?> " type="text" class="fieldInputZip" value="<?php echo $_smarty_tpl->tpl_vars['value']->value; ?> " maxlength="9" maxlength_="" /> <span class="fieldComments">(xxxxx) <?php if (permitted('confEnableCanada')) { ?> / (xxx xxx)<?php } ?> </span> <?php echo $_smarty_tpl->getSubTemplate('fields/note.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> </div> <?php }
function formatPortReservation($port) { $ret = array(); $ret[] = '<td class=tdleft>' . (strlen($port['reservation_comment']) ? formatLoggedSpan($port['last_log'], 'Reserved:', 'strong underline') : '') . '</td>'; $editable = permitted('object', 'ports', 'editPort') ? 'editable' : ''; $ret[] = '<td class=tdleft>' . formatLoggedSpan($port['last_log'], $port['reservation_comment'], "rsvtext {$editable} id-{$port['id']} op-upd-reservation-port") . '</td>'; return $ret; }
function authorize8021QChangeRequests($before, $changes) { global $script_mode; if (isset($script_mode) and $script_mode) { return $changes; } $ret = array(); foreach ($changes as $pn => $change) { foreach (array_diff($before[$pn]['allowed'], $change['allowed']) as $removed_id) { if (!permitted(NULL, NULL, NULL, array(array('tag' => '$fromvlan_' . $removed_id), array('tag' => '$vlan_' . $removed_id)))) { continue 2; } } // next port foreach (array_diff($change['allowed'], $before[$pn]['allowed']) as $added_id) { if (!permitted(NULL, NULL, NULL, array(array('tag' => '$tovlan_' . $added_id), array('tag' => '$vlan_' . $added_id)))) { continue 2; } } // next port $ret[$pn] = $change; } return $ret; }
function content_5778b6e5db1a50_97898098($_smarty_tpl) { if (!is_callable('smarty_function_js_include')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php'; } if (!is_callable('smarty_function_js_data')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_data.php'; } if (!is_callable('smarty_block_mybox')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/block.mybox.php'; } if (!is_callable('smarty_modifier_cut')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.cut.php'; } if (!is_callable('smarty_modifier_money')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.money.php'; } if (!is_callable('smarty_function_html_options')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.html_options.php'; } if (!is_callable('smarty_modifier_num')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.num.php'; } if (!is_callable('smarty_function_my_call')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.my_call.php'; } ?> <style> .statBlock em { color:blue; } .statBlock a { font-weight:bold; } </style> <!--add tehila --> <?php echo smarty_function_js_include(array('src' => '/js/form_validator.js'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/uploader/css/jquery.fileupload-ui.css'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/uploader/js/vendor/jquery.ui.widget.js'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/uploader/js/jquery.iframe-transport.js'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/uploader/js/jquery.fileupload.js'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/css/upload.css'), $_smarty_tpl); ?> <!--end tehila --> <?php echo smarty_function_js_include(array('src' => '/js/lead.js'), $_smarty_tpl); ?> <?php echo $_smarty_tpl->getSubTemplate('calendar.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php echo smarty_function_js_include(array('src' => '/js/form_validator.js'), $_smarty_tpl); ?> <?php echo smarty_function_js_data(array('approveValidationErr' => $_smarty_tpl->tpl_vars['approveValidationErr']->value, 'tab' => $_smarty_tpl->tpl_vars['tab']->value, 'jsFundingProduct' => $_smarty_tpl->tpl_vars['FundingProduct']->value, 'totalPerc' => $_smarty_tpl->tpl_vars['totalPerc']->value, 'cntLenders' => $_smarty_tpl->tpl_vars['cntLenders']->value, 'BusinessEmail' => $_smarty_tpl->tpl_vars['BusinessEmail']->value, 'cashadv_id' => $_smarty_tpl->tpl_vars['cashadv_id']->value, 'cntMissingDocs' => $_smarty_tpl->tpl_vars['cntMissingDocs']->value, 'permittedSA' => $_smarty_tpl->tpl_vars['permittedSA']->value), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/css/statusColorBox.css'), $_smarty_tpl); ?> <style> .notesTable .v1{color:#3282e6} </style> <style> .inpMinimal{background:#DDFFFF} input.decFld{width:95%} .HLred{color:red;} .HLgreen{color:green;} .financialBanksTable .tdListHeaders{font-size:8pt;} .financialBanksTable input[type="text"] {text-align:right;width:100%} .graySummary{ background-color:#ccc; padding:4px; margin:8px 0px; font-size:12px; } </style> <?php echo '<script'; ?> language="javascript"> //add tehila var Attachments=[]; $(function () { $('#fileupload').fileupload({ dataType: 'json', start: function (e) { $('#progress').show(); }, stop: function (e) { //alert('TEST - it will refresh page to save uploaded files'); //$('#progress').hide(); document.form1.jAttachments.value=JSON.stringify(Attachments); document.form1.submit(); }, done: function (e, data) { var origname=data.files[0].name; var size=data.result.files[0].size; var file=data.result.files[0].name; Attachments.push({name:origname,size:size,file:file}); showAttachments(); }, progressall: function (e, data) { var progress = parseInt(data.loaded / data.total * 100, 10); $('#progress .bar').css( 'width', progress + '%' ); }, }); }); function showAttachments(){ // alert(print_r(Attachments)); var ss=''; for(i in Attachments){ var v=Attachments[i]; var title=v.name; ss=ss+(ss?'<br>':'')+title } $('#uploadFilesList').html(ss); } //end tehila*/ function emailACHBalanceClick(){ if(BusinessEmail){ //alert('Open PDF'); myRedirect('/pdf/index.php?doc=MCADailyACHPayment&cashadv_id='+cashadv_id); }else{ alert('This report cannot be emailed to the merchant because the email is missing on the DBA page.'); } } function emailACHCCClick(){ if(BusinessEmail){ //alert('Open PDF'); myRedirect('/pdf/index.php?doc=MCACreditCardBatchPayment&cashadv_id='+cashadv_id); }else{ alert('This report cannot be emailed to the merchant because the email is missing on the DBA page.'); } } var savedStatusCL=getCtrlValue('Status'); // add tehila function myInit(){ var e=el('OfficeCommPerc'); if(e) e.disabled=true; var blueitems=['AmountRequested','FactorRate',/*'OfficeCommPerc',*/'RepCommPerc','monthDeposit1','monthDeposit2','monthDeposit3','monthDeposit4','monthDeposit5','monthDeposit6','monthDeposit7','monthDeposit8','monthDeposit9','monthDeposit10','monthDeposit11','monthDeposit12','ManagementFeePerc','DailyResidualPerc','DeductCommissionsFrom','WithdrawalAmt']; var grayitems=['TotalPayback','TotalProfit','OfficeComm','RepComm','TotalCorpProfit','MonthlyBankDeposits', 'achPaybackMonths']; var i, o; for(i=0;i<blueitems.length;i++){ o=el(blueitems[i]); if(!o) continue; o.className= o.className+' inpField'; o.onchange=myOnChangeInputField; //alert(o.className); } for(i=0;i<grayitems.length;i++){ o=el(grayitems[i]); if(!o) continue; o.className= o.className+' calcField'; o.readOnly=true; //alert(o.className); } o=el('FundingProduct'); if(o) o.onchange=function(){document.form1.submit()}; myOnChangeInputField(); var credMinItems=['cred1BorName','cred1BorLastName','cred1BorSSN','cred1CurAddress','cred1CurCity','cred1CurState','cred1CurZip','cred1BorSSN']; for(i=0;i<credMinItems.length;i++){ o=el(credMinItems[i]); if(!o) continue; o.className= o.className+' inpMinimal'; } o=el('Status'); var savedStatus=getCtrlValue('Status'); if(o){ o.onchange=function(event){ var err=''; var errCL=''; var s=getCtrlValue('Status'); if(s=='Participation'||s=='Approved'||s=='Lender Debit'||s=='Merchant Credit'||s=='Agent Credit' ||s=='Merchant Daily Debit'||s=='Lender Daily Credit'||s=='Completed'||s=='NSF Reject'){ err='The CRM system will automatically change status of contract to Participation, Approved, and any of the ACH Billing status levels only after you add lenders to contract, add approval date, and add first daily ACH withdrawal date to the contract.'; } if(savedStatus=='Lender Debit'||savedStatus=='Merchant Credit'||savedStatus=='Agent Credit' ||savedStatus=='Merchant Daily Debit'||savedStatus=='Lender Daily Credit'||savedStatus=='Completed'||savedStatus=='NSF Reject'){ err='You cannot change the status when this contract is active in the ACH Billing system'; } //add tehila if(getCtrlValue('Status')=='Approved'&& !getCtrlValue('checkListDone')){ errCL='The checkList is not complete!'; } //end tehila if(err /*add tehila*/|| errCL/*end tehila*/){ if (err) alert(err); /*add tehila*/ if (errCL) alert (errCL); /*end tehila*/ if(permittedSA && confirm('Allow Sysadmin user to change status manually?')){ }else{ setCtrlValue('Status',savedStatus); } } myStatusChange2(); }; myStatusChange2(); //o.onchange(); } o=el('InceptionDate'); if(o) o.onchange=function(event){ if(jsFundingProduct=='Fixed Daily ACH' || jsFundingProduct=='CCFixed'){ var InceptionDate=getCtrlValue('InceptionDate'); var s=''; for(var i in approveValidationErr){ s=s+ (s?', ':'')+ approveValidationErr[i]; } if(InceptionDate && s){ setCtrlValue('InceptionDate',''); alert('You cannot add an approval date until the following fields are completed:\n\n'+s); } } if(o.value && strToMoney(totalPerc)!=100.0){ setCtrlValue('InceptionDate',''); alert('You cannot add Approval Date or First Withdrawal Date until you have added Syndicate Lender(s) to fund 100% of this contract.'); } }; o=el('achFirstWithdrawalDate'); if(o) o.onchange=function(event){ if(o.value && strToMoney(totalPerc)!=100.0){ o.value=''; el('f_achFirstWithdrawalDate_1').value=''; alert('You cannot set-up the first ACH payment until you have added Syndicate Lender(s) to fund 100% of this contract.'); } }; } function myStatusChange2(){ if(getCtrlValue('Status')=='Declined'){ el('DeclineReason').disabled=false; el('DealLostReason').disabled=false; }else{ el('DeclineReason').disabled=true; el('DealLostReason').disabled=true; } //tehila for task: substatus if(getCtrlValue('Status')=='Pre-Approved'){ el('PreApprovedSubStatus').disabled=false; }else{ el('PreApprovedSubStatus').disabled=true; } if(getCtrlValue('Status')=='Merchant Daily Debit'){ el('PreDailyDebitSubStatus').disabled=false; }else{ el('PreDailyDebitSubStatus').disabled=true; } if(getCtrlValue('Status')=='Contract IN'){ el('PreContractINSubStatus').disabled=false; }else{ el('PreContractINSubStatus').disabled=true; } if(getCtrlValue('Status')=='Underwriting'){ el('PreUnderwritingSubStatus').disabled=false; }else{ el('PreUnderwritingSubStatus').disabled=true; } //end } function myOnChangeInputField(){ if(el('AmountRequested')){ var AmountRequested= strToMoney(getCtrlValue('AmountRequested')); var TotalPayback = AmountRequested * strToMoney(getCtrlValue('FactorRate')); var TotalProfit = TotalPayback - AmountRequested; if(getCtrlValue('DeductCommissionsFrom')=='FUNDING'){ var OfficeComm = AmountRequested * strToMoney(getCtrlValue('OfficeCommPerc'))/100.0 ; var RepComm = AmountRequested * strToMoney(getCtrlValue('RepCommPerc'))/100.0 ; }else{ var OfficeComm = TotalPayback * strToMoney(getCtrlValue('OfficeCommPerc'))/100.0 ; var RepComm = TotalPayback * strToMoney(getCtrlValue('RepCommPerc'))/100.0 ; } var TotalCorpProfit = TotalProfit - OfficeComm - RepComm; var aSum=0; var aCnt=0; var i; var a; for(i=1;i<=12;i++){ a=strToMoney(getCtrlValue('monthDeposit'+i)); if(a!=0){aSum+=a;aCnt++}; } var MonthlyBankDeposits=aCnt? aSum/aCnt : 0; setCtrlValue('AmountRequested',formatCurrency(AmountRequested,'')); setCtrlValue('TotalPayback',formatCurrency(TotalPayback,'')); setCtrlValue('TotalProfit',formatCurrency(TotalProfit,'')); setCtrlValue('OfficeComm',formatCurrency(OfficeComm,'')); setCtrlValue('RepComm',formatCurrency(RepComm,'')); setCtrlValue('TotalCorpProfit',formatCurrency(TotalCorpProfit,'')); setCtrlValue('MonthlyBankDeposits',formatCurrency(MonthlyBankDeposits,'')); if(getCtrlValue('FundingProduct')=='MCA'){ } if(getCtrlValue('FundingProduct')=='Fixed Daily ACH' || getCtrlValue('FundingProduct')=='CCFixed'){ var days= sDiv(TotalPayback, strToMoney(getCtrlValue('WithdrawalAmt'))); var days1=Math.ceil(days); // var days1=parseInt(getCtrlValue('achPaybackMonths')); // var WithdrawalAmt=sDiv(TotalPayback, days1); var DailyResidualPerc=strToMoney(getCtrlValue('DailyResidualPerc')); var DailyResidualPercAmt=TotalPayback * DailyResidualPerc / 100; var DailyResidualPercAmtDaily= sDiv(DailyResidualPercAmt, days1); var ManagementFeePerc=strToMoney(getCtrlValue('ManagementFeePerc')); var ManagementFeePercAmt=TotalPayback * ManagementFeePerc / 100; var ManagementFeePercAmtDaily= sDiv(ManagementFeePercAmt , days1); //out setCtrlValue('achPaybackMonths',days1); //setCtrlValue('WithdrawalAmt',formatCurrency(WithdrawalAmt,'$')); el('spDailyRes').innerHTML= formatCurrency(DailyResidualPercAmt,'$') + ' / ' + formatCurrency(DailyResidualPercAmtDaily,'$') +' ('+days1+')' ; el('spManFee').innerHTML= formatCurrency(ManagementFeePercAmt,'$') + ' / ' + formatCurrency(ManagementFeePercAmtDaily,'$') +' ('+days1+')' ; } } } function myFormSubmit(f){ // if(el('InceptionDate') && getCtrlValue('InceptionDate') && cntMissingDocs>0){ // alert('You cannot add approval date for this merchant because '+cntMissingDocs+' required documentations are missing.'); // return false; // } if(!el('DeclineReason').disabled && !getCtrlValue('DeclineReason')){ alert('Underwriting Decline Reason Is Required'); return false; } /*add tehila var err=''; if(getCtrlValue('Status')=='Approved'&& !getCtrlValue('checkListDone')){ err='The checkList is not complete!'; } if (err){ alert(err); if(permittedSA && confirm('Allow Sysadmin user to change status manually?')) {} else{ setCtrlValue('Status',savedStatusCL); return false; } } //end tehila*/ myXXX_SaveBeep(); return true; } function AddSyndClick(){ var obj=el('newSynd[perc]'); var val=obj.value*1; // alert(obj.value+','+syndTotalperc*1); if(val + syndTotalperc*1>100.0){ alert('The funding '+val*1+'% you entered has exceeded the amount needed to fund this account. Please select correct funding % '); obj.focus(); return false; } return true; } function checklistModified(name){ //alert(name); setCtrlValue('checklist['+name+'][isModified]','1'); } function mySendClick(cashadv_id,creditOptionsValid){ if(creditOptionsValid){ if(myCreditValidate() && confirm('Are you sure to send request?')){ document.form1.subcmd.value='postCredit'; myXXX_SaveBeep(); document.form1.submit(); //myRedirect('/creditreport.php?cmd=post&cashadv_id='+cashadv_id); } }else{ alert('You do not have an account setup and activated with ACRAnet credit reporting company. Please contact ACRAnet.com to setup a new account and add your new account info in the CRM\'s administrative setup/configuration section.'); } } function myCreditValidate(){ if(!getCtrlValue('cred1BorName')){alert('Borrower Name is Required'); return false;} if(!getCtrlValue('cred1BorLastName')){alert('Borrower Last Name is Required'); return false;} if(!getCtrlValue('cred1BorSSN')){alert('Borrower SSN is Required'); return false;} e=checkSSN(getCtrlValue('cred1BorSSN'),true); if (e){alert('Borrower SSN is Invalid'); return false;} return true; } function checkAllLenders(cb){ var e=document.getElementsByName('selLender[]'); for(i=0;i<e.length;i++) e[i].checked=cb.checked;; } var decTrackChange=false; function decOnChange(trackChange){ var decAmountRequested = strToMoney(getCtrlValue('decAmountRequested')); var decFactorRate = strToMoney(getCtrlValue('decFactorRate')); var decACHDays= strToMoney(getCtrlValue('decACHDays')); var decPaybackAmt=decAmountRequested*decFactorRate; var decDailyACH=sDiv(decPaybackAmt,decACHDays); setCtrlValue('decPaybackAmt',formatCurrency(decPaybackAmt,'')); setCtrlValue('decDailyACH',formatCurrency(decDailyACH,'')); var readonly=getCtrlValue('decSelection')=='2'?false:true; var fields=['decAmountRequested','decFactorRate','decACHDays']; for(var i in fields){ if(o=el(fields[i])){ o.readOnly=readonly; myRemoveClass(o,readonly?'inpField':'calcField'); myAddClass(o,readonly?'calcField':'inpField'); } } switch(getCtrlValue('decSelection')){ case '1': el('trDecNotes').style.display='none'; break; case '2': el('trDecNotes').style.display=''; el('divDecNotesTitle1').style.display=''; el('divDecNotesTitle2').style.display='none'; break; case '3': el('trDecNotes').style.display=''; el('divDecNotesTitle1').style.display='none'; el('divDecNotesTitle2').style.display=''; break; } if(trackChange) decTrackChange=true; } function decSubmitResponse(){ if(getCtrlValue('decSelection')=='2' && decTrackChange==false){ alert('You must first make a change to the funding amount, factor rate, and/or # days of ACH withdrawal fields first before you can submit your response.'); return; } myXXX_SaveBeep(); document.form1.submit(); } function selLenderClick(obj){ //var a=getCtrlValue('selLender['+uid+']'); //alert(obj.value+','+obj.checked); var uid=obj.value; el('trSelLender_'+uid).style.display=obj.checked?'':'none'; } <?php echo '</script'; ?> > <style> SPAN.spMCALoan{font-size:12pt;font-weight:bold;color:#3366cc;} </style> <form name="form1" method="post" enctype="multipart/form-data" onsubmit="return myFormSubmit(this)"> <input type=hidden name="cashadv_id" value="<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> "> <input type=hidden name="app_id" value="<?php echo $_smarty_tpl->tpl_vars['app_id']->value; ?> "> <input type=hidden name="tab" value="<?php echo $_smarty_tpl->tpl_vars['tab']->value; ?> "> <input type=hidden name="cmd" value="cashadv_submit"> <input type=hidden name="subcmd" value=""> <!--add tehila--> <input type=hidden name="checkListDone" value="<?php echo $_smarty_tpl->tpl_vars['checkListDone']->value; ?> "> <input type="hidden" name="jAttachments" /> <!--end tehila--> <?php echo $_smarty_tpl->getSubTemplate('status/cashadv_header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => 'MCA Application Summary'), 0); ?> <div class="mySortable mca_dba"> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "mca_dbasummarystat", 'title' => "Summary", 'class' => "box-one")); $_block_repeat = true; echo smarty_block_mybox(array('node' => "mca_dbasummarystat", 'title' => "Summary", 'class' => "box-one"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <div class="statBlock"> <div class="graySummary">Approved Funding $ <?php if ($_smarty_tpl->tpl_vars['stat']->value['Lenders']) { ?> <em><?php echo smarty_modifier_cut($_smarty_tpl->tpl_vars['stat']->value['Lenders'], 430); ?> </em><?php } ?> <div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=funding"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['ApprovedFunding']); ?> </a></div></div> <div class="graySummary">Payback Amount $ <div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=funding"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['PaybackAmount']); ?> </a></div></div> <div class="graySummary">Total Paid Back $ <div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=funding"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['TotalPaidBack']); ?> </a></div></div> <div class="graySummary">PaidBack Balance Due$ <div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=funding"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['PaybackBalance']); ?> </a></div></div> <div class="graySummary">Fixed Daily ACH Amount $ <div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=funding"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['FixedDailyACH']); ?> </a></div></div> <div class="graySummary">User Commissions $ <?php if ($_smarty_tpl->tpl_vars['stat']->value['Users']) { ?> <em><?php echo smarty_modifier_cut($_smarty_tpl->tpl_vars['stat']->value['Users'], 430); ?> </em><?php } ?> <div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=funding"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['UserCommissions']); ?> </a></div></div> <div class="graySummary">Additional User Commissions $ <?php if ($_smarty_tpl->tpl_vars['stat']->value['UsersA']) { ?> <em><?php echo smarty_modifier_cut($_smarty_tpl->tpl_vars['stat']->value['UsersA'], 430); ?> </em><?php } ?> <div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=funding"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['AdditionalUserCommissions']); ?> </a></div></div> <div class="graySummary">Merchant Administrative & Underwriting Fees <div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=funding"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['MerchAdmFees']); ?> </a></div></div> <div class="graySummary">Lender One-Time Mgmt Fees $ <?php if ($_smarty_tpl->tpl_vars['stat']->value['Lenders1']) { ?> <em><?php echo smarty_modifier_cut($_smarty_tpl->tpl_vars['stat']->value['Lenders1'], 430); ?> </em><?php } ?> <div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=synd"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['LendOneTimeFee']); ?> </a></div></div> <div class="graySummary">Lender Daily Mgmt Fees $ <?php if ($_smarty_tpl->tpl_vars['stat']->value['Lenders2']) { ?> <em><?php echo smarty_modifier_cut($_smarty_tpl->tpl_vars['stat']->value['Lenders2'], 430); ?> </em><?php } ?> <div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=synd"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['LendDailyFee']); ?> </a></div></div> <div class="graySummary">Lender One-Time Admin Fees $ <?php if ($_smarty_tpl->tpl_vars['stat']->value['Lenders3']) { ?> <em><?php echo smarty_modifier_cut($_smarty_tpl->tpl_vars['stat']->value['Lenders3'], 430); ?> </em><?php } ?> <div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=synd"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['LendAdmFee']); ?> </a></div></div> </div> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => "mca_dbasummarystat", 'title' => "Summary", 'class' => "box-one"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <!--add tehila -add note--> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "mcanotes_add", 'title' => "Add a Note", 'class' => "box-one box-blue")); $_block_repeat = true; echo smarty_block_mybox(array('node' => "mcanotes_add", 'title' => "Add a Note", 'class' => "box-one box-blue"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <table width="100%" > <input type="hidden" name="cmd2" value="submit_note" /> <input type="hidden" name="contact_id" value="<?php echo $_smarty_tpl->tpl_vars['contact_id']->value; ?> " /> <?php if (permitted('ADMIN-RIGHTS')) { ?> <tr > <td align="center" class="tdValueColumn"> <select name="note_vis"> <?php echo smarty_function_html_options(array('options' => $_smarty_tpl->tpl_vars['selVis']->value), $_smarty_tpl); ?> </select> </td> </tr> <?php } ?> <tr > <td align="center" class="tdValueColumn"><span class="nobr"> <textarea name="note_text" rows="5" class="w_3_3"></textarea> </span></td> </tr> </table> <div class="footer"><input type="submit" name="btnAddNote" value="Submit Note" /></div> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => "mcanotes_add", 'title' => "Add a Note", 'class' => "box-one box-blue"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <!--end tehila--> <!--add tehila docs uplodeed--> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "mcadocs_docpwupl", 'title' => "Documents/Paperwork Uploaded", 'class' => "box-one box-blue")); $_block_repeat = true; echo smarty_block_mybox(array('node' => "mcadocs_docpwupl", 'title' => "Documents/Paperwork Uploaded", 'class' => "box-one box-blue"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr > <td colspan="5" class="tdValueColumn"> <table class="tblMultipleUpload"> <tr><td class="c1"> <span class="fileinput-button" style=''> <input type="button" value="Upload Multiple Docs" class="std"> <input id="fileupload" type="file" name="files[]" data-url="/uploader/server/" multiple> </span> </td> <td class="c2"><div id="progress" class="progressBar"><div class="bar"></div></div></td></tr> <tr> <td colspan="2" class="c3"><div id="uploadFilesList"></div></td> </tr> </table> </td> </tr> </table> <div class="footer"> <div class="toleft"> <?php if (permitted('ADMIN-RIGHTS')) { ?> <input type="button" value="Show All Docs" class="std" onclick="myRedirect('/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=userdoc')"> <?php } ?> </div> <?php if (permitted('ADMIN-RIGHTS')) { ?> <input type="submit" value="Save" /> <?php } ?> </div> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => "mcadocs_docpwupl", 'title' => "Documents/Paperwork Uploaded", 'class' => "box-one box-blue"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <!--end tehila--> <?php $_smarty_tpl->tpl_vars['section'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['section']->_loop = false; $_smarty_tpl->tpl_vars['k_sec'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['sections']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['section']->key => $_smarty_tpl->tpl_vars['section']->value) { $_smarty_tpl->tpl_vars['section']->_loop = true; $_smarty_tpl->tpl_vars['k_sec']->value = $_smarty_tpl->tpl_vars['section']->key; ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "mcadba_" . (string) $_smarty_tpl->tpl_vars['section']->value['section_code'], 'title' => $_smarty_tpl->tpl_vars['section']->value['title'], 'class' => "box-one box-" . (string) $_smarty_tpl->tpl_vars['section']->value['color'])); $_block_repeat = true; echo smarty_block_mybox(array('node' => "mcadba_" . (string) $_smarty_tpl->tpl_vars['section']->value['section_code'], 'title' => $_smarty_tpl->tpl_vars['section']->value['title'], 'class' => "box-one box-" . (string) $_smarty_tpl->tpl_vars['section']->value['color']), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php if ($_smarty_tpl->tpl_vars['section']->value['section_code'] == 'DBA_STATUS') { ?> <TABLE width="100%" class="tblFields"> <tr> <TD class="tdListHeaders"> <div class="toleft">Required Docs for Underwriting: <a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=checklist"><?php echo smarty_modifier_num($_smarty_tpl->tpl_vars['checklistStat']->value['cntTotal'], 2); ?> </a> Total | <a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=checklist"><?php echo smarty_modifier_num($_smarty_tpl->tpl_vars['checklistStat']->value['cntReceived'], 2); ?> </a> Received | <a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=checklist"><?php echo smarty_modifier_num($_smarty_tpl->tpl_vars['checklistStat']->value['cntMissing'], 2); ?> </a> Missing</div> <div class="toright"><a href="javascript:;" onclick="showPopUp('/cashadvance.php?cmd=checklist_required_popup&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> ',700,600);">View All Req'd Docs</a> | <a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=checklist">Manage</a></div> </TD> </tr> </TABLE> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['section']->value['type'] == 'fields') { ?> <div> <?php echo $_smarty_tpl->tpl_vars['section']->value['html']; ?> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['section']->value['type'] == 'lead') { $_smarty_tpl->tpl_vars['leadsec'] = new Smarty_variable($_smarty_tpl->tpl_vars['section']->value['leadSection'], null, 0); ?> <table width="100%"> <TR colspan="3" id="tr_lead_section_body_<?php echo $_smarty_tpl->tpl_vars['leadsec']->value['section_code']; ?> "> <TD> <div class="boxHolder"> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['leadsec']->value['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <?php if ($_smarty_tpl->tpl_vars['item']->value['cellHTML']) { ?> <?php echo $_smarty_tpl->tpl_vars['item']->value['cellHTML']; ?> <?php } else { ?> <div class="box_<?php echo $_smarty_tpl->tpl_vars['item']->value['size']; ?> _<?php echo $_smarty_tpl->tpl_vars['leadsec']->value['numCol']; ?> "> <?php echo $_smarty_tpl->tpl_vars['item']->value['html']; ?> </div> <?php } ?> <?php } ?> </div> </TD> </TR> </table> <?php } ?> <div class="footer"> <?php if ($_smarty_tpl->tpl_vars['section']->value['section_code'] == 'DBA_STATUS') { ?> <div class="toleft"> <a href="javascript:;" onclick="if(confirm('You have chosen to close out Contract # <?php echo $_smarty_tpl->tpl_vars['cashadv_idStr']->value; echo $_smarty_tpl->tpl_vars['cashadv_idModifier']->value; ?> , with an active payback balance of $<?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['Balance']->value, 2); ?> still outstanding. The MCA system will create a new contract and apply the balance of $<?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['Balance']->value, 2); ?> to this new contract. When the Renewal Contract is ready to deposit the approved funding amount to the merchant, the outstanding balance of $<?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['Balance']->value, 2); ?> will be deducted from the funding amount to be deposited to the merchants bank account to close out the old contract.\n\nThe old contract status will remain in its current ACH billing status until the new renewal contract status has changed to \'Approved\'. When the new contract status is \'Approved\', the old contract will close with a status of \'Completed\'.\n\nAre you sure you want to proceed?')) myRedirect('/cashadvance.php?cmd=do_renew&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> ')" title="Renew Contract">Renew</a> | <a href="javascript:;" onclick="if(confirm('You have chosen to duplicate Contract # <?php echo $_smarty_tpl->tpl_vars['cashadv_idStr']->value; echo $_smarty_tpl->tpl_vars['cashadv_idModifier']->value; ?> . The MCA system will create a new contract. \n\nAre you sure you want to proceed?')) myRedirect('/cashadvance.php?cmd=do_clone&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> ')">Duplicate</a> | <a href="/cashadvance.php?cmd=manpay&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> " >Early Payoff</a> </div> <a href="javascript:;" onclick="emailACHBalanceClick()" title="Email ACH Balance Report to Client" >Email ACH Report</a> | <a href="javascript:;" onclick="emailACHCCClick()" title="Email CC Batch Balance Report to Client">Email CC Report</a> | <?php } ?> <?php if ($_smarty_tpl->tpl_vars['section']->value['section_code'] == 'DBA_INFO') { ?> <a href="javascript:;" onclick="showPopUp('/dymo/popup.php?type=mca&id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> ',700,700)">Print Dymo Label</a> | <?php } ?> <?php if ($_smarty_tpl->tpl_vars['section']->value['isEdit']) { ?> <a href="javascript:;" onclick="if(myFormSubmit(document.form1)) document.form1.submit()">Save</a> <?php } else { ?> <a href="javascript:;" onclick="document.location.href='/cashadvance.php?cmd=cashadv_edit&app_id=<?php echo $_smarty_tpl->tpl_vars['app_id']->value; ?> &cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=dba&mode=edit'">Edit</a> <?php } ?> </div> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => "mcadba_" . (string) $_smarty_tpl->tpl_vars['section']->value['section_code'], 'title' => $_smarty_tpl->tpl_vars['section']->value['title'], 'class' => "box-one box-" . (string) $_smarty_tpl->tpl_vars['section']->value['color']), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "cashadv_dba_leadusers", 'title' => "Users Involved in this MCA Contract (from Lead to MCA Contract Boarding)", 'class' => "box-one")); $_block_repeat = true; echo smarty_block_mybox(array('node' => "cashadv_dba_leadusers", 'title' => "Users Involved in this MCA Contract (from Lead to MCA Contract Boarding)", 'class' => "box-one"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <table width="100%"> <tr> <td class="tdListHeaders">User Name</td> <td class="tdListHeaders">User Type</td> <td class="tdListHeaders">Email</td> <td class="tdListHeaders">Phone</td> </tr> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['leadusers']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr> <td class="tdValueColumn"><a href="/user.php?cmd=edit_user&uid=<?php echo $_smarty_tpl->tpl_vars['item']->value['uid']; ?> "><?php echo $_smarty_tpl->tpl_vars['item']->value['name']; ?> </a></td> <td class="tdValueColumn"><?php echo $_smarty_tpl->tpl_vars['item']->value['type']; ?> </td> <td class="tdValueColumn"><?php echo $_smarty_tpl->tpl_vars['item']->value['phone']; ?> <?php echo smarty_function_my_call(array('phone' => $_smarty_tpl->tpl_vars['item']->value['phone']), $_smarty_tpl); ?> </td> <td class="tdValueColumn"><a href="mailto:<?php echo $_smarty_tpl->tpl_vars['item']->value['email']; ?> "><?php echo $_smarty_tpl->tpl_vars['item']->value['email']; ?> </a></td> </tr> <?php } ?> </table> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => "cashadv_dba_leadusers", 'title' => "Users Involved in this MCA Contract (from Lead to MCA Contract Boarding)", 'class' => "box-one"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> </div> <?php echo '<script'; ?> >mybox_sortableInit('.mySortable.mca_dba');<?php echo '</script'; ?> > </form> <?php echo '<script'; ?> language="javascript">myInit(); <?php echo '</script'; ?> > <?php }
function handleNetworkStickerClear() { global $sic, $pageno; assertUIntArg('attr_id'); if (permitted(NULL, NULL, NULL, array(array('tag' => '$attr_' . $sic['attr_id'])))) { commitUpdateAttrForNetwork(spotEntity($pageno === 'ipv4net' ? 'ipv4net' : 'ipv6net', getBypassValue()), $sic['attr_id']); showSuccess("Attribute value cleared successfully"); } else { $oldvalues = getAttrValues(getBypassValue()); showError('Permission denied, "' . $oldvalues[$sic['attr_id']]['name'] . '" left unchanged'); } }
function getCommentsOfFriends() { $comments_of_friends = array(); $stmt = db_execute('SELECT * FROM comments ORDER BY created_at DESC LIMIT 1000'); while ($comment = $stmt->fetch()) { if (!is_friend($comment['user_id'])) { continue; } $entry = getEntry($comment['entry_id']); $entry['is_private'] = $entry['private'] == 1; if ($entry['is_private'] && !permitted($entry['user_id'])) { continue; } $comments_of_friends[] = $comment; if (sizeof($comments_of_friends) >= 10) { break; } } return $comments_of_friends; }
function content_5778af8a051997_20571009($_smarty_tpl) { if (!is_callable('smarty_function_js_include')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php'; } if (!is_callable('smarty_block_mybox')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/block.mybox.php'; } if (!is_callable('smarty_function_js_data')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_data.php'; } if (!is_callable('smarty_function_cycle')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.cycle.php'; } if (!is_callable('smarty_modifier_ucwords')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.ucwords.php'; } if (!is_callable('smarty_modifier_money')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.money.php'; } if (!is_callable('smarty_modifier_truncate')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.truncate.php'; } if (!is_callable('smarty_modifier_date_format')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.date_format.php'; } if (!is_callable('smarty_modifier_date')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.date.php'; } echo smarty_function_js_include(array('src' => '/css/calendar.css'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/css/homepage.css'), $_smarty_tpl); ?> <?php echo '<script'; ?> language="javascript"> function statAppChange(){ var statApp=getCtrlValue('statApp'); el('tblAppProf').style.display= statApp=='Prof'?'':'none'; el('tblAppVol').style.display= statApp=='Vol'?'':'none'; el('tblAppNumtrans').style.display= statApp=='Numtrans'?'':'none'; var statAgent=getCtrlValue('statAgent'); el('tblAgentAccSub').style.display= statAgent=='AccSub'?'':'none'; el('tblAgentAcc').style.display= statAgent=='Acc'?'':'none'; el('tblAgentRes').style.display= statAgent=='Res'?'':'none'; el('tblAgentCom').style.display= statAgent=='Com'?'':'none'; var statMca=getCtrlValue('statMca'); el('tblMcaAmount').style.display= statMca=='Amount'?'':'none'; el('tblMcaBal').style.display= statMca=='Bal'?'':'none'; el('tblMcaProf').style.display= statMca=='Prof'?'':'none'; // top 10 var statTeamleader=getCtrlValue('statTeamleader'); el('tblTeamleaderLead').style.display= statTeamleader=='Lead'?'':'none'; el('tblTeamleaderAppt').style.display= statTeamleader=='Appt'?'':'none'; el('tblTeamleaderSold').style.display= statTeamleader=='Sold'?'':'none'; var statTm=getCtrlValue('statTm'); el('tblTmLead').style.display= statTm=='Lead'?'':'none'; el('tblTmAppt').style.display= statTm=='Appt'?'':'none'; el('tblTmSold').style.display= statTm=='Sold'?'':'none'; var statLeadcloser=getCtrlValue('statLeadcloser'); el('tblLeadcloserLead').style.display= statLeadcloser=='Lead'?'':'none'; el('tblLeadcloserAppt').style.display= statLeadcloser=='Appt'?'':'none'; el('tblLeadcloserSold').style.display= statLeadcloser=='Sold'?'':'none'; } $(document).ready(function() { }); <?php echo '</script'; ?> > <style> </style> <div class="mySortable HomePage"> <?php if (permitted('HOME-DailyQuotes')) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-DailyQuotes', 'title' => 'Daily Sales & Motivational Quotes', 'class' => 'box-one box-blue')); $_block_repeat = true; echo smarty_block_mybox(array('node' => 'HOME-DailyQuotes', 'title' => 'Daily Sales & Motivational Quotes', 'class' => 'box-one box-blue'), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php echo smarty_function_js_data(array('jsQuotes' => $_smarty_tpl->tpl_vars['jsQuotes']->value, 'jsQuotesTimer' => $_smarty_tpl->tpl_vars['confDayquotesTimer']->value), $_smarty_tpl); ?> <div id="quoteDiv"></div> <?php echo '<script'; ?> > var myQuoteI=0; myQuoteTimer(); function myQuoteTimer(){ if(jsQuotes.length==0) return; var d=document.getElementById('quoteDiv'); if(!d) return; if(!jsQuotes[myQuoteI]){myQuoteI=0;} var s=jsQuotes[myQuoteI]['txt']; // d.innerHTML='Quote #'+(jsQuotes[myQuoteI]['id'])+': '+s; d.innerHTML=s; myQuoteI++; // alert(myFlashTextTag); window.setTimeout("myQuoteTimer()",jsQuotesTimer*1000,"javascript"); } <?php echo '</script'; ?> > <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => 'HOME-DailyQuotes', 'title' => 'Daily Sales & Motivational Quotes', 'class' => 'box-one box-blue'), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php if (permitted('HOME-top25App')) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-top25App', 'title' => 'Top 25 Merchants', 'class' => 'box-three box-1 box-green')); $_block_repeat = true; echo smarty_block_mybox(array('node' => 'HOME-top25App', 'title' => 'Top 25 Merchants', 'class' => 'box-three box-1 box-green'), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders" align="center"> <select style="width:195px" onchange="statAppChange()" name="statApp"> <option value="Prof" selected>by Total Profit $</option> <option value="Vol" >by Volume $</option> <option value="Numtrans" >by Avg TXN $</option> </select> </td> </tr> <tr> <td> <table id="tblAppProf" class="myStat25" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">Merchant Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Total $</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topAppProfit']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['BusinessName']); ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['amount'], 2); ?> </div></td> </tr> <?php } ?> </table> <table id="tblAppVol" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">Merchant Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Total $</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topAppVol']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['BusinessName']); ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['volume'], 2); ?> </div></td> </tr> <?php } ?> </table> <table id="tblAppNumtrans" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">Merchant Name</td> <td class="tdListHeaders myAmtHeader"><div align="right"># Trans</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topAppNumtrans']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['BusinessName']); ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['numTrans'], 0); ?> </div></td> </tr> <?php } ?> </table> </td> </tr> </table> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => 'HOME-top25App', 'title' => 'Top 25 Merchants', 'class' => 'box-three box-1 box-green'), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php if (permitted('HOME-top25Agent')) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-top25Agent', 'title' => 'Top 25 Sales Agents', 'class' => 'box-three box-2 box-green')); $_block_repeat = true; echo smarty_block_mybox(array('node' => 'HOME-top25Agent', 'title' => 'Top 25 Sales Agents', 'class' => 'box-three box-2 box-green'), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders" align="center"> <select style="width:195px" onchange="statAppChange()" name="statAgent"> <option value="AccSub" selected>by Account Submitted</option> <option value="Acc" >by Approved Accounts</option> <option value="Res" >by Residuals</option> <option value="Com" >by Commissions</option> </select> </td> </tr> <tr> <td> <table id="tblAgentAccSub" class="myStat25" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">User Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topAgentAccSub']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo $_smarty_tpl->tpl_vars['item']->value['UserName']; ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0); ?> </div></td> </tr> <?php } ?> </table> <table id="tblAgentAcc" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">User Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topAgentAcc']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo $_smarty_tpl->tpl_vars['item']->value['UserName']; ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0); ?> </div></td> </tr> <?php } ?> </table> <table id="tblAgentRes" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">User Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Amount $</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topAgentRes']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['UserName']); ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['amount'], 2); ?> </div></td> </tr> <?php } ?> </table> <table id="tblAgentCom" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">User Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Comm $</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topAgentCom']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['UserName']); ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['amount'], 2); ?> </div></td> </tr> <?php } ?> </table> </td> </tr> </table> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => 'HOME-top25Agent', 'title' => 'Top 25 Sales Agents', 'class' => 'box-three box-2 box-green'), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php if (permitted('HOME-top25MCA')) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-top25MCA', 'title' => 'Top 25 MCA Accounts', 'class' => 'box-three box-3 box-green')); $_block_repeat = true; echo smarty_block_mybox(array('node' => 'HOME-top25MCA', 'title' => 'Top 25 MCA Accounts', 'class' => 'box-three box-3 box-green'), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders" align="center"> <select style="width:195px" onchange="statAppChange()" name="statMca"> <option value="Amount" selected>by Funding Amount $</option> <option value="Bal" >by Balance $</option> <option value="Prof" >by Profit $</option> </select> </td> </tr> <tr> <td> <table id="tblMcaAmount" class="myStat25" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">Merchant Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Total $</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topMcaAmount']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['BusinessName']); ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['amount'], 2); ?> </div></td> </tr> <?php } ?> </table> <table id="tblMcaBal" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">Merchant Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Balance $</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topMcaBal']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['BusinessName']); ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['bal'], 2); ?> </div></td> </tr> <?php } ?> </table> <table id="tblMcaProf" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">Merchant Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Amount $</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topMcaProf']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['BusinessName']); ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['profit'], 2); ?> </div></td> </tr> <?php } ?> </table> </td> </tr> </table> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => 'HOME-top25MCA', 'title' => 'Top 25 MCA Accounts', 'class' => 'box-three box-3 box-green'), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php if (permitted('HOME-top10Teamleader')) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-top10Teamleader', 'title' => 'Top 10 Team Leaders', 'class' => 'box-three box-1 box-red')); $_block_repeat = true; echo smarty_block_mybox(array('node' => 'HOME-top10Teamleader', 'title' => 'Top 10 Team Leaders', 'class' => 'box-three box-1 box-red'), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders" align="center"> <select style="width:195px" onchange="statAppChange()" name="statTeamleader"> <option value="Lead" selected>by Leads</option> <option value="Appt" >by Appointments</option> <option value="Sold" >by Sold Leads</option> </select> </td> </tr> <tr> <td> <table id="tblTeamleaderLead" class="myStat25" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">User Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topTeamleaderLead']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo $_smarty_tpl->tpl_vars['item']->value['UserName']; ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0); ?> </div></td> </tr> <?php } ?> </table> <table id="tblTeamleaderAppt" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">User Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topTeamleaderAppt']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo $_smarty_tpl->tpl_vars['item']->value['UserName']; ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0); ?> </div></td> </tr> <?php } ?> </table> <table id="tblTeamleaderSold" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">User Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topTeamleaderSold']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['UserName']); ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0); ?> </div></td> </tr> <?php } ?> </table> </td> </tr> </table> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => 'HOME-top10Teamleader', 'title' => 'Top 10 Team Leaders', 'class' => 'box-three box-1 box-red'), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php if (permitted('HOME-top10Tm')) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-top10Tm', 'title' => 'Top 10 Telemarketers', 'class' => 'box-three box-2 top10box box-red')); $_block_repeat = true; echo smarty_block_mybox(array('node' => 'HOME-top10Tm', 'title' => 'Top 10 Telemarketers', 'class' => 'box-three box-2 top10box box-red'), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders" align="center"> <select style="width:195px" onchange="statAppChange()" name="statTm"> <option value="Lead" selected>by Leads</option> <option value="Appt" >by Appointments</option> <option value="Sold" >by Sold Leads</option> </select> </td> </tr> <tr> <td> <table id="tblTmLead" class="myStat25" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">User Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topTmLead']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo $_smarty_tpl->tpl_vars['item']->value['UserName']; ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0); ?> </div></td> </tr> <?php } ?> </table> <table id="tblTmAppt" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">User Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topTmAppt']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo $_smarty_tpl->tpl_vars['item']->value['UserName']; ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0); ?> </div></td> </tr> <?php } ?> </table> <table id="tblTmSold" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">User Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topTmSold']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['UserName']); ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0); ?> </div></td> </tr> <?php } ?> </table> </td> </tr> </table> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => 'HOME-top10Tm', 'title' => 'Top 10 Telemarketers', 'class' => 'box-three box-2 top10box box-red'), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php if (permitted('HOME-top10Leadcloser')) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-top10Leadcloser', 'title' => 'Top 10 Lead Closers', 'class' => 'box-three box-3 top10box box-red')); $_block_repeat = true; echo smarty_block_mybox(array('node' => 'HOME-top10Leadcloser', 'title' => 'Top 10 Lead Closers', 'class' => 'box-three box-3 top10box box-red'), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders" align="center"> <select style="width:195px" onchange="statAppChange()" name="statLeadcloser"> <option value="Lead" selected>by Leads</option> <option value="Appt" >by Appointments</option> <option value="Sold" >by Sold Leads</option> </select> </td> </tr> <tr> <td> <table id="tblLeadcloserLead" class="myStat25" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">User Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topLeadcloserLead']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo $_smarty_tpl->tpl_vars['item']->value['UserName']; ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0); ?> </div></td> </tr> <?php } ?> </table> <table id="tblLeadcloserAppt" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">User Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topLeadcloserAppt']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo $_smarty_tpl->tpl_vars['item']->value['UserName']; ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0); ?> </div></td> </tr> <?php } ?> </table> <table id="tblLeadcloserSold" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders myDbaHeader">User Name</td> <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td> </tr> <?php echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['topLeadcloserSold']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="<?php echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl); ?> " > <td><div class="myDbaCell"><?php echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['UserName']); ?> </div></td> <td><div class="myAmtCell"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0); ?> </div></td> </tr> <?php } ?> </table> </td> </tr> </table> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => 'HOME-top10Leadcloser', 'title' => 'Top 10 Lead Closers', 'class' => 'box-three box-3 top10box box-red'), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php if (permitted('HOME-NewMerchBoard')) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-NewMerchBoard', 'title' => 'New Merchant Boarding & Underwriting Statistics', 'class' => 'box-one box-yellow')); $_block_repeat = true; echo smarty_block_mybox(array('node' => 'HOME-NewMerchBoard', 'title' => 'New Merchant Boarding & Underwriting Statistics', 'class' => 'box-one box-yellow'), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders"> </td> <td align="right" class="tdListHeaders quickStatCell"><strong>Today</strong></td> <td align="right" class="tdListHeaders quickStatCell"><strong>MTD</strong></td> <td align="right" class="tdListHeaders quickStatCell"><strong>Last Month </strong></td> <td align="right" class="tdListHeaders quickStatCell"><strong>YTD</strong></td> <td align="right" class="tdListHeaders quickStatCell"><strong>Last Year </strong></td> <td align="right" class="tdListHeaders quickStatCell"><strong>Life Time </strong></td> </tr> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['statList']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="trOut"> <td align="left" class="tdValueColumn "><?php echo $_smarty_tpl->tpl_vars['item']->value['statusTitle']; ?> </td> <td class="tdValueColumn quickStatCell"><div align="right"><?php echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntToday']) === null || $tmp === '' ? 0 : $tmp; ?> </div></td> <td class="tdValueColumn quickStatCell"><div align="right"><?php echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntMTD']) === null || $tmp === '' ? 0 : $tmp; ?> </div></td> <td class="tdValueColumn quickStatCell"><div align="right"><?php echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntLastMonth']) === null || $tmp === '' ? 0 : $tmp; ?> </div></td> <td class="tdValueColumn quickStatCell"><div align="right"><?php echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntYTD']) === null || $tmp === '' ? 0 : $tmp; ?> </div></td> <td class="tdValueColumn quickStatCell"><div align="right"><?php echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntLastYear']) === null || $tmp === '' ? 0 : $tmp; ?> </div></td> <td class="tdValueColumn quickStatCell"><div align="right"><?php echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntALL']) === null || $tmp === '' ? 0 : $tmp; ?> </div></td> </tr> <?php } ?> </table> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => 'HOME-NewMerchBoard', 'title' => 'New Merchant Boarding & Underwriting Statistics', 'class' => 'box-one box-yellow'), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php if (permitted('HOME-ApprovedMerch')) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-ApprovedMerch', 'title' => 'Approved Merchants - Bonuses, Commissions, & Lease Funding', 'class' => 'box-one box-green')); $_block_repeat = true; echo smarty_block_mybox(array('node' => 'HOME-ApprovedMerch', 'title' => 'Approved Merchants - Bonuses, Commissions, & Lease Funding', 'class' => 'box-one box-green'), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdListHeaders"> </td> <td align="right" class="tdListHeaders quickStatCell"><strong>Today</strong></td> <td align="right" class="tdListHeaders quickStatCell"><strong>MTD</strong></td> <td align="right" class="tdListHeaders quickStatCell"><strong>Last Month </strong></td> <td align="right" class="tdListHeaders quickStatCell"><strong>YTD</strong></td> <td align="right" class="tdListHeaders quickStatCell"><strong>Last Year </strong></td> <td align="right" class="tdListHeaders quickStatCell"><strong>Life Time </strong></td> </tr> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['statProfList']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <tr class="trOut"> <td align="left" class="tdValueColumn "><?php echo $_smarty_tpl->tpl_vars['item']->value['statusTitle']; ?> </td> <td class="tdValueColumn quickStatCell"><div align="right"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntToday']); ?> </div></td> <td class="tdValueColumn quickStatCell"><div align="right"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntMTD']); ?> </div></td> <td class="tdValueColumn quickStatCell"><div align="right"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntLastMonth']); ?> </div></td> <td class="tdValueColumn quickStatCell"><div align="right"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntYTD']); ?> </div></td> <td class="tdValueColumn quickStatCell"><div align="right"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntLastYear']); ?> </div></td> <td class="tdValueColumn quickStatCell"><div align="right"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntALL']); ?> </div></td> </tr> <?php } ?> </table> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => 'HOME-ApprovedMerch', 'title' => 'Approved Merchants - Bonuses, Commissions, & Lease Funding', 'class' => 'box-one box-green'), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['trafficEmbedUrl']->value) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'test', 'title' => "Daily Traffic Map Report for " . (string) $_smarty_tpl->tpl_vars['trafficEmbedCity']->value . ", " . (string) $_smarty_tpl->tpl_vars['trafficEmbedState']->value, 'class' => 'box-one box-red')); $_block_repeat = true; echo smarty_block_mybox(array('node' => 'test', 'title' => "Daily Traffic Map Report for " . (string) $_smarty_tpl->tpl_vars['trafficEmbedCity']->value . ", " . (string) $_smarty_tpl->tpl_vars['trafficEmbedState']->value, 'class' => 'box-one box-red'), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <iframe style="height: 500px; width: 100%;" src="<?php echo $_smarty_tpl->tpl_vars['trafficEmbedUrl']->value; ?> " marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => 'test', 'title' => "Daily Traffic Map Report for " . (string) $_smarty_tpl->tpl_vars['trafficEmbedCity']->value . ", " . (string) $_smarty_tpl->tpl_vars['trafficEmbedState']->value, 'class' => 'box-one box-red'), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php $_smarty_tpl->tpl_vars['section'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['section']->_loop = false; $_smarty_tpl->tpl_vars['sec_code'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['sections']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['section']->key => $_smarty_tpl->tpl_vars['section']->value) { $_smarty_tpl->tpl_vars['section']->_loop = true; $_smarty_tpl->tpl_vars['sec_code']->value = $_smarty_tpl->tpl_vars['section']->key; ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "HOME-Icons-" . (string) $_smarty_tpl->tpl_vars['sec_code']->value, 'title' => $_smarty_tpl->tpl_vars['section']->value['title'], 'class' => 'box-one box-green')); $_block_repeat = true; echo smarty_block_mybox(array('node' => "HOME-Icons-" . (string) $_smarty_tpl->tpl_vars['sec_code']->value, 'title' => $_smarty_tpl->tpl_vars['section']->value['title'], 'class' => 'box-one box-green'), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <table class="tblIcons" border="0" cellspacing="0" cellpadding="0" width="100%"> <?php $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['row']->_loop = false; $_from = $_smarty_tpl->tpl_vars['section']->value['items3']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['row']->key => $_smarty_tpl->tpl_vars['row']->value) { $_smarty_tpl->tpl_vars['row']->_loop = true; ?> <tr> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['row']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <td><?php if ($_smarty_tpl->tpl_vars['item']->value['img']) { ?> <div class="myicon_home"><a href="javascript:;" onclick="window.location.href='<?php echo $_smarty_tpl->tpl_vars['item']->value['url']; ?> '"><img border="0" src="<?php echo $_smarty_tpl->tpl_vars['item']->value['img']; ?> " /> <div class="title"><?php echo $_smarty_tpl->tpl_vars['item']->value['title']; ?> </div> </a></div> <?php } ?> </td> <?php } ?> </tr> <?php } ?> </table> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => "HOME-Icons-" . (string) $_smarty_tpl->tpl_vars['sec_code']->value, 'title' => $_smarty_tpl->tpl_vars['section']->value['title'], 'class' => 'box-one box-green'), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['leadstorelocatorCode']->value) { $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "home_storelocator", 'title' => "Store Locator by Zip Code", 'class' => "box-one box-blue")); $_block_repeat = true; echo smarty_block_mybox(array('node' => "home_storelocator", 'title' => "Store Locator by Zip Code", 'class' => "box-one box-blue"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <iframe scrolling="no" style='text-align:center;padding:4px;width:100%;height:50px;' frameborder="0" src="/linkcodes.php?cmd=leadstorelocatorCode" OnLoad="var h=this.contentWindow.document.body.scrollHeight+0;this.style.height=h+'px'"></iframe> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => "home_storelocator", 'title' => "Store Locator by Zip Code", 'class' => "box-one box-blue"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php if (permitted('HOME-TopNews')) { $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "home_toparticles", 'title' => "Most Recent News Articles", 'class' => "box-one box-gray")); $_block_repeat = true; echo smarty_block_mybox(array('node' => "home_toparticles", 'title' => "Most Recent News Articles", 'class' => "box-one box-gray"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php echo smarty_function_js_include(array('src' => '/css/articles.css'), $_smarty_tpl); ?> <div class="articles-page"> <div class="container clearfix"> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['articles']->value['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <div class="vid-box <?php echo $_smarty_tpl->tpl_vars['item']->value['color']; ?> " onclick="myRedirect('<?php echo $_smarty_tpl->tpl_vars['item']->value['url']; ?> ')"> <div class="vid"> <?php if ($_smarty_tpl->tpl_vars['item']->value['img']) { ?> <img border="0" order="0" widthX="200" heightX="170" src="<?php echo $_smarty_tpl->tpl_vars['item']->value['img']; ?> " /> <?php } ?> </div> <div class="info"> <div class="title"><?php echo smarty_modifier_truncate(preg_replace('!<[^>]*?>!', ' ', $_smarty_tpl->tpl_vars['item']->value['news']), 100); ?> </div> <div class="cntviews"> Article #<?php echo $_smarty_tpl->tpl_vars['item']->value['news_id']; ?> </div> <div class="date"><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['item']->value['post_date'], "%m/%d/%Y %H:%M %p"); ?> </div> </div> </div> <?php } ?> </div> </div> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => "home_toparticles", 'title' => "Most Recent News Articles", 'class' => "box-one box-gray"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php if (permitted('HOME-TopVideos')) { $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "home_toptrainvideo", 'title' => "Most Recent Training Videos", 'class' => "box-one box-gray")); $_block_repeat = true; echo smarty_block_mybox(array('node' => "home_toptrainvideo", 'title' => "Most Recent Training Videos", 'class' => "box-one box-gray"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php echo smarty_function_js_include(array('src' => '/css/trainingvideo.css'), $_smarty_tpl); ?> <div class="training-vid"> <div class="container"> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['TrainingVideos']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <div class="vid-box <?php echo $_smarty_tpl->tpl_vars['item']->value['color']; ?> " onclick="myRedirect('<?php echo $_smarty_tpl->tpl_vars['item']->value['link']; ?> ')"> <div class="vid"> <img src="http://i1.ytimg.com/vi/<?php echo $_smarty_tpl->tpl_vars['item']->value['youtube_code']; ?> /default.jpg" width="120" height="90" border="0"/> </div> <div class="info"> <div class="title"><?php echo $_smarty_tpl->tpl_vars['item']->value['name']; ?> </div> <div class="cntviews"><?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntViews'], 0); ?> views</div> <div class="date"><?php echo smarty_modifier_date($_smarty_tpl->tpl_vars['item']->value['time_created'], 'datetime'); ?> </div> </div> </div> <?php } ?> </div> </div> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => "home_toptrainvideo", 'title' => "Most Recent Training Videos", 'class' => "box-one box-gray"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> </div> <?php echo '<script'; ?> language="javascript"> mybox_sortableInit('.mySortable.HomePage'); <?php echo '</script'; ?> > <?php echo $_smarty_tpl->tpl_vars['speakpipeCode']->value; ?> <?php echo $_smarty_tpl->tpl_vars['olarkCode']->value; ?> <?php echo $_smarty_tpl->tpl_vars['phpliveCode']->value; ?> <?php }
function content_5778af8a1aae99_91151934($_smarty_tpl) { if (!is_callable('smarty_function_func')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.func.php'; } if (!is_callable('smarty_function_js_include')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php'; } if (!is_callable('smarty_modifier_money')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.money.php'; } if (!is_callable('smarty_block_m')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/block.m.php'; } if (!is_callable('smarty_modifier_date_format')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.date_format.php'; } if (!is_callable('smarty_block_mybox')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/block.mybox.php'; } if (!is_callable('smarty_modifier_date')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.date.php'; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <HTML xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <HEAD> <?php echo '<script'; ?> type="text/javascript" src="/js/init.js"><?php echo '</script'; ?> > <?php echo smarty_function_func(array('name' => 'TplData', 'var' => 'tpldata'), $_smarty_tpl); ?> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <TITLE><?php echo $_smarty_tpl->tpl_vars['PAGETITLE']->value; ?> </TITLE> <?php echo smarty_function_js_include(array('src' => '/css/style.css'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/corp/style_c.css'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/css/tpl_page_template.css'), $_smarty_tpl); ?> <style> <?php if (!permitted('ADMIN-RIGHTS')) { ?> .AdminOnlyVisibility {display:none} <?php } ?> </style> <style> </style> <?php echo smarty_function_js_include(array('src' => '/js/functions.js'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/js/main.js'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/js/jquery-1.9.1.min.js'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/js/jquery-ui-1.11.2/jquery-ui.css'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/js/jquery-ui-1.11.2/jquery-ui.min.js'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/js/bubble.js'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/js/nav.js'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/js/mybox.js'), $_smarty_tpl); ?> <?php echo $_smarty_tpl->getSubTemplate('startup.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php echo '<script'; ?> language="javascript"> function openViewMerchantApp(){ if(confirm('This Customer App Link is for Customers use only. If you are a user, and want to submit an Online Customer App to the corporate office, please go to the "Submit Online App" link')) window.open('/merchant.php?agent_id=<?php echo $_smarty_tpl->tpl_vars['LoginInfo']->value['uid']; ?> '); } <?php echo '</script'; ?> > <?php echo smarty_function_js_include(array('src' => '/corp/favicon.ico'), $_smarty_tpl); ?> <?php echo $_smarty_tpl->getSubTemplate('BodyOnLoad.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php echo '<script'; ?> > $(document).ready(function(){ mybox_sortableNavInit(); var flagSearch=false; $('#mainSearch') .val('search dba or legal business name...') .focus(function(){ if(flagSearch==false){ flagSearch=true; this.value=''; } }); $('#mainSearchBtn').click(function(){ if(flagSearch){ return true; }else{ return false; } }); }); <?php echo '</script'; ?> > </HEAD> <BODY TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0> <div id="page_template"> <table id="xmostOuterTable" cellpadding="0" cellspacing="0" border="0" width="100%" > <tr> <td> <DIV class="header2"> <div class="search-bar"> <form method="get" action="/mainsearch.php"> <input type="text" class="search-field" value="" id="mainSearch" name="q" /> <button type="submit" class="search-button" id="mainSearchBtn"><span class="button-content"></span></button> </form> </div> <div class="toleft"> <a href="/home.php">Welcome <strong><?php echo $_smarty_tpl->tpl_vars['LoginInfo']->value['FullName']; ?> </strong></a> <?php if (permitted('USERS-MyAccount')) { ?> | <a href="/user.php?cmd=edit_user&uid=<?php echo $_smarty_tpl->tpl_vars['LoginInfo']->value['uid']; ?> ">My Account</a> <?php } ?> | <a href="/logout.php">Log Out</a> </div> <div class="toright"> <a href="/support/?tab=manual">Help</a> <?php if (permitted('TOPMENU-Support')) { ?> | <a href="/support.php">Support</a> <?php } ?> <?php if (permitted('SUPPORT-About')) { ?> | <a href="javascript:;" onclick="showPopUp('/site_config.php?cmd=show&code=aboutus',700,700)">About</a> <?php } ?> <?php if (permitted('SUPPORT-Contact')) { ?> | <a href="javascript:;" onclick="showPopUp('/site_config.php?cmd=show&code=contactus',700,700)">Contact</a> <?php } ?> <?php if (permitted('confShowLogo')) { ?> | <a href="/home.php?cmd=hidelogo">Hide Logo</a> <?php } else { ?> | <a href="/home.php?cmd=showlogo">View Logo</a> <?php } ?> </div> </DIV> </td> </tr> <tr> <td> <div class="divOuterTable"> <TABLE BORDER=0 CELLSPACING="0" CELLPADDING="0" width="100%"> <?php if (permitted('confShowLogo')) { ?> <tr> <td > <div align="center"> <a href="/home.php"><img class="block" style="max-width:840px;max-height:113px" src="/corp/<?php echo $_smarty_tpl->tpl_vars['CONFIG']->value['logo_fname']; ?> " border="0"></a> </div> </td> </tr> <?php } ?> <TR > <TD> <DIV id="tabcontainer"> <?php echo $_smarty_tpl->getSubTemplate('menu_bar.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> </DIV> </TD> </TR> <TR > <TD> <DIV id="toplinkscontainer"> <?php $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('', null, 0); ?> <?php if (permitted('ONLINEAPPS-AgentApp')) { ?> <?php echo $_smarty_tpl->tpl_vars['s']->value; $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0); ?> <a href="javascript:;" onClick="window.location.href='/app_manager.php?cmd=add_app&app_id=NEW'">Add Account</a> <?php } ?> <?php if (permitted('ONLINEAPPS-AddLead')) { ?> <?php echo $_smarty_tpl->tpl_vars['s']->value; $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0); ?> <a href="javascript:;" onClick="window.location.href='/leads.php?cmd=add_lead'">Add Lead</a> <?php } ?> <?php if (permitted('ONLINEAPPS-SubmitNewRef')) { ?> <?php echo $_smarty_tpl->tpl_vars['s']->value; $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0); ?> <a href="javascript:;" onClick="window.open('/referral_merch.php?agent_id=<?php echo $_smarty_tpl->tpl_vars['LoginInfo']->value['uid']; ?> ')">Add Referral</a> <?php } ?> <?php if (permitted('ONLINEAPPS-ShopCart')) { ?> <?php echo $_smarty_tpl->tpl_vars['s']->value; $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0); ?> <a href="javascript:;" onClick="window.open('/shoppingcart/')">Shop Cart</a> <?php } ?> <?php if (permitted('ONLINEAPPS-PerfChart')) { ?> <?php echo $_smarty_tpl->tpl_vars['s']->value; $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0); ?> <a href="javascript:;" onClick="window.open('/piechart/')">Perf Charts</a> <?php } ?> <?php if (permitted('ONLINEAPPS-EmailInbox')) { ?> <?php echo $_smarty_tpl->tpl_vars['s']->value; $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0); ?> <a href="javascript:;" onClick="window.open('/mailbox.php?cmd=inbox&mailboxfolder=inbox')">Email (<?php echo $_smarty_tpl->tpl_vars['tpldata']->value['cntMails']; ?> )</a> <?php } ?> <?php if (permitted('ONLINEAPPS-Calendar')) { ?> <?php echo $_smarty_tpl->tpl_vars['s']->value; $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0); ?> <a href="javascript:;" onClick="window.open('/calendar.php?cmd=month')">Calendar</a> <?php } ?> <?php if (permitted('ONLINEAPPS-Search')) { ?> <?php echo $_smarty_tpl->tpl_vars['s']->value; $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0); ?> <a href="javascript:;" onClick="window.location.href='/search.php'">Search Acct & Leads</a> <?php } ?> <?php if (permitted('ONLINEAPPS-MerchantApp')) { ?> <?php echo $_smarty_tpl->tpl_vars['s']->value; $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0); ?> <a href="javascript:;" onClick="openViewMerchantApp()">Web Apps</a> <?php } ?> <?php if (permitted('ONLINEAPPS-Tickets')) { ?> <?php echo $_smarty_tpl->tpl_vars['s']->value; $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0); ?> <a href="javascript:;" onclick="window.location.href='/tickets.php?cmd=list'">Tickets (<?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['tpldata']->value['openTickets'], 0); ?> )</a> <?php } ?> <?php if (permitted('ONLINEAPPS-News')) { ?> <?php echo $_smarty_tpl->tpl_vars['s']->value; $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0); ?> <a href="javascript:;" onclick="window.location.href='/news.php?cmd=view_news'">Unread News (<?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['tpldata']->value['unreadNews'], 0); ?> )</a> <?php } ?> <?php if (permitted('ONLINEAPPS-Projects')) { ?> <?php echo $_smarty_tpl->tpl_vars['s']->value; $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0); ?> <a href="javascript:;" onclick="window.location.href='/projectboard'">Projects</a> <?php } ?> </DIV> </TD> </TR> <?php if (permitted('confShowLoginInfo')) { ?> <TR > <TD ><TABLE class="BlueBar" WIDTH="100%" > <TR> <TD ><?php echo $_smarty_tpl->tpl_vars['CONFIG']->value['SYS_DESC']; ?> <BR> <?php echo $_smarty_tpl->tpl_vars['CONFIG']->value['SYS_ISO']; ?> <BR> <?php $_smarty_tpl->smarty->_tag_stack[] = array('m', array()); $_block_repeat = true; echo smarty_block_m(array(), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> User Support<?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_m(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> : <?php echo $_smarty_tpl->tpl_vars['CONFIG']->value['SYS_SUPPORT']; ?> </TD> <TD valign="top"> <P title="Login time: <?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['LoginInfo']->value['login_time'], '%x %X'); ?> " STYLE="text-align: right;"> <?php $_smarty_tpl->smarty->_tag_stack[] = array('m', array()); $_block_repeat = true; echo smarty_block_m(array(), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> Logged in as User ID<?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_m(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> "<?php echo $_smarty_tpl->tpl_vars['LoginInfo']->value['UserName']; ?> " <?php echo $_smarty_tpl->tpl_vars['LoginInfo']->value['UserType']; ?> <br> <?php echo $_smarty_tpl->tpl_vars['LoginInfo']->value['BusinessName']; ?> <br> <?php echo $_smarty_tpl->tpl_vars['LoginInfo']->value['FullName']; ?> <BR> </P></TD> </TR> </TABLE></TD> </TR> <?php } ?> <TR > <TD> <div align="center"> <?php if ($_smarty_tpl->tpl_vars['contentsWide']->value) { ?> <div style="padding-top:12px;"> <?php echo $_smarty_tpl->tpl_vars['contentsWide']->value; ?> </div> <?php } else { ?> <table class="page_2colTbl" cellspacing="0" border="0"> <!--col class="pagecol_col1a" /> <col class="pagecol_col1" /> <col class="pagecol_col2" /> <col class="pagecol_col3" /> <col class="pagecol_col3a" /--> <tr> <td class="page_col1a mySortable navCol" data-navcol="1"></td> <td class="page_col1 mySortable navCol" data-navcol="2"> <?php if ($_smarty_tpl->tpl_vars['my']->value->lead_alert->isAllowed) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "LeftPanel_alertsdue", 'title' => "Today's Appts/Tasks", 'class' => "box-one box-gray")); $_block_repeat = true; echo smarty_block_mybox(array('node' => "LeftPanel_alertsdue", 'title' => "Today's Appts/Tasks", 'class' => "box-one box-gray"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <a href="javascript:;" onClick="showPopUp('leads.php?cmd=alert_popup',700,500);"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td style='padding:4px'><img class="block" src="../assets/images/icon_warning.png" width="48" height="48" border="0"></td> <td align="center" valign="middle"><span style='font-size:9pt'>Tasks/Appointments <br> Are Due Today</span></td> </tr> </table> </a> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => "LeftPanel_alertsdue", 'title' => "Today's Appts/Tasks", 'class' => "box-one box-gray"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['my']->value->lead_alert->startPopup) { ?> <?php echo '<script'; ?> type="text/javascript">showPopUp('leads.php?cmd=alert_popup',700,500);<?php echo '</script'; ?> > <?php } ?> <?php echo smarty_function_func(array('name' => 'PageLinks', 'col' => 1), $_smarty_tpl); ?> <?php if ($_smarty_tpl->tpl_vars['CONFIG']->value['SYS_SSLLINK']) { ?> <div style='text-align:center;padding-top:8px;'> <a href="<?php echo $_smarty_tpl->tpl_vars['CONFIG']->value['SYS_SSLLINK']; ?> " target="_blank"><img src="/corp/ssl_image.gif" border="0"></a> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['CONFIG']->value['sslCertificateLinkCode']) { ?> <div> <iframe scrolling="no" style='text-align:center;padding:4px;width:100%;height:50px;' frameborder="0" src="/linkcodes.php?cmd=sslCertificateLinkCode" OnLoad="var h=this.contentWindow.document.body.scrollHeight+0;this.style.height=h+'px'"> </iframe> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['CONFIG']->value['sslPciCertificateLinkCode']) { ?> <div> <iframe scrolling="no" style='text-align:center;padding:4px;width:100%;height:50px;' frameborder="0" src="/linkcodes.php?cmd=sslPciCertificateLinkCode" OnLoad="var h=this.contentWindow.document.body.scrollHeight+0;this.style.height=h+'px'"> </iframe> </div> <?php } ?> <?php echo '<script'; ?> > //mybox_sortableInit('.mySortable.c1'); //mybox_sortableInit('.mySortable.LeftPanel.c2'); <?php echo '</script'; ?> > </td> <td class="page_col2"> <?php echo $_smarty_tpl->tpl_vars['contents']->value; ?> </td> <td class="page_col3 mySortable navCol" data-navcol="3"> <?php if (permitted('RIGHTCOLBOX-datetime')) { ?> <?php echo $_smarty_tpl->getSubTemplate("box_datetime.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php } ?> <?php if (permitted('confShowBackup') && permitted('SUPERADMIN-RIGHTS')) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "col3_backup", 'title' => "CRM Backup", 'class' => "box-one box-gray")); $_block_repeat = true; echo smarty_block_mybox(array('node' => "col3_backup", 'title' => "CRM Backup", 'class' => "box-one box-gray"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php echo smarty_function_func(array('name' => 'BackupBoxData', 'var' => 'BackupBoxData'), $_smarty_tpl); ?> <?php if ($_smarty_tpl->tpl_vars['BackupBoxData']->value['showAlert']) { ?> <?php echo smarty_function_js_include(array('src' => '/js/flash_text.js'), $_smarty_tpl); ?> <div id="flashTable1" ><div style='width:100%;border:none' align="center" class="RedFlashText" onClick="window.location.href='/update_corp.php?cmd=backup'" title="Database backed up <?php echo $_smarty_tpl->tpl_vars['BackupBoxData']->value['age']; ?> days ago"> <span class='nobr'>DB Backup Past Due</span></div></div > <?php } ?> <table class="leftNavTable"> <tr class="menuitemsub_k"> <td> Last Backup: <div class="toright"><?php echo smarty_modifier_date($_smarty_tpl->tpl_vars['BackupBoxData']->value['date']); ?> </div> </td> </tr> <tr class="menuitemsub_k"> <td> Version: <div class="toright"><?php echo $_smarty_tpl->tpl_vars['BackupBoxData']->value['db_version']; ?> </div> </td> </tr> <tr class="menuitemsub_k"> <td> Perform Backup <div class="toright"><a href="/update_corp.php?cmd=backup">Start</a></div> </td> </tr> </table> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('node' => "col3_backup", 'title' => "CRM Backup", 'class' => "box-one box-gray"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php echo smarty_function_func(array('name' => 'PageLinks', 'col' => 3), $_smarty_tpl); ?> </td> <td class="page_col3a mySortable navCol" data-navcol="4"></td> </tr> </table> <?php } ?> </div> </TD> </TR> <TR> <TD valign="top" style='width:671px;'></TD> </TR> </TABLE> </div> </td> </tr> <tr> <td><DIV class="footer3"> <div><?php echo $_smarty_tpl->tpl_vars['CONFIG']->value['CopyrightText']; ?> </div> <div><?php echo $_smarty_tpl->tpl_vars['CONFIG']->value['PoweredBy']; ?> </div> </DIV> <DIV class="footer4"> <?php echo $_smarty_tpl->getSubTemplate('footerLinksDiv.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> </DIV> </td> </tr> </table> </div> <?php echo smarty_function_func(array('name' => 'IMCode'), $_smarty_tpl); ?> </BODY> </HTML><?php }
function linkmgmt_tabhandler($object_id) { global $lm_cache; $target = makeHrefProcess(portlist::urlparams('op', 'update')); addJS('js/jquery.jeditable.mini.js'); /* TODO if (permitted (NULL, 'ports', 'set_reserve_comment')) */ /* TODO Link / unlink permissions */ $lm_cache['allowcomment'] = permitted(NULL, NULL, 'set_reserve_comment'); /* RackCode {$op_set_reserve_comment} */ $lm_cache['allowlink'] = permitted(NULL, NULL, 'set_link'); /* RackCode {$op_set_link} */ $lm_cache['allowbacklink'] = permitted(NULL, NULL, 'set_backlink'); /* RackCode {$op_set_backlink} */ //portlist::var_dump_html($lm_cache); /* init jeditable fields/tags */ if ($lm_cache['allowcomment']) { addJS('$(document).ready(function() { $(".editcmt").editable("' . $target . '",{placeholder : "add comment"}); });', TRUE); } if ($lm_cache['allowlink']) { addJS('$(document).ready(function() { $(".editcable").editable("' . $target . '",{placeholder : "edit cableID"}); });', TRUE); } /* linkmgmt for current object */ linkmgmt_renderObjectLinks($object_id); /* linkmgmt for every child */ //$parents = getEntityRelatives ('parents', 'object', $object_id); $children = getEntityRelatives('children', 'object', $object_id); //'entity_id' foreach ($children as $child) { $childobj = spotEntity($child['entity_type'], $child['entity_id']); echo '<h1>Links for Child: ' . $childobj['name'] . '</h1>'; linkmgmt_renderObjectLinks($child['entity_id']); unset($childobj); } return; }
function setPortVLAN() { assertUIntArg('portcount'); try { $data = getSwitchVLANs($_REQUEST['object_id']); } catch (RTGatewayError $re) { return showFuncMessage(__FUNCTION__, 'ERR', array($re->getMessage())); } list($vlanlist, $portlist) = $data; // Here we just build up 1 set command for the gateway with all of the ports // included. The gateway is expected to filter unnecessary changes silently // and to provide a list of responses with either error or success message // for each of the rest. $nports = $_REQUEST['portcount']; $prefix = 'set '; $setcmd = ''; for ($i = 0; $i < $nports; $i++) { genericAssertion('portname_' . $i, 'string'); genericAssertion('vlanid_' . $i, 'string'); if ($_REQUEST['portname_' . $i] != $portlist[$i]['portname']) { throw new InvalidRequestArgException('portname_' . $i, $_REQUEST['portname_' . $i], 'expected to be ' . $portlist[$i]['portname']); } if ($_REQUEST['vlanid_' . $i] == $portlist[$i]['vlanid'] || $portlist[$i]['vlanid'] == 'TRUNK') { continue; } $portname = $_REQUEST['portname_' . $i]; $oldvlanid = $portlist[$i]['vlanid']; $newvlanid = $_REQUEST['vlanid_' . $i]; if (!permitted(NULL, NULL, NULL, array(array('tag' => '$fromvlan_' . $oldvlanid), array('tag' => '$vlan_' . $oldvlanid))) or !permitted(NULL, NULL, NULL, array(array('tag' => '$tovlan_' . $newvlanid), array('tag' => '$vlan_' . $newvlanid)))) { showOneLiner(159, array($portname, $oldvlanid, $newvlanid)); continue; } $setcmd .= $prefix . $portname . '=' . $newvlanid; $prefix = ';'; } // Feed the gateway and interpret its (non)response. if ($setcmd == '') { showOneLiner(201); } else { try { setSwitchVLANs($_REQUEST['object_id'], $setcmd); // shows messages by itself } catch (RTGatewayError $e) { showFuncMessage(__FUNCTION__, 'ERR', array($e->getMessage())); } } }
function copyLotOfObjects() { global $dbxlink; $dbrollback = 0; if (!$dbxlink->beginTransaction()) { throw new RTDatabaseError("can not start transaction"); } // do we need this ? $log = emptyLog(); $taglist = isset($_REQUEST['taglist']) ? $_REQUEST['taglist'] : array(); assertUIntArg('global_type_id', TRUE); assertStringArg('namelist', TRUE); $global_type_id = $_REQUEST['global_type_id']; $source_object_id = $_REQUEST['object_id']; $source_object = spotEntity('object', $source_object_id); amplifyCell($source_object); // only call amplifyCell_object_Backend_Port if we have function linkmgmt_linkPorts from linkmgmt.php if (function_exists('amplifyCell_object_Backend_Port') && function_exists('linkmgmt_linkPorts')) { amplifyCell_object_Backend_Port($source_object); } if ($global_type_id == 0 or !strlen($_REQUEST['namelist'])) { // Log something reasonable with showError Here // We do not have names to copy our object to ! // Pls check what makes $global_type_id == 0 an error $log = mergeLogs($log, oneLiner(186)); return; } // The name extractor below was stolen from ophandlers.php:addMultiPorts() $names1 = explode("\n", $_REQUEST['namelist']); $names2 = array(); foreach ($names1 as $line) { $parts = explode('\\r', $line); reset($parts); if (!strlen($parts[0])) { continue; } else { $names2[] = rtrim($parts[0]); } } foreach ($names2 as $name_or_csv) { $label = ''; $asset_no = ''; $object_name = ''; $regexp = '/^\\"([^\\"]*)\\","([^\\"]*)\\","([^\\"]*)\\"/'; $object_name_or_csv = htmlspecialchars_decode($name_or_csv, ENT_QUOTES); // error_log( "$regexp $object_name" ); if (preg_match($regexp, $object_name_or_csv, $matches)) { $object_name = $matches[1]; $label = $matches[2]; $asset_no = $matches[3]; } else { $object_name = $name_or_csv; } try { $object_id = commitAddObject($object_name, $label, $global_type_id, $asset_no, $taglist); if (!$object_id) { throw new RTDatabaseError("could not create {$object_name}"); } $info = spotEntity('object', $object_id); amplifyCell($info); foreach ($source_object['ports'] as $source_port) { $update_port = 0; foreach ($info['ports'] as $new_port) { if ($new_port['name'] == $source_port['name']) { commitUpdatePort($object_id, $new_port['id'], $new_port['name'], $new_port['oif_id'], $source_port['label'], ""); $update_port = 1; } } if ($update_port) { true; } else { commitAddPort($object_id, $source_port['name'], sprintf("%s-%s", $source_port['iif_id'], $source_port['oif_id']), $source_port['label'], ""); } } // Copy Backendlinks only start if we ghave function linkmgmt_linkPorts from linkmgmt.php if (function_exists('amplifyCell_object_Backend_Port') && function_exists('linkmgmt_linkPorts')) { $info = spotEntity('object', $object_id); amplifyCell($info); amplifyCell_object_Backend_Port($info); /* showError( '<div align="left"><pre>\n===== Source Object ======\n\n' . varDumpToString ( $source_object ) . '\n\n===== New Object ======\n\n' . varDumpToString ( $info ) . '</pre></div>' ); */ $name_by_id = array(); foreach ($info['BackendPorts'] as $new_be_port) { $name_by_id[$new_be_port['name']] = $new_be_port['id']; } $linked_ports = array(); foreach ($source_object['BackendPorts'] as $source_be_port) { if ($source_be_port['object_id'] == $source_be_port['remote_object_id']) { // We have a Port that has the own object as remote object we want to copy this type of Linko // We have backend Links $new_be_port_a = $name_by_id[$source_be_port['name']]; $new_be_port_b = $name_by_id[$source_be_port['remote_name']]; if ($new_be_port_a && $new_be_port_b && !array_key_exists($new_be_port_a, $linked_ports) && !array_key_exists($new_be_port_b, $linked_ports)) { // error_log ( sprintf ('new_be_port_a %s // new_be_port_b %s // cableid %s', $new_be_port_a , $new_be_port_b, $source_be_port['cableid'] )); $ret_val = linkmgmt_linkPorts($new_be_port_a, $new_be_port_b, 'back', $source_be_port['cableid']); // error_log ( sprintf (' linkmgmt_linkPorts ret val: "%s" ', $ret_val)) ; if ($ret_val) { throw new RTDatabaseError("could not copy Backend Links for {$object_name} because: {$ret_val}"); } else { $linked_ports[$new_be_port_a] = True; $linked_ports[$new_be_port_b] = True; } } } } } // Copy attributes foreach (getAttrValues($source_object_id) as $record) { $value = $record['value']; switch ($record['type']) { case 'uint': case 'float': case 'string': $value = $record['value']; break; case 'dict': $value = $record['key']; break; default: } if (permitted(NULL, NULL, NULL, array(array('tag' => '$attr_' . $record['id'])))) { if (empty($value)) { commitUpdateAttrValue($object_id, $record['id']); } else { commitUpdateAttrValue($object_id, $record['id'], $value); } } else { showError('Permission denied, "' . $record['name'] . '" can not be set'); } } //$log = mergeLogs ($log, oneLiner (5, array ('<a href="' . // makeHref (array ('page' => 'object', 'tab' => 'default', 'object_id' => $object_id)) . // '">' . $info['dname'] . '</a>')) //); showSuccess(sprintf("Copied Object %s ; new Object: %s", $source_object['name'], formatPortLink($object_id, $info['dname'], 1, '', ''))); } catch (RTDatabaseError $e) { error_log("rolling back DB"); $dbrollback = 1; $dbxlink->rollBack(); $log = mergeLogs($log, oneLiner(147, array($object_name))); throw new RTDatabaseError($e->getMessage() . sprintf(' (%s)', $name_or_csv)); } } if (!$dbrollback) { $dbxlink->commit(); } // return buildWideRedirectURL ($log); }
$app->post('/diary/entry', function () use($app) { authenticated(); $query = 'INSERT INTO entries (user_id, private, body) VALUES (?,?,?)'; $params = $app->request->params(); $body = ($params['title'] ?: "タイトルなし") . "\n" . $params['content']; db_execute($query, array(current_user()['id'], $params['private'] ? '1' : '0', $body)); $app->redirect('/diary/entries/' . current_user()['account_name']); }); $app->post('/diary/comment/:entry_id', function ($entry_id) use($app) { authenticated(); $entry = db_execute('SELECT * FROM entries WHERE id = ?', array($entry_id))->fetch(); if (!$entry) { abort_content_not_found(); } $entry['is_private'] = $entry['private'] == 1; if ($entry['is_private'] && !permitted($entry['user_id'])) { abort_permission_denied(); } $query = 'INSERT INTO comments (entry_id, user_id, comment) VALUES (?,?,?)'; $params = $app->request->params(); db_execute($query, array($entry['id'], current_user()['id'], $params['comment'])); $app->redirect('/diary/entry/' . $entry['id']); }); $app->get('/footprints', function () use($app) { authenticated(); $query = <<<SQL SELECT user_id, owner_id, DATE(created_at) AS date, MAX(created_at) as updated FROM footprints WHERE user_id = ? GROUP BY user_id, owner_id, DATE(created_at) ORDER BY updated DESC
/** * * Fing tab handler * */ function FingTab($id) { $can_import = permitted(NULL, NULL, 'importFingData'); // // allocation settings // // address allocation code, IPv4 networks view $aac_left = array('regular' => '', 'virtual' => '<span class="aac-left" title="Loopback">L:</span>', 'shared' => '<span class="aac-left" title="Shared">S:</span>', 'router' => '<span class="aac-left" title="Router">R:</span>', 'point2point' => '<span class="aac-left" title="Point-to-point">P:</span>'); // // header // global $pageno, $tabno; $maxperpage = getConfigVar('IPV4_ADDRS_PER_PAGE'); $range = spotEntity('ipv4net', $id); loadIPAddrList($range); echo "<center><h1>{$range['ip']}/{$range['mask']}</h1><h2>{$range['name']}</h2></center>\n"; // // execute fing // try { $known_ips = get_fing_scan($range['ip'], $range['mask']); $fing_cfg = get_fing_settings($range['ip'], $range['mask']); $fing_gw = $fing_cfg["gateway"]; } catch (FingException $e) { render_fing_error("Could not get network scan via fing:", $e->getMessage()); return FALSE; } echo "<table class=objview border=0 width='100%'><tr><td class=pcleft>"; startPortlet('overlook fing (via: ' . $fing_gw . ')'); // // pagination // if (isset($_REQUEST['pg'])) { $page = $_REQUEST['pg']; } else { $page = 0; } $startip = ip4_bin2int($range['ip_bin']); $endip = ip4_bin2int(ip_last($range)); $numpages = 0; if ($endip - $startip > $maxperpage) { $numpages = ($endip - $startip) / $maxperpage; $startip = $startip + $page * $maxperpage; $endip = $startip + $maxperpage - 1; } echo "<center>"; if ($numpages) { echo '<h3>' . ip4_format(ip4_int2bin($startip)) . ' ~ ' . ip4_format(ip4_int2bin($endip)) . '</h3>'; } for ($i = 0; $i < $numpages; $i++) { if ($i == $page) { echo "<b>{$i}</b> "; } else { echo "<a href='" . makeHref(array('page' => $pageno, 'tab' => $tabno, 'id' => $id, 'pg' => $i)) . "'>{$i}</a> "; } } echo "</center>"; if ($can_import) { printOpFormIntro('importFingData', array('addrcount' => $endip - $startip + 1)); $box_counter = 1; } echo "<table class='widetable' border=0 cellspacing=0 cellpadding=5 align='center'>\n"; echo "<tr><th class='tdleft'>address</th><th class='tdleft'>state</th><th class='tdleft'>current name</th><th class='tdleft'>DNS name</th><th class='tdleft'>MAC</th><th class='tdleft'>Allocation</th>"; if ($can_import) { echo '<th>import</th>'; } echo "</tr>\n"; // // Loop through all IPs // $cnt_match = $cnt_missing = $cnt_mismatch = $cnt_total = 0; for ($ip = $startip; $ip <= $endip; $ip++) { $cnt_total++; $print_cbox = FALSE; $ip_bin = ip4_int2bin($ip); $addr = isset($range['addrlist'][$ip_bin]) ? $range['addrlist'][$ip_bin] : array('name' => '', 'reserved' => 'no'); $straddr = ip4_format($ip_bin); list($fing_hostname, $fing_state, $fing_mac_vendor) = get_fing_info($straddr, $known_ips); $ip_is_up = strtoupper($fing_state) == "UP" ? TRUE : FALSE; if ($can_import) { echo "<input type=hidden name=addr_{$cnt_total} value={$straddr}>\n"; echo "<input type=hidden name=descr_{$cnt_total} value={$fing_hostname}>\n"; echo "<input type=hidden name=rsvd_{$cnt_total} value={$addr['reserved']}>\n"; } $skip_dns_check = FALSE; echo "<tr"; // Ignore network and broadcast addresses if ($ip == $startip && $addr['name'] == 'network' || $ip == $endip && $addr['name'] == 'broadcast') { echo " class='trbusy'"; $skip_dns_check = TRUE; } elseif (!$ip_is_up) { echo " class='trnull'"; } // set line color depending if we have the name already in the DB if (!$skip_dns_check) { if ($addr['name'] == $fing_hostname) { if (strlen($fing_hostname)) { echo ' class=trok'; $cnt_match++; } } elseif (!strlen($addr['name']) or !strlen($fing_hostname)) { echo ' class=trwarning'; $print_cbox = TRUE; $cnt_missing++; } else { echo ' class=trerror'; $print_cbox = TRUE; $cnt_mismatch++; } } //IP echo "><td class='tdleft"; if (isset($range['addrlist'][$ip_bin]['class']) and strlen($range['addrlist'][$ip_bin]['class'])) { echo ' ' . $range['addrlist'][$ip_bin]['class']; } echo "'><a href='" . makeHref(array('page' => 'ipaddress', 'ip' => $straddr)) . "'>{$straddr}</a></td>"; //other columns if ($skip_dns_check) { echo "<td class='tdleft'> </td>"; } else { if (!$ip_is_up) { echo "<td class='tdleft'>" . $fing_state . "</td>"; } else { echo "<td class='tdleft'><div class='strong'>" . $fing_state . "</div></td>"; } } echo "<td class=tdleft>{$addr['name']}</td>"; echo "<td class='tdleft'>" . $fing_hostname . "</td>"; echo "<td class='tdleft'>" . $fing_mac_vendor . "</td>"; //allocation echo "<td>"; $delim = ''; if ($addr['reserved'] == 'yes') { echo "<strong>RESERVED</strong> "; $delim = '; '; } foreach ($addr['allocs'] as $ref) { echo $delim . $aac_left[$ref['type']]; echo makeIPAllocLink($ip_bin, $ref, TRUE); $delim = '; '; } if ($delim != '') { $delim = '<br>'; } foreach ($addr['vslist'] as $vs_id) { $vs = spotEntity('ipv4vs', $vs_id); echo $delim . mkA("{$vs['name']}:{$vs['vport']}/{$vs['proto']}", 'ipv4vs', $vs['id']) . '→'; $delim = '<br>'; } foreach ($addr['vsglist'] as $vs_id) { $vs = spotEntity('ipvs', $vs_id); echo $delim . mkA($vs['name'], 'ipvs', $vs['id']) . '→'; $delim = '<br>'; } foreach ($addr['rsplist'] as $rsp_id) { $rsp = spotEntity('ipv4rspool', $rsp_id); echo "{$delim}→" . mkA($rsp['name'], 'ipv4rspool', $rsp['id']); $delim = '<br>'; } echo "</td>"; // import column if ($can_import) { echo '<td>'; if ($print_cbox) { echo "<input type=checkbox name=import_{$cnt_total} id=atom_1_" . $box_counter++ . "_1>"; } else { echo ' '; } echo '</td>'; } echo "</tr>"; } if ($can_import && $box_counter > 1) { echo '<tr><td colspan=4 align=center><input type=submit value="Import selected records"></td><td colspan=2 align=right>'; addJS('js/racktables.js'); echo --$box_counter ? "<a href='javascript:;' onclick=\"toggleColumnOfAtoms(1, 1, {$box_counter})\">(toggle selection)</a>" : ' '; echo '</td></tr>'; } echo "</table>"; if ($can_import) { echo '</form>'; } finishPortlet(); echo "</td><td class=pcright>"; // // PING Statistics // startPortlet('ping stats'); $cnt_ping_up = get_fing_up_count($known_ips); echo "<table border=0 width='100%' cellspacing=0 cellpadding=2>"; echo "<tr class=trok><th class=tdright>Replied to Ping</th><td class=tdleft>{$cnt_ping_up}</td></tr>\n"; echo "<tr class=trwarning><th class=tdright>No Response</th><td class=tdleft>" . ($cnt_total - $cnt_ping_up) . "</td></tr>\n"; echo "</table>\n"; finishPortlet(); // // DNS Statistics // startPortlet('dns stats'); echo "<table border=0 width='100%' cellspacing=0 cellpadding=2>"; echo "<tr class=trok><th class=tdright>Exact matches:</th><td class=tdleft>{$cnt_match}</td></tr>\n"; echo "<tr class=trwarning><th class=tdright>Missing from DB/DNS:</th><td class=tdleft>{$cnt_missing}</td></tr>\n"; if ($cnt_mismatch) { echo "<tr class=trerror><th class=tdright>Mismatches:</th><td class=tdleft>{$cnt_mismatch}</td></tr>\n"; } echo "</table>\n"; finishPortlet(); }
function content_5778b5e1ad9e94_87175621($_smarty_tpl) { if (!is_callable('smarty_function_js_include')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php'; } if (!is_callable('smarty_function_html_options')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.html_options.php'; } if (!is_callable('smarty_function_func')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.func.php'; } if (!is_callable('smarty_modifier_truncate')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.truncate.php'; } if (!is_callable('smarty_modifier_money')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.money.php'; } echo $_smarty_tpl->getSubTemplate('calendar.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php echo smarty_function_js_include(array('src' => '/css/listboxes.css'), $_smarty_tpl); ?> <?php echo '<script'; ?> language="javascript"> function myInit(){ } function myFormSubmit(f){ return true; } function onDel(f){ var dd=document.getElementsByName('sel[]'); var i; var c=0; for(i=0;i<dd.length;i++) if(dd[i].checked) c=1; if(!c){alert('No items selected');return false;} return confirm('Are you sure you want to delete selected items?') } function myExport(){ var s=$('#formFilt').serialize()+'&format=export'; myRedirect('/cashadvance.php?'+s); //formFilt } function myExport1(){ var s=$('#formFilt').serialize()+'&cmd=repcolumns'; myRedirect('/cashadvance.php?'+s); //formFilt } <?php echo '</script'; ?> > <style> .toleft{borderX:solid red 1px;} A.aMCALoan{ font-size:12pt;font-weight:bold} span.spCreditScore{color:red} span.spStatus{color:green;} span.spStatus_Pending{color:red} span.spFundingType{color:green;font-weight:bold} DIV.cashAdvSection{ border:solid #3399FF 1px; margin:10px; width:648px; background: -webkit-gradient(linear, 0 0, 0 bottom, from(#E7F2FA), to(#AAE7FD)); background: -moz-linear-gradient(#E7F2FA, #AAE7FD); background: linear-gradient(#E7F2FA, #AAE7FD); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#E7F2FA, endColorstr=#AAE7FD); } .cashAdvSection .tdLeft{ padding:8px; } .cashAdvSection .tdRight{ padding:8px; } .cashAdvSection table.tblRightBlock TD{ border-bottom:solid #CCCCCC 1px; } </style> <div class="TitleRow"> <div class="toleft"><strong>MCA/Funding Services - <?php if ($_smarty_tpl->tpl_vars['statusTitle']->value) { echo $_smarty_tpl->tpl_vars['statusTitle']->value; } else { ?> All Accounts<?php } ?> </strong></div> <div class="toright"> <?php if (permitted('SUPERADMIN-RIGHTS')) { ?> <input type="button" value="Export" onclickx="myRedirect('<?php echo $_smarty_tpl->tpl_vars['exportLink']->value; ?> ')" onclick="myExport()"/> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate('status/mca_instr.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> </div> <!--add tehila--> <div class="toright"> <input type="button" value="Design Report" onclickx="myRedirect('<?php echo $_smarty_tpl->tpl_vars['exportLink']->value; ?> ')" onclick="myExport1()"/> </div> <!--end tehila--> </div> <TABLE WIDTH="100%"> <TR > <TD align="center" class="tdValueColumn"> <form method="get" id="formFilt"> <input type="hidden" name="cmd" value="cashadv_list" /> <div class="boxLeft"> <div class="fldTitle">Search by Users</div> <select name="owner_uid" onchange="this.form.submit()" style="width:90px"> <option value="">All Users</option> <?php echo smarty_function_html_options(array('options' => $_smarty_tpl->tpl_vars['selUser']->value, 'selected' => $_smarty_tpl->tpl_vars['owner_uid']->value), $_smarty_tpl); ?> </select> </div> <div class="boxLeft"> <div class="fldTitle">Search by Lenders</div> <select name="lender_uid" onchange="this.form.submit()" style="width:90px"> <option value="">All Lenders</option> <?php echo smarty_function_html_options(array('options' => $_smarty_tpl->tpl_vars['selLender']->value, 'selected' => $_smarty_tpl->tpl_vars['lender_uid']->value), $_smarty_tpl); ?> </select> </div> <div class="boxLeft"> <div class="fldTitle">Search by Type</div> <select name="FundingType" onchange="this.form.submit()" style="width:120px"> <option value="">All Funding Types</option> <?php echo smarty_function_html_options(array('options' => $_smarty_tpl->tpl_vars['selFundingType']->value, 'selected' => $_smarty_tpl->tpl_vars['FundingType']->value), $_smarty_tpl); ?> </select> </div> <div class="boxLeft"> <div class="fldTitle">Search Status Level</div> <select name="status" onchange="this.form.submit()" style="width:120px"> <?php echo smarty_function_html_options(array('options' => $_smarty_tpl->tpl_vars['selStatus']->value, 'selected' => $_smarty_tpl->tpl_vars['status']->value), $_smarty_tpl); ?> </select> </div> <!--add tehila <div class="boxLeft"> <div class="fldTitle">titel</div> <div class="toleft"> <input type="button" value="Edit Columns" onclickx="myRedirect('<?php echo $_smarty_tpl->tpl_vars['exportLink']->value; ?> ')" onclick="myExport1()"/> </div> <!--end tehila--> <div class="toright"> <div class="boxLeft"> <div class="fldTitle">Start Date</div> <input class="rep_date" id="date1" type="text" name="date1" value="<?php echo $_smarty_tpl->tpl_vars['date1']->value; ?> " style="width:70px" maxlength="10" onchangeX="this.form.submit()" /> </div> <div class="boxLeft"> <div class="fldTitle">End Date</div> <input class="rep_date" id="date2" type="text" name="date2" value="<?php echo $_smarty_tpl->tpl_vars['date2']->value; ?> " style="width:70px" maxlength="10" onchangeX="this.form.submit()" /> </div> <div class="boxLeft"><div class="fldTitle"> </div> <input type="submit" value="Go" style="width:38px" /> </div> </div> </form> </TD> </TR> <TR > <TD class="tdListNav"><?php echo $_smarty_tpl->tpl_vars['rep']->value['pagerHtml']; ?> </TD> </TR> <?php if ($_smarty_tpl->tpl_vars['AchworksNotifier']->value) { ?> <tr><td><?php echo $_smarty_tpl->tpl_vars['AchworksNotifier']->value; ?> </td></tr> <?php } ?> <TR > <TD class="tdListNav2"><?php if (permitted('ADMIN-RIGHTS')) { ?> <div class="navCheckAll"><input name="checkbox" type="checkbox" title="Check All" onclick="checkAll(this)" /></div><?php } ?> <div class="navSortBy"> <a class="<?php if ($_smarty_tpl->tpl_vars['layout']->value == 1) { ?> disabled<?php } ?> " href="cashadvance.php?cmd=cashadv_list&layout=1">1-Up</a> - <a class="<?php if ($_smarty_tpl->tpl_vars['layout']->value == 3) { ?> disabled<?php } ?> "href="cashadvance.php?cmd=cashadv_list&layout=3">3-Up</a> Sort By: <a href="<?php echo $_smarty_tpl->tpl_vars['rep']->value['this']->orderlink('id'); ?> " class="<?php echo $_smarty_tpl->tpl_vars['rep']->value['this']->orderclass('id'); ?> ">Contract #</a>, <a href="<?php echo $_smarty_tpl->tpl_vars['rep']->value['this']->orderlink('BusinessName'); ?> " class="<?php echo $_smarty_tpl->tpl_vars['rep']->value['this']->orderclass('BusinessName'); ?> ">DBA Name</a>, <a href="<?php echo $_smarty_tpl->tpl_vars['rep']->value['this']->orderlink('date'); ?> " class="<?php echo $_smarty_tpl->tpl_vars['rep']->value['this']->orderclass('date'); ?> ">Date</a>, <a href="<?php echo $_smarty_tpl->tpl_vars['rep']->value['this']->orderlink('status'); ?> " class="<?php echo $_smarty_tpl->tpl_vars['rep']->value['this']->orderclass('status'); ?> ">Status</a> </div></TD> </TR> </TABLE> <form method="post"> <input type="hidden" name="cmd" value="cashadv_del"> <?php if ($_smarty_tpl->tpl_vars['layout']->value == 1) { ?> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['rep']->value['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <?php echo $_smarty_tpl->getSubTemplate('boxes/mca_box.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('item' => $_smarty_tpl->tpl_vars['item']->value), 0); ?> <?php } ?> <?php } else { ?> <div class="appList3up"> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['item']->_loop = false; $_from = $_smarty_tpl->tpl_vars['rep']->value['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->_loop = true; ?> <div class="appListSection appListSection_<?php echo $_smarty_tpl->tpl_vars['item']->value['StatusColor']; ?> 3up"><div class="level2"> <div class="blockContainer"> <?php if (permitted('SUPERADMIN-RIGHTS')) { ?> <input <?php if (!$_smarty_tpl->tpl_vars['item']->value['allowDelete']) { ?> disabled<?php } ?> name="sel[]" value="<?php echo $_smarty_tpl->tpl_vars['item']->value['cashadv_id']; ?> " type="checkbox" /> <?php } ?> <a href="/cashadvance.php?cmd=cashadv_edit&app_id=<?php echo $_smarty_tpl->tpl_vars['app_id']->value; ?> &cashadv_id=<?php echo $_smarty_tpl->tpl_vars['item']->value['cashadv_id']; ?> " class="aMCALoan">MCA Acct # <?php echo $_smarty_tpl->tpl_vars['item']->value['cashadv_idStr']; ?> </a><br /> <strong>DBA:</strong> <span class="spTooltip" onmouseover="tooltip.show('<div style=\'max-width:300px\'><?php echo smarty_function_func(array('name' => 'MCAInfoPopup', 'cashadv_id' => $_smarty_tpl->tpl_vars['item']->value['cashadv_id']), $_smarty_tpl); ?> </div>');" onmouseout="tooltip.hide();"><?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['item']->value['DBAName'], 24, '...', true); ?> </span> <br /> <strong>Owner:</strong> <span title="<?php echo $_smarty_tpl->tpl_vars['item']->value['OwnerName']; ?> "><?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['item']->value['OwnerName'], 24, '...', true); ?> </span><br /> <br /> Funding Type: <span class="spFundingType"> <?php if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'Fixed Daily ACH') { ?> Fixed ACH<?php } ?> <?php if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'MCA') { ?> CC TXN %<?php } ?> <?php if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'LockBox') { ?> LockBox/TXN %<?php } ?> <?php if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'CCFixed') { ?> Fixed + CC<?php } ?> </span> <br /> Funding: $<?php echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['AmountRequested']) === null || $tmp === '' ? 0 : $tmp, 2); ?> <br /> Payback: $<?php echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['TotalPayback']) === null || $tmp === '' ? 0 : $tmp, 2); ?> (<?php echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['PaybackCoeff']) === null || $tmp === '' ? 0 : $tmp; ?> )<br /> <?php if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'Fixed Daily ACH') { ?> Daily ACH: <?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['perfPayments'], 0); ?> of <?php echo $_smarty_tpl->tpl_vars['item']->value['days']; ?> Payments<br /><?php } ?> <?php if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'MCA') { ?> Daily CC: $<?php echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['totalHold']) === null || $tmp === '' ? 0 : $tmp, 2); ?> of $<?php echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['TotalPayback']) === null || $tmp === '' ? 0 : $tmp, 2); ?> <br /><?php } ?> <?php if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'LockBox') { ?> Daily CC: $<?php echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['totalHold']) === null || $tmp === '' ? 0 : $tmp, 2); ?> of $<?php echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['TotalPayback']) === null || $tmp === '' ? 0 : $tmp, 2); ?> <br /><?php } ?> <?php if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'CCFixed') { ?> Daily ACH: <?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['perfPayments'], 0); ?> of <?php echo $_smarty_tpl->tpl_vars['item']->value['days']; ?> Payments<br /> Daily CC: $<?php echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['totalHold']) === null || $tmp === '' ? 0 : $tmp, 2); ?> of $<?php echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['TotalPayback']) === null || $tmp === '' ? 0 : $tmp, 2); ?> <br /> <?php } ?> <br /> <strong>Status:</strong> <span class="spStatus spStatus_<?php echo $_smarty_tpl->tpl_vars['item']->value['Status']; ?> nobr" title="<?php echo $_smarty_tpl->tpl_vars['item']->value['lastNote']; ?> "> <strong><?php echo $_smarty_tpl->tpl_vars['item']->value['statusTitle']; ?> </strong></span> <br /> <strong>Sales Rep:</strong> <span title="<?php echo $_smarty_tpl->tpl_vars['item']->value['UserName']; ?> "><?php echo $_smarty_tpl->tpl_vars['item']->value['UserName']; ?> </span> <br /> Comm: $<?php echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['RepComm']) === null || $tmp === '' ? 0 : $tmp, 2); ?> </div> </div> </div> <?php } ?> </div> <?php } ?> <?php if (permitted('SUPERADMIN-RIGHTS')) { ?> <TABLE WIDTH="100%"> <tr class="trSubmitBar"> <td> <input name="btnDelete" type="submit" onclick="return onDel(this.form)" value="Delete" /></td> </tr> </TABLE> <?php } ?> </form> <?php echo '<script'; ?> type="text/javascript"> Calendar.setup({ inputField : "date1", // id of the input field ifFormat : "%m/%d/%Y",//"%Y-%m-%d", // %H:%M", // format of the input field showsTime : true, // will display a time selector button : "date1", // trigger for the calendar (button ID) singleClick : true, // double-click mode step : 1 // show all years in drop-down boxes (instead of every other year as default) }); Calendar.setup({ inputField : "date2", // id of the input field ifFormat : "%m/%d/%Y",//"%Y-%m-%d", // %H:%M", // format of the input field showsTime : true, // will display a time selector button : "date2", // trigger for the calendar (button ID) singleClick : true, // double-click mode step : 1 // show all years in drop-down boxes (instead of every other year as default) }); <?php echo '</script'; ?> > <?php }
function assertPermission($p = NULL, $t = NULL, $o = NULL, $annex = array()) { if (!permitted($p, $t, $o, $annex)) { throw new RTPermissionDenied(); } }
function localfunc_PortGenerator() { global $errorText, $lookFor, $portList, $genText, $valueConfiguration, $searchIt; assertUIntArg('object_id', __FUNCTION__); $object = spotEntity('object', $_REQUEST['object_id']); startPortlet("Port generator"); print "<center><br>"; if (!localverify_PortGenerator($object)) { // // Autoport configuration did not work. Show this and show the error // print "{$lookFor} : Error\n"; if (isset($errorText)) { print $errorText; } } else { // // Show the list of ports that will be generated and provide a link to actually do so // print "<a href='" . makeHrefProcess(array('op' => 'addports', 'page' => 'object', 'object_id' => $object['id'], 'tab' => 'ports')) . "'>Generate the ports for <b>{$object['name']}</b> as listed below NOW</a><br>\n"; print $genText . "<p>"; print "<table cellspacing=0 cellpadding='5' align='center' class='widetable'>"; print "<tr><th>Port name </th><th>Port label </th><th>Port type</th></tr>\n"; foreach ($portList as $aPort) { print "<tr><td>{$aPort['name']}</td><td>{$aPort['label']}</td><td>{$aPort['port_name']}</td></tr>\n"; } print "</table>"; } print "<br></center>"; finishPortlet(); // // Check whether the user is allowed to do an update of the port configurator // // if you do not want this, make sure you add a // deny {$op_updateportgenerator} // for the apprioriate groups (or any allow first and deny for the rest // if (permitted('object', 'portgenerator', null, array(array('tag' => '$op_updateportgenerator')))) { startPortlet("Update autoport configuration"); // // Description of the config rules // print "<center>"; print $genText . "<p>\n"; print "<b>USAGE</b><br><br>"; print "<list1>;<list2>;.... where <listx> is<br>"; print "<start port #>|<port count, use %n for number of ports>|"; print "<port name, use %u for number>|[<port innerinterface id>-]<port type id>[|<port label, use %u for number>]<br><br>"; print "<b>EXAMPLE (for Force10 S4810)</b><br><br>0|48|%u|9-1084|TenGigabitEthernet0/%u;48|4|%u|10-1588|FortyGigE0/48;52|4|%u|10-1588|FortyGigE0/52;56|4|%u|10-1588|FortyGigE0/56;60|4|%u|10-1588|FortyGigE0/60;1|1|RS-232|29|Serial port;1|1|Ethernet|24|ManagementEthernet0/%u;1|2|AC%u|16<br><br>"; print "<b>EXPLANATION (for AC-in ports)</b><br><br> <b>1</b> = starting number,\n <b>2</b> = number of generated ports, \n <b>AC%u</b> = will begin with <b>starting number</b> and create up to the <b>number of generated ports</b>, \n <b>16</b> = the value displayed on the chart below <b>in bold</b> (Notice: Default innerinterface ID is 1 /hardwired/, so the realy value is <b>1-16</b>)<br><br>"; //explains example print "<b>PLEASE NOTE</b><br><br> If you do not add the port that is selected <b>(dictionary value)</b> to the default list in the <b>Ports</b> Tab, \n you will get a <b>foriegn key violation</b> error. \n You must go to the <b>Configuration</b> area on the main page, go to <b>Enable port types</b>\n and hit the <b>Edit</b> tab to place the selected port in either <b>GBIC</b>, <b>hardwired</b>, or any other configuration \n on the page so that the error is not recieved.<br><br><br>"; //Very important to have a sucessful implementation of port generator // // The form that can update the configuration // On top of the table of ports avialabe instead of beneath it // printOpFormIntro('updateportgenerator', array('yId' => $searchIt)); print "<b>Autoport Configuration:</b><br><br><input type='text' style='width:100%; font-size: 16px' name='yConfig' value='"; if ($valueConfiguration) { print $valueConfiguration[0]; } print "'><br><br>\n"; print "<input type='submit' name='autoportconfig' value='"; if ($valueConfiguration) { print "Update"; } else { print "Create"; } print "'>\n"; print "</form>\n"; print "</center><br>"; print "<table border='2' rules=all>\n<tr class=row_odd>"; $isfirst = true; $i = 0; // // List all available port types with their dictionary key // $q = "SELECT IF(iif_id,CONCAT(i.id,'-',o.id),o.id) as ID , IF(iif_id,CONCAT(i.iif_name,' => ',o.oif_name),o.oif_name) as name FROM PortOuterInterface o left join PortInterfaceCompat c on o.id = c.oif_id left join PortInnerInterface i on c.iif_id = i.id order by i.id,o.id"; $result = usePreparedSelectBlade($q); //Changed for new configeration in versions after 0.17.x if ($result == NULL) { print_r($dbxlink->errorInfo()); die; } while ($row4 = $result->fetch(PDO::FETCH_NUM)) { if (!$isfirst && $i % 10 == 0) { print "</td></tr>\n<tr class=" . ($i % 4 == 0 ? "row_odd" : "row_even") . ">"; } else { $isfirst = false; } print "<td><b>{$row4[0]}</b><br>"; //seperated values to make them easier to read print "{$row4[1]}\n</td>"; $i++; } print "</td>\n"; print "</tr></table>\n"; finishPortlet(); } }
function renderVLANMembership($object_id) { try { $data = getSwitchVLANs($object_id); } catch (RTGatewayError $re) { showWarning('Device configuration unavailable:<br>' . $re->getMessage()); return; } list($vlanlist, $portlist, $maclist) = $data; $vlanpermissions = array(); foreach ($portlist as $port) { if (array_key_exists($port['vlanid'], $vlanpermissions)) { continue; } $vlanpermissions[$port['vlanid']] = array(); foreach (array_keys($vlanlist) as $to) { if (permitted(NULL, NULL, 'setPortVLAN', array(array('tag' => '$fromvlan_' . $port['vlanid']), array('tag' => '$vlan_' . $port['vlanid']))) and permitted(NULL, NULL, 'setPortVLAN', array(array('tag' => '$tovlan_' . $to), array('tag' => '$vlan_' . $to)))) { $vlanpermissions[$port['vlanid']][] = $to; } } } if (isset($_REQUEST['hl_port_id'])) { assertUIntArg('hl_port_id'); $hl_port_id = intval($_REQUEST['hl_port_id']); $object = spotEntity('object', $object_id); amplifyCell($object); foreach ($object['ports'] as $port) { if (mb_strlen($port['name']) && $port['id'] == $hl_port_id) { $hl_port_name = $port['name']; break; } } } echo '<table border=0 width="100%"><tr><td colspan=3>'; startPortlet('Current status'); echo "<table class=widetable cellspacing=3 cellpadding=5 align=center width='100%'><tr>"; printOpFormIntro('setPortVLAN'); $portcount = count($portlist); echo "<input type=hidden name=portcount value=" . $portcount . ">\n"; $portno = 0; $ports_per_row = 12; foreach ($portlist as $port) { // Don't let wide forms break our fancy pages. if ($portno % $ports_per_row == 0) { if ($portno > 0) { echo "</tr>\n"; } echo "<tr><th>" . ($portno + 1) . "-" . ($portno + $ports_per_row > $portcount ? $portcount : $portno + $ports_per_row) . "</th>"; } $td_class = 'port_'; if ($port['status'] == 'notconnect') { $td_class .= 'notconnect'; } elseif ($port['status'] == 'disabled') { $td_class .= 'disabled'; } elseif ($port['status'] != 'connected') { $td_class .= 'unknown'; } elseif (!isset($maclist[$port['portname']])) { $td_class .= 'connected_none'; } else { $maccount = 0; foreach ($maclist[$port['portname']] as $vlanid => $addrs) { $maccount += count($addrs); } if ($maccount == 1) { $td_class .= 'connected_single'; } else { $td_class .= 'connected_multi'; } } if (isset($hl_port_name) and strcasecmp($hl_port_name, $port['portname']) == 0) { $td_class .= (strlen($td_class) ? ' ' : '') . 'border_highlight'; } echo "<td class='{$td_class}'>" . $port['portname'] . '<br>'; echo "<input type=hidden name=portname_{$portno} value=" . $port['portname'] . '>'; if ($port['vlanid'] == 'trunk') { echo "<input type=hidden name=vlanid_{$portno} value='trunk'>"; echo "<select disabled multiple='multiple' size=1><option>TRUNK</option></select>"; } elseif ($port['vlanid'] == 'routed') { echo "<input type=hidden name=vlanid_{$portno} value='routed'>"; echo "<select disabled multiple='multiple' size=1><option>ROUTED</option></select>"; } elseif (!array_key_exists($port['vlanid'], $vlanpermissions) or !count($vlanpermissions[$port['vlanid']])) { echo "<input type=hidden name=vlanid_{$portno} value={$port['vlanid']}>"; echo "<select disabled name=vlanid_{$portno}>"; echo "<option value={$port['vlanid']} selected>{$port['vlanid']}</option>"; echo "</select>"; } else { echo "<select name=vlanid_{$portno}>"; // A port may belong to a VLAN, which is absent from the VLAN table, this is normal. // We must be able to render its SELECT properly at least. $in_table = FALSE; foreach ($vlanpermissions[$port['vlanid']] as $v) { echo "<option value={$v}"; if ($v == $port['vlanid']) { echo ' selected'; $in_table = TRUE; } echo ">{$v}</option>\n"; } if (!$in_table) { echo "<option value={$port['vlanid']} selected>{$port['vlanid']}</option>\n"; } echo "</select>"; } $portno++; echo "</td>"; } echo "</tr><tr><td colspan=" . ($ports_per_row + 1) . "><input type=submit value='Save changes'></form></td></tr></table>"; finishPortlet(); echo '</td></tr><tr><td class=pcleft>'; startPortlet('VLAN table'); echo '<table class=cooltable cellspacing=0 cellpadding=5 align=center width="100%">'; echo "<tr><th>ID</th><th>Description</th></tr>"; $order = 'even'; global $nextorder; foreach ($vlanlist as $id => $descr) { echo "<tr class=row_{$order}><td class=tdright>{$id}</td><td class=tdleft>{$descr}</td></tr>"; $order = $nextorder[$order]; } echo '</table>'; finishPortlet(); echo '</td><td class=pcright>'; startPortlet('Color legend'); echo '<table>'; echo "<tr><th>port state</th><th>color code</th></tr>"; echo "<tr><td>not connected</td><td class=port_notconnect>SAMPLE</td></tr>"; echo "<tr><td>disabled</td><td class=port_disabled>SAMPLE</td></tr>"; echo "<tr><td>unknown</td><td class=port_unknown>SAMPLE</td></tr>"; echo "<tr><td>connected with none MAC addresses active</td><td class=port_connected_none>SAMPLE</td></tr>"; echo "<tr><td>connected with 1 MAC addresses active</td><td class=port_connected_single>SAMPLE</td></tr>"; echo "<tr><td>connected with 1+ MAC addresses active</td><td class=port_connected_multi>SAMPLE</td></tr>"; echo '</table>'; finishPortlet(); echo '</td><td class=pcright>'; if (count($maclist)) { startPortlet('MAC address table'); echo '<table border=0 class=cooltable align=center cellspacing=0 cellpadding=5>'; echo "<tr><th>Port</th><th>VLAN ID</th><th>MAC address</th></tr>\n"; $order = 'even'; foreach ($maclist as $portname => $portdata) { foreach ($portdata as $vlanid => $addrgroup) { foreach ($addrgroup as $addr) { echo "<tr class=row_{$order}><td class=tdleft>{$portname}</td><td class=tdleft>{$vlanid}</td>"; echo "<td class=tdleft>{$addr}</td></tr>\n"; $order = $nextorder[$order]; } } } echo '</table>'; finishPortlet(); } // End of main table. echo '</td></tr></table>'; }
function content_5778af75b80ee4_55191464($_smarty_tpl) { if (!is_callable('smarty_function_js_include')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php'; } if (!is_callable('smarty_block_m')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/block.m.php'; } if (!is_callable('smarty_block_mybox')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/block.mybox.php'; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <HTML> <HEAD> <?php echo '<script'; ?> type="text/javascript" src="/js/init.js"><?php echo '</script'; ?> > <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <TITLE><?php echo $_smarty_tpl->tpl_vars['PAGETITLE']->value; ?> </TITLE> <?php echo smarty_function_js_include(array('src' => '/css/style.css'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/corp/style_c.css'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/js/functions.js'), $_smarty_tpl); ?> <?php echo smarty_function_js_include(array('src' => '/js/jquery-1.9.1.min.js'), $_smarty_tpl); ?> <?php echo $_smarty_tpl->getSubTemplate('startup.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php echo smarty_function_js_include(array('src' => '/corp/favicon.ico'), $_smarty_tpl); ?> <style> #LoginButton a:hover img{ filter: alpha(opacity:70);opacity: 0.7;moz-opacity : 0.7; khtml-opacity : 0.7; } #UserName, #Password, #TOS, #LoginButton, #PasswordReset{ margin-bottom:10px; } #LoginButton img{width:127px;height:25px;} input#loginid, input#password{ font-size:12pt; width:123px; } #IPAddress{border-top:solid #999999 1px;padding-top:5px} </style> <?php echo '<script'; ?> language="javascript"> function loginClick(){ if(el('cbAgree') && !el('cbAgree').checked){ alert('You must agree to TOS first'); return false; } document.loginForm.submit(); } <?php echo '</script'; ?> > <?php echo $_smarty_tpl->getSubTemplate('BodyOnLoad.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> </HEAD> <BODY TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0> <div id="mostOuterDiv"> <table id="mostOuterTable" cellpadding="0" cellspacing="0" border="0"> <tr> <td> <DIV class="header2"> <table class="topLinksBar" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left"> CRM Merchant Management Software<a href="/logout.php"></a></td> <td align="right"> Leads. Sales. Profits. Success. </td> </tr></table> </DIV> </td> </tr> <tr> <td> <div class="divOuterTable"> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 width="100%"> <?php if (permitted('confShowLogo')) { ?> <TR valign="top" ALIGN=LEFT> <TD style='padding:0px' > <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div align="center"><a href="/home.php"><img class="block" style='' src="/corp/<?php echo $_smarty_tpl->tpl_vars['CONFIG']->value['logo_fname']; ?> " border=0 id="Picture46"></a></div></td> </tr> </table> </TD> </TR> <?php } ?> <TR valign="top" ALIGN=LEFT> <TD > <DIV id="toplinkscontainer"> <?php $_smarty_tpl->smarty->_tag_stack[] = array('m', array()); $_block_repeat = true; echo smarty_block_m(array(), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> Welcome to<?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_m(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php echo $_smarty_tpl->tpl_vars['CONFIG']->value['SYS_DESC']; ?> </DIV> </TD> </TR> <TR valign="top" ALIGN=LEFT> <TD > <div align="center"> <TABLE class="page_2colTbl" cellspacing="0"> <col class="pagecol_col1" /> <col class="pagecol_col2" /> <col class="pagecol_col3" /> <TR> <TD class="page_col1"> <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('title' => "User Login", 'node' => '', 'class' => "box-gray")); $_block_repeat = true; echo smarty_block_mybox(array('title' => "User Login", 'node' => '', 'class' => "box-gray"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=0 NOF=TE> <TR> <TD ALIGN="CENTER"> <TABLE ID="Table6" BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%"> <FORM NAME="loginForm" action="/login.php" METHOD=POST> <COLGROUP> <COL WIDTH="100%"> </COLGROUP> <TR> <TD WIDTH="100%" align="center" STYLE="padding: 5px;"> <div id="UserName"> <div class="fldTitle">User Name</div> <input id="loginid" type="text" name="loginid" value="<?php echo $_smarty_tpl->tpl_vars['username']->value; ?> " size=16 maxlength=50> </div> <div id="Password"> <div class="fldTitle">Password</div> <input id="password" type="password" name="password" autocomplete="on" value="" size=16 onkeyup="if(event.keyCode==13) this.form.submit()" > </div> <?php if (!$_smarty_tpl->tpl_vars['loginoptHideTOS']->value) { ?> <div id="TOS"> <span class="alike"><input type="checkbox" name="cbAgree" id="cbAgree" onClick="el('fLogin').disabled=!this.checked"></span> <a href="javascript:void(0);" onClick="myFooterPopup('footerTerms');return false;">Agree to TOS</a> </div> <?php } ?> <div id="LoginButton"> <input type="button" value="Login" onclick="loginClick()" /> <div> <?php if (!$_smarty_tpl->tpl_vars['loginoptHidePwdreset']->value) { ?> <div id="PasswordReset"> <a href="#" onClick="document.getElementById('pwdreminderTbl').style.display='';return false"><?php $_smarty_tpl->smarty->_tag_stack[] = array('m', array()); $_block_repeat = true; echo smarty_block_m(array(), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> Forgot Password?<?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_m(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> </a> </div> <?php } ?> </TD> </TR> </FORM> </TABLE> </TD> </TR> </TABLE> <TABLE ID="pwdreminderTbl" style='display:none' BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%"> <FORM NAME="LAYOUTFORM" action="/login.php" METHOD=POST> <COLGROUP> <COL WIDTH="100%"> </COLGROUP> <TR> <TD WIDTH="100%" STYLE="padding: 5px;"> <P STYLE="text-align: center;"><?php $_smarty_tpl->smarty->_tag_stack[] = array('m', array()); $_block_repeat = true; echo smarty_block_m(array(), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> Username or Email<?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_m(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> </P> </TD> </TR> <TR> <TD WIDTH="100%" align="center" STYLE="padding: 5px;"> <SPAN class="xx-small"> <input id="loginid" type="text" name="RecoverString" value="" size=16 maxlength=50> </SPAN> </TD> </TR> <TR> <TD WIDTH="100%" HEIGHT=34 align="center" valign="middle" STYLE="padding: 5px;"> <input type="submit" name="RequestPwdButton" value="<?php $_smarty_tpl->smarty->_tag_stack[] = array('m', array()); $_block_repeat = true; echo smarty_block_m(array(), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> Request<?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_m(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> " > </TD> </TR> </FORM> </TABLE> <div id="IPAddress" align="center"><span class="alike"><?php $_smarty_tpl->smarty->_tag_stack[] = array('m', array()); $_block_repeat = true; echo smarty_block_m(array(), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> Your IP Address is:<?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_m(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <br><?php echo $_smarty_tpl->tpl_vars['CurrentIP']->value; ?> </span><br /> <br /> </div> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('title' => "User Login", 'node' => '', 'class' => "box-gray"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php if ($_smarty_tpl->tpl_vars['CONFIG']->value['SYS_SSLLINK']) { ?> <div style='text-align:center;padding-top:8px;'> <a href="<?php echo $_smarty_tpl->tpl_vars['CONFIG']->value['SYS_SSLLINK']; ?> " target="_blank"><img src="/corp/ssl_image.gif" border="0"></a> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['CONFIG']->value['sslCertificateLinkCode']) { ?> <div style='text-align:center;padding-top:8px;'> <?php echo $_smarty_tpl->tpl_vars['CONFIG']->value['sslCertificateLinkCode']; ?> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['CONFIG']->value['sslPciCertificateLinkCode']) { ?> <div style='text-align:center;padding-top:8px;'> <?php echo $_smarty_tpl->tpl_vars['CONFIG']->value['sslPciCertificateLinkCode']; ?> </div> <?php } ?> </TD> <TD class="page_col2" > <?php $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('title' => "Welcome", 'node' => '', 'class' => "box-gray")); $_block_repeat = true; echo smarty_block_mybox(array('title' => "Welcome", 'node' => '', 'class' => "box-gray"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <div style="padding:8px;font-family: Verdana; font-size: 10pt;"> <?php if ($_smarty_tpl->tpl_vars['disableLogin']->value) { ?> <div style='color:red;border:red dashed 1px;padding:4px'> Our CRM system is down for maintenance and will be available soon. We are sorry for the inconvenience. Please contact us if you have any questions. </div> <?php } else { ?> <SPAN ><?php echo $_smarty_tpl->tpl_vars['LoginPageText']->value; ?> </SPAN> <?php } ?> </div> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_mybox(array('title' => "Welcome", 'node' => '', 'class' => "box-gray"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> </TD> <td class="page_col3"> <?php echo $_smarty_tpl->getSubTemplate("box_datetime.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> </td> </TR> </TABLE> </div> </TD> </TR> </TABLE> </div> </td> </tr> <tr> <td><DIV class="footer3"> <div><?php echo $_smarty_tpl->tpl_vars['CONFIG']->value['CopyrightText']; ?> </div> <div><?php echo $_smarty_tpl->tpl_vars['CONFIG']->value['PoweredBy']; ?> </div> </DIV> <DIV class="footer4"> <?php echo $_smarty_tpl->getSubTemplate('footerLinksDiv.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> </DIV> </td> </tr> </table> </div> <?php echo $_smarty_tpl->tpl_vars['speakpipeCode']->value; ?> <?php echo $_smarty_tpl->tpl_vars['olarkCode']->value; ?> <?php echo $_smarty_tpl->tpl_vars['phpliveCode']->value; ?> <?php echo $_smarty_tpl->tpl_vars['custom_body_end_html']->value; ?> </BODY> </HTML><?php }
function createIPv6Prefix($range = '', $name = '', $is_connected = FALSE, $taglist = array(), $vlan_ck = NULL) { // $range is in aaa0:b::c:d/x format, split into ip/mask vars $rangeArray = explode('/', $range); if (count($rangeArray) != 2) { throw new InvalidRequestArgException('range', $range, 'Invalid IPv6 prefix'); } $ip = $rangeArray[0]; $mask = $rangeArray[1]; $net = constructIPRange(ip6_parse($ip), $mask); usePreparedInsertBlade('IPv6Network', array('ip' => $net['ip_bin'], 'last_ip' => ip_last($net), 'mask' => $mask, 'name' => $name)); $network_id = lastInsertID(); # RFC3513 2.6.1 - Subnet-Router anycast if ($is_connected) { updateV6Address($net['ip_bin'], 'Subnet-Router anycast', 'yes'); } produceTagsForNewRecord('ipv6net', $taglist, $network_id); if ($vlan_ck != NULL) { $ctx = getContext(); fixContext(spotEntity('ipv6net', $network_id)); if (permitted('ipv6net', '8021q', 'bind')) { commitSupplementVLANIPv6($vlan_ck, $network_id); } restoreContext($ctx); } return $network_id; }
function content_5778b6e5dfdd32_08076555($_smarty_tpl) { if (!is_callable('smarty_function_func')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.func.php'; } ?> <div class="TitleRow"> <?php echo $_smarty_tpl->tpl_vars['title']->value; ?> <div class="toright"> <?php if (!$_smarty_tpl->tpl_vars['hideMCAHeaderButtons']->value) { ?> <?php if (permitted('TOPMENU-Status')) { ?> <input type="button" value="MCA" disabled onclick="myRedirect('/')"/> <input type="button" value="Processing" onclick="myRedirect('/apps_status.php?cmd=edit_app&app_id=<?php echo $_smarty_tpl->tpl_vars['linked_app_id']->value; ?> ')"/> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate('status/mca_instr.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php } ?> </div> </div> <table width="100%"> <TR > <TD class="tdGtabs"> <?php echo $_smarty_tpl->getSubTemplate('gtabs.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('gtabs' => $_smarty_tpl->tpl_vars['gtabs']->value), 0); ?> </TD> </TR> <TR > <TD > <?php echo $_smarty_tpl->getSubTemplate('tab_links.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tab_links' => $_smarty_tpl->tpl_vars['tab_links']->value), 0); ?> </TD> </TR> <tr > <td class="tdValueColumn"> <div class="toleft"> <span class="spTooltip" onmouseover="tooltip.show('<?php echo smarty_function_func(array('name' => 'MCAInfoPopup', 'cashadv_id' => $_smarty_tpl->tpl_vars['cashadv_id']->value), $_smarty_tpl); ?> ');" onmouseout="tooltip.hide();"></span> <span class="spMCALoan"><strong>MCA/ACH Acct #</strong> <?php echo $_smarty_tpl->tpl_vars['cashadv_idStr']->value; echo $_smarty_tpl->tpl_vars['cashadv_idModifier']->value; ?> </span> </div> <div class="toright"> <?php if (!$_smarty_tpl->tpl_vars['hideMCAHeaderButtons']->value) { ?> <?php if (permitted('TOPMENU-Status')) { ?> <strong>DBA:</strong> <span class="spTooltip" onmouseover="tooltip.show('<div style=\'max-width:300px\'><?php echo smarty_function_func(array('name' => 'DBAInfoPopup', 'app_id' => $_smarty_tpl->tpl_vars['linked_app_id']->value), $_smarty_tpl); ?> </div>');" onmouseout="tooltip.hide();"> <a href="/apps_status.php?cmd=edit_app&app_id=<?php echo $_smarty_tpl->tpl_vars['linked_app_id']->value; ?> "><?php echo $_smarty_tpl->tpl_vars['BusinessName']->value; ?> </a></span> - <strong>MID#</strong> <a href="/apps_status.php?cmd=edit_app&app_id=<?php echo $_smarty_tpl->tpl_vars['app_id']->value; ?> "><?php echo ($tmp = @$_smarty_tpl->tpl_vars['MID']->value) === null || $tmp === '' ? '(Not Available)' : $tmp; ?> </a> </span> <?php } else { ?> <strong>DBA:</strong> <span class="spTooltip" onmouseover="tooltip.show('<div style=\'max-width:300px\'><?php echo smarty_function_func(array('name' => 'DBAInfoPopup', 'app_id' => $_smarty_tpl->tpl_vars['linked_app_id']->value), $_smarty_tpl); ?> </div>');" onmouseout="tooltip.hide();"> <a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=dba"><?php echo $_smarty_tpl->tpl_vars['BusinessName']->value; ?> </a></span> - <strong>MID#</strong> <a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php echo $_smarty_tpl->tpl_vars['cashadv_id']->value; ?> &tab=dba"><?php echo ($tmp = @$_smarty_tpl->tpl_vars['MID']->value) === null || $tmp === '' ? '(Not Available)' : $tmp; ?> </a> </span> <?php } ?> <?php } ?> </div> </td> </tr> </table> <?php }
function updateObjectAttributes($object_id) { global $dbxlink; $type_id = getObjectType($object_id); $oldvalues = getAttrValues($object_id); $num_attrs = isset($_REQUEST['num_attrs']) ? $_REQUEST['num_attrs'] : 0; for ($i = 0; $i < $num_attrs; $i++) { genericAssertion("{$i}_attr_id", 'uint'); $attr_id = $_REQUEST["{$i}_attr_id"]; if (!array_key_exists($attr_id, $oldvalues)) { throw new InvalidRequestArgException('attr_id', $attr_id, 'malformed request'); } $value = $_REQUEST["{$i}_value"]; // If the object is a rack, skip certain attributes as they are handled elsewhere // (height, sort_order) if ($type_id == 1560 and ($attr_id == 27 or $attr_id == 29)) { continue; } // Delete attribute and move on, when the field is empty or if the field // type is a dictionary and it is the "--NOT SET--" value of 0. if ($value == '' || $oldvalues[$attr_id]['type'] == 'dict' && $value == 0) { if (permitted(NULL, NULL, NULL, array(array('tag' => '$attr_' . $attr_id)))) { commitUpdateAttrValue($object_id, $attr_id); } else { showError('Permission denied, "' . $oldvalues[$attr_id]['name'] . '" left unchanged'); } continue; } // The value could be uint/float, but we don't know ATM. Let SQL // server check this and complain. if ('date' == $oldvalues[$attr_id]['type']) { $value = assertDateArg("{$i}_value"); } else { assertStringArg("{$i}_value"); } switch ($oldvalues[$attr_id]['type']) { case 'uint': case 'float': case 'string': case 'date': $oldvalue = $oldvalues[$attr_id]['value']; break; case 'dict': $oldvalue = $oldvalues[$attr_id]['key']; break; default: } if ($value === $oldvalue) { // ('' == 0), but ('' !== 0) continue; } if (permitted(NULL, NULL, NULL, array(array('tag' => '$attr_' . $attr_id)))) { commitUpdateAttrValue($object_id, $attr_id, $value); } else { showError('Permission denied, "' . $oldvalues[$attr_id]['name'] . '" left unchanged'); } } }
function content_5778b5e1bcf7f5_65896561($_smarty_tpl) { if (!is_callable('smarty_function_func')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.func.php'; } if (!is_callable('smarty_modifier_truncate')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.truncate.php'; } if (!is_callable('smarty_modifier_money')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.money.php'; } if (!is_callable('smarty_modifier_date_format')) { include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.date_format.php'; } ?> <div classX="cashAdvSection" class="appListSection appListSection_<?php echo $_smarty_tpl->tpl_vars['item']->value['StatusColor']; ?> "><div class="level2"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top" class="tdLeft"> <?php if (permitted('SUPERADMIN-RIGHTS')) { ?> <input <?php if (!$_smarty_tpl->tpl_vars['item']->value['allowDelete']) { ?> disabled<?php } ?> name="sel[]" value="<?php echo $_smarty_tpl->tpl_vars['item']->value['cashadv_id']; ?> " type="checkbox" /> <?php } ?> <a href="/cashadvance.php?cmd=cashadv_edit&app_id=<?php echo $_smarty_tpl->tpl_vars['app_id']->value; ?> &cashadv_id=<?php echo $_smarty_tpl->tpl_vars['item']->value['cashadv_id']; ?> " class="aMCALoan">MCA/ACH Acct # <?php echo $_smarty_tpl->tpl_vars['item']->value['cashadv_idStr']; ?> </a><br /> <strong>DBA:</strong> <span class="spTooltip" onmouseover="tooltip.show('<div style=\'max-width:300px\'><?php echo smarty_function_func(array('name' => 'MCAInfoPopup', 'cashadv_id' => $_smarty_tpl->tpl_vars['item']->value['cashadv_id']), $_smarty_tpl); ?> </div>');" onmouseout="tooltip.hide();"><?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['item']->value['DBAName'], 24, '...', true); ?> </span><br /> <strong>Owner:</strong> <span title="<?php echo $_smarty_tpl->tpl_vars['item']->value['OwnerName']; ?> "><?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['item']->value['OwnerName'], 24, '...', true); ?> </span><br /> <br /> Funding Type: <span class="spFundingType"><?php echo $_smarty_tpl->tpl_vars['item']->value['FundingProductTitle']; ?> </span> <br /> Funding Requested: $<?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['AmountRequested'], 2); ?> <br /> Payback Amount: $<?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['TotalPayback'], 2); ?> (<?php echo $_smarty_tpl->tpl_vars['item']->value['PaybackCoeff']; ?> )<br /> <?php if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'Fixed Daily ACH') { ?> ACH Payback: <?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['perfPayments'], 0); ?> of <?php echo $_smarty_tpl->tpl_vars['item']->value['days']; ?> Payments<br /><?php } ?> <?php if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'MCA') { ?> MCA Payback: $<?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['totalHold'], 2); ?> of $<?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['TotalPayback'], 2); ?> <br /><?php } ?> <?php if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'CCFixed') { ?> ACH Payback: <?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['perfPayments'], 0); ?> of <?php echo $_smarty_tpl->tpl_vars['item']->value['days']; ?> Payments<br /> MCA Payback: $<?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['totalHold'], 2); ?> of $<?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['TotalPayback'], 2); ?> <br /> <?php } ?> <br /> <strong>Broker:</strong> <?php echo $_smarty_tpl->tpl_vars['item']->value['UserName']; ?> ($<?php echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['RepComm'], 2); ?> ) </td> <td valign="top" class="tdRight"><table class="tblRightBlock" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div class="toleft">Status:</div> <div class="toright"><span class="spStatus spStatus_<?php echo $_smarty_tpl->tpl_vars['item']->value['Status']; ?> nobr" title="<?php echo $_smarty_tpl->tpl_vars['item']->value['lastNote']; ?> "> <strong><?php echo $_smarty_tpl->tpl_vars['item']->value['statusTitle']; ?> </strong>(<?php echo $_smarty_tpl->tpl_vars['item']->value['ageD']; ?> Days, <?php echo $_smarty_tpl->tpl_vars['item']->value['ageH']; ?> Hrs)</span></div></td> </tr> <tr> <td><div class="toleft">Date Received:</div> <div class="toright"><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['item']->value['cashadv_created'], '%b %d, %Y at %H:%M %p'); ?> </div></td> </tr> <tr> <td><div class="toleft">Monthly CC Processing:</div> <div class="toright">$ <?php echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['MonthlyCC']) === null || $tmp === '' ? 0 : $tmp, 2); ?> </div></td> </tr> <tr> <td><div class="toleft">Monthly Bank Deposits:</div> <div class="toright"><span class="spTooltip" onmouseover="tooltip.show('<?php echo $_smarty_tpl->tpl_vars['item']->value['pop12month']; ?> ');" onmouseout="tooltip.hide();"> $ <?php echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['MonthlyBankDeposits']) === null || $tmp === '' ? 0 : $tmp, 2); ?> </span></div></td> </tr> <tr> <td><div class="toleft">Avg Daily Bank Bal:</div> <div class="toright">$ <?php echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['AverageBankBalance']) === null || $tmp === '' ? 0 : $tmp, 2); ?> </div></td> </tr> <tr> <td><div class="toleft">Business Inception:</div> <div class="toright"><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['item']->value['InceptionDate'], '%b %d, %Y'); ?> </div></td> </tr> <tr> <td><div class="toleft">Nature of Business:</div> <div class="toright"><?php echo $_smarty_tpl->tpl_vars['item']->value['MerchantType']; ?> </div></td> </tr> <tr> <td><div class="toleft">Credit Score:</div> <div class="toright"><span class="spCreditScore"><?php echo $_smarty_tpl->tpl_vars['item']->value['CreditScoreTitle']; ?> </span></div></td> </tr> <tr> <td><div class="toleft">Email Activity:</div> <div class="toright"> All (<?php echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntEmailTotal']) === null || $tmp === '' ? 0 : $tmp; ?> ) - DBA (<?php echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntEmailDBA']) === null || $tmp === '' ? 0 : $tmp; ?> ) - Lenders (<?php echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntEmailLender']) === null || $tmp === '' ? 0 : $tmp; ?> ) </div> </td> </tr> <tr> <td><div class="toleft">Lenders:</div> <div class="toright"> Accept (<?php echo $_smarty_tpl->tpl_vars['item']->value['cntLendAccept']; ?> ) - Conditional (<?php echo $_smarty_tpl->tpl_vars['item']->value['cntLendCond']; ?> ) - Decline (<?php echo $_smarty_tpl->tpl_vars['item']->value['cntLendDecline']; ?> ) </div></td> </tr> </table></td> </tr> </table> </div> </div><?php }