data);
$sql = "select * from dining ";
if ($filter != "")
$sql .= $filter;
if ($order == "")
$sql .= " order by din_name ";
else $sql .= $order;
$DB->query($sql);
$DB->getRow();
//echo "
\n"; print_r ($all_items); echo "\n";
foreach ($all_items as $key => $val) {
$this_name = ucwords (strtolower($val["name"]));
$this_phone = ucwords (strtolower($val["phone"]));
$this_desc = nl2br($val["desc"]);
if ($val["break_time"] != "") {
$this_breakfast = $val["break_time"];
} else {
$this_breakfast = ($val["breakfast"]=="1" ? "✔" : "✘");
}
if ($val["lunch_time"] != "") {
$this_lunch = $val["lunch_time"];
} else {
$this_lunch = ($val["lunch"]=="1" ? "✔" : "✘");
}
if ($val["dinner_time"] != "") {
$this_dinner = $val["dinner_time"];
} else {
$this_dinner = ($val["dinner"]=="1" ? "✔" : "✘");
}
$this_mon = ($val["open_mon"]=="1" ? "" : "-");
$this_tue = ($val["open_tue"]=="1" ? "" : "-");
$this_wed = ($val["open_wed"]=="1" ? "" : "-");
$this_thu = ($val["open_thu"]=="1" ? "" : "-");
$this_fri = ($val["open_fri"]=="1" ? "" : "-");
$this_sat = ($val["open_sat"]=="1" ? "" : "-");
$this_sun = ($val["open_sun"]=="1" ? "" : "-");
//$this_desc = preg_replace_callback('/([.!?])\s*(\w)/', function ($matches) { return strtoupper($matches[1] . ' ' . $matches[2]); }, ucfirst(strtolower($this_desc)));
echo "
\n";print_r($DB->data);echo "\n"; foreach ($DB->data as $key => $val) { $arr[] = array ( "breakfast" => $val["din_breakfast"], "id" => $val["din_id"], "name" => $val["din_name"], "desc" => $val["din_times"], "lunch" => $val["din_lunch"], "dinner" => $val["din_dinner"], "break_time" => $val["din_breakfast_time"], "lunch_time" => $val["din_lunch_time"], "dinner_time" => $val["din_dinner_time"], "open_mon" => $val["din_open_mon"], "open_tue" => $val["din_open_tue"], "open_wed" => $val["din_open_wed"], "open_thu" => $val["din_open_thu"], "open_fri" => $val["din_open_fri"], "open_sat" => $val["din_open_sat"], "open_sun" => $val["din_open_sun"], "phone" => $val["din_phone"] ); } return $arr; } $DB = new DB (); $all_items = get_page_list ($DB); ?>
Venue
Times
B/Fast
Lunch
Dinner
\n";
echo "
\n";
}
?>
".$this_name."
Ph: ".$this_phone."
\n";
echo "Ph: ".$this_phone."
".$this_desc." \n";
echo "
\n";
echo "MO | TU | WE | TH | FR | SA | SU | \n"; echo "
---|---|---|---|---|---|---|
$this_mon | $this_tue | $this_wed | $this_thu | $this_fri | $this_sat | $this_sun |
".$this_breakfast."
\n";
echo "".$this_lunch."
\n";
echo "".$this_dinner."
\n";
echo "\n";
echo "