Subversion Repositories taios

Rev

Rev 517 | 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>
522 muzer 39
<td><input type="text" name="title" value="<?php echo htmlentities($project->title, ENT_QUOTES); ?>" /></td>
214 tom 40
</tr>
41
<tr>
42
<td class="bold">Description: </td>
522 muzer 43
<td><textarea name="description"><?php echo htmlentities($project->description, ENT_QUTOES); ?></textarea></td>
214 tom 44
</tr>
45
<tr>
46
<td class="bold">Logo URL: </td>
522 muzer 47
<td><input type="text" name="logourl" value="<?php echo htmlentities($project->logoURL, ENT_QUOTES); ?>" /></td>
214 tom 48
</tr>
49
<tr>
50
<td class="bold">Website URL: </td>
522 muzer 51
<td><input type="text" name="websiteurl" value="<?php echo htmlentities($project->websiteURL, ENT_QUOTES); ?>" /></td>
214 tom 52
</tr>
53
<tr>
54
<td class="bold">DownloadURL: </td>
522 muzer 55
<td><input type="text" name="downloadurl" value="<?php echo htmlentities($project->downloadURL, ENT_QUOTES); ?>" /></td>
214 tom 56
</tr>
57
<tr>
58
<td class="bold">Latest Version: </td>
522 muzer 59
<td><input type="text" name="latestversion" value="<?php echo htmlentities($project->latestVersion, ENT_QUTOES); ?>" /></td>
214 tom 60
</tr>
61
<tr>
62
<td class="bold"></td>
63
<td><input type="submit" value="Edit Project" /></td>
64
</tr>
517 freddie 65
<input type="hidden" name="csrftoken" value="<?php echo $page->getCSRFToken($page->getLoggedInUser()->ID); ?>" />
214 tom 66
</table>
67
</form>
68
 
69
<?php
70
}
71
else
72
{
73
    $page->drawError('You do not have permission to access this page.');
74
}
75
 
76
$page->drawFooter();
77
 
78
?>