// as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Francisco Burzi // Purpose of file: // ---------------------------------------------------------------------- $blocks_modules['login'] = array('func_display' => 'blocks_login_block', 'text_type' => 'Login', 'text_type_long' => "User's Login", 'allow_multiple' => false, 'form_content' => false, 'form_refresh' => false, 'show_preview' => false); // Security pnSecAddSchema('Loginblock::', 'Block title::'); function blocks_login_block($row) { global $HTTP_SERVER_VARS; if (empty($row['title'])) { $row['title'] = 'Login'; } if (!pnSecAuthAction(0, 'Loginblock::', "{$row['title']}::", ACCESS_READ)) { return; } // code taken pnGetBaseURI to fix issue with IIS not passing request_uri // markwest // Start of with REQUEST_URI if (isset($HTTP_SERVER_VARS['REQUEST_URI'])) { $path = $HTTP_SERVER_VARS['REQUEST_URI']; } else {
/** * initialise block */ function admin_messages_messagesblock_init() { // Security pnSecAddSchema('Admin Messages:Messagesblock:', 'Block title::Message ID'); }
function getmodulesinstanceschemainfo() { $moddir = opendir('modules/'); while ($modname = readdir($moddir)) { // Old-style version file $osfile = 'modules/' . pnVarPrepForOS($modname) . '/Version.php'; @(include $osfile); // New-style version file $osfile = 'modules/' . pnVarPrepForOS($modname) . '/pnversion.php'; @(include $osfile); if (!empty($modversion['securityschema'])) { foreach ($modversion['securityschema'] as $component => $instance) { pnSecAddSchema($component, $instance); } } $modversion['securityschema'] = ''; } closedir($moddir); }
// as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Patrick Kellum // Purpose of file: Display releated stories. Only displayed when reading articles. // ---------------------------------------------------------------------- $blocks_modules['related'] = array('func_display' => 'blocks_related_block', 'text_type' => 'Related', 'text_type_long' => 'Story Related Links', 'allow_multiple' => false, 'form_content' => false, 'form_refresh' => false, 'show_preview' => false); // Security pnSecAddSchema('Relatedblock::', 'Block title::'); function blocks_related_block($row) { global $sid, $story; list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); if (!pnSecAuthAction(0, 'Relatedblock::', "{$row['title']}::", ACCESS_READ)) { return; } if ($story['topic']) { $row['content'] = '<font class="pn-normal">'; $column =& $pntable['stories_column']; $sql = "SELECT {$column['sid']} as sid, {$column['title']} as title FROM {$pntable['stories']} WHERE {$column['topic']}=" . pnVarPrepForStore($story['topic']) . " ORDER BY {$column['counter']} DESC"; $result = $dbconn->SelectLimit($sql, 1); $mrow = $result->GetRowAssoc(false); $result->MoveNext();
// Based on: // PHP-NUKE Web Portal System - http://phpnuke.org/ // Thatware - http://thatware.org/ // ---------------------------------------------------------------------- // LICENSE // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License (GPL) // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Patrick Kellum // Purpose of file: Display html content of the block // ---------------------------------------------------------------------- $blocks_modules['html'] = array('func_display' => 'blocks_html_block', 'text_type' => 'HTML', 'text_type_long' => 'HTML', 'allow_multiple' => true, 'form_content' => true, 'form_refresh' => false, 'show_preview' => true); // Security pnSecAddSchema('HTMLblock::', 'Block title::'); function blocks_html_block($row) { if (!pnSecAuthAction(0, 'HTMLblock::', "{$row['title']}::", ACCESS_OVERVIEW)) { return; } return themesideblock($row); }
/** * initialise block * */ function FlashChatBridge_Bannerchatblock_init() { pnSecAddSchema('FlashChatBridge:Bannerchatblock:', '::'); }
// modify it under the terms of the GNU General Public License (GPL) // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Francisco Burzi // Purpose of file: // ---------------------------------------------------------------------- $blocks_modules['topic'] = array('func_display' => 'blocks_topic_block', 'text_type' => 'Topics', 'text_type_long' => 'Topics Menu', 'allow_multiple' => false, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true); pnSecAddSchema('Topicblock::', 'Block title::'); function blocks_topic_block($row) { //global $topic, $catid; list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); $currentlang = pnUserGetLang(); if (!pnSecAuthAction(0, 'Topicblock::', "{$row['title']}::", ACCESS_READ)) { return; } $language = pnConfigGetVar('language'); $topic = ""; $catid = ""; if (pnConfigGetVar('multilingual') == 1) { $column =& $pntable['stories_column']; $querylang = "AND ({$column['alanguage']}='{$currentlang}' OR {$column['alanguage']}='')";
// of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Francisco Burzi // Purpose of file: // ---------------------------------------------------------------------- $blocks_modules['search'] = array('func_display' => 'blocks_search_block', 'func_update' => 'blocks_search_update', 'func_edit' => 'blocks_search_edit', 'text_type' => 'Search', 'text_type_long' => 'Search Box', 'allow_multiple' => false, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true); define('_SEARCH_DISPLAY_BTN', 'displaySearchBtn'); // Security pnSecAddSchema('Searchblock::', 'Block title::'); function blocks_search_block($row) { if (!pnSecAuthAction(0, 'Searchblock::', "{$row['title']}::", ACCESS_READ)) { return; } $vars = getVarsFrom_search_Content($row); $content = "<form method=\"post\" action=\"modules.php\">" . "<input type=\"hidden\" name=\"op\" value=\"modload\">" . "<input type=\"hidden\" name=\"name\" value=\"Search\">" . "<input type=\"hidden\" name=\"file\" value=\"index\">" . "<input type=\"hidden\" name=\"action\" value=\"search\">" . "<input type=\"hidden\" name=\"overview\" value=\"1\">"; $content .= "<br><center><input type=\"text\" name=\"q\" size=\"14\">"; if (isset($vars[_SEARCH_DISPLAY_BTN])) { $content .= ' <input type="submit" value="' . _SEARCH . '">'; } $content .= '</center>'; // list of vars that don't need to be saved $avdsearch_reserved_vars = array(_SEARCH_DISPLAY_BTN, 'authid', 'bid', 'title', 'position', 'language', 'refresh'); foreach ($vars as $key => $value) {
// of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Alexander Graef aka MagicX // Purpose of file: simple sideblock calling the new banner api // and allows to set up multiple custom banner sideblocks // ---------------------------------------------------------------------- $blocks_modules['banners'] = array('func_display' => 'blocks_banner_block', 'func_add' => 'blocks_banner_add', 'func_update' => 'blocks_banner_update', 'func_edit' => 'blocks_banner_edit', 'text_type' => 'banners', 'text_type_long' => 'Custom Banner Display', 'allow_create' => false, 'allow_multiple' => true, 'allow_delete' => false, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true); // Security pnSecAddSchema("Bannersblock::", "Block title::"); function blocks_banner_block($row) { list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); if (!pnSecAuthAction(0, "Bannersblock::", "{$row['title']}::", ACCESS_READ)) { return; } $url = explode('|', $row['url']); // to have some start variables if (!$url[0]) { $url[0] = "3"; } // get the banner through the new banner api and assign type $row['content'] = "<br><center>" . pnBannerDisplay($url[0]) . "</center>"; return themesideblock($row);
// modify it under the terms of the GNU General Public License (GPL) // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Patrick Kellum // Purpose of file: Display a list of button links in random order // ---------------------------------------------------------------------- $blocks_modules['button'] = array('func_display' => 'blocks_button_display', 'func_update' => 'blocks_button_update', 'func_edit' => 'blocks_button_edit', 'text_type' => 'Button', 'text_type_long' => 'Button Link Block', 'allow_multiple' => true, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true); pnSecAddSchema('Buttonblock::', 'Block title:Target URL:Image URL'); function blocks_button_display($row) { list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); if (!pnSecAuthAction(0, 'Buttonblock::', "{$row['title']}::", ACCESS_READ)) { return; } $buttons = array(); $column =& $pntable['blocks_buttons_column']; $result = $dbconn->Execute("SELECT {$column['title']} as title, {$column['url']} as url, {$column['images']} as images\n FROM {$pntable['blocks_buttons']}\n WHERE {$column['bid']}={$row['bid']}"); while (!$result->EOF) { $brow = $result->getRowAssoc(false); $result->MoveNext(); $buttons[] = $brow; }
// modify it under the terms of the GNU General Public License (GPL) // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Jim McDonald // Purpose of file: Display titles of stories, with lots of options // ---------------------------------------------------------------------- $blocks_modules['stories'] = array('func_display' => 'blocks_stories_block', 'func_edit' => 'blocks_stories_select', 'func_update' => 'blocks_stories_update', 'text_type' => 'Stories', 'text_type_long' => 'Story Titles', 'allow_multiple' => true, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true); pnSecAddSchema('Storiesblock::', 'Block title::'); function blocks_stories_block($row) { list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); $currentlang = pnUserGetLang(); if (!pnSecAuthAction(0, 'Storiesblock::', "{$row['title']}::", ACCESS_READ)) { return; } // Break out options from our content field $vars = pnBlockVarsFromContent($row['content']); // Defaults if (!isset($vars['storiestype'])) { $vars['storiestype'] = 2; } if (!isset($vars['topic'])) {
// modify it under the terms of the GNU General Public License (GPL) // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Patrick Kellum // Purpose of file: Include a file // ---------------------------------------------------------------------- $blocks_modules['finclude'] = array('func_display' => 'blocks_finclude_block', 'func_add' => 'blocks_finclude_add', 'func_edit' => 'blocks_finclude_edit', 'func_update' => 'blocks_finclude_update', 'text_type' => 'Include', 'text_type_long' => 'Simple File Include', 'allow_multiple' => true, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true); pnSecAddSchema('fincludeblock::', 'Block title::'); function blocks_finclude_block($row) { if (!pnSecAuthAction(0, "fincludeblock::", "{$row['title']}::", ACCESS_READ)) { return; } $url = explode('|', $row['url']); $file = $url[0]; $type = $url[1]; if (!file_exists($file)) { $row['content'] = "File: " . $file . " does not exist."; return themesideblock($row); } $lines = file($file); foreach ($lines as $line_num => $line) { if ($type == 1) {
// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Francisco Burzi // Purpose of file: // ---------------------------------------------------------------------- $blocks_modules['big'] = array('func_display' => 'blocks_big_block', 'text_type' => 'Big', 'text_type_long' => "Today's Big Story", 'allow_multiple' => false, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true); // Get news helper functions include_once 'modules/News/funcs.php'; // Security pnSecAddSchema('Bigblock::', 'Block title::'); function blocks_big_block($row) { $pntable = pnDBGetTables(); if (!pnSecAuthAction(0, 'Bigblock::', "{$row['title']}::", ACCESS_READ)) { return; } $today = getdate(); $day = $today["mday"]; if ($day < 10) { $day = "0{$day}"; } $month = $today["mon"]; if ($month < 10) { $month = "0{$month}"; }
// of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Francisco Burzi // Purpose of file: // ---------------------------------------------------------------------- // eugeniobaldi 2002-02-16 Fixed error in useflag and cleaned Source $blocks_modules['thelang'] = array('func_display' => 'blocks_thelang_block', 'text_type' => 'Language', 'text_type_long' => 'Languages', 'allow_multiple' => false, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true); // Security pnSecAddSchema('Languageblock::', 'Block title::'); function blocks_thelang_block($row) { $currentlang = pnUserGetLang(); if (!pnSecAuthAction(0, 'Languageblock::', "{$row['title']}::", ACCESS_OVERVIEW)) { return; } if (!pnConfigGetVar('multilingual')) { return; } $currentURL = $_SERVER['REQUEST_URI']; if ($currentURL === "") { $currentURL = "index.php"; } $pattern = '/\\?newlang=.../'; $currentURL = preg_replace($pattern, '', $currentURL);
// Based on: // PHP-NUKE Web Portal System - http://phpnuke.org/ // Thatware - http://thatware.org/ // ---------------------------------------------------------------------- // LICENSE // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License (GPL) // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Patrick Kellum // Purpose of file: Display the text content of the block // ---------------------------------------------------------------------- $blocks_modules['text'] = array('func_display' => 'blocks_text_block', 'text_type' => 'Text', 'text_type_long' => 'Plain Text', 'allow_multiple' => true, 'form_content' => true, 'form_refresh' => false, 'show_preview' => true); // Security pnSecAddSchema('Textblock::', 'Block title::'); function blocks_text_block($row) { if (!pnSecAuthAction(0, 'Textblock::', "{$row['title']}::", ACCESS_OVERVIEW)) { return; } return themesideblock($row); }
// as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Francisco Burzi // Purpose of file: // ---------------------------------------------------------------------- $blocks_modules['poll'] = array('func_display' => 'blocks_poll_block', 'func_edit' => 'blocks_poll_select', 'func_update' => 'blocks_poll_update', 'text_type' => 'Poll', 'text_type_long' => 'Display poll', 'allow_multiple' => true, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true); // Security pnSecAddSchema('Pollblock::', 'Block title::'); /** * poll functions */ function pollMain($pollID, $row) { if (!pnSecAuthAction(0, 'Pollblock::', "{$row['title']}::", ACCESS_READ)) { return; } list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); // if pollID isn't set use the latest pollID. Skooter if (!isset($pollID) || empty($pollID) || !is_numeric($pollID) || $pollID == 0) { $pollID = pollLatest(); } //could be a bug if pollID '1' is deleted. Skooter
// as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Patrick Kellum // Purpose of file: Retrive and display RSS feeds from other websites // ---------------------------------------------------------------------- $blocks_modules['rss'] = array('func_display' => 'blocks_rss_block', 'func_update' => 'blocks_rss_update', 'func_edit' => 'blocks_rss_select', 'func_add' => 'blocks_rss_add', 'text_type' => 'RSS', 'text_type_long' => 'RSS Newsfeed', 'allow_multiple' => true, 'form_content' => false, 'form_refresh' => true, 'show_preview' => true); // Security pnSecAddSchema('RSSblock::', 'Block title::'); function blocks_rss_block($row) { if (!pnSecAuthAction(0, 'RSSblock::', "{$row['title']}::", ACCESS_READ)) { return; } $row = blocks_rss_refresh($row); blocks_rss_display($row); } function blocks_rss_display($row) { $args = pnBlockVarsFromContent($row['content']); if (!empty($args['headlines'])) { $row['content'] = $args['headlines']; } else { $row['content'] = '';
// modify it under the terms of the GNU General Public License (GPL) // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Patrick Kellum // Purpose of file: Display the recent links added to the WEb Links module // ---------------------------------------------------------------------- $blocks_modules['weblinks'] = array('func_display' => 'blocks_weblinks_display', 'func_add' => 'blocks_weblinks_add', 'func_update' => 'blocks_weblinks_update', 'func_edit' => 'blocks_weblinks_edit', 'text_type' => 'Weblinks', 'text_type_long' => 'Latest Web Links', 'allow_multiple' => true, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true); pnSecAddSchema('Weblinksblock::', 'Block title::'); function blocks_weblinks_display($row) { list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); if (!pnSecAuthAction(0, 'Weblinksblock::', "{$row['title']}::", ACCESS_READ)) { return; } $url = explode('|', $row['url']); if (!$url[0]) { $row['content'] = 'You forgot to set the module name!'; return themesideblock($row); } if (!$url[1]) { $url[1] = 10; }
// modify it under the terms of the GNU General Public License (GPL) // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Jim McDonald // Purpose of file: Display menu, with lots of options // ---------------------------------------------------------------------- $blocks_modules['menu'] = array('func_display' => 'blocks_menu_block', 'func_edit' => 'blocks_menu_select', 'func_update' => 'blocks_menu_update', 'text_type' => 'Menu', 'text_type_long' => 'Generic menu', 'allow_multiple' => true, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true); pnSecAddSchema('Menublock::', 'Block title:Link name:'); function blocks_menu_block($row) { list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); // Generic check if (!pnSecAuthAction(0, 'Menublock::', "{$row['title']}::", ACCESS_READ)) { return; } // Break out options from our content field $vars = pnBlockVarsFromContent($row['content']); // Display style // style = 1 - simple list // style = 2 - drop-down list // Title $block['title'] = $row['title'];
// as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Francisco Burzi // Purpose of file: // ---------------------------------------------------------------------- $blocks_modules['ephem'] = array('func_display' => 'blocks_ephem_block', 'text_type' => 'Ephemerids', 'text_type_long' => 'Ephemerids', 'allow_multiple' => false, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true); // Security pnSecAddSchema('Ephemeridsblock::', 'Block title::'); function blocks_ephem_block($row) { list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); $currentlang = pnUserGetLang(); if (!pnSecAuthAction(0, 'Ephemeridsblock::', "{$row['title']}::", ACCESS_READ)) { return; } if (pnConfigGetVar('multilingual') == 1) { $column =& $pntable['ephem_column']; $querylang = "AND ({$column['elanguage']}='" . pnVarPrepForStore($currentlang) . "' OR {$column['elanguage']}='')"; } else { $querylang = ""; } $today = getdate();
/** * initialise block */ function postcalendar_calendarblock_init() { // Security pnSecAddSchema('PostCalendar:calendarblock:', 'Block title::'); }
// as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Francisco Burzi // Purpose of file: // ---------------------------------------------------------------------- $blocks_modules['past'] = array('func_display' => 'blocks_past_block', 'func_edit' => 'blocks_past_select', 'func_update' => 'blocks_past_update', 'text_type' => 'Past', 'text_type_long' => 'Past Articles', 'allow_multiple' => false, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true); // Security pnSecAddSchema('Pastblock::', 'Block title::'); // Story functions include_once 'modules/News/funcs.php'; function blocks_past_block($row) { $catid = pnVarCleanFromInput('catid'); list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); $oldnum = pnConfigGetVar('perpage'); if (!pnSecAuthAction(0, 'Pastblock::', "{$row['title']}::", ACCESS_READ)) { return; } if (pnUserLoggedIn()) { $storyhome = pnUserGetVar('storynum'); } else { $storyhome = pnConfigGetVar('storyhome');
/** * initialise block * */ function FlashChatBridge_Onlineblock_init() { pnSecAddSchema('FlashChatBridge:Onlineblock:', '::'); }
// LICENSE // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License (GPL) // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Patrick Kellum // Purpose of file: Execute very simple PHP code // ---------------------------------------------------------------------- $blocks_modules['php'] = array('func_display' => 'blocks_php_block', 'text_type' => 'PHP', 'text_type_long' => 'PHP Script', 'allow_multiple' => true, 'form_content' => true, 'form_refresh' => false, 'show_preview' => true); // Security pnSecAddSchema('PHPblock::', 'Block title::'); function blocks_php_block($row) { if (!pnSecAuthAction(0, 'PHPblock::', "{$row['title']}::", ACCESS_READ)) { return; } ob_start(); print eval($row['content']); $row['content'] = ob_get_contents(); ob_end_clean(); return themesideblock($row); }
/** * initialise block */ function template_firstblock_init() { // Security pnSecAddSchema('Template:Firstblock:', 'Block title::'); }
/** * addinstanceschemainfo - register an instance schema with the security * Will fail if an attempt is made to overwrite an existing schema * * @deprecated * @see SecurityUtil::registerPermissionSchema() * @param unknown_type $component * @param unknown_type $schema */ function addinstanceschemainfo($component, $schema) { LogUtil::log(__f('Warning! Function %1$s is deprecated. Please use %2$s instead.', array( 'pnSecAddSchema()', 'SecurityUtil::registerPermissionSchema()')), E_USER_DEPRECATED); pnSecAddSchema($component, $schema); }
// as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Francisco Burzi // Purpose of file: // ---------------------------------------------------------------------- $blocks_modules['category'] = array('func_display' => 'blocks_category_block', 'text_type' => 'Category', 'text_type_long' => 'Categories Menu', 'allow_multiple' => false, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true); // Security pnSecAddSchema('Categoryblock::', 'Block title::'); function blocks_category_block($row) { global $topic, $catid; list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); if (!pnSecAuthAction(0, 'Categoryblock::', "{$row['title']}::", ACCESS_READ)) { return; } if (pnConfigGetVar('multilingual') == 1) { $column =& $pntable['stories_column']; $querylang = "AND ({$column['alanguage']}='" . pnVarPrepForStore(pnUserGetLang()) . "' OR {$column['alanguage']}='')"; /* the OR is needed to display stories who are posted to ALL languages */ } else { $querylang = ''; }
// as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Francisco Burzi // Purpose of file: // ---------------------------------------------------------------------- $blocks_modules['user'] = array('func_display' => 'blocks_user_block', 'text_type' => 'User', 'text_type_long' => "User's Custom Box", 'allow_multiple' => false, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true); // Security pnSecAddSchema('Userblock::', 'Block title::'); function blocks_user_block($row) { list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); if (!pnSecAuthAction(0, 'Userblock::', "{$row['title']}::", ACCESS_READ)) { return; } if (pnUserLoggedIn() && pnUserGetVar('ublockon') == 1) { $column =& $pntable['users_column']; $uid = pnUserGetVar('uid'); $getblock = $dbconn->Execute("SELECT {$column['ublock']} FROM {$pntable['users']} WHERE {$column['uid']}=" . pnVarPrepForStore($uid) . ""); list($ublock) = $getblock->fields; $username = pnUserGetVar('name'); $row['title'] = _MENUFOR . " " . pnVarPrepForDisplay($username) . ""; $row['content'] = $ublock;
// of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Francisco Burzi // Purpose of file: count number of guests/members online // 20/09/2001 - modified sql to cope with there being 0 members online // ---------------------------------------------------------------------- $blocks_modules['online'] = array('func_display' => 'blocks_online_block', 'text_type' => 'Online', 'text_type_long' => 'Online', 'allow_multiple' => false, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true); // Security pnSecAddSchema('Onlineblock::', 'Block title::'); function blocks_online_block($row) { list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); if (!pnSecAuthAction(0, 'Onlineblock::', "{$row['title']}::", ACCESS_READ)) { return; } $sessioninfocolumn =& $pntable['session_info_column']; $sessioninfotable = $pntable['session_info']; $sessioninfocolumn =& $pntable['session_info_column']; $sessioninfotable = $pntable['session_info']; $activetime = time() - pnConfigGetVar('secinactivemins') * 60; $query = "SELECT count( 1 )\n FROM {$sessioninfotable}\n WHERE {$sessioninfocolumn['lastused']} > {$activetime} AND {$sessioninfocolumn['uid']} >0\n\t\t GROUP BY {$sessioninfocolumn['uid']}\n\t\t "; $result = $dbconn->Execute($query); $numusers = $result->RecordCount();
// modify it under the terms of the GNU General Public License (GPL) // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of file: Patrick Kellum // Purpose of file: Display currency exchange rates // ---------------------------------------------------------------------- $blocks_modules['fxp'] = array('func_display' => 'blocks_fxp_display', 'func_add' => '', 'func_update' => 'blocks_fxp_update', 'func_edit' => 'blocks_fxp_edit', 'text_type' => 'Currency', 'text_type_long' => 'FXP Currency Exchange', 'allow_multiple' => true, 'form_content' => false, 'form_refresh' => true, 'show_preview' => true); pnSecAddSchema('fxpblock::', 'Block title::'); function blocks_fxp_display($row) { list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); if (!pnSecAuthAction(0, 'fxpblock::', "{$row['title']}::", ACCESS_READ)) { return; } $blocktable = $pntable['blocks']; $blockscolumn =& $pntable['blocks_column']; $fxp_port = 5011; $past = time() - $row['refresh']; if ($row['unix_update'] < $past) { // if (true) { $fp = fsockopen('www.oanda.com', $fxp_port, $errno, $errstr, 5); if (!$fp) {