Changeset - 0137ddfb7b22
[Not reviewed]
default
0 2 0
ethanzonca - 15 years ago 2010-09-25 01:23:24

Fixed up junk left out of ohnobinki's merge, explicitly declare functions pub/priv
2 files changed with 11 insertions and 12 deletions:
0 comments (0 inline, 0 general)
inc/class.page.php
Show inline comments
 
@@ -32,60 +32,60 @@ class page {
 

	
 
  public function __construct($ntitle, $nscripts = array(), $immediate = TRUE)
 
  {
 
    // Scripts and styles available to include
 
    $this->headCode['jQuery'] = '<script src="http://www.google.com/jsapi"></script><script type="text/javascript" charset="utf-8"> google.load("jquery", "1.3.2"); google.load("jqueryui", "1.7.2");</script>';
 
    $this->headCode['jValidate'] = '<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.pack.js"></script>';
 
    $this->headCode['schedInput'] = '<script type="text/javascript" src="scripts/scheduleInput.js"></script>';
 
    $this->headCode['outputPrintStyle'] = '<link rel="stylesheet" href="styles/print.css" type="text/css" media="screen" charset="utf-8">';
 
    $this->headCode['outputStyle'] = '<link rel="stylesheet" href="styles/output.css" type="text/css" media="screen" charset="utf-8">'; 
 
    $this->headCode['gliderHeadcode'] = '<link rel="stylesheet" href="styles/glider.css" type="text/css" media="screen" charset="utf-8"><script src="scripts/prototype.js" type="text/javascript" charset="utf-8"></script><script src="scripts/effects.js" type="text/javascript" charset="utf-8"></script><script src="scripts/glider.js" type="text/javascript" charset="utf-8"></script>'; 
 

	
 
   $this->pagetitle = $ntitle;
 
    $this->scripts = $nscripts;
 
   $this->scripts = $nscripts;
 

	
 
    session_start();
 
    if($immediate
 
       && $ntitle != "NOHEAD")
 
      $this->head();
 

	
 
    session_start();
 
 }
 

	
 
  /**
 
   * \brief
 
   *   Adds some headcode to this page.
 
   *
 
   * \param $key
 
   *   The key to register this headcode under.
 
   * \param $code
 
   *   The actuall code, such as a <script/>.
 
   * \param $enable
 
   *   Whether or not to enable this code while adding it.
 
   */
 
  function headcode_add($key, $code, $enable = FALSE)
 
  public function headcode_add($key, $code, $enable = FALSE)
 
  {
 
    $this->headCode[$key] = $code;
 
    if ($enable)
 
      $this->scripts[] = $key;
 
  }
 

	
 
  private function top(){
 
    echo '<div id="header">
 
          <h1><em>SlatePermutate</em> - '.$this->pagetitle.'</h1>
 
          </div>
 
          <div id="content">';
 
  }
 

	
 
// Public functions/vars
 

	
 
  function head(){
 
  public function head(){
 
    $this->pageGenTime = round(microtime(), 3);
 

	
 
    echo '<!DOCTYPE ' . $this->doctype . '>
 
	  <html ' . $this->htmlargs . '>
 
	  <head>
 
	    <title>' . $this->pagetitle . ' :: ' . $this->base_title . '</title>
 
           <link rel="stylesheet" href="styles/general.css" type="text/css" media="screen" charset="utf-8">';
 

	
 
    // Write out all passed scripts
 
    foreach ($this->scripts as $i){
 
    	echo $this->headCode["$i"];
 
    }
input.php
Show inline comments
 
@@ -40,36 +40,35 @@ var sectionsOfClass = Array();
 
// </script>', TRUE);
 

	
 
$inputPage->head();
 
$inputPage->showSavedScheds($_SESSION);
 
?>
 
<p>Welcome to SlatePermutate! To get started, enter in some of your classes, and add available sections for each class.</p>
 
<form method="post" action="process.php" id="scheduleForm">
 
<table>
 
  <tr>
 
    <table id="jsrows">
 
      <tr>
 
	<td colspan="11">
 
	  <input id="scheduleName" style="margin-bottom: 2em;" class="defText required" type="text" class="required" size="25" title="Schedule Name (e.g., Spring 2011)" name="postData[name]"
 
	  <input id="scheduleName" style="margin-bottom: 2em;" class="defText required" type="text" class="required" size="25" title="Schedule Name (e.g., Spring <?php echo Date('Y'); ?>)" name="postData[name]"
 
		 <?php if ($sch) echo 'value="' . str_replace('"', '&quot;', $sch->getName()) . '"'; /*"*/ ?>
 
		 />
 
	  <em>(For example: Fall <?php echo Date("Y"); ?>)</em>
 
	</td>
 
      </tr>
 
      <tr>
 
	<td colspan="11" style="padding-bottom: 2em;">
 
	  <select id="isNumeric" type="text" class="required" name="isnumbered" value="<?php if ($sch) echo $sch->section_format; else echo 'numerous'; ?>" >
 
	    <option value="numerous">Custom Section Labels</option>
 
	    <option value="numbered">Numbered Section Labels</option>
 
	    <option value="lettered">Lettered Section Labels</option>
 
	<td class="advanced" colspan="11" style="padding-bottom: 2em;">
 
	  Section Labels are <select id="isNumeric" type="text" class="required" name="isnumbered" value="<?php if ($sch) echo $sch->section_format; else echo 'numerous'; ?>" >
 
	    <option value="numerous">Custom</option>
 
	    <option value="numbered">Numbered</option>
 
	    <option value="lettered">Lettered</option>
 
	  </select>
 

	
 
	<!-- Header -->
 
	<tr>
 
		<td>Class</td>
 
		<td class="center" id="letterNumber">Section</td>
 
		<td class="center">Start Time</td>
 
		<td class="center">End Time</td>
 
		<td class="center">M</td>
 
		<td class="center">Tu</td>
 
		<td class="center">W</td>
 
		<td class="center">Th</td>
0 comments (0 inline, 0 general)