Subversion Repositories taios

Rev

Rev 204 | Go to most recent revision | Details | 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'];
12
$latestVersion = $_POST['latestVersion'];
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
{
28
    $page->query('INSERT INTO Projects (0, ' . $user->ID . ', "' . $title . '", "' . $description . '", "' . $logoURL . '", "' . $downloadURL . '", "' . $websiteURL . '", "' . $latestVersion . '", NOW())');
29
    $page->redirect('index.php');
30
}
31
else
32
{
33
    $page->drawError('You do not have permission to access this page.');
34
}
35
 
36
?>