本文整理汇总了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', ''));
示例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');