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


PHP render_cnt_template函数代码示例

本文整理汇总了PHP中render_cnt_template函数的典型用法代码示例。如果您正苦于以下问题:PHP render_cnt_template函数的具体用法?PHP render_cnt_template怎么用?PHP render_cnt_template使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: die

// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
    die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
//bullet list
// read template
if (empty($crow["acontent_template"]) && is_file(PHPWCMS_TEMPLATE . 'inc_default/bulletlist.tmpl')) {
    $crow["acontent_template"] = render_device(@file_get_contents(PHPWCMS_TEMPLATE . 'inc_default/bulletlist.tmpl'));
} elseif (is_file(PHPWCMS_TEMPLATE . 'inc_cntpart/bulletlist/' . $crow["acontent_template"])) {
    $crow["acontent_template"] = render_device(@file_get_contents(PHPWCMS_TEMPLATE . 'inc_cntpart/bulletlist/' . $crow["acontent_template"]));
} else {
    $crow["acontent_template"] = '[TITLE]<h4>{TITLE}</h4>' . LF . '[/TITLE][SUBTITLE]<h5>{SUBTITLE}</h5>' . LF . '[/SUBTITLE]';
    $crow["acontent_template"] .= '[BULLETLIST]<ul class="bulletlist">{BULLETLIST}<!--BULLETLIST_ITEM_START//--><li>{BULLETLIST_ITEM}</li><!--BULLETLIST_ITEM_END//--></ul>[/BULLETLIST]';
}
$crow['bulletlist_item_template'] = get_tmpl_section('BULLETLIST_ITEM', $crow["acontent_template"]);
$crow["acontent_template"] = replace_tmpl_section('BULLETLIST_ITEM', $crow["acontent_template"]);
$crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'TITLE', html_specialchars($crow['acontent_title']));
$crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'SUBTITLE', html_specialchars($crow['acontent_subtitle']));
$crow['bullets'] = convertStringToArray($crow["acontent_text"], LF);
if (count($crow['bullets'])) {
    $crow['bulletlist_items'] = array();
    foreach ($crow['bullets'] as $item) {
        $crow['bulletlist_items'][] = str_replace('{BULLETLIST_ITEM}', html($item), $crow['bulletlist_item_template']);
    }
    $crow['bulletlist_items'] = implode(LF, $crow['bulletlist_items']);
} else {
    $crow['bulletlist_items'] = '';
}
$crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'BULLETLIST', $crow['bulletlist_items']);
$CNT_TMP .= $crow["acontent_template"];
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:cnt4.article.inc.php

示例2: render_cnt_template

        $crow['image_tag'] = '<img src="img/cmsimage.php/' . $crow["settings"]['width'] . 'x' . $crow["settings"]['height'] . 'x' . $crow["settings"]['crop'] . '/';
        $crow['image_tag'] .= $image[2] . '.' . $image[3] . '" alt="';
        if ($crow["settings"]['nocaption']) {
            $crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'CAPTION', '');
            $crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'ALT', '');
            $crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'IMAGE_TITLE', '');
            $crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'COPYRIGHT', '');
        } else {
            $caption = getImageCaption(base64_decode($image[6]));
            $crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'CAPTION', html($caption[0]));
            $caption[1] = html(empty($caption[1]) ? $image[1] : $caption[1]);
            $crow['image_tag'] .= $caption[1];
            $crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'ALT', $caption[1]);
            if (empty($caption[3])) {
                $crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'IMAGE_TITLE', '');
            } else {
                $caption[3] = html($caption[3]);
                $crow['image_tag'] .= '" title="' . $caption[3];
                $crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'IMAGE_TITLE', $caption[3]);
            }
            $crow['image_tag'] .= '" />';
            $crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'COPYRIGHT', empty($caption[4]) ? '' : html($caption[4]));
        }
        $crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'IMAGE', $crow['image_tag']);
    }
    $crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'CLASS', $crow['imagetext_class']);
    $crow["acontent_template"] = str_replace('{IMAGE_WIDTH}', $crow["settings"]['width'], $crow["acontent_template"]);
    $crow["acontent_template"] = str_replace('{IMAGE_HEIGHT}', $crow["settings"]['width'], $crow["acontent_template"]);
    $CNT_TMP .= render_cnt_template($crow["acontent_template"], 'TEXT', $crow["acontent_text"]);
}
unset($image);
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:cnt1.article.inc.php

示例3: str_replace

                        $cart_items[$x] .= 'VAT:   {PRODUCT_VAT} %' . LF;
                        $cart_items[$x] .= 'Gross: {PRODUCT_GROSS_PRICE} {CURRENCY_SYMBOL}';
                    }
                    break;
            }
            $cart_items[$x] = str_replace('{PRODUCT_DETAIL_LINK}', rel_url(array('shop_detail' => $prod_id), array('shop_cart'), $_tmpl['config']['shop_url']), $cart_items[$x]);
            $cart_items[$x] = render_cnt_template($cart_items[$x], 'PRODUCT_TITLE', html_specialchars($row['shopprod_name1']));
            $cart_items[$x] = render_cnt_template($cart_items[$x], 'PRODUCT_SHORT', $row['shopprod_description0']);
            $cart_items[$x] = render_cnt_template($cart_items[$x], 'PRODUCT_NET_PRICE', $row['net']);
            $cart_items[$x] = render_cnt_template($cart_items[$x], 'PRODUCT_GROSS_PRICE', $row['gross']);
            $cart_items[$x] = render_cnt_template($cart_items[$x], 'PRODUCT_WEIGHT', $row['weight']);
            $cart_items[$x] = render_cnt_template($cart_items[$x], 'PRODUCT_VAT', $row['vat']);
            $cart_items[$x] = render_cnt_template($cart_items[$x], 'ORDER_NUM', html_specialchars($row['shopprod_ordernumber']));
            $cart_items[$x] = render_cnt_template($cart_items[$x], 'MODEL', html_specialchars($row['shopprod_model']));
            $cart_items[$x] = render_cnt_template($cart_items[$x], 'PRODUCT_OPT1', $opt1_txt);
            $cart_items[$x] = render_cnt_template($cart_items[$x], 'PRODUCT_OPT2', $opt2_txt);
            if ($cart_mode === 'cart') {
                $cart_items[$x] = str_replace('{COUNT}', '<input type="text" name="shop_prod_amount[' . $prod_id . '][' . $opt1_id . '][' . $opt2_id . ']" value="' . $total[$prod_id]['quantity'] . '" size="3" />', $cart_items[$x]);
            } else {
                $cart_items[$x] = str_replace('{COUNT}', $total[$prod_id]['quantity'], $cart_items[$x]);
            }
            $x++;
        }
    }
}
// set shipping fees
$subtotal['shipping_net'] = 0;
$subtotal['shipping_vat'] = 0;
$subtotal['shipping_gross'] = 0;
$subtotal['shipping_calc'] = false;
$subtotal['shipping_calc_type'] = _getConfig('shop_pref_shipping_calc', '_shopPref');
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:cart.items.inc.php

示例4: html_specialchars

                if (!empty($content['CpTitleParams'][3])) {
                    continue;
                }
                if (!empty($content['CpTitleParams'][2])) {
                    $content['CpItem'] .= ' class="' . $content['CpTitleParams'][2] . '"';
                }
            }
            $content['CpItem'] .= '>' . html_specialchars($value) . '</a>';
            $content['CpTitleMenu'][] = $content['CpTitleParams'][0] . $content['CpItem'] . $content['CpTitleParams'][1];
        }
        // cp menu prefix/suffix
        if (count($content['CpTitleMenu'])) {
            $content['CpTitleMenu'][] = $content['CpTitleParams'][5];
            array_unshift($content['CpTitleMenu'], $content['CpTitleParams'][4]);
        }
        $content['all'] = render_cnt_template($content['all'], 'CP_PAGINATE_MENU', implode(LF, $content['CpTitleMenu']));
    }
} elseif (strpos($content['all'], 'CP_PAGINATE')) {
    // remove CP_paginate block
    $content['all'] = replace_tmpl_section('CP_PAGINATE', $content['all']);
}
// check if print mode - then try to replace "no-print" sections from source
if (strpos($content['all'], '--NO_PRINT')) {
    if ($aktion[2] == 1) {
        $content['all'] = replace_tmpl_section('NO_PRINT', $content['all']);
        $block['css'] = array('print_layout.css');
    } else {
        $content['all'] = str_replace(array('<!--NO_PRINT_START//-->', '<!--NO_PRINT_END//-->'), '', $content['all']);
    }
}
// now clean up special sections in case user is logged in OR not
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:content.func.inc.php

示例5: number_format

$subtotal['total_discount_vat'] = number_format($subtotal['float_discount_vat'], $_tmpl['config']['price_decimals'], $_tmpl['config']['dec_point'], $_tmpl['config']['thousands_sep']);
$subtotal['total_discount_gross'] = number_format($subtotal['float_discount_gross'], $_tmpl['config']['price_decimals'], $_tmpl['config']['dec_point'], $_tmpl['config']['thousands_sep']);
$subtotal['total_loworder_net'] = number_format($subtotal['float_loworder_net'], $_tmpl['config']['price_decimals'], $_tmpl['config']['dec_point'], $_tmpl['config']['thousands_sep']);
$subtotal['total_loworder_vat'] = number_format($subtotal['float_loworder_vat'], $_tmpl['config']['price_decimals'], $_tmpl['config']['dec_point'], $_tmpl['config']['thousands_sep']);
$subtotal['total_loworder_gross'] = number_format($subtotal['float_loworder_gross'], $_tmpl['config']['price_decimals'], $_tmpl['config']['dec_point'], $_tmpl['config']['thousands_sep']);
$subtotal['total_net'] = number_format($subtotal['float_total_net'], $_tmpl['config']['price_decimals'], $_tmpl['config']['dec_point'], $_tmpl['config']['thousands_sep']);
$subtotal['total_vat'] = number_format($subtotal['float_total_vat'], $_tmpl['config']['price_decimals'], $_tmpl['config']['dec_point'], $_tmpl['config']['thousands_sep']);
$subtotal['total_gross'] = number_format($subtotal['float_total_gross'], $_tmpl['config']['price_decimals'], $_tmpl['config']['dec_point'], $_tmpl['config']['thousands_sep']);
// Replace
$order_process = str_replace('{CURRENCY_SYMBOL}', html_specialchars($_shopPref['shop_pref_currency']), $order_process);
$order_process = str_replace('{WEIGHT_UNIT}', html_specialchars($_shopPref['shop_pref_unit_weight']), $order_process);
$order_process = str_replace('{SUBTOTAL_WEIGHT}', $subtotal['weight'], $order_process);
$order_process = str_replace('{SUBTOTAL_NET}', $subtotal['net'], $order_process);
$order_process = str_replace('{SUBTOTAL_VAT}', $subtotal['vat'], $order_process);
$order_process = str_replace('{SUBTOTAL_GROSS}', $subtotal['gross'], $order_process);
$order_process = str_replace('{SHIPPING_NET}', $subtotal['shipping_net'], $order_process);
$order_process = str_replace('{SHIPPING_VAT}', $subtotal['shipping_vat'], $order_process);
$order_process = str_replace('{SHIPPING_GROSS}', $subtotal['shipping_gross'], $order_process);
$order_process = str_replace('{DISCOUNT_NET}', $subtotal['total_discount_net'], $order_process);
$order_process = str_replace('{DISCOUNT_VAT}', $subtotal['total_discount_vat'], $order_process);
$order_process = str_replace('{DISCOUNT_GROSS}', $subtotal['total_discount_gross'], $order_process);
$order_process = str_replace('{LOWORDER_NET}', $subtotal['total_loworder_net'], $order_process);
$order_process = str_replace('{LOWORDER_VAT}', $subtotal['total_loworder_vat'], $order_process);
$order_process = str_replace('{LOWORDER_GROSS}', $subtotal['total_loworder_gross'], $order_process);
$order_process = str_replace('{TOTAL_NET}', $subtotal['total_net'], $order_process);
$order_process = str_replace('{TOTAL_VAT}', $subtotal['total_vat'], $order_process);
$order_process = str_replace('{TOTAL_GROSS}', $subtotal['total_gross'], $order_process);
$order_process = render_cnt_template($order_process, 'LOWORDER', $subtotal['float_loworder_net'] != 0 ? 1 : '');
$order_process = render_cnt_template($order_process, 'DISCOUNT', $subtotal['float_discount_net'] != 0 ? $subtotal['discount_percent'] : '');
$order_process = render_cnt_template($order_process, 'SHIPPING', $subtotal['float_shipping_net'] > 0 ? 1 : '');
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:30,代码来源:cart.parse.inc.php

示例6: implode

        } else {
            $fmp_data['video_tag']['fallback'] = $fmp_data['fallback'];
            $fmp_data['video_tag']['footer'] = '</' . $fmp_data['fmp_set_audio'] . '>';
            if (empty($phpwcms['js_in_body'])) {
                $fmp_data['video_tag']['footer'] .= $fmp_data['init_videojs'];
            } else {
                $block['custom_htmlhead']['videojs_' . $fmp_data['id']] = '  ' . $fmp_data['init_videojs'];
            }
        }
        $fmp_data['fallback'] = '	' . implode(LF . '	', $fmp_data['video_tag']);
        unset($fmp_data['video'], $fmp_data['video_tag']);
        // Flash Video Fallback
    } elseif ($fmp_data['fallback']) {
        // Load SwfObject 2.1
        initSwfObject();
        // build SwfObject Script Block
        $block['custom_htmlhead'][$fmp_data['id']] = '  <script' . SCRIPT_ATTRIBUTE_TYPE . '>' . LF . SCRIPT_CDATA_START . LF;
        $block['custom_htmlhead'][$fmp_data['id']] .= $fmp_data['jw_license_info'];
        $block['custom_htmlhead'][$fmp_data['id']] .= '	var flashvars_' . $fmp_data['id'] . '	= {' . implode(', ', $fmp_data['flashvars']) . '};' . LF;
        $block['custom_htmlhead'][$fmp_data['id']] .= '	var params_' . $fmp_data['id'] . '	= {' . implode(', ', $fmp_data['params']) . '};' . LF;
        $block['custom_htmlhead'][$fmp_data['id']] .= '	var attributes_' . $fmp_data['id'] . '	= {' . implode(', ', $fmp_data['attributes']) . '};' . LF;
        $block['custom_htmlhead'][$fmp_data['id']] .= '	swfobject.embedSWF("' . $fmp_data['player_swf'] . '", "' . $fmp_data['id'] . '", "' . $fmp_data['fmp_width'] . '", "' . $fmp_data['fmp_height'] . '", "' . $fmp_data['fmp_set_flashversion'] . '", false, flashvars_' . $fmp_data['id'] . ', params_' . $fmp_data['id'] . ', attributes_' . $fmp_data['id'] . ');';
        $block['custom_htmlhead'][$fmp_data['id']] .= LF . SCRIPT_CDATA_END . LF . '  </script>';
        $fmp_data['fmp_set_skin_html5'] = '';
    }
    // add rendering result to current listing
    $fmp_data['fmp_template'] = render_cnt_template($fmp_data['fmp_template'], 'TITLE', html_specialchars($crow['acontent_title']));
    $fmp_data['fmp_template'] = render_cnt_template($fmp_data['fmp_template'], 'SUBTITLE', html_specialchars($crow['acontent_subtitle']));
    $fmp_data['fmp_template'] = render_cnt_template($fmp_data['fmp_template'], 'PLAYER', $fmp_data['fallback']);
    $CNT_TMP .= str_replace('{ID}', $fmp_data['id'], $fmp_data['fmp_template']);
}
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:cnt25.article.inc.php

示例7: elseif

} elseif (is_file(PHPWCMS_TEMPLATE . 'inc_cntpart/tabs/' . $crow["acontent_template"])) {
    $tabs['template'] = render_device(@file_get_contents(PHPWCMS_TEMPLATE . 'inc_cntpart/tabs/' . $crow["acontent_template"]));
} else {
    $tabs['template'] = '';
}
if ($tabs['template']) {
    $tabs['entries'] = array();
    $tabs['tmpl_entry'] = get_tmpl_section('TABS_ENTRY', $tabs['template']);
    $tabs['template'] = get_tmpl_section('TABS', $tabs['template']);
    foreach ($tabs['tabs'] as $key => $entry) {
        $tabs['entries'][$key] = render_cnt_template($tabs['tmpl_entry'], 'TABTITLE', $entry['tabtitle'] == '-' ? '' : html_specialchars($entry['tabtitle']));
        $tabs['entries'][$key] = render_cnt_template($tabs['entries'][$key], 'TABCONTENT', trim($entry['tabheadline'] . $entry['tabtext']) == '' ? '' : LF);
        $tabs['entries'][$key] = render_cnt_template($tabs['entries'][$key], 'TABHEADLINE', html_specialchars($entry['tabheadline']));
        $tabs['entries'][$key] = render_cnt_template($tabs['entries'][$key], 'TABTEXT', $entry['tabtext']);
        if (empty($entry['tablink'])) {
            $tabs['entries'][$key] = render_cnt_template($tabs['entries'][$key], 'TABLINK', '');
        } else {
            $entry['tablink'] = get_redirect_link($entry['tablink'], ' ', '');
            $tabs['entries'][$key] = render_cnt_template($tabs['entries'][$key], 'TABLINK', $entry['tablink']['link']);
            $tabs['entries'][$key] = str_replace('{TARGET}', $entry['tablink']['target'], $tabs['entries'][$key]);
        }
    }
    $tabs['template'] = render_cnt_template($tabs['template'], 'TITLE', html_specialchars($crow['acontent_title']));
    $tabs['template'] = render_cnt_template($tabs['template'], 'SUBTITLE', html_specialchars($crow['acontent_subtitle']));
    $tabs['template'] = render_cnt_template($tabs['template'], 'TABS_ENTRIES', count($tabs['entries']) ? implode('', $tabs['entries']) : '');
    $CNT_TMP .= str_replace('{ID}', $crow['acontent_id'], $tabs['template']);
} else {
    $CNT_TMP .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
    $CNT_TMP .= LF . $crow["acontent_html"];
}
unset($tabs);
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:cnt32.article.inc.php

示例8: trim

        $map["location"] = '';
        $map['loc']['map_zip'] = trim($map['loc']['map_zip'] . ' ' . $map['loc']['map_city']);
        if ($map['loc']['map_zip']) {
            $map["location"] .= '<strong>' . html_specialchars($map['loc']['map_zip']) . "</strong>\n";
        }
        if ($map['loc']['map_entry']) {
            $map["location"] .= $map['loc']['map_entry'];
            //html_specialchars($map['loc']['map_entry'])
        }
        $map["location"] = trim($map["location"]);
        if ($map["location"]) {
            $CNT_TMP .= nl2br(div_class($map["location"], $template_default["article"]["text_class"]));
        }
    }
} else {
    if ($map['loc']) {
        // build location entry
        $map['tmpl_location'] = render_cnt_template($map['tmpl_location'], 'TITLE', html_specialchars($map['loc']['map_title']));
        $map['tmpl_location'] = render_cnt_template($map['tmpl_location'], 'ZIP', html_specialchars($map['loc']['map_zip']));
        $map['tmpl_location'] = render_cnt_template($map['tmpl_location'], 'CITY', html_specialchars($map['loc']['map_city']));
        $map['tmpl_location'] = render_cnt_template($map['tmpl_location'], 'ENTRY', $map['loc']['map_entry']);
    } else {
        $map['tmpl_location'] = '';
    }
    $map['tmpl_content'] = render_cnt_template($map['tmpl_content'], 'MAP', $map['map_img']);
    $map['tmpl_content'] = render_cnt_template($map['tmpl_content'], 'TEXT', nl2br(html_specialchars($map['text'])));
    $map['tmpl_content'] = render_cnt_template($map['tmpl_content'], 'LOCATION', $map['tmpl_location']);
    $CNT_TMP .= $map['tmpl_content'];
}
// delete map array
unset($map);
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:cnt51.article.inc.php

示例9: getArticleMenu

/**
 * Return menu or menu elements based on article menu title information
 * starting at given structure level ID, limited to single level (non-nested)
 *
 * @return mixed (array/string)
 * @param array
 **/
function getArticleMenu($data = array())
{
    global $content;
    global $aktion;
    $defaults = array('level_id' => 0, 'class_active' => array(0 => 'active', 1 => ''), 'wrap_title_prefix' => '', 'wrap_title_suffix' => '', 'item_prefix' => "\t", 'item_suffix' => '', 'sort' => 'level', 'item_tag' => 'li', 'wrap_tag' => 'ul', 'attribute_wrap_tag' => '', 'class_item_tag' => '', 'class_first_item_tag' => '', 'class_last_item_tag' => '', 'return_format' => 'string', 'articlemenu_options' => array('enable' => false, 'image' => false, 'text' => false, 'width' => 0, 'height' => 0, 'crop' => 0, 'textlength' => 0, 'position' => 'inside', 'template' => '<span class="amenu-extended">[IMAGE]<img src="{IMAGE}" alt="{IMAGE_NAME}" />[/IMAGE][TEXT]<span class="p">{TEXT}</span>[/TEXT]</span>'));
    $data = is_array($data) && count($data) ? array_merge($defaults, $data) : $defaults;
    $li = array();
    $articles = get_actcat_articles_data($data['level_id']);
    $key = 0;
    $total = count($articles) - 1;
    foreach ($articles as $item) {
        $class = '';
        $class_a = '';
        if ($data['class_item_tag']) {
            $class .= $data['class_item_tag'] . ' ';
        }
        if ($key === 0 && $data['class_first_item_tag']) {
            $class .= $data['class_first_item_tag'] . ' ';
        } elseif ($key === $total && $data['class_last_item_tag']) {
            $class .= $data['class_last_item_tag'] . ' ';
        }
        if ($item['article_id'] == $aktion[1]) {
            if (!empty($data['class_active'][0])) {
                $class .= $data['class_active'][0] . ' ';
            }
            if (!empty($data['class_active'][1])) {
                $class_a = ' class="' . $data['class_active'][1] . '"';
                // set active link class
            }
        }
        $class = trim($class);
        $item['outside'] = '';
        $item['inside'] = '';
        if ($data['articlemenu_options']['enable']) {
            $item['img_src'] = '';
            $item['img_name'] = '';
            $item['amenu_text'] = '';
            if ($data['articlemenu_options']['image'] && (!empty($item['article_image']['list_id']) || !empty($item['article_image']['id']))) {
                if (!empty($item['article_image']['list_usesummary']) && !empty($item['article_image']['id'])) {
                    $item['img_src'] = $item['article_image']['hash'] . '.' . $item['article_image']['ext'];
                    $item['img_name'] = html($item['article_image']['name']);
                } elseif (!empty($item['article_image']['list_id'])) {
                    $item['img_src'] = $item['article_image']['list_hash'] . '.' . $item['article_image']['list_ext'];
                    $item['img_name'] = html($item['article_image']['list_name']);
                }
                if ($item['img_src']) {
                    $item['img_src'] = 'x' . $data['articlemenu_options']['height'] . 'x' . $data['articlemenu_options']['crop'] . '/' . $item['img_src'];
                    $item['img_src'] = 'img/cmsimage.php/' . $data['articlemenu_options']['width'] . $item['img_src'];
                }
            }
            if ($data['articlemenu_options']['text']) {
                switch ($data['articlemenu_options']['text']) {
                    case 'description':
                        $item['amenu_text'] = html(getCleanSubString($item['article_description'], abs($data['articlemenu_options']['textlength']), $GLOBALS['template_default']['ellipse_sign'], $data['articlemenu_options']['textlength'] < 0 ? 'char' : 'word'));
                        break;
                    case 'menutitle':
                        $item['amenu_text'] = html(getCleanSubString($item['article_menutitle'], abs($data['articlemenu_options']['textlength']), $GLOBALS['template_default']['ellipse_sign'], $data['articlemenu_options']['textlength'] < 0 ? 'char' : 'word'));
                        break;
                    case 'teaser':
                        if ($data['articlemenu_options']['textlength'] === 'HTML') {
                            $item['amenu_text'] = $item['article_summary'];
                        } else {
                            $item['amenu_text'] = trim(strip_tags($item['article_summary']));
                            $item['amenu_text'] = getCleanSubString($item['amenu_text'], abs($data['articlemenu_options']['textlength']), $GLOBALS['template_default']['ellipse_sign'], $data['articlemenu_options']['textlength'] < 0 ? 'char' : 'word');
                        }
                        break;
                }
            }
            $item[$data['articlemenu_options']['position']] = $data['articlemenu_options']['template'];
            $item[$data['articlemenu_options']['position']] = str_replace('{IMAGE_NAME}', $item['img_name'], $item[$data['articlemenu_options']['position']]);
            $item[$data['articlemenu_options']['position']] = render_cnt_template($item[$data['articlemenu_options']['position']], 'IMAGE', $item['img_src']);
            $item[$data['articlemenu_options']['position']] = render_cnt_template($item[$data['articlemenu_options']['position']], 'TEXT', $item['amenu_text']);
        }
        $li[$key] = $data['item_prefix'] . '<' . $data['item_tag'] . ($class != '' ? ' class="' . $class . '"' : '') . '>';
        $li[$key] .= '<a href="' . rel_url(array(), array('newsdetail'), setGetArticleAid($item)) . '"' . $class_a . '>';
        $li[$key] .= $data['wrap_title_prefix'];
        $li[$key] .= html(getArticleMenuTitle($item));
        $li[$key] .= $data['wrap_title_suffix'];
        $li[$key] .= $item['inside'];
        $li[$key] .= '</a>';
        $li[$key] .= $item['outside'];
        $li[$key] .= '</' . $data['item_tag'] . '>' . $data['item_suffix'];
        $key++;
    }
    if ($data['wrap_tag'] && count($li)) {
        array_unshift($li, '<' . trim($data['wrap_tag'] . ' ' . trim($data['attribute_wrap_tag'])) . '>');
        array_push($li, '</' . $data['wrap_tag'] . '>');
    }
    return $data['return_format'] == 'string' ? implode(LF, $li) : $li;
}
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:97,代码来源:front.func.inc.php

示例10: render_cnt_template

            if ($image['col'] == $col || $image['count'] == $total) {
                $img_a = render_cnt_template($img_a, 'LAST', $col);
                $xx = $x;
                $x++;
                $col = 0;
            } else {
                $img_a = render_cnt_template($img_a, 'LAST', '');
                $xx = $x;
            }
            // Get the entry data
            $image['tmpl_data'][] = get_tmpl_section('ENTRY_DATA', $img_a);
            $img_a = replace_tmpl_section('ENTRY_DATA', $img_a, '');
            $image['tmpl_images'][$xx] .= $img_a;
        }
        $image['template'] .= implode($image['tmpl_row_space'], $image['tmpl_images']);
    }
    $image['template'] .= $image['tmpl_footer'];
    $image['tmpl_data'] = implode('', $image['tmpl_data']);
    // now do main replacements
    $image['template'] = render_cnt_template($image['template'], 'DATA', $image['tmpl_data']);
    $image['template'] = str_replace('{ID}', $crow['acontent_id'], $image['template']);
    $image['template'] = str_replace('{SPACE}', $image['space'], $image['template']);
    $image['template'] = str_replace('{THUMB_WIDTH_MAX}', $image['tmpl_thumb_width_max'], $image['template']);
    $image['template'] = str_replace('{THUMB_HEIGHT_MAX}', $image['tmpl_thumb_height_max'], $image['template']);
    $image['template'] = str_replace('{THUMB_COLUMNS}', $image['col'], $image['template']);
    $image['template'] = render_cnt_template($image['template'], 'TITLE', html_specialchars($crow['acontent_title']));
    $image['template'] = render_cnt_template($image['template'], 'SUBTITLE', html_specialchars($crow['acontent_subtitle']));
    $image['template'] = render_cnt_template($image['template'], 'TEXT', $crow['acontent_text']);
    $CNT_TMP .= $image['template'];
}
unset($image);
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:cnt29.article.inc.php

示例11: die

 *
 * @author Oliver Georgi <og@phpwcms.org>
 * @copyright Copyright (c) 2002-2015, Oliver Georgi
 * @license http://opensource.org/licenses/GPL-2.0 GNU GPL-2
 * @link http://www.phpwcms.de
 *
 **/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
    die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
//code
// read template
if (empty($crow["acontent_template"]) && is_file(PHPWCMS_TEMPLATE . 'inc_default/code.tmpl')) {
    $crow["acontent_template"] = render_device(@file_get_contents(PHPWCMS_TEMPLATE . 'inc_default/code.tmpl'));
} elseif (is_file(PHPWCMS_TEMPLATE . 'inc_cntpart/code/' . $crow["acontent_template"])) {
    $crow["acontent_template"] = render_device(@file_get_contents(PHPWCMS_TEMPLATE . 'inc_cntpart/code/' . $crow["acontent_template"]));
} else {
    $crow["acontent_template"] = '[TITLE]<h3>{TITLE}</h3>[/TITLE][SUBTITLE]<h4>{SUBTITLE}</h4>[/SUBTITLE][CODE]<pre>{CODE}</pre>[/CODE]';
}
$crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'TITLE', html_specialchars($crow['acontent_title']));
$crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'SUBTITLE', html_specialchars($crow['acontent_subtitle']));
if (strpos($crow["acontent_template"], '<pre') !== false) {
    $crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'CODE', html_specialchars($crow["acontent_text"]));
} else {
    $crow["acontent_text"] = str_replace(array(' ', "\t"), array('&nbsp;', '&nbsp;&nbsp;&nbsp;&nbsp;'), html_specialchars($crow["acontent_text"]));
    $crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'CODE', nl2br($crow["acontent_text"]));
}
$CNT_TMP .= $crow["acontent_template"];
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:cnt11.article.inc.php

示例12: render_cnt_template

<?php

if (strpos($content['all'], '[LOGGED_IN')) {
    $content['all'] = render_cnt_template($content['all'], 'LOGGED_IN', _getFeUserLoginStatus() ? '<!-- //-->' : '');
}
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:5,代码来源:logged_in.php

示例13: die

<?php

/**
 * phpwcms content management system
 *
 * @author Oliver Georgi <og@phpwcms.org>
 * @copyright Copyright (c) 2002-2015, Oliver Georgi
 * @license http://opensource.org/licenses/GPL-2.0 GNU GPL-2
 * @link http://www.phpwcms.de
 *
 **/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
    die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
//HTML
// read template
if (empty($crow["acontent_template"]) && is_file(PHPWCMS_TEMPLATE . 'inc_default/html.tmpl')) {
    $crow["acontent_template"] = render_device(@file_get_contents(PHPWCMS_TEMPLATE . 'inc_default/html.tmpl'));
} elseif (is_file(PHPWCMS_TEMPLATE . 'inc_cntpart/html/' . $crow["acontent_template"])) {
    $crow["acontent_template"] = render_device(@file_get_contents(PHPWCMS_TEMPLATE . 'inc_cntpart/html/' . $crow["acontent_template"]));
} else {
    $crow["acontent_template"] = '[TITLE]<h3>{TITLE}</h3>' . LF . '[/TITLE][SUBTITLE]<h4>{SUBTITLE}</h4>' . LF . '[/SUBTITLE][HTML]{HTML}[/HTML]';
}
$crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'TITLE', html_specialchars($crow['acontent_title']));
$crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'SUBTITLE', html_specialchars($crow['acontent_subtitle']));
$crow["acontent_template"] = render_cnt_template($crow["acontent_template"], 'HTML', $crow['acontent_html']);
$CNT_TMP .= LF . $crow["acontent_template"] . LF;
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:30,代码来源:cnt6.article.inc.php

示例14: setcookie

        $ACCESS['error'] = true;
    } else {
        setcookie('phpwcmsAgree', '1', 0, '/');
        $_SESSION['phpwcmsAgree'] = true;
    }
}
if (!empty($_SESSION['phpwcmsAgree']) || isset($_COOKIE['phpwcmsAgree']) && $_COOKIE['phpwcmsAgree'] == 1) {
    $content['all'] = str_replace($ACCESS['prefix'], '', $content['all']);
    $content['all'] = str_replace($ACCESS['suffix'], '', $content['all']);
} elseif (strpos($content['all'], $ACCESS['prefix']) !== FALSE && strpos($content['all'], $ACCESS['suffix']) !== FALSE) {
    $block['custom_htmlhead']['mootools.js'] = '  <script src="' . TEMPLATE_PATH . 'lib/mootools/mootools-1.1-yc.js" type="text/javascript"></script>';
    $block['custom_htmlhead']['access.js'] = '  <script src="' . TEMPLATE_PATH . 'inc_script/access/access.js" type="text/javascript"></script>';
    $block['custom_htmlhead']['set_vars'] = '  <script type="text/javascript">' . LF . '  <!--' . LF;
    $block['custom_htmlhead']['set_vars'] .= '  var redirect="' . $redirect . '";' . LF;
    $block['custom_htmlhead']['set_vars'] .= '  var erroralert="' . $ACCESS['error_js'] . '";';
    $block['custom_htmlhead']['set_vars'] .= LF . '  //-->' . LF . '  </script>';
    $block['custom_htmlhead']['access.css'] = '  <link rel="stylesheet" type="text/css" href="' . TEMPLATE_PATH . 'inc_script/access/access.css" />';
    $ACCESS['source_data'] = @file_get_contents(PHPWCMS_TEMPLATE . 'inc_script/access/' . $ACCESS['source_data']);
    if ($ACCESS['source_data']) {
        $ACCESS['source_data'] = render_cnt_template($ACCESS['source_data'], 'ERROR', $ACCESS['error'] ? '-' : '');
        $ACCESS['source_data'] = str_replace('{CURRENT_URL}', FE_CURRENT_URL, $ACCESS['source_data']);
        $ACCESS['source_data'] = str_replace('{REDIRECT}', html_specialchars($redirect), $ACCESS['source_data']);
        $ACCESS['dialog'] = '<div id="access_dialog">' . LF . $ACCESS['source_data'] . LF . '</div>' . LF;
        $ACCESS['dialog'] .= '<div id="access_save" style="display:none">';
        $content['all'] = str_replace($ACCESS['prefix'], $ACCESS['dialog'], $content['all']);
        $content['all'] = str_replace($ACCESS['suffix'], LF . '</div>', $content['all']);
    }
} else {
    $content['all'] = str_replace($ACCESS['prefix'], '', $content['all']);
    $content['all'] = str_replace($ACCESS['suffix'], '', $content['all']);
}
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:access_dialog.php

示例15: get_cached_image

        $thumb_img .= ' alt="' . $caption[1] . '"' . $caption[3] . ' />';
        if ($crow["acontent_image"][8]) {
            $zoominfo = get_cached_image(array("target_ext" => $crow["acontent_image"][3], "image_name" => $crow["acontent_image"][2] . '.' . $crow["acontent_image"][3], "max_width" => $phpwcms["img_prev_width"], "max_height" => $phpwcms["img_prev_height"], "thumb_name" => md5($crow["acontent_image"][2] . $phpwcms["img_prev_width"] . $phpwcms["img_prev_height"] . $phpwcms["sharpen_level"] . $phpwcms['colorspace'])));
            if ($zoominfo != false) {
                $popup_img = 'image_zoom.php?' . getClickZoomImageParameter($zoominfo[0] . '?' . $zoominfo[3]);
                if (!empty($caption[2][0])) {
                    $open_link = $caption[2][0];
                    $return_false = '';
                } else {
                    $open_link = $popup_img;
                    $return_false = 'return false;';
                }
                $thumb_img = '<a href="' . $popup_img . '" onclick="window.open(\'' . $open_link . "','previewpic','width=" . $zoominfo[1] . ",height=" . $zoominfo[2] . "');" . $return_false . '"' . $caption[2][1] . '>' . $thumb_img . '</a>';
            }
        } else {
            if ($caption[2][0]) {
                $thumb_img = '<a href="' . $caption[2][0] . '"' . $caption[2][1] . '>' . $thumb_img . '</a>';
            }
        }
    }
}
// now render whole recipe
$crow["acontent_form"]['faq_template'] = render_cnt_template($crow["acontent_form"]['faq_template'], 'TITLE', html_specialchars($crow['acontent_title']));
$crow["acontent_form"]['faq_template'] = render_cnt_template($crow["acontent_form"]['faq_template'], 'SUBTITLE', html_specialchars($crow['acontent_subtitle']));
$crow["acontent_form"]['faq_template'] = render_cnt_template($crow["acontent_form"]['faq_template'], 'FAQ_QUESTION', html_specialchars($crow["acontent_text"]));
$crow["acontent_form"]['faq_template'] = render_cnt_template($crow["acontent_form"]['faq_template'], 'FAQ_ANSWER', $crow["acontent_html"]);
$crow["acontent_form"]['faq_template'] = render_cnt_template($crow["acontent_form"]['faq_template'], 'FAQ_IMAGE', $thumb_img);
$crow["acontent_form"]['faq_template'] = render_cnt_template($crow["acontent_form"]['faq_template'], 'FAQ_CAPTION', $caption[0]);
$crow["acontent_form"]['faq_template'] = str_replace('{FAQ_ID}', $crow['acontent_id'], $crow["acontent_form"]['faq_template']);
$CNT_TMP .= $crow["acontent_form"]['faq_template'];
unset($image, $caption);
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:cnt27.article.inc.php


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