[ Index ]

krapohl.info

title

Body

[close]

/ -> print.php (source)

   1  <?php
   2  /**
   3   *  $Id: print.php,v 1.1 2004/02/11 17:25:29 larsneo Exp $
   4   *
   5   *  PostCalendar::PostNuke Events Calendar Module
   6   *  Copyright (C) 2002  The PostCalendar Team
   7   *  http://postcalendar.tv
   8   *  
   9   *  This program is free software; you can redistribute it and/or modify
  10   *  it under the terms of the GNU General Public License as published by
  11   *  the Free Software Foundation; either version 2 of the License, or
  12   *  (at your option) any later version.
  13   *  
  14   *  This program is distributed in the hope that it will be useful,
  15   *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  16   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17   *  GNU General Public License for more details.
  18   *  
  19   *  You should have received a copy of the GNU General Public License
  20   *  along with this program; if not, write to the Free Software
  21   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  22   *
  23   *  To read the license please read the docs/license.txt or visit
  24   *  http://www.gnu.org/copyleft/gpl.html
  25   *
  26   */
  27  
  28  // grab the form variables
  29  $tplview         = pnVarCleanFromInput('tplview');
  30  $viewtype         = pnVarCleanFromInput('viewtype');
  31  $eid             = pnVarCleanFromInput('eid');
  32  $Date             = pnVarCleanFromInput('Date');
  33  $print          = pnVarCleanFromInput('print');
  34  $uid             = pnUserGetVar('uid');
  35  $pc_username     = pnVarCleanFromInput('pc_username');
  36  
  37  $output =& new pnHTML();
  38  $output->SetInputMode(_PNH_VERBATIMINPUT);
  39  if(!pnModAPILoad('postcalendar','user')) { die('Could not load PostCalendar user API'); }
  40  $theme = pnUserGetTheme();
  41  if(!pnThemeLoad($theme)) { die('Could not load theme'); }
  42  
  43  $output->Text('<html><head>');
  44  $output->Text("<title>".pnConfigGetVar('sitename').' :: '.pnConfigGetVar('slogan')."</title>\n");
  45  $output->Text('<link rel="StyleSheet" href="themes/'.$theme.'/style/styleNN.css" type="text/css" />');
  46  $output->Text('<style type="text/css">@import url("themes/'.$theme.'/style/style.css"); </style>');
  47  $output->Text('</head>');
  48  $output->Text('<body bgcolor="#ffffff">');
  49  
  50  // setup our cache id
  51  $cacheid = md5($Date.$viewtype.$tplview._SETTING_TEMPLATE.$eid.$print.$uid.$pc_username.$theme);
  52  // display the correct view
  53  switch($viewtype) {
  54      case 'details' :
  55          $output->Text(pnModAPIFunc('PostCalendar','user','eventDetail',array('eid'=>$eid,
  56                                                                               'Date'=>$Date,
  57                                                                               'print'=>$print,
  58                                                                               'cacheid'=>$cacheid)));
  59          break;
  60      default :
  61          $output->Text(pnModAPIFunc('postcalendar','user','buildView',array('Date'=>$Date,
  62                                                                            'viewtype'=>$viewtype,
  63                                                                            'cacheid'=>$cacheid)));
  64          break;   
  65  }
  66  
  67  $output->Text(postcalendar_footer());
  68  $output->Text('</body></html>');
  69  $output->PrintPage();
  70  ?>


Generated: Wed Feb 16 22:40:07 2005 Cross-referenced by PHPXref 0.6