Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $including = true;
- include ('helper.php');
- $q=$_GET["q"];
- $day=$_GET["day"];
- $array = array();
- switch ($q)
- {
- case "Rice with chicken" :
- $array = getRiceWithChickenArray();
- shuffle($array);
- break;
- case "Rice with ghost" :
- $array = getRiceWithGhostArray ();
- shuffle($array);
- break;
- case "Roti with chicken" :
- $array = getRotiWithChickenArray ();
- shuffle($array);
- break;
- case "Roti with ghost" :
- $array = getRotiWithGhostArray ();
- shuffle($array);
- break;
- case "Other" :
- $array = getOtherArray ();
- shuffle($array);
- break;
- case "Weekend" :
- $array = getWeekendArray ();
- shuffle($array);
- break;
- }
- $weekday = str_replace ( "Table", "", $day );
- $Weekday = ucfirst(str_replace ( "Table", "", $day ));
- print ("<table border=1 width=\"600\">");
- print ("<tr onmouseover=\"style.background='#C0C0C0'\" onmouseout=\"style.background='white'\"> ");
- print ("<th align=\"left\" width=\"20%\">".$Weekday.": </th>");
- print ("<th align=\"left\" width=\"20%\">". ($q) ." </th>");
- print ("<th align=\"left\" width=\"20%\">");
- ${$weekday.'sdish'} = array_pop ($array);
- print (${$weekday.'sdish'} ['name']);
- print (" ");
- print ("</th>");
- print ("<th align=\"left\" width=\"20%\">". ${$weekday.'sdish'}['DATE_FORMAT(last_mad,\'%d/%m/%Y\')']);
- print (" </th>");
- if (${$weekday.'sdish'} != null)
- {
- print ("<th align=\"left\" width=\"20%\"><input type=\"button\" value=\"Try again\" onclick=\"getNewReceipe('" . ($_GET ["q"]). "','".($_GET ["day"])."')\"> </th>");
- }
- if (${$weekday.'sdish'} == null)
- {
- print ("<th align=\"left\" width=\"20%\"> </th>");
- }
- print ("</tr>");
- print ("</table>");
- print ("<input type=\"hidden\" value=\"". (${$weekday.'sdish'}['name'])."\" name=\"sunday\">");
- print ("<input type=\"hidden\" value=\"".$q."\" name=\"sundayCategori\">");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment