index() public method

Default search functionality.
Since: 2.0.0
public index ( integer $Page = '' )
$Page integer Page number.
Exemplo n.º 1
0
 public function morelike($filter = null)
 {
     // build filter with a flag for mlt
     $filter = $this->build_filter($filter);
     $filter->more_like_this = true;
     $filter->clustering = false;
     $filter->spellcheck = false;
     $filter->q_value = $this->appmeta->unique_key . ':' . $filter->q_value;
     $data = parent::index($filter);
     $data['facet_counts'] = $data['results']['facet_counts'];
     $data['interesting'] = $data['results']['interesting_terms'];
     $data['filter_description_tokens'][0]['description'] = 'Images similar to ' . $data['filter_description_tokens'][0]['description'];
     $data['filter_description_tokens'][0]['remove_url'] = str_replace('/morelike', '', $data['filter_description_tokens'][0]['remove_url']);
     return $data;
 }
Exemplo n.º 2
0
    $controller->inbox();
});
$app->get('/inbox/:id', function ($id) {
    UserHelper::requireProfile();
    $controller = new MailController();
    $controller->inbox($id);
});
$app->get('/help', function () {
    //UserHelper::requireProfile();
    $controller = new HelpController();
    $controller->show();
});
$app->get('/search', function () {
    UserHelper::requireProfile();
    $controller = new SearchController();
    $controller->index();
});
$app->post('/inbox', function () {
    fAuthorization::requireLoggedIn();
    $controller = new MailController();
    $controller->create();
});
$app->delete('/inbox/:id', function ($id) {
    fAuthorization::requireLoggedIn();
    $controller = new MailController();
    $controller->delete($id);
});
$app->post('/msgs', function () {
    fAuthorization::requireLoggedIn();
    $controller = new MsgController();
    $controller->create();
Exemplo n.º 3
0
        $view_page = "fundraisers";
        include_once ROOT_PATH . "search/view/container.php";
    }
    public function projects()
    {
        $view_page = "projects";
        include_once ROOT_PATH . "search/view/container.php";
    }
}
$searchcontroller = new SearchController();
if (isset($_GET['m'])) {
    $method = $_GET['m'];
} else {
    $method = "index";
}
switch ($method) {
    case "index":
        $searchcontroller->index();
        break;
    case "fundraisers":
        $searchcontroller->fundraisers();
        break;
    case "projects":
        $searchcontroller->projects();
        break;
    case "requirements":
        $searchcontroller->requirements();
    default:
        $searchcontroller->index();
        break;
}
Exemplo n.º 4
0
        if ($_GET[KEY_PATH] == "manager") {
            include CONTROLLER_PATH . "manager.php";
            // path = manager
            if ($_GET[KEY_TARGET] == "noticeboard") {
                ManagerController::noticeboard();
            } else {
                if ($_GET[KEY_TARGET] == "loginrecord") {
                    ManagerController::loginrecord();
                } else {
                    if ($_GET[KEY_TARGET] == "permission") {
                        ManagerController::permission();
                    } else {
                        if ($_GET[KEY_TARGET] == "googleanalytics") {
                            ManagerController::googleAnalytics();
                        }
                    }
                }
            }
        } else {
            if ($_GET[KEY_PATH] == "help") {
                include CONTROLLER_PATH . "help.php";
                HelpController::show();
            } else {
                if ($_GET[KEY_PATH] == "search") {
                    include CONTROLLER_PATH . "search.php";
                    SearchController::index();
                }
            }
        }
    }
}