コード例 #1
0
/**
 * Renders action string with time when action was taken
 * 
 * Parameteres:
 * 
 * - action - Action string, default is 'Posted'. It is used for lang retrival
 * - datetime - Datetime object when action was taken
 * - format - Format in with time is displayed. Possible values are ago, 
 *   datetime, date and time. Default is 'ago'
 *
 * @param array $params
 * @param Smarty $smarty
 * @return string
 */
function smarty_function_action_on($params, &$smarty)
{
    $action = clean(array_var($params, 'action', 'Posted'));
    $datetime = array_var($params, 'datetime');
    if (!instance_of($datetime, 'DateValue')) {
        return new InvalidParamError('datetime', $datetime, '$datetime is expected to be an instance of DateValue or DateTimeValue class', true);
    }
    // if
    $format = array_var($params, 'format', 'ago');
    if (!in_array($format, array('ago', 'date', 'datetime', 'time'))) {
        return new InvalidParamError('format', $format, 'Format is requred to be one of following four values: ago, date, datetime or time', true);
    }
    // if
    switch ($format) {
        case 'date':
            require_once SMARTY_DIR . '/plugins/modifier.date.php';
            $formatted_datetime = smarty_modifier_date($datetime);
            break;
        case 'time':
            require_once SMARTY_DIR . '/plugins/modifier.time.php';
            $formatted_datetime = smarty_modifier_time($datetime);
            break;
        case 'datetime':
            require_once SMARTY_DIR . '/plugins/modifier.datetime.php';
            $formatted_datetime = smarty_modifier_datetime($datetime);
            break;
        default:
            require_once SMARTY_DIR . '/plugins/modifier.ago.php';
            $formatted_datetime = smarty_modifier_ago($datetime);
    }
    // switch
    return lang($action) . ' ' . $formatted_datetime;
}
コード例 #2
0
/**
 * Smarty date modifier plugin
 *
 * Type:     modifier<br>
 * Name:     datetime<br>
 * Purpose:  returns a formatted date and time using date()
 * @param integer
 * @return string
 */
function smarty_modifier_datetime($time, $format = '', $ignore_ofs = false)
{
    global $ps;
    if (empty($format)) {
        $format = $ps->conf['theme']['format']['datetime'];
    }
    if (empty($format)) {
        $format = "Y-m-d H:i:s";
    }
    return smarty_modifier_date($time, $format, $ignore_ofs);
}
コード例 #3
0
/**
 * Return '*** ago' message
 *
 * @param DateTimeValue $input
 * @param integer $offset
 * @return string
 */
function smarty_modifier_ago($input, $offset = null)
{
    if (!instance_of($input, 'DateValue')) {
        return '<span class="ago">' . lang('-- Unknown --') . '</span>';
    }
    // if
    if ($offset === null) {
        $offset = get_user_gmt_offset();
    }
    // if
    $datetime = new DateTimeValue($input->getTimestamp() + $offset);
    $reference = new DateTimeValue(time() + $offset);
    $diff = $reference->getTimestamp() - $datetime->getTimestamp();
    // Get exact number of seconds between current time and yesterday morning
    $reference_timestamp = $reference->getTimestamp();
    $yesterday_begins_at = 86400 + date('G', $reference_timestamp) * 3600 + date('i', $reference_timestamp) * 60 + date('s', $reference_timestamp);
    if ($diff < 60) {
        $value = lang('Few seconds ago');
    } elseif ($diff < 120) {
        $value = lang('A minute ago');
    } elseif ($diff < 3600) {
        $value = lang(':num minutes ago', array('num' => floor($diff / 60)));
    } elseif ($diff < 7200) {
        $value = lang('An hour ago');
    } elseif ($diff < 86400) {
        if (date('j', $datetime->getTimestamp()) != date('j', $reference->getTimestamp())) {
            $value = lang('Yesterday');
        } else {
            $mod = $diff % 3600;
            if ($mod < 900) {
                $value = lang(':num hours ago', array('num' => floor($diff / 3600)));
            } elseif ($mod > 2700) {
                $value = lang(':num hours ago', array('num' => ceil($diff / 3600)));
            } else {
                $value = lang(':num and a half hours ago', array('num' => floor($diff / 3600)));
            }
            // if
        }
        // if
    } elseif ($diff <= $yesterday_begins_at) {
        $value = lang('Yesterday');
    } elseif ($diff < 2592000) {
        $value = lang(':num days ago', array('num' => floor($diff / 86400)));
    } else {
        require_once SMARTY_PATH . '/plugins/modifier.date.php';
        require_once SMARTY_PATH . '/plugins/modifier.datetime.php';
        return '<span class="ago" title="' . clean(smarty_modifier_datetime($datetime, 0)) . '">' . lang('On') . ' ' . smarty_modifier_date($datetime, 0) . '</span>';
    }
    // if
    require_once SMARTY_PATH . '/plugins/modifier.datetime.php';
    return '<span class="ago" title="' . clean(smarty_modifier_datetime($datetime, 0)) . '">' . $value . '</span>';
}
    function content_5778b6e5271ea7_87612051($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_date')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.date.php';
        }
        ?>
  <div class="fldTitle"><?php 
        echo $_smarty_tpl->getSubTemplate('fields/req.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        echo $_smarty_tpl->tpl_vars['title']->value;
        ?>
 <?php 
        if (permitted('confEnableCanada')) {
            ?>
 (Postal Code)<?php 
        }
        ?>
</div>
<input type="text" readonly="readonly" class="inpWide" value="<?php 
        echo smarty_modifier_date($_smarty_tpl->tpl_vars['value']->value);
        ?>
"/>
<?php 
    }
コード例 #5
0
/**
 * Print due on string (due in, due today or late) for a given object
 *
 * @param array $params
 * @param Smarty $smarty
 * @return string
 */
function smarty_function_due($params, &$smarty)
{
    $object = array_var($params, 'object');
    $due_date = null;
    if (instance_of($object, 'ProjectObject')) {
        if ($object->can_be_completed) {
            if ($object->isCompleted()) {
                return lang('Completed');
            }
            // if
            $due_date = $object->getDueOn();
        } else {
            return '--';
        }
        // if
    } elseif (instance_of($object, 'Invoice')) {
        if ($object->getStatus() == INVOICE_STATUS_ISSUED) {
            $due_date = $object->getDueOn();
        } else {
            return '--';
        }
        // if
    } else {
        return new InvalidParamError('object', $object, '$object is not expected to be an instance of ProjectObject or Invoice class', true);
    }
    // if
    $offset = get_user_gmt_offset();
    if (instance_of($due_date, 'DateValue')) {
        require_once SMARTY_PATH . '/plugins/modifier.date.php';
        $date = smarty_modifier_date($due_date, 0);
        // just printing date, offset is 0!
        $reminder_string_begining = '';
        $reminder_string_end = '';
        $sql = "select auto_email_status, email_reminder_period, email_reminder_unit, email_reminder_time from healingcrystals_project_object_misc where object_id=? and auto_email_status='1'";
        $arguments = array($object->getId());
        $sql = db_prepare_string($sql, $arguments);
        $row = db_execute_all($sql);
        if (!empty($row)) {
            $entry = $row[0];
            $auto_email_status = array_var($entry, 'auto_email_status');
            $email_reminder_period = array_var($entry, 'email_reminder_period', '0');
            $email_reminder_unit = array_var($entry, 'email_reminder_unit', 'D');
            $email_reminder_time = array_var($entry, 'email_reminder_time', '06:00');
            $meridian = '';
            list($h, $m) = explode(':', $email_reminder_time);
            $h = (int) $h;
            if ($h > 12) {
                $h -= 12;
                $meridian = 'PM';
            } elseif ($h == 12) {
                $meridian = 'PM';
            } elseif ($h == 0) {
                $meridian = 'AM';
            } else {
                $meridian = 'AM';
            }
            $email_reminder_time = str_pad($h, 2, '0', STR_PAD_LEFT) . ':' . $m . ' ' . $meridian;
            $reminder_string_begining = 'Reminder set for ' . $email_reminder_period . ' ' . ($email_reminder_unit == 'D' ? 'Day(s)' : ($email_reminder_unit == 'W' ? 'Week(s)' : ($email_reminder_unit == 'M' ? 'Month(s)' : ''))) . " from Due Date: ";
            $reminder_string_end = " at " . $email_reminder_time;
        }
        if ($due_date->isToday($offset)) {
            if (!empty($reminder_string_begining)) {
                return '<span class="today">' . $reminder_string_begining . '<span class="number">' . lang('Today') . '</span>' . $reminder_string_end . '</span>';
            } else {
                return '<span class="today"><span class="number">' . lang('Due Today') . '</span></span>';
            }
        } elseif ($due_date->isYesterday($offset)) {
            if (!empty($reminder_string_begining)) {
                return '<span class="late" title="' . clean($date) . '">' . $reminder_string_begining . lang('<span class="number">1 Day Late</span>') . $reminder_string_end . '</span>';
            } else {
                return '<span class="late" title="' . clean($date) . '">' . lang('<span class="number">1 Day Late</span>') . '</span>';
            }
        } elseif ($due_date->isTomorrow($offset)) {
            if (!empty($reminder_string_begining)) {
                return '<span class="upcoming" title="' . clean($date) . '">' . $reminder_string_begining . '<span class="number">' . lang('Tomorrow') . '</span>' . $reminder_string_end . '</span>';
            } else {
                return '<span class="upcoming" title="' . clean($date) . '"><span class="number">' . lang('Due Tomorrow') . '</span></span>';
            }
        } else {
            $now = new DateTimeValue();
            $now->advance($offset);
            $now = $now->beginningOfDay();
            $due_date->beginningOfDay();
            if ($due_date->getTimestamp() > $now->getTimestamp()) {
                //return '<span class="upcoming" title="' . clean($date) . '">' . lang('Due in <span class="number">:days</span> Days', array('days' => floor(($due_date->getTimestamp() - $now->getTimestamp()) / 86400))) . '</span>';
                //return '<span class="upcoming" title="' . clean($date) . '">' . lang('<span class="number">:days</span> Days', array('days' => floor(($due_date->getTimestamp() - $now->getTimestamp()) / 86400))) . '</span>';
                if (!empty($reminder_string_begining)) {
                    return '<span class="upcoming" title="' . clean($date) . '">' . $reminder_string_begining . date('F d, Y', $due_date->getTimestamp()) . lang(' (<span class="number">:days</span> Days)', array('days' => floor(($due_date->getTimestamp() - $now->getTimestamp()) / 86400))) . $reminder_string_end . '</span>';
                } else {
                    return '<span class="upcoming" title="' . clean($date) . '">Due ' . date('F d, Y', $due_date->getTimestamp()) . lang(' (<span class="number">:days</span> Days)', array('days' => floor(($due_date->getTimestamp() - $now->getTimestamp()) / 86400))) . '</span>';
                }
            } else {
                //return '<span class="late" title="' . clean($date) . '">' . lang('<span class="number">:days</span> Days Late', array('days' => floor(($now->getTimestamp() - $due_date->getTimestamp()) / 86400))) . '</span>';
                if (!empty($reminder_string_begining)) {
                    return '<span class="late" title="' . clean($date) . '">' . $reminder_string_begining . date('F d, Y', $due_date->getTimestamp()) . lang(' (<span class="number">:days</span> Days Late)', array('days' => floor(($now->getTimestamp() - $due_date->getTimestamp()) / 86400))) . $reminder_string_end . '</span>';
                } else {
                    return '<span class="late" title="' . clean($date) . '">Due ' . date('F d, Y', $due_date->getTimestamp()) . lang(' (<span class="number">:days</span> Days Late)', array('days' => floor(($now->getTimestamp() - $due_date->getTimestamp()) / 86400))) . '</span>';
                }
            }
            // if
        }
        // if
    } else {
        //return lang('No Due Date');
        return lang('--');
    }
    // if
}
コード例 #6
0
 /**
  * Return associative array of changes that is easy to display
  *
  * @param void
  * @return array
  */
 function getVerboseChanges()
 {
     $result = array();
     if (is_foreachable($this->getChanges())) {
         foreach ($this->getChanges() as $field => $change_data) {
             list($old_value, $new_value) = $change_data;
             $log_fields = array('project_id', 'milestone_id', 'parent_id', 'name', 'body', 'priority', 'due_on');
             switch ($field) {
                 case 'project_id':
                     $old_project = Projects::findById($old_value);
                     $new_project = Projects::findById($new_value);
                     $old_project_name = instance_of($old_project, 'Project') ? $old_project->getName() : lang('unknown project');
                     $new_project_name = instance_of($new_project, 'Project') ? $new_project->getName() : lang('unknown project');
                     $result[] = lang('Moved from <span>:from</span> to <span>:to</span>', array('from' => $old_project_name, 'to' => $new_project_name));
                     break;
                 case 'milestone_id':
                     $old_milestone = Milestones::findById($old_value);
                     $new_milestone = Milestones::findById($new_value);
                     $old_milestone_name = instance_of($old_milestone, 'Milestone') ? $old_milestone->getName() : lang('-- none --');
                     $new_milestone_name = instance_of($new_milestone, 'Milestone') ? $new_milestone->getName() : lang('-- none --');
                     $result[] = lang('Moved from <span>:from</span> to <span>:to</span> milestone', array('from' => $old_milestone_name, 'to' => $new_milestone_name));
                     break;
                 case 'parent_id':
                     $old_parent = ProjectObjects::findById($old_value);
                     $new_parent = ProjectObjects::findById($new_value);
                     $old_parent_name = instance_of($old_parent, 'Category') ? $old_parent->getName() : lang('-- none --');
                     $new_parent_name = instance_of($new_parent, 'Category') ? $new_parent->getName() : lang('-- none --');
                     $result[] = lang('Moved from <span>:from</span> to <span>:to</span> category', array('from' => $old_parent_name, 'to' => $new_parent_name));
                     break;
                 case 'name':
                     $result[] = lang('Summary is changed from <span>:from</span> to <span>:to</span>', array('from' => $old_value, 'to' => $new_value));
                     break;
                 case 'body':
                     $result[] = lang('Long description is changed');
                     break;
                 case 'priority':
                     switch ($old_value) {
                         case PRIORITY_HIGHEST:
                             $old_priority = lang('Highest');
                             break;
                         case PRIORITY_HIGH:
                             $old_priority = lang('High');
                             break;
                         case PRIORITY_NORMAL:
                             $old_priority = lang('Normal');
                             break;
                         case PRIORITY_LOW:
                             $old_priority = lang('Low');
                             break;
                         case PRIORITY_LOWEST:
                             $old_priority = lang('Lowest');
                             break;
                         case PRIORITY_ONGOING:
                             $old_priority = lang('Ongoing');
                             break;
                         case PRIORITY_HOLD:
                             $old_priority = lang('Hold');
                             break;
                     }
                     // switch
                     switch ($new_value) {
                         case PRIORITY_HIGHEST:
                             $new_priority = lang('Highest');
                             break;
                         case PRIORITY_HIGH:
                             $new_priority = lang('High');
                             break;
                         case PRIORITY_NORMAL:
                             $new_priority = lang('Normal');
                             break;
                         case PRIORITY_LOW:
                             $new_priority = lang('Low');
                             break;
                         case PRIORITY_LOWEST:
                             $new_priority = lang('Lowest');
                             break;
                         case PRIORITY_ONGOING:
                             $new_priority = lang('Ongoing');
                             break;
                         case PRIORITY_HOLD:
                             $new_priority = lang('Hold');
                             break;
                     }
                     // switch
                     $result[] = lang('Priority is changed from <span>:from</span> to <span>:to</span>', array('from' => $old_priority, 'to' => $new_priority));
                     break;
                 case 'due_on':
                     require_once SMARTY_PATH . '/plugins/modifier.date.php';
                     $old_due_on = instance_of($old_value, 'DateValue') ? smarty_modifier_date($old_value, 0) : lang('-- none --');
                     $new_due_on = instance_of($new_value, 'DateValue') ? smarty_modifier_date($new_value, 0) : lang('-- none --');
                     $result[] = lang('Due date is changed from <span>:from</span> to <span>:to</span>', array('from' => $old_due_on, 'to' => $new_due_on));
                     break;
                 case 'completed_on':
                     if (instance_of($old_value, 'DateValue') && $new_value === null) {
                         $result[] = lang('Status changed to: Open');
                     } elseif ($old_value === null && instance_of($new_value, 'DateValue')) {
                         $result[] = lang('Status changed to: Completed');
                     }
                     // if
                     break;
                 case 'owner':
                     if ($new_value) {
                         $new_owner = Users::findById($new_value);
                         if (instance_of($new_owner, 'User')) {
                             $result[] = lang(':user is responsible', array('user' => $new_owner->getDisplayName()));
                         } else {
                             $result[] = lang('Owner changed (unknown user or deleted in the meantime)');
                         }
                         // if
                     } else {
                         $result[] = lang('Anyone can pick up and work on this ticket');
                     }
                     // if
                     break;
                 case 'assignees':
                     $old_assignees = array();
                     if (is_foreachable($old_value)) {
                         $old_assignees_users = Users::findByIds($old_value);
                         if (is_foreachable($old_assignees_users)) {
                             foreach ($old_assignees_users as $user) {
                                 $old_assignees[$user->getId()] = $user->getDisplayName();
                             }
                             // foreach
                         }
                         // if
                     }
                     // if
                     $new_assignees = array();
                     if (is_foreachable($new_value)) {
                         $new_assignees_users = Users::findByIds($new_value);
                         if (is_foreachable($new_assignees_users)) {
                             foreach ($new_assignees_users as $user) {
                                 $new_assignees[$user->getId()] = $user->getDisplayName();
                             }
                             // foreach
                         }
                         // if
                     }
                     // if
                     foreach ($new_assignees as $new_assignee_id => $new_assignee) {
                         if (!array_key_exists($new_assignee_id, $old_assignees)) {
                             $result[] = lang(':user has been assigned to this ticket', array('user' => $new_assignee));
                         }
                         // if
                     }
                     // foreach
                     foreach ($old_assignees as $old_assignee_id => $old_assignee) {
                         if (!array_key_exists($old_assignee_id, $new_assignees)) {
                             $result[] = lang(':user has been removed from this ticket', array('user' => $old_assignee));
                         }
                         // if
                     }
                     // foreach
                     break;
             }
             // switch
         }
         // foreach
     }
     // if
     return $result;
 }
コード例 #7
0
function smarty_function_recurring_info($params, &$smarty)
{
    $object = array_var($params, 'object');
    if (!instance_of($object, 'ProjectObject')) {
        return new InvalidParamError('object', $object, '$object is expected to be an instance of ProjectObject', true);
    }
    $info = '';
    $sql = "select recurring_period, recurring_period_type, recurring_period_condition, recurring_end_date from healingcrystals_project_object_misc where object_id=?";
    $arguments = array($object->getId());
    $sql = db_prepare_string($sql, $arguments);
    $row = db_execute_all($sql);
    if (!empty($row)) {
        $entry = $row[0];
        $recurring_period = array_var($entry, 'recurring_period');
        $recurring_period_type = array_var($entry, 'recurring_period_type');
        $recurring_period_condition = array_var($entry, 'recurring_period_condition');
        $recurring_end_date = array_var($entry, 'recurring_end_date');
        if (!empty($recurring_period) && !empty($recurring_period_type) && $recurring_period_condition) {
            $info = 'Recurring every ' . $recurring_period . ' ';
            switch ($recurring_period_type) {
                case 'D':
                    $info .= ' day(s) ';
                    break;
                case 'W':
                    $info .= ' week(s) ';
                    break;
                case 'M':
                    $info .= ' month(s) ';
                    break;
            }
            switch ($recurring_period_condition) {
                case 'after_due_date':
                    $info .= 'after Task is Due';
                    break;
                case 'after_task_complete':
                    $info .= 'after Task has been Completed';
                    break;
            }
            $info = '<span class="recurring">' . $info . '</span>';
        }
    }
    return $info;
    if (instance_of($due_date, 'DateValue')) {
        require_once SMARTY_PATH . '/plugins/modifier.date.php';
        $date = smarty_modifier_date($due_date, 0);
        // just printing date, offset is 0!
        $reminder_string_begining = '';
        $reminder_string_end = '';
        $sql = "select auto_email_status, email_reminder_period, email_reminder_unit, email_reminder_time from healingcrystals_project_object_misc where object_id=?";
        $arguments = array($object->getId());
        $sql = db_prepare_string($sql, $arguments);
        $row = db_execute_all($sql);
        if (!empty($row)) {
            $entry = $row[0];
            $auto_email_status = array_var($entry, 'auto_email_status');
            $email_reminder_period = array_var($entry, 'email_reminder_period', '0');
            $email_reminder_unit = array_var($entry, 'email_reminder_unit', 'D');
            $email_reminder_time = array_var($entry, 'email_reminder_time', '06:00');
            $meridian = '';
            list($h, $m) = explode(':', $email_reminder_time);
            $h = (int) $h;
            if ($h > 12) {
                $h -= 12;
                $meridian = 'PM';
            } elseif ($h == 0) {
                $meridian = 'PM';
            } else {
                $meridian = 'AM';
            }
            $email_reminder_time = str_pad($h, 2, '0', STR_PAD_LEFT) . ':' . $m . ' ' . $meridian;
            $reminder_string_begining = 'Reminder set for ' . $email_reminder_period . ' ' . ($email_reminder_unit == 'D' ? 'Day(s)' : ($email_reminder_unit == 'W' ? 'Week(s)' : ($email_reminder_unit == 'M' ? 'Month(s)' : ''))) . " from Due Date: ";
            $reminder_string_end = " at " . $email_reminder_time;
        }
        if ($due_date->isToday($offset)) {
            if (!empty($reminder_string_begining)) {
                return '<span class="today">' . $reminder_string_begining . '<span class="number">' . lang('Today') . '</span>' . $reminder_string_end . '</span>';
            } else {
                return '<span class="today"><span class="number">' . lang('Due Today') . '</span></span>';
            }
        } elseif ($due_date->isYesterday($offset)) {
            if (!empty($reminder_string_begining)) {
                return '<span class="late" title="' . clean($date) . '">' . $reminder_string_begining . lang('<span class="number">1 Day Late</span>') . $reminder_string_end . '</span>';
            } else {
                return '<span class="late" title="' . clean($date) . '">' . lang('<span class="number">1 Day Late</span>') . '</span>';
            }
        } elseif ($due_date->isTomorrow($offset)) {
            if (!empty($reminder_string_begining)) {
                return '<span class="upcoming" title="' . clean($date) . '">' . $reminder_string_begining . '<span class="number">' . lang('Tomorrow') . '</span>' . $reminder_string_end . '</span>';
            } else {
                return '<span class="upcoming" title="' . clean($date) . '"><span class="number">' . lang('Due Tomorrow') . '</span></span>';
            }
        } else {
            $now = new DateTimeValue();
            $now->advance($offset);
            $now = $now->beginningOfDay();
            $due_date->beginningOfDay();
            if ($due_date->getTimestamp() > $now->getTimestamp()) {
                //return '<span class="upcoming" title="' . clean($date) . '">' . lang('Due in <span class="number">:days</span> Days', array('days' => floor(($due_date->getTimestamp() - $now->getTimestamp()) / 86400))) . '</span>';
                //return '<span class="upcoming" title="' . clean($date) . '">' . lang('<span class="number">:days</span> Days', array('days' => floor(($due_date->getTimestamp() - $now->getTimestamp()) / 86400))) . '</span>';
                if (!empty($reminder_string_begining)) {
                    return '<span class="upcoming" title="' . clean($date) . '">' . $reminder_string_begining . date('F d, Y', $due_date->getTimestamp()) . lang(' (<span class="number">:days</span> Days)', array('days' => floor(($due_date->getTimestamp() - $now->getTimestamp()) / 86400))) . $reminder_string_end . '</span>';
                } else {
                    return '<span class="upcoming" title="' . clean($date) . '">Due ' . date('F d, Y', $due_date->getTimestamp()) . lang(' (<span class="number">:days</span> Days)', array('days' => floor(($due_date->getTimestamp() - $now->getTimestamp()) / 86400))) . '</span>';
                }
            } else {
                //return '<span class="late" title="' . clean($date) . '">' . lang('<span class="number">:days</span> Days Late', array('days' => floor(($now->getTimestamp() - $due_date->getTimestamp()) / 86400))) . '</span>';
                if (!empty($reminder_string_begining)) {
                    return '<span class="late" title="' . clean($date) . '">' . $reminder_string_begining . date('F d, Y', $due_date->getTimestamp()) . lang(' (<span class="number">:days</span> Days Late)', array('days' => floor(($now->getTimestamp() - $due_date->getTimestamp()) / 86400))) . $reminder_string_end . '</span>';
                } else {
                    return '<span class="late" title="' . clean($date) . '">Due ' . date('F d, Y', $due_date->getTimestamp()) . lang(' (<span class="number">:days</span> Days Late)', array('days' => floor(($now->getTimestamp() - $due_date->getTimestamp()) / 86400))) . '</span>';
                }
            }
            // if
        }
        // if
    } else {
        //return lang('No Due Date');
        return lang('--');
    }
    // if
}
コード例 #8
0
 /**
  * Draws invoice details
  *
  * @param null
  * @return null
  */
 function drawInvoiceDetailsBlock()
 {
     //  remember starting coordinates
     $starting_y = $this->GetY();
     $starting_x = $this->GetX();
     $rgb = $this->convertHTMLColorToDec($this->getBodyFontColor());
     $this->SetTextColor($rgb['R'], $rgb['G'], $rgb['B']);
     $block_width = $this->getItemsTableColumnWidth(0) + $this->getItemsTableColumnWidth(1);
     $this->SetFont('', 'B', $this->font_size + 6);
     $this->Cell($block_width, $this->line_height + 3, $this->invoice_label);
     $this->Ln();
     $this->SetFont('', '', $this->font_size);
     $content = '';
     require_once SMARTY_PATH . '/plugins/modifier.date.php';
     if ($this->invoice->isIssued() || $this->invoice->isBilled()) {
         if ($this->invoice->getIssuedOn()) {
             $content .= lang('Issued On: :issued_date', array('issued_date' => smarty_modifier_date($this->invoice->getIssuedOn(), 0)), true, $this->invoice->getLanguage()) . "\n";
         }
         // if
         $content .= lang('Due On: :due_date', array('due_date' => smarty_modifier_date($this->invoice->getDueOn(), 0)), true, $this->invoice->getLanguage()) . "\n";
     }
     // if
     $this->MultiCell($block_width, $this->line_height, $content, 0, 'L', false, 1, '', '', true, 0, false, 1.5);
     $this->Ln();
     $max_y1 = $this->GetY();
     $block_width = $this->getItemsTableColumnWidth(3) + $this->getItemsTableColumnWidth(4) + $this->getItemsTableColumnWidth(5);
     // draw client info
     $corner_width = 5;
     $padding = 5;
     $client_info_starting_x = $this->getPageWidth() - $block_width - $this->lMargin;
     $this->Line($client_info_starting_x, $starting_y, $client_info_starting_x + $corner_width, $starting_y);
     $this->Line($client_info_starting_x, $starting_y, $client_info_starting_x, $starting_y + $corner_width);
     $this->Line($client_info_starting_x + $block_width - $corner_width, $starting_y, $client_info_starting_x + $block_width, $starting_y);
     $this->Line($client_info_starting_x + $block_width, $starting_y, $client_info_starting_x + $block_width, $starting_y + $corner_width);
     $this->SetFont('', 'B', $this->font_size);
     $this->SetY($starting_y + $padding);
     $company_name = $this->invoice->getCompanyName();
     if (instance_of($company = $this->invoice->getCompany(), 'Company')) {
         $company_name = $company->getName();
     }
     // if
     $this->SetX($client_info_starting_x + $padding);
     $this->Cell($block_width - 2 * $padding, $this->line_height, $company_name);
     $this->Ln();
     $this->SetX($client_info_starting_x + $padding);
     $this->SetFont('', '', $this->font_size);
     $this->MultiCell($block_width - 2 * $padding, $this->line_height, $this->invoice->getCompanyAddress(), 0, 'L', false, 1, '', '', true, 0, false, 1.25);
     $max_y2 = $this->GetY();
     $this->Line($client_info_starting_x, $max_y2 + $padding, $client_info_starting_x + $corner_width, $max_y2 + $padding);
     $this->Line($client_info_starting_x, $max_y2 + $padding, $client_info_starting_x, $max_y2 + $padding - $corner_width);
     $this->Line($client_info_starting_x + $block_width - $corner_width, $max_y2 + $padding, $client_info_starting_x + $block_width, $max_y2 + $padding);
     $this->Line($client_info_starting_x + $block_width, $max_y2 + $padding, $client_info_starting_x + $block_width, $max_y2 + $padding - $corner_width);
     $this->SetY(max($max_y1, $max_y2));
 }
    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 
    }
    function content_5642400e54c0b1_98076522($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_date')) {
            include 'C:\\Users\\jkeull\\Documents\\xampp\\htdocs\\shopware\\engine\\Library\\Enlight\\Template/Plugins\\modifier.date.php';
        }
        if (!is_callable('smarty_modifier_truncate')) {
            include 'C:\\Users\\jkeull\\Documents\\xampp\\htdocs\\shopware\\engine\\Library\\Smarty\\plugins\\modifier.truncate.php';
        }
        ?>
<div class="blog--box panel has--border is--rounded">
	

		
		
			<div class="blog--box-header">

				
				
					<h2 class="blog--box-headline panel--title">
						<a class="blog--box-link" href="<?php 
        echo htmlspecialchars(Enlight_Application::Instance()->Front()->Router()->assemble(array('controller' => 'blog', 'action' => 'detail', 'sCategory' => $_smarty_tpl->tpl_vars['sArticle']->value['categoryId'], 'blogArticle' => $_smarty_tpl->tpl_vars['sArticle']->value['id'])));
        ?>
" title="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['sArticle']->value['title'], ENT_QUOTES, 'utf-8', true);
        ?>
"><?php 
        echo $_smarty_tpl->tpl_vars['sArticle']->value['title'];
        ?>
</a>
					</h2>
				

				
				
					<div class="blog--box-metadata">

						
						
							<?php 
        if ($_smarty_tpl->tpl_vars['sArticle']->value['author']['name']) {
            ?>
								<span class="blog--metadata-author blog--metadata is--nowrap is--first"><?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('snippet', array('name' => "BlogInfoFrom", 'namespace' => 'frontend/blog/box'));
            $_block_repeat = true;
            echo Enlight_Components_Snippet_Resource::compileSnippetBlock(array('name' => "BlogInfoFrom", 'namespace' => 'frontend/blog/box'), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>
Von:<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo Enlight_Components_Snippet_Resource::compileSnippetBlock(array('name' => "BlogInfoFrom", 'namespace' => 'frontend/blog/box'), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>
 <?php 
            echo $_smarty_tpl->tpl_vars['sArticle']->value['author']['name'];
            ?>
</span>
							<?php 
        }
        ?>
						

						
						
							<?php 
        if ($_smarty_tpl->tpl_vars['sArticle']->value['displayDate']) {
            ?>
								<span class="blog--metadata-date blog--metadata is--nowrap<?php 
            if (!$_smarty_tpl->tpl_vars['sArticle']->value['author']['name']) {
                ?>
 is--first<?php 
            }
            ?>
"><?php 
            echo smarty_modifier_date($_smarty_tpl->tpl_vars['sArticle']->value['displayDate'], "DATETIME_SHORT");
            ?>
</span>
							<?php 
        }
        ?>
						

						
						
							<?php 
        if ($_smarty_tpl->tpl_vars['sArticle']->value['categoryInfo']['description']) {
            ?>
								<span class="blog--metadata-description is--nowrap">
									<?php 
            if ($_smarty_tpl->tpl_vars['sArticle']->value['categoryInfo']['linkCategory']) {
                ?>
										<a href="<?php 
                echo $_smarty_tpl->tpl_vars['sArticle']->value['categoryInfo']['linkCategory'];
                ?>
" title="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['sArticle']->value['categoryInfo']['description'], ENT_QUOTES, 'utf-8', true);
                ?>
"><?php 
                echo $_smarty_tpl->tpl_vars['sArticle']->value['categoryInfo']['description'];
                ?>
</a>
									<?php 
            } else {
                ?>
										<?php 
                echo $_smarty_tpl->tpl_vars['sArticle']->value['categoryInfo']['description'];
                ?>

									<?php 
            }
            ?>
								</span>
							<?php 
        }
        ?>
						

						
						
							<span class="blog--metadata-comments blog--metadata is--nowrap<?php 
        if (round($_smarty_tpl->tpl_vars['sArticle']->value['sVoteAverage']) == 0) {
            ?>
 is--last<?php 
        }
        ?>
">
								<a href="<?php 
        echo htmlspecialchars(Enlight_Application::Instance()->Front()->Router()->assemble(array('controller' => 'blog', 'action' => 'detail', 'sCategory' => $_smarty_tpl->tpl_vars['sArticle']->value['categoryId'], 'blogArticle' => $_smarty_tpl->tpl_vars['sArticle']->value['id'])));
        ?>
#blog--comments-start"
								   title="<?php 
        ob_start();
        $_smarty_tpl->smarty->_tag_stack[] = array('snippet', array('name' => "BlogLinkComments", 'namespace' => 'frontend/blog/box'));
        $_block_repeat = true;
        echo Enlight_Components_Snippet_Resource::compileSnippetBlock(array('name' => "BlogLinkComments", 'namespace' => 'frontend/blog/box'), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            echo "Zu den Kommentaren des Artikels";
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo Enlight_Components_Snippet_Resource::compileSnippetBlock(array('name' => "BlogLinkComments", 'namespace' => 'frontend/blog/box'), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        $_tmp1 = ob_get_clean();
        echo htmlspecialchars($_tmp1, ENT_QUOTES, 'utf-8', true);
        ?>
">
									<?php 
        if ($_smarty_tpl->tpl_vars['sArticle']->value['numberOfComments']) {
            echo $_smarty_tpl->tpl_vars['sArticle']->value['numberOfComments'];
        } else {
            ?>
0<?php 
        }
        ?>
 <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('snippet', array('name' => "BlogInfoComments", 'namespace' => 'frontend/blog/box'));
        $_block_repeat = true;
        echo Enlight_Components_Snippet_Resource::compileSnippetBlock(array('name' => "BlogInfoComments", 'namespace' => 'frontend/blog/box'), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>
Kommentare<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo Enlight_Components_Snippet_Resource::compileSnippetBlock(array('name' => "BlogInfoComments", 'namespace' => 'frontend/blog/box'), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

								</a>
							</span>
						

						
						
							<?php 
        if (round($_smarty_tpl->tpl_vars['sArticle']->value['sVoteAverage']) != 0) {
            ?>
								<div class="blog--metadata-rating blog--metadata is--nowrap is--last">
                                    <?php 
            /*  Call merged included template "frontend/_includes/rating.tpl" */
            $_tpl_stack[] = $_smarty_tpl;
            $_smarty_tpl = $_smarty_tpl->setupInlineSubTemplate("frontend/_includes/rating.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array('points' => round($_smarty_tpl->tpl_vars['sArticle']->value['sVoteAverage']), 'type' => "aggregated", 'count' => count($_smarty_tpl->tpl_vars['sArticle']->value['comments']), 'microData' => false), 0, '109425642400de21ab3-73262492');
            content_5642400e5e07d2_08506520($_smarty_tpl);
            $_smarty_tpl = array_pop($_tpl_stack);
            /*  End of included template "frontend/_includes/rating.tpl" */
            ?>
                                </div>
							<?php 
        }
        ?>
						
					</div>
				

			</div>
		

		
		
			<div class="blog--box-content panel--body is--wide block">

				
				
					<?php 
        if ($_smarty_tpl->tpl_vars['sArticle']->value['media']) {
            ?>
						<div class="blog--box-picture">
							<a href="<?php 
            echo htmlspecialchars(Enlight_Application::Instance()->Front()->Router()->assemble(array('controller' => 'blog', 'action' => 'detail', 'sCategory' => $_smarty_tpl->tpl_vars['sArticle']->value['categoryId'], 'blogArticle' => $_smarty_tpl->tpl_vars['sArticle']->value['id'])));
            ?>
"
							   class="blog--picture-main"
							   title="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['sArticle']->value['title'], ENT_QUOTES, 'utf-8', true);
            ?>
">
								<?php 
            if (isset($_smarty_tpl->tpl_vars['sArticle']->value['media']['thumbnails'])) {
                ?>
									<img srcset="<?php 
                echo $_smarty_tpl->tpl_vars['sArticle']->value['media']['thumbnails'][0]['sourceSet'];
                ?>
"
										 alt="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['sArticle']->value['title'], ENT_QUOTES, 'utf-8', true);
                ?>
"
										 title="<?php 
                echo smarty_modifier_truncate(htmlspecialchars($_smarty_tpl->tpl_vars['sArticle']->value['title'], ENT_QUOTES, 'utf-8', true), 25, '');
                ?>
" />
								<?php 
            } else {
                ?>
									<img src="/shopware/themes/Frontend/Responsive/frontend/_public/src/img/no-picture.jpg"
										 alt="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['sArticle']->value['title'], ENT_QUOTES, 'utf-8', true);
                ?>
"
										 title="<?php 
                echo smarty_modifier_truncate(htmlspecialchars($_smarty_tpl->tpl_vars['sArticle']->value['title'], ENT_QUOTES, 'utf-8', true), 25, '');
                ?>
" />
								<?php 
            }
            ?>
							</a>
						</div>
					<?php 
        }
        ?>
				

				
				
					<div class="blog--box-description<?php 
        if (!$_smarty_tpl->tpl_vars['sArticle']->value['media']) {
            ?>
 is--fluid<?php 
        }
        ?>
">

						
							<div class="blog--box-description-short">
								<?php 
        if ($_smarty_tpl->tpl_vars['sArticle']->value['shortDescription']) {
            echo nl2br($_smarty_tpl->tpl_vars['sArticle']->value['shortDescription']);
        } else {
            echo $_smarty_tpl->tpl_vars['sArticle']->value['shortDescription'];
        }
        ?>
							</div>
						

						
						
							<div class="blog--box-readmore">
								<a href="<?php 
        echo htmlspecialchars(Enlight_Application::Instance()->Front()->Router()->assemble(array('controller' => 'blog', 'action' => 'detail', 'sCategory' => $_smarty_tpl->tpl_vars['sArticle']->value['categoryId'], 'blogArticle' => $_smarty_tpl->tpl_vars['sArticle']->value['id'])));
        ?>
" title="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['sArticle']->value['title'], ENT_QUOTES, 'utf-8', true);
        ?>
" class="btn is--primary is--small"><?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('snippet', array('name' => "BlogLinkMore", 'namespace' => 'frontend/blog/box'));
        $_block_repeat = true;
        echo Enlight_Components_Snippet_Resource::compileSnippetBlock(array('name' => "BlogLinkMore", 'namespace' => 'frontend/blog/box'), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>
Mehr lesen<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo Enlight_Components_Snippet_Resource::compileSnippetBlock(array('name' => "BlogLinkMore", 'namespace' => 'frontend/blog/box'), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>
</a>
							</div>
						

						
						
							<div class="blog--box-tags">
								<?php 
        if (count($_smarty_tpl->tpl_vars['sArticle']->value['tags']) > 1) {
            ?>
									<strong><?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('snippet', array('name' => "BlogInfoTags", 'namespace' => 'frontend/blog/box'));
            $_block_repeat = true;
            echo Enlight_Components_Snippet_Resource::compileSnippetBlock(array('name' => "BlogInfoTags", 'namespace' => 'frontend/blog/box'), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>
Tags:<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo Enlight_Components_Snippet_Resource::compileSnippetBlock(array('name' => "BlogInfoTags", 'namespace' => 'frontend/blog/box'), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>
</strong>
									<?php 
            $_smarty_tpl->tpl_vars['tag'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['tag']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['sArticle']->value['tags'];
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            $_smarty_tpl->tpl_vars['tag']->total = $_smarty_tpl->_count($_from);
            $_smarty_tpl->tpl_vars['tag']->iteration = 0;
            foreach ($_from as $_smarty_tpl->tpl_vars['tag']->key => $_smarty_tpl->tpl_vars['tag']->value) {
                $_smarty_tpl->tpl_vars['tag']->_loop = true;
                $_smarty_tpl->tpl_vars['tag']->iteration++;
                $_smarty_tpl->tpl_vars['tag']->last = $_smarty_tpl->tpl_vars['tag']->iteration === $_smarty_tpl->tpl_vars['tag']->total;
                ?>
										<a href="<?php 
                echo $_smarty_tpl->tpl_vars['tag']->value['link'];
                ?>
" title="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['tag']->value['name'], ENT_QUOTES, 'utf-8', true);
                ?>
"><?php 
                echo $_smarty_tpl->tpl_vars['tag']->value['name'];
                ?>
</a><?php 
                if (!$_smarty_tpl->tpl_vars['tag']->last) {
                    ?>
, <?php 
                }
                ?>
									<?php 
            }
            ?>
								<?php 
        }
        ?>
							</div>
						

					</div>
				

			</div>
		

	
</div><?php 
    }
コード例 #11
0
/**
 * Group objects by given date
 *
 * @param array $objects
 * @param User $user
 * @param string $getter
 * @param boolean $today_yesterday
 * @return array
 */
function group_by_date($objects, $user = null, $getter = 'getCreatedOn', $today_yesterday = true)
{
    $result = array();
    if (is_foreachable($objects)) {
        require_once SMARTY_PATH . '/plugins/modifier.date.php';
        $offset = instance_of($user, 'User') ? get_user_gmt_offset($user) : 0;
        foreach ($objects as $object) {
            $gmt = $object->{$getter}();
            if (instance_of($gmt, 'DateValue')) {
                $date = $gmt->advance($offset, false);
                // advance, but don't mutate
                if ($today_yesterday) {
                    if ($date->isToday($offset)) {
                        $date_string = lang('Today');
                    } elseif ($date->isYesterday($offset)) {
                        $date_string = lang('Yesterday');
                    } else {
                        $date_string = smarty_modifier_date($date);
                    }
                    // if
                } else {
                    $date_string = smarty_modifier_date($date);
                }
                // if
                if (!isset($result[$date_string])) {
                    $result[$date_string] = array();
                }
                // if
                $result[$date_string][] = $object;
            }
            // if
        }
        // foreach
    }
    // if
    return $result;
}
コード例 #12
0
        ?>
</td>
            <td><?php 
        echo is_array($_tmp = $this->_tpl_vars['sale']->get('totalcost')) ? $this->_run_mod_handler('currency', true, $_tmp) : smarty_modifier_currency($_tmp);
        ?>
</td>
            <td><?php 
        echo $this->_tpl_vars['sale']->get('orderid');
        ?>
</td>
            <td><?php 
        echo $this->_tpl_vars['sale']->get('productid');
        ?>
</td>
            <td><?php 
        echo is_array($_tmp = $this->_tpl_vars['sale']->get('dateinserted')) ? $this->_run_mod_handler('date', true, $_tmp) : smarty_modifier_date($_tmp);
        ?>
</td>
            <td><?php 
        echo $this->_tpl_vars['sale']->get('name');
        ?>
</td>
            <td><?php 
        echo $this->_tpl_vars['sale']->get('rtype');
        ?>
</td>            
            <td><?php 
        echo $this->_tpl_vars['sale']->get('rstatus');
        ?>
</td>
            <td><?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 
    }
コード例 #14
0
 /**
  * Render log for mobile devices
  *
  * @param ProjectObject $object
  * @param boolean $in_project
  * @return string
  */
 function renderMobile($object = null, $in_project = false)
 {
     if ($object === null) {
         $object = $this->getObject();
     }
     // if
     require_once SMARTY_PATH . '/plugins/modifier.date.php';
     if (instance_of($object, 'ProjectObject')) {
         $return_string .= '<a href="' . mobile_access_module_get_view_url($object) . '">' . '<span class="object_type">' . $object->getVerboseType() . '</span>' . '<span class="main_link"><span>' . str_excerpt(clean($object->getName()), 40) . '</span></span>' . '<span class="details">' . ucfirst(lang($this->action_name)) . ' ' . lang('by') . ' <strong>' . clean($this->getCreatedByName()) . '</strong><br/>' . smarty_modifier_date($this->getCreatedOn()) . '</span>' . '</a>';
     }
     return $return_string;
 }
コード例 #15
0
/**
 * Renders action string with time when action was taken and link to profile of 
 * user who acted
 * 
 * Parameteres:
 * 
 * - action - Action string, default is 'Posted'. It is used for lang retrival
 * - user - User who took the action. Can be registered user or anonymous user
 * - datetime - Datetime object when action was taken
 * - format - Format in with time is displayed. Possible values are ago, 
 *   datetime, date and time. Default is 'ago'
 *
 * @param array $params
 * @param Smarty $smarty
 * @return string
 */
function smarty_function_action_on_by($params, &$smarty)
{
    $action = clean(array_var($params, 'action', 'Posted'));
    $datetime = array_var($params, 'datetime');
    if (!instance_of($datetime, 'DateValue')) {
        return new InvalidParamError('datetime', $datetime, '$datetime is expected to be an instance of DateValue or DateTimeValue class', true);
    }
    // if
    $format = array_var($params, 'format', 'ago');
    if (!in_array($format, array('ago', 'date', 'datetime', 'time'))) {
        return new InvalidParamError('format', $format, 'Format is requred to be one of following four values: ago, date, datetime or time', true);
    }
    // if
    $offset = array_var($params, 'offset', null);
    switch ($format) {
        case 'date':
            require_once SMARTY_DIR . '/plugins/modifier.date.php';
            $formatted_datetime = smarty_modifier_date($datetime, $offset);
            break;
        case 'time':
            require_once SMARTY_DIR . '/plugins/modifier.time.php';
            $formatted_datetime = smarty_modifier_time($datetime, $offset);
            break;
        case 'datetime':
            require_once SMARTY_DIR . '/plugins/modifier.datetime.php';
            $formatted_datetime = smarty_modifier_datetime($datetime, $offset);
            break;
        default:
            require_once SMARTY_DIR . '/plugins/modifier.ago.php';
            $formatted_datetime = smarty_modifier_ago($datetime, $offset);
    }
    // switch
    $user = array_var($params, 'user');
    //BOF:mod 20110708 ticketid202
    /*
    //EOF:mod 20110708 ticketid202
    if(instance_of($user, 'User')) {
      return lang($action) . ' ' . $formatted_datetime . ' ' . lang('by') . ' <a href="'. $user->getViewUrl() .'">' . clean($user->getDisplayName()) . '</a>';
    } elseif(instance_of($user, 'AnonymousUser')) {
      return lang($action) . ' ' . $formatted_datetime . ' ' . lang('by') . ' <a href="mailto:'. $user->getEmail() .'">' . clean($user->getName()) . '</a>';
    } else {
      return lang($action) . ' ' . $formatted_datetime . ' ' . lang('by unknown user');
    } // if
    //BOF:mod 20110708 ticketid202
    */
    $comment_link = '';
    $parent_obj = array_var($params, 'parent_obj');
    if ($parent_obj) {
        $type = $parent_obj->getType();
        if ($type == 'Comment') {
            $comment_link = '&nbsp;&nbsp;<a href="' . $parent_obj->getViewUrl() . '">View Comment</a>';
        }
    }
    //BOF:mod 20120913
    /*
    //EOF:mod 20120913
        if(instance_of($user, 'User')) {
          return lang($action) . ' ' . $formatted_datetime . ' ' . lang('by') . ' <a href="'. $user->getViewUrl() .'">' . clean($user->getDisplayName()) . '</a>' . $comment_link;
        } elseif(instance_of($user, 'AnonymousUser')) {
          return lang($action) . ' ' . $formatted_datetime . ' ' . lang('by') . ' <a href="mailto:'. $user->getEmail() .'">' . clean($user->getName()) . '</a>' . $comment_link;
        } else {
          return lang($action) . ' ' . $formatted_datetime . ' ' . lang('by unknown user') . $comment_link;
        } // if
    //BOF:mod 20120913
    */
    return lang($action) . ' ' . $formatted_datetime . ' ' . $comment_link;
    //EOF:mod 20120913
    //EOF:mod 20110708 ticketid202
}
    function content_564240286ad875_91503959($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_date')) {
            include 'C:\\Users\\jkeull\\Documents\\xampp\\htdocs\\shopware\\engine\\Library\\Enlight\\Template/Plugins\\modifier.date.php';
        }
        ?>
<div class="review--entry is--answer<?php 
        if ($_smarty_tpl->tpl_vars['isLast']->value) {
            ?>
 is--last<?php 
        }
        ?>
">

	
	
		<div class="entry--header">

			
			
				<strong class="content--label">
					<?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('snippet', array('name' => "DetailCommentInfoFrom", 'namespace' => 'frontend/detail/comment'));
        $_block_repeat = true;
        echo Enlight_Components_Snippet_Resource::compileSnippetBlock(array('name' => "DetailCommentInfoFrom", 'namespace' => 'frontend/detail/comment'), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>
Von:<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo Enlight_Components_Snippet_Resource::compileSnippetBlock(array('name' => "DetailCommentInfoFrom", 'namespace' => 'frontend/detail/comment'), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

				</strong>
			

			
			
				<span class="content--field">
					<?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('snippet', array('name' => "DetailCommentInfoFromAdmin", 'namespace' => 'frontend/detail/comment'));
        $_block_repeat = true;
        echo Enlight_Components_Snippet_Resource::compileSnippetBlock(array('name' => "DetailCommentInfoFromAdmin", 'namespace' => 'frontend/detail/comment'), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>
Admin<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo Enlight_Components_Snippet_Resource::compileSnippetBlock(array('name' => "DetailCommentInfoFromAdmin", 'namespace' => 'frontend/detail/comment'), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

				</span>
			

			
			
				<strong class="content--label">
					<?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('snippet', array('name' => "DetailCommentInfoAt", 'namespace' => 'frontend/detail/comment'));
        $_block_repeat = true;
        echo Enlight_Components_Snippet_Resource::compileSnippetBlock(array('name' => "DetailCommentInfoAt", 'namespace' => 'frontend/detail/comment'), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>
Am:<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo Enlight_Components_Snippet_Resource::compileSnippetBlock(array('name' => "DetailCommentInfoAt", 'namespace' => 'frontend/detail/comment'), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

				</strong>
			

			
			
				<span class="content--field">
					<?php 
        echo smarty_modifier_date($_smarty_tpl->tpl_vars['vote']->value['answer_date'], "DATE_MEDIUM");
        ?>

				</span>
			
		</div>
	

	
	
		<div class="entry--content">
			<p class="content--box review--content">
				<?php 
        echo $_smarty_tpl->tpl_vars['vote']->value['answer'];
        ?>

			</p>
		</div>
	
</div><?php 
    }