[ PHPXref.com ] [ Generated: Sun Jul 20 17:52:21 2008 ] [ Focus/SIS 1.0 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> Bottom.php (source)

   1  <?
   2  /**
   3  * @file Bottom.php 2006-04-17 andrew $
   4  * @package Focus/SIS
   5  * @copyright Copyright (C) 2006 Andrew Schmadeke. All rights reserved.
   6  * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
   7  * Focus/SIS is free software. This version may have been modified pursuant
   8  * to the GNU General Public License, and as distributed it includes or
   9  * is derivative of works licensed under the GNU General Public License or
  10  * other free or open source software licenses.
  11  * See COPYRIGHT.txt for copyright notices and details.
  12  */
  13  
  14  error_reporting(1);
  15  include  "./Warehouse.php";
  16  if($_REQUEST['modfunc']=='print')
  17  {
  18      $_REQUEST = $_SESSION['_REQUEST_vars'];
  19      $_REQUEST['_FOCUS_PDF'] = true;
  20      if(strpos($_REQUEST['modname'],'?')!==false)
  21          $modname = substr($_REQUEST['modname'],0,strpos($_REQUEST['modname'],'?'));
  22      else
  23          $modname = $_REQUEST['modname'];
  24      ob_start();
  25      include('languages/English/'.$modname);
  26      include('modules/'.$modname);
  27      //$html = eregi_replace('</?CENTER>','',str_replace('assets/',"http://".$_SERVER['HTTP_HOST'].substr($_SERVER['SCRIPT_NAME'],0,strrpos($_SERVER['SCRIPT_NAME'],'/')).'/assets/',ob_get_contents()));
  28      $html = eregi_replace('</?CENTER>','',ob_get_contents());
  29      ob_end_clean();
  30  
  31      // get a temp filename, and then change its extension from .tmp to .html to make htmldoc happy.
  32      $temphtml=tempnam('','html');
  33      $temphtml_tmp=substr($temphtml, 0, strrpos($temphtml, ".")).'html';
  34      rename($temphtml_tmp, $temphtml); 
  35      
  36      $fp=@fopen($temphtml,"w+");
  37      if (!$fp) {
  38          die("Can't open $temphtml");
  39      }
  40      fputs($fp,'<HTML><BODY>'.$html.'</BODY></HTML>');
  41      @fclose($fp);
  42  
  43      header("Cache-Control: public");
  44      header("Pragma: ");
  45      header("Content-Type: application/pdf");
  46      header("Content-Disposition: inline; filename=\"".ProgramTitle().".pdf\"\n");
  47  
  48      $orientation = 'portrait';
  49      if($_REQUEST['expanded_view'] || $_SESSION['orientation'] == 'landscape')
  50      {    
  51          $orientation = 'landscape';
  52          unset($_SESSION['orientation']);
  53      }
  54      passthru("$htmldocPath --webpage --quiet -t pdf12 --jpeg --no-links --$orientation --footer t --header . --left 0.5in --top 0.5in \"$temphtml\"");
  55      @unlink($temphtml);
  56  }
  57  else
  58  {
  59      echo "
  60      <HTML>
  61          <HEAD><TITLE>Focus/SIS School Software</TITLE>
  62          <SCRIPT>
  63          size = 30;
  64  		function expandFrame()
  65          {
  66              if(size==30)
  67              {
  68                  parent.document.getElementById('mainframeset').rows=\"*,200\";
  69                  size = 200;
  70              }
  71              else
  72              {
  73                  parent.document.getElementById('mainframeset').rows=\"*,30\";
  74                  size = 30;
  75              }
  76          }
  77          </SCRIPT>
  78          <link rel=stylesheet type=text/css href=assets/themes/".Preferences('THEME')."/stylesheet.css>
  79          </HEAD>
  80          <BODY background=assets/themes/".Preferences('THEME')."/bg.jpg leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>";
  81      echo '<CENTER>';
  82      
  83      echo '<TABLE><TR>';
  84      if($_SESSION['List_PHP_SELF'] && User('PROFILE')!='parent' && User('PROFILE')!='student')
  85          echo '<TD width=24><A HREF='.$_SESSION['List_PHP_SELF'].'&bottom_back=true target=body><IMG SRC=assets/back.gif border=0 vspace=0></A></TD><TD valign=middle class=BottomButton><A HREF='.$_SESSION['List_PHP_SELF'].'&bottom_back=true target=body>Back to Student List</A></TD>';
  86      if($_SESSION['Search_PHP_SELF'] && User('PROFILE')!='parent' && User('PROFILE')!='student')
  87          echo '<TD width=24><A HREF='.$_SESSION['Search_PHP_SELF'].'&bottom_back=true target=body><IMG SRC=assets/back.gif border=0 vspace=0></A></TD><TD valign=middle class=BottomButton><A HREF='.$_SESSION['Search_PHP_SELF'].'&bottom_back=true target=body>Back to Search Screen</A></TD>';     
  88      echo '<TD width=24><A HREF=Bottom.php?modfunc=print target=body><IMG SRC=assets/print.gif border=0 vspace=0></A></TD><TD valign=middle class=BottomButton><A HREF=Bottom.php?modfunc=print target=body>Print</A></TD><TD><A HREF=# onclick=expandFrame();return false;><IMG SRC=assets/help.gif border=0 vspace=0></A></TD><TD valign=middle class=BottomButton><A HREF=# onclick="expandFrame();return false;">Help</A></TD><TD><A HREF=index.php?modfunc=logout target=_top><IMG SRC=assets/logout.gif border=0 vspace=0 hspace=0></A></TD><TD valign=middle class=BottomButton><A HREF=index.php?modfunc=logout target=_top>Logout</A></TD></TR></TABLE>';
  89      echo '<BR><BR>';
  90      echo '</CENTER>';
  91      
  92      include  'Help.php';
  93      include  'Menu.php';
  94      
  95      $profile = User('PROFILE');
  96  
  97      echo '<DIV class=BottomButton>';
  98      if($_REQUEST['modcat'])
  99      {
 100          echo '<b>'.str_replace('_',' ',$_REQUEST['modcat']);
 101          echo ' : '.$_FOCUS['Menu'][$_REQUEST['modcat']][$_REQUEST['modname']];
 102          echo '</b>';
 103      }
 104      else
 105          echo '<b>Welcome to Focus/SIS Help</b>';
 106      
 107      if($help[$_REQUEST['modname']])
 108      {
 109          if($student==true)
 110              $help[$_REQUEST['modname']] = str_replace('your child','yourself',str_replace('your child\'s','your',$help[$_REQUEST['modname']]));
 111  
 112          echo $help[$_REQUEST['modname']];
 113      }
 114      else
 115          echo $help['default'];
 116      echo '</DIV>';
 117      echo '</BODY>';
 118      echo '</HTML>';
 119  }
 120  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]