Subversion Repositories taios

Rev

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