本文整理汇总了PHP中ActivityModel::search方法的典型用法代码示例。如果您正苦于以下问题:PHP ActivityModel::search方法的具体用法?PHP ActivityModel::search怎么用?PHP ActivityModel::search使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActivityModel
的用法示例。
在下文中一共展示了ActivityModel::search方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
if (in_array(Auth::getCapability(), array(CAPABILITY_ADMINISTRATOR))) {
Model::autoloadModel('activity');
$model = new ActivityModel($this->db);
$this->para = new stdClass();
if (isset($_POST['type'])) {
$this->para->type = $_POST['type'];
}
if (isset($_POST['orderby'])) {
$this->para->orderby = $_POST['orderby'];
}
if (isset($_POST['order'])) {
$this->para->order = $_POST['order'];
}
if (isset($_POST['page'])) {
$this->para->page = $_POST['page'];
}
if (isset($_POST['s'])) {
$this->para->s = $_POST['s'];
}
if (isset($_POST['paged'])) {
$this->para->paged = $_POST['paged'];
}
if (isset($_POST['activities'])) {
$this->para->activities = $_POST['activities'];
}
if (isset($_POST['action'])) {
$this->para->action = $_POST['action'];
}
if (isset($_POST['action2'])) {
$this->para->action2 = $_POST['action2'];
}
if (isset($_POST['city_show'])) {
$this->para->city_show = $_POST['city_show'];
}
if (isset($_POST['current_rating'])) {
$this->para->current_rating = $_POST['current_rating'];
}
if (isset($_POST['vote_times'])) {
$this->para->vote_times = $_POST['vote_times'];
}
if (isset($_POST['activities_per_page'])) {
$this->para->activities_per_page = $_POST['activities_per_page'];
}
if (isset($_POST['adv_setting'])) {
$this->para->adv_setting = $_POST['adv_setting'];
}
if (isset($this->para->adv_setting) && $this->para->adv_setting == "adv_setting") {
$model->changeAdvSetting($this->para);
}
if (isset($this->para->type) && in_array($this->para->type, array("action", "action2")) && isset($this->para->activities)) {
$model->executeAction($this->para);
}
$model->search($this->view, $this->para);
if (count((array) $this->para) > 0) {
$this->view->ajax = TRUE;
$this->view->renderAdmin(RENDER_VIEW_ACTIVITY_INDEX, TRUE);
} else {
$this->view->renderAdmin(RENDER_VIEW_ACTIVITY_INDEX);
}
} else {
$this->login();
}
}