예제 #1
0
if ($uid) {
    $op_codes = new op_codes();
    $opcodes = $op_codes->getCodes('80,16,65');
    if ($paid_specs = professions::getPaidSpecs($uid)) {
        $paid_spec_cnt = count($paid_specs);
    }
    $free_spec_cnt = is_pro() ? 5 : 1;
    $spec_cnt = $paid_spec_cnt + $free_spec_cnt;
    $paid_spec_price = $opcodes[professions::OP_PAID_SPEC]['sum'] * $paid_spec_cnt;
    $poa = new projects_offers_answers();
    $poa->GetInfo($uid);
    $poa_codes = $poa->GetOpCodes();
    $user = new freelancer();
    // Изменяем авто продление PRO, если нужно
    if (strtolower($_GET['pro_auto_prolong']) == 'on') {
        $user->setPROAutoProlong('on', $uid);
    }
    if (strtolower($_GET['pro_auto_prolong']) == 'off') {
        $user->setPROAutoProlong('off', $uid);
    }
    $user->GetUser($_SESSION['login']);
    require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/account.php";
    $account = new account();
    $ok = $account->GetInfo($uid, true);
    $u_is_pro_auto_prolong = $user->GetField($uid, $e, 'is_pro_auto_prolong', false);
    // Включено ли у юзера автоматическое продление PRO
    require_once $_SERVER['DOCUMENT_ROOT'] . "/xajax/professions.common.php";
    $xajax->printJavascript('/xajax/');
    ?>
<script type="text/javascript">
var account_sum = <?php