本文整理汇总了PHP中dbShowList函数的典型用法代码示例。如果您正苦于以下问题:PHP dbShowList函数的具体用法?PHP dbShowList怎么用?PHP dbShowList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dbShowList函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dbShow
?>
';"/>
</p>
</form>
<?php
}
if ($opt == 'show_item') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['item_id'])) {
dbShow('cms_armedlist_quests', (int) $_REQUEST['item_id']);
}
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();
}
}
示例2: header
}
}
header('location:' . $_SERVER['HTTP_REFERER']);
}
//=================================================================================================//
//=================================================================================================//
if ($opt == 'show_item') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['item_id'])) {
dbShow('cms_uc_items', $_REQUEST['item_id']);
dbQuery('UPDATE cms_uc_items SET on_moderate = 0 WHERE id=' . $_REQUEST['item_id']);
}
echo '1';
exit;
} else {
dbShowList('cms_uc_items', $_REQUEST['item']);
foreach ($_REQUEST['item'] as $k => $id) {
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;
示例3: dbShow
cmsCore::addSessionMessage($_LANG['AD_DO_SUCCESS'], 'success');
cmsCore::redirectBack();
}
//=================================================================================================//
//=================================================================================================//
if ($opt == 'show_item') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['item_id'])) {
dbShow('cms_uc_items', cmsCore::request('item_id', 'int', 0));
$inDB->query('UPDATE cms_uc_items SET on_moderate = 0 WHERE id=' . cmsCore::request('item_id', 'int', 0));
}
echo '1';
exit;
} else {
$i = cmsCore::request('item', 'array_int', array());
dbShowList('cms_uc_items', $i);
foreach ($i as $k => $id) {
$inDB->query('UPDATE cms_uc_items SET on_moderate = 0 WHERE id=' . $id);
}
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';
示例4: 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', '');
//.........这里部分代码省略.........
示例5: dbShow
$cfg['email'] = $_REQUEST['email'];
$cfg['delivery'] = $_REQUEST['delivery'];
$inCore->saveComponentConfig('price', $cfg);
}
if (@$msg) {
echo '<p class="success">' . $msg . '</p>';
}
if ($opt == 'show_item') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['id'])) {
dbShow('cms_price_items', $id);
}
echo '1';
exit;
} else {
dbShowList('cms_price_items', $_REQUEST['item']);
header('location:' . $_SERVER['HTTP_REFERER']);
}
}
if ($opt == 'hide_item') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['id'])) {
dbHide('cms_price_items', $id);
}
echo '1';
exit;
} else {
dbHideList('cms_price_items', $_REQUEST['item']);
header('location:' . $_SERVER['HTTP_REFERER']);
}
}
示例6: cpToolMenu
$toolmenu[21]['icon'] = 'cancel.gif';
$toolmenu[21]['title'] = 'Отмена';
$toolmenu[21]['link'] = '?view=components&do=config&id=' . $_REQUEST['id'];
}
cpToolMenu($toolmenu);
//=================================================================================================//
//=================================================================================================//
if ($opt == 'show_photo') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['item_id'])) {
dbShow('cms_photo_files', $_REQUEST['item_id']);
}
echo '1';
exit;
} else {
dbShowList('cms_photo_files', $_REQUEST['item']);
header('location:' . $_SERVER['HTTP_REFERER']);
}
}
//=================================================================================================//
//=================================================================================================//
if ($opt == 'hide_photo') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['item_id'])) {
dbHide('cms_photo_files', $_REQUEST['item_id']);
}
echo '1';
exit;
} else {
dbHideList('cms_photo_files', $_REQUEST['item']);
header('location:' . $_SERVER['HTTP_REFERER']);
示例7: array
$toolmenu[] = array('icon' => 'config.gif', 'title' => $_LANG['AD_SETTINGS'], 'link' => '?view=components&do=config&id=' . $id . '&opt=config');
}
if ($opt == 'add_cat' || $opt == 'edit_cat') {
$toolmenu[] = array('icon' => 'save.gif', 'title' => $_LANG['SAVE'], 'link' => 'javascript:document.addform.submit();');
$toolmenu[] = array('icon' => 'cancel.gif', 'title' => $_LANG['CANCEL'], 'link' => '?view=components&do=config&id=' . $id);
}
cpToolMenu($toolmenu);
if ($opt == 'show_item') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['item_id'])) {
dbShow('cms_board_items', cmsCore::request('item_id', 'int', 0));
}
echo '1';
exit;
} else {
dbShowList('cms_board_items', cmsCore::request('item', 'array_int', array()));
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', cmsCore::request('item', 'array_int', array()));
cmsCore::redirectBack();
}
}
if ($opt == 'delete_item') {
$model->deleteRecord(cmsCore::request('item_id', 'int', 0));
示例8: applet_modules
//.........这里部分代码省略.........
if ($id >= 0) {
dbMoveUp('cms_modules', $id, $co);
}
cmsCore::redirectBack();
}
if ($do == 'move_down') {
if ($id >= 0) {
dbMoveDown('cms_modules', $id, $co);
}
cmsCore::redirectBack();
}
//============================================================================//
//============================================================================//
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', '');
示例9: array
$toolmenu[] = array('icon' => 'config.gif', 'title' => $_LANG['AD_SETTINGS'], 'link' => '?view=components&do=config&id=' . $id . '&opt=config');
}
if ($opt == 'add_cat' || $opt == 'edit_cat') {
$toolmenu[] = array('icon' => 'save.gif', 'title' => $_LANG['SAVE'], 'link' => 'javascript:document.addform.submit();');
$toolmenu[] = array('icon' => 'cancel.gif', 'title' => $_LANG['CANCEL'], 'link' => '?view=components&do=config&id=' . $id);
}
cpToolMenu($toolmenu);
if ($opt == 'show_item') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['item_id'])) {
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));
示例10: 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);
//.........这里部分代码省略.........
示例11: array
$toolmenu[] = array('icon' => 'show.gif', 'title' => $_LANG['AD_ALLOW_SELECTED'], 'link' => "javascript:checkSel('?view=components&do=config&id=" . $id . "&opt=show_award&multiple=1');");
$toolmenu[] = array('icon' => 'hide.gif', 'title' => $_LANG['AD_DISALLOW_SELECTED'], 'link' => "javascript:checkSel('?view=components&do=config&id=" . $id . "&opt=hide_award&multiple=1');");
} else {
$toolmenu[] = array('icon' => 'save.gif', 'title' => $_LANG['SAVE'], 'link' => 'javascript:document.addform.submit();');
$toolmenu[] = array('icon' => 'cancel.gif', 'title' => $_LANG['CANCEL'], 'link' => '?view=components&do=config&id=' . $id);
}
cpToolMenu($toolmenu);
if ($opt == 'show_award') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['item_id'])) {
dbShow('cms_user_autoawards', $_REQUEST['item_id']);
}
echo '1';
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();
示例12: array
$toolmenu[] = array('icon' => 'show.gif', 'title' => $_LANG['AD_ALLOW_SELECTED'], 'link' => "javascript:checkSel('?view=components&do=config&id=" . $id . "&opt=show_banner&multiple=1');");
$toolmenu[] = array('icon' => 'hide.gif', 'title' => $_LANG['AD_DISALLOW_SELECTED'], 'link' => "javascript:checkSel('?view=components&do=config&id=" . $id . "&opt=hide_banner&multiple=1');");
} else {
$toolmenu[] = array('icon' => 'save.gif', 'title' => $_LANG['SAVE'], 'link' => 'javascript:document.addform.submit();');
$toolmenu[] = array('icon' => 'cancel.gif', 'title' => $_LANG['CANCEL'], 'link' => '?view=components&do=config&id=' . $id);
}
cpToolMenu($toolmenu);
if ($opt == 'show_banner') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['item_id'])) {
dbShow('cms_banners', $_REQUEST['item_id']);
}
echo '1';
exit;
} else {
dbShowList('cms_banners', $_REQUEST['item']);
cmsCore::redirectBack();
}
}
if ($opt == 'hide_banner') {
if (!isset($_REQUEST['item'])) {
if (isset($_REQUEST['item_id'])) {
dbHide('cms_banners', $_REQUEST['item_id']);
}
echo '1';
exit;
} else {
dbHideList('cms_banners', $_REQUEST['item']);
cmsCore::redirectBack();
}
}