Beispiel #1
0
 public function getUrl()
 {
     return sprintf('/tu/%d/%s.html', $this->id, tservices_helper::translit($this->title));
 }
Beispiel #2
0
    ?>
" 
       class="b-button b-button_flat b-button_flat_green b-button_margbot_30 b-button_margtop_30" 
       onClick="yaCounter6051055.reachGoal('add_new_tu');">
        Добавить услугу
    </a>
    <?php 
}
?>
    <div class="b-layout b-layout_padtop_20 b-layout__cf">
    <?php 
if (count($data)) {
    ?>
        <?php 
    foreach ($data as $el) {
        $url = sprintf('/tu/%d/%s.html', $el['id'], tservices_helper::translit($el['title']));
        $edit_url = sprintf('/users/%s/tu/edit/%d/', $user->login, $el['id']);
        $videos = !empty($el['videos']) ? mb_unserialize($el['videos']) : array();
        $video = count($videos) ? current($videos) : NULL;
        ?>
        <figure class="i-pic i-pic_port_z-index_inherit <?php 
        if ($user->is_pro == 'f') {
            ?>
i-pic_tu<?php 
        } else {
            ?>
i-pic_tu-col-4<?php 
        }
        ?>
">
Beispiel #3
0
        if ($action == 'save') {
            $errors = tu_validation($tservice);
            if (count($errors) == 0) {
                $id = $tservice->create();
                $sess = __paramInit('string', NULL, 'uploader_sess', NULL);
                if ($sess) {
                    $tservice->addAttachedFiles($sess, $id);
                }
                $sess_p = __paramInit('string', NULL, 'preview_sess', NULL);
                if ($sess_p) {
                    $tservice->addAttachedFiles($sess_p, $id);
                }
                //message ?
                $msg_type = $tservice->active === 't' ? 'new_saved_publish' : 'new_saved';
                tservices_helper::setFlashMessageFromConstWithTitle($msg_type, $tservice->title);
                $tu_card_uri = sprintf('/tu/%d/%s.html', $id, tservices_helper::translit($tservice->title));
                header("Location: {$tu_card_uri}");
                exit;
            }
        }
        //SEO
        $page_title = 'Добавление типовой услуги на FL.ru';
        //$page_descr = ''
        //$page_keyw = '';
}
//------------------------------------------------------------------------------
//Превью
$preview_field = array();
if (count($tservice->preview)) {
    foreach ($tservice->preview as $key => $image) {
        $preview_field = array('hash' => md5($solt . $image['id'] . $tuid . $uid), 'qquuid' => $image['id'], 'src' => WDCPREFIX . '/' . $image['path'] . $image['fname']);