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


PHP cmsUser::getUsersList方法代码示例

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


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

示例1: if

        
        <div class="form-group">
            <label><?php echo $_LANG['AD_FORUM_MODERATORS']; ?>:</label>
            <?php
            if ($mod['moder_list']) {
                $public = '';
                $style  = '';

                $moder_list = $inCore->yamlToArray($mod['moder_list']);
                if ($moder_list) {
                    $moder_list = cmsUser::getAuthorsList($moder_list, $moder_list);
                }
            }

            echo '<select id="users_list" class="form-control" name="users_list">';
            echo cmsUser::getUsersList();
            echo '</select> <div><a class="ajaxlink" href="javascript:" onclick="addModer()">'. $_LANG['AD_ADD_SELECTED'] .'</a></div>';
            ?>

            <select id="moder_list" class="form-control" name="moder_list[]" size="8" multiple>
                <?php if ($moder_list) { echo $moder_list; } ?>
            </select>  <div><a class="ajaxlink" href="javascript:" onclick="deleteModer()"><?php echo $_LANG['AD_DELETE_SELECTED']; ?></a></div>
            <div class="help-block"><?php echo $_LANG['AD_FORUM_HINT']; ?>.</div>
        </div>
        
        <div class="form-group">
            <label><?php echo $_LANG['AD_FORUM_ICON']; ?>:</label>
            <?php if ($mod['icon']) { ?>
                <div style="text-align:center;"><img src="/upload/forum/cat_icons/<?php echo $mod['icon']; ?>" border="0" /></div>
            <?php } ?>
            <input type="file" class="form-control" name="Filedata" />
开发者ID:Acsac,项目名称:CMS-RuDi,代码行数:30,代码来源:backend.php

示例2: blogs


//.........这里部分代码省略.........
                'target_id' => 0,
                'description' => ''
            ));

            if (IS_BILLING){ cmsBilling::process('blogs', 'add_blog'); }

            cmsCore::addSessionMessage($_LANG['BLOG_CREATED_TEXT'], 'info');
            cmsCore::redirect(cmsCore::m('blogs')->getBlogURL($blog_link));
        }
    }
    
    ////////// НАСТРОЙКИ БЛОГА /////////////////////////////////////////////////
    if ($inCore->do=='config'){
        if(!cmsCore::c('user')->id) { cmsCore::error404(); }

        if(!cmsCore::isAjax()) { cmsCore::error404(); }

        // получаем блог
        $blog = cmsCore::c('blog')->getBlog($id);
        if (!$blog) { cmsCore::error404(); }

        //Проверяем является пользователь хозяином блога или админом
        if ($blog['user_id'] != cmsCore::c('user')->id && !cmsCore::c('user')->is_admin ) { cmsCore::halt(); }

        //Если нет запроса на сохранение, показываем форму настроек блога
        if (!cmsCore::inRequest('goadd')){
            //Получаем список авторов блога
            $authors = cmsCore::c('blog')->getBlogAuthors($blog['id']);

            cmsPage::initTemplate('components', 'com_blog_config')->
                assign('blog', $blog)->
                assign('form_action', '/blogs/'.$blog['id'].'/editblog.html')->
                assign('authors_list', cmsUser::getAuthorsList($authors))->
                assign('users_list', cmsUser::getUsersList(false, $authors))->
                assign('is_restrictions', (!cmsCore::c('user')->is_admin && cmsCore::m('blogs')->config['min_karma']))->
                assign('cfg', cmsCore::m('blogs')->config)->
                assign('is_admin', cmsCore::c('user')->is_admin)->
                display();

            cmsCore::jsonOutput(array('error' => false, 'html' => ob_get_clean()));
        }

        //Если пришел запрос на сохранение
        if (cmsCore::inRequest('goadd')){
            //Получаем настройки
            $title     = cmsCore::request('title', 'str');
            $allow_who = cmsCore::request('allow_who', 'str', 'all');
            $ownertype = cmsCore::request('ownertype', 'str', 'single');
            $premod    = cmsCore::request('premod', 'int', 0);
            $forall    = cmsCore::request('forall', 'int', 1);
            $showcats  = cmsCore::request('showcats', 'int', 1);
            $authors   = cmsCore::request('authorslist', 'array_int', array());
            if (cmsCore::m('blogs')->config['seo_user_access'] || cmsCore::c('user')->is_admin) {
                $page_title = cmsCore::request('pagetitle', 'str', '');
                $meta_keys  = cmsCore::request('meta_keys', 'str', '');
                $meta_desc  = cmsCore::request('meta_desc', 'str', '');
            } else {
                $page_title = $meta_keys = $meta_desc = '';
            }
            //Проверяем настройки
            if (mb_strlen($title)<5) { $title = $blog['title']; }

            //Проверяем ограничения по карме (для смены типа блога)
            if (cmsCore::m('blogs')->config['min_karma'] && !cmsCore::c('user')->is_admin){
                // если персональный блог
                if ($ownertype=='single' && (cmsCore::c('user')->karma < cmsCore::m('blogs')->config['min_karma_private'])){
开发者ID:Acsac,项目名称:CMS-RuDi,代码行数:67,代码来源:frontend.php

示例3:

        <div class="form-group">
            <label><?php echo $_LANG['AD_ITEMS_TAGS']; ?></label>
            <input type="text" class="form-control" name="tags" />
            <div class="help-block"><?php echo $_LANG['AD_NOT_NECESSARILY']; ?></div>
        </div>
        
        <div class="form-group">
            <label><?php echo $_LANG['AD_IMG_FILE']; ?></label>
            <input type="file" class="form-control" name="imgfile" />
            <div class="help-block"><?php echo $_LANG['AD_NOT_NECESSARILY']; ?></div>
        </div>
        
        <div class="form-group">
            <label><?php echo $_LANG['AD_USER']; ?></label>
            <select class="form-control" name="user_id">
                <?php echo cmsUser::getUsersList(); ?>
            </select>
            <div class="help-block"><?php echo $_LANG['AD_USER_ALIAS']; ?></div>
        </div>
    </div>

    <div>
        <input name="cat_id" type="hidden" id="cat_id" value="<?php echo $cat_id; ?>" />
        <input name="opt" type="hidden" id="opt" value="go_import_xls" />
        
        <input type="submit" name="save" class="btn btn-primary" value="<?php echo $_LANG['AD_IMPORT']; ?>" />
        <input type="button" name="back" class="btn btn-default" value="<?php echo $_LANG['CANCEL']; ?>" onclick="window.history.go(-1);" />
    </div>
</form>
<?php
    } else {
开发者ID:Acsac,项目名称:CMS-RuDi,代码行数:31,代码来源:backend.php

示例4: array_merge

                         <td align="center" valign="top"><strong>Участники клуба: </strong><br/>
                             <select name="memberslist[]" size="12" multiple="multiple" id="memberslist" style="width:200px">
                                 <?php 
 echo cmsUser::getAuthorsList($members);
 ?>
                         </select>                    </td>
                         <td align="center"><div>
                                 <input name="member_add" type="button" id="member_add" value="&lt;&lt;" />
                             </div>
                             <div>
                                 <input name="member_remove" type="button" id="member_remove" value="&gt;&gt;" style="margin-top:4px" />
                         </div></td>
                         <td align="center" valign="top"><strong>Все пользователи:</strong><br/>
                             <select name="userslist2" size="12" multiple="multiple" id="userslist2" style="width:200px">
                                 <?php 
 echo cmsUser::getUsersList(false, array_merge($moderators, $members));
 ?>
                             </select>
                         </td>
                     </tr>
                 </table>
             </div>
         </td>
     </tr>
 </table>
 {/tabs}
 <p>
     <input name="add_mod" type="submit" id="add_mod" <?php 
 if ($opt == 'add') {
     echo 'value="Создать клуб"';
 } else {
开发者ID:ratmir-by,项目名称:icms-calendar,代码行数:31,代码来源:backend.php

示例5: blog

function blog()
{
    $inCore = cmsCore::getInstance();
    $inPage = cmsPage::getInstance();
    $inDB = cmsDatabase::getInstance();
    $inUser = cmsUser::getInstance();
    cmsCore::loadClass('blog');
    $inBlog = cmsBlogs::getInstance();
    $inBlog->owner = 'site';
    global $_LANG;
    cmsCore::loadModel('blog');
    $model = new cms_model_blog();
    define('IS_BILLING', $inCore->isComponentInstalled('billing'));
    if (IS_BILLING) {
        cmsCore::loadClass('billing');
    }
    // Проверяем включени ли компонент
    if (!$model->config['component_enabled']) {
        cmsCore::error404();
    }
    //Получаем параметры
    $id = cmsCore::request('id', 'int', 0);
    $post_id = cmsCore::request('post_id', 'int', 0);
    $seolink = cmsCore::request('seolink', 'str', '');
    $do = cmsCore::request('do', 'str', 'blog');
    $page = cmsCore::request('page', 'int', 1);
    $cat_id = cmsCore::request('cat_id', 'int', 0);
    $ownertype = cmsCore::request('ownertype', 'str', '');
    $on_moderate = cmsCore::request('on_moderate', 'int', 0);
    $pagetitle = $inCore->menuTitle();
    $pagetitle = $pagetitle && $inCore->isMenuIdStrict() ? $pagetitle : $_LANG['RSS_BLOGS'];
    $inPage->addPathway($pagetitle, '/blog');
    $inPage->setTitle($pagetitle);
    $inPage->setDescription($pagetitle);
    $blog_id = 25;
    ////////// НАСТРОЙКИ БЛОГА ////////////////////////////////////////////////////////////////////////////////////////
    if ($do == 'config') {
        if ($_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest') {
            cmsCore::halt();
        }
        if (!$inUser->id) {
            cmsCore::halt();
        }
        // получаем блог
        $blog = $inBlog->getBlog($id);
        if (!$blog) {
            cmsCore::error404();
        }
        //Проверяем является пользователь хозяином блога или админом
        if ($blog['user_id'] != $inUser->id && !$inUser->is_admin) {
            cmsCore::halt();
        }
        //Если нет запроса на сохранение, показываем форму настроек блога
        if (!cmsCore::inRequest('goadd')) {
            //Получаем список авторов блога
            $authors = $inBlog->getBlogAuthors($blog['id']);
            $smarty = $inCore->initSmarty('components', 'com_blog_config.tpl');
            $smarty->assign('blog', $blog);
            $smarty->assign('form_action', '/blog/' . $blog['id'] . '/editblog.html');
            $smarty->assign('authors_list', cmsUser::getAuthorsList($authors));
            $smarty->assign('users_list', cmsUser::getUsersList(false, $authors));
            $smarty->assign('is_restrictions', !$inUser->is_admin && $model->config['min_karma']);
            $smarty->assign('cfg', $model->config);
            $smarty->display('com_blog_config.tpl');
            cmsCore::jsonOutput(array('error' => false, 'html' => ob_get_clean()));
        }
        //Если пришел запрос на сохранение
        if (cmsCore::inRequest('goadd')) {
            if (!cmsCore::validateForm()) {
                cmsCore::halt();
            }
            //Получаем настройки
            $title = cmsCore::request('title', 'str');
            $allow_who = cmsCore::request('allow_who', 'str', 'all');
            $ownertype = cmsCore::request('ownertype', 'str', 'single');
            $premod = cmsCore::request('premod', 'int', 0);
            $forall = cmsCore::request('forall', 'int', 1);
            $showcats = cmsCore::request('showcats', 'int', 1);
            $authors = cmsCore::request('authorslist', 'array_int', array());
            //Проверяем настройки
            if (mb_strlen($title) < 5) {
                $title = $blog['title'];
            }
            //Проверяем ограничения по карме (для смены типа блога)
            if ($model->config['min_karma'] && !$inUser->is_admin) {
                // если персональный блог
                if ($ownertype == 'single' && $inUser->karma < $model->config['min_karma_private']) {
                    cmsCore::jsonOutput(array('error' => true, 'text' => $_LANG['BLOG_YOU_NEED'] . ' <a href="/users/' . $inUser->id . '/karma.html">' . $_LANG['BLOG_KARMS'] . '</a> ' . $_LANG['FOR_CREATE_PERSON_BLOG'] . ' &mdash; ' . $model->config['min_karma_private'] . ', ' . $_LANG['BLOG_HEAVING'] . ' &mdash; ' . $inUser->karma));
                }
                // если коллективный блог
                if ($ownertype == 'multi' && $inUser->karma < $model->config['min_karma_public']) {
                    cmsCore::jsonOutput(array('error' => true, 'text' => $_LANG['BLOG_YOU_NEED'] . ' <a href="/users/' . $inUser->id . '/karma.html">' . $_LANG['BLOG_KARMS'] . '</a> ' . $_LANG['FOR_CREATE_TEAM_BLOG'] . ' &mdash; ' . $model->config['min_karma_public'] . ', ' . $_LANG['BLOG_HEAVING'] . ' &mdash; ' . $inUser->karma));
                }
            }
            //сохраняем авторов
            $inBlog->updateBlogAuthors($blog['id'], $authors);
            //сохраняем настройки блога
            $blog['seolink_new'] = $inBlog->updateBlog($blog['id'], array('title' => $title, 'allow_who' => $allow_who, 'showcats' => $showcats, 'ownertype' => $ownertype, 'premod' => $premod, 'forall' => $forall), $model->config['update_seo_link_blog']);
            $blog['seolink'] = $blog['seolink_new'] ? $blog['seolink_new'] : $blog['seolink'];
            if (stripslashes($title) != $blog['title']) {
//.........这里部分代码省略.........
开发者ID:4uva4ek,项目名称:svato,代码行数:101,代码来源:frontend.php

示例6: cpAddPathway

}
if ($opt == 'config') {
    cpAddPathway($_LANG['AD_SETTINGS']);
    cpCheckWritable('/images/catalog', 'folder');
    cpCheckWritable('/images/catalog/medium', 'folder');
    cpCheckWritable('/images/catalog/small', 'folder');
    cmsCore::c('page')->initTemplate('components', 'catalog_config')->assign('cfg', $cfg)->display();
}
if ($opt == 'import_xls') {
    cpAddPathway($_LANG['AD_EXCEL_IMPORT']);
    $tpl = cmsCore::c('page')->initTemplate('components', 'catalog_import_xls')->assign('is_cat_id', cmsCore::inRequest('cat_id'));
    if (cmsCore::inRequest('cat_id')) {
        $cat_id = cmsCore::request('cat_id', 'int', 0);
        $cat = cmsCore::c('db')->get_fields('cms_uc_cats', "id = '" . $cat_id . "'", '*');
        if (!$cat) {
            cmsCore::error404();
        }
        $tpl->assign('cat_id', $cat_id)->assign('cat', $cat)->assign('fstruct', cmsCore::yamlToArray($cat['fieldsstruct']))->assign('users_opt', cmsUser::getUsersList());
    } else {
        $cats = array();
        $sql = "SELECT id, title, NSLeft, NSLevel, parent_id\r\n                FROM cms_uc_cats\r\n                WHERE parent_id > 0\r\n                ORDER BY NSLeft";
        $result = cmsCore::c('db')->query($sql);
        if (cmsCore::c('db')->num_rows($result)) {
            while ($cat = cmsCore::c('db')->fetch_assoc($result)) {
                $cats[] = $cat;
            }
        }
        $tpl->assign('cats', $cats);
    }
    $tpl->display();
}
开发者ID:CMS-RuDi,项目名称:CMS-RuDi,代码行数:31,代码来源:backend.php


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