/**
  * @param int $pid current folder ID
  * @param int $img_list_width
  * @param int $img_list_height
  * @param int $img_list_sl sharpen level
  * @param int[] $folders array with active folders in cp
  * @param bool|string $active to pass the status to subfolders
  * @return string html for folderlist
  */
 public function getFolderList($pid, $img_list_width, $img_list_height, $img_list_sl, $folders, $active = 'true')
 {
     $pid = intval($pid);
     $userID = intval($_SESSION["wcs_user_id"]);
     $sql = "SELECT f_id, f_name, f_aktiv, f_public, f_uid FROM " . DB_PREPEND . "phpwcms_file WHERE " . "f_pid=" . intval($pid) . " AND f_kid=0 AND f_trash=0 AND (f_public=1 OR f_uid=" . $userID . ") ORDER BY f_sort, f_name";
     $data = _dbQuery($sql);
     foreach ($data as $key => $val) {
         $dirname = html_specialchars($val["f_name"]);
         //check if depending files/dirs exist
         $sql2 = "SELECT COUNT(f_id) FROM " . DB_PREPEND . "phpwcms_file WHERE " . "f_pid=" . $val["f_id"] . " AND f_kid=0 AND f_trash=0 AND (f_public=1 OR f_uid=" . $userID . ") LIMIT 1";
         $data2 = _dbQuery($sql2, 'COUNT');
         $folders_act = "";
         //curr ID is in selectedFoldersList
         if (in_array($val["f_id"], $folders)) {
             $folders_act = 'checked="checked"';
         }
         //start outputfor the row
         $this->_folderlist_html .= '<li class="br_module_jqs_folderlist_li">';
         //if folder active and parent not inactive
         if ($val["f_aktiv"] == 1 && $active == 'true') {
             $this->_folderlist_html .= '<span id="openlink' . $val["f_id"] . '" class="br_module_jqs_folderlist_openlink closed" onclick="PHPWCMS_MODULE.JQS.sendRequest(' . $val["f_id"] . ');">&nbsp;</span>';
         } else {
             $this->_folderlist_html .= '<span class="br_module_jqs_folderlist_openlink">&nbsp;</span>';
         }
         $this->_folderlist_html .= '<input type="checkbox" name="jqs_folders[]" value="' . $val["f_id"] . '" ' . $folders_act;
         //if folder active and parent not inactive
         if ($val["f_aktiv"] == 1 && $active == 'true') {
             $this->_folderlist_html .= ' />' . $dirname;
             $this->_folderlist_html .= '<span id="arr' . $val["f_id"] . '"></span><div id="images' . $val["f_id"] . '" style="display:none;"></div>';
         } else {
             $this->_folderlist_html .= ' disabled="disabled" />' . $dirname;
             $this->_folderlist_html .= ' (';
             //if folder itself is inactive then show image
             if ($val["f_aktiv"] == 0) {
                 $this->_folderlist_html .= '<img style="vertical-align: text-bottom;" src="include/inc_module/mod_sliderjs/img/active_11x11a_0.gif" />';
             }
             $this->_folderlist_html .= ')';
             //curr ID is in selectedFoldersList
             if (in_array($val["f_id"], $folders)) {
                 //hidden field to pass the ID just in case it's selcted
                 $this->_folderlist_html .= '<input type="hidden" name="jqs_folders[]" value="' . $val["f_id"] . '">';
             }
         }
         //deeper if subdir
         if ($data2) {
             //pass the inactive status to all subfolders
             if ($val["f_aktiv"] == 0) {
                 $active = 'false';
             }
             $this->_folderlist_html .= "<ul>" . LF;
             $this->getFolderList($val["f_id"], $img_list_width, $img_list_height, $img_list_sl, $folders, $active);
             $this->_folderlist_html .= "</ul>" . LF;
             //reset the status for following folders (of same level)
             $active = 'true';
         }
         $this->_folderlist_html .= '</li>' . LF;
     }
     return $this->_folderlist_html;
 }
示例#2
0
 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
0
//used to convert old style file uploads
$phpwcms = array();
require_once '../include/config/conf.inc.php';
require_once '../include/inc_lib/default.inc.php';
require_once PHPWCMS_ROOT . '/include/inc_lib/dbcon.inc.php';
require_once PHPWCMS_ROOT . '/include/inc_lib/general.inc.php';
require_once PHPWCMS_ROOT . '/include/inc_lib/backend.functions.inc.php';
?>
<html>
<body>
<h3>Upgrade article end date 2010-12-31 23:59:59 to 2030-12-31 23:59:59</h3>
<?php 
// get all articles
if ($all = _dbQuery("SELECT article_id, article_alias, article_title FROM " . DB_PREPEND . "phpwcms_article WHERE article_end='2010-12-31 23:59:59' AND article_deleted=0")) {
    if (isset($all[0])) {
        $sql = "UPDATE " . DB_PREPEND . "phpwcms_article SET ";
        $sql .= "article_end='2030-12-31 23:59:59'";
        $sql .= "WHERE article_end='2010-12-31 23:59:59' AND article_deleted=0";
        $result = _dbQuery($sql, 'UPDATE');
    }
    foreach ($all as $key => $value) {
        echo '<pre';
        echo '>[ID:' . sprintf('%0' . strlen(strval(count($all))) . 's', $value['article_id']) . '] ' . html_specialchars($value['article_title'] . ' (' . $value['article_alias'] . ')');
        echo '</pre>' . LF;
    }
}
?>

<p><strong>Done!</strong> All articles not listed here are not touched.</p>
</body>
</html>
示例#4
0
                     $tabitem['content-class'] = $template_default['classes']['tab-content'];
                     if ($template_default['classes']['tab-content-item']) {
                         $tabitem['content-class'] = trim($tabitem['content-class'] . ' ' . $template_default['classes']['tab-content-item']) . '-' . $g['counter'];
                     }
                     if ($tabitem['content-class']) {
                         $tabitem['content-class'] = ' class="' . $tabitem['content-class'] . '"';
                     }
                     if ($template_default['classes']['tab-first'] && $g['counter'] === 1) {
                         $tabitem['class'] .= ' ' . $template_default['classes']['tab-first'];
                     }
                     if ($template_default['classes']['tab-last'] && $g['counter'] === $g['max']) {
                         $tabitem['class'] .= ' ' . $template_default['classes']['tab-last'];
                     }
                     $tabitem['class'] = trim($tabitem['class']);
                     $tabitem['class'] = $tabitem['class'] ? ' class="' . $tabitem['class'] . '"' : '';
                     $g['wrap'][] = '		<li' . $tabitem['class'] . '><a href="' . rel_url() . '#' . $tabitem['id'] . '">' . html_specialchars($tabitem['title']) . '</a></li>';
                     $g['cnt'][] = '	<div id="' . $tabitem['id'] . '"' . $tabitem['content-class'] . '>' . LF . $tabitem['content'] . LF . '	</div>';
                     $g['counter']++;
                 }
                 $g['wrap'][] = '	</ul>';
                 $g['wrap'][] = implode(LF, $g['cnt']);
                 if ($template_default['classes']['tab-container-clear']) {
                     $g['wrap'][] = '	<span class="' . $template_default['classes']['tab-container-clear'] . '"></span>';
                 }
                 $g['wrap'][] = '</div>';
             }
             $content['cptab'][$CNT_TAB] = implode(LF, $g['wrap']);
         }
         unset($g);
     }
 }
示例#5
0
 */
if (strpos($content['all'], '{BREADCRUMB_ARTICLE}')) {
    // Set level where to start with breadcrumb - default 0 = Root level
    $_breadcrumb_start_level = 0;
    // Separate Breadcrumb items with
    $_breadcrumb_spacer = ' &gt; ';
    // Wrap inner link text by prefix/suffix <a> %PREFIX% Linktext %SUFFIX% </a>
    $_breadcrumb_link_prefix = '<b>';
    $_breadcrumb_link_suffix = '</b>';
    // additional link attributes like class, rel, style
    // remember there is no active link - active (last) item has no link
    $_breadcrumb_link_attribute = 'class="breadcrumb-link"';
    ////// Do not edit below ////////
    $_breadcrumb = array();
    if (count($LEVEL_ID) > $_breadcrumb_start_level) {
        foreach ($LEVEL_ID as $level => $item) {
            if ($level < $_breadcrumb_start_level) {
                continue;
            }
            if ($content['struct'][$item]["acat_hidden"] == false) {
                $_breadcrumb[] = getStructureLevelLink($content['cat_id'] == $item && $content['list_mode'] ? $content['struct'][$item]['acat_name'] : $content['struct'][$item], $_breadcrumb_link_attribute, $_breadcrumb_link_prefix, $_breadcrumb_link_suffix);
            }
        }
    }
    // Article
    if ($aktion[1]) {
        $_breadcrumb[] = html_specialchars($content['article_title']);
    }
    $_breadcrumb = implode($_breadcrumb_spacer, array_diff($_breadcrumb, array('', NULL)));
    $content['all'] = str_replace('{BREADCRUMB_ARTICLE}', $_breadcrumb, $content['all']);
}
示例#6
0
                $subgallery = '		<ul class="sub">' . LF;
                foreach ($subgalleries as $sub) {
                    $subgallery .= '			<li class="sub">' . LF;
                    $subgallery .= '				<h3><a href="' . $gallery->url . '&amp;subgallery=' . $sub['f_id'] . '">';
                    $subgallery .= html_specialchars($sub['f_name']) . '</a></h3>' . LF;
                    if ($row['f_longinfo'] != '') {
                        $subgallery .= '		' . plaintext_htmlencode($sub['f_longinfo']) . LF;
                    }
                    $subgallery .= '			</li>' . LF;
                }
                $subgallery .= '		</ul>' . LF;
            }
            $galleries[$g] = '	<li class="root">' . LF;
            $galleries[$g] .= '		<h2>';
            if ($subgallery != '') {
                $galleries[$g] .= html_specialchars($row['f_name']);
            } else {
                $galleries[$g] .= '<a href="' . $gallery->url . '&amp;subgallery=' . $row['f_id'] . '">' . html_specialchars($row['f_name']) . '</a>';
            }
            $galleries[$g] .= '</h2>' . LF;
            if ($row['f_longinfo'] != '') {
                $galleries[$g] .= '		' . plaintext_htmlencode($row['f_longinfo']) . LF;
            }
            $galleries[$g] .= $subgallery;
            $galleries[$g] .= '	</li>';
            $g++;
        }
        $gallery = count($galleries) ? '<ul class="gallery">' . LF . implode(LF, $galleries) . LF . '</ul>' : '';
    }
    $content['all'] = str_replace('{GALLERY}', '<hr /><h1>Gallery</h1>' . LF . $gallery . LF . '<hr />', $content['all']);
}
示例#7
0
        $image_descr = '';
        $image_css = '';
        if ($thumb_image != false) {
            if (isset($imagesdata[$value][$val['f_id']])) {
                if (isset($imagesdata[$value][$val['f_id']][1])) {
                    //allow plain text only
                    $image_title = html_specialchars(strip_tags($imagesdata[$value][$val['f_id']][1]));
                }
                if (isset($imagesdata[$value][$val['f_id']][2])) {
                    //we allow HTML in description
                    //$image_descr = html_specialchars(strip_tags($imagesdata[$value][$val['f_id']][2]));
                    $image_descr = html_specialchars($imagesdata[$value][$val['f_id']][2]);
                }
                if (isset($imagesdata[$value][$val['f_id']][3])) {
                    //CSS Class
                    $image_css = html_specialchars(strip_tags($imagesdata[$value][$val['f_id']][3]));
                }
            }
            //html output per image - image + field title + field descr + Dialog-Link
            $imagelist_output .= '    <div class="jqs_div"><div class="jqs_imgdiv"><img src="' . PHPWCMS_IMAGES . $thumb_image[0] . '" ';
            $imagelist_output .= $thumb_image[3] . ' alt="' . $val['f_name'] . '" title="' . $val['f_name'] . '" /></div>' . LF;
            $imagelist_output .= '    <div class="jqs_cntdiv"><input class="jqs_imgtitle" type="text" maxlength="255" name="jqs_images[' . $value . '][' . $val['f_id'] . '][1]" value="' . $image_title . '" placeholder="title" />';
            $imagelist_output .= '    <textarea id="ta' . $value . $val['f_id'] . '" class="jqs_imgdescr" cols="8" name="jqs_images[' . $value . '][' . $val['f_id'] . '][2]" rows="3" placeholder="description">' . $image_descr . '</textarea>';
            $imagelist_output .= '    <span id="' . $value . $val['f_id'] . '" class="jqs_wysiwyg_opener">&lt;HTML&gt;</span>';
            $imagelist_output .= '    <input class="jqs_imgcss" type="text" maxlength="255" name="jqs_images[' . $value . '][' . $val['f_id'] . '][3]" value="' . $image_css . '" placeholder="css-class" />';
            $imagelist_output .= '    </div></div>';
        }
    }
    $return_output = $imagelist_output;
} else {
    $return_output = '';
示例#8
0
        echo '<img src="../img/famfamfam/icon_alert.gif" alt="Warning" class="icon1" />';
        echo ' (check information about security risks';
        echo '<a href="http://www.php.net/features.safe-mode" target="_blank">';
        echo '<img src="../img/famfamfam/icon_info.gif" alt="Security risks" class="icon1" border="0" />';
        echo '</a>)';
    }
    ?>
</li>
<?php 
}
?>

  	  <li><?php 
$_phpinfo = parsePHPModules();
if (isset($_phpinfo['gd']['GD Support']) && $_phpinfo['gd']['GD Support'] == 'enabled' && isset($_phpinfo['gd']['GD Version'])) {
    $_phpinfo['gd_version'] = html_specialchars($_phpinfo['gd']['GD Version']);
} else {
    $_phpinfo['gd_version'] = 'n.a.';
}
echo '<strong>GD';
if (function_exists('imagegd2')) {
    echo '2</strong> ' . $_phpinfo['gd_version'];
    echo '<img src="../img/famfamfam/icon_accept.gif" alt="GD2" class="icon1" />';
    $is_gd = true;
} elseif (function_exists('imagegd')) {
    echo '1</strong> ' . $_phpinfo['gd_version'];
    echo '<img src="../img/famfamfam/icon_alert.gif" alt="GD1" class="icon1" />';
    echo ' (GD2 is recommend)';
    $is_gd = true;
} else {
    echo ' not available</strong>';
        } 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']);
}
// Content Type Reference
$content['reference']["list"] = isset($_POST["cimage_list"]) ? $_POST["cimage_list"] : array();
$content['reference']["width"] = intval($_POST["creference_width"]) ? intval($_POST["creference_width"]) : '';
$content['reference']["height"] = intval($_POST["creference_height"]) ? intval($_POST["creference_height"]) : '';
$content['reference']["blockwidth"] = intval($_POST["creference_blockwidth"]) ? intval($_POST["creference_blockwidth"]) : '';
$content['reference']["blockheight"] = intval($_POST["creference_blockheight"]) ? intval($_POST["creference_blockheight"]) : '';
$temp_width = $content['reference']["width"];
$temp_height = $content['reference']["height"];
$content['reference']["space"] = intval($_POST["creference_space"]);
$content['reference']["pos"] = intval($_POST["creference_pos"]);
$content['reference']["border"] = intval($_POST["creference_border"]);
$content['reference']["listborder"] = intval($_POST["creference_listborder"]);
$content['reference']["basis"] = intval($_POST["creference_basis"]);
$content['reference']["caption"] = clean_slweg($_POST["creference_caption"]);
$content['reference']["zoom"] = isset($_POST["creference_zoom"]) ? intval($_POST["creference_zoom"]) : 0;
$content['reference']["text"] = html_specialchars(slweg($_POST["creference_text"]));
$content['reference']["tmpl"] = clean_slweg($_POST["creference_tmpl"]);
$content['reference']['showlist'] = 0;
if (is_array($content['reference']["list"]) && count($content['reference']["list"])) {
    $img_sql = "SELECT * FROM " . DB_PREPEND . "phpwcms_file WHERE (";
    $imgx = 0;
    foreach ($content['reference']["list"] as $key => $value) {
        unset($content['reference']["list"][$key]);
        $content['reference']["list"][$key]['img_id'] = intval($value);
        if ($imgx) {
            $img_sql .= " OR ";
        }
        $img_sql .= "f_id=" . $content['reference']["list"][$key]['img_id'];
        $imgx++;
    }
    $img_sql .= ");";
示例#11
0
            break;
            //center
        //center
        case 1:
            $ecard["chooser"] = imagelisttable($ecard, "0:5:0:0", "center", 1);
            break;
            //right
    }
    $ecard["form"] = str_replace('###ECARD_CHOOSER###', $ecard["chooser"], $ecard["form"]);
    if (!$ecard["send_err"]) {
        $ecard["form"] = preg_replace("/<!--FORM_ERROR_START-->(.*?)<!--FORM_ERROR_END-->/si", '', $ecard["form"]);
    }
    $ecard["form"] = preg_replace("/name=[\\'|\"]###SENDER_NAME###[\\'|\"]/i", 'name="ecard_sender_name"', $ecard["form"]);
    $ecard["form"] = preg_replace("/name=[\\'|\"]###SENDER_EMAIL###[\\'|\"]/i", 'name="ecard_sender_email"', $ecard["form"]);
    $ecard["form"] = preg_replace("/name=[\\'|\"]###RECIPIENT_NAME###[\\'|\"]/i", 'name="ecard_recipient_name"', $ecard["form"]);
    $ecard["form"] = preg_replace("/name=[\\'|\"]###RECIPIENT_EMAIL###[\\'|\"]/i", 'name="ecard_recipient_email"', $ecard["form"]);
    $ecard["form"] = preg_replace("/name=[\\'|\"]###SENDER_MESSAGE###[\\'|\"]/i", 'name="ecard_sender_msg"', $ecard["form"]);
    $ecard["form"] = str_replace('###SENDER_NAME###', isset($ecard["sender_name"]) ? html_specialchars($ecard["sender_name"]) : '', $ecard["form"]);
    $ecard["form"] = str_replace('###SENDER_EMAIL###', isset($ecard["sender_email"]) ? html_specialchars($ecard["sender_email"]) : '', $ecard["form"]);
    $ecard["form"] = str_replace('###RECIPIENT_NAME###', isset($ecard["recipient_name"]) ? html_specialchars($ecard["recipient_name"]) : '', $ecard["form"]);
    $ecard["form"] = str_replace('###RECIPIENT_EMAIL###', isset($ecard["recipient_email"]) ? html_specialchars($ecard["recipient_email"]) : '', $ecard["form"]);
    $ecard["form"] = str_replace('###SENDER_MESSAGE###', isset($ecard["sender_msg"]) ? html_specialchars($ecard["sender_msg"]) : '', $ecard["form"]);
    $ecard["form"] = str_replace('###ECARD_SUBJECT###', isset($ecard["subject"]) ? html_specialchars($ecard["subject"]) : '', $ecard["form"]);
    $CNT_TMP .= '<form action="' . html_specialchars($_SERVER['REQUEST_URI']) . '" method="post" name="send_ecard">';
    $CNT_TMP .= $ecard["form"];
    if ($ecard["selector"]) {
        //add hidden form field ecard_chooser
        $CNT_TMP .= '<input type="hidden" name="ecard_chooser" value="' . $ecard["selected"] . '" />';
    }
    $CNT_TMP .= '</form>';
}
示例#12
0
 * @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.");
}
// ----------------------------------------------------------------
// Content Type Newsletter Subscription
$content["newsletter"]["text"] = html_specialchars(clean_slweg($_POST["cnewsletter_text"]));
$content["newsletter"]["label_email"] = html_specialchars(clean_slweg($_POST["cnewsletter_label_email"]));
$content["newsletter"]["label_name"] = html_specialchars(clean_slweg($_POST["cnewsletter_label_name"]));
$content["newsletter"]["label_subscriptions"] = html_specialchars(clean_slweg($_POST["cnewsletter_label_subscriptions"]));
$content["newsletter"]["all_subscriptions"] = html_specialchars(clean_slweg($_POST["cnewsletter_all_subscriptions"]));
$content["newsletter"]["button_text"] = html_specialchars(clean_slweg($_POST["cnewsletter_button_text"]));
$content["newsletter"]["success_text"] = html_specialchars(clean_slweg($_POST["cnewsletter_success_text"]));
$content["newsletter"]["reg_text"] = html_specialchars(clean_slweg($_POST["cnewsletter_reg_text"]));
$content["newsletter"]["logoff_text"] = html_specialchars(clean_slweg($_POST["cnewsletter_logoff_text"]));
$content["newsletter"]["change_text"] = html_specialchars(clean_slweg($_POST["cnewsletter_change_text"]));
$content["newsletter"]["url1"] = clean_slweg($_POST["cnewsletter_url1"]);
$content["newsletter"]["url2"] = clean_slweg($_POST["cnewsletter_url2"]);
$content['subscription_temp'] = convertStringToArray($_POST['cnewsletter_subscription_left']);
$content["newsletter"]["subscription"] = array();
foreach ($content['subscription_temp'] as $subscr_value) {
    $subscr_value = intval($subscr_value);
    $content["newsletter"]["subscription"][$subscr_value] = $subscr_value;
}
$content["newsletter"]["pos"] = intval($_POST["cnewsletter_pos"]);
示例#13
0
}
$CNT_TMP .= $sitemap['before'];
if ($content['struct'][$sitemap['startid']]['acat_nositemap']) {
    $sitemap['c'] = '';
    if ($sitemap['catclass']) {
        $sitemap['c'] .= ' class="' . $sitemap['catclass'];
        if ($sitemap['classcount']) {
            $sitemap['c'] .= '0';
        }
        $sitemap['c'] .= '"';
    }
    if (empty($sitemap["without_parent"])) {
        $CNT_TMP .= "<ul" . $sitemap['c'] . "><li" . $sitemap['cat_style'] . ">";
        $CNT_TMP .= '<a href="index.php?';
        if ($content['struct'][$sitemap['startid']]['acat_alias']) {
            $CNT_TMP .= $content['struct'][$sitemap['startid']]['acat_alias'];
        } else {
            $CNT_TMP .= 'id=' . $sitemap['startid'];
        }
        $CNT_TMP .= '">' . html_specialchars($content['struct'][$sitemap['startid']]['acat_name']) . '</a>';
    }
    if ($sitemap["display"]) {
        $CNT_TMP .= build_sitemap_articlelist($sitemap['startid'], 0, $sitemap);
    }
    $CNT_TMP .= build_sitemap($sitemap['startid'], 0, $sitemap);
    if (empty($sitemap["without_parent"])) {
        $CNT_TMP .= "</li>\n</ul>";
    }
}
$CNT_TMP .= $sitemap['after'];
unset($sitemap);
示例#14
0
 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', '&nbsp;'), ' ', $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;
             }
             $s_and_or = count($s_and_or);
             if ($s_and_or != $this->search_word_count) {
                 $s_count = 0;
             }
         }
         if ($s_count) {
             $id = $this->search_result_entry;
             $this->search_results[$id]["id"] = $value['cnt_id'];
             $this->search_results[$id]["cid"] = 0;
             $this->search_results[$id]["rank"] = $s_count;
             if ($this->search_highlight) {
                 $this->search_results[$id]["title"] = highlightSearchResult(html($value['cnt_title']), $this->search_highlight_words);
                 $this->search_results[$id]["subtitle"] = highlightSearchResult(html($value['cnt_subtitle']), $this->search_highlight_words);
             } else {
                 $this->search_results[$id]["title"] = html($value['cnt_title']);
                 $this->search_results[$id]["subtitle"] = html($value['cnt_subtitle']);
             }
             $this->search_results[$id]["date"] = $value['cnt_ts_livedate'];
             $this->search_results[$id]["user"] = html($value['cnt_editor']);
             $value['detail_link'] = date('Ymd', $value['cnt_ts_livedate']) . '-' . $value['cnt_id'] . '_';
             //$crow['acontent_aid']
             $value['detail_link'] .= empty($value['cnt_alias']) ? $value['cnt_id'] : urlencode($value['cnt_alias']);
             if (strpos($this->search_target_url, '___NEWSDETAIL__') !== false) {
                 $this->search_results[$id]['link'] = str_replace(array('___NEWSDETAIL__', '___HIGHLIGHT__'), array($value['detail_link'], $s_highlight_words), $this->search_target_url);
             } else {
                 $this->search_results[$id]['link'] = $this->search_target_url . '&amp;newsdetail=' . $value['detail_link'];
                 if ($this->search_highlight) {
                     $this->search_results[$id]['link'] .= '&amp;highlight=' . $s_highlight_words;
                 }
             }
             $s_text = trim(trim(str_replace(', ,', ',', $s_text)), ' ,');
             $s_text = html(getCleanSubString($s_text, $this->search_wordlimit, $this->ellipse_sign, 'word'), false);
             if ($this->search_highlight) {
                 $s_text = highlightSearchResult($s_text, $this->search_highlight_words);
             }
             $this->search_results[$id]["text"] = $s_text;
             $this->search_results[$id]["image"] = false;
             if ($this->image_render && !empty($value['cnt_object']['cnt_image']['id'])) {
                 $value['cnt_object']['cnt_image'] = _dbGet('phpwcms_file', 'f_id AS `id`, f_hash AS `hash`, f_ext AS `ext`, f_name AS `name`', 'f_id=' . _dbEscape($value['cnt_object']['cnt_image']['id']) . ' AND f_trash=0 AND f_aktiv=1 AND f_public=1');
                 if (isset($value['cnt_object']['cnt_image'][0]['id'])) {
                     $this->search_results[$id]["image"] = $value['cnt_object']['cnt_image'][0];
                 }
             }
             $this->search_result_entry++;
         }
     }
 }
示例#15
0
        $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);
示例#16
0
$subtotal['shipping_vat'] = number_format($subtotal['shipping_vat'], $_tmpl['config']['price_decimals'], $_tmpl['config']['dec_point'], $_tmpl['config']['thousands_sep']);
$subtotal['shipping_gross'] = number_format($subtotal['shipping_gross'], $_tmpl['config']['price_decimals'], $_tmpl['config']['dec_point'], $_tmpl['config']['thousands_sep']);
$subtotal['weight'] = number_format($subtotal['weight'], $_tmpl['config']['weight_decimals'], $_tmpl['config']['dec_point'], $_tmpl['config']['thousands_sep']);
$subtotal['discount_percent'] = number_format(round($_shopPref['shop_discount_use']['percent'], 1), $_tmpl['config']['price_decimals'], $_tmpl['config']['dec_point'], $_tmpl['config']['thousands_sep']);
$subtotal['total_discount_net'] = number_format($subtotal['float_discount_net'], $_tmpl['config']['price_decimals'], $_tmpl['config']['dec_point'], $_tmpl['config']['thousands_sep']);
$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);
示例#17
0
<?php

/**
 * phpwcms content management system
 *
 * @author Oliver Georgi <*****@*****.**>
 * @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.");
}
// ----------------------------------------------------------------
//link & email
$CNT_TMP .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
list($link["link"], $link["target"]) = explode(" ", $crow["acontent_redirect"]);
$CNT_TMP .= $template_default["article"]["link_email_before"];
$CNT_TMP .= "<a href=\"" . $link["link"] . "\"" . ($link["target"] ? " target=\"" . $link["target"] . "\"" : "") . ">";
$CNT_TMP .= html_specialchars(trim(str_replace("mailto:", "", $link["link"]))) . "</a>";
$CNT_TMP .= $template_default["article"]["link_email_after"];
示例#18
0
// get all tabs
if (isset($_POST['tabtitle']) && is_array($_POST['tabtitle']) && count($_POST['tabtitle'])) {
    $x = 0;
    foreach ($_POST['tabtitle'] as $key => $value) {
        $content["tabs"][$x]['tabtitle'] = clean_slweg($value);
        if ($content["tabs"][$x]['tabtitle'] == '') {
            $content["tabs"][$x]['tabtitle'] = $BL['be_tab_name'] . ' #' . ($x + 1);
        }
        $content["tabs"][$x]['tabheadline'] = empty($_POST['tabheadline'][$key]) ? '' : clean_slweg($_POST['tabheadline'][$key]);
        $content["tabs"][$x]['tabtext'] = empty($_POST['tabtext'][$key]) ? '' : slweg($_POST['tabtext'][$key]);
        $content["tabs"][$x]['tablink'] = empty($_POST['tablink'][$key]) ? '' : clean_slweg($_POST['tablink'][$key]);
        $content['search'] .= strip_tags(trim($content["tabs"][$x]['tabtitle'] . ' ' . $content["tabs"][$x]['tabheadline'] . ' ' . $content["tabs"][$x]['tabtext'])) . ' ';
        $content['html'][] = '	<dt>' . html_specialchars($content["tabs"][$x]['tabtitle']) . '</dt>';
        $content['html'][] = '	<dd>';
        if ($content["tabs"][$x]['tabheadline']) {
            $content['html'][] = '		<h3>' . html_specialchars($content["tabs"][$x]['tabheadline']) . '</h3>';
        }
        if (!$content['tabwysiwygoff'] && strpos($content["tabs"][$x]['tabtext'], '<') === false) {
            $content["tabs"][$x]['tabtext'] = plaintext_htmlencode($content["tabs"][$x]['tabtext']);
            $content['html'][] = '		' . $content["tabs"][$x]['tabtext'];
        }
        $content['html'][] = '	</dd>';
        $x++;
    }
}
$content['search'] = trim($content['search']);
if (count($content['html'])) {
    $content['html'] = '<dl>' . LF . implode(LF, $content['html']) . LF . '</dl>';
} else {
    $content['html'] = '';
}
            $newimage .= $frow['f_hash'];
            $newimage .= ':';
            $newimage .= $frow['f_ext'];
            $newimage .= ':';
            $newimage .= $image[3];
            $newimage .= ':';
            $newimage .= $image[4];
            $newimage .= ':';
            $newimage .= $image[7];
            $newimage .= ':';
            $newimage .= $image[5];
            $newimage .= ':';
            $newimage .= isset($image[8]) && intval($image[8]) ? 1 : 0;
            // check if this is an updated content part
            if ($image[2] != $frow['f_hash'] && $image[3] != $frow['f_ext']) {
                $usql = "UPDATE " . DB_PREPEND . "phpwcms_articlecontent SET ";
                $usql .= "acontent_image='" . aporeplace($newimage) . "' ";
                $usql .= "WHERE acontent_id=" . $row['acontent_id'] . " LIMIT 1";
                mysql_query($usql, $db);
                echo 'Image ' . sprintf('%05d: ', $linenumber) . html_specialchars($frow['f_name']) . "\n";
            }
        }
        mysql_free_result($fresult);
    }
    flush();
    $linenumber++;
}
if (empty($usql)) {
    echo 'None of the content parts &quot;image with text&quot; needs to be upgraded.';
}
echo '</pre></body></html>';
示例#20
0



  <tr bgcolor="#FFFFFF">
    <td align="right">&nbsp;select&nbsp;SQL&nbsp;file:</td>
    <td><select name="sqlfile" id="sqlfile" onchange="window.open(this.options[this.selectedIndex].value,'sqlqueries')">
      <option value="inc/showsql.php" style="font-weight:bold; font-style:italic;">Please select&#8230;</option>
      <?php 
    $dir = 'update_sql';
    if (is_dir($dir)) {
        $ph = opendir($dir);
        $dir_sql = array();
        while ($pf = readdir($ph)) {
            if (substr($pf, 0, 1) !== '.' && is_file($dir . '/' . $pf) && preg_match('/(\\.sql)$/i', $pf)) {
                $dir_sql[] = html_specialchars($pf);
            }
        }
        closedir($ph);
        natsort($dir_sql);
        foreach ($dir_sql as $pf) {
            echo '<option value="inc/showsql.php?f=' . $pf . '">' . $pf . "</option>\n";
        }
    }
    ?>
    </select></td>
  </tr>
</table>
<p style="margin-top:5px;"><strong>SQL queries to be processed:</strong></p>
<iframe name="sqlqueries" id="sqlqueries" frameborder="0" scrolling="auto" src="inc/showsql.php"></iframe>
<p><input name="submit" type="submit" value="Upgrade database" /></p>
$mod_sliderjs_slidesjs['dirlist'] = array();
$mod_sliderjs_slidesjs['full_path'] = $phpwcms["modules"][$content["module"]]['path'] . 'plugins/slidesjs/themes';
$mod_sliderjs_slidesjs['handle'] = opendir($mod_sliderjs_slidesjs['full_path']);
if ($mod_sliderjs_slidesjs['handle']) {
    while (false !== ($mod_sliderjs_slidesjs['file'] = readdir($mod_sliderjs_slidesjs['handle']))) {
        if (is_dir($mod_sliderjs_slidesjs['full_path'] . "/" . $mod_sliderjs_slidesjs['file'])) {
            if ($mod_sliderjs_slidesjs['file'] != "." && $mod_sliderjs_slidesjs['file'] != "..") {
                array_push($mod_sliderjs_slidesjs['dirlist'], $mod_sliderjs_slidesjs['file']);
            }
        }
    }
}
if (is_array($mod_sliderjs_slidesjs['dirlist']) && count($mod_sliderjs_slidesjs['dirlist'])) {
    foreach ($mod_sliderjs_slidesjs['dirlist'] as $mod_sliderjs_slidesjs['optionval']) {
        $mod_sliderjs_slidesjs['selected_dir'] = isset($content['br_sliderjs']['slidesjs']['jqs_theme']) && $mod_sliderjs_slidesjs['optionval'] == $content['br_sliderjs']['slidesjs']['jqs_theme'] ? ' selected="selected"' : '';
        $mod_sliderjs_slidesjs['optionval'] = html_specialchars($mod_sliderjs_slidesjs['optionval']);
        echo '	<option value="' . $mod_sliderjs_slidesjs['optionval'] . '"' . $mod_sliderjs_slidesjs['selected_dir'] . '>' . $mod_sliderjs_slidesjs['optionval'] . '</option>' . LF;
    }
}
?>
</select>
            </div>
        </td>
    </tr>
    <tr><td></td><td><span><?php 
echo $phpwcms['modules'][$content["module"]]['dir'] . 'plugins/slidesjs/themes';
?>
</span></td></tr>
    <tr><td colspan="2"><div class="br_module_spaceh10"></div></td></tr>
    <!-- dimensions -->
    <tr>
示例#22
0
             break;
     }
     $guestbook['c'] = render_cnt_template($guestbook['c'], 'EMAIL', html_specialchars($guestbook['row']['guestbook_email']));
     $guestbook['c'] = render_cnt_template($guestbook['c'], 'NAME', html_specialchars($guestbook['row']['guestbook_name']));
     $guestbook['c'] = render_cnt_template($guestbook['c'], 'MSG', nl2br($guestbook['row']['guestbook_msg']));
     $guestbook['c'] = preg_replace_callback('/{TIMESTAMP:(.*)}/', 'guestbook_date_callback', $guestbook['c']);
     // do gb image ;-)
     $guestbook['entry_image'] = '';
     if (isset($guestbook['imgdata']) && !empty($guestbook['row']['guestbook_image'])) {
         if (file_exists($guestbook['image_dir'] . '/' . $guestbook['row']['guestbook_image'])) {
             $thumb_image = false;
             $thumb_img = '';
             $thumb_image = get_cached_image(array("target_ext" => which_ext($guestbook['row']['guestbook_image']), "image_name" => $guestbook['row']['guestbook_image'], "image_dir" => $guestbook['image_dir'] . '/', "max_width" => $guestbook['imgdata'][0], "max_height" => $guestbook['imgdata'][1], "thumb_name" => md5($guestbook['row']['guestbook_image'] . $guestbook['imgdata'][0] . $guestbook['imgdata'][1] . $phpwcms["sharpen_level"] . $phpwcms['colorspace'])));
             if ($thumb_image != false) {
                 $guestbook['entry_image'] = '<img src="' . PHPWCMS_IMAGES . $thumb_image[0] . '" ' . $thumb_image[3];
                 $guestbook['entry_image'] .= ' alt="' . html_specialchars($guestbook['row']['guestbook_imagename']) . '" />';
                 //zoom
                 if ($guestbook['imgdata'][2]) {
                     $zoominfo = get_cached_image(array("target_ext" => which_ext($guestbook['row']['guestbook_image']), "image_name" => $guestbook['row']['guestbook_image'], "image_dir" => $guestbook['image_dir'] . '/', "max_width" => $phpwcms["img_prev_width"], "max_height" => $phpwcms["img_prev_height"], "thumb_name" => md5($guestbook['row']['guestbook_image'] . $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]);
                         $guestbook['entry_image'] = '<a href="' . $popup_img . '" onclick="window.open(\'' . $popup_img . "','previewpic','width=" . $zoominfo[1] . ",height=" . $zoominfo[2] . "');return false;" . '">' . $guestbook['entry_image'] . '</a>';
                     }
                 }
             }
         }
     }
     $guestbook['c'] = render_cnt_template($guestbook['c'], 'IMAGE', $guestbook['entry_image']);
     $guestbook['entry_list'] .= $guestbook['c'];
     $guestbook['counter']++;
 }
示例#23
0
                    $content['alink']['tr'][$key] = render_cnt_template($content['alink']['tr'][$key], 'CATEGORY', html_specialchars($content['struct'][$row['article_cid']]['acat_name']));
                    // Image Caption, Alt, Title
                    $content['alink']['tr'][$key] = render_cnt_template($content['alink']['tr'][$key], 'CAPTION', $row['article_image']['list_caption']);
                    $content['alink']['tr'][$key] = render_cnt_template($content['alink']['tr'][$key], 'CAPTION_ALT', $content['alink']['caption'][1]);
                    $content['alink']['tr'][$key] = render_cnt_template($content['alink']['tr'][$key], 'CAPTION_TITLE', $content['alink']['caption'][3]);
                    // article class based on keyword *CSS-classname*
                    $row['article_class'] = get_css_keywords($row['article_keyword']);
                    $row['article_class'] = count($row['article_class']) ? implode(' ', $row['article_class']) : '';
                    $content['alink']['tr'][$key] = render_cnt_template($content['alink']['tr'][$key], 'CLASS', $row['article_class']);
                    break;
                }
            }
        }
    }
    // combine all teaser items
    if (count($content['alink']['tr'])) {
        $content['alink']['tr'] = implode(LF, $content['alink']['tr']);
        $content['alink']['teaser'] = ' ';
    } else {
        $content['alink']['tr'] = '';
        $content['alink']['teaser'] = '';
    }
    // put all template and content into one
    $content['alink']['alink_template'] = LF . $content['alink']['alink_template_head'] . $content['alink']['tr'] . $content['alink']['alink_template_footer'] . LF;
    // render teaser elements - throw everything between [TEASER]...[/TEASER]
    $content['alink'] = render_cnt_template($content['alink']['alink_template'], 'TEASER', $content['alink']['teaser']);
    // render title
    $content['alink'] = render_cnt_template($content['alink'], 'TITLE', html_specialchars($crow['acontent_title']));
    $content['alink'] = render_cnt_template($content['alink'], 'SUBTITLE', html_specialchars($crow['acontent_subtitle']));
    $CNT_TMP .= $content['alink'];
}
示例#24
0
                //COUNTRY MENU
            //COUNTRY MENU
            case "SC":
                $CNT_TMP .= "<tr><td class=\"formLabel\" align=\"right\">" . must_filled($cfield[2]) . $cfield[3] . "</td><td>";
                $CNT_TMP .= "<select name=\"" . $cfield[1] . "\" id=\"" . $cfield[1] . "\" class=\"selectMenu\"";
                $CNT_TMP .= ($cfield[6] ? " style=\"width:" . $cfield[6] . "px\"" : "") . ">\n";
                $CNT_TMP .= list_country($cfield[5]);
                $CNT_TMP .= "</select></td></tr>\n";
                break;
                // Captcha Image
            // Captcha Image
            case "CA":
                $CNT_TMP .= "<tr><td class=\"formLabel\" align=\"right\">" . must_filled($cfield[2]) . $cfield[3] . "</td><td>";
                $CNT_TMP .= '<table cellpadding="0" cellspacing="0" border="0"><tr><td>';
                $CNT_TMP .= "<input type=\"text\" name=\"" . $cfield[1] . "\" value=\"" . html_specialchars(trim($cfield[5])) . "\" size=\"" . $cfield_length . "\" ";
                $CNT_TMP .= $cfield_max_height ? "maxlength=\"" . $cfield_max_height . "\" " : "";
                $CNT_TMP .= "id=\"" . $cfield[1] . "\" class=\"inputText\"" . ($cfield[6] ? " style=\"width:" . $cfield[6] . "px\"" : "") . " />";
                $CNT_TMP .= "</td><td>&nbsp;&nbsp;</td><td>" . '<img src="img/captcha.php?regen=y&amp;' . time() . '" alt="Captcha" />' . "</tr></table></td></tr>\n";
                break;
        }
    }
    $CNT_TMP .= "<tr><td colspan=\"2\">" . spacer(1, 10) . "</td></tr>\n";
    $CNT_TMP .= "<tr><td>" . spacer(1, 1) . "</td><td>" . $form_hidden_field;
    $CNT_TMP .= "<input type=\"submit\" name=\"submit\" value=\"" . html_specialchars(trim($cform[3])) . "\" class=\"formButton\" />";
    $CNT_TMP .= "<input type=\"hidden\" name=\"subject\" value=\"" . $cform[1] . "\" />";
    $CNT_TMP .= "<input type=\"hidden\" name=\"recipient\" value=\"" . $cform[2] . "\" />";
    $CNT_TMP .= getFormTrackingValue();
    $CNT_TMP .= sizeof($cfield_required) ? "<input type=\"hidden\" name=\"required\" value=\"" . implode(",", $cfield_required) . "\" />" : "";
    $CNT_TMP .= "<input type=\"hidden\" name=\"type\" value=\"" . $cform[4] . "\" /></td></tr>\n";
    $CNT_TMP .= "</table></form>\n";
}
示例#25
0
                        $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]);
            }
            $x++;
        }
    }
}
// set shipping fees
$subtotal['shipping_net'] = 0;
$subtotal['shipping_vat'] = 0;
$subtotal['shipping_gross'] = 0;
示例#26
0
 $mail->Sender = $cnt_form['sender'];
 if (!empty($cnt_form["target"]) && is_array($cnt_form["target"]) && count($cnt_form["target"])) {
     foreach ($cnt_form["target"] as $e_value) {
         $mail->addAddress(trim($e_value));
     }
 } else {
     // use default email address
     $mail->addAddress($phpwcms['SMTP_FROM_EMAIL']);
 }
 if (count($POST_attach)) {
     foreach ($POST_attach as $attach_file) {
         $mail->addAttachment($attach_file);
     }
 }
 if (!$mail->send()) {
     $CNT_TMP .= '<p>' . html_specialchars($mail->ErrorInfo) . '</p>';
 } else {
     // check if user should be registered for newsletter
     if (isset($form_newletter_setting['selection']) && count($form_newletter_setting['selection'])) {
         // first check if neccessary form field is valid email
         if (isset($POST_val[$form_newletter_setting['email_field']]) && is_valid_email($POST_val[$form_newletter_setting['email_field']])) {
             // ok now I know we can store email as newsletter recipient
             $form_newletter_setting['email_field'] = $POST_val[$form_newletter_setting['email_field']];
             // now try to find fields to build recipient's name, if empty name is same as email
             if (!empty($form_newletter_setting['name_field'])) {
                 // split by "+"
                 $form_newletter_setting['name_field_tmp'] = explode('+', $form_newletter_setting['name_field']);
                 $form_newletter_setting['name_field'] = '';
                 foreach ($form_newletter_setting['name_field_tmp'] as $form_value_nl) {
                     // empty - continue
                     if (empty($form_value_nl)) {
示例#27
0
 function createFeed()
 {
     $feed = "<?xml version=\"1.0\" encoding=\"" . $this->encoding . "\"?>\n";
     $feed .= $this->_createGeneratorComment();
     $feed .= $this->_createStylesheetReferences();
     $feed .= "<feed version=\"0.3\" xmlns=\"http://purl.org/atom/ns#\"";
     if ($this->language != "") {
         $feed .= " xml:lang=\"" . $this->language . "\"";
     }
     $feed .= ">\n";
     $feed .= "    <title>" . html($this->title) . "</title>\n";
     $feed .= "    <tagline>" . html($this->description) . "</tagline>\n";
     $feed .= "    <link rel=\"alternate\" type=\"text/html\" href=\"" . html($this->link) . "\"/>\n";
     $feed .= "    <id>" . html($this->link) . "</id>\n";
     $now = new FeedDate();
     $feed .= "    <modified>" . html($now->iso8601()) . "</modified>\n";
     if ($this->editor != "") {
         $feed .= "    <author>\n";
         $feed .= "        <name>" . $this->editor . "</name>\n";
         if ($this->editorEmail != "") {
             $feed .= "        <email>" . $this->editorEmail . "</email>\n";
         }
         $feed .= "    </author>\n";
     }
     $feed .= "    <generator>" . FEEDCREATOR_VERSION . "</generator>\n";
     $feed .= $this->_createAdditionalElements($this->additionalElements, "    ");
     for ($i = 0; $i < count($this->items); $i++) {
         $feed .= "    <entry>\n";
         $feed .= "        <title>" . html(strip_tags($this->items[$i]->title)) . "</title>\n";
         $feed .= "        <link rel=\"alternate\" type=\"text/html\" href=\"" . html($this->items[$i]->link) . "\"/>\n";
         if ($this->items[$i]->date == "") {
             $this->items[$i]->date = time();
         }
         $itemDate = new FeedDate($this->items[$i]->date);
         $feed .= "        <created>" . html($itemDate->iso8601()) . "</created>\n";
         $feed .= "        <issued>" . html($itemDate->iso8601()) . "</issued>\n";
         $feed .= "        <modified>" . html($itemDate->iso8601()) . "</modified>\n";
         $feed .= "        <id>" . html($this->items[$i]->link) . "</id>\n";
         $feed .= $this->_createAdditionalElements($this->items[$i]->additionalElements, "        ");
         if ($this->items[$i]->author != "") {
             $feed .= "        <author>\n";
             $feed .= "            <name>" . html($this->items[$i]->author) . "</name>\n";
             $feed .= "        </author>\n";
         }
         if ($this->items[$i]->description != "") {
             $feed .= "        <summary>" . html_specialchars($this->items[$i]->description) . "</summary>\n";
         }
         $feed .= "    </entry>\n";
     }
     $feed .= "</feed>\n";
     return $feed;
 }
示例#28
0
         $sql_id = "SELECT 'id' AS alias_type, acat_id AS id, 0 AS aid, acat_alias AS alias FROM " . DB_PREPEND . 'phpwcms_articlecat ';
         $sql_id .= 'WHERE acat_id IN (' . implode(',', $all_id) . ") AND acat_alias != ''";
     }
     if (count($all_aid)) {
         $sql_aid = "SELECT 'aid' AS alias_type, article_cid AS id, article_id AS aid, article_alias AS alias FROM " . DB_PREPEND . 'phpwcms_article ';
         $sql_aid .= 'WHERE article_id IN (' . implode(',', $all_aid) . ") AND article_alias != ''";
     }
     if ($sql_id && $sql_aid) {
         $sql = '(' . $sql_id . ') UNION (' . $sql_aid . ')';
     } else {
         $sql = $sql_id . $sql_aid;
     }
     $match = _dbQuery($sql);
     if (isset($match[0])) {
         foreach ($match as $value) {
             $value['alias'] = html_specialchars($value['alias']);
             if ($value['alias_type'] == 'id' && isset($all_close['id' . $value['id']])) {
                 $content['all'] = str_replace('index.php?id=' . $value['id'] . $all_close['id' . $value['id']], 'index.php?' . $value['alias'] . $all_close['id' . $value['id']], $content['all']);
             } elseif (isset($all_close['aid' . $value['aid']])) {
                 $content['all'] = str_replace('index.php?aid=' . $value['aid'] . $all_close['aid' . $value['aid']], 'index.php?' . $value['alias'] . $all_close['aid' . $value['aid']], $content['all']);
             }
             // search also for id=0,0,...
             if ($old_style == true) {
                 $value['id'] = $value['id'] . ',' . $value['aid'] . ',0,1,0,0';
                 if (isset($all_close['id' . $value['id']])) {
                     $content['all'] = str_replace('index.php?id=' . $value['id'] . $all_close['id' . $value['id']], 'index.php?' . $value['alias'] . $all_close['id' . $value['id']], $content['all']);
                 }
             }
         }
     }
 }
		<td><table summary="" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td><input type="checkbox" name="pref_api_access" id="pref_api_access" value="1"<?php 
is_checked('1', $plugin['data']['shop_pref_api_access']);
?>
 onchange="enableSubmit();" /></td>
				<td class="f10"><label for="pref_api_access"><?php 
echo $BLM['shopprod_api_access'];
?>
</label>&nbsp;&nbsp;&nbsp;</td>
				<td class="chatlist"><?php 
echo trim($BLM['shopprod_api_key']);
?>
:&nbsp;</td>
				<td><input name="pref_api_key" type="text" id="pref_api_key" class="v12 width175" value="<?php 
echo html_specialchars($plugin['data']['shop_pref_api_key']);
?>
" size="20" maxlength="50" onchange="enableSubmit();" /></td>
			</tr>
		</table></td>

	</tr>

	<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="18" /></td></tr>

	<tr>
		<td>&nbsp;</td>
		<td>
			<input name="save" type="submit" class="button10" id="save_button" value="<?php 
echo $BL['be_article_cnt_button3'];
?>
示例#30
0
        $_filter_link[$_filter_c] .= ' title="' . $_filter_entities . '">';
        $_filter_link[$_filter_c] .= $_filter_entities . '</a>';
        $_filter_c++;
    }
    $_filter_link = implode(' ', $_filter_link);
    $CNT_TMP .= render_cnt_template($content['glossary']['list_head'], 'FILTER', $_filter_link);
    if (!count($content['glossary']['entries'])) {
        $content['glossary']['entries'][0]['glossary_title'] = '';
        $content['glossary']['entries'][0]['glossary_text'] = $content['glossary']['glossary_noentry'];
        $content['glossary']['entries'][0]['glossary_id'] = 0;
        $_no_entry = true;
    } else {
        $_no_entry = false;
    }
    foreach ($content['glossary']['entries'] as $_entry_key => $_entry_value) {
        $content['glossary']['entries'][$_entry_key] = str_replace('{GLOSSARY_ID}', $_entry_value['glossary_id'], $content['glossary']['list_entry']);
        $content['glossary']['entries'][$_entry_key] = str_replace('{LINK}', $_no_entry ? '#' : rel_url(array('glossaryid' => $_entry_value['glossary_id'], 'glossarytitle' => $_entry_value['glossary_title'])), $content['glossary']['entries'][$_entry_key]);
        $content['glossary']['entries'][$_entry_key] = render_cnt_template($content['glossary']['entries'][$_entry_key], 'TITLE', html_specialchars($_entry_value['glossary_title']));
        if (!empty($content['glossary']['glossary_maxwords']) && !$_no_entry) {
            $_entry_value['glossary_text'] = getCleanSubString(strip_tags($_entry_value['glossary_text']), $content['glossary']['glossary_maxwords'], $template_default['ellipse_sign'], 'word');
        }
        $content['glossary']['entries'][$_entry_key] = render_cnt_template($content['glossary']['entries'][$_entry_key], 'TEXT', $_entry_value['glossary_text']);
    }
    $CNT_TMP .= implode($content['glossary']['list_spacer'], $content['glossary']['entries']);
    $CNT_TMP .= render_cnt_template($content['glossary']['list_footer'], 'FILTER', $_filter_link);
    unset($GLOBALS['_getVar']['glossary']);
}
// render content part title/subtitle
$CNT_TMP = render_cnt_template($CNT_TMP, 'CP_TITLE', html_specialchars($crow['acontent_title']));
$CNT_TMP = render_cnt_template($CNT_TMP, 'CP_SUBTITLE', html_specialchars($crow['acontent_subtitle']));