示例#1
0
文件: view.php 项目: allybitebo/ucb
<?php

$projectFrom = $_GET['from'];
$project = new Project();
$list = $project->single_project($_GET['projectId']);
$client = new Client();
$clientCheck = $client->ProjectClientCheck($_GET['projectId']);
if ($clientCheck > 0) {
    $clientInfo = $client->listOfProjectClient($_GET['projectId']);
} else {
    $clientInfo = "addClient";
}
$consultant_project = new Consultant_Project();
$consultantCheck = $consultant_project->checkConsultantsInProject($_GET['projectId']);
$consultant = new Consultant();
if ($consultantCheck > 0) {
    $consultantInfos = $consultant->consultants_in_project($_GET['projectId']);
} else {
    $consultantInfos = "addConsultant";
}
$payment = new Payment();
$paymentInfos = $payment->listOfProjectPayment($_GET['projectId']);
?>

<div class="container">
	<div class="panel panel-primary">
		<div class="panel-heading">
			<div class="row">
				<div class="col-xs-3"><p align="left"><a href="<?php 
echo WEB_ROOT;
?>
示例#2
0
function doAddConsultant()
{
    if (isset($_POST['save'])) {
        $PROJECTID = $_SESSION["project_id"];
        $CONSULTANTID = $_POST['pconsultant'];
        $client_project = new Consultant_Project();
        $client_project->cons_proj_consultant_id = $CONSULTANTID;
        $client_project->cons_proj_project_id = $PROJECTID;
    }
    if ($PROJECTID == "") {
        message('Project Name is required!', "error");
        redirect('index.php?view=add');
    } elseif ($CONSULTANTID == "") {
        message('Consultant Name is required!', "error");
        redirect('index.php?view=add');
    } else {
        $client_project->create();
        message('A Consultant was addedd successfully!', "success");
        if ($_SESSION['BUREAU_ID'] != NULL) {
            redirect("index.php?view=view&projectId={$PROJECTID}&from=bureau");
        } else {
            redirect("index.php?view=view&projectId={$PROJECTID}&from=school");
        }
    }
}