Exemplo n.º 1
0
 function index()
 {
     $this->rapyd->load("dataform");
     $this->load->helper('openflash');
     if ($this->uri->segment(4)) {
         $anio = $this->uri->segment(4);
     } elseif (isset($_POST['anio'])) {
         $anio = $_POST['anio'];
     }
     if (empty($anio)) {
         $anio = date("Y");
     }
     $filter = new DataForm('ventas/vendedoresanuales');
     $filter->title('Filtro de Ventas Anuales');
     $filter->anio = new inputField("Año", "anio");
     $filter->anio->size = 4;
     $filter->anio->insertValue = $anio;
     $filter->anio->rule = "max_length[4]";
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('ventas/vendedoresanuales /index'), array('anio')), $position = "BL");
     $filter->build_form();
     $grafico = open_flash_chart_object(760, 300, site_url("ventas/vendedoresanuales/grafico/{$anio}/"));
     $data['content'] = $grafico;
     $data['content'] .= $filter->output;
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = $this->rapyd->get_head() . "<h1>Ventas</h1>";
     $this->load->view('view_ventanas', $data);
 }
Exemplo n.º 2
0
    function index()
    {
        $this->rapyd->load("datagrid2");
        $this->rapyd->load("dataform");
        $this->load->helper('openflash');
        if ($this->uri->segment(4)) {
            $anio = $this->uri->segment(4);
        } elseif (isset($_POST['anio'])) {
            $anio = $_POST['anio'];
        }
        if (empty($anio)) {
            $anio = date("Y");
        }
        $fechai = $anio . '0101';
        $fechaf = $anio . '1231';
        $filter = new DataForm('hospitalidad/anuales');
        $filter->title('Filtro de ventas Anuales');
        $filter->anio = new inputField("A&ntilde;o", "anio");
        $filter->anio->size = 4;
        $filter->anio->insertValue = $anio;
        $filter->anio->maxlength = 4;
        //$filter->anio->onkeypress="return acceptNum(event)";
        $filter->button("btnsubmit", "Buscar", form2uri(site_url('hospitalidad/anuales/index'), array('anio')), $position = "BL");
        $filter->build_form();
        $data = $this->_sincrodata($fechai, $fechaf);
        $grid = new DataGrid2('', $data);
        $grid->totalizar('impuesto', 'cobrado', 'contado', 'credito', 'subtotal', 'numfac');
        $grid->column("Mes", "mes");
        $grid->column("Sub-Total", "<number_format><#subtotal#>|2|,|.</number_format>", 'align=right');
        $grid->column("Impuesto", "<number_format><#impuesto#>|2|,|.</number_format>", 'align=right');
        $grid->column("Contado", "<number_format><#contado#>|2|,|.</number_format>", 'align=right');
        $grid->column("Credito", "<number_format><#credito#>|2|,|.</number_format>", 'align=right');
        $grid->column("Cobrado", "<number_format><#cobrado#>|2|,|.</number_format>", 'align=right');
        $grid->column("% Ventas", "<number_format><#porcentaje#>|2|,|.</number_format>", 'align=right');
        $grid->column("Cant. Fact", "numfac", 'align=right');
        $grid->build();
        $data['content'] = open_flash_chart_object(680, 300, site_url("hospitalidad/anuales/grafico/{$anio}"));
        $data['content'] .= $filter->output . $grid->output;
        $data['title'] = $this->rapyd->get_head() . "<h1>Ventas Anuales</h1>";
        $data['script'] = '<script type="text/javascript">
		$(document).ready(function() {
			$("#anio").keypress(function(event) {
				acceptNum(evt);
				return false;
			});
		});
	  var nav4 = window.Event ? true : false;
	  function acceptNum(evt)
    {	
    		var key = nav4 ? evt.which : evt.keyCode;	
    		return (key <= 13 || (key >= 48 && key <= 57));
    		
    }
		</script>';
        $data["head"] = script("jquery-1.2.6.pack.js") . $this->rapyd->get_head();
        $this->load->view('view_ventanas', $data);
    }
Exemplo n.º 3
0
 function index()
 {
     $this->rapyd->load("datagrid2");
     $this->rapyd->load("dataform");
     $this->load->helper('openflash');
     if ($this->uri->segment(4)) {
         $mes = $this->uri->segment(4);
     } elseif (isset($_POST['mes'])) {
         $mes = $_POST['mes'];
     }
     if ($this->uri->segment(5)) {
         $anio = $this->uri->segment(5);
     } elseif (isset($_POST['anio'])) {
         $anio = $_POST['anio'];
     }
     if (empty($mes) or empty($anio)) {
         $mes = date("n");
     }
     $anio = date("Y");
     $fechai = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '01';
     $fechaf = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '31';
     $filter = new DataForm('ventas/mensuales');
     $filter->attributes = array('onsubmit' => "this.action='index/'+this.form.mes.value+'/'+this.form.anio.value+'/';return FALSE;");
     $filter->title('Filtro de ventas mensuales');
     $filter->mes = new dropdownField("Mes/A&ntilde;o", "mes");
     for ($i = 1; $i < 13; $i++) {
         $filter->mes->option(str_pad($i, 2, '0', STR_PAD_LEFT), str_pad($i, 2, '0', STR_PAD_LEFT));
     }
     $filter->mes->size = 2;
     $filter->mes->style = '';
     $filter->mes->insertValue = $mes;
     $filter->anio = new inputField("A&ntilde;o", "anio");
     $filter->anio->in = 'mes';
     $filter->anio->size = 4;
     $filter->anio->insertValue = $anio;
     $filter->anio->maxlength = 4;
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('hospitalidad/mensuales/index'), array('mes', 'anio')), $position = "BL");
     $filter->build_form();
     $data = $this->_sincrodata($fechai, $fechaf);
     $grid = new DataGrid2('', $data);
     $grid->totalizar('impuesto', 'cobrado', 'contado', 'credito', 'subtotal', 'numfac');
     $grid->column("Dia", "dia");
     $grid->column("Sub-Total", "<number_format><#subtotal#>|2|,|.</number_format>", 'align=right');
     $grid->column("Impuesto", "<number_format><#impuesto#>|2|,|.</number_format>", 'align=right');
     $grid->column("Contado", "<number_format><#contado#>|2|,|.</number_format>", 'align=right');
     $grid->column("Credito", "<number_format><#credito#>|2|,|.</number_format>", 'align=right');
     $grid->column("Cobrado", "<number_format><#cobrado#>|2|,|.</number_format>", 'align=right');
     $grid->column("% Ventas", "<number_format><#porcentaje#>|2|,|.</number_format>", 'align=right');
     $grid->column("Cant. Fact", "numfac", 'align=right');
     $grid->build();
     $data['content'] = open_flash_chart_object(680, 300, site_url("hospitalidad/mensuales/grafico/{$mes}/{$anio}"));
     $data['content'] .= $filter->output . $grid->output;
     $data['title'] = $this->rapyd->get_head() . "<h1>Ventas Mensuales</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
Exemplo n.º 4
0
 function index($parametros = 'nada', $algo = 'nada')
 {
     $grafico = open_flash_chart_object(800, 300, site_url("demo/grafico/Grafico"));
     $data['content'] = $grafico;
     $data["head"] = '';
     $data['title'] = ' Demo ';
     $this->load->view('view_ventanas', $data);
     /*$data['titulo1']=$parametros;
     		$this->layout->buildPage('bienvenido/home', $data);	*/
 }
Exemplo n.º 5
0
 function index()
 {
     //$this->rapyd->load("datagrid");
     $this->rapyd->load("dataform");
     $this->load->helper('openflash');
     if ($this->uri->segment(4)) {
         $anio = $this->uri->segment(4);
     } elseif (isset($_POST['anio'])) {
         $anio = $_POST['anio'];
     }
     if (empty($anio)) {
         $anio = date("Y");
     }
     $fechai = $anio . '0101';
     $fechaf = $anio . '1231';
     $filter = new DataForm('nomina/promediosueldos');
     $filter->title('Filtro de Promedio de Sueldos');
     $filter->anio = new inputField("A&ntilde;o", "anio");
     $filter->anio->size = 4;
     $filter->anio->insertValue = $anio;
     $filter->anio->rule = "max_length[4]";
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('nomina/promediosueldos /index'), array('anio')), $position = "BL");
     $filter->build_form();
     /*
     		$grid = new DataGrid();
     		$select=array( "fecha","MONTH(fecha)as mes",                                            
     		"SUM(montonet*IF(tipo_doc='D', -1, 1)) AS anterior",                             
     		"SUM(credito*IF(tipo_doc='D', -1, 1)) as contado",        
     		"SUM(inicial*IF(tipo_doc='D', -1, 1)) as credito", 
         "FORMAT(sum(montotot*IF(tipo_doc='D',-1,1)),2) AS subtotal", 
         "FORMAT(sum(montoiva*IF(tipo_doc='D',-1,1)),2) AS impuesto", 
         "COUNT(*) AS numfac"); 
                  		
     		$grid->db->select($select);  
     		$grid->db->from("scst");
     		$grid->db->where('a.tipo<>','X');
     		$grid->db->where('fecha >= ', $fechai);  
     		$grid->db->where('fecha <= ',$fechaf); 
     		$grid->db->groupby("mes");
     		
     		$grid->column("Fecha"          , "fecha"    );
     		$grid->column("Sub-Total"      , "subtotal" ,'align=right');
     		$grid->column("Impuesto"       , "impuesto" ,'align=right');
     		$grid->column("Total"          , "anterior",'align=right');
     		$grid->column("Contado"        , "contado"  ,'align=right');
     		$grid->column("Credito"        , "credito"  ,'align=right');
     		$grid->column("N&uacute;mero"  , "numfac"   ,'align=right');
     		$grid->build();*/
     $grafico = open_flash_chart_object(760, 300, site_url("nomina/promediosueldos/grafico/{$anio}/"));
     $data['content'] = $grafico;
     $data['content'] .= $filter->output;
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = $this->rapyd->get_head() . " Nomina ";
     $this->load->view('view_ventanas', $data);
 }
/**
 *
 * Name:        openflashchart
 * Type:        function
 * Purpose: This TAG inserts a openflashchart flash object.
 *
 * Calls the openflashchart object from templates-side with parameters applied
 * {openflashchart ...}
 * Parameters: width, heigth, url, data, swfobject, baseurl, debug
 *
 * Example usage:
 * {openflashchart width="200" height="200" url="http" data="" swfobject=false debug=false}
 *
 * @param array $params as described above
 * @return string
 */
function smarty_function_openflashchart($params)
{
    include ROOT_LIBRARIES . 'open-flash-chart/php-ofc-library/open_flash_chart_object.php';
    // auto-prefix url with www_root if http is not in the url string
    $params['url'] = WWW_ROOT . '/' . $params['url'];
    $params += array('width' => 320, 'height' => 200, 'url' => WWW_ROOT . '/' . $params['url'], 'swfobject' => false, 'baseurl' => WWW_ROOT . 'libraries/open-flash-chart/');
    open_flash_chart_object($params['width'], $params['height'], $params['url'], $params['swfobject'], $params['baseurl']);
    if (isset($params['debug']) and $params['debug'] == true or DEBUG == true) {
        echo '<br /> The source for the dynamic data is: <a target="_blank" href="' . $params['url'] . '">' . $params['url'] . '</a>';
    }
}
Exemplo n.º 7
0
function smarty_function_ofc($args, &$smarty)
{
    include_once PS_ROOTDIR . "/includes/ofc/open_flash_chart_object.php";
    $args += array('width' => 320, 'height' => 240, 'url' => null, 'data' => null, 'swfobject' => true, 'baseurl' => 'includes/ofc/');
    if ($args['url'] == null) {
        if ($args['data'] == null) {
            $args['url'] = $_SERVER['PHP_SELF'] . '?ofc=1';
        } else {
            $args['url'] = $_SERVER['PHP_SELF'] . '?ofc=' . $args['data'];
        }
    }
    // this prints, so no need to return
    open_flash_chart_object($args['width'], $args['height'], $args['url'], $args['swfobject'], $args['baseurl']);
}
Exemplo n.º 8
0
 function index()
 {
     $this->rapyd->load("dataform");
     $this->load->helper('openflash');
     $mes = $this->uri->segment(4);
     $anio = $this->uri->segment(5);
     if (empty($mes)) {
         $mes = date("m");
     }
     if (empty($anio)) {
         $anio = date("Y");
     }
     $fechai = $anio . $mes . '01';
     $fechaf = $anio . $mes . '31';
     $filter = new DataForm();
     $filter->title('Filtro de ventas mensuales');
     $filter->mes = new dropdownField("Mes/A&ntilde;o", "mes");
     for ($i = 1; $i < 13; $i++) {
         $filter->mes->option(str_pad($i, 2, '0', STR_PAD_LEFT), str_pad($i, 2, '0', STR_PAD_LEFT));
     }
     $filter->mes->size = 2;
     $filter->mes->style = '';
     $filter->mes->insertValue = $mes;
     $filter->anio = new inputField("A&ntilde;o", "anio");
     $filter->anio->in = 'mes';
     $filter->anio->size = 4;
     $filter->anio->insertValue = $anio;
     $filter->anio->rule = "max_length[4]";
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('compras/analisis/index'), array('mes', 'anio')), $position = "BL");
     $filter->build_form();
     $data['forma'] = '';
     $data['lista'] = $filter->output;
     $data['lista'] .= open_flash_chart_object(800, 300, site_url("compras/analisis/departa/{$mes}/{$anio}"));
     $data['titulo'] = $this->rapyd->get_head() . "<center><h2>VENTAS MENSUALES</h2></center>";
     $this->layout->buildPage('ventas/view_ventas', $data);
 }
Exemplo n.º 9
0
$mres = $res->fetch_array();
$num_week = $mres[0];
$num_week_perc = round($num_week * 100 / ($all_bots + 1.0E-7));
$sql = "SELECT COUNT(*)FROM bots_t WHERE date_last_online_bot >= ( CONVERT_TZ(now(),@@time_zone,'+0:00')  - INTERVAL 1 DAY)";
$res = $db->query($sql);
$mres = $res->fetch_array();
$num_24 = $mres[0];
$num_24_perc = round($num_24 * 100 / ($all_bots + 1.0E-7));
$sql = "SELECT MIN(date_install_bot) FROM bots_t";
$res = $db->query($sql);
$mres = $res->fetch_array();
$activity_date = $mres[0];
$create_date = gmdate("m/d/y H:i", $mres['start_date']);
$smarty->assign('NUM_WEEK_PERC', $num_week_perc);
$smarty->assign('NUM_WEEK', $num_week);
$smarty->assign('NUM_24', $num_24);
$smarty->assign('NUM_24_PREC', $num_24_perc);
$smarty->assign('ACTIVITY_DATE', $activity_date);
$smarty->display('botstat.tpl');
open_flash_chart_object(400, 400, './mod/bot_stat.php?by=os', true, 'plugins/ofc/');
?>
<br>
<?php 
open_flash_chart_object(400, 400, './mod/bot_stat.php?by=ie', true, 'plugins/ofc/');
?>
<br>
<?php 
open_flash_chart_object(400, 400, './mod/bot_stat.php?by=user_type', true, 'plugins/ofc/');
?>

Exemplo n.º 10
0
 function diarias($anio = '', $proveed = '', $mes = '')
 {
     $this->rapyd->load('datagrid2');
     $this->rapyd->load('dataform');
     $this->load->helper('openflash');
     $proveed = radecode($proveed);
     if (isset($_POST['anio']) && empty($anio)) {
         $anio = $_POST['anio'];
     }
     if (isset($_POST['mes']) && empty($mes)) {
         $mes = $_POST['mes'];
     }
     if (isset($_POST['proveed']) && empty($proveed)) {
         $proveed = $_POST['proveed'];
     }
     if (empty($mes)) {
         redirect("compras/proveedores/mensuales/{$anio}/{$proveed}");
     }
     $fechai = $anio . str_pad($mes, 2, '0', STR_PAD_LEFT) . '01';
     $fechaf = $anio . str_pad($mes, 2, '0', STR_PAD_LEFT) . '31';
     $scli = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'Codigo proveedor', 'nombre' => 'Nombre'), 'filtro' => array('proveed' => 'Còdigo proveedor', 'nombre' => 'Nombre'), 'retornar' => array('proveed' => 'proveed'), 'titulo' => 'Buscar proveedor');
     $cboton = $this->datasis->modbus($scli);
     $filter = new DataForm('compras/proveedoresdiarios');
     $filter->attributes = array('onsubmit' => "this.action='index/'+this.form.mes.value+'/'+this.form.anio.value+'/';return FALSE;");
     $filter->title('Filtro de Compras Diarias');
     $filter->mes = new dropdownField('Mes/A&ntilde;o', 'mes');
     for ($i = 1; $i < 13; $i++) {
         $filter->mes->option(str_pad($i, 2, '0', STR_PAD_LEFT), str_pad($i, 2, '0', STR_PAD_LEFT));
     }
     $filter->mes->size = 2;
     $filter->mes->style = '';
     $filter->mes->insertValue = $mes;
     $filter->anio = new inputField('A&ntilde;o', 'anio');
     $filter->anio->in = 'mes';
     $filter->anio->size = 4;
     $filter->anio->insertValue = $anio;
     $filter->anio->rule = 'max_length[4]';
     $filter->proveedor = new inputField('Proveedor', 'proveed');
     $filter->proveedor->size = 10;
     $filter->proveedor->insertValue = $proveed;
     $filter->proveedor->rule = 'max_length[4]';
     $filter->proveedor->append($cboton);
     $filter->button('btnsubmit', 'Buscar', form2uri(site_url('compras/proveedores/diarias/'), array('anio', 'proveed', 'mes')), $position = 'BL');
     $filter->build_form();
     $grid = new DataGrid2();
     $select = array('proveed', "DATE_FORMAT(fecha,'%d/%m/%Y') AS fecha", "SUM(montonet*IF(tipo_doc='NC',-1,1)) AS grantotal", "SUM(inicial*IF( tipo_doc='NC',-1,1)) AS contado", "SUM(credito*IF( tipo_doc='NC',-1,1)) AS credito", "SUM(montotot*IF(tipo_doc='NC',-1,1)) AS subtotal", "SUM(montoiva*IF(tipo_doc='NC',-1,1)) AS impuesto", 'COUNT(*) AS numfac');
     $grid->db->select($select);
     $grid->db->from('scst');
     $grid->db->where('tipo_doc <> ', 'NE');
     $grid->db->where('fecha >= ', $fechai);
     $grid->db->where('fecha <= ', $fechaf);
     $grid->db->where('proveed', $proveed);
     $grid->db->where('actuali >= fecha');
     $grid->db->groupby('fecha');
     $grid->column('Fecha', "fecha", "align='center'");
     $grid->column('Sub-Total', "<number_format><#subtotal#>|2|,|.</number_format>", 'align=right');
     $grid->column('Impuesto', "<number_format><#impuesto#>|2|,|.</number_format>", 'align=right');
     $grid->column('Total', "<number_format><#grantotal#>|2|,|.</number_format>", 'align=right');
     $grid->column('Contado', "<number_format><#contado#>|2|,|.</number_format>", 'align=right');
     $grid->column('Credito', "<number_format><#credito#>|2|,|.</number_format>", 'align=right');
     $grid->column('Cant. Fact', "numfac", 'align=right');
     $grid->totalizar('impuesto', 'grantotal', 'contado', 'credito', 'subtotal');
     $grid->build();
     $proveed = raencode($proveed);
     $grafico = open_flash_chart_object(680, 350, site_url("compras/proveedores/gdiarias/{$anio}/{$proveed}/{$mes}"));
     $data['content'] = $grafico;
     $data['content'] .= $filter->output . $grid->output;
     $data['head'] = $this->rapyd->get_head();
     $data['title'] = '<h1>Compras Diarias</h1>';
     $this->load->view('view_ventanas', $data);
 }
Exemplo n.º 11
0
 function refreshProduct()
 {
     $this->load->helper('open-flash-chart');
     open_flash_chart_object(100, 100, site_url() . 'product/flashData');
     $this->load->view('product/productview', $this->data);
 }
        </tr>
        <tr>
            <td width="50%" valign="top"  height="250" >
            <div >
                <div class="bg_section">
                <?php 
echo $lbl_overall_graph;
?>
                </div>
                <div>
                <?php 
//determine the
if ($is_perm_global == 1) {
    open_flash_chart_object(450, 300, 'chart_graph_1_global.php');
} else {
    open_flash_chart_object(450, 300, 'chart_graph_1.php');
}
?>
                </div>
            </div>
          </td>
            <td width="50%" valign="top">
           <div >
                <div class="bg_section">
               <?php 
echo $lbl_mapview_dash;
?>
                </div>
                <div>          
					<div id="map" style="width: 500px; height: 300px"></div>     
                </div>
Exemplo n.º 13
0
if ($db->affected_rows && is_object($res)) {
    list($date) = $res->fetch_array();
    $create_date = gmdate("m/d/y H:i", $date);
    $smarty->assign('CREATE_DATE', $create_date);
}
$smarty->assign('TID', $tid);
$smarty->display('stat_b_sub_graph.tpl');
?>

		<?php 
open_flash_chart_object(300, 300, './mod/stat_graph.php?by=os&status=good&tid=' . $tid, true, 'plugins/ofc/');
?>
</td><td align='center' width="50%">
		<?php 
open_flash_chart_object(300, 300, './mod/stat_graph.php?by=os&status=fail&tid=' . $tid, true, 'plugins/ofc/');
?>
</td>
		
</tr><tr><td colspan="2" align='center'><h2><b>Statistic by Countries</b></h2></td></tr><tr><td align='center' width="50%">

		<?php 
open_flash_chart_object(300, 300, './mod/stat_graph.php?by=country&status=good&tid=' . $tid, true, 'plugins/ofc/');
?>
</td><td align='center' width="50%">
		<?php 
open_flash_chart_object(300, 300, './mod/stat_graph.php?by=country&status=fail&tid=' . $tid, true, 'plugins/ofc/');
?>
</td>
</tr></table>

$x2->setValues($valMC);
$x2->setLabels($lblMC);
$x2->setTitle("CIFRAS DE CAPTACION EN MILES");
$mFile2 = $x2->Chart3DBar(10000);
open_flash_chart_object(648, 512, $mFile2, true, "../");
//====================================================================================================
//CREDITOS
$lblMD = array();
$valMD = array();
$lblND = array();
$valND = array();
$W3 = "\tAND\n\t\t\t\t(`creditos_solicitud`.`saldo_actual` >0)\n\t\t\t\tAND\n\t\t\t\t(`creditos_solicitud`.`fecha_ministracion` >= '{$fecha_inicial}')\n\t\t\t\tAND\n\t\t\t\t(`creditos_solicitud`.`fecha_ministracion` <= '{$fecha_final}')\n";
$DCreds = $cSuc->getColocacionTotal($W3);
$lblND[] = "Creditos";
$valND[] = $DCreds["numero"];
$lblMD[] = "Tot. Solicitado";
$valMD[] = round($DCreds["solicitado"] / 1000, 2);
$lblMD[] = "Tot. Ministrado";
$valMD[] = round($DCreds["ministrado"] / 1000, 2);
$lblMD[] = "Tot. Insoluto";
$valMD[] = round($DCreds["saldo"] / 1000, 2);
$x2 = new SAFEChart();
$x2->setValues($valMD);
$x2->setLabels($lblMD);
$x2->setTitle("CIFRAS GENERALES DE CREDITOS(MILES)");
$mFile2 = $x2->Chart3DBar(20000);
open_flash_chart_object(648, 512, $mFile2, true, "../");
echo getRawFooter();
?>
</body>
</html>
Exemplo n.º 15
0
   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
defined('_VALID_VAM') or die('Direct Access to this location is not allowed.');
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
				  <tr> 
				    <td colspan="2" class="pageHeading" width="100%">

    <h1 class="contentBoxHeading"><?php 
echo '<a href="' . vam_href_link(FILENAME_STATS_SALES_REPORT2, '', 'NONSSL') . '">' . BOX_SALES_REPORT . '</a>';
?>
</h1>
				    
				    </td>
				  </tr>

              <tr>
                <td class="dataTableContentRss" valign="top" width="50%">
<?php 
include DIR_WS_CLASSES . 'ofc-library/open_flash_chart_object.php';
open_flash_chart_object('100%', 250, vam_href_link('chart_data.php', 'NONSSL'), false);
?>
                </td>
                <td class="dataTableContentRss" valign="top" width="50%">
<?php 
open_flash_chart_object('100%', 250, vam_href_link('chart_data.php', 'report_type=orders', 'NONSSL'), false);
?>
                </td>
              </tr>
</table>
Exemplo n.º 16
0
<?php

$type = isset($_GET['type']) ? $_GET['type'] : '1';
$chartType = isset($_GET['chart']) ? $_GET['chart'] : '1';
$user = isset($_GET['user']) ? $_GET['user'] : $_SESSION['USER_LOGGED'];
include_once 'open_flash_chart_object.php';
open_flash_chart_object(450, 200, '../openFlash/chart-data.php?type=' . $type . '&chart=' . $chartType, false, '/plugin/openFlash/');
Exemplo n.º 17
0
if (empty($totalKm)) {
    $totalKm = 0;
}
$totalKmKvar = $totalKm - $kmTotal;
$smarty->assign("totalKmKvar", $totalKmKvar);
$dagar7000 = ceil($totalKmKvar / 7);
$dagar11000 = ceil($totalKmKvar / 11);
$smarty->assign("dagar7000", $dagar7000);
$smarty->assign("dagar11000", $dagar11000);
if (count($rutten) > 0) {
    $lastKommun = $rutten[count($rutten) - 1]["Kommun"];
} else {
    $lastKommun = "";
}
/*if($lastKommun) {
	$avstand = $lastKommun->listAvstand();
	$opt_angransande = array(""=>"Välj...");

	//print_r($avstand);
	foreach($avstand as $tempavstand){
		// echo $tempavstand["id"];
		$opt_angransande[$tempavstand["id"]] = $kommunnamn[$tempavstand["id"]] . " (" . $tempavstand["km"] . "km)";
	}
}*/
include_once ROOT . '/php/libs/php-ofc-library/open-flash-chart-object.php';
ob_start();
open_flash_chart_object(580, 200, '/data/rapport_graf.php?id=' . $medlem->getId(), false, '/');
$graf = ob_get_contents();
ob_end_clean();
$smarty->assign("graf", $graf);
$smarty->display('rapport.tpl');
Exemplo n.º 18
0
function PN_Blog_Statistics_Default()
{
    global $database, $blogid, $defaultURL, $blogURL, $pluginURL, $pluginMenuURL, $configVal;
    requireComponent('Textcube.Model.Statistics');
    requireComponent('Textcube.Function.misc');
    $data = misc::fetchConfigVal($configVal);
    if (is_null($data)) {
        $data['privateChk'] = 2;
    }
    $getVisibility = $data['privateChk'] == 2 ? " AND visibility > 0 " : "";
    $stats = Statistics::getStatistics($blogid);
    $getDate = isset($_GET['date']) ? $_GET['date'] : date('Y', strtotime("now"));
    $getMenu = isset($_GET['menu']) ? $_GET['menu'] : "entry";
    $getYear = substr($getDate, 0, 4);
    $getMonth = substr($getDate, 4);
    $yearRow = POD::queryAll("SELECT EXTRACT(YEAR FROM FROM_UNIXTIME(published)) period, COUNT(*) count FROM {$database['prefix']}Entries WHERE blogid = {$blogid} AND draft = 0 {$getVisibility} AND category >= 0 GROUP BY period ORDER BY period DESC");
    $yearCell = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}Entries WHERE blogid = {$blogid} AND draft = 0 {$getVisibility} AND category >= 0 AND EXTRACT(YEAR FROM FROM_UNIXTIME(published)) = '" . date('Y', strtotime("now")) . "'");
    $yearAll = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}Entries WHERE blogid = {$blogid} AND draft = 0 {$getVisibility} AND category >= 0");
    $yearSelect = "<select id=\"yearSelect\" onchange=\"execDate(this);\">\n";
    $yearSelect .= "<option value=\"\">" . _t('&nbsp;- 년 도 -') . "</option>\n";
    $selected = $getYear == 9999 ? " selected" : "";
    $yearSelect .= "<option value=\"9999\" style=\"font-weight:bold;\" {$selected}>" . _t('#전체') . "({$yearAll})</option>\n";
    if (!$yearCell) {
        $selected = $getYear == date('Y', strtotime("now")) ? " selected" : "";
        $yearSelect .= "<option value=\"" . date('Y', strtotime("now")) . "\" {$selected}>" . date('Y', strtotime("now")) . _t('년') . "(0)</option>\n";
    }
    foreach ($yearRow as $items) {
        $selected = $getYear == $items['period'] ? " selected" : "";
        $yearSelect .= "<option value=\"{$items['period']}\" {$selected}>{$items['period']}" . _t('년') . "({$items['count']})</option>\n";
    }
    $yearSelect .= "</select>\n";
    $monthSelect = "<select id=\"monthSelect\" onchange=\"execDate(this);\">\n";
    $monthSelect .= "<option value=\"\">- " . _t('월') . " -</option>\n";
    $monthSelect .= "<option value=\"{$getYear}\" " . (strlen($getDate) == 4 ? " selected" : "") . ">" . _t('#전체') . "</option>\n";
    for ($i = 1; $i <= 12; $i++) {
        $gMonth = strlen($i) == 1 ? "0" . $i : $i;
        $gValue = $getYear . $gMonth;
        $selected = $getMonth == $gMonth ? " selected" : "";
        $monthSelect .= "<option value=\"{$gValue}\" {$selected}>" . $gMonth . _t('월') . "</option>\n";
    }
    $monthSelect .= "</select>\n";
    $noticeRow = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}Entries WHERE blogid = {$blogid} AND draft = 0 {$getVisibility} AND category = -2");
    //공지
    $keywordRow = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}Entries WHERE blogid = {$blogid} AND draft = 0 {$getVisibility} AND category = -1");
    //키워드
    ?>
<script type="text/javascript">
//<![CDATA[
	function execLoadFunction() {
		tempDiv = document.createElement("DIV");
		tempDiv.style.clear = "both";
		document.getElementById("part-statistics-blog").appendChild(tempDiv);
	}

	function execDate(selectObject){
		if(selectObject.options[selectObject.selectedIndex].value){
			location.href="<?php 
    echo $pluginMenuURL;
    ?>
&date="+selectObject.options[selectObject.selectedIndex].value+"&menu=<?php 
    echo $getMenu;
    ?>
";
		}
	}

	window.addEventListener("load", execLoadFunction, false);
//]]>
</script>
					 		
<div id="part-statistics-blog" class="part">
	<h2 class="caption"><span class="main-text"><?php 
    echo _t('블로그 통계정보를 보여줍니다');
    ?>
</span></h2>
	<div id="statistics-main">
		<div id="statistics-counter-inbox">
			<div class="title"><h3><?php 
    echo _t('종 합 정 보');
    ?>
</h3></div>
			<table width="100%">
				<tbody>
					<tr class="tr">
						<td colspan="2"><?php 
    echo _t('년/월별 선택');
    ?>
<br />
						<?php 
    echo $yearSelect;
    ?>
 <?php 
    echo $monthSelect;
    ?>
</td>
					</tr>
					<tr height="5"><td colspan="2"></td></tr>
					<tr height="1" bgcolor="#dddddd"><td colspan="2"></td></tr>
					<tr class="tr">
						<td><?php 
    echo _t('오늘 방문자');
    ?>
</td>
						<th><?php 
    echo number_format($stats['today']);
    ?>
</th>
					</tr>
					<tr class="tr">
						<td><?php 
    echo _t('어제 방문자');
    ?>
</td>
						<th><?php 
    echo number_format($stats['yesterday']);
    ?>
</th>
					</tr>
					<tr class="tr">
						<td><?php 
    echo _t('총 방문자');
    ?>
</td>
						<th><?php 
    echo number_format($stats['total']);
    ?>
</th>
					</tr>
					<tr height="1" bgcolor="#dddddd"><td colspan="2"></td></tr>
					<tr class="tr">
						<td><?php 
    echo _t('글 개수');
    ?>
</td>
						<th><?php 
    echo number_format(getEntriesTotalCountDB($blogid));
    ?>
</th>
					</tr>
					<tr class="tr">
						<td><?php 
    echo _t('공지 개수');
    ?>
</td>
						<th><?php 
    echo number_format($noticeRow);
    ?>
</th>
					</tr>
					<tr class="tr">
						<td><?php 
    echo _t('키워드 개수');
    ?>
</td>
						<th><?php 
    echo number_format($keywordRow);
    ?>
</th>
					</tr>
					<tr class="tr">
						<td><?php 
    echo _t('댓글 개수');
    ?>
</td>
						<th><?php 
    echo number_format(getCommentCountDB($blogid));
    ?>
</th>
					</tr>
					<tr class="tr">
						<td><?php 
    echo _t('방명록 개수');
    ?>
</td>
						<th><?php 
    echo number_format(getGuestbookCountDB($blogid));
    ?>
</th>
					</tr>
					<tr class="tr">
						<td><?php 
    echo _t('트랙백 개수');
    ?>
</td>
						<th><?php 
    echo number_format(getTrackbackCountDB($blogid));
    ?>
</th>
					</tr>
					<tr height="10"><td colspan="2"></td></tr>
				</tbody>
			</table>
			<div class="title"><h3><?php 
    echo _t('세 부 메 뉴');
    ?>
</h3></div>
			<table width="100%">
				<tbody>
					<tr class="tr">
						<td>&nbsp;&raquo; <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=entry"><?php 
    echo _get_t(_t('글(포스트) 통계'), 'entry');
    ?>
</a></td>
					</tr>
					<tr class="tr">
						<td>&nbsp;&raquo; <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=comment"><?php 
    echo _get_t(_t('댓글 통계'), 'comment');
    ?>
</a></td>
					</tr>
					<tr class="tr">
						<td>&nbsp;&nbsp;&nbsp;&nbsp; - <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=commenter"><?php 
    echo _get_t(_t('작성자 목록'), 'commenter');
    ?>
</a></td>
					</tr>
					<tr class="tr">
						<td>&nbsp;&raquo; <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=trackback"><?php 
    echo _get_t(_t('트랙백 통계'), 'trackback');
    ?>
</a></td>
					</tr>
					<tr class="tr">
						<td>&nbsp;&raquo; <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=guestbook"><?php 
    echo _get_t(_t('방명록 통계'), 'guestbook');
    ?>
</a></td>
					</tr>
					<tr class="tr">
						<td>&nbsp;&nbsp;&nbsp;&nbsp; - <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=guestbookcommenter"><?php 
    echo _get_t(_t('작성자 목록'), 'guestbookcommenter');
    ?>
</a></td>
					</tr>
					<tr class="tr">
						<td>&nbsp;&raquo; <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=tag"><?php 
    echo _get_t(_t('태그 통계'), 'tag');
    ?>
</a></td>
					</tr>
					<tr class="tr">
						<td>&nbsp;&raquo; <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=visit"><?php 
    echo _get_t(_t('방문자 통계'), 'visit');
    ?>
</a></td>
					</tr>
					<tr class="tr">
						<td>&nbsp;&raquo; <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=referer"><?php 
    echo _get_t(_t('리퍼러 통계'), 'referer');
    ?>
</a></td>
					</tr>
				</tbody>
			</table>
		</div>
		<div id="statistics-inbox">
<?php 
    //##############################
    // 글(포스트) 통계 #########
    //##############################
    if ($getMenu == "entry") {
        if ($getYear == 9999 && !$getMonth) {
            $getData = array();
            $getTags = array();
            $getDateTitle = _t('전체 년도별');
            $tempData = getStatisticsDB('years', '', $getMenu);
            foreach ($tempData as $item) {
                array_push($getData, $item['count']);
                array_push($getTags, rawurlencode($item['period'] . _t('년')));
            }
            $getData = implode("|", $getData);
            $getTags = implode("|", $getTags);
            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 1);
            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
            echo $getDateTitle;
            ?>
 <?php 
            echo _t('글(포스트) 통계');
            ?>
(<?php 
            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
            echo _t('개');
            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
            echo $getMenu;
            ?>
YearStic">
									<?php 
            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
            echo $getMenu;
            ?>
YearPizza">
									<?php 
            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=archiveYear&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
        }
        $getData = array();
        $getTags = array();
        if ($getYear == 9999) {
            $getDateTitle = !$getMonth ? _t('전체') : _t('전체') . '&nbsp' . $getMonth . _t('월');
        } else {
            $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
        }
        if (!$getMonth) {
            $lastCount = 12;
            $textValue = _t('월');
        } else {
            $lastCount = $getYear == 9999 ? 31 : date('t', mktime(0, 0, 0, $getMonth, 1, $getYear));
            $textValue = "";
        }
        for ($i = 1; $i <= $lastCount; $i++) {
            $tempData = getStatisticsDB($getDate, $i, $getMenu);
            if ($tempData) {
                array_push($getData, $tempData['count']);
                array_push($getTags, rawurlencode($i . $textValue));
            }
        }
        $getData = implode("|", $getData);
        $getTags = implode("|", $getTags);
        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 1);
        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
        echo $getDateTitle;
        ?>
 <?php 
        echo _t('글(포스트) 통계');
        ?>
(<?php 
        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
        echo _t('개');
        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
        echo $getMenu;
        ?>
Stic">
									<?php 
        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
        ?>
								</div>
							</div>
						</td>
						<td align="right">
							<div class="flash-pizza">
								<div id="get<?php 
        echo $getMenu;
        ?>
Pizza">
									<?php 
        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=archiveMonth&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
        if (!$getMonth) {
            $getData = array();
            $getTags = array();
            for ($i = 1; $i <= 4; $i++) {
                $tempData = getQuartersStatistics($getDate, $i, $getMenu);
                if ($tempData) {
                    array_push($getData, $tempData);
                    array_push($getTags, rawurlencode($i . "/4 " . _t('분기')));
                }
            }
            $getData = implode("|", $getData);
            $getTags = implode("|", $getTags);
            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
            echo $getDateTitle;
            ?>
 <?php 
            echo _t('분기별') . _t('글(포스트) 통계');
            ?>
(<?php 
            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
            echo _t('개');
            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
            echo $getMenu;
            ?>
QuartersStic">
									<?php 
            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
            echo $getMenu;
            ?>
QuartersPizza">
									<?php 
            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
        }
        $getData = array();
        $getTags = array();
        $tempData = getCategoryStatistics();
        $itemCnt = getCategoryStatisticsTotal(0, $getDate);
        if ($itemCnt) {
            array_push($getData, $itemCnt);
            array_push($getTags, $item['id']);
        }
        foreach ($tempData as $item) {
            $itemCnt = getCategoryStatisticsTotal($item['id'], $getDate);
            if ($itemCnt) {
                array_push($getData, $itemCnt);
                array_push($getTags, $item['id']);
            }
        }
        $getData = implode("|", $getData);
        $getTags = implode("|", $getTags);
        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
        echo $getDateTitle;
        ?>
 <?php 
        echo _t('카테고리별') . _t('글(포스트) 통계');
        ?>
(<?php 
        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
        echo _t('개');
        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
        echo $getMenu;
        ?>
CategoryStic">
									<?php 
        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=category&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
        echo $getMenu;
        ?>
CategoryPizza">
									<?php 
        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=category&grpYear=" . $getYear . "&grpTypeName=category&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
        $query = "SELECT * FROM {$database['prefix']}Entries_hits";
        if (POD::queryRow($query)) {
            $getData = array();
            $getTags = array();
            $tempData = getEntryHitsStatistics($getDate);
            foreach ($tempData as $item) {
                array_push($getData, $item['hits']);
                array_push($getTags, $item['id']);
            }
            $getData = implode("|", $getData);
            $getTags = implode("|", $getTags);
            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
            echo $getDateTitle;
            ?>
 <?php 
            echo _t('조회수 TOP 10') . _t('글(포스트) 통계');
            ?>
(<?php 
            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
            echo _t('개');
            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
            echo $getMenu;
            ?>
HitsStic">
									<?php 
            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=hits&grpXLabelType=2&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
            echo $getMenu;
            ?>
HitsPizza">
									<?php 
            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=entry&grpYear=" . $getYear . "&grpTypeName=hits&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
        }
        $getData = array();
        $getTags = array();
        for ($i = 0; $i <= 23; $i++) {
            $tempData = getTimeStatistics($getDate, $i, $getMenu);
            if ($tempData) {
                if ($tempData['period'] == "00") {
                    $tempData['period'] = str_replace("00", "0", $tempData['period']);
                } else {
                    if (substr($tempData['period'], 0, 1) == "0") {
                        $tempData['period'] = str_replace("0", "", $tempData['period']);
                    }
                }
                array_push($getData, $tempData['count']);
                array_push($getTags, $tempData['period']);
            }
        }
        $getData = implode("|", $getData);
        $getTags = implode("|", $getTags);
        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
        echo $getDateTitle;
        ?>
 <?php 
        echo _t('시간대별') . _t('글(포스트) 통계');
        ?>
(<?php 
        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
        echo _t('개');
        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
        echo $getMenu;
        ?>
TimeStic">
									<?php 
        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=time&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
        echo $getMenu;
        ?>
TimePizza">
									<?php 
        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=time&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
			<hr class="hidden" />
<?php 
    } else {
        if ($getMenu == "comment") {
            //##############################
            // 댓글 통계 ###################
            //##############################
            if ($getYear == 9999 && !$getMonth) {
                $getData = array();
                $getTags = array();
                $getDateTitle = _t('전체 년도별');
                $tempData = getStatisticsDB('years', '', $getMenu);
                foreach ($tempData as $item) {
                    array_push($getData, $item['count']);
                    array_push($getTags, rawurlencode($item['period'] . _t('년')));
                }
                $getData = implode("|", $getData);
                $getTags = implode("|", $getTags);
                $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                echo $getDateTitle;
                ?>
 <?php 
                echo _t('댓글 통계');
                ?>
(<?php 
                echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                echo _t('개');
                ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                echo $getMenu;
                ?>
YearStic">
									<?php 
                echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                echo $getMenu;
                ?>
YearPizza">
									<?php 
                echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
            }
            $getData = array();
            $getTags = array();
            if ($getYear == 9999) {
                $getDateTitle = !$getMonth ? _t('전체') : _t('전체') . '&nbsp' . $getMonth . _t('월');
            } else {
                $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
            }
            if (!$getMonth) {
                $lastCount = 12;
                $textValue = _t('월');
            } else {
                $lastCount = $getYear == 9999 ? 31 : date('t', mktime(0, 0, 0, $getMonth, 1, $getYear));
                $textValue = "";
            }
            for ($i = 1; $i <= $lastCount; $i++) {
                $tempData = getStatisticsDB($getDate, $i, $getMenu);
                if ($tempData) {
                    array_push($getData, $tempData['count']);
                    array_push($getTags, rawurlencode($i . $textValue));
                }
            }
            $getData = implode("|", $getData);
            $getTags = implode("|", $getTags);
            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
            echo $getDateTitle;
            ?>
 <?php 
            echo _t('댓글 통계');
            ?>
(<?php 
            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
            echo _t('개');
            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
            echo $getMenu;
            ?>
Stic">
									<?php 
            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
            echo $getMenu;
            ?>
Pizza">
									<?php 
            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
            if (!$getMonth) {
                $getData = array();
                $getTags = array();
                for ($i = 1; $i <= 4; $i++) {
                    $tempData = getQuartersStatistics($getYear, $i, $getMenu);
                    if ($tempData) {
                        array_push($getData, $tempData);
                        array_push($getTags, rawurlencode($i . "/4 " . _t('분기')));
                    }
                }
                $getData = implode("|", $getData);
                $getTags = implode("|", $getTags);
                $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                echo $getDateTitle;
                ?>
 <?php 
                echo _t('분기별') . _t('댓글 통계');
                ?>
(<?php 
                echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                echo _t('개');
                ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                echo $getMenu;
                ?>
QuartersStic">
									<?php 
                echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                echo $getMenu;
                ?>
QuartersPizza">
									<?php 
                echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
            }
            $getData = array();
            $getTags = array();
            $tempData = getCommentEntryMaxCount($getDate);
            foreach ($tempData as $item) {
                array_push($getData, $item['comments']);
                array_push($getTags, $item['id']);
            }
            $getData = implode("|", $getData);
            $getTags = implode("|", $getTags);
            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
            echo $getDateTitle;
            ?>
 <?php 
            echo _t('댓글 TOP 10') . _t('글 통계');
            ?>
(<?php 
            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
            echo _t('개');
            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
            echo $getMenu;
            ?>
EntryMaxStic">
									<?php 
            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=cmmax&grpXLabelType=2&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
            echo $getMenu;
            ?>
EntryMaxPizza">
									<?php 
            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=entry&grpYear=" . $getYear . "&grpTypeName=cmmax&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
            $getData = array();
            $getTags = array();
            $tempData = getCommenterMaxCount($getDate, $getMenu);
            foreach ($tempData as $item) {
                array_push($getData, $item['namecnt']);
                array_push($getTags, rawurlencode($item['name']));
            }
            $getData = implode("|", $getData);
            $getTags = implode("|", $getTags);
            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
            echo $getDateTitle;
            ?>
 <?php 
            echo _t('댓글자 TOP 10') . _t('통계');
            ?>
(<?php 
            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
            echo _t('개');
            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
            echo $getMenu;
            ?>
erMaxStic">
									<?php 
            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=commenter&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
            echo $getMenu;
            ?>
erMaxPizza">
									<?php 
            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
            $getData = array();
            $getTags = array();
            for ($i = 0; $i <= 23; $i++) {
                $tempData = getTimeStatistics($getDate, $i, $getMenu);
                if ($tempData) {
                    if ($tempData['period'] == "00") {
                        $tempData['period'] = str_replace("00", "0", $tempData['period']);
                    } else {
                        if (substr($tempData['period'], 0, 1) == "0") {
                            $tempData['period'] = str_replace("0", "", $tempData['period']);
                        }
                    }
                    array_push($getData, $tempData['count']);
                    array_push($getTags, $tempData['period']);
                }
            }
            $getData = implode("|", $getData);
            $getTags = implode("|", $getTags);
            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
            echo $getDateTitle;
            ?>
 <?php 
            echo _t('시간대별') . _t('댓글 통계');
            ?>
(<?php 
            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
            echo _t('개');
            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
            echo $getMenu;
            ?>
TimeStic">
									<?php 
            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=time&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
            echo $getMenu;
            ?>
TimePizza">
									<?php 
            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=time&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
			<hr class="hidden" />
<?php 
        } else {
            if ($getMenu == "commenter") {
                //##############################
                // 댓글 작성자 목록 ############
                //##############################
                if ($getYear == 9999) {
                    $getDateTitle = !$getMonth ? _t('전체') : _t('전체') . '&nbsp' . $getMonth . _t('월');
                } else {
                    $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
                }
                $tempData = getCommenterMaxCount($getDate, $getMenu);
                $tempAllCount = getCommenterMaxCount(9999, $getMenu);
                ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                echo $getDateTitle;
                ?>
 <?php 
                echo _t('댓글') . _t('작성자') . _t('목록');
                ?>
(<?php 
                echo number_format(count($tempData)) . "/" . number_format(count($tempAllCount));
                echo _t('명');
                ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
						<div id="commenterList">
<?php 
                $i = 0;
                foreach ($tempData as $item) {
                    $guestname = htmlspecialchars(UTF8::lessenAsEm($item['name'], 20));
                    if (!empty($item['home'])) {
                        $homepage = ereg('^[[:alnum:]]+:', $item['home']) ? htmlspecialchars($item['home']) : "http://" . htmlspecialchars($item['home']);
                        $guestname = "<a href=\"{$homepage}\" onclick=\"window.open(this.href); return false;\">{$guestname}</a>";
                    }
                    $count = "<span class=\"count\">(" . $item['namecnt'] . ")</span>";
                    ?>
							<div class="userlist"><?php 
                    echo $guestname;
                    ?>
 <?php 
                    echo $count;
                    ?>
</div><?php 
                    if ($i % 4 == 3) {
                        echo "<div class=\"clear\"></div>\n";
                    }
                    $i++;
                }
                ?>
						</div>
						</td>
					</tr>
				</tbody>
			</table>
			<hr class="hidden" />
<?php 
            } else {
                if ($getMenu == "trackback") {
                    //##############################
                    // 역인글 통계 #################
                    //##############################
                    if ($getYear == 9999 && !$getMonth) {
                        $getData = array();
                        $getTags = array();
                        $getDateTitle = _t('전체 년도별');
                        $tempData = getStatisticsDB('years', '', $getMenu);
                        foreach ($tempData as $item) {
                            array_push($getData, $item['count']);
                            array_push($getTags, rawurlencode($item['period'] . _t('년')));
                        }
                        $getData = implode("|", $getData);
                        $getTags = implode("|", $getTags);
                        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                        echo $getDateTitle;
                        ?>
 트랙백 통계(<?php 
                        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                        echo _t('개');
                        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
YearStic">
									<?php 
                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
YearPizza">
									<?php 
                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                    }
                    $getData = array();
                    $getTags = array();
                    if ($getYear == 9999) {
                        $getDateTitle = !$getMonth ? _t('전체') : _t('전체') . '&nbsp' . $getMonth . _t('월');
                    } else {
                        $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
                    }
                    if (!$getMonth) {
                        $lastCount = 12;
                        $textValue = _t('월');
                    } else {
                        $lastCount = $getYear == 9999 ? 31 : date('t', mktime(0, 0, 0, $getMonth, 1, $getYear));
                        $textValue = "";
                    }
                    for ($i = 1; $i <= $lastCount; $i++) {
                        $tempData = getStatisticsDB($getDate, $i, $getMenu);
                        if ($tempData) {
                            array_push($getData, $tempData['count']);
                            array_push($getTags, rawurlencode($i . $textValue));
                        }
                    }
                    $getData = implode("|", $getData);
                    $getTags = implode("|", $getTags);
                    $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                    ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                    echo $getDateTitle;
                    ?>
 <?php 
                    echo _t('트랙백') . _t('통계');
                    ?>
(<?php 
                    echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                    echo _t('개');
                    ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                    echo $getMenu;
                    ?>
Stic">
									<?php 
                    echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                    ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                    echo $getMenu;
                    ?>
Pizza">
									<?php 
                    echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                    ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                    if (!$getMonth) {
                        $getData = array();
                        $getTags = array();
                        for ($i = 1; $i <= 4; $i++) {
                            $tempData = getQuartersStatistics($getYear, $i, $getMenu);
                            if ($tempData) {
                                array_push($getData, $tempData);
                                array_push($getTags, rawurlencode($i . "/4 " . _t('분기')));
                            }
                        }
                        $getData = implode("|", $getData);
                        $getTags = implode("|", $getTags);
                        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                        echo $getDateTitle;
                        ?>
 <?php 
                        echo _t('분기별') . _t('트랙백') . _t('통계');
                        ?>
(<?php 
                        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                        echo _t('개');
                        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
QuartersStic">
									<?php 
                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
QuartersPizza">
									<?php 
                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                    }
                    $getData = array();
                    $getTags = array();
                    $getLink = array();
                    $tempData = getTrackbackEntryMaxCount($getDate);
                    foreach ($tempData as $item) {
                        array_push($getData, $item['trackbacks']);
                        array_push($getTags, $item['id']);
                    }
                    $getData = implode("|", $getData);
                    $getTags = implode("|", $getTags);
                    $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                    ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                    echo $getDateTitle;
                    ?>
 <?php 
                    echo _t('트랙백') . _t('받은 TOP 10') . _t('글 통계');
                    ?>
(<?php 
                    echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                    echo _t('개');
                    ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                    echo $getMenu;
                    ?>
EntryMaxStic">
									<?php 
                    echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=tbmax&grpXLabelType=2&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                    ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                    echo $getMenu;
                    ?>
EntryMaxPizza">
									<?php 
                    echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=entry&grpYear=" . $getYear . "&grpTypeName=tbmax&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                    ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                    $getData = array();
                    $getTags = array();
                    $tempData = getTrackbackCallEntryMaxCount($getDate);
                    foreach ($tempData as $item) {
                        array_push($getData, $item['trackbacklogs']);
                        array_push($getTags, $item['id']);
                    }
                    $getData = implode("|", $getData);
                    $getTags = implode("|", $getTags);
                    $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                    ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                    echo $getDateTitle;
                    ?>
 <?php 
                    echo _t('트랙백') . _t('보낸 TOP 10') . _t('글 통계');
                    ?>
(<?php 
                    echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                    echo _t('개');
                    ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                    echo $getMenu;
                    ?>
CallEntryMaxStic">
									<?php 
                    echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=cmmax&grpXLabelType=2&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                    ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                    echo $getMenu;
                    ?>
CallEntryMaxPizza">
									<?php 
                    echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=entry&grpYear=" . $getYear . "&grpTypeName=cmmax&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                    ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                    $getData = array();
                    $getTags = array();
                    for ($i = 0; $i <= 23; $i++) {
                        $tempData = getTimeStatistics($getDate, $i, $getMenu);
                        if ($tempData) {
                            if ($tempData['period'] == "00") {
                                $tempData['period'] = str_replace("00", "0", $tempData['period']);
                            } else {
                                if (substr($tempData['period'], 0, 1) == "0") {
                                    $tempData['period'] = str_replace("0", "", $tempData['period']);
                                }
                            }
                            array_push($getData, $tempData['count']);
                            array_push($getTags, $tempData['period']);
                        }
                    }
                    $getData = implode("|", $getData);
                    $getTags = implode("|", $getTags);
                    $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                    ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                    echo $getDateTitle;
                    ?>
 <?php 
                    echo _t('시간대별') . _t('트랙백') . _t('통계');
                    ?>
(<?php 
                    echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                    echo _t('개');
                    ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                    echo $getMenu;
                    ?>
TimeStic">
									<?php 
                    echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=time&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                    ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                    echo $getMenu;
                    ?>
TimePizza">
									<?php 
                    echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=time&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                    ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
			<hr class="hidden" />
<?php 
                } else {
                    if ($getMenu == "guestbook") {
                        //##############################
                        // 방명록 통계 #################
                        //##############################
                        if ($getYear == 9999 && !$getMonth) {
                            $getData = array();
                            $getTags = array();
                            $getDateTitle = _t('전체 년도별');
                            $tempData = getStatisticsDB('years', '', $getMenu);
                            foreach ($tempData as $item) {
                                array_push($getData, $item['count']);
                                array_push($getTags, rawurlencode($item['period'] . _t('년')));
                            }
                            $getData = implode("|", $getData);
                            $getTags = implode("|", $getTags);
                            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                            echo $getDateTitle;
                            ?>
 <?php 
                            echo _t('방명록') . _t('통계');
                            ?>
(<?php 
                            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                            echo _t('개');
                            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                            echo $getMenu;
                            ?>
YearStic">
									<?php 
                            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                            echo $getMenu;
                            ?>
YearPizza">
									<?php 
                            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                        }
                        $getData = array();
                        $getTags = array();
                        if ($getYear == 9999) {
                            $getDateTitle = !$getMonth ? _t('전체') : _t('전체') . '&nbsp' . $getMonth . _t('월');
                        } else {
                            $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
                        }
                        if (!$getMonth) {
                            $lastCount = 12;
                            $textValue = _t('월');
                        } else {
                            $lastCount = $getYear == 9999 ? 31 : date('t', mktime(0, 0, 0, $getMonth, 1, $getYear));
                            $textValue = "";
                        }
                        for ($i = 1; $i <= $lastCount; $i++) {
                            $tempData = getStatisticsDB($getDate, $i, $getMenu);
                            if ($tempData) {
                                array_push($getData, $tempData['count']);
                                array_push($getTags, rawurlencode($i . $textValue));
                            }
                        }
                        $getData = implode("|", $getData);
                        $getTags = implode("|", $getTags);
                        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                        echo $getDateTitle;
                        ?>
 <?php 
                        echo _t('방명록') . _t('통계');
                        ?>
(<?php 
                        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                        echo _t('개');
                        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
Stic">
									<?php 
                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
Pizza">
									<?php 
                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                        if (!$getMonth) {
                            $getData = array();
                            $getTags = array();
                            for ($i = 1; $i <= 4; $i++) {
                                $tempData = getQuartersStatistics($getYear, $i, $getMenu);
                                if ($tempData) {
                                    array_push($getData, $tempData);
                                    array_push($getTags, rawurlencode($i . "/4 " . _t('분기')));
                                }
                            }
                            $getData = implode("|", $getData);
                            $getTags = implode("|", $getTags);
                            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                            echo $getDateTitle;
                            ?>
 <?php 
                            echo _t('분기별') . _t('방명록') . _t('통계');
                            ?>
(<?php 
                            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                            echo _t('개');
                            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                            echo $getMenu;
                            ?>
QuartersStic">
									<?php 
                            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                            echo $getMenu;
                            ?>
QuartersPizza">
									<?php 
                            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                        }
                        $getData = array();
                        $getTags = array();
                        $tempData = getCommenterMaxCount($getDate, $getMenu);
                        foreach ($tempData as $item) {
                            array_push($getData, $item['namecnt']);
                            array_push($getTags, rawurlencode($item['name']));
                        }
                        $getData = implode("|", $getData);
                        $getTags = implode("|", $getTags);
                        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                        echo $getDateTitle;
                        ?>
 <?php 
                        echo _t('방명록') . _t('댓글자 TOP 10') . _t('통계');
                        ?>
(<?php 
                        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                        echo _t('개');
                        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
CommenterMaxStic">
									<?php 
                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=commenter&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
CommenterMaxPizza">
									<?php 
                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                        $getData = array();
                        $getTags = array();
                        for ($i = 0; $i <= 23; $i++) {
                            $tempData = getTimeStatistics($getDate, $i, $getMenu);
                            if ($tempData) {
                                if ($tempData['period'] == "00") {
                                    $tempData['period'] = str_replace("00", "0", $tempData['period']);
                                } else {
                                    if (substr($tempData['period'], 0, 1) == "0") {
                                        $tempData['period'] = str_replace("0", "", $tempData['period']);
                                    }
                                }
                                array_push($getData, $tempData['count']);
                                array_push($getTags, $tempData['period']);
                            }
                        }
                        $getData = implode("|", $getData);
                        $getTags = implode("|", $getTags);
                        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                        echo $getDateTitle;
                        ?>
 <?php 
                        echo _t('시간대별') . _t('방명록') . _t('통계');
                        ?>
(<?php 
                        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                        echo _t('개');
                        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
TimeStic">
									<?php 
                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=time&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
TimePizza">
									<?php 
                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=time&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
			<hr class="hidden" />
<?php 
                    } else {
                        if ($getMenu == "guestbookcommenter") {
                            //##############################
                            // 방명록 작성자 목록 ############
                            //##############################
                            if ($getYear == 9999) {
                                $getDateTitle = !$getMonth ? _t('전체') : _t('전체') . '&nbsp' . $getMonth . _t('월');
                            } else {
                                $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
                            }
                            $tempData = getCommenterMaxCount($getDate, $getMenu);
                            $tempAllCount = getCommenterMaxCount(9999, $getMenu);
                            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                            echo $getDateTitle;
                            ?>
 <?php 
                            echo _t('방명록') . _t('작성자') . _t('목록');
                            ?>
(<?php 
                            echo number_format(count($tempData)) . "/" . number_format(count($tempAllCount));
                            ?>
명)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
						<div id="commenterList">
<?php 
                            $i = 0;
                            foreach ($tempData as $item) {
                                $guestname = htmlspecialchars(UTF8::lessenAsEm($item['name'], 20));
                                if (!empty($item['home'])) {
                                    $homepage = ereg('^[[:alnum:]]+:', $item['home']) ? htmlspecialchars($item['home']) : "http://" . htmlspecialchars($item['home']);
                                    $guestname = "<a href=\"{$homepage}\" onclick=\"window.open(this.href); return false;\">{$guestname}</a>";
                                }
                                $count = "<span class=\"count\">(" . $item['namecnt'] . ")</span>";
                                ?>
							<div class="userlist"><?php 
                                echo $guestname;
                                ?>
 <?php 
                                echo $count;
                                ?>
</div><?php 
                                if ($i % 4 == 3) {
                                    echo "<div class=\"clear\"></div>\n";
                                }
                                $i++;
                            }
                            ?>
						</div>
						</td>
					</tr>
				</tbody>
			</table>
			<hr class="hidden" />
<?php 
                        } else {
                            if ($getMenu == "tag") {
                                //##############################
                                // 태그 통계 ###################
                                //##############################
                                $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
                                $getData = array();
                                $getTags = array();
                                $tempData = getTagMaxCount();
                                foreach ($tempData as $item) {
                                    array_push($getData, $item['count']);
                                    array_push($getTags, rawurlencode($item['name']));
                                }
                                $getData = implode("|", $getData);
                                $getTags = implode("|", $getTags);
                                $getTotal = getStatisticsTotalDB($getDate, $getMenu, 1);
                                ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                                echo _t('인기') . _t('태그 TOP 10') . _t('통계');
                                ?>
(<?php 
                                echo number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                                echo _t('개');
                                ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                                echo $getMenu;
                                ?>
MaxStic">
									<?php 
                                echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=tag&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                                ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                                echo $getMenu;
                                ?>
MaxPizza">
									<?php 
                                echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=tag&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                                ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                                $getData = array();
                                $getTags = array();
                                if ($getYear == 9999) {
                                    $getDateTitle = !$getMonth ? _t('전체') : _t('전체') . '&nbsp' . $getMonth . _t('월');
                                } else {
                                    $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
                                }
                                $tempData = getTagEntryMaxCount($getDate, 1);
                                foreach ($tempData as $item) {
                                    array_push($getData, $item['count']);
                                    array_push($getTags, $item['id']);
                                }
                                $getData = implode("|", $getData);
                                $getTags = implode("|", $getTags);
                                $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                                ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                                echo $getDateTitle;
                                ?>
 <?php 
                                echo _t('태그') . _t('걸린 TOP 10') . _t('글 통계');
                                ?>
(<?php 
                                echo number_format(getTagEntryMaxCount($getDate, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                                echo _t('개');
                                ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                                echo $getMenu;
                                ?>
EntryMaxStic">
									<?php 
                                echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=tagmax&grpXLabelType=2&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                                ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                                echo $getMenu;
                                ?>
EntryMaxPizza">
									<?php 
                                echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=entry&grpYear=" . $getYear . "&grpTypeName=tagmax&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                                ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
			<hr class="hidden" />
<?php 
                            } else {
                                if ($getMenu == "visit") {
                                    //##############################
                                    // 방문자 통계 #################
                                    //##############################
                                    if ($getYear == 9999 && !$getMonth) {
                                        $getData = array();
                                        $getTags = array();
                                        $getDateTitle = _t('전체 년도별');
                                        $tempData = getStatisticsDB('years', '', $getMenu);
                                        foreach ($tempData as $item) {
                                            array_push($getData, $item['count']);
                                            array_push($getTags, rawurlencode($item['period'] . _t('년')));
                                        }
                                        $getData = implode("|", $getData);
                                        $getTags = implode("|", $getTags);
                                        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                                        echo $getDateTitle;
                                        ?>
 <?php 
                                        echo _t('방문자') . _t('통계');
                                        ?>
(<?php 
                                        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                                        echo _t('개');
                                        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                                        echo $getMenu;
                                        ?>
YearStic">
									<?php 
                                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                                        echo $getMenu;
                                        ?>
YearPizza">
									<?php 
                                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                                    }
                                    $getData = array();
                                    $getTags = array();
                                    if ($getYear == 9999) {
                                        $getDateTitle = !$getMonth ? _t('전체') : _t('전체') . '&nbsp' . $getMonth . _t('월');
                                    } else {
                                        $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
                                    }
                                    if (!$getMonth) {
                                        $lastCount = 12;
                                        $textValue = _t('월');
                                    } else {
                                        $lastCount = $getYear == 9999 ? 31 : date('t', mktime(0, 0, 0, $getMonth, 1, $getYear));
                                        $textValue = "";
                                    }
                                    for ($i = 1; $i <= $lastCount; $i++) {
                                        $tempData = getStatisticsDB($getDate, $i, $getMenu);
                                        if ($tempData) {
                                            array_push($getData, $tempData['count']);
                                            array_push($getTags, rawurlencode($i . $textValue));
                                        }
                                    }
                                    $getData = implode("|", $getData);
                                    $getTags = implode("|", $getTags);
                                    $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                                    ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                                    echo $getDateTitle;
                                    ?>
 <?php 
                                    echo _t('방문자') . _t('통계');
                                    ?>
(<?php 
                                    echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                                    echo _t('개');
                                    ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                                    echo $getMenu;
                                    ?>
Stic">
									<?php 
                                    echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                                    ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                                    echo $getMenu;
                                    ?>
Pizza">
									<?php 
                                    echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                                    ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                                    if (!$getMonth) {
                                        $getData = array();
                                        $getTags = array();
                                        for ($i = 1; $i <= 4; $i++) {
                                            $tempData = getQuartersStatistics($getYear, $i, $getMenu);
                                            if ($tempData) {
                                                array_push($getData, $tempData);
                                                array_push($getTags, rawurlencode($i . "/4 " . _t('분기')));
                                            }
                                        }
                                        $getData = implode("|", $getData);
                                        $getTags = implode("|", $getTags);
                                        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                                        echo $getDateTitle;
                                        ?>
 <?php 
                                        echo _t('분기별') . _t('방문자') . _t('통계');
                                        ?>
(<?php 
                                        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                                        echo _t('개');
                                        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                                        echo $getMenu;
                                        ?>
QuartersStic">
									<?php 
                                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                                        echo $getMenu;
                                        ?>
QuartersPizza">
									<?php 
                                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
			<hr class="hidden" />
			<hr class="hidden" />
<?php 
                                    }
                                } else {
                                    if ($getMenu == "referer") {
                                        //##############################
                                        // 리퍼러 통계 #################
                                        //##############################
                                        $getData = array();
                                        $getTags = array();
                                        $tempData = getRefererMaxCount();
                                        foreach ($tempData as $item) {
                                            array_push($getData, $item['count']);
                                            array_push($getTags, rawurlencode($item['host']));
                                        }
                                        $getData = implode("|", $getData);
                                        $getTags = implode("|", $getTags);
                                        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 1);
                                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                                        echo _t('리퍼러') . _t('TOP 10') . _t('통계');
                                        ?>
(<?php 
                                        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                                        echo _t('개');
                                        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                                        echo $getMenu;
                                        ?>
MaxStic">
									<?php 
                                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=refer&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                                        echo $getMenu;
                                        ?>
MaxPizza">
									<?php 
                                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                                        $getData = array();
                                        $getTags = array();
                                        $getDuplicate = array();
                                        $beforCount = "";
                                        $tempData = getRefererKeywordStatistics();
                                        foreach ($tempData as $item) {
                                            if ($item['count'] != $beforCount) {
                                                $beforCount = $item['count'];
                                            } else {
                                                array_push($getDuplicate, $item['count']);
                                            }
                                        }
                                        $getDuplicate = array_count_values($getDuplicate);
                                        $beforCount = "";
                                        foreach ($tempData as $item) {
                                            if ($item['count'] != $beforCount && $item['rank'] < 11) {
                                                array_push($getData, $item['count']);
                                                $duplicateCount = $getDuplicate[$item['count']] ? _f("(외 %1 개)", $getDuplicate[$item['count']]) : _f("(외 %1 개)", 0);
                                                array_push($getTags, rawurlencode(htmlspecialchars(UTF8::lessenAsEm($item['keyword'], 15)) . $duplicateCount));
                                                $beforCount = $item['count'];
                                            }
                                        }
                                        $getData = implode("|", $getData);
                                        $getTags = implode("|", $getTags);
                                        $getTotal = $tempData[0]['total'];
                                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                                        echo _t('리퍼러') . _t('키워드 TOP 10') . _t('통계');
                                        ?>
(<?php 
                                        echo number_format($tempData[0]['total']);
                                        echo _t('개');
                                        ?>
) : <?php 
                                        echo $tempData[0]['dateStart'];
                                        ?>
 ~ <?php 
                                        echo $tempData[0]['dateEnd'];
                                        ?>
</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                                        echo $getMenu;
                                        ?>
KeywordMaxStic">
									<?php 
                                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=referkey&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                                        echo $getMenu;
                                        ?>
KeywordMaxPizza">
									<?php 
                                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    ?>
		</div>
	</div>

</div>
						
<?php 
}
	</tr>
	<tr>
		<td height="5"></td>
	</tr>
	<tr>
		<td>
		<div style="width: 340px;">
					<?
					$total = $validations->validNumeric ( $_GET ['total'] );
					$param = $validations->validNumeric ( $_GET ['param'] );
					$remonta_url = '';
					for($i = 0; $i < $total; $i ++) {
						$remonta_url .= '&idfor' . $i . '=' . $_GET ['idfor' . $i];
					}
					require $_CONF ['PATH'] . 'modulos/charts/library/open_flash_chart_object.php';
					open_flash_chart_object ( 340, 280, $_CONF ['PATH_VIRTUAL'] . 'modulos/charts/chart-comparafornecedor.php?total=' . $total . '&param=' . $param . $remonta_url, false );
					?>
				</div>
		</td>
	</tr>
	<tr>
		<td height="5"></td>
	</tr>
	<tr>
		<td style="border-top: 2px solid black"></td>
	</tr>
	<tr>
		<td height="20"><b>Relatório comparativo dos fornecedores</b></td>
	</tr>
	<tr>
		<td style="border-top: 2px solid black"></td>
Exemplo n.º 20
0
    open_flash_chart_object(350, 200, site_url('hospi/hospi_sv_enfermeria/temperatura/' . $atencion['id_atencion']), true, base_url('') . "");
    ?>

</div>

<div style="float:left ; border: 1px solid #999999; margin:10px 10px">
 <?php 
    echo $this->load->helper("open_flash_chart");
    open_flash_chart_object(350, 200, site_url('hospi/hospi_sv_enfermeria/frecuencia_cardiaca/' . $atencion['id_atencion']), true, base_url('') . "");
    ?>

</div>

 <div style="float:left ; border: 1px solid #999999;margin-top:10px">
 <?php 
    open_flash_chart_object(350, 200, site_url('hospi/hospi_sv_enfermeria/frecuencia_respiratoria/' . $atencion['id_atencion']), true, base_url('') . "");
    ?>

</div>

	</td>
  </tr>
<?php 
    if ($monitor != 0) {
        ?>
<tr>
  <td colspan="2">
<table width="100%" border="0" cellspacing="2" cellpadding="2" class="tabla_interna">

<tr>
    <th colspan="2" class="campo_centro">Monitoria</th>
Exemplo n.º 21
0
// Troféer
$smarty->assign("avatarUrl", $medlem->getAvatar()->getUrl());
$guldmedaljer = Sammanstallning::listMedaljer($medlem, Sammanstallning::M_GULD);
$silvermedaljer = Sammanstallning::listMedaljer($medlem, Sammanstallning::M_SILVER);
$guldpokaler = Sammanstallning::listPokaler($medlem, Sammanstallning::P_GULD);
$silverpokaler = Sammanstallning::listPokaler($medlem, Sammanstallning::P_SILVER);
$smarty->assign("silvermedaljer", $silvermedaljer);
$smarty->assign("guldmedaljer", $guldmedaljer);
$smarty->assign("silverpokaler", $silverpokaler);
$smarty->assign("guldpokaler", $guldpokaler);
$smarty->assign("OM", $medlem->getBeskrivning());
// Medlems blockering
if (!empty($USER)) {
    $smarty->assign("blockerad_av_medlem", (int) MedlemsBlockering::verifyBlocked($medlem->getId(), $USER->getId()));
    $smarty->assign("blockerat_medlem", (int) MedlemsBlockering::verifyBlocked($USER->getId(), $medlem->getId()));
}
// Grafer:
include_once ROOT . '/php/libs/php-ofc-library/open-flash-chart-object.php';
ob_start();
open_flash_chart_object(300, 200, '/data/veckograf.php?id=' . $medlem->getId(), false, '/');
$graf = ob_get_contents();
ob_end_clean();
$smarty->assign("graf", $graf);
if (isset($USER) && $USER->getId() == $medlem->getId()) {
    $selfProfile = true;
} else {
    $selfProfile = false;
}
$smarty->assign('selfProfile', $selfProfile);
$smarty->assign("pagetitle", ucfirst($medlem->getANamn()) . " &mdash; Profil");
$smarty->display('profil.tpl');
Exemplo n.º 22
0
    function producto($anio = '', $depto = '', $fami = '', $grupo = '')
    {
        $this->rapyd->load("datagrid2");
        $this->rapyd->load("dataform");
        $this->load->helper('openflash');
        if ($this->uri->segment(4)) {
            $anio = $this->uri->segment(4);
        } elseif (isset($_POST['anio'])) {
            $anio = $_POST['anio'];
        }
        if (empty($anio)) {
            $anio = date("Y");
        }
        $fechai = $anio . '0101';
        $fechaf = $anio . '1231';
        $ajax_onchange = '
			function get_familias(){
			  var url = "' . site_url('supermercado/maes/maesfamilias') . '";
			  var pars = "dpto="+$F("depto");
			  var myAjax = new Ajax.Updater("td_familia", url, { method: "post", parameters: pars });
			
			  var url = "' . site_url('supermercado/maes/maesgrupos') . '";
			  var gmyAjax = new Ajax.Updater("td_grupo", url);
			}
			
			function get_grupo(){
			  var url = "' . site_url('supermercado/maes/maesgrupos') . '";
			  var pars = "dpto="+$F("depto")+"&fami="+$F("familia");
			  var myAjax = new Ajax.Updater("td_grupo", url, { method: "post", parameters: pars });
			}';
        $filter = new DataForm('supermercado/tventas/producto');
        $filter->script($ajax_onchange);
        $filter->title('Filtro de ventas por Producto');
        $filter->anio = new inputField("A&ntilde;o", "anio");
        $filter->anio->size = 4;
        $filter->anio->insertValue = $anio;
        $filter->anio->maxlength = 4;
        $filter->depto = new dropdownField("Departamento", "depto");
        $filter->depto->options("SELECT depto, descrip FROM dpto GROUP BY depto ORDER BY depto");
        $filter->depto->insertValue = $depto;
        $filter->depto->style = 'width:200px;';
        $filter->fami = new dropdownField("Familia", "familia");
        $filter->fami->options("SELECT familia,descrip FROM fami GROUP BY familia ORDER BY familia");
        $filter->fami->insertValue = $fami;
        $filter->fami->style = 'width:200px;';
        $filter->grupo = new dropdownField("Grupo", "grupo");
        $filter->grupo->options("SELECT grupo,nom_grup FROM grup GROUP BY grupo ORDER BY grupo");
        $filter->grupo->insertValue = $grupo;
        $filter->grupo->style = 'width:200px;';
        $filter->button("btnsubmit", "Buscar", form2uri(site_url('supermercado/tventas/producto'), array('anio', 'depto', 'familia', 'grupo')), $position = "BL");
        $filter->build_form();
        $grid = new DataGrid2();
        $select = array("a.depto", "a.familia", "a.grupo", "b.descrip", "SUM(a.monto) AS grantotal", "SUM(a.costo) AS costo", "SUM(a.cantidad) AS cantidad", "SUM(a.monto)-SUM(a.costo) AS ganancia", "(SUM(a.monto)-SUM(a.costo))*100/SUM(a.monto) AS pganancia");
        $grid->db->select($select);
        $grid->db->from("est_item AS a");
        $grid->db->join("maes AS b", "a.codigo=b.codigo");
        $grid->db->where('fecha >= ', $fechai);
        $grid->db->where('fecha <= ', $fechaf);
        $grid->db->where('a.depto', $depto);
        $grid->db->where('a.familia', $fami);
        $grid->db->where('a.grupo', $grupo);
        $grid->db->groupby("a.codigo");
        //$grid->db->limit=10;
        $grid->column("Producto", "descrip", "align='left'");
        $grid->column("Total", "<number_format><#grantotal#>|2|,|.</number_format>", 'align=right');
        $grid->column("Ganancia", "<number_format><#ganancia#>|2|,|.</number_format>", 'align=right');
        $grid->column("% Ganancia", "<number_format><#pganancia#>|2|,|.</number_format> %", 'align=right');
        $grid->column("Cantidad", "cantidad", "align='right'");
        $grid->totalizar('grantotal', 'ganancia');
        $grid->build();
        //echo $grid->db->last_query();
        $grafico = open_flash_chart_object(720, 450, site_url("supermercado/tventas/gproducto/{$anio}/{$depto}/{$fami}/{$grupo}"));
        $data['content'] = $grafico;
        $data['content'] .= $filter->output . $grid->output;
        $data["head"] = $this->rapyd->get_head();
        $data['title'] = "<h1>Ventas por Producto</h1>";
        $this->load->view('view_ventanas', $data);
    }
Exemplo n.º 23
0
    function diarias($anio = '', $vendedor = '', $mes = '')
    {
        $this->rapyd->load("datagrid2");
        $this->rapyd->load("dataform");
        $this->load->helper('openflash');
        $script = '
		$(function() {
			$(".inputnum").numeric(".");
		});
		';
        if (isset($_POST['anio']) and empty($anio)) {
            $anio = $_POST['anio'];
        }
        if (isset($_POST['mes']) and empty($mes)) {
            $mes = $_POST['mes'];
        }
        if (isset($_POST['vd']) and empty($vendedor)) {
            $vendedor = $_POST['vd'];
        }
        //if(empty($anio) OR ($vendedor)) redirect("ventas/vendedoresanuales/index/$anio");
        if (empty($mes)) {
            redirect("ventas/vendedores/mensuales/{$anio}/{$vendedor}");
        }
        $fechai = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '01';
        $fechaf = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '31';
        $scli = array('tabla' => 'scli', 'columnas' => array('cliente' => 'C<p align="right">&oacute;</p>digo Vendedor', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('cliente' => 'C&oacute;digo Cliente', 'nombre' => 'Nombre'), 'retornar' => array('cliente' => 'cod_cli'), 'titulo' => 'Buscar Cliente');
        $cboton = $this->datasis->modbus($scli);
        $filter = new DataForm('ventas/vendedores/diarias');
        $filter->attributes = array('onsubmit' => "this.action='index/'+this.form.mes.value+'/'+this.form.anio.value+'/';return FALSE;");
        $filter->title('Filtro de Ventas Diarias');
        $filter->script($script, "create");
        $filter->script($script, "modify");
        $filter->mes = new dropdownField("Mes/A&ntilde;o", "mes");
        for ($i = 1; $i < 13; $i++) {
            $filter->mes->option(str_pad($i, 2, '0', STR_PAD_LEFT), str_pad($i, 2, '0', STR_PAD_LEFT));
        }
        $filter->mes->size = 2;
        $filter->mes->style = '';
        $filter->mes->insertValue = $mes;
        $filter->anio = new inputField("A&ntilde;o", "anio");
        $filter->anio->in = 'mes';
        $filter->anio->size = 4;
        $filter->anio->insertValue = $anio;
        $filter->anio->maxlength = 4;
        $filter->anio->rule = "trim";
        $filter->anio->css_class = 'inputnum';
        $filter->vendedor = new inputField("Vendedor", "vd");
        $filter->vendedor->size = 10;
        $filter->vendedor->insertValue = $vendedor;
        $filter->vendedor->rule = "max_length[4]";
        $filter->vendedor->append($cboton);
        $filter->button("btnsubmit", "Buscar", form2uri(site_url('ventas/vendedores/diarias/'), array('anio', 'vd', 'mes')), $position = "BL");
        $filter->build_form();
        $grid = new DataGrid2();
        $select = array("vd", "DATE_FORMAT(fecha,'%d/%m/%Y') AS fecha", "SUM(totalg*IF(tipo_doc='D', -1, 1)) AS grantotal", "SUM(totalg*IF(tipo_doc='D', -1, 1))/ COUNT(*) AS porcentaje", "SUM(totalg*(referen IN ('E', 'M'))*IF(tipo_doc='D', -1, 1)) as contado", "SUM(totalg*(referen NOT IN ('E', 'M'))*IF(tipo_doc='D', -1, 1)) as credito", "FORMAT(sum(totals*IF(tipo_doc='D',-1,1)),2) AS subtotal", "FORMAT(sum(iva*IF(tipo_doc='D',-1,1)),2) AS impuesto", "COUNT(*) AS numfac");
        $grid->db->select($select);
        $grid->db->from("sfac");
        $grid->db->where('tipo_doc <> ', 'X');
        $grid->db->where('fecha >= ', $fechai);
        $grid->db->where('fecha <= ', $fechaf);
        $grid->db->where('vd ', $vendedor);
        $grid->db->groupby("fecha");
        $grid->column("Dia", "fecha", "align='center'");
        $grid->column("Sub-Total", "<number_format><#subtotal#>|2|,|.</number_format>", 'align=right');
        $grid->column("Impuesto", "<number_format><#impuesto#>|2|,|.</number_format>", 'align=right');
        $grid->column("Total", "<number_format><#grantotal#>|2|,|.</number_format>", 'align=right');
        $grid->column("Contado", "<number_format><#contado#>|2|,|.</number_format>", 'align=right');
        $grid->column("Cr&eacute;dito", "<number_format><#credito#>|2|,|.</number_format>", 'align=right');
        $grid->column("Participaci&oacute;n", "<number_format><#porcentaje#>|2|,|.</number_format>", 'align=right');
        $grid->column("Cant. Fact", "numfac", 'align=right');
        $grid->totalizar('subtotal', 'impuesto', 'grantotal', 'contado', 'credito');
        $grid->build();
        $grafico = open_flash_chart_object(680, 350, site_url("ventas/vendedores/gdiarias/{$anio}/{$vendedor}/{$mes}"));
        $data['content'] = $grafico;
        $data['content'] .= $filter->output . $grid->output;
        $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
        $data['title'] = $this->rapyd->get_head() . "<h1>Vendedores</h1>";
        $this->load->view('view_ventanas', $data);
    }
Exemplo n.º 24
0
    function filtro()
    {
        $this->rapyd->load("datagrid2");
        $this->rapyd->load("dataform");
        $this->load->helper('openflash');
        $sinv = array('tabla' => 'sinv', 'columnas' => array('codigo' => 'C&oacute;digo', 'descrip' => 'descrip'), 'filtro' => array('codigo' => 'C&oacute;digo', 'descrip' => 'descrip'), 'retornar' => array('codigo' => 'codigo'), 'titulo' => 'Buscar Articulo');
        $iboton = $this->datasis->modbus($sinv);
        if ($this->uri->segment(4)) {
            $codigo = $this->uri->segment(4);
        } elseif (isset($_POST['codigo'])) {
            $codigo = $_POST['codigo'];
        }
        if (empty($codigo)) {
            $codigo = $this->datasis->dameval("SELECT codigo FROM sinv");
        }
        if ($this->uri->segment(5)) {
            $mes = $this->uri->segment(5);
        } elseif (isset($_POST['mes'])) {
            $mes = $_POST['mes'];
        } else {
            $mes = date('m');
        }
        if ($this->uri->segment(6)) {
            $anio = $this->uri->segment(6);
        } elseif (isset($_POST['anio'])) {
            $anio = $_POST['anio'];
        } else {
            $anio = date('Y');
        }
        $script = '
			$(function() {
				$(".inputnum").numeric(".");
			});
			';
        $fechad = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '01';
        $fechah = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '31';
        $filter = new DataForm('ventas/mensuales');
        $filter->attributes = array('onsubmit' => "this.action='index/'+this.form.mes.value+'/'+this.form.anio.value+'/';return FALSE;");
        $filter->title('Filtro de Ventas por Existencias');
        $filter->script($script, "create");
        $filter->script($script, "modify");
        $filter->mes = new dropdownField("Mes/A&ntilde;o", "mes");
        for ($i = 1; $i < 13; $i++) {
            $filter->mes->option(str_pad($i, 2, '0', STR_PAD_LEFT), str_pad($i, 2, '0', STR_PAD_LEFT));
        }
        $filter->mes->size = 2;
        $filter->mes->style = '';
        $filter->mes->insertValue = $mes;
        $filter->anio = new inputField("A&ntilde;o", "anio");
        $filter->anio->in = 'mes';
        $filter->anio->size = 4;
        $filter->anio->insertValue = $anio;
        $filter->anio->maxlength = 4;
        $filter->anio->rule = "trim";
        $filter->anio->css_class = 'inputnum';
        $filter->codigo = new inputField("C&oacute;digo", "codigo");
        $filter->codigo->size = 15;
        $filter->codigo->append($iboton);
        $filter->codigo->insertValue = $codigo;
        $filter->button("btnsubmit", "Buscar", form2uri(site_url('inventario/gproductos/filtro/'), array('codigo', 'mes', 'anio')), $position = "BL");
        $filter->build_form();
        $grid = new DataGrid2();
        $select = array("fecha", "codigo", "sum(cantidad) cantidad", "IF(sum(cantidad)<=salcant,sum(cantidad),salcant)*(salcant>0)as salcant");
        $grid->db->select($select);
        $grid->db->from("costos");
        $grid->db->where('codigo', $coigo);
        $grid->db->where('fecha >= ', $fechai);
        $grid->db->where('fecha <= ', $fechaf);
        $grid->db->where('origen', '3I');
        $grid->db->groupby("fecha");
        $grid->db->orderby("fecha");
        $grid->db->having("cantidad>0");
        $grid->column("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", 'align=center');
        $grid->column("Ventas", "cantidad", 'align=center');
        $grid->column("Existencias", "salcant", 'align=center');
        //$grid->totalizar('grantotal');
        $grid->build();
        //echo $grid->db->last_query();
        $grafico = open_flash_chart_object(680, 450, site_url("inventario/gproductos/grafico/{$codigo}/{$mes}/{$anio}/"));
        $data['content'] = $grafico;
        $data['content'] .= $filter->output . $grid->output;
        $data["head"] = $this->rapyd->get_head();
        $data['title'] = $this->rapyd->get_head() . "<h1>Ventas por Existencias</h1>";
        $this->load->view('view_ventanas', $data);
    }
        </tr>
    </table>
    </form>
    </div>
    <div class="text_small" style="padding:0px 0px 10px 0px">
    <?php 
if ($is_perm_global == 0) {
    echo "Data limited to " . $_SESSION['MVGitHub_userteamzone'] . "";
}
?>
    </div>    
    <div>
    <?php 
if ($_SESSION['display_type'] == "graph") {
    include_once 'php-ofc-library/open_flash_chart_object.php';
    open_flash_chart_object('100%', '100%', 'report_28_-1_data.php');
}
?>
    </div>
    <?php 
if ($_SESSION['display_type'] == "tabular") {
    ?>
    <div>
    <div>
    <table border="0" cellpadding="2" cellspacing="0">
    	<tr>
        	<td class="tbl_h">
            Task Status
            </td>
            <td class="tbl_h">
            %age</td>
Exemplo n.º 26
0
    $positioner = array_reverse($positioner);
    if (count($positioner) > 10) {
        $positioner = array_slice($positioner, count($positioner) - 10, 10);
    }
    $smarty->assign("positioner", $positioner);
    $smarty->assign("nr", $nr);
    $smarty->assign("multiply", $multiplier);
    $smarty->assign("topplistan", $topplistan);
}
//false if no custom added
$foretagCustomBild = CustomForetagsbild::getImgUrlIfValidFile($foretag->getId());
$smarty->assign("foretagCustomBild", $foretagCustomBild);
$topplistaDeltagare = new Topplista();
$topplistaDeltagare->addParameter(Topplista::PARAM_FORETAG, $foretag);
$topplistaDeltagare->addParameter(Topplista::PARAM_START, $foretag->getStartdatum());
$topplistaDeltagare->addParameter(Topplista::PARAM_STOP, $foretag->getSlutdatum());
$smarty->assign("topplistaDeltagare", $topplistaDeltagare);
/* $topplistaForetag = Foretag::getTopplistaForetag();
  $smarty->assign("topplistaForetag", $topplistaForetag);
 */
// Fotoalbum
$bildblock = FotoalbumBild::loadForetagsBildblock($foretag, $antal = 20);
$smarty->assign("bildblock", $bildblock);
// Grafer:
include_once ROOT . '/php/libs/php-ofc-library/open-flash-chart-object.php';
ob_start();
open_flash_chart_object(300, 200, '/data/veckograf.php?fid=' . $foretag->getId(), false, '/');
$graf = ob_get_contents();
ob_end_clean();
$smarty->assign("graf", $graf);
$smarty->display('foretag.tpl');
</table>
<?php 
$rs = mysql_query($sql, cnnGeneral());
$gvalues = "";
$gnames = "";
$i = 0;
$tds = "";
$mnt = 0;
$sm = 0;
while ($rw = mysql_fetch_array($rs)) {
    $val[] = round($rw[1] / 1000, 2);
    $lbl[] = $rw[0];
    $sm += $rw[1];
    $tds = $tds . "<tr>\n\t<td>{$rw['0']}</td>\n\t<td class='mny'>" . getFMoney($rw[1]) . "</td>\n\n\t</tr>";
    $i++;
}
//echo $gnames;
//echo $gvalues;
$sm = getFMoney($sm);
echo "<table width='100%' aling='center'>\n\t<tr>\n\t\t<th>Concepto</th>\n\t\t<th>Monto</th>\n\t</tr>\n\n\t{$tds}\n\n\t<tr>\n\t\t<td>Sumas</td>\n\t\t<td>{$sm}</td>\n\t</tr>\n\n\t</table>";
$x = new SAFEChart();
$x->setValues($val);
$x->setLabels($lbl);
$x->setTitle("INGRESOS ACUMULADOS EN UN RANGO DE FECHAS(Miles)");
$mFile = $x->Chart3DBAR(10000);
open_flash_chart_object(768, 512, $mFile, true, "../");
echo getRawFooter();
?>
</body>
</html>
Exemplo n.º 28
0
 function posfact()
 {
     $this->rapyd->load('datagrid');
     $this->rapyd->load('dataform');
     $this->load->helper('openflash');
     $diai = $this->uri->segment(3);
     $mesi = $this->uri->segment(4);
     $anoi = $this->uri->segment(5);
     $diaf = $this->uri->segment(6);
     $mesf = $this->uri->segment(7);
     $anof = $this->uri->segment(8);
     if ($diai === FALSE or $mesi === FALSE or $anoi === FALSE or $diaf === FALSE or $mesf === FALSE or $anof === FALSE) {
         $usema = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
         $fechai = $fechaf = date('Y/m/d', $usema);
         $qfechai = $qfechaf = date('Ymd', $usema);
     } else {
         $qfechai = $anoi . $mesi . $diai;
         $qfechaf = $anof . $mesf . $diaf;
         $fechai = "{$anoi}/{$mesi}/{$diai}";
         $fechaf = "{$anof}/{$mesf}/{$diaf}";
     }
     $data['lista'] = open_flash_chart_object(600, 250, site_url("supermercado/grafico/{$qfechai}/{$qfechaf}"));
     $select = "date_format(fecha,'%d/%m/%Y') FECHA,\n\t\t         FORMAT(sum((gtotal-impuesto)*(SUBSTRING(numero,1,1)<>'X')),2) SUBTOTAL,\n\t\t         FORMAT(sum(impuesto*(SUBSTRING(numero,1,1)<>'X')),2) IVA, \n\t\t         FORMAT(sum(gtotal*(SUBSTRING(numero,1,1)<>'X')),2) TOTAL,\n\t\t         FORMAT(sum(gtotal*(SUBSTRING(numero,1,1)<>'X' AND gtotal<0) ),2) DEVOLU, \n\t\t         FORMAT(sum(gtotal*(SUBSTRING(numero,1,1)='X')),2) NULAS, \n\t\t         FORMAT(count(*),0) TRANS";
     $union = "UNION (SELECT 'Totales....' FECHA,\n\t\t                FORMAT(sum((gtotal-impuesto)*(SUBSTRING(numero,1,1)<>'X')),2) SUBTOTAL,\n\t\t                FORMAT(sum(impuesto*(SUBSTRING(numero,1,1)<>'X')),2) IVA, \n\t\t                FORMAT(sum(gtotal*(SUBSTRING(numero,1,1)<>'X')),2) TOTAL,\n\t\t                FORMAT(sum(gtotal*(SUBSTRING(numero,1,1)<>'X' AND gtotal<0) ),2) DEVOLU, \n\t\t                FORMAT(sum(gtotal*(SUBSTRING(numero,1,1)='X')),2) NULAS, \n\t\t                FORMAT(count(*),0) TRANS\n\t\t         FROM viefac WHERE fecha BETWEEN {$qfechai} AND {$qfechaf} GROUP BY 'A') ";
     $grid = new DataGrid();
     $grid->db->select($select);
     $grid->db->from("posfact");
     $grid->db->where("fecha=NOW()");
     $grid->db->groupby("fecha");
     $grid->column("Fecha", "FECHA");
     $grid->column("Sub-Total", "SUBTOTAL");
     $grid->column("I.V.A.", "IVA");
     $grid->column("Total", "TOTAL");
     $grid->column("Devoluciones", "DEVOLU");
     $grid->column("Anuladas", "NULAS");
     $grid->column("Transferencias", "TRANS");
     $grid->build();
     $data['forma'] = "<h3>VENTAS EN CURSO</h3>\n" . $grid->output;
     $data['forma'] .= "<h3>VENTAS YA CERRADAS</h3>";
     $filter = new DataForm('/venta/posfact');
     $filter->title('Filtro de ventas cerradas');
     $filter->fechai = new dateField("Desde", "fechai", "d/m/Y");
     $filter->fechai->insertValue = $fechai;
     $filter->fechaf = new dateField("Hasta", "fechaf", "d/m/Y");
     $filter->fechaf->insertValue = $fechaf;
     $filter->fechai->size = $filter->fechaf->size = 10;
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('supermercado/posfact'), array('fechai', 'fechaf')), $position = "BL");
     $filter->build_form();
     $grid2 = new DataGrid("Resultados");
     $grid2->db->select($select);
     $grid2->db->from("viefac");
     $grid2->db->where('fecha >= ', $fechai);
     $grid2->db->where('fecha <= ', $fechaf);
     $grid2->db->groupby("fecha {$union}");
     $grid2->column_orderby("Fecha", "FECHA");
     $grid2->column_orderby("Sub-Total", "SUBTOTAL");
     $grid2->column_orderby("I.V.A.", "IVA");
     $grid2->column_orderby("Total", "TOTAL");
     $grid2->column_orderby("Devoluciones", "DEVOLU");
     $grid2->column_orderby("Anuladas", "NULAS");
     $grid2->column_orderby("Transferencias", "TRANS");
     $grid2->build();
     $data['forma'] .= $filter->output . $grid2->output;
     //echo $grid2->db->last_query();
     $data['titulo'] = $this->rapyd->get_head() . "<center><h2>ANALISIS DE VENTAS</h2></center>";
     $this->layout->buildPage('ventas/view_ventas', $data);
 }
Exemplo n.º 29
0
 function diarias($anio = '', $cliente = '', $mes = '')
 {
     $this->rapyd->load("datagrid2");
     $this->rapyd->load("dataform");
     $this->load->helper('openflash');
     if (isset($_POST['anio']) and empty($anio)) {
         $anio = $_POST['anio'];
     }
     if (isset($_POST['mes']) and empty($mes)) {
         $mes = $_POST['mes'];
     }
     if (isset($_POST['cod_cli']) and empty($cliente)) {
         $cliente = $_POST['cod_cli'];
     }
     if (empty($mes)) {
         redirect("hospitalidad/clientes/mensuales/{$anio}/{$cliente}");
     }
     $fechai = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '01';
     $fechaf = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '31';
     $scli = array('tabla' => 'scli', 'columnas' => array('cliente' => 'C&oacute;digo Cliente', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('cliente' => 'C&oacute;digo Cliente', 'nombre' => 'Nombre'), 'retornar' => array('cliente' => 'cod_cli'), 'titulo' => 'Buscar Cliente');
     $cboton = $this->datasis->modbus($scli);
     $filter = new DataForm('hospitalidad/clientesdiarias');
     $filter->attributes = array('onsubmit' => "this.action='index/'+this.form.mes.value+'/'+this.form.anio.value+'/';return FALSE;");
     $filter->title('Filtro de Ventas Diarias');
     $filter->mes = new dropdownField("Mes/A&ntilde;o", "mes");
     for ($i = 1; $i < 13; $i++) {
         $filter->mes->option(str_pad($i, 2, '0', STR_PAD_LEFT), str_pad($i, 2, '0', STR_PAD_LEFT));
     }
     $filter->mes->size = 2;
     $filter->mes->style = '';
     $filter->mes->insertValue = $mes;
     $filter->anio = new inputField("A&ntilde;o", "anio");
     $filter->anio->in = 'mes';
     $filter->anio->size = 4;
     $filter->anio->insertValue = $anio;
     $filter->anio->maxlength = 4;
     $filter->cliente = new inputField("Cliente", "cod_cli");
     $filter->cliente->size = 10;
     $filter->cliente->insertValue = $cliente;
     $filter->cliente->rule = "max_length[4]";
     $filter->cliente->append($cboton);
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('hospitalidad/clientes/diarias/'), array('anio', 'cod_cli', 'mes')), $position = "BL");
     $filter->build_form();
     $grid = new DataGrid2();
     $select = array("cod_cli,nombre", "DATE_FORMAT(fecha,'%d/%m/%Y') AS fecha", "SUM(gtotal*IF(tipo='D', -1, 1)) AS grantotal", "SUM(gtotal*IF(tipo='D', -1, 1))/ COUNT(*) AS porcentaje", "SUM(gtotal*IF(tipo='D', -1, 1)) AS contado", "SUM(gtotal*IF(tipo='D', -1, 1)) AS credito", "SUM(stotal*IF(tipo='D',-1,1))AS subtotal", "SUM(impuesto*IF(tipo='D',-1,1))AS impuesto", "COUNT(*) AS numfac");
     $grid->db->select($select);
     $grid->db->from("fmay");
     $grid->db->where('tipo<>', 'X');
     $grid->db->where('fecha >= ', $fechai);
     $grid->db->where('fecha <= ', $fechaf);
     $grid->db->where('cod_cli', $cliente);
     $grid->db->groupby("fecha");
     $grid->column("Dia", "fecha", "align='center'");
     $grid->column("Sub-Total", "<number_format><#subtotal#>|2|,|.</number_format>", 'align=right');
     $grid->column("Impuesto", "<number_format><#impuesto#>|2|,|.</number_format>", 'align=right');
     $grid->column("Total", "<number_format><#grantotal#>|2|,|.</number_format>", 'align=right');
     $grid->column("Contado", "<number_format><#contado#>|2|,|.</number_format>", 'align=right');
     $grid->column("Credito", "<number_format><#credito#>|2|,|.</number_format>", 'align=right');
     $grid->column("Participaci&oacute;n", "<number_format><#porcentaje#>|2|,|.</number_format>", 'align=right');
     $grid->column("Cant. Fact", "numfac", 'align=right');
     $grid->totalizar('impuesto', 'grantotal', 'contado', 'credito', 'subtotal');
     $grid->build();
     $grafico = open_flash_chart_object(720, 350, site_url("hospitalidad/clientes/gdiarias/{$anio}/{$cliente}/{$mes}"));
     $data['content'] = $grafico;
     $data['content'] .= $filter->output . $grid->output;
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = $this->rapyd->get_head() . "<h1>Clientes</h1>";
     $this->load->view('view_ventanas', $data);
 }
?>
&nbsp;<?php 
echo TAB_STATUS;
?>
</a></li>
			</ul>

        <div id="chart">

			<table border="0" width="95%" cellspacing="0" cellpadding="0">
			    <tr>
					<td valign="top" width="100%" align="center">

<?php 
include DIR_WS_CLASSES . 'ofc-library/open_flash_chart_object.php';
open_flash_chart_object('100%', 250, vam_href_link('chart_data.php', vam_get_all_get_params(), 'NONSSL'), false);
?>
					</td>
				</tr>
<?php 
if (strlen($report->previous . " " . $report->next) > 1) {
    ?>
										<tr>
											<td width=100% colspan=5>
												<table width=100%>
													<tr>
														<td align=left>
<?php 
    if (strlen($report->previous) > 0) {
        echo '<a href="' . vam_href_link(FILENAME_STATS_SALES_REPORT2, $report->previous, 'NONSSL') . '">&lt;&lt;&nbsp;' . TEXT_PREVIOUS . '</a>';
    }