Subversion Repositories taios

Rev

Rev 204 | Rev 492 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
202 tom 1
<?php
2
 
3
require '../_taios.php';
4
 
5
$page = new Taios_Page('Add Project', '../');
6
 
7
$title = $_POST['title'];
8
$description = $_POST['description'];
9
$logoURL = $_POST['logourl'];
10
$websiteURL = $_POST['websiteurl'];
11
$downloadURL = $_POST['downloadurl'];
206 tom 12
$latestVersion = $_POST['latestversion'];
202 tom 13
 
14
$page->checkLoggedIn();
15
$user = $page->getLoggedInUser();
16
 
17
if (empty($title))
18
{
19
    $page->redirect('add-project.php?error=No Title Specified');
20
}
21
if (empty($description))
22
{
23
    $page->redirect('add-project.php?error=No Title Specified');
24
}
25
 
26
if ($page->isUserGM($user))
27
{
204 tom 28
    $page->query('INSERT INTO Projects VALUES (0, ' . $user->ID . ', "' . $title . '", "' . $description . '", "' . $logoURL . '", "' . $downloadURL . '", "' . $websiteURL . '", "' . $latestVersion . '", NOW())');
202 tom 29
    $page->redirect('index.php');
30
}
31
else
32
{
33
    $page->drawError('You do not have permission to access this page.');
34
}
35
 
36
?>