當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。