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


PHP professions::GetProfLink方法代码示例

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


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

示例1: remindFreelancerbindsUp

 /**
  * Уведомление фрилансеру за 1 день до окончания 
  * размещения в freelancer_binds.
  */
 public function remindFreelancerbindsUp()
 {
     require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/freelancer_binds.php';
     $binds = freelancer_binds::getDowned();
     if (!$binds) {
         return false;
     }
     foreach ($binds as $val) {
         if ($val['bill_subscribe'] == 'f') {
             continue;
         }
         $catalog_name = '';
         $catalog_url = "{$GLOBALS['host']}/freelancers/";
         if ($val['prof_id'] == 0) {
             $catalog_name = 'общем разделе';
         } elseif ($val['is_spec'] == 'f') {
             $group = professions::GetGroup($val['prof_id'], $error);
             $catalog_url .= $group['link'];
             $catalog_name = "разделе <a href='{$catalog_url}'>{$group['name']}</a>";
         } else {
             $prof_name = professions::GetProfName($val['prof_id']);
             $catalog_url .= professions::GetProfLink($val['prof_id']);
             $catalog_name = "подразделе <a href='{$catalog_url}'>{$prof_name}</a>";
         }
         $this->recipient = "{$val['uname']} {$val['usurname']} [{$val['login']}] <{$val['email']}>";
         $this->message = Template::render($_SERVER['DOCUMENT_ROOT'] . '/templates/mail/freelancer_binds/remind_up.tpl.php', array('smail' => &$this, 'catalog_url' => $catalog_url, 'catalog_name' => $catalog_name));
         $ok = $this->send('text/html');
         if ($ok) {
             freelancer_binds::markSent('up', $val['uid'], $val['prof_id'], $val['is_spec']);
         }
     }
     return 0;
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:37,代码来源:smail.php

示例2: intvalPgSql

} else {
    if (isset($_POST['prof'])) {
        if (preg_match("/^[0-9]+\$/", $_GET['prof'])) {
            $prof_id = intvalPgSql(trim($_POST['prof']));
        } else {
            $prof_link = $_POST['prof'];
            $prof_id = professions::GetProfId($_POST['prof']);
        }
    }
}
//------------------------------------------------------------------------------
if (isset($_GET['profession_db_id']) && !($prof_id > 0 && $prof_id == $_GET['profession_db_id'] || $prof_group_id > 0 && $prof_group_id == $_GET['profession_db_id'])) {
    $link = null;
    if ($_GET['profession_db_id'] > 0) {
        if ($_GET['profession_column_id'] > 0) {
            $link = professions::GetProfLink($_GET['profession_db_id']);
        } else {
            $link = professions::GetGroupLink($_GET['profession_db_id']);
        }
    }
    unset($_GET['profession_db_id'], $_GET['profession_columns'], $_GET['profession_column_id'], $_GET['profession'], $_GET['prof']);
    $query_string = stripslashes(http_build_query($_GET));
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: /freelancers/" . ($link ? "{$link}/" : "") . "?{$query_string}");
    exit(0);
}
//------------------------------------------------------------------------------
$page = intval(trim($_GET['page']));
if (!$page) {
    $page = 1;
} elseif ($page == 1) {
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例3: quickPaymentFrlbindPlatipotom

/**
 * Оплата через Плати потом
 * 
 * @param type $type - тип оплаты
 * @param type $data - данные по параметрам покупаемой услуги
 * @return \xajaxResponse
 */
function quickPaymentFrlbindPlatipotom($type, $data)
{
    $is_error = true;
    $uid = get_uid(false);
    $objResponse =& new xajaxResponse();
    $prof_id = (int) @$data['prof_id'];
    $is_spec = (bool) @$data['is_spec'];
    $is_prolong = (bool) @$data['is_prolong'];
    $promo_code = (string) @$data['promo'];
    $freelancer_binds = new freelancer_binds();
    $valid = $is_prolong ? $freelancer_binds->isUserBinded($uid, $prof_id, $is_spec) : $freelancer_binds->isAllowBind($uid, $prof_id, $is_spec);
    if ($valid) {
        $is_error = false;
        $bill = new billing($uid);
        //Допустимо использование промокодов
        $bill->setPromoCodes('SERVICE_FRLBIND', $promo_code);
        $op_code = $freelancer_binds->getOpCode($prof_id, $is_spec, $is_prolong);
        $option = array('weeks' => (int) @$data['weeks'], 'prof_id' => $prof_id);
        //Формируем заказ
        $billReserveId = $bill->addServiceAndCheckout($op_code, $option);
        $payed_sum = $bill->getRealPayedSum();
        $platipotom = new platipotom();
        $html_form = $platipotom->render($payed_sum, $bill->account->id, $billReserveId);
        if ($html_form) {
            $objResponse->script("\n                var qp_form_wrapper = \$\$('#quick_payment_frlbind .__quick_payment_form');\n                if(qp_form_wrapper){    \n                    qp_form_wrapper.set('html','{$html_form}');\n                    qp_form_wrapper.getElement('form')[0].submit();\n                }\n            ");
            $link = '/freelancers/';
            if ($prof_id) {
                if ($is_spec) {
                    $link .= professions::GetProfLink($prof_id) . '/';
                } else {
                    $group = professions::GetGroup($prof_id, $error);
                    $link .= $group['link'] . '/';
                }
            }
            //сохранаем в сессию куда перейти при успешной покупке
            $_SESSION[quickPaymentPopup::QPP_REDIRECT] = $link;
        }
    }
    // Показываем предупреждение в случае ошибки
    if ($is_error) {
        $action = $is_prolong ? 'продлении закрепления' : 'закреплении';
        $objResponse->script("\n            var qp = window.quick_payment_factory.getQuickPayment('frlbind');\n            if(qp) qp.show_error('Возникла ошибка при {$action} в каталоге!');\n        ");
    }
    return $objResponse;
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:52,代码来源:quick_payment_frlbind.server.php


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