--- a/viewcalls.php +++ b/viewcalls.php @@ -1,3 +1,7 @@ +<?php +include('common.inc.php'); +$tgid = 1; +?> <div class="span12"> <table width="100%" height="375px"><tr><td valign="middle"><span class="arrow-w" style="font-size:2em;"></span></td><td width="95%"><div id="placeholder" style="width:100%;height:375px;"></div></td><td valign="middle"><span class="arrow-e" style="font-size:2em;"></span></td></tr></table> @@ -48,7 +52,7 @@ }); - getData('<?php echo $sensorID; ?>','<?php echo strtotime("12/1/2010") ?>','<?php echo strtotime("12/2/2010") ?>'); + getData('<?php echo $tgid; ?>','<?php echo strtotime("10/10/2012") ?>','<?php echo strtotime("12/10/2012") ?>'); }; @@ -60,7 +64,7 @@ } function getData(sensorID,from,to) { $.ajax({ - url: "<?php echo base_url(); ?>/sensor/json_graph/"+sensorID+"/"+from+"/"+to, + url: "<?php echo $basePath; ?>/calls.json.php?"+sensorID+"/"+from+"/"+to, method: 'GET', dataType: 'json', success: onDataReceived