SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2008
    Location
    IA
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Location: redirecting to wrong page.

    I'm afraid the PHP forum is going to get tired of me showing up, but it's the best place for help I've found.

    I have a custom CMS I'm building for administration of a few areas on a site. In the root directory I have a folder named "admin" that contains an index.php file that the user can decide what area of the site to adjust. One choice goes to a "schedule" folder inside the admin folder, so the user goes to "admin/schedule/index.php" and that index then directs the user as needed.

    Within the schedule folder, I have setup options to add, edit, or delete information. Each of these ends with "header('Location: .');" to redirect to "admin/schedule/index.php" and continue as needed. Unfortunately, the user is going back another level to "admin/index.php" instead of staying in schedule. With this, none of the data is edited and the user is left confused.

    In searching the forums here I found a few suggestions, but nothing worked. I tried using absolute links "header('Location: http://localhost:8888/full path');", but no change. Replacing the . with index.php was not helpful either.

    When I made the schedule functions, I originally had them directly in my admin folder. Everything worked perfectly as I wanted it to, but there was only the one index.php, the one that dealt with the schedule's needs. The trouble started when I moved everything to the schedule folder and added the index to allow for choosing each function.

    This CMS is still in the testing phase on my computer, I'm sure I'll have more trouble when it eventually goes to the host's server. Any help would be appreciated, I have the entire "admin/schedule/index.php" file below for further examination.

    PHP Code:
    <?php
    include_once '../../assets/includes/magicquotes.php';

    if (isset(
    $_GET['addschedule']))
    {
        
    $pagetitle 'Add to Schedule';
        
    $action 'addform';
        
    $datetext '';
        
    $id '';
        
    $button 'Add Event';
        
        include 
    'scheduleform.php';
        exit();
    }

    if (isset(
    $_GET['addform']))
    {
        include 
    '../../assets/includes/connect.php';
        
        
    $datetext mysqli_real_escape_string($link$_POST['datetext']);
        
    $sql "INSERT INTO schedule SET
                datetext='
    $datetext'";
        if (!
    mysqli_query($link$sql))
        {
            
    $error 'Error adding event.';
            include 
    'error.php';
            exit();
        }
        
    header('Location: .');
        exit();
    }

    if (isset(
    $_POST['action']) and $_POST['action'] == 'Edit')
    {
        include 
    '../../assets/includes/connect.php';
        
        
    $id mysqli_real_escape_string($link$_POST['id']);
        
    $sql "SELECT id, datetext FROM schedule WHERE id='$id'";
        
    $result mysqli_query($link$sql);
        if (!
    $result)
        {
            
    $error 'Error getting schedule information.';
            include 
    'error.php';
            exit();
        }
        
    $row mysqli_fetch_array($result);
        
        
    $pagetitle 'Edit Schedule';
        
    $action 'editform';
        
    $datetext $row['datetext'];
        
    $id $row['id'];
        
    $button 'Update Schedule';
        
        include 
    'scheduleform.php';
        exit();
    }

    if (isset(
    $_GET['editform']))
    {
        include 
    '../../assets/includes/connect.php';
        
        
    $id mysqli_real_escape_string($link$_POST['id']);
        
    $datetext mysqli_real_escape_string($link$_POST['datetext']);
        
    $sql "UPDATE schedule SET
                datetext='
    $datetext'
                WHERE id='
    $id'";
        if (!
    mysqli_query($link$sql))
        {
            
    $error 'Error updating schedule.';
            include 
    'error.php';
            exit();
        }
        
    header('Location: .');
        exit();
    }

    if (isset(
    $_POST['action']) and $_POST['action'] == 'Delete')
    {
        include 
    '../../assets/includes/connect.php';
        
    $id mysqli_real_escape_string($link$_POST['id']);
        
        
    // Delete schedule item
        
    $sql "DELETE FROM schedule WHERE id='$id'";
        if (!
    mysqli_query($link$sql))
        {
            
    $error 'Error deleting schedule item.';
            include 
    'error.php';
            exit();
        }
        
    header('Location: .');
        exit();
    }

    // Display schedule
    include '../../assets/includes/connect.php';
    $result mysqli_query($link'SELECT id, datetext FROM schedule');
    if(!
    $result)
    {
        
    $error 'Error getting schedule from database.';
        include 
    'error.php';
        exit();
    }
    while (
    $row mysqli_fetch_array($result))
    {
        
    $dates[] = array('id' => $row['id'], 'datetext' => $row['datetext']);
    }
    include 
    'schedule.php';
    ?>

  2. #2
    SitePoint Wizard wonshikee's Avatar
    Join Date
    Jan 2007
    Posts
    1,223
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Try one of these:

    header("Location: index.php");
    header("Location: ./index.php");

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2008
    Location
    IA
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried both and neither one had any different results.

  4. #4
    SitePoint Addict tom8's Avatar
    Join Date
    Mar 2012
    Location
    New Jersey
    Posts
    310
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Just to clear things up, please place this line:

    echo getcwd();

    just above the header and run it again. If it did not say

    admin/schedule/

    then we know the problem.

    Note that you will get an error message when you run it.

  5. #5
    SitePoint Enthusiast
    Join Date
    May 2008
    Location
    IA
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it's not obvious, this is my first PHP script outside of class. I've been a front-end developer for my entire web development career, but I'm trying to expand.

    I put the echo getcwd(); statement in the index.php file above the header('Location: ./index.php'); line, but I didn't get anything. So I put it in my include statements in the HTML files that get produced from this script. They came back with the entire file location, including admin/schedule, but no errors and no correct function.

    If I'm off track on location for the echo statement, let me know.

  6. #6
    SitePoint Addict tom8's Avatar
    Join Date
    Mar 2012
    Location
    New Jersey
    Posts
    310
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    With that you help cleared up one thing, and that is none of the header in that script was used. So changing the Location in the header will not make any difference. I suspect somewhere in one of those include scripts did the redirect. Is it possible for you to let us see connect.php?

  7. #7
    SitePoint Enthusiast
    Join Date
    May 2008
    Location
    IA
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is the connect.php, it's in assets/includes/


    PHP Code:
    <?php
    $link 
    mysqli_connect('localhost''sulluser''mypassword');
    if (!
    $link)
    {
        
    $error 'Unable to connect to the database server.';
        include 
    'error.php';
        exit();
    }

    if (!
    mysqli_set_charset($link'utf8'))
    {
        
    $output 'Unable to set database connection encoding.';
        include 
    'error.php';
        exit();
    }

    if (!
    mysqli_select_db($link'sullSite12'))
    {
        
    $error 'Unable to locate the Sully database.';
        include 
    'error.php';
        exit();
    }
    ?>

  8. #8
    SitePoint Addict tom8's Avatar
    Join Date
    Mar 2012
    Location
    New Jersey
    Posts
    310
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It’s not there.

    Can you just post the rest of the scripts so that we won’t going back and fore with this?

    The scripts are:

    error.php
    scheduleform.php
    schedule.php

  9. #9
    SitePoint Enthusiast
    Join Date
    May 2008
    Location
    IA
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Everything worked until I moved the files into the schedule directory. My guess is that it's something to do with the move, but I do not know what it would be.

    Since everything was working, I put the entire site's design along with the PHP script. Unfortunately, they aren't as evident to find because of it. Here are the requested files with the index.php from the admin directory in case I'm missing something in it. I also use Dreamweaver CS5 as my WYSIWYG, but everything PHP related is hand coded.

    error.php
    PHP Code:
    <?php
        
    include_once '../../assets/includes/helpers.php';
        require_once 
    '../../assets/includes/DbFactory.php';
        require_once 
    '../../assets/includes/getschedule.php';
    ?>
    <!doctype html>
    <html lang="en"><!-- InstanceBegin template="/Templates/mainp.dwt.php" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta charset="utf-8">
            <!-- InstanceBeginEditable name="doctitle" -->
            <title>Database Error for Sully Christian Grade</title>
            <!-- InstanceEndEditable -->
            <script src="../../assets/js/jquery-1.5.min.js"></script>
            <!-- InstanceBeginEditable name="head" -->
            <!-- InstanceEndEditable -->
            
    <link href="../../assets/scs20.css" rel="stylesheet" type="text/css">
    <script src="../../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

        <!--[if lt IE 8]>
                <link href="http://www.sullychristian.org/assets/oldie.css" rel="stylesheet" type="text/css">
        <![endif]-->
    <link href="../../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
    </head>
        
    <body>
      <div id="masterpage">
            <div id="header">
                <img src="../../assets/images/site/banner-150.jpg" alt="Sully Christian Grade School" width="1024" height="150">
      </div>
            <div class="navBlack"></div>
              <div id="nav">
            <ul id="MenuBar1" class="MenuBarHorizontal">
                    <li id="home"><a href="../../index.php" class="navborder" title="Home">Home</a></li>
                    <li id="about"><a href="#" title="About" class="MenuBarItemSubmenu navborder">About</a>
                        <ul>
                            <li><a href="../../about/mission.php" title="Mission Statement">Mission Statement</a></li>
                            <li><a href="../../about/quickfacts.php" title="Quick Facts">Quick Facts</a></li>
                            <li><a href="../../about/faculty.php" title="Faculty">Faculty</a></li>
                            <li><a href="../../about/board.php" title="Board">Board</a></li>
                            <li><a href="../../about/committees.php" title="Committees">Committees</a></li>
                            <li><a href="../../about/history.php" title="History">History</a></li>
                      </ul>
                    </li>
                    <li id="academics"><a href="#" class="MenuBarItemSubmenu navborder">Academics</a>
                      <ul>
                          <li><a href="../../academics/classrooms.php" title="Classrooms">Classroooms</a></li>
                        <li><a href="../../academics/itbs.php" title="ITBS Scores">ITBS Scores</a></li>
                        <li><a href="../../academics/iacore.php" title="Iowa Core">Iowa Core</a></li>
                      </ul>
                    </li>
                    <li id="calendars"><a class="MenuBarItemSubmenu navborder" href="#">Calendars</a>
                      <ul>
                          <li><a href="../../calendar.php" title="Main Calendar">Main Calendar</a></li>
                        <li><a href="../../assets/pdf/calendars/academiccalendar.pdf" title="Academic Calendar" class="external">Academic</a></li>
                        <li><a href="../../assets/pdf/calendars/schoolcalendar.pdf" title="School Calendar" class="external">School</a></li>
                        <li><a href="../../assets/pdf/calendars/lunch.pdf" title="Lunch" class="external">Lunch</a></li>
                        <li><a href="../../assets/pdf/calendars/sportsschedule.pdf" title="Athletic" class="external">Athletic</a></li>
                    </ul>
                  </li>
                  <li id="news"><a href="#" class="MenuBarItemSubmenu navborder">News</a>
                     <ul>
                       <li><a href="../../assets/pdf/newsletter/scsnewsletter/scsnewsletter.pdf" title="SCS Newsletter" class="external">SCS Newsletter</a></li>
                       <li><a href="../../assets/pdf/newsletter/bitspieces/bitspieces.pdf" title="Bits 'n Pieces" class="external">Bits 'n Pieces</a></li>
                       <li><a href="../../newsletter.php" title="News">Newsletter Archives</a></li>
                     </ul>
                  </li>
                  <li id="athletics"><a href="#" title="Warrior Athletics" class="MenuBarItemSubmenu navborder">Warrior Athletics</a>
                        <ul>
                          <li><a href="../../athletics/athletics.php" title="Warrior Athletics">Athletics</a></li>
                          <li><a href="../../assets/pdf/forms/physicalform.pdf" title="Physical Form" class="external">Physical Form</a></li>
                        <li><a href="../../assets/pdf/calendars/sportsschedule.pdf" title="Schedule" class="external">Schedule</a></li>
                        <li><a href="../../athletics/scores.php" title="Scores">Scores</a></li>
                        <li><a href="../../athletics/directions.php" title="Directions">Directions</a></li>
                      </ul>
                    </li>
                    <li id="parents"><a href="#" class="MenuBarItemSubmenu navborder">Parents</a>
                      <ul>
                          <li><a href="../../assets/pdf/newsevents/parenthandbook.pdf" title="Parent Handbook" class="external">Parent Handbook</a></li>
                        <li><a href="../../assets/pdf/newsevents/supplylist.pdf" title="School Supply List" class="external">School Supply List</a></li>
                        <li><a href="../../parents/trip.php" title="TRIP">TRIP</a></li>
                        <li><a href="../../parents/tuitionhelp.php" title="Tuition Assistance">Tuition Assistance</a></li>
                        <li><a href="https://rodlanapps.com/cgi-bin/WAV/acntview.cgi#ec1ARgw69U54eHh4" title="Lunch Account" class="external">Lunch Account</a></li>
                        <li><a href="../../assets/pdf/ReducedLunchApplication.pdf" title="Free or Reduced Lunch Application" class="external">Free &amp; Reduced Lunch Application</a></li>
                        <li><a href="https://schoolalerts.iowa.gov/10194-School_Alerts/index.jsp" title="School Alerts" class="external">School Alerts</a></li>
                      </ul>
                    </li>
                    <li id="donate"><a href="#" class="MenuBarItemSubmenu navborder">Donate</a>
                      <ul>
                        <li><a href="../../donate/logsto.php" title="LOG/STO">LOG/STO</a></li>
                        <li><a href="../../donate/scholarships.php" title="Scholarships">Scholarships</a></li>
                        <li><a href="../../donate/endowment.php" title="Endowment">Endowment</a></li>
                        <li><a href="../../donate/support.php" title="Matching Gift Employers">Matching Gift Employers</a></li>
                      </ul>
                    </li>
                    <li id="fundraising"><a href="../../fundraising.php" title="Fundraising" class="navborder">Fundraising</a></li>
                    <li id="links"><a href="../../links.php" title="Links" class="navborder">Links</a></li>
                    <li id="contact"><a href="#" title="Contact" class="navborderend">Contact</a>
                      <ul>
                          <li><a href="../../contact/contact.php" title="School Contact">School</a></li>
                        <li><a href="http://maps.google.com/maps?q=12629+S+92nd+Ave+E,+Sully,+IA&hl=en&sll=37.0625,-95.677068&sspn=41.767874,71.455078&z=16" title="School Map" class="external">Find Us</a></li>
                        <li><a href="../../contact/staffdirectory.php" title="School Directory">School Directory</a></li>
                        <li><a href="../../contact/employment.php" title="Employment">Employment</a></li>
                      </ul>
                    </li>
            </ul>
            </div>
            <div class="navBlack"></div>
          <div id="main">
              <div id="maincontent">
                  <div id="pageContent">
                      <!-- InstanceBeginEditable name="Content" -->
                        <?php echo $error?>
                    <!-- InstanceEndEditable -->
                  </div> <!-- end pagecontent -->
                  <div id="rightside">
                      <div id="infoBox">
                        <h3>Quick Links</h3>
                        <ul class="quicklink">
                            <li><a href="../../index.php" title="Home">Home</a></li>
                            <li><a href="../../calendar.php" title="School Calendar">School Calendar</a></li>
                            <li><a href="https://rodlanapps.com/cgi-bin/WAV/acntview.cgi#ec1ARgw69U54eHh4" title="School Lunch Account" class="external">School Lunch Account</a></li>
                            <li><a href="../../parents/trip.php" title="TRIP">TRIP</a></li>
                            <li><a href="../../newsletter.php" title="Newsletters">Newsletters</a></li>
                            <li><a href="http://www.schoolnet8.com/site.phtml?station=SSUI4&station2=SCSI4" title="Weather Station" class="external">Weather Station</a></li>
                            <li><a href="https://schoolalerts.iowa.gov/10194-School_Alerts/index.jsp" title="School Alerts" class="external">School Alerts</a></li>
                            <li><a href="https://picasaweb.google.com/sullychristian05" title="Recent Event Pictures" class="external">Recent Event Pictures</a></li>
                        </ul>
                        <h3>Upcoming Events</h3>
                        <ul>
                            <?php
                                $fields 
    'datetext';
                                
    $table_name 'schedule';
                                
    $results GetSchedule($o_Db$table_name$fields);
                                foreach(
    $results as $array) {
                                    foreach(
    $array as $schedule) {
                                        echo
    "<li>$schedule</li>";
                                    }
                                } 
                            
    ?>
                        </ul>
                  <h3>Contact Information</h3>
                  <p>12629 S 92nd Ave E<br />
                  Sully, IA 50251</p>
                  <p>Phone: 641-594-4180<br>
                    Fax: 641-594-3799
                  </p>
                  <p>Email: <a href="mailto:lloftus@sullychristian.org" title="Mail Sully Christian">lloftus@sullychristian.org</a></p>
                  <div id="cse-search-form" style="width: 100%;">Loading</div>
    <script src="http://www.google.com/jsapi" type="text/javascript"></script>
    <script type="text/javascript"> 
      google.load('search', '1', {language : 'en'});
      google.setOnLoadCallback(function() {
        var customSearchControl = new google.search.CustomSearchControl('008298257734023449732:eesga3goiha');
        customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
        var options = new google.search.DrawOptions();
        options.enableSearchboxOnly("http://www.google.com/cse?cx=008298257734023449732:eesga3goiha", null, true);
        customSearchControl.draw('cse-search-form', options);
      }, true);
    </script>
    <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
    <style type="text/css">
      input.gsc-input {
        border-color: #a52a2a;
      }
      input.gsc-search-button {
        border-color: #666666;
        background-color: #CECECE;
      }
    </style>
          
                      </div> <!-- End infobox -->
                  </div> <!-- End rightside -->
              </div> <!-- End maincontent -->
          </div> <!-- End main -->       
    <div id="footer">Sully Christian Grade School &nbsp;|&nbsp; 12629 S 92nd Ave E &nbsp;|&nbsp; Sully, IA 50251 &nbsp;|&nbsp; 641-594-4180</div>
    </div> <!-- End masterpage -->
    <script src="../../assets/js/links.js"></script>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"", imgRight:""});
    </script>
    <!--<script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-1841699-24']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

    </script>-->
    </body>
    <!-- InstanceEnd --></html>
    <?php
    function GetData(PDO $o_Db$table_name$fields){
      if(!
    $o_Db || !$table_name || !fields){
        throw new 
    exception('GetData(PDO $o_Db, string $table_name, array or string $fields. You did not pass one of the variables');
      }
      if(
    is_array($fields)){
        
    $fields_count count($fields);
        
    $i 1;
        
    $sql_fields null;
        foreach(
    $fields as $value){
          if(
    $i $fields_count){
            
    $sql_fields .= "$value, ";
          } else {
            
    $sql_fields .= "$value";
          }
          
    $i++;
        }
      } else {
        
    $sql_fields htmlentities($fields);
      }
      
    $table_name htmlentities($table_name);

      
    $sql "SELECT datetext FROM schedule";
      
    $stmt $o_Db->prepare($sql);
      
    $stmt->execute();
      return 
    $stmt->fetchAll(PDO::FETCH_ASSOC); 
      }
    ?>
    scheduleform.php
    PHP Code:
    <?php
    include_once '../../assets/includes/helpers.php';
    require_once 
    '../../assets/includes/DbFactory.php';
    require_once 
    '../../assets/includes/getschedule.php';

    echo 
    getcwd();
    ?>

    <!doctype html>
    <html lang="en"><!-- InstanceBegin template="/Templates/mainp.dwt.php" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta charset="utf-8">
            <!-- InstanceBeginEditable name="doctitle" -->
            <title>Sully Christian Grade School <?php htmlout($pagetitle); ?></title>
            <!-- InstanceEndEditable -->
            <script src="../../assets/js/jquery-1.5.min.js"></script>
            <!-- InstanceBeginEditable name="head" -->
            <link href="../../assets/admin.css">
            <!-- InstanceEndEditable -->
            
    <link href="../../assets/scs20.css" rel="stylesheet" type="text/css">
    <script src="../../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

        <!--[if lt IE 8]>
                <link href="http://www.sullychristian.org/assets/oldie.css" rel="stylesheet" type="text/css">
        <![endif]-->
    <link href="../../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
    </head>
        
    <body>
      <div id="masterpage">
            <div id="header">
                <img src="../../assets/images/site/banner-150.jpg" alt="Sully Christian Grade School" width="1024" height="150">
      </div>
            <div class="navBlack"></div>
              <div id="nav">
            <ul id="MenuBar1" class="MenuBarHorizontal">
                    <li id="home"><a href="../../index.php" class="navborder" title="Home">Home</a></li>
                    <li id="about"><a href="#" title="About" class="MenuBarItemSubmenu navborder">About</a>
                        <ul>
                            <li><a href="../../about/mission.php" title="Mission Statement">Mission Statement</a></li>
                            <li><a href="../../about/quickfacts.php" title="Quick Facts">Quick Facts</a></li>
                            <li><a href="../../about/faculty.php" title="Faculty">Faculty</a></li>
                            <li><a href="../../about/board.php" title="Board">Board</a></li>
                            <li><a href="../../about/committees.php" title="Committees">Committees</a></li>
                            <li><a href="../../about/history.php" title="History">History</a></li>
                      </ul>
                    </li>
                    <li id="academics"><a href="#" class="MenuBarItemSubmenu navborder">Academics</a>
                      <ul>
                          <li><a href="../../academics/classrooms.php" title="Classrooms">Classroooms</a></li>
                        <li><a href="../../academics/itbs.php" title="ITBS Scores">ITBS Scores</a></li>
                        <li><a href="../../academics/iacore.php" title="Iowa Core">Iowa Core</a></li>
                      </ul>
                    </li>
                    <li id="calendars"><a class="MenuBarItemSubmenu navborder" href="#">Calendars</a>
                      <ul>
                          <li><a href="../../calendar.php" title="Main Calendar">Main Calendar</a></li>
                        <li><a href="../../assets/pdf/calendars/academiccalendar.pdf" title="Academic Calendar" class="external">Academic</a></li>
                        <li><a href="../../assets/pdf/calendars/schoolcalendar.pdf" title="School Calendar" class="external">School</a></li>
                        <li><a href="../../assets/pdf/calendars/lunch.pdf" title="Lunch" class="external">Lunch</a></li>
                        <li><a href="../../assets/pdf/calendars/sportsschedule.pdf" title="Athletic" class="external">Athletic</a></li>
                    </ul>
                  </li>
                  <li id="news"><a href="#" class="MenuBarItemSubmenu navborder">News</a>
                     <ul>
                       <li><a href="../../assets/pdf/newsletter/scsnewsletter/scsnewsletter.pdf" title="SCS Newsletter" class="external">SCS Newsletter</a></li>
                       <li><a href="../../assets/pdf/newsletter/bitspieces/bitspieces.pdf" title="Bits 'n Pieces" class="external">Bits 'n Pieces</a></li>
                       <li><a href="../../newsletter.php" title="News">Newsletter Archives</a></li>
                     </ul>
                  </li>
                  <li id="athletics"><a href="#" title="Warrior Athletics" class="MenuBarItemSubmenu navborder">Warrior Athletics</a>
                        <ul>
                          <li><a href="../../athletics/athletics.php" title="Warrior Athletics">Athletics</a></li>
                          <li><a href="../../assets/pdf/forms/physicalform.pdf" title="Physical Form" class="external">Physical Form</a></li>
                        <li><a href="../../assets/pdf/calendars/sportsschedule.pdf" title="Schedule" class="external">Schedule</a></li>
                        <li><a href="../../athletics/scores.php" title="Scores">Scores</a></li>
                        <li><a href="../../athletics/directions.php" title="Directions">Directions</a></li>
                      </ul>
                    </li>
                    <li id="parents"><a href="#" class="MenuBarItemSubmenu navborder">Parents</a>
                      <ul>
                          <li><a href="../../assets/pdf/newsevents/parenthandbook.pdf" title="Parent Handbook" class="external">Parent Handbook</a></li>
                        <li><a href="../../assets/pdf/newsevents/supplylist.pdf" title="School Supply List" class="external">School Supply List</a></li>
                        <li><a href="../../parents/trip.php" title="TRIP">TRIP</a></li>
                        <li><a href="../../parents/tuitionhelp.php" title="Tuition Assistance">Tuition Assistance</a></li>
                        <li><a href="https://rodlanapps.com/cgi-bin/WAV/acntview.cgi#ec1ARgw69U54eHh4" title="Lunch Account" class="external">Lunch Account</a></li>
                        <li><a href="../../assets/pdf/ReducedLunchApplication.pdf" title="Free or Reduced Lunch Application" class="external">Free &amp; Reduced Lunch Application</a></li>
                        <li><a href="https://schoolalerts.iowa.gov/10194-School_Alerts/index.jsp" title="School Alerts" class="external">School Alerts</a></li>
                      </ul>
                    </li>
                    <li id="donate"><a href="#" class="MenuBarItemSubmenu navborder">Donate</a>
                      <ul>
                        <li><a href="../../donate/logsto.php" title="LOG/STO">LOG/STO</a></li>
                        <li><a href="../../donate/scholarships.php" title="Scholarships">Scholarships</a></li>
                        <li><a href="../../donate/endowment.php" title="Endowment">Endowment</a></li>
                        <li><a href="../../donate/support.php" title="Matching Gift Employers">Matching Gift Employers</a></li>
                      </ul>
                    </li>
                    <li id="fundraising"><a href="../../fundraising.php" title="Fundraising" class="navborder">Fundraising</a></li>
                    <li id="links"><a href="../../links.php" title="Links" class="navborder">Links</a></li>
                    <li id="contact"><a href="#" title="Contact" class="navborderend">Contact</a>
                      <ul>
                          <li><a href="../../contact/contact.php" title="School Contact">School</a></li>
                        <li><a href="http://maps.google.com/maps?q=12629+S+92nd+Ave+E,+Sully,+IA&hl=en&sll=37.0625,-95.677068&sspn=41.767874,71.455078&z=16" title="School Map" class="external">Find Us</a></li>
                        <li><a href="../../contact/staffdirectory.php" title="School Directory">School Directory</a></li>
                        <li><a href="../../contact/employment.php" title="Employment">Employment</a></li>
                      </ul>
                    </li>
            </ul>
            </div>
            <div class="navBlack"></div>
          <div id="main">
              <div id="maincontent">
                  <div id="pageContent">
                      <!-- InstanceBeginEditable name="Content" -->
                    <h1><?php htmlout($pagetitle); ?></h1>
                    <form action="../?<?php htmlout($action); ?>" method="post">
                        <div>
                            <label for="datetext">Event: <input name="datetext" type="text" id="datetext" value="<?php htmlout($datetext); ?>" size="40"></label>
                        </div>
                        <div>
                            <input type="hidden" name="id" value="<?php htmlout($id); ?>">
                            <input type="submit" value="<?php htmlout($button); ?>">
                        </div>
                    </form>
                    <!-- InstanceEndEditable -->
                  </div> <!-- end pagecontent -->
                  <div id="rightside">
                      <div id="infoBox">
                        <h3>Quick Links</h3>
                        <ul class="quicklink">
                            <li><a href="../../index.php" title="Home">Home</a></li>
                            <li><a href="../../calendar.php" title="School Calendar">School Calendar</a></li>
                            <li><a href="https://rodlanapps.com/cgi-bin/WAV/acntview.cgi#ec1ARgw69U54eHh4" title="School Lunch Account" class="external">School Lunch Account</a></li>
                            <li><a href="../../parents/trip.php" title="TRIP">TRIP</a></li>
                            <li><a href="../../newsletter.php" title="Newsletters">Newsletters</a></li>
                            <li><a href="http://www.schoolnet8.com/site.phtml?station=SSUI4&station2=SCSI4" title="Weather Station" class="external">Weather Station</a></li>
                            <li><a href="https://schoolalerts.iowa.gov/10194-School_Alerts/index.jsp" title="School Alerts" class="external">School Alerts</a></li>
                            <li><a href="https://picasaweb.google.com/sullychristian05" title="Recent Event Pictures" class="external">Recent Event Pictures</a></li>
                        </ul>
                        <h3>Upcoming Events</h3>
                        <ul>
                            <?php
                                $fields 
    'datetext';
                                
    $table_name 'schedule';
                                
    $results GetSchedule($o_Db$table_name$fields);
                                foreach(
    $results as $array) {
                                    foreach(
    $array as $schedule) {
                                        echo
    "<li>$schedule</li>";
                                    }
                                } 
                            
    ?>
                        </ul>
                  <h3>Contact Information</h3>
                  <p>12629 S 92nd Ave E<br />
                  Sully, IA 50251</p>
                  <p>Phone: 641-594-4180<br>
                    Fax: 641-594-3799
                  </p>
                  <p>Email: <a href="mailto:lloftus@sullychristian.org" title="Mail Sully Christian">lloftus@sullychristian.org</a></p>
                  <div id="cse-search-form" style="width: 100%;">Loading</div>
    <script src="http://www.google.com/jsapi" type="text/javascript"></script>
    <script type="text/javascript"> 
      google.load('search', '1', {language : 'en'});
      google.setOnLoadCallback(function() {
        var customSearchControl = new google.search.CustomSearchControl('008298257734023449732:eesga3goiha');
        customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
        var options = new google.search.DrawOptions();
        options.enableSearchboxOnly("http://www.google.com/cse?cx=008298257734023449732:eesga3goiha", null, true);
        customSearchControl.draw('cse-search-form', options);
      }, true);
    </script>
    <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
    <style type="text/css">
      input.gsc-input {
        border-color: #a52a2a;
      }
      input.gsc-search-button {
        border-color: #666666;
        background-color: #CECECE;
      }
    </style>
          
                      </div> <!-- End infobox -->
                  </div> <!-- End rightside -->
              </div> <!-- End maincontent -->
          </div> <!-- End main -->       
    <div id="footer">Sully Christian Grade School &nbsp;|&nbsp; 12629 S 92nd Ave E &nbsp;|&nbsp; Sully, IA 50251 &nbsp;|&nbsp; 641-594-4180</div>
    </div> <!-- End masterpage -->
    <script src="../../assets/js/links.js"></script>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"", imgRight:""});
    </script>
    <!--<script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-1841699-24']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

    </script>-->
    </body>
    <!-- InstanceEnd --></html>
    schedule.php
    PHP Code:
    <?php
        
    include_once '../../assets/includes/helpers.php';
        require_once 
    '../../assets/includes/DbFactory.php';
        require_once 
    '../../assets/includes/getschedule.php';
        
        echo 
    getcwd();
    ?>
    <!doctype html>
    <html lang="en"><!-- InstanceBegin template="/Templates/mainp.dwt.php" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta charset="utf-8">
            <!-- InstanceBeginEditable name="doctitle" -->
            <meta charset="utf-8">
            
        <!-- InstanceEndEditable -->
            <script src="../../assets/js/jquery-1.5.min.js"></script>
            <!-- InstanceBeginEditable name="head" -->
            <link href="../../assets/admin.css">
            <!-- InstanceEndEditable -->
            
    <link href="../../assets/scs20.css" rel="stylesheet" type="text/css">
    <script src="../../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

        <!--[if lt IE 8]>
                <link href="http://www.sullychristian.org/assets/oldie.css" rel="stylesheet" type="text/css">
        <![endif]-->
    <link href="../../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
    </head>
        
    <body>
      <div id="masterpage">
            <div id="header">
                <img src="../../assets/images/site/banner-150.jpg" alt="Sully Christian Grade School" width="1024" height="150">
      </div>
            <div class="navBlack"></div>
              <div id="nav">
            <ul id="MenuBar1" class="MenuBarHorizontal">
                    <li id="home"><a href="../../index.php" class="navborder" title="Home">Home</a></li>
                    <li id="about"><a href="#" title="About" class="MenuBarItemSubmenu navborder">About</a>
                        <ul>
                            <li><a href="../../about/mission.php" title="Mission Statement">Mission Statement</a></li>
                            <li><a href="../../about/quickfacts.php" title="Quick Facts">Quick Facts</a></li>
                            <li><a href="../../about/faculty.php" title="Faculty">Faculty</a></li>
                            <li><a href="../../about/board.php" title="Board">Board</a></li>
                            <li><a href="../../about/committees.php" title="Committees">Committees</a></li>
                            <li><a href="../../about/history.php" title="History">History</a></li>
                      </ul>
                    </li>
                    <li id="academics"><a href="#" class="MenuBarItemSubmenu navborder">Academics</a>
                      <ul>
                          <li><a href="../../academics/classrooms.php" title="Classrooms">Classroooms</a></li>
                        <li><a href="../../academics/itbs.php" title="ITBS Scores">ITBS Scores</a></li>
                        <li><a href="../../academics/iacore.php" title="Iowa Core">Iowa Core</a></li>
                      </ul>
                    </li>
                    <li id="calendars"><a class="MenuBarItemSubmenu navborder" href="#">Calendars</a>
                      <ul>
                          <li><a href="../../calendar.php" title="Main Calendar">Main Calendar</a></li>
                        <li><a href="../../assets/pdf/calendars/academiccalendar.pdf" title="Academic Calendar" class="external">Academic</a></li>
                        <li><a href="../../assets/pdf/calendars/schoolcalendar.pdf" title="School Calendar" class="external">School</a></li>
                        <li><a href="../../assets/pdf/calendars/lunch.pdf" title="Lunch" class="external">Lunch</a></li>
                        <li><a href="../../assets/pdf/calendars/sportsschedule.pdf" title="Athletic" class="external">Athletic</a></li>
                    </ul>
                  </li>
                  <li id="news"><a href="#" class="MenuBarItemSubmenu navborder">News</a>
                     <ul>
                       <li><a href="../../assets/pdf/newsletter/scsnewsletter/scsnewsletter.pdf" title="SCS Newsletter" class="external">SCS Newsletter</a></li>
                       <li><a href="../../assets/pdf/newsletter/bitspieces/bitspieces.pdf" title="Bits 'n Pieces" class="external">Bits 'n Pieces</a></li>
                       <li><a href="../../newsletter.php" title="News">Newsletter Archives</a></li>
                     </ul>
                  </li>
                  <li id="athletics"><a href="#" title="Warrior Athletics" class="MenuBarItemSubmenu navborder">Warrior Athletics</a>
                        <ul>
                          <li><a href="../../athletics/athletics.php" title="Warrior Athletics">Athletics</a></li>
                          <li><a href="../../assets/pdf/forms/physicalform.pdf" title="Physical Form" class="external">Physical Form</a></li>
                        <li><a href="../../assets/pdf/calendars/sportsschedule.pdf" title="Schedule" class="external">Schedule</a></li>
                        <li><a href="../../athletics/scores.php" title="Scores">Scores</a></li>
                        <li><a href="../../athletics/directions.php" title="Directions">Directions</a></li>
                      </ul>
                    </li>
                    <li id="parents"><a href="#" class="MenuBarItemSubmenu navborder">Parents</a>
                      <ul>
                          <li><a href="../../assets/pdf/newsevents/parenthandbook.pdf" title="Parent Handbook" class="external">Parent Handbook</a></li>
                        <li><a href="../../assets/pdf/newsevents/supplylist.pdf" title="School Supply List" class="external">School Supply List</a></li>
                        <li><a href="../../parents/trip.php" title="TRIP">TRIP</a></li>
                        <li><a href="../../parents/tuitionhelp.php" title="Tuition Assistance">Tuition Assistance</a></li>
                        <li><a href="https://rodlanapps.com/cgi-bin/WAV/acntview.cgi#ec1ARgw69U54eHh4" title="Lunch Account" class="external">Lunch Account</a></li>
                        <li><a href="../../assets/pdf/ReducedLunchApplication.pdf" title="Free or Reduced Lunch Application" class="external">Free &amp; Reduced Lunch Application</a></li>
                        <li><a href="https://schoolalerts.iowa.gov/10194-School_Alerts/index.jsp" title="School Alerts" class="external">School Alerts</a></li>
                      </ul>
                    </li>
                    <li id="donate"><a href="#" class="MenuBarItemSubmenu navborder">Donate</a>
                      <ul>
                        <li><a href="../../donate/logsto.php" title="LOG/STO">LOG/STO</a></li>
                        <li><a href="../../donate/scholarships.php" title="Scholarships">Scholarships</a></li>
                        <li><a href="../../donate/endowment.php" title="Endowment">Endowment</a></li>
                        <li><a href="../../donate/support.php" title="Matching Gift Employers">Matching Gift Employers</a></li>
                      </ul>
                    </li>
                    <li id="fundraising"><a href="../../fundraising.php" title="Fundraising" class="navborder">Fundraising</a></li>
                    <li id="links"><a href="../../links.php" title="Links" class="navborder">Links</a></li>
                    <li id="contact"><a href="#" title="Contact" class="navborderend">Contact</a>
                      <ul>
                          <li><a href="../../contact/contact.php" title="School Contact">School</a></li>
                        <li><a href="http://maps.google.com/maps?q=12629+S+92nd+Ave+E,+Sully,+IA&hl=en&sll=37.0625,-95.677068&sspn=41.767874,71.455078&z=16" title="School Map" class="external">Find Us</a></li>
                        <li><a href="../../contact/staffdirectory.php" title="School Directory">School Directory</a></li>
                        <li><a href="../../contact/employment.php" title="Employment">Employment</a></li>
                      </ul>
                    </li>
            </ul>
            </div>
            <div class="navBlack"></div>
          <div id="main">
              <div id="maincontent">
                  <div id="pageContent">
                      <!-- InstanceBeginEditable name="Content" -->
            <h1>Schedule Manager</h1>
            <p><a href="../?addschedule">Add schedule item</a></p>
            <ul>
                <?php foreach ($dates as $date): ?>
                <li>
                    <form action="" method="post">
                        <div>
                            <?php htmlout($date['datetext']); ?>
                            <input type="hidden" name="id" value="<?php echo $date['id']; ?>">
                            <input type="submit" name="action" value="Edit">
                            <input type="submit" name="action" value="Delete">
                        </div>
                    </form>
                </li>
                <?php endforeach; ?>
            </ul>
        <!-- InstanceEndEditable -->
                  </div> <!-- end pagecontent -->
                  <div id="rightside">
                      <div id="infoBox">
                        <h3>Quick Links</h3>
                        <ul class="quicklink">
                            <li><a href="../../index.php" title="Home">Home</a></li>
                            <li><a href="../../calendar.php" title="School Calendar">School Calendar</a></li>
                            <li><a href="https://rodlanapps.com/cgi-bin/WAV/acntview.cgi#ec1ARgw69U54eHh4" title="School Lunch Account" class="external">School Lunch Account</a></li>
                            <li><a href="../../parents/trip.php" title="TRIP">TRIP</a></li>
                            <li><a href="../../newsletter.php" title="Newsletters">Newsletters</a></li>
                            <li><a href="http://www.schoolnet8.com/site.phtml?station=SSUI4&station2=SCSI4" title="Weather Station" class="external">Weather Station</a></li>
                            <li><a href="https://schoolalerts.iowa.gov/10194-School_Alerts/index.jsp" title="School Alerts" class="external">School Alerts</a></li>
                            <li><a href="https://picasaweb.google.com/sullychristian05" title="Recent Event Pictures" class="external">Recent Event Pictures</a></li>
                        </ul>
                        <h3>Upcoming Events</h3>
                        <ul>
                            <?php
                                $fields 
    'datetext';
                                
    $table_name 'schedule';
                                
    $results GetSchedule($o_Db$table_name$fields);
                                foreach(
    $results as $array) {
                                    foreach(
    $array as $schedule) {
                                        echo
    "<li>$schedule</li>";
                                    }
                                } 
                            
    ?>
                        </ul>
                  <h3>Contact Information</h3>
                  <p>12629 S 92nd Ave E<br />
                  Sully, IA 50251</p>
                  <p>Phone: 641-594-4180<br>
                    Fax: 641-594-3799
                  </p>
                  <p>Email: <a href="mailto:lloftus@sullychristian.org" title="Mail Sully Christian">lloftus@sullychristian.org</a></p>
                  <div id="cse-search-form" style="width: 100%;">Loading</div>
    <script src="http://www.google.com/jsapi" type="text/javascript"></script>
    <script type="text/javascript"> 
      google.load('search', '1', {language : 'en'});
      google.setOnLoadCallback(function() {
        var customSearchControl = new google.search.CustomSearchControl('008298257734023449732:eesga3goiha');
        customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
        var options = new google.search.DrawOptions();
        options.enableSearchboxOnly("http://www.google.com/cse?cx=008298257734023449732:eesga3goiha", null, true);
        customSearchControl.draw('cse-search-form', options);
      }, true);
    </script>
    <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
    <style type="text/css">
      input.gsc-input {
        border-color: #a52a2a;
      }
      input.gsc-search-button {
        border-color: #666666;
        background-color: #CECECE;
      }
    </style>
          
                      </div> <!-- End infobox -->
                  </div> <!-- End rightside -->
              </div> <!-- End maincontent -->
          </div> <!-- End main -->       
    <div id="footer">Sully Christian Grade School &nbsp;|&nbsp; 12629 S 92nd Ave E &nbsp;|&nbsp; Sully, IA 50251 &nbsp;|&nbsp; 641-594-4180</div>
    </div> <!-- End masterpage -->
    <script src="../../assets/js/links.js"></script>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"", imgRight:""});
    </script>
    <!--<script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-1841699-24']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

    </script>-->
    </body>
    <!-- InstanceEnd --></html>
    admin/index.php
    PHP Code:
    <?php
        
    require_once '../assets/includes/DbFactory.php';
        require_once 
    '../assets/includes/getschedule.php';
    ?>
    <!doctype html>
    <html lang="en"><!-- InstanceBegin template="/Templates/mainp.dwt.php" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta charset="utf-8">
            <!-- InstanceBeginEditable name="doctitle" -->
            <title>Sully Christian Grade School Content Management System</title>
            <!-- InstanceEndEditable -->
            <script src="../assets/js/jquery-1.5.min.js"></script>
            <!-- InstanceBeginEditable name="head" -->
            <!-- InstanceEndEditable -->
            
    <link href="../assets/scs20.css" rel="stylesheet" type="text/css">
    <script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

        <!--[if lt IE 8]>
                <link href="http://www.sullychristian.org/assets/oldie.css" rel="stylesheet" type="text/css">
        <![endif]-->
    <link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
    </head>
        
    <body>
      <div id="masterpage">
            <div id="header">
                <img src="../assets/images/site/banner-150.jpg" alt="Sully Christian Grade School" width="1024" height="150">
      </div>
            <div class="navBlack"></div>
              <div id="nav">
            <ul id="MenuBar1" class="MenuBarHorizontal">
                    <li id="home"><a href="../index.php" class="navborder" title="Home">Home</a></li>
                    <li id="about"><a href="#" title="About" class="MenuBarItemSubmenu navborder">About</a>
                        <ul>
                            <li><a href="../about/mission.php" title="Mission Statement">Mission Statement</a></li>
                            <li><a href="../about/quickfacts.php" title="Quick Facts">Quick Facts</a></li>
                            <li><a href="../about/faculty.php" title="Faculty">Faculty</a></li>
                            <li><a href="../about/board.php" title="Board">Board</a></li>
                            <li><a href="../about/committees.php" title="Committees">Committees</a></li>
                            <li><a href="../about/history.php" title="History">History</a></li>
                      </ul>
                    </li>
                    <li id="academics"><a href="#" class="MenuBarItemSubmenu navborder">Academics</a>
                      <ul>
                          <li><a href="../academics/classrooms.php" title="Classrooms">Classroooms</a></li>
                        <li><a href="../academics/itbs.php" title="ITBS Scores">ITBS Scores</a></li>
                        <li><a href="../academics/iacore.php" title="Iowa Core">Iowa Core</a></li>
                      </ul>
                    </li>
                    <li id="calendars"><a class="MenuBarItemSubmenu navborder" href="#">Calendars</a>
                      <ul>
                          <li><a href="../calendar.php" title="Main Calendar">Main Calendar</a></li>
                        <li><a href="../assets/pdf/calendars/academiccalendar.pdf" title="Academic Calendar" class="external">Academic</a></li>
                        <li><a href="../assets/pdf/calendars/schoolcalendar.pdf" title="School Calendar" class="external">School</a></li>
                        <li><a href="../assets/pdf/calendars/lunch.pdf" title="Lunch" class="external">Lunch</a></li>
                        <li><a href="../assets/pdf/calendars/sportsschedule.pdf" title="Athletic" class="external">Athletic</a></li>
                    </ul>
                  </li>
                  <li id="news"><a href="#" class="MenuBarItemSubmenu navborder">News</a>
                     <ul>
                       <li><a href="../assets/pdf/newsletter/scsnewsletter/scsnewsletter.pdf" title="SCS Newsletter" class="external">SCS Newsletter</a></li>
                       <li><a href="../assets/pdf/newsletter/bitspieces/bitspieces.pdf" title="Bits 'n Pieces" class="external">Bits 'n Pieces</a></li>
                       <li><a href="../newsletter.php" title="News">Newsletter Archives</a></li>
                     </ul>
                  </li>
                  <li id="athletics"><a href="#" title="Warrior Athletics" class="MenuBarItemSubmenu navborder">Warrior Athletics</a>
                        <ul>
                          <li><a href="../athletics/athletics.php" title="Warrior Athletics">Athletics</a></li>
                          <li><a href="../assets/pdf/forms/physicalform.pdf" title="Physical Form" class="external">Physical Form</a></li>
                        <li><a href="../assets/pdf/calendars/sportsschedule.pdf" title="Schedule" class="external">Schedule</a></li>
                        <li><a href="../athletics/scores.php" title="Scores">Scores</a></li>
                        <li><a href="../athletics/directions.php" title="Directions">Directions</a></li>
                      </ul>
                    </li>
                    <li id="parents"><a href="#" class="MenuBarItemSubmenu navborder">Parents</a>
                      <ul>
                          <li><a href="../assets/pdf/newsevents/parenthandbook.pdf" title="Parent Handbook" class="external">Parent Handbook</a></li>
                        <li><a href="../assets/pdf/newsevents/supplylist.pdf" title="School Supply List" class="external">School Supply List</a></li>
                        <li><a href="../parents/trip.php" title="TRIP">TRIP</a></li>
                        <li><a href="../parents/tuitionhelp.php" title="Tuition Assistance">Tuition Assistance</a></li>
                        <li><a href="https://rodlanapps.com/cgi-bin/WAV/acntview.cgi#ec1ARgw69U54eHh4" title="Lunch Account" class="external">Lunch Account</a></li>
                        <li><a href="../assets/pdf/ReducedLunchApplication.pdf" title="Free or Reduced Lunch Application" class="external">Free &amp; Reduced Lunch Application</a></li>
                        <li><a href="https://schoolalerts.iowa.gov/10194-School_Alerts/index.jsp" title="School Alerts" class="external">School Alerts</a></li>
                      </ul>
                    </li>
                    <li id="donate"><a href="#" class="MenuBarItemSubmenu navborder">Donate</a>
                      <ul>
                        <li><a href="../donate/logsto.php" title="LOG/STO">LOG/STO</a></li>
                        <li><a href="../donate/scholarships.php" title="Scholarships">Scholarships</a></li>
                        <li><a href="../donate/endowment.php" title="Endowment">Endowment</a></li>
                        <li><a href="../donate/support.php" title="Matching Gift Employers">Matching Gift Employers</a></li>
                      </ul>
                    </li>
                    <li id="fundraising"><a href="../fundraising.php" title="Fundraising" class="navborder">Fundraising</a></li>
                    <li id="links"><a href="../links.php" title="Links" class="navborder">Links</a></li>
                    <li id="contact"><a href="#" title="Contact" class="navborderend">Contact</a>
                      <ul>
                          <li><a href="../contact/contact.php" title="School Contact">School</a></li>
                        <li><a href="http://maps.google.com/maps?q=12629+S+92nd+Ave+E,+Sully,+IA&hl=en&sll=37.0625,-95.677068&sspn=41.767874,71.455078&z=16" title="School Map" class="external">Find Us</a></li>
                        <li><a href="../contact/staffdirectory.php" title="School Directory">School Directory</a></li>
                        <li><a href="../contact/employment.php" title="Employment">Employment</a></li>
                      </ul>
                    </li>
            </ul>
            </div>
            <div class="navBlack"></div>
          <div id="main">
              <div id="maincontent">
                  <div id="pageContent">
                      <!-- InstanceBeginEditable name="Content" -->
                      <h1>Content Management System</h1>
                      <p>Welcome to the Sully Christian Grade School Content Management System. Please select the area you would like to manage below. Login will be required for each action.</p>
                      <ul>
                          <li><a href="schedule/" title="Manage Upcoming Events">Upcoming Events</a></li>
                          <li><a href="announcements/" title="Manage the Announcements">Announcements</a></li>
                      </ul>
                      <!-- InstanceEndEditable -->
                  </div> <!-- end pagecontent -->
                  <div id="rightside">
                      <div id="infoBox">
                        <h3>Quick Links</h3>
                        <ul class="quicklink">
                            <li><a href="../index.php" title="Home">Home</a></li>
                            <li><a href="../calendar.php" title="School Calendar">School Calendar</a></li>
                            <li><a href="https://rodlanapps.com/cgi-bin/WAV/acntview.cgi#ec1ARgw69U54eHh4" title="School Lunch Account" class="external">School Lunch Account</a></li>
                            <li><a href="../parents/trip.php" title="TRIP">TRIP</a></li>
                            <li><a href="../newsletter.php" title="Newsletters">Newsletters</a></li>
                            <li><a href="http://www.schoolnet8.com/site.phtml?station=SSUI4&station2=SCSI4" title="Weather Station" class="external">Weather Station</a></li>
                            <li><a href="https://schoolalerts.iowa.gov/10194-School_Alerts/index.jsp" title="School Alerts" class="external">School Alerts</a></li>
                            <li><a href="https://picasaweb.google.com/sullychristian05" title="Recent Event Pictures" class="external">Recent Event Pictures</a></li>
                        </ul>
                        <h3>Upcoming Events</h3>
                        <ul>
                            <?php
                                $fields 
    'datetext';
                                
    $table_name 'schedule';
                                
    $results GetSchedule($o_Db$table_name$fields);
                                foreach(
    $results as $array) {
                                    foreach(
    $array as $schedule) {
                                        echo
    "<li>$schedule</li>";
                                    }
                                } 
                            
    ?>
                        </ul>
                  <h3>Contact Information</h3>
                  <p>12629 S 92nd Ave E<br />
                  Sully, IA 50251</p>
                  <p>Phone: 641-594-4180<br>
                    Fax: 641-594-3799
                  </p>
                  <p>Email: <a href="mailto:lloftus@sullychristian.org" title="Mail Sully Christian">lloftus@sullychristian.org</a></p>
                  <div id="cse-search-form" style="width: 100%;">Loading</div>
    <script src="http://www.google.com/jsapi" type="text/javascript"></script>
    <script type="text/javascript"> 
      google.load('search', '1', {language : 'en'});
      google.setOnLoadCallback(function() {
        var customSearchControl = new google.search.CustomSearchControl('008298257734023449732:eesga3goiha');
        customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
        var options = new google.search.DrawOptions();
        options.enableSearchboxOnly("http://www.google.com/cse?cx=008298257734023449732:eesga3goiha", null, true);
        customSearchControl.draw('cse-search-form', options);
      }, true);
    </script>
    <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
    <style type="text/css">
      input.gsc-input {
        border-color: #a52a2a;
      }
      input.gsc-search-button {
        border-color: #666666;
        background-color: #CECECE;
      }
    </style>
          
                      </div> <!-- End infobox -->
                  </div> <!-- End rightside -->
              </div> <!-- End maincontent -->
          </div> <!-- End main -->       
    <div id="footer">Sully Christian Grade School &nbsp;|&nbsp; 12629 S 92nd Ave E &nbsp;|&nbsp; Sully, IA 50251 &nbsp;|&nbsp; 641-594-4180</div>
    </div> <!-- End masterpage -->
    <script src="../assets/js/links.js"></script>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"", imgRight:""});
    </script>
    <!--<script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-1841699-24']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

    </script>-->
    </body>
    <!-- InstanceEnd --></html>

  10. #10
    SitePoint Addict tom8's Avatar
    Join Date
    Mar 2012
    Location
    New Jersey
    Posts
    310
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks for posting them. It is getting late here so I will go through them in the morning.

  11. #11
    SitePoint Addict tom8's Avatar
    Join Date
    Mar 2012
    Location
    New Jersey
    Posts
    310
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It's in the scheduleform.php, line 118:

    <form action="../?<?php htmlout($action); ?>" method="post">

    Take out one . (dot) and it should work. Let me know if you have other issues.

  12. #12
    SitePoint Enthusiast
    Join Date
    May 2008
    Location
    IA
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks tom8, that wasn't quite the entire problem, but you got me looking at the right thing. When you move files within Dreamweaver, it automatically recalculates the links so they continue to work. So in this case, when I moved my completed files to the schedule directory, every link had "../" added to it. This works great for navigation, but not PHP link structure.

    To make everything work, I took out the "../" in scheduleform.php on line 118 and line 116 on schedule.php. Corrected the header(Location: .) to just a dot instead of ./index.php and all is well.

    Now to basically duplicate the schedule editing feature for another area, add login requirements, and this will be finished. Thanks for the help.

  13. #13
    SitePoint Addict tom8's Avatar
    Join Date
    Mar 2012
    Location
    New Jersey
    Posts
    310
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Iím glad I help out, well at least got you looking at the right thing. Let us know if you run into more troubles. Maybe I could point you to the right direction again


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •