示例#1
0
文件: reports.php 项目: Geolox/server
<?php

require_once 'business.report.php';
require_once 'config.php';
header("Content-type: text/x-json");
$catid = 0;
if ($_REQUEST["catid"] != '') {
    $catid = $_REQUEST["catid"];
}
$reports = new reportBusiness();
$reportsObj = $reports->find($catid);
$arrDatos = array('page' => 1, 'total' => $reportsObj->count());
foreach ($reportsObj as $row) {
    $arrDatos['rows'][] = array('id' => htmlspecialchars($row['reportid'], ENT_QUOTES), 'cell' => array(htmlspecialchars($row['catid'], ENT_QUOTES), htmlspecialchars($row['catname'], ENT_QUOTES), htmlspecialchars($row['subcatid'], ENT_QUOTES), htmlspecialchars($row['subcatname'], ENT_QUOTES), htmlspecialchars($row['loc']['lon'], ENT_QUOTES), htmlspecialchars($row['loc']['lat'], ENT_QUOTES), htmlspecialchars($row['user'], ENT_QUOTES)));
}
echo json_encode($arrDatos);
示例#2
0
<?php

require_once 'business.report.php';
$report = new reportBusiness();
$report->removeAll();
示例#3
0
<?php

require_once 'business.report.php';
require_once 'throtler.php';
require_once 'amqp_config.php';
require_once 'config.php';
$data = json_decode($_REQUEST["report"]);
$report = new reportBusiness();
$result = $report->save($data->body);
if ($result == 1) {
    $queue = new Queue(HOST, PORT, USER, PASS, VHOST);
    $queue->init($_REQUEST["queue"], $_REQUEST["exchange"]);
    $result = $queue->ack($data->body->reportid);
}
echo "({result:" . $result . "})";