function content_5778b6e57e9556_02729531($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_money')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.money.php';
        }
        ?>
<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;
        ?>
</div>
    <input name="<?php 
        echo $_smarty_tpl->tpl_vars['name']->value;
        ?>
" type="text" value="<?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['value']->value);
        ?>
" style='width:80px;text-align:right' maxlength="" />
    <?php 
        if (!$_smarty_tpl->tpl_vars['comments']->value) {
            ?>
<span class="fieldComments">($000,000,000)</span><?php 
        }
        ?>
  <?php 
        echo $_smarty_tpl->getSubTemplate('fields/note.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>

</div>
<?php 
    }
    function content_5778b6e54545f1_12519741($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_money')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.money.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;
        ?>
</div>
<input type="text" readonly="readonly" class="inpWide" value="<?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['value']->value);
        ?>
"/><?php 
    }
    function content_5778af92337585_31670190($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_money')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.money.php';
        }
        ?>
<style type="text/css">
body, div, span, td, p{
	font-size: 10pt;
	font-family: Arial;
}

TABLE.tbl1 {border-collapse:collapse;}
TABLE.tbl1 TD {border:solid #DDDDDD 1px}
</style>
<style><!--
/* Font Definitions */
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p
	{mso-style-priority:99;
	margin:0in;
	margin-bottom:.0001pt;
	}
span.EmailStyle18
	{mso-style-type:personal;
	color:windowtext;}
span.z-TopofFormChar
	{mso-style-name:"z-Top of Form Char";
	mso-style-priority:99;
	mso-style-link:"z-Top of Form";

	display:none;}
span.z-BottomofFormChar
	{mso-style-name:"z-Bottom of Form Char";
	mso-style-priority:99;
	mso-style-link:"z-Bottom of Form";
	
	display:none;}
span.EmailStyle23
	{mso-style-type:personal;
	
	color:#1F497D;}
span.x-small1
	{mso-style-name:x-small1;
	}
span.EmailStyle25
	{mso-style-type:personal-reply;
	
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}

DIV.fldTitle  {
	
		
	white-space:normal;	
	vertical-align:top;
	color:#3366cc}

--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->

<div class=WordSection1>
  <table  width="100%" border="0" cellspacing="0" cellpadding="8" class="tbl1">
    <tr>
      <td colspan="3" valign="top" style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><span class="MsoNormal" style="margin-bottom:12.0pt"><b><span style='color:#1F497D'>ALL-TIME STATS:&nbsp; Total Activity Report for All-Time/All Users</span></b><span style='color:#1F497D'>
      <o:p></o:p>
      </span></span></td>
    </tr>
    <tr>
      <td valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'>Total # Users: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['totalUsers']->value, 0);
        ?>
 <br>
Total # Leads: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAllLeads']->value, 0);
        ?>
 <br>
Total # Referrals: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAllReferrals']->value, 0);
        ?>
<br>
<span class="MsoNormal" style="margin-bottom:12.0pt">Total New Job Applicants: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['totalRecruits']->value, 0);
        ?>
<br>
<span class="MsoNormal" style="margin-bottom:12.0pt">Total Appointments: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAppointments']->value, 0);
        ?>
 <br>
</span><span class="MsoNormal" style="margin-bottom:12.0pt">Total Tasks/Reminders: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntTasks']->value, 0);
        ?>
 </span><br>
</span><br>
      </span></span></td>
      <td valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'> Total # Apps &#8211; Received: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAppsReceived']->value, 0);
        ?>
<br>
Total # Apps &#8211; Approved: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAppsApproved']->value, 0);
        ?>
<br>
      Total # Apps &#8211; Payroll Approved: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAppsPayrollApproved']->value, 0);
        ?>
<br>
Total # Apps &#8211; Payroll Paid : <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAppsPayrollPaid']->value, 0);
        ?>
</span></span></td>
      <td valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'>Total Trouble Tickets: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['totalTickets']->value, 0);
        ?>
 <br>
Total Documents: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntDocs']->value, 0);
        ?>
<br>
Total KB Articles: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntKb']->value, 0);
        ?>
 <br>
      Total News Articles: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntKb']->value, 0);
        ?>
 </span></span></td>
    </tr>
    <tr>
      <td valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'><span class="MsoNormal" style="margin-bottom:12.0pt">Total Users Working Leads: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntWorkingLeads']->value, 0);
        ?>
</span><br>
 Total LEAD Appointments: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntLeadAppointments']->value, 0);
        ?>
 <br>
Total LEAD Tasks/Reminders: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntLeadReminders']->value, 0);
        ?>
 </span></span></td>
      <td valign="top"><span class="style3"><span style="color:#1F497D">Total # Apps &#8211; Welcome Calls: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAppsWelcomeCalls']->value, 0);
        ?>
<br>
Total # Apps &#8211; Total Installs: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAppsInstalls']->value, 0);
        ?>
<br>
Total # Apps &#8211; Total Reprograms  : <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAppsReprograms']->value, 0);
        ?>
</span></span></td>
      <td valign="top"><span class="style3"><span style="color:#1F497D">Total User Logins: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['totalUserLogins']->value, 0);
        ?>
 </span></span></td>
    </tr>
    <tr>
      <td colspan="3" valign="top" style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'>
            <b>DAILY</b></span><b><span style='color:#1F497D'> STATS:&nbsp; End-of-Day CRM Activity Reports (All Users)</span></b><span style='color:#1F497D'>
            <o:p></o:p>
            </span></span></td>
    </tr>
    <tr>
      <td valign="top"><p><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'>Daily # Users: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['totalUsersD']->value, 0);
        ?>
 <br>
        Daily # Leads: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAllLeadsD']->value, 0);
        ?>
 <br>
        Daily # Referrals: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAllReferralsD']->value, 0);
        ?>
 <br>
        </span></span><span style="color:#1F497D">Daily New Job Applicants: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['totalRecruitsD']->value, 0);
        ?>
 </span><br>
        <span style="color:#1F497D">Daily Appointments: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAppointmentsD']->value, 0);
        ?>
 <br>
Daily Tasks/Reminders: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntLeadRemindersD']->value, 0);
        ?>
 <br>
        </span></p>
      </td>
      <td valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'>Daily # Apps &#8211; Received: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAppsReceivedD']->value, 0);
        ?>
<br>
Daily # Apps &#8211; Approved: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAppsApprovedD']->value, 0);
        ?>
<br>
      Daily # Apps &#8211; Payroll Approved: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAppsPayrollApprovedD']->value, 0);
        ?>
<br>
Daily # Apps &#8211; Payroll Paid : <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAppsPayrollPaidD']->value, 0);
        ?>
</span></span></td>
      <td valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'>Daily Trouble Tickets: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['totalTicketsD']->value, 0);
        ?>
<br>
Daily Documents: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntDocsD']->value, 0);
        ?>
<br>
Daily Knowledgebase Articles: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntKbD']->value, 0);
        ?>
 </span></span></td>
    </tr>
    <tr>
      <td valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'><span class="MsoNormal" style="margin-bottom:12.0pt">Daily Users Working Leads: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntWorkingLeadsD']->value, 0);
        ?>
<br>
      </span>
Daily LEAD Appointments: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntLeadAppointmentsD']->value, 0);
        ?>
 <br>
Daily LEAD Tasks/Reminders: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntLeadRemindersD']->value, 0);
        ?>
 </span></span></td>
      <td valign="top"><span style="color:#1F497D">Daily # Apps &#8211; Welcome Calls : <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAppsWelcomeCallsD']->value, 0);
        ?>
<br>
Daily # Apps &#8211; Total Installs: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAppsInstallsD']->value, 0);
        ?>
<br>
Daily # Apps &#8211; Total Reprograms  : <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['cntAppsReprogramsD']->value, 0);
        ?>
</span></td>
      <td valign="top"><span style="color:#1F497D">Daily User Logins: <?php 
        echo smarty_modifier_money($_smarty_tpl->tpl_vars['totalUserLoginsD']->value, 0);
        ?>
 </span></td>
    </tr>
    <tr>
      <td colspan="3" valign="top" style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'><b>TODAY&#8217;S ACTIVITY:&nbsp; New Merchant Applications Submitted by User Name:</b></span></span></td>
    </tr>
    <tr>
      <td colspan="3" valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'> <?php 
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['activeUsersD']->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;
            ?>
  <?php 
            echo $_smarty_tpl->tpl_vars['item']->value['UserName'];
            ?>
: <?php 
            echo $_smarty_tpl->tpl_vars['item']->value['cnt'];
            ?>
<br>
<?php 
        }
        ?>
 </span></span></td>
    </tr>
    <tr>
      <td colspan="3" valign="top" style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'><b>TODAY'S ACTIVITY:  New Merchant Customers Boarded:  </b></span></span></td>
    </tr>
<?php 
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['merchantsD']->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 valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['BusinessName'];
            ?>
</span></span></td>
      <td valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['BusinessAddress'];
            ?>
</span></span></td>
      <td valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['BusinessCity'];
            ?>
, <?php 
            echo $_smarty_tpl->tpl_vars['item']->value['BusinessState'];
            ?>
, <?php 
            echo $_smarty_tpl->tpl_vars['item']->value['BusinessZip'];
            ?>
</span></span></td>
    </tr>
<?php 
        }
        ?>
	


    <tr>
      <td colspan="3" valign="top" style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'><b>TODAY'S ACTIVITY:  New Referrals Received:  </b></span></span></td>
    </tr>
<?php 
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['referralsD']->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 valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['BusinessName'];
            ?>
</span></span></td>
      <td valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['BusinessAddress'];
            ?>
</span></span></td>
      <td valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['BusinessCity'];
            ?>
, <?php 
            echo $_smarty_tpl->tpl_vars['item']->value['BusinessState'];
            ?>
, <?php 
            echo $_smarty_tpl->tpl_vars['item']->value['BusinessZip'];
            ?>
</span></span></td>
    </tr>
<?php 
        }
        ?>
	


    <tr>
      <td colspan="3" valign="top" style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'><b>TODAY'S ACTIVITY:  New Job Applicant Inquires:</b></span></span></td>
    </tr>
<?php 
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['recruitsD']->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 valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['FirstName'];
            ?>
 <?php 
            echo $_smarty_tpl->tpl_vars['item']->value['LastName'];
            ?>
</span></span></td>
      <td valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Address'];
            ?>
</span></span></td>
      <td valign="top"><span class="MsoNormal" style="margin-bottom:12.0pt"><span style='color:#1F497D'><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['City'];
            ?>
, <?php 
            echo $_smarty_tpl->tpl_vars['item']->value['State'];
            ?>
, <?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Zip'];
            ?>
</span></span></td>
    </tr>
<?php 
        }
        ?>
	

  </table>
  <p class=MsoNormal style='margin-bottom:12.0pt'><span style='color:#1F497D'><br>
  </span>
    <o:p>&nbsp;</o:p>
  </p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td style='background:#C2CDE1;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=center style='text-align:center'><b><span style="color:black">New Account Boarding and Application Status System<o:p></o:p></span></b></p></td></tr><tr><td valign="top" style='background:white;padding:3.0pt 3.0pt 3.0pt 6.0pt'></td></tr><tr><td style='padding:0in 0in 0in 0in'><div align=center><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>Today</span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>MTD</span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>Last Month </span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>YTD</span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>Last Year </span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>Life Time </span></b><span style=''><o:p></o:p></span></p></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><td style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><span style=''><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['statusTitle'];
            ?>
<o:p></o:p></span></p></td><td valign="top" style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''><?php 
            echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntToday']) === null || $tmp === '' ? 0 : $tmp;
            ?>
<o:p></o:p></span></p></td><td valign="top" style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''><?php 
            echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntMTD']) === null || $tmp === '' ? 0 : $tmp;
            ?>
<o:p></o:p></span></p></td><td valign="top" style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''><?php 
            echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntLastMonth']) === null || $tmp === '' ? 0 : $tmp;
            ?>
<o:p></o:p></span></p></td><td valign="top" style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''><?php 
            echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntYTD']) === null || $tmp === '' ? 0 : $tmp;
            ?>
<o:p></o:p></span></p></td><td valign="top" style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''><?php 
            echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntLastYear']) === null || $tmp === '' ? 0 : $tmp;
            ?>
<o:p></o:p></span></p></td><td valign="top" style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''><?php 
            echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntALL']) === null || $tmp === '' ? 0 : $tmp;
            ?>
<o:p></o:p></span></p></td></tr>
<?php 
        }
        ?>
</table>
</div></td></tr></table><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td style='background:#C2CDE1;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=center style='text-align:center'><b><span style="color:black">TOTAL APPROVED STATS for Bonuses, Commissions, &amp; Lease Funding<o:p></o:p></span></b></p></td></tr><tr><td style='padding:0in 0in 0in 0in'><div align=center><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>Today</span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>MTD</span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>Last Month </span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>YTD</span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>Last Year </span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>Life Time </span></b><span style=''><o:p></o:p></span></p></td></tr>

<?php 
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['profitStatlist']->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 style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><span style=''><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['statusTitle'];
            ?>
<o:p></o:p></span></p></td><td valign="top" style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntToday']);
            ?>
<o:p></o:p></span></p></td><td valign="top" style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntMTD']);
            ?>
<o:p></o:p></span></p></td><td valign="top" style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntLastMonth']);
            ?>
<o:p></o:p></span></p></td><td valign="top" style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntYTD']);
            ?>
<o:p></o:p></span></p></td><td valign="top" style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntLastYear']);
            ?>
<o:p></o:p></span></p></td><td valign="top" style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntALL']);
            ?>
<o:p></o:p></span></p></td></tr>
<?php 
        }
        ?>
</table>
</div></td></tr></table><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td colspan=6 style='background:#C2CDE1;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><b><span style="color:black">DAILY Sales User Commissions<o:p></o:p></span></b></p></td></tr><tr><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><b><span style=''>User Name</span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><b><span style=''>User Type</span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>Invoices</span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>Pending</span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>Approved</span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>Paid</span></b><span style=''><o:p></o:p></span></p></td></tr>

<?php 
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['profitAgents']->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;
            $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['item']->key;
            ?>
<tr><td style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><b><span style=''><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['agent_name'];
            ?>
</span></b><span style=''><o:p></o:p></span></p></td><td style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><span style=''><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['typetitle'];
            ?>
<o:p></o:p></span></p></td><td style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''><?php 
            echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntInv']) === null || $tmp === '' ? '0' : $tmp;
            ?>
<o:p></o:p></span></p></td><td valign="top" style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''>$<?php 
            echo ($tmp = @smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['pendingComm'])) === null || $tmp === '' ? '0.00' : $tmp;
            ?>
<o:p></o:p></span></p></td><td valign="top" style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''>$<?php 
            echo ($tmp = @smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['actualComm'])) === null || $tmp === '' ? '0.00' : $tmp;
            ?>

  <o:p></o:p></span></p></td><td valign="top" style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''>$<?php 
            echo ($tmp = @smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['paidComm'])) === null || $tmp === '' ? '0.00' : $tmp;
            ?>
<o:p></o:p></span></p></td></tr>
<?php 
        }
        ?>

<tr><td nowrap valign="top" style='background:#EEEEEE;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><b><span style=''>Total</span></b><span style=''><o:p></o:p></span></p></td><td nowrap valign="top" style='background:#EEEEEE;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td><td nowrap valign="top" style='background:#EEEEEE;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td><td nowrap valign="top" style='background:#EEEEEE;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>$<?php 
        echo ($tmp = @smarty_modifier_money($_smarty_tpl->tpl_vars['profitAgentsTotal']->value['pendingComm'])) === null || $tmp === '' ? '0.00' : $tmp;
        ?>
<o:p></o:p></span></b></p></td><td nowrap valign="top" style='background:#EEEEEE;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><span style=''>$<?php 
        echo ($tmp = @smarty_modifier_money($_smarty_tpl->tpl_vars['profitAgentsTotal']->value['actualComm'])) === null || $tmp === '' ? '0.00' : $tmp;
        ?>
<o:p></o:p></span></p></td><td nowrap valign="top" style='background:#EEEEEE;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal align=right style='text-align:right'><b><span style=''>$<?php 
        echo ($tmp = @smarty_modifier_money($_smarty_tpl->tpl_vars['profitAgentsTotal']->value['paidComm'])) === null || $tmp === '' ? '0.00' : $tmp;
        ?>
<o:p></o:p></span></b></p></td></tr></table>
<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td style='background:#C2CDE1;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><b><span style="color:black">View System Wide Lead Statistics &#8211; Per User and Per User Categories</span></b><span style=''><o:p></o:p></span></p></td></tr><tr><td style='padding:0in 0in 0in 0in'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><b><span style=''>User Name </span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><b><span style=''>New </span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><b><span style=''>Working </span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><b><span style=''>Contact </span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><b><span style=''>Hot </span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><b><span style=''>Sold </span></b><span style=''><o:p></o:p></span></p></td><td style='background:#DDDDDD;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><b><span style=''>Dead </span></b><span style=''><o:p></o:p></span></p></td></tr>

<?php 
        $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['v']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['leadsByOwner']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value) {
            $_smarty_tpl->tpl_vars['v']->_loop = true;
            ?>
<tr><td style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><span style=''><?php 
            echo $_smarty_tpl->tpl_vars['v']->value['NAME'];
            ?>
<o:p></o:p></span></p></td><td style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><span style=''><?php 
            echo $_smarty_tpl->tpl_vars['v']->value['NEW'];
            ?>
<o:p></o:p></span></p></td><td style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><span style=''><?php 
            echo $_smarty_tpl->tpl_vars['v']->value['WORKING'];
            ?>
<o:p></o:p></span></p></td><td style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><span style=''><?php 
            echo $_smarty_tpl->tpl_vars['v']->value['CONTACTED'];
            ?>
<o:p></o:p></span></p></td><td style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><span style=''><?php 
            echo $_smarty_tpl->tpl_vars['v']->value['QUALIFIED'];
            ?>
<o:p></o:p></span></p></td><td style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><span style=''><?php 
            echo $_smarty_tpl->tpl_vars['v']->value['SOLD'];
            ?>
<o:p></o:p></span></p></td><td style='border:none;border-bottom:solid #DDDDDD 1.0pt;background:white;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal><span style=''><?php 
            echo $_smarty_tpl->tpl_vars['v']->value['DEAD'];
            ?>
<o:p></o:p></span></p></td></tr>
<?php 
        }
        ?>
</table></td></tr></table><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p></div>

<?php 
    }
    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">&nbsp;
		<?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">&nbsp;
	    <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">&nbsp;</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'];
                ?>
">&nbsp;<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 
    }
</label>
                    <br/><br/>
            </tr>
            <tr>
            </tbody>
            <tbody>
            <tr>
                <td class="first"><?php 
echo is_array($_tmp = 'Goals_Optional') ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp);
?>
 <?php 
echo is_array($_tmp = 'Goals_DefaultRevenue') ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp);
?>
</td>
                <td><?php 
echo is_array($_tmp = ' <input type="text" name="revenue" size="2" value="0" class="inp" /> ') ? $this->_run_mod_handler('money', true, $_tmp, $this->_tpl_vars['idSite']) : smarty_modifier_money($_tmp, $this->_tpl_vars['idSite']);
?>

                    <div class="entityInlineHelp"> <?php 
echo is_array($_tmp = 'Goals_DefaultRevenueHelp') ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp);
?>
 </div>
                </td>
            </tr>
            <tr>
            </tbody>
        </table>
        <input type="hidden" name="methodGoalAPI" value=""/>
        <input type="hidden" name="goalIdUpdate" value=""/>
        <input type="submit" value="" name="submit" id="goal_submit" class="submit"/>
    </form>
                                <?php 
                        } else {
                            ?>
                                    <img class='iconPadding' src="<?php 
                            echo $this->_tpl_vars['action']['icon'];
                            ?>
"
                                         title="<?php 
                            echo is_array($_tmp = $this->_tpl_vars['action']['goalName']) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html');
                            ?>
 - <?php 
                            if ($this->_tpl_vars['action']['revenue'] > 0) {
                                echo is_array($_tmp = 'Live_GoalRevenue') ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp);
                                ?>
: <?php 
                                echo is_array($_tmp = $this->_tpl_vars['action']['revenue']) ? $this->_run_mod_handler('money', true, $_tmp, $this->_tpl_vars['idSite']) : smarty_modifier_money($_tmp, $this->_tpl_vars['idSite']);
                                ?>
 - <?php 
                            }
                            ?>
 <?php 
                            echo is_array($_tmp = $this->_tpl_vars['action']['serverTimePretty']) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html');
                            ?>
"/>
                                <?php 
                        }
                        ?>
                            </a>
                        <?php 
                    }
                    ?>
    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">&nbsp;</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">&nbsp;</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 
    }
    foreach ($_from as $this->_tpl_vars['discount']) {
        ?>
		<tr class="<?php 
        echo smarty_function_cycle(array('values' => "odd,even"), $this);
        ?>
">
			<td><?php 
        echo $this->_tpl_vars['discount']->discount->code;
        ?>
</td>
			<td class="center"><?php 
        echo is_array($_tmp = $this->_tpl_vars['discount']->points) ? $this->_run_mod_handler('number_format', true, $_tmp) : number_format($_tmp);
        ?>
</td>
			<td>&pound;<?php 
        echo is_array($_tmp = $this->_tpl_vars['discount']->points_cash_value) ? $this->_run_mod_handler('money', true, $_tmp) : smarty_modifier_money($_tmp);
        ?>
</td>
			<td><?php 
        echo is_array($_tmp = $this->_tpl_vars['discount']->discount->expires) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d %b %Y %H:%M") : smarty_modifier_date_format($_tmp, "%d %b %Y %H:%M");
        ?>
</td>
			<td class="center">
				<?php 
        if ($this->_tpl_vars['discount']->spent) {
            ?>
					Yes
				<?php 
        } else {
            ?>
					No
    function content_5778af8c344465_65996588($_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_modifier_money')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.money.php';
        }
        echo smarty_function_js_include(array('src' => '/js/nav.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/css/navbtn.css'), $_smarty_tpl);
        ?>






<?php 
        $_smarty_tpl->tpl_vars['slidebox_section'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['slidebox_section']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['sections']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['slidebox_section']->key => $_smarty_tpl->tpl_vars['slidebox_section']->value) {
            $_smarty_tpl->tpl_vars['slidebox_section']->_loop = true;
            if ($_smarty_tpl->tpl_vars['slidebox_section']->value['items'] || $_smarty_tpl->tpl_vars['slidebox_section']->value['html']) {
                ?>

	
	<?php 
                if (isset($_smarty_tpl->tpl_vars['slidebox_section']->value['cnt'])) {
                    ?>
 
		<?php 
                    $_smarty_tpl->tpl_vars['title'] = new Smarty_variable((string) $_smarty_tpl->tpl_vars['slidebox_section']->value['title'] . " (" . (string) $_smarty_tpl->tpl_vars['slidebox_section']->value['cnt'] . ")", null, 0);
                    ?>
	<?php 
                } else {
                    ?>
		<?php 
                    $_smarty_tpl->tpl_vars['title'] = new Smarty_variable($_smarty_tpl->tpl_vars['slidebox_section']->value['title'], null, 0);
                    ?>
	<?php 
                }
                ?>


	<?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => (string) $_smarty_tpl->tpl_vars['slidebox']->value['code'] . "_" . (string) $_smarty_tpl->tpl_vars['slidebox_section']->value['code'], 'title' => $_smarty_tpl->tpl_vars['title']->value, 'class' => "box-one box-gray box-nav"));
                $_block_repeat = true;
                echo smarty_block_mybox(array('node' => (string) $_smarty_tpl->tpl_vars['slidebox']->value['code'] . "_" . (string) $_smarty_tpl->tpl_vars['slidebox_section']->value['code'], 'title' => $_smarty_tpl->tpl_vars['title']->value, 'class' => "box-one box-gray box-nav"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>

		
		

		<div id="<?php 
                    echo $_smarty_tpl->tpl_vars['slidebox']->value['code'];
                    ?>
_<?php 
                    echo $_smarty_tpl->tpl_vars['slidebox_section']->value['code'];
                    ?>
_block" class="leftMenuDDItems">


		  <?php 
                    if ($_smarty_tpl->tpl_vars['slidebox_section']->value['items']) {
                        ?>
			  <?php 
                        $_smarty_tpl->tpl_vars['slidebox_item'] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars['slidebox_item']->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['slidebox_section']->value['items'];
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars['slidebox_item']->key => $_smarty_tpl->tpl_vars['slidebox_item']->value) {
                            $_smarty_tpl->tpl_vars['slidebox_item']->_loop = true;
                            ?>
			  	<div class="left_btn1 <?php 
                            if ($_smarty_tpl->tpl_vars['slidebox_section']->value['type'] == 'bluelinks') {
                                ?>
lead_btn1<?php 
                            }
                            ?>
 <?php 
                            echo $_smarty_tpl->tpl_vars['slidebox_item']->value['class'];
                            ?>
" onclick="myRedirect('<?php 
                            echo $_smarty_tpl->tpl_vars['slidebox_item']->value['url'];
                            ?>
','<?php 
                            echo $_smarty_tpl->tpl_vars['slidebox_item']->value['target'];
                            ?>
')" <?php 
                            if ($_smarty_tpl->tpl_vars['slidebox_item']->value['tooltip']) {
                                ?>
data-tooltip="<?php 
                                echo $_smarty_tpl->tpl_vars['slidebox_item']->value['tooltip'];
                                ?>
"<?php 
                            }
                            ?>
>
			  		<div class="left" title="<?php 
                            echo $_smarty_tpl->tpl_vars['slidebox_item']->value['title'];
                            ?>
"><?php 
                            echo $_smarty_tpl->tpl_vars['slidebox_item']->value['title'];
                            ?>
</div>
		  			<?php 
                            if (isset($_smarty_tpl->tpl_vars['slidebox_item']->value['cnt']) || $_smarty_tpl->tpl_vars['slidebox_item']->value['showCnt']) {
                                ?>
			  		<div class="right">
			  			<div class="counter">
							<?php 
                                if (is_numeric($_smarty_tpl->tpl_vars['slidebox_item']->value['cnt'])) {
                                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['slidebox_item']->value['cnt'], 0);
                                } else {
                                    echo $_smarty_tpl->tpl_vars['slidebox_item']->value['cnt'];
                                }
                                ?>
						</div>
					</div>
					<?php 
                            }
                            ?>
			  	</div>
		  	  <?php 
                        }
                        ?>
		  <?php 
                    }
                    ?>
	 
		  
		  
		  



	      
	      <?php 
                    if ($_smarty_tpl->tpl_vars['slidebox_section']->value['html']) {
                        ?>
	      	<?php 
                        echo $_smarty_tpl->tpl_vars['slidebox_section']->value['html'];
                        ?>

	      <?php 
                    }
                    ?>



		</div>
	<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_mybox(array('node' => (string) $_smarty_tpl->tpl_vars['slidebox']->value['code'] . "_" . (string) $_smarty_tpl->tpl_vars['slidebox_section']->value['code'], 'title' => $_smarty_tpl->tpl_vars['title']->value, 'class' => "box-one box-gray box-nav"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
		



<?php 
            }
        }
        ?>




<?php 
    }
s<?php 
            }
            ?>
 per person.
						</p>
					<?php 
        }
        ?>
				 </td>
				 <td class="center" style="width: 140px;">
					 <p class="price">
						 <?php 
        if ($this->_tpl_vars['ticket']->cost > 0) {
            ?>
							 &pound;<?php 
            echo is_array($_tmp = $this->_tpl_vars['ticket']->cost) ? $this->_run_mod_handler('money', true, $_tmp) : smarty_modifier_money($_tmp);
            ?>

						 <?php 
        } else {
            ?>
							 Free
						 <?php 
        }
        ?>
						 <?php 
        if ($this->_tpl_vars['ticket']->available() > -1) {
            ?>
							 <p>
								 <?php 
            echo $this->_tpl_vars['ticket']->available();
    function content_5778b60fce8eb1_02009448($_smarty_tpl)
    {
        if (!is_callable('smarty_function_js_data')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_data.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_money')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.money.php';
        }
        ?>
<!--in production
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/s/dt/pdfmake-0.1.18,dt-1.10.10,b-1.1.0,b-colvis-1.1.0,b-flash-1.1.0,b-html5-1.1.0,b-print-1.1.0,cr-1.3.0,r-2.0.0/datatables.min.css"/>
 
<?php 
        echo '<script';
        ?>
 type="text/javascript" src="https://cdn.datatables.net/s/dt/pdfmake-0.1.18,dt-1.10.10,b-1.1.0,b-colvis-1.1.0,b-flash-1.1.0,b-html5-1.1.0,b-print-1.1.0,cr-1.3.0,r-2.0.0/datatables.min.js"><?php 
        echo '</script';
        ?>
>
-->


<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/s/dt/pdfmake-0.1.18,dt-1.10.10,b-1.1.0,b-colvis-1.1.0,b-flash-1.1.0,b-html5-1.1.0,b-print-1.1.0,cr-1.3.0,r-2.0.0/datatables.css"/>


<?php 
        echo '<script';
        ?>
 type="text/javascript" src="https://cdn.datatables.net/s/dt/pdfmake-0.1.18,dt-1.10.10,b-1.1.0,b-colvis-1.1.0,b-flash-1.1.0,b-html5-1.1.0,b-print-1.1.0,cr-1.3.0,r-2.0.0/datatables.js"><?php 
        echo '</script';
        ?>
>
<?php 
        echo smarty_function_js_data(array('url_data' => $_smarty_tpl->tpl_vars['url_data']->value), $_smarty_tpl);
        ?>

<style>

div.dt-button-collection a.dt-button.active:not(.disabled) {
    background-color: #B74949;
    background-image: -webkit-linear-gradient(top, #7489D6 0%, #dadada 100%);
	}
.dataTables_wrapper .dataTables_filter {
    position: absolute;
    left: 400px;
	float: left;
	margin-left:20px;
	margin-top: 15px;
}
a.dt-button.buttons-collection {
    margin-left: 10px;
    margin-top: 10px;
	margin-buttom: 10px;
    margin-right: 10px;
}
a.dt-button.buttons-collection.buttons-colvis.checklist-btn {
    margin: inherit;
    border: blue;
	visibility: hidden;
}
.dt-button-collection.fixed.two-column.columns-delete::before {
    content: "choose format file you do want to export";
}
.dt-button-collection::before {
    content: "Delete columns you don't want to export";
}
.dt-button-collection.sec-checklist::before {
    content: "select checklist section ";
}
/*#example_paginate {
    position: relative;
    right: 94%;
}*/
</style>

<?php 
        echo '<script';
        ?>
  type="text/javascript">



$(document).ready(function() {

	var url=url_data;//"&owner_uid=1&lender_uid=&FundingType=&status=&date1=&date2=";
	
	var i=0;
    var colVisArr =i;
	for (i+1; i<=40; i++){
	 colVisArr=colVisArr+","+i;
	 icolVisArr=i;
	}

	//var j=<?php 
        echo $_smarty_tpl->tpl_vars['index_cl']->value;
        ?>
;
	var checklistColVisArr1 =icolVisArr+1;
	for (icolVisArr; i<=(icolVisArr+<?php 
        echo $_smarty_tpl->tpl_vars['SEC_1']->value;
        ?>
); i++){
	 checklistColVisArr1=checklistColVisArr1+","+i;
	 ichecklistColVisArr1=i;
	}
	
	var checklistColVisArr2 =ichecklistColVisArr1+1;
	for (ichecklistColVisArr1; i<=(ichecklistColVisArr1+<?php 
        echo $_smarty_tpl->tpl_vars['SEC_2']->value;
        ?>
); i++){
	 checklistColVisArr2=checklistColVisArr2+","+i;
	 ichecklistColVisArr2=i;
	}
	var checklistColVisArr3 =ichecklistColVisArr2+1;
	for (ichecklistColVisArr2; i<=(ichecklistColVisArr2+<?php 
        echo $_smarty_tpl->tpl_vars['SEC_3']->value;
        ?>
); i++){
	 checklistColVisArr3=checklistColVisArr3+","+i;
	 ichecklistColVisArr3=i;
	}
	var checklistColVisArr4 =ichecklistColVisArr3+1;
	for (ichecklistColVisArr3; i<=(ichecklistColVisArr3+<?php 
        echo $_smarty_tpl->tpl_vars['SEC_4']->value;
        ?>
); i++){
	 checklistColVisArr4=checklistColVisArr4+","+i;
	 ichecklistColVisArr4=i;
	}

	
    $('#example').DataTable({
		dom: 'Bfrtpli',
		columnDefs: [
            {
                "targets": [ <?php 
        echo $_smarty_tpl->tpl_vars['allcol']->value;
        ?>
 ],
                "visible": false,
                "searchable": false
            }
        ],
		buttons:[
			
			{	
				extend: 'collection',
				collectionLayout: 'sec-checklist',
				text: 'Checklist',
				buttons:[
					{
					text: 'Underwriting Supporting Documents',
					action: function ( e, dt, node, config ) {
                    $(".checklist-btn")[0].click();}
					},
					{
					text: 'Credit Card Processing Switch',
					action: function ( e, dt, node, config ) {
                    $(".checklist-btn")[1].click();}
					},
					{
					text: 'Funding Tasks',
					action: function ( e, dt, node, config ) {
                    $(".checklist-btn")[2].click();}
					},
					{
					text: 'Other Tasks',
					action: function ( e, dt, node, config ) {
                    $(".checklist-btn")[3].click();}
					},
				]
			},
			
			{
				extend:'colvis',
				text: 'select colums',
				collectionLayout: 'fixed three-column ',
				columns: [colVisArr]
			},
			{
				text: 'Export',
                action: function ( e, dt, node, config ) {
                   window.location = "../cashadvance.php?"+url+"&format=export";
				   // window.location ('../cashadvance.php?cmd=cashadv_list&owner_uid=110&lender_uid=&FundingType=&status=&date1=&date2=&cmd=repcolumns&format=export');
                }
			},
			{
				extend:'colvis',
				className: 'checklist-btn',
				text: 'Underwriting Supporting Documents',
				collectionLayout: 'fixed two-column',
				columns: [checklistColVisArr1]
			},
			{
				extend:'colvis',
				className: 'checklist-btn',
				text: 'Credit Card Processing Switch',
				collectionLayout: 'fixed two-column',
				columns: [checklistColVisArr2]
			},
			{
				extend:'colvis',
				text: 'Funding Tasks',
				className: 'checklist-btn',
				collectionLayout: 'fixed three-column',
				columns: [checklistColVisArr3]
			},
			{
				extend:'colvis',
				text: 'Other Tasks',
				className: 'checklist-btn',
				collectionLayout: 'fixed three-column',
				columns: [checklistColVisArr4]
			}
			
			
			
        ]
	});

} );

<?php 
        echo '</script';
        ?>
>

<table id="example" class="display" cellspacing="0" width="100%">
       <thead>
			<tr>
				<th> Receive Date </th>
                <th> Approval Date </th>
                <th>Funding Date</th>
                <th>First ACH Withdrawal</th>
                <th>Lead Source</th>
                <th>Status</th>
				<th>Sales Rep</th>
                <th>Lender</th>
				<th>Contract #</th>
                <th>DBA Name</th>
				<th>Address</th>
                <th>City</th>
                <th>State</th>
				<th>Zip Code</th>
                <th>Owner Name 1</th>
				<th>Owner Phone 1</th>
				<th>Owner Address 1</th>
				<th>Owner City 1</th>
				<th>Owner Name 2</th>
				<th>Owner Phone 2</th>
				<th>Owner Address 2</th>
				<th>Owner City 2</th>
                <th>Phone</th>
				<th>Fax</th>
				<th>Email</th>
                <th>Funding Amt Requested</th>
                <th>Payback Amount</th>
				<th>Factor Rate</th>
				<th># ACH Payments</th>
				<th>Bank Name</th>
				<th>Bank Account #</th>
				<th>Routing #</th>
				<th>Commission</th>
				<th>Daily Residual %</th>
				<th>Business Start Date</th>
				<th>Total Monthly Bank Deposits $</th>
				<th>Avg Daily Bank Balance $</th>
				<th>Monthly Avg Credit Card Vol $</th>
				<th>Monthly Avg Credit Card Trans #</th>
				<th>Federal Tax ID #</th>
				<th>Social Security #</th>
				<?php 
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['checklist']->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;
            ?>
				<th><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['title'];
            ?>
</th>
				<?php 
        }
        ?>
			
				</tr>
        </thead>
        <tfoot>
            <tr>
				<th>Receive Date</th>
                <th>Approval Date</th>
                <th>Funding Date</th>
                <th>First ACH Withdrawal</th>
                <th>Lead Source</th>
                <th>Status</th>
				<th>Sales Rep</th>
                <th>Lender</th>
				<th>Contract #</th>
                <th>DBA Name</th>
				<th>Address</th>
                <th>City</th>
                <th>State</th>
				<th>Zip Code</th>
                <th>Owner Name 1</th>
				<th>Owner Phone 1</th>
				<th>Owner Address 1</th>
				<th>Owner City 1</th>
				<th>Owner Name 2</th>
				<th>Owner Phone 2</th>
				<th>Owner Address 2</th>
				<th>Owner City 2</th>
                <th>Phone</th>
				<th>Fax</th>
				<th>Email</th>
                <th>Funding Amt Requested</th>
                <th>Payback Amount</th>
				<th>Factor Rate</th>
				<th># ACH Payments</th>
				<th>Bank Name</th>
				<th>Bank Account #</th>
				<th>Routing #</th>
				<th>Commission</th>
				<th>Daily Residual %</th>
				<th>Business Start Date</th>
				<th>Total Monthly Bank Deposits $</th>
				<th>Avg Daily Bank Balance $</th>
				<th>Monthly Avg Credit Card Vol $</th>
				<th>Monthly Avg Credit Card Trans #</th>
				<th>Federal Tax ID #</th>
				<th>Social Security #</th>
				<?php 
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['checklist']->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;
            ?>
				<th><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['title'];
            ?>
</th>
				<?php 
        }
        ?>
			

			</tr>
        </tfoot>
        	<tbody>
		<?php 
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['list']->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><?php 
            echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['item']->value['Receive Date'], '%b %d, %Y');
            ?>
</td>
                <td><?php 
            echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['item']->value['Approval Date'], '%b %d, %Y');
            ?>
</td>
                <td><?php 
            echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['item']->value['Funding Date'], '%b %d, %Y');
            ?>
</td>
				<td><?php 
            echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['item']->value['First ACH Withdrawal'], '%b %d, %Y');
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['LeadSource'];
            ?>
</td>
                <td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Status'];
            ?>
</td>
                <td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Sales Rep'];
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Lender'];
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['cashadv_idStr'];
            ?>
</td><!--cashadv_idStr; title:contract-->
                <td><a href="/cashadvance.php?cmd=cashadv_edit&app_id=<?php 
            echo $_smarty_tpl->tpl_vars['item']->value['app_id'];
            ?>
&cashadv_id=<?php 
            echo $_smarty_tpl->tpl_vars['item']->value['cashadv_idStr'];
            ?>
&tab=dba"><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['DBA Name'];
            ?>
</a></td>
                <td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Address'];
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['City'];
            ?>
</td>
                <td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['State'];
            ?>
</td>
                <td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Zip Code'];
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Owner Name 1'];
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Owner Phone 1'];
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Owner Address 1'];
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Owner City 1'];
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Owner Name 2'];
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Owner Phone 2'];
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Owner Address 2'];
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Owner City 2'];
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Phone'];
            ?>
</td>
                <td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Fax'];
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Email'];
            ?>
</td>
                <td>$<?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['Funding Amount'], 2);
            ?>
</td>
                <td>$<?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['Payback Amount'], 2);
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Factor Rate'];
            ?>
</td>
                <td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['# ACH Payments'];
            ?>
</td>
                <td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Bank Name'];
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Bank Account #'];
            ?>
</td>
                <td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Routing #'];
            ?>
</td>
                <td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Commission'];
            ?>
</td>
				<td><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['Daily Residual %'], 2);
            ?>
%</td>
                <td><?php 
            echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['item']->value['Business Start Date'], '%b %d, %Y');
            ?>
</td>
                <td>$<?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['Total Monthly Bank Deposits '], 2);
            ?>
</td>
				<td>$<?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['Avg Daily Bank Balance $'], 2);
            ?>
</td>
                <td>$<?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['Monthly Avg Credit Card Vol $'], 2);
            ?>
</td>
                <td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['Monthly Avg Credit Card Trans #'];
            ?>
</td>
                <!--<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['MonthlyGrossSales'];
            ?>
</td>
                <td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['OkToEmail'];
            ?>
</td>-->
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['TaxID'];
            ?>
</td>
				<td><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['OwnerSSN'];
            ?>
</td>
				<?php 
            $_smarty_tpl->tpl_vars['checkListItem'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['checkListItem']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['checklist']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['checkListItem']->key => $_smarty_tpl->tpl_vars['checkListItem']->value) {
                $_smarty_tpl->tpl_vars['checkListItem']->_loop = true;
                ?>
				<td><?php 
                echo $_smarty_tpl->tpl_vars['item']->value[$_smarty_tpl->tpl_vars['checkListItem']->value['name']];
                ?>
</td>
				<?php 
            }
            ?>
			</tr>
		<?php 
        }
        ?>
 
		</tbody>	
				
          
         </table>
	<?php 
    }
    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 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>
                               &nbsp;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>
                               &nbsp;Version: <div class="toright"><?php 
                    echo $_smarty_tpl->tpl_vars['BackupBoxData']->value['db_version'];
                    ?>
</div>
                              </td>
                              </tr>
                              <tr class="menuitemsub_k">
                              <td>
                               &nbsp;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 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'];
        ?>
">&nbsp;<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 
    }