} #分类 $whereQuery = ''; $pagingUrl = ''; if (isset($_GET['categories']) && is_array($_GET['categories'])) { foreach ($_GET['categories'] as $c => $o) { if ($whereQuery != '') { $whereQuery .= ' OR '; } $whereQuery .= " `categories` LIKE '%," . intval($c) . ",%' "; $pagingUrl .= '&categories[' . $c . ']=1'; } $whereQuery = " AND (" . $whereQuery . ") "; } if (isset($_GET['collection_id'])) { $_GET['collection_id'] = get_new_str($_GET['collection_id']); $_GET['collection_id'] = htmlspecialchars($_GET['collection_id']); if (!is_numeric($_GET['collection_id'])) { unset($_GET['collection_id']); } } #加载书签集作品 if (isset($_GET['collection_id']) && is_numeric($_GET['collection_id'])) { require_once ROOT_PATH . '/apps/collections/models/collections.class.php'; $collectionsClass = new collections(); $items = $collectionsClass->getItems($_GET['collection_id'], $start, $limit, " AND `status` = 'active' AND (`name` = '" . sql_quote($s) . "' OR `description` LIKE '%" . sql_quote($s) . "%') " . $whereQuery, "{$order}", true); if (is_array($items)) { $users = $usersClass->getAll(0, 0, $collectionsClass->usersWhere); abr('users', $users); } abr('results', $items);
// +---------------------------------------------------------------------- // | Demila [ Beautiful Digital Content Trading System ] // +---------------------------------------------------------------------- // | Copyright (c) 2015 http://demila.org All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- // | Email author@demila.org // +---------------------------------------------------------------------- /* * 设置module和controller */ //path_info //$_GET ['url']=str_replace("/index.php","",$_SERVER['REQUEST_URI']) ; //$_GET ['url']=get_new_str($_GET ['url']); $_GET['url'] = get_new_str($_SERVER["PATH_INFO"]); $_GET['url'] = str_replace("index.php", "", $_GET['url']); //url $_GET['url'] = $_GET['url'] == "/author_dashboard/" ? "/users/dashboard" : $_GET['url']; $_GET['url'] = $_GET['url'] == "/admin_dashboard/" ? "/admin" : $_GET['url']; $_GET['url'] = $_GET['url'] == "/author_dashboard" ? "/users/dashboard" : $_GET['url']; $_GET['url'] = $_GET['url'] == "/edit/" ? "/users/edit" : $_GET['url']; $_GET['url'] = $_GET['url'] == "/edit" ? "/users/edit" : $_GET['url']; $_GET['url'] = $_GET['url'] == "/earnings/" ? "/users/earnings" : $_GET['url']; $_GET['url'] = $_GET['url'] == "/earnings" ? "/users/earnings" : $_GET['url']; $_GET['url'] = $_GET['url'] == "/statement/" ? "/users/statement" : $_GET['url']; $_GET['url'] = $_GET['url'] == "/statement" ? "/users/statement" : $_GET['url']; $_GET['url'] = $_GET['url'] == "/sign_in/" ? "/users/login" : $_GET['url']; $_GET['url'] = $_GET['url'] == "/sign_in/" ? "/users/login" : $_GET['url']; $_GET['url'] = $_GET['url'] == "/sign_up/" ? "/users/registration" : $_GET['url']; $_GET['url'] = $_GET['url'] == "/sign_up" ? "/users/registration" : $_GET['url'];