Location: PHPKode > projects > NetOffice > netoffice/projects/addprojectsite.php
<?php // $Revision: 1.8 $
/* vim: set expandtab ts=4 sw=4 sts=4: */

/**
 * $Id: addprojectsite.php,v 1.8 2004/01/18 20:55:09 madbear Exp $
 *
 * Copyright (c) 2003 by the NetOffice developers
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

$checkSession = true;
require_once('../includes/library.php');

#$id = $_REQUEST['id'];
#$action = $_REQUEST['action'];

$tmpquery = "WHERE pro.id = '$id'";
$projectDetail = new request();
$projectDetail->openProjects($tmpquery);
$comptProjectDetail = count($projectDetail->pro_id);

if ($comptProjectDetail == '0') {
    header('Location: ../projects/listprojects.php?msg=blankProject');
    exit;
}

if ($idSession != $projectDetail->pro_owner[0] && $profilSession != '5') {
    header('Location: ../projects/listprojects.php?msg=projectOwner');
    exit;
}

if ($action == 'create') {
    $tmpquery = 'UPDATE ' . $tableCollab['projects'] . " SET published='0' WHERE id = '$id'";
    connectSql($tmpquery);
    header('Location: ../projects/viewprojectsite.php?id=' . $id . '&msg=createProjectSite');
    exit;
}

require_once('../themes/' . THEME . '/header.php');

$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($blockPage->buildLink('../projects/listprojects.php?', $strings['projects'], in));
$blockPage->itemBreadcrumbs($blockPage->buildLink('../projects/viewproject.php?id=' . $id, $projectDetail->pro_name[0], in));
$blockPage->itemBreadcrumbs($strings['create_projectsite']);
$blockPage->closeBreadcrumbs();

$block1 = new block();

$block1->form = 'csdD';
$block1->openForm('../projects/addprojectsite.php?action=create&amp;id=' . $id);

$block1->heading($strings['create_projectsite']);

$block1->openContent();
$block1->contentTitle($strings['details']);
$block1->contentRow($strings['project'], $blockPage->buildLink('../projects/viewproject.php?id=' . $id, $projectDetail->pro_name[0], in));

if ($projectDetail->pro_org_id[0] == '1') {
    $block1->contentRow($strings['organization'], $strings['none']);
} else {
    $block1->contentRow($strings['organization'], $blockPage->buildLink('../clients/viewclient.php?id=' . $projectDetail->pro_org_id[0], $projectDetail->pro_org_name[0], in));
}

$block1->contentRow('', '<input type="submit" value="' . $strings['create'] . '">');
$block1->closeContent();
$block1->closeForm();

require_once('../themes/' . THEME . '/footer.php');

?>
Return current item: NetOffice