public function getParams()
 {
     $bs_ids = $this->getFields();
     if (!is_array($bs_ids) || empty($bs_ids)) {
         return '';
     }
     array_walk($bs_ids, function (&$value) {
         $href = tservices_helper::getOrderCardUrl($value);
         $value = sprintf(ReservesTServiceOrderModel::NUM_FORMAT, $value);
         $value = "<a href=\"{$href}\" target=\"_blank\">{$value}</a>";
     });
     return implode(', ', $bs_ids);
 }
<?php

/**
 * Если создан заказ, предложен исполнителю, и в течение суток от него не было никаких действий 
 * (отказа или подтверждения), то отправляем исполнителю почтовое уведомление:.
 */
$title = reformat(htmlspecialchars($order['title']), 30, 0, 1);
$order_url = $GLOBALS['host'] . tservices_helper::getOrderCardUrl($order['id']);
$order_price = tservices_helper::cost_format($order['order_price'], true, false, false);
$order_days = tservices_helper::days_format($order['order_days']);
$accept_url = $GLOBALS['host'] . tservices_helper::getOrderStatusUrl($order['id'], 'accept', $order['frl_id']);
$decline_url = $GLOBALS['host'] . tservices_helper::getOrderStatusUrl($order['id'], 'decline', $order['frl_id']);
?>
Напоминаем, что вчера Заказчик <?php 
echo $emp_fullname;
?>
 предложил вам заказ на услугу 
&laquo;<a href="<?php 
echo $order_url;
?>
"><?php 
echo $title;
?>
</a>&raquo; на сумму <?php 
echo $order_price;
?>
 со сроком выполнения <?php 
echo $order_days;
?>
.<br/>
Вы можете перейти к заказу и обговорить условия сотрудничества, начать выполнение заказа или отказаться от него.
 /**
  * Карточка заказа.
  */
 public function actionIndex()
 {
     $order_id = __paramInit('int', 'order_id', 'order_id', 0);
     $this->order_model->attributes(array('is_adm' => $this->is_adm));
     $order = $this->order_model->getCard($order_id, $this->uid);
     if (!$order) {
         $this->missingAction(null);
     }
     $this->getClips()->add('sidebar', $this->widget('OrderStatusIndicator', array('order' => $order), true));
     $prefix = $this->is_emp ? 'emp' : 'frl';
     $is_owner = $order["{$prefix}_id"] == $this->uid;
     $allowChangePriceTime = $is_owner && $this->is_emp && $order['status'] == TServiceOrderModel::STATUS_NEW && !isset($order['reserve_data']);
     //Виджет окошка редактирования бюджета и сроков
     if ($allowChangePriceTime) {
         $this->getClips()->add('order-change-cost-popup', $this->widget('TServiceOrderChangeCostPopup', array('order' => $order), true));
     }
     if ($is_owner) {
         $this->getClips()->add('user-profile', $this->widget('TServiceOrderUserProfile', array('order' => $order, 'is_emp' => $this->is_emp), true));
     } else {
         $this->getClips()->add('employer-profile', $this->widget('TServiceOrderUserProfile', array('order' => $order, 'is_emp' => false), true));
         $this->getClips()->add('freelancer-profile', $this->widget('TServiceOrderUserProfile', array('order' => $order, 'is_emp' => true), true));
     }
     $allowMessagesForm = $is_owner || $this->is_adm && $this->order_model->isArbitrage();
     if ($allowMessagesForm) {
         $this->getClips()->add('order-messages-form', $this->widget('TServiceOrderMessagesForm', array('order_id' => $order_id, 'uid' => $this->uid), true));
     }
     $this->getClips()->add('order-messages', $this->widget('TServiceOrderMessages', array('order_id' => $order_id, 'is_owner' => $is_owner, 'uid' => $this->uid, 'frl_id' => $order['frl_id']), true));
     $this->getClips()->add('order-status', $this->widget('TServiceOrderStatus', array('order' => $order, 'is_emp' => $this->is_emp, 'is_owner' => $is_owner), true));
     $this->getClips()->add('order-history', $this->widget('TServiceOrderHistory', array('order_id' => $order_id), true));
     $this->getClips()->add('order-files', $this->widget('TServiceOrderFiles', array('order_files' => $order['files']), true));
     $this->getClips()->add('order-breadcrumbs', $this->widget('TServiceOrderBreadcrumbs', array('order' => $order, 'is_emp' => $this->is_emp || !$is_owner), true));
     if ($is_owner) {
         /*
         $this->getClips()->add('order-feedback-popup', $this->widget('TServiceOrderFeedback', array(
         ), TRUE));
         */
         //Помечаем заказ как прочтенный
         if ($order["{$prefix}_read"] == 'f') {
             $this->order_model->markAsReadOrderEvents($this->uid, $order_id, $this->is_emp);
         }
     }
     //Показать уведомление в серой плашке под меню
     if ($this->is_emp && $allowChangePriceTime && $this->order_model->isPayTypeDefault()) {
         require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/Helpers/SubBarNotificationHelper.php';
         SubBarNotificationHelper::getInstance()->setNowMessage(SubBarNotificationHelper::TYPE_RESERVE_PROMO, array('url' => tservices_helper::getOrderCardUrl($order['id']) . '?tu_edit_budjet=1&paytype=1'));
     }
     $this->render('index', array('order' => $order, 'is_emp' => $this->is_emp, 'is_owner' => $is_owner, 'allow_change' => $allowChangePriceTime));
     global $page_title;
     $page_title = "Заказ №{$order_id} – FL.ru";
 }
 public function getTypeUrl()
 {
     $src_id = @$this->reserve_data['src_id'];
     if (!$src_id) {
         return false;
     }
     return tservices_helper::getOrderCardUrl($src_id);
 }
예제 #5
0
        ?>
#messages">Переписка в заказе</a><br>(<?php 
        if ($count['all']) {
            echo $count['all'] . ' ' . ending($count['all'], 'сообщение', 'сообщения', 'сообщений');
            if ($count['new']) {
                echo ', <span class="b-layout__txt_color_6db335">' . $count['new'] . ' ' . ending($count['new'], 'новое', 'новых', 'новых') . '</span>';
            }
        } else {
            echo 'Нет сообщений';
        }
        ?>
)
        </div>
    </div>
    <div class="b-layout__txt b-layout__txt_padbot_10 b-page__ipad b-page__iphone"><a class="b-layout__link" href="<?php 
        echo tservices_helper::getOrderCardUrl($order['id']);
        ?>
#messages">Переписка в заказе</a> (<?php 
        if ($count['all']) {
            echo $count['all'] . ' ' . ending($count['all'], 'сообщение', 'сообщения', 'сообщений');
            if ($count['new']) {
                echo ', <span class="b-layout__txt_color_6db335">' . $count['new'] . ' ' . ending($count['new'], 'новое', 'новых', 'новых') . '</span>';
            }
        } else {
            echo 'Нет сообщений';
        }
        ?>
)
    </div>
    <div id="tservices_order_status_<?php 
        echo $order['id'];
 public function orderurl($order_id)
 {
     return $GLOBALS['host'] . tservices_helper::getOrderCardUrl($order_id);
 }
예제 #7
0
$js_file[] = '/css/block/b-shadow/b-shadow.js';
if (!is_emp() && get_uid(false)) {
    $js_file[] = '/scripts/uploader.js';
    $js_file[] = '/scripts/project_abuse.js';
}
$status_content = null;
if (in_array($project['kind'], array(1, 5, 9))) {
    $feedback_form = '';
    $off_status = false;
    if ($project['exec_id'] > 0) {
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/tservices/tservices_helper.php';
        if (tservices_helper::isAllowOrderReserve()) {
            require_once $_SERVER['DOCUMENT_ROOT'] . '/tu/models/TServiceOrderModel.php';
            $orderModel = TServiceOrderModel::model();
            $order_id = $orderModel->isExistByType($project['id'], $project['exec_id'], TServiceOrderModel::TYPE_PROJECT);
            $order_url = $order_id ? tservices_helper::getOrderCardUrl($order_id) : null;
            $off_status = $order_id ? true : false;
        }
    }
    if (!$off_status) {
        $js_file[] = '/scripts/projects/projects_status.js';
        if ($project['kind'] == 9 && !isset($user_offer) && isset($offers)) {
            $user_offer = $offers[0];
        }
        $status_content = projects_helper::renderStatus($project, $user_offer ? $user_offer : $exec_info);
        if ($status_content) {
            $feedback_form = projects_helper::renderFeedback($project['status']);
        }
    }
}
if (!$status_content) {