Esempio n. 1
0
// | 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__);
$collectionID = get_id(2);
$collectionsClass = new collections();
$collection = $collectionsClass->get($collectionID);
if (!is_array($collection) || $collection['public'] == 'false' && check_login_bool() && $collection['user_id'] != $_SESSION['user']['user_id']) {
    refresh('/' . $languageURL . 'collections/', $langArray['wrong_collection'], 'error');
}
_setTitle($collection['name']);
abr('checkItemsType', 'yes');
require_once ROOT_PATH . '/apps/users/models/users.class.php';
$usersClass = new users();
$collection['user'] = $usersClass->get($collection['user_id']);
if (check_login_bool()) {
    $collection['rate'] = $collectionsClass->isRate($collectionID);
}
abr('collection', $collection);
#删除作品
if (isset($_GET['delete']) && check_login_bool() && $collection['user_id'] == $_SESSION['user']['user_id']) {
    $collectionsClass->deleteBookmark($collectionID, $_GET['delete']);
    refresh('/' . $languageURL . 'collections/view/' . $collectionID, $langArray['complete_delete_bookmark'], 'complete');
}
#更新书签集
if (check_login_bool() && isset($_POST['edit']) && $collection['user_id'] == $_SESSION['user']['user_id']) {
Esempio n. 2
0
<?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
// +----------------------------------------------------------------------
if (!isset($_GET['type']) || !in_array($_GET['type'], array('other', 'buyers', 'authors', 'referrals', 'system'))) {
    refresh('?m=' . $_GET['m'] . '&c=badges&type=system', '', 'error');
}
_setView(__FILE__);
_setTitle($langArray['badges'] . ' › ' . ucfirst($_GET['type']));
$types = array('system', 'other', 'buyers', 'authors', 'referrals');
$tmp = array();
foreach ($types as $type) {
    $tmp[] = array('name' => ucfirst($type), 'href' => '?m=' . $_GET['m'] . '&c=badges&type=' . $type);
}
abr('types', $tmp);
require_once ROOT_PATH . '/apps/system/models/badges.class.php';
$badges = new badges();
$data = $badges->getAll(START, LIMIT, "`type`='" . $_GET['type'] . "'");
abr('data', $data);
$p = paging("?m=" . $_GET['m'] . "&c=badges&type=" . $_GET['type'] . "&p=", "", PAGE, LIMIT, $badges->foundRows);
abr('paging', $p);
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
Esempio n. 3
0
<?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';
Esempio n. 4
0
// +----------------------------------------------------------------------
// | 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");
}
_setTitle($item['name']);
abr('meta_description', substr(strip_tags($item['description']), 0, 255));
require_once ROOT_PATH . '/apps/users/models/users.class.php';
$usersClass = new users();
$item['user'] = $usersClass->get($item['user_id']);
abr('item', $item);
#添加FAQ条目
if (check_login_bool() && $item['user_id'] == $_SESSION['user']['user_id'] && isset($_POST['add'])) {
    $faqClass = new faq();
    $s = $faqClass->add($itemID);
    if ($s === true) {
        refresh('/' . $languageURL . 'items/faq/' . $itemID . '/', $langArray['complete_add_faq'], 'complete');
    } else {
        $message = '<ul>';
        foreach ($s as $e) {
            $message .= '<li>' . $e . '</li>';
Esempio n. 5
0
<?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['template']);
$arr = getDirList(ROOT_PATH . "/templates/admin");
abr("templates", $arr);
$template = $meta["admin_template"];
abr("template", $template);
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
Esempio n. 6
0
<?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['downloads_setTitle']);
if (!check_login_bool()) {
    $_SESSION['temp']['golink'] = '/' . $languageURL . 'download/';
    refresh('/' . $languageURL . 'sign_in/');
}
require_once ROOT_PATH . '/apps/items/models/orders.class.php';
$ordersClass = new orders();
#下载作品
$itemID = get_id(2);
if (is_numeric($itemID)) {
    require_once ROOT_PATH . '/apps/items/models/items.class.php';
    $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') {
        header("HTTP/1.0 404 Not Found");
        header("Location: http://" . DOMAIN . "/" . $languageURL . "error");
    }
    if (isset($_POST['rating'])) {
        $_GET['rating'] = $_POST['rating'];
Esempio n. 7
0
<?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['collections']);
$collectionsClass = new collections();
$limit = 20;
$start = (PAGE - 1) * $limit;
$order = '';
if (!isset($_GET['sort_by'])) {
    $_GET['sort_by'] = '';
}
switch ($_GET['sort_by']) {
    case 'name':
        $order = '`name`';
        break;
    case 'average_rating':
        $order = '`rating`';
        break;
    default:
        $order = '`datetime`';
        break;
}
Esempio n. 8
0
<?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['deposit_cash_set']);
$command = get_id(2);
$depositID = get_id(3);
if (!check_login_bool() && $command != 'success' && $command != 'notify') {
    $_SESSION['temp']['golink'] = '/' . $languageURL . 'deposit/';
    refresh('/' . $languageURL . 'sign_in/');
}
if (isset($_SESSION['tmp']['deposit_id']) && $_SESSION['tmp']['deposit_id']) {
    $_SESSION['tmp']['deposit_id'] = 0;
}
if ($command == 'success' && $depositID) {
    $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');
    }
}
Esempio n. 9
0
<?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['signup_setTitle']);
//重新发送邮件
if (isset($_POST['res_send']) && $_POST['res_send'] == 'yes' && isset($_POST['user_id']) && !empty($_POST['user_id'])) {
    $usersClass = new users();
    $res = $usersClass->res_send($_POST['user_id']);
    if ($res) {
        die('success');
    }
}
if (check_login_bool()) {
    refresh('/' . $languageURL . 'edit/');
}
if (get_id(2) == 'verify') {
    abr('verify', 'yes');
} elseif (get_id(2) == 'complete') {
    abr('complete', 'yes');
} else {
    require_once ROOT_PATH . '/apps/pages/models/pages.class.php';
    $pagesClass = new pages();
Esempio n. 10
0
<?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['percents']);
if (isset($_POST['report'])) {
    $reportClass = new report();
    $reportData = $reportClass->getReport();
    $depositData = $reportClass->getDeposits();
    $withdrawData = $reportClass->getWithdraws();
    $data = array();
    if (is_array($reportData)) {
        foreach ($reportData as $date => $v) {
            $data[$date] = array();
        }
    }
    if (is_array($depositData)) {
        foreach ($depositData as $date => $v) {
            $data[$date] = array();
        }
    }
    if (is_array($withdrawData)) {
        foreach ($withdrawData as $date => $v) {
Esempio n. 11
0
<?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['make_payment_setTitle']);
$deposit_id = 0;
if (isset($_SESSION['tmp']['deposit_id'])) {
    $deposit_id = (int) $_SESSION['tmp']['deposit_id'];
}
require_once ROOT_PATH . '/apps/users/models/deposit.class.php';
$cms = new deposit();
$deposit_info = $cms->get($deposit_id);
//充值信息
if ($deposit_info) {
    $payments = glob(dirname(dirname(dirname(__FILE__))) . '/payments/controllers/*.php');
    $payments_data = array();
    //充值方式
    if ($payments) {
        $order_obj = array();
        $key = 'chinabank';
        require_once ROOT_PATH . '/apps/payments/models/' . $key . '.class.php';
        $order_obj[$key] = new $key();
        $payments_data[$key] = array('title' => '网银在线', 'description' => '网银在线订单支付', 'form' => $order_obj[$key]->generateDepositForm($deposit_info), 'logo' => '');
Esempio n. 12
0
<?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';
Esempio n. 13
0
<?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>');
Esempio n. 14
0
<?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['items']);
//快速改变作品状态
if (isset($_POST['action']) && $_POST['action'] == 'ajax_edit' && isset($_POST['status']) && isset($_POST['item'])) {
    require_once ROOT_PATH . '/apps/items/models/items.class.php';
    $itemsClass = new items();
    //改变作品免费状态
    $res_status = '';
    $_POST['status'] == 'false' ? $res_status = 'true' : ($res_status = 'false');
    $res = $itemsClass->ajax_edit_free_file_status($_POST['item'], $res_status);
    if ($res) {
        $pic = '';
        $_POST['status'] == 'false' ? $pic = "http://" . $_SERVER['SERVER_NAME'] . "/static//admin/images/icons/24x24/accept.png" : ($pic = "http://" . $_SERVER['SERVER_NAME'] . "/static///img/question.png");
        //构造返回数据
        $res_arr = array('status' => $res_status, 'pic' => $pic);
        die(json_encode($res_arr));
    } else {
        die;
    }
}
Esempio n. 15
0
<?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['view']);
if (!isset($_GET['id']) || !is_numeric($_GET['id'])) {
    refresh('?m=' . $_GET['m'] . '&c=list', 'WRONG ID', 'error');
}
require_once ROOT_PATH . "/apps/bulletin/models/bulletin.class.php";
$cms = new bulletin();
$data = $cms->get($_GET['id']);
if ($data['send_to'] == 'city') {
    $cities = loadCities();
    $data['send_city'] = $cities[$data['send_id']]['name'];
} elseif ($data['send_to'] == 'group') {
    $bulletinGroupsClass = new bulletinGroups();
    $bGroup = $bulletinGroupsClass->get($data['send_id']);
    $data['send_group'] = $bGroup['name'];
}
abr('data', $data);
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
Esempio n. 16
0
<?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(ROOT_PATH . "/apps/" . $_GET['m'] . "/admin/add.php");
_setTitle($langArray['edit'] . ' ' . $langArray['country']);
if (!isset($_GET['fid']) || !is_numeric($_GET['fid'])) {
    refresh('?m=' . $_GET['m'] . '&c=files&id=' . $_GET['id'], 'INVALID ID', 'error');
}
$cms = new countries();
if (isset($_POST['edit'])) {
    $status = $cms->edit($_GET['fid']);
    if ($status !== true) {
        abr('error', $status);
    } else {
        refresh("?m=" . $_GET['m'] . "&c=list", $langArray['edit_complete']);
    }
} else {
    $_POST = $cms->get($_GET['fid']);
}
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
Esempio n. 17
0
<?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['statement_setTitle']);
if (!check_login_bool()) {
    $_SESSION['temp']['golink'] = '/' . $languageURL . 'statement/';
    refresh('/' . $languageURL . 'sign_in/');
}
if (!isset($_GET['month'])) {
    $_GET['month'] = date('m');
}
if (!isset($_GET['year'])) {
    $_GET['year'] = date('Y');
}
if (!checkdate($_GET['month'], 1, $_GET['year'])) {
    $_GET['month'] = date('m');
    $_GET['year'] = date('Y');
}
abr('download_csv_info', langMessageReplace($langArray['download_csv_info'], array('URL' => '/' . $languageURL . 'users/statement/?month=' . $_GET['month'] . '&$year=' . $_GET['year'] . '&export')));
$registrationDate = explode(' ', $_SESSION['user']['register_datetime']);
$registrationDate = explode('-', $registrationDate[0]);
abr('registrationDate', $registrationDate);
Esempio n. 18
0
<?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['issue_categories']);
$cms = new ccategories();
if (isset($_GET['up']) || isset($_GET['down'])) {
    $cms->tableName = 'contacts_categories';
    $cms->idColumn = 'id';
    if (isset($_GET['up']) && is_numeric($_GET['up'])) {
        $cms->moveUp($_GET['up']);
    } elseif (isset($_GET['down']) && is_numeric($_GET['down'])) {
        $cms->moveDown($_GET['down']);
    }
}
$data = $cms->getAll(START, LIMIT);
abr('data', $data);
$p = paging("?m=" . $_GET['m'] . "&c=categories&p=", "", PAGE, LIMIT, $cms->foundRows);
abr('paging', $p);
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
Esempio n. 19
0
    refresh('?m=' . $_GET['m'] . '&c=list', 'INVALID ID', 'error');
}
#加载余额
require_once ROOT_PATH . '/apps/users/models/balance.class.php';
$balanceClass = new balance();
$row = $balanceClass->get($_GET['id']);
if (!$row) {
    refresh('?m=' . $_GET['m'] . '&c=list', 'INVALID ID', 'error');
}
$_GET['user_id'] = $row['user_id'];
if (!isset($_POST['edit'])) {
    $_POST['balance'] = $row['deposit'];
}
if (!isset($_GET['user_id']) || !is_numeric($_GET['user_id'])) {
    refresh('?m=' . $_GET['m'] . '&c=list', 'INVALID ID', 'error');
}
$cms = new users();
$user = $cms->get($_GET['user_id']);
if (!$user) {
    refresh('?m=' . $_GET['m'] . '&c=list', 'INVALID ID', 'error');
}
_setTitle($user['username'] . ' › ' . $langArray['balance1']);
if (isset($_POST['edit'])) {
    $status = $balanceClass->edit();
    if ($status !== true) {
        abr('error', $status);
    } else {
        refresh("?m=" . $_GET['m'] . "&c=balance&id=" . $_GET['user_id'], $langArray['add_complete']);
    }
}
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
Esempio n. 20
0
<?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['language']);
$cms = new system();
$buff = scandir(ROOT_PATH . '/lang/');
$languages = array();
if (is_array($buff)) {
    foreach ($buff as $f) {
        if (is_file(ROOT_PATH . '/lang/' . $f)) {
            $f = basename($f, '.php');
            $languages[$f] = $f;
        }
    }
}
abr('languages', $languages);
$filename = ROOT_PATH . '/config/current.txt';
if (is_file($filename)) {
    $handle = fopen($filename, "r");
    $currentLanguage = fread($handle, filesize($filename));
    abr('currentLanguage', $currentLanguage);
    fclose($handle);
Esempio n. 21
0
<?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['edit']);
if (!isset($_GET['id']) || !is_numeric($_GET['id'])) {
    refresh('?m=' . $_GET['m'] . '&c=list', 'INVALID ID', 'error');
}
$cms = new users();
if (isset($_POST['edit'])) {
    $adminEdit = true;
    if (isset($personalEdit)) {
        $adminEdit = false;
    }
    $status = $cms->edit($_GET['id'], $adminEdit);
    if ($status !== true) {
        abr('error', $status);
    } else {
        if (isset($personalEdit)) {
            refresh("?m=" . $_GET['m'] . "&c=edit&id=" . $_GET['id'], $langArray['edit_complete']);
        } else {
            refresh("?m=" . $_GET['m'] . "&c=list", $langArray['edit_complete']);
        }
Esempio n. 22
0
<?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['list']);
$cms = new collections();
$data = $cms->getAll(START, LIMIT);
if (is_array($data)) {
    require_once ROOT_PATH . '/apps/users/models/users.class.php';
    $usersClass = new users();
    $users = $usersClass->getAll(0, 0, $cms->usersWhere);
    abr('users', $users);
}
abr('data', $data);
$p = paging("?m=" . $_GET['m'] . "&c=list&p=", "", PAGE, LIMIT, $cms->foundRows);
abr('paging', $p);
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
Esempio n. 23
0
<?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'] . ' ' . $langArray['country']);
$cms = new countries();
if (isset($_POST['add'])) {
    $status = $cms->add();
    if ($status !== true) {
        abr('error', $status);
    } else {
        refresh("?m=" . $_GET['m'] . "&c=list", $langArray['add_complete']);
    }
} else {
    $_POST['visible'] = 'true';
}
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
Esempio n. 24
0
<?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['service']);
$data = array();
$service = new service();
$data = $service->getAllfromuser(START, LIMIT, $_GET['id']);
abr('data', $data);
$p = paging("?m=" . $_GET['m'] . "&c=servicelist&p=", '&id=' . $_GET['id'], PAGE, LIMIT, $service->foundRows);
abr('paging', $p);
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
Esempio n. 25
0
<?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['contacts']);
//是否登录
check_login();
#加载类别
$categoriesClass = new ccategories();
$categories = $categoriesClass->getAll(0, 0, " `visible` = 'true'");
abr('categories', $categories);
#发送联系支持请求
if (isset($_POST['action'])) {
    //验证码验证
    if (isset($_POST['verify'])) {
        if (empty($_POST['verify'])) {
            addErrorMessage($langArray['error_verify_invalid_empty'], '', 'error');
        }
        require_once ROOT_PATH . '/classes/Verify.class.php';
        $verify = new Verify();
        $yz_verify = $verify->check($_POST['verify'], 1);
        if (!$yz_verify) {
            addErrorMessage($langArray['error_invalid_verify'], '', 'error');
Esempio n. 26
0
<?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'] . ' ' . $langArray['answer']);
if (!isset($_GET['id']) && !is_numeric($_GET['id'])) {
    refresh("/" . $languageURL . adminURL . "/?m=" . $_GET['m'] . "&c=list");
}
$cms = new answers();
if (isset($_POST['add'])) {
    $_POST['quiz_id'] = $_GET['id'];
    $status = $cms->add();
    if ($status !== true) {
        abr('error', $status);
    } else {
        refresh("?m=" . $_GET['m'] . "&c=answers&id=" . $_GET['id'], $langArray['add_complete']);
    }
} else {
    $_POST['visible'] = 'true';
}
$categoriesClass = new quiz();
$pdata = $categoriesClass->get($_GET['id']);
abr('pdata', $pdata);
Esempio n. 27
0
<?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['withdraws']);
$cms = new deposit();
$data = $cms->getWithdraws(START, LIMIT);
if (is_array($data)) {
    require_once ROOT_PATH . '/apps/users/models/users.class.php';
    $usersClass = new users();
    $users = $usersClass->getAll(0, 0, $cms->usersWhere);
    abr('users', $users);
}
abr('data', $data);
$p = paging("?m=" . $_GET['m'] . "&c=withdraws&p=", "", PAGE, LIMIT, $cms->foundRows);
abr('paging', $p);
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
Esempio n. 28
0
<?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['earnings_setTitle']);
if (!check_login_bool()) {
    $_SESSION['temp']['golink'] = '/' . $languageURL . 'earnings/';
    refresh('/' . $languageURL . 'sign_in/');
}
require_once ROOT_PATH . '/apps/items/models/orders.class.php';
$ordersClass = new orders();
if (isset($_POST['ajax'])) {
    $month = get_id(2);
    $year = get_id(3);
    $text = '';
    $sales = $ordersClass->getAll(" `paid_datetime` > '" . date('Y-m-d 23:59:59', mktime(0, 0, 0, $month - 1, date('t', mktime(0, 0, 0, $month - 1, 1, $year)), $year)) . "' AND `paid_datetime` < '" . date('Y-m-d 00:00:00', mktime(0, 0, 0, $month + 1, 1, $year)) . "' AND `paid` = 'true' AND `type` = 'buy' AND `owner_id` = '" . intval($_SESSION['user']['user_id']) . "' ", "`paid_datetime` ASC");
    if (is_array($sales)) {
        $buff = array();
        foreach ($sales as $s) {
            $day = explode(' ', $s['paid_datetime']);
            $day = explode('-', $day[0]);
            if (!isset($buff[$day[2]])) {
                $buff[$day[2]]['sale'] = 1;
Esempio n. 29
0
<?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['payments'] . ' › ' . ucfirst($_GET['c']));
$payments = scandir(dirname(dirname(__FILE__)) . '/controllers/');
if (!in_array($_GET['c'] . '.php', $payments)) {
    refresh("/" . $languageURL . adminURL . "/?m=" . $_GET['m'] . "&c=list");
}
$key = $_GET['c'];
$form = isset($_POST['form']) ? $_POST['form'] : array();
if (isset($_POST['edit'])) {
    $cms = new system();
    $cms->editGroup($key, $form);
    refresh("?m=" . $_GET['m'] . "&c=list", $langArray['edit_complete']);
}
abr('pay_info', $meta);
abr('group', $key);
//DEMILAappkey
if (isset($form[$key . '_key'])) {
    abr('v_key', $form[$key . '_key']);
} else {
    abr('v_key', isset($meta[$key . '_key']) ? $meta[$key . '_key'] : '');
Esempio n. 30
0
<?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['popular_files']);
abr('checkItemsType', 'yes');
$year = get_id(2);
$month = get_id(3);
$day = get_id(4);
if (!checkdate(intval($month), intval($day), intval($year))) {
    $year = date('Y');
    $month = date('m');
    $day = date('d');
}
$dayOfWeek = date('N', mktime(0, 0, 0, $month, $day, $year));
$dayOfWeek = 7 - $dayOfWeek;
if ($dayOfWeek > 0) {
    $endDate = date('Y-m-d', mktime(0, 0, 0, $month, $day + $dayOfWeek, $year));
} else {
    if (strlen($month) == 1) {
        $month = '0' . $month;
    }
    if (strlen($day) == 1) {