本文整理汇总了PHP中dbHideList函数的典型用法代码示例。如果您正苦于以下问题:PHP dbHideList函数的具体用法?PHP dbHideList怎么用?PHP dbHideList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dbHideList函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: applet_menu
function applet_menu()
{
$inCore = cmsCore::getInstance();
$inDB = cmsDatabase::getInstance();
global $_LANG;
global $adminAccess;
if (!cmsUser::isAdminCan('admin/menu', $adminAccess)) {
cpAccessDenied();
}
$GLOBALS['cp_page_title'] = $_LANG['AD_MENU'];
cpAddPathway($_LANG['AD_MENU'], 'index.php?view=menu');
$do = cmsCore::request('do', 'str', 'list');
$id = cmsCore::request('id', 'int', -1);
if ($do == 'list') {
$toolmenu[] = array('icon' => 'new.gif', 'title' => $_LANG['AD_MENU_POINT_ADD'], 'link' => '?view=menu&do=add');
$toolmenu[] = array('icon' => 'newmenu.gif', 'title' => $_LANG['AD_MENU_ADD'], 'link' => '?view=menu&do=addmenu');
$toolmenu[] = array('icon' => 'edit.gif', 'title' => $_LANG['AD_EDIT_SELECTED'], 'link' => "javascript:checkSel('?view=menu&do=edit&multiple=1');");
$toolmenu[] = array('icon' => 'delete.gif', 'title' => $_LANG['AD_DELETE_SELECTED'], 'link' => "javascript:checkSel('?view=menu&do=delete&multiple=1');");
$toolmenu[] = array('icon' => 'show.gif', 'title' => $_LANG['AD_ALLOW_SELECTED'], 'link' => "javascript:checkSel('?view=menu&do=show&multiple=1');");
$toolmenu[] = array('icon' => 'hide.gif', 'title' => $_LANG['AD_DISALLOW_SELECTED'], 'link' => "javascript:checkSel('?view=menu&do=hide&multiple=1');");
$toolmenu[] = array('icon' => 'help.gif', 'title' => $_LANG['AD_HELP'], 'link' => '?view=help&topic=menu');
cpToolMenu($toolmenu);
$fields[] = array('title' => 'Lt', 'field' => 'NSLeft', 'width' => '30');
$fields[] = array('title' => $_LANG['TITLE'], 'field' => 'title', 'width' => '', 'link' => '?view=menu&do=edit&id=%id%');
$fields[] = array('title' => $_LANG['SHOW'], 'field' => 'published', 'width' => '60');
$fields[] = array('title' => $_LANG['AD_ORDER'], 'field' => 'ordering', 'width' => '100');
$fields[] = array('title' => $_LANG['AD_LINK'], 'field' => array('linktype', 'linkid', 'link'), 'width' => '240', 'prc' => 'cpMenutypeById');
$fields[] = array('title' => $_LANG['AD_MENU'], 'field' => 'menu', 'width' => '70', 'filter' => '10', 'filterlist' => cpGetList('menu'), 'prc' => 'list_menu');
$fields[] = array('title' => $_LANG['TEMPLATE'], 'field' => 'template', 'width' => '70', 'prc' => 'cpTemplateById');
$actions[] = array('title' => $_LANG['EDIT'], 'icon' => 'edit.gif', 'link' => '?view=menu&do=edit&id=%id%');
$actions[] = array('title' => $_LANG['DELETE'], 'icon' => 'delete.gif', 'confirm' => $_LANG['AD_MENU_POINT_CONFIRM'], 'link' => '?view=menu&do=delete&id=%id%');
cpListTable('cms_menu', $fields, $actions, 'parent_id>0', 'NSLeft, ordering');
} else {
$toolmenu[] = array('icon' => 'save.gif', 'title' => $_LANG['SAVE'], 'link' => 'javascript:document.addform.submit();');
$toolmenu[] = array('icon' => 'cancel.gif', 'title' => $_LANG['CANCEL'], 'link' => 'index.php?view=menu');
cpToolMenu($toolmenu);
}
if ($do == 'move_up') {
$inDB->moveNsCategory('cms_menu', $id, 'up');
cmsCore::redirectBack();
}
if ($do == 'move_down') {
$inDB->moveNsCategory('cms_menu', $id, 'down');
cmsCore::redirectBack();
}
if ($do == 'show') {
if (!isset($_REQUEST['item'])) {
if ($id >= 0) {
dbShow('cms_menu', $id);
}
echo '1';
exit;
} else {
dbShowList('cms_menu', $_REQUEST['item']);
cmsCore::addSessionMessage($_LANG['AD_DO_SUCCESS'], 'success');
cmsCore::redirectBack();
}
}
if ($do == 'hide') {
if (!isset($_REQUEST['item'])) {
if ($id >= 0) {
dbHide('cms_menu', $id);
}
echo '1';
exit;
} else {
dbHideList('cms_menu', cmsCore::request('item', 'array_int', array()));
cmsCore::addSessionMessage($_LANG['AD_DO_SUCCESS'], 'success');
cmsCore::redirectBack();
}
}
if ($do == 'delete') {
if (!isset($_REQUEST['item'])) {
if ($id >= 0) {
$inDB->deleteNS('cms_menu', (int) $id);
}
} else {
$items = cmsCore::request('item', 'array_int', array());
foreach ($items as $item_id) {
$inDB->deleteNS('cms_menu', $item_id);
}
}
cmsCore::addSessionMessage($_LANG['AD_DO_SUCCESS'], 'success');
cmsCore::redirectBack();
}
if ($do == 'update') {
if (!cmsUser::checkCsrfToken()) {
cmsCore::error404();
}
$id = cmsCore::request('id', 'int', 0);
if (!$id) {
cmsCore::redirectBack();
}
$title = cmsCore::request('title', 'str', '');
$menu = cmsCore::arrayToYaml(cmsCore::request('menu', 'array_str', ''));
$linktype = cmsCore::request('mode', 'str', '');
$linkid = cmsCore::request($linktype, 'str', '');
$link = $inCore->getMenuLink($linktype, $linkid);
$target = cmsCore::request('target', 'str', '');
$published = cmsCore::request('published', 'int', 0);
//.........这里部分代码省略.........
示例2: dbShowList
echo '1';
exit;
} else {
dbShowList('cms_armedlist_quests', $_REQUEST['item']);
cmsCore::redirectBack();
}
}
if ($opt == 'hide_item') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['item_id'])) {
dbHide('cms_armedlist_quests', (int) $_REQUEST['item_id']);
}
echo '1';
exit;
} else {
dbHideList('cms_armedlist_quests', $_REQUEST['item']);
cmsCore::redirectBack();
}
}
if ($opt == 'submit_item') {
if (!cmsCore::validateForm()) {
cmsCore::error404();
}
$category_id = (int) $_REQUEST['category_id'];
$published = (int) $_REQUEST['published'];
$quest = $_REQUEST['quest'];
$answer = $_REQUEST['answer'];
$answeruser_id = $_SESSION['user']['id'];
$user_id = (int) $_REQUEST['user_id'];
$pubdate = $_REQUEST['pubdate'];
$answerdate = $_REQUEST['answerdate'];
示例3: applet_modules
//.........这里部分代码省略.........
//============================================================================//
if ($do == 'saveorder') {
if (isset($_REQUEST['ordering'])) {
$ord = $_REQUEST['ordering'];
$ids = $_REQUEST['ids'];
foreach ($ord as $id => $ordering) {
$inDB->query("UPDATE cms_modules SET ordering = '" . (int) $ordering . "' WHERE id = '" . (int) $ids[$id] . "'");
}
cmsCore::redirect('index.php?view=modules');
}
}
//============================================================================//
//============================================================================//
if ($do == 'show') {
if (!isset($_REQUEST['item'])) {
if ($id >= 0) {
dbShow('cms_modules', $id);
}
echo '1';
exit;
} else {
dbShowList('cms_modules', cmsCore::request('item', 'array_int', array()));
cmsCore::redirectBack();
}
}
if ($do == 'hide') {
if (!isset($_REQUEST['item'])) {
if ($id >= 0) {
dbHide('cms_modules', $id);
}
echo '1';
exit;
} else {
dbHideList('cms_modules', cmsCore::request('item', 'array_int', array()));
cmsCore::redirectBack();
}
}
if ($do == 'delete') {
if (!isset($_REQUEST['item'])) {
$inCore->removeModule($id);
} else {
$inCore->removeModule(cmsCore::request('item', 'array_int', array()));
}
cmsCore::addSessionMessage($_LANG['AD_DO_SUCCESS'], 'success');
cmsCore::redirect('index.php?view=modules');
}
//============================================================================//
//============================================================================//
if ($do == 'update') {
if (!cmsUser::checkCsrfToken()) {
cmsCore::error404();
}
$id = cmsCore::request('id', 'int', 0);
$name = cmsCore::request('name', 'str', '');
$title = cmsCore::request('title', 'str', '');
$titles = cmsCore::arrayToYaml(cmsCore::request('titles', 'array_str', array()));
$position = cmsCore::request('position', 'str', '');
$showtitle = cmsCore::request('showtitle', 'int', 0);
$content = $inDB->escape_string(cmsCore::request('content', 'html', ''));
$published = cmsCore::request('published', 'int', 0);
$css_prefix = cmsCore::request('css_prefix', 'str', '');
$is_strict_bind = cmsCore::request('is_strict_bind', 'int', 0);
$is_strict_bind_hidden = cmsCore::request('is_strict_bind_hidden', 'int', 0);
$is_public = cmsCore::request('is_public', 'int', '');
if (!$is_public) {
$access_list = cmsCore::arrayToYaml(cmsCore::request('allow_group', 'array_int', array()));
示例4: dbQuery
dbQuery('UPDATE cms_uc_items SET on_moderate = 0 WHERE id=' . $id);
}
header('location:' . $_SERVER['HTTP_REFERER']);
}
}
//=================================================================================================//
//=================================================================================================//
if ($opt == 'hide_item') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['item_id'])) {
dbHide('cms_uc_items', $_REQUEST['item_id']);
}
echo '1';
exit;
} else {
dbHideList('cms_uc_items', $_REQUEST['item']);
header('location:' . $_SERVER['HTTP_REFERER']);
}
}
//=================================================================================================//
//=================================================================================================//
if ($opt == 'submit_item') {
$inCore->includeGraphics();
$item = array();
//get variables
$item['cat_id'] = $inCore->request('cat_id', 'int', 0);
$item['title'] = $inCore->request('title', 'str');
$item['published'] = $inCore->request('published', 'int', 0);
$item['fdata'] = $_REQUEST['fdata'];
foreach ($item['fdata'] as $key => $value) {
$item['fdata'][$key] = trim($value);
示例5: dbHide
}
cmsCore::addSessionMessage($_LANG['AD_DO_SUCCESS'], 'success');
cmsCore::redirectBack();
}
}
//=================================================================================================//
//=================================================================================================//
if ($opt == 'hide_item') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['item_id'])) {
dbHide('cms_uc_items', cmsCore::request('item_id', 'int', 0));
}
echo '1';
exit;
} else {
dbHideList('cms_uc_items', cmsCore::request('item', 'array_int', array()));
cmsCore::addSessionMessage($_LANG['AD_DO_SUCCESS'], 'success');
cmsCore::redirectBack();
}
}
//=================================================================================================//
//=================================================================================================//
if ($opt == 'renew_item') {
$model->renewItem(cmsCore::request('item_id', 'int', 0));
cmsCore::redirect('?view=components&do=config&id=' . $id . '&opt=list_items');
}
//=================================================================================================//
//=================================================================================================//
if ($opt == 'delete_item') {
$model->deleteItem(cmsCore::request('item_id', 'int', 0));
cmsCore::addSessionMessage($_LANG['AD_DO_SUCCESS'], 'success');
示例6: applet_content
function applet_content()
{
$inCore = cmsCore::getInstance();
$inUser = cmsUser::getInstance();
$inDB = cmsDatabase::getInstance();
global $_LANG;
//check access
global $adminAccess;
if (!cmsUser::isAdminCan('admin/content', $adminAccess)) {
cpAccessDenied();
}
$cfg = $inCore->loadComponentConfig('content');
cmsCore::loadModel('content');
$model = new cms_model_content();
$GLOBALS['cp_page_title'] = $_LANG['AD_ARTICLES'];
cpAddPathway($_LANG['AD_ARTICLES'], 'index.php?view=tree');
$do = cmsCore::request('do', 'str', 'add');
$id = cmsCore::request('id', 'int', -1);
if ($do == 'arhive_on') {
$inDB->query("UPDATE cms_content SET is_arhive = 1 WHERE id = '{$id}'");
cmsCore::addSessionMessage($_LANG['AD_ARTICLES_TO_ARHIVE'], 'success');
cmsCore::redirectBack();
}
if ($do == 'move') {
$item_id = cmsCore::request('id', 'int', 0);
$cat_id = cmsCore::request('cat_id', 'int', 0);
$dir = $_REQUEST['dir'];
$step = 1;
$model->moveItem($item_id, $cat_id, $dir, $step);
echo '1';
exit;
}
if ($do == 'move_to_cat') {
$items = cmsCore::request('item', 'array_int');
$to_cat_id = cmsCore::request('obj_id', 'int', 0);
if ($items && $to_cat_id) {
$last_ordering = (int) $inDB->get_field('cms_content', "category_id = '{$to_cat_id}' ORDER BY ordering DESC", 'ordering');
foreach ($items as $item_id) {
$article = $model->getArticle($item_id);
if (!$article) {
continue;
}
$last_ordering++;
$model->updateArticle($article['id'], array('category_id' => $to_cat_id, 'ordering' => $last_ordering, 'url' => $article['url'], 'title' => $inDB->escape_string($article['title']), 'id' => $article['id'], 'user_id' => $article['user_id']));
}
cmsCore::addSessionMessage($_LANG['AD_ARTICLES_TO'], 'success');
}
cmsCore::redirect('?view=tree&cat_id=' . $to_cat_id);
}
if ($do == 'show') {
if (!isset($_REQUEST['item'])) {
if ($id >= 0) {
dbShow('cms_content', $id);
}
echo '1';
exit;
} else {
dbShowList('cms_content', cmsCore::request('item', 'array_int'));
cmsCore::redirectBack();
}
}
if ($do == 'hide') {
if (!isset($_REQUEST['item'])) {
if ($id >= 0) {
dbHide('cms_content', $id);
}
echo '1';
exit;
} else {
dbHideList('cms_content', cmsCore::request('item', 'array_int'));
cmsCore::redirectBack();
}
}
if ($do == 'delete') {
if (!isset($_REQUEST['item'])) {
if ($id >= 0) {
$model->deleteArticle($id);
cmsCore::addSessionMessage($_LANG['AD_ARTICLE_REMOVE'], 'success');
}
} else {
$model->deleteArticles(cmsCore::request('item', 'array_int'));
cmsCore::addSessionMessage($_LANG['AD_ARTICLES_REMOVE'], 'success');
}
cmsCore::redirectBack();
}
if ($do == 'update') {
if (!cmsUser::checkCsrfToken()) {
cmsCore::error404();
}
if (isset($_REQUEST['id'])) {
$id = cmsCore::request('id', 'int', 0);
$article['category_id'] = cmsCore::request('category_id', 'int', 1);
$article['title'] = cmsCore::request('title', 'str');
$article['url'] = cmsCore::request('url', 'str');
$article['showtitle'] = cmsCore::request('showtitle', 'int', 0);
$article['description'] = cmsCore::request('description', 'html', '');
$article['description'] = $inDB->escape_string($article['description']);
$article['content'] = cmsCore::request('content', 'html', '');
$article['content'] = $inDB->escape_string($article['content']);
$article['for_img'] = cmsCore::request('for_img', 'html', '');
//.........这里部分代码省略.........
示例7: dbShow
dbShow('cms_board_items', (int) $_REQUEST['item_id']);
}
echo '1';
exit;
} else {
dbShowList('cms_board_items', $_REQUEST['item']);
cmsCore::redirectBack();
}
}
if ($opt == 'hide_item') {
if (!isset($_REQUEST['item'])) {
dbHide('cms_board_items', cmsCore::request('item_id', 'int', 0));
echo '1';
exit;
} else {
dbHideList('cms_board_items', $_REQUEST['item']);
cmsCore::redirectBack();
}
}
if ($opt == 'delete_item') {
$model->deleteRecord(cmsCore::request('item_id', 'int', 0));
cmsCore::addSessionMessage($_LANG['AD_DO_SUCCESS'], 'success');
cmsCore::redirectBack();
}
if ($opt == 'config') {
cpAddPathway($_LANG['AD_SETTINGS']);
cpCheckWritable('/images/board', 'folder');
cpCheckWritable('/images/board/medium', 'folder');
cpCheckWritable('/images/board/small', 'folder');
?>
示例8: dbShowList
echo '1';
exit;
} else {
dbShowList('cms_forums', $_REQUEST['item']);
$inCore->redirectBack();
}
}
if ($opt == 'hide_forum') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['item_id'])) {
dbHide('cms_forums', $_REQUEST['item_id']);
}
echo '1';
exit;
} else {
dbHideList('cms_forums', $_REQUEST['item']);
$inCore->redirectBack();
}
}
if ($opt == 'submit_forum') {
$category_id = $inCore->request('category_id', 'int');
$title = $inCore->request('title', 'str');
$published = $inCore->request('published', 'int');
$auth_group = $inCore->request('auth_group', 'int');
$parent_id = $inCore->request('parent_id', 'int');
$description = $inCore->request('description', 'str');
$topic_cost = $inCore->request('topic_cost', 'int', 0);
$ns = $inCore->nestedSetsInit('cms_forums');
$myid = $ns->AddNode($parent_id);
$is_access = $inCore->request('is_access', 'int', '');
if (!$is_access) {
示例9: dbShowList
echo '1';
exit;
} else {
dbShowList('cms_faq_quests', cmsCore::request('item', 'array_int', array()));
cmsCore::redirectBack();
}
}
if ($opt == 'hide_item') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['item_id'])) {
dbHide('cms_faq_quests', cmsCore::request('item_id', 'int', 0));
}
echo '1';
exit;
} else {
dbHideList('cms_faq_quests', cmsCore::request('item', 'array_int', array()));
cmsCore::redirectBack();
}
}
if ($opt == 'submit_item') {
if (!cmsUser::checkCsrfToken()) {
cmsCore::error404();
}
$category_id = cmsCore::request('category_id', 'int', 0);
$published = cmsCore::request('published', 'int', 0);
$quest = $inDB->escape_string(cmsCore::request('quest', 'html', ''));
$answer = $inDB->escape_string(cmsCore::request('answer', 'html', ''));
$answeruser_id = (int) $_SESSION['user']['id'];
$user_id = cmsCore::request('user_id', 'int', 0);
$date = explode('.', $_REQUEST['pubdate']);
$pubdate = (int) $date[2] . '-' . (int) $date[1] . '-' . (int) $date[0];
示例10: dbShowList
exit;
} else {
dbShowList('cms_user_autoawards', $_REQUEST['item']);
cmsCore::addSessionMessage($_LANG['AD_DO_SUCCESS'], 'success');
cmsCore::redirectBack();
}
}
if ($opt == 'hide_award') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['item_id'])) {
dbHide('cms_user_autoawards', $_REQUEST['item_id']);
}
echo '1';
exit;
} else {
dbHideList('cms_user_autoawards', $_REQUEST['item']);
cmsCore::addSessionMessage($_LANG['AD_DO_SUCCESS'], 'success');
cmsCore::redirectBack();
}
}
if ($opt == 'submit' || $opt == 'update') {
if (!cmsCore::validateForm()) {
cmsCore::error404();
}
$title = cmsCore::request('title', 'str', $_LANG['AD_AWARD']);
$description = cmsCore::request('description', 'str', '');
$published = cmsCore::request('published', 'int', 0);
$imageurl = preg_replace('/[^a-zA-Z0-9_\\.\\-]/iu', '', cmsCore::request('imageurl', 'str', ''));
$p_comment = cmsCore::request('p_comment', 'int', 0);
$p_forum = cmsCore::request('p_forum', 'int', 0);
$p_content = cmsCore::request('p_content', 'int', 0);