| Revision 2674,
1.7 KB
checked in by jandark-guest, 5 years ago
(diff) |
|
bugfix : check pkg name is uniq
|
| Line | |
|---|
| 1 | <? |
|---|
| 2 | include('../data.php'); |
|---|
| 3 | include('../package.php'); |
|---|
| 4 | |
|---|
| 5 | if(isset($_POST['sb'])) |
|---|
| 6 | if($_POST['sb']){ |
|---|
| 7 | $OBj=new package(); |
|---|
| 8 | $OBj->setPkgName($_POST['package']); |
|---|
| 9 | $OBj->setDeveloper($_POST['devel']); |
|---|
| 10 | $OBj->setDistro($_POST['distro']); |
|---|
| 11 | if($OBj->checkisuniq()) |
|---|
| 12 | { |
|---|
| 13 | $OBj->save(); |
|---|
| 14 | echo "<h2>Data has been <span style='color:orange'>Saved</span>.</h2"; |
|---|
| 15 | }else { |
|---|
| 16 | echo "<h2>Error : This package was added before !</h2>" ; |
|---|
| 17 | } |
|---|
| 18 | } |
|---|
| 19 | ?> |
|---|
| 20 | <html> |
|---|
| 21 | <head> |
|---|
| 22 | <title>Parsix Build Queue System</title> |
|---|
| 23 | <link rel="icon" href="http://parsix.org/html/themes/parsix/images/icon.png" type="image/png" /> |
|---|
| 24 | <link rel="shortcut icon" href="http://parsix.org/html/themes/parsix/images/favicon.ico" /> |
|---|
| 25 | <link rel="stylesheet" href="http://parsix.org/html/themes/parsix/style/styleNN.css" type="text/css" /> |
|---|
| 26 | <style type="text/css"> |
|---|
| 27 | @import url("themes/parsix/style/style.css"); |
|---|
| 28 | </style> |
|---|
| 29 | </head> |
|---|
| 30 | <a href="list.php">Back to List</a><hr /> |
|---|
| 31 | <form method="post" > |
|---|
| 32 | <table border="0"> |
|---|
| 33 | <tr> |
|---|
| 34 | <th style="text-align:left">Choose Developer Name:</th> |
|---|
| 35 | <td> |
|---|
| 36 | <select name="devel"> |
|---|
| 37 | <? |
|---|
| 38 | foreach($devels_names as $user=>$real_name): |
|---|
| 39 | echo "<option value=\"$user\" >$real_name</option>\n"; |
|---|
| 40 | endforeach; |
|---|
| 41 | ?> |
|---|
| 42 | </select> |
|---|
| 43 | </td> |
|---|
| 44 | </tr> |
|---|
| 45 | <tr> |
|---|
| 46 | <th style="text-align:left">Type source package name:</th> |
|---|
| 47 | <th> |
|---|
| 48 | <input type="text" size="40" name="package" /> (e.g gedit,control-center etc.) |
|---|
| 49 | </th> |
|---|
| 50 | </tr> |
|---|
| 51 | |
|---|
| 52 | <tr> |
|---|
| 53 | <th style="text-align:left">Choose Distribution name:</th> |
|---|
| 54 | <td> |
|---|
| 55 | <select name="distro"> |
|---|
| 56 | <? |
|---|
| 57 | foreach($dists_names as $name): |
|---|
| 58 | echo "<option value=\"$name\" >$name</option>\n"; |
|---|
| 59 | endforeach; |
|---|
| 60 | ?> |
|---|
| 61 | </select> |
|---|
| 62 | </td> |
|---|
| 63 | </tr> |
|---|
| 64 | |
|---|
| 65 | <tr> |
|---|
| 66 | <td colspan="2"> |
|---|
| 67 | <input type="submit" value="Submit Package" /> |
|---|
| 68 | </td> |
|---|
| 69 | </tr> |
|---|
| 70 | </table> |
|---|
| 71 | <input type="hidden" name="sb" value="1" /> |
|---|
| 72 | </form> |
|---|
| 73 | </html> |
|---|
Note: See
TracBrowser
for help on using the repository browser.