コード例 #1
0
ファイル: payed.php プロジェクト: amage/fl-ru-damp
 /**
  * Рассчет стоимости ПРО 
  *
  * @param boolean $get_all Взять все или не все
  * @return integer стоимость
  */
 function GetProPrice($get_all = FALSE, $op_code = 48)
 {
     $base = 10;
     require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/op_codes.php";
     $op_codes = new op_codes();
     if ($get_all) {
         $prices = NULL;
         if ($rows = $op_codes->getCodes('132,131,47,48,49,50,51,76,114')) {
             foreach ($rows as $r) {
                 $prices[$r['id']] = $r['sum'] * $base;
             }
         }
         return $prices;
     }
     return $op_codes->GetField($op_code, $error, 'sum') * $base;
 }
コード例 #2
0
    //количество загруженных в данный момент проектов на странице
    $_SESSION['offers_on_page'] = sizeof($offers);
    //не позволяем перегрузиться странице, после перемещения всех предложений, если нахоимся на единственной странице, для этого просто добавим 1 к количеству предложений
    if (ceil($num_offers / MAX_OFFERS_AT_PAGE) == 1) {
        $_SESSION['offers_on_page'] = sizeof($offers) + 1;
    }
    foreach ($offers as $key => $value) {
        if ($value['user_id'] == $project['exec_id']) {
            $project['exec_po_id'] = $value['id'];
        }
    }
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/HTML/projects_lenta.php";
require_once ABS_PATH . "/classes/op_codes.php";
$op_codes = new op_codes();
$pProjCost = $project['kind'] == 2 ? $op_codes->GetField(9, $error, "sum") : $op_codes->GetField(8, $error, "sum");
$user_obj = new users();
/*
$category = professions::GetGroup($project['category'], $eeee);
if($category['name'] && $project['subcategory'])
   $category['name'] .= ' / '.professions::GetProfName($project['subcategory']);
$category['name'] = projects::getSpecsStr($project['id'],'<strong> / </strong>');
*/
$answer_button_href = get_uid() ? is_emp($_SESSION['role']) ? "/public/?step=1&kind=" . $project['kind'] . "&red=" : "#new_offer" : "/login/";
$answer_button_text = get_uid() && is_emp($_SESSION['role']) ? $project['kind'] == 7 ? "Разместить аналогичный конкурс" : $project['kind'] == 4 ? "Опубликовать аналогичную вакансию" : "Опубликовать аналогичный проект" : "Ответить на проект";
?>
<script type="text/javascript">
<!--
var in_office = '<?php 
echo (int) ($project['kind'] == 4);
?>
コード例 #3
0
ファイル: index.php プロジェクト: Nikitian/fl-ru-damp
        $o_only_phone = $u->GetField($uid, $ee, 'safety_only_phone');
        $reqv = sbr_meta::getUserReqvs($uid);
        $ureqv = $reqv[$reqv['form_type']];
        $social_bind_error = isset($_SESSION['opauth_error']) ? $_SESSION['opauth_error'] : '';
        unset($_SESSION['opauth_error']);
        require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/opauth/OpauthModel.php";
        $opauthModel = new OpauthModel();
        $social_links = $opauthModel->getUserLinks($uid);
        $js_file[] = '/scripts/b-combo/b-combo-phonecodes.js';
        $inner = "../../setup/main_inner.php";
        $activ_tab = 0;
        break;
}
require_once ABS_PATH . "/classes/op_codes.php";
$op_codes = new op_codes();
$pProjCost = $op_codes->GetField(8, $error, "sum");
$content = "content.php";
switch ($action) {
    case "save_phone":
        require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/sbr.php";
        $reqv = sbr_meta::getUserReqvs(get_uid(false));
        $ureqv = $reqv[$reqv['form_type']];
        $uid = get_uid(false);
        $code = __paramInit('int', null, 'smscode');
        $phone = __paramInit('string', null, 'mob_phone');
        $type = __paramInit('string', null, 'type');
        if ($type == 'unbind') {
            $phone = $ureqv['mob_phone'];
        }
        if ($code == $_SESSION['send_sms_code'] && $phone == $_SESSION['send_sms_phone']) {
            unset($_SESSION['send_sms_code'], $_SESSION['send_sms_phone']);
コード例 #4
0
ファイル: gift.php プロジェクト: Nikitian/fl-ru-damp
             if (!is_emp()) {
                 $n = $op_codes->GetField(17, $err, "sum") * 30;
             } else {
                 $n = 2550;
             }
         }
         $text1 = "—пасибо, что воспользовались банковским переводом при пополнении счета. ¬аш подарок - {$n} рублей.";
         $count = 1;
         $text2 = '';
         break;
     case 91:
     case 93:
         include_once $_SERVER["DOCUMENT_ROOT"] . "/classes/op_codes.php";
         $op_codes = new op_codes();
         if ($gift['op_code'] == 91) {
             $n = $op_codes->GetField(48, $err, "sum") * 300;
         } elseif ($gift['op_code'] == 93) {
             if (!is_emp()) {
                 $n = $op_codes->GetField(17, $err, "sum") * 30;
             } else {
                 $n = 2550;
             }
         }
         $text1 = "—пасибо, что воспользовались WebMoney при пополнении счета. ¬аш подарок - {$n} рублей.";
         $count = 1;
         $text2 = '';
         break;
     default:
         $text1 = $gift['op_name'];
         break;
 }
コード例 #5
0
ファイル: gift.php プロジェクト: kapai69/fl-ru-damp
             if (!is_emp()) {
                 $n = $op_codes->GetField(17, $err, 'sum') * 30;
             } else {
                 $n = 2550;
             }
         }
         $text1 = "Спасибо, что воспользовались банковским переводом при пополнении счета. Ваш подарок - {$n} рублей.";
         $count = 1;
         $text2 = '';
         break;
     case 91:
     case 93:
         include_once $_SERVER['DOCUMENT_ROOT'] . '/classes/op_codes.php';
         $op_codes = new op_codes();
         if ($gift['op_code'] == 91) {
             $n = $op_codes->GetField(48, $err, 'sum') * 300;
         } elseif ($gift['op_code'] == 93) {
             if (!is_emp()) {
                 $n = $op_codes->GetField(17, $err, 'sum') * 30;
             } else {
                 $n = 2550;
             }
         }
         $text1 = "Спасибо, что воспользовались WebMoney при пополнении счета. Ваш подарок - {$n} рублей.";
         $count = 1;
         $text2 = '';
         break;
     default:
         $text1 = $gift['op_name'];
         break;
 }
コード例 #6
0
ファイル: index.php プロジェクト: kapai69/fl-ru-damp
        $o_only_phone = $u->GetField($uid, $ee, 'safety_only_phone');
        $reqv = sbr_meta::getUserReqvs($uid);
        $ureqv = $reqv[$reqv['form_type']];
        $social_bind_error = isset($_SESSION['opauth_error']) ? $_SESSION['opauth_error'] : '';
        unset($_SESSION['opauth_error']);
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/opauth/OpauthModel.php';
        $opauthModel = new OpauthModel();
        $social_links = $opauthModel->getUserLinks($uid);
        $js_file[] = '/scripts/b-combo/b-combo-phonecodes.js';
        $inner = '../../setup/main_inner.php';
        $activ_tab = 0;
        break;
}
require_once ABS_PATH . '/classes/op_codes.php';
$op_codes = new op_codes();
$pProjCost = $op_codes->GetField(8, $error, 'sum');
$content = 'content.php';
switch ($action) {
    case 'save_phone':
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/sbr.php';
        $reqv = sbr_meta::getUserReqvs(get_uid(false));
        $ureqv = $reqv[$reqv['form_type']];
        $uid = get_uid(false);
        $code = __paramInit('int', null, 'smscode');
        $phone = __paramInit('string', null, 'mob_phone');
        $type = __paramInit('string', null, 'type');
        if ($type == 'unbind') {
            $phone = $ureqv['mob_phone'];
        }
        if ($code == $_SESSION['send_sms_code'] && $phone == $_SESSION['send_sms_phone']) {
            unset($_SESSION['send_sms_code'], $_SESSION['send_sms_phone']);