本文整理汇总了PHP中ST::linkToVksPage方法的典型用法代码示例。如果您正苦于以下问题:PHP ST::linkToVksPage方法的具体用法?PHP ST::linkToVksPage怎么用?PHP ST::linkToVksPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ST
的用法示例。
在下文中一共展示了ST::linkToVksPage方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendDeleteMail
public function sendDeleteMail($vks, $toRequester = true)
{
$vks->link = ST::linkToVksPage($vks->id, false, true);
$vksArray = $vks->toArray();
$message = App::$instance->twig->render('mails/v2/vks-delete.twig', array('vks' => $vksArray, 'http_path' => HTTP_BASE_PATH, 'appHttpPath' => NODE_HTTP_PATH));
if (!$toRequester) {
Mail::sendMailToStack($vks->owner->email, "Ваша ВКС #{$vks['id']} аннулирована", $message);
} else {
Mail::sendMailToStack(App::$instance->user->email, "ВКС #{$vks['id']} аннулирована", $message);
}
App::$instance->log->logWrite(LOG_MAIL_SENDED, "VKS WS #{$vks['id']} аннулирована");
}
示例2: foreach
?>
<table class="table table-bordered">
<th>#ВКС</th>
<th>Название</th>
<th>Дата\время</th>
<th>Точка</th>
<th>Статус</th>
<th>Создано</th>
<?php
$c = 1;
foreach ($calls as $call) {
?>
<tr>
<td><?php
echo ST::linkToVksPage($call->vks->id, true);
?>
</td>
<td><?php
echo $call->vks->title;
?>
</td>
<td>
<?php
echo date_create($call->vks->date)->format("d.m.Y");
?>
,
<?php
echo date_create($call->vks->start_date_time)->format("H:i");
?>
- <?php
示例3:
<?php
include_once CORE_REPOSITORY_REAL_PATH . "views/main.php";
?>
<div class="col-lg-12">
<h4>Запросы на техническую поддержку ВКС <?php
echo ST::linkToVksPage($vks->id, true);
?>
<span class="pull-right">
<!-- --><?php
if ($vks->is_applyable) {
?>
<a href="<?php
echo ST::route('TechSupport/addRequest/' . $vks->id);
?>
" class="modalled btn btn-success">Создать
запрос</a>
<?php
}
?>
</span>
</h4>
<hr>
<?php
include_once CORE_REPOSITORY_REAL_PATH . "views/techsupport/tpl/_call_table.php";
?>
</div>
示例4:
href="<?php
echo ST::route('Vks/reSubmitFromResults/' . $reportNum);
?>
"
class="like-href">исправить ошибки и отправить заявку еще раз</a>
</h5>
</td>
</tr>
<?php
} else {
?>
<tr>
<td>#id созданной ВКС</td>
<td>
<?php
echo ST::linkToVksPage($report->getObject()->id, true);
?>
</td>
</tr>
<tr class=" alert-info alert">
<td colspan="2">
<h5>
<span class="glyphicon glyphicon-info-sign"></span>
<?php
if ($report->getObject()->status == VKS_STATUS_PENDING) {
?>
Ожидайте согласования администратором. Результат согласования и код подключения
будет
направлены на вашу электронную почту: <?php
echo App::$instance->user->email;
?>
示例5: isset
<?php
echo ST::linkToCaNsVksPage($vks->id, 0, 0, ['label label-info label-as-badge']);
?>
<?php
if (!$vks->tbVks) {
?>
- [Связи с нашими ВКС не найдены]
<?php
} else {
?>
- <a class="show-as-modal" data-type='local' data-id="<?php
echo $vks->tbVks->id;
?>
" href="<?php
echo ST::linkToVksPage($vks->tbVks->id, 0, 1);
?>
">
<span class="label label-success label-as-badge">#<?php
echo $vks->tbVks->id;
?>
</span>
</a>
<?php
}
?>
<?php
echo isset($vks->tbVks->id) ? $vks->tbVks->start_date_time->format('H:i') : '';
?>
-
示例6: apiGetCodesInUse
public function apiGetCodesInUse()
{
//post data get
$start_date = $this->request->request->get("start_date");
$end_date = $this->request->request->get("end_date");
if (!$start_date || !$end_date) {
return print new Response('params has wrong names', Response::HTTP_FAILED_DEPENDENCY);
}
try {
$start = date_create($start_date)->format("Y-m-d H:i");
$end = date_create($end_date)->format("Y-m-d H:i");
} catch (Exception $e) {
return print new Response('params can\'t be converted to dates', Response::HTTP_CONFLICT);
}
if (date_create($start_date) > date_create($end_date)) {
return print new Response('start bigger than end', Response::HTTP_FAILED_DEPENDENCY);
}
$sc = new Settings_controller();
$connCtrl = new ConnectionCode_controller();
$codesLoadSet = [];
foreach ($sc->getCodesPostfixSet() as $postfixCode) {
$vksSearch = $connCtrl->isCodeInUse($postfixCode, $start, $end, true);
$codesLoadSet[] = array('code' => $postfixCode, 'usage' => isset($vksSearch->id) ? ST::linkToVksPage($vksSearch->id, true) : false);
}
print json_encode($codesLoadSet, JSON_PRETTY_PRINT);
}
示例7: foreach
<?php
foreach ($vksList as $vks) {
?>
<tr class="<?php
if ($vks['status'] == VKS_STATUS_PENDING) {
echo 'well';
} else {
if (!in_array($vks['status'], [VKS_STATUS_PENDING, VKS_STATUS_APPROVED])) {
echo 'alert alert-danger disabled';
}
}
?>
">
<td><?php
echo ST::linkToVksPage($vks['id'], true);
?>
</td>
<td class="">
<?php
echo $vks->humanized->status_label;
?>
</td>
<td><?php
echo @$vks['humanized']->date;
?>
</td>
<td><?php
echo @$vks['humanized']->startTime;
?>
- <?php
示例8: foreach
<td>
<ol>
<?php
if (count($vkses)) {
?>
<?php
foreach ($vkses as $vks) {
?>
<li class="list-group-item"><a class='show-as-modal' data-type='local'
data-id='<?php
echo $vks->id;
?>
'
href=" <?php
echo ST::linkToVksPage($vks->id, 1, 1);
?>
"> <span
class="label label-success label-as-badge">#<?php
echo $vks->id;
?>
</span></a>
(<?php
echo date_create($vks->start_date_time)->format('H:i');
?>
-
<?php
echo date_create($vks->end_date_time)->format('H:i');
?>
) <?php
echo $vks->title;
示例9: sendIcalEvent
static function sendIcalEvent($vks, $method = 0, $requested_user)
{
$methods = array(0 => 'REQUEST', 1 => 'REQUEST', 2 => 'CANCEL');
//Create Email Headers
$mime_boundary = "----Meeting Booking----" . MD5(TIME());
$headers = "From: Vks_robot<" . self::ADDRESS . ">\n";
$headers .= "Reply-To: Vks_robot <" . self::ADDRESS . ">\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/alternative; boundary=\"{$mime_boundary}\"\n";
$headers .= "Content-class: urn:content-classes:calendarmessage\n";
//Create Email Body (HTML)
$message = "--{$mime_boundary}\r\n";
$message .= "Content-Type: text/html; charset=UTF-8\n";
$message .= "Content-Transfer-Encoding: 8bit\n\n";
$message .= "<html>\n";
$message .= "<body>\n";
$message .= '<p>ВКС #' . $vks->id . '</p>';
$message .= '<p>Тема: ' . $vks->title . '</p>';
$message .= '<p>Дата/Время: ' . $vks->humanized->date . ', ' . $vks->humanized->startTime . '-' . $vks->humanized->endTime . '</p>';
$message .= '<p>Код подключения: ';
if ($vks->connection_codes && $method != OutlookCalendarRequest::REQUEST_TYPE_DELETE) {
$message .= '<ul>';
foreach ($vks->connection_codes as $code) {
if ($vks->owner && $requested_user->id == $vks->owner->id) {
$message .= '<li>' . $code->value_raw . '<sup>' . $code->tip . '</sup></li>';
} else {
$message .= '<li>' . $code->value . '<sup>' . $code->tip . '</sup></li>';
}
}
$message .= '</ul>';
} else {
$message .= 'Код не выдан или не требуется';
}
$message .= '</p>';
if ($vks->owner) {
$message .= '<p>Владелец ВКС: ' . $vks->owner->login;
if ($vks->owner->fio) {
$message .= '(' . $vks->owner->fio . ', ' . $vks->owner->phone . ')';
}
$message .= '</p>';
}
$message .= '<p>Ссылка на ВКС в Планировщике: ' . ST::linkToVksPage($vks->id) . '</p>';
$message .= "</body>\n";
$message .= "</html>\n";
$message .= "--{$mime_boundary}\r\n";
$behalfof = $vks->owner ? $vks->owner->fio : '';
$ical = 'BEGIN:VCALENDAR' . "\r\n" . 'PRODID:-//Microsoft Corporation//Outlook 10.0 MIMEDIR//EN' . "\r\n" . 'VERSION:2.0' . "\r\n" . 'METHOD:' . $methods[$method] . "\r\n" . 'BEGIN:VEVENT' . "\r\n" . 'ORGANIZER;CN="Vks_robot_on_behalf_of ' . $behalfof . '":MAILTO:' . self::ADDRESS . "\r\n" . 'ATTENDEE;CN="' . $requested_user->fio . '";ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:' . $requested_user->email . "\r\n" . 'LAST-MODIFIED:' . date("Ymd\\TGis") . "\r\n" . 'UID:' . md5($vks->id . App::$instance->main->appkey) . "\r\n" . 'DTSTAMP:' . date("Ymd\\TGis") . "\r\n" . 'DTSTART:' . date("Ymd\\THis", $vks->start_date_time->getTimestamp()) . "\r\n" . 'DTEND:' . date("Ymd\\THis", $vks->end_date_time->getTimestamp()) . "\r\n" . 'TRANSP:OPAQUE' . "\r\n" . 'SEQUENCE:' . date_create()->getTimestamp() . "\r\n" . 'SUMMARY:' . $vks->title . "\r\n" . 'CLASS:PUBLIC' . "\r\n" . 'PRIORITY:5' . "\r\n" . 'BEGIN:VALARM' . "\r\n" . 'TRIGGER:-PT15M' . "\r\n" . 'ACTION:DISPLAY' . "\r\n" . 'DESCRIPTION:Reminder' . "\r\n" . 'END:VALARM' . "\r\n" . 'END:VEVENT' . "\r\n" . 'END:VCALENDAR' . "\r\n";
if ($method == OutlookCalendarRequest::REQUEST_TYPE_DELETE) {
$ical .= 'STATUS:CANCELLED' . "\r\n";
}
$message .= 'Content-Type: text/calendar;name="meeting.ics";method=REQUEST' . "\n";
$message .= "Content-Transfer-Encoding: 8bit\n\n";
$message .= $ical;
switch ($method) {
case 0:
$title = 'Приглашение на ВКС #' . $vks->id . ', ' . $vks->title;
break;
case 1:
$title = 'изменение в ВКС #' . $vks->id . ', ' . $vks->title;
break;
case 2:
$title = 'аннулирована ВКС #' . $vks->id . ', ' . $vks->title;
break;
}
$mailsent = mail($requested_user->email, $title, $message, $headers);
return $mailsent ? true : false;
}
示例10: array_merge
}
}
}
$events = array_merge($events, $CaEvents);
//dump($events);
if (count($events)) {
foreach ($events as $event) {
if ($event['start_date_time']->getTimestamp() - $now->getTimestamp() <= 1200) {
if (isset($event['fromCa'])) {
NoticeObs_controller::put("Внимание! до начала важной ВКС в ЦА " . ST::linkToCaVksPage($event['id']) . " осталось менее 20 минут, старт в " . date_create($event['start_date_time'])->format("H:i"), 1);
} else {
$text = '';
if ($event['flag']) {
$text .= 'важной';
}
if ($event['record_required']) {
if (strlen($text) > 0) {
$text .= ', ';
}
$text .= ' требующей видеозаписи ';
}
NoticeObs_controller::put("Внимание! до начала {$text} ВКС " . ST::linkToVksPage($event['id']) . " осталось менее 20 минут, старт в " . $event['start_date_time']->format("H:i"), 1);
}
//
}
}
}
}
//find Vks with flag and start in 20 mins today
//end schedule here
//-----------------------------------------------------------------------------
示例11: apiGetPointBusyAt
public function apiGetPointBusyAt($render = false)
{
$result = [];
$cid = $this->request->request->has("id") ? $this->request->request->get("id") : 1;
$except = $this->request->request->has("except") ? $this->request->request->get("except") : [];
$dateTimeforCheck = $this->request->request->has("dateTimeforCheck") ? $this->request->request->get("dateTimeforCheck") : [];
$point = Attendance::where('id', $cid)->where('active', 1)->first();
// dump($dateTimeforCheck);
if ($point) {
if ($point->check) {
if (count($dateTimeforCheck)) {
foreach ($dateTimeforCheck as $dateTimeArr) {
$start = date_create($dateTimeArr['date'] . " " . $dateTimeArr['start_time']);
$end = date_create($dateTimeArr['date'] . " " . $dateTimeArr['end_time']);
// dump($point->id, $start, $end);
$result[] = $this->busyAt($point->id, $start, $end, $except);
}
}
}
}
if ($render) {
$resp['html'] = "<div><h3>Вкс в которых участвует <b>{$point->name}</b></h3><ul>";
$vc = new Vks_controller();
foreach ($result as $resset) {
foreach ($resset as $vks) {
$vc->humanize($vks);
$resp['html'] .= "<li>" . ST::linkToVksPage($vks->id, true) . " {$vks->title} <br>{$vks->humanized->date} c {$vks->humanized->startTime} до {$vks->humanized->endTime}</li>";
}
}
$resp['html'] .= '</ul></div>';
// print $resp['html'];
print json_encode($resp['html']);
} else {
print json_encode($result);
}
}
示例12: joinCaStore
public function joinCaStore($referral)
{
$request = $this->request->request;
$this->fillParticipants("vks_participants_create", $this->request);
$report = new VksReport($request);
$this->validator->validate(['ФИО ответственного' => [$request->get('init_customer_fio'), 'required|max(255)'], 'Почта ответственного' => [$request->get('init_customer_mail'), 'required|max(255)'], 'Тел. ответственного' => [$request->get('init_customer_phone'), 'required|max(255)'], 'Подразделение' => [$request->get('department'), 'required|int'], 'Кол-во участников с рабочих мест (IP телефоны)' => [$request->get('in_place_participants_count'), 'int'], 'Участники ВКС' => [$request->get('inner_participants'), 'array'], 'Точка для технической поддержки' => [$request->get('tech_support_att_id'), "int|attendance_is_tech_supportable"], 'Комментарий для Тех. поддержки' => [$request->get('user_message'), 'max(255)'], 'Комментарий для Администратора' => [$request->get('comment_for_admin'), 'max(255)']]);
//if no passes
if (!$this->validator->passes()) {
$this->backWithData($this->validator->errors()->all());
}
//any participants required
if (!intval($request->get('in_place_participants_count')) && !count($request->get('inner_participants'))) {
$this->backWithData('Вы не выбрали участников для ВКС');
}
Capsule::beginTransaction();
$caWS = CAVks::where('referral', $referral)->with('connection_codes')->first();
$caNS = CAVksNoSupport::where('referral', $referral)->first();
if (!$caWS && !$caNS) {
$this->backWithData("Приглашение {$request->get('referrer')} не действительно");
}
$caVKSType = $caWS ? VKS_WAS : VKS_NS;
$caVks = $caWS ? $caWS : $caNS;
$this->convertToLocalTime($caVks);
$vks = new Vks();
$vks->is_private = $request->has('is_private') ? 1 : 0;
$vks->record_required = $request->has('record_required') ? 1 : 0;
$vks->title = $caVks->title;
$vks->date = $caVks->local->start_date_time->format("Y-m-d");
$vks->start_date_time = $caVks->local->start_date_time;
$vks->end_date_time = $caVks->local->end_date_time;
$vks->presentation = isset($caVks->presentation) ? $caVks->presentation : 0;
$vks->department = $request->get('department');
$vks->initiator = 1;
//always CA
$vks->init_customer_fio = $request->get('init_customer_fio');
$vks->init_customer_phone = $request->get('init_customer_phone');
$vks->init_customer_mail = $request->get('init_customer_mail');
$vks->comment_for_admin = $request->get('comment_for_admin');
$vks->link_ca_vks_id = $caVks->id;
$vks->link_ca_vks_type = $caVKSType;
$vks->owner_id = App::$instance->user->id;
$vks->from_ip = App::$instance->user->ip;
$vks->ca_code = isset($caVks->connectionCode->value) ? $caVks->connectionCode->value : $caVks->v_room_num;
$vks->in_place_participants_count = $request->get('in_place_participants_count');
// die(dump($vks));
$vks->save();
if ($request->get('tech_support_required')) {
TechSupportRequest::create(array('att_id' => $request->get('tech_support_att_id'), 'vks_id' => $vks->id, 'owner_id' => App::$instance->user->id, 'user_message' => $request->get('user_message'), 'status' => TechSupportRequest::STATUS_WAIT_VKS_DECISION));
}
if (!Auth::isAdmin(App::$instance)) {
if (self::isVksInPastTime($vks)) {
throw new LogicException('bad vks date, it on past time');
}
}
//create participants
$this->createInnerOrPhoneParp($request->get('inner_participants'), $vks);
App::$instance->log->logWrite(LOG_VKSWS_CREATED, "VKS " . ST::linkToVksPage($vks->id) . " Created");
Capsule::commit();
//refill for report
$this->request->request->set("date", $vks->date->format("d.m.Y"));
$this->request->request->set("start_time", $vks->start_date_time->format("H:i"));
$this->request->request->set("end_time", $vks->end_date_time->format("H:i"));
$report->setObject($vks);
$report->setResult(true);
$result[] = $report;
$_SESSION['savedResult_' . App::$instance->main->appkey] = $result;
ST::redirectToRoute('vks/checkout');
}
示例13: foreach
<p class="alert alert-danger">Эта ВКС в стеке (создана за один раз) со следующими ВКС</p>
<div class="well">
<table class="table table-bordered">
<th>id</th>
<th>Статус</th>
<th>Дата/время</th>
<th>Коды</th>
<?php
foreach ($vks->stack->vkses as $stackVks) {
?>
<?php
if ($stackVks->id != $vks->id) {
?>
<tr>
<td><?php
echo ST::linkToVksPage($stackVks->id, true);
?>
</td>
<td><?php
echo $stackVks->humanized->status_label;
?>
</td>
<td><?php
echo $stackVks->humanized->date;
?>
, <?php
echo $stackVks->humanized->startTime;
?>
- <?php
echo $stackVks->humanized->endTime;
?>