public function build_date_dialog() { global $wtd_plugin; $timestamp = $_POST['timestamp']; $res_id = $_POST['res_id']; $resort_query = new \Parse\ParseQuery('resort'); $resort_query->equalTo('objectId', $res_id); $date = new DateTime("@{$timestamp}"); $query = new \Parse\ParseQuery('special'); $query->equalTo('specialDate', $date); $query->matchesQuery('resortObjectId', $resort_query); $results = $query->find(); echo $this->twig->render('md_dialog.twig', array('date' => $date->format('F j, Y'), 'events' => $results, 'url_prefix' => site_url() . '/' . $wtd_plugin['url_prefix'] . '/special/')); die; }
$starCount = $row->starCount; // field name : starCount $videoTitle = $row->videoTitle; // field name : videoTitle $videoTotalDuretion = $row->videoTotalDuretion; // field name : videoTotalDuretion $videoDescription = $row->videoDescription; // field name : videoDescription $videoUploadedOnMonthAndYear = $row->videoUploadedOnMonthAndYear; // field name : videoUploadedOnMonthAndYear } } catch (Exception $e) { echo $e->getMessage(); } if (!empty($deviceToken)) { $winnerentry = new Parse\ParseQuery("videoListTable"); $winnerentry->equalTo("starCount", $starCount); $win = $winnerentry->first(); try { $win->set("status", 'winner'); $win->set("winningPrice", '$50'); $win->set("month", $month); $win->set("year", $year); $win->save(); echo 'New object updated with objectId: ' . $win->getObjectId(); } catch (ParseException $ex) { // Execute any logic that should take place if the save fails. // error is a ParseException object with an error code and message. echo 'Failed to create new object, with error message: ' . $ex->getMessage(); } echo '<script>window.location.href = "push4.php?deviceToken=' . $deviceToken . '";</script>';
<?php $app->get("/", function () use($app) { echo "We are Buyoner!"; }); $app->get("/search/:tag", function ($tag) use($app) { $query = new \Parse\ParseQuery("Product"); try { $result = $query->containsAll("tags", array($tag)); } catch (\Parse\ParseException $ex) { } }); $app->get("/search/", function () use($app) { $imgUrl = ""; $req = $app->request(); $imgUrl = $req->get('url'); $oResponse = new stdObject(); $response = \Clarifai\Tag::retrieve($imgUrl); $oResponse->status = $response->status_code; if ($response->status_code == "OK") { $oResponse->tags = $response->results[0]->result->tag->classes; } else { $oResponse->data = array($response->status_msg); } echoResponse($oResponse); }); $app->get("/verify/", function () use($app) { $imgUrl = ""; $req = $app->request(); $imgUrl = $req->get('url'); $oResponse = new stdObject();