public function setHtml()
 {
     global $session;
     $html = array();
     if ($result = $this->getRecords()) {
         foreach ($result as $key => $value) {
             $pfx = $value['from_id'] == $this->_engine->uid ? 't_' : 'f_';
             list($msg_text, $login, $uname, $usurname) = $this->mark(array((string) $value['msg_text'], (string) $value[$pfx . 'login'], (string) $value[$pfx . 'uname'], (string) $value[$pfx . 'usurname']));
             $msg_text = preg_replace('~(https?:/){[^}]+}/~', '$1/', $msg_text);
             $html[$key] = '<table cellpadding="0" cellspacing="0">';
             $html[$key] .= '<tr>';
             $html[$key] .= '<td style="vertical-align: top; padding-right: 8px;">';
             $html[$key] .= '<div class="upic">' . view_avatar($value[$pfx . 'login'], $value[$pfx . 'photo']) . '</div>';
             $html[$key] .= '</td>';
             $html[$key] .= '<td style="vertical-align: top;">';
             $html[$key] .= view_mark_user($value, $pfx);
             $html[$key] .= $session->view_online_status($value[$pfx . 'login']);
             //if ($value[$pfx . 'is_pro'] == 't') $html[$key] .= (is_emp($value[$pfx . 'role']) ? view_pro_emp() : view_pro2($value[$pfx . 'is_pro_test']=='t'));
             $cls = is_emp($value[$pfx . 'role']) ? 'class="empname11"' : 'class="frlname11"';
             $html[$key] .= '&nbsp;<font ' . $cls . '><a href="/users/' . $value[$pfx . 'login'] . '" title="' . $value[$pfx . 'uname'] . ' ' . $value[$pfx . 'usurname'] . '" ' . $cls . ' >' . $uname . ' ' . $usurname . '</a> [<a href="/users/' . $value[$pfx . 'login'] . '/" title="' . $value[$pfx . 'login'] . '" ' . $cls . '>' . $login . '</a>]</font>';
             if ($msg_text != '') {
                 $html[$key] .= '<div style="margin-top: 4px;"><a href="/contacts/?from=' . $value[$pfx . 'login'] . '">' . reformat($msg_text, 80, 0, 1) . '</a></div>';
             }
             $html[$key] .= '</td>';
             $html[$key] .= '</tr>';
             $html[$key] .= '</table>';
         }
     }
     $this->html = $html;
 }
 /**
  */
 public function setHtml()
 {
     $html = array();
     if ($result = $this->getRecords()) {
         foreach ($result as $key => $value) {
             $value['msgtext'] = preg_replace('~(https?:/){[^}]+}/~', '$1/', $value['msgtext']);
             list($title, $message, $login) = $this->mark(array((string) $value['title'], (string) $value['msgtext'], (string) $value['login']));
             if ($title == '') {
                 $title = '<Без темы>';
             }
             if (empty($value['reply_to']) || is_null($value['reply_to'])) {
                 $link = '/blogs/view.php?tr=' . $value['thread_id'] . '&ord=new';
             } else {
                 $link = '/blogs/view.php?tr=' . $value['thread_id'] . '&ord=new&openlevel=' . $value['id'] . '&ord=new#o' . $value['id'];
             }
             $html[$key] = '<a href="' . $link . '" style="font-weight: bold;" class="blue">' . $title . '</a>';
             $html[$key] .= '<div style="margin-top: 4px;">' . reformat($message, 80, 0, 1) . '</div>';
             $html[$key] .= '<div class="little" style="margin-top: 4px;"><span class="topic">Закладка:</span> <a href="/blogs/viewgroup.php?gr=' . $value['id_gr'] . '&ord=new">' . $value['group_name'] . '</a> - комментарий - ';
             if ($value['fromuser_id'] > 0) {
                 $html[$key] .= '[<a href="/users/' . $value['login'] . '/" title="' . $value['uname'] . ' ' . $value['usurname'] . '" class="black">' . $login . '</a>]';
             } else {
                 $html[$key] .= '[' . $login . ']';
             }
             //$html[$key] .= '- [' . dateFormat("dd.mm YYYY | H:M", $value['post_time']) . ']</div>';
             $html[$key] .= '- [' . strftime('%d.%m.%Y | %H:%M', make_timestamp($value['post_time'])) . ']</div>';
         }
     }
     $this->html = $html;
 }
 /**
  */
 public function setHtml()
 {
     $html = array();
     if ($result = $this->getRecords('is_pro DESC, post_time DESC')) {
         $i = 0;
         foreach ($result as $key => $value) {
             list($name, $descr, $login) = $this->mark(array((string) $value['name'], (string) $value['descr'], (string) $value['login']));
             if ($value['is_text'] == 't') {
                 $html[$key] .= '<div style="width:200px;">';
                 $html[$key] .= '<div style="text-align:left;padding-top:4px;"><a href="/users/' . $value['login'] . '/viewproj.php?prjid=' . $value['id'] . '" target="_blank" class="blue" style="font-weight: bold;">' . $name . '</a></div>';
                 $html[$key] .= '<div style="text-align:left;padding-top:2px;">' . reformat($descr, 36, 0, 1) . '</div>';
                 $html[$key] .= '</div>';
             } else {
                 $html[$key] .= '<div style="width:200px;">';
                 if ($value['prof_show_preview'] == 't' && $value['is_pro'] == 't') {
                     $html[$key] .= '<div style="text-align:left;"><a href="/users/' . $value['login'] . '/viewproj.php?prjid=' . $value['id'] . '" target="_blank">' . view_preview($value['login'], $value['prev_pict'], "upload", $align) . '</a></div>';
                 }
                 $html[$key] .= '<div style="text-align:left;padding-top:4px;"><a href="/users/' . $value['login'] . '/viewproj.php?prjid=' . $value['id'] . '" target="_blank" class="blue" style="font-weight: bold;">' . $name . '</a></div>';
                 $html[$key] .= '<div style="text-align:left;padding-top:4px;">' . reformat($descr, 36, 0, 1) . '</div>';
             }
             $html[$key] .= '<div class="little" style="margin-top: 4px;">Автор: ';
             if ($value['user_id'] > 0) {
                 $html[$key] .= '[<a href="/users/' . $value['login'] . '/" title="' . $value['uname'] . ' ' . $value['usurname'] . '" class="black">' . $login . '</a>]';
             } else {
                 $html[$key] .= '[' . $login . ']';
             }
             $html[$key] .= ' - [' . strftime("%d.%m.%Y | %H:%M", make_timestamp($value['post_time'])) . ']</div>';
             $i++;
         }
     }
     $this->html = $html;
 }
Esempio n. 4
0
 /**
  * Сохранить сообщение из константы
  * 
  * @param type $const
  * @param type $title
  * @return type
  */
 public static function setFlashMessageFromConstWithTitle($const, $title)
 {
     require_once 'tservices_const.php';
     $title = reformat(stripslashes($title), 30, 0, 1);
     $message = sprintf(tservices_const::enum('msg', $const), $title);
     return self::setFlashMessage($message);
 }
Esempio n. 5
0
function MasssendingSave($id, $txt)
{
    $response = new xajaxResponse();
    if (hasPermissions('masssending')) {
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/masssending.php';
        masssending::UpdateText($id, $txt);
        $mass = masssending::Get($id);
        $response->assign('mass_txt_' . $id, 'innerHTML', reformat($mass[0]['msgtext'], 30, 0, 0, 1));
    }
    return $response;
}
Esempio n. 6
0
/**
 * Выводит дерево комментариев. Используется здесь и в 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>&nbsp;" . view_mark_user($comments[$i]) . "&nbsp;" . ($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']) . "]" : '&nbsp;') . "</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;'>&nbsp;</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;
}
Esempio n. 7
0
function SaveStatus($text, $statusType, $login = NULL)
{
    session_start();
    $freelancer = new freelancer();
    $text = addslashes(substr(stripslashes(trim($text)), 0, 200));
    close_tags($text, 's');
    $freelancer->status_text = antispam(htmlspecialchars(htmlspecialchars_decode(change_q_x(trim($text), true, false), ENT_QUOTES), ENT_QUOTES));
    $freelancer->status_type = intval($statusType);
    if ($freelancer->statusToStr($statusType)) {
        $stdStatus = "";
        $objResponse = new xajaxResponse();
        $uid = hasPermissions('users') && $login != $_SESSION['login'] ? $freelancer->GetUid($err, $login) : get_uid(false);
        $pro = hasPermissions('users') && $login != $_SESSION['login'] ? is_pro(true, $uid) : is_pro();
        $error = $freelancer->Update($uid, $res);
        if (!$freelancer->status_text) {
            $freelancer->status_text = $stdStatus;
        }
        $freelancer->status_text = stripslashes($freelancer->status_text);
        switch ($freelancer->status_type) {
            case 1:
                $status_cls = 'b-status b-status_busy';
                break;
            case 2:
                $status_cls = 'b-status b-status_abs';
                break;
            case -1:
                $status_cls = 'b-status b-status_no';
                break;
            default:
                $status_cls = 'b-status b-status_free';
        }
        if (!$noassign) {
            require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/stop_words.php';
            $stop_words = new stop_words(hasPermissions('users'));
            $sStatusText = $pro ? $freelancer->status_text : $stop_words->replace($freelancer->status_text);
            //$GLOBALS['xajax']->setCharEncoding("windows-1251");
            $jsobj = json_encode(array('data' => iconv('CP1251', 'UTF8', $freelancer->status_text)));
            $objResponse->assign("statusText", "innerHTML", $freelancer->status_text == $stdStatus ? "" : reformat($sStatusText, 40, 0, 1, 25));
            $objResponse->assign("statusTitle", "innerHTML", $freelancer->statusToStr($statusType));
            //            $objResponse->assign("statusTitle", "style.display", $statusType > -1 ? '' : 'none');
            $objResponse->script("statusType = {$statusType};\n\t\t\t                      statusTxt = document.getElementById('statusText').innerHTML;\n\t\t\t                      statusTxtSrc = {$jsobj};");
        }
        $objResponse->script("\$('bstatus').erase('class');\n             \$('bstatus').addClass('{$status_cls}');");
    }
    return $objResponse;
}
Esempio n. 8
0
function ChangeTextPrev($proj_id, $check)
{
    session_start();
    $objResponse = new xajaxResponse();
    $portf = new portfolio();
    $descr = $portf->GetField($proj_id, 'descr');
    if (!$portf->ChangeTextPrev($_SESSION['uid'], intval($proj_id), intval($check))) {
        $script = "document.getElementById('prev" . $proj_id . "').disabled = false;";
        if ($check != 0) {
            $text = '<div align="left" style="width:200px;vertical-align:top;"><div style="text-align:left;vertical-align:top;">' . trim(viewdescr($user->login, reformat($descr, 32, 0, 1))) . '</div></div>';
        }
        $objResponse->assign('previmg' . intval($proj_id), 'innerHTML', $text);
    } else {
        $script = "document.getElementById('prev" . $proj_id . "').disabled = false;";
    }
    $objResponse->script($script);
    return $objResponse;
}
function projectUpdateFeedback($params)
{
    $uid = get_uid(false);
    $objResponse =& new xajaxResponse();
    $feedback_id = @$params['feedback_id'];
    $feedback_id = intval($feedback_id);
    $feedback = @$params['feedback'];
    $feedbackModel = new projects_feedback();
    $data = $feedbackModel->getFeedback($feedback_id);
    if (!$data) {
        return $objResponse;
    }
    $is_adm = hasPermissions('projects');
    $is_owner = $data['user_id'] == $uid;
    $is_editable = $data['rating'] < 0 || projects_feedback::isAllowFeedback($data['posted_time']);
    if (!($is_owner && $is_editable) && !$is_adm) {
        return $objResponse;
    }
    $is_valid = $feedbackModel->attributes(array('feedback' => $feedback, 'modified_id' => $uid));
    if (!$is_valid) {
        return $objResponse;
    }
    $ret = $feedbackModel->updateFeedback($feedback_id);
    if (!$ret) {
        return $objResponse;
    }
    $data = $feedbackModel->attributes();
    $ele_id = 'form_container_' . $feedback_id . '-3';
    $text_id = 'op_message_' . $feedback_id . '-3';
    $objResponse->script("\$('{$text_id}').setStyle('display', 'block');");
    $objResponse->script("\$('{$ele_id}').setStyle('display', 'none');");
    $objResponse->script("\$\$('.sbrmsgblock').setStyle('display', 'block');");
    $objResponse->assign($text_id, 'innerHTML', '<p>' . reformat($data['feedback'], 30) . '</p>');
    $objResponse->assign($ele_id, 'innerHTML', '');
    return $objResponse;
}
Esempio n. 10
0
            <?php 
    if ($_SESSION['F']) {
        ?>
Исполнителя<?php 
    } else {
        //if
        ?>
<a href="<?php 
        echo $site_uri ? $site_uri . '&' : '?';
        ?>
access=A&F=<?php 
        echo $sbr->frl_login;
        ?>
" class="b-layout__link">Исполнителя</a><?php 
    }
    //else
    ?>
        </div>
	</div>
</div>
<?php 
}
//if
?>
<h1 class="b-page__title <?php 
echo $css_selector_crumbs ? $css_selector_crumbs : 'b-page__title_padbot_5';
?>
"><?php 
echo reformat($crumbs[count($crumbs) - 1]['name'], 35, 0, 1);
?>
</h1>
Esempio n. 11
0
/**
 * Возвращает список жалоб на проект в админке.
 * 
 * с xajax не работает
 * 
 * @param  int $nProjId Идентификатор проекта на который жалуются
 * @param  string $group группа, в которой находится -> (new, approved, refused)
 * @return string json_encode данные
 */
function getProjectComplaints($nPrjId = 0, $group = 'new')
{
    session_start();
    $res = array();
    if (hasPermissions('projects') && $nPrjId) {
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects.php';
        $oPrj = new projects();
        $aMsgs = $oPrj->getProjectComplaints($nPrjId, $group);
        $aData = array();
        foreach ($aMsgs as $aOne) {
            $aFiles = array();
            if ($aOne['files']) {
                $files = preg_split("/,/", $aOne['files']);
                foreach ($files as $file) {
                    if ($file && $file != 'false') {
                        $aFiles[] = '<a target="_blank" href="' . WDCPREFIX . '/users/' . $aOne['e_login'] . '/upload/' . $file . '">' . $file . '</a><br/>';
                    }
                }
            }
            $status = 0;
            if ($aOne['is_satisfied'] == 't') {
                $status = 1;
            } elseif ($aOne['is_satisfied'] == 'f') {
                $status = 2;
            }
            $aTmp = array('login' => iconv('CP1251', 'UTF-8', $aOne['login']), 'name' => iconv('CP1251', 'UTF-8', $aOne['uname']), 'surname' => iconv('CP1251', 'UTF-8', $aOne['usurname']), 'date' => date('d.m.Y', strtotime($aOne['date'])), 'text' => $aOne['msg'] ? iconv('CP1251', 'UTF-8', reformat(html_entity_decode($aOne['msg'], ENT_QUOTES), 60)) : '', 'type' => iconv('CP1251', 'UTF-8', projects_complains::GetComplainType($aOne['type'], true)), 'status' => $status, 'pdate' => date('d.m.Y', strtotime($aOne['processed_at'])), 'admin_login' => iconv('CP1251', 'UTF-8', $aOne['admin_login']), 'admin_uname' => iconv('CP1251', 'UTF-8', $aOne['admin_uname']), 'admin_usurname' => iconv('CP1251', 'UTF-8', $aOne['admin_usurname']), 'files' => $aFiles);
            $aData[] = $aTmp;
        }
        $res['success'] = true;
        $res['data'] = $aData;
    } else {
        $res['success'] = false;
    }
    echo json_encode($res);
}
Esempio n. 12
0
$oNotes = new notes();
$aNote = $oNotes->GetNoteInt($_SESSION['uid'], $user->uid, $error);
?>

<?php 
if ($aNote) {
    ?>
<div class="bBD" id="zametkaBD">
    <div id="zametka" class="b-layout b-layout_pad_10 b-layout_bord_ffeda9 b-layout_bordrad_1 b-fon_bg_fff9bf_hover b-layout_hover ">
      <?php 
    /*<a  href="javascript:void(0);" onclick="if(confirm('Вы действительно хотите удалить заметку?')){xajax_saveHeaderNote('<?=$name?>','');}"><img src="/images/btn-remove2.png" width="11" height="11" alt="" /></a>*/
    ?>
      <a class="b-icon b-icon__edit b-icon_float_right  b-layout_hover_show" href="javascript:void(0);" onclick="headerNoteForm();"></a>
      <div class="b-layout__txt b-layout__txt_bold b-layout__txt_padbot_10">Ваша заметка</div>
      <div class="b-layout__txt b-layout__txt_fontsize_11"><?php 
    echo reformat($aNote['n_text'], 24, 0, 0, 1, 24);
    ?>
</div>
    </div>
</div>
<?php 
} else {
    ?>
    <div id="zametka" class="b-layout__txt b-layout__txt_padtop_5 b-layout__txt_inline-block"><span class="b-icon b-icon__cont b-icon__cont_note" ></span><a class="b-layout__link b-layout__link_bordbot_dot_0f71c8 b-layout__link_fontsize_13" href="javascript:void(0);" onclick="$('zametka_fmr').toggleClass('b-layout_hide');">Оставить заметку</a></div>
<?php 
}
?>
    
    <div id="zametka_fmr" class="b-layout b-layout_pad_15 b-layout_bord_ffeda9 b-layout_bordrad_1 b-layout_hide b-fon_bg_fff9bf b-fon">
          <form action="">
             <input type="hidden" name="rating" id="note_rating" value="<?php 
Esempio n. 13
0
                        </tr> 
                    </tfoot>
					<tbody>
                        <?php 
foreach ($sbr->stages as $stg) {
    $t = 0;
    if (!$stg->data['num']) {
        $stg_0 = $stg;
    }
    ?>
						<tr>
                            <td style="text-align:left"><a href="?site=Stage&id=<?php 
    echo $stg->id;
    ?>
"><?php 
    echo reformat($stg->name, 25, 0, 1);
    ?>
</a></td>
                            <td><?php 
    echo sbr_meta::view_cost($stg->cost, $sbr->cost_sys, false);
    ?>
</td>
                            <?php 
    foreach ($sbr->scheme['taxes'][1] as $tax_id => $tax) {
        if ($tax['not_used']) {
            continue;
        }
        $t += $ts = round($stg->calcTax($tax), 2);
        ?>
                               <td><?php 
        echo sbr_meta::view_cost($ts, NULL, false);
Esempio n. 14
0
        /*if ( $theme['moderator_status'] === '0' ) {
              continue;
          }*/
        ?>
    	<item>
    	<title><?php 
        echo preg_replace(array("/&/", "/</", "/>/"), array("&#x26;", "&#x3C;", "&#x3E;"), html_entity_decode($theme['title'], ENT_QUOTES, 'cp1251'));
        ?>
</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>
Esempio n. 15
0
                        <span class="b-icon b-icon_sbr_oattent b-icon_margleft_-25"></span>
                        Ваш проект перенесен в раздел Вакансии. Пожалуйста, оплатите его размещение, чтобы видеть отклики фрилансеров и иметь возможность выбрать Исполнителя.
                    </div>
                </div>
            <?php 
            }
            ?>

            <?php 
            $sDescr = $prj['moderator_status'] === '0' && $prj['kind'] != 4 && $user->is_pro != 't' ? $stop_words->replace($prj['descr']) : $prj['descr'];
            if (is_new_prj($prj['post_date'])) {
                $sDescr = reformatExtended($sDescr);
            }
            ?>
            <div class="fl2_offer_content"><?php 
            echo ereg_replace("\r", "", ereg_replace("\n", "", reformat($sDescr, 65)));
            ?>
</div>

<?php 
            //@todo: Список приатаченный файлов для заказчика. Лишняя нагрузка на БД. Пока скрываю.
            /*if(get_uid(false)) include dirname(__FILE__)."/attachlist.tpl.php";*/
            ?>
            <br />
            <div class="fl2_offer_meta">Прошло времени с момента публикации: 
		<?php 
            echo ago_pub_x($project->getCreateDateEx());
            ?>
                <br />
            	Автор: <a href="/users/<?php 
            echo $user->login;
Esempio n. 16
0
$extraLinkStyle = '';
if (($status === sbr_stages::STATUS_COMPLETED || $status === sbr_stages::STATUS_ARBITRAGED) && (strlen($notif) === 0 || $notif === 'sbr_stages.MONEY_PAID' || $notif === 'sbr_stages.EMP_MONEY_REFUNDED')) {
    $extraLinkStyle = ' b-layout__link_color_80';
}
if ($stage->sbr->status == sbr::STATUS_CANCELED || $stage->sbr->status == sbr::STATUS_REFUSED) {
    $extraLinkStyle = ' b-layout__link_color_80';
}
?>
                    <div class="b-layout__txt b-layout__txt_padleft_35 b-layout__txt_fontsize_15 b-layout__txt_lineheight_18 "><a class="b-layout__link b-layout__link_bold<?php 
echo $extraLinkStyle;
?>
" href="?site=Stage&id=<?php 
echo $stage->data['id'];
?>
"><?php 
echo reformat($stage->data['name'], 24, 0, 1);
?>
</a></div>
                </td>
                <td class="b-layout__middle b-layout__middle_width_175">
                    <div class="b-layout__txt"><?php 
echo $stage->data['int_work_time'];
?>
 <?php 
echo ending(abs($stage->data['int_work_time']), 'день', 'дня', 'дней');
?>
 на этап</div>
                </td>
                <td class="b-layout__right b-layout__right_width_400">
                    <div class="b-layout__txt b-layout__txt_right_0 b-layout__txt_absolute b-layout__txt_padright_15 b-layout__txt_relative b-layout__txt_zindex_1 <?php 
echo sbr_notification::isReaction($stage->notification) ? '' : 'b-layout__txt_hide';
<?php

/**
 * Попап при заказе ТУ для заказчика.
 */
$title = reformat($title, 30, 0, 1);
$price = tservices_helper::cost_format($price, true, false, false);
$days = $days . ' ' . ending($days, 'день', 'дня', 'дней');
$show_popup = isset($_POST['popup']);
?>
<div id="tservices_orders_status_popup" class="b-shadow b-shadow_center b-shadow_width_520 <?php 
if (!$show_popup) {
    ?>
b-shadow_hide <?php 
}
?>
b-shadow__quick" style="display:block;">
    <div class="b-shadow__body b-shadow__body_pad_15_20">
        <h2 class="b-layout__title">
            Заказ услуги
        </h2>
        <div class="b-layout__txt b-layout__txt_padbot_10">
            Вы заказываете у исполнителя <b><?php 
echo $frl_fullname;
?>
</b><br/> 
            услугу &laquo;<b><?php 
echo $title;
?>
</b>&raquo;
            <br/>
Esempio n. 18
0
        <?php 
$cls = is_emp($result['role']) ? 'empname11' : 'frlname11';
?>
        <?php 
echo $session->view_online_status($result['login']);
?>
<span class="<?php 
echo $cls;
?>
"><a href="/users/<?php 
echo $result['login'];
?>
/?f=<?php 
echo stat_collector::REFID_SEARCH;
?>
&stamp=<?php 
echo $_SESSION['stamp'];
?>
"><?php 
echo "{$uname} {$usurname} [{$login}]";
?>
</a></span> <?php 
echo view_mark_user($result);
?>
        </h4>
        <p><?php 
echo reformat($text, 40, 0, 1);
?>
</p>
    </div>
</div><!--/search-lenta-item-->
Esempio n. 19
0
function Lenta_Show($page = 1)
{
    global $DB;
    session_start();
    require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/portfolio.php";
    require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
    require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/commune.php";
    require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/links.php";
    require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/lenta.php";
    require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/users.php";
    require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/blogs.php";
    /*require_once( $_SERVER['DOCUMENT_ROOT'] . '/classes/stop_words.php' );
        
    $stop_words = new stop_words( false );*/
    $yt_replace_id = array();
    $yt_replace_data = array();
    $uid = get_uid(false);
    $objResponse = new xajaxResponse();
    ob_start();
    if (!($groups = professions::GetAllGroupsLite())) {
        return;
    }
    if (!($lenta = lenta::GetUserLenta($uid))) {
    }
    $sort = $_COOKIE['lenta_fav_order'] != "" ? $_COOKIE['lenta_fav_order'] : "date";
    $favs = lenta::GetFavorites($uid, $sort);
    if (!($myComms = commune::GetCommunes(NULL, $uid, NULL, commune::OM_CM_MY))) {
        $myComms = array();
    }
    if (!($joinedComms = commune::GetCommunes(NULL, NULL, $uid, commune::OM_CM_JOINED))) {
        $joinedComms = array();
    }
    // Все сообщества, доступные пользователю.
    $communes = array();
    foreach ($myComms as $comm) {
        $communes[] = $comm;
    }
    foreach ($joinedComms as $comm) {
        $communes[] = $comm;
    }
    // Блоги
    if (!($blog_grs = blogs::GetThemes($error, 1))) {
        $blog_grs = array();
    }
    $blg = NULL;
    if ($lenta && $lenta['blog_grs'] && !empty($lenta['blog_grs'])) {
        $blg = implode(',', $lenta['blog_grs']);
    }
    $pgs = NULL;
    if ($lenta['all_profs_checked'] == 'f') {
        if ($lenta && $lenta['prof_groups'] && !empty($lenta['prof_groups'])) {
            $pgs = implode(',', $lenta['prof_groups']);
        }
    }
    $allThemesCount = 0;
    $cms = NULL;
    $user_comm_mods = array();
    // Отбираем среди выбранных ранее сообществ в ленте, те которые до сих пор остаются
    // доступными ему для просмотра в ленте (его могли удалить или забанить). А также заполняем массив user_mod-ов на каждое из сообществ.
    if ($lenta && $lenta['communes'] && !empty($lenta['communes'])) {
        $i = 0;
        $cms = '';
        foreach ($lenta['communes'] as $cm_id) {
            if ($uStatus = commune::GetUserCommuneRel($cm_id, $uid)) {
                $ucm = $user_mod;
                $ucm |= commune::MOD_COMM_MODERATOR * $uStatus['is_moderator'];
                $ucm |= commune::MOD_COMM_MANAGER * $uStatus['is_manager'];
                $ucm |= commune::MOD_COMM_ADMIN * ($uStatus['is_admin'] || $uStatus['is_moderator'] || $uStatus['is_manager']);
                $ucm |= commune::MOD_COMM_AUTHOR * $uStatus['is_author'];
                $ucm |= commune::MOD_COMM_ASKED * $uStatus['is_asked'];
                $ucm |= commune::MOD_COMM_ACCEPTED * ($uStatus['is_accepted'] || $ucm & commune::MOD_COMM_ADMIN);
                $ucm |= commune::MOD_COMM_BANNED * $uStatus['is_banned'];
                $ucm |= commune::MOD_COMM_DELETED * $uStatus['is_deleted'];
                $user_comm_mods[$cm_id] = $ucm;
                if (!$uStatus['is_deleted'] && !$uStatus['is_banned'] && $uStatus['is_blocked_commune'] == 0 && ($uStatus['is_accepted'] || $uStatus['is_author'])) {
                    $cms .= (!$i++ ? '' : ',') . $cm_id;
                }
            }
        }
    }
    //if($cms)
    //  $allThemesCount -= commune::GetMyThemesCount($cms, $uid);
    if ($lenta && $lenta['all_profs_checked'] == 't' || $cms || $pgs || $blg) {
        $items = lenta::GetLentaItems($uid, $lenta && $lenta['my_team_checked'] == 't', $lenta && $lenta['all_profs_checked'] == 't', $pgs, $cms, ($page - 1) * lenta::MAX_ON_PAGE, lenta::MAX_ON_PAGE, $allWorkCount, $blg);
    }
    if (!$items) {
        $items = array();
    }
    //    var_dump($favs);
    $stars = array(0 => 'bsg.png', 1 => 'bsgr.png', 2 => 'bsy.png', 3 => 'bsr.png');
    $i = 0;
    foreach ($items as $item) {
        switch ($item['item_type']) {
            case '2':
                // Сообщества
                $top = $item;
                $user_mod = $user_comm_mods[$top['commune_id']];
                if ($top['member_is_banned'] && !($user_mod & (commune::MOD_ADMIN | commune::MOD_COMM_AUTHOR | commune::MOD_COMM_MANAGER)) || $top['is_private'] == 't' && $top['user_id'] != $uid && !($user_mod & (commune::MOD_ADMIN | commune::MOD_COMM_AUTHOR | commune::MOD_COMM_MANAGER)) || $top['is_blocked'] && $top['commune_author_id'] != $uid) {
                    continue;
                }
                $aThemeId = is_array($top['theme_id']) ? $top['theme_id'] : array($top['theme_id']);
                $top['answers'] = $DB->rows("SELECT * FROM commune_poll_answers WHERE theme_id IN (?l) ORDER BY id", array($top['theme_id']));
                $GLOBALS[LINK_INSTANCE_NAME] = new links('commune');
                $user_id = $uid;
                $mod = $user_mod;
                $is_member = $mod & (commune::MOD_ADMIN | commune::MOD_COMM_ACCEPTED | commune::MOD_COMM_AUTHOR);
                $is_moder = $mod & (commune::MOD_ADMIN | commune::MOD_MODER | commune::MOD_COMM_MODERATOR | commune::MOD_COMM_AUTHOR);
                $commune_info = commune::getCommuneInfoByMsgID($top['id']);
                ?>
                                <style>
.lo-m .lo-i-my-d .ac-pro, .lo-m .lo-i-my-d .ac-epro {
margin-right: 0px;
}
.lo .utxt .b-layout__txt .b-icon__lprofi{ vertical-align:baseline !important; top:2px !important;}
.lo .utxt>.b-pic{ margin-right:10px !important;}
</style>
								<div class="lo lo-m" id='idTop_<?php 
                echo $top['id'];
                ?>
' style='margin-bottom:0px !important;'>
									<ul class="lo-p">
										<li class="lo-s">
											<div class="b-layout_bordrad_3">
												<a href="/commune" class="lnk-dot-666">Сообщества</a>
											</div>
										</li>
										<li class="post-f-fav">
                                            <?php 
                $msg_id = $top['id'];
                ?>
                                            <?php 
                if ($favs['CM' . $msg_id]) {
                    ?>
 
                                                <img src="/images/bookmarks/<?php 
                    echo $stars[$favs['CM' . $msg_id]['priority']];
                    ?>
" alt="" on="<?php 
                    echo $is_fav ? 1 : 0;
                    ?>
" id="favstar<?php 
                    echo 'CM' . $msg_id;
                    ?>
" <?php 
                    if ($uid) {
                        ?>
onclick="ShowFavFloatLenta(<?php 
                        echo $msg_id;
                        ?>
, <?php 
                        echo $uid;
                        ?>
, 'CM')" ><?php 
                    }
                    ?>
                                            <?php 
                } else {
                    ?>
                                                <img src="/images/bookmarks/bsw.png" alt="" on="<?php 
                    echo $is_fav ? 1 : 0;
                    ?>
" id="favstar<?php 
                    echo 'CM' . $msg_id;
                    ?>
" <?php 
                    if ($uid) {
                        ?>
onclick="ShowFavFloatLenta(<?php 
                        echo $msg_id;
                        ?>
, <?php 
                        echo $uid;
                        ?>
, 'CM')" ><?php 
                    }
                    ?>
                                            <?php 
                }
                ?>
                                            <ul class="post-f-fav-sel" style="display:none;" id="FavFloat<?php 
                echo $msg_id;
                ?>
"></ul>
										</li>
									</ul>
									<div class="utxt">
<?php 
                print __LentaPrntUsrInfo($top, 'user_', '', '', false, true);
                ?>
										<h3>
                                        <?php 
                if ($top['is_private'] == 't') {
                    ?>
                                        <img src="/images/icons/eye-hidden.png" alt="Скрытый пост" title="Скрытый пост">&nbsp;	            
                                        <?php 
                }
                //if
                ?>
                                        <?php 
                $sTitle = $top['title'];
                ?>
                                        <?php 
                $sMessage = $top['msgtext'];
                ?>
                                        <a href="<?php 
                echo getFriendlyURL('commune', $top['id']);
                ?>
?om=<?php 
                echo commune::OM_TH_NEW;
                ?>
"><?php 
                echo reformat2($sTitle, 30, 0, 1);
                ?>
</a>&nbsp;</h3>
										<p><?php 
                echo reformat2($sMessage, 46, 1, 0, 1);
                ?>
</p>

                                        <!-- Questions -->
			<?php 
                if ($top['question'] != '') {
                    ?>
			<div id="poll-<?php 
                    echo $top['theme_id'];
                    ?>
" class="commune-poll">
				<div class="commune-poll-theme"><?php 
                    echo reformat($top['question'], 43, 0, 1);
                    ?>
</div>
				<div id="poll-answers-<?php 
                    echo $top['theme_id'];
                    ?>
">
				<?php 
                    if ($top['poll_closed'] == 't') {
                        ?>
<table class="b-layout__table b-layout__table_width_full"><?php 
                    }
                    ?>
                <?php 
                    // если надо вывести только количество ответов
                    $showAnswers = $top['poll_votes'] || !$user_id || $top['commune_blocked'] == 't' || $top['user_is_banned'] || $top['member_is_banned'] || !$is_member;
                    if ($showAnswers) {
                        ?>
<table class="poll-variants"><?php 
                    }
                    ?>
				<?php 
                    $i = 0;
                    $max = 0;
                    if ($top['poll_closed'] == 't') {
                        foreach ($top['answers'] as $answer) {
                            $max = max($max, $answer['votes']);
                        }
                    }
                    foreach ($top['answers'] as $answer) {
                        ?>

						<?php 
                        if ($top['poll_closed'] == 't') {
                            ?>
                        	<tr class="b-layout__tr">
                              <td class="b-layout__left b-layout__left_width_50"><label class="b-layout__txt" for="poll_<?php 
                            echo $i;
                            ?>
"><?php 
                            echo reformat($answer['answer'], 30, 0, 1);
                            ?>
</label></td>
                              <td class="b-layout__middle b-layout__middle_width_30 b-layout__middle_center"><?php 
                            echo $answer['votes'];
                            ?>
</td>
                              <td class=" b-layout__right "><div class=" res-line rl1" style="width: <?php 
                            echo $max ? round(100 * $answer['votes'] / $max * 3) : 0;
                            ?>
px;"></div></td>
                            </tr>
                        <?php 
                        } else {
                            ?>
                            <?php 
                            if ($showAnswers) {
                                ?>
                                <tr>
                                    <td class="bp-gres"><?php 
                                echo $answer['votes'];
                                ?>
</td>
                                    <td>
                                        <label><?php 
                                echo $answer['answer'];
                                ?>
</label>
                                    </td>
                                </tr>
                            <?php 
                            } else {
                                ?>
                                <?php 
                                if ($top['poll_multiple'] == 't') {
                                    ?>
                                <div class="b-check b-check_padbot_10">
                                    <input id="poll-<?php 
                                    echo $top['theme_id'];
                                    ?>
_<?php 
                                    echo $i;
                                    ?>
" class="b-check__input" type="checkbox" name="poll_vote[]" value="<?php 
                                    echo $answer['id'];
                                    ?>
" />
                                    <label class="b-check__label b-check__label_fontsize_13" for="poll-<?php 
                                    echo $top['theme_id'];
                                    ?>
_<?php 
                                    echo $i++;
                                    ?>
"><?php 
                                    echo reformat($answer['answer'], 30, 0, 1);
                                    ?>
</label>
                                </div>
                                <?php 
                                } else {
                                    ?>
                                <div class="b-radio__item  b-radio__item_padbot_5">
                                    <table class="b-layout__table b-layout__table_width_full" cellpadding="0" cellspacing="0" border="0">
                                        <tr class="b-layout__tr">
                                            <td class="b-layout__left b-layout__left_width_15"><input id="poll-<?php 
                                    echo $top['theme_id'];
                                    ?>
_<?php 
                                    echo $i;
                                    ?>
" class="b-radio__input b-radio__input_top_-3" type="radio" name="poll_vote" value="<?php 
                                    echo $answer['id'];
                                    ?>
" /></td>
                                            <td class="b-layout__right"><label class="b-radio__label b-radio__label_fontsize_13" for="poll-<?php 
                                    echo $top['theme_id'];
                                    ?>
_<?php 
                                    echo $i++;
                                    ?>
"><?php 
                                    echo reformat($answer['answer'], 30, 0, 1);
                                    ?>
</label></td>
                                        </tr>
                                    </table>
                                </div>
                                <?php 
                                }
                                ?>
                            <?php 
                            }
                            ?>
                            
                        <?php 
                        }
                        ?>

				<?php 
                    }
                    ?>
                <?php 
                    if ($showAnswers) {
                        ?>
</table><?php 
                    }
                    ?>
				<?php 
                    if ($top['poll_closed'] == 't') {
                        ?>
</table><?php 
                    }
                    ?>
				</div>
				<?php 
                    if (!$top['poll_votes'] && $user_id && $top['poll_closed'] != 't' && $top['commune_blocked'] != 't' && !$top['user_is_banned'] && !$top['member_is_banned'] && $is_member) {
                        ?>
                
                <div class="b-buttons b-buttons_inline-block">
                    <span id="poll-btn-vote-<?php 
                        echo $top['theme_id'];
                        ?>
">
                        <a class="b-button b-button_flat b-button_flat_grey" href="javascript: return false;" onclick="poll.vote('Commune', <?php 
                        echo $top['theme_id'];
                        ?>
); return false;">Ответить</a>&nbsp;&nbsp;&nbsp;                
                    </span>                
					<span id="poll-btn-result-<?php 
                        echo $top['theme_id'];
                        ?>
" ><a class="b-buttons__link b-buttons__link_dot_0f71c8" href="javascript: return false;" onclick="poll.showResult('Commune', <?php 
                        echo $top['theme_id'];
                        ?>
); return false;">Посмотреть результаты</a></span>
                </div>
				<?php 
                    } else {
                        ?>
				<span id="poll-btn-vote-<?php 
                        echo $top['theme_id'];
                        ?>
"></span>
				<span id="poll-btn-result-<?php 
                        echo $top['theme_id'];
                        ?>
"></span>
				<?php 
                    }
                    ?>
			</div>
            <br />
			<?php 
                }
                ?>
                                        <!-- /Questions -->

                                        <!-- Youtube -->
<?php 
                if ($top['yt_link']) {
                    $tmp_yt_id = $top['id'] . 'ytlink' . mt_rand(1, 1000000);
                    $tmp_yt_data = show_video($top['id'], $top['yt_link']);
                    array_push($yt_replace_id, '/' . $tmp_yt_id . '/');
                    array_push($yt_replace_data, $tmp_yt_data);
                    echo "<div style='padding-top: 20px'>" . $tmp_yt_id . "</div><br/>";
                }
                ?>


<?php 
                //            (($top['youtube_link'])? ("<div style='padding-top: 20px'>".show_video($top['id'], $top['youtube_link'])."</div><br/>"):"")
                ?>

                                        <!-- /Youtube -->

                                        <!-- Attach -->
<?php 
                if ($top['attach']) {
                    $attach = $top['attach'][0];
                    if ($attach['fname']) {
                        $att_ext = strtolower(CFile::getext($attach['fname']));
                        if ($att_ext == "swf") {
                            print "<br/>" . viewattachExternal($top['user_login'], $attach['fname'], "upload", "/blogs/view_attach.php?user="******"&attach=" . $attach['fname']) . "<br/>";
                        } elseif ($att_ext == 'flv') {
                            print "<br/>" . viewattachLeft($top['user_login'], $attach['fname'], "upload", $file, 1000, 470, 307200, true, $attach['small'] == 't' ? 1 : 0) . "<br/>";
                        } else {
                            print "<br/>" . viewattachLeft($top['user_login'], $attach['fname'], "upload", $file, 1000, 470, 307200, !($attach['small'] == 't'), $attach['small'] == 't' ? 1 : 0) . "<br/>";
                        }
                    }
                    echo '<br/>';
                    if (sizeof($top['attach']) > 1) {
                        echo "<a href=\"" . getFriendlyURL('commune', $top['id']) . "\"><b>" . blogs::ShowMoreAttaches(sizeof($top['attach'])) . "</b></a><br/><br/>";
                    }
                }
                ?>

                                        <!-- /Attach -->


									</div>
									<ul class="lo-i">
                                        <?php 
                $post_year = dateFormat('Y', $top['post_time']);
                ?>
                                        <li class="lo-i-cm">
                                            <a href="<?php 
                echo getFriendlyURL('commune', $top['id']);
                ?>
" <?php 
                echo $top['current_count'] == NULL && intval($top['count_comments']) != 0 ? 'style="font-weight:bold;"' : '';
                ?>
><?php 
                echo $top['closed_comments'] == 't' ? "Комментирование закрыто" : "Комментарии (" . intval($top['count_comments']) . ")";
                ?>
</a>
                                            <?php 
                if ($top['closed_comments'] == 'f') {
                    $top['current_count'] = $top['current_count'] == '' ? $top['a_count'] - 1 : $top['current_count'];
                    if ($top['a_count'] > 1) {
                        $unread = $top['a_count'] - 1 - $top['current_count'];
                    }
                    if ($unread > 0) {
                        ?>
                                                <a href="<?php 
                        echo getFriendlyURL('commune', $top['id']);
                        ?>
#unread" style="color:#6BA813; font-weight:bold;">(<?php 
                        echo $unread;
                        ?>
 <?php 
                        echo $unread == 1 ? "новый" : "новых";
                        ?>
)</a>
                                                <?php 
                    }
                    $unread = 0;
                }
                ?>
                                        </li>
										<li class="lo-i-c"><a href="/commune/?id=<?php 
                echo $top['commune_id'];
                ?>
"><?php 
                echo $top['commune_name'];
                ?>
</a>, <a href="/commune/?gr=<?php 
                echo $top['commune_group_id'];
                ?>
"><?php 
                echo $top['commune_group_name'];
                ?>
</a></li>
										<li><?php 
                echo $post_year > 2000 ? dateFormat("d.m.Y H:i", $top['post_time']) : '';
                ?>
</li>
									</ul>
								</div>
                                <br>

                            <?php 
                break;
            case '1':
                // Портфолио
                $work = $item;
                if ($work['work_is_blocked']) {
                    continue;
                }
                $is_fav = isset($favs['PF' . $work['portfolio_id']]) ? 1 : 0;
                $msg_id = $work['portfolio_id'];
                ?>
								<div class="lo lo-m" style='margin-bottom:0px !important;'>
									<ul class="lo-p">
										<li class="lo-s">
											<div class="b-layout_bordrad_3">
												<a href="/portfolio" class="lnk-dot-666">Работы</a>
											</div>
										</li>
										<li class="post-f-fav">
                                            <?php 
                if ($favs['PF' . $msg_id]) {
                    ?>
 
                                                <img src="/images/bookmarks/<?php 
                    echo $stars[$favs['PF' . $msg_id]['priority']];
                    ?>
" alt="" on="<?php 
                    echo $is_fav ? 1 : 0;
                    ?>
" id="favstar<?php 
                    echo 'PF' . $msg_id;
                    ?>
" <?php 
                    if ($uid) {
                        ?>
onclick="ShowFavFloatLenta(<?php 
                        echo $msg_id;
                        ?>
, <?php 
                        echo $uid;
                        ?>
, 'PF')" ><?php 
                    }
                    ?>
                                            <?php 
                } else {
                    ?>
                                                <img src="/images/bookmarks/bsw.png" alt="" on="<?php 
                    echo $is_fav ? 1 : 0;
                    ?>
" id="favstar<?php 
                    echo 'PF' . $msg_id;
                    ?>
" <?php 
                    if ($uid) {
                        ?>
onclick="ShowFavFloatLenta(<?php 
                        echo $msg_id;
                        ?>
, <?php 
                        echo $uid;
                        ?>
, 'PF')" ><?php 
                    }
                    ?>
                                            <?php 
                }
                ?>
                                            <ul class="post-f-fav-sel" style="display:none;" id="FavFloat<?php 
                echo $msg_id;
                ?>
"></ul>
										</li>
									</ul>
									<div class="utxt">
                                        <?php 
                print __LentaPrntUsrInfo($work, 'user_', '', '', false, true);
                ?>
                                        <?php 
                $sTitle = $work['name'];
                ?>
										<h3><a href="/users/<?php 
                echo $work['user_login'];
                ?>
/viewproj.php?prjid=<?php 
                echo $work['portfolio_id'];
                ?>
"><?php 
                echo reformat2($sTitle, 40, 0, 1);
                ?>
</a>&nbsp;</h3>
                                        <?php 
                $is_preview = $work['pict'] || $work['prev_pict'];
                if ($is_preview && $work['prev_type'] != 1) {
                    echo view_preview($work['user_login'], $work['prev_pict'], "upload", $align, true, true, '', 200) . "<br/><br/>";
                }
                close_tags($work['descr'], array('b', 'i'));
                $sDescr = $work['descr'];
                ?>
										<p><?php 
                echo reformat($sDescr, 80, 0, 0, 1);
                ?>
</p>



									</div>
									<ul class="lo-i">
                                        <?php 
                $post_year = dateFormat('Y', $work['post_time']);
                ?>
										<li class="lo-i-c"><a href="/freelancers/?prof=<?php 
                echo $work['prof_id'];
                ?>
"><?php 
                echo $work['prof_name'];
                ?>
</a></li>
										<li><?php 
                echo $post_year > 2000 ? dateFormat("d.m.Y H:i", $work['post_time']) : '';
                ?>
</li>
									</ul>
								</div>
                                <br>
                            <?php 
                break;
            case '4':
                // Блоги
                $item['thread_id'] = $item['theme_id'];
                $item['answers'] = $DB->rows("SELECT * FROM blogs_poll_answers WHERE thread_id IN (?l) ORDER BY id", array($item['thread_id']));
                $GLOBALS[LINK_INSTANCE_NAME] = new links('blogs');
                $user_id = $uid;
                ?>
								<div class="lo lo-m" id='idBlog_<?php 
                echo $item['thread_id'];
                ?>
' style='margin-bottom:0px !important;'>
									<ul class="lo-p">
										<li class="lo-s">
											<div class="b-layout_bordrad_3">
												<a href="/blogs" class="lnk-dot-666">Блоги</a>
											</div>
										</li>
										<li class="post-f-fav">
                                            <?php 
                $msg_id = $item['theme_id'];
                ?>
                                            <?php 
                if ($favs['BL' . $msg_id]) {
                    ?>
 
                                                <img src="/images/bookmarks/<?php 
                    echo $stars[$favs['BL' . $msg_id]['priority']];
                    ?>
" alt="" on="<?php 
                    echo $is_fav ? 1 : 0;
                    ?>
" id="favstar<?php 
                    echo 'BL' . $msg_id;
                    ?>
" <?php 
                    if ($uid) {
                        ?>
onclick="ShowFavFloatLenta(<?php 
                        echo $msg_id;
                        ?>
, <?php 
                        echo $uid;
                        ?>
, 'BL')" ><?php 
                    }
                    ?>
                                            <?php 
                } else {
                    ?>
                                                <img src="/images/bookmarks/bsw.png" alt="" on="<?php 
                    echo $is_fav ? 1 : 0;
                    ?>
" id="favstar<?php 
                    echo 'BL' . $msg_id;
                    ?>
" <?php 
                    if ($uid) {
                        ?>
onclick="ShowFavFloatLenta(<?php 
                        echo $msg_id;
                        ?>
, <?php 
                        echo $uid;
                        ?>
, 'BL')" ><?php 
                    }
                    ?>
                                            <?php 
                }
                ?>
                                            <ul class="post-f-fav-sel" style="display:none;" id="FavFloat<?php 
                echo $msg_id;
                ?>
"></ul>
										</li>
									</ul>
									<div class="utxt">
                                        <?php 
                print __LentaPrntUsrInfo($item, 'user_', '', '', false, true);
                ?>
                                        <?php 
                $sTitle = $item['title'];
                ?>
                                        <?php 
                $sMessage = $item['msgtext'];
                ?>
										<h3><a href="<?php 
                echo getFriendlyURL("blog", $item['theme_id']);
                ?>
"><?php 
                echo reformat2($sTitle, 30, 0, 1);
                ?>
</a>&nbsp;</h3>
										<p><?php 
                echo reformat($sMessage, 46, 1, -($item['is_chuck'] == 't'), 1);
                ?>
</p>

                                        <!-- Questions -->
			<?php 
                if ($item['question'] != '') {
                    ?>
			<div id="poll-<?php 
                    echo $item['thread_id'];
                    ?>
" class="poll">
				<div class="commune-poll-theme"><?php 
                    echo reformat($item['question'], 43, 0, 1);
                    ?>
</div>
				<div id="poll-answers-<?php 
                    echo $item['thread_id'];
                    ?>
">
				<?php 
                    if ($item['poll_multiple'] != 't') {
                        ?>
<div class="b-radio b-radio_layout_vertical"><?php 
                    }
                    ?>
				<?php 
                    if ($item['poll_closed'] == 't') {
                        ?>
<table class="b-layout__table b-layout__table_width_full"><?php 
                    }
                    ?>
				<?php 
                    $i = 0;
                    $max = 0;
                    if ($item['poll_closed'] == 't') {
                        foreach ($item['answers'] as $answer) {
                            $max = max($max, $answer['votes']);
                        }
                    }
                    foreach ($item['answers'] as $answer) {
                        ?>
				
				<?php 
                        if ($item['poll_closed'] == 't') {
                            ?>
                    <tr class="b-layout__tr">
                      <td class="b-layout__left b-layout__left_width_50"><label class="b-layout__txt" for="poll_<?php 
                            echo $i;
                            ?>
"><?php 
                            echo reformat($answer['answer'], 30, 0, 1);
                            ?>
</label></td>
                      <td class="b-layout__middle b-layout__middle_width_30 b-layout__middle_center"><?php 
                            echo $answer['votes'];
                            ?>
</td>
                      <td class=" b-layout__right "><div class=" res-line rl1" style="width: <?php 
                            echo $max ? round(100 * $answer['votes'] / $max * 3) : 0;
                            ?>
px;"></div></td>
                    </tr>
				<?php 
                        } else {
                            ?>
					<?php 
                            if ($item['poll_votes'] || !$user_id) {
                                ?>
						<div class="bp-gres"><?php 
                                echo $answer['votes'];
                                ?>
</div>
					<?php 
                            } else {
                                ?>
						
						<?php 
                                if ($item['poll_multiple'] == 't') {
                                    ?>
                        	<div class="b-check b-check_padbot_10">
								<input id="poll-<?php 
                                    echo $item['thread_id'];
                                    ?>
_<?php 
                                    echo $i;
                                    ?>
" class="b-check__input" type="checkbox" name="poll_vote[]" value="<?php 
                                    echo $answer['id'];
                                    ?>
" />
                                <label class="b-check__label b-check__label_fontsize_13" for="poll-<?php 
                                    echo $item['thread_id'];
                                    ?>
_<?php 
                                    echo $i++;
                                    ?>
"><?php 
                                    echo reformat($answer['answer'], 30, 0, 1);
                                    ?>
</label>
                            </div>
						<?php 
                                } else {
                                    ?>
                        	<div class="b-radio__item  b-radio__item_padbot_5">
                            	<table class="b-layout__table b-layout__table_width_full" cellpadding="0" cellspacing="0" border="0">
                                	<tr class="b-layout__tr">
                                    	<td class="b-layout__left b-layout__left_width_15"><input id="poll-<?php 
                                    echo $item['thread_id'];
                                    ?>
_<?php 
                                    echo $i;
                                    ?>
" class="b-radio__input b-radio__input_top_-3" type="radio" name="poll_vote" value="<?php 
                                    echo $answer['id'];
                                    ?>
" /></td>
                                        <td class="b-layout__right"><label class="b-radio__label b-radio__label_fontsize_13" for="poll-<?php 
                                    echo $item['thread_id'];
                                    ?>
_<?php 
                                    echo $i++;
                                    ?>
"><?php 
                                    echo reformat($answer['answer'], 30, 0, 1);
                                    ?>
</label></td>
                                    </tr>
                                </table>
                            </div>
						<?php 
                                }
                                ?>
					<?php 
                            }
                            ?>
					
				<?php 
                        }
                        ?>
				
				<?php 
                    }
                    ?>
				<?php 
                    if ($item['poll_closed'] == 't') {
                        ?>
</table><?php 
                    }
                    ?>
				<?php 
                    if ($item['poll_multiple'] != 't') {
                        ?>
</div><?php 
                    }
                    ?>
				</div>
				<?php 
                    if (!$item['poll_votes'] && $user_id && $item['poll_closed'] != 't') {
                        ?>
                <div class="b-buttons b-buttons_inline-block">
                    <span id="poll-btn-vote-<?php 
                        echo $item['thread_id'];
                        ?>
">
                        <a class="b-button b-button_flat b-button_flat_grey" href="javascript: return false;"  onclick="poll.vote('Blogs', <?php 
                        echo $item['thread_id'];
                        ?>
); return false;">Ответить</a>                
                        &nbsp;&nbsp;&nbsp;
                    </span>                
                    <span id="poll-btn-result-<?php 
                        echo $item['thread_id'];
                        ?>
"><a class="b-buttons__link b-buttons__link_dot_0f71c8" href="javascript: return false;" onclick="poll.showResult('Blogs', <?php 
                        echo $item['thread_id'];
                        ?>
); return false;">Посмотреть результаты</a>&nbsp;&nbsp;&nbsp;</span>
                </div>
				<?php 
                    } else {
                        ?>
				<span id="poll-btn-vote-<?php 
                        echo $item['thread_id'];
                        ?>
"></span>
				<span id="poll-btn-result-<?php 
                        echo $item['thread_id'];
                        ?>
"></span>
				<?php 
                    }
                    ?>
			</div>
            <br/>
			<?php 
                }
                ?>
                                        <!-- /Questions -->

                                        <!-- Youtube -->
<?php 
                if ($item['yt_link']) {
                    $tmp_yt_id = $item['id'] . 'ytlink' . rand(1, 1000000);
                    $tmp_yt_data = show_video($item['id'], $item['yt_link']);
                    array_push($yt_replace_id, '/' . $tmp_yt_id . '/');
                    array_push($yt_replace_data, $tmp_yt_data);
                    echo "<div style='padding-top: 20px'>" . $tmp_yt_id . "</div><br/>";
                }
                //            =(($item['yt_link'])? ("<div style='padding-top: 20px'>".show_video($item['id'], $item['yt_link'])."</div>"):"")
                ?>
                                        <!-- /Youtube -->

                                        <!-- Attach -->
<?php 
                if ($item['attach']) {
                    $attach = $item['attach'][0];
                    if ($attach['fname']) {
                        $att_ext = strtolower(CFile::getext($attach['fname']));
                        if ($att_ext == "swf") {
                            print "<br/>" . viewattachExternal($item['user_login'], $attach['fname'], "upload", "/blogs/view_attach.php?user="******"&attach=" . $attach['fname']) . "<br/>";
                        } elseif ($att_ext == 'flv') {
                            print "<br/>" . viewattachLeft($item['user_login'], $attach['fname'], "upload", $file, 1000, 470, 307200, true, $attach['small'] == 2 ? 1 : 0) . "<br/>";
                        } else {
                            print "<br/>" . viewattachLeft($item['user_login'], $attach['fname'], "upload", $file, 1000, 470, 307200, !$attach['small'], $attach['small'] == 2 ? 1 : 0) . "<br/>";
                        }
                    }
                    echo '<br/>';
                    if (sizeof($item['attach']) > 1) {
                        echo "<a href=\"" . getFriendlyURL("blog", $item['theme_id']) . "\"><b>" . blogs::ShowMoreAttaches(sizeof($item['attach'])) . "</b></a><br/><br/>";
                    }
                }
                ?>

                                        <!-- /Attach -->
									</div>
									<ul class="lo-i">
                                        <?php 
                $post_year = dateFormat('Y', $item['post_time']);
                ?>
                                        <li class="lo-i-cm">
                                            <a href="<?php 
                echo getFriendlyURL("blog", $item['theme_id']);
                ?>
" <?php 
                echo $item['current_count'] == NULL && intval($item['count_comments']) != 0 ? 'style="font-weight:bold;"' : '';
                ?>
><?php 
                echo $item['closed_comments'] == 't' ? "Комментирование закрыто" : "Комментарии (" . intval($item['count_comments']) . ")";
                ?>
</a>
                                            <?php 
                if (isset($item['status_comments']) && $item['count_comments'] > 0 && $item['status_comments'] < $item['count_comments'] && $item['status_comments'] != -100 && $item['closed_comments'] == 'f') {
                    $new_comments_num = $item['count_comments'] - $item['status_comments'];
                    ?>
                                              <a href="<?php 
                    echo getFriendlyURL("blog", $item['theme_id']);
                    ?>
#unread" style="color:#6BA813; font-weight:bold;">(<?php 
                    echo $new_comments_num;
                    ?>
 <?php 
                    echo $new_comments_num == 1 ? "новый" : "новых";
                    ?>
)</a>
                                              <?php 
                } else {
                    if (isset($item['status_comments']) && $item['count_comments'] > 0 && $item['status_comments'] < $item['count_comments'] && $item['status_comments'] == -100 && $item['closed_comments'] == 'f') {
                        $new_comments_num = $item['count_comments'];
                        ?>
                                              <a href="<?php 
                        echo getFriendlyURL("blog", $item['theme_id']);
                        ?>
#unread" style="color:#6BA813; font-weight:bold;">(<?php 
                        echo $new_comments_num;
                        ?>
 <?php 
                        echo $new_comments_num == 1 ? "новый" : "новых";
                        ?>
)</a>
                                              <?php 
                    }
                }
                ?>
                                        </li>
										<li class="lo-i-c"><a href="<?php 
                echo getFriendlyURL("blog_group", $item['commune_group_id']);
                ?>
"><?php 
                echo $item['commune_group_name'];
                ?>
</a></li>
										<li><?php 
                echo $post_year > 2000 ? dateFormat("d.m.Y H:i", $item['post_time']) : '';
                ?>
</li>
									</ul>
								</div>
                                <br>
                                    <?php 
                break;
        }
        $i++;
    }
    ?>

                    <?php 
    //                      $allThemesCount = lenta::GetLentaThemesCount($cms);
    ?>


<br/>
                        <?php 
    // Страницы
    $count = 4;
    $pages = ceil(($allWorkCount + $allThemesCount) / lenta::MAX_ON_PAGE);
    $html = '<div class="b-pager" >';
    if (is_array($count)) {
        list($scount, $ecount) = $count;
    } else {
        $scount = $ecount = $count;
    }
    if ($pages > 1) {
        $start = $page - $scount;
        if ($start < 1) {
            $start = 1;
        }
        $end = $page + $ecount;
        if ($end > $pages) {
            $end = $pages;
        }
        $html .= '<ul class="b-pager__back-next">';
        if ($page < $pages) {
            $html .= "<input type=\"hidden\" id=\"next_navigation_link1\" value=\"" . ($page + 1) . "\">";
            $html .= '<li class="b-pager__next" id="nav_next_not_active1"><a class="b-pager__link" href="javascript:void(0)" onClick="document.location.href=\'#lentatop\'; spiner.show(); xajax_Lenta_Show(' . ($page + 1) . '); return false;" id="PrevLink"></a>&nbsp;&nbsp;</li>';
        }
        if ($page > 1) {
            $html .= "<input type=\"hidden\" id=\"pre_navigation_link1\" value=\"" . ($page - 1) . "\">";
            $html .= '<li class="b-pager__back">&nbsp;&nbsp;<a id="NextLink" class="b-pager__link" href="javascript:void(0)" onClick="document.location.href=\'#lentatop\'; spiner.show(); xajax_Lenta_Show(' . ($page - 1) . '); return false;"></a></li>';
        }
        $html .= '</ul>';
        $html .= '<ul class="b-pager__list">';
        for ($i = $start; $i <= $end; $i++) {
            if ($i == $start && $start > 1) {
                $html .= '<li class="b-pager__item"><a class="b-pager__link" href="javascript:void(0)" onClick="document.location.href=\'#lentatop\'; spiner.show(); xajax_Lenta_Show(1); return false;">1</a></li>';
                if ($i == 3) {
                    $html .= '<li class="b-pager__item"><a class="b-pager__link" href="javascript:void(0)" onClick="document.location.href=\'#lentatop\'; spiner.show(); xajax_Lenta_Show(2); return false;">2</a></li>';
                } elseif ($i != 2) {
                    $html .= "<li class='b-pager__item'>&hellip;</li>";
                }
            }
            $html .= $page == $i ? '<li class="b-pager__item b-pager__item_active"><span class="b-pager__b1"><span class="b-pager__b2">' . $i . '</span></span></li>' : '<li class="b-pager__item"><a class="b-pager__link" href="javascript:void(0)" onClick="document.location.href=\'#lentatop\'; spiner.show(); xajax_Lenta_Show(' . $i . '); return false;">' . $i . '</a></li>';
            if ($i == $end && $pages - 1 > $end) {
                $html .= '<li class="b-pager__item">&hellip;</li>';
            }
        }
        $html .= '</ul>';
    }
    echo $html . '</div>';
    // Страницы закончились
    ?>
    	                  
          
<?php 
    $content = ob_get_contents();
    ob_end_clean();
    $content_js = '';
    if ($yt_replace_data) {
        foreach ($yt_replace_data as $key => $value) {
            $yt_replace_data[$key] = preg_replace("/^(.*)<script.*\$/sm", "\$1", $value);
            $content_js .= preg_replace("/^(.*<script type='text\\/javascript'>)(.*)(<\\/script>)\$/sm", "\$2", $value);
        }
        $content = preg_replace($yt_replace_id, $yt_replace_data, $content);
        $objResponse->script($content_js);
    }
    $objResponse->assign('lenta-cnt', 'innerHTML', $content);
    $objResponse->script($content_js);
    $objResponse->script('spiner.hide();');
    $objResponse->script('$$("#lenta_cats_checkboxes input[type=checkbox]").each(function(el) { el.set("disabled", false); });');
    $objResponse->script('fix_banner();');
    return $objResponse;
}
">
                <?php 
    echo $message['uname'] ? $message['uname'] . ' ' : '';
    echo $message['usurname'] ? $message['usurname'] . ' ' : '';
    ?>
                [<?php 
    echo $message['login'];
    ?>
]</a> 
            [<?php 
    echo date("d.m.Y | H.i", strtotime($message['sent']));
    ?>
]
        </div>
        <div class="b-layout__txt"><?php 
    echo reformat($message['message'], 30, 0, -1);
    ?>
</div>
        <?php 
    if (count($message['files'])) {
        ?>
        <div class="filesize1">
            <?php 
        foreach ($message['files'] as $file) {
            ?>
            <div class="flw_offer_attach">
                <span class="b-icon b-icon_attach_png"></span> 
                <a class="b-layout__link" href="<?php 
            echo WDCPREFIX . '/' . $file['path'] . $file['fname'];
            ?>
" target="_blank"><?php 
Esempio n. 21
0
    ?>
			<br/>
			<?php 
}
?>

			<span id="letters_item_comment_<?php 
echo $letter['id'];
echo $type == 2 || $type == 6 ? "_{$nn}" : "";
?>
">
			<?php 
if ($letter['comment']) {
    ?>
				<?php 
    echo reformat(htmlspecialchars($letter['comment']), 20);
    ?>
&nbsp;&nbsp;<a class="b-icon b-icon_margtop_4 b-icon_sbr_edit2" href="#" onClick="letters.nn=<?php 
    echo $nn;
    ?>
; letters.formCommentShow(<?php 
    echo $letter['id'];
    ?>
); return false;"></a>
			<?php 
} else {
    ?>
				<a href="#" class="b-layout__link b-layout__link_bordbot_dot_000" onClick="letters.nn=<?php 
    echo $nn;
    ?>
; letters.formCommentShow(<?php 
Esempio n. 22
0
 /**
  * Возвращает несколько (@see self::HISTORY_COUNT) последних сообщений с контактом.
  * 
  * @param stdClass $attr - список параметров
  *                       mixed uid: uid пользователя или массив с uid'ами историю с которым нужно получить
  * @param  bool        - если true - разрешено передавать в качестве uid массив, если false - только одного
  *
  * @return array - массив с историей
  */
 protected function _ceHistory($attr, $mmode = false)
 {
     $messages = new messages();
     $stopWords = new stop_words(false);
     $res = array();
     $c = 0;
     if ($mmode) {
         $uids = $attr->uid;
         $oneUser = false;
         $maxid = 0;
     } else {
         $uids = intval($attr->uid);
         $oneUser = true;
         $maxid = isset($attr->maxid) ? intval($attr->maxid) : 0;
     }
     $rows = $messages->GetHistory($this->_uid, $uids, self::HISTORY_COUNT, $maxid);
     if ($rows) {
         for ($i = count($rows) - 1; $i >= 0; --$i) {
             $message = $rows[$i]['msg_text'];
             if ($rows[$i]['moderator_status'] === '0') {
                 $message = $stopWords->replace($message);
             }
             $message = reformat($message, 14, 0, 0, 1);
             $res[$c] = array('id' => $rows[$i]['id'], 'text' => iconv('CP1251', 'UTF-8', $message), 'incoming' => $rows[$i]['from_id'] == $this->_uid ? 0 : 1, 'time' => dateFormat('Y-m-d H:i:s', $rows[$i]['post_time']), 'files' => array());
             if (!$oneUser) {
                 $res[$c]['cuid'] = $rows[$i]['to_id'] == $this->_uid ? $rows[$i]['from_id'] : $rows[$i]['to_id'];
             }
             if ($rows[$i]['files']) {
                 foreach ($rows[$i]['files'] as $file) {
                     if (preg_match('/^users\\/[-_a-z0-9]{2}\\/([-_a-z0-9]+)/i', $file['path'], $o)) {
                         $res[$c]['files'][] = array('link' => WDCPREFIX . '/users/' . $o[1] . '/contacts/' . $file['fname'], 'filename' => $file['original_name']);
                     }
                 }
             }
             ++$c;
         }
     }
     return $res;
 }
Esempio n. 23
0
  <td  style="width:19px; height:20px" class="brdtop">&nbsp;</td>
</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="19" class="b-information-clause-content">
  <tr>
    <td style="padding:19px">
      <table width="100%" cellspacing="0" cellpadding="0">
        <col />
        <col />
        <col style="width:10px" />
        <?php 
    foreach ($communes as $comm) {
        ++$i;
        // Название.
        $name = "<a href='" . getFriendlyURL('commune_commune', $comm['id']) . "' class='blue' style='font-size:20px'>" . reformat($comm['name'], 25, 1) . '</a>';
        $descr = reformat($comm['descr'], 25, 1);
        // Сколько участников.
        $mAcceptedCnt = $comm['a_count'] - $comm['w_count'] + 1;
        $mCnt = $mAcceptedCnt . ' участник' . getSymbolicName($mAcceptedCnt, 'man');
        ?>
        
        
        
         <tr style="vertical-align:top">
            <td style="width:200px">

              <?php 
        echo __commPrntImage($comm, 'author_');
        ?>
            </td>
            <td style="padding:0 0 0 20px">
Esempio n. 24
0
</a>&raquo; 
<?php 
    if ($order['order_extra']) {
        ?>
и дополнительно:
<br/>
    <?php 
        foreach ($order['order_extra'] as $idx) {
            ?>
        <?php 
            if (!isset($order['extra'][$idx])) {
                continue;
            }
            ?>
        - <?php 
            echo reformat(htmlspecialchars($order['extra'][$idx]['title']), 30, 0, 1);
            ?>
<br/>
    <?php 
        }
    }
    ?>
на сумму <?php 
    echo $order_price;
    ?>
 со сроком выполнения <?php 
    echo $order_days;
    ?>
.
<?php 
} else {
Esempio n. 25
0
        <span class="b-icon b-icon__cont b-icon__cont_www b-icon_margleft_-25"></span>
        <div class="b-layout__txt b-layout__txt_valign_top b-layout__txt_lineheight_1 b-layout__txt_ellipsis b-layout_inline-block b-layout__txt_width_225"><?php 
        echo reformat($site, 0, 0, 0, 0, 80);
        ?>
</div>
   </div>
</div>
<?php 
    } else {
        //if
        ?>
<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_www b-icon_margleft_-25"></span>
        <div class="b-layout__txt b-layout__txt_valign_top b-layout__txt_lineheight_1 b-layout__txt_ellipsis b-layout_inline-block b-layout__txt_width_225"><?php 
        echo reformat($site, 0, 0, 0, 0, 80);
        ?>
</div>
   </div>
</div>
<?php 
    }
    //else
    $_SESSION['direct_external_links'] = $direct_external_links;
    $is_first = false;
}
if ($user->icq && !($info_for_reg['icq'] && !$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_icq b-icon_top_-1 b-icon_margleft_-25"></span>
Esempio n. 26
0
/**
 * Сохраняет изменения рейтинга СБР.
 */
function editFeedback($stage_id, $feedback_id, $ops_type, $mesg, $login)
{
    $stage_id = intval($stage_id);
    $objResponse = new xajaxResponse();
    $request = array('id' => intval($feedback_id), 'descr' => $mesg);
    if ($ops_type !== null) {
        $request += array('ops_type' => intval($ops_type));
    }
    if ($login && hasPermissions('sbr')) {
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php';
        $user = new users();
        $user->GetUser($login);
        if (!$user->uid) {
            $err = 'Ошибка';
        }
        $sbr = sbr_meta::getInstance(sbr_meta::ADMIN_ACCESS, $user, is_emp($user->role));
    } else {
        $sbr = sbr_meta::getInstance();
    }
    if ($sbr) {
        $stage = $sbr->getStage($stage_id);
    }
    if ($stage) {
        if ($feedback = $stage->feedback($request)) {
            $objResponse->call('saveRating', null, $stage->id, $feedback['id'], reformat($feedback['descr'], 30, 0, 1, 1), $feedback['p_rate'], $feedback['n_rate'], $feedback['a_rate']);
        }
        if ($stage->error['feedback']) {
            $err = 'Ошибка';
            if ($stage->error['feedback']['descr']) {
                $err = $stage->error['feedback']['descr'];
            }
        }
    }
    if ($err) {
        $objResponse->call('saveRating', $err, $stage_id);
    }
    return $objResponse;
}
Esempio n. 27
0
" 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'];
        ?>
</a></div></td>
    				<td class="b-layout__one b-layout__one_bordbot_ccc b-layout__one_padtb_10"><div class="b-layout__txt"><?php 
Esempio n. 28
0
    				<td><span class="i-chk"><input type="checkbox" id="del_draft_<?php 
        echo $draft['id'];
        ?>
" name="del_draft[]" value="<?php 
        echo $draft['id'];
        ?>
" onClick="DraftsCheckToggleDeleteAll(this);" /></span></td>
                    <td><a href="/public/?step=1&kind=<?php 
        echo $draft['kind'];
        echo $draft['prj_id'] ? "&public={$draft['prj_id']}" : '';
        ?>
&draft_id=<?php 
        echo $draft['id'];
        ?>
&red="><?php 
        echo $draft['name'] != '' ? reformat(str_replace(array('<', '>'), array('&lt;', '&gt;'), $draft['name']), 27, 0, 1) : '[без названия]';
        ?>
</a></td>
    				<td><?php 
        echo $draft['pdate'];
        ?>
</td>
    				<td><a href="/public/?step=1&kind=<?php 
        echo $draft['kind'];
        echo $draft['prj_id'] ? "&public={$draft['prj_id']}" : '';
        ?>
&draft_id=<?php 
        echo $draft['id'];
        ?>
&red=&auto_draft=1">Опубликовать</a></td>
    				<td><a href="" onClick="DraftDeleteSubmit(<?php 
<?php

/**
* Шаблон окошка редактирования бюджета и сроков заказа ТУ
*/
$title = reformat(htmlspecialchars($order['title']), 30, 0, 1);
?>
<div id="tu_edit_budjet" class="b-shadow b-shadow_hide b-shadow_pad_20 b-shadow_center b-shadow_width_320 b-shadow_zindex_4">
    <h2 class="b-layout__txt b-layout__txt_fontsize_18">
        Редактирование бюджетов и сроков
    </h2>
    <div class="b-layout__txt b-layout__txt_padbot_10">Заказ "<span class="b-layout__bold"><?php 
echo $title;
?>
</span>"</div>
    <table class="b-layout__table b-layout__table_width_full">
        <tr class="b-layout__tr">
            <td class="b-layout__td b-layout__td_width_70 b-layout__td_padbot_10">
                <div class="b-layout__txt b-layout__txt_padtop_5">
                    Бюджет
                </div>
            </td>
            <td class="b-layout__td b-layout__td_width_100 b-layout__td_padbot_10">
                <div class="b-combo">
                    <div class="b-combo__input">
                        <input class="b-combo__input-text" id="tu_edit_budjet_price" type="text" size="80" value="<?php 
echo $order['order_price'];
?>
" />
                    </div>
                </div>
Esempio n. 30
0
            ?>
    	<?php 
            if (in_array($aOne['act_id'], $aReasonData)) {
                echo '<br/>', $aOne['admin_comment'];
                $aOne['admin_comment'] = '';
            }
            ?>
    	</td>
   	</tr>
   	<?php 
            if ($aOne['admin_comment']) {
                ?>
	<tr>
    	<td class="cell-number">Причина:</td>
    	<td class="cell-body"><?php 
                echo hyphen_words(reformat($aOne['admin_comment'], 45), true);
                ?>
</td>
   	</tr>
   	<?php 
            }
            ?>
   	<tr class="last">
    	<td class="cell-number">&nbsp;</td>
    	<td class="cell-body" id="prj_<?php 
            echo $aOne['object_id'];
            ?>
_log_<?php 
            echo $aOne['id'];
            ?>
">