/** * Инициализация тизера. * * @global array $js_file * * @param array $options [kind, uid] */ public function init($options = array()) { global $js_file; $js_file[] = 'tservices/tservices_binds.js'; if ($options) { $this->kind = (int) $options['kind']; $this->uid = (int) $options['uid']; } $time_to = time() + 7 * 86400; $use_bind_popup = false; $tu_bind_teaser = array('date' => date('j', $time_to) . ' ' . monthtostr(date('n', $time_to), true), 'href' => 'javascript:void(0);'); $tservices_binds = new tservices_binds($this->kind); $tservices_class = new tservices($this->uid); $profs = array(); if ($this->kind == tservices_binds::KIND_SPEC) { $profs[] = $this->prof_id; } elseif ($this->kind == tservices_binds::KIND_GROUP) { $tservices_categories = new tservices_categories(); $categories = $tservices_categories->getCategoriesByParent($this->prof_id); foreach ($categories as $category) { $profs[] = $category['id']; } } if ($countBindedTu = $tservices_binds->countBindedTu($this->uid, (int) $this->prof_id)) { $binded_text = ending($countBindedTu, 'ваша услуга', 'ваши услуги', 'ваших услуг'); $tu_bind_teaser['subtitle'] = $countBindedTu . ' ' . $binded_text . ' уже <br>закреплен' . ($countBindedTu > 1 ? 'ы' : 'а') . ' в этом разделе'; if ($tservices_class->hasUnbindedTservices($this->kind, $this->uid, $profs)) { $use_bind_popup = true; $tu_bind_teaser['title'] = 'Закрепите еще одну услугу'; $tu_bind_teaser['btn_text'] = 'Закрепить'; } else { $tu_bind_teaser['title'] = 'Добавьте еще одну услугу<br>и закрепите ее здесь'; $tu_bind_teaser['href'] = '/users/' . $_SESSION['login'] . '/tu/new/'; $tu_bind_teaser['btn_text'] = 'Добавить'; } } else { if ($tservices_class->hasUserTservice(true, $profs)) { $use_bind_popup = true; $tu_bind_teaser['title'] = 'Закрепите здесь услугу'; $tu_bind_teaser['btn_text'] = 'Закрепить'; } else { $tu_bind_teaser['title'] = 'Добавьте свою услугу<br>и закрепите ее здесь'; $tu_bind_teaser['href'] = '/users/' . $_SESSION['login'] . '/tu/new/'; $tu_bind_teaser['btn_text'] = 'Добавить'; } } if ($use_bind_popup) { quickPaymentPopupTservicebind::getInstance()->init(array('uid' => $this->uid, 'kind' => $this->kind, 'prof_id' => $this->prof_id)); $tu_bind_teaser['popup_id'] = quickPaymentPopupTservicebind::getInstance()->getPopupId(0); $tu_bind_teaser['popup'] = quickPaymentPopupTservicebind::getInstance()->render(); } $this->data = $tu_bind_teaser; $this->data['price'] = $tservices_binds->getPrice(false, $this->uid, $this->prof_id); $this->data['main_div_class'] = $this->kind == tservices_binds::KIND_LANDING ? 'b-layout__tu-cols b-layout__tu-cols_height_330' : 'i-pic i-pic_port i-pic_width_225 i-pic_margbot_30'; }
/** * Инициализация тизера. * * @global array $js_file * * @param array $options [kind, uid] */ public function init($options = array()) { if ($options) { $this->kind = (int) $options['kind']; $this->uid = (int) $options['uid']; } $this->data = array(); $tservices_binds = new tservices_binds($this->kind); $this->data['bind_up_price'] = $tservices_binds->getPrice(true, $this->uid); $this->data['date_stop'] = dateFormat('j', $this->date_stop) . ' ' . monthtostr(dateFormat('m', $this->date_stop), true); $this->data['allow_up'] = $this->allow_up; $this->data['tservice_id'] = $this->tservice_id; }
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/stdf.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/num_to_word.php'; //require_once($_SERVER['DOCUMENT_ROOT'] . '/classes/odt2pdf.php'); require_once 'ActOdt2Pdf.php'; if (!empty($issues)) { $total_hours = isset($_GET['h']) ? intval($_GET['h']) : DEFAULT_TOTAL_HOURS; $per_hour = isset($_GET['p']) ? intval($_GET['p']) : DEFAULT_PER_HOUR; $total_price = $per_hour * $total_hours; $total_price_format = number_format($total_price, 2, ',', ''); $total_price_parts = explode(',', $total_price_format); $act_date = '«' . date('j', $date_to_time) . '» ' . monthtostr(date('n', $date_to_time), true) . ' ' . date('Y', $date_to_time); $affix_date_time = $date_from_time; //strtotime('+ 1 day', $date_to_time); $affix_date = '«' . date('j', $affix_date_time) . '» ' . monthtostr(date('n', $affix_date_time), true) . ' ' . date('Y', $affix_date_time); $date_dog_time = strtotime(DATE_DOG); $date_dog = date('j', $date_dog_time) . ' ' . monthtostr(date('n', $date_dog_time), true) . ' ' . date('Y', $date_dog_time); //Подстановка для акта $act_val = array('$date_dog' => $date_dog, '$date_dog2' => DATE_DOG, '$worker_addr' => WORKER_ADDR_TXT, '$worker_fio' => WORKER_FIO_TXT, '$worker_bank' => WORKER_BANK_TXT, '$worker_sign' => WORKER_SIGN_TXT, '$num' => ACT_NUM, '$act_date' => $act_date, '$affix_num' => AFX_NUM, '$date_from' => $date_from, '$date_to' => $date_to, '$per_hour' => $per_hour . ' руб. 00 коп', '$total_hours' => $total_hours, '$total_price' => $total_price_format, '$total_price2' => $total_price_parts[0], '$total_price3' => $total_price_parts[1], '$total_price_txt' => trim(str_replace(array('рублей', 'рубля', ' Российской Федерации', '00 копеек'), array('', '', '', ''), num2str($total_price_parts[0])))); //Подстановка для приложения $act_affix = array('$num' => AFX_NUM, '$date_dog' => $date_dog, '$date_from' => $date_from, '$date_to' => $date_to, '$act_date' => $affix_date, '$worker_addr' => WORKER_ADDR_TXT, '$worker_fio' => WORKER_FIO_TXT, '$worker_bank' => WORKER_BANK_TXT, '$worker_sign' => WORKER_SIGN_TXT, '$services' => ''); $cnt = count($issues); $h = $total_hours / $cnt; $ah = round($h); $lh = $total_hours - $ah * ($cnt - 1); foreach ($issues as $key => $issue) { $idx = $key + 1; $summary = iconv('UTF-8', 'WINDOWS-1251', $issue->summary); $act_val['$service' . $idx] = "#{$issue->id} {$summary}"; $act_affix['$services'] .= $act_val['$service' . $idx] . ($idx < $cnt ? PHP_EOL . PHP_EOL : ''); $hours = $key < $cnt - 1 ? $ah : $lh; $act_val['$hours' . $idx] = $hours;
if ($pn > $pj + 1) { ?> <div style="height:1px; background:#d7d7d7; width:920px; margin:5px 0;"></div><?php } } else { ?> <table cellpadding="4" cellspacing="0" border="0"><tr valign="top"><td style="padding-left: 10px;" width="510px"> <div class="fl2_date"> <div class="fl2_date_day"> <?php echo str_ago_pub(strtotimeEx($prj['post_date'])); ?> </div> <div class="fl2_date_date"> <?php echo strftime("%d ", strtotimeEx($prj['post_date'])) . monthtostr(strftime("%m", strtotimeEx($prj['post_date']))) . strftime(", %A", strtotimeEx($prj['post_date'])); ?> </div> <div class="clear"></div> </div> <div class="fl2_offer"><?php if ($prj['cost']) { ?> <div class="fl2_offer_budget">Бюджет: <?php echo CurToChar($prj['cost'], $prj['currency']); ?> </div><?php } ?> <div class="fl2_offer_header"> <?php if ($prj['ico_closed'] == 't') {
</div> <?php } ?> <?php if ($stage->status == sbr_stages::STATUS_COMPLETED && !$stage->data['frl_feedback_id'] && $stage->sbr->scheme_type == sbr::SCHEME_LC) { // $completed_time -- время завершения сделки берется из файла tpl.stage-history-event.php -- чтобы лишний раз не выбирать его $cdate = new LocalDateTime($completed_time); $cdate->getWorkForDay(pskb::PERIOD_FRL_EXEC); $pskb_created = $cdate->getTimestamp(); $overtime_completed = strtotime($completed_time . ' + ' . pskb::PERIOD_FRL_EXEC . 'day'); ?> <div class="b-fon b-fon_width_full"> <div class="b-fon__body b-fon__body_pad_10 b-fon__body_padleft_30 b-fon__body_fontsize_13 b-fon__body_bg_f0ffdf"> <span class="b-icon b-icon_sbr_gattent b-icon_margleft_-20"></span> Чтобы получить заработанные деньги, вам необходимо нажать кнопку «Завершить этап» до <?php echo date('d', $overtime_completed); ?> <?php echo monthtostr(date('n', $overtime_completed), true); ?> <?php echo date('Y', $overtime_completed); ?> . </div> </div> <?php } //if
<TD><BR>40702810787880000803</TD></TR> <TR> <TD rowSpan=2>Банк получателя<BR>в Московский филиал ОАО АКБ «РОСБАНК» г. Москва </TD> <TD align=middle>БИК</TD> <TD rowSpan=2>044583272<BR>30101810000000000272</TD></TR> <TR> <TD align=middle>Сч. №</TD></TR></TBODY></TABLE><BR xmlns:str="http://exslt.org/strings" xmlns:math="http://exslt.org/math"><BR xmlns:str="http://exslt.org/strings" xmlns:math="http://exslt.org/math"> <DIV style="FONT-SIZE: 12pt" align=center xmlns:str="http://exslt.org/strings" xmlns:math="http://exslt.org/math"><B>СЧЕТ № <?php echo $billCode; ?> от <?php echo date("d ", strtotime($reqv->op_date)) . strtolower(monthtostr(date("m", strtotime($reqv->op_date)))) . date(" Y г.", strtotime($reqv->op_date)); ?> </B></DIV><BR xmlns:str="http://exslt.org/strings" xmlns:math="http://exslt.org/math"> <TABLE width="90%" border=0 xmlns:str="http://exslt.org/strings" xmlns:math="http://exslt.org/math"> <TBODY> <TR> <TD width="50%"> <DIV style="FONT-SIZE: 10pt">Заказчик: <?php echo reformat($reqv->full_name, 28); ?> </DIV></TD> <TD width="50%"> <DIV style="FONT-SIZE: 10pt">Телефоны: <?php echo $reqv->phone;
?> <div class="b-post__txt b-post__txt_padbot_5 b-post__txt_color_a0763b">Сожалеем, что пришлось обращаться в арбитраж. Надеемся, следующая ваша сделка будет удачнее.</div> <?php if ($sbr->isEmp() && $event['estatus'] != 't') { $update_event[$event['abbr']] = $event['abbr']; } break; case 'sbr_stages.OVERTIME': // $cdate = new LocalDateTime($event['xtime']); // $cdate->getWorkForDay(pskb::PERIOD_EXP); // $overtime = strtotime($event['xtime'] . " + " . $cdate->getCountDays(). "day"); $overtime = strtotime("-2 day", strtotime($sbr->data['dateEndLC'])); while (date('w', $overtime) == 0 || date('w', $overtime) == 6) { $overtime = strtotime("-1 day", $overtime); } $str_overtime = date('d', $overtime) . " " . monthtostr(date('n', $overtime), true) . " " . date('Y', $overtime); if ($sbr->isEmp()) { ?> <div class="b-post__txt b-post__txt_padbot_5 b-post__txt_padleft_10 b-post__txt_indent_-10 b-post__txt_color_a0763b">• Если вы довольны выполненной работой, примите ее, нажав «Принять работу» наверху страницы.</div> <div class="b-post__txt b-post__txt_padbot_5 b-post__txt_padleft_10 b-post__txt_indent_-10 b-post__txt_color_a0763b">• Если исполнитель еще не закончил, добавьте время на работу.</div> <?php if (time() <= $overtime) { ?> <div class="b-post__txt b-post__txt_padbot_5 b-post__txt_padleft_10 b-post__txt_indent_-10 b-post__txt_color_a0763b">• Если вы не довольны работой с исполнителем и нет возможности увеличить время на работу, <a class="b-layout__link" href="javascript:void(0)" onclick="toggle_arb();" >обратитесь в арбитраж</a>.</div> <?php } //if ?> <div class="b-post__txt b-post__txt_padbot_5 b-post__txt_padleft_10 b-post__txt_indent_-10 b-post__txt_color_a0763b">Если до <?php echo $str_overtime; ?>
function getStrOvertimeArbitrage() { if (!$this->arbitrage) { return false; } return date('d', $this->arbitrage['overtime_arbitrage']) . ' ' . monthtostr(date('n', $this->arbitrage['overtime_arbitrage']), true) . ' ' . date('Y', $this->arbitrage['overtime_arbitrage']); }
public function datereqv(ReservesModel $reserveInstance) { $time = $reserveInstance->getLastCompleteDate(true); return date('j', $time) . ' ' . monthtostr(date('n', $time), true) . ' ' . date('Y', $time); }
</div> </div> <?php } elseif ($sbr->status == sbr::STATUS_PROCESS && !$sbr->data['reserved_id'] && $sbr->state == 'new') { $cdate = new LocalDateTime($sbr->pskb_created); $cdate->getWorkForDay(pskb::PERIOD_RESERVED); $pskb_created = $cdate->getTimestamp(); ?> <div class="b-fon b-fon_width_full"> <div class="b-fon__body b-fon__body_pad_10 b-fon__body_padleft_30 b-fon__body_fontsize_13 b-fon__body_bg_f0ffdf"> <span class="b-icon b-icon_sbr_gattent b-icon_margleft_-20"></span> Вам необходимо зарезервировать деньги на сделку до <?php echo date('d', $pskb_created); ?> <?php echo monthtostr(date('n', $pskb_created), true); ?> <?php echo date('Y', $pskb_created); ?> . В противном случае сделка будет отменена (согласно пунктам 4.3 и 15.8 <a class="b-layout__link" href="<?php echo $sbr->getDocumentLink('contract'); ?> ">Договора</a>). </div> </div> <?php } //elseif ?>
<?php } } else { ?> <tr style="vertical-align:top"><td style="padding-left: 10px; padding-right: 10px;"> <div class="fl2_date"> <div class="fl2_date_day"> <?php echo str_ago_pub(strtotimeEx($row['create_date'])); ?> </div> <div class="fl2_date_date"> <?php echo strftime("%d ", strtotimeEx($row['create_date'])) . monthtostr(strftime("%m", strtotimeEx($row['create_date']))) . ", " . $daysOfWeek[date("N", strtotimeEx($row['create_date']))]; ?> </div> <div class="clear"></div> </div> <div class="fl2_offer"> <?php if ($row['logo_name']) { ?> <div class="fl2_offer_logo"> <a href="http://<?php echo formatLink($row['link']); ?> " target="_blank" nofollow ><img src="<?php echo WDCPREFIX . '/' . $row['logo_path'] . $row['logo_name']; ?>
<div class="norisk-admin c"> <div class="norisk-in"> <form action="." method="get" id="adminFrm"> <div> <h1 class="b-layout__title"><?php echo date('j') . ' ' . monthtostr(date('m'), true) . ' ' . date('H:i'); ?> </h1> <table class="nr-a-tbl nr-a-tbl_adm" cellspacing="5" style="table-layout:fixed"> <colgroup> <col style="width:40px"> <col style="width:90px"> <col> <col style="width:150px"> <col style="width:110px"> <col style="width:80px"> <col style="width:130px"> </colgroup> <thead> <tr> <th><a href="javascript:SBR.changeFormDir(0,'DESC')"><img width="11" height="11" alt="v" src="/images/arrow-bottom<?php echo $dir_col == 0 && $dir == 'DESC' ? '-a' : ''; ?> .png"></a> <a href="javascript:SBR.changeFormDir(0,'ASC')"><img width="11" height="11" alt="v" src="/images/arrow-top<?php echo $dir_col == 0 && $dir == 'ASC' ? '-a' : ''; ?> .png"></a> </th> <th> Договор <a href="javascript:SBR.changeFormDir(1,'DESC')"><img width="11" height="11" alt="v" src="/images/arrow-bottom<?php echo $dir_col == 1 && $dir == 'DESC' ? '-a' : ''; ?>
/** * Вывод даты для проектов * * @param type $from_date * @return type */ function ago_project_created($from_date) { // Менее суток назад if ($from_date > strtotime('-1day')) { return ago_pub_x($from_date, "ynjGi", 0, true); } else { if ($from_date > strtotime('-6month')) { // меннее полугода назад return date('j', $from_date) . ' ' . monthtostr(date('n', $from_date), true) . ", " . date('H:i', $from_date); } else { //более полугода назад. return date('j', $from_date) . ' ' . monthtostr(date('n', $from_date), true) . " " . date('Y, H:i', $from_date); } } }
<TD><BR>40702810787880000803</TD></TR> <TR> <TD rowSpan=2>Банк получателя<BR>в Московский филиал ОАО АКБ «РОСБАНК» г. Москва </TD> <TD align=middle>БИК</TD> <TD rowSpan=2>044583272<BR>30101810000000000272</TD></TR> <TR> <TD align=middle>Сч. №</TD></TR></TBODY></TABLE><BR xmlns:str="http://exslt.org/strings"><BR xmlns:str="http://exslt.org/strings"> <DIV style="FONT-SIZE: 12pt" align=center xmlns:str="http://exslt.org/strings"><B>Счет № <?php echo $billCode; ?> от <?php echo date("d ") . strtolower(monthtostr(date("m"))) . date(" Y г."); ?> </B></DIV><BR xmlns:str="http://exslt.org/strings"> <TABLE width="100%" border=0 xmlns:str="http://exslt.org/strings"> <TBODY> <TR> <TD width="50%"> <DIV style="FONT-SIZE: 10pt">Заказчик: <?php echo reformat($reqv->full_name, 28); ?> </DIV></TD> <TD width="50%"> <DIV style="FONT-SIZE: 10pt">Телефоны: <?php echo $reqv->phone; ?> </DIV></TD></TR>
<TD><BR>40702810787880000803</TD></TR> <TR> <TD rowSpan=2>Банк получателя<BR>в Московский филиал ОАО АКБ «РОСБАНК» г. Москва </TD> <TD align=middle>БИК</TD> <TD rowSpan=2>044583272<BR>30101810000000000272</TD></TR> <TR> <TD align=middle>Сч. №</TD></TR></TBODY></TABLE><BR xmlns:str="http://exslt.org/strings"><BR xmlns:str="http://exslt.org/strings"> <DIV style="FONT-SIZE: 12pt" align=center xmlns:str="http://exslt.org/strings"><B>Счет № <?php echo $billCode; ?> от <?php echo date('d ') . strtolower(monthtostr(date('m'))) . date(' Y г.'); ?> </B></DIV><BR xmlns:str="http://exslt.org/strings"> <TABLE width="100%" border=0 xmlns:str="http://exslt.org/strings"> <TBODY> <TR> <TD width="50%"> <DIV style="FONT-SIZE: 10pt">Заказчик: <?php echo reformat($reqv->full_name, 28); ?> </DIV></TD> <TD width="50%"> <DIV style="FONT-SIZE: 10pt">Телефоны: <?php echo $reqv->phone; ?> </DIV></TD></TR>
echo $user->uid; ?> " style="display: <?php echo $user->is_banned || $user->ban_where ? 'block' : 'none'; ?> ;"> <table><tbody> <tr> <th colspan="3"><strong id="banreasonblock-text-<?php echo $user->uid; ?> ">Блокировка <?php echo $ban['where'] ? 'в блогах' : 'везде'; ?> <?php echo $ban['to'] ? 'до ' . dateFormat("j", $ban['to']) . ' ' . monthtostr(dateFormat("n", $ban['to']), true) . ' ' . dateFormat("Y", $ban['to']) : 'навсегда'; ?> </strong></th> </tr> <tr> <td> [<a onclick="banned.userBan(<?php echo $user->uid; ?> , '<?php echo $user->uid; ?> ',0); return false;" href="javascript: void(0);" style="font-weight: bold">X</a>] </td> <td><span class="admn-line" id="banreasonblock-comment-<?php echo $user->uid;
$type_payment = exrates::WEBM; // Если происходит ошибка выплаты деньги всегда идут на веб-кошелек } $current['additional'] = 'На ' . sbr_meta::view_type_payment($type_payment, $type_payment == exrates::CARD ? 'вашу ' : 'ваш ') . ' были переведены ' . sbr_meta::view_cost($stage->getPayoutSum(sbr::FRL, $type_payment), $stage->type_payment == exrates::FM ? $stage->type_payment : $stage->sbr->cost_sys) . ' Зачисление денежных средств произведено ' . date('d.m.Y в H:i', strtotime($stage->data['lc_date'])) . ' согласно пункту 6.7 <a class="b-layout__link" href="' . $sbr->getDocumentLink('contract') . '">Договора</a>.'; } if ($current['abbr'] == 'sbr_stages.STATUS_MODIFIED' && $current['new_val'] == sbr_stages::STATUS_COMPLETED) { $current['abbr'] .= '_OK'; } if ($current['abbr'] == 'sbr_stages.REFUSE' && $current['new_val'] == '') { $current['additional'] = $sbr->isEmp() ? " и предпочел не указывать причину" : " и предпочли не указывать причину"; } if ($current['abbr'] == 'sbr_stages.OVERTIME') { $cdate = new LocalDateTime($current['xtime']); $cdate->getWorkForDay(pskb::PERIOD_EXP); $overtime = strtotime($current['xtime'] . " + " . $cdate->getCountDays() . "day"); $current['additional'] = date('d', $overtime) . " " . monthtostr(date('n', $overtime), true) . " " . date('Y', $overtime); } if ($current['abbr'] == 'sbr.AGREE' && ($sbr->isFrl() || $sbr->isAdmin() || $sbr->isAdminFinance())) { $type_payment = $stage->sbr->scheme_type == sbr::SCHEME_LC ? pskb::$exrates_map[$stage->data['ps_frl']] : $stage->type_payment; if ($stage->data['ps_frl'] == pskb::WW) { $current['additional'] = '. Способ получения гонорара — <a class="b-post__link" href="https://webpay.pscb.ru/login/auth">Веб-кошелек</a> (№ ' . $sbr->data['numPerf'] . ')'; } else { $current['additional'] = ', выбрав вывод ' . sbr_meta::view_type_payment($type_payment, 'на '); } } if ($current['abbr'] == 'sbr.RESERVE' && ($sbr->isEmp() || $sbr->isAdmin() || $sbr->isAdminFinance())) { $type_payment = $stage->sbr->scheme_type == sbr::SCHEME_LC ? pskb::$exrates_map[$stage->sbr->data['ps_emp']] : $stage->sbr->cost_sys; $current['additional'] = ' через ' . sbr_meta::view_type_payment($type_payment); } if ($current['abbr'] == 'sbr_stages.ARB_RESOLVED') { // пункт договора в зависимости от решения арбитража
<TD><BR>40702810787880000803</TD></TR> <TR> <TD rowSpan=2>Банк получателя<BR>в Московский филиал ОАО АКБ «РОСБАНК» г. Москва </TD> <TD align=middle>БИК</TD> <TD rowSpan=2>044583272<BR>30101810000000000272</TD></TR> <TR> <TD align=middle>Сч. №</TD></TR></TBODY></TABLE><BR xmlns:str="http://exslt.org/strings" xmlns:math="http://exslt.org/math"><BR xmlns:str="http://exslt.org/strings" xmlns:math="http://exslt.org/math"> <DIV style="FONT-SIZE: 12pt" align=center xmlns:str="http://exslt.org/strings" xmlns:math="http://exslt.org/math"><B>СЧЕТ № <?php echo $billCode; ?> от <?php echo date('d ', strtotime($reqv->op_date)) . strtolower(monthtostr(date('m', strtotime($reqv->op_date)))) . date(' Y г.', strtotime($reqv->op_date)); ?> </B></DIV><BR xmlns:str="http://exslt.org/strings" xmlns:math="http://exslt.org/math"> <TABLE width="90%" border=0 xmlns:str="http://exslt.org/strings" xmlns:math="http://exslt.org/math"> <TBODY> <TR> <TD width="50%"> <DIV style="FONT-SIZE: 10pt">Заказчик: <?php echo reformat($reqv->full_name, 28); ?> </DIV></TD> <TD width="50%"> <DIV style="FONT-SIZE: 10pt">Телефоны: <?php echo $reqv->phone;
<div class="b-combo__input b-combo__input_width_45 numeric_max_31 numeric_min_1"> <input type="text" id="bday" class="b-combo__input-text b-combo__input-text_fontsize_15" maxlength="2" name="bday" size="80" value="<?php echo $birthday_day; ?> " onfocus="error_clear(this);"> <label class="b-combo__label" for="bday"></label> </div> </div> <div class="b-combo b-combo_inline-block b-combo_margright_5 b-combo_ie7_margright_4"> <div class="b-combo__input b-combo__input_width_125 b-combo__input_arrow_yes b-combo__input_multi_dropdown b-combo__input_init_month drop_down_default_<?php echo $birthday_mon; ?> multi_drop_down_default_column_0 noblur_onenter"> <input type="text" id="bmonth" class="b-combo__input-text b-combo__input-text_fontsize_15" name="bmonth" size="80" value="<?php echo monthtostr($birthday_mon, true); ?> " onchange="tplInfoPhp_onChangeMonth()"> <label class="b-combo__label" for="bmonth"></label> <span class="b-combo__arrow" id="bmonth_arrow"></span> </div> </div> <div class="b-combo b-combo_inline-block" > <div class="b-combo__input b-combo__input_width_60 numeric_max_2010 numeric_min_1945"> <input type="text" id="byear" class="b-combo__input-text b-combo__input-text_fontsize_15" maxlength="4" name="byear" size="80" value="<?php echo $birthday_year; ?> " onfocus="error_clear(this);" onkeyup="tplInfoPhp_onChangeMonth(event, 1)"> <label class="b-combo__label" for="byear"></label> </div> </div>
/** * Изменение бана пользователя * * @param string $sUsers JSON строка с массивом UID пользователей * @param int $nActId * @param string $sReasonTxt причина * @param int $nReasonId ID причины, если она выбрана из списка (таблица admin_reasons) * @param int $nNoSend опционально. установить в 1 если не нужно оповещать юзера о том что он забанен. * @param string $sContext Контекст (для лога админских действий) * @param $sContext * @param bool $noticeSbrPartners уведомить партнеров по сделке о блокировке аккаунта * @return object xajaxResponse */ function updateUserBan($sUsers = '', $nActId, $sReasonTxt = '', $nReasonId = null, $sDateTo = '', $nNoSend = 0, $sContext = '', $noticeSbrPartners = false) { session_start(); $objResponse = new xajaxResponse(); if (hasPermissions('users')) { require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/messages_spam.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/messages.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/sbr_emp.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/sbr_frl.php'; $objUser = new users(); $nReasonId = $nReasonId ? $nReasonId : null; $aContext = _jsonArray($sContext); $aContext = $aContext ? $aContext : array('uid' => '', 'code' => 0, 'link' => '', 'name' => ''); $aUsers = _jsonArray($sUsers); $bCheck = true; if ($aContext['uid'] == 'moder') { global $user_content; $bCheck = $user_content->checkContent($aContext['contentId'], $aContext['streamId'], $aContext['recId']); } if ($bCheck && $aUsers && hasPermissions('users')) { foreach ($aUsers as $sUid) { $objUser->GetUserByUID($sUid); if ($objUser->uid) { $sReason = str_replace('%USERNAME%', $objUser->uname . ' ' . $objUser->usurname, $sReasonTxt); $sReason = change_q($sReason, FALSE, 0, TRUE); $sUniqId = "userban_{$sUid}"; $sObjName = $objUser->uname . ' ' . $objUser->usurname . '[' . $objUser->login . ']'; $sObjLink = '/users/' . $objUser->login; if ($nActId == 1) { // разблокируем if ($objUser->is_banned || $objUser->ban_where) { if ($objUser->is_banned) { $objResponse->script("\$\$('.warnbutton-{$sUid}').setStyle('display','');"); $objResponse->script("\$\$('.warnlist-{$sUid}').set('html','');"); $objResponse->script("\$\$('span[id^=\"warn_{$user->uid}\"]').set('html', '0')"); $objResponse->script("\$\$('div[id^=\"warn_{$user->uid}\"]').set('html', '0')"); } //$objUser->ban_where = 0; $objUser->unsetUserBan($sUid, $objUser->ban_where); // пишем лог админских действий $nLogActId = $objUser->is_banned ? 4 : 6; if ($objUser->self_deleted == 't') { $nLogActId = admin_log::ACT_ID_RESTORE_ACC; } admin_log::addLog(admin_log::OBJ_CODE_USER, $nLogActId, $sUid, $sUid, $sObjName, $sObjLink, 0, '', $nReasonId, $sReason); } $objResponse->script("\$\$('.warnlink-{$sUid} a').set('html','Забанить!');"); $objResponse->script("\$\$('.comm-ban-{$sUid} a').set('html','Заблокировать');"); $objResponse->script("\$\$('.admin-block h4 em').setStyle('display','none');"); if ($objUser->uid == $aContext['uid']) { $objResponse->script("\$('banreasonblock-{$objUser->uid}').setStyle('display','none');"); } $warns = $objUser->GetWarns($sUid); $warncount = $warns ? count($warns) : 0; $objResponse->script("if(\$('warncount-{$sUid}')) { \$('warncount-{$sUid}').set('html', {$warncount}); }"); } else { if ($sDateTo) { $sError = ''; $aDate = explode('-', $sDateTo); if (!$aDate[1] || !$aDate[2] || !$aDate[0] || !checkdate($aDate[1], $aDate[2], $aDate[0])) { $sError = 'Укажите корректную конечную дату'; } elseif (($toRes = strtotime($sDateTo)) <= time()) { $sError = 'Укажите конечную дату в будущем'; } if ($sError) { $objResponse->alert($sError); $objResponse->script("\$('ban_btn').set( 'disabled', false );\$('ban_btn').set( 'value', 'Сохранить' );"); return $objResponse; } } if ($objUser->is_banned || $objUser->ban_where) { // редактируем текущую блокировку $nBanWhere = $nActId == 3 ? 0 : 1; $objUser->updateUserBan($sUid, $objUser->ban_where, $nBanWhere, $sReason, $nReasonId, $sDateTo); } else { $nBanWhere = $nActId == 3 ? 0 : 1; $sBanId = $objUser->setUserBan($sUid, $nBanWhere, $sReason, $nReasonId, $sDateTo, $nNoSend); // пишем лог админских действий admin_log::addLog(admin_log::OBJ_CODE_USER, $nActId, $sUid, $sUid, $sObjName, $sObjLink, $aContext['code'], $aContext['link'], $nReasonId, $sReason, $sBanId, $aContext['name']); // уведомляем партнеров по сбр if ($noticeSbrPartners) { if (is_emp($objUser->role)) { $sbr = new sbr_emp($sUid); } else { $sbr = new sbr_frl($sUid); } $sbrPartners = $sbr->_new_getOpenSbrPartners(); $messages = new messages(); $messages->yourSbrPartnerIsBanned($sbrPartners, $objUser->login); } $objResponse->script("\$\$('.warnlink-{$sUid} a').set('html','Разбанить');"); $objResponse->script("\$\$('.comm-ban-{$sUid} a').set('html','Разблокировать');"); if (!$nBanWhere) { $GLOBALS['session']->nullActivityByLogin($objUser->login); // статус присутсвия ------ $online_status = $GLOBALS['session']->view_online_status($objUser->login, false); $ago = $GLOBALS['session']->ago; if (!$GLOBALS['session']->is_active && $objUser->last_time) { $fmt = 'ynjGi'; if (time() - ($lt = strtotime($objUser->last_time)) > 24 * 3600) { $fmt = 'ynjG'; if (time() - $lt > 30 * 24 * 3600) { $fmt = 'ynj'; } } $ago = ago_pub($lt, $fmt); } if (!$ago) { $ago = "менее минуты"; } $online_status .= ' <span class="' . ($GLOBALS['session']->is_active ? 'u-act' : '') . '">' . ($GLOBALS['session']->is_active ? 'на сайте' : 'Был' . ($objUser->sex == 'f' ? 'а' : '') . ' на сайте: ' . $ago . ' назад') . '</span>'; //------------------------- $objResponse->script("\$\$('.colB .bBA').set('html','{$online_status}');"); } } $warns = $objUser->GetWarns($sUid); $warncount = $warns ? count($warns) : 0; $objResponse->script("if(\$('warncount-{$sUid}')) { \$('warncount-{$sUid}').set('html', {$warncount}); }"); $sDisplay = $nBanWhere = $nActId == 3 ? 'none' : ''; if ($sDisplay == '' && $warncount == 3) { $sDisplay = 'none'; } $objResponse->script("\$\$('.warnbutton-{$sUid}').setStyle('display','{$sDisplay}');"); if ($objUser->uid == $aContext['uid']) { $sDateToParts = preg_split("/-/", $sDateTo); $admin_info = $objUser->getName(get_uid(), $ee); $objResponse->assign('banreasonblock-text-' . $objUser->uid, 'innerHTML', 'Блокировка ' . ($nBanWhere ? 'везде' : 'в блогах') . ' ' . ($sDateTo ? 'до ' . $sDateToParts[2] . ' ' . monthtostr($sDateToParts[1], true) . ' ' . $sDateToParts[0] : 'навсегда')); $objResponse->assign('banreasonblock-comment-' . $objUser->uid, 'innerHTML', reformat($sReason, 50)); $objResponse->assign('banreasonblock-date-' . $objUser->uid, 'innerHTML', date("d.m.Y H:i")); $objResponse->assign('banreasonblock-admin-' . $objUser->uid, 'innerHTML', $admin_info['login']); $objResponse->assign('banreasonblock-admin-' . $objUser->uid, 'href', '/users/' . $admin_info['login']); $objResponse->script("\$('banreasonblock-{$objUser->uid}').setStyle('display','block');"); } // удаляем все жалобы на спам для юзера $oSpam = new messages_spam(); $oSpam->deleteSpamBySpamer($sUid, 3); } $objResponse->script("delete banned.buffer['userban_{$sUid}'];"); $str = "<b>Пользователь забанен</b>"; if ($objUser->is_banned) { $str = ""; } $objResponse->script("\n if (\$('user_banned_" . $objUser->uid . "')) { \n \t\$('user_banned_" . $objUser->uid . "').set('html', '{$str}');\n }else {\n \tvar p = \$('user_first_paragraph_" . $objUser->uid . "'); \t\n \tif (p) {\n \t\tvar span = new Element('span', {\"style\":\"color:#000\", \"id\":\"user_banned_" . $objUser->uid . "\"});\n \t\tspan.inject(p, 'bottom');\n\t\t\t\t\t\t\tspan.set('html', '{$str}'); \t\t\n \t}\n }\n "); } } } if ($aContext['uid'] == 'gray_ip') { $objResponse->script('if(window.opener){window.opener.window.location.reload(true);}'); } $objResponse->script("\$\$(\"div[id^='ov-notice']\").setStyle('display', 'none');"); $objResponse->script("\$('ov-notice22').toggleClass('b-shadow_hide');"); $objResponse->script("if(banned.reload==1){window.location.reload(true);}"); $objResponse->script("if(banned.zero){banned.zeroShow();}"); $objResponse->script("if(typeof(adminLogCheckUsers)!='undefined'){adminLogCheckUsers(false);};if(\$('chk_all')){\$('chk_all').checked=false;};"); if ($aContext['uid'] == 'admin_log_page' || $aContext['uid'] == 'admin_user_search') { $objResponse->script('window.location.reload(true)'); } if ($aContext['uid'] == 'moder') { // если бан делается из потока модерирования $objResponse->script('user_content.resolveContent(user_content.resolveSid, 2, user_content.resolveUid)'); $objResponse->script("parent.\$\$(\"div[id^='ov-notice']\").setStyle('display', 'none');"); $objResponse->script("parent.\$('ov-notice22').toggleClass('b-shadow_hide');"); } } return $objResponse; }
/** * Выводит дату словами: то есть "2013-09-12" преобразует в "12 сентября 2013" * * @param type $date * @return type */ function date_text($date, $d = 'j') { $time = strtotime($date); return date($d, $time) . ' ' . monthtostr(date('n', $time), true) . ' ' . date('Y', $time); }
/** * Выводит дату словами: то есть "2013-09-12" преобразует в "12 сентября 2013" * * @param string 2013-09-12 * @return string 12 сентября 2013 */ public static function date_text($date = '') { $time = strtotime($date); return date('j', $time) . ' ' . monthtostr(date('n', $time), true) . ' ' . date('Y', $time); }
<?php if (isset($tservice['is_binded']) && $tservice['is_binded']) { ?> </figure> <?php if ($tservice['user_id'] == $uid) { ?> <?php //@todo Заменить div ниже на $tserviceBindLinks->run(); ?> <div class="b-pay-tu__hider b-layout_padleft_20"> <div class="b-layout__txt b-layout__txt_bold b-layout__txt_padbot_10 b-layout__txt_fontsize_15"> Услуга закреплена<br>до <?php echo dateFormat('j', $tservice['date_stop']) . ' ' . monthtostr(dateFormat('m', $tservice['date_stop']), true); ?> </div> <div class="b-layout__txt b-layout__txt_bold b-layout__txt_color_6db335 b-layout__txt_padbot_5 b-layout__txt_fontsize_15"> Продлите закрепление<br>на 7 и более дней </div> <a class="b-button b-button_flat b-button_flat_green" href="#" data-popup="<?php echo quickPaymentPopupTservicebind::getInstance()->getPopupId($tservice['id']); ?> "> Продлить </a> <?php if ($k > 0) { ?>
require_once "../classes/config.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/smail.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/users.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/firstpage.php"; $mail = new smail(); // 1 $f_user_admin = users::GetUid($err, "admin"); $user['uname'] = "вася"; $user['usurname'] = "Пупкин"; $user['login'] = "******"; $user['email'] = "*****@*****.**"; $prof['name'] = "nnnn"; $prof['id'] = 10; $prof['cost'] = 15; $days = 2; $mail->subject = "Недостаточно средств для автоматического продления на Free-lance.ru"; $mail->recipient = "{$user['uname']} {$user['usurname']} [{$user['login']}] <{$user['email']}>"; $html = ""; $prof_name = $prof['name']; if ($prof['id'] == 0) { $prof_name = "Все фрилансеры"; } $html .= "- <a href=\"{$GLOBALS['host']}/firstpage/?prof={$prof['id']}\">{$prof_name}</a> ({$prof['cost']} FM)<br/>"; $dev = 111; $date_dest = strtotime('+' . $days . ' days'); $date = date('d ' . monthtostr(date('m', $date_dest)) . ' Y года', $date_dest); $body = "До активации функции автопродления " . ending($days, "остался", "осталось", "осталось") . " " . number2string($days, 1) . " " . ending($days, "день", "дня", "дней") . ". Через {$days} " . ending($days, "день", "дня", "дней") . ", {$date}, должно быть автоматически продлено размещение в следующих разделах сайта Free-lance.ru:<br/>\n{$html}\nВсего с вашего счета должно быть списано {$val['sum_cost']} FM.<br/>\nСейчас на вашем Личном счету {$val['sum']} FM. Для срабатывания автоматического продления недостаточно средств.<br/><br/>\nНапоминаем вам, что автоматическое продление происходит в случае, когда на вашем личном счету достаточно средств для оплаты продления всех указанных разделов.<br/> \nПожалуйста, пополните счет или измените настройки автоматического продления.<br/>\n<br/>\nСчет можно пополнить на следующей странице: <a href=\"{$GLOBALS['host']}/bill/\">{$GLOBALS['host']}/bill/</a><br/>\nФункцию автопродления можно настроить или отключить здесь: <a href=\"{$GLOBALS['host']}/firstpage/\">{$GLOBALS['host']}/firstpage/</a>"; $mail->message = $mail->GetHtml($user['uname'], $body, 'simple'); echo $mail->message; $mail->SmtpMail('text/html');
<tbody><tr> <td bgcolor="#ffffff" width="20"></td> <td valign="top" width="70" ><a href="<?php echo $host; ?> " target="_blank"><img src="<?php echo $host; ?> /images/logo_50x50.png" width="55" height="55" border="0"></a></td> <td valign="middle" > <font color="#000000" size="6" face="arial"> <?php echo $projects_cnt; ?> лучших проектов за <?php echo date('j', $date) . ' ' . monthtostr(date('n', $date), true); ?> </font> </td> <td bgcolor="#ffffff" width="20"></td> </tr> </tbody> </table> <table style="margin-top: 0pt; margin-left: auto; margin-right: auto; background-color: #ffffff; text-align:left" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="600"> <tbody> <tr> <td bgcolor="#ffffff" width="20" height="30" colspan="3"></td> </tr> <tr> <td bgcolor="#ffffff" width="20"></td>
public function failAutoprolong($info, $service = 'pro') { require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/wallet/wallet.php'; $user = $info['user']; if ($user['bill_subscribe'] == 'f') { return; } $date = date('j') . ' ' . monthtostr(date('n'), true) . ' ' . date('Y года'); $cost = $info['sum_cost']; $wallet = WalletTypes::initWalletByType($user['uid']); $type = WalletTypes::checkWallet($wallet) ? $wallet->data['type'] : -1; $walletName = WalletTypes::getNameWallet($type, 3, $user['acc_id']); if ($service == 'pro') { $this->subject = 'FL.ru: Автопродление аккаунта PRO отключено'; $message = "Сегодня, {$date}, должно было состояться повторное списание средств для автоматического продления срока действия вашего аккаунта PRO.<br/>"; $message .= "Всего с {$walletName} должно быть списано {$cost} " . ending($cost, 'рубль', 'рубля', 'рублей') . ', однако в процессе списания вновь произошла ошибка.<br/><br/>'; $message .= 'Срок действия аккаунта PRO завершен, а его автопродление временно отключено и возобновится при следующем приобретении услуги.<br/><br/>'; $message .= "Информацию о повторном приобретении услуг и автопродлении, а также ответы на все интересующие вопросы вы можете найти в нашем <a href='https://feedback.fl.ru/{$this->_addUrlParams('b', '?')}'>сообществе поддержки</a>."; } $this->recipient = "{$user['uname']} {$user['usurname']} [{$user['login']}] <{$user['email']}>"; $this->message = $this->getHtml($user['login'], $message, array('header' => 'default', 'footer' => 'default'), array('login' => $user['login'])); $this->send('text/html'); }
$is_personal = $prj['kind'] == 9; ?> <table cellpadding="4" cellspacing="0" style="width:100%; border:0" id="project-item<?php echo $prj["id"]; ?> "><tr style="vertical-align:top"><td style="padding-left: 10px; padding-right: 10px;"> <div class="fl2_date"> <div class="fl2_date_day"> <?php echo str_ago_pub($project->getCreateDateEx()); ?> </div> <div class="fl2_date_date"> <?php echo strftime("%d ", $project->getCreateDateEx()) . monthtostr(strftime("%m", $project->getCreateDateEx())) . ", " . $daysOfWeek[date("N", $project->getCreateDateEx())]; ?> </div> <div class="clear"></div> </div> <div class="fl2_offer"> <?php if ($prj['cost']) { $priceby_str = getPricebyProject($prj['priceby']); ?> <div class="fl2_offer_budget">Бюджет: <?php if (hasPermissions('projects') && $user->login != $_SESSION["login"]) { ?> <a id="prj_budget_lnk_<?php echo $prj['id']; ?>
/** * Вывод возраста сообщества в формате data(age) * * @param array $comm Данные комментария * @return string */ function __commPrntAgeEx($comm) { $date = strtotime($comm['created_time']); $month = monthtostr(date("m", $date), true); $date_str = date('d', $date) . ' ' . $month . ' ' . date('Y', $date); if ($comm['year']) { $age .= $comm['year'] . ' ' . getSymbolicName($comm['year'], 'year') . ' '; } if ($comm['month']) { $age .= $comm['month'] . ' ' . getSymbolicName($comm['month'], 'month') . ' '; } if ($comm['day']) { $age .= $comm['day'] . ' ' . getSymbolicName($comm['day'], 'day'); } return $date_str . ' ' . ($age ? "({$age})" : '(Создано сегодня)'); }