[phpwebapp-commits] CVS: app3/templates styles.css,1.1.1.1,1.2 page3.html,1.1.1.1,1.2 page2.html,1.1
Brought to you by:
dashohoxha
|
From: Dashamir H. <das...@us...> - 2003-08-26 01:56:34
|
Update of /cvsroot/phpwebapp/app3/templates
In directory sc8-pr-cvs1:/tmp/cvs-serv26666/templates
Modified Files:
styles.css page3.html page2.html page1_content.html page1.html
header.html footer.html
Log Message:
converted CRLF to LF
Index: styles.css
===================================================================
RCS file: /cvsroot/phpwebapp/app3/templates/styles.css,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** styles.css 22 Aug 2003 16:14:25 -0000 1.1.1.1
--- styles.css 25 Aug 2003 14:30:38 -0000 1.2
***************
*** 1,35 ****
! body
! {
! background-color: #efe7d6;
! margin-top: 20px;
! margin-left: 20px;
! margin-right: 20px;
! margin-bottom: 20px;
! font-family: arial, helvetica, sans-se;
! font-size: 12pt;
! color: #000000;
! }
!
! h1, h2
! {
! text-align: center;
! }
!
! h1, h2, h3, h4
! {
! color: #660000;
! }
!
! pre
! {
! background-color: #eeeeee;
! border: 1px solid #0000aa;
! color: #00aa00;
! }
!
! strong
! {
! color: #000066;
! font-size: 14px;
! font-weight: bold
! }
--- 1,35 ----
! body
! {
! background-color: #efe7d6;
! margin-top: 20px;
! margin-left: 20px;
! margin-right: 20px;
! margin-bottom: 20px;
! font-family: arial, helvetica, sans-se;
! font-size: 12pt;
! color: #000000;
! }
!
! h1, h2
! {
! text-align: center;
! }
!
! h1, h2, h3, h4
! {
! color: #660000;
! }
!
! pre
! {
! background-color: #eeeeee;
! border: 1px solid #0000aa;
! color: #00aa00;
! }
!
! strong
! {
! color: #000066;
! font-size: 14px;
! font-weight: bold
! }
Index: page3.html
===================================================================
RCS file: /cvsroot/phpwebapp/app3/templates/page3.html,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** page3.html 22 Aug 2003 16:14:24 -0000 1.1.1.1
--- page3.html 25 Aug 2003 14:30:38 -0000 1.2
***************
*** 1,36 ****
! <html>
! <head>
! <title>Page 3</title>
! <link rel="stylesheet" type="text/css" href="{{./}}styles.css">
! </head>
!
! <body>
! <Include SRC="{{./}}header.html" />
!
! <h3>Optional framework files</h3>
!
! <p>These optional files are used (included) by the framework, if they
! exist. If not, nothing happens (no errors). So, you can use them only
! if you need them.</p>
!
! <dl>
! <dt><strong>init.php</strong></dt>
! <dd>This file is included by the framework only the first time that
! the application is openned (at the beginning of the session).It may
! be used to initialize anything.</dd>
!
! <dt><strong>global.php</strong></dt>
! <dd>This file is included every time, if it exists. It may contain
! functions, constants and variables that are used throughout the
! whole application. </dd>
!
! <dt><strong>before_page.php</strong></dt>
! <dd>This file is included before each page is parsed.</dd>
!
! <dt><strong>after_page.php</strong></dt>
! <dd>This file is included after each page is constructed.</dd>
! </dl>
!
! <Include SRC="{{./}}footer.html" />
! </body>
! </html>
--- 1,36 ----
! <html>
! <head>
! <title>Page 3</title>
! <link rel="stylesheet" type="text/css" href="{{./}}styles.css">
! </head>
!
! <body>
! <Include SRC="{{./}}header.html" />
!
! <h3>Optional framework files</h3>
!
! <p>These optional files are used (included) by the framework, if they
! exist. If not, nothing happens (no errors). So, you can use them only
! if you need them.</p>
!
! <dl>
! <dt><strong>init.php</strong></dt>
! <dd>This file is included by the framework only the first time that
! the application is openned (at the beginning of the session).It may
! be used to initialize anything.</dd>
!
! <dt><strong>global.php</strong></dt>
! <dd>This file is included every time, if it exists. It may contain
! functions, constants and variables that are used throughout the
! whole application. </dd>
!
! <dt><strong>before_page.php</strong></dt>
! <dd>This file is included before each page is parsed.</dd>
!
! <dt><strong>after_page.php</strong></dt>
! <dd>This file is included after each page is constructed.</dd>
! </dl>
!
! <Include SRC="{{./}}footer.html" />
! </body>
! </html>
Index: page2.html
===================================================================
RCS file: /cvsroot/phpwebapp/app3/templates/page2.html,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** page2.html 22 Aug 2003 16:14:25 -0000 1.1.1.1
--- page2.html 25 Aug 2003 14:30:38 -0000 1.2
***************
*** 1,38 ****
! <html>
! <head>
! <title>Page 2</title>
! <link rel="stylesheet" type="text/css" href="{{./}}styles.css">
! <link rel="stylesheet" type="text/css" href="{{TPL_URL}}tip/tip_styles.css">
! </head>
!
! <body>
! <Include SRC="{{./}}header.html" />
!
! <h3>Examples of WebBox-es</h3>
!
! <p>All these examples implement a <em>tip</em> WebBox, which
! displays a random tip (from a list of tips), with a random
! style. They seem to be the same, and even if you view
! the HTML code you may not notice any change, however there are
! some differences in the way that they are implemented. Only the
! last example is implemented properly. Inspect the code to see
! what is wrong with them.</p>
!
! This is a bad example:
! <Include SRC="{{./}}tip/tip1.html" />
! <br>
! This is another bad example:
! <Include SRC="{{./}}tip/tip2.html" />
! <br>
! This is yet another bad example:
! <Include SRC="{{./}}tip/tip3.html" />
! <br>
! This is a terribly bad example:
! <Include SRC="{{./}}tip/tip4.html" />
! <br>
! This is a good example:
! <Include SRC="{{./}}tip/tip.html" />
!
! <Include SRC="{{./}}footer.html" />
! </body>
! </html>
--- 1,38 ----
! <html>
! <head>
! <title>Page 2</title>
! <link rel="stylesheet" type="text/css" href="{{./}}styles.css">
! <link rel="stylesheet" type="text/css" href="{{TPL_URL}}tip/tip_styles.css">
! </head>
!
! <body>
! <Include SRC="{{./}}header.html" />
!
! <h3>Examples of WebBox-es</h3>
!
! <p>All these examples implement a <em>tip</em> WebBox, which
! displays a random tip (from a list of tips), with a random
! style. They seem to be the same, and even if you view
! the HTML code you may not notice any change, however there are
! some differences in the way that they are implemented. Only the
! last example is implemented properly. Inspect the code to see
! what is wrong with them.</p>
!
! This is a bad example:
! <Include SRC="{{./}}tip/tip1.html" />
! <br>
! This is another bad example:
! <Include SRC="{{./}}tip/tip2.html" />
! <br>
! This is yet another bad example:
! <Include SRC="{{./}}tip/tip3.html" />
! <br>
! This is a terribly bad example:
! <Include SRC="{{./}}tip/tip4.html" />
! <br>
! This is a good example:
! <Include SRC="{{./}}tip/tip.html" />
!
! <Include SRC="{{./}}footer.html" />
! </body>
! </html>
Index: page1_content.html
===================================================================
RCS file: /cvsroot/phpwebapp/app3/templates/page1_content.html,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** page1_content.html 22 Aug 2003 16:14:25 -0000 1.1.1.1
--- page1_content.html 25 Aug 2003 14:30:38 -0000 1.2
***************
*** 1,100 ****
! <!--# This file is included inside page1.html #-->
!
! <h3>What is a WebBox</h3>
!
! <p>A WebBox is a template which has also some <em>PHP</em> code associated
! with it. It is a self-contained and independent template which can be easily
! included in other pages or in other applications. In fact, it may also have
! some <em>JavaScript</em> code, <em>CSS</em> stylesheets, <em>SQL</em>
! queries etc., associated with it.</p>
!
! <p>It is denoted by the tag <strong><WebBox></strong> and it has an
! <strong>ID</strong> attribute:</p>
! <pre>
! <WebBox ID="box_id">
! <!-- content of WebBox -->
! </WebBox>
! </pre>
! <p>The identifier must be different for each WebBox used in the
! application.</p>
!
! <h3>The PHP code of the WebBox-es</h3>
!
! <p>The <em>PHP</em> code (as well as <em>JS</em> code, <em>CSS</em>
! styles etc.) are associated to the WebBox by means of
! <strong>box_id</strong>, the identifier of the WebBox. When the
! framework parses a <strong><WebBox></strong> tag, it looks for a
! file named <strong>box_id.php</strong> in the same folder where the
! WebBox template is. If it finds such a file, it includes it.</p>
!
! <p>The <strong>box_id.php</strong> file must contain the definition
! of a <em>PHP</em> class that extends the class <strong>WebObject</strong>,
! like this:</p>
! <pre>
! <?php
! class <strong>box_id</strong> extends <strong>WebObject</strong>
! {
! .
! .
! .
! }
! ?>
! </pre>
!
! <p>The class <strong>WebObject</strong> is defined by the framework.
! Among other things, it also contains the member function
! <strong>WebObject::onRender()</strong>.</p>
!
! <h3>The function <em>onRender()</em></h3>
!
! <p>The function <strong>onRender()</strong> of the class
! <em>WebObject</em> is called by the framework at the time of the
! <em>HTML</em> page construction (the page that is sent to the
! browser), just before the template of the WebBox is outputed
! (rendered). Actually <strong>WebObject::onRender()</strong> is an
! abstract (empty) function, and the framework expects the class
! <strong>box_id</strong> to override it, in order to do something
! useful for the WebBox.What is usually done in
! <strong>box_id::onRender()</strong> is assigning values to the
! variables used in the template of the WebBox <em>box_id</em>, so that
! the template is rendered properly. These values are assigned by the
! function <strong>WebApp::addVar("var_name", "var_value")</strong>.
! </p>
!
! <h3>Files related to a WebBox</h3>
!
! <p>Besides the file that contains the template of the WebBox and the
! <strong>box_id.php</strong> that contains its <em>PHP</em> class,
! there may be other files as well that belong to the WebBox. These are:
! <strong>box_id.js</strong> that contains the JavaScript code of the
! WebBox, <strong>box_id.css</strong> that contains the stylesheet of
! the WebBox, etc.. If the framework finds such files, it automatically
! integrates them in the generated <em>HTML</em> page. For example, it
! includes <strong>box_id.js</strong> and <strong>box_id.css</strong> in
! the <em><head></em> of the page. If you view the HTML code of
! this page, you may notice in the <em><head></em> these lines
! that have been added automatically by the framework for the WebBox
! <em>menu</em>:</p>
!
! <pre>
! <script language='JavaScript' src='/app3/templates/menu/<strong>menu.js</strong>'></script>
! <link rel='stylesheet' href='/app3/templates/menu/<strong>menu.css</strong>' type='text/css'>
! </pre>
!
! <p>From the files of a WebBox, the template is the most
! important. There can be a WebBox without <em>JS</em> code or without
! <em>PHP</em> code, but there cannot be a WebBox without
! <em>TPL</em>(template) code.</p>
!
!
! <h3>Differences with templates</h3>
!
! <p>A WebBox is defined inside a template file and the <em>TPL</em>
! code of the WebBox is inside the <em><WebBox></em> tag (is the
! content of the <em><WebBox></em> element). However a WebBox is
! different from a template because it can also have its own
! <em>PHP</em> code. Another difference is that a template must include
! explicitly the <em>JS</em> code and the <em>CSS</em> code (if it has
! its own), however, for a WebBox the framework handles them
! automatically, by including them at the <em><head></em> of the
! page</p>
--- 1,100 ----
! <!--# This file is included inside page1.html #-->
!
! <h3>What is a WebBox</h3>
!
! <p>A WebBox is a template which has also some <em>PHP</em> code associated
! with it. It is a self-contained and independent template which can be easily
! included in other pages or in other applications. In fact, it may also have
! some <em>JavaScript</em> code, <em>CSS</em> stylesheets, <em>SQL</em>
! queries etc., associated with it.</p>
!
! <p>It is denoted by the tag <strong><WebBox></strong> and it has an
! <strong>ID</strong> attribute:</p>
! <pre>
! <WebBox ID="box_id">
! <!-- content of WebBox -->
! </WebBox>
! </pre>
! <p>The identifier must be different for each WebBox used in the
! application.</p>
!
! <h3>The PHP code of the WebBox-es</h3>
!
! <p>The <em>PHP</em> code (as well as <em>JS</em> code, <em>CSS</em>
! styles etc.) are associated to the WebBox by means of
! <strong>box_id</strong>, the identifier of the WebBox. When the
! framework parses a <strong><WebBox></strong> tag, it looks for a
! file named <strong>box_id.php</strong> in the same folder where the
! WebBox template is. If it finds such a file, it includes it.</p>
!
! <p>The <strong>box_id.php</strong> file must contain the definition
! of a <em>PHP</em> class that extends the class <strong>WebObject</strong>,
! like this:</p>
! <pre>
! <?php
! class <strong>box_id</strong> extends <strong>WebObject</strong>
! {
! .
! .
! .
! }
! ?>
! </pre>
!
! <p>The class <strong>WebObject</strong> is defined by the framework.
! Among other things, it also contains the member function
! <strong>WebObject::onRender()</strong>.</p>
!
! <h3>The function <em>onRender()</em></h3>
!
! <p>The function <strong>onRender()</strong> of the class
! <em>WebObject</em> is called by the framework at the time of the
! <em>HTML</em> page construction (the page that is sent to the
! browser), just before the template of the WebBox is outputed
! (rendered). Actually <strong>WebObject::onRender()</strong> is an
! abstract (empty) function, and the framework expects the class
! <strong>box_id</strong> to override it, in order to do something
! useful for the WebBox.What is usually done in
! <strong>box_id::onRender()</strong> is assigning values to the
! variables used in the template of the WebBox <em>box_id</em>, so that
! the template is rendered properly. These values are assigned by the
! function <strong>WebApp::addVar("var_name", "var_value")</strong>.
! </p>
!
! <h3>Files related to a WebBox</h3>
!
! <p>Besides the file that contains the template of the WebBox and the
! <strong>box_id.php</strong> that contains its <em>PHP</em> class,
! there may be other files as well that belong to the WebBox. These are:
! <strong>box_id.js</strong> that contains the JavaScript code of the
! WebBox, <strong>box_id.css</strong> that contains the stylesheet of
! the WebBox, etc.. If the framework finds such files, it automatically
! integrates them in the generated <em>HTML</em> page. For example, it
! includes <strong>box_id.js</strong> and <strong>box_id.css</strong> in
! the <em><head></em> of the page. If you view the HTML code of
! this page, you may notice in the <em><head></em> these lines
! that have been added automatically by the framework for the WebBox
! <em>menu</em>:</p>
!
! <pre>
! <script language='JavaScript' src='/app3/templates/menu/<strong>menu.js</strong>'></script>
! <link rel='stylesheet' href='/app3/templates/menu/<strong>menu.css</strong>' type='text/css'>
! </pre>
!
! <p>From the files of a WebBox, the template is the most
! important. There can be a WebBox without <em>JS</em> code or without
! <em>PHP</em> code, but there cannot be a WebBox without
! <em>TPL</em>(template) code.</p>
!
!
! <h3>Differences with templates</h3>
!
! <p>A WebBox is defined inside a template file and the <em>TPL</em>
! code of the WebBox is inside the <em><WebBox></em> tag (is the
! content of the <em><WebBox></em> element). However a WebBox is
! different from a template because it can also have its own
! <em>PHP</em> code. Another difference is that a template must include
! explicitly the <em>JS</em> code and the <em>CSS</em> code (if it has
! its own), however, for a WebBox the framework handles them
! automatically, by including them at the <em><head></em> of the
! page</p>
Index: page1.html
===================================================================
RCS file: /cvsroot/phpwebapp/app3/templates/page1.html,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** page1.html 22 Aug 2003 16:14:24 -0000 1.1.1.1
--- page1.html 25 Aug 2003 14:30:38 -0000 1.2
***************
*** 1,12 ****
! <html>
! <head>
! <title>Page 1</title>
! <link rel="stylesheet" type="text/css" href="{{./}}styles.css">
! </head>
! <body>
! <Include SRC="{{./}}header.html"/>
! <Include SRC="{{./}}page1_content.html"/>
! <Include SRC="{{./}}footer.html"/>
! <br>
! </body>
! </html>
--- 1,12 ----
! <html>
! <head>
! <title>Page 1</title>
! <link rel="stylesheet" type="text/css" href="{{./}}styles.css">
! </head>
! <body>
! <Include SRC="{{./}}header.html"/>
! <Include SRC="{{./}}page1_content.html"/>
! <Include SRC="{{./}}footer.html"/>
! <br>
! </body>
! </html>
Index: header.html
===================================================================
RCS file: /cvsroot/phpwebapp/app3/templates/header.html,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** header.html 22 Aug 2003 16:14:24 -0000 1.1.1.1
--- header.html 25 Aug 2003 14:30:38 -0000 1.2
***************
*** 1,3 ****
! <!--# This template is included at the begining of each page #-->
! <h1>Sample Application 3: WebBox-es</h1>
! <Include SRC="{{./}}menu/menu.html" />
--- 1,3 ----
! <!--# This template is included at the begining of each page #-->
! <h1>Sample Application 3: WebBox-es</h1>
! <Include SRC="{{./}}menu/menu.html" />
Index: footer.html
===================================================================
RCS file: /cvsroot/phpwebapp/app3/templates/footer.html,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** footer.html 22 Aug 2003 16:14:24 -0000 1.1.1.1
--- footer.html 25 Aug 2003 14:30:38 -0000 1.2
***************
*** 1,3 ****
! <hr>
! <a href="javascript:go_back()"><img src="{{GRAPHICS}}back.png" alt="Back" border="0"></a>
! <a href="{{APP_URL}}"><img src="{{GRAPHICS}}home.png" alt="Home" border="0"></a>
--- 1,3 ----
! <hr>
! <a href="javascript:go_back()"><img src="{{GRAPHICS}}back.png" alt="Back" border="0"></a>
! <a href="{{APP_URL}}"><img src="{{GRAPHICS}}home.png" alt="Home" border="0"></a>
|