本文整理汇总了PHP中LenghtFormatEx函数的典型用法代码示例。如果您正苦于以下问题:PHP LenghtFormatEx函数的具体用法?PHP LenghtFormatEx怎么用?PHP LenghtFormatEx使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LenghtFormatEx函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: quickprjedit_save_prj
//.........这里部分代码省略.........
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/project_exrates.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/stop_words.php';
$stop_words = new stop_words(hasPermissions('projects'));
$objResponse->script('popupQEditPrjHide();');
switch ($type) {
case 1:
case 4:
// Лента проектов
global $session;
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects.php';
$prj_id = $project['id'];
$obj_project = new new_projects();
$tproject = $obj_project->getProjects($num, -1, 1, false, null, false, true, $prj_id);
$this_kind = $tproject[0]['kind'];
$this_uid = get_uid(false);
$this_pro_last = $_SESSION['pro_last'];
$this_is_pro = payed::CheckPro($_SESSION['login']);
$this_edit_mode = hasPermissions('projects');
if ($this_uid) {
$this_user_role = $_SESSION['role'];
}
$this_project = $tproject[0];
$row = $this_project;
if ($this_edit_mode || $this_project['kind'] == 2 || $this_project['user_id'] == $this_uid || $this_project['offer_id'] || $this_pro_last) {
$this_show_data = 1;
$row['show_data'] = 1;
} else {
$this_show_data = 0;
$row['show_data'] = 0;
}
$descr = $row['descr'];
$descr = preg_replace('/^ /', "", $descr);
$descr = preg_replace("/(\n) /", "\$1", $descr);
$descr = reformat(strip_tags(LenghtFormatEx($descr, 180), '<br />'), 50, 1, 0, 1);
$descr = preg_replace("//", ' ', $descr);
$row['descr'] = $descr;
$row['t_is_payed'] = $this_project['payed'] && $this_project['kind'] != 2 && $this_project['kind'] != 7;
$row['t_is_contest'] = $this_project['kind'] == 2 || $this_project['kind'] == 7;
$row['t_pro_only'] = $this_project['pro_only'] == 't';
$row['t_verify_only'] = $this_project['verify_only'] == 't';
$row['t_hide'] = $this_project['hide'] == 't';
$row['t_urgent'] = $this_project['urgent'] == 't';
$row['t_prefer_sbr'] = $this_project['prefer_sbr'] == 't';
$row['priceby'] = $this_project['priceby'];
$row['t_is_adm'] = hasPermissions('projects');
$row['t_is_ontop'] = strtotime($this_project['top_to']) >= time();
$row['unread'] = (int) $this_project['unread_p_msgs'] + (int) $this_project['unread_c_msgs'] + (int) $this_project['unread_c_prjs'];
$row['t_is_proonly'] = $this_project['pro_only'] == 't' && !$_SESSION['pro_last'] && !$this_edit_mode && $this_uid != $this_project['user_id'];
$attaches = projects::GetAllAttach($this_project['id']);
$attaches = !$attaches ? array() : $attaches;
foreach ($attaches as $k => $a) {
$a['virus'] = is_null($a['virus']) ? $a['virus'] : bindec($a['virus']);
$attaches[$k] = $a;
}
$row['attaches'] = $this_project['attaches'] = $attaches;
$is_ajax = true;
$can_change_prj = hasPermissions('projects');
$row['friendly_url'] = getFriendlyURL('project', $row['id']);
ob_start();
if ($type == 1) {
$project = projects::initData($row);
require_once $_SERVER['DOCUMENT_ROOT'] . '/projects/tpl.lenta-item.php';
} else {
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/employer.php';
$user = new employer();
$user->GetUserByUID($this_project['user_id']);
示例2: quickMASGetYandexKassaLink
function quickMASGetYandexKassaLink($frm, $payment, $promo_code)
{
$objResponse = new xajaxResponse();
if (is_emp()) {
global $DB, $host;
$masssending = new masssending();
//@todo: не используюутся?
//$countries = country::GetCountries(TRUE);
//$prof_groups = professions::GetAllGroupsLite(TRUE);
//$professions = professions::GetProfList();
//$exrates = project_exrates::GetAll();
$uid = get_uid(false);
//$params['msg'] = stripslashes($frm['msg']);
$params['msg'] = "Здравствуйте!\n\nПриглашаю ознакомиться с проектом '" . change_q_x(stripslashes($frm['title']), false, false, 'b|i|p|ul|li|s|h[1-6]{1}', false, false) . "' " . str_replace('www.n.fl.ru', 'n.fl.ru', $host) . $frm['link'] . " \n\n\n" . LenghtFormatEx(change_q_x(stripslashes($frm['msg']), false, false, 'b|i|p|ul|li|s|h[1-6]{1}', false, false), 300);
$params['max_users'] = intval($frm['max_users']);
$params['max_cost'] = intval($frm['max_cost']);
$params['is_pro'] = stripslashes($frm['pro']);
$params['favorites'] = stripslashes($frm['favorites']);
$params['free'] = stripslashes($frm['free']);
$params['sbr'] = stripslashes($frm['bs']);
$params['portfolio'] = stripslashes($frm['withworks']);
$params['inoffice'] = stripslashes($frm['office']);
$params['opi_is_verify'] = stripslashes($frm['ver']);
$tmp = array();
if ($frm['mass_location_columns'][0] != '0' || $frm['mass_location_columns'][1] != '0') {
$tmp[] = intval($frm['mass_location_columns'][0]) . ':' . intval($frm['mass_location_columns'][1]);
$params['locations'] = $tmp;
}
if ($frm['f_cats']) {
$frm['f_cats'] = preg_replace('/,$/', '', $frm['f_cats']);
$acats = explode(',', $frm['f_cats']);
$cats_data = array();
foreach ($acats as $v) {
$v = preg_replace('/^mass_cat_span_/', '', $v);
$c = explode('_', $v);
if ($c[1] == 0) {
$sql = 'SELECT prof_group FROM professions WHERE id=?i';
$p = $DB->val($sql, $c[0]);
$cats_data[] = $p . ':' . $c[0];
} else {
$cats_data[] = $c[0] . ':0';
}
}
}
$params['professions'] = $cats_data;
if ($calc = $masssending->Add($uid, $params)) {
$masssending->ClearTempFiles(session_id());
//Допустимо использование промокодов
$masssending->billing->setPromoCodes('SERVICE_MASSSENDING', $promo_code);
$billReserveId = $masssending->Accept($calc['massid'], false);
if ($billReserveId) {
$_SESSION['quickmas_is_begin'] = 1;
$_SESSION['quickmas_count_u'] = $calc['count'];
$_SESSION['referer'] = $_SERVER['HTTP_REFERER'];
$sum = $masssending->billing->getRealPayedSum();
$yandex_kassa = new yandex_kassa();
$html_form = $yandex_kassa->render($sum, $masssending->billing->account->id, $payment, $billReserveId);
$html_form = preg_replace('/^[^\\/]+\\/\\*!?/', '', $html_form);
$html_form = preg_replace('/\\*\\/[^\\/]+$/', '', $html_form);
$objResponse->script('$("quick_mas_div_wait").set("html", \'' . $html_form . '\');');
$objResponse->script("\$('quick_mas_div_wait').getElements('form')[0].submit();");
}
}
}
return $objResponse;
}
示例3: LenghtFormatEx
<?php
$is_first = false;
}
if ($user->lj_3 && !($info_for_reg['lj_3'] && !$uid)) {
?>
<div class="b-layout__hover_bg_f0ffdf b-layout_padlr_10 b-layout_pad_3 b-layout_margbot_3">
<div class="b-layout__txt b-layout__txt_padleft_25 b-layout__txt_lineheight_1">
<span class="b-icon b-icon__cont b-icon__cont_lj b-icon_margleft_-25"></span>
<noindex class="b-layout__txt b-layout__txt_valign_top b-layout__txt_lineheight_15 b-layout__txt_ellipsis b-layout_inline-block b-layout__txt_width_225"><a class="b-layout__link" href="http://<?php
echo $user->lj_3;
?>
.livejournal.com" target="_blank" rel="nofollow" title="<?php
echo $user->lj_3;
?>
"><?php
echo LenghtFormatEx($user->lj_3, $maxlength);
?>
</a></noindex>
</div>
</div>
<?php
$is_first = false;
}
if ($user->skype && !($info_for_reg['skype'] && !$uid)) {
?>
<div class="b-layout__hover_bg_f0ffdf b-layout_padlr_10 b-layout_pad_3 b-layout_margbot_3">
<div class="b-layout__txt b-layout__txt_padleft_25 b-layout__txt_lineheight_1">
<span class="b-icon b-icon__cont b-icon__cont_sky b-icon_margleft_-25"></span>
<div class="b-layout__txt b-layout__txt_valign_top b-layout__txt_lineheight_15 b-layout__txt_ellipsis b-layout_inline-block b-layout__txt_width_225">
<a class="b-layout__link" href="skype:<?php
echo $user->skype;
示例4: number_format
?>
<span title="Количество продаж услуги"><span class="b-icon b-icon__tu2 b-icon_top_2"></span> <?php
echo number_format($sold_count, 0, '', ' ');
?>
</span>
<?php
}
?>
</a>
</div>
<div class="b-layout__txt b-layout__txt_padtop_10 b-layout_overflow_hidden">
<a href="<?php
echo $tservice_url;
?>
" class="b-layout__link b-layout__link_no-decorat b-layout__link_color_000 b-layout__link_inline-block"><?php
echo LenghtFormatEx(reformat($tservice['title'], 20, 0, 1), 80);
?>
</a>
</div>
</div>
<?php
if ($is_owner) {
?>
</div>
<a href="javascript:void(0);" data-preview-pos="<?php
echo $key + 1;
?>
" data-popup="<?php
echo FreelancersPreviewEditorPopup::getInstance()->getPopupId();
?>
">Изменить</a>
示例5: GetPreview
/**
* формирует превью проекта на главной странице.
*/
function GetPreview($data)
{
$objResponse = new xajaxResponse();
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/attachedfiles.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/CFile.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/HTML/projects_lenta.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/project_exrates.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/memBuff2.php';
$kind = 1;
$memBuff = new memBuff();
$htmlLenta = $memBuff->get('projectsLentaHTML');
if (!$htmlLenta) {
$prj = new new_projects();
$prjs = $prj->getProjects($num_prjs, -1, 1, false, null, true);
foreach ($prjs as &$proj) {
// стираем принадлежность проекта к пользователю, чтобы не появилось кнопок РЕДАКТИРОВАТЬ и пр.
unset($proj['user_id']);
}
unset($proj);
$htmlPrj = new HTMLProjects();
$htmlPrj->template = '/projects/tpl.lenta.new.php';
$prj_content = $htmlPrj->ShowProjects($num_prjs, $prjs, 1, 1, null, true);
$prfs = new professions();
$profs = $prfs->GetAllProfessions('', 0, 1);
// подложка с лентой проектов
ob_start();
include $_SERVER['DOCUMENT_ROOT'] . '/templates/main.php';
$htmlLenta = ob_get_clean();
// кэшируем ленту проектов
$memBuff->set('projectsLentaHTML', $htmlLenta, 1800);
}
// подготавливаем данные для шаблона в ленту проектов
$row = array();
$row['kind'] = __paramValue('int', $data['kind']);
$row['cost'] = __paramValue('int', $data['cost']);
$row['currency'] = __paramValue('int', $data['currency_db_id']);
$row['priceby'] = __paramValue('int', $data['priceby_db_id']);
$row['name'] = stripslashes(__paramValue('html', $data['name'], null, true));
$contacts = array('phone' => array('name' => 'Телефон', 'value' => ''), 'site' => array('name' => 'Сайт', 'value' => ''), 'icq' => array('name' => 'ICQ', 'value' => ''), 'skype' => array('name' => 'Skype', 'value' => ''), 'email' => array('name' => 'E-mail', 'value' => ''));
if (isset($data['contacts'])) {
foreach ($data['contacts'] as $name => $value) {
if (!isset($contacts[$name])) {
continue;
}
switch ($name) {
case 'site':
if (!url_validate(ltrim(ltrim($value, 'http://'), 'https://')) && trim($value) != '') {
$error["contact_{$name}"] = 'Поле заполнено некорректно';
}
if (strpos($value, 'htt') === false && trim($value) != '') {
$value = 'http://' . $value;
}
break;
case 'email':
if (!is_email($value) && trim($value) != '') {
$error["contact_{$name}"] = 'Поле заполнено некорректно';
}
break;
}
$contacts[$name]['value'] = __paramValue('htmltext', stripslashes($value));
}
$row['contacts'] = serialize($contacts);
}
$descrFull = stripslashes(__paramValue('html', $data['descr'], null, true));
$descr = preg_replace('/^ /', "", $descrFull);
$descr = preg_replace("/(\n) /", "\$1", $descr);
$descr = reformat(strip_tags(htmlspecialchars(LenghtFormatEx(htmlspecialchars_decode($descr, ENT_QUOTES), 180), ENT_QUOTES), '<br />'), 50, 1, 0, 1);
$descr = preg_replace("//", ' ', $descr);
$row['descr'] = $descr;
$row['t_is_payed'] = $data['logo_ok'] || $data['top_ok'];
$row['t_is_ontop'] = __paramValue('bool', $data['top_ok']);
$row['t_pro_only'] = $data['pro_only'] ? 't' : 'f';
$row['t_verify_only'] = $data['verify_only'] ? 't' : 'f';
$row['t_urgent'] = $data['urgent'] ? 't' : 'f';
$row['t_hide'] = $data['hide'] ? 't' : 'f';
$row['create_date'] = date('Y-m-d H:i', strtotime(date('Y-m-d H:i:s')) - 120);
// делаем дату публикации 2 минуты назад
$row['end_date'] = __paramValue('string', $data['end_date']);
$row['win_date'] = __paramValue('string', $data['win_date']);
$row['country'] = __paramValue('int', $data['project_location_columns'][0]);
$row['city'] = __paramValue('int', $data['project_location_columns'][1]);
list($row['country_name'], $row['city_name']) = explode(': ', __paramValue('string', $data['location']));
$logoOK = __paramValue('bool', $data['logo_ok']);
$topOK = __paramValue('bool', $data['top_ok']);
$row['link'] = __paramValue('string', $data['link']);
if ($logoOK) {
$logoAttach = new attachedfiles($data['logo_attachedfiles_session']);
$logoFiles = $logoAttach->getFiles(array(1));
if (count($logoFiles)) {
$logoFile = array_pop($logoFiles);
// загружено может быть несколько файлов, берем последний
$logoCFile = new CFile($logoFile['id']);
} elseif (__paramValue('int', $data['logo_file_id'])) {
$logoCFile = new CFile(__paramValue('int', $data['logo_file_id']));
}
$row['logo_name'] = $logoCFile->name;
//.........这里部分代码省略.........
示例6: LenghtFormatEx
}
?>
<tr style="vertical-align:top">
<td style="padding-top:<?php
echo $pt;
?>
px; white-space:nowrap; padding-bottom:4px;">
<div style="width:100%;text-overflow:ellipsis;overflow:hidden">
<a href="/freelancers/<?php
echo $p['link'] . freelancer::getPositionToPage($p['pos']);
?>
" title="<?php
echo $p['prof_name'];
?>
" class="blue"><?php
echo LenghtFormatEx($p['prof_name'], 24, '...', 1);
?>
</a>
</div>
</td>
<?php
if (!$u_is_pro) {
?>
<td style="padding-top:<?php
echo $pt;
?>
px; text-align:right; padding-bottom:4px;"><?php
echo $p['pos'];
?>
</td>
<?php
示例7: str_replace
?>
<item>
<title><![CDATA[<?php
echo $prj['name'] . ($prj['cost'] > 0 ? " (Бюджет: {$prj_cost})" : '');
?>
]]></title>
<link><?php
echo $prj_link;
?>
</link>
<?php
if ($prj['pro_only'] == 't') {
?>
<?/*<description>Описание проекта доступно только для PRO.</description>*/?>
<description><![CDATA[<?php
echo str_replace('<br', '<br /', LenghtFormatEx($prj['descr'], 180));
?>
]]></description>
<?php
} else {
?>
<description><![CDATA[<?php
echo str_replace('<br', '<br /', $prj['descr']);
?>
]]></description>
<?php
}
?>
<guid><?php
echo $prj_link;
?>
示例8: SendMasssending
/**
* Отправляет уведомления о новых сообщениях в личке при платной рассылке.
* Консьюмер plproxy-mail
*
* @param array $params Данные от PgQ, TO-адреса получателей; FROM-адрес отправителя
* @param string $msg Текст сообщения
*/
function SendMasssending($params, $from, $to, $msg)
{
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php';
$uid_from = intval($from);
$uids_to = explode(",", preg_replace("/[\\{\\}]/", "", $to));
if (!$uid_from || !is_array($uids_to)) {
return;
}
$from = new users();
$from->GetUserByUID($uid_from);
$this->subject = "Новое сообщение на FL.ru";
$msg_text = "\n<a href='{$GLOBALS['host']}/users/{$from->login}'>{$from->uname} {$from->usurname}</a> [<a href='{$GLOBALS['host']}/users/{$from->login}{$this->_addUrlParams('b')}'>{$from->login}</a>]\nнаписал(а) вам новое сообщение на сайте FL.ru.<br />\n<br />\n---------- \n<br />\n" . $this->ToHtml(LenghtFormatEx(strip_tags($msg), 300)) . "\n<br />\n<br />\n<br />\n<a href='{$GLOBALS['host']}/contacts/?from={$from->login}{$this->_addUrlParams('b', '&')}'>{$GLOBALS['host']}/contacts/?from={$from->login}</a>\n<br />\n<br />\n------------\n";
foreach ($uids_to as $uid_to) {
$to = new users();
$to->GetUserByUID($uid_to);
if (substr($to->subscr, 0, 1) != '1' || !$to->email || $to->is_banned == '1') {
continue;
}
if (!$this->Connect()) {
return "Невозможно соеденится с SMTP сервером";
}
if ($to->email && substr($to->subscr, 12, 1) == '1') {
$this->recipient = $to->uname . " " . $to->usurname . " [" . $to->login . "] <" . $to->email . ">";
$this->message = $this->GetHtml($to->uname, $msg_text, array('header' => 'default', 'footer' => 'default'), array('login' => $to->login));
$this->SmtpMail('text/html');
}
}
$this->subject = "Ваша рассылка на FL.ru прошла модерацию";
$this->recipient = $from->uname . " " . $from->usurname . " [" . $from->login . "] <" . $from->email . ">";
$msg_text = $this->ToHtml($msg);
$body = "Ваша заявка на рассылку была рассмотрена и одобрена модераторами сайта FL.ru. \n Фрилансерам выбранных вами специализаций будет отправлено сообщение следующего содержания:</br>\n ---<br/>\n {$msg_text}<br/>\n ---<br/>";
$this->message = $this->GetHtml($from->uname, $body, array('header' => 'simple', 'footer' => 'simple'));
$this->SmtpMail('text/html');
}
示例9: substr
$footer = $rpath . "footer.html";
if (!$gr_name) {
$gr_name = "Ошибка";
}
if ($blog->poll !== null && $blog->title == "") {
$sQuestion = $blog->poll_question;
$html_title = substr($blog->poll_question, 0, 30) . (strlen($blog->poll_question) > 30 ? "..." : "");
} else {
$html_title = $blog->title == "" ? substr($sMessage, 0, 30) . (strlen($sMessage) > 30 ? "..." : "") : $sTitle;
if ($html_title == "") {
$html_title = 'Блоги';
}
}
$page_title = strip_tags($html_title) . ' - фриланс, удаленная работа на FL.ru';
$page_keyw = strtolower($gr_name) . ", удаленная работа, фри-ланс, дизайнер, программист, менеджер, иллюстратор, верстальщик, оптимизатор, копирайтер";
$page_descr = LenghtFormatEx(htmlspecialchars(strip_tags($sMessage), ENT_QUOTES, 'cp1251'), 250, '', 0);
//$gr_name.". Работодатель.Удаленная работа. Поиск работы. Предложение работы. Портфолио фрилансеров. Разработка сайтов, Программирование, Переводы, Тексты, Дизайн, Арт, Реклама, Маркетинг, Прочее. Free-lance.ru";
$page_title = deleteHiddenURLFacebook($page_title);
$page_keyw = deleteHiddenURLFacebook($page_keyw);
$page_descr = deleteHiddenURLFacebook($page_descr);
$blog->title = deleteHiddenURLFacebook($blog->title);
$sTitle = deleteHiddenURLFacebook($sTitle);
stat_collector::setStamp();
// stamp
// Добавляем Open Graph Tags для FaceBook
if ($blog) {
global $additional_header;
if (empty($additional_header)) {
$additional_header = '';
}
$additional_header .= '
示例10: __fpPrntPosition
/**
* Вывод позиции платного объявления
* @param array массив с данными объявления
* @return string HTML
*/
function __fpPrntPosition($value)
{
global $session;
$ufp_mod = (int) ($_SESSION['uid'] == $value['user_id']) | 2 * hasPermissions('users');
if (strlen($value['uname']) > 10) {
$uname = hyphen_words($value['uname']);
$t = explode("", $uname);
for ($i = 0; $i < count($t); $i++) {
if (strlen($t[$i]) > 10) {
$uname = LenghtFormatEx($value['uname'], 10);
break;
}
}
} else {
$uname = $value['uname'];
}
if (strlen($value['usurname']) > 10) {
$usurname = hyphen_words($value['usurname']);
$t = explode("", $usurname);
for ($i = 0; $i < count($t); $i++) {
if (strlen($t[$i]) > 10) {
$usurname = LenghtFormatEx($value['usurname'], 10);
break;
}
}
} else {
$usurname = $value['usurname'];
}
ob_start();
?>
<div id="mgCapsule<?php
echo $value['id'];
?>
">
<div id="mgContent<?php
echo $value['id'];
?>
">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="margin-bottom:10px">
<col style="width:10px" />
<col />
<tr valign="top">
<td>
<a href="/users/<?php
echo $value['login'];
?>
/?f=<?php
echo stat_collector::REFID_PAIDSEATINGS;
?>
&stamp=<?php
echo $_SESSION['stamp'];
?>
" title="<?php
echo $value['uname'];
?>
<?php
echo $value['usurname'];
?>
"
<?php
/* if ($ufp_mod | (!$_SESSION['uid'] || is_emp())) { ?> onmouseover="mg_onOver(<?=$value['id']?>, <?=$ufp_mod?>);" onmouseout="mg_onLeave()"<? } */
?>
class="img50x50">
<?php
echo view_avatar($value['login'], $value['photo'], 1, 0);
?>
</a>
</td>
<td style="padding-left:10px">
<?php
if ($value['payed'] == 't') {
print view_pro2($value['payed_test'] == 't' ? true : false) . ' ';
}
print $session->view_online_status($value['login']);
?>
<a <?php
/* if ($ufp_mod | (!$_SESSION['uid'] || is_emp())) { ?> onmouseover="mg_onOver(<?=$value['id']?>, <?=$ufp_mod?>);" onmouseout="mg_onLeave()"<? } */
?>
class="freelancer-name" href="/users/<?php
echo $value['login'];
?>
/?f=<?php
echo stat_collector::REFID_PAIDSEATINGS;
?>
&stamp=<?php
echo $_SESSION['stamp'];
?>
" title="<?php
echo $value['uname'];
?>
<?php
echo $value['usurname'];
?>
">
<?php
//.........这里部分代码省略.........
示例11: reformat
?>
</nobr></font></b><?php
}
?>
</td>
<td bgcolor="#ffffff" width="20"></td>
</tr>
<tr>
<td bgcolor="#ffffff" width="20" height="10" colspan="3"></td>
</tr>
<tr>
<td bgcolor="#ffffff" width="20"></td>
<td>
<font color="#000000" size="2" face="arial">
<?php
echo reformat(LenghtFormatEx(strip_tags($descr, '<br />'), 180), 50, 0, 1);
?>
</font>
</td>
<td bgcolor="#ffffff" width="20"></td>
</tr>
<tr>
<td bgcolor="#ffffff" width="20"></td>
<td height="20">
<font color="#a0a0a0" size="1" face="arial">
<?php
if ($project_kind == 2 || $project_kind == 7) {
// Конкурс
?>
<b>Конкурс</b>  
<?php
示例12: sendBlogPostDeleted
/**
* Уведомление об удалении комментария или поста в блогах.
*
* @param int $moderator_uid - идентификатор автора блога
* @param array $userSubscribe - массив идентификаторов сообщений подписаных польователей
* */
public function sendBlogPostDeleted($moderator_uid, $userSubscribe)
{
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/messages.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php';
// Посылаем подписавшимся на темы
if ($userSubscribe) {
$moderator = new users();
$moderator->GetUserByUID($moderator_uid);
$a_login = $moderator->login;
$a_uname = $moderator->uname;
$a_usurname = $moderator->usurname;
foreach ($userSubscribe as $comment) {
if (substr($comment['s_subscr'], 2, 1) == '1' && !$notSend[$comment['s_uid']] && $comment['s_email']) {
$this->subject = 'В блоге на сайте FL.ru удален комментарий';
$post_type = "комментарий в <a href='{$GLOBALS['host']}/blogs/view.php?tr={$comment['thread_id']}&openlevel={$comment['id']}{$this->_addUrlParams('b', '&')}#o{$comment['id']}'>в блоге</a>, на который вы подписаны";
if ($comment['s_uid'] == $comment['uid']) {
$this->subject = 'Ваш комментарий в блоге на сайте FL.ru удален';
$post_type = "ваш комментарий в <a href='{$GLOBALS['host']}/blogs/view.php?tr={$comment['thread_id']}&openlevel={$comment['id']}{$this->_addUrlParams('b', '&')}#o{$comment['id']}'> блоге</a>";
}
$message_template = 'subscribe_delete_comment';
if ($comment['reply_to'] == '') {
$this->subject = 'На сайте FL.ru удален блог';
$post_type = 'блог, на который вы подписаны';
if ($comment['s_uid'] == $comment['uid']) {
$this->subject = 'Ваш пост в блогах на сайте FL.ru удален';
$post_type = 'ваш пост в блогах';
}
$message_template = 'subscribe_delete_post';
}
$link_title = "<a href='{$GLOBALS['host']}/blogs/view.php?tr={$comment['thread_id']}{$this->_addUrlParams('b', '&')}' target='_blank'>" . ($comment['blog_title'] == '' ? 'Без названия' : $comment['blog_title']) . '</a>';
$this->message = $this->GetHtml($comment['s_uname'], "\n\tПользователь <a href='{$GLOBALS['host']}/users/{$a_login}/{$this->_addUrlParams('b')}'>{$a_uname} {$a_usurname}</a> [<a href='{$GLOBALS['host']}/users/{$a_login}{$this->_addUrlParams('b')}'>{$a_login}</a>]\n\tудалил(-а) {$post_type} на сайте FL.ru.\n\t<br /> --------\n\t<br />" . ($comment['title'] ? $this->ToHtml(input_ref(LenghtFormatEx($comment['title'], 300), 1)) . '<br />---<br />' : '') . $this->ToHtml(input_ref(LenghtFormatEx($comment['msgtext'], 300), 1)) . '
<br /> --------
<br />
', array('header' => $message_template, 'footer' => 'subscribe'), array('type' => 1, 'title' => $link_title));
$this->recipient = $comment['s_uname'] . ' ' . $comment['s_usurname'] . ' [' . $comment['s_login'] . '] <' . $comment['s_email'] . '>';
$this->SmtpMail('text/html');
$message = 'Здравствуйте, ' . $comment['s_uname'] . ". \n\tПользователь <a href='{$GLOBALS['host']}/users/{$a_login}/{$this->_addUrlParams('b')}'>{$a_uname} {$a_usurname}</a> [<a href='{$GLOBALS['host']}/users/{$a_login}{$this->_addUrlParams('b')}'>{$a_login}</a>]\n удалил(-а) {$post_type} на сайте FL.ru.\n\t--------" . ($comment['title'] ? $this->ToHtml(input_ref(LenghtFormatEx($comment['title'], 300), 1)) . '
---
' : '') . $this->ToHtml(input_ref(LenghtFormatEx($comment['msgtext'], 300), 1)) . '
--------
';
messages::Add(users::GetUid($err, 'admin'), $comment['s_login'], $message, '', 1);
}
}
}
}
示例13: zin
echo zin($frl['total_opi_plus']);
?>
</a> |
<a class="b-layout__link b-layout__link_bold b-layout__link_color_c10600 b-layout_hover_link_decorated" href="/users/<?php
echo $frl['login'];
?>
/opinions/?sort=3&author=0">- <?php
echo zin($frl['total_opi_minus']);
?>
</a>
</div>
</td>
<td class="b-layout__td b-layout__td_padleft_20 b-layout__td_padright_20 b-layout__td_padtb_15 b-layout__td_valign_mid">
<div class="b-layout__txt b-layout__txt_color_64 b-layout__txt_fontsize_11">
<?php
echo br2br(LenghtFormatEx(reformat($frl['status_text'], 40, 0, 1, 25), 150));
?>
</div>
</td>
</tr>
<?php
if ($i < $cntCatalogList - 1) {
?>
<tr class="b-layout__tr">
<td class="b-layout__td b-layout__td_padtop_5 b-layout__td_bordbot_e6" colspan="5"></td>
</tr>
<?php
}
?>
<?php
示例14: initProject
/**
* Заполняет значения в зависимости от проекта.
*
* @param array $project данные проекта
*/
public function initProject($project)
{
$stop_words = new stop_words(hasPermissions('projects'));
$title = $project['moderator_status'] === '0' && $project['kind'] != 4 && $project['is_pro'] != 't' ? $stop_words->replace($project['name'], 'plain', false) : $project['name'];
$title50 = LenghtFormatEx(trim(strip_tags($title)), 50);
$title100 = LenghtFormatEx(trim(strip_tags($title)), 100);
$sp = new_projects::getSpecs($project['id']);
$is_spec = $sp[0]['subcategory_id'] > 0;
$prof_id = $is_spec ? $sp[0]['subcategory_id'] : $sp[0]['category_id'];
$this->seo_value = new SeoValues();
$this->seo_value->initCard($prof_id, $is_spec);
$this->title = sprintf(SeoText::PRJ_TITLE, $title50, $this->seo_value->getKey(1));
$this->description = sprintf(SeoText::PRJ_DESC, $title100, $this->seo_value->getKeysString(3));
$this->keywords = sprintf(SeoText::PRJ_KEY, $this->seo_value->getFTitle(1), $this->seo_value->getKeysString());
$this->footer_text = sprintf(SeoText::PRJ_TAGS, $this->seo_value->getFTitle(1), $this->seo_value->getKeysString());
}
示例15: session_start
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/professions.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/project_exrates.php';
session_start();
if (!($uid = get_uid())) {
header('Location: /fbd.php');
exit;
}
$masssending = new masssending();
$countries = country::GetCountries(true);
$prof_groups = professions::GetAllGroupsLite(true);
$professions = professions::GetProfList();
$exrates = project_exrates::GetAll();
if (!empty($_POST)) {
$frm = $_POST;
//$params['msg'] = stripslashes($frm['msg']);
$params['msg'] = "Здравствуйте!\n\nПриглашаю ознакомиться с проектом '" . change_q_x(stripslashes($frm['title']), false, false, 'b|i|p|ul|li|s|h[1-6]{1}', false, false) . "' " . str_replace('www.n.fl.ru', 'n.fl.ru', $host) . $frm['link'] . " \n\n\n" . LenghtFormatEx(change_q_x(stripslashes($frm['msg']), false, false, 'b|i|p|ul|li|s|h[1-6]{1}', false, false), 300);
$params['max_users'] = intval($_POST['max_users']);
$params['max_cost'] = intval($_POST['max_cost']);
$params['is_pro'] = stripslashes($frm['pro']);
$params['favorites'] = stripslashes($frm['favorites']);
$params['free'] = stripslashes($frm['free']);
$params['sbr'] = stripslashes($frm['bs']);
$params['portfolio'] = stripslashes($frm['withworks']);
$params['inoffice'] = stripslashes($frm['office']);
$params['opi_is_verify'] = stripslashes($frm['ver']);
$tmp = array();
if ($frm['mass_location_columns'][0] != '0' || $frm['mass_location_columns'][1] != '0') {
$tmp[] = intval($frm['mass_location_columns'][0]) . ':' . intval($frm['mass_location_columns'][1]);
$params['locations'] = $tmp;
}
if ($frm['f_cats']) {