Rev 214 | Rev 289 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
214 | tom | 1 | <?php |
2 | |||
3 | require '../_taios.php'; |
||
4 | |||
215 | tom | 5 | $page = new Taios_Page('Edit Project', '../'); |
214 | tom | 6 | $page->drawHeader(); |
7 | $page->drawMiddle(); |
||
8 | |||
9 | $project = $page->getProject($page->getGetID()); |
||
10 | if (!$project) |
||
11 | { |
||
12 | $page->drawError('No such project, #' . $page->getGetID()); |
||
13 | } |
||
14 | |||
15 | ?> |
||
16 | |||
17 | <p class="bold">Here you can edit a project from the Tim32 database.</p> |
||
18 | <p>Leave an input blank to keep it as it is.</p> |
||
19 | <br /> |
||
20 | |||
21 | <?php |
||
22 | |||
23 | if (isset($_GET['error'])) |
||
24 | { |
||
25 | $page->drawError($_GET['error'], false); |
||
26 | } |
||
27 | |||
28 | if ($page->isUserAdmin($page->getLoggedInUser()) || $page->getLoggedInUser()->ID == $project->author->ID) |
||
29 | { |
||
30 | ?> |
||
31 | |||
32 | <form action="edit-project-do.php" method="POST"> |
||
33 | <input type="hidden" name="id" value="<?php echo $project->ID; ?>" /> |
||
34 | <table> |
||
35 | <tr> |
||
36 | <td class="bold">Title: </td> |
||
37 | <td><input type="text" name="title" value="<?php echo $project->title; ?>" /></td> |
||
38 | </tr> |
||
39 | <tr> |
||
40 | <td class="bold">Description: </td> |
||
41 | <td><textarea name="description"><?php echo $project->description; ?></textarea></td> |
||
42 | </tr> |
||
43 | <tr> |
||
44 | <td class="bold">Logo URL: </td> |
||
45 | <td><input type="text" name="logourl" value="<?php echo $project->logoURL; ?>" /></td> |
||
46 | </tr> |
||
47 | <tr> |
||
48 | <td class="bold">Website URL: </td> |
||
49 | <td><input type="text" name="websiteurl" value="<?php echo $project->websiteURL; ?>" /></td> |
||
50 | </tr> |
||
51 | <tr> |
||
52 | <td class="bold">DownloadURL: </td> |
||
53 | <td><input type="text" name="downloadurl" value="<?php echo $project->downloadURL; ?>" /></td> |
||
54 | </tr> |
||
55 | <tr> |
||
56 | <td class="bold">Latest Version: </td> |
||
57 | <td><input type="text" name="latestversion" value="<?php echo $project->latestVersion; ?>" /></td> |
||
58 | </tr> |
||
59 | <tr> |
||
60 | <td class="bold"></td> |
||
61 | <td><input type="submit" value="Edit Project" /></td> |
||
62 | </tr> |
||
63 | </table> |
||
64 | </form> |
||
65 | |||
66 | <?php |
||
67 | } |
||
68 | else |
||
69 | { |
||
70 | $page->drawError('You do not have permission to access this page.'); |
||
71 | } |
||
72 | |||
73 | $page->drawFooter(); |
||
74 | |||
75 | ?> |