Server IP : 172.16.15.8 / Your IP : 3.147.75.46 Web Server : Apache System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.2.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/bdstamour/public_html/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php session_start(); if (isset($_SESSION['username'])) { ?> <HEAD> <TITLE> FirstStep </TITLE><link rel="stylesheet" type="text/css" href="research.css"> </HEAD> <BODY> <CENTER> <Form action=PartnersConfirmationAction.php method=post><p> <?php $host = 'localhost'; $user = 'bdstamour'; $passw = 'cs480'; $database = 'bdstamour'; $connect = mysqli_connect($host, $user, $passw); mysqli_select_db($connect, $database); $requesters = array(); $usernamesesh = $_SESSION['username']; $query = "select id from FirstStep2 where username='$usernamesesh'"; $UserArray = mysqli_fetch_array(mysqli_query($connect, $query)) or die(mysqli_error($connect)); $UserID = $UserArray[0]; $sql = "select User1ID from Partners where User2ID='$UserID' and Status='1'"; $result = mysqli_query($connect, $sql) or die(mysqli_error($connect)); while ($row = mysqli_fetch_row($result)) { $requesters = $row; } if(count($requesters)==0) { print "You have no partnership requests at this time."; ?> <HR> <?php } else { print "You have a partnership request from: "; $i=0; $count=0; for($n=0; $n<count($requesters); $n++) { $sql = "select first, last, username from FirstStep2 where id='$requesters[$n]'"; $result = mysqli_query($connect, $sql) or die(mysqli_error($connect)); print '<table border=1>'; print '<th>First Name<th>Last Name<th>Username<th>Partnership'; while ($row = mysqli_fetch_row($result)) { print "<tr>"; foreach($row as $field) { print "<td>$field</td>"; } print "<td>Confirm or reject partnership? <input type=checkbox name=confirm[] value=$i>Confirm<input type=checkbox name=reject[] value=$count>Reject</td>"; print "</tr>"; $i++; $count++; } } print "<p>"; ?> </table> <p><p> <INPUT type=submit value=Submit> <INPUT type=reset value=Reset> </Form> <HR> <?php } ?> <?php } else { ?> <CENTER> <?php print "You are not logged in. Please <A HREF=FirstStepIndex.php>login.</A><p>"; print "<A HREF=NewUser.php>Not registered? Let's get started!</A><p>"; } ?> </HTML> </CENTER> </BODY>