本文整理汇总了PHP中rel_url函数的典型用法代码示例。如果您正苦于以下问题:PHP rel_url函数的具体用法?PHP rel_url怎么用?PHP rel_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rel_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildCalendarLink
function buildCalendarLink($date_value = '')
{
global $_getVar;
$_oldCalValue = '';
if (!empty($_getVar['calendardate'])) {
$_oldCalValue = $_getVar['calendardate'];
}
//save old value
if (!empty($date_value)) {
$_getVar['calendardate'] = $date_value;
}
//set new value
$link = rel_url(array(), array(), '', 'urlencode');
//build Link
if ($_oldCalValue) {
$_getVar['calendardate'] = $_oldCalValue;
}
//restore old value
return $link;
}
示例2: listRecipeCategories
function listRecipeCategories($option)
{
global $_getVar;
$cat = _dbQuery('SELECT acontent_text FROM ' . DB_PREPEND . 'phpwcms_articlecontent WHERE acontent_type=26 AND acontent_trash=0');
$cat_all = '';
if ($cat) {
foreach ($cat as $temp) {
if ($temp['acontent_text']) {
if ($cat_all) {
$cat_all .= ', ';
}
$cat_all .= $temp['acontent_text'];
}
}
$cat_all = convertStringToArray($cat_all);
sort($cat_all, SORT_LOCALE_STRING);
} else {
$cat_all = array();
}
$cat = '';
unset($_getVar['recipecat']);
foreach ($cat_all as $temp) {
$cat .= ' <li><a href="' . rel_url(array('recipecat' => $temp)) . '" ';
$temp = html_specialchars($temp);
$cat .= 'title="' . $temp . '">' . $temp . '</a></li>' . LF;
}
if ($cat) {
$cat = LF . '<ul>' . LF . $cat . '</ul>' . LF;
}
if (isset($option['LISTCAT'][0])) {
$cat = $option['LISTCAT'][0] . $cat;
}
if (isset($option['LISTCAT'][1])) {
$cat .= $option['LISTCAT'][1];
}
return $cat;
}
示例3: struct_articlelist
//.........这里部分代码省略.........
$a .= '<td width="461">';
$a .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"\">\n<tr>\n";
$acontent_count = get_article_content_count($article[$akey]["article_id"], $GLOBALS['db']);
if ($article[$akey]["article_uid"] == $_SESSION["wcs_user_id"] || $_SESSION["wcs_user_admin"]) {
$a .= "<td nowrap=\"nowrap\"><img src=\"img/leer.gif\" width=\"" . (14 + 14 + 14 * ($counter - 1)) . "\" height=\"1\" alt=\"\" />";
$a .= $acontent_count ? "<a href=\"phpwcms.php?do=articles&opena=" . rawurlencode($article[$akey]["article_id"] . ":" . (!empty($_SESSION["structure"]["article"][$article[$akey]["article_id"]]) ? 0 : 1)) . "\">" : "";
$a .= "<img src=\"img/symbole/plus_" . ($acontent_count ? !empty($_SESSION["structure"]["article"][$article[$akey]["article_id"]]) ? "close" : "open" : "empty");
$a .= ".gif\" width=\"15\" height=\"15\" border=\"0\" alt=\"\" />" . ($acontent_count ? "</a>" : "");
} else {
$a .= "<td nowrap=\"nowrap\"><img src=\"img/leer.gif\" width=\"" . (14 + 29 + 14 * ($counter - 1)) . "\" height=\"1\" alt=\"\" />";
}
$a .= "<img src=\"img/symbole/text_1.gif\" width=\"11\" height=\"15\" ";
$info = '<table cellspacing=0 cellpadding=1 border=0>';
$info .= '<tr><td>' . $BL['be_func_struct_articleID'] . ':</td><td><b>' . $article[$akey]["article_id"] . '</b></td></tr>';
if (!empty($article[$akey]["article_alias"])) {
$info .= '<tr><td>ALIAS:</td><td><b>' . $article[$akey]["article_alias"] . '</b></td></tr>';
}
if (!empty($article[$akey]["article_begin"])) {
$info .= '<tr><td>' . $BL['be_article_cnt_start'] . ':</td><td><b>' . phpwcms_strtotime($article[$akey]["article_begin"], $BL['be_longdatetime'], ' ') . '</b></td></tr>';
}
if (!empty($article[$akey]["article_end"])) {
$info .= '<tr><td>' . $BL['be_article_cnt_end'] . ':</td><td><b>' . phpwcms_strtotime($article[$akey]["article_end"], $BL['be_longdatetime'], ' ') . '</b></td></tr>';
}
$info .= '<tr><td>' . $BL['be_cnt_sortvalue'] . ':</td><td>' . $article[$akey]["article_sort"] . '</td></tr>';
if (isset($article[$akey]["article_end"])) {
$info .= '<tr><td>' . $BL['be_priorize'] . ':</td><td>' . $article[$akey]["article_priorize"] . '</td></tr>';
}
$info .= '</table>';
$a .= 'onmouseover="Tip(\'' . $info . '\');" onmouseout="UnTip()" alt=""';
//$a .= getAltTitle($info);
$a .= " /></td>\n";
$a .= "<td><img src=\"img/leer.gif\" width=\"2\" height=\"15\" alt=\"\" /></td>\n";
$a .= '<td class="dir" width="95%"><a href="';
$a .= rel_url(array('phpwcms-preview' => 1), array(), empty($article[$akey]["article_alias"]) ? 'aid=' . $article[$akey]["article_id"] : $article[$akey]["article_alias"]);
$a .= '" target="_blank" title="' . $BL['be_func_struct_preview'] . ': ' . $at . '">';
$a .= $at . "</a></td>\n</tr>\n</table></td>\n<td width=\"77\" nowrap=\"nowrap\">";
if ($article[$akey]["article_uid"] == $_SESSION["wcs_user_id"] || $_SESSION["wcs_user_admin"]) {
$a .= "<a href=\"phpwcms.php?do=articles&p=2&s=1&id=" . $article[$akey]["article_id"];
$a .= "\" title=\"" . $BL['be_func_struct_edit'] . " \n[" . $at . "]\">";
$a .= "<img src=\"img/button/edit_11x11.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\"></a>";
} else {
$a .= "<img src=\"img/button/edit_11x11_0.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" />";
}
if ($cut_article != $article[$akey]["article_id"] && !$cut_article_content) {
$a .= "<a href=\"phpwcms.php?do=articles&acut=" . $article[$akey]["article_id"];
$a .= "\" title=\"" . $BL['be_func_struct_cut'] . " \n[" . $at . "]\">";
$a .= "<img src=\"img/button/cut_11x11_0.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" /></a>";
} elseif ($cut_article_content) {
$a .= '<a href="include/inc_act/act_structure.php?do=' . rawurlencode('7|' . $cut_article_content . '|' . $article[$akey]["article_id"] . '|-10');
$a .= '" title="' . $BL['be_func_content_paste0'];
$a .= " [" . $at . "]\"><img src=\"img/button/cut_11x11_1.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" /></a>";
} else {
$a .= "<a href=\"phpwcms.php?do=articles\" title=\"" . $BL['be_func_struct_nocut'] . '">';
$a .= "<img src=\"img/button/cut_11x11_3.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" /></a>";
}
if ($copy_article != $article[$akey]["article_id"] && !$copy_article_content) {
$a .= "<a href=\"phpwcms.php?do=articles&acopy=" . $article[$akey]["article_id"];
$a .= "\" title=\"" . $BL['be_func_struct_copy'] . " \n[" . $at . "]\">";
$a .= "<img src=\"img/button/copy_11x11_0.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" /></a>";
} elseif ($copy_article_content) {
$a .= '<a href="include/inc_act/act_structure.php?do=' . rawurlencode('8|' . $copy_article_content . '|' . $article[$akey]["article_id"] . '|-10');
$a .= "\" title=\"" . $BL['be_func_content_paste0'];
$a .= " [" . $at . "]\"><img src=\"img/button/copy_11x11_1.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" /></a>";
} else {
$a .= "<a href=\"phpwcms.php?do=articles\" title=\"" . $BL['be_func_struct_nocopy'] . '">';
$a .= "<img src=\"img/button/copy_11x11_3.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" /></a>";
示例4: rel_url
<?php
}
// end paginate check
// end non content part setting mode
}
?>
<tr><td colspan="2" class="rowspacer"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
<tr bgcolor="#F3F5F8">
<td> </td>
<td style="padding:7px 0 7px 0;">
<?php
// render buttons only once and save the buffer
if (!empty($content["id"])) {
$buttonActionLink = rel_url(array('phpwcms-preview' => 1), array(), empty($content['article']["article_alias"]) ? empty($content["aid"]) ? 'id=' . $content["id"] : 'aid=' . $content["aid"] : $content['article']["article_alias"]);
$buttonAction = ' <div style="float:right;margin-right:25px;padding:0;">';
$buttonAction .= ' <button type="button" value="' . $BL['be_func_struct_preview'] . '" class="button" title="' . $BL['be_func_struct_preview'] . '" ';
$buttonAction .= 'onclick="window.open(\'' . $buttonActionLink . "', 'articlePreviewWindows');return false;\">";
$buttonAction .= $BL['be_func_struct_preview'] . "</button></div>" . LF;
} else {
$buttonAction = '';
}
ob_start();
?>
<div>
<?php
echo $buttonAction;
?>
<div style="float:left;padding:0;">
<input name="Submit" type="submit" class="button" value="<?php
示例5: search
function search()
{
$this->now = now();
if (empty($this->search_words)) {
return NULL;
}
$cnt_ts_livedate = 'IF(UNIX_TIMESTAMP(pc.cnt_livedate) > 0, UNIX_TIMESTAMP(pc.cnt_livedate), pc.cnt_created)';
$cnt_ts_killdate = 'IF(UNIX_TIMESTAMP(pc.cnt_killdate) > 0, UNIX_TIMESTAMP(pc.cnt_killdate), pc.cnt_created + 31536000)';
$sql = 'SELECT pc.*, ';
$sql .= $cnt_ts_livedate . ' AS cnt_ts_livedate, ';
$sql .= $cnt_ts_killdate . ' AS cnt_ts_killdate ';
$sql .= 'FROM ' . DB_PREPEND . 'phpwcms_content pc ';
$sql_where = 'WHERE ';
$sql_where .= 'pc.cnt_status=1 AND ';
$sql_where .= "pc.cnt_module='news' AND ";
$sql_where .= $cnt_ts_livedate . ' < ' . $this->now . ' AND ';
$sql_where .= '(' . $cnt_ts_killdate . ' > ' . $this->now . ' OR cnt_archive_status = 1) ';
$sql_group = '';
// choose by category
if (count($this->search_category)) {
$cat_sql = array();
// and/or/not mode
switch ($this->search_andor) {
case 'AND':
$news_andor = ' AND ';
$news_compare = '=';
break;
case 'NOT':
$news_andor = ' AND ';
$news_compare = '!=';
break;
default:
//OR
$news_andor = ' OR ';
$news_compare = '=';
}
foreach ($this->search_category as $value) {
$cat_sql[] = 'pcat.cat_name' . $news_compare . _dbEscape($value);
}
$sql .= "LEFT JOIN " . DB_PREPEND . "phpwcms_categories pcat ON (pcat.cat_type='news' AND pcat.cat_pid=pc.cnt_id) ";
$sql_where .= 'AND (' . implode($news_andor, $cat_sql) . ') ';
$sql_group = 'GROUP BY pc.cnt_id ';
}
// language selection
if (count($this->search_language)) {
$sql_where .= "AND pc.cnt_lang IN ('" . str_replace('#', "','", _dbEscape(implode('#', $this->search_language), false)) . "') ";
}
$sql .= $sql_where;
$sql .= $sql_group;
$sql = trim($sql);
$data = _dbQuery($sql);
$search_target_url_test = strtolower(substr($this->search_target_url, 0, 4));
if ($search_target_url_test !== 'http' && $search_target_url_test !== '{sit') {
// expected alias here or aid=123 or id=123
if ($this->search_highlight) {
$this->search_target_url = rel_url(array('newsdetail' => '___NEWSDETAIL__', 'highlight' => '___HIGHLIGHT__'), array('searchstart', 'searchwords'), $this->search_target_url);
} else {
$this->search_target_url = rel_url(array('newsdetail' => '___NEWSDETAIL__'), array('highlight', 'searchstart', 'searchwords'), $this->search_target_url);
}
$search_replace_newsdetail = true;
} else {
$search_replace_newsdetail = strpos($this->search_target_url, '___NEWSDETAIL__') !== false ? true : false;
$this->search_target_url = html_specialchars($this->search_target_url);
}
if ($this->search_highlight_words && is_array($this->search_highlight_words)) {
$s_highlight_words = rawurlencode(implode(' ', $this->search_highlight_words));
} else {
$s_highlight_words = '';
}
foreach ($data as $value) {
$s_result = array();
$s_text = $value['cnt_text'] . ', ' . $value['cnt_teasertext'] . ', ' . $value['cnt_place'] . ', ';
$s_text .= $value['cnt_subtitle'] . ', ' . $value['cnt_title'];
if ($this->search_username) {
$s_text .= ', ' . $value['cnt_editor'];
}
$value['cnt_object'] = @unserialize($value['cnt_object']);
if (!empty($value['cnt_object']['cnt_searchoff'])) {
continue;
}
if (isset($value['cnt_object']['cnt_category'])) {
if ($this->search_keyword) {
$s_text .= ' ' . $value['cnt_object']['cnt_category'];
}
if ($this->search_caption) {
$s_text .= ' ' . $value['cnt_object']['cnt_image']['caption'];
$s_text .= ' ' . $value['cnt_object']['cnt_files']['caption'];
}
}
$s_text = preg_replace('/<script[^>]*>.*?<\\/script>/is', '', $s_text);
// strip all <script> Tags
$s_text = str_replace(array('~', '|', ':', 'http', '//', '_blank', ' '), ' ', $s_text);
$s_text = clean_search_text($s_text);
preg_match_all('/' . $this->search_words . '/is', $s_text, $s_result);
$s_count = count($s_result[0]);
//set search_result to 0
if ($s_count && SEARCH_TYPE_AND) {
$s_and_or = array();
foreach ($s_result[0] as $svalue) {
$s_and_or[strtolower($svalue)] = 1;
//.........这里部分代码省略.........
示例6: render_cnt_template
$_loginData['template'] = render_cnt_template($_loginData['template'], 'ERROR', $_loginData['error'] ? 'login/pass wrong' : '');
$_loginData['template'] = render_cnt_template($_loginData['template'], 'LOGIN', html_specialchars($_loginData['login']));
$_loginData['template'] = render_cnt_template($_loginData['template'], 'PASSWORD', '');
$_loginData['template'] = render_cnt_template($_loginData['template'], 'REMEMBER', $_loginData['remember'] ? ' checked="checked"' : '');
}
// check register profile
if ($_loginData['felogin_profile_registration']) {
// possible -> set link to form
$_loginData['uri'] = rel_url(array('profile_register' => $_loginData['get_profile_register']), array('profile_manage', 'profile_reminder'));
$_loginData['template'] = render_cnt_template($_loginData['template'], 'REGISTER_PROFILE', $_loginData['uri']);
} else {
// not possible
$_loginData['template'] = render_cnt_template($_loginData['template'], 'REGISTER_PROFILE', '');
}
// check manage profile
if ($_loginData['felogin_profile_manage']) {
if (isset($_GET['profile_manage'])) {
$_loginData['template'] = render_cnt_template($_loginData['template'], 'MANAGE_PROFILE', '');
}
// possible -> set link to form
$_loginData['uri'] = rel_url(array('profile_manage' => $_loginData['get_profile_manage']), array('profile_register', 'profile_reminder'), empty($_loginData['felogin_profile_manage_redirect']) ? '' : $_loginData['felogin_profile_manage_redirect']);
$_loginData['template'] = render_cnt_template($_loginData['template'], 'MANAGE_PROFILE', $_loginData['uri']);
} else {
// not possible
$_loginData['template'] = render_cnt_template($_loginData['template'], 'MANAGE_PROFILE', '');
}
$_loginData['uri'] = rel_url(array('profile_reminder' => '1'), array('profile_manage', 'profile_register'));
$_loginData['template'] = render_cnt_template($_loginData['template'], 'REMINDER_FORM', $_loginData['uri']);
$_loginData['uri'] = rel_url(array(), array('profile_manage', 'profile_register', 'profile_reminder'));
$CNT_TMP .= str_replace(array('{FORM_TARGET}', '{LOGIN_URL}'), $_loginData['uri'], $_loginData['template']);
}
示例7: trim
case 'terms':
$cart_items[$x] = $_tmpl['term_entry'];
break;
case 'mail1':
$cart_items[$x] = trim($_tmpl['mail_item']);
if (empty($cart_items[$x])) {
$cart_items[$x] = 'Qty: {COUNT}' . LF;
$cart_items[$x] .= 'Ord#: {ORDER_NUM}' . LF;
$cart_items[$x] .= 'Item: {PRODUCT_TITLE}' . LF;
$cart_items[$x] .= 'Net: {PRODUCT_NET_PRICE} {CURRENCY_SYMBOL}' . LF;
$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]);
}
示例8: render_cnt_template
$crow['template']['form'] .= 'value="' . $content["search_word"] . '"';
if ($content["search"]["style_input"]) {
$crow['template']['form'] .= ' class="' . $content["search"]["style_input"] . '"';
}
$crow['template']['form'] .= " /></td><td>";
$crow['template']['form'] .= '<input type="submit" name="submit" id="search_submit_button" value="';
$crow['template']['form'] .= $content["search"]["label_button"];
$crow['template']['form'] .= '"';
if ($content["search"]["style_button"]) {
$crow['template']['form'] .= ' class="' . $content["search"]["style_button"] . '"';
}
$crow['template']['form'] .= " /></td>";
$crow['template']['form'] .= "</tr></table></form></div>";
} else {
$crow['template']['result'] = render_cnt_template($crow['template']['result'], 'SEARCH_INPUT_LABEL', $content["search"]["label_input"]);
$crow['template']['result'] = str_replace(array('{SEARCH_INPUT}', '{SEARCH_ACTION}', '{SEARCH_BUTTON}', '{SEARCH_VALUE}'), array('search_input_field', rel_url(), $content["search"]["label_button"], $content["search_word"]), $crow['template']['result']);
}
}
$crow['template']['result'] = render_cnt_template($crow['template']['result'], 'TITLE', html($crow["acontent_title"]));
$crow['template']['result'] = render_cnt_template($crow['template']['result'], 'SUBTITLE', html($crow["acontent_subtitle"]));
$crow['template']['result'] = render_cnt_template($crow['template']['result'], 'TEXT', $crow['template']['text']);
$crow['template']['result'] = render_cnt_template($crow['template']['result'], 'FORM', $crow['template']['form']);
if (count($s_result_list)) {
if ($content["search"]["show_top"] && ($_search_max_pages > 1 || $content["search"]["show_always"])) {
//$s_result_listing .= $crow['template']['pagination'];
$crow['template']['result'] = render_cnt_template($crow['template']['result'], 'PAGINATE_TOP', $crow['template']['pagination']);
} else {
$crow['template']['result'] = render_cnt_template($crow['template']['result'], 'PAGINATE_TOP', '');
}
if ($content["search"]["show_bottom"] && ($_search_max_pages > 1 || $content["search"]["show_always"])) {
//$s_result_listing .= $crow['template']['pagination'];
示例9: empty
$content['CpTitleParams'][2] = empty($content['CpTitleParams'][2]) ? '' : trim($content['CpTitleParams'][2]);
$content['CpTitleParams'][3] = empty($content['CpTitleParams'][3]) ? 0 : 1;
$content['CpTitleParams'][4] = '';
$content['CpTitleParams'][5] = '';
} else {
$content['CpTitleParams'][0] = '<li>';
$content['CpTitleParams'][1] = '</li>';
$content['CpTitleParams'][2] = 'active';
$content['CpTitleParams'][3] = 0;
$content['CpTitleParams'][4] = '<ul class="cpmenu">';
$content['CpTitleParams'][5] = '</ul>';
}
$content['CpTitleMenu'] = array();
// cp menu items
foreach ($content['CpPageTitles'] as $key => $value) {
$content['CpItem'] = '<a href="' . rel_url(array(), array(), $key ? 'aid=' . $aktion[1] . '-' . $key : PHPWCMS_ALIAS) . '"';
if ($key == $content['aId_CpPage']) {
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]);
示例10: getContentPartTopLink
function getContentPartTopLink($param = 0)
{
global $template_default;
$toplink = '';
if ($param) {
if ($template_default["article"]["top_sign_before"] . $template_default["article"]["top_sign_after"]) {
$toplink .= $template_default["article"]["top_sign_before"];
$toplink .= '<a href="' . rel_url() . '#top">' . $template_default["article"]["top_sign"] . '</a>';
$toplink .= $template_default["article"]["top_sign_after"];
} else {
$toplink .= '<br /><a href="' . rel_url() . '#top">' . $template_default["article"]["top_sign"] . '</a>';
}
}
return $toplink;
}
示例11: render
function render()
{
$items = array('top' => array(), 'default' => array(), 'bottom' => array(), 'hide' => array());
$now = now();
foreach ($this->dates as $key => $date) {
$url = '';
$target = '';
$href = $this->href ? $this->href . '&show_date=' . date('Y-m-d', $date['calendar_start_date']) . '_' . $date['calendar_id'] : '';
$itemgroup = 'default';
if ($date['calendar_range']) {
$date['calendar_range_start_date'] = strtotime($date['calendar_range_start'] . ' ' . date('H:i', $date['calendar_start_date']));
$date['calendar_range_end_date'] = strtotime($date['calendar_range_end']);
$expired_date = $this->expired === 'START' ? 'calendar_range_start_date' : 'calendar_range_end_date';
} else {
$expired_date = $this->expired === 'START' ? 'calendar_start_date' : 'calendar_end_date';
}
if ($this->expired !== '' && $date[$expired_date] < $now) {
if ($this->expired === 'bottom' || $this->expired === 'top') {
$itemgroup = $this->expired;
} elseif ($this->expired === 'hide') {
unset($this->dates[$key]);
continue;
}
}
if (!empty($date['calendar_refid'])) {
$date['calendar_refid'] = get_redirect_link($date['calendar_refid'], ' ', '');
$date['calendar_refid']['link'] = trim($date['calendar_refid']['link']);
$date['calendar_refid']['link'] = trim($date['calendar_refid']['link'], '#');
$target = $date['calendar_refid']['target'];
if (is_intval($date['calendar_refid']['link'])) {
$url = rel_url(array(), array(), 'aid=' . $date['calendar_refid']['link']);
//'index.php?aid='.$date['calendar_refid']['link'];
} elseif (strpos($date['calendar_refid']['link'], '://') || strpos($date['calendar_refid']['link'], '?') || strpos($date['calendar_refid']['link'], '.')) {
$url = $date['calendar_refid']['link'];
} elseif (!empty($date['calendar_refid']['link'])) {
$url = rel_url(array(), array(), $date['calendar_refid']['link']);
}
}
// Split title/type
if ($this->gettype !== '') {
$date['calendar_title'] = explode($this->gettype, $date['calendar_title'], 2);
$date['calendar_type'] = empty($date['calendar_title'][1]) ? '' : trim($date['calendar_title'][1]);
$date['calendar_title'] = trim($date['calendar_title'][0]);
} else {
$date['calendar_type'] = '';
}
if ($date['calendar_teaser']) {
if ($this->teaserwords) {
$date['calendar_teaser'] = getCleanSubString($date['calendar_teaser'], $this->teaserwords, $GLOBALS['template_default']['ellipse_sign'], 'word');
}
$date['calendar_teaser'] = plaintext_htmlencode($date['calendar_teaser']);
}
$items[$itemgroup][$key] = $this->template;
$items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'HREF', $href);
$items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'URL', $url);
$items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'TARGET', $target);
$items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'TITLE', html_specialchars($date['calendar_title']));
$items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'TYPE', $date['calendar_type'] ? html_specialchars($date['calendar_type']) : '');
$items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'TEASER', $date['calendar_teaser']);
$items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'TEXT', $date['calendar_text']);
$items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'PLACE', html_specialchars($date['calendar_where']));
$items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'ALLDAY', $date['calendar_allday'] ? ' ' : '');
// Detect if range date
if ($date['calendar_range']) {
$items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'RANGEDATE', ' ');
$items[$itemgroup][$key] = render_cnt_date($items[$itemgroup][$key], $date['calendar_range_start_date'], $date['calendar_range_start_date'], $date['calendar_range_end_date']);
} else {
$items[$itemgroup][$key] = render_cnt_template($items[$itemgroup][$key], 'RANGEDATE', '');
}
$items[$itemgroup][$key] = render_cnt_date($items[$itemgroup][$key], $date['calendar_start_date'], $date['calendar_start_date'], $date['calendar_end_date']);
}
if (!count($items['default']) && !count($items['top']) && !count($items['bottom'])) {
$items['default'][] = str_replace('{CALENDAR_RESET}', $this->resetCalendarLink(), $this->no_calendar_item_found);
} elseif ($this->expired && count($items[$this->expired])) {
array_unshift($items[$this->expired], $this->expired_prefix);
$items[$this->expired][] = $this->expired_suffix;
if ($this->expired === 'top') {
$items = implode(LF, $items['top']) . LF . implode(LF, $items['default']);
} else {
$items = implode(LF, $items['default']) . LF . implode(LF, $items['bottom']);
}
} else {
$items = implode(LF, $items['default']);
}
return $items;
}
示例12: switch
} else {
$_uri_alias = '';
}
switch ($fe_action) {
case '{FE_USER_MANAGE}':
$_uri = rel_url(array('profile_manage' => 'edit'), array('profile_register', 'profile_reminder'), $_uri_alias);
// at the moment it is only possible to edit user data of "real" FRONTEND users
// all BACKEND users should login to backend and edit their data there
$result = _dbGet('phpwcms_userdetail', '*', "detail_filter='" . aporeplace(FEUSER_REGKEY) . "' AND detail_id=" . intval($_SESSION[$_loginData['session_key'] . '_userdata']['id']), '', '', '1');
if (isset($result[0])) {
$fe_data = $result[0];
$fe_data['detail_password'] = '';
}
break;
case '{FE_USER_REGISTER}':
$_uri = rel_url(array('profile_register' => 'create'), array('profile_manage', 'profile_reminder'), $_uri_alias);
break;
}
if (isset($_POST['detail_login'])) {
$udata['user_login'] = clean_slweg($_POST['user_login']);
$udata['user_password'] = slweg($_POST['user_password']);
$udata['user_password2'] = slweg($_POST['user_password2']);
$udata['user_company'] = clean_slweg($_POST['user_company']);
$udata['user_title'] = clean_slweg($_POST['user_title']);
$udata['user_name'] = clean_slweg($_POST['user_name']);
$udata['user_firstname'] = clean_slweg($_POST['user_firstname']);
$udata['user_street'] = clean_slweg($_POST['user_street']);
$udata['user_zip'] = clean_slweg($_POST['user_zip']);
$udata['user_city'] = clean_slweg($_POST['user_city']);
$udata['user_tel'] = preg_replace('/[^0-9\\+\\-\\(\\) ]/', '', clean_slweg($_POST['user_tel']));
$udata['user_email'] = clean_slweg($_POST['user_email']);
示例13: get_category_products
function get_category_products($selected_product_cat, $shop_detail_id, $shop_cat_selected, $shop_subcat_selected, $shop_alias)
{
$shop_cat_prods = '';
$sql = "SELECT * FROM " . DB_PREPEND . 'phpwcms_shop_products WHERE ';
$sql .= "shopprod_status=1";
$sql .= ' AND (';
$sql .= "shopprod_category = '" . $selected_product_cat . "' OR ";
$sql .= "shopprod_category LIKE '%," . $selected_product_cat . ",%' OR ";
$sql .= "shopprod_category LIKE '" . $selected_product_cat . ",%' OR ";
$sql .= "shopprod_category LIKE '%," . $selected_product_cat . "'";
$sql .= ')';
// FE language
$sql .= SHOP_FELANG_SQL;
$pdata = _dbQuery($sql);
if (is_array($pdata) && count($pdata)) {
$z = 0;
$shop_cat_prods = array();
foreach ($pdata as $prow) {
$shop_cat_prods[$z] = '<li id="shopcat-product-' . $prow['shopprod_id'] . '"';
if ($prow['shopprod_id'] == $shop_detail_id) {
$shop_cat_prods[$z] .= ' class="active"';
}
$shop_cat_prods[$z] .= '>';
$prow['get'] = array('shop_cat' => $shop_cat_selected, 'shop_detail' => $prow['shopprod_id']);
if ($shop_subcat_selected) {
$prow['get']['shop_cat'] .= '_' . $shop_subcat_selected;
}
$shop_cat_prods[$z] .= '<a href="' . rel_url($prow['get'], array(), $shop_alias) . '">';
$shop_cat_prods[$z] .= html($prow['shopprod_name1']);
$shop_cat_prods[$z] .= '</a>';
$shop_cat_prods[$z] .= '</li>';
$z++;
}
if (count($shop_cat_prods)) {
$shop_cat_prods = LF . ' <ul class="' . $GLOBALS['template_default']['classes']['shop-products-menu'] . '">' . LF . ' ' . implode(LF . ' ', $shop_cat_prods) . LF . ' </ul>' . LF . ' ';
}
}
return $shop_cat_prods;
}
示例14: die
* @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.");
}
// ----------------------------------------------------------------
$buttonAction = '<table cellpadding="0" cellspacing="0" border="0"><tr>' . LF;
// Article List
$buttonAction .= '<td><input type="button" value="' . $BL['be_article_cnt_center'];
$buttonAction .= '" class="button" title="' . $BL['be_article_cnt_center'] . '" onclick="';
$buttonAction .= "location.href='phpwcms.php?do=articles';return false;\"></td>\n<td> </td>\n";
// Article Preview (new window)
$buttonActionLink = rel_url(array('phpwcms-preview' => 1), array(), empty($article["article_alias"]) ? 'aid=' . $article["article_id"] : $article["article_alias"]);
$buttonAction .= '<td><input type="button" value="' . $BL['be_func_struct_preview'] . '" class="button" title="' . $BL['be_func_struct_preview'] . '" onclick="';
$buttonAction .= "window.open('" . $buttonActionLink . "', 'articlePreviewWindows');return false;\"></td>";
$buttonAction .= '</tr></table>';
?>
<form action="phpwcms.php?do=articles&p=2&s=1&aktion=2&id=<?php
echo $article["article_id"];
?>
" method="post" name="addcontent" id="addcontent">
<table width="538" border="0" cellpadding="0" cellspacing="0" summary="">
<tr><td colspan="3" class="title"><?php
echo $BL['be_article_cnt_ltitle'];
?>
</td></tr>
<tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="8" /></td>
</tr>
示例15: switch
switch ($guestbook['post']['show']) {
case 0:
$guestbook['GBSHOW_0'] = ' checked="checked"';
break;
case 1:
$guestbook['GBSHOW_1'] = ' checked="checked"';
break;
case 2:
$guestbook['GBSHOW_2'] = ' checked="checked"';
break;
}
$guestbook['form'] = str_replace('{GBSHOW_0}', $guestbook['GBSHOW_0'], $guestbook['form']);
$guestbook['form'] = str_replace('{GBSHOW_1}', $guestbook['GBSHOW_1'], $guestbook['form']);
$guestbook['form'] = str_replace('{GBSHOW_2}', $guestbook['GBSHOW_2'], $guestbook['form']);
// build sign guestbook form
$guestbook['form'] = '<form name="sign_guestbook" action="' . rel_url() . '" method="post"' . (empty($guestbook["image_upload"]) ? '' : ' enctype="multipart/form-data"') . '>' . $guestbook['form'];
if (!empty($guestbook['hidden'])) {
$guestbook['form'] .= $guestbook['hidden'];
}
$guestbook['form'] .= getFormTrackingValue() . '</form>';
} else {
if (!$guestbook['flooding']) {
// if successfully signed show signed info
$guestbook['signed'] = render_cnt_template($guestbook['signed'], 'EMAIL', html_specialchars($guestbook['post']['email']));
$guestbook['signed'] = render_cnt_template($guestbook['signed'], 'NAME', html_specialchars($guestbook['post']['name']));
$guestbook['signed'] = render_cnt_template($guestbook['signed'], 'URL', html_specialchars($guestbook['post']['url']));
$guestbook['signed'] = render_cnt_template($guestbook['signed'], 'MSG', html_specialchars($guestbook['post']['msg']));
$guestbook['form'] = $guestbook['signed'];
} else {
$guestbook['form'] = $guestbook['spamalert'];
}