/home
/deploy
/EHungry-8-simon
/Web
/classes
/Cache.class.php
}
public static function SetObject($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function SetArray($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function SetBoolean($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function Set($key, $var, $expire = 86400) {
App::debugbarLog('debug', "Cache set: $key");
if ($i = static::getInstance()) {
$var = static::beforeSet($var);
return $expire > 0?
$i->setEx($key, $expire, $var) :
$i->set($key, $var);
}
return null;
}
public static function Exists(...$key):?bool {
if ($i = static::getInstance()) {
return $i->exists($key);
}
return null;
}
public static function Expire($key, $ttl) {
if ($i = static::getInstance()) {
return $i->expire($key, $ttl);
}
return false;
}
/**
Arguments
"MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error."
/home
/deploy
/EHungry-8-simon
/Web
/classes
/Cache.class.php
}
public static function SetObject($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function SetArray($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function SetBoolean($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function Set($key, $var, $expire = 86400) {
App::debugbarLog('debug', "Cache set: $key");
if ($i = static::getInstance()) {
$var = static::beforeSet($var);
return $expire > 0?
$i->setEx($key, $expire, $var) :
$i->set($key, $var);
}
return null;
}
public static function Exists(...$key):?bool {
if ($i = static::getInstance()) {
return $i->exists($key);
}
return null;
}
public static function Expire($key, $ttl) {
if ($i = static::getInstance()) {
return $i->expire($key, $ttl);
}
return false;
}
/**
Arguments
"hh_1969-12-31 00:00:00_r9880_ALL_0"
86400
"N;"
/home
/deploy
/EHungry-8-simon
/Web
/classes
/Cache.class.php
public static function getInstance() {
if (static::$redisObj === null) {
static::$redisObj = new Redis();
try {
if (!@static::$redisObj->connect(static::$host, (int)static::$port)) {
static::$redisObj = false;
Splunk::log(Splunk::LOG_REDIS_CONN, ['error' => 'Error connecting']);
} else {
static::$redisObj->select(static::$db);
}
} catch (RedisException $e) {
static::$redisObj = false;
Splunk::log(Splunk::LOG_REDIS_CONN, ['error' => 'Error connecting: '.$e->getMessage()]);
}
}
return static::$redisObj;
}
public static function SetObject($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function SetArray($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function SetBoolean($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function Set($key, $var, $expire = 86400) {
App::debugbarLog('debug', "Cache set: $key");
if ($i = static::getInstance()) {
$var = static::beforeSet($var);
return $expire > 0?
$i->setEx($key, $expire, $var) :
$i->set($key, $var);
}
return null;
}
Arguments
"hh_1969-12-31 00:00:00_r9880_ALL_0"
"N;"
86400
/home
/deploy
/EHungry-8-simon
/Web
/classes
/HolidayHours.class.php
}
}
} else {
$sql = "SELECT id FROM ".HolidayHours::getTableName()." WHERE for_date = ? AND " .
($cid ? "category_id" : "restaurant_id") . " = ? AND order_type = ? $where ORDER BY id DESC";
$db_conn->bindParameter($sql, 1, $date, "string");
$db_conn->bindParameter($sql, 1, $rid, "integer");
$db_conn->bindParameter($sql, 1, $type, "string");
$result = $db_conn->query($sql);
if ($result && $result->rowCount() > 0) {
if ($row = $result->fetch()) {
$hh = new HolidayHours($row['id']);
Cache::SetObject($cacheKey, $hh);
return $hh;
}
}
}
if ($cacheKey) {
Cache::SetObject($cacheKey, null);
}
return null;
}
public static function getByDateAndRestaurant($date, $rid) {
$db_conn = DB::conn();
$rbs = [];
$sql = "SELECT id FROM ".HolidayHours::getTableName()." WHERE for_date = ? AND restaurant_id = ? ORDER BY id DESC";
$db_conn->bindParameter($sql, 1, $date, "string");
$db_conn->bindParameter($sql, 1, $rid, "integer");
$result = $db_conn->query($sql);
if ($result) {
while ($row = $result->fetch()) {
$rbs[] = new HolidayHours($row['id']);
}
}
return $rbs;
}
public static function storeHours($holidayClosed, $forDate, $restaurantID, $holidayNotifications, $holidayOpenHour, $holidayOpenMinute, $holidayOpenMeridien, $holidayClosedHour, $holidayClosedMinute, $holidayClosedMeridien, $timeErrorMessage, $orderType, $namedHolidayID, $holidayDateRangeID, $categoryID = null, $isYearly = false, $showCategoryWhenClosed = false) {
Arguments
"hh_1969-12-31 00:00:00_r9880_ALL_0"
null
/home
/deploy
/EHungry-8-simon
/Web
/classes
/HolidayHours.class.php
}
if (!$time) {
$time = $restaurant->getLocalTime();
}
$holidayHours = HolidayHours::getByDateAndCategoryAndType(date('Y-m-d 00:00:00', $time), $category->getId(), $orderType, $isHiddenToCustomers);
if (is_object($holidayHours)) {
return $holidayHours;
}
//check parent category too
if ($category->parent_id) {
$holidayHours = HolidayHours::getByDateAndCategoryAndType(date('Y-m-d 00:00:00', $time), $category->parent_id, $orderType, $isHiddenToCustomers);
if (is_object($holidayHours)) {
return $holidayHours;
}
}
return false;
}
public static function getByDateAndRestaurantAndType($date, $rid, $type = 'PICKUP') {
return HolidayHours::getByDateAndTypeAndRestaurantOrCategory($date, $rid, null, $type);
}
public static function getByDateAndCategoryAndType($date, $cid, $type = null, $isHiddenToCustomers = false) {
return HolidayHours::getByDateAndTypeAndRestaurantOrCategory($date, null, $cid, $type, $isHiddenToCustomers);
}
public static function getByDateAndTypeAndRestaurantOrCategory($date, $rid = null, $cid = null, $type = 'PICKUP', $isHiddenToCustomers = false) {
$db_conn = DB::conn();
$cacheKey = 'hh_'.$date.'_'.($cid > 0 ? ('c'.$cid):('r'.$rid)).'_'.($type?:'ALL') . "_" . ($isHiddenToCustomers ? '1' : '0');
$aObj = Cache::GetObject($cacheKey, true);
if ($aObj || is_null($aObj)) {
return $aObj;
}
$where = '';
if ($cid) {
$rid = $cid;
if ($isHiddenToCustomers) {
$where .= ' AND show_category_when_closed = 0';
Arguments
"1969-12-31 00:00:00"
9880
null
null
/home
/deploy
/EHungry-8-simon
/Web
/classes
/Restaurant.class.php
if (!empty($startEndArray[0][$open])) {
$close = min($close, $startEndArray[0][$open]);
}
if ($close < $open) {
$startEndArray[$i-1][$open] = '23:59';
} else {
$startEndArray[$i-1][$open] = $close;
}
if (empty($startEndArray[$i-1]['00:00']) && $prevclose < $prevopen) {
$startEndArray[$i-1]['00:00'] = $prevclose;
$prevDayClose = $prevclose;
}
}
}
//if there are holiday hours for this day - only return these hours
$startEndInvalidArray = [];
if (!$excludingClosedHours) {
$holidayHours = HolidayHours::getByDateAndRestaurantAndType(date('Y-m-d 00:00:00', $dateTimestamp), $this->getId(), $cart->getBaseOrderType());
if (is_object($holidayHours)) {
$startTime = date('H:i', strtotime($holidayHours->getStartHour()));
$endTime = date('H:i', strtotime($holidayHours->getEndHour().'-1 minute'));
$startEndArray = [[$startTime => $endTime]];
}
//remove times from closed hours
$closedHours = ClosedHours::getByDateAndRestaurantAndType($dateTimestamp, $this->getId(), $cart->getBaseOrderType());
if (!is_object($holidayHours) && is_array($closedHours) && count($closedHours) > 0) {
foreach ($closedHours as $h) {
$startTime = date('H:i', strtotime($h->getStartTime()));
$endTime = date('H:i', strtotime($h->getEndTime().'-1 minute'));
$startEndInvalidArray[] = [$startTime => $endTime];
}
}
}
//menu available times
$prevDayMenusClose = '00:00';
$prevDayMenusClosed = true;
Arguments
"1969-12-31 00:00:00"
9880
null
/home
/deploy
/EHungry-8-simon
/Web
/templates4.0
/customer
/date_time_picker.php
</div>
<? if ($cart->getTimeSlotsEnabled($restaurant)) { ?>
<div class="timepicker-slots">
<div class="timepicker-picker-slots">
<?
$date = date('Y-m-d H:i:s', strtotime($cart->getReadyAt()) ?: $eot);
try {
$date = new DateTime($date);
} catch (Exception $e) {
$date = new DateTime();
} ?>
<? include(CORE_PATH. 'view4.0/ajax/getavailabletimes.php'); ?>
</div>
</div>
<? } else { ?>
<div class="timepicker col-md-4">
<div class="timepicker-picker">
<?
$datetime = DateTime::createFromFormat('Y-m-d H:i:s', ($cart->getReadyAt() ?: date('Y-m-d H:i:s', $eot)))?: new DateTime();
$times = $restaurant->getAvailableTimes($datetime, true); ?>
<ul class="ready-at-time css-scroll">
<? if (!($times)) { ?>
<br/>No Time Slots Available
<? } ?>
<? $i = 0;
foreach ($times as $time) { ?>
<? $isChecked = $cart->getReadyAt() && date('g:i A', strtotime($cart->getReadyAt())) == $time ?>
<li class="time-button <?=$isChecked ? 'selected' : ''?>">
<input id="timeValue<? echo $i ?>" type="radio" value="<?=$time?>" name="param_ready~at~time_s_n_15"
class="btn-check rad-ready_at_time" onchange="saveFormState('param_ready~at~time_s_n_15', this.value, true);"
<?=$isChecked ? 'checked' : ''?> data-required-field data-ready-attime/>
<label for="timeValue<? echo $i ?>" class="btn btn-outline-secondary btn-sm" for=""><?=$time?></label>
</li>
<? $i++;
} ?>
</ul>
</div>
</div>
<? } ?>
</div>
Arguments
DateTime @0 {
date: 1969-12-31 16:00:00.0 America/Los_Angeles (-08:00)
}
true
/home
/deploy
/EHungry-8-simon
/Web
/templates4.0
/customer
/later_options.php
<div class="select-time-container">
<? include(CORE_PATH . "templates4.0/customer/date_time_picker.php"); ?>
</div>
<input type="hidden" name="param_ready~at_s_n_100" class="hid-ready-at" value="<?=$cart->getReadyAt()?date('Y-m-d H:i', strtotime($cart->getReadyAt())):null?>" />
<input type="hidden" class="hid-ready-at-date" value="<?=$cart->getReadyAt() ? date('Y-m-d', strtotime($cart->getReadyAt())) : date('Y-m-d')?>" />
<? if ($restaurant->time_slots_enabled) { ?>
<input type="hidden" name="param_ready~at~time~slot_i_n_100" class="hid-ready-at-time-slot" value="<?=$cart->getReadyAtTimeSlot()?>" />
<? } ?>
<input type="hidden" class="hid-eot" value="<?=date('Y-m-d H:i:s', $eot)?>" />
Arguments
"/home/deploy/EHungry-8-simon/Web/templates4.0/customer/date_time_picker.php"
/home
/deploy
/EHungry-8-simon
/Web
/templates4.0
/customer
/modal_order_time.php
<?php if ($restaurant->laterOrdersAllowed()) { ?>
<input type="radio" name="param_order~time~type_i_n_1" id="order_time_type_1-<?=$orderTimeTypeId?>" value="1" class="btn-check timeswitch orderTimeTypeOption"
<?=$cart->getOrderTimeType() == ORDER_TIME_TYPE_FUTURE || $asapDisabled ? 'checked' : ''?> data-show-later-box-on-click="#later-box-ordertimetypes" />
<label for="order_time_type_1-<?=$orderTimeTypeId?>" class="d-flex align-items-center justify-content-center btn btn-outline-secondary <?=$cart->getReadyAt()?'highlighted':''?> w-50" data-toggle-later>
<span>
Later
<span class="d-block small fw-normal"><?=$cart->getReadyAtLaterString($restaurant)?></span>
</span>
</label>
<?php } ?>
</div>
<? if (!$cart->getIsTypeClosed($restaurant) && !$cart->getOrderPushedToNextDay()) { ?>
<div id="asapContent" class="<?=$cart->getOrderTimeType() == ORDER_TIME_TYPE_ASAP || $restaurant->onlyAsapOrdersAllowed() ? '' : ' d-none' ?>">
<p class="mt-3 mb-0">Your order will be delivered as soon as possible.</p>
</div>
<? } ?>
<?php if ($restaurant->laterOrdersAllowed()) { ?>
<div id="laterContent" class="<?=$cart->getOrderTimeType() == ORDER_TIME_TYPE_FUTURE || $asapDisabled ? '' : 'd-none'?>">
<? include(CORE_PATH. 'templates4.0/customer/later_options.php'); ?>
</div>
<?php } ?>
</div>
<div class="modal-footer">
<? $isCheckout = $_REQUEST['form'] == 'checkout' || $_REQUEST['checkout'] == 'true'; ?>
<input type="hidden" id="hid-order-time-type" value="<?=$cart->getOrderTimeType() == ORDER_TIME_TYPE_FUTURE || $asapDisabled || $isCheckout ? '1' : '0'?>" />
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" data-save-time-modal>Save</button>
</div>
</div>
</div>
</div>
Arguments
"/home/deploy/EHungry-8-simon/Web/templates4.0/customer/later_options.php"
/home
/deploy
/EHungry-8-simon
/Web
/templates4.0
/customer
/footer.php
'checked' => $account->getSetting(Setting::ACCOUNT_IS_RECEIVE_PROMOTIONS_DEFAULT) == 1,
], 'Receive Promotional Offers & Updates')?>
</div>
<? } ?>
<div class="form-group">
<input id="submit-user-registration" type="submit" name="submitregister" class="form-submit btn btn-primary w-100" value="Sign Up" role="button">
<input type="hidden" name="submitform" value="1" />
<?=generateCSRF('register')?>
</div>
<div class="alt_form text-center">
<p class="mb0">Already have an account? <a href="#" data-bs-dismiss="modal" data-bs-toggle="modal" data-bs-target="#login" role="button"><?=MainNavigationTab::getTabName($account?$account->id:null, 'login', 'Log In')?></a></p>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- login modal end -->
<? include(CORE_PATH . 'templates4.0/customer/modal_order_time.php');?>
<!-- www modal start -->
<?php if ($account && !$isCheckout) { ?>
<div class="modal fade mob_full_modal www_modal order-options" id="modal-order-options" tabindex="-1" role="dialog"
aria-hidden="true" data-update-otype-on-modal-close>
<div class="modal-dialog modal-fullscreen-sm-down mt-sm-6" role="document">
<div class="modal-content">
<button class="d-md-none close" type="button" data-bs-dismiss="modal" aria-label="Close"></button>
<div class="modal-header">
<div class="h4 modal-title">Order details</div>
</div>
<div class="modal-body">
<div class="www_moda_content">
<div class="cs_box order_type" onchange="app.event.emit('order_type_changed', { order_type: event.target.value })">
<div class="h5">What:</div>
<? /*<ul>
<li>
<input type="radio" name="wotype" id="worad1" class="css-checkbox" checked>
<label for="worad1" class="css-label">Delivery</label>
</li>
Arguments
"/home/deploy/EHungry-8-simon/Web/templates4.0/customer/modal_order_time.php"
/home
/deploy
/EHungry-8-simon
/Web
/controllers
/customer.php
$tab = MainNavigationTab::getAllForAccount($account->getId());
include_once(CORE_PATH.'lib/helpers/customer3.0.php');
if (!in_array($_REQUEST['form'], $viewContentOnly)) {
App::debugbarTime('header');
include_once(getLayoutPartPath('header'));
App::debugbarTime('header');
}
App::debugbarTime("view '{$_REQUEST['form']}'");
$path = CORE_PATH.'view' . ($_REQUEST['_VERSION'] == 4 ? 4 : 3) . '.0/customer/'.$_REQUEST['form'].'.php';
if (is_readable($path)) {
include_once($path);
}
App::debugbarTime("view '{$_REQUEST['form']}'");
if (!in_array($_REQUEST['form'], $viewContentOnly)) {
App::debugbarTime('footer');
include_once(getLayoutPartPath('footer'));
App::debugbarTime('footer');
}
function getLayoutPartPath($part) {
if (isset($_REQUEST['_CORDOVA_APP'])) {
$cart = Cart::getCurrent();
//FIXME: it's technically possible to end up with $template = null
if (!$_REQUEST['contentonly']) {
$template = !isset($_REQUEST["altdoc"])? "app/$part" : "app/alt$part";
}
} else {
$template = !isset($_REQUEST["altdoc"])? "customer/$part" : "customer/alt$part";
}
if ($_REQUEST['_VERSION'] == 4) {
return CORE_PATH."templates4.0/$template.php";
} else {
return CORE_PATH."templates3.0/$template.php";
}
Arguments
"/home/deploy/EHungry-8-simon/Web/templates4.0/customer/footer.php"
/home
/deploy
/EHungry-8-simon
/Web
/index.php
App::startTime();
ErrorHandlers::register();
// Global.php is the core setup file for the application
App::debugbarTime('Global.php');
require(dirname(__DIR__) . '/PHP/Global.php');
App::debugbarTime('Global.php');
/** @var string $controller The main controller - defined at /PHP/Global.php */
App::debugbarTime('Sentry - controller');
ErrorHandlers::sentryInit($controller); //doesn't always do much - not every controller has a Sentry project
App::debugbarTime('Sentry - controller');
App::debugbarTime("controller: $controller");
apache_note('AppController', $controller);
if (file_exists(CORE_PATH."lib/helpers/$controller.php")) {
require CORE_PATH."lib/helpers/$controller.php";
}
require CORE_PATH."controllers/$controller.php";
App::debugbarTime("controller: $controller");
Arguments
"/home/deploy/EHungry-8-simon/Web/controllers/customer.php"