Exemple #1
0
 /**
  * Формирует XML для Rambler.Job
  * Массив проектов может содержать страну и название компании (текстом, брать из профайла работодателя).
  * Проверить формат даты.
  * Проверить экранирование и допустимость символов.
  *
  * @param array $projects массив проектов.
  */
 function makeRamblerJobXML($projects)
 {
     $xml = '<document-list>';
     $xml .= '<date>' . date() . '</date>';
     $xml .= '<site-url>www.free-lance.ru</site-url>';
     $xml .= '<documents>';
     foreach ($projects as $key => $project) {
         $xml .= '<vacancy>';
         $xml .= '<url>' . HTTP_PREFIX . 'www.fl.ru/projects/' . $project['id'] . '</url>';
         $xml .= '<offer-date>' . date($project['add_date']) . '</offer-date>';
         $xml .= '<valid-till>' . date($project['add_date'] + 60 * 60 * 24 * 7) . '</valid-till>';
         $xml .= '<offer>';
         $xml .= '<title>' . $project['name'] . '</title>';
         $xml .= '<description>' . $project['descr'] . '</description>';
         $xml .= '<occupation>' . GetKind($project['kind']) . '</occupation>';
         $xml .= '</offer>';
         if (isset($project['compname']) && !is_empty($project['compname'])) {
             $xml .= '<company>';
             if (isset($project['cityname']) && !is_empty($project['cityname'])) {
                 $xml .= '<city>' . $project['cityname'] . '</city>';
             }
             $xml .= '<name>' . $project['compname'] . '</name>';
             $xml .= '</company>';
         }
         $xml .= '<salary>';
         $xml .= '<currency>' . GetCur($project['cunnercy']) . '</currency>';
         $xml .= '<min>' . $project['cost'] . '</min>';
         $xml .= '<max>' . $project['cost'] . '</max>';
         $xml .= '<salary>';
         /*if ($project['prepay'] == 't') {
               $xml .= '<additional>';
               $xml .= '<prepay>Предоплата</prepay>';
               $xml .= '</additional>';
           }*/
         $xml .= '</vacancy>';
     }
     $xml .= '</documents>';
     $xml .= '</document-list>';
 }
                echo $prj['kind'];
                ?>
&page=<?php 
                echo $page;
                ?>
#prj<?php 
                echo $prj['id'];
                ?>
"><?php 
                echo $counte_page;
                ?>
-е по счету (<?php 
                echo $page;
                ?>
-я страница)</a><br>закладка "<?php 
                echo GetKind($prj["kind"]);
                ?>
"
            <?php 
            }
            if (is_new_prj($prj['post_date'])) {
                ?>
            <br><?php 
                echo !$prj["comm_count"] || $prj["comm_count"] % 10 == 0 || $prj["comm_count"] % 10 > 4 || $prj["comm_count"] > 4 && $prj["comm_count"] < 21 ? '<a class="public_blue" href="/blogs/view.php?tr=' . $prj['thread_id'] . '">' . $prj["comm_count"] . ' предложений</a>' : ($prj["comm_count"] % 10 == 1 || $prj["comm_count"] == 1 ? '<a class="public_blue" href="/blogs/view.php?tr=' . $prj['thread_id'] . '">' . $prj["comm_count"] . ' предложение</a>' : '<a class="public_blue" href="/blogs/view.php?tr=' . $prj['thread_id'] . '">' . $prj["comm_count"] . ' предложения</a>');
                ?>
<br><br>
<?php 
            } else {
                ?>
            <br><?php 
                echo !$prj["offers_count"] || $prj["offers_count"] % 10 == 0 || $prj["offers_count"] % 10 > 4 || $prj["offers_count"] > 4 && $prj["offers_count"] < 21 ? '<a class="public_blue" href="/projects/?pid=' . $prj['id'] . '&f=1">' . $prj["offers_count"] . ' предложений</a>' : ($prj["offers_count"] % 10 == 1 || $prj["comm_count"] == 1 ? '<a class="public_blue" href="/projects/?pid=' . $prj['id'] . '&f=1">' . $prj["offers_count"] . ' предложение</a>' : '<a class="public_blue" href="/projects/?pid=' . $prj['id'] . '&f=1">' . $prj["offers_count"] . ' предложения</a>');
Exemple #3
0
    ?>
 b-layout__txt_fontsize_11">Выплата вознаграждения через сервис <a href="/promo/bezopasnaya-sdelka/" target="_blank" class="b-layout__link">Безопасная Сделка</a> <?php 
    echo view_sbr_shield('', 'b-icon_top_2');
    ?>
</div>
                        <?php 
}
?>

		<?php 
if ((hasPermissions('projects') || $contest->is_owner) && $project["closed"] != "t") {
    ?>
		<div class="b-layout__txt b-layout__txt_padbot_30">
         <div class="b-layout__txt b-layout__txt_fontsize_11">
            Статистика: закладка "<?php 
    echo GetKind($project["kind"]);
    ?>
" 
            <a class="b-layout__link" href="#" id="pos_link_<?php 
    echo $project['id'];
    ?>
" onclick="xajax_getStatProject(<?php 
    echo $project['id'];
    ?>
, '<?php 
    echo $project['payed_to'];
    ?>
', '<?php 
    echo $project['now'];
    ?>
', '<?php 
                        }
                    } else {
                        ?>
            <?php 
                        echo !$prj["offers_count"] || $prj["offers_count"] % 10 == 0 || $prj["offers_count"] % 10 > 4 || $prj["offers_count"] > 4 && $prj["offers_count"] < 21 ? '<a class="public_blue" href="' . $blink . '">' . $prj["offers_count"] . ' предложений</a>' : ($prj["offers_count"] % 10 == 1 || $prj["comm_count"] == 1 ? '<a class="public_blue" href="' . $blink . '">' . $prj["offers_count"] . ' предложение</a>' : '<a class="public_blue" href="' . $blink . '">' . $prj["offers_count"] . ' предложения</a>');
                        ?>
            <?php 
                        if ($prj["is_new_offers"] == 't') {
                            ?>
</b><?php 
                        }
                    }
                    ?>
<br/>
закладка "<?php 
                    echo GetKind($prj['kind']);
                    ?>
"<br/>
                <?php 
                    if ($prj["closed"] == "t") {
                    } elseif ($now) {
                        $payed = $prj["top_to"] > $prj["now"] && $prj["payed"] ? 1 : 0;
                        $counte = $projects->CountProjectNew($prj['post_date'], $prj['kind'], $prj['top_from'], $prj['top_to'], $prj['strong_top']);
                        $page = floor($counte / $GLOBALS["prjspp"]) + 1;
                        $counte_page = $counte % $GLOBALS["prjspp"];
                        if ($counte_page == 0) {
                            $counte_page = $GLOBALS["prjspp"];
                            $page--;
                        }
                        ?>
            <a class="public_blue" href="/projects/?kind=<?php