Again
By: Xmoo | Date: May 8 2009 09:06 | Format: PHP | Expires: never | Size: 5.43 KB | Hits: 1266
- <?php
- echo "<font color='2d6fbb' size='+1'><b>Edit:</b></font><br><br>";
- if ($_GET['userid']) {
- $eid = $_GET['userid'];
- $sql = "UPDATE my_users SET username = '".$_POST["username"]."', password = '".$password."', acces = '".$_POST["acces"]."', title = '".$_POST["title"]."', surname = '".$_POST["surname"]."', middlename = '".$_POST["middlename"]."', lastname = '".$_POST["lastname"]."', dateofbirth = '".$_POST["dateofbirth"]."', sex = '".$_POST["sex"]."', phone = '".$_POST["phone"]."', phone2 = '".$_POST["phone2"]."', email = '".$_POST["email"]."', address = '".$_POST["address"]."', zipcode = '".$_POST["zipcode"]."', location = '".$_POST["location"]."', country = '".$_POST["country"]."', account = 'A' WHERE id = '".$eid."'";
- echo "<br><br><br><center><b><font face=verdana size=2 color=green>User succesfully edited!</font></b></center><br><br><br>";
- echo "<meta http-equiv='refresh' content='2;url=?p=cp&a=users&option=edit'>";
- }
- else {
- {
- $username = $info->username;
- $password = $info->password;
- $toegang1 = $info->acces;
- $title = $info->title;
- $surname = $info->surname;
- $middlename = $info->middlename;
- $lastname = $info->lastname;
- $dateofbirth = $info->dateofbirth;
- $sex = $info->sex;
- $phone = $info->phone;
- $phone2 = $info->phone2;
- $email = $info->email;
- $address = $info->address;
- $zipcode = $info->zipcode;
- $location = $info->location;
- $country = $info->country;
- echo "<form action='' method='post'>";
- echo "<b>Username</b>: <input type='text' name='username' size='30' value='".$username."'/><br>";
- echo "<b>Password</b>: <input type='text' name='password' size='30' value='".$password."'/><br><br>";
- echo "<b>Acces</b>: <select name='acces>";
- { $toegang2 = $info->acces;
- if($toegang1 == $toegang2){
- echo "<option value='".$toegang2."' SELECTED>".$toegang2."</option>"; } else {
- echo "<option value='".$toegang2."'>".$toegang2."</option>"; } }
- echo "</select> - <a href='?p=cp&a=acces&s=list'><b>Edit</b></a><br><br>";
- echo "<b>Title</b>: <select name='title'>";
- if($title == 'Sir'){
- echo "<option value='Sir' SELECTED>Sir.</option>
- <option value='Madame'>Madame.</option>"; } else {
- echo "<option value='Sir'>Sir.</option>
- <option value='Madame' SELECTED>Madame.</option>"; }
- echo "</select><br>";
- echo "<b>Surname</b>: <input type='text' name='surname' size='20' value='".$surname."'/><br>";
- echo "<b>Middlename</b>: <input type='text' name='middlename' size='20' value='".$middlename."'/><br>";
- echo "<b>Lastname</b>: <input type='text' name='lastname' size='20' value='".$lastname."'/><br>";
- echo "<b>Date of birth</b>: <input type='text' name='dateofbirth' size='20' value='".$dateofbirth."'/><br>";
- echo "<b>Sex</b>: <select name='sex'>";
- if($sex == 'Male'){
- echo "<option value='Male' SELECTED>Male</option>
- <option value='Female'>Female</option>"; } else {
- echo "<option value='Male'>Male</option>
- <option value='Female' SELECTED>Female</option>"; }
- echo "</select><br><br>";
- echo "<b>Phone</b>: <input type='text' name='phone' size='20' value='".$phone."'/><br>";
- echo "<b>Phone 2</b>: <input type='text' name='phone2' size='20' value='".$phone2."'/><br>";
- echo "<b>E-mail</b>: <input type='text' name='email' size='20' value='".$email."'/><br><br>";
- echo "<b>Address</b>: <input type='text' name='address' size='20' value='".$address."'/><br>";
- echo "<b>Zip code</b>: <input type='text' name='zipcode' size='20' value='".$zipcode."'/><br>";
- echo "<b>Location</b>: <input type='text' name='location' size='20' value='".$location."'/><br>";
- echo "<b>Country</b>: <input type='text' name='country' size='20' value='".$country."'/><br><br>";
- echo "<center><input type='submit' name='submit' value='Edit user!'></center></form>";
- }
- }
- } else {"<font color='2d6fbb' size='+1'><b>Users:</b></font><br><br>";
- echo "<table border='0' bordercolor='' width='100%' bgcolor=''>
- <tr>
- <td width='10%'><font color='c8183e'><b>ID:</b></font></td>
- <td width='*%'><font color='c8183e'><b>Name:</b></font></td>
- <td width='15%'><font color='c8183e'><b>Acces:</b></font></td>
- <td width='6%'><font color='c8183e'><b>Edit:</b></font></td>
- </tr>";
- {
- $id = $info->id;
- $surname = $info->surname;
- $middlename = $info->middlename;
- $lastname = $info->lastname;
- $acces = $info->acces;
- echo "<tr>
- <td>".$id."</td>
- <td>".$surname." ".$middlename." ".$lastname."</td>
- <td><b>".$acces."</b></td>
- <td><center><a href='?p=cp&a=users&option=edit&userid=".$id."'><img src='images/pointers/edit.png' border='0' alt='View'></a></center></td>
- </tr>"; }
- echo "</table>";
- ?>
Latest pastes
1 days ago
2 days ago
4 days ago
6 days ago
6 days ago