Subversion Repositories taios

Rev

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

<?php

require '../_taios.php';

$page = new Taios_Page('Add Project', '../');

$title = $_POST['title'];
$description = $_POST['description'];
$logoURL = $_POST['logourl'];
$websiteURL = $_POST['websiteurl'];
$downloadURL = $_POST['downloadurl'];
$latestVersion = $_POST['latestversion'];

$page->checkLoggedIn();
$user = $page->getLoggedInUser();

if (empty($title))
{
    $page->redirect('add-project.php?error=No Title Specified');
}
if (empty($description))
{
    $page->redirect('add-project.php?error=No Title Specified');
}

if ($page->isUserGM($user))
{
    $page->query('INSERT INTO Projects VALUES (0, "' . $user->ID . '", "' . $title . '", "' . $description . '", "' . $logoURL . '", "' . $downloadURL . '", "' . $websiteURL . '", "' . $latestVersion . '", NOW())');
    $page->redirect('index.php');
}
else
{
    $page->drawError('You do not have permission to access this page.');
}

?>