/** * Return an RDF object based an a $row */ public function rdf($row, $prefix = '') { $row->type = isset($row->type) ? $row->type : 'version'; if (isset($row->url)) { if (!is_array($row->url)) { $row->url = array($row->url); } foreach ($row->url as $key => $value) { if (!isURL($value)) { $row->url[$key] = abs_url($value, $prefix); } } } $rdf = parent::rdf($row, $prefix); // Blend with RDF from the semantic store if (!empty($row->rdf)) { foreach ($row->rdf as $p => $values) { if (array_key_exists($p, $rdf)) { // TODO: Not sure we should allow a collision between the semantic and relational tables? For now, don't. } else { $rdf[$p] = $values; } } } return $rdf; }
} require_once $basepath . '/include/config/conf.inc.php'; require_once $basepath . '/include/inc_lib/default.inc.php'; require_once PHPWCMS_ROOT . '/include/inc_lib/dbcon.inc.php'; // Get user Agent BOT check $IS_A_BOT = $phpwcms['USER_AGENT']['bot']; // start session - neccessary if frontend users are available // but neccessary also to check if a bot is visiting the site // -> if so then do not initialize session for larger search engines if (!$IS_A_BOT && (!empty($phpwcms['SESSION_FEinit']) || isset($_GET['phpwcms-preview']))) { _initSession(); } // some initial actions cleanupPOSTandGET(); buildGlobalGET(); define('FE_CURRENT_URL', abs_url(array(), array('phpwcms_output_action'))); // init some special rights and also frontend edit init_frontend_edit(); // buffer everything ob_start(); $content['page_end'] = ''; require_once PHPWCMS_ROOT . '/include/config/conf.template_default.inc.php'; require_once PHPWCMS_ROOT . '/include/config/conf.indexpage.inc.php'; require_once PHPWCMS_ROOT . '/include/inc_lib/general.inc.php'; require_once PHPWCMS_ROOT . '/include/inc_front/cnt.lang.inc.php'; require_once PHPWCMS_ROOT . '/include/inc_lib/modules.check.inc.php'; require_once PHPWCMS_ROOT . '/include/inc_lib/article.contenttype.inc.php'; require PHPWCMS_ROOT . '/include/inc_lib/imagick.convert.inc.php'; require PHPWCMS_ROOT . '/include/inc_front/front.func.inc.php'; require PHPWCMS_ROOT . '/include/inc_front/ext.func.inc.php'; require PHPWCMS_ROOT . '/include/inc_front/content.func.inc.php';
$row['meta_description'] = trim(strip_tags(strip_bbcode($row['meta_description']))); $row['meta_description'] = getCleanSubString($row['meta_description'], 75, '', 'word'); $row['meta_description_rendered'] = true; } else { $row['meta_description_rendered'] = false; } if (!empty($row['shopprod_overwrite_meta'])) { $content["pagetitle"] = setPageTitle($content["pagetitle"], $article['cat'], $shop_pagetitle); if ($row['meta_description_rendered']) { set_meta('description', $row['meta_description']); } } if ($row['shopprod_opengraph']) { $content['opengraph']['type'] = 'og:product'; $content['opengraph']['title'] = $shop_pagetitle; $content['opengraph']['url'] = abs_url(array('shop_detail' => $shop_detail_id), array('shop_cat', 'shop_cart', 'phpwcms_output_action', 'print', 'phpwcms-preview', 'unsubscribe', 'subscribe')); if ($row['meta_description_rendered']) { $content['opengraph']['description'] = $row['meta_description']; } } else { $content['opengraph']['support'] = false; } // Update product view count // ToDo: Maybe use cookie or session to avoid tracking in case showed once $sql = 'UPDATE LOW_PRIORITY ' . DB_PREPEND . 'phpwcms_shop_products SET shopprod_track_view=shopprod_track_view+1 WHERE shopprod_id=' . $shop_detail_id; _dbQuery($sql, 'UPDATE'); } else { $_tmpl['config']['mode'] = 'list'; $_tmpl['config']['lightbox_id'] = ''; if (count($row['shopprod_var']['images'])) { $_prod_list_img = shop_image_tag($row['shopprod_var']['images'][0], 0, $row['shopprod_name1']);
function get_link_anchor($matches) { $anchor = trim($matches[1]); $anchor = explode('#', $anchor); if (!empty($anchor[1])) { if ($anchor[0] === '') { return '<a id="' . $anchor[1] . '"' . (empty($GLOBALS['template_default']['classes']['link-anchor']) ? '' : ' class="' . $GLOBALS['template_default']['classes']['link-anchor'] . '"') . '></a>'; } $anchor[0] = strtoupper($anchor[0]); if ($anchor[0] === 'REL') { return rel_url() . '#' . $anchor[1]; } elseif ($anchor[0] === 'ABS') { return abs_url() . '#' . $anchor[1]; } } return $matches[0]; }
if ($mode || !isset($page->versions[0]->annotation_of) || empty($page->versions[0]->annotation_of)) { return; } $annotation_of = $page->versions[0]->annotation_of; $type = 'composite' == $page->type ? 'page' : 'media'; ?> <!-- Annotation of list --> <div id="annotation_of_list"> <span class="inline_icon_link annotation">This <?php echo $type; ?> annotates:</span> <?php foreach ($annotation_of as $row) { $file_page_url = $base_uri . $row->slug; $file_url = abs_url($row->versions[0]->url, $base_uri); $title = $row->versions[0]->title; if (empty($title)) { $title = '(No title)'; } $anno_str = ''; // Temporal if (!empty($row->versions[0]->start_seconds) || !empty($row->versions[0]->end_seconds)) { $anno_str = round($row->versions[0]->start_seconds); if (isset($row->versions[0]->end_seconds)) { $anno_str .= ' - ' . round($row->versions[0]->end_seconds); } $anno_str .= ' seconds'; // Textual } elseif (!empty($row->versions[0]->start_line_num) || !empty($row->versions[0]->end_line_num)) { $anno_str = 'line ' . $row->versions[0]->start_line_num;
$g['wrap'][] = '</div>'; } $content['cptab'][$CNT_TAB] = implode(LF, $g['wrap']); } unset($g); } } } if (empty($template_default["article"]["div_spacer"])) { $content["main"] = str_replace("</table>\n<br />", "</table>\n", $content["main"]); $content["main"] = str_replace("</table><br />", "</table>", $content["main"]); $content["main"] = str_replace("</div><br />", "</div>", $content["main"]); } if (!defined('PHPWCMS_ALIAS') && $content['article_alias']) { define('PHPWCMS_ALIAS', $content['article_alias']); } // set canonical <link> in page <head> section to avoid lower SEO ranking // see: http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html if ($content['overwrite_canonical']) { $content['set_canonical'] = false; } elseif (empty($phpwcms['canonical_off'])) { $_tempAlias = PHPWCMS_ALIAS ? PHPWCMS_ALIAS : 'aid=' . $content['article_id']; if ($content['set_canonical'] && empty($phpwcms['force301_2struct'])) { // check against page or set canonical only for single article in this category $content['set_canonical'] = $content['aId_CpPage'] ? 'aid=' . $content['article_id'] . '-' . $content['aId_CpPage'] : get_structurelevel_single_article_alias($content['cat_id']); $content['set_canonical'] = abs_url(array(), true, $content['set_canonical'] ? $content['set_canonical'] : $_tempAlias, 'rawurlencode'); } else { $content['set_canonical'] = abs_url(array(), true, $_tempAlias, 'rawurlencode'); } $block['custom_htmlhead']['canonical'] = ' <link rel="canonical" href="' . $content['set_canonical'] . '"' . HTML_TAG_CLOSE; }
$content["search_word"][$key] = preg_quote($value); $content["search_word"][$key] = str_replace("\\?", '.?', $content["search_word"][$key]); $content["search_word"][$key] = str_replace("\\*", '.*', $content["search_word"][$key]); $content['highlight'][] = $value; } } if (count($content['highlight'])) { if (strpos($crow['template']['item'], '{IMAGE') !== false) { $crow['template']['image_render'] = true; } $s_result_highlight = implode(' ', $content['highlight']); if (!empty($_POST["search_input_field"])) { // make a redirection to avoid message when using browser back $GLOBALS['_getVar']['searchstart'] = 1; $GLOBALS['_getVar']['searchwords'] = $s_result_highlight; headerRedirect(abs_url(array(), array(), '', 'rawurlencode')); } $s_result_highlight = rawurlencode($s_result_highlight); $sql = "SELECT article_id, article_cid, article_title, article_username, article_subtitle, "; $sql .= "article_summary, article_keyword, UNIX_TIMESTAMP(article_tstamp) AS article_date, "; $sql .= "article_image, article_alias, article_aliasid, article_headerdata "; $sql .= "FROM " . DB_PREPEND . "phpwcms_article ar "; $sql .= "LEFT JOIN " . DB_PREPEND . "phpwcms_articlecat ac ON "; $sql .= "(ar.article_cid = ac.acat_id OR ar.article_cid = 0)"; $sql .= " WHERE "; // limit to special structure IDs if not all if (count($content["search"]["start_at"])) { $sql .= 'ar.article_cid IN (' . implode(',', $content["search"]["start_at"]) . ')'; } else { $sql .= "IF(ar.article_cid = 0, " . (empty($GLOBALS['indexpage']['acat_nosearch']) ? 1 : 0) . ", 1)"; }
$cnt_form["onsuccess"] = str_replace('{' . $POST_key . '}', rawurlencode($POST_keyval), $cnt_form["onsuccess"]); } else { $cnt_form["onsuccess"] = str_replace('{' . $POST_key . '}', !$cnt_form['is_html_entity'] && $cnt_form["onsuccess_redirect"] === 2 ? html_specialchars($POST_keyval) : $POST_keyval, $cnt_form["onsuccess"]); } } $phpwcms['callback'] = now(); $cnt_form["onsuccess"] = str_replace('{REMOTE_IP}', getRemoteIP(), $cnt_form["onsuccess"]); if (strpos($cnt_form["onsuccess"], 'EMAIL_COPY') !== false) { if ($cnt_form["onsuccess_redirect"] === 1) { $cnt_form["onsuccess"] = render_cnt_template($cnt_form["onsuccess"], 'EMAIL_COPY', empty($cnt_form['sendcopy']) || $cnt_form['option_email_copy'] === false ? '' : rawurlencode($cnt_form["copyto"])); } else { $cnt_form["onsuccess"] = render_cnt_template($cnt_form["onsuccess"], 'EMAIL_COPY', empty($cnt_form['sendcopy']) || $cnt_form['option_email_copy'] === false ? '' : html_specialchars($cnt_form["copyto"])); } } $cnt_form['onsuccess'] = preg_replace('/\\{(.*?)\\}/', '', $cnt_form['onsuccess']); $cnt_form['fe_current_url'] = abs_url(array(), array(), '', 'rawurlencode'); $cnt_form['template'] = str_replace('{FORM_URL}', $cnt_form['fe_current_url'], $cnt_form['template']); $cnt_form['template'] = str_replace('{REMOTE_IP}', getRemoteIP(), $cnt_form['template']); $cnt_form['template'] = preg_replace_callback('/\\{DATE:(.*?)\\}/', 'date_callback', $cnt_form['template']); if (!$cnt_form['template_equal']) { $cnt_form['template_copy'] = str_replace('{FORM_URL}', $cnt_form['fe_current_url'], $cnt_form['template_copy']); $cnt_form['template_copy'] = str_replace('{REMOTE_IP}', getRemoteIP(), $cnt_form['template_copy']); $cnt_form['template_copy'] = preg_replace_callback('/\\{DATE:(.*?)\\}/', 'date_callback', $cnt_form['template_copy']); $cnt_form['template_copy'] = preg_replace('/\\{(.*?)\\}/', '', $cnt_form['template_copy']); } $cnt_form['template'] = preg_replace('/\\{(.*?)\\}/', '', $cnt_form['template']); // check if "copy to" email template is equal recipient // email template and set it the same if ($cnt_form['template_equal'] == 1) { $cnt_form['template_format_copy'] = $cnt_form['template_format']; $cnt_form['template_copy'] = $cnt_form['template'];
/** * search string for calendar tag and parse */ function parse(&$string) { if (isset($_GET['pcal_reset']) || isset($_POST['pcal_reset'])) { unset($_SESSION['pcal']); headerRedirect(abs_url(array(), array('pcal_reset', 'pcal_start', 'pcal_end', 'pcal_place', 'pcal_limit'), '', 'rawurlencode')); } if (preg_match_all('/\\{CALENDAR:(.*?)\\}/s', $string, $matches)) { if (isset($matches[1])) { foreach ($matches[1] as $key => $value) { $this->parse_match($value); $result = $this->render(); // replace calendar by result $string = str_replace($matches[0][$key], $result, $string); } $string = html_parser($string); } } }
$_TrackingCode .= '<!-- End of StatCounter Code -->'; $content['all'] .= $_TrackingCode; } ////////////////////////////////////////////////////////////////////////////////////////////////// /// eTracker ///////////////////////////////////////////////////////////////////////////////////// if ($_Tracking_eTracker) { $_TrackingCode = '<!-- Copyright (c) 2000-2009 etracker GmbH. All rights reserved. --> <!-- This material may not be reproduced, displayed, modified or distributed --> <!-- without the express prior written permission of the copyright holder. --> <!-- BEGIN etracker Tracklet 3.0 --> <script type="text/javascript">document.write(String.fromCharCode(60)+"script type=\\"text/javascript\\" src=\\"http"+("https:"==document.location.protocol?"s":"")+"://code.etracker.com/t.js?et=' . $_Tracking_eTrackerCode . '\\">"+String.fromCharCode(60)+"/script>");</script> <!-- etracker PARAMETER 3.0 --> <script type="text/javascript"> var et_pagename = "' . rawurlencode($content["pagetitle"]) . '"; var et_areas = "' . str_replace('"', '\\"', implode('', $_TrackingCategory)) . '"; var et_url = "' . abs_url(array(), array('phpwcmscategory'), $_TrackingAlias, 'rawurlencode') . '"; </script> <!-- etracker PARAMETER END --> <script type="text/javascript">_etc();</script> <noscript><div style="overflow:hidden;width:0;height:0;"><img src="https://www.etracker.com/nscnt.php?et=' . $_Tracking_eTrackerCode . '" border="0" alt="" /></div></noscript> <!-- etracker CODE END -->'; $content['all'] .= $_TrackingCode; } ////////////////////////////////////////////////////////////////////////////////////////////////// /// Yahoo Aanalytics ///////////////////////////////////////////////////////////////////////////// if ($_Tracking_YahooAnalytics) { $_TrackingCode = '<!-- Yahoo! Web Analytics - All rights reserved --> <script type="text/javascript" src="http://d.yimg.com/mi/eu/ywa.js"></script> <script type="text/javascript"> // globals YWA var YWATracker = YWA.getTracker("' . $_Tracking_YahooAnalyticsCode . '");
<select id="choose_banner" name="scalar:banner" class="form-control"><option value="">Choose an image</option><?php $matched = false; foreach ($book_images as $book_image_row) { if (@$page->banner == $book_image_row->versions[$book_image_row->version_index]->url) { $matched = true; } $slug_version = get_slug_version($book_image_row->slug); echo '<option value="' . $book_image_row->versions[$book_image_row->version_index]->url . '" ' . (@$page->banner == $book_image_row->versions[$book_image_row->version_index]->url ? 'selected' : '') . '>' . $book_image_row->versions[$book_image_row->version_index]->title . (!empty($slug_version) ? ' (' . $slug_version . ')' : '') . '</option>'; } if (@(!empty($page->banner)) && !$matched) { echo '<option value="' . @$page->banner . '" selected>' . @$page->banner . '</option>'; } ?> </select></div> <?php echo @(!empty($page->banner)) ? '<div class="well"><img src="' . abs_url($page->banner, confirm_slash(base_url()) . confirm_slash($book->slug)) . '" class="thumb_preview" /></div>' : ''; ?> </div> </div> </div> <div id="custom-css-pane" role="tabpanel" class="tab-pane"> <div class="row p"> <div class="col-md-12"> <p>Enter custom CSS to be applied to this page and its path or tag children:</p> <small>e.g., .navbar {background-color:red;}, no <style> tags required</small> <textarea class="form-control monospace_font" rows="10" name="scalar:custom_style"><?php echo !empty($page->custom_style) ? $page->custom_style : ''; ?> </textarea> </div>
// Template/stylesheet echo '<tr>'; echo '<td><p>Interface</p></td>' . "\n"; echo '<td>'; echo '<p id="interface">'; echo '</p>'; echo "</td>\n"; echo '<td>'; echo "</td>\n"; echo "</tr>\n"; // Background echo '<tr typeof="books">'; echo '<td><p>Background image</p></td>' . "\n"; echo '<td style="vertical-align:middle;">'; if (!empty($row->background)) { echo '<img src="' . abs_url($row->background, confirm_slash(base_url()) . $row->slug) . '?t=' . time() . '" style="vertical-align:middle;margin-right:10px;height:75px;border:solid 1px #aaaaaa;" /> ' . "\n"; } echo '<p>Select image: <select name="background" style="max-width:400px;"><option value="">Choose an imported image</option>'; $matched = false; foreach ($current_book_images as $book_image_row) { if (@$row->background == $book_image_row->versions[$book_image_row->version_index]->url) { $matched = true; } $slug_version = get_slug_version($book_image_row->slug); echo '<option value="' . $book_image_row->versions[$book_image_row->version_index]->url . '" ' . (@$row->background == $book_image_row->versions[$book_image_row->version_index]->url ? 'selected' : '') . '>' . $book_image_row->versions[$book_image_row->version_index]->title . (!empty($slug_version) ? ' (' . $slug_version . ')' : '') . '</option>'; } if (@(!empty($row->background)) && !$matched) { echo '<option value="' . @$row->background . '" selected>' . @$row->background . '</option>'; } echo '</select></p>'; if (!empty($row->background)) {
<?php $url = abs_url($page->version->url, confirm_slash(base_url()) . $book->slug); $title = @$page->version->title; if (!empty($title)) { ?> <h4 class="content_title"> <?php if (!empty($title)) { if (!empty($view_icon)) { echo '<img src="' . $view_icon . '" class="title_icon" />' . "\n"; } echo $title . "<br />\n"; echo '<span class="contains">Manage Annotations</span>'; } ?> </h4> <?php } ?> <div class="horiz_slots"></div> <div id="content"><a class="hide_icon" typeof="scalar:File" href="<?php echo $url; ?> " class="file" rel="meta" resource="<?php echo $uri; ?> "></a></div>
echo $_scripts; } if (!$mode && !empty($style)) { echo '<style>' . "\n"; echo $style . "\n"; echo '</style>' . "\n"; } if (!$mode && !empty($js)) { echo '<script>' . "\n"; echo $js . "\n"; echo '</script>' . "\n"; } ?> </head> <body<?php echo !empty($background) ? ' style="background-image:url(' . str_replace(' ', '%20', abs_url($background, $base_uri)) . ');"' : ''; ?> > <div class="left"> <?php $this->load->view('melons/honeydew/nav'); ?> </div> <div class="middle cover"> <?php $this->load->view('modules/cover/login'); $this->load->view('modules/cover/title'); ?> </div>
} echo $version->fullname; if (isset($version->homepage)) { echo '</a>'; } } ?> on <?php echo $date; ?> <?php echo !empty($version->content) ? '<br />' . create_excerpt($content, 14) . ' <span style="color:#777777;">' . strlen($content) . ' chars</span>' : ''; ?> <?php echo !empty($version->url) ? '<br />URL: <a href="' . abs_url($version->url, $base_uri) . '">' . $version->url . '</a>' : ''; ?> </li> <?php } echo '</ol>' . "\n"; } if ($login_is_super || in_array($book->book_id, $login_book_ids)) { ?> <input type="submit" value="Delete selected versions" class="generic_button" /> <a href="javascript:" onclick="reorderVersionNums()">Re-order version numbers</a> <?php } ?> </form>
function setAlias($alias = '') { if ($alias !== '') { $this->alias = $alias; } $this->url = abs_url(array(), array('gallery'), $this->alias); }
* @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."); } // ---------------------------------------------------------------- $_user_CSS = 'default'; if (!empty($_GET['switchCSS'])) { $_user_CSS = clean_slweg($_GET['switchCSS']); // try to write FontSizeCookie setcookie('switchCSS', $_user_CSS, time() + 86400); } elseif (isset($_SESSION['switchCSS'])) { $_user_CSS = $_SESSION['switchCSS']; } elseif (!empty($_COOKIE['switchCSS'])) { $_user_CSS = $_COOKIE['switchCSS']; } if (session_id()) { $_SESSION['switchCSS'] = $_user_CSS; } unset($GLOBALS['_getVar']['switchCSS']); if ($_user_CSS != 'default') { $block['css'][] = 'alternate/' . $_user_CSS . '.css'; $content['all'] = str_replace('[ALTCSS_URL]', abs_url(array('switchCSS' => 'default')), $content['all']); } else { $content['all'] = str_replace('[ALTCSS_URL]', abs_url(array('switchCSS' => 'alt')), $content['all']); }
} // is there PREV if (in_array($content['CpPages'][$content['aId_CpPage']] - 1, $content['CpPages'])) { $key = array_search($content['CpPages'][$content['aId_CpPage']] - 1, $content['CpPages']); $value = abs_url(array(), array(), $key ? 'aid=' . $aktion[1] . '-' . $key : ''); $content['all'] = render_cnt_template($content['all'], 'CP_PAGINATE_PREV', $value); if (empty($phpwcms['disable_next_prev'])) { $block['custom_htmlhead']['link_prev'] = ' <link rel="prev" href="' . $value . '"' . HTML_TAG_CLOSE; } } else { $content['all'] = render_cnt_template($content['all'], 'CP_PAGINATE_PREV'); } // is there NEXT if (in_array($content['CpPages'][$content['aId_CpPage']] + 1, $content['CpPages'])) { $key = array_search($content['CpPages'][$content['aId_CpPage']] + 1, $content['CpPages']); $value = abs_url(array(), array(), $key ? 'aid=' . $aktion[1] . '-' . $key : ''); $content['all'] = render_cnt_template($content['all'], 'CP_PAGINATE_NEXT', $value); if (empty($phpwcms['disable_next_prev'])) { $block['custom_htmlhead']['link_next'] = ' <link rel="next" href="' . $value . '"' . HTML_TAG_CLOSE; } } else { $content['all'] = render_cnt_template($content['all'], 'CP_PAGINATE_NEXT'); } // search for content part pagination title menu if (strpos($content['all'], '[CP_PAGINATE_MENU')) { /** * search for custom cp menu parameters * * [0] => item_prefix * [1] => item_suffix * [2] => active_class
die("You Cannot Access This Script Directly, Have a Nice Day."); } // ---------------------------------------------------------------- unset($_GET); unset($_POST); //$_print_settings['PDF_font_size'] = empty($_print_settings['PDF_font_size']) ? 5 : intval($_print_settings['PDF_font_size']); $_print_settings['PDF_file_prefix'] = empty($_print_settings['PDF_file_prefix']) ? '' : trim($_print_settings['PDF_file_prefix']); //$_print_settings['PDF_disable_tags'] = empty($_print_settings['PDF_disable_tags']) ? 'div,input,form,object,embed,script' : trim($_print_settings['PDF_disable_tags']); $_print_settings['PDF_filename'] = $_print_settings['PDF_file_prefix'] . substr($content["pagetitle"], 0, 150); $_print_settings['PDF_filename'] = str_replace(array('?', '%', '*', '"', "'", '<', '>', '|', '/', '\\', ':', '&'), '-', $_print_settings['PDF_filename']); $_print_settings['PDF_filename'] = str_replace('--', '-', $_print_settings['PDF_filename']) . '.pdf'; unset($content); $_PDF_page = ob_get_clean(); $include_urlparts = parse_url(PHPWCMS_URL); $_PDF_page = preg_replace_callback('/(href|src|action)=[\'|"]{0,1}(.*?)[\'|"]{0,1}( .*?){0,1}>/i', 'make_absoluteURL', $_PDF_page); $include_urlparts['falsepart'] = $include_urlparts['host'] . '/' . trim($phpwcms["root"] . $phpwcms["root"], ' /') . '/'; $include_urlparts['corrected'] = $include_urlparts['host'] . '/' . trim($phpwcms["root"], ' /') . '/'; $_PDF_page = str_replace($include_urlparts['falsepart'], $include_urlparts['corrected'], $_PDF_page); $_PDF_temp = md5($_print_settings['PDF_filename'] . microtime()) . '.html'; // Output -> use file save and redirect if (write_textfile(PHPWCMS_CONTENT . 'tmp/' . $_PDF_temp, $_PDF_page)) { $cmd = $phpwcms['wkhtmltopdf_path'] . ' ' . escapeshellarg(PHPWCMS_URL . CONTENT_PATH . 'tmp/' . $_PDF_temp) . ' ' . escapeshellarg(PHPWCMS_CONTENT . 'tmp/' . $_print_settings['PDF_filename']); @exec($cmd, $output, $retval); if (is_file(PHPWCMS_CONTENT . 'tmp/' . $_print_settings['PDF_filename'])) { // Set the file to 777 @chmod(PHPWCMS_CONTENT . 'tmp/' . $_print_settings['PDF_filename'], 0666); headerRedirect(PHPWCMS_URL . CONTENT_PATH . 'tmp/' . $_print_settings['PDF_filename']); } } headerRedirect(abs_url()); exit;
* @copyright Copyright (c) 2002-2015, Oliver Georgi * @license http://opensource.org/licenses/GPL-2.0 GNU GPL-2 * @link http://www.phpwcms.de * **/ // An example how to set the Open Graph meta tags // For more visit: // - http://ogp.me/ // - https://developers.facebook.com/docs/opengraph/using-objects#selfhosted // - https://developers.facebook.com/docs/opengraph/howtos/maximizing-distribution-media-content#tags if ($content['opengraph']['support']) { set_meta('og:type', $content['opengraph']['type'], 'property'); // maybe clean your title by sanitize_replacement_tags() set_meta('og:title', $content['opengraph']['title'], 'property'); if (empty($content['opengraph']['url'])) { set_meta('og:url', abs_url(array(), array('phpwcms_output_action', 'print', 'phpwcms-preview', 'unsubscribe', 'subscribe')), 'property'); } else { set_meta('og:url', $content['opengraph']['url'], 'property'); } if (!empty($content['opengraph']['description'])) { // maybe clean description by sanitize_replacement_tags() set_meta('og:description', $content['opengraph']['description'], 'property'); } // Open Graph images $content['opengraph']['has_image'] = false; if (isset($content['images']['shop']) && count($content['images']['shop'])) { foreach ($content['images']['shop'] as $og_img) { $content['opengraph']['has_image'] = true; set_meta('og:image', PHPWCMS_URL . 'img/cmsimage.php/500x500x0/' . $og_img['hash'] . '.' . $og_img['ext'], 'property', false, true); } }
$newFontSizeBigger = 'smaller'; $newFontSizeSmaller = 'small'; break; case 'smaller': $newFontSizeCSS = 'userFontSize_smaller.css'; $newFontSizeBigger = 'default'; $newFontSizeSmaller = 'small'; break; case 'big': $newFontSizeCSS = 'userFontSize_big.css'; $newFontSizeBigger = 'big'; $newFontSizeSmaller = 'bigger'; break; case 'bigger': $newFontSizeCSS = 'userFontSize_bigger.css'; $newFontSizeBigger = 'big'; $newFontSizeSmaller = 'default'; break; default: $newFontSizeCSS = 'userFontSize_default.css'; $newFontSizeBigger = 'bigger'; $newFontSizeSmaller = 'smaller'; } if ($userFontSize != 'default') { $block['css'][] = 'fontSize/' . $newFontSizeCSS; } unset($GLOBALS['_getVar']['switchFontSize']); $content['all'] = str_replace('[FontSize+]', abs_url(array('switchFontSize' => $newFontSizeBigger)), $content['all']); $content['all'] = str_replace('[FontSize=]', abs_url(array('switchFontSize' => 'default')), $content['all']); $content['all'] = str_replace('[FontSize-]', abs_url(array('switchFontSize' => $newFontSizeSmaller)), $content['all']);
</tr> <tr class="styling_sub"><!-- color --> <td>Color<br /><small>e.g., for path nav bar</small></td> <td><input style="width:100%;" type="text" id="color_select" name="scalar:color" value="<?php echo !empty($page->color) ? $page->color : '#ffffff'; ?> " /></td> <td class="styling_last"> <a href="javascript:;" class="generic_button" onclick="$(this).next().toggle();">Choose</a> <div style="display:none;margin-top:6px;"><div id="colorpicker"></div></div> </td> </tr> <tr class="styling_sub"><!-- background image --> <td>Background image</td> <td><?php echo @(!empty($page->background)) ? '<img src="' . abs_url($page->background, confirm_slash(base_url()) . confirm_slash($book->slug)) . '" class="thumb_preview" />' : 'No background image has been set'; ?> </td> <td class="styling_last"><select name="scalar:background"><option value="">Choose an uploaded image</option><?php $matched = false; foreach ($book_images as $book_image_row) { if (@$page->background == $book_image_row->versions[$book_image_row->version_index]->url) { $matched = true; } $slug_version = get_slug_version($book_image_row->slug); echo '<option value="' . $book_image_row->versions[$book_image_row->version_index]->url . '" ' . (@$page->background == $book_image_row->versions[$book_image_row->version_index]->url ? 'selected' : '') . '>' . $book_image_row->versions[$book_image_row->version_index]->title . (!empty($slug_version) ? ' (' . $slug_version . ')' : '') . '</option>'; } if (!$matched) { echo '<option value="' . @$page->background . '" selected>' . @$page->background . '</option>'; } ?>
print_rdf($this->users->rdf($contrib, $base_uri), 3, $ns); echo ' </span>' . "\n"; } if ($publisher || $publisher_thumbnail) { ?> <span aria-hidden="true" resource="<?php echo $base_uri; ?> publisher" typeof="scalar:Page"> <span class="metadata" property="dcterms:title"><?php echo $publisher; ?> </span> <?php if ($publisher_thumbnail) { echo ' <a class="metadata" rel="art:thumbnail" href="' . abs_url($publisher_thumbnail, $base_uri) . '"></a>' . "\n"; } ?> </span> <?php } if (isset($page) && !empty($page)) { ?> <!-- Page --> <h1 property="dcterms:title"><?php echo $title; ?> </h1> <span resource="<?php echo $base_uri . $page->slug; ?>