</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>
" class="b-check__input" type="checkbox" name="del_draft[]" value="<?php echo $draft['id']; ?> " onClick="DraftsCheckToggleDeleteAll(this);" /></div></td> <td class="b-layout__one b-layout__one_bordbot_ccc b-layout__one_padtb_10"><div class="b-layout__txt"> <?php if ($is_ban || $draft['is_blocked']) { ?> <?php echo $draft['title'] != '' ? reformat(htmlspecialchars($draft['title']), 27, 0, 1) : '[без названия]'; ?> <?php } else { ?> <a class="b-layout__link" href="<?php echo $draft['post_id'] ? getFriendlyUrl('blog', $blogmsg['thread_id']) . "?id={$draft['post_id']}&draft_id={$draft['id']}&action=edit" : getFriendlyUrl('blog_group', $draft['category']) . "?draft_id={$draft['id']}#bottom"; ?> "><?php echo $draft['title'] != '' ? reformat(htmlspecialchars($draft['title']), 27, 0, 1) : '[без названия]'; ?> </a> <?php } ?> </div> </td> <td class="b-layout__one b-layout__one_bordbot_ccc b-layout__one_padtb_10"><div class="b-layout__txt"><a class="b-layout__link b-layout__link_color_6db335" href="/blogs/viewgroup.php?gr=<?php echo $draft['category']; ?> "><?php echo $draft['category_title'];
<height>18</height> </image> <managingEditor>info@fl.ru</managingEditor> <webMaster>info@fl.ru</webMaster> <?php if ($prjs) { foreach ($prjs as $ikey => $prj) { /*if ( $prj['moderator_status'] === '0' ) { continue; }*/ $prj['descr'] = str_replace('"', '"', $prj['descr']); $prj['descr'] = xmloutofrangechars($prj['descr']); $prj['name'] = html_entity_decode($prj['name'], ENT_QUOTES, 'cp1251'); $prj['name'] = xmloutofrangechars($prj['name']); $prj_cost = str_replace('€', 'Euro', view_cost2($prj['cost'], '', '', false, $prj['currency'])); $prj_link = HTTP_PREFIX . $_SERVER['HTTP_HOST'] . getFriendlyUrl('project', $prj['id']); ?> <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
session_start(); $uid = get_uid(false); $_SESSION["requestedRole"] = $requestedRole = __paramInit("string", "type"); $_user_action = isset($_REQUEST['user_action']) && $_REQUEST['user_action'] ? substr(htmlspecialchars($_REQUEST['user_action']), 0, 100) : ''; // Зарегистрированным в той же роли пользователям доступ к странице закрыт if ($uid) { if ($_SESSION['role'][0] == 1 && $requestedRole == "empl" || $_SESSION['role'][0] == 0 && $requestedRole != "empl") { include $_SERVER['DOCUMENT_ROOT'] . "/403.php"; exit; } } /**/ // Фрилансер хочет ответить на проект, запоминаем проект, чтобы после рег/авт перекинуть его сразу на него $from_prj = isset($_GET['from_prj']) ? intval($_GET['from_prj']) : 0; if ($from_prj) { $url_prj = getFriendlyUrl('project', $from_prj); $_SESSION['ref_uri'] = $url_prj . '#new_offer'; $_SESSION['ref_uri2'] = $from_prj; } $redirectUriPlain = urldecode($_SESSION['ref_uri']); if ($hash = __paramInit('string', 'hash', 'hash')) { if (in_array($_user_action, array('add_vacancy', 'add_project'))) { $kind = $_user_action == 'add_vacancy' ? 4 : 1; $redirectUriPlain = '/public/?step=1&kind=' . $kind; } if (strpos($redirectUriPlain, 'hash=') === false) { $redirectUriPlain .= (strpos($redirectUriPlain, '?') === false ? '?' : '&') . 'hash=' . $hash; } } $redirectUri = urlencode($redirectUriPlain); $action = __paramInit('string', null, 'action');
} $promoCodes = new PromoCodes(); $quickPRO_redirect = ''; $quickpro_ok_default = 'quickpro_ok'; switch ($quickPRO_type) { case 'profi': $quickPRO_title = 'Покупка аккаунта PROFI'; $quickPRO_ok_close_btn = 'Закрыть'; $quickpro_ok_default = 'quickprofi_ok'; $quickpro_ok_title = 'Вы успешно купили аккаунт PROFI'; $quickpro_ok_subtitle = ''; break; case 'project': $quickPRO_title = 'Покупка аккаунта Pro для ответа на проект'; $quickPRO_ok_close_btn = 'Закрыть и ответить на проект'; $quickPRO_redirect = getFriendlyUrl('project', $project['id']); break; case 'promotion': $quickPRO_redirect = '/promotion/'; default: $quickPRO_title = 'Покупка аккаунта Pro'; $quickPRO_ok_close_btn = 'Закрыть'; break; } if (!isset($_SESSION['quickbuypro_success_opcode'])) { $_GET[$quickpro_ok_default] = false; } $platipotom = new platipotom(true); $platipotomMaxSum = (int) $platipotom->getMaxPrice(0); ?>
/** * Создает 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); }
$theme = $groups[$i]; if (in_array($theme['id'], blogs::$copiny_group)) { $feedback_copiny[] = $theme; continue; // Перенесли в архив #0023264 } $love = (int) $theme['id'] == 55; if ($love && !$allow_love) { continue; } $tname = $theme['t_name']; //if ($theme['id'] == 7 && $theme['t'] == 0) $tname = "<strong>".$theme['t_name']."</strong>"; if ($theme['id'] == $gr && $base == $theme['t']) { $group_line .= $addit . "<li" . ($love ? ' style="background: url(/images/icons/heart.png) no-repeat 2px 7px;" ' : '') . ($i == $size - 1 ? " class=\"last\"" : "") . ">" . ($love ? '<span id="love_time_simple" style="float:right">00:00:00</span>' : '') . $theme['t_name'] . " (" . zin($theme['num']) . ")</li>\n"; } else { $group_line .= $addit . "<li" . ($love ? ' style="background: url(/images/icons/heart.png) no-repeat 2px 7px;" ' : '') . ($i == $size - 1 ? " class=\"last\"" : "") . ">" . ($love ? '<span id="love_time_simple" style="float:right">00:00:00</span>' : '') . "<a href=\"" . getFriendlyUrl('blog_group', $theme['id']) . ($theme['t'] || $ord ? "?" : "") . ($theme['t'] ? "&t=prof" : "") . ($ord != "new" ? "&ord={$ord}" : "") . "\" title=\"" . $theme['t_name'] . "\">" . $tname . " (" . zin($theme['num']) . ")</a></li>\n"; } $sum = $sum + $theme['num']; } ?> <li><?php if ($gr) { ?> <a href="/blogs/viewgroup.php<?php echo $ord ? "?ord={$ord}" : ""; ?> " title="Все вместе"><?php } ?> <strong>Все вместе</strong> (<?php echo $sum;
$_GET['pagefrom'] = intval($_GET['pagefrom']); } if (isset($_POST['pagefrom'])) { $_POST['pagefrom'] = intval($_POST['pagefrom']); } if (BLOGS_CLOSED == true && $_GET['tr']) { require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/commune.php"; $commune_theme = commune::getCommunePostByThreadID(intval($_GET['tr'])); $http_query = ""; if (isset($_GET['openlevel'])) { $comment_id = commune::getCommuneMessageByBlogID(intval($_GET['openlevel'])); if ($comment_id) { $http_query = "#c_{$comment_id}"; } } $url_redirect = getFriendlyUrl('commune', $commune_theme); if (trim($url_redirect) == "") { $url_redirect = "/404.php"; } else { $url_redirect = $url_redirect . $http_query; } header("Location: " . $url_redirect); exit; } $action = trim($_POST['action']); if (!$action) { $action = trim($_GET['action']); } if (!$action) { $action = trim($_POST['actions']); }
?> " href="javascript:void(0)" class="b-button b-button_flat b-button_flat_green b-button_block">Изменить название</a> </form> </div> <span id="favs_close_editor<?php echo $key; ?> " class="b-shadow__icon b-shadow__icon_close"></span> <span class="b-shadow__icon b-shadow__icon_nosik"></span> </div> </div> <a id="favs_fav_name<?php echo $key; ?> " class="b-menu__link" href="<?php echo getFriendlyUrl('commune', $key); echo $om ? '?om=' . $om : ''; ?> "><?php echo $fav['title'] ? stripslashes(reformat2($fav['title'], 18, 1, 1)) : '<без темы>'; ?> </a> </div> <div id="favs_fav_deleted<?php echo $key; ?> " style="display:none" class="b-fon b-fon_width_full"> <div class="b-fon__body b-fon__body_pad_5 b-fon__body_fontsize_11 b-fon__body_bg_ffeeeb"> Удалена. <a id="favs_recover_fav<?php echo $key;
?> " style="color: #000;" class="b-menu__link" href="<?php getFriendlyUrl('commune_commune', $comm['id']) . '?om=' . $om . '&cat=' . $category['id']; ?> "><?php echo hyphen_words($category['name']); ?> </a> <?php } else { ?> <a id="category_name<?php echo $category['id']; ?> " class="b-menu__link" href="<?php echo getFriendlyUrl('commune_commune', $comm['id']) . '?om=' . $om . '&cat=' . $category['id']; ?> "><?php echo hyphen_words($category['name']); ?> </a> <?php } ?> </li> <li id="category_deleted<?php echo $category['id']; ?> " class="b-menu__item b-menu__item_padbot_10 i-button" style="display:none"> <div class="b-fon b-fon_width_full"> <div class="b-fon__body b-fon__body_pad_5 b-fon__body_fontsize_11 b-fon__body_bg_ffeeeb">Удален. <a id="category_recover<?php
} if ($is_checked = $lenta && in_array($blog_gr['id_gr'], $lenta['blog_grs'])) { //$allThemesCount += $comm['themes_count']; } ?> <li><label><input type="checkbox" disabled="disabled" class="i-chk" id="idCBBlog<?php echo $blog_gr['id_gr']; ?> " name="blog_gr_id[]" value="<?php echo $blog_gr['id_gr']; ?> " <?php echo $is_checked ? ' checked="checked"' : ''; ?> onClick="lenta_check_subcats('cat_lenta_blogs'); xajax_Lenta_Save(xajax.getFormValues('lentaForm')); disable_lenta_cats_checkbox();" /><a href="<?php echo getFriendlyUrl('blog_group', $blog_gr['id']); ?> "><?php echo $blog_gr['t_name']; ?> </a></label></li> <?php } } ?> </ul> </li> <?php } ?> </ul>