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


PHP cmsUser::getAwardsImages方法代码示例

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


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

示例1: users


//.........这里部分代码省略.........
    if ($do == 'votekarma') {
        if ($_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest') {
            cmsCore::halt();
        }
        if (!$inUser->id) {
            cmsCore::halt();
        }
        $points = cmsCore::request('sign', 'str', 'plus') == 'plus' ? 1 : -1;
        $to = cmsCore::request('to', 'int', 0);
        $user = cmsUser::getShortUserData($to);
        if (!$user) {
            cmsCore::halt();
        }
        if (!$model->isUserCanChangeKarma($to)) {
            cmsCore::halt();
        }
        cmsCore::halt(cmsUser::changeKarmaUser($to, $points));
    }
    //============================================================================//
    //======================= Наградить пользователя  ============================//
    //============================================================================//
    if ($do == 'giveaward') {
        if (!$inUser->is_admin) {
            cmsCore::error404();
        }
        $usr = cmsUser::getShortUserData($id);
        if (!$usr) {
            cmsCore::error404();
        }
        $inPage->setTitle($_LANG['AWARD_USER']);
        $inPage->addPathway($usr['nickname'], cmsUser::getProfileURL($usr['login']));
        $inPage->addPathway($_LANG['AWARD']);
        if (!cmsCore::inRequest('gosend')) {
            cmsPage::initTemplate('components', 'com_users_awards_give')->assign('usr', $usr)->assign('awardslist', cmsUser::getAwardsImages())->display('com_users_awards_give.tpl');
        } else {
            $award['title'] = cmsCore::request('title', 'str', $_LANG['AWRD']);
            $award['description'] = cmsCore::request('description', 'str', '');
            $award['imageurl'] = cmsCore::request('imageurl', 'str', '');
            $award['from_id'] = $inUser->id;
            $award['id'] = 0;
            cmsUser::giveAward($award, $id);
            cmsCore::redirect(cmsUser::getProfileURL($usr['login']));
        }
    }
    //============================================================================//
    //============================= Удаление награды  ============================//
    //============================================================================//
    if ($do == 'delaward') {
        $aw = $inDB->get_fields('cms_user_awards', "id = '{$id}'", '*');
        if (!$aw) {
            cmsCore::error404();
        }
        if (!$inUser->id || $inUser->id != $aw['user_id'] && !$inUser->is_admin) {
            cmsCore::error404();
        }
        $inDB->delete('cms_user_awards', "id = '{$id}'", 1);
        cmsActions::removeObjectLog('add_award', $id);
        cmsCore::redirectBack();
    }
    //============================================================================//
    //============================= Награды на сайте  ============================//
    //============================================================================//
    if ($do == 'awardslist') {
        $inPage->setTitle($_LANG['SITE_AWARDS']);
        $inPage->addPathway($_LANG['SITE_AWARDS']);
        $awards = cmsUser::getAutoAwards();
开发者ID:deltas1,项目名称:icms1,代码行数:67,代码来源:frontend.php

示例2: foreach

 /><?php 
    echo $_LANG['NO'];
    ?>
</label></td>
              </tr>
              <tr>
                <td valign="top"><strong><?php 
    echo $_LANG['AD_AWARD_IMAGE'];
    ?>
</strong><br />
                <span class="hinttext"><?php 
    echo $_LANG['AD_AWARD_FOLDER'];
    ?>
</span></td>
                <td valign="top"><?php 
    $awards_img = cmsUser::getAwardsImages();
    foreach ($awards_img as $img) {
        ?>

                    <div style="float:left;margin:4px">
                    <table border="0" cellspacing="0" cellpadding="4"><tr>
                         <?php 
        if ($mod['imageurl'] != $img) {
            ?>
                            <td align="center" valign="middle"><label><img src="/images/users/awards/<?php 
            echo $img;
            ?>
" /><br/><input type="radio" name="imageurl" value="<?php 
            echo $img;
            ?>
"/></label></td>
开发者ID:r2git,项目名称:icms1,代码行数:31,代码来源:backend.php


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