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


PHP cmsUser::getKarma方法代码示例

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


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

示例1: explode

    $date = explode('.', cmsCore::request('pubdate', 'str'));
    $pubdate = (int)$date[2] .'-'. (int)$date[1] .'-'. (int)$date[0];

    $new_imageurl = $model->uploadClubImage();
    $filename = !empty($new_imageurl['filename']) ? $new_imageurl['filename'] : '';

    $model->addClub(array(
        'admin_id' => $admin_id,
        'title' => $title,
        'description' => $description,
        'imageurl' => $filename,
        'pubdate' => $pubdate,
        'clubtype' => $clubtype,
        'published' => $published,
        'maxsize' => $maxsize,
        'create_karma' => cmsUser::getKarma($admin_id),
        'enabled_blogs' => $enabled_blogs,
        'enabled_photos' => $enabled_photos
    ));

    cmsCore::addSessionMessage($_LANG['AD_DO_SUCCESS'], 'success');
    cmsCore::redirect('index.php?view=components&do=config&opt=list&id='.$id);
}

if ($opt == 'update') {
    if (!cmsUser::checkCsrfToken()) { cmsCore::error404(); }

    $item_id = cmsCore::request('item_id', 'int', 0);

    $new_club['title']          = cmsCore::request('title', 'str', 'NO_TITLE');
    $new_club['description']    = cmsCore::c('db')->escape_string(cmsCore::request('description', 'html', ''));
开发者ID:Acsac,项目名称:CMS-RuDi,代码行数:31,代码来源:backend.php

示例2: explode

    if (!cmsUser::checkCsrfToken()) {
        cmsCore::error404();
    }
    $title = cmsCore::request('title', 'str', 'NO_TITLE');
    $description = cmsCore::c('db')->escape_string(cmsCore::request('description', 'html', ''));
    $published = cmsCore::request('published', 'int');
    $admin_id = cmsCore::request('admin_id', 'int');
    $clubtype = cmsCore::request('clubtype', 'str');
    $maxsize = cmsCore::request('maxsize', 'int');
    $enabled_blogs = cmsCore::request('enabled_blogs', 'int');
    $enabled_photos = cmsCore::request('enabled_photos', 'int');
    $date = explode('.', cmsCore::request('pubdate', 'str'));
    $pubdate = (int) $date[2] . '-' . (int) $date[1] . '-' . (int) $date[0];
    $new_imageurl = $model->uploadClubImage();
    $filename = !empty($new_imageurl['filename']) ? $new_imageurl['filename'] : '';
    $model->addClub(array('admin_id' => $admin_id, 'title' => $title, 'description' => $description, 'imageurl' => $filename, 'pubdate' => $pubdate, 'clubtype' => $clubtype, 'published' => $published, 'maxsize' => $maxsize, 'create_karma' => cmsUser::getKarma($admin_id), 'enabled_blogs' => $enabled_blogs, 'enabled_photos' => $enabled_photos));
    cmsCore::addSessionMessage($_LANG['AD_DO_SUCCESS'], 'success');
    cmsCore::redirect('index.php?view=components&do=config&opt=list&id=' . $id);
}
if ($opt == 'update') {
    if (!cmsUser::checkCsrfToken()) {
        cmsCore::error404();
    }
    $item_id = cmsCore::request('item_id', 'int', 0);
    $new_club['title'] = cmsCore::request('title', 'str', 'NO_TITLE');
    $new_club['description'] = cmsCore::c('db')->escape_string(cmsCore::request('description', 'html', ''));
    $new_club['published'] = cmsCore::request('published', 'int');
    $new_club['admin_id'] = cmsCore::request('admin_id', 'int');
    $new_club['clubtype'] = cmsCore::request('clubtype', 'str');
    $new_club['maxsize'] = cmsCore::request('maxsize', 'int');
    $new_club['enabled_blogs'] = cmsCore::request('enabled_blogs', 'int');
开发者ID:CMS-RuDi,项目名称:CMS-RuDi,代码行数:31,代码来源:backend.php


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