本文整理汇总了PHP中getFriendlyURL函数的典型用法代码示例。如果您正苦于以下问题:PHP getFriendlyURL函数的具体用法?PHP getFriendlyURL怎么用?PHP getFriendlyURL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getFriendlyURL函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: setFieldAutoComplete
/**
* Функция автозаполнения полей блока.
*
* @return bool
*/
public function setFieldAutoComplete()
{
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects.php';
$projects = new_projects::getTopProjectBudget(constant(get_class($this) . '::PROJECT_KIND'), $this->getListSize());
if ($projects) {
foreach ($projects as $project) {
$link[] = $GLOBALS['host'] . getFriendlyURL('project', $project['id']);
}
$this->initBlock($link);
return true;
}
return false;
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:18,代码来源:DigestBlockListProject.php
示例2: comments
/**
* Выводит дерево комментариев. Используется здесь и в xajax/contest.server.php
* @param integer $pid id проекта
* @param string $name название проекта
* @param array $comments массив с деревом комментариев (подробнее в classes/contest.php)
* @param boolean $comm_blocked автор отключил возможность оставлять комментарии?
* @param boolean $project_end проект закрыт?
* @param integer $s_level уровень вложенности комментария
* @return string HTML с кнопками управления
*/
function comments($pid, $name, &$comments, $comm_blocked, $project_end, $s_level = 0)
{
global $stop_words, $contest, $project, $session;
static $level = 0;
$level = ($s_level ? $s_level : $level) + 1;
$html = '';
$set_branch_as_read = false;
for ($i = 0, $c = count($comments); $i < $c; $i++) {
if (($comments[$i]['is_banned'] || $comments[$i]['usr_banned'] || $comments[$i]['user_blocked'] === 't') && !hasPermissions('projects') && !$contest->is_owner) {
$msg = $msg2 = 'Ответ от заблокированного пользователя';
} else {
if (!trim($comments[$i]['deleted'])) {
$sMsg = $comments[$i]['moderator_status'] === '0' ? $stop_words->replace($comments[$i]['msg']) : $comments[$i]['msg'];
$msg = reformat($sMsg, 30, 0, 0, 1);
$msg2 = reformat($comments[$i]['msg'], 30, 0, 0, 1);
} else {
$msg2 = $msg = "Комментарий удален модератором";
if (hasPermissions("comments")) {
$moderator = '';
$moderatorData = new users();
$moderatorData->GetUserByUID($comments[$i]['deluser_id']);
if ($moderatorData->login) {
$moderator = ' ' . $moderatorData->login . ' (' . $moderatorData->uname . ' ' . $moderatorData->usurname . ') ';
}
$msg2 = $msg = $msg . " {$moderator}";
}
if ($comments[$i]['deluser_id'] == $comments[$i]['user_id']) {
$msg2 = $msg = "Комментарий удален автором";
} else {
if (trim($comments[$i]['deleted_reason']) && (hasPermissions("comments") || $comments[$i]['user_id'] == get_uid(false))) {
$msg2 = $msg = $msg . "<div style='color:#ff0000'>Причина: " . $comments[$i]['deleted_reason'] . "</div>";
}
}
}
}
$a_is_banned = ($comments[$i]['is_banned'] || $comments[$i]['usr_banned']) && hasPermissions('projects');
$html .= "\n\t\t\t<li class='thread' id='thread-{$comments[$i]['id']}'" . ($level >= 9 ? " style='margin-left: 0'" : "") . ">\n\t\t\t\t<a name='c-comment-{$comments[$i]['id']}'></a>\n\t\t\t\t<div class='comment-one" . ($comments[$i]['deleted'] || $comments[$i]['hidden'] ? " comment-deleted" : "") . "' id='comment-{$comments[$i]['id']}'>\n\t\t\t\t\t<div class='contest-ea'>" . view_avatar($comments[$i]['login'], $comments[$i]['photo'], 1) . "</div>\n\t\t\t\t\t<div class='comment-body'>\n\t\t\t\t\t\t<h3 class='username'>" . $session->view_online_status($comments[$i]['login']) . "\n\t\t\t\t\t\t\t<a href='/users/{$comments[$i]['login']}' class='" . (is_emp($comments[$i]['role']) ? 'employer-name' : 'freelancer-name') . "'>{$comments[$i]['uname']} {$comments[$i]['usurname']} [{$comments[$i]['login']}]</a> " . view_mark_user($comments[$i]) . " " . ($comments[$i]['completed_cnt'] > 0 ? '<a href="/promo/bezopasnaya-sdelka/" title="Пользователь работал через Безопасную Сделку" target="_blank"><span class="b-icon b-icon__shield b-icon_top_1"></span></a>' : '') . "\n\t\t\t\t\t\t\t<span>[" . dateFormat('d.m.Y | H:i', $comments[$i]['post_date']) . "]</span>\n\t\t\t\t\t\t\t<span id='comment-modified-{$comments[$i]['id']}'>" . ($comments[$i]['modified'] ? "[изменен " . dateFormat('d.m.Y | H:i', $comments[$i]['modified']) . "]" : ' ') . "</span>\n\t\t\t\t\t\t\t" . ($a_is_banned ? "<b style=\"color:#ff0000\">Пользователь забанен</b>" : "") . "\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t" . ($_SESSION['uid'] && $comments[$i]['is_new'] ? "<p><img src='/images/mark-new.png' width='53' height='12' alt='новое' class='mark-new' /></p>" : "") . "\n\t\t\t\t\t\t<div id='comment-change-{$comments[$i]['id']}'>\n\t\t\t\t\t\t<p id='comment-msg-{$comments[$i]['id']}' " . ($a_is_banned ? "style='color:silver'" : "") . ".>" . $msg . "</p>\n\t\t\t\t\t\t<div id='comment-msg-original-{$comments[$i]['id']}' style='display:none'>" . $msg2 . "</div>\n\t\t\t\t\t\t<script type=\"text/javascript\">\n banned.addContext( 'p{$pid}c{$comments[$i]['id']}', 3, '" . HTTP_PREFIX . "{$_SERVER['HTTP_HOST']}" . getFriendlyURL("project", $pid) . "?comm={$comments[$i]['id']}#comment-{$comments[$i]['id']}', \"" . htmlspecialchars($name) . "\" );\n </script>\n\t\t\t\t\t\t<ul class='thread-options' id='comment-options-{$comments[$i]['id']}'>\n\t\t\t\t\t\t\t" . comment_options($pid, $comments[$i], $comm_blocked, $project_end, $level, $name) . "\n\t\t\t\t\t\t</ul>\n <div id='warnreason-" . $comments[$i]['id'] . "-" . $comments[$i]['user_id'] . "' style='display:none; padding: 0 0 5px 0px;'> </div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t" . (empty($comments[$i]['comments']) ? '' : '<ul>' . comments($pid, $name, $comments[$i]['comments'], $comm_blocked, $project_end) . '</ul>') . "\n\t\t\t</li>\n\t\t";
if ($comments[$i]['is_new']) {
$set_branch_as_read = true;
}
}
if ($set_branch_as_read) {
$p = new projects();
$data = array("id" => $pid, "kind" => 7, "user_id" => $project["user_id"]);
$p->SetRead($data, get_uid(false), true);
}
--$level;
return $html;
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:59,代码来源:contest.php
示例3: GetMorePrj
function GetMorePrj($uid)
{
session_start();
$objResponse = new xajaxResponse();
$html = '';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects_offers.php';
$prjs = projects_offers::GetFrlOffers($uid, 'marked', NULL);
$i = 0;
$uid = get_uid(FALSE);
$is_adm = hasPermissions('users');
if ($prjs) {
foreach ($prjs as $p) {
$is_link = $uid > 0 && (in_array($uid, array($p['exec_id'], $p['project_user_id'], $p['offer_user_id'])) || $is_adm);
++$i;
$html .= "<li><span class='prj_list_number'>{$i}.</span>";
if ($p['kind'] == 9) {
$html .= $is_link ? "<a href='" . getFriendlyURL('project', $p['project_id']) . "'>{$p['project_name']}</a>" : "{$p['project_name']}";
} else {
$html .= "<a href='" . getFriendlyURL('project', $p['project_id']) . "'>{$p['project_name']}</a>";
}
if ($p['position'] > 0 && $p['is_executor'] == 't') {
//$html .= " ({$p['position']}-е место)";
}
if ($p['refused'] == 't') {
$html .= "<p>Отказ: <span class='ops-minus'>" . $p['rating'] . '</span></p>';
}
if ($p['selected'] == 't') {
$html .= "<p><span>Кандидат: <span class='ops-plus'>+" . $p['rating'] . '</span></p>';
}
if ($p['is_executor'] == 't' && $p['position'] <= 0) {
$html .= "<p><span>Исполнитель: <span class='ops-plus'>+" . $p['rating'] . '</span></p>';
}
if ($p['position'] > 0) {
$html .= "<p>{$p['position']}-е место: <span class='ops-plus'>+{$p['rating']}</span></p>";
}
$html .= '</li>';
}
$objResponse->assign('prj_list', 'innerHTML', $html);
}
return $objResponse;
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:41,代码来源:rating.server.php
示例4: quickPRJPayAccount
function quickPRJPayAccount()
{
$objResponse = new xajaxResponse();
$uid = get_uid(false);
ob_start();
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/billing.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/payed.php';
$bill = new billing($uid);
$billReserveId = $bill->checkoutOrder();
$payed_sum = $bill->getOrderPayedSum();
if ($bill->isAllowPayFromAccount()) {
$complete = $bill->buyOrder($billReserveId);
if ($complete) {
$_SESSION['quickprj_ok'] = 1;
$memBuff = new memBuff();
$project_id = $memBuff->get('bill_ok_project_' . $uid);
if ($project_id) {
$is_payed = $memBuff->get('bill_ok_project_payed_' . $uid);
if ($is_payed) {
$memBuff->delete('bill_ok_project_payed_' . $uid);
$friendly_url = "/public/?step=2&public={$project_id}";
} else {
$friendly_url = getFriendlyURL('project', $project_id);
$_SESSION['quickprj_ok'] = 1;
$friendly_url .= '?quickprj_ok=1';
}
$objResponse->script("window.location = '{$friendly_url}';");
$memBuff->delete('bill_ok_project_' . $uid);
} else {
$objResponse->script("window.location = '/?quickprj_ok=1';");
}
}
}
ob_end_clean();
return $objResponse;
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:36,代码来源:quickprj.server.php
示例5: isset
<?php
//$page = isset($page) ? $page : 1;
$groupCommCnt = isset($groupCommCnt) ? $groupCommCnt : 0;
$comm_is_ajax = false;
if (is_array($communes) && count($communes)) {
// начало нумерации сообществ для своей сортировки
$comm_limit = commune::MAX_ON_PAGE;
$comm_start_position = ($page - 1) * $comm_limit;
$i = 0;
foreach ($communes as $comm) {
$i++;
// заголовок
$comm_url = getFriendlyURL('commune_commune', $comm['id']);
$comm_name = "<a href='" . $comm_url . "' class='b-post__link'>" . ($search !== NULL ? highlight(reformat2($comm['name'], 25, 1, 1), $search, 20) : reformat2($comm['name'], 25, 1, 1)) . "</a>";
$comm_descr = $search !== NULL ? highlight(reformat2($comm['descr'], 25, 1), $search) : reformat2($comm['descr'], 25, 1);
// Сколько участников.
$mAcceptedCnt = $comm['a_count'] - $comm['w_count'] + 1;
// +1 -- создатель
$mCnt = $mAcceptedCnt . ' участник' . getSymbolicName($mAcceptedCnt, 'man');
?>
<div class="b-post b-post_padbot_20">
<div class="b-post__body b-post__body_bordbot_solid_f0 b-post__body_padbot_30 b-layout">
<table class="b-layout__table b-layout__table_width_full" cellpadding="0" cellspacing="0" border="0">
<tr class="b-layout__tr">
<?php
/*
<? if ( $sub_om == commune::OM_CM_JOINED_MY ) { ?>
<div class="form c-my-sort">
<b class="b1"></b>
<b class="b2"></b>
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:tpl.communes_list.php
示例6: setOfferDeleted
/**
* Удаление или восстановление предложения (устанавливает флаг is_deleted).
*
* @param int $offer_id ID предложения
* @param bool $is_deleted новое значение поля is_deleted в projects_contest_offers
*
* @return string сообщение об ошибке или пустая строка, если все нормально
*/
public function setOfferDeleted($offer_id, $is_deleted = false)
{
global $DB;
$offer_id = intval($offer_id);
$user_id = get_uid(false);
if (!($offer = $this->GetOfferRow($offer_id))) {
return 'Несуществующее предложение';
}
$aUser = $DB->row('SELECT f.uid, f.login, f.uname, f.usurname,
pco.project_id, pco.descr, p.name AS prj_name, p.user_id
FROM projects_contest_offers as pco
INNER JOIN projects p ON p.id = pco.project_id
INNER JOIN freelancer f ON f.uid = pco.user_id
WHERE pco.id=?i', $offer_id);
if ($aUser['uid'] == $user_id || hasPermissions('projects')) {
$deluser_id = $is_deleted ? $user_id : null;
$sModer = '';
$sql = '';
if ($deluser_id) {
$sModer = ' , moderator_status = ' . ($aUser['uid'] != $user_id ? $user_id : 'NULL') . ' ';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/user_content.php';
$sql .= $DB->parse('DELETE FROM moderation WHERE rec_id = ?i AND rec_type = ?i;', $offer_id, user_content::MODER_PRJ_OFFERS);
}
if ($aUser['uid'] == $user_id && !hasPermissions('projects') && !is_pro() && !$deluser_id) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/stop_words.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/user_content.php';
$stop_words = new stop_words();
$nStopWordsCnt = $stop_words->calculate($aUser['descr']);
$sModer = ' , moderator_status = ' . ($nStopWordsCnt ? ' 0 ' : ' NULL ');
if ($nStopWordsCnt) {
$DB->insert('moderation', array('rec_id' => $offer_id, 'rec_type' => user_content::MODER_PRJ_OFFERS, 'stop_words_cnt' => $nStopWordsCnt));
} else {
$sql .= $DB->parse('DELETE FROM moderation WHERE rec_id = ?i AND rec_type = ?i;', $offer_id, user_content::MODER_PRJ_OFFERS);
}
}
$sql .= 'UPDATE projects_contest_offers SET is_deleted = ?b, deluser_id = ?i ' . $sModer . ' WHERE id = ?i';
$DB->query($sql, $is_deleted, $deluser_id, $offer_id);
// пишем лог админских действий: удаление предложения в проекте
if (!$DB->error && $aUser['uid'] != $user_id) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/admin_log.php';
$sPrjLink = getFriendlyURL('project', $aUser['project_id']);
$sOffLink = $sPrjLink . "?offer={$offer_id}#offer-{$offer_id}";
$sReason = '<a href="' . $sOffLink . '" target="_blank">Предложение</a> от <a href="' . $GLOBALS['host'] . '/users/' . $aUser['login'] . '" target="_blank">' . $aUser['uname'] . ' ' . $aUser['usurname'] . ' [' . $aUser['login'] . ']</a>';
$sActId = $is_deleted ? admin_log::ACT_ID_PRJ_DEL_OFFER : admin_log::ACT_ID_PRJ_RST_OFFER;
admin_log::addLog(admin_log::OBJ_CODE_PROJ, $sActId, $aUser['user_id'], $aUser['project_id'], $aUser['prj_name'], $sPrjLink, 0, '', 0, $sReason);
}
}
return '';
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:57,代码来源:contest.php
示例7: getFriendlyURL
?>
</a>
<?php
} else {
?>
<?php
echo $p['project_name'];
?>
<?php
}
?>
<?php
} else {
?>
<a href="<?php
echo getFriendlyURL("project", $p['project_id']);
?>
"><?php
echo $p['project_name'];
?>
</a>
<?php
/*if($p['position']>0 && $p['is_executor']=='t'){?>(<?=$p['position']?>-е место)<?}*/
?>
<?php
}
?>
<?php
if ($p['refused'] == 't') {
?>
<p>Отказ: <span class="ops-minus"><?php
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:rating_inner.php
示例8: get_uid
$uid = get_uid(false);
if (!$uid) {
header_location_exit('/404.php');
}
$_SESSION['quickprj_is_success'] = 'y';
if ($_SESSION['quickprj_is_begin'] == 1) {
unset($_SESSION['quickprj_is_begin']);
$memBuff = new memBuff();
$project_id = $memBuff->get('bill_ok_project_' . $uid);
if ($project_id) {
$is_payed = $memBuff->get('bill_ok_project_payed_' . $uid);
if ($is_payed) {
$memBuff->delete('bill_ok_project_payed_' . $uid);
header("Location: /public/?step=2&public={$project_id}");
} else {
$friendly_url = getFriendlyURL('project', $project_id);
$_SESSION['quickprj_ok'] = 1;
header('Location: ' . $friendly_url . '?quickprj_ok=1');
}
$memBuff->delete('bill_ok_project_' . $uid);
} else {
header('Location: /');
}
exit;
}
$_SESSION['quickmas_is_success'] = 'y';
if ($_SESSION['quickmas_is_begin'] == 1) {
unset($_SESSION['quickmas_is_begin']);
if ($_SESSION['referer']) {
$friendly_url = strtok($_SESSION['referer'], '?');
$_SESSION['quickmass_ok'] = 1;
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php
示例9: _HideProject
/**
* Скрывает или отображает платные проекты.
*
* @see projects_filter::ShowClosedProjects()
* @see projects_filter::initClosedProjects()
*
* @param string $id id определенного или all для всех
* @param string $type скрыть (hide) или показать (unhide)
* @param int $kind тип текущей закладки главной страницы (см. new_projects::getProjects())
* @param int $page номер текущей страницы.
* @param bool $filter включен ли фильтр у юзера.
*
* @return object xajaxResponse
*/
function _HideProject($id, $type, $kind, $page, $filter)
{
session_start();
$objResponse = new xajaxResponse();
$all = $id == 'all';
$id = (int) $id;
$uid = $_SESSION['uid'];
if ($type == 'hide') {
$prj = new new_projects();
$content = $prj->SearchDB((int) $kind, 2, 0, $uf, true, true);
$prjs = $prj->getProjects($num_prjs, (int) $kind, 2, true, $uf, true, true);
$num = 0;
$nDH = $nH;
$_SESSION['ph'][$id] = base64_encode(projects::GetField($id, 'name'));
$_SESSION['top_payed']--;
$objResponse->assign("project-item{$id}", 'outerHTML', '');
if ($filter) {
$prj_filter = new projects_filters();
$uf = $prj_filter->GetFilter($uid, $error);
}
if ($prjs[$num]) {
$this_kind = $prjs[$num]['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 = $prjs[$num];
$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_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'];
$row['friendly_url'] = getFriendlyURL('project', array('id' => $row['id'], 'name' => $row['name']));
$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");
ob_start();
require $_SERVER['DOCUMENT_ROOT'] . '/projects/tpl.lenta-item.php';
$prj_html = ob_get_contents();
ob_end_clean();
$objResponse->script('ndiv = new Element("div", {id: "project-item' . $prjs[$num]['id'] . '", class: "b-post b-post_pad_10_15_15_20 b-post_margleft_-20 b-post_margright_-15 b-post_margbot_15 b-layout b-post_relative b-post_overflow_hidden' . ($row['is_color'] == 't' ? ' b-post_bg_fffded' : '') . '"});');
$objResponse->script('ndiv.inject($("projects-list").getLast("div[id^=project-item]"), "after");');
$objResponse->assign("project-item" . $prjs[$num]['id'], "innerHTML", $prj_html);
}
} else {
if ($all && $_SESSION['ph']) {
$nDH = -1 * $nH * count($_SESSION['ph']);
unset($_SESSION['ph']);
} else {
$nDH = -1 * $nH;
unset($_SESSION['ph'][$id]);
if (!$_SESSION['ph']) {
unset($_SESSION['ph']);
}
}
if ($filter) {
$prj_filter = new projects_filters();
$uf = $prj_filter->GetFilter($uid, $error);
}
//.........这里部分代码省略.........
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:101,代码来源:projects.server.php
示例10: rawurlencode
}
if (hasPermissions('projects') && $user->login != $_SESSION["login"]) {
$sBox .= "<a href=\"/public/?step=1&public=" . $prj['id'] . "&red=" . rawurlencode($_SERVER['REQUEST_URI']) . "\" onclick=\"popupQEditPrjShow(" . $prj['id'] . ", event); return false;\">Редактировать</a> ";
$sBox .= " | <span id='project-button-{$prj['id']}'><a style='color: red' href='.' onclick='banned." . ($prj['is_blocked'] ? 'unblockedProject' : 'blockedProject') . "({$prj['id']}); return false;'>" . ($prj['is_blocked'] ? 'Разблокировать' : 'Заблокировать') . "</a></span>";
$sBox .= " | <a id=\"prj_{$prj['id']}\" style=\"color:Red;\" href=\"?action=prj_delete&prjid=" . $prj['id'] . ($_GET['closed'] == 1 ? '&closed=1' : ($_GET['open'] == 1 ? '&open=1' : '')) . "\" onClick=\"return addTokenToLink('prj_{$prj['id']}', 'Вы уверены?')\">Удалить</a>";
}
if ($sBox != '') {
if (hasPermissions('projects')) {
?>
<script type="text/javascript">
banned.addContext( 'p<?php
echo $prj['id'];
?>
', 3, '<?php
echo $GLOBALS['host'];
echo getFriendlyURL("project", $prj);
?>
', "<?php
echo $prj['name'];
?>
" );
</script>
<?php
}
?>
<div style="text-align:right;font-size:11px; margin:3px 10px 5px 0px;">
<?php
if (hasPermissions('projects') && $prj['payed']) {
?>
<b style="color:#ff0000; white-space:nowrap"><?php
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:projects_inner.php
示例11: getFriendlyURL
echo $ban_title;
?>
</a>
<?php
echo $ban_count;
?>
</li>
<?php
}
}
} else {
if ($top['category_id'] && $top['category_name']) {
?>
<li class="b-post__links-item b-post__links-item_padright_10">
Раздел: <a class="b-post__link b-post__link_color_000" href="<?php
echo getFriendlyURL('commune_commune', $top['commune_id']);
?>
?om=<?php
echo __paramInit("int", "om") ? __paramInit("int", "om") : '0';
?>
&cat=<?php
echo $top['category_id'];
?>
"><?php
echo $top['category_name'];
?>
</a>
</li>
<?php
}
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:admin_bar.php
示例12: foreach
<col width="80" />
<col width="60" />
</colgroup>
<?php
foreach ($drafts as $draft) {
?>
<tr class="b-layout__tr">
<td class="b-layout__one b-layout__one_bordbot_ccc b-layout__one_padtb_10"><div class="b-check b-check_padleft_10 b-check_top_2"><input id="del_draft_<?php
echo $draft['id'];
?>
" 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"><a class="b-layout__link" href="<?php
echo $draft['post_id'] ? getFriendlyURL("commune", $draft['post_id']) . "?om=0&draft_id={$draft['id']}" : getFriendlyURL("commune_commune", $draft['commune_id']) . "?draft_id={$draft['id']}";
?>
" <?php
echo $draft['is_member'] != 't' ? "onclick=\"alert('Вы не состоите в данном сообществе или заблокированы в нем'); return false\"" : "";
?>
><?php
echo $draft['title'] != '' ? reformat(htmlspecialchars($draft['title']), 27, 0, 1) : '[без названия]';
?>
</a></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="/commune/?id=<?php
echo $draft['commune_id'];
?>
"><?php
echo reformat($draft['commune_title'], 37, 0, 1);
?>
</a></div></td>
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:content_communes.php
示例13: getFriendlyURL
echo $navigation['prev']['uname'] . ' ' . $navigation['prev']['usurname'] . ' [' . $navigation['prev']['login'] . ']';
?>
</a>
<?php
} else {
/* ?>
<span>« предыдущее интервью</span>
<? */
}
?>
<?php
if (isset($navigation['next'])) {
?>
<a href="<?php
echo getFriendlyURL('interview', $navigation['next']['id']);
?>
"><?php
echo $navigation['next']['uname'] . ' ' . $navigation['next']['usurname'] . ' [' . $navigation['next']['login'] . ']';
?>
»</a>
<?php
} else {
/* ?>
<span>следующее интервью »</span>
<? */
}
?>
</div>
<a id="interview_back2" href="javascript:void(0);">Вернуться к списку интервью</a>
</div>
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:content_view.php
示例14: array
$additional_header = '<link rel="alternate" type="application/rss+xml" title="Блоги на FL.ru (' . $gr_name . ')" href="/rss/blogs.php?gr=' . $gr . '&t=' . $t . '" />';
if (empty($additional_header)) {
$additional_header = '';
}
$om_clean_uri = array();
foreach ($_GET as $key => $value) {
if ($value && !in_array($key, array('grname', 'b', 'ord', 'openlevel', 'newurl'))) {
$om_clean_uri[] = $key . '=' . urlencode($value);
}
}
if (!empty($_GET['id'])) {
$om_clean_uri[] = 'id=' . (int) $_GET['id'];
}
if (count($om_clean_uri) || $gr) {
$additional_header .= '
<link rel="canonical" href="' . ($gr ? getFriendlyURL('blog_group', $gr) : '/blogs/') . ($om_clean_uri ? '?' . htmlspecialchars(implode('&', $om_clean_uri)) : '') . '"/>
';
}
$additional_header .= '
<script type="text/javascript" src="/scripts/blogs_cnt.js"></script>
<script type="text/javascript" src="/scripts/swfobject.js"></script>
<script type="text/javascript" src="/scripts/polls.js"></script>
';
if ($uid) {
$additional_header .= '
<script type="text/javascript" src="/scripts/blogs.js"></script>
<script type="text/javascript" src="/scripts/mAttach.js"></script>
<script type="text/javascript" src="/scripts/banned.js"></script>
';
$js_file[] = 'drafts.js';
$js_file[] = 'attachedfiles.js';
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:viewgroup.php
示例15: getFriendlyURL
?>
<div class="post-one" id="post_<?php
echo $article['id'];
?>
">
<img src="<?php
echo WDCPREFIX;
?>
/<?php
echo $article['path'];
echo $article['fname'];
?>
" alt="" width="100" class="post-img" />
<div class="post-txt">
<h3><a href="<?php
echo getFriendlyURL('article', $article['id']);
?>
"><?php
echo !$article['title'] ? 'Без названия' : reformat($article['title'], 32, 0, 1);
?>
</a></h3>
<p class="post-body">
<?php
echo reformat($article['short'], 50, 0, 0, 1);
?>
</p>
</div>
<div class="post-f c">
<ul>
<li class="post-f-lnks">
<ul>
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:content_declined.php
示例16: YellowLine
<?php
echo YellowLine($prj['usurname']);
?>
</a> [<a href="/users/<?php
echo $prj['login'];
?>
/"><?php
echo YellowLine($prj['login']);
?>
</a>]</li>
<li class="last">Категория: <?php
echo projects::printCategories($prj['categories']);
?>
</li>
<li class="last"><div class="project-offers"><a href="<?php
echo getFriendlyURL("project", $prj['id']);
?>
">Предложения (<?php
echo (int) $prj['offers_count'];
?>
)</a></div></li>
</ul>
<br clear="all" />
<div id="div_compliant_<?php
echo $prj['id'];
?>
" class="ban-report">
<h4>
<?php
echo projects_complains::GetComplainType($prj['type'], true);
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:content.php
示例17: DelOfferLog
/**
* Модераторская. Лента действий. Фиксация событий: удаление предложения в проекте.
*
* @param int $offer_id id предложения
* @param int $prj_id id проекта
* @param string $prj_name название проекта
* @param int $prj_user_id UID пользователя, создавшего проект
*/
public function DelOfferLog($offer_id = 0, $prj_id = 0, $prj_name = '', $prj_user_id)
{
$aUser = $GLOBALS['DB']->row('SELECT f.uid, f.login, f.uname, f.usurname
FROM projects_offers po
INNER JOIN freelancer f ON f.uid = po.user_id
WHERE po.id = ?i', $offer_id);
if ($aUser['uid'] != $_SESSION['uid'] && hasPermissions('projects')) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/admin_log.php';
$sPrjLink = getFriendlyURL('project', $prj_id);
$sReason = 'Предложение от <a href="' . $GLOBALS['host'] . '/users/' . $aUser['login'] . '" target="_blank">' . $aUser['uname'] . ' ' . $aUser['usurname'] . ' [' . $aUser['login'] . ']</a>';
admin_log::addLog(admin_log::OBJ_CODE_PROJ, admin_log::ACT_ID_PRJ_DEL_OFFER, $prj_user_id, $prj_id, $prj_name, $sPrjLink, 0, '', 0, $sReason);
}
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:21,代码来源:projects_offers.php
示例18: parse_url
echo "status=uploadSuccess&url={$link}";
} else {
echo 'status=uploadFailed&msg=Ошибка загрузки файла';
exit;
}
} else {
echo 'status=wrongFormat&msg=Загрузите изображение формата gif, png или jpg';
}
} else {
echo 'status=fail&msg=У вас недостаточно прав, чтобы оставить этот комментарий';
}
exit;
}
$url_parts = parse_url($_SERVER['REQUEST_URI']);
if ($_GET['id']) {
$friendly_url = getFriendlyURL('article', $_GET['id']);
if (strtolower($url_parts['path']) != $friendly_url) {
header('HTTP/1.1 301 Moved Permanently');
header('Location: ' . $friendly_url);
exit;
}
}
$msgs_on_page = 20;
$mpath = dirname(__FILE__);
$rpath = realpath(dirname(__FILE__) . '/../');
session_start();
$uid = get_uid();
$_page = __paramInit('string', null, 'page');
if (!$_page) {
$_page = __paramInit('string', 'page');
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php
示例19: actionNewProjectOrder
/**
* Cоздание заказа на базе проекта.
*/
public function actionNewProjectOrder()
{
//@todo: на период разработки резерва заказов
if (!tservices_helper::isAllowOrderReserve()) {
$this->missingAction(null);
}
$offer_id = __paramInit('int', 'offer_id', 'offer_id', null);
$projects = new projects();
$projectData = $projects->getProjectByOfferId($offer_id, $this->uid);
if (!$projectData) {
$this->missingAction(null);
}
$freelancer = new freelancer();
$freelancer->GetUserByUID($projectData['frl_id']);
if ($freelancer->uid <= 0) {
$this->missingAction(null);
}
$form = new NewOrderForm();
$form->setDefaults(array('title' => addslashes(htmlspecialchars_decode($projectData['name'], ENT_QUOTES)), 'description' => addslashes(htmlspecialchars_decode($projectData['descr'], ENT_QUOTE
|
请发表评论