本文整理汇总了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");
}