| Revision 2543,
1.2 KB
checked in by jandark-guest, 6 years ago
(diff) |
|
add admin section
|
| Line | |
|---|
| 1 | <? include('../data.php');?> |
|---|
| 2 | <? include('../package.php'); |
|---|
| 3 | |
|---|
| 4 | if(isset($_POST['sb'])) |
|---|
| 5 | if($_POST['sb']){ |
|---|
| 6 | $OBj=new package(); |
|---|
| 7 | $OBj->setPkgName($_POST['package']); |
|---|
| 8 | $OBj->setDeveloper($_POST['devel']); |
|---|
| 9 | $OBj->setDistro($_POST['distro']); |
|---|
| 10 | $OBj->save(); |
|---|
| 11 | echo "<h2>Data has been <span style='color:orange'>Saved</span>.</h2"; |
|---|
| 12 | } |
|---|
| 13 | |
|---|
| 14 | ?> |
|---|
| 15 | |
|---|
| 16 | <form method="post" > |
|---|
| 17 | <table border="0"> |
|---|
| 18 | <tr> |
|---|
| 19 | <th style="text-align:left"> |
|---|
| 20 | Choose Developer name |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | </th> |
|---|
| 24 | |
|---|
| 25 | <td> |
|---|
| 26 | <select name="devel"> |
|---|
| 27 | <? |
|---|
| 28 | foreach($devels_names as $user=>$real_name): |
|---|
| 29 | echo "<option value=\"$user\" >$real_name</option>\n"; |
|---|
| 30 | endforeach; |
|---|
| 31 | ?> |
|---|
| 32 | </select> |
|---|
| 33 | |
|---|
| 34 | </td> |
|---|
| 35 | </tr> |
|---|
| 36 | <tr> |
|---|
| 37 | <th style="text-align:left"> |
|---|
| 38 | Type source package name |
|---|
| 39 | </th> |
|---|
| 40 | <th> |
|---|
| 41 | <input type="text" size="40" name="package" /> (e.g gedit,control-center etc.) |
|---|
| 42 | </th> |
|---|
| 43 | </tr> |
|---|
| 44 | |
|---|
| 45 | <tr> |
|---|
| 46 | <th style="text-align:left"> |
|---|
| 47 | Choose Distribution name |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | </th> |
|---|
| 51 | |
|---|
| 52 | <td> |
|---|
| 53 | <select name="distro"> |
|---|
| 54 | <? |
|---|
| 55 | foreach($dists_names as $name): |
|---|
| 56 | echo "<option value=\"$name\" >$name</option>\n"; |
|---|
| 57 | endforeach; |
|---|
| 58 | ?> |
|---|
| 59 | </select> |
|---|
| 60 | |
|---|
| 61 | </td> |
|---|
| 62 | </tr> |
|---|
| 63 | |
|---|
| 64 | <tr> |
|---|
| 65 | <td colspan="2"> |
|---|
| 66 | <input type="submit" value="Submit Package" /> |
|---|
| 67 | </td> |
|---|
| 68 | </tr> |
|---|
| 69 | </table> |
|---|
| 70 | <input type="hidden" name="sb" value="1" /> |
|---|
| 71 | </form> |
|---|
Note: See
TracBrowser
for help on using the repository browser.