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


PHP cmsCore::getListItems方法代码示例

本文整理汇总了PHP中cmsCore::getListItems方法的典型用法代码示例。如果您正苦于以下问题:PHP cmsCore::getListItems方法的具体用法?PHP cmsCore::getListItems怎么用?PHP cmsCore::getListItems使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cmsCore的用法示例。


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

示例1: applet_config

function applet_config()
{
    // получаем оригинальный конфиг
    $config = cmsConfig::getDefaultConfig();
    global $_LANG;
    global $adminAccess;
    if (!cmsUser::isAdminCan('admin/config', $adminAccess)) {
        cpAccessDenied();
    }
    cmsCore::c('page')->setTitle($_LANG['AD_SITE_SETTING']);
    cpAddPathway($_LANG['AD_SITE_SETTING'], 'index.php?view=config');
    $do = cmsCore::request('do', 'str', 'list');
    if ($do == 'save') {
        if (!cmsUser::checkCsrfToken()) {
            cmsCore::error404();
        }
        $newCFG = cmsCore::getArrayFromRequest(array('scheme' => array('scheme', array('http', 'https'), ''), 'sitename' => array('sitename', 'str', ''), 'title_and_sitename' => array('title_and_sitename', 'int', 0), 'title_and_page' => array('title_and_page', 'int', 0), 'hometitle' => array('hometitle', 'str', ''), 'homecom' => array('homecom', 'str', ''), 'com_without_name_in_url' => array('com_without_name_in_url', 'str', ''), 'siteoff' => array('siteoff', 'int', 0), 'only_authorized' => array('only_authorized', 'int', 0), 'debug' => array('debug', 'int', 0), 'offtext' => array('offtext', 'str', ''), 'keywords' => array('keywords', 'str', ''), 'metadesc' => array('metadesc', 'str', ''), 'seourl' => array('seourl', 'int', 0), 'lang' => array('lang', 'str', 'ru'), 'is_change_lang' => array('is_change_lang', 'int', 0), 'sitemail' => array('sitemail', 'str', ''), 'sitemail_name' => array('sitemail_name', 'str', ''), 'wmark' => array('wmark', 'str', ''), 'template' => array('template', 'str', ''), 'admin_template' => array('admin_template', 'str', ''), 'cache' => array('cache', 'int', 0), 'cache_type' => array('cache_type', array('file', 'memcached'), ''), 'memcached_host' => array('memcached_host', 'str', ''), 'memcached_port' => array('memcached_port', 'int', 0), 'combine_css_enable' => array('combine_css_enable', 'int', 0), 'combine_css' => array('combine_css', 'html', ''), 'combine_js_enable' => array('combine_js_enable', 'int', 0), 'combine_js' => array('combine_js', 'html', ''), 'splash' => array('splash', 'int', 0), 'slight' => array('slight', 'int', 0), 'show_pw' => array('show_pw', 'int', 0), 'last_item_pw' => array('last_item_pw', 'int', 0), 'index_pw' => array('index_pw', 'int', 0), 'fastcfg' => array('fastcfg', 'int', 0), 'mailer' => array('mailer', 'str', ''), 'smtpsecure' => array('smtpsecure', 'str', ''), 'smtpauth' => array('smtpauth', 'int', 0), 'smtpuser' => array('smtpuser', 'str', $config['smtpuser']), 'smtppass' => array('smtppass', 'str', $config['smtppass']), 'smtphost' => array('smtphost', 'str', ''), 'smtpport' => array('smtpport', 'int', '25'), 'timezone' => array('timezone', 'str', $config['timezone']), 'user_stats' => array('user_stats', 'int', 0), 'seo_url_count' => array('seo_url_count', 'int', 0), 'max_pagebar_links' => array('max_pagebar_links', 'int', 0), 'allow_ip' => array('allow_ip', 'str', ''), 'iframe_enable' => array('iframe_enable', 'int', 0), 'vk_enable' => array('vk_enable', 'int', 0), 'vk_id' => array('vk_id', 'str', ''), 'vk_private_key' => array('vk_private_key', 'str', '')));
        $newCFG['sitename'] = stripslashes($newCFG['sitename']);
        $newCFG['hometitle'] = stripslashes($newCFG['hometitle']);
        $newCFG['offtext'] = htmlspecialchars($newCFG['offtext'], ENT_QUOTES);
        $newCFG['db_host'] = $config['db_host'];
        $newCFG['db_base'] = $config['db_base'];
        $newCFG['db_user'] = $config['db_user'];
        $newCFG['db_pass'] = $config['db_pass'];
        $newCFG['db_prefix'] = $config['db_prefix'];
        if (cmsConfig::saveToFile($newCFG)) {
            cmsCore::addSessionMessage($_LANG['AD_CONFIG_SAVE_SUCCESS'], 'success');
        } else {
            cmsCore::addSessionMessage($_LANG['AD_CONFIG_SITE_ERROR'], 'error');
        }
        cmsCore::clearCache();
        cmsCore::redirect('index.php?view=config');
    }
    cpCheckWritable('/includes/config/config.inc.json');
    $result = cmsCore::c('db')->query("SELECT (sum(data_length)+sum(index_length))/1024/1024 as size FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = '" . $config['db_base'] . "'", true);
    if (!cmsCore::c('db')->error()) {
        $s = cmsCore::c('db')->fetch_assoc($result);
    } else {
        $s['size'] = 0;
    }
    cmsCore::c('page')->initTemplate('applets', 'config')->assign('config', $config)->assign('timezone_opt', cmsCore::getTimeZonesOptions($config['timezone']))->assign('admin_templates', cmsCore::getDirsList('/templates/admin'))->assign('templates', cmsCore::getDirsList('/templates'))->assign('tpl_info', cmsCore::c('page')->getTplInfo(cmsCore::c('page')->template))->assign('components_opt', cmsCore::getListItems('cms_components', $config['com_without_name_in_url'], 'title', 'ASC', 'internal=0', 'link'))->assign('homecom_opt', cmsCore::getListItems('cms_components', $config['homecom'], 'title', 'ASC', 'internal=0', 'link'))->assign('langs', cmsCore::getDirsList('/languages'))->assign('db_size', round($s['size'], 2))->display();
}
开发者ID:CMS-RuDi,项目名称:CMS-RuDi,代码行数:42,代码来源:config.php

示例2: blogs


//.........这里部分代码省略.........

        //Если еще не было запроса на сохранение
        if (!cmsCore::inRequest('goadd')){
            cmsCore::c('page')->addPathway($blog['title'], cmsCore::m('blogs')->getBlogURL($blog['seolink']));

            //для нового поста
            if ($inCore->do == 'newpost'){
                if (IS_BILLING){ cmsBilling::checkBalance('blogs', 'add_post'); }

                cmsCore::c('page')->addPathway($_LANG['NEW_POST']);
                cmsCore::c('page')->setTitle($_LANG['NEW_POST']);

                $post = cmsUser::sessionGet('mod');
                if ($post){
                    cmsUser::sessionDel('mod');
                } else {
                    $post['cat_id'] = $cat_id;
                    $post['comments'] = 1;

                }
            }

            //для редактирования поста
            if ($inCore->do=='editpost'){
                cmsCore::c('page')->addPathway($post['title'], cmsCore::m('blogs')->getPostURL($blog['seolink'], $post['seolink']));
                cmsCore::c('page')->addPathway($_LANG['EDIT_POST']);
                cmsCore::c('page')->setTitle($_LANG['EDIT_POST']);
            }

            cmsCore::c('page')->initAutocomplete();
            $autocomplete_js = cmsCore::c('page')->getAutocompleteJS('tagsearch', 'tags');

            //получаем рубрики блога
            $cat_list = cmsCore::getListItems('cms_blog_cats', $post['cat_id'], 'id', 'ASC', "blog_id = '{$blog['id']}'");

            //получаем код панелей bbcode и смайлов
            $bb_toolbar = cmsPage::getBBCodeToolbar('message',cmsCore::m('blogs')->config['img_on'], 'blogs', 'blog_post', $post_id);
            $smilies    = cmsPage::getSmilesPanel('message');

            $inCore->initAutoGrowText('#message');

            //показываем форму
            cmsPage::initTemplate('components', 'com_blog_edit_post')->
                assign('blog', $blog)->
                assign('pagetitle', ($inCore->do=='editpost' ? $_LANG['EDIT_POST'] : $_LANG['NEW_POST']))->
                assign('mod', $post)->
                assign('cat_list', $cat_list)->
                assign('bb_toolbar', $bb_toolbar)->
                assign('smilies', $smilies)->
                assign('is_admin', cmsCore::c('user')->is_admin)->
                assign('cfg', cmsCore::m('blogs')->config)->
                assign('myblog', $myblog)->
                assign('user_can_iscomments', cmsUser::isUserCan('comments/iscomments'))->
                assign('autocomplete_js', $autocomplete_js)->
                display();
        }

        //Если есть запрос на сохранение
        if (cmsCore::inRequest('goadd')) {
            $errors = false;

            //Получаем параметры
            $mod['title']    = cmsCore::request('title', 'str');
            $mod['content']  = cmsCore::request('content', 'html');
            $mod['feel']     = cmsCore::request('feel', 'str', '');
            $mod['music']    = cmsCore::request('music', 'str', '');
开发者ID:Acsac,项目名称:CMS-RuDi,代码行数:67,代码来源:frontend.php

示例3: applet_config


//.........这里部分代码省略.........
</span>
						<div class="hinttext" style="margin-top:4px"><a style="color:#09C" href="http://tutorial.semonitor.ru/#219" target="_blank"><?php 
    echo $_LANG['AD_WHAT_DESCRIPTION'];
    ?>
</a></div>
                    </td>
					<td>
						<textarea name="metadesc" style="width:350px" rows="3" id="metadesc"><?php 
    echo $config['metadesc'];
    ?>
</textarea>
                    </td>
				</tr>
                <tr>
    				<td>
                        <strong><?php 
    echo $_LANG['AD_MAIN_PAGE_COMPONENT'];
    ?>
</strong>
                    </td>
                    <td width="350" valign="top">
                        <select name="homecom" style="width:358px">
                            <option value="" <?php 
    if (!$config['homecom']) {
        ?>
selected="selected"<?php 
    }
    ?>
><?php 
    echo $_LANG['AD_ONLY_MODULES'];
    ?>
</option>
                            <?php 
    echo cmsCore::getListItems('cms_components', $config['homecom'], 'title', 'ASC', 'internal=0', 'link');
    ?>
                        </select>
                    </td>
			    </tr>
				<tr>
					<td>
						<strong><?php 
    echo $_LANG['AD_GATE_PAGE'];
    ?>
</strong> <br/>
						<span class="hinttext"><?php 
    echo $_LANG['AD_FIRST_VISIT'];
    ?>
</span> <br/>
                        <span class="hinttext"><?php 
    echo $_LANG['AD_FIRST_VISIT_TEMPLATE'];
    ?>
</strong></span>
					</td>
					<td valign="top">
						<label><input name="splash" type="radio" value="0" <?php 
    if (!$config['splash']) {
        echo 'checked="checked"';
    }
    ?>
/><?php 
    echo $_LANG['HIDE'];
    ?>
</label>
						<label><input name="splash" type="radio" value="1" <?php 
    if ($config['splash']) {
        echo 'checked="checked"';
开发者ID:4uva4ek,项目名称:svato,代码行数:67,代码来源:config.php

示例4: assign

		}

		//для редактирования поста
		if ($bdo=='editpost'){

			$inPage->addPathway($post['title'], $model->getPostURL($club['id'], $post['seolink']));
			$inPage->addPathway($_LANG['EDIT_POST']);
			$inPage->setTitle($_LANG['EDIT_POST']);

		}

		$inPage->initAutocomplete();
		$autocomplete_js = $inPage->getAutocompleteJS('tagsearch', 'tags');

        //получаем рубрики блога
        $cat_list = cmsCore::getListItems('cms_blog_cats', $post['cat_id'], 'id', 'ASC', "blog_id = '{$blog['id']}'");

        //получаем код панелей bbcode и смайлов
        $bb_toolbar = cmsPage::getBBCodeToolbar('message', true, 'clubs', 'blog_post', $post_id);
        $smilies    = cmsPage::getSmilesPanel('message');

        $inCore->initAutoGrowText('#message');

        //показываем форму
        cmsPage::initTemplate('components', 'com_blog_edit_post')->
                assign('blog', $blog)->
                assign('pagetitle', ($do=='editpost' ? $_LANG['EDIT_POST'] : $_LANG['NEW_POST']))->
                assign('mod', $post)->
                assign('cat_list', $cat_list)->
                assign('bb_toolbar', $bb_toolbar)->
                assign('smilies', $smilies)->
开发者ID:Acsac,项目名称:CMS-RuDi,代码行数:31,代码来源:club_blogs.php

示例5:

                        <select name="country_id" style="width: 300px;">
                        <?php 
        echo cmsCore::getListItems('cms_geo_countries', @$item['country_id'], 'name', 'ASC', '', 'id', 'name');
        ?>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td><strong><?php 
        echo $_LANG['AD_REGION'];
        ?>
</strong></td>
                    <td width="" valign="top">
                        <select name="region_id" style="width: 300px;">
                        <?php 
        echo cmsCore::getListItems('cms_geo_regions', @$item['region_id'], 'name', 'ASC', @$item['country_id'] ? "country_id = '{$item['country_id']}'" : '', 'id', 'name');
        ?>
                        </select>
                    </td>
                </tr>
                <?php 
    }
    ?>
            </table>
            <p>
                <input name="opt" type="hidden" value="do_<?php 
    echo $opt;
    ?>
" />
                <input name="sub_opt" type="hidden" value="<?php 
    echo $sub_opt;
开发者ID:deltas1,项目名称:icms1,代码行数:31,代码来源:backend.php

示例6:

//                           InstantCMS v1.10.4                               //
//                        http://www.instantcms.ru/                           //
//                                                                            //
//                   written by InstantCMS Team, 2007-2014                    //
//                produced by InstantSoft, (www.instantsoft.ru)               //
//                                                                            //
//                        LICENSED BY GNU/GPL v2                              //
//                                                                            //
/******************************************************************************/
$opt = cmsCore::request('opt', 'str', 'in');
$whith_id = cmsCore::request('with_id', 'int', 0);
$perpage = 15;
$show_notice = false;
$new_msg = cmsUser::getNewMessages($inUser->id);
$friends = cmsUser::getFriends($inUser->id);
$interlocutors = cmsCore::getListItems("cms_users u INNER JOIN cms_user_msg m ON m.from_id = u.id AND m.to_id = '{$id}'", $whith_id, 'm.from_id', 'ASC', "m.from_del = 0 AND m.to_del = 0 GROUP BY m.from_id", 'from_id', 'nickname');
switch ($opt) {
    case 'in':
        $page_title = $_LANG['INBOX'];
        $inDB->addJoin("INNER JOIN cms_user_msg m ON m.from_id = u.id AND m.to_id = '{$id}' AND m.to_del = 0");
        $msg_count = $model->getMessagesCount();
        $pagebar = cmsPage::getPagebar($msg_count, $page, $perpage, 'javascript:centerLink(\'/users/' . $id . '/messages%page%.html\')');
        break;
    case 'out':
        $page_title = $_LANG['SENT'];
        $inDB->addJoin("INNER JOIN cms_user_msg m ON m.to_id = u.id AND m.from_id = '{$id}' AND m.from_del = 0");
        $msg_count = $model->getMessagesCount();
        $pagebar = cmsPage::getPagebar($msg_count, $page, $perpage, 'javascript:centerLink(\'/users/' . $id . '/messages-sent%page%.html\')');
        break;
    case 'notices':
        $page_title = $_LANG['NOTICES'];
开发者ID:4uva4ek,项目名称:svato,代码行数:31,代码来源:messages.php

示例7: forum


//.........这里部分代码省略.........
        }
        //========== Прикрепление/открепление сообщения темы =====================//
        if ($do == 'pin_post') {
            if (!$inUser->is_admin && !$is_forum_moder) {
                cmsCore::halt();
            }
            $pinned = cmsCore::request('pinned', 'int', 0);
            $post_id = cmsCore::request('post_id', 'int', 0);
            // Проверяем, принадлежит ли сообщение теме
            if (!$model->isBelongsToPostTopic($post_id, $thread['id'])) {
                cmsCore::halt();
            }
            $inDB->query("UPDATE cms_forum_posts SET pinned = '{$pinned}' WHERE id = '{$post_id}' AND thread_id = '{$thread['id']}'");
            // Ниже строки для тех, кто обновлялся с 1.9, если чистая установка, их можно удалить
            // Ставим принудительно для первого поста темы флаг pinned
            if ($pinned) {
                $first_post_id = $inDB->get_field('cms_forum_posts', "thread_id = '{$thread['id']}' ORDER BY pubdate ASC", 'id');
                $inDB->query("UPDATE cms_forum_posts SET pinned = 1 WHERE id = '{$first_post_id}' AND thread_id = '{$thread['id']}'");
            }
            cmsCore::redirect('/forum/thread' . $thread['id'] . '-1.html#' . $post_id);
        }
        //=========================== Перенос сообщения темы =====================//
        if ($do == 'move_post') {
            if (!$inUser->is_admin && !$is_forum_moder) {
                cmsCore::halt();
            }
            $post_id = cmsCore::request('post_id', 'int', 0);
            // Проверяем, принадлежит ли сообщение теме
            if (!$model->isBelongsToPostTopic($post_id, $thread['id'])) {
                cmsCore::halt();
            }
            cmsCore::callEvent('MOVE_FORUM_POST', array('thread' => $thread, 'post_id' => $post_id));
            if (!cmsCore::inRequest('gomove')) {
                cmsPage::initTemplate('components', 'com_forum_move_post')->assign('thread', $thread)->assign('post_id', $post_id)->assign('threads', cmsCore::getListItems('cms_forum_threads', $thread['id'], 'title', 'ASC', "forum_id = '{$thread['forum_id']}'"))->display('com_forum_move_post.tpl');
                cmsCore::jsonOutput(array('error' => false, 'html' => ob_get_clean()));
            } else {
                $new_thread = $model->getThread(cmsCore::request('new_thread_id', 'int', 0));
                if (!$new_thread) {
                    cmsCore::error404();
                }
                $n_path_list = $inDB->getNsCategoryPath('cms_forums', $new_thread['NSLeft'], $new_thread['NSRight'], 'id, title, access_list, moder_list, NSLeft, NSRight');
                if ($n_path_list) {
                    foreach ($n_path_list as $n_pcat) {
                        if (!cmsCore::checkContentAccess($n_pcat['access_list'])) {
                            cmsCore::halt();
                        }
                    }
                    $is_forum_moder = $model->isForumModerator($n_pcat['moder_list']);
                }
                if (!$is_forum_moder && !$inUser->is_admin) {
                    cmsCore::error404();
                }
                $model->updatePost(array('thread_id' => $new_thread['id'], 'pubdate' => date("Y-m-d H:i:s")), $post_id);
                $model->updateThreadPostCount($thread['id']);
                $thread_post_count = $model->updateThreadPostCount($new_thread['id']);
                $total_pages = ceil($thread_post_count / $model->config['pp_thread']);
                cmsActions::updateLog('add_fpost', array('target' => $new_thread['title'], 'target_url' => '/forum/thread' . $new_thread['id'] . '.html', 'target_id' => $new_thread['id'], 'object_url' => '/forum/thread' . $new_thread['id'] . '-' . $total_pages . '.html#' . $post_id, 'pubdate' => date("Y-m-d H:i:s")), $post_id);
                $model->cacheThreadLastPost($thread['id']);
                if ($path_list) {
                    $path_list = array_reverse($path_list);
                    foreach ($path_list as $pcat) {
                        $model->cacheLastPost($pcat['NSLeft'], $pcat['NSRight']);
                    }
                }
                if ($n_path_list) {
                    $n_path_list = array_reverse($n_path_list);
开发者ID:deltas1,项目名称:icms1,代码行数:67,代码来源:frontend.php

示例8: blog


//.........这里部分代码省略.........
            cmsCore::error404();
        }
        // проверяем является ли пользователь автором, если редактируем пост
        if ($do == 'editpost' && !$inUser->is_admin && $post['user_id'] != $inUser->id) {
            cmsCore::error404();
        }
        //Если еще не было запроса на сохранение
        if (!cmsCore::inRequest('goadd')) {
            $inPage->addPathway($blog['title'], $model->getBlogURL());
            //для нового поста
            if ($do == 'newpost') {
                if (IS_BILLING) {
                    cmsBilling::checkBalance('blogs', 'add_post');
                }
                $inPage->addPathway($_LANG['NEW_POST']);
                $inPage->setTitle($_LANG['NEW_POST']);
                $post = cmsUser::sessionGet('mod');
                if ($post) {
                    cmsUser::sessionDel('mod');
                } else {
                    $post['cat_id'] = $cat_id;
                    $post['comments'] = 1;
                }
            }
            //для редактирования поста
            if ($do == 'editpost') {
                $inPage->addPathway($post['title'], $model->getPostURL('', $post['seolink']));
                $inPage->addPathway($_LANG['EDIT_POST']);
                $inPage->setTitle($_LANG['EDIT_POST']);
            }
            $inPage->initAutocomplete();
            $autocomplete_js = $inPage->getAutocompleteJS('tagsearch', 'tags');
            //получаем рубрики блога
            $cat_list = cmsCore::getListItems('cms_blog_cats', $post['cat_id'], 'id', 'ASC', "blog_id = '{$blog['id']}'");
            //получаем код панелей bbcode и смайлов
            $bb_toolbar = cmsPage::getBBCodeToolbar('message', $model->config['img_on'], 'blogs', 'post', $post_id);
            $smilies = cmsPage::getSmilesPanel('message');
            $inCore->initAutoGrowText('#message');
            //показываем форму
            $smarty = $inCore->initSmarty('components', 'com_blog_edit_post.tpl');
            $smarty->assign('blog', $blog);
            $smarty->assign('pagetitle', $do == 'editpost' ? $_LANG['EDIT_POST'] : $_LANG['NEW_POST']);
            $smarty->assign('mod', $post);
            $smarty->assign('cat_list', $cat_list);
            $smarty->assign('bb_toolbar', $bb_toolbar);
            $smarty->assign('smilies', $smilies);
            $smarty->assign('is_admin', $inUser->is_admin);
            $smarty->assign('myblog', $myblog);
            $smarty->assign('user_can_iscomments', cmsUser::isUserCan('comments/iscomments'));
            $smarty->assign('autocomplete_js', $autocomplete_js);
            $smarty->display('com_blog_edit_post.tpl');
        }
        //Если есть запрос на сохранение
        if (cmsCore::inRequest('goadd')) {
            $error = false;
            //Получаем параметры
            $mod['title'] = cmsCore::request('title', 'str');
            $mod['content'] = cmsCore::request('content', 'html');
            $mod['feel'] = cmsCore::request('feel', 'str', '');
            $mod['music'] = cmsCore::request('music', 'str', '');
            $mod['cat_id'] = cmsCore::request('cat_id', 'int');
            $mod['allow_who'] = cmsCore::request('allow_who', 'str', $blog['allow_who']);
            $mod['tags'] = cmsCore::request('tags', 'str', '');
            $mod['comments'] = cmsCore::request('comments', 'int', 1);
            $mod['published'] = $myblog || !$blog['premod'] ? 1 : 0;
            $mod['blog_id'] = $blog['id'];
开发者ID:4uva4ek,项目名称:svato,代码行数:67,代码来源:frontend.php

示例9:

                <select class="form-control" name="country_id">
                    <?php echo cmsCore::getListItems('cms_geo_countries', cmsCore::getArrVal($item, 'country_id', 0), 'name', 'ASC', '', 'id', 'name'); ?>
                </select>
            </div>
        <?php } else { ?>
            <div class="form-group">
                <label><?php echo $_LANG['AD_COUNTRY1']; ?></label>
                <select class="form-control" name="country_id">
                    <?php echo cmsCore::getListItems('cms_geo_countries', cmsCore::getArrVal($item, 'country_id', 0), 'name', 'ASC', '', 'id', 'name'); ?>
                </select>
            </div>
            
            <div class="form-group">
                <label><?php echo $_LANG['AD_REGION']; ?></label>
                <select class="form-control" name="region_id">
                    <?php echo cmsCore::getListItems('cms_geo_regions', cmsCore::getArrVal($item, 'region_id', 0), 'name', 'ASC', (isset($item['country_id']) ? "country_id = '". $item['country_id'] ."'" : ''), 'id', 'name'); ?>
                </select>
            </div>
        <?php } ?>
    </div>

    <div>
        <input type="hidden" name="opt" value="do_<?php echo $opt; ?>" />
        <input type="hidden" name="sub_opt" value="<?php echo $sub_opt; ?>" />
        <input type="hidden" name="item_id" value="<?php echo cmsCore::getArrVal($item, 'id', ''); ?>" />
        
        <input type="submit" class="btn btn-primary" name="save" value="<?php echo $_LANG['SAVE']; ?>" />
        <input type="button" class="btn btn-default" name="back" value="<?php echo $_LANG['CANCEL']; ?>" onclick="window.location.href='index.php?view=components&amp;do=config&amp;id=<?php echo $id; ?>';"/>
    </div>
</form>
<?php
开发者ID:Acsac,项目名称:CMS-RuDi,代码行数:31,代码来源:backend.php

示例10: applet_config


//.........这里部分代码省略.........
                            <input type="radio" name="slight" <?php if (!$config['slight']) { echo 'checked="checked"'; } ?> value="0" /> <?php echo $_LANG['HIDE']; ?>
                        </label>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-5 control-label"><?php echo $_LANG['AD_TAGE_ADD']; ?></label>
                    <div class="col-sm-7 btn-group" data-toggle="buttons">
                        <label class="btn btn-default <?php if ($config['title_and_sitename']) { echo 'active'; } ?>">
                            <input type="radio" name="title_and_sitename" <?php if ($config['title_and_sitename']) { echo 'checked="checked"'; } ?> value="1" /> <?php echo $_LANG['YES']; ?>
                        </label>
                        <label class="btn btn-default <?php if (!$config['title_and_sitename']) { echo 'active'; } ?>">
                            <input type="radio" name="title_and_sitename" <?php if (!$config['title_and_sitename']) { echo 'checked="checked"'; } ?> value="0" /> <?php echo $_LANG['NO']; ?>
                        </label>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-5 control-label"><?php echo $_LANG['AD_TAGE_ADD_PAGINATION']; ?></label>
                    <div class="col-sm-7 btn-group" data-toggle="buttons">
                        <label class="btn btn-default <?php if ($config['title_and_page']) { echo 'active'; } ?>">
                            <input type="radio" name="title_and_page" <?php if ($config['title_and_page']) { echo 'checked="checked"'; } ?> value="1" /> <?php echo $_LANG['YES']; ?>
                        </label>
                        <label class="btn btn-default <?php if (!$config['title_and_page']) { echo 'active'; } ?>">
                            <input type="radio" name="title_and_page" <?php if (!$config['title_and_page']) { echo 'checked="checked"'; } ?> value="0" /> <?php echo $_LANG['NO']; ?>
                        </label>
                    </div>
                </div>
                
                <div class="form-group">
                    <label class="col-sm-5 control-label"><?php echo $_LANG['AD_COM_WITHOUT_NAME_IN_URL']; ?></label>
                    <div class="col-sm-7">
                        <select class="form-control" name="com_without_name_in_url">
                            <?php echo cmsCore::getListItems('cms_components', $config['com_without_name_in_url'], 'title', 'ASC', 'internal=0', 'link'); ?>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-5 control-label"><?php echo $_LANG['TEMPLATE_INTERFACE_LANG']; ?></label>
                    <div class="col-sm-7">
                        <select class="form-control" name="lang">
                        <?php
                            $langs = cmsCore::getDirsList('/languages');
                            foreach ($langs as $lng) {
                                echo '<option value="'. $lng .'" '. ($config['lang'] == $lng ? 'selected="selected"' : '') .'>'. $lng .'</option>';
                            }
                        ?>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-5 control-label"><?php echo $_LANG['AD_SITE_LANGUAGE_CHANGE']; ?></label>
                    <div class="col-sm-7 btn-group" data-toggle="buttons">
                        <label class="btn btn-default <?php if ($config['is_change_lang']) { echo 'active'; } ?>">
                            <input type="radio" name="is_change_lang" <?php if ($config['is_change_lang']) { echo 'checked="checked"'; } ?> value="1" /> <?php echo $_LANG['YES']; ?>
                        </label>
                        <label class="btn btn-default <?php if (!$config['is_change_lang']) { echo 'active'; } ?>">
                            <input type="radio" name="is_change_lang" <?php if (!$config['is_change_lang']) { echo 'checked="checked"'; } ?> value="0" /> <?php echo $_LANG['NO']; ?>
                        </label>
                        <div style="clear:both;"></div>
                        <div class="help-block"><?php echo $_LANG['AD_VIEW_FORM_LANGUAGE_CHANGE']; ?></div>
                    </div>
                </div>
开发者ID:Acsac,项目名称:CMS-RuDi,代码行数:66,代码来源:config.php

示例11:

                    <select name="regions" style="width: 300px;" onchange="changeGeo(this, 'cities')">
                        <?php 
    echo cmsCore::getListItems('cms_geo_regions', @$item['region_id'], 'name', 'ASC', @$item['country_id'] ? "country_id = '{$item['country_id']}'" : '', 'id', 'name');
    ?>
                    </select>
                </div>

                <div class="list" <?php 
    if (!$item['city_id']) {
        echo ' style="dispay:none;"';
    }
    ?>
>
                    <select name="cities" style="width: 300px;">
                        <?php 
    echo cmsCore::getListItems('cms_geo_cities', @$item['city_id'], 'name', 'ASC', @$item['region_id'] ? "region_id = '{$item['region_id']}'" : '', 'id', 'name');
    ?>
                    </select>
                </div>
            </td>
        </tr>
    </table>

    <p>
        <input name="opt" type="hidden" value="<?php 
    if ($opt == 'district_add') {
        echo 'district_submit';
    } else {
        echo 'district_update';
    }
    ?>
开发者ID:softsolution,项目名称:cms_geo_districts,代码行数:31,代码来源:backend.php

示例12: isset

if ($opt == 'delete') {
    $sub_opt = cmsCore::request('sub_opt', 'str', '');
    $item_id = cmsCore::request('item_id', 'int', 0);
    if (!$sub_opt || !$item_id) {
        cmsCore::error404();
    }
    $table = $sub_opt == 'country' ? 'cms_geo_countries' : ($sub_opt == 'region' ? 'cms_geo_regions' : 'cms_geo_cities');
    $redirect = $sub_opt == 'country' ? 'countries' : ($sub_opt == 'region' ? 'regions' : 'cities');
    cmsCore::c('db')->delete($table, "id='" . $item_id . "'", 1);
    cmsCore::addSessionMessage($_LANG['AD_DO_SUCCESS'], 'success');
    cmsCore::redirect('?view=components&do=config&id=' . $id . '&opt=' . $redirect);
}
if ($opt == 'add' || $opt == 'edit') {
    $sub_opt = cmsCore::request('sub_opt', 'str', '');
    $item_id = cmsCore::request('item_id', 'int', 0);
    $tpl = cmsCore::c('page')->initTemplate('components', 'geo_add')->assign('opt', $opt)->assign('sub_opt', $sub_opt)->assign('item_id', $item_id)->assign('countries_opt', cmsCore::getListItems('cms_geo_countries', cmsCore::getArrVal($item, 'country_id', 0), 'name', 'ASC', '', 'id', 'name'))->assign('regions_opt', cmsCore::getListItems('cms_geo_regions', cmsCore::getArrVal($item, 'region_id', 0), 'name', 'ASC', isset($item['country_id']) ? "country_id = '" . $item['country_id'] . "'" : '', 'id', 'name'));
    if ($item_id) {
        $table = $sub_opt == 'country' ? 'cms_geo_countries' : ($sub_opt == 'region' ? 'cms_geo_regions' : 'cms_geo_cities');
        $item = cmsCore::c('db')->get_fields($table, "id='" . $item_id . "'", '*');
        if (!$item) {
            cmsCore::error404();
        }
        if (!isset($item['ordering'])) {
            $item['ordering'] = 1 + cmsCore::c('db')->get_field('cms_geo_countries', "1=1 ORDER BY ordering DESC", 'ordering');
        }
        $tpl->assign('item', $item);
        cpAddPathway($_LANG['EDIT'] . ' ' . mb_strtolower($_LANG['AD_' . mb_strtoupper($sub_opt)]));
    } else {
        if ($sub_opt) {
            cpAddPathway($_LANG['ADD'] . ' ' . mb_strtolower($_LANG['AD_' . mb_strtoupper($sub_opt)]));
        } else {
开发者ID:CMS-RuDi,项目名称:CMS-RuDi,代码行数:31,代码来源:backend.php


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