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


PHP payed::AdminAddPRO方法代码示例

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


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

示例1: date

<?php

$login = 'vladsoft';
error_reporting(E_ERROR);
require_once realpath(dirname(__FILE__) . '/../') . '/classes/stdf.php';
require_once realpath(dirname(__FILE__) . '/../') . '/classes/account.php';
require_once realpath(dirname(__FILE__) . '/../') . '/classes/session.php';
require_once realpath(dirname(__FILE__) . '/../') . '/classes/payed.php';
require_once realpath(dirname(__FILE__) . '/../') . '/classes/users.php';
$ses = new session();
$user = $DB->row("\n                SELECT uid, login\n                FROM users\n                WHERE login='{$login}';\n                ");
$payed = new payed();
$sess = new session();
$transaction_id = account::start_transaction($user['uid']);
$payed->AdminAddPRO($user['uid'], $transaction_id, '2 days');
$sess->UpdateProEndingDate($user['login']);
echo date('H:m:s') . " - {$login}\n\n";
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:17,代码来源:updateproendingdate.php

示例2: EXTRACT

<?php

require_once '../classes/stdf.php';
require_once '../classes/account.php';
require_once '../classes/session.php';
require_once '../classes/payed.php';
$users = $DB->rows("\n                SELECT uid, login, EXTRACT(epoch FROM to_date)/86400 as days \n                FROM orders \n                INNER JOIN employer e ON e.uid = orders.from_id\n                WHERE tarif = 76;\n                ");
echo "Execute recovery PRO accounts for " . count($users) . " users.\n";
$payed = new payed();
$sess = new session();
foreach ($users as $user) {
    $transaction_id = account::start_transaction($user['uid']);
    $payed->AdminAddPRO($user['uid'], $transaction_id, $user['days'] / 7 * 17 . ' days');
    $session->UpdateProEndingDate($user['login']);
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:15,代码来源:fix_error_pro.php

示例3: EXISTS

        AND NOT EXISTS ( SELECT 1 FROM orders  WHERE from_id = o.from_id AND ( (from_date <= '2013-10-18 00:00:00') AND (from_date + to_date >= '2013-10-17 00:00:00') ) )
");

echo "Execute recovery PRO accounts for " . count($users) . " users.\n";

foreach ($users as $user) {
    $transaction_id = account::start_transaction($user['from_id']);
    $payed->AdminAddPRO($user['from_id'], $transaction_id, '2 days');
    $session->UpdateProEndingDate($user['login']);
}
*/
$users = $DB->rows("\n    SELECT\n        DISTINCT from_id, login\n    FROM\n        orders o\n    INNER JOIN\n        users ON o.from_id = users.uid\n    WHERE\n        (from_date <= '2013-10-25 00:00:00') AND (from_date + to_date >= '2013-10-24 00:00:00')\n        AND EXISTS ( SELECT 1 FROM orders  WHERE from_id = o.from_id AND ( (from_date <= '2013-10-18 00:00:00') AND (from_date + to_date >= '2013-10-17 00:00:00') ) )\n");
echo 'Execute recovery PRO accounts for ' . count($users) . " users.\n";
foreach ($users as $user) {
    $transaction_id = account::start_transaction($user['from_id']);
    $payed->AdminAddPRO($user['from_id'], $transaction_id, '1 days');
    $session->UpdateProEndingDate($user['login']);
}
/*
$users = $DB->rows("
SELECT
    DISTINCT user_id, profession
FROM
    users_first_page x
WHERE
    (from_date <= '2013-10-25 00:00:00') AND (from_date + to_date >= '2013-10-24 00:00:00')
        AND NOT EXISTS ( SELECT 1 FROM users_first_page WHERE user_id = x.user_id AND ( (from_date <= '2013-10-18 00:00:00') AND (from_date + to_date >= '2013-10-17 00:00:00') ) )
");
echo "Execute recovery pay places for " . count($users) . " users.\n";
$fp = new firstpage;
foreach ($users as $user) {
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:addpro.php

示例4: intval

    case "addserv":
        $login = __paramInit('string', NULL, 'login');
        $days = __paramInit('string', NULL, 'days');
        $type = __paramInit('int', NULL, 'type');
        $where = __paramInit('int', NULL, 'where');
        $fid = users::GetUid($err, $login);
        if ($fid && $login) {
            if (preg_match('#^[1-9]+[\\d]*$#', $days)) {
                require_once ABS_PATH . '/classes/account.php';
                $nDays = intval($days);
                $trsn_id = account::start_transaction($fid);
                switch ($type) {
                    case 1:
                        require_once ABS_PATH . '/classes/payed.php';
                        $pro = new payed();
                        $pro->AdminAddPRO($fid, $trsn_id, $nDays . ' days');
                        break;
                }
                header('Location: /siteadmin/rating/?result=success');
            } else {
                $sError = 'ќшибка,  ол-во дней должно быть целым числом.';
            }
        } else {
            $sError = 'ќшибка, пользователь не найден.';
        }
        break;
}
$prfs = new professions();
$profs = $prfs->GetAllProfessions("", 0, 0);
$css_file = array('moderation.css', 'nav.css');
$content = "../content.php";
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php


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