當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。