本文整理汇总了PHP中abr函数的典型用法代码示例。如果您正苦于以下问题:PHP abr函数的具体用法?PHP abr怎么用?PHP abr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了abr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _setView
<?php
// +----------------------------------------------------------------------
// | Demila [ Beautiful Digital Content Trading System ]
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://demila.org All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
_setView(__FILE__);
$itemID = get_id(2);
$itemsClass = new items();
$item = $itemsClass->get($itemID);
if (!is_array($item) || check_login_bool() && $item['status'] == 'unapproved' && $item['user_id'] != $_SESSION['user']['user_id'] || $item['status'] == 'queue' || $item['status'] == 'extended_buy') {
header("HTTP/1.0 404 Not Found");
header("Location: http://" . DOMAIN . "/" . $languageURL . "error");
}
abr('item', $item);
示例2: abr
<?php
// +----------------------------------------------------------------------
// | Demila [ Beautiful Digital Content Trading System ]
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://demila.org All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
require_once 'init.php';
//define ( 'LIMIT', 50 );
//加载管理员模板
if (!isset($_GET['m']) && !isset($_GET['c'])) {
require_once ROOT_PATH . '/apps/admin/index.php';
}
$_templateFile = ROOT_PATH . 'templates/admin/' . $meta["admin_template"] . '/admin/index.html';
abr('content_template', $_templateFile);
require_once 'system/checkInstalledModules.php';
示例3: _setView
<?php
// +----------------------------------------------------------------------
// | Demila [ Beautiful Digital Content Trading System ]
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://demila.org All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
_setView(__FILE__);
_setTitle($langArray['add']);
$cms = new system();
if (isset($_POST['add'])) {
$status = $cms->add();
if ($status !== true) {
abr('error', $status);
} else {
refresh("?m=" . $_GET['m'] . "&c=list", $langArray['add_complete']);
}
}
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
示例4: _setView
// +----------------------------------------------------------------------
// | Demila [ Beautiful Digital Content Trading System ]
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://demila.org All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
_setView(__FILE__);
_setTitle($langArray['add']);
$cms = new categories();
if (!isset($_GET['sub_of']) || !is_numeric($_GET['sub_of'])) {
$_GET['sub_of'] = 0;
}
if (isset($_POST['add'])) {
$status = $cms->add();
if ($status !== true) {
abr('error', $status);
} else {
refresh("?m=" . $_GET['m'] . "&c=list&sub_of=" . $_GET['sub_of'], $langArray['add_complete']);
}
} else {
$_POST['visible'] = 'true';
}
if ($_GET['sub_of'] != 0) {
$pdata = $cms->get($_GET['sub_of']);
abr('pdata', $pdata);
}
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
示例5: array
if ($v['photo'] && file_exists(DATA_SERVER_PATH . "/uploads/badges/" . $v['photo'])) {
$user_badges[] = array('name' => $v['name'], 'photo' => '/uploads/badges/' . $v['photo']);
}
break;
}
}
}
if (isset($badges_data['other']) && is_array($badges_data['other'])) {
foreach ($badges_data['other'] as $k => $b) {
if (in_array($k, $other_badges) && $b['photo'] && file_exists(DATA_SERVER_PATH . "/uploads/badges/" . $b['photo'])) {
$user_badges[] = array('name' => $b['name'], 'photo' => '/uploads/badges/' . $b['photo']);
}
}
}
if (isset($user['country']['photo']) && $user['country']['photo'] && file_exists(DATA_SERVER_PATH . "/uploads/countries/" . $user['country']['photo'])) {
$user_badges[] = array('name' => $user['country']['name'], 'photo' => '/uploads/countries/' . $user['country']['photo']);
} elseif (isset($badges_data['system']['location_global_community']) && $badges_data['system']['location_global_community']['photo'] && file_exists(DATA_SERVER_PATH . "/uploads/badges/" . $badges_data['system']['location_global_community']['photo'])) {
$user_badges[] = array('name' => $badges_data['system']['location_global_community']['name'], 'photo' => '/uploads/badges/' . $badges_data['system']['location_global_community']['photo']);
}
if ($user['power_elite_author'] == 'true' && isset($badges_data['system']['power_elite_author'])) {
if ($badges_data['system']['power_elite_author']['photo'] && file_exists(DATA_SERVER_PATH . "/uploads/badges/" . $badges_data['system']['has_been_featured']['photo'])) {
$user_badges[] = array('name' => $badges_data['system']['power_elite_author']['name'], 'photo' => '/uploads/badges/' . $badges_data['system']['power_elite_author']['photo']);
}
}
if ($user['elite_author'] == 'true' && isset($badges_data['system']['elite_author'])) {
if ($badges_data['system']['elite_author']['photo'] && file_exists(DATA_SERVER_PATH . "/uploads/badges/" . $badges_data['system']['has_been_featured']['photo'])) {
$user_badges[] = array('name' => $badges_data['system']['elite_author']['name'], 'photo' => '/uploads/badges/' . $badges_data['system']['elite_author']['photo']);
}
}
abr('user_badges', $user_badges);
示例6: _setView
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
_setView(ROOT_PATH . "/apps/" . $_GET['m'] . "/admin/add.php");
_setTitle($langArray['edit']);
if (!isset($_GET['id']) || !is_numeric($_GET['id'])) {
refresh('?m=' . $_GET['m'] . '&c=list', 'INVALID ID', 'error');
}
if (!isset($_GET['p'])) {
$_GET['p'] = '';
}
$cms = new categories();
if (isset($_POST['edit'])) {
$status = $cms->edit($_GET['id']);
if ($status !== true) {
abr('error', $status);
} else {
refresh("?m=" . $_GET['m'] . "&c=list&p=" . $_GET['p'], $langArray['edit_complete']);
}
} else {
$_POST = $cms->get($_GET['id']);
}
#加载主类别
$mysql->query("\n\t\tSELECT *\n\t\tFROM `categories`\n\t\tWHERE `sub_of` = '0'\n\t\tORDER BY `order_index` ASC\n\t", __FUNCTION__);
if ($mysql->num_rows() > 0) {
while ($d = $mysql->fetch_array()) {
$categories[$d['id']] = $d;
}
abr('categories', $categories);
}
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
示例7: elseif
$usersClass->editExclusiveAuthor('false', $_GET['id']);
} elseif (isset($_POST['exclusive_true'])) {
$usersClass = new users();
$usersClass->editExclusiveAuthor('true', $_GET['id']);
}
$_POST = $cms->get($_GET['id']);
$badges = explode(',', $_POST['badges']);
$_POST['badges'] = array();
foreach ($badges as $badge) {
$_POST['badges'][] = $badge;
}
}
$users = $cms->get($_GET['id']);
$users['stats'] = $cms->getStatistic($_GET['id']);
abr('user', $users);
require_once ROOT_PATH . '/apps/' . $_GET['m'] . '/models/groups.class.php';
$g = new groups();
$groups = $g->getAll();
abr('groups', $groups);
require_once ROOT_PATH . '/apps/system/models/badges.class.php';
$badges = new badges();
$badges_data = $badges->getAll(0, 0, "`type` = 'other'");
abr('badges', $badges_data);
if (isset($_POST['badges'])) {
if (!is_array($_POST['badges'])) {
$_POST['badges'] = explode(',', $_POST['badges']);
}
} else {
$_POST['badges'] = array();
}
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
示例8: die
die('0');
}
}
#用户注册操作
if (isset($_POST['add'])) {
require_once ROOT_PATH . '/apps/system/models/system.class.php';
$cms = new system();
$data = $cms->getAll(0, 0, null, "send_mail");
if ($data[0]["value"] == 0) {
$_POST['status'] = 'activate';
}
$usersClass = new users();
$s = $usersClass->add();
if ($s === true) {
if ($data[0]["value"] == 0) {
refresh('/' . $languageURL . 'sign_in/');
}
refresh('/' . $languageURL . 'sign_up/verify/');
} else {
$message = '<ul>';
foreach ($s as $e) {
$message .= '<li>' . $e . '</li>';
}
$message .= '</ul>';
addErrorMessage($message, '', 'error');
}
}
}
#面包屑
abr('breadcrumb', '<a href="/' . $languageURL . '" title="">' . $langArray['home'] . '</a> \\ <a href="/' . $languageURL . 'users/registration/" title="">' . $langArray['sign_up'] . '</a>');
示例9: collections
<?php
// +----------------------------------------------------------------------
// | Demila [ Beautiful Digital Content Trading System ]
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://demila.org All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
require_once ROOT_PATH . '/apps/collections/models/collections.class.php';
$collectionsClass = new collections();
if (check_login_bool() && isset($_POST['add_collection'])) {
$s = $collectionsClass->bookmark($itemID);
if ($s === true) {
refresh('/' . $languageURL . 'items/' . $itemID, $langArray['complete_bookmark_item'], 'complete');
} else {
addErrorMessage($s, '还没有创建书签集', 'error');
}
}
if (check_login_bool()) {
$collections = $collectionsClass->getAll(0, 0, " `user_id` = '" . intval($_SESSION['user']['user_id']) . "' ");
abr('bookCollections', $collections);
}
示例10: deposit
$depositClass = new deposit();
$info = $depositClass->get($depositID);
if ($info && $info['paid'] == 'true') {
refresh('http://' . $config['domain'] . '/' . $languageURL . 'deposit/', $langArray['complete_deposit'], 'complete');
} else {
refresh('http://' . $config['domain'] . '/' . $languageURL . 'deposit/', $langArray['error_deposit'], 'error');
}
}
if (isset($_POST['amount'])) {
$depositClass = new deposit();
$depositID = $depositClass->add();
if ($depositID !== FALSE) {
if (isset($_SESSION['tmp']['order_id'])) {
unset($_SESSION['tmp']['order_id']);
}
$_SESSION['tmp']['deposit_id'] = $depositID;
refresh('/' . $languageURL . 'users/payment/');
}
}
#面包屑
abr('breadcrumb', '<a href="/' . $languageURL . '" title="">' . $langArray['home'] . '</a> \\ <a href="/' . $languageURL . 'users/deposit/" title="">' . $langArray['deposit'] . '</a>');
$discount = array();
if ($meta['prepaid_price_discount']) {
if (strpos($meta['prepaid_price_discount'], '%')) {
$discount = $meta['prepaid_price_discount'];
} else {
$discount = $currency['symbol'] . $meta['prepaid_price_discount'];
}
}
abr('right_discount', $discount);
示例11: _setView
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
_setView(__FILE__);
$itemID = get_id(2);
$itemsClass = new items();
$item = $itemsClass->get($itemID);
if (!is_array($item) || check_login_bool() && $item['status'] == 'unapproved' && $item['user_id'] != $_SESSION['user']['user_id'] || $item['status'] == 'queue' || $item['status'] == 'extended_buy') {
die;
}
abr('item', $item);
if (!isset($_GET['index']) || !is_numeric($_GET['index'])) {
$_GET['index'] = 0;
}
$files = scandir(DATA_SERVER_PATH . '/uploads/items/' . $itemID . '/preview/');
$previewFiles = array();
if (is_array($files)) {
foreach ($files as $f) {
if (file_exists(DATA_SERVER_PATH . '/uploads/items/' . $itemID . '/preview/' . $f)) {
$fileInfo = pathinfo(DATA_SERVER_PATH . '/uploads/items/' . $itemID . '/preview/' . $f);
if (isset($fileInfo['extension']) && (strtolower($fileInfo['extension']) == 'jpg' || strtolower($fileInfo['extension']) == 'png')) {
$previewFiles[] = $f;
}
}
}
}
if (isset($previewFiles[$_GET['index']])) {
abr('previewFile', $previewFiles[$_GET['index']]);
}
示例12: array
$data[$date] = array();
}
}
if (is_array($data)) {
foreach ($data as $k => $v) {
if (isset($reportData[$k])) {
$data[$k]['total'] = $reportData[$k]['total'];
$data[$k]['receive'] = $reportData[$k]['receive'];
$data[$k]['referal'] = $reportData[$k]['referal'];
$data[$k]['win'] = $reportData[$k]['win'];
} else {
$data[$k]['total'] = 0;
$data[$k]['receive'] = 0;
$data[$k]['referal'] = 0;
$data[$k]['win'] = 0;
}
if (isset($depositData[$k])) {
$data[$k]['deposit'] = $depositData[$k]['deposit'];
} else {
$data[$k]['deposit'] = 0;
}
if (isset($withdrawData[$k])) {
$data[$k]['withdraw'] = $withdrawData[$k]['amount'];
} else {
$data[$k]['withdraw'] = 0;
}
}
}
abr('reportData', $data);
}
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
示例13: _setView
<?php
// +----------------------------------------------------------------------
// | Demila [ Beautiful Digital Content Trading System ]
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://demila.org All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
_setView(__FILE__);
_setTitle($langArray['sendmail']);
$system = new system();
$smtp = $system->is_smtp();
$is_smtp = false;
if ($smtp) {
$is_smtp = true;
}
abr('is_smtp', $is_smtp);
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
示例14: _setView
<?php
// +----------------------------------------------------------------------
// | Demila [ Beautiful Digital Content Trading System ]
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://demila.org All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
_setView(__FILE__);
_setTitle($langArray['free_file']);
$usersClass = new users();
$limit = 60;
$start = (PAGE - 1) * $limit;
abr('number', $start + 1);
//$users = $usersClass->getAll($start, $limit, " `items` > 0 AND `status` = 'activate' ", "`sales` DESC");
//免费作品
$freeItem = $itemsClass->getAll($start, $limit, " `status` = 'active' AND `free_file` = 'true' ");
abr('freeItem', $freeItem);
abr('paging', paging('/' . $languageURL . 'free_file/?p=', '', PAGE, $limit, $itemsClass->foundRows));
#面包屑
abr('breadcrumb', '<a href="/' . $languageURL . '" title="">' . $langArray['home'] . '</a> \\ <a href="/' . $languageURL . 'users/free_file/" title="">' . $langArray['free_file'] . '</a>');
示例15: users
<?php
// +----------------------------------------------------------------------
// | Demila [ Beautiful Digital Content Trading System ]
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://demila.org All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
//用户数量
require_once ROOT_PATH . '/apps/users/models/users.class.php';
$usersClass = new users();
abr('usersCount', $usersClass->getUsersCount(" `status` = 'activate' "));
//作品数量
require_once ROOT_PATH . '/apps/items/models/items.class.php';
$itemsClass = new items();
abr('itemsCount', $itemsClass->getItemsCount());
$admin_config = array('show' => true, 'add' => true, 'list' => true, 'edit' => false);