本文整理汇总了PHP中ActivityModel::get方法的典型用法代码示例。如果您正苦于以下问题:PHP ActivityModel::get方法的具体用法?PHP ActivityModel::get怎么用?PHP ActivityModel::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActivityModel
的用法示例。
在下文中一共展示了ActivityModel::get方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view
public function view($post_id = NULL)
{
Model::autoloadModel('activity');
$model = new ActivityModel($this->db);
$this->para = new stdClass();
if (isset($_POST['activity'])) {
$this->para->post_id = $_POST['activity'];
} elseif (isset($post_id) && !is_null($post_id)) {
$this->para->post_id = $post_id;
}
if (isset($this->para->post_id)) {
$this->view->activityBO = $model->get($this->para->post_id);
Model::autoloadModel('taxonomy');
$taxonomyModel = new TaxonomyModel($this->db);
$this->view->countryList = new SplDoublyLinkedList();
$taxonomyModel->getAllSorted($this->view->countryList, $taxonomyModel->buildTree($taxonomyModel->getAll("country")), -1);
$this->view->cityList = new SplDoublyLinkedList();
if (isset($this->view->activityBO->country_id) && $this->view->activityBO->country_id != "0") {
$taxonomyModel->getAllSorted($this->view->cityList, $taxonomyModel->buildTree($taxonomyModel->getByMetaData("city", "country", $this->view->activityBO->country_id)), -1);
}
if (isset($post_id) && !is_null($post_id)) {
$this->view->render(RENDER_VIEW_ACTIVITY);
} else {
$this->view->render(RENDER_VIEW_ACTIVITY, TRUE);
}
} else {
header('location: ' . URL);
}
}