<script src="/js/jquery-2.1.4.js"></script> <title>Big Green Snake's Webpages - Homework 4</title> </head> <body> <div class="block"> <div class="cell" style="float: left; clear: all; width: auto;"> <h1>All parties</h1> <p><a href="/homework/hw4/index.html">Back to Homework 4</a></p> </div> </div> <?php require "api.php"; $res = getAllParties(1); $rows = count($res); if ($rows == 0) { print "<script>alert('There are no parties now!'); window.location.href = 'http://162.105.146.180:8122/homework/hw4/index.html#q3'</script>"; } else { print "<div class='panel'>"; print " <h1>Results</h1> "; print "<div class='main' style='width: auto; border-width: 0px'>"; print " <table style='margin-left: auto; margin-right: auto;'>"; print " <tr> "; print " <td>Party no.</td> "; print " <td>Party</td> "; print " <td>Delete</td> "; print " </tr> "; } for ($row_num = 0; $row_num < $rows; $row_num++) {
} </style> <body> <div class="block"> <div class="cell" style="float: left; clear: all; width: auto;"> <h1>Choose parties for a guest</h1> <p><a href="/homework/hw4/index.html">Back to Homework 4</a></p> </div> </div> <?php require "api.php"; $res = getAllGuests(1); $rows = count($res); $res2 = getAllParties(1); $rows2 = count($res2); if ($rows == 0 || $rows2 == 0) { print "<script>alert('There are no guests or no parties now!'); window.location.href = 'http://162.105.146.180:8122/homework/hw4/index.html#q4'</script>"; } else { print "<div class='panel'>"; print " <h1>Select a guest</h1> "; print "<div class='main' style='width: auto; border-width: 0px'>"; print " <table style='margin-left: auto; margin-right: auto;'>"; print " <tr> "; print " <td> </td> "; print " <td>Name</td> "; print " <td>Age</td> "; print " <td>Gender</td> "; print " <td>Email</td> "; print " </tr> ";