/**
  * @param string           $name
  * @param string           $overview
  * @param ICompany         $company
  * @param bool             $active
  * @param IMarketPlaceType $marketplace_type
  * @param null|string      $call_2_action_url
  * @return ICompanyService
  */
 public function buildCompanyService($name, $overview, ICompany $company, $active, IMarketPlaceType $marketplace_type, $call_2_action_url = null, $live_id = null, $published = null)
 {
     $consultant = new Consultant();
     $consultant->setName($name);
     $consultant->setOverview($overview);
     $consultant->setCompany($company);
     if ($active) {
         $consultant->activate();
     } else {
         $consultant->deactivate();
     }
     $consultant->setMarketplace($marketplace_type);
     $consultant->setCall2ActionUri($call_2_action_url);
     return $consultant;
 }
示例#2
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 = "add";
}
$consultant = new Consultant();
$consultantInfos = $consultant->consultants_in_project($_GET['projectId']);
$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;
?>
consultant/index.php?page=2" class="btn btn-info btn-xsm"><span class="glyphicon glyphicon-home"></span>&nbsp;Home</a><p>
				</div>
				
				<div class="col-xs-9">
					<div class="col-xs-8">
						<p ><strong><h5 align="right">
						<?php 
示例#3
0
文件: edit.php 项目: allybitebo/ucb
<?php 
$consultant = new Consultant();
$cur = $consultant->single_consultant($_GET['id']);
?>

<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;
?>
officer/index.php?page=1" class="btn btn-info btn-xsm"><span class="glyphicon glyphicon-home"></span>&nbsp;Home</a><p>
			</div>
			
			<div class="col-xs-9">
				<div class="col-xs-8">
					<p ><strong><h5 align="right">
					<?php 
echo $_SESSION['ACCOUNT_FNAME'] . " " . $_SESSION['ACCOUNT_LNAME'];
?>
</h5></strong></p>
				</div>
				<div class="col-xs-4">
					<div class="col-xs-6">
						<p align="left"><a href="<?php 
echo WEB_ROOT;
?>
officer/modules/consultant/index.php?view=unitConsultant" class="btn btn-info btn-xsm">
							<span class="glyphicon glyphicon-step-backward"></span>Back
							</a
示例#4
0
文件: edit.php 项目: allybitebo/ucb
<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;
?>
consultant/index.php?page=2" class="btn btn-info btn-xsm"><span class="glyphicon glyphicon-home"></span>&nbsp;Home</a><p>
				</div>
				
				<div class="col-xs-9">
					<div class="col-xs-8">
						<p ><strong><h5 align="right">
						<?php 
echo $_SESSION['ACCOUNT_FNAME'] . " " . $_SESSION['ACCOUNT_LNAME'];
?>
</h5></strong></p>
					</div>
					<div class="col-xs-4">
						<div class="col-xs-6">
							<p align="left"><a href="<?php 
echo WEB_ROOT;
?>
consultant/modules/consultant/index.php?view=list" class="btn btn-info btn-xsm">
								<span class="glyphicon glyphicon-step-backward"></span>Back
								</a
								</p>
							</div>
							<div class="col-xs-6">
								<p align="right"><a href="<?php 
echo WEB_ROOT;
示例#5
0
文件: view.php 项目: allybitebo/ucb
							</a
							</p>
						</div>
						<div class="col-xs-6">
						<p align="right"><a href="<?php 
echo WEB_ROOT;
?>
admin/logout.php"
						 class="btn btn-info btn-xsm"><span class="glyphicon glyphicon-log-out"></span>Log out</a></p>
					</div>
					</div>
				</div>
				</div>
		</div> 
		<?php 
$consultant = new Consultant();
$list = $consultant->single_consultant($_GET['consultantId']);
?>
		<form class="form-horizontal well span9" action="controller.php?action=edit&id=<?php 
echo $list->consultant_id;
?>
" method="POST">
			
			<fieldset>
				<legend>Consultant Information</legend>
				
				
				<div class="form-group" id="consultant_id">
					<div class="col-md-8">
						<label class="col-md-4 control-label" for="consultant_id">Consultant Number </label>
						
示例#6
0
文件: list.php 项目: allybitebo/ucb
			<thead>
				<tr>
					<th>No.</th>
					<th width="15%" align="left"><input type="checkbox" name="chkall" id="chkall" onclick="return checkall('selector[]');">consultant #</th>
					<th>First Name</th>
					<th>Last Name</th>
					<th>Edit</th>
					<th>Details</th>
				</tr>	
			</thead>
			<tbody>
				<?php 
$account_username = $_SESSION['ACCOUNT_USERNAME'];
//$account_password = $_SESSION['ACCOUNT_PASSWORD'];
//if($account_password!= Null) {
$consultant = new Consultant();
$consultantList = $consultant->listOfconsultant();
foreach ($consultantList as $list) {
    //echo '<tr>';
    echo '<td width="5%" align="center"></td>';
    echo '<td width="15%"><input type="checkbox" name="selector[]" id="selector[]" value="' . $list->consultant_id . '"/>';
    echo '<td width="30%" >' . $list->firstname . '</td>';
    echo '<td width="30%" >' . $list->lastname . '</td>';
    echo '<td width="10%" ><a href = "index.php?view=edit&id=' . $list->consultant_id . '" ><span class="glyphicon glyphicon-list-alt"> </span>  Edit</a></td>';
    echo '<td><a href = "index.php?view=view&consultantId=' . $list->consultant_id . '" ><span class="glyphicon glyphicon-list-alt"> </span>  View</a></td>';
    echo '</tr>';
}
//}
?>
				
			</tbody>
示例#7
0
							
							<thead>
								<tr>
									<th>No.</th>
									<th width="15%" align="left"><input type="checkbox" name="chkall" id="chkall" onclick="return checkall('selector[]');">Select All</th>
									<th>First Name</th>
									<th>Last Name</th>
									<th>Edit </th>
									<th>Details</th>
								</tr>	
							</thead>
							<tbody>
								<?php 
$account_username = $_SESSION['ACCOUNT_USERNAME'];
$department_id = $_GET['did'];
$consultant = new Consultant();
$consultantList = $consultant->listOfDepartmentConsultant($department_id);
foreach ($consultantList as $list) {
    echo '<td width="5%" align="center"></td>';
    echo '<td width="15%"><input type="checkbox" name="selector[]" id="selector[]" value="' . $list->consultant_id . '"/>';
    echo '<td width="35%" >' . $list->firstname . '</td>';
    echo '<td width="25%" >' . $list->lastname . '</td>';
    echo '<td width="10%" ><a href = "index.php?view=edit&id=' . $list->consultant_id . '" ><span class="glyphicon glyphicon-list-alt"> </span>  Edit</a></td>';
    echo '<td><a href = "index.php?view=view&consultantId=' . $list->consultant_id . '" ><span class="glyphicon glyphicon-list-alt"> </span>  View</a></td>';
    echo '</tr>';
}
?>
							</tbody>
						</table>
						<?php 
if ($_SESSION['ACCOUNT_TYPE'] == 'administrator') {
示例#8
0
<?php

$consultant_id = $_GET['con_id'];
//echo $consultant_id;
$competence = new Competence();
$competenceList = $competence->listOfConsultantCompetence($consultant_id);
$project = new Project();
$projectList = $project->ProjectsByConsultant($consultant_id);
$consultant = new Consultant();
$consultantList = $consultant->single_consultant($consultant_id);
?>

<div class="container">
	<div class="row">
		<div class="col-md-12 col-xs-12">
			<div class="well panel panel-default">
				<div class="panel-body">
					<div class="row">
						<div class="col-xs-12 col-sm-4 text-center">
						<img src="img/Hashim.jpg" alt="" class="center-block img-circle img-thumbnail img-responsive">
					</div>
					
					to upload foto ????
					<!--/col--> 
					<div class="col-xs-12 col-sm-8">
						<h2><?php 
echo $_GET['consultant_name'];
?>
</h2>
						<p><strong>Qualification: </strong><?php 
echo $consultantList->qualification;
示例#9
0
function doInsert()
{
    if (isset($_POST['save'])) {
        $FIRSTNAME = $_POST['firstname'];
        $MIDDLENAME = $_POST['middlename'];
        $LASTNAME = $_POST['lname'];
        $DISPLAYNAME = $_POST['displayname'];
        $SEX = $_POST['gender'];
        $QUALIFICATION = $_POST['qualify'];
        $TITLE = $_POST['title'];
        $EMAIL = $_POST['email'];
        $TELEPHONE = $_POST['telephone'];
        $MOBILE = $_POST['mobile'];
        $WEBSITE = $_POST['website'];
        $DEPARTMENT = $_POST['deptid'];
        $USER = $_SESSION['ACCOUNT_ID'];
        $consultant = new Consultant();
        $consultant->firstname = $FIRSTNAME;
        $consultant->middlename = $MIDDLENAME;
        $consultant->lastname = $LASTNAME;
        $consultant->gender = $SEX;
        $consultant->displayname = $DISPLAYNAME;
        $consultant->qualification = $QUALIFICATION;
        $consultant->title = $TITLE;
        $consultant->email = $EMAIL;
        $consultant->telephone = $TELEPHONE;
        $consultant->mobile = $MOBILE;
        $consultant->website = $WEBSITE;
        $consultant->consultant_user_account_id = $USER;
        $consultant->consultant_department_id = $DEPARTMENT;
    }
    if ($FIRSTNAME == "") {
        message('First name is required!', "error");
        redirect('index.php?view=add');
    } elseif ($LASTNAME == "") {
        message('Last Name is required!', "error");
        redirect('index.php?view=add');
    } elseif ($MIDDLENAME == "") {
        message('Middle Name is required!', "error");
        redirect('index.php?view=add');
    } elseif ($SEX == "") {
        message('Gender Name is required!', "error");
        redirect('index.php?view=add');
    } elseif ($DISPLAYNAME == "") {
        message('Display name is required!', "error");
        redirect('index.php?view=add');
    } elseif ($QUALIFICATION == "") {
        message('Qualification is required!', "error");
        redirect('index.php?view=add');
    } elseif ($TITLE == "") {
        message('Title is required!', "error");
        redirect('index.php?view=add');
    } elseif ($EMAIL == "") {
        message('Email address is required!', "error");
        redirect('index.php?view=add');
    } elseif ($TELEPHONE == "") {
        message('Telephone is required!', "error");
        redirect('index.php?view=add');
    } elseif ($MOBILE == "") {
        message('Mobile is required!', "error");
        redirect('index.php?view=add');
    } elseif ($WEBSITE == "") {
        message('Website is required!', "error");
        redirect('index.php?view=add');
    } elseif ($DEPARTMENT == "") {
        message('Department ID is required!', "error");
        redirect('index.php?view=add');
    } elseif ($USER == "") {
        message('User Account ID is required!', "error");
        redirect('index.php?view=add');
    } else {
        $consultant->create();
        message('New consultant addedd successfully!', "success");
        redirect('index.php?view=list');
    }
}
示例#10
0
echo WEB_ROOT;
?>
officer/logout.php" class="btn btn-info btn-xsm"><span class="glyphicon glyphicon-log-out"></span>Log out</a></p></div>
			</div>
		</div> 
		<form action="controller.php?action=addConsultant" class="form-horizontal well span9" method="post">
			<fieldset>
				<legend>Add Project's Consultant</legend>
				
				<div class="col-md-8">
					<label class="col-md-4 control-label" for="pconsultant">Project Consultant</label>
					
					<div class="col-md-8">
						<select class="form-control input-sm" name="pconsultant" id="pconsultant">';
							<?php 
$consultant = new Consultant();
$cur = $consultant->listOfConsultant();
foreach ($cur as $consultant) {
    echo '<option value="' . $consultant->consultant_id . '">' . $consultant->displayname . '</option>';
}
?>
							
						</select>	
					</div>
				</div>
				<br /><br />
				
				
				<div class="col-md-8">
					<label class="col-md-4 control-label" for= "idno"></label>
					<div class="col-md-8">
示例#11
0
function doEdit()
{
    if (isset($_POST['submit'])) {
        $CONSULTANTID = $_POST['consultant_id'];
        $FIRSTNAME = $_POST['firstname'];
        $MIDDLENAME = $_POST['middlename'];
        $LASTNAME = $_POST['lastname'];
        $DISPLAYNAME = $_POST['displayname'];
        $SEX = $_POST['gender'];
        $QUALIFICATION = $_POST['qualify'];
        $TITLE = $_POST['title'];
        $EMAIL = $_POST['email'];
        $TELEPHONE = $_POST['telephone'];
        $MOBILE = $_POST['mobile'];
        $WEBSITE = $_POST['website'];
        $DEPARTMENT = $_POST['department'];
        $consultant = new Consultant();
        $consultant->consultant_id = $CONSULTANTID;
        $consultant->firstname = $FIRSTNAME;
        $consultant->middlename = $MIDDLENAME;
        $consultant->lastname = $LASTNAME;
        $consultant->gender = $SEX;
        $consultant->displayname = $DISPLAYNAME;
        $consultant->qualification = $QUALIFICATION;
        $consultant->title = $TITLE;
        $consultant->email = $EMAIL;
        $consultant->telephone = $TELEPHONE;
        $consultant->mobile = $MOBILE;
        $consultant->website = $WEBSITE;
        $consultant->department_id = $DEPARTMENT;
    }
    if ($CONSULTANTID == "") {
        message('Consultant ID is required!', "error");
        redirect('index.php?view=edit&id=' . $CONSULTANTID);
    } elseif ($FIRSTNAME == "") {
        message('First name is required!', "error");
        redirect('index.php?view=edit&id=' . $CONSULTANTID);
    } elseif ($LASTNAME == "") {
        message('Last Name is required!', "error");
        redirect('index.php?view=edit&id=' . $CONSULTANTID);
    } elseif ($MIDDLENAME == "") {
        message('Middle Name is required!', "error");
        redirect('index.php?view=edit&id=' . $CONSULTANTID);
    } elseif ($SEX == "") {
        message('Gender Name is required!', "error");
        redirect('index.php?view=edit&id=' . $CONSULTANTID);
    } elseif ($DISPLAYNAME == "") {
        message('Display name is required!', "error");
        redirect('index.php?view=edit&id=' . $CONSULTANTID);
    } elseif ($QUALIFICATION == "") {
        message('Qualification is required!', "error");
        redirect('index.php?view=edit&id=' . $CONSULTANTID);
    } elseif ($TITLE == "") {
        message('Title is required!', "error");
        redirect('index.php?view=edit&id=' . $CONSULTANTID);
    } elseif ($EMAIL == "") {
        message('Email address is required!', "error");
        redirect('index.php?view=edit&id=' . $CONSULTANTID);
    } elseif ($TELEPHONE == "") {
        message('Telephone is required!', "error");
        redirect('index.php?view=edit&id=' . $CONSULTANTID);
    } elseif ($MOBILE == "") {
        message('Mobile is required!', "error");
        redirect('index.php?view=edit&id=' . $CONSULTANTID);
    } elseif ($WEBSITE == "") {
        message('Website is required!', "error");
        redirect('index.php?view=edit&id=' . $CONSULTANTID);
    } elseif ($DEPARTMENT == "") {
        message('Department ID is required!', "error");
        redirect('index.php?view=edit&id=' . $CONSULTANTID);
    } else {
        $consultant->update($_GET['id']);
        message('Consultant information updated successfully!', "info");
        redirect('../../index.php?page=2');
    }
}
示例#12
0
						<thead>
							<tr>
								<th>No.</th>
								<th width="15%" align="left"><input type="checkbox" name="chkall" id="chkall" onclick="return checkall('selector[]');">consultant #</th>
								<th>First Name</th>
								<th>Last Name</th>
								<!--<th>Edit</th>-->
								<th>Details</th>
							</tr>	
						</thead>
						<tbody>
							<?php 
$account_username = $_SESSION['ACCOUNT_USERNAME'];
//$account_password = $_SESSION['ACCOUNT_PASSWORD'];
//if($account_password!= Null) {
$consultant = new Consultant();
$consultantList = $consultant->listOfProjectConsultant(3);
foreach ($consultantList as $list) {
    //echo '<tr>';
    echo '<td width="5%" align="center"></td>';
    echo '<td width="15%"><input type="checkbox" name="selector[]" id="selector[]" value="' . $list->cons_proj_consultant_id . '"/>';
    echo '<td width="30%" >' . $list->firstname . '</td>';
    echo '<td width="30%" >' . $list->lastname . '</td>';
    //echo '<td width="10%" ><a href = "index.php?view=edit&id='.$list->cons_proj_consultant_id.'" ><span class="glyphicon glyphicon-list-alt"> </span>  Edit</a></td>';
    echo '<td><a href = "index.php?view=view&consultantId=' . $list->cons_proj_consultant_id . '" ><span class="glyphicon glyphicon-list-alt"> </span>  View</a></td>';
    echo '</tr>';
}
//}
?>
							
						</tbody>
示例#13
0
文件: list.php 项目: allybitebo/ucb
						</div>
					</div>
				</div>
		</div>  
		<div class="panel-body" >			
			<div class="row">
                 <div class="col-lg-6 col-md-6">
                    <div class="panel panel-primary">
                        <div class="panel-heading">
                            <div class="row">
                                <div class="col-xs-3">
                                    <P><strong><h5>Consultants</h5></strong></p>
								</div>
                                <div class="col-xs-9 text-right">
								<?php 
$consultant = new Consultant();
$consultantnum = $consultant->find_all_consultant();
?>
                                    <div class="huge"><?php 
echo $consultantnum;
?>
</div>	
								</div>
							</div>
						</div>
                        <a href="<?php 
echo WEB_ROOT;
?>
admin/modules/consultant/index.php?view=listOfConsultants">
                            <div class="panel-footer">
                                <span class="pull-left">Details</span>
示例#14
0
文件: home.php 项目: allybitebo/ucb
    $TotalInstNumberPerProj = 0;
    $payment = new Payment();
    foreach ($projectList as $list) {
        $proj_id = $list->project_id;
        $InstNumberPerProj = $payment->number_installment_project($proj_id);
        $TotalInstNumberPerProj = $TotalInstNumberPerProj + $InstNumberPerProj;
    }
    $totalInst = $TotalInstNumberPerProj;
} else {
    //For Projects
    $project = new Project();
    $projectnum = $project->ProjectsNumberSchool($_SESSION['SCHOOL_ID']);
    //For Consultants -- NEEDS IMPROVEMENTS
    $projectList = $project->listOfprojectsSchool($_SESSION['SCHOOL_ID']);
    $TotalconlNumberPerProj = 0;
    $consultant = new Consultant();
    foreach ($projectList as $list) {
        $proj_id = $list->project_id;
        $conlNumberPerProj = $consultant->number_consultant_project($proj_id);
        $TotalconlNumberPerProj = $TotalconlNumberPerProj + $conlNumberPerProj;
    }
    $totalCons = $TotalconlNumberPerProj;
    //For Installments
    $TotalInstNumberPerProj = 0;
    $payment = new Payment();
    foreach ($projectList as $list) {
        $proj_id = $list->project_id;
        $InstNumberPerProj = $payment->number_installment_project($proj_id);
        $TotalInstNumberPerProj = $TotalInstNumberPerProj + $InstNumberPerProj;
    }
    $totalInst = $TotalInstNumberPerProj;