<?php /* Smarty version 2.6.22, created on 2014-02-11 19:30:12
         compiled from /home/joomaria/public_html/zipmarket/apps/admin/index.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'string_format', '/home/joomaria/public_html/zipmarket/apps/admin/index.html', 62, false),array('modifier', 'date_format', '/home/joomaria/public_html/zipmarket/apps/admin/index.html', 131, false),)), $this); ?>
<div class="page-info">
    <div class="container">
      <div id="breadcrumbs">
        <a href="/" class="first">صفحه اصلی</a> \ </div>
       <h2 class="page-title">داشبورد مدیریت </h2>
    </div>
	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['root_path'])."/zipmarket/apps/admin/admin_tabsy.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
</div>
<div id="content">
      <div class="container">
	  		
<div class="content-s">
<div id="finance_chart"></div>
<br />
<?php if ($this->_tpl_vars['updated_items']): ?>
<div id="sales_chart"></div>
<?php endif; ?>
</div>

<div class="sidebar-l sidebar-right">


<?php if ($this->_tpl_vars['lastContact']): ?>
<h2 class="box-heading">مرکز پشتیبانی</h2>
<table class="general_table">
<tbody>
<?php $_from = $this->_tpl_vars['lastContact']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['i']):
?>
<tr><td><a href="?m=contacts&c=view&id=<?php echo $this->_tpl_vars['i']['id']; ?>
">پیام</a> از <?php echo $this->_tpl_vars['i']['name']; ?>
</td></tr>
<?php endforeach; endif; unset($_from); ?>
</tbody>
</table>
<?php endif; ?>

<?php if ($this->_tpl_vars['items']): ?>
<h2 class="box-heading"><?php echo $this->_tpl_vars['lang']['items_for_approve']; ?>
</h2>
<table class="general_table">
<tbody>
<?php $_from = $this->_tpl_vars['items']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['i']):
?>
<tr><td><a href="?m=items&c=queue_view&id=<?php echo $this->_tpl_vars['i']['id']; ?>
" title=""><?php echo $this->_tpl_vars['i']['name']; ?>
</td></tr>
<?php endforeach; endif; unset($_from); ?>
</tbody>
</table>
<?php endif; ?>

<?php if ($this->_tpl_vars['updated_items']): ?>
<h2 class="box-heading"><?php echo $this->_tpl_vars['lang']['queue_update']; ?>
</h2>
<table class="general_table">
<tbody>
<?php $_from = $this->_tpl_vars['updated_items']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['i']):
?>
<tr><td><a href="?m=items&c=queue_view_update&id=<?php echo $this->_tpl_vars['i']['id']; ?>
" title=""><?php echo $this->_tpl_vars['i']['name']; ?>
</td></tr>
<?php endforeach; endif; unset($_from); ?>
</tbody>
</table>
<?php endif; ?>

<h2 class="box-heading">وضعیت</h2>
<table class="general_table">	
<tbody>
		<tr>
			<td>درآمد ماهانه</td>
			<td class="ta-right"></td>
			<td class="ta-right"><?php echo ((is_array($_tmp=$this->_tpl_vars['sales']['total'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
 <?php echo $this->_tpl_vars['currency']['symbol']; ?>
</td>
		</tr>
		<tr>
			<td>درآمد ماهانه کاربران</td>
			<td class="ta-right"></td>
			<td class="ta-right"><?php echo ((is_array($_tmp=$this->_tpl_vars['sales']['receive'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
 <?php echo $this->_tpl_vars['currency']['symbol']; ?>
</td>
		</tr>
		<tr>
			<td><strong>در آمد کلی ماهانه</strong></td>
			<td class="ta-right"></td>
			<td class="ta-right"><strong style="color: <?php if ($this->_tpl_vars['sales']['win'] > 0): ?>green<?php else: ?>red<?php endif; ?>;"><?php echo ((is_array($_tmp=$this->_tpl_vars['sales']['win'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
 <?php echo $this->_tpl_vars['currency']['symbol']; ?>
</strong></td>
		</tr>
	</tbody>
</table>
</div>
      </div>
    </div>
<script type="text/javascript" src="<?php echo $this->_tpl_vars['data_server']; ?>
j_s/highcharts/themes/gray.js"></script>

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

	var finance_chart, sales_chart;
	$(document).ready(function() {
		finance_chart = new Highcharts.Chart({
			credits: {
				enabled: false
			},
			chart: {
				renderTo: \'finance_chart\', 
				defaultSeriesType: \'area\'
			},	
            legend: {
                align: \'center\',
                verticalAlign: \'top\',
                y: 0,
                floating: false,
                borderWidth: 0
            },			
			title: {
				text: ""
			},
			xAxis: {
				categories: '; ?>
<?php echo $this->_tpl_vars['days']; ?>
<?php echo '
			},
			yAxis: {
				title: {
					text: \'\'
				},
				min: 0
			},
			plotOptions: {
				area: {
					marker: {
						enabled: false,
						symbol: \'circle\',
						radius: 2,
						states: {
							hover: {
								enabled: true
							}
						}
					}
				}
			},
			tooltip: {
			    shared: true,
                crosshairs: true,
                valueSuffix: \' '; ?>
<?php echo $this->_tpl_vars['valuta']; ?>
<?php echo '\',
                headerFormat: \'{point.key} '; ?>
<?php echo ((is_array($_tmp=time())) ? $this->_run_mod_handler('date_format', true, $_tmp, 'j F Y') : smarty_modifier_date_format($_tmp, 'j F Y')); ?>
<?php echo '<br />\'
			},
			series: '; ?>
<?php echo $this->_tpl_vars['finance_array']; ?>
<?php echo '
		});

		sales_chart = new Highcharts.Chart({
			credits: {
				enabled: false
			},
            legend: { 
                align: \'center\',
                verticalAlign: \'top\',
                y: 0,
                floating: false,
                borderWidth: 0
            },		
			chart: {
				renderTo: \'sales_chart\', 
				defaultSeriesType: \'area\'
			},				
			title: {
				text: ""
			},
			xAxis: {
				categories: '; ?>
<?php echo $this->_tpl_vars['days']; ?>
<?php echo '
			},
			yAxis: {
				title: {
					text: \'\'
				},
				min: 0
			},
			tooltip: {
			    shared: true,
                crosshairs: true,
                headerFormat: \'{point.key} '; ?>
<?php echo ((is_array($_tmp=time())) ? $this->_run_mod_handler('date_format', true, $_tmp, 'j F Y') : smarty_modifier_date_format($_tmp, 'j F Y')); ?>
<?php echo '<br />\'
	
			},
			series: '; ?>
<?php echo $this->_tpl_vars['sales_array']; ?>
<?php echo '
		});
	});
		
</script>
'; ?>