Exemple #1
0
 /**
  * 用户签到获积分
  * @author wanglulu add by 2015-06-16
  */
 public function userSignin()
 {
     if (!$this->uid) {
         returnJsonData('账户未登入', '401');
     }
     //加载用户模型
     $this->load->model('users_model', 'users');
     $args_array = array('uid' => $this->uid, 'sid' => 77);
     $result_array = $this->users->userSignin($args_array);
     if ($result_array['code'] != '200') {
         returnJsonData($result_array['message'], $result_array['code']);
     }
     returnJsonData('ok', '200', $result_array['data']);
 }
$iconAnchorY = 16;
$statusCodeClosed = "2";
$statusCodeWillNicht = "3";
$statusOpen = "open";
$statusNotOpen = "notopen";
$statusClosed = "closed";
$statusWillNicht = "willnicht";
$bauerUrlStart = "http://mostbauer.com/index.php?option=com_wrapper&Itemid=2&bauerPageType=schmalzbrotdetail&bauerID=";
if (isset($_REQUEST["bauerDetail"])) {
    returnBauerDetailDiv($_REQUEST["bauerDetail"]);
} else {
    $returnData = fetchReturnData($_REQUEST);
    if (isset($_REQUEST["format"]) && strtolower($_REQUEST["format"]) === "kml") {
        returnKmlData($returnData);
    } else {
        returnJsonData($returnData);
    }
}
// fetch data to be returned to the client
function fetchReturnData($requestParams)
{
    if (isset($_REQUEST["wochentag"])) {
        // display bauern according to wochentag
        $doCenter = isset($_REQUEST['doCenter']) ? $_REQUEST['doCenter'] : "true";
        $centerData = array("lat" => 48.306074, "lng" => 14.286293, "zoom" => 10, "doCenter" => $doCenter);
        $markerData = fetchMarkerData($_REQUEST["wochentag"]);
        return $returnData = array("center" => $centerData, "marker" => $markerData);
    } else {
        if (isset($_REQUEST["anfahrt"])) {
            // display anfahrt for given bauer
            $polygonData = fetchPolygonAnfahrtData($_REQUEST["anfahrt"]);