Location: PHPKode > projects > ClassroomBookings > Documentation/Classroombookings.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
  <meta name="generator" content=
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org">

  <title>Classroom Bookings</title>
  <meta name="GENERATOR" content=
  "Modular DocBook HTML Stylesheet Version 1.79">
<style type="text/css">
 body {
  background-color: #FFFFFF;
  color: #000000;
 }
 :link { color: #0000FF }
 :visited { color: #840084 }
 :active { color: #0000FF }
 p.c2 {font-weight: bold}
 dt.c1 {font-weight: bold}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>

<body class="book">
  <div class="BOOK">
    <a name="classroombookings-doc" id="classroombookings-doc"></a>

    <div class="TITLEPAGE">
      <h1 class="title"><a name="AEN2" id="AEN2">Classroom
      Bookings</a></h1>

      <h3 class="author"><a name="AEN5" id="AEN5"></a>Craig
      Rodway</h3>
      <hr>
    </div>

    <div class="TOC">
      <dl>
        <dt class="c1">Table of Contents</dt>

        <dt>1. <a href="#ch-intro">Introduction</a></dt>

        <dd>
          <dl>
            <dt>1.1. <a href="#intro-about">What is <span class=
            "productname">Classroombookings</span>?</a></dt>

            <dt>1.2. <a href="#intro-features">Main
            features</a></dt>

            <dt>1.3. <a href="#intro-issues">Known Issues and
            TODOs</a></dt>
          </dl>
        </dd>

        <dt>2. <a href="#install">Installation</a></dt>

        <dd>
          <dl>
            <dt>2.1. <a href=
            "#install-requirements">Requirements</a></dt>

            <dt>2.2. <a href="#install-linux">Installing on
            Linux</a></dt>
          </dl>
        </dd>
      </dl>
    </div>

    <div class="LOT">
      <dl class="LOT">
        <dt class="c1">List of Figures</dt>

        <dt>2-1. <a href="#install-linux-01">The <span class=
        "productname">Classroombookings</span> installation
        page</a></dt>
      </dl>
    </div>

    <div class="chapter">
      <hr>

      <h1><a name="ch-intro" id="ch-intro"></a>Chapter 1.
      Introduction</h1>

      <div class="sect1">
        <h2 class="sect1"><a name="intro-about" id=
        "intro-about">1.1. What is <span class=
        "productname">Classroombookings</span>?</a></h2>

        <p><span class="productname">Classroombookings</span> is an
        open-source web application that has been designed to allow
        school staff to book shared resource rooms such as ICT
        suites and libraries.</p>

        <div class="mediaobject">
          <p><img src="images/timetable-overview.png"></p>

          <div class="caption">
            <p>Timetable view of a single day.</p>
          </div>
        </div>
      </div>

      <div class="sect1">
        <hr>

        <h2 class="sect1"><a name="intro-features" id=
        "intro-features">1.2. Main features</a></h2>

        <p><span class="productname">Classroombookings</span>
        includes many features which make it simple and easy to use
        and customisable to your establishment.</p>

        <ul>
          <li>
            <p><span class="bold"><b class="emphasis">Eliminate
            double-bookings</b></span> - If a room is already
            booked by somebody or is used for a timetabled lesson,
            no one else can book the room for that period. Only
            administrators and room owners can cancel bookings.</p>
          </li>

          <li>
            <p><span class="bold"><b class="emphasis">Unlimited
            rooms and users</b></span> - Manage as many rooms and
            add as many users as you like.</p>
          </li>

          <li>
            <p><span class="bold"><b class=
            "emphasis">Easy-to-use</b></span> - The simplified user
            interface makes all relative information available at a
            glance and makes it easy to see which rooms are
            available to book, and when.</p>
          </li>

          <li>
            <p><span class="bold"><b class="emphasis">Custom
            timetable</b></span> - Not everybody has a single week
            timetable with fixed one-hour lessons. This is why we
            allow administrators to create their own timetable,
            with their own weekly cycle and lesson times to match
            the school.</p>
          </li>

          <li>
            <p><span class="bold"><b class=
            "emphasis">Cross-platform</b></span> - No executables,
            <acronym class="acronym">DLL</acronym>s, runtimes or
            plugins are required. As it's web-based, a modern web
            browser is all that's needed for users to book
            rooms.</p>

            <p>On the server side, <span class=
            "productname">Classroombookings</span> runs best with
            free software - ideally Apache 2 on Linux, but Apache
            on Windows will do just fine.</p>
          </li>
        </ul>
      </div>

      <div class="sect1">
        <hr>

        <h2 class="sect1"><a name="intro-issues" id=
        "intro-issues">1.3. Known Issues and TODOs</a></h2>

        <p>This is a list of the current known issues and features
        yet to be implemented/completed with <span class=
        "productname">Classroombookings</span> that will be
        resolved soon.</p>

        <ul>
          <li>
            <p>Making a one-off (static) booking when viewing the
            timetable a room a time will result in the booking
            being made for the <span class="emphasis"><i class=
            "emphasis">weekday</i></span> of the present date.</p>
          </li>

          <li>
            <p>Inline help is not yet complete.</p>
          </li>

          <li>
            <p>Report-generating is not yet complete.</p>
          </li>

          <li>
            <p>No integration with third-party authentication
            provider (eg. LDAP, Samba)</p>
          </li>

          <li>
            <p>If booking in advance is enabled, holidays are not
            taken into account. For example, booking 14 days in
            advance at the beginning of a 14 day holiday is not
            possible. This will be fixed soon.</p>
          </li>
        </ul>
      </div>
    </div>

    <div class="chapter">
      <hr>

      <h1><a name="install" id="install"></a>Chapter 2.
      Installation</h1>

      <div class="important">
        <table class="important" width="100%" border="0">
          <tr>
            <td width="25" align="center" valign="top"><img src=
            "../images/important.gif" hspace="5" alt=
            "Important"></td>

            <td align="left" valign="top">
              <p><span class="productname">Classroombookings</span>
              has <span class="bold"><b class=
              "emphasis">not</b></span> been tested under IIS or
              any other database provider; and is not
              supported.</p>
            </td>
          </tr>
        </table>
      </div>

      <div class="sect1">
        <hr>

        <h2 class="sect1"><a name="install-requirements" id=
        "install-requirements">2.1. Requirements</a></h2>

        <ul>
          <li>
            <p><span class="productname">Apache</span> web server,
            with mod_rewrite <span class="emphasis"><i class=
            "emphasis">(optional)</i></span></p>
          </li>

          <li>
            <p><span class="productname">PHP</span> version 4 (or
            5, recommended) with GD/GD2 image libraries and
            MySQL.</p>
          </li>

          <li>
            <p><span class="productname">MySQL</span> database
            version 4 or above</p>
          </li>
        </ul>
      </div>

      <div class="sect1">
        <hr>

        <h2 class="sect1"><a name="install-linux" id=
        "install-linux">2.2. Installing on Linux</a></h2>

        <div class="procedure">
          <p>Assuming you have Apache, PHP and MySQL installed with
          the relative modules enabled and configured, proceed with
          installing <span class=
          "productname">Classroombookings</span> following these
          steps.</p>

          <ol type="1">
            <li class="step">
              <p>Log in to MySQL, then create the database and user
              that will be used by <span class=
              "productname">Classroombookings</span>. Don't worry
              about the tables at the moment - they will be set up
              later by the application.</p>
              <pre class="screen">
<samp class="prompt">$</samp> <b class=
"command">mysql -u <tt class="replaceable"><i>root</i></tt> -p</b>
<samp class="prompt">Enter password:</samp>
<samp class="prompt">mysql&gt;</samp> <b class=
"command">CREATE DATABASE <tt class=
"replaceable"><i>crbs</i></tt>;</b>
<samp class="prompt">mysql&gt;</samp> <b class=
"command">GRANT ALL PRIVILEGES ON <tt class=
"replaceable"><i>crbs</i></tt>.* to '<tt class=
"replaceable"><i>crbs_user</i></tt>'@'localhost' IDENTIFIED BY '<tt class="replaceable"><i>password</i></tt>';</b>
</pre>

              <p>Make a note of the database name, username and
              password you set here as you will need these
              later.</p>

              <div class="note">
                <table class="note" width="100%" border="0">
                  <tr>
                    <td width="25" align="center" valign="top">
                    <img src="../images/note.gif" hspace="5" alt=
                    "Note"></td>

                    <td align="left" valign="top">
                      <p>If you prefer, you can use a MySQL
                      management tool such as <span class=
                      "productname"><a href=
                      "http://www.phpmyadmin.net/" target=
                      "_top">phpMyAdmin</a></span> to complete the
                      above operations.</p>
                    </td>
                  </tr>
                </table>
              </div>
            </li>

            <li class="step">
              <p>Change to a location in the document root of the
              web server, eg <span class="emphasis"><i class=
              "emphasis">/var/www</i></span> or <span class=
              "emphasis"><i class="emphasis">/home/httpd</i></span>
              and then extract the archive.</p>
              <pre class="screen">
<samp class="prompt">$</samp> <b class="command">cd <tt class=
"replaceable"><i>/var/www</i></tt></b>
<samp class="prompt">$</samp> <b class="command">mkdir <tt class=
"replaceable"><i>classroombookings</i></tt></b>
<samp class="prompt">$</samp> <b class="command">cd <tt class=
"replaceable"><i>classroombookings</i></tt></b>
<samp class="prompt">$</samp> <b class=
"command">tar zxvf <tt class="replaceable"><i>classroombookings-version.tar.gz</i></tt></b>
</pre>
            </li>

            <li class="step">
              <p>You will now need to edit several lines in the
              configuration files:</p>

              <ul>
                <li>
                  <p><tt class=
                  "filename">system/application/config/config.php</tt></p>
                </li>

                <li>
                  <p><tt class=
                  "filename">system/application/config/database.php</tt></p>
                </li>
              </ul>

              <p><span class="bold"><b class="emphasis"><tt class=
              "filename">config.php</tt></b></span></p>
              <pre class="programlisting">
// Full URL to your installation
$config['base_url'] = '<tt class=
"replaceable"><i>http://www.example.com/classroombookings/</i></tt>';

// Empty string if using mod_rewrite in .htaccess
$config['index_page'] = 'index.php';
</pre>

              <p><span class="bold"><b class="emphasis"><tt class=
              "filename">database.php</tt></b></span></p>
              <pre class="programlisting">
$db['default']['hostname'] = '<tt class=
"replaceable"><i>localhost</i></tt>';
$db['default']['username'] = '<tt class=
"replaceable"><i>crbs_user</i></tt>';
$db['default']['password'] = '<tt class=
"replaceable"><i>password</i></tt>';
$db['default']['database'] = '<tt class=
"replaceable"><i>crbs</i></tt>';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['active_r'] = TRUE;
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
</pre>
            </li>

            <li class="step">
              <p><span class="bold"><b class=
              "emphasis">Optional:</b></span> Configure <tt class=
              "filename">.htaccess</tt> for mod_rewrite. All you
              need to do is change the URL to reflect where
              <span class="productname">Classroombookings</span> is
              installed with a leading and trailing
              forward-slash.</p>

              <p>For example, if <span class=
              "productname">Classroombookings</span> was installed
              at <span class=
              "systemitem">http://www.example.com/classroombookings/</span>
              then you need to change the <span class=
              "emphasis"><i class="emphasis">RewriteBase</i></span>
              to reflect the installation path. If you aren't using
              a subdirectory, just leave a single
              forward-slash.</p>
              <pre class="programlisting">
&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
RewriteBase /<tt class="replaceable"><i>classroombookings</i></tt>/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
&lt;/IfModule&gt;
</pre>
            </li>

            <li class="step">
              <p>The next step involves applying writable
              permissions to several directories in your
              installation to allow Apache to upload files to them
              (images, CSV files etc).</p>
              <pre class="screen">
<samp class="prompt">$</samp> <b class="command">cd <tt class=
"replaceable"><i>/var/www/classroombookings/</i></tt></b>
<samp class="prompt">$</samp> <b class=
"command">chmod -R 775 webroot/images/roomphotos</b>
<samp class="prompt">$</samp> <b class=
"command">chmod -R 775 webroot/images/schoollogo</b>
<samp class="prompt">$</samp> <b class=
"command">chmod -R 775 webroot/images/bg</b>
<samp class="prompt">$</samp> <b class=
"command">chmod -R 775 system/cache</b>
<samp class="prompt">$</samp> <b class=
"command">chmod -R 775 temp</b>
</pre>

              <div class="note">
                <table class="note" width="100%" border="0">
                  <tr>
                    <td width="25" align="center" valign="top">
                    <img src="../images/note.gif" hspace="5" alt=
                    "Note"></td>

                    <td align="left" valign="top">
                      <p>You will probably require root privileges
                      to apply the above permissions. Eg. If you're
                      running Ubuntu, run <span class=
                      "bold"><b class="emphasis">sudo
                      chmod</b></span>.</p>
                    </td>
                  </tr>
                </table>
              </div>
            </li>

            <li class="step">
              <p>Finally, it is time to run the installation
              script.</p>

              <p>Using a web browser, navigate to the web server
              where you installed <span class=
              "productname">Classroombookings</span> to, Eg.
              <span class=
              "systemitem">http://www.example.com/classroombookings/</span>.
              You will be presented with the installation page.</p>

              <div class="figure">
                <a name="install-linux-01" id=
                "install-linux-01"></a>

                <p class="c2">Figure 2-1. The <span class=
                "productname">Classroombookings</span> installation
                page</p>

                <p><img src="images/install01.png"></p>
              </div>

              <p>Fill in the required information (denoted with a
              red asterisk next to the field name) and click
              <span class="guibutton">Install</span>.</p>
            </li>
          </ol>
        </div>
      </div>
    </div>
  </div>
</body>
</html>
Return current item: ClassroomBookings