本文整理匯總了PHP中projects::ShowProjectByStatus方法的典型用法代碼示例。如果您正苦於以下問題:PHP projects::ShowProjectByStatus方法的具體用法?PHP projects::ShowProjectByStatus怎麽用?PHP projects::ShowProjectByStatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類projects
的用法示例。
在下文中一共展示了projects::ShowProjectByStatus方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: index
public function index()
{
parent::view("shared/header");
parent::view("intern/menu");
//Si l'usager à envoyer une évaluation, l'enregistrer
if (isset($_POST['id'])) {
parent::model("ratings");
$rating = new ratings();
$rating->RatingProject($_SESSION['ID'], $_POST['id'], $_POST['rating']);
}
parent::model("projects");
$model = new projects();
//Obtenir le projet assigné.
$data['project'] = $model->ShowProjectByIntern($_SESSION['ID']);
//Sinon obtenir tous les projets.
if ($data['project'] == null) {
$data['projects'] = $model->ShowProjectByStatus(1);
parent::model("business");
$model = new business();
parent::model("ratings");
$rating = new ratings();
if ($data['projects'] != null) {
foreach ($data['projects'] as $project) {
//Obtenir les informations de l'entreprise.
$data['cie'][$project->businessID] = $model->ShowCieByID($project->businessID);
//Obtenir le rating.
$data['ratings'][$project->ID] = $rating->FindRateByID($_SESSION['ID'], $project->ID);
}
}
parent::view("intern/list", $data);
} else {
parent::model("business");
$model = new business();
//Obtenir les informations de l'entreprise.
$data['cie'][$data['project']->ID] = $model->ShowCieByID($data['project']->businessID);
parent::view("intern/index", $data);
}
parent::view("shared/footer");
}
示例2: assign
public function assign()
{
parent::model("ratings");
$ratings = new ratings();
//Obtenir toutes les évaluations.
$ratings = $ratings->ShowAllRatings();
parent::model("projects");
$projects = new projects();
//Obtenir tous les projets autorisés.
$data["projects"] = $projects->ShowProjectByStatus(true);
if (isset($ratings) && isset($data["projects"])) {
foreach ($ratings as $rating) {
$data['ratings'][$rating['projectID']][$rating['internID']] = $rating['score'];
}
if (isset($_POST['setAssign'])) {
$data['alert'] = "alert-success";
$data['message'] = "Le jumelage a bien été fait.";
}
}
parent::model("accounts");
$interns = new accounts();
//Obtenir tous les stagiaires.
$data["interns"] = $interns->ShowUsersByRank(2);
parent::view("shared/header");
parent::view("advisor/menu");
parent::view("advisor/assign", $data);
parent::view("shared/footer");
}