From: Roger R. <eps...@us...> - 2002-04-20 20:04:21
|
Update of /cvsroot/pn-modules/PN_PostCalendar/modules/PostCalendar In directory usw-pr-cvs1:/tmp/cvs-serv32349 Added Files: menu.php print.php Log Message: commiting new files and directories --- NEW FILE: menu.php --- [code] /** * Adding PostCalendar Waiting Content in menu block * Add these following lines to the file: * includes/blocks/menu.php * * These should be added around line 219 * after the code for the FAQ Waiting Content. * * Look for this: * * if (pnSecAuthAction(0, "FAQ::", "::", ACCESS_ADD)) { * [...snip..] * } * */ if (pnSecAuthAction(0, "PostCalendar::", "::", ACCESS_ADD)) { pnModDBInfoLoad('PostCalendar'); $pntable = pnDBGetTables(); $events_table = $pntable['postcalendar_events']; $events_column = &$pntable['postcalendar_events_column']; $result = $dbconn->Execute("SELECT count(1) FROM $events_table WHERE $events_column[eventstatus]=0"); if ($dbconn->ErrorNo() == 0) { list($pcnum) = $result->fields; $result->Close(); if ($pcnum) { if ($header == 0) { $block['content'] .= addMenuStyledUrl($vars['style'], "<strong>" . _WAITINGCONT. "</strong>", "", ""); $header = 1; } $block['content'] .= addMenuStyledUrl($vars['style'], "PostCalendar: $pcnum", "index.php?module=PostCalendar&type=admin&func=listqueued", ""); $content = 1; } } } [/code] --- NEW FILE: print.php --- <?php /** * $Id: print.php,v 1.1 2002/04/20 20:04:18 epsilon7 Exp $ * * PostCalendar::PostNuke Events Calendar Module * Copyright (C) 2002 The PostCalendar Team * http://www.alyousif.tv/cal * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License 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. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * To read the license please read the docs/license.txt or visit * http://www.gnu.org/copyleft/gpl.html * */ function PostCalendar_footer() { // lets get the module's information $modinfo = pnModGetInfo(pnModGetIDFromName('PostCalendar')); $footer = "<p align=\"center\"> <a href=\"http://www.bahraini.tv\" target=\"_blank\"><img src=\"modules/$modinfo[directory]/pnimages/poweredbypc.gif\" width=\"88\" height=\"31\" alt=\"Powered by PostCalendar $modinfo[version]!\" border=\"0\"></a> <a href=\"http://www.bosrup.com/web/overlib/\" target=\"_blank\"><img src=\"modules/$modinfo[directory]/pnimages/overlib.gif\" width=\"88\" height=\"31\" alt=\"Popups by overLIB!\" border=\"0\"></a><br /> PostCalendar v$modinfo[version]</p>"; return $footer; } $viewtype = pnVarCleanFromInput('viewtype'); $eid = pnVarCleanFromInput('eid'); $Date = pnVarCleanFromInput('date'); $output = new pnHTML(); $output->SetInputMode(_PNH_VERBATIMINPUT); if(!pnModAPILoad('PostCalendar','user')) { die('Could not load PostCalendar user API'); } if(!pnThemeLoad()) { die('Could not load theme'); } $thetheme = pnUserGetTheme(); $output->Text('<html><head>'); $output->Text("<title>".pnConfigGetVar('sitename').' :: '.pnConfigGetVar('slogan')."</title>\n"); $output->Text('<link rel="StyleSheet" href="themes/'.$thetheme.'/style/styleNN.css" type="text/css" />'); $output->Text('<style type="text/css">@import url("themes/'.$thetheme.'/style/style.css"); </style>'); $output->Text('</head>'); $output->Text('<body bgcolor="#ffffff">'); if($viewtype=='day') $output->Text(pnModAPIFunc('PostCalendar','user','buildDay',array('Date'=>$Date))); if($viewtype=='week') $output->Text(pnModAPIFunc('PostCalendar','user','buildWeek',array('Date'=>$Date))); if($viewtype=='month') $output->Text(pnModAPIFunc('PostCalendar','user','buildMonth',array('Date'=>$Date))); if($viewtype=='year') $output->Text(pnModAPIFunc('PostCalendar','user','buildYear',array('Date'=>$Date))); if($viewtype=='event') $output->Text(pnModAPIFunc('PostCalendar','user','eventDetail',array('eid'=>$eid))); $output->Text(PostCalendar_footer()); $output->Text('</body></html>'); $output->PrintPage(); ?> |