echo $host; ?> /about/corporative/post/<?php echo $theme['id']; ?> /</link> <description><![CDATA[<?php echo reformat($theme['msg'], 96, 1); ?> ]]></description> <guid><?php echo $host; ?> /about/corporative/</guid> <pubDate><?php echo gmdate("D, d M Y H:i:s", strtotimeEx($theme['date_create'])); ?> </pubDate> <comments><?php echo $host; ?> /about/corporative/post/<?php echo $theme['id']; ?> /</comments> </item> <?php } } ?> </channel>
} $frl = new freelancer(); if (($datey = trim($_POST['datey'])) && ($dated = trim($_POST['dated']))) { if (!is_numeric($datey) || !is_numeric($dated) || !checkdate(intval(trim($_POST['datem'])), intval($dated), intval($datey))) { $error_flag = 1; $alert[1] = "Поле заполнено некорректно"; } else { $frl->birthday = dateFormat("Y-m-d", $datey . "-" . trim($_POST['datem']) . "-" . $dated); } } else { //$frl->birthday = "1910-01-01"; $error_flag = 1; $alert[1] = "Поле заполнено некорректно"; } //www.x.ru" onclick="alert(12345) if (!$alert[1] && $frl->birthday && date("Y", strtotimeEx($frl->birthday)) >= date("Y")) { $error_flag = 1; $alert[1] = "Поле заполнено некорректно"; } $frl->country = intval(trim($_POST['country'])); $frl->city = intval(trim($_POST['pf_city'])); if ($frl->country <= 0) { $error_flag = 1; $alert['country'] = 'Выберите страну'; } if ($frl->city <= 0) { $error_flag = 1; $alert['city'] = 'Выберите город'; } $frl->site = change_q(substr(trimhttp(trim($_POST['site'])), 0, 96), true); $frl->icq = change_q(substr(trim($_POST['icq']), 0, 96), true);
</title> <link><?php echo $host; echo getFriendlyUrl('blog', $theme['thread_id']); ?> </link> <description><![CDATA[<?php echo xmloutofrangechars(reformat($theme['msgtext'], 96, 1)); ?> ]]></description> <guid><?php echo md5($theme['post_time'] . '-' . $theme['id']); ?> </guid> <pubDate><?php echo date("D, d M Y H:i:s", strtotimeEx($theme['post_time'])) . " GMT+3"; ?> </pubDate> <comments><?php echo $host; echo getFriendlyUrl('blog', $theme['thread_id']); ?> </comments> </item> <?php } } ?> </channel> </rss>
?> <a href="<?php echo getFriendlyURL("project", $prj['id']); ?> "><?php echo YellowLine($prj['name']); ?> </a></h4> <div class="project-preview-desc"> <?php echo reformat($prj['descr'], 60); ?> </div> <ul class="project-info"> <li><?php echo ago_pub_x(strtotimeEx($prj['post_date'])); ?> </li> <li>Автор: <?php echo $prj['is_pro'] == 't' ? ' ' . view_pro_emp(false, 8) : ''; ?> <a href="/users/<?php echo $prj['login']; ?> /"><?php echo YellowLine($prj['uname']); ?> <?php echo YellowLine($prj['usurname']); ?> </a> [<a href="/users/<?php
/** * Создает xml файл для Яндек.Работа * * @param $filename string полный путь к файлу куда webdav должен сохранить получившийся xml * @param $kind array типы проектов для выгрузки (поле kind в таблице projects) * @return text $filename полный путь к файлу куда webdav должен сохранить получившийся xml */ function yandexGenerateRss($filename, $kind) { global $DB; $rXml = iconv('CP1251', 'UTF-8', '<?xml version="1.0" encoding="utf-8"?>' . "\n" . '<!DOCTYPE source>' . "\n"); $rXml .= iconv('CP1251', 'UTF-8', '<source creation-time="' . date('Y-m-d H:i:s') . ' GMT+3" host="' . $host . '">' . "\n"); $rXml .= iconv('CP1251', 'UTF-8', ' <vacancies>' . "\n"); $sql = "SELECT \n p.id, p.post_date, p.name AS project_name, NULL AS cat_name, NULL AS subcat_name,\n co.country_name, ci.city_name, p.descr, p.moderator_status, p.create_date\n FROM projects p\n INNER JOIN employer e ON e.uid = p.user_id \n LEFT JOIN country co ON co.id = p.country \n LEFT JOIN city ci ON ci.id = p.city \n LEFT JOIN projects_blocked pb ON pb.project_id = p.id \n WHERE \n p.kind IN (?l) \n AND p.pro_only = false \n AND pb.project_id IS NULL\n AND p.closed = false \n AND e.is_banned < 1::bit\n AND p.post_date > DATE_TRUNC('hour', now() - interval '1 week')\n /*AND (p.moderator_status <> 0 OR p.moderator_status IS NULL)*/\n ORDER BY p.kind ASC, p.post_date DESC"; $host = str_replace(HTTP_PREFIX, '', $GLOBALS['host']); $HTTP_PREFIX = 'https://'; $res = $DB->query($sql, $kind); while ($row = pg_fetch_assoc($res)) { /*if ( $row['moderator_status'] == '0' ) { continue; }*/ $xml = ''; $row['categories'] = self::getProjectCategories($row['id']); // Yandex не пропускает вакансии с пустыми категориями if (empty($row['categories'])) { continue; } $city = $row['city_name'] ? $row['city_name'] : 'Москва'; $location = $row['country_name'] ? $row['country_name'] : 'Россия'; $location .= $location ? ', ' . $city : $city; $location = html_entity_decode($location, ENT_QUOTES, 'cp1251'); $name = html_entity_decode($row['project_name'], ENT_QUOTES, 'cp1251'); $cat = html_entity_decode($row['cat_name'], ENT_QUOTES, 'cp1251'); $descr = html_entity_decode($row['descr'], ENT_QUOTES, 'cp1251'); $func = create_function('$matches', 'ucwords($matches[0]);'); $name = preg_replace_callback('/([A-ZА-ЯЁ]+[\\!\\?\\.\\,\\;\\:\\"\\\'0-9\\s]+){2,}/', $func, $name); $descr = preg_replace_callback('/([A-ZА-ЯЁ]+[\\!\\?\\.\\,\\;\\:\\"\\\'0-9\\s]+){2,}/', $func, $descr); $xml .= ' <vacancy> <url>' . $HTTP_PREFIX . $host . getFriendlyUrl('project', $row['id']) . '</url> <creation-date>' . date('Y-m-d H:i:s', strtotimeEx($row['create_date'])) . ' GMT+3</creation-date> '; if ($row['create_date'] != $row['post_date']) { $xml .= '<update-date>' . date('Y-m-d H:i:s', strtotimeEx($row['post_date'])) . "</update-date>\r\n"; } if (!empty($row['categories'])) { $name_case = false; foreach ($row['categories'] as $cat) { $xml .= '<category> <industry>' . htmlspecialchars($cat['category_name'], ENT_QUOTES) . "</industry>\n"; if ($cat['subcategory_name']) { $xml .= '<specialization>' . htmlspecialchars($cat['subcategory_name'], ENT_QUOTES) . "</specialization>\n"; if ($cat['name_case']) { $name_case[] = $cat['name_case']; } } $xml .= " </category>\n"; } if ($name_case) { $name_case = implode(". ", $name_case) . ". "; } } $xml .= ' <job-name>' . htmlspecialchars($name_case . $name, ENT_QUOTES) . '</job-name>'; $xml .= '<description>' . htmlspecialchars($descr, ENT_QUOTES) . '</description> <addresses> <address> <location>' . htmlspecialchars($location, ENT_QUOTES) . "</location>\n </address>\n </addresses>\n <anonymous-company>\n <description />\n </anonymous-company>\n </vacancy>\n"; unset($name_case); $rXml .= iconv('CP1251', 'UTF-8//TRANSLIT', $xml); } $rXml .= iconv('CP1251', 'UTF-8', "</vacancies>\n</source>"); $file = new CFile(); return $file->putContent($filename, $rXml); }
/** * Отображает значек активности юзера на сайте (новая версия view_online_status) * * @param string $login логин юзера * @param boolean $full отображать ли строковую информацию ("Нет на сайте") * @return string HTML-код значка активности */ function view_online_status_new($login, $full = false, $nbsp = ' ', &$activity = NULL) { if ($login) { $last_ref = $this->getActivityByLogin($login); } $activity = $last_ref; $last_ref_unixtime = strtotime($last_ref); if ($last_ref && time() - $last_ref_unixtime <= 30 * 60) { $ago = ago_pub(strtotimeEx($last_ref)); if (intval($ago) == 0) { $ago = "менее минуты"; } /* return ($full ? "<span class='u-act' title=\"Последняя активность была ".$ago." назад\">На сайте</span>" : "{$nbsp}<img src=\"/images/dot_active.png\" class=\"u-act\" alt=\"Последняя активность была ".$ago." назад\" title=\"Последняя активность была ".$ago." назад\" />$nbsp");*/ return "<span class='b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_color_6db335 b-layouyt__txt_weight_normal'>На сайте.</span>"; } /*return ($full ? "<span class='u-inact'>Нет на сайте</span>" : "{$nbsp}<img src=\"/images/dot_inactive.png\" width=\"8\" height=\"9\" alt=\"Нет сайте\" class=\"u-inact\" title=\"Нет на сайте\" />$nbsp");*/ return "<span class='b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_color_808080 b-layouyt__txt_weight_normal'>Нет на сайте.</span>"; }
if (!$_in_setup) { header("HTTP/1.0 403 Forbidden"); exit; } require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/commune.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/country.php"; $countries = country::GetCountries(); require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/city.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/teams.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/notes.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php"; $recoms = new teams(); if ($user->birthday && !$error_flag) { $mnth = strftime("%m", strtotimeEx($user->birthday)); $day = strftime("%d", strtotimeEx($user->birthday)); $year = strftime("%Y", strtotimeEx($user->birthday)); } elseif ($error_flag) { $mnth = trim($_POST['datem']); $day = trim($_POST['dated']); $year = trim($_POST['datey']); $frl->login = $user->login; $user = $frl; } if ($user->birthday == "1910-01-01") { $mnth = 01; $day = ""; $year = ""; } if ($_SESSION['uid']) { $note = notes::GetNotes($_SESSION['uid'], null, $error); if (count($note) > 0) {
</title> <link><?php echo $host; echo getFriendlyUrl('blog', $theme['thread_id']); ?> </link> <description><![CDATA[<?php echo xmloutofrangechars(reformat($theme['msgtext'], 96, 1)); ?> ]]></description> <guid><?php echo md5($theme['post_time'] . '-' . $theme['id']); ?> </guid> <pubDate><?php echo date('D, d M Y H:i:s', strtotimeEx($theme['post_time'])) . ' GMT+3'; ?> </pubDate> <comments><?php echo $host; echo getFriendlyUrl('blog', $theme['thread_id']); ?> </comments> </item> <?php } } ?> </channel> </rss>
/** * Возвращает диалог при чтении переписки в потоке лички * * @param string $stream_id идентификатор потока * @param int $nFromId uid отправиля (то есть одного) * @param int $nToId uid получателя (то есть другого) * @param int $nMsgId id сообщения из которого смотрят переписку * @param int $nCurpage номер страницы * @return object xajaxResponse */ function getLetters($stream_id = '', $nFromId = 0, $nToId = 0, $nMsgId = 0, $nCurpage = 1) { global $user_content, $stop_words, $sTeam; $objResponse = new xajaxResponse(); $objResponse->script('user_content.spinner.hide(true);'); if ($user_content->hasContentPermissions(1)) { $aStream = array(); $checkStream = $user_content->checkStream(1, $stream_id, $_SESSION['uid'], $aStream); if ($checkStream) { require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php'; $aDialog = array(); $sDialog = ''; $oFromUser = new users(); $oFromUser->GetUserByUID($nFromId); $oToUser = new users(); $oToUser->GetUserByUID($nToId); if ($oFromUser->login && $oToUser->login) { require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/messages.php'; $oMsgs = new messages(); $aDialog = $oMsgs->GetMessagesForModers($nFromId, $oToUser->login, $nCurpage, 20); if ($aDialog) { $sProF = $oFromUser->is_pro == 't' ? (is_emp($oFromUser->role) ? view_pro_emp() : view_pro2($oFromUser->is_pro_test == 't' ? true : false)) . ' ' : ''; $sProT = $oToUser->is_pro == 't' ? (is_emp($oToUser->role) ? view_pro_emp() : view_pro2($oToUser->is_pro_test == 't' ? true : false)) . ' ' : ''; $sProF = $oFromUser->is_team == 't' ? $sTeam : $sProF; $sProT = $oToUser->is_team == 't' ? $sTeam : $sProT; foreach ($aDialog as $aOne) { $sClass = $aOne['from_id'] == $nFromId ? 'b-post__txt_color_a7a7a6' : ''; $sLogin = $aOne['from_id'] == $nFromId ? $oFromUser->login : $oToUser->login; $sName = $aOne['from_id'] == $nFromId ? $oFromUser->uname : $oToUser->uname; $sSurname = $aOne['from_id'] == $nFromId ? $oFromUser->usurname : $oToUser->usurname; $sIsChuck = $aOne['from_id'] == $nFromId ? $oFromUser->is_chuck : $oToUser->is_chuck; $sPro = $aOne['from_id'] == $nFromId ? $sProF : $sProT; $sAttach = ''; //$sClickD = 'user_content.delLetter('. $aOne['from_id'] .', \''. $aOne['id'] .'_'. ($aOne['id'] == $nMsgId ? '1' : '2') .'\')'; $sJSParams = "{'content_id': 1, 'stream_id': '{$stream_id}'}"; $sClickD = 'parent.banned.delReason(\'' . 1 . '_' . $aOne['id'] . '_0\', ' . $aOne['from_id'] . ', \'delLetter\', ' . $sJSParams . ')'; if ($aOne['files']) { $nn = 1; foreach ($aOne['files'] as $attach) { $aData = getAttachDisplayData($sLogin, $attach['fname'], 'contacts', 1000, 300, 307200, 0); if ($aData && $aData['success']) { if ($aData['file_mode'] || $aData['virus_flag'] || $att_ext == "swf") { $sAttach .= _parseAttach($aData); } else { $sAttach .= "<div class=\"b-fon__body b-fon__body_pad_5 b-fon__body_bg_ffebbf b-fon__body_margbot_1\"><img src=\"" . WDCPREFIX . '/users/' . $sLogin . '/contacts/' . $aData['file_name'] . "\" alt=\"{$aData['file_name']}\" title=\"{$aData['file_name']}\" width=\"{$aData['img_width']}\" height=\"{$aData['img_height']}\" /></div>"; } $nn++; } } $sAttach = _wrapAttach($sAttach); } $msg_text = $aOne['moderator_status'] === '0' ? $stop_words->replace($aOne['msg_text']) : $aOne['msg_text']; $msg_text = reformat($msg_text, 50, 0, -($sIsChuck == 't'), 1); $sDeleted = $aOne['deleted'] ? ' [Сообщение удалено модератором]' : ''; $sDialog .= ' <div class="b-post b-post_bordtop_dfe3e4 b-post_padtop_15 b-post_marg_20_10" id="my_div_content_' . $aOne['id'] . '_' . ($aOne['id'] == $nMsgId ? '1' : '2') . '"> ' . (!$aOne['deleted'] && ($aOne['moderator_status'] !== '0' || $aOne['moderator_status'] === '0' && $aOne['id'] == $nMsgId) ? '<a id="my_del_link_' . $aOne['id'] . '" onclick="' . $sClickD . '" class="b-button b-button_float_right b-button_mini" href="javascript:void(0);"><span class="b-button__icon b-button__icon_del"></span></a>' : '') . ' <div class="b-post__txt ' . $sClass . ' b-post__txt_fontsize_15">' . $sPro . '<span class="b-post__txt b-post__txt_bold ' . $sClass . '">' . $sName . ' ' . $sSurname . ' [' . $sLogin . ']</span> ' . date("d.m.y в H:i", strtotimeEx($aOne['post_time'])) . '<span id="my_deleted_' . $aOne['id'] . '" style="color:red;">' . $sDeleted . '</span>' . ':</div> <div class="b-post__txt ' . $sClass . ' b-post__txt_fontsize_15"> ' . $msg_text . ' </div> ' . $sAttach . ' </div> '; } $objResponse->append('my_div_contents', 'innerHTML', $sDialog); $objResponse->script("user_content.afterScroll();"); $objResponse->script("user_content.getLettersPage++;"); } } $objResponse->script('$("my_div_wait").destroy();'); } else { _loseStream($objResponse, $stream_id); } } else { _parsePermissionsDenied($objResponse); } $objResponse->script('user_content.spinner.resize();'); return $objResponse; }
?> <br /><br /> <?php } else { ?> <br /><?php echo !$row["offers_count"] || $row["offers_count"] % 10 == 0 || $row["offers_count"] % 10 > 4 || $row["offers_count"] > 4 && $row["offers_count"] < 21 ? '<a class="public_blue" href="' . $blink . '">' . $row["offers_count"] . ' предложений</a>' : ($row["offers_count"] % 10 == 1 || $row["comm_count"] == 1 ? '<a class="public_blue" href="' . $blink . '">' . $row["offers_count"] . ' предложение</a>' : '<a class="public_blue" href="' . $blink . '">' . $row["offers_count"] . ' предложения</a>'); ?> <br /><br /> <?php } ?> <br /> <div class="fl2_offer_meta">Прошло времени с момента публикации: <?php echo ago_pub_x(strtotimeEx($row['create_date'])); ?> <br /> Автор: <a href="/users/<?php echo $user->login; ?> "><?php print $user->uname . " "; print $user->usurname; ?> [<?php echo $user->login; ?> ]</a><br /> Раздел: <?php echo projects::getSpecsStr($row['id'], ' / ', ', ');
// Я ему никогда не писал. ?> Вы не ответили <?php } } else { // Он никогда мне не писал, а я писал. $i_am_last = 1; } if ($i_am_last) { if (strtotimeEx($contact['he_last_read']) > strtotimeEx($ihim)) { // Он читал сообщения после того как я ему написал. То есть, он прочел. ?> <img src="/images/ico_envelop_op.gif" alt="" width="10" height="12" style="border:0;" /> Ваше сообщение прочитано <?php echo date("d.m в H:i", strtotimeEx($contact['he_last_read'])); ?> <?php } else { ?> Ваше сообщение не прочитано <?php } } } ?> </div> <div class="vfolders"> <?php if ($folders) { foreach ($folders as $folder) {
function view_online_status($login, $full = false) { if ($login) { $last_ref = getActivityByLogin($login); } if ($last_ref) { $ago = ago_pub(strtotimeEx($last_ref)); if (intval($ago) == 0) { $ago = "менее минуты"; } return "<img src=\"" . $GLOBALS["host"] . "/images/dot_active.gif\" style=\"width:10px;height:10px;padding-right:3px;vertical-align:middle;\" alt=\"Последняя активность была " . $ago . " назад\" title=\"Последняя активность была " . $ago . " назад\" border=\"0\">" . ($full ? "<span class='u_active'>На сайте</span>" : ""); } return "<img src=\"" . $GLOBALS["host"] . "/images/dot_inactive.gif\" style=\"width:8px;height:9px;padding-right:3px;vertical-align:middle;\" alt=\"Нет на сайте\" title=\"Нет на сайте\" border=\"0\">" . ($full ? "<span class='u_inactive'>Нет на сайте</span>" : ""); }
?> " style="margin-left:10px;<?php if ($kind == 4) { print " text-decoration: underline;"; } ?> ">В офис</a> <td class="qph"> </td> </tr> <?php if ($prjs) { foreach ($prjs as $ikey => $prj) { ?> <tr class="qpr"> <td align="center" class="qp"><?php echo date("d.m", strtotimeEx($prj['post_date'])); ?> </td> <td class="qp"> <?php if ($prj['closed'] != "t") { ?> <a name="prj<?php echo $prj['id']; ?> " id="prj<?php echo $prj['id']; ?> " href="/users/<?php echo $prj['login']; ?>
$comments = $hist['comments']; if (in_array($hist['op_code'], array(sbr::OP_RESERVE, sbr::OP_DEBIT, sbr::OP_CREDIT))) { $scheme = strtotime($hist['op_date']) > mktime(0, 0, 0, 11, 1, 2012) ? sbr::SCHEME_LC : sbr::SCHEME_AGNT; $comments = sbr_meta::parseOpComment($comments, $user->login, is_emp($user->role), $scheme); } ?> <tr class="small" valign="baseline"> <td><a name="<?php echo $hist['id']; ?> "></a><?php echo $hist['id']; ?> </td> <td><?php echo date('d.m.Y | H:i', strtotimeEx($hist['op_date'])); ?> </td> <td><?php echo view_cost_format($hist['balance'], false); ?> </td> <td><?php echo ($hist['ammount'] > 0 ? '+' : '') . round($hist['ammount'], 2); ?> </td> <td><?php echo str_replace('%username%', $user->login, $hist['op_name']); ?> <br><br> <?php
$frl = new users(); $error .= $frl->UpdateSubscr2(get_uid(), array($newmsgs, $vacan, $comments, $opin, __paramInit('bool', NULL, 'prj_comments'), $commune_subscr, $commune_top_subscr, __paramInit('bool', NULL, 'adm_subscr'), __paramInit('bool', NULL, 'contest'), __paramInit('bool', NULL, 'team'), 0, $articlescomments, __paramInit('bool', NULL, 'spm'), 0, $paid_advice, __paramInit('bool', NULL, 'payment'))); if (!$error) { $info_msg = "Изменения внесены"; } break; case "inform_change": foreach ($_POST as $key => $value) { if (!is_array($value)) { $_POST[$key] = stripslashes($value); } } $frl = new employer(); if (trim($_POST['datey']) && trim($_POST['dated'])) { if (checkdate(intval(trim($_POST['datem'])), intval(trim($_POST['dated'])), intval(trim($_POST['datey'])))) { $frl->birthday = date("Y-m-d", strtotimeEx(trim($_POST['datey']) . "-" . trim($_POST['datem']) . "-" . trim($_POST['dated']))); } else { $error_flag = 1; $alert[1] = "Поле заполнено некорректно"; } } else { //$frl->birthday = "1910-01-01"; $error_flag = 1; $alert[1] = "Поле заполнено некорректно"; } if (!$alert[1] && $frl->birthday && date("Y", strtotime($frl->birthday)) >= date("Y")) { $error_flag = 1; $alert[1] = "Поле заполнено некорректно"; } $frl->country = intval(trim($_POST['country'])); $frl->city = intval(trim($_POST['pf_city']));
$comments = $hist['comments']; if (in_array($hist['op_code'], array(sbr::OP_RESERVE, sbr::OP_DEBIT, sbr::OP_CREDIT))) { $scheme = strtotime($hist['op_date']) > mktime(0, 0, 0, 11, 1, 2012) ? sbr::SCHEME_LC : sbr::SCHEME_AGNT; $comments = sbr_meta::parseOpComment($comments, $user->login, is_emp($user->role), $scheme); } ?> <tr class="small" valign="baseline"> <td><a name="<?php echo $hist['id']; ?> "></a><?php echo $hist['id']; ?> </td> <td><?php echo date("d.m.Y | H:i", strtotimeEx($hist['op_date'])); ?> </td> <td><?php echo view_cost_format($hist['balance'], false); ?> </td> <td><?php echo ($hist['ammount'] > 0 ? "+" : "") . round($hist['ammount'], 2); ?> </td> <td><?php echo str_replace('%username%', $user->login, $hist['op_name']); ?> <br><br> <?php
} $frl = new freelancer(); if (($datey = trim($_POST['datey'])) && ($dated = trim($_POST['dated']))) { if (!is_numeric($datey) || !is_numeric($dated) || !checkdate(intval(trim($_POST['datem'])), intval($dated), intval($datey))) { $error_flag = 1; $alert[1] = 'Поле заполнено некорректно'; } else { $frl->birthday = dateFormat('Y-m-d', $datey . '-' . trim($_POST['datem']) . '-' . $dated); } } else { //$frl->birthday = "1910-01-01"; $error_flag = 1; $alert[1] = 'Поле заполнено некорректно'; } //www.x.ru" onclick="alert(12345) if (!$alert[1] && $frl->birthday && date('Y', strtotimeEx($frl->birthday)) >= date('Y')) { $error_flag = 1; $alert[1] = 'Поле заполнено некорректно'; } $frl->country = intval(trim($_POST['country'])); $frl->city = intval(trim($_POST['pf_city'])); if ($frl->country <= 0) { $error_flag = 1; $alert['country'] = 'Выберите страну'; } if ($frl->city <= 0) { $error_flag = 1; $alert['city'] = 'Выберите город'; } $frl->site = change_q(substr(trimhttp(trim($_POST['site'])), 0, 96), true); $frl->icq = change_q(substr(trim($_POST['icq']), 0, 96), true);
<?php if ($_SESSION['uid']) { if ($ban_where) { $ban = $user->GetBan($_SESSION['uid'], $ban_where); ?> <div><a name="bottom"></a> <h1>Команда Free-lance.ru заблокировала вам возможность оставлять записи в сервисе «Блоги» <?php echo $ban["to"] ? "до " . date("d.m.Y H:i", strtotimeEx($ban["to"])) . ' ' : ''; ?> по причине: <?php echo reformat($ban["comment"], 24, 0, 0, 1, 24); ?> </h1> <br /> <br /> Если у вас возникли вопросы, напишите нам на <a href="mailto:info@free-lance.ru">info@free-lance.ru</a><br /> <br /> </div> <?php } elseif ($_SESSION['uid'] && (!$read_only || $read_only && !$mod)) { ?> <script type="text/javascript">draft_type = 3;</script> <div id="editmsg"><a name="bottom"></a> <?php $count_drafts = drafts::CheckBlogs($uid);
<?php echo printBanner240(false); ?> <!-- end of Banner 240x400 --> </div> <div class="b-layout__one"> <?php if ($ban['reason'] == 4) { ?> <h1 class="b-page__title">Аккаунт удален</h1> <div class="b-layout__txt b-layout__txt_padbot_20">Если у вас есть вопросы — напишите в <a href="http://feedback.fl.ru" target="_blank">службу поддержки</a></div> <?php } else { ?> <h1 class="b-page__title">Аккаунт заблокирован <?php echo $ban['to'] ? 'до ' . date('d.m.Y H:i', strtotimeEx($ban['to'])) : ''; ?> </h1> <div class="b-layout__txt b-layout__txt_padbot_20"> <?php switch ($ban['reason']) { case 1: // print "<br/>Причина: Крайне некорректное поведение на сайте"; break; case 2: print 'Причина: Спам в блогах'; break; case 3: print 'Причина: Спам в проектах'; break; default:
<?php echo seo_end(); ?> <?php if ($theme['yt_link']) { // Не понял зачем это надо, всеравно ничего здесь не выводится show_video($theme['id'], $theme['yt_link']); } if ($ord == 'relevant') { if ($theme['num'] > 1) { ?> <table align="right" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td class="lastime" align="right">Последний комментарий был <?php echo time() - strtotimeEx($theme['last_activity']) < 60 ? "только что" : ago_pub(strtotimeEx($theme['last_activity'])) . " назад"; ?> </td> </tr> </table> <?php } /* else { ?> Комментариев еще не было <? } */ }
/** * Генерирует информацию про юзера, по его данным, в HTML-код (новая версия) * * @global session $session * @param type $user * @return $session */ function view_user3($user, $query_link = "") { global $session; if (is_object($user)) { $user = get_object_vars($user); } $is_emp = is_emp($user['role']); $is_emp_pfx = $is_emp ? 'e' : 'f'; $is_emp_pfx = $user['is_pro_test'] === 't' ? 'test' : $is_emp_pfx; $login = $user['login']; $link = '/users/' . $login; $login_cls = $is_emp ? '6db335' : 'fd6c30'; $username = $user['uname'] . ' ' . $user['usurname']; $html = $session->view_online_status($login) . '<a class="b-username__link b-username__link_color_000 b-username__link-empty" href="' . $link . $query_link . '">' . $username . '</a> <span class="b-username__login-mark"> <span class="b-username__login b-username__login_color_' . $login_cls . '">[<a class="b-username__link b-username__link_color_' . $login_cls . '" href="' . $link . $query_link . '">' . $login . '</a>]</span>'; //$pro = ' ' . view_profi(); $is_pro = $user['is_pro'] == 't' || $user['is_pro_tes'] == 't'; $html .= ($is_pro || $user['is_team'] == 't' || @$user['is_profi'] == 't' ? ' ' : '') . '<span class="b-username__marks">'; if (@$user['is_profi'] == 't') { $html .= view_profi(); } else { if ($is_pro && $user['is_team'] == 'f') { /* $is_emp_pfx = $is_emp_pfx . 'pro'; */ $title = 'PRO'; $html .= $is_emp ? view_pro_emp() : view_pro(); } } if ($user['is_team'] == 't') { $is_emp_pfx = 'team'; $title = 'Команда Free-lance.ru'; $html .= view_team_fl(); //$html .= ' <a class="b-layout__link" href="/about/team/" target="_blank"><span alt="Платный аккаунт" title="Платный аккаунт" class="b-icon b-icon__pro b-icon__pro_' . $is_emp_pfx . ' "></span></a>'.(is_verify($login)? view_verify():''); } $is_verify = !empty($user['is_verify']) ? $user['is_verify'] == 't' : is_verify($login); $html .= ($is_verify ? view_verify() : '') . '</span>'; $status = $session->getActivityByLogin($user['login']); $last_ref_unixtime = strtotime($status); if ($status && time() - $last_ref_unixtime <= 30 * 60) { $ago = ago_pub(strtotimeEx($status)); if (intval($ago) == 0) { $ago = "менее минуты"; } /* $html .= ' <span class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_color_fd6c30 b-layouyt__txt_weight_normal">На сайте</span>';*/ } else { /* $html .= ' <span class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_color_808080 b-layouyt__txt_weight_normal">Нет на сайте</span>';*/ } $html .= '</span>'; return $html; }
/** * @todo НЕ ИСПОЛЬЗУЕТСЯ * * @deprecated since 0026073 * * Рассылка о новых проектах. Вызывается раз в день из hourly.php * * @param array $uids - массив идентификаторов пользователей, которым уже отправленя новая рассылка (см. NewProjForMissingMoreThan24h) * * @return int количество получивших рассылку */ public function NewProj($uids) { $projects = projects::GetNewProjects($error, true, 600, 50); $groups = professions::GetAllGroupsLite(true); $page = 0; $count = 0; if (empty($projects)) { return 0; } $this->subject = 'Новые проекты на FL.ru'; $message = '<p> Данное письмо отправлено почтовым роботом сервера FL.ru и не требует ответа. </p> <p> На сайте <a href="' . $GLOBALS['host'] . $this->_addUrlParams('f') . '">' . $GLOBALS['host'] . '</a> опубликованы новые Проекты </p> %MESSAGE% <p> Если вы хотите оперативно получать информацию об опубликованных на FL.ru проектах, скачайте и установите бесплатное приложение-информер <a href="' . $GLOBALS['host'] . '/promo/freetray/' . $this->_addUrlParams('f') . '">Free-tray</a>. </p>'; $this->message = $this->GetHtml('%USER_NAME%', $message, array('header' => 'default', 'footer' => 'default'), array('target_footer' => true)); $this->recipient = ''; $massId = $this->send('text/html'); foreach ($projects as $i => $prj) { $url = $GLOBALS['host'] . getFriendlyURL('project', $projects[$i]['id']); $projects[$i]['html'] = array('post_date' => date('d.m.y', strtotimeEx($prj['post_date'])), 'name' => $prj['name'] ? reformat($prj['name'], 100, 0, 1) : '', 'descr' => reformat($prj['descr'], 100, 0, 1), 'url' => "<a href='{$url}{$this->_addUrlParams('f')}'>{$url}</a>"); } while ($users = freelancer::GetPrjRecps($error, ++$page, 50, $uids)) { $this->recipient = array(); foreach ($users as $user) { if (empty($user['mailer'])) { continue; } $subj = array(); foreach ($groups as $group) { if (freelancer::isSubmited($user['mailer_str'], array(array('category_id' => $group['id'])))) { $subj[$group['id']] = $group['name']; } } $lastKind = 0; $message = ''; foreach ($projects as $prj) { if (!freelancer::isSubmited($user['mailer_str'], $prj['specs'])) { continue; } if ($lastKind != $prj['kind']) { $kindName = ''; switch ($prj['kind']) { case 1: $kindName = 'Попроектно'; break; case 2: $kindName = 'Конкурсы'; break; case 3: $kindName = 'На зарплату'; break; case 4: $kindName = 'В офис'; break; case 7: $kindName = 'Конкурсы'; break; } $message .= "\n"; $message .= "<div>-----------------------------------------------------------------------------------</div>\n"; $message .= "<div>{$kindName}</div>\n"; $message .= "<div>-----------------------------------------------------------------------------------</div>\n"; $lastKind = $prj['kind']; } $message .= "\n<div> </div><div>-----</div>\n"; $message .= "<div>{$prj['html']['post_date']}</div>\n"; $message .= "<div>{$prj['html']['name']}</div>\n"; $message .= "<div>-----</div>\n"; $message .= "<div>{$prj['html']['descr']}</div>\n"; $message .= "<div>{$prj['html']['url']}</div>\n"; $message .= "<div>-----------------------------------</div>\n"; } if (empty($message)) { continue; } $message = '<div>(' . implode('/', $subj) . ')</div><div> </div>' . $message; if (!$user['unsubscribe_key']) { $user['unsubscribe_key'] = users::GetUnsubscribeKey($user['login']); } $this->recipient[] = array('email' => $user['uname'] . ' ' . $user['usurname'] . ' [' . $user['login'] . '] <' . $user['email'] . '>', 'extra' => array('USER_NAME' => $user['uname'], 'USER_SURNAME' => $user['usurname'], 'USER_LOGIN' => $user['login'], 'MESSAGE' => $message, 'UNSUBSCRIBE_KEY' => $user['unsubscribe_key'])); ++$count; } $this->bind($massId, true); } return $count; }
function openlevel($thread, $mod, $begin, $end, $thispage, $blog_thread, $lastlink, $ord) { require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/blogs.php"; global $session; session_start(); $uid = $_SESSION['uid']; $objResponse = new xajaxResponse(); $blog = new blogs(); $ret = ''; $cur_user_msgs = array(); list($gr_name, $gr_id, $gr_base) = $blog->GetThread($thread, $err, $mod, get_uid(false)); $blog->GetThreeId($begin, $threearr, 0); $parent_login = $blog->login; while ($blog->GetNext()) { $stopwrite = true; foreach ($threearr as $temp) { if ($blog->id == $temp) { $stopwrite = false; break; } } if ($stopwrite) { continue; } $msg_num++; $allow_del = 0; if ($last_id == $blog->id) { print "<a name=\"post\" id=\"post\"></a>"; } if ($blog->id == $edit_id && $blog->login == $_SESSION['login']) { print "<a name=\"edit\" id=\"edit\"></a>"; } if ($blog->attach) { $str = viewattachLeft($blog->login, $blog->attach, "upload", $file, 1000, 600, 307200, !$blog->small, $blog->small == 2 ? 1 : 0); } $padding = $blog->level > 19 ? 380 : $blog->level * 20; if (in_array($blog->reply, $cur_user_msgs)) { $allow_del = 1; } if ($blog->login == $_SESSION['login']) { $cur_user_msgs[] = $blog->id; } $ret .= '<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr valign="top" '; $ret .= '><td style="'; if ($blog->level) { $ret .= 'padding-left: ' . $padding . 'px;'; } $ret .= 'padding-right: 10px;">' . view_avatar($blog->login, $blog->photo) . ' </td> <td class="bl_text" width="100%">'; if ($winner == $blog->id) { $ret .= '<a name="winner" id="winner"></a> '; } if ($blog->payed) { $ret .= view_pro(); } $ret .= $session->view_online_status($blog->login); $ret .= '<font class="' . $blog->cnt_role . 'name11"><a href="/users/' . $blog->login . '" class="' . $blog->cnt_role . 'name11" title="' . ($blog->uname . " " . $blog->usurname) . '">' . ($blog->uname . " " . $blog->usurname) . '</a> [<a href="/users/' . $blog->login . '" class="' . $blog->cnt_role . 'name11" title="' . $blog->login . '">' . $blog->login . '</a>]</font> ' . date("[d.m.Y | H:i]", strtotimeEx($blog->post_time)); if ($blog->deleted) { if (isset($blog->thread) && is_array($blog->thread) && count($blog->thread) > 0) { $buser_id = $blog->thread; $buser_id = array_pop($buser_id); $buser_id = $buser_id['fromuser_id']; } if ($blog->deluser_id == $blog->fromuser_id) { $ret .= '<br><br>Комментарий удален автором ' . date("[d.m.Y | H:i]", strtotimeEx($blog->deleted)); } elseif ($blog->deluser_id == $buser_id) { $ret .= '<br><br>Комментарий удален автором темы ' . date("[d.m.Y | H:i]", strtotimeEx($blog->deleted)); } else { $ret .= '<br><br>Комментарий удален модератором'; if (!$mod) { $ret .= '( '; $del_user = $user->GetName($blog->deluser_id, $err); $ret .= $del_user['login'] . ' : ' . $del_user['usurname'] . ' ' . $del_user['uname']; $ret .= ' ) '; } $ret .= date("[d.m.Y | H:i]", strtotimeEx($blog->deleted)); } $ret .= '<br><br>'; } else { if ($blog->modified) { $ret .= ' '; if ($blog->modified_id == $blog->fromuser_id) { $ret .= '[внесены изменения: ' . date("d.m.Y | H:i]", strtotimeEx($blog->modified)); } else { $ret .= 'Отредактировано модератором'; if (!$mod) { $ret .= '( '; $mod_user = $user->GetName($blog->modified_id, $err); $ret .= $mod_user['login'] . ' : ' . $mod_user['usurname'] . ' ' . $mod_user['uname']; $ret .= ' ) '; } $ret .= ' ' . date("[d.m.Y | H:i]", strtotimeEx($blog->modified)); } } $ret .= '<br>'; if ($winner == $blog->id) { $ret .= '<font color="#000099" style="font-size:20px">Победитель</font>'; } $ret .= '<br>'; if ($blog->new == 't') { $ret .= '<img src="/images/ico_new_blog.gif" alt="" width="44" height="12" border="0"><br>'; } if ($blog->title) { $ret .= ' <font class="bl_name">'; if ($blog->login == "Anonymous") { list($name, $mail) = sscanf($blog->title, "%s @@@: %s"); $ret .= $name . " " . $mail; } else { $ret .= reformat($blog->title, 30); } $ret .= '</font><br>'; } $ret .= reformat($blog->msgtext, 50) . '<br>'; if ($blog->attach) { if ($file) { $ret .= "<br>" . $str . "<br>"; } else { $ret .= "</td></tr><tr class=\"qpr\"><td colspan=\"2\"><br>" . $str; } } $ret .= '<br>'; if ($gr_base == 5 && !$winner && $parent_login == $_SESSION['login']) { $ret .= "<input type=\"submit\" name=\"btn\" value=\"Это победитель\" onClick=\"if (warning(0)) window.location.replace('./view.php?tr=" . $thread . "&ord='.{$ord}.'&winner=" . $blog->id . "'); else return false;\">"; } $ret .= '<div style="color: #D75A29;font-size:9px;'; if ($blog->attach && !$file) { $ret .= ' padding-left: ' . ($padding + 60) . 'px;'; } $ret .= '">'; if ($blog->login == $_SESSION['login'] || $parent_login == $_SESSION['login'] || $allow_del || !$mod) { $ret .= ' <a href="' . $form_uri . '?id=' . $blog->id . '&action=delete&ord=' . $ord . '" style="color: #D75A29;" onclick="return warning(1);">Удалить</a> |'; } if ($blog->login == $_SESSION['login'] || !$mod) { $ret .= '<a href="' . $form_uri . '?id=' . $blog->id . '&action=edit&ord=' . $ord . '&tr=' . $thread . '" style="color: #D75A29;">Редактировать</a> |'; } $ret .= "<a href=\"javascript: void(0);\" onclick=\"javascript: answer('" . $blog->id . "', '" . ($blog->attach ? $blog->attach : '') . "', '" . get_login($_SESSION["uid"]) . "'); document.getElementById('frm').olduser.value = '" . $_SESSION["uid"] . "'; \" "; $ret .= 'style="color: #D75A29">Комментировать</a> | <a href="/blogs/view.php' . "?tr=" . $blog_thread . ($thispage ? "&pagefrom=" . $thispage : "") . "&openlevel=" . $blog->id . "&ord=" . $ord . "#o" . $blog->id . '" style="color: #D75A29">Ссылка</a> </div> </td> </tr> <tr'; if (!$blog->level || $lastlink == $blog->id) { $ret .= ' class="qpr"'; } $ret .= '><td colspan="2" ><br></td></tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="n_qpr"><td colspan="3" id="form' . $blog->id . '">'; if ($blog->id == $edit_id && ($blog->login == $_SESSION['login'] || !$mod)) { $ret .= "\n\t\t\t<script language=\"JavaScript\" type=\"text/javascript\">\n\t\t\t<!--\n\t\t\tanswer(" . $blog->id . ", '" . ($blog->attach ? $blog->attach : '') . "', '" . get_login($_SESSION["uid"]) . "');\n\t\t\tdocument.getElementById('frm').olduser.value = '" . $_SESSION["uid"] . "';\n\t\t\tdocument.getElementById('frm').msg_name.value = '" . $error_flag ? input_ref_scr($msg_name) : input_ref_scr($blog->title) . "';\n\t\t\tdocument.getElementById('frm').msg.value = '" . $error_flag ? input_ref_scr($msg) : input_ref_scr($blog->msgtext) . "';\n\t\t\tdocument.getElementById('frm').btn.value = 'Сохранить';\n\t\t\tdocument.getElementById('frm').action.value = 'change';\n\t\t\t//-->\n\t\t\t</script>"; } } $ret .= "</td></tr>\n\t\t</table>"; } $objResponse->assign($begin, "innerHTML", $ret); return $objResponse; }
/** * Печатаем один узел. * * @param array $n Данные узла */ function viewTreeNode(&$n) { global $clearQueryStrOpen, $uid, $session, $blog; $overlvl = $n['level'] >= 4; $rlvl = ($n['level'] >= 4 ? 4 : $n['level']) - 1; echo '<li class="bg-li">'; echo '<a name="o' . $n['id'] . '"></a>'; echo pda::pda_info_user(array("login" => $n['login'], "uname" => $n['uname'], "usurname" => $n['usurname'], "photo" => $n['photo'], "is_team" => $n['is_team']), $n['payed'] == 't', is_emp($n['role']), $session->getActivityByLogin($n['login']), ", " . date("d.m.Y | H:i", strtotimeEx($n['post_time']))); echo '<div class="bg-cmt-o" ' . ($_GET['openlevel'] == $n['id'] ? 'style="background-color: #fff7dd;"' : '') . '>'; $bb = $blog->thread; $buser_id = array_pop($bb); $buser_id = $buser_id['fromuser_id']; if ($n['deleted']) { if ($n['deluser_id'] == $n['fromuser_id']) { echo "<p>Комментарий удален автором " . date("[d.m.Y | H:i]", strtotime($n['deleted'])) . "<p>"; } elseif ($n['deluser_id'] == $buser_id) { echo "<p>Комментарий удален автором темы " . date("[d.m.Y | H:i]", strtotimeEx($n['deleted'])) . "</p>"; } else { echo "<p>Комментарий удален модератором " . date("[d.m.Y | H:i]", strtotime($n['deleted'])) . "</p>"; } } elseif ($n['is_banned'] && !hasPermissions('blogs')) { echo "<p>Ответ от заблокированного пользователя</p>"; } else { echo '<h4>' . reformat($n['title'], round(20 - $rlvl * 2.3), 0, 1) . '</h4>'; echo '<p>' . reformat($n['msgtext'], round(20 - $rlvl * 2.3), 0, 0, 1) . '</p>'; if ($n['yt_link']) { echo '<p>' . reformat($n['yt_link'], round(20 - $rlvl * 2.3)) . '</p>'; } } if ($n['attach'] && (!$n['deleted'] && !$n['is_banned'] || hasPermissions('blogs'))) { foreach ($n['attach'] as $attach) { echo pda::viewattachLeft($n['login'], $attach['fname'], "upload", $file, 200, 250, 307200, !$attach['small'], $attach['small'] == 2 ? 1 : 0, 1); } echo "<br/>"; } if (!$n['deleted'] && (!$n['is_banned'] || hasPermissions('blogs'))) { $parseURL = parse_url($_SERVER['REQUEST_URI']); echo '<div class="bg-cmt-in"> '; if ($uid == $n['fromuser_id'] || $buser_id == $uid) { echo '<a href="/alert.php?alert=comment&id=' . $n['id'] . '&tr=' . intval($_GET['tr']) . '">Удалить</a> / '; } if ($uid == $n['fromuser_id']) { echo '<a href="' . $parseURL['path'] . '?action=edit&id=' . $n['id'] . '&editcnt">Редактировать</a> / '; } echo '<a href="' . ($uid ? $parseURL['path'] . "?" . "openlevel=" . $n['id'] . "&ord=" . $_GET["ord"] . "&newcnt=1" : "/fbd.php") . '">Комментировать</a> / <a href="' . $parseURL['path'] . "?" . "openlevel=" . $n['id'] . "&ord=" . $_GET["ord"] . "#o" . $n['id'] . '">#</a>'; echo '</div>'; } echo '</div>'; if (!$overlvl) { self::viewTreeNodes($n); } echo '</li>'; if ($overlvl) { self::viewTreeNodes($n, '', ''); } }
/** * Сообщение об изменении блога (пост/комментарий). * * @param int $rec_type 1- пост, 2 - комментарий * @param string $title заголовок блога * @param string $post_time дата создания блога * @param string $uname имя автора блога * @param string $usurname фамилия автора блога * @param string $login логин автора блога * @param string $reason причина изменений * * @return @see messages::Add() */ public function blogModifiedNotification($rec_type = 0, $title = '', $post_time = '', $uname = '', $usurname = '', $login = '', $reason = '') { $sFeedback = str_replace('//', '/{службу поддержки}/', $GLOBALS['host'] . '/about/feedback/'); $sKind = $rec_type == 1 ? 'ваше сообщение в блоге' : 'ваш комментарий в блоге'; $sRason = $reason ? "\n\nПричина: " . $reason : ''; $message = "\n{$uname} {$usurname}!\n\nМодераторы нашего ресурса отредактировали {$sKind}" . (trim($title) != '' ? ' «' . $title . '»' : '') . ' от ' . date('d.m.Y', strtotimeEx($post_time)) . ':' . $sRason . "\n\nВы можете обратиться в {$sFeedback}.\n\nНадеемся на понимание, Команда Free-lance.ru."; self::Add(users::GetUid($err, 'admin'), $login, $message, '', 1); }
/** * Информация о заказе в HTML по id в account_operations: логин, имя пользователя, где размещено, время действия. * @param integer $bill_id id операции в account_operations * @param integer $uid uid пользователя * @return string данные о заказе в виде HTML */ function GetOrderInfo($bill_id, $uid) { global $DB; $sql = "SELECT uname, usurname, login, ammount, op_code, acc, bill\n FROM (SELECT ammount,op_code, \n CASE WHEN ammount < 0 THEN to_uid ELSE from_uid END as acc,\n billing_to_id as bill\n\t\t\t\tFROM account_operations, present \n\t\t\t\tWHERE account_operations.id=?i AND (billing_to_id = account_operations.id AND to_uid = ?i OR\n\t\t\t\tbilling_from_id = account_operations.id AND from_uid = ?i)) as a LEFT JOIN users ON a.acc = uid"; $row = $DB->row($sql, $bill_id, $uid, $uid); // list($uname, $usurname, $login, $ammount, $op_code) = $row; //так чего-то не работает $uname = $row['uname']; $usurname = $row['usurname']; $login = $row['login']; $ammount = $row['ammount']; $op_code = $row['op_code']; $acc = $row['acc']; $bill = $row['bill']; $direction = (int) $ammount == 0 ? 'от' : 'для'; if (($op_code == 17 || $op_code == 18) && $ammount < 0) { $out = "Первая страница {$direction} <a href=\"/users/" . $login . "\" class=\"blue\">" . $uname . " " . $usurname . " [" . $login . "]</a>"; } elseif ($op_code == 84 || $op_code == 85) { // размещение в каталоге в подарок $out = "Размещение в каталоге {$direction} <a href=\"/users/" . $login . "\" class=\"blue\">" . $uname . " " . $usurname . " [" . $login . "]</a>"; $sql = "\n SELECT from_date, (from_date+to_date) as to_date, profession FROM users_first_page\n\t\t\tWHERE billing_id=?i AND user_id=?i"; $row = $ammount < 0 ? $DB->row($sql, $bill, $acc) : $DB->row($sql, $bill_id, $uid); if ($row) { include_once $_SERVER['DOCUMENT_ROOT'] . '/classes/professions.php'; $prof = professions::GetProfNameWP($row['profession']); $out .= " c " . date("d.m.Y | H:i", strtotimeEx($row['from_date'])) . " по " . date("d.m.Y | H:i", strtotimeEx($row['to_date'])); $out .= $op_code == 85 ? ' в разделе «' . $prof . '»' : ''; } } else { $sql = "\n SELECT from_date, (from_date+to_date) as to_date, professions.id, name FROM users_first_page LEFT JOIN professions ON profession=professions.id\n\t\t\tWHERE billing_id=?i AND user_id=?i"; $row = $DB->row($sql, $bill_id, $uid); if ($row) { $out = "С " . date("d.m.Y | H:i", strtotimeEx($row['from_date'])) . " по " . date("d.m.Y | H:i", strtotimeEx($row['to_date'])); if ($row['id'] > 0) { $out .= " в разделе «" . $row['name'] . "»"; } } } return $out; }
?> ]]></description> <?php } else { ?> <description><![CDATA[<?php echo str_replace('<br', '<br /', $prj['descr']); ?> ]]></description> <?php } ?> <guid><?php echo $prj_link; ?> </guid> <category><![CDATA[<?php echo $projects->getSpecsStr($prj['id'], ' / ', ']]></category><category><![CDATA['); ?> ]]></category> <pubDate><?php echo gmdate('D, d M Y H:i:s', strtotimeEx($prj['post_date'])); ?> GMT</pubDate> </item> <?php } } ?> </channel> </rss>
/** * Уведомление об удалении предложений фрилансеров * * @param mixed $mId ID предложения фрилансера / массив ID предложений фрилансеров */ function freelancerOfferBlockedNotification($mId) { $sId = !is_array($mId) ? array($mId) : $mId; $sQuery = 'SELECT o.title, o.post_date, o.reason, f.uid, f.login, f.uname, f.usurname FROM freelance_offers o INNER JOIN freelancer f ON f.uid = o.user_id WHERE o.id IN (?l)'; $aOffers = $GLOBALS['DB']->rows($sQuery, $sId); if ($aOffers) { require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/messages.php'; foreach ($aOffers as $aOne) { $sMessage = 'Здравствуйте, ' . $aOne['uname'] . ' ' . $aOne['usurname'] . ' Сожалеем, но из-за нарушения Правил модераторы сайта вынуждены были заблокировать вашу услугу «' . $aOne['title'] . '» от ' . date('d.m.Y', strtotimeEx($aOne['post_date'])) . ' в разделе «Сделаю» Причина блокировки: ' . $aOne['reason'] . ' Просим вас впредь быть внимательнее при публикации услуг и соблюдать Правила сайта. Это сообщение было отправлено автоматически и не требует ответа. Надеемся на понимание, Команда FL.ru '; messages::Add(users::GetUid($err, 'admin'), $aOne['login'], $sMessage, '', 1); } } }
?> </td> <td></td> </tr> <?php if ($user->birthday && $user->birthday > '1910-01-01') { ?> <tr> <th>Дата рождения:</th> <td> <?php echo dateFormat('d.m.y', $user->birthday); ?> (Возраст: <?php echo ElapsedYears(strtotimeEx($user->birthday)); ?> ) </td> <td></td> </tr> <?php } ?> <?php if ($val = $user->sex) { ?> <tr> <th>Пол:</th> <td><?php
} else { ?> Отредактировано модератором <?php if (!$mod) { ?> ( <?php $mod_user = $user->GetName($blog->modified_id, $err); print $mod_user['login'] . ' : ' . $mod_user['usurname'] . ' ' . $mod_user['uname']; ?> ) <?php } ?> <?php echo date("[d.m.Y | H:i]", strtotimeEx($blog->modified)); ?> <?php } ?> <?php } ?> </span> <?php if ($blog->is_banned && hasPermissions('blogs')) { ?> <span style="color:#000" ><b>Пользователь забанен.</b></span> <?php } ?>