当前位置: 首页>>代码示例>>PHP>>正文


PHP projects::GetAllAttach方法代码示例

本文整理汇总了PHP中projects::GetAllAttach方法的典型用法代码示例。如果您正苦于以下问题:PHP projects::GetAllAttach方法的具体用法?PHP projects::GetAllAttach怎么用?PHP projects::GetAllAttach使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在projects的用法示例。


在下文中一共展示了projects::GetAllAttach方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _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("//", "&nbsp;", $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

示例2: reformat

    if ($prj['name']) {
        ?>
<strong><?php 
        echo $prj['name'];
        ?>
</strong><?php 
    }
    ?>
<br>
	<?php 
    echo reformat($prj['descr'], 96);
    ?>
<br><br>
	<?php 
    $projects = new projects();
    $attach = $projects->GetAllAttach($prj['id']);
    for ($j = 0; $j < count($attach); ++$j) {
        if ($attach[$j]['name']) {
            print '<div class="flw_offer_attach"><a href="/users/' . $prj['login'] . '/upload/' . $attach[$j]['name'] . '" target="_blank">Загрузить</a> (' . $attach[$j]['ftype'] . '; ' . ConvertBtoMB($attach[$j]['size']) . ' )</div>';
        }
    }
    ?>
	<?php 
    if ($uid != $_SESSION['uid'] && $prj['closed'] == 'f') {
        ?>
<form action="/contacts/?from=<?php 
        echo $user->login;
        ?>
#form" method="post"><input type="hidden" name="prjname" value="<?php 
        echo $prj['name'] ? $prj['name'] : 'заголовок отсутствует';
        ?>
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:aboutprj_inner.php

示例3: _admEditProjectsParseForm

/**
 * Отдает HTML для Редактирование проектов и конкурсов
 * 
 * @param  object $objResponse xajaxResponse
 * @param  string $rec_id идентификатор записи
 * @param  string $rec_type тип записи
 * @param  array $aParams дополнительные параметры с UID отправителя. остальные - опционально
 * @return string
 */
function _admEditProjectsParseForm(&$objResponse, $rec_id = '', $rec_type = '', $aParams = array())
{
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/city.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/country.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/professions.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/attachedfiles.php';
    $sTmpKey = md5(uniqid($_SESSION['uid']));
    $tmpPrj = new tmp_project($sTmpKey);
    $prj = $tmpPrj->init(1, $rec_id);
    $tmpPrj->fix();
    // $aFolders   = projects::getUserFolders( $prj['user_id'] ); // папки
    $remTPeriod = $tmpPrj->getRemainingTopPeriod($remTD, $remTH, $remTM, $remtverb);
    // закрепление
    // страны и города
    $countries = country::GetCountries();
    if ($prj['country']) {
        $cities = city::GetCities($prj['country']);
    }
    // разделы
    $categories = professions::GetAllGroupsLite();
    $professions = professions::GetAllProfessions();
    array_group($professions, 'groupid');
    $professions[0] = array();
    $project_categories = new_projects::getSpecs($rec_id);
    if (empty($project_categories)) {
        $project_categories[] = array('category_id' => 0, 'subcategory_id' => 0);
    }
    ob_start();
    include_once $_SERVER['DOCUMENT_ROOT'] . '/user/adm_edit_tpl/projects.php';
    $sHtml = ob_get_contents();
    ob_end_clean();
    // текст
    $sOnReady = "if(document.getElementById('adm_edit_descr')) \n        document.getElementById('adm_edit_descr').value = (\$('adm_edit_descr_source')? \$('adm_edit_descr_source').value : null);";
    // аттачи
    $sAttach = getAttachedFilesJs(projects::GetAllAttach($rec_id), tmp_project::MAX_FILE_COUNT, tmp_project::MAX_FILE_SIZE, 'project');
    $objResponse->assign('h4_adm_edit', 'innerHTML', 'Редактировать ' . ($rec_type == '7' ? 'конкурс' : 'проект'));
    $objResponse->assign('div_adm_edit', 'innerHTML', $sHtml);
    $objResponse->script("\$('div_adm_reason').setStyle('display', 'none');");
    $objResponse->script("adm_edit_content.editMenuItems = ['', 'Основное', 'Файлы', 'Платные услуги'];");
    $objResponse->script('adm_edit_content.edit();');
    $objResponse->script($sAttach);
    $objResponse->script($sOnReady);
    $objResponse->script("var mx = new MultiInput('adm_edit_professions','category_line'); mx.init();");
    $objResponse->script('xajax_getAdmEditReasons(' . admin_log::ACT_ID_EDIT_PROJECTS . ');');
    // для конкурса даты окончания и определения победителей
    if ($prj['kind'] == 7) {
        $objResponse->script("new tcal ({ 'formname': 'adm_edit_frm', 'controlname': 'adm_edit_end_date', 'iconId': 'end_date_btn', 'clickEvent': function(){ adm_edit_content.hideError('end_date'); } });");
        $objResponse->script("new tcal ({ 'formname': 'adm_edit_frm', 'controlname': 'adm_edit_win_date', 'iconId': 'win_date_btn', 'clickEvent': function(){ adm_edit_content.hideError('win_date'); } });");
    }
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:60,代码来源:adm_edit_content.server.php

示例4: header

    projects::SetWinner($_SESSION['uid'], $winner);
    //header("Location: /blogs/view.php?tr=$thread");
    header("Location: /blogs/view.php?tr={$thread}&pagefrom=" . intval($_POST['pagefrom']) . "&ord=" . $_GET["ord"]);
}
$base = (int) (!!trim($_GET['t']));
//$theme = intval(trim($_GET['b']));
$blog = new blogs();
list($gr_name, $gr_id, $gr_base) = $blog->GetThread($thread, $err, $mod, $uid);
$main = $blog->id;
if ($gr_base == 5) {
    require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/projects.php";
    $winner = projects::CheckWinner($gr_id);
}
if ($blog->id_gr && ($blog->base == 3 || $blog->base == 5)) {
    require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/projects.php";
    $attach_ar = projects::GetAllAttach($blog->id_gr);
}
if ($gr_base == 3 || $gr_base == 4 || $gr_base == 5 || !isset($gr_base)) {
    $grey_blogs = 0;
}
if (($gr_base == 3 || $gr_base == 5) && !hasPermissions('blogs')) {
    require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/projects.php";
    if (projects::CheckProOnly($thread) == 't' && !$_SESSION['pro_last'] && $_SESSION['login'] !== $blog->login && !is_emp()) {
        header("Location: /proonly.php");
    }
}
if ($blog->deleted && !hasPermissions('blogs')) {
    include ABS_PATH . "/404.php";
    exit;
}
if ($blog->is_private && $uid != $blog->fromuser_id && !hasPermissions('blogs')) {
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:view.php

示例5: _getProjectsAttachSpecs

 /**
  * Вспомогательная функция для получения аттачей и профессий для проектов/конкурсов
  * 
  * @param type $aReturn 
  */
 function _getProjectsAttachSpecs(&$aReturn = array())
 {
     require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/projects.php";
     require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
     // аттачи
     foreach ($aReturn as $key => $aOne) {
         $aReturn[$key]['attach'] = projects::GetAllAttach($aOne['id']);
         $aReturn[$key]['specs'] = projects::getSpecsStr($aOne['id'], ' / ', ', ', true);
         $aReturn[$key]['specs'] = str_replace('<a', '<a target="_blank"', $aReturn[$key]['specs']);
     }
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:16,代码来源:user_content.php

示例6: projects

    exit;
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/professions.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects.php';
$sPrjId = __paramInit('string', 'pid');
$aReasons = admin_log::getAdminReasons(9);
$js_file[] = 'banned.js';
if ($sPrjId) {
    if (!preg_match('/^[\\d]+$/', $sPrjId)) {
        header_location_exit('/404.php');
    }
    require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/projects.php";
    $log = $admin_log->getLogProjById($nCount, $sPrjId);
    $obj_project = new projects();
    $project = $obj_project->GetPrjCust($sPrjId);
    $project_attach = $obj_project->GetAllAttach($sPrjId);
    $project_history = $obj_project->GetPrjHistory($sPrjId);
} else {
    $_SESSION['admin_log_proj'] = $_SERVER['REQUEST_URI'];
    $actions = $admin_log->getAdminActions(admin_log::OBJ_CODE_PROJ);
    $admins = $admin_log->getAdminsInLog(admin_log::OBJ_CODE_PROJ);
    $all_specs = professions::GetAllProfessions('', 0, 1);
    $categories = professions::GetAllGroupsLite(true);
    $filter_specs = '';
    $spec_now = 0;
    for ($i = 0; $i < sizeof($all_specs); $i++) {
        if ($all_specs[$i]['groupid'] != $spec_now) {
            $spec_now = $all_specs[$i]['groupid'];
            $filter_specs .= "filter_specs[" . $all_specs[$i]['groupid'] . "]=[";
        }
        $filter_specs .= "[" . $all_specs[$i]['id'] . ",'" . $all_specs[$i]['profname'] . "']";
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:proj.php

示例7: quickprjedit_save_prj


//.........这里部分代码省略.........
                        $this_pro_last = $_SESSION['pro_last'];
                        $this_is_pro = payed::CheckPro($_SESSION['login']);
                        $this_edit_mode = hasPermissions('projects');
                        if ($this_uid) {
                            $this_user_role = $_SESSION['role'];
                        }
                        $this_project = $tproject[0];
                        $row = $this_project;
                        if ($this_edit_mode || $this_project['kind'] == 2 || $this_project['user_id'] == $this_uid || $this_project['offer_id'] || $this_pro_last) {
                            $this_show_data = 1;
                            $row['show_data'] = 1;
                        } else {
                            $this_show_data = 0;
                            $row['show_data'] = 0;
                        }
                        $descr = $row['descr'];
                        $descr = preg_replace('/^ /', "", $descr);
                        $descr = preg_replace("/(\n) /", "\$1", $descr);
                        $descr = reformat(strip_tags(LenghtFormatEx($descr, 180), '<br />'), 50, 1, 0, 1);
                        $descr = preg_replace("//", '&nbsp;', $descr);
                        $row['descr'] = $descr;
                        $row['t_is_payed'] = $this_project['payed'] && $this_project['kind'] != 2 && $this_project['kind'] != 7;
                        $row['t_is_contest'] = $this_project['kind'] == 2 || $this_project['kind'] == 7;
                        $row['t_pro_only'] = $this_project['pro_only'] == 't';
                        $row['t_verify_only'] = $this_project['verify_only'] == 't';
                        $row['t_hide'] = $this_project['hide'] == 't';
                        $row['t_urgent'] = $this_project['urgent'] == 't';
                        $row['t_prefer_sbr'] = $this_project['prefer_sbr'] == 't';
                        $row['priceby'] = $this_project['priceby'];
                        $row['t_is_adm'] = hasPermissions('projects');
                        $row['t_is_ontop'] = strtotime($this_project['top_to']) >= time();
                        $row['unread'] = (int) $this_project['unread_p_msgs'] + (int) $this_project['unread_c_msgs'] + (int) $this_project['unread_c_prjs'];
                        $row['t_is_proonly'] = $this_project['pro_only'] == 't' && !$_SESSION['pro_last'] && !$this_edit_mode && $this_uid != $this_project['user_id'];
                        $attaches = projects::GetAllAttach($this_project['id']);
                        $attaches = !$attaches ? array() : $attaches;
                        foreach ($attaches as $k => $a) {
                            $a['virus'] = is_null($a['virus']) ? $a['virus'] : bindec($a['virus']);
                            $attaches[$k] = $a;
                        }
                        $row['attaches'] = $this_project['attaches'] = $attaches;
                        $is_ajax = true;
                        $can_change_prj = hasPermissions('projects');
                        $row['friendly_url'] = getFriendlyURL('project', $row['id']);
                        ob_start();
                        if ($type == 1) {
                            $project = projects::initData($row);
                            require_once $_SERVER['DOCUMENT_ROOT'] . '/projects/tpl.lenta-item.php';
                        } else {
                            require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/employer.php';
                            $user = new employer();
                            $user->GetUserByUID($this_project['user_id']);
                            require_once $_SERVER['DOCUMENT_ROOT'] . '/projects/tpl.employer-project-item.php';
                        }
                        $html_data = ob_get_contents();
                        ob_end_clean();
                        $objResponse->assign("project-item{$prj_id}", 'innerHTML', $html_data);
                        if ($row['is_color'] == 't') {
                            $objResponse->script("\$('project-item{$prj_id}').addClass('b-post_bg_fffded')");
                        } else {
                            $objResponse->script("\$('project-item{$prj_id}').removeClass('b-post_bg_fffded')");
                        }
                        //$objResponse->script('alert("Лента");');
                        //$objResponse->script('window.location.reload();');
                        break;
                    case 2:
                        // Конкурс
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:67,代码来源:projects-quick-edit.server.php

示例8: ShowProjects

 /**
  * Функция генерации ленты проектов.
  *
  * @param int     $num_prjs проектов на странице
  * @param array   $projects массив проектов (результат работы projects::GetProjects())
  * @param int     $kind     закладка
  * @param int     $page     номер страницы
  * @param inetger $is_ajax  если функция вызвана через ajax @see JS seo_print();
  *
  * @return HTML
  */
 public function ShowProjects($num_prjs, $projects, $kind, $page, $filter, $is_ajax)
 {
     $this->projects = $projects;
     $this->num_prjs = $num_prjs;
     $this->kind = $this_kind = $kind;
     $this->page = $this_page = $page == '' ? 1 : $page;
     $this->pages = ceil($this->num_prjs / new_projects::PAGE_SIZE);
     $this->filter = $this_filter = (int) ($filter && $filter['active'] == 't');
     $this->uid = $this_uid = get_uid(false);
     $this->pro_last = $this_pro_last = $_SESSION['pro_last'];
     $this->is_pro = $this_is_pro = payed::CheckPro($_SESSION['login']);
     $this->edit_mode = $this_edit_mode = hasPermissions('projects');
     if ($this->uid) {
         $this->user_role = $this_user_role = $_SESSION['role'];
     }
     $outHTML = '';
     $outHTML .= $this->ShowHeader();
     $list = array();
     if ($projects) {
         require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/stop_words.php';
         $stop_words = new stop_words(hasPermissions('projects'));
         foreach ($projects as $i => $project) {
             $this->project = $project;
             $list[$i] = $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;
                 $list[$i]['show_data'] = 1;
             } else {
                 $this->show_data = 0;
                 $list[$i]['show_data'] = 0;
             }
             $descr = $list[$i]['descr'];
             $descr = $list[$i]['moderator_status'] === '0' && $list[$i]['kind'] != 4 && $list[$i]['is_pro'] != 't' ? $stop_words->replace($descr) : $descr;
             $descr = preg_replace('/^ /', "", $descr);
             $descr = preg_replace("/(\n) /", "\$1", $descr);
             $descr = LenghtFormatEx($descr, 180);
             $descr = htmlspecialchars($descr, ENT_QUOTES, 'CP1251', false);
             $descr = reformat($descr, 50, 1, 0, 1);
             $descr = preg_replace("//", '&nbsp;', $descr);
             $list[$i]['name'] = htmlspecialchars($list[$i]['name'], ENT_QUOTES, 'CP1251', false);
             $list[$i]['descr'] = $descr;
             $list[$i]['t_is_payed'] = $this->project['payed'] && $this->project['kind'] != 2 && $this->project['kind'] != 7 && $this->project['kind'] != 4;
             $list[$i]['t_is_contest'] = $this->project['kind'] == 2 || $this->project['kind'] == 7;
             $list[$i]['t_pro_only'] = $this->project['pro_only'] == 't';
             $list[$i]['t_verify_only'] = $this->project['verify_only'] == 't';
             $list[$i]['t_prefer_sbr'] = $this->project['prefer_sbr'] == 't';
             $list[$i]['priceby'] = $this->project['priceby'];
             $list[$i]['t_is_adm'] = hasPermissions('projects');
             $list[$i]['t_is_ontop'] = strtotime($this->project['top_to']) >= time();
             $list[$i]['unread'] = (int) $this->project['unread_p_msgs'] + (int) $this->project['unread_c_msgs'] + (int) $this->project['unread_c_prjs'];
             $list[$i]['t_is_proonly'] = $this->project['pro_only'] == 't' && !$_SESSION['pro_last'] && !$this->edit_mode && $this->uid != $this->project['user_id'];
             $list[$i]['friendly_url'] = getFriendlyURL('project', array('id' => $this->project['id'], 'name' => $this->project['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;
             }
             $list[$i]['attaches'] = $this->project['attaches'] = $attaches;
             $list[$i]['view_cnt'] = projects::getProjectViews($this->project['id']);
         }
     } elseif ($page == 1) {
         $outHTML .= '<div class="project-preview">Ничего не найдено</div>';
     }
     $kind = $this->kind;
     require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/professions.php';
     switch ($kind) {
         case 0:
         case 1:
             $rss_link = 'projects.xml';
             break;
         case 2:
             $rss_link = 'competition.xml';
             break;
         case 4:
             $rss_link = 'office.xml';
             break;
         case 6:
             $rss_link = 'pro.xml';
             break;
         case 5:
             $rss_link = 'all.xml';
             break;
         default:
             $rss_link = 'all.xml';
             break;
     }
     $isPrjOpened = isset($_COOKIE['isPrjOpened']) ? $_COOKIE['isPrjOpened'] : true;
     ob_start();
//.........这里部分代码省略.........
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:101,代码来源:projects_lenta.php

示例9: reformat2

            }
            ?>
            <?php 
        }
        ?>
          <div class="b-post__body b-post__body_padtop_15 b-post__body_padbot_10">
            <div class="b-post__txt">
               <?php 
        echo reformat2(LenghtFormatEx($prj['descr'], 300), 50, 1, 0, 1);
        ?>
            </div>
          </div>
          <?php 
        if ($prj['pro_only'] != 't' || $is_pro) {
            $i = 0;
            if ($attach = projects::GetAllAttach($prj['id'])) {
                foreach ($attach as $a) {
                    if ($a['name']) {
                        ?>
<div class="flw_offer_attach"><a href="<?php 
                        echo WDCPREFIX . '/' . $a['path'] . $a['name'];
                        ?>
" target="_blank">Загрузить</a> (<?php 
                        echo $a['ftype'];
                        ?>
; <?php 
                        echo ConvertBtoMB($a['size']);
                        ?>
)</div><?php 
                    }
                    $i++;
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:content_list.php

示例10: CurToChar

         default:
             $priceby_str = '';
             break;
     }
     if ($project['cost'] == '' || $project['cost'] == 0) {
         $priceby_str = '';
     }
     $project['price_display'] = CurToChar($project['cost'], $project['currency']) . $priceby_str;
     $project['price_display'] = str_replace(array('&euro;', '&nbsp;'), array('€', ' '), $project['price_display']);
 }
 $price = @$project['price_display'] ? $project['price_display'] : 'по договоренности';
 // OpenGraph данные для шаринга в соц.сети
 $FBShare = array('title' => $sTitle . ' - ' . $price, 'description' => '', 'image' => $GLOBALS['host'] . '/images/logo_50x50.png');
 //if ($project['pro_only'] == 't' && !$is_pro && $project['user_id']!=$_SESSION['uid'] && !hasPermissions('projects')) {include("../proonly.php");exit;}
 if (get_uid(false)) {
     $project_attach = $obj_project->GetAllAttach($prj_id);
 }
 /*
 // Стоимость проекта в разных валютах.
 require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/exrates.php");
 $exrates = new exrates();
 $exrate = $exrates -> GetField($oldMoneyType . $money_to_type, $error, 'val');
 if ($exrate) $money_to_sum = floor($oldMoneySum * 98 * $exrate)/100;
 */
 // Предложения по данному проекту.
 $obj_offer = new projects_offers();
 $smail = new smail();
 // Диалог по предложениям к данному проекту.
 $obj_dialogue = new projects_offers_dialogue();
 if (hasPermissions('projects') && $project['login'] != $_SESSION['login']) {
     switch ($action) {
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php


注:本文中的projects::GetAllAttach方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。