/php/default.php
https://bitbucket.org/isanneh/diners-best · PHP · 469 lines · 309 code · 145 blank · 15 comment · 3 complexity · 0d4279b789a6d33b5adcb059884896bb MD5 · raw file
- <?php
- //include 'menu.php';
- session_start();
- //Include database connection details
- include('connect.php');
- $root= "http://foodie.comuv.com/";
- $qry= "SELECT * FROM `images` ";
- $result = @mysql_query($qry);
- $qry2= "SELECT * FROM `hangouts` ";
- $result2 = @mysql_query($qry2);
- $qryq= "SELECT * FROM `hangouts` ";
- $resultq = @mysql_query($qryq);
- $qryp= "SELECT * FROM `images` ";
- $resultp = @mysql_query($qryp);
- $qryp2= "SELECT * FROM `images` ";
- $resultp2 = @mysql_query($qryp2);
- $qryp3= "SELECT * FROM `images` ";
- $resultp3 = @mysql_query($qryp3);
-
- ?>
- <html>
- <head>
- <link rel="stylesheet" type="text/css" href="http://foodie.comuv.com/hm31.css" />
- <link rel="stylesheet" type="text/css" href="http://foodie.comuv.com/funny.css" />
- <style type="text/css">
- .rollover img { display : block;
- width : 100px;
- height : 100px;
- }
- .rollover img:hover { display : block;
- width : 200px;
- height : 200px;
- }
- ul
- {
- list-style-type:none;
- margin:0;
- padding:0;
- }
- li
- {
- display:inline;
- }
- #MainWrapper {
- width:100%;
- width: 1300px; /* you would need to set this to whatever size you wanted your site to be, which would fix the rest of the content with in that */
- }
- </style>
- </head>
- <body>
- <div id="MainWrapper">
- <div id="header">
- <table width="100%">
- <tr>
- <td align="left"><a href="user_registration.php">User Registration</a>
- <a href="restaurant_registration.php">Restaurant Registration</a></td>
- <td align="right"><a href="login-form.php">Login</a></td>
- </tr>
- </table>
- </div>
- <div id="body">
-
-
- <div id="main">
- <div id="content-1">
- <?php
- /* <ul align="center">
- <li><a href=\"user_registration.php\">User Registration</a></li>
- <li><a href=\"restaurant_registration.php\">Restaurant Registration</a></li>
- <li><a href=\"login-form.php\">Login</a></li>
- </ul> */
- echo
- '<table>
- <tr>';
- if($result)
- {
- $j=0;
- $total2=mysql_num_rows($result);
- /*$r=mysql_fetch_assoc($result);
- $p=$result;
- $split_results=array_chunk($r, 3, true);*/
- echo
- '
- <td valign="top">
- <table>';
- while($row=mysql_fetch_assoc($result))
- //foreach ($split_results as $row)
- {
- $j++;
- $qry10= "SELECT * FROM `restaurants` WHERE `Restaurant_Id`='".$row['Restaurant_Id']."'";
- $result10 = @mysql_query($qry10);
- $row10=mysql_fetch_assoc($result10);
-
-
-
- echo
- '
- <tr><td>
- <div id="cover">
- <p> <a href=\' '.$row['Food_Url'].' \'> '.$row['Food_Name'].' </a> </p>
- <a href=\' '.$row['Food_Url'].' \'> <img border="0" src="'.$row['Image_Url'].'" alt="Profile Picture" width="160" height="150" /> </a>
- <p> <a href=\' '.$row10['Profile_Url'].' \'> '.$row10['Restaurant_Name'].' </a> </p>
- </div>
- </td>
- </tr>
- ';
- }
- echo '
- </td>
- </table>
- <td valign="top">
- <table>';
- $tota=mysql_num_rows($resultp);
- while($ro=mysql_fetch_assoc($resultp))
- //foreach ($split_results as $ro)
- {
- $j++;
- $qry10= "SELECT * FROM `restaurants` WHERE `Restaurant_Id`='".$ro['Restaurant_Id']."'";
- $result10 = @mysql_query($qry10);
- $row10=mysql_fetch_assoc($result10);
-
-
-
- echo
- '
- <tr><td>
- <div id="cover">
- <p> <a href=\' '.$ro['Food_Url'].' \'> '.$ro['Food_Name'].' </a> </p>
- <a href=\' '.$ro['Food_Url'].' \'> <img border="0" src="'.$ro['Image_Url'].'" alt="Profile Picture" width="160" height="150" /> </a>
- <p> <a href=\' '.$row10['Profile_Url'].' \'> '.$row10['Restaurant_Name'].' </a> </p>
- </div>
- </td>
- </tr>
- ';
- }
- echo '
- </td>
- </table>
- <td valign="top">
- <table>';
- $tota=mysql_num_rows($resultp2);
- while($ro2=mysql_fetch_assoc($resultp2))
- //foreach ($split_results as $ro2)
- {
- $j++;
- $qry10= "SELECT * FROM `restaurants` WHERE `Restaurant_Id`='".$ro2['Restaurant_Id']."'";
- $result10 = @mysql_query($qry10);
- $row10=mysql_fetch_assoc($result10);
-
-
-
- echo
- '
- <tr><td>
- <div id="cover">
- <p> <a href=\' '.$ro2['Food_Url'].' \'> '.$ro2['Food_Name'].' </a> </p>
- <a href=\' '.$ro2['Food_Url'].' \'> <img border="0" src="'.$ro2['Image_Url'].'" alt="Profile Picture" width="160" height="150" /> </a>
- <p> <a href=\' '.$row10['Profile_Url'].' \'> '.$row10['Restaurant_Name'].' </a> </p>
- </div>
- </td>
- </tr>
- ';
- }
- echo '
- </td>
- </table>
- <td valign="top">
- <table>';
- $tota=mysql_num_rows($resultp3);
- while($ro3=mysql_fetch_assoc($resultp3))
- //foreach ($split_results as $ro3)
- {
- $j++;
- $qry10= "SELECT * FROM `restaurants` WHERE `Restaurant_Id`='".$ro3['Restaurant_Id']."'";
- $result10 = @mysql_query($qry10);
- $row10=mysql_fetch_assoc($result10);
-
-
-
- echo
- '
- <tr><td>
- <div id="cover">
- <p> <a href=\' '.$ro3['Food_Url'].' \'> '.$ro3['Food_Name'].' </a> </p>
- <a href=\' '.$ro3['Food_Url'].' \'> <img border="0" src="'.$ro3['Image_Url'].'" alt="Profile Picture" width="160" height="150" /> </a>
- <p> <a href=\' '.$row10['Profile_Url'].' \'> '.$row10['Restaurant_Name'].' </a> </p>
- </div>
- </td>
- </tr>
- ';
- }
- echo '
- </td>
- </table>
- <td valign="top">
- <table>';
- if($result2)
- {
- $total=mysql_num_rows($result2);
- while($row2=mysql_fetch_assoc($result2))
- {
- echo '<tr><td>
- <div id="cover">';
- $qry3= "SELECT * FROM `hangout_info` WHERE `Hangout_Id`='".$row2['Hangout_Id']."'";
- $result3 = @mysql_query($qry3);
- $row3=mysql_fetch_assoc($result3);
- $qry4= "SELECT * FROM `hangout_attendees` WHERE `Hangout_Id`='".$row2['Hangout_Id']."'";
- $result4 = @mysql_query($qry4);
- $row4=mysql_fetch_assoc($result4);
- $qry5= "SELECT * FROM `restaurants` WHERE `Restaurant_Id`='".$row2['Restaurant_Id']."'";
- $result5 = @mysql_query($qry5);
- $row5=mysql_fetch_assoc($result5);
- $spots_taken=mysql_num_rows($result4);
- $spots_left=$row2['People']- $spots_taken;
- echo
- '
- <p> <a href=\' '.$row3['Url'].' \'> '.$row2['Title'].' </a> @ <a href=\' '.$row5['Profile_Url'].' \'> '.$row5['Restaurant_Name'].' </a> </p>
- <p>Date: '.$row2['Month'].' '.$row2['Day'].' '.$row2['Year'].' @ '.$row2['Time'].' </p>
- </div>
- </td>
- </tr>
- ';
-
- }
- }
- else
- {
- die('Query failed!');
- }
- echo '
- </td>
- </table>
- <td valign="top">
- <table>';
- if($resultq)
- {
- $total=mysql_num_rows($resultq);
- while($row2=mysql_fetch_assoc($resultq))
- {
- echo '<tr><td>
- <div id="cover">';
- $qry3= "SELECT * FROM `hangout_info` WHERE `Hangout_Id`='".$row2['Hangout_Id']."'";
- $result3 = @mysql_query($qry3);
- $row3=mysql_fetch_assoc($result3);
- $qry4= "SELECT * FROM `hangout_attendees` WHERE `Hangout_Id`='".$row2['Hangout_Id']."'";
- $result4 = @mysql_query($qry4);
- $row4=mysql_fetch_assoc($result4);
- $qry5= "SELECT * FROM `restaurants` WHERE `Restaurant_Id`='".$row2['Restaurant_Id']."'";
- $result5 = @mysql_query($qry5);
- $row5=mysql_fetch_assoc($result5);
- $spots_taken=mysql_num_rows($result4);
- $spots_left=$row2['People']- $spots_taken;
- echo
- '
- <p> <a href=\' '.$row3['Url'].' \'> '.$row2['Title'].' </a> @ <a href=\' '.$row5['Profile_Url'].' \'> '.$row5['Restaurant_Name'].' </a> </p>
- <p>Date: '.$row2['Month'].' '.$row2['Day'].' '.$row2['Year'].' @ '.$row2['Time'].' </p>
- </div>
- </td>
- </tr>
- ';
-
- }
- }
- else
- {
- die('Query failed!');
- }
- echo '
- </td>
- </table>
- </tr>
- </table>';
- }
- else
- {
- die('Query failed!');
- }
- ?>
-
- </div>
- <?php
- echo '<div id="footer" >';
- $qry6= "SELECT * FROM `users` ";
- $result6 = @mysql_query($qry6);
- while($row6=mysql_fetch_assoc($result6))
- {
- echo '<a href=\' '.$row6['Profile_Url'].' \'> <img border="0" src="'.$row6['Profile_Image_Url'].'" alt="Profile Picture" width="50" height="50" /> </a>';
- $Profile_Url= "http://foodie.comuv.com/isanneh.php";
- $Profile_Image_Url= "http://foodie.comuv.com/user/isanneh/profile_picture.jpg";
- }
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '<a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a>';
- echo '</div>';
- echo '
- <table>
- <tr>
- <td>
- <table>
- <tr><td><a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a></td></tr>';
- echo '<tr><td><a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a></td></tr></table>
- </td>
- <td>
- <table> ';
- echo '<tr><td><a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a></td></tr>';
- echo '<td><a href=\' '.$Profile_Url.' \'> <img border="0" src="'.$Profile_Image_Url.'" alt="Profile Picture" width="50" height="50" /> </a></td></tr>
- </table>
- </td>
- </tr>
- </table>';
- ?>
- </div>
- </div>
- </body>
- </html>