[phpwebapp-commits] CVS: documentation/templates/user_manual/manual_pages webox.txt,1.2,1.3 variable
Brought to you by:
dashohoxha
|
From: Dashamir H. <das...@us...> - 2003-08-20 08:16:29
|
Update of /cvsroot/phpwebapp/documentation/templates/user_manual/manual_pages
In directory sc8-pr-cvs1:/tmp/cvs-serv10107/templates/user_manual/manual_pages
Modified Files:
webox.txt variables.txt transitions.txt templates.txt
session.txt new_app.txt misc.txt events.txt database.txt
Log Message:
tabs converted to spaces, improvments in templates and stylesheets
Index: webox.txt
===================================================================
RCS file: /cvsroot/phpwebapp/documentation/templates/user_manual/manual_pages/webox.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** webox.txt 23 Feb 2003 14:29:07 -0000 1.2
--- webox.txt 20 Aug 2003 07:31:54 -0000 1.3
***************
*** 16,22 ****
-----------------
It is denoted by the tag <WebBox> and it has an ID attribute:
! <WebBox ID="boxID">
! <!-- content of WebBox -->
! </WebBox>
The identifier of the box is very important and must be
different for each box used in the application.
--- 16,22 ----
-----------------
It is denoted by the tag <WebBox> and it has an ID attribute:
! <WebBox ID="boxID">
! <!-- content of WebBox -->
! </WebBox>
The identifier of the box is very important and must be
different for each box used in the application.
***************
*** 37,41 ****
So, at the time that the framework is about to load (parse) the
! WebBox, it includes the "boxID.php" file, and then calls the
functions "boxID_eventHandler($event)" and "boxID_onParse()". Later,
when it is about to render (generate the HTML code of) the WebBox,
--- 37,41 ----
So, at the time that the framework is about to load (parse) the
! WebBox, it includes the "boxID.php" file, and then calls the
functions "boxID_eventHandler($event)" and "boxID_onParse()". Later,
when it is about to render (generate the HTML code of) the WebBox,
***************
*** 67,71 ****
some template variables that affect the parsing. E.g. if we have
this line in a template:
! <Include SRC="{{#content_file}}" />
then the variable {{#content_file}} must have a value before this
line is parsed, and usually this value is given in the onParse()
--- 67,71 ----
some template variables that affect the parsing. E.g. if we have
this line in a template:
! <Include SRC="{{#content_file}}" />
then the variable {{#content_file}} must have a value before this
line is parsed, and usually this value is given in the onParse()
***************
*** 105,119 ****
The 'boxID.js' file contains the javascript functions related to the
webox (same as for the templates). It is included like this:
! <script language="javascript" src="{{#./}}boxID.js"></script>
!
The 'boxID.css' file contains the stylesheet of the webox. It is
included like this:
! <link rel="stylesheet" type="text/css" href="{{#./}}boxID.css">
The 'boxID.rs' file contains the recordsets of the webox that are
used in the layout (for the <Repeat> tags). It is included like
this:
! <Include SRC="{{#./}}boxID.rs"/>
!
The 'boxID.php' file contains the PHP code of the webox. It is included
automatically by the framework, if it exists.
--- 105,119 ----
The 'boxID.js' file contains the javascript functions related to the
webox (same as for the templates). It is included like this:
! <script language="javascript" src="{{#./}}boxID.js"></script>
!
The 'boxID.css' file contains the stylesheet of the webox. It is
included like this:
! <link rel="stylesheet" type="text/css" href="{{#./}}boxID.css">
The 'boxID.rs' file contains the recordsets of the webox that are
used in the layout (for the <Repeat> tags). It is included like
this:
! <Include SRC="{{#./}}boxID.rs"/>
!
The 'boxID.php' file contains the PHP code of the webox. It is included
automatically by the framework, if it exists.
***************
*** 152,156 ****
The class "boxID" can override the functions:
! eventHandler($event), onParse() and onRender()
of IWebBox, or can define other functions that can be
used inside these functions. These functions replace
--- 152,156 ----
The class "boxID" can override the functions:
! eventHandler($event), onParse() and onRender()
of IWebBox, or can define other functions that can be
used inside these functions. These functions replace
***************
*** 170,179 ****
vars of the webox with default values. Previously, this was
done in the onParse() with a statement like this:
! if (!isset($session->Vars["state_var"]))
! {
! $session->Vars["state_var"] = "initial_value";
! }
Now it should be done in the init() function, like this:
! $this->addSVar("state_var", "initial_value");
--- 170,179 ----
vars of the webox with default values. Previously, this was
done in the onParse() with a statement like this:
! if (!isset($session->Vars["state_var"]))
! {
! $session->Vars["state_var"] = "initial_value";
! }
Now it should be done in the init() function, like this:
! $this->addSVar("state_var", "initial_value");
***************
*** 182,193 ****
persistent vars). Inside the class of the webox, its state vars
can be accessed like this:
! $this->addSVar ($var_name, $var_value);
! $this->addSVars($associated_array);
! $this->setSVar ($var_name, $var_value);
! $this->setSVars($associated_array);
! $var_value = $this->getSVar($var_name);
! $assoc_arr = $this->getSVars();
These variables can be accessed inside the webox in the usual way:
! {{var_name}}
and they are valid only in the scope of this webox (and shadow any
other {{variables}} with the same name that are defined in the
--- 182,193 ----
persistent vars). Inside the class of the webox, its state vars
can be accessed like this:
! $this->addSVar ($var_name, $var_value);
! $this->addSVars($associated_array);
! $this->setSVar ($var_name, $var_value);
! $this->setSVars($associated_array);
! $var_value = $this->getSVar($var_name);
! $assoc_arr = $this->getSVars();
These variables can be accessed inside the webox in the usual way:
! {{var_name}}
and they are valid only in the scope of this webox (and shadow any
other {{variables}} with the same name that are defined in the
***************
*** 196,207 ****
In case that some state variable of a webox needs to be used
from the template of another webox, they can be accessed like this:
! {{boxID->var_name}}
From the JS code as well, they can be accessed like this:
! session.setVar("boxID->var_name", var_value); etc.
Also, when you need to access the state var of another box from
the PHP code of this webox, you can use this function:
! $var_value = WebApp::getSVar("otherBoxID->var_name");
The function $var_value=WebApp::getSVar($var_name) can also
be used to get the session variables (instead of
--- 196,207 ----
In case that some state variable of a webox needs to be used
from the template of another webox, they can be accessed like this:
! {{boxID->var_name}}
From the JS code as well, they can be accessed like this:
! session.setVar("boxID->var_name", var_value); etc.
Also, when you need to access the state var of another box from
the PHP code of this webox, you can use this function:
! $var_value = WebApp::getSVar("otherBoxID->var_name");
The function $var_value=WebApp::getSVar($var_name) can also
be used to get the session variables (instead of
***************
*** 224,238 ****
* - The framework supports WebClasses and WebObjects.
! <WebClass ID="className" Path="path/to/className.php">
! <Parameter name="param1" default="default value" />
! <Parameter name="param2" />
! <!--# . . . . . . . . . . . . . . . . #-->
! <!--# the template of the web class #-->
! <!--# . . . . . . . . . . . . . . . . #-->
! </WebClass>
! <WebObject Class="className" name="wObj1" param1="value1" param2="value2" />
! <WebObject Class="className" name="wObj2" param2="value2" />
! <WebObject Class="className" name="wObj3" param1="{{nr}}+1" param2="red" />
The element <WebClass> defines a web class, but it by itself
--- 224,238 ----
* - The framework supports WebClasses and WebObjects.
! <WebClass ID="className" Path="path/to/className.php">
! <Parameter name="param1" default="default value" />
! <Parameter name="param2" />
! <!--# . . . . . . . . . . . . . . . . #-->
! <!--# the template of the web class #-->
! <!--# . . . . . . . . . . . . . . . . #-->
! </WebClass>
! <WebObject Class="className" name="wObj1" param1="value1" param2="value2" />
! <WebObject Class="className" name="wObj2" param2="value2" />
! <WebObject Class="className" name="wObj3" param1="{{nr}}+1" param2="red" />
The element <WebClass> defines a web class, but it by itself
***************
*** 277,315 ****
-------------
The file "className.php", if it egzists, contains this class definition:
! <?
! class className extends WebObject
! {
! . . . . .
! }
! ?>
Where 'WebObject' is a class defined by the framework that supplies
some useful functionality for all webclasses.
This functionality is:
1 - The callback functions that are called by the framework at
! certain moments during the time that the webobject is processesed.
! These callback functions are:
! + init()
! + on_eventName($event_args)
! + eventHandler($event)
! + onParse()
! + onRender()
! 2 - The ability to keep persistent variables that define the
! state of the object. These state variables can be used
! inside the "className" like this:
! + $this->addSVar($var_name, $var_value);
! + $this->addSVar($var_name, $var_value, "DB");
! + $this->setSVar($var_name, $var_value);
! + $this->setSVars($var_name, $var_value);
! + $var_value = $this->getSVar($var_name);
! + $arr_values = $this->getSVars($var_name);
! + etc.
! Outside the scope of the WebClass, these state variables can
! be accessed like this:
! + WebApp::setSVar("className::objName->var_name", "var_value")
! + $var_value = WebApp::getSVar("className::objName->var_name");
! + {{className::objName->var_name}} (in templates)
! + session.setVar("className::objName->var_name", "var_value")
! + etc.
--- 277,315 ----
-------------
The file "className.php", if it egzists, contains this class definition:
! <?
! class className extends WebObject
! {
! . . . . .
! }
! ?>
Where 'WebObject' is a class defined by the framework that supplies
some useful functionality for all webclasses.
This functionality is:
1 - The callback functions that are called by the framework at
! certain moments during the time that the webobject is processesed.
! These callback functions are:
! + init()
! + on_eventName($event_args)
! + eventHandler($event)
! + onParse()
! + onRender()
! 2 - The ability to keep persistent variables that define the
! state of the object. These state variables can be used
! inside the "className" like this:
! + $this->addSVar($var_name, $var_value);
! + $this->addSVar($var_name, $var_value, "DB");
! + $this->setSVar($var_name, $var_value);
! + $this->setSVars($var_name, $var_value);
! + $var_value = $this->getSVar($var_name);
! + $arr_values = $this->getSVars($var_name);
! + etc.
! Outside the scope of the WebClass, these state variables can
! be accessed like this:
! + WebApp::setSVar("className::objName->var_name", "var_value")
! + $var_value = WebApp::getSVar("className::objName->var_name");
! + {{className::objName->var_name}} (in templates)
! + session.setVar("className::objName->var_name", "var_value")
! + etc.
***************
*** 319,329 ****
<WebClass>-es and <WebObject>-s. When the framework parses:
<WebBox ID="boxID">
! . . . . .
! </WebBox>
it interprets it as:
<WebClass ID="boxID">
! . . . . .
! </WebClass>
! <WebObject Class="boxID" />
and the ID of the created object, instead of being "className::objName"
is just "boxID", so it is handled the same as before
--- 319,329 ----
<WebClass>-es and <WebObject>-s. When the framework parses:
<WebBox ID="boxID">
! . . . . .
! </WebBox>
it interprets it as:
<WebClass ID="boxID">
! . . . . .
! </WebClass>
! <WebObject Class="boxID" />
and the ID of the created object, instead of being "className::objName"
is just "boxID", so it is handled the same as before
***************
*** 342,350 ****
-------- webobject vars --------------------------
* - The framework declares for each webobject these variables:
! {{obj_id}} -- the object id ({{class_name}}::{{obj_name}})
! {{class_name}} -- the name of the class
! {{obj_name}} -- the name of the object
! {{obj_count}} -- counts the objects of the same class,
! starting from 1
These vars can be used inside the template of the webclass,
if the webclass designer needs them, e.g.:
--- 342,350 ----
-------- webobject vars --------------------------
* - The framework declares for each webobject these variables:
! {{obj_id}} -- the object id ({{class_name}}::{{obj_name}})
! {{class_name}} -- the name of the class
! {{obj_name}} -- the name of the object
! {{obj_count}} -- counts the objects of the same class,
! starting from 1
These vars can be used inside the template of the webclass,
if the webclass designer needs them, e.g.:
***************
*** 365,369 ****
in the same folder with the <WebBox>. If it exists there, then
the framework includes a line like this in the <head> of the page:
! <script language='javascript' src='path/to/box_id.js'></script>
Similarly, for the CSS code, the framework includes a line like
--- 365,369 ----
in the same folder with the <WebBox>. If it exists there, then
the framework includes a line like this in the <head> of the page:
! <script language='javascript' src='path/to/box_id.js'></script>
Similarly, for the CSS code, the framework includes a line like
Index: variables.txt
===================================================================
RCS file: /cvsroot/phpwebapp/documentation/templates/user_manual/manual_pages/variables.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** variables.txt 23 Feb 2003 14:29:07 -0000 1.2
--- variables.txt 20 Aug 2003 07:31:55 -0000 1.3
***************
*** 58,62 ****
A variable is declared by the <Var> element like this:
! <Var name="var_name">expression</Var>
and it adds a new variable in the current scope.
'expression' is a php expression that may contain other {{#variables}}.
--- 58,62 ----
A variable is declared by the <Var> element like this:
! <Var name="var_name">expression</Var>
and it adds a new variable in the current scope.
'expression' is a php expression that may contain other {{#variables}}.
***************
*** 126,137 ****
1 - First the current scope is searched for it.
2 - If it is not found, then the scope above it is searched,
! and so on until it is found.
3 - If it is not found in any scope, then session variables
! are searched for it.
4 - If it not found among session variables, then global
! variables of PHP are searched for it.
5 - If it is not found there, then constants of PHP are searched.
6 - If it still is not found then its name is taken as its value
! (e.g. {{#var1}} is replaced by "var1").
--- 126,137 ----
1 - First the current scope is searched for it.
2 - If it is not found, then the scope above it is searched,
! and so on until it is found.
3 - If it is not found in any scope, then session variables
! are searched for it.
4 - If it not found among session variables, then global
! variables of PHP are searched for it.
5 - If it is not found there, then constants of PHP are searched.
6 - If it still is not found then its name is taken as its value
! (e.g. {{#var1}} is replaced by "var1").
Index: transitions.txt
===================================================================
RCS file: /cvsroot/phpwebapp/documentation/templates/user_manual/manual_pages/transitions.txt,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** transitions.txt 21 Feb 2003 08:18:32 -0000 1.1.1.1
--- transitions.txt 20 Aug 2003 07:31:55 -0000 1.2
***************
*** 3,7 ****
===========
!
What is a Transition
---------------------
--- 3,7 ----
===========
!
What is a Transition
---------------------
***************
*** 40,46 ****
application). These data validations can be done in the client-side
by using a javascript function. For example:
! <a href="javascript: on_link()"> Link </a>
! <input type="button" value="Button" onClick="on_button()">
! <form onSubmit="on_submit(); return false;">
The functions on_link(), on_button() and on_submit() usually do some
client-side validations and error checkings and then, if everything
--- 40,46 ----
application). These data validations can be done in the client-side
by using a javascript function. For example:
! <a href="javascript: on_link()"> Link </a>
! <input type="button" value="Button" onClick="on_button()">
! <form onSubmit="on_submit(); return false;">
The functions on_link(), on_button() and on_submit() usually do some
client-side validations and error checkings and then, if everything
***************
*** 51,57 ****
-----------------------------------------
Like usual links which can send variables to the server, like this:
! <a href="page1.php?var1=val1&var2=val2"> Link </a>
a transition can send variables as well:
! <a href="javascript: GoTo('page1.html?var1=val1&var2=val2')"> Link </a>
These variables will be declared as PHP global variables by the
framework and may be used in the PHP code of the application. However
--- 51,57 ----
-----------------------------------------
Like usual links which can send variables to the server, like this:
! <a href="page1.php?var1=val1&var2=val2"> Link </a>
a transition can send variables as well:
! <a href="javascript: GoTo('page1.html?var1=val1&var2=val2')"> Link </a>
These variables will be declared as PHP global variables by the
framework and may be used in the PHP code of the application. However
***************
*** 66,70 ****
application a server-side event that should be handled by the
application. The format of an event variable is like this:
! event=targetBox.eventName(arg1=val1;arg2=val2;arg3=val3)
When the framework gets the variable 'event', it builds an object
of class Event and forwards it to the appropriate WebBox for handling.
--- 66,70 ----
application a server-side event that should be handled by the
application. The format of an event variable is like this:
! event=targetBox.eventName(arg1=val1;arg2=val2;arg3=val3)
When the framework gets the variable 'event', it builds an object
of class Event and forwards it to the appropriate WebBox for handling.
***************
*** 86,89 ****
usually submits to its action, by not using a transition. To overcome
this, we should declare the form like this:
! <form name="form1" onSubmit="return false;"> or
! <form name="form1" onSubmit="on_submit(); return false;">
--- 86,89 ----
usually submits to its action, by not using a transition. To overcome
this, we should declare the form like this:
! <form name="form1" onSubmit="return false;"> or
! <form name="form1" onSubmit="on_submit(); return false;">
Index: templates.txt
===================================================================
RCS file: /cvsroot/phpwebapp/documentation/templates/user_manual/manual_pages/templates.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** templates.txt 23 Feb 2003 14:29:07 -0000 1.2
--- templates.txt 20 Aug 2003 07:31:55 -0000 1.3
***************
*** 4,63 ****
NOTE: For almost every element, the opening and closing tags
! are required to be in a single line and alone, in order to
! be processed correctly, like this:
! <Element>
! Element content here.
! </Element>
! This restriction is imposed by the current implementation
! and will be removed later when the templates will be
! processed using an XML parser.
!
! Also, the names of the elements and the attributes are
! case sensitive and they must be used the same as they are
! in the documentation. E.g. if you use <recordset> instead
! if <Recordset> it will not work.
!
* Comments
==========
! <!--# Comments are denoted like this #-->
! <!--# diesis at the beginning, diesis at the end #-->
! <!--#
! Such comments are not included
! in the XHTML file that is generated
! and sent to the browser.
! #-->
! <!--
! Usual XHTML comments (like this one) are passed to
! the XHTML file that is generated from the template.
! -->
!
! Note: For the time being, the beginning of the comment
! requires an empty space after it "<!--# " in order to be
! recognized as a comment, and everything in the line
! of the closing comment "#-->", even after it, is treated
! as a comment and is discarded. This restrictions come from
! the current implementation and later they will be removed.
* Include elements
==================
! <Include SRC="templates/header.html"/>
! <Include SRC="{{#content_file}}"/>
! <!--#
! The <Include> element is used to include a template
! inside another template. This provides to the application
! modularity and more flexibility.
!
! The modularity consists in breaking a large page into
! smaller templates, and in using the same template in
! several pages.
!
! The flexibility consists in this: the file that will be
! included may be a variable (or may contain variables), so
! different files may be included in the same place of the page,
! according to the logic of the application.
! #-->
--- 4,63 ----
NOTE: For almost every element, the opening and closing tags
! are required to be in a single line and alone, in order to
! be processed correctly, like this:
! <Element>
! Element content here.
! </Element>
! This restriction is imposed by the current implementation
! and will be removed later when the templates will be
! processed using an XML parser.
!
! Also, the names of the elements and the attributes are
! case sensitive and they must be used the same as they are
! in the documentation. E.g. if you use <recordset> instead
! if <Recordset> it will not work.
!
* Comments
==========
! <!--# Comments are denoted like this #-->
! <!--# diesis at the beginning, diesis at the end #-->
! <!--#
! Such comments are not included
! in the XHTML file that is generated
! and sent to the browser.
! #-->
! <!--
! Usual XHTML comments (like this one) are passed to
! the XHTML file that is generated from the template.
! -->
!
! Note: For the time being, the beginning of the comment
! requires an empty space after it "<!--# " in order to be
! recognized as a comment, and everything in the line
! of the closing comment "#-->", even after it, is treated
! as a comment and is discarded. This restrictions come from
! the current implementation and later they will be removed.
* Include elements
==================
! <Include SRC="templates/header.html"/>
! <Include SRC="{{#content_file}}"/>
! <!--#
! The <Include> element is used to include a template
! inside another template. This provides to the application
! modularity and more flexibility.
!
! The modularity consists in breaking a large page into
! smaller templates, and in using the same template in
! several pages.
!
! The flexibility consists in this: the file that will be
! included may be a variable (or may contain variables), so
! different files may be included in the same place of the page,
! according to the logic of the application.
! #-->
***************
*** 65,276 ****
=================
! <Repeat rs="rsID">
! <IfEmpty>
! <!--# <IfEmpty> is included in the page in case
! that recordset specified has no records #-->
! <tr>
! <td>No articles found!</td>
! </tr>
! </IfEmpty>
! <Header>
! <!--# <Header> is processed before
! the repeated part (only once) #-->
! </Header>
! <RepeatBody>
! <!--#
! Here comes the part that is repeated
! for each record in the recordset. The tag
! <RepeatBody> is optional and may be omitted
! #-->
! <tr>
! <td> {{#TI}} </td>
! <td> {{#AU}} </td>
! . . .
! </tr>
! </RepeatBody>
! <Separator>
! <!--# <Separator> is processed between
! two repetitions of the <RepeatBody> #-->
! <tr><td colspan="3"> <hr width="90%"> </td></tr>
! </Separator>
! <Footer>
! <!--# <Footer> is processed after
! the repeated part (only once) #-->
! </Footer>
! </Repeat>
!
! <!--#
! The <Repeat> element is connected with a recordset by the attribute
! "rs". Its body is processed for each row of the recordset. Before
! processing the content for a certain row, all the fields of the recordset
! are declared as variables with values taken from the current record.
! In case that the recordset is empty, then the element <IfEmpty> is
! processed instead. It is optional.
!
! The elements <Header> and <Footer> are processed before the
! repetition starts and after the repetition is done. They are
! optional.
!
! The <Separator> element is processed between two repetitions
! of the body of the <Repeat>. It is optional.
!
! Everything inside the <Repeat> element and outside the
! elements <IfEmpty>, <Header>, <Footer> and <Separator> is
! considered as body of the <Repeat> and is processed for
! each record of the recordset. To make it more readable, the
! tags <RepeatBody> and </RepeatBody> may be used, but they
! are just "syntactic sugar" and don't influence anything;
! they are optional and may be omitted.
! #-->
* <If> element
===============
! <If condition="!{{#logged}}">
! <!--# login template comes here #-->
! <!--# . . . . . . . . . . . . . #-->
! </If>
! <!--#
! The content of the <If> element is processed conditionally:
! if the value of the attribute "condition" is true, then it
! is processed, otherwise it is not processed.
! The value of the condition is calculated as a PHP expression
! (after the template variables have been replaced).
! #-->
* <Recordset> elements
=======================
! <Recordset ID="rsID">
! <Query> select {{#R_NAME}} from table </Query>
! </Recordset>
! <!--#
! Each recordset has a unique ID. Later, when we use
! this recordset (e.g. in a <Repeat> element) we refer
! to it by this ID. It also has a <Query> element, which
! is executed using the default database connection.
!
! The query may contain variables, which are replaced at
! the time that the query is executed.
! #-->
!
! <Recordset ID="doc">
! <Query>
! Select NAME_D,
! SURNAME_D
! From DOCTOR
! Where condition
! Group By field
! </Query>
! </Recordset>
! <--#
! If the query is a big one, then it can be declared in several
! lines (in order to be more readable and editable).
! #-->
* Recordsets that are displayed over several pages
===================================================
! <Recordset ID="art" recs_per_page="10">
! <Query>{{#ART_QUERY}}</Query>
! </Recordset>
!
! <!--#
! Recordsets that have a "recs_per_page" attribute are
! recordsets that are displayed over several pages.
! It retrievs from the database only one page at a time,
! out of all the results that the query may return.
! A page is a group of consecutive records, all the pages
! have the same number of records and they form a partition
! of all the records of the query.
!
! In this case some additional variables are declared
! which show which records are being displayed, how many
! pages are there, and at which page we are currently.
! These variables are declared during the processing of the
! <Repeat> elements, and are usually used in <Header> and <Footer>.
! These variables are:
! {{#FirstRec}} -- the number of the first record of the page
! {{#LastRec}} -- the number of the last record of the page
! {{#AllRecs}} -- the number of all records that can be retrieved by the query
! {{#CurrPage}} -- current page of records that is retrieved
! {{#NextPage}} -- the number of the next page
! {{#PrevPage}} -- the number of the previous page
! {{#LastPage}} -- the number of the last page
!
! Also, the following variables are declared each time
! that the body of the <Repeat> element is processed:
! {{#CurrentRecNr}} -- the number of the current record
! {{#CurrentRowNr}} -- the number of the current row
! (These can be used to define other variables, like this:
! <Var name="bgColor">({{#CurrentRowNr}}==5 ? "red" : "grey")</Var>
! and then use {{#bgColor}} )
! #-->
* <Var> elements
=================
! <Var name="SUM">{{#field1}} + {{#field2}} + {{#field3}}</Var>
! <Var name="ROW_COLOR">({{#CurrentRowNr}}%2 ? "tabgrey" : "tabwhite")</Var>
! <tr class="{{#ROW_COLOR}}"> . . . </tr>
!
! <!--#
! <Var> elements declare variables that can be used anywhere in the
! template in the current scope and in the scopes inside it. They
! are identified by their name, and their value is calculated using
! their content. The value of a variable is calculated in this way:
! first, any template variable inside them is found and replaced,
! then the resulting string is evaluated as a PHP expression.
! A variable defined by <Var> is evaluated at the time that
! it is processed, so that if a variable is inside a <Repeat>
! element, then it may have different values for different
! iterations.
!
! Note: All the <Var> element must be declared in a single line,
! in order to be processed correctly. This restriction is
! imposed by the current implementation and it will be
! removed later.
! #-->
* Template {{#variables}}
=========================
! <!--#
! Anywhere in XML where we can put character data,
! we can also put {{#variables}}, which are replaced
! by their string values at the time of template
! processing and conversion to XHTML.
!
! For more details see the file: 'variables.txt' .
!
! Note: The current implementation actually is not based on
! XML parsing, and the variables are recognized and
! replaced only in certain attributes (which are indicated
! in the documentation) and in every line that is not
! part of a framework tag (is not inside the <tag denoters>).
! #-->
!
!
* WebBox-es
============
! <WebBox ID="boxID">
! <!-- content of WebBox -->
! </WebBox>
!
<!--#
! A WebBox is a template which has also its own PHP code, which
! handles its server-side logic. It is an almost self-contained
! and independent template which can be easily included in other
! pages or in other projects.
!
! For more details see the file: 'webox.txt' .
#-->
--- 65,276 ----
=================
! <Repeat rs="rsID">
! <IfEmpty>
! <!--# <IfEmpty> is included in the page in case
! that recordset specified has no records #-->
! <tr>
! <td>No articles found!</td>
! </tr>
! </IfEmpty>
! <Header>
! <!--# <Header> is processed before
! the repeated part (only once) #-->
! </Header>
! <RepeatBody>
! <!--#
! Here comes the part that is repeated
! for each record in the recordset. The tag
! <RepeatBody> is optional and may be omitted
! #-->
! <tr>
! <td> {{#TI}} </td>
! <td> {{#AU}} </td>
! . . .
! </tr>
! </RepeatBody>
! <Separator>
! <!--# <Separator> is processed between
! two repetitions of the <RepeatBody> #-->
! <tr><td colspan="3"> <hr width="90%"> </td></tr>
! </Separator>
! <Footer>
! <!--# <Footer> is processed after
! the repeated part (only once) #-->
! </Footer>
! </Repeat>
!
! <!--#
! The <Repeat> element is connected with a recordset by the attribute
! "rs". Its body is processed for each row of the recordset. Before
! processing the content for a certain row, all the fields of the recordset
! are declared as variables with values taken from the current record.
! In case that the recordset is empty, then the element <IfEmpty> is
! processed instead. It is optional.
!
! The elements <Header> and <Footer> are processed before the
! repetition starts and after the repetition is done. They are
! optional.
!
! The <Separator> element is processed between two repetitions
! of the body of the <Repeat>. It is optional.
!
! Everything inside the <Repeat> element and outside the
! elements <IfEmpty>, <Header>, <Footer> and <Separator> is
! considered as body of the <Repeat> and is processed for
! each record of the recordset. To make it more readable, the
! tags <RepeatBody> and </RepeatBody> may be used, but they
! are just "syntactic sugar" and don't influence anything;
! they are optional and may be omitted.
! #-->
* <If> element
===============
! <If condition="!{{#logged}}">
! <!--# login template comes here #-->
! <!--# . . . . . . . . . . . . . #-->
! </If>
! <!--#
! The content of the <If> element is processed conditionally:
! if the value of the attribute "condition" is true, then it
! is processed, otherwise it is not processed.
! The value of the condition is calculated as a PHP expression
! (after the template variables have been replaced).
! #-->
* <Recordset> elements
=======================
! <Recordset ID="rsID">
! <Query> select {{#R_NAME}} from table </Query>
! </Recordset>
! <!--#
! Each recordset has a unique ID. Later, when we use
! this recordset (e.g. in a <Repeat> element) we refer
! to it by this ID. It also has a <Query> element, which
! is executed using the default database connection.
!
! The query may contain variables, which are replaced at
! the time that the query is executed.
! #-->
!
! <Recordset ID="doc">
! <Query>
! Select NAME_D,
! SURNAME_D
! From DOCTOR
! Where condition
! Group By field
! </Query>
! </Recordset>
! <--#
! If the query is a big one, then it can be declared in several
! lines (in order to be more readable and editable).
! #-->
* Recordsets that are displayed over several pages
===================================================
! <Recordset ID="art" recs_per_page="10">
! <Query>{{#ART_QUERY}}</Query>
! </Recordset>
!
! <!--#
! Recordsets that have a "recs_per_page" attribute are
! recordsets that are displayed over several pages.
! It retrievs from the database only one page at a time,
! out of all the results that the query may return.
! A page is a group of consecutive records, all the pages
! have the same number of records and they form a partition
! of all the records of the query.
!
! In this case some additional variables are declared
! which show which records are being displayed, how many
! pages are there, and at which page we are currently.
! These variables are declared during the processing of the
! <Repeat> elements, and are usually used in <Header> and <Footer>.
! These variables are:
! {{#FirstRec}} -- the number of the first record of the page
! {{#LastRec}} -- the number of the last record of the page
! {{#AllRecs}} -- the number of all records that can be retrieved by the query
! {{#CurrPage}} -- current page of records that is retrieved
! {{#NextPage}} -- the number of the next page
! {{#PrevPage}} -- the number of the previous page
! {{#LastPage}} -- the number of the last page
!
! Also, the following variables are declared each time
! that the body of the <Repeat> element is processed:
! {{#CurrentRecNr}} -- the number of the current record
! {{#CurrentRowNr}} -- the number of the current row
! (These can be used to define other variables, like this:
! <Var name="bgColor">({{#CurrentRowNr}}==5 ? "red" : "grey")</Var>
! and then use {{#bgColor}} )
! #-->
* <Var> elements
=================
! <Var name="SUM">{{#field1}} + {{#field2}} + {{#field3}}</Var>
! <Var name="ROW_COLOR">({{#CurrentRowNr}}%2 ? "tabgrey" : "tabwhite")</Var>
! <tr class="{{#ROW_COLOR}}"> . . . </tr>
!
! <!--#
! <Var> elements declare variables that can be used anywhere in the
! template in the current scope and in the scopes inside it. They
! are identified by their name, and their value is calculated using
! their content. The value of a variable is calculated in this way:
! first, any template variable inside them is found and replaced,
! then the resulting string is evaluated as a PHP expression.
! A variable defined by <Var> is evaluated at the time that
! it is processed, so that if a variable is inside a <Repeat>
! element, then it may have different values for different
! iterations.
!
! Note: All the <Var> element must be declared in a single line,
! in order to be processed correctly. This restriction is
! imposed by the current implementation and it will be
! removed later.
! #-->
* Template {{#variables}}
=========================
! <!--#
! Anywhere in XML where we can put character data,
! we can also put {{#variables}}, which are replaced
! by their string values at the time of template
! processing and conversion to XHTML.
!
! For more details see the file: 'variables.txt' .
!
! Note: The current implementation actually is not based on
! XML parsing, and the variables are recognized and
! replaced only in certain attributes (which are indicated
! in the documentation) and in every line that is not
! part of a framework tag (is not inside the <tag denoters>).
! #-->
!
!
* WebBox-es
============
! <WebBox ID="boxID">
! <!-- content of WebBox -->
! </WebBox>
!
<!--#
! A WebBox is a template which has also its own PHP code, which
! handles its server-side logic. It is an almost self-contained
! and independent template which can be easily included in other
! pages or in other projects.
!
! For more details see the file: 'webox.txt' .
#-->
***************
*** 287,291 ****
* - The syntax of tag Recordset now is:
! <Recordset ID="rsID" type="rsType">
where 'rsType' can be one of the values: "StaticRS", "DynamicRS",
"EditableRS", "PagedRS", "TableRS". The attibute type can be
--- 287,291 ----
* - The syntax of tag Recordset now is:
! <Recordset ID="rsID" type="rsType">
where 'rsType' can be one of the values: "StaticRS", "DynamicRS",
"EditableRS", "PagedRS", "TableRS". The attibute type can be
***************
*** 318,331 ****
listing and you get the files and folders using some PHP functions).
! This feature can be used in the "folderListing" webbox, for
! example. Instead of generating all the html code of the
! folder listing programatically, a <Repeat> template, associated
! with a <Recordset> could be used, and this recordset could be
! filled from an array or from php code (instead of being filled
! from database).
! The benefit of this aproach (vs. generatin all the html code
! in php) would be that we are able to change the layout of the
! 'folderListing' webbox more easily, because instead of changing
! the php code, we change only a template.
--------------------------------------------------------------
--- 318,331 ----
listing and you get the files and folders using some PHP functions).
! This feature can be used in the "folderListing" webbox, for
! example. Instead of generating all the html code of the
! folder listing programatically, a <Repeat> template, associated
! with a <Recordset> could be used, and this recordset could be
! filled from an array or from php code (instead of being filled
! from database).
! The benefit of this aproach (vs. generatin all the html code
! in php) would be that we are able to change the layout of the
! 'folderListing' webbox more easily, because instead of changing
! the php code, we change only a template.
--------------------------------------------------------------
***************
*** 357,365 ****
* - The expression of the <Var> tag can now be declared in several
lines, like this:
! <Var name="class">
! (
! "{{item}}"=="{{{{obj_id}}->selected_item}}" ?
! "leftMenu-item-selected"
! :"leftMenu-item"
! )
! </Var>
--- 357,365 ----
* - The expression of the <Var> tag can now be declared in several
lines, like this:
! <Var name="class">
! (
! "{{item}}"=="{{{{obj_id}}->selected_item}}" ?
! "leftMenu-item-selected"
! :"leftMenu-item"
! )
! </Var>
Index: session.txt
===================================================================
RCS file: /cvsroot/phpwebapp/documentation/templates/user_manual/manual_pages/session.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** session.txt 23 Feb 2003 14:29:07 -0000 1.2
--- session.txt 20 Aug 2003 07:31:55 -0000 1.3
***************
*** 65,72 ****
<script language="JavaScript" src="class.Session.js"></script>
<script language='JavaScript'>
! session = new Session();
! session.addVar('ID_S','IP: 192.168.1.2; DATE: 2001/11/01/ 00:24:33');
! session.addVar('var1','val1');
! session.addVar('var2','val2');
</script>
--- 65,72 ----
<script language="JavaScript" src="class.Session.js"></script>
<script language='JavaScript'>
! session = new Session();
! session.addVar('ID_S','IP: 192.168.1.2; DATE: 2001/11/01/ 00:24:33');
! session.addVar('var1','val1');
! session.addVar('var2','val2');
</script>
***************
*** 83,89 ****
and its functions:
! session.addVar(var_name, var_value) //ads a new variable
! session.getVar(var_name) //get the value of a variable
! session.setVar(var_name, var_value) //set the value of a variable
--- 83,89 ----
and its functions:
! session.addVar(var_name, var_value) //ads a new variable
! session.getVar(var_name) //get the value of a variable
! session.setVar(var_name, var_value) //set the value of a variable
***************
*** 114,125 ****
persistent vars). Inside the class of the webox, its state vars
can be accessed like this:
! $this->addSVar ($var_name, $var_value);
! $this->addSVars($associated_array);
! $this->setSVar ($var_name, $var_value);
! $this->setSVars($associated_array);
! $var_value = $this->getSVar($var_name);
! $assoc_arr = $this->getSVars();
These variables can be accessed inside the webox in the usual way:
! {{var_name}}
and they are valid only in the scope of this webox (and shadow any
other {{variables}} with the same name that are defined in the
--- 114,125 ----
persistent vars). Inside the class of the webox, its state vars
can be accessed like this:
! $this->addSVar ($var_name, $var_value);
! $this->addSVars($associated_array);
! $this->setSVar ($var_name, $var_value);
! $this->setSVars($associated_array);
! $var_value = $this->getSVar($var_name);
! $assoc_arr = $this->getSVars();
These variables can be accessed inside the webox in the usual way:
! {{var_name}}
and they are valid only in the scope of this webox (and shadow any
other {{variables}} with the same name that are defined in the
***************
*** 128,139 ****
In case that some state variable of a webox needs to be used
from the template of another webox, they can be accessed like this:
! {{boxID->var_name}}
From the JS code as well, they can be accessed like this:
! session.setVar("boxID->var_name", var_value); etc.
Also, when you need to access the state var of another box from
the PHP code of this webox, you can use this function:
! $var_value = WebApp::getSVar("otherBoxID->var_name");
The function $var_value=WebApp::getSVar($var_name) can also
be used to get the session variables (instead of
--- 128,139 ----
In case that some state variable of a webox needs to be used
from the template of another webox, they can be accessed like this:
! {{boxID->var_name}}
From the JS code as well, they can be accessed like this:
! session.setVar("boxID->var_name", var_value); etc.
Also, when you need to access the state var of another box from
the PHP code of this webox, you can use this function:
! $var_value = WebApp::getSVar("otherBoxID->var_name");
The function $var_value=WebApp::getSVar($var_name) can also
be used to get the session variables (instead of
***************
*** 163,190 ****
in JS have been changed so that they are more consistent with the
other function names in framework. Now they are:
! session.addVar("var_name", "var_value");
! session.rmVar("var_name");
! session.setVar("var_name", "var_value");
! session.getVar("var_name");
* - The names of the functions of the session object are:
! $session->addVar($var_name, $var_value);
! $session->rmVar($var_name); //removes a variable from session
! $session->setVar($var_name, $var_value); //sets a new value
! $session->getVar($var_name); //get the value of the var
The names of the functions for the state vars of a webox are:
! $this->addSVar($var_name, $var_value);
! $this->addSVars($arr_vars);
! $this->setSVar($var_name, $var_value);
! $this->setSVars($arr_vars);
! $this->getSVar($var_value);
! $this->getSVars();
The session and state vars can also be accessed using this functions:
! WebApp::addSVar($var_name, $var_value);
! WebApp::setSVar($var_name, $var_value);
! WebApp::getSVar($var_name);
!
* - DB Session Vars (or DB State Vars)
--- 163,190 ----
in JS have been changed so that they are more consistent with the
other function names in framework. Now they are:
! session.addVar("var_name", "var_value");
! session.rmVar("var_name");
! session.setVar("var_name", "var_value");
! session.getVar("var_name");
* - The names of the functions of the session object are:
! $session->addVar($var_name, $var_value);
! $session->rmVar($var_name); //removes a variable from session
! $session->setVar($var_name, $var_value); //sets a new value
! $session->getVar($var_name); //get the value of the var
The names of the functions for the state vars of a webox are:
! $this->addSVar($var_name, $var_value);
! $this->addSVars($arr_vars);
! $this->setSVar($var_name, $var_value);
! $this->setSVars($arr_vars);
! $this->getSVar($var_value);
! $this->getSVars();
The session and state vars can also be accessed using this functions:
! WebApp::addSVar($var_name, $var_value);
! WebApp::setSVar($var_name, $var_value);
! WebApp::getSVar($var_name);
!
* - DB Session Vars (or DB State Vars)
***************
*** 201,210 ****
var, but add a third parameter that is not false, like this:
! $session->addVar($var_name, $var_value, true);
! $session->addVar($var_name, $var_value, "DB");
! $session->addVar($var_name, $var_value, "secure"); etc.
! $this->addSVar($var_name, $var_value,"DB");
! WebApp::addSVar($var_name, $var_value, "DB");
To change or get the value of a DB variable we use the same "set"
--- 201,210 ----
var, but add a third parameter that is not false, like this:
! $session->addVar($var_name, $var_value, true);
! $session->addVar($var_name, $var_value, "DB");
! $session->addVar($var_name, $var_value, "secure"); etc.
! $this->addSVar($var_name, $var_value,"DB");
! WebApp::addSVar($var_name, $var_value, "DB");
To change or get the value of a DB variable we use the same "set"
***************
*** 219,224 ****
The array: '$session->dbVars' can be used to access the DB vars
as well, like this:
! $session->dbVars[$var_name] = $var_value;
! $var_value = $session->dbVars[$var_name];
but it is not neccessary and it is not recomended to use it
(in fact, it is discouraged to use it).
--- 219,224 ----
The array: '$session->dbVars' can be used to access the DB vars
as well, like this:
! $session->dbVars[$var_name] = $var_value;
! $var_value = $session->dbVars[$var_name];
but it is not neccessary and it is not recomended to use it
(in fact, it is discouraged to use it).
Index: new_app.txt
===================================================================
RCS file: /cvsroot/phpwebapp/documentation/templates/user_manual/manual_pages/new_app.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** new_app.txt 23 Feb 2003 14:29:07 -0000 1.2
--- new_app.txt 20 Aug 2003 07:31:55 -0000 1.3
***************
*** 27,39 ****
<?
$app_path = dirname(__FILE__);
! $app_path = str_replace("\\", "/", $app_path); //could be a Windows path
! define("APP_PATH", $app_path."/");
! define("CONFIG_PATH", APP_PATH."config/");
include CONFIG_PATH."const.Paths.php";
//include configuration constants
include CONFIG_PATH."const.Settings.php";
! if (USES_DB) include CONFIG_PATH."const.DB.php";
//include the WebApp framework
--- 27,39 ----
<?
$app_path = dirname(__FILE__);
! $app_path = str_replace("\\", "/", $app_path); //could be a Windows path
! define("APP_PATH", $app_path."/");
! define("CONFIG_PATH", APP_PATH."config/");
include CONFIG_PATH."const.Paths.php";
//include configuration constants
include CONFIG_PATH."const.Settings.php";
! if (USES_DB) include CONFIG_PATH."const.DB.php";
//include the WebApp framework
***************
*** 61,77 ****
if ($event->targetPage==UNDEFINED)
{
! //first time that the user enters in the application
! $fname = EVENTHANDLER_PATH."on.firstTime.php";
! if (file_exists($fname))
! {
! include $fname;
! on_firstTime();
! }
}
if ($event->target=="none")
{
! //call the free event
! WebApp::callFreeEvent($event);
}
--- 61,77 ----
if ($event->targetPage==UNDEFINED)
{
! //first time that the user enters in the application
! $fname = EVENTHANDLER_PATH."on.firstTime.php";
! if (file_exists($fname))
! {
! include $fname;
! on_firstTime();
! }
}
if ($event->target=="none")
{
! //call the free event
! WebApp::callFreeEvent($event);
}
***************
*** 97,104 ****
<?
//constants of the paths in the application
! define("APP_URL", "/phpWebApp/app1/");
! define("WEBAPP_PATH", APP_PATH."../web_app/");
! define("EVENTHANDLER_PATH", APP_PATH."event_handlers/");
! define("TPL_PATH", APP_PATH."templates/");
?>
--- 97,104 ----
<?
//constants of the paths in the application
! define("APP_URL", "/phpWebApp/app1/");
! define("WEBAPP_PATH", APP_PATH."../web_app/");
! define("EVENTHANDLER_PATH", APP_PATH."event_handlers/");
! define("TPL_PATH", APP_PATH."templates/");
?>
***************
*** 130,158 ****
<?
//constants of the paths in the application
! define("APP_URL", "/vodafone/");
! define("WEBAPP_PATH", "/var/www/html/web_app/");
//mix paths
! define("EVENTHANDLER_PATH", APP_PATH."event_handlers/");
! define("GRAPHICS_URL", APP_URL."graphics/");
! define("INCLUDE_PATH", APP_PATH."include_php/");
//template paths
! define("TPL_PATH", APP_PATH."templates/");
! define("TOPMENU_PATH", TPL_PATH."topMenu/");
! define("LEFTSIDE_PATH", TPL_PATH."leftSide/");
! define("CONTENTMENU_PATH", TPL_PATH."contentMenu_old/");
! define("CONTENT_PATH", TPL_PATH."content/");
! define("DBCONTENT_PATH", TPL_PATH."dbContent/");
! define("EDIT_PATH", TPL_PATH."edit/");
! define("EDITMENUS_PATH", EDIT_PATH."editMenus/");
! define("EDITDOCS_PATH", EDIT_PATH."editDocs/");
//module paths
! define("MENU_PATH", CONTENTMENU_PATH."buildMenus/");
! define("SPONSOR_PATH", APP_PATH."modules/sponsorat/");
! define("SNIFFER_PATH", APP_PATH."modules/clientsniffer/");
?>
--- 130,158 ----
<?
//constants of the paths in the application
! define("APP_URL", "/vodafone/");
! define("WEBAPP_PATH", "/var/www/html/web_app/");
//mix paths
! define("EVENTHANDLER_PATH", APP_PATH."event_handlers/");
! define("GRAPHICS_URL", APP_URL."graphics/");
! define("INCLUDE_PATH", APP_PATH."include_php/");
//template paths
! define("TPL_PATH", APP_PATH."templates/");
! define("TOPMENU_PATH", TPL_PATH."topMenu/");
! define("LEFTSIDE_PATH", TPL_PATH."leftSide/");
! define("CONTENTMENU_PATH", TPL_PATH."contentMenu_old/");
! define("CONTENT_PATH", TPL_PATH."content/");
! define("DBCONTENT_PATH", TPL_PATH."dbContent/");
! define("EDIT_PATH", TPL_PATH."edit/");
! define("EDITMENUS_PATH", EDIT_PATH."editMenus/");
! define("EDITDOCS_PATH", EDIT_PATH."editDocs/");
//module paths
! define("MENU_PATH", CONTENTMENU_PATH."buildMenus/");
! define("SPONSOR_PATH", APP_PATH."modules/sponsorat/");
! define("SNIFFER_PATH", APP_PATH."modules/clientsniffer/");
?>
***************
*** 166,192 ****
define("USES_DB", false);
! //if this constant is true, the framework will load the DB component
! //and will open a default connection with the db specified in the
! //file 'config/const.DB.php'
define("DEBUG_GOTO", false);
! //if this constant is true, the framework displays an alert
! //each time that the function GoTo() is called (for debug)
define("DEBUG_SESSION", false);
! //if this constant is true, the framework outputs the session
! //variables as an HTML table (for debug)
define("DEBUG_RECORDSETS", false);
! //if this constant is true, the framework outputs all the
! //recordsets of the page and their contents (for debug)
define("DEBUG_TEMPLATES", false);
! //if this constant is true, the framework outputs the tree
! //structure of the templates of the page (for debug)
define("EXECUTION_TIME_INFO", false);
! //if this constant is true, the framework outputs information
! //about the execution time of several processes (for debug)
//etc.
--- 166,192 ----
define("USES_DB", false);
! //if this constant is true, the framework will load the DB component
! //and will open a default connection with the db specified in the
! //file 'config/const.DB.php'
define("DEBUG_GOTO", false);
! //if this constant is true, the framework displays an alert
! //each time that the function GoTo() is called (for debug)
define("DEBUG_SESSION", false);
! //if this constant is true, the framework outputs the session
! //variables as an HTML table (for debug)
define("DEBUG_RECORDSETS", false);
! //if this constant is true, the framework outputs all the
! //recordsets of the page and their contents (for debug)
define("DEBUG_TEMPLATES", false);
! //if this constant is true, the framework outputs the tree
! //structure of the templates of the page (for debug)
define("EXECUTION_TIME_INFO", false);
! //if this constant is true, the framework outputs information
! //about the execution time of several processes (for debug)
//etc.
***************
*** 206,213 ****
function on_firstTime()
{
! //initialize the event
! global $targetPage, $event;
! $targetPage = "page1.html";
! $event->targetPage = $targetPage;
}
?>
--- 206,213 ----
function on_firstTime()
{
! //initialize the event
! global $targetPage, $event;
! $targetPage = "page1.html";
! $event->targetPage = $targetPage;
}
?>
Index: misc.txt
===================================================================
RCS file: /cvsroot/phpwebapp/documentation/templates/user_manual/manual_pages/misc.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** misc.txt 23 Feb 2003 14:33:06 -0000 1.1
--- misc.txt 20 Aug 2003 07:31:55 -0000 1.2
***************
*** 9,13 ****
This function is usefull when you want to construct a page
for sending it by e-mail.
!
-------- external link to an application page -----------
* - The function WebApp::external_page() returns a link that can
--- 9,13 ----
This function is usefull when you want to construct a page
for sending it by e-mail.
!
-------- external link to an application page -----------
* - The function WebApp::external_page() returns a link that can
***************
*** 35,39 ****
or password", or an information message, e.g. "Project Data Saved".
* - The function:
! WebApp::debug_msg($msg, $comment);
is added to the framework. It makes the framework to display
the given message after the page is rendered. The comment is
--- 35,39 ----
or password", or an information message, e.g. "Project Data Saved".
* - The function:
! WebApp::debug_msg($msg, $comment);
is added to the framework. It makes the framework to display
the given message after the page is rendered. The comment is
***************
*** 44,53 ****
method is safer and cleaner. The message $msg can be a large
message that contains tags, e.g.
! WebApp::debug_msg($tpl->toHtmlTable());
! WebApp::debug_msg($rs->toHtmlTable(), "The content of recordset");
! WebApp::debug_msg($tplVars->toHtmlTable(),
! "The content of varstack at this point");
! WebApp::debug_msg($webPage->template_list(),
! "All the templates parsed up to this point");
etc.
-----------------------------------------------------------------
--- 44,53 ----
method is safer and cleaner. The message $msg can be a large
message that contains tags, e.g.
! WebApp::debug_msg($tpl->toHtmlTable());
! WebApp::debug_msg($rs->toHtmlTable(), "The content of recordset");
! WebApp::debug_msg($tplVars->toHtmlTable(),
! "The content of varstack at this point");
! WebApp::debug_msg($webPage->template_list(),
! "All the templates parsed up to this point");
etc.
-----------------------------------------------------------------
Index: events.txt
===================================================================
RCS file: /cvsroot/phpwebapp/documentation/templates/user_manual/manual_pages/events.txt,v...
[truncated message content] |