当前位置: 首页>>代码示例>>PHP>>正文


PHP dbShow函数代码示例

本文整理汇总了PHP中dbShow函数的典型用法代码示例。如果您正苦于以下问题:PHP dbShow函数的具体用法?PHP dbShow怎么用?PHP dbShow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dbShow函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: applet_filters

function applet_filters()
{
    global $_LANG;
    global $adminAccess;
    if (!cmsUser::isAdminCan('admin/plugins', $adminAccess)) {
        cpAccessDenied();
    }
    if (!cmsUser::isAdminCan('admin/filters', $adminAccess)) {
        cpAccessDenied();
    }
    $GLOBALS['cp_page_title'] = $_LANG['AD_FILTERS'];
    cpAddPathway($_LANG['AD_FILTERS'], 'index.php?view=filters');
    $do = cmsCore::request('do', 'str', 'list');
    $id = cmsCore::request('id', 'int', -1);
    if ($do == 'hide') {
        dbHide('cms_filters', $id);
        echo '1';
        exit;
    }
    if ($do == 'show') {
        dbShow('cms_filters', $id);
        echo '1';
        exit;
    }
    if ($do == 'list') {
        $fields[] = array('title' => 'id', 'field' => 'id', 'width' => '30');
        $fields[] = array('title' => $_LANG['TITLE'], 'field' => 'title', 'width' => '250');
        $fields[] = array('title' => $_LANG['DESCRIPTION'], 'field' => 'description', 'width' => '');
        $fields[] = array('title' => $_LANG['AD_ENABLE'], 'field' => 'published', 'width' => '100');
        $actions = array();
        cpListTable('cms_filters', $fields, $actions);
    }
}
开发者ID:r2git,项目名称:icms1,代码行数:33,代码来源:filters.php

示例2: foreach

    if (is_array($prices)) {
        foreach ($prices as $id => $price) {
            $price = str_replace(',', '.', $price);
            $price = number_format($price, 2, '.', '');
            $sql = "UPDATE cms_uc_items SET price='{$price}' WHERE id = {$id}";
            dbQuery($sql);
        }
    }
    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') {
开发者ID:ratmir-by,项目名称:icms-calendar,代码行数:31,代码来源:backend.php

示例3: dbShow

        <input name="back" type="button" id="back" value="<?php 
    echo $_LANG['CANCEL'];
    ?>
" onclick="window.location.href='index.php?view=components&do=config&id=<?php 
    echo $id;
    ?>
';"/>
    </p>
</form>

<?php 
}
if ($opt == 'show_item') {
    if (!isset($_REQUEST['item'])) {
        if (isset($_REQUEST['item_id'])) {
            dbShow('cms_faq_quests', (int) $_REQUEST['item_id']);
        }
        echo '1';
        exit;
    } else {
        dbShowList('cms_faq_quests', $_REQUEST['item']);
        cmsCore::redirectBack();
    }
}
if ($opt == 'hide_item') {
    if (!isset($_REQUEST['item'])) {
        if (isset($_REQUEST['item_id'])) {
            dbHide('cms_faq_quests', (int) $_REQUEST['item_id']);
        }
        echo '1';
        exit;
开发者ID:4uva4ek,项目名称:svato,代码行数:31,代码来源:backend.php

示例4: applet_plugins

function applet_plugins()
{
    global $_LANG;
    $inCore = cmsCore::getInstance();
    $GLOBALS['cp_page_title'] = $_LANG['AD_PLUGINS'];
    cpAddPathway($_LANG['AD_PLUGINS'], 'index.php?view=plugins');
    global $adminAccess;
    if (!cmsUser::isAdminCan('admin/plugins', $adminAccess)) {
        cpAccessDenied();
    }
    $do = cmsCore::request('do', 'str', 'list');
    $id = cmsCore::request('id', 'int', -1);
    // ===================================================================================== //
    if ($do == 'hide') {
        dbHide('cms_plugins', $id);
        echo '1';
        exit;
    }
    // ===================================================================================== //
    if ($do == 'show') {
        dbShow('cms_plugins', $id);
        echo '1';
        exit;
    }
    // ===================================================================================== //
    if ($do == 'list') {
        $toolmenu[] = array('icon' => 'install.gif', 'title' => $_LANG['AD_INSTALL_PLUGINS'], 'link' => '?view=install&do=plugin');
        cpToolMenu($toolmenu);
        $fields[] = array('title' => 'id', 'field' => 'id', 'width' => '20');
        $fields[] = array('title' => $_LANG['TITLE'], 'field' => 'title', 'link' => '?view=plugins&do=config&id=%id%', 'width' => '250');
        $fields[] = array('title' => $_LANG['DESCRIPTION'], 'field' => 'description', 'width' => '');
        $fields[] = array('title' => $_LANG['AD_AUTHOR'], 'field' => 'author', 'width' => '160');
        $fields[] = array('title' => $_LANG['AD_VERSION'], 'field' => 'version', 'width' => '50');
        $fields[] = array('title' => $_LANG['AD_FOLDER'], 'field' => 'plugin', 'width' => '100');
        $fields[] = array('title' => $_LANG['AD_ENABLE'], 'field' => 'published', 'width' => '60');
        $actions[] = array('title' => $_LANG['AD_CONFIG'], 'icon' => 'config.gif', 'link' => '?view=plugins&do=config&id=%id%');
        $actions[] = array('title' => $_LANG['DELETE'], 'icon' => 'delete.gif', 'link' => '?view=install&do=remove_plugin&id=%id%', 'confirm' => $_LANG['AD_REMOVE_PLUGIN_FROM']);
        cpListTable('cms_plugins', $fields, $actions);
    }
    // ===================================================================================== //
    if ($do == 'save_config') {
        if (!cmsUser::checkCsrfToken()) {
            cmsCore::error404();
        }
        $plugin_name = cmsCore::request('plugin', 'str', 0);
        $config = cmsCore::request('config', 'array_str');
        if (!$config || !$plugin_name) {
            cmsCore::redirectBack();
        }
        $inCore->savePluginConfig($plugin_name, $config);
        cmsCore::addSessionMessage($_LANG['AD_CONFIG_SAVE_SUCCESS'], 'success');
        cmsCore::redirect('index.php?view=plugins');
    }
    if ($do == 'save_auto_config') {
        if (!cmsUser::checkCsrfToken()) {
            cmsCore::error404();
        }
        $plugin_name = cmsCore::request('plugin', 'str', '');
        $xml_file = PATH . '/plugins/' . $plugin_name . '/backend.xml';
        if (!file_exists($xml_file)) {
            cmsCore::error404();
        }
        $cfg = array();
        $backend = simplexml_load_file($xml_file);
        foreach ($backend->params->param as $param) {
            $name = (string) $param['name'];
            $type = (string) $param['type'];
            $default = (string) $param['default'];
            switch ($param['type']) {
                case 'number':
                    $value = cmsCore::request($name, 'int', $default);
                    break;
                case 'string':
                    $value = cmsCore::request($name, 'str', $default);
                    break;
                case 'html':
                    $value = cmsCore::badTagClear(cmsCore::request($name, 'html', $default));
                    break;
                case 'flag':
                    $value = cmsCore::request($name, 'int', 0);
                    break;
                case 'list':
                    $value = is_array($_POST[$name]) ? cmsCore::request($name, 'array_str', $default) : cmsCore::request($name, 'str', $default);
                    break;
                case 'list_function':
                    $value = cmsCore::request($name, 'str', $default);
                    break;
                case 'list_db':
                    $value = is_array($_POST[$name]) ? cmsCore::request($name, 'array_str', $default) : cmsCore::request($name, 'str', $default);
                    break;
            }
            $cfg[$name] = $value;
        }
        if (!$cfg || !$plugin_name) {
            cmsCore::redirectBack();
        }
        $inCore->savePluginConfig($plugin_name, $cfg);
        cmsCore::addSessionMessage($_LANG['AD_CONFIG_SAVE_SUCCESS'], 'success');
        cmsCore::redirect('index.php?view=plugins');
    }
//.........这里部分代码省略.........
开发者ID:deltas1,项目名称:icms1,代码行数:101,代码来源:plugins.php

示例5: 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', '');
//.........这里部分代码省略.........
开发者ID:vityapro,项目名称:cms,代码行数:101,代码来源:content.php

示例6: array

$toolmenu = array();
if ($opt == 'list') {
    $toolmenu[] = array('icon' => 'newaward.gif', 'title' => $_LANG['AD_NEW_AWARD'], 'link' => '?view=components&do=config&id=' . $id . '&opt=add');
    $toolmenu[] = array('icon' => 'listawards.gif', 'title' => $_LANG['AD_ALL_AWARDS'], 'link' => '?view=components&do=config&id=' . $id . '&opt=list');
    $toolmenu[] = array('icon' => 'edit.gif', 'title' => $_LANG['AD_EDIT_SELECTED'], 'link' => "javascript:checkSel('?view=components&do=config&id=" . $id . "&opt=edit&multiple=1');");
    $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';
开发者ID:r2git,项目名称:icms1,代码行数:31,代码来源:backend.php

示例7: applet_modules


//.........这里部分代码省略.........
        cmsCore::redirect('index.php?view=modules');
    }
    //============================================================================//
    //============================================================================//
    if ($do == 'move_up') {
        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') {
开发者ID:deltas1,项目名称:icms1,代码行数:67,代码来源:modules.php

示例8: applet_components

function applet_components()
{
    $inCore = cmsCore::getInstance();
    $inDB = cmsDatabase::getInstance();
    $inUser = cmsUser::getInstance();
    global $_LANG;
    global $adminAccess;
    if (!cmsUser::isAdminCan('admin/components', $adminAccess)) {
        cpAccessDenied();
    }
    $GLOBALS['cp_page_title'] = $_LANG['AD_COMPONENTS'];
    cpAddPathway($_LANG['AD_COMPONENTS'], 'index.php?view=components');
    $do = cmsCore::request('do', 'str', 'list');
    $id = cmsCore::request('id', 'int', 0);
    $link = cmsCore::request('link', 'str', '');
    if ($link) {
        $_REQUEST['id'] = $id = $inCore->getComponentId($link);
    }
    if ($do != 'list') {
        $com = $inCore->getComponent($id);
        if (!$com) {
            cmsCore::error404();
        }
        if (!cmsUser::isAdminCan('admin/com_' . $com['link'], $adminAccess)) {
            cpAccessDenied();
        }
    }
    if ($do == 'show') {
        dbShow('cms_components', $id);
        echo '1';
        exit;
    }
    if ($do == 'hide') {
        dbHide('cms_components', $id);
        echo '1';
        exit;
    }
    if ($do == 'config') {
        $file = PATH . '/admin/components/' . $com['link'] . '/backend.php';
        if (file_exists($file)) {
            cpAddPathway($com['title'] . ' v' . $com['version'], '?view=components&do=config&id=' . $com['id']);
            cmsCore::loadLanguage('components/' . $com['link']);
            cmsCore::loadLanguage('admin/components/' . $com['link']);
            include $file;
            return;
        } else {
            cmsCore::redirect('index.php?view=components');
        }
    }
    if ($do == 'list') {
        $toolmenu[] = array('icon' => 'install.gif', 'title' => $_LANG['AD_INSTALL_COMPONENTS'], 'link' => '?view=install&do=component');
        $toolmenu[] = array('icon' => 'help.gif', 'title' => $_LANG['AD_HELP'], 'link' => '?view=help&topic=components');
        cpToolMenu($toolmenu);
        $fields[] = array('title' => 'id', 'field' => 'id', 'width' => '30');
        $fields[] = array('title' => $_LANG['TITLE'], 'field' => 'title', 'link' => '?view=components&do=config&id=%id%', 'width' => '');
        $fields[] = array('title' => $_LANG['AD_VERSION'], 'field' => 'version', 'width' => '60');
        $fields[] = array('title' => $_LANG['AD_ENABLE'], 'field' => 'published', 'width' => '65');
        $fields[] = array('title' => $_LANG['AD_AUTHOR'], 'field' => 'author', 'width' => '200');
        $fields[] = array('title' => $_LANG['AD_LINK'], 'field' => 'link', 'width' => '100');
        $actions[] = array('title' => $_LANG['AD_CONFIG'], 'icon' => 'config.gif', 'link' => '?view=components&do=config&id=%id%', 'condition' => 'cpComponentHasConfig');
        $actions[] = array('title' => $_LANG['DELETE'], 'icon' => 'delete.gif', 'link' => '?view=install&do=remove_component&id=%id%', 'condition' => 'cpComponentCanRemove', 'confirm' => $_LANG['AD_DELETED_COMPONENT_FROM']);
        $where = '';
        if ($inUser->id > 1) {
            foreach ($adminAccess as $key => $value) {
                if (mb_strstr($value, 'admin/com_')) {
                    if ($where) {
                        $where .= ' OR ';
                    }
                    $value = str_replace('admin/com_', '', $value);
                    $where .= "link='{$value}'";
                }
            }
        }
        if (!$where) {
            $where = 'id>0';
        }
        cpListTable('cms_components', $fields, $actions, $where);
    }
}
开发者ID:vicktorwork,项目名称:cms1,代码行数:79,代码来源:components.php

示例9: cpToolMenu

if ($opt == 'list_photos' || $opt == 'list_albums') {
} else {
    $toolmenu[20]['icon'] = 'save.gif';
    $toolmenu[20]['title'] = 'Сохранить';
    $toolmenu[20]['link'] = 'javascript:document.addform.submit();';
    $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']);
        }
开发者ID:ratmir-by,项目名称:icms-calendar,代码行数:31,代码来源:backend.php

示例10: dbShow

        <input name="back" type="button" id="back" value="<?php 
    echo $_LANG['CANCEL'];
    ?>
" onclick="window.location.href='index.php?view=components&do=config&id=<?php 
    echo $id;
    ?>
';"/>
    </p>
</form>

<?php 
}
if ($opt == 'show_item') {
    if (!isset($_REQUEST['item'])) {
        if (isset($_REQUEST['item_id'])) {
            dbShow('cms_faq_quests', cmsCore::request('item_id', 'int', 0));
        }
        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;
开发者ID:deltas1,项目名称:icms1,代码行数:31,代码来源:backend.php

示例11: array

cmsCore::loadModel('banners');
$toolmenu = array();
if ($opt == 'list') {
    $toolmenu[] = array('icon' => 'new.gif', 'title' => $_LANG['AD_ADD_BANNER'], 'link' => '?view=components&do=config&id=' . $id . '&opt=add');
    $toolmenu[] = array('icon' => 'edit.gif', 'title' => $_LANG['AD_EDIT_SELECTED'], 'link' => "javascript:checkSel('?view=components&do=config&id=" . $id . "&opt=edit&multiple=1');");
    $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', cmsCore::request('item_id', 'int', 0));
        }
        echo '1';
        exit;
    } else {
        dbShowList('cms_banners', cmsCore::request('item', 'array_int', array()));
        cmsCore::redirectBack();
    }
}
if ($opt == 'hide_banner') {
    if (!isset($_REQUEST['item'])) {
        if (isset($_REQUEST['item_id'])) {
            dbHide('cms_banners', cmsCore::request('item_id', 'int', 0));
        }
        echo '1';
        exit;
开发者ID:deltas1,项目名称:icms1,代码行数:31,代码来源:backend.php

示例12: foreach

        foreach ($prices as $id => $price) {
            $price = str_replace(',', '.', $price);
            $price = number_format($price, 2, '.', '');
            $sql = "UPDATE cms_uc_items SET price='{$price}' WHERE id = {$id}";
            $inDB->query($sql);
        }
    }
    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();
    }
}
//=================================================================================================//
开发者ID:deltas1,项目名称:icms1,代码行数:31,代码来源:backend.php

示例13: 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);
//.........这里部分代码省略.........
开发者ID:vicktorwork,项目名称:cms1,代码行数:101,代码来源:menu.php

示例14: dbShow

    $cfg['thumbsqr'] = $inCore->request('thumbsqr', 'int');
    $cfg['cancreate'] = $inCore->request('cancreate', 'int');
    $cfg['perpage'] = $inCore->request('perpage', 'int');
    $cfg['create_min_karma'] = $inCore->request('create_min_karma', 'int');
    $cfg['create_min_rating'] = $inCore->request('create_min_rating', 'int');
    $cfg['notify_in'] = $inCore->request('notify_in', 'int');
    $cfg['notify_out'] = $inCore->request('notify_out', 'int');
    $cfg['every_karma'] = $inCore->request('every_karma', 'int', 100);
    $inCore->saveComponentConfig('clubs', $cfg);
    $msg = 'Настройки сохранены.';
    $opt = 'config';
}
if ($opt == 'show_club') {
    if (!isset($_REQUEST['item'])) {
        if (isset($_REQUEST['item_id'])) {
            dbShow('cms_clubs', $_REQUEST['item_id']);
        }
        echo '1';
        exit;
    } else {
        dbShowList('cms_clubs', $_REQUEST['item']);
        header('location:' . $_SERVER['HTTP_REFERER']);
    }
}
if ($opt == 'hide_club') {
    if (!isset($_REQUEST['item'])) {
        if (isset($_REQUEST['item_id'])) {
            dbHide('cms_clubs', $_REQUEST['item_id']);
        }
        echo '1';
        exit;
开发者ID:ratmir-by,项目名称:icms-calendar,代码行数:31,代码来源:backend.php

示例15: array

    $toolmenu[] = array('icon' => 'folders.gif', 'title' => $_LANG['AD_ALL_CAT'], 'link' => '?view=components&do=config&id=' . $id . '&opt=list_cats');
    if ($opt == 'list_items') {
        $toolmenu[] = array('icon' => 'show.gif', 'title' => $_LANG['AD_ALLOW_SELECTED'], 'link' => "javascript:checkSel('?view=components&do=config&id={$id}&opt=show_item&multiple=1');");
        $toolmenu[] = array('icon' => 'hide.gif', 'title' => $_LANG['AD_DISALLOW_SELECTED'], 'link' => "javascript:checkSel('?view=components&do=config&id={$id}&opt=hide_item&multiple=1');");
    }
    $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']);
开发者ID:vityapro,项目名称:cms,代码行数:31,代码来源:backend.php


注:本文中的dbShow函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。