Ejemplo n.º 1
0
    //$ouv = @$_POST['ouv']=='true'? true : false;
    //$hf = @$_POST['hf']=='true'? true : false;
    $scode = @$_POST['shortcode'];
    $opt = @$_POST;
    if ($surl->update_opt($scode, $opt) === true) {
        $data["status"] = true;
        $data["msg"] = "Save Successful";
        //$data['thepost'] = $_POST['country_not_on_list'];
    } else {
        $data["status"] = false;
        $data["msg"] = "Save failed try again";
    }
    echo json_encode($data);
}
/* URL DETAILS GET STATS */
if (isset($_GET['details'])) {
    $d_act = $_GET['details'];
    //CBC click by Country | CBO click by os
    $Stats = new StatsUrl($_POST['sc']);
    if ($d_act == 'CBC') {
    } else {
        if ($d_act == 'CBO') {
            $data['cols'] = array(array("id" => 'os', 'label' => 'Platforms', 'type' => 'string'), array("id" => 'click', 'label' => 'Click', 'type' => 'number'), array("id" => 'click', 'label' => 'Click', 'type' => 'string', 'role' => 'style'));
            $data['rows'] = array();
            foreach ($Stats->ClickByOs() as $key => $out) {
                array_push($data['rows'], array('c' => array(array('v' => $key), array('v' => $out))));
            }
            print json_encode($data);
        }
    }
}
Ejemplo n.º 2
0
        var options = {	width:"100%",
					 	height:300,
						backgroundColor:{fill:'#fff',stroke:'#404'},
						datalessRegionColor:'#fff',
						 colorAxis:{minValue: 0,  colors: ['#93FFAE', '#093']}
						};

        var chart = new google.visualization.GeoChart(document.getElementById('click_by_contry'));
        chart.draw(data, options);
    };
   /*
            var data = google.visualization.arrayToDataTable([
              ['Element', 'Click',{ role: 'style' }],
			  <?php 
foreach ($Details->ClickByOs() as $key => $total) {
    ?>
			  ['<?php 
    echo $key;
    ?>
',<?php 
    echo $total;
    ?>
, ''],
			  <?php 
}
?>
            ]);
			*/
	$(".chosen-select").chosen();
</script>