示例#1
0
     $vuz = get_vuz_name($order_change_history['vuz_id_new']);
     $s = $frm->Text(10, $ypos, 300, $vuz['sname'] . '(' . $vuz['name'] . ')');
 }
 $s->linkName = "vuz";
 $ypos += 30;
 $frm->Label("Курс", 10, $ypos);
 $frm->Label("Вид работы", 150, $ypos);
 $ypos += 20;
 $s = $frm->Text(10, $ypos, 120, $data_courses[$order_change_history['kurs_new']]['name']);
 //3
 $s->linkName = "kurs";
 if (!empty($order_change_history['type_user_new'])) {
     $s = $frm->Text(150, $ypos, 200, $order_change_history['type_user_new']);
     // 4
 } else {
     $s = $frm->Text(150, $ypos, 200, get_worktype_name($order_change_history['type_id_new']));
 }
 $s->linkName = "worktype";
 $ypos += 30;
 $frm->Label("Направление (факультет)", 10, $ypos);
 $frm->Label("Специальность (дисциплина)", 190, $ypos);
 $ypos += 20;
 $s = $frm->Text(10, $ypos, 160, get_naprav_name($order_change_history['napr_id_new']));
 //6
 $s->linkName = "naprav";
 if (!empty($order_change_history['disc_user_new'])) {
     $s = $frm->Text(190, $ypos, 200, $order_change_history['disc_user_new']);
     // 4
 } else {
     $s = $frm->Text(190, $ypos, 200, get_discipline_name($order_change_history['disc_id_new']));
 }
示例#2
0
function send_order_by_email($Frm, $Err, $_authors = null)
{
    global $data_courses, $data_practica;
    if (!$Err) {
        $order_id = $Frm->GetNmValueI("order_id");
        $changes = array();
        $order_info = get_order_info($order_id);
        if ($order_info['vuz_id'] == 0) {
            $changes[] = "'вуз' " . $order_info['vuz_user'];
        } else {
            $vuz1 = get_vuz_name($order_info['vuz_id']);
            $changes[] = "'вуз' " . $vuz1['sname'] . "(" . $vuz1['name'] . ")";
        }
        if ($order_info['type_id'] == 0) {
            $changes[] = "'вид работы' " . $order_info['type_user'];
        } else {
            $changes[] = "'вид работы' " . get_worktype_name($order_info['type_id']);
        }
        $changes[] = "'факультет' " . get_naprav_name($order_info['napr_id']);
        if ($order_info['disc_id'] == 0) {
            $spec = $order_info['disc_user'];
        } else {
            $spec = get_discipline_name($order_info['disc_id']);
        }
        $changes[] = "Специальность: " . $spec;
        $changes[] = "Тема работы: " . $order_info['subject'];
        $changes[] = "Требования: " . $order_info['about_kln'];
        $changes[] = "Курс: " . $data_courses[$order_info['kurs']]['name'];
        $changes[] = "Практика: " . $data_practica[$order_info['prakt_pc']]['name'];
        $changes[] = "Минимальное число страниц: " . $order_info['pages_min'];
        $changes[] = "Максимальное число страниц: " . $order_info['pages_max'];
        $changes[] = "Минимальное число источников: " . $order_info['src_min'];
        $changes[] = "Максимальное число источников: " . $order_info['src_max'];
        $changes[] = "Гонорар автора: " . $order_info['cost_auth'];
        $changes[] = "Дата сдачи для автора: " . format_date($order_info['time_auth']);
        $changes[] = "";
        try {
            $manager = Employee::find($order_info['manager_id']);
        } catch (Exception $e) {
            $Frm->_gui->ERR("У заказа не указан менеджер");
            page_reloadAll();
        }
        try {
            $filial = Filial::find($order_info['filial_id']);
        } catch (Exception $e) {
            $Frm->_gui->ERR("У заказа не указан филиал");
            page_reloadAll();
        }
        if (empty($filial['email'])) {
            $Frm->_gui->ERR("У филиала к которому принадлежит заказ не указан email");
            page_reloadAll();
        }
        $changes[] = "Менеджер: " . $manager['fio'] . ". По данному заказу писать на почту " . $filial['email'];
        $changes[] = "Если заказ по данной дисциплине/специальности для Вас не является профильным, то Вы в любой момент можете отписаться от данной дисциплины/специальности в своем личном кабинете, расположенном по адресу: sessia-online.ru. Там же Вы так же можете подписаться на другие, интересные Вам дисциплины.";
        $msg_for_author = "Детали заказа №" . $order_id . ":\n";
        $msg_for_author .= join($changes, "<br>");
        $authors = array();
        if (is_array($_authors) && count($_authors)) {
            $authors = $_authors;
        } else {
            if (isset($_POST['authors'])) {
                $authors = $_POST['authors'];
            }
        }
        $failed = Author::saveMessageAndEnqueueEmail($order_id, $authors, 'u' . $_SESSION['user']['data']['id'], '№' . $order_id . ' ' . ucfirst($spec), str_replace(array('http://', 'https://'), '', $msg_for_author), \Components\Entity\EmailNotification::TO_SUBSCRIBED_AUTHORS_ON_DISTRIBUTION);
        //    $failed = Author::sendEmail($order_id, $authors, '№' . $order_id . ' ' . ucfirst($spec), str_replace(array('http://', 'https://'), '', $msg_for_author), true, true);
        if (!count($failed)) {
            $Frm->_gui->OK("Заказ отправлен");
        } else {
            $failed_receivers = array();
            foreach ($failed as $receiver) {
                $failed_receivers[] = $receiver['name'] . ' - ' . $receiver['email'];
            }
            $Frm->_gui->ERR("Вовремя отправки заказа возникли ошибки. Заказ не отправлен: " . join("\n", $failed_receivers));
        }
    }
}
示例#3
0
文件: view.php 项目: yonkon/diplom
    $vuz = get_vuz_name($order_info['vuz_id']);
    $s = $frm->Text(10, $ypos, 300, $vuz['sname'] . '(' . $vuz['name'] . ')');
}
$s->linkName = "vuz";
$ypos += 30;
$frm->Label("Курс", 10, $ypos);
$frm->Label("Вид работы", 150, $ypos);
$ypos += 20;
$s = $frm->Text(10, $ypos, 120, $data_courses[$order_info['kurs']]['name']);
//3
$s->linkName = "kurs";
if (!empty($order_info['type_user'])) {
    $s = $frm->Text(150, $ypos, 200, $order_info['type_user']);
    // 4
} else {
    $s = $frm->Text(150, $ypos, 200, get_worktype_name($order_info['type_id']));
}
$s->linkName = "worktype";
$ypos += 30;
$frm->Label("Направление (факультет)", 10, $ypos);
$frm->Label("Дисциплина", 190, $ypos);
$ypos += 20;
$s = $frm->Text(10, $ypos, 160, get_naprav_name($order_info['napr_id']));
//6
$s->linkName = "naprav";
if (!empty($order_info['disc_user'])) {
    $s = $frm->Text(190, $ypos, 200, $order_info['disc_user']);
    // 4
} else {
    $s = $frm->Text(190, $ypos, 200, get_discipline_name($order_info['disc_id']));
}
示例#4
0
                 fclose($f_s);
                 fclose($f_d);
             }
             unlink($f["path"]);
         }
     }
 }
 $type = "<i>неизвестно</i>";
 $napr = "<i>неизвестно</i>";
 $disc = "<i>неизвестно</i>";
 $status = "<i>неизвестно</i>";
 if ($order["status_id"]) {
     $status = get_status_name($order["status_id"]);
 }
 if ($order['type_id']) {
     $type = get_worktype_name($order['type_id']);
 } else {
     $type = $order['type_user'];
 }
 if ($order["napr_id"]) {
     $napr = get_naprav_name($order["napr_id"]);
 }
 if ($order['disc_id']) {
     $disc = get_discipline_name($order['disc_id']);
 } else {
     $disc = $order['disc_user'];
 }
 $cost = $order["cost_kln"];
 if ($cost == 0) {
     $cost = "оценка";
 }