phpwebapp-commits Mailing List for phpWebApp (Page 11)
Brought to you by:
dashohoxha
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(15) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(2) |
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2003 |
Jan
|
Feb
(43) |
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(194) |
Sep
(60) |
Oct
(6) |
Nov
|
Dec
(16) |
2004 |
Jan
(73) |
Feb
(13) |
Mar
(5) |
Apr
|
May
(5) |
Jun
|
Jul
(183) |
Aug
|
Sep
(5) |
Oct
(30) |
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
(1) |
Jun
(35) |
Jul
(17) |
Aug
(2) |
Sep
(6) |
Oct
(19) |
Nov
(108) |
Dec
|
2006 |
Jan
(10) |
Feb
(1) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Dashamir H. <das...@us...> - 2004-07-30 09:55:58
|
Update of /cvsroot/phpwebapp/app3/templates/tip In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6385/templates/tip Modified Files: tips.php Removed Files: tip4.php tip4.html Log Message: Index: tips.php =================================================================== RCS file: /cvsroot/phpwebapp/app3/templates/tip/tips.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tips.php 25 Aug 2003 13:52:01 -0000 1.2 --- tips.php 30 Jul 2004 09:55:50 -0000 1.3 *************** *** 30,42 **** "There must not be two WebBox-es in the same web application with " ! . "the same ID!", ! ! "The framework tags are case sensitive, e.g. the framework will " ! . "reckognize the tag 'WebBox', however will not reckognize " ! . "the tag 'webbox'.", ! ! "The framework tag attributes are case sensitive, e.g. the framework will " ! . "reckognize the attribute 'ID' of the tag WebBox, however will not " ! . "reckognize the attribute 'id' of the tag WebBox." ); ?> \ No newline at end of file --- 30,34 ---- "There must not be two WebBox-es in the same web application with " ! . "the same ID!" ); ?> \ No newline at end of file --- tip4.php DELETED --- --- tip4.html DELETED --- |
From: Dashamir H. <das...@us...> - 2004-07-30 07:00:56
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12722 Modified Files: class.Render.php Log Message: fixed a mistake Index: class.Render.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Render.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** class.Render.php 29 Jul 2004 14:46:54 -0000 1.17 --- class.Render.php 30 Jul 2004 07:00:47 -0000 1.18 *************** *** 191,198 **** case "PreTpl": case "XmpTpl": - case "ExampleTpl": case "TextAreaTpl": $this->render_preformated_tpl($tpl); break; case "IfTpl": $this->render_IfTpl($tpl); --- 191,200 ---- case "PreTpl": case "XmpTpl": case "TextAreaTpl": $this->render_preformated_tpl($tpl); break; + case "ExampleTpl": + $this->render_ExampleTpl($tpl); + break; case "IfTpl": $this->render_IfTpl($tpl); *************** *** 216,219 **** --- 218,228 ---- } + function render_ExampleTpl($tpl) + { + $attr_list = $tpl->vars['attr_list']; + $contents = $tpl->contents; + $this->output("<xmp$attr_list>".$contents."</xmp>"); + } + function render_preformated_tpl($tpl) { |
From: Dashamir H. <das...@us...> - 2004-07-29 14:47:05
|
Update of /cvsroot/phpwebapp/web_app/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19096/doc Modified Files: to_do.txt ToDo.txt Log Message: Index: to_do.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/to_do.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** to_do.txt 23 Jul 2004 10:17:07 -0000 1.12 --- to_do.txt 29 Jul 2004 14:46:54 -0000 1.13 *************** *** 1,5 **** ! - fix some bugs in the documentation application (codeReview) ! - add the forth tutorial ! - update documentation ! - remove the downloads from the page of the framework --- 1,31 ---- ! * - Add this functionality to the framework: any webobject can ! handle an event sent to another webobject, if it defines the ! event handler "on_className_eventName()" (usually the event ! handlers are named like this: "on_eventName()"). ! Here 'eventName' is the name of the event, and 'className' is ! the class of the webobject that receives or sends the event ! (whichever is more appropriate). ! This may make obsolete the "event_target='any'", which was used ! to allow a webbox to handle the events of another webbox. ! ! * - Add a switch at const.Settings.php, which tells the framework ! to print debug information for the functions that are executed ! in the order that they are executed. Such functions can be ! onParse, onRender, init, eventHandler, on_event, etc. ! ! * - Add a function: WebApp::reloadPage($new_page) which stops ! processing the current page and starts loading the new ! page. This may be usefull when a webox redirects the event ! to another webbox or sends a new event to another webbox. ! E.g. in login, the login webox, after checking that the ! password is wrong, reloads another page. ! Probably is better to call it: WebApp::GoTo("tpl.html?etc"), ! to be consistent with the GoTo() JS function. ! ! - Add a function: WebApp::toHtml($tpl_page) which loads the ! given template, renders it (using any egzisting variables) ! and returns the HTML code. ! ! * - Factor out from the classes all the debuging functions and ! put them in a separate class or file. Index: ToDo.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/ToDo.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ToDo.txt 29 Jul 2004 07:58:16 -0000 1.7 --- ToDo.txt 29 Jul 2004 14:46:54 -0000 1.8 *************** *** 1,32 **** - * - Add this functionality to the framework: any webobject can - handle an event sent to another webobject, if it defines the - event handler "on_className_eventName()" (usually the event - handlers are named like this: "on_eventName()"). - Here 'eventName' is the name of the event, and 'className' is - the class of the webobject that receives or sends the event - (whichever is more appropriate). - This may make obsolete the "event_target='any'", which was used - to allow a webbox to handle the events of another webbox. - - * - Add a switch at const.Settings.php, which tells the framework - to print debug information for the functions that are executed - in the order that they are executed. Such functions can be - onParse, onRender, init, eventHandler, on_event, etc. - - * - Add a function: WebApp::reloadPage($new_page) which stops - processing the current page and starts loading the new - page. This may be usefull when a webox redirects the event - to another webbox or sends a new event to another webbox. - E.g. in login, the login webox, after checking that the - password is wrong, reloads another page. - Probably is better to call it: WebApp::GoTo("tpl.html?etc"), - to be consistent with the GoTo() JS function. - - - Add a function: WebApp::toHtml($tpl_page) which loads the - given template, renders it (using any egzisting variables) - and returns the HTML code. - - * - Factor out from the classes all the debuging functions and - put them in a separate class or file. A non-exhaustive list of things that are to be done --- 1,2 ---- |
From: Dashamir H. <das...@us...> - 2004-07-29 14:47:05
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19096/parser Modified Files: class.Template.php class.Render.php class.Parser.php Log Message: Index: class.Template.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Template.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** class.Template.php 22 Jul 2004 16:25:37 -0000 1.13 --- class.Template.php 29 Jul 2004 14:46:54 -0000 1.14 *************** *** 114,118 **** //remove any empty lines in the end ! $str = preg_replace('/\n\s*$/', '', $str); //Trim the indentation from the beginning of each line. --- 114,118 ---- //remove any empty lines in the end ! $str = preg_replace('/\n\s*$/', "\n", $str); //Trim the indentation from the beginning of each line. Index: class.Render.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Render.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** class.Render.php 28 Jul 2004 14:26:55 -0000 1.16 --- class.Render.php 29 Jul 2004 14:46:54 -0000 1.17 *************** *** 70,73 **** --- 70,74 ---- $this->output($str); } + /** Make some extra processing and replacements in the output. */ function other_replaces($str) Index: class.Parser.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Parser.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** class.Parser.php 28 Jul 2004 14:26:55 -0000 1.18 --- class.Parser.php 29 Jul 2004 14:46:54 -0000 1.19 *************** *** 691,694 **** --- 691,697 ---- { $tpl = new Template; + $file = $this->files[sizeof($this->files)-1]; + $url = WebApp::to_url(dirname($file).'/'); + $tpl->addVar('./', "'$url'"); $this->push_current_tpl($tpl); } *************** *** 724,727 **** --- 727,733 ---- { $tpl = new Template; + $file = $this->files[sizeof($this->files)-1]; + $url = WebApp::to_url(dirname($file).'/'); + $tpl->addVar('./', "'$url'"); $this->push_current_tpl($tpl); } |
From: Dashamir H. <das...@us...> - 2004-07-29 14:43:46
|
Update of /cvsroot/phpwebapp/documentation/templates/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18452/templates/tutorial Modified Files: transitions.html templates.html intro.html Log Message: Index: transitions.html =================================================================== RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/transitions.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** transitions.html 21 Jul 2004 17:15:31 -0000 1.6 --- transitions.html 29 Jul 2004 14:43:36 -0000 1.7 *************** *** 67,74 **** <em>JavaScript</em> function, and this function makes the transition by calling <strong>GoTo()</strong>. So, the application ! has a chance to make any error checkings, input data validations etc. before making the transition to the other page.</p> ! <p><a href="javascript:codeReview('{{APP1_PATH}}page1.html','14,40,41')"> See the code</a> of the first page and notice how the <strong>GoTo()</strong> is used. --- 67,74 ---- <em>JavaScript</em> function, and this function makes the transition by calling <strong>GoTo()</strong>. So, the application ! has a chance to make any error checking, input data validations etc. before making the transition to the other page.</p> ! <p><a href="javascript:codeReview('{{APP1_PATH}}page1.html','18,57,58')"> See the code</a> of the first page and notice how the <strong>GoTo()</strong> is used. *************** *** 105,109 **** <p>See an ! <a href="javascript:codeReview('{{APP1_PATH}}page2.html','14,15','9-16')"> example</a> of linking to external pages.</p> --- 105,109 ---- <p>See an ! <a href="javascript:codeReview('{{APP1_PATH}}page2.html','23,24','15-32')"> example</a> of linking to external pages.</p> *************** *** 129,137 **** config/ -- configuration files for the application const.Paths.php -- constants of paths used in the application ! const.Options.php -- constants that change the behaviour of the app const.Debug.php -- constants that are used for debugging the app ! index.php -- standart framework file ! webapp.php -- standart framework file </pre> <br /> --- 129,137 ---- config/ -- configuration files for the application const.Paths.php -- constants of paths used in the application ! const.Options.php -- constants that change the behavior of the app const.Debug.php -- constants that are used for debugging the app ! index.php -- standard framework file ! webapp.php -- standard framework file </pre> <br /> *************** *** 163,169 **** them are optional. These constants are: <strong>WEBAPP_PATH</strong> and <strong>TPL_PATH</strong> in ! <a href="javascript:codeReview('{{APP1_PATH}}config/const.Paths.php','3,4')">const.Paths.php</a>, and <strong>FIRSTPAGE</strong> in ! <a href="javascript:codeReview('{{APP1_PATH}}config/const.Options.php', '9-13', '1-21')">const.Options.php</a> </p> --- 163,169 ---- them are optional. These constants are: <strong>WEBAPP_PATH</strong> and <strong>TPL_PATH</strong> in ! <a href="javascript:codeReview('{{APP1_PATH}}config/const.Paths.php','5,6')">const.Paths.php</a>, and <strong>FIRSTPAGE</strong> in ! <a href="javascript:codeReview('{{APP1_PATH}}config/const.Options.php','30-34','22-42')">const.Options.php</a> </p> *************** *** 173,179 **** <a name="exercises"></a> ! <h3>Exerxises</h3> ! <p>To be able to try the exercises you have to instal the framework and the sample applications in your computer or somewhere where you can make changes.</p> --- 173,179 ---- <a name="exercises"></a> ! <h3>Exercises</h3> ! <p>To be able to try the exercises you have to install the framework and the sample applications in your computer or somewhere where you can make changes.</p> *************** *** 184,188 **** <p>In this exercise you will create another application which is ! identic with <strong>app1</strong> but has a different name, <strong>app1_test</strong>. Follow these steps:</p> --- 184,188 ---- <p>In this exercise you will create another application which is ! the same as <strong>app1</strong> but has a different name, <strong>app1_test</strong>. Follow these steps:</p> *************** *** 191,195 **** <kbd>$ cp -R app1 app1_test</kbd></li> ! <li>That was all, open the application <em>/app1_test/</em> in browser to test it. It should work.</li> </ol> --- 191,195 ---- <kbd>$ cp -R app1 app1_test</kbd></li> ! <li>That was all, open the application <em>app1_test/</em> in browser to test it. It should work.</li> </ol> *************** *** 206,214 **** <kbd>$ mkdir test <br /> $ mv app1_test test</kbd></li> ! <li>Edit the file <em>test/app1_test/config/<a href="javascript:codeReview('{{APP1_PATH}}config/const.Paths.php','3')">const.Paths.php</a></em> so that the constant <strong>WEBAPP_PATH</strong> is set to <strong>UP_PATH."../web_app/"</strong>.</li> ! <li>Open the application <em>/test/app1_test/</em> in browser to test it; it should work.</li> </ol> --- 206,214 ---- <kbd>$ mkdir test <br /> $ mv app1_test test</kbd></li> ! <li>Edit the file <em>test/app1_test/config/<a href="javascript:codeReview('{{APP1_PATH}}config/const.Paths.php','5')">const.Paths.php</a></em> so that the constant <strong>WEBAPP_PATH</strong> is set to <strong>UP_PATH."../web_app/"</strong>.</li> ! <li>Open the application <em>test/app1_test/</em> in browser to test it; it should work.</li> </ol> *************** *** 222,229 **** <p>In this example it is set as a relative path, but it can be set ! as an absolute path as well, e.g. <em>/var/www/html/web_app/</em> (or ! <em>c:/www/html/web_app/</em> for Windows). In this case you don't have to ! wory about changing it when moving an application to another ! location.</p> <a name="exercise_3"></a> --- 222,228 ---- <p>In this example it is set as a relative path, but it can be set ! as an absolute path as well, e.g. <em>/var/www/html/web_app/</em>. ! In this case you don't have to worry about changing it when moving ! an application to another location.</p> <a name="exercise_3"></a> *************** *** 233,237 **** <ol> <li>Edit the file ! <a href="javascript:codeReview('{{APP1_PATH}}config/const.Debug.php','6-10')"> <em>config/const.Debug.php</em></a> and set the constant <strong>DEBUG_GOTO</strong> to <strong>true</strong>.</li> --- 232,236 ---- <ol> <li>Edit the file ! <a href="javascript:codeReview('{{APP1_PATH}}config/const.Debug.php','27-31')"> <em>config/const.Debug.php</em></a> and set the constant <strong>DEBUG_GOTO</strong> to <strong>true</strong>.</li> *************** *** 263,267 **** <ol> <li>Open the file <em>config/<a href= ! "javascript:codeReview('{{APP1_PATH}}config/const.Options.php','9-13')">const.Options.php</a></em> and set the <strong>FIRSTPAGE</strong> variable to <strong>page2.html</strong>.</li> --- 262,266 ---- <ol> <li>Open the file <em>config/<a href= ! "javascript:codeReview('{{APP1_PATH}}config/const.Options.php','30-34')">const.Options.php</a></em> and set the <strong>FIRSTPAGE</strong> variable to <strong>page2.html</strong>.</li> *************** *** 285,289 **** <li>Open the file <em>config/<a href= ! "javascript:codeReview('{{APP1_PATH}}config/const.Paths.php','4')">const.Paths.php</a></em> and set the constant <strong>TPL_PATH</strong> to <strong>APP_PATH."pages/"</strong>.</li> --- 284,288 ---- <li>Open the file <em>config/<a href= ! "javascript:codeReview('{{APP1_PATH}}config/const.Paths.php','6')">const.Paths.php</a></em> and set the constant <strong>TPL_PATH</strong> to <strong>APP_PATH."pages/"</strong>.</li> *************** *** 295,302 **** look for the pages (in the phpWebApp jargon pages are called <em>templates</em> because they may contain <em>variables</em> and ! other <em>extra tags</em> that are reckognized by the framework). When you write <strong>GoTo('page1.html')</strong>, the framework looks for <em>page1.html</em> in the <strong>TPL_PATH</strong>. The constant ! <strong>APP_PATH</strong> is a predefined constat and it contains the path of the application itself.</p> --- 294,301 ---- look for the pages (in the phpWebApp jargon pages are called <em>templates</em> because they may contain <em>variables</em> and ! other <em>extra tags</em> that are processed by the framework). When you write <strong>GoTo('page1.html')</strong>, the framework looks for <em>page1.html</em> in the <strong>TPL_PATH</strong>. The constant ! <strong>APP_PATH</strong> is a predefined constant and it contains the path of the application itself.</p> *************** *** 309,313 **** <p>Another kind of constants used in the framework, the URL constants, represent paths in the application starting from the DocumentRoot (the ! part of the URL comming after the server name and before the file name). By convention, they end with an <strong>_URL</strong> and their value ends with a slash <strong>/</strong>. E.g. IMG_URL, JS_URL, etc.</p> --- 308,312 ---- <p>Another kind of constants used in the framework, the URL constants, represent paths in the application starting from the DocumentRoot (the ! part of the URL coming after the server name and before the file name). By convention, they end with an <strong>_URL</strong> and their value ends with a slash <strong>/</strong>. E.g. IMG_URL, JS_URL, etc.</p> Index: templates.html =================================================================== RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/templates.html,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** templates.html 21 Jul 2004 17:15:31 -0000 1.7 --- templates.html 29 Jul 2004 14:43:36 -0000 1.8 *************** *** 88,101 **** <p>See this ! <a href="javascript:codeReview('{{APP2_PATH}}templates/page3/page3.html','4,7,9,11')"> ! example</a>. The <strong>{{#TPL_URL}}</strong> variable in line 4 contains the URL of the folder <em>templates</em>, which in this case is <em>{{APP2_URL}}templates/</em>. The <strong>{{#TPL_PATH}}</strong> variable in ! lines 7 and 11 contains the path in the server of the folder templates, e.g. <em>/var/www/html{{APP2_URL}}templates/</em>. Both of them are declared in the file ! <a href="javascript:codeReview('{{APP2_PATH}}config/const.Paths.php','4,5')"> <em>config/const.Paths.php</em></a>. The variable <strong>{{#./}}</strong> ! in line 9 is a special framework variable that always contains the path of the current folder, i.e. the folder of the current file.</p> --- 88,101 ---- <p>See this ! <a href="javascript:codeReview('{{APP2_PATH}}templates/page3/page3.html','8,11,13,15')"> ! example</a>. The <strong>{{#TPL_URL}}</strong> variable in line 8 contains the URL of the folder <em>templates</em>, which in this case is <em>{{APP2_URL}}templates/</em>. The <strong>{{#TPL_PATH}}</strong> variable in ! lines 11 and 15 contains the path in the server of the folder templates, e.g. <em>/var/www/html{{APP2_URL}}templates/</em>. Both of them are declared in the file ! <a href="javascript:codeReview('{{APP2_PATH}}config/const.Paths.php','6,7')"> <em>config/const.Paths.php</em></a>. The variable <strong>{{#./}}</strong> ! in line 13 is a special framework variable that always contains the path of the current folder, i.e. the folder of the current file.</p> *************** *** 103,114 **** <a name="include"></a> ! <h4>2 - The &lt;Include&gt; tag</h4> <p>The templates may also contain some extra tags, which are not ! HTML tags. These tags are reckognised and processed by the ! framework. One of them is the &lt;Include&gt; tag, which is used to include another template inside the current template:</p> <pre> ! &lt;Include src="file_to_be_included" /&gt; </pre> --- 103,114 ---- <a name="include"></a> ! <h4>2 - The &lt;include&gt; tag</h4> <p>The templates may also contain some extra tags, which are not ! HTML tags. These tags are recognized and processed by the ! framework. One of them is the &lt;include&gt; tag, which is used to include another template inside the current template:</p> <pre> ! &lt;include src="file_to_be_included" /&gt; </pre> *************** *** 116,122 **** subtemplates, which results in a better structured application, provides modularity (the graphical designer can work with smaller ! pieces of code), and reusability (templates are easier to be reused in other pages or other applications). See how it is used in this ! <a href="javascript:codeReview('{{APP2_PATH}}templates/page3/page3.html','7,9,11')"> example</a>.</p> --- 116,122 ---- subtemplates, which results in a better structured application, provides modularity (the graphical designer can work with smaller ! pieces of code), and re-usability (templates are easier to be reused in other pages or other applications). See how it is used in this ! <a href="javascript:codeReview('{{APP2_PATH}}templates/page3/page3.html','11,13,15')"> example</a>.</p> *************** *** 127,136 **** <p>The templates may contain some special comments as well:</p> <pre> ! &lt;!--# Framework comments #--&gt; </pre> <p>These comments are like HTML comments but they have a diesis ! <strong>#</strong> at the opening and closing marks. These comments ! are not processed (are skiped, ignored) by the framework and are not displayed in the HTML page that is generated. <a href="javascript:codeReview('{{APP2_PATH}}templates/header.html','1-3')"> --- 127,136 ---- <p>The templates may contain some special comments as well:</p> <pre> ! &lt;!--# Framework comments --&gt; </pre> <p>These comments are like HTML comments but they have a diesis ! <strong>#</strong> at the opening mark. These comments ! are not processed (are skipped, ignored) by the framework and are not displayed in the HTML page that is generated. <a href="javascript:codeReview('{{APP2_PATH}}templates/header.html','1-3')"> *************** *** 143,153 **** <p>If a certain template has some javascript code or some special styles of its own, then it is better to include them at the ! begining of the template (instead of including them globally, at the &lt;Head&gt; of the page). This makes the template more ! independant from the other parts of the page and thus easier to use it again into another page. They are included like this:</p> <pre> ! &lt;script language="javascript" src="file.js"&gt;&lt;/script&gt; ! &lt;link rel="stylesheet" type="text/css" href="file.css"&gt; </pre> --- 143,153 ---- <p>If a certain template has some javascript code or some special styles of its own, then it is better to include them at the ! beginning of the template (instead of including them globally, at the &lt;Head&gt; of the page). This makes the template more ! independent from the other parts of the page and thus easier to use it again into another page. They are included like this:</p> <pre> ! &lt;script type="text/javascript" language="javascript" src="file.js"&gt;&lt;/script&gt; ! &lt;link type="text/css" rel="stylesheet" href="file.css"&gt; </pre> *************** *** 157,161 **** example2</a>. ! <p>The inclusion is much better than writting the JS and CSS code in the template because it separates the HTML code from the JS and CSS codes. It also is more efficient (has a better performance) because --- 157,161 ---- example2</a>. ! <p>The inclusion is much better than writing the JS and CSS code in the template because it separates the HTML code from the JS and CSS codes. It also is more efficient (has a better performance) because *************** *** 174,182 **** <ul> <li>All the templates of the application are placed in the folder ! <em>/templates/</em>. We tell to the framework where to look for the templates by giving an appropriate value to the constant <strong>TPL_PATH</strong> in the file ! <a href="javascript:codeReview('{{APP2_PATH}}config/const.Paths.php','4')"> <em>config/const.Paths.php</em></a>. <br /> --- 174,182 ---- <ul> <li>All the templates of the application are placed in the folder ! <em>templates/</em>. We tell to the framework where to look for the templates by giving an appropriate value to the constant <strong>TPL_PATH</strong> in the file ! <a href="javascript:codeReview('{{APP2_PATH}}config/const.Paths.php','6')"> <em>config/const.Paths.php</em></a>. <br /> *************** *** 184,188 **** <li>All the images of this application are placed in the folder ! <em>/img/</em>. In templates they are linked using the <strong>{{#IMG_URL}}</strong> variable. <a href="javascript:codeReview('{{APP2_PATH}}templates/footer.html','9,10')"> --- 184,188 ---- <li>All the images of this application are placed in the folder ! <em>img/</em>. In templates they are linked using the <strong>{{#IMG_URL}}</strong> variable. <a href="javascript:codeReview('{{APP2_PATH}}templates/footer.html','9,10')"> *************** *** 190,194 **** variable gets the value from the PHP constant <strong>IMG_URL</strong>, which is declared in the file ! <a href="javascript:codeReview('{{APP2_PATH}}config/const.Paths.php','6')"> <em>config/const.Paths.php</em></a>. <br /> --- 190,194 ---- variable gets the value from the PHP constant <strong>IMG_URL</strong>, which is declared in the file ! <a href="javascript:codeReview('{{APP2_PATH}}config/const.Paths.php','8')"> <em>config/const.Paths.php</em></a>. <br /> *************** *** 196,200 **** <li>All the files and templates of the page3 are placed in the ! folder <em>/templates/page3/</em>. Organizing files into folders and subfolders reduces the complexity of the application and makes it easier to be understood and maintained. --- 196,200 ---- <li>All the files and templates of the page3 are placed in the ! folder <em>templates/page3/</em>. Organizing files into folders and subfolders reduces the complexity of the application and makes it easier to be understood and maintained. *************** *** 205,209 **** <li>All the pages include the same header and footer template, e.g. see ! <a href="javascript:codeReview('{{APP2_PATH}}templates/page1.html','7,9')"> page1.html</a>. If you want to change something in the footer of the page, then you don't have to change every page, but you make --- 205,209 ---- <li>All the pages include the same header and footer template, e.g. see ! <a href="javascript:codeReview('{{APP2_PATH}}templates/page1.html','12,14')"> page1.html</a>. If you want to change something in the footer of the page, then you don't have to change every page, but you make *************** *** 221,225 **** <li>Browse the files and see the template <em>page2.html</em> and all ! the templates in the folder <em>/templates/page3/</em>. See them both in preview mode and in code view mode. These two pages are the same in terms of what they display, however they are implemented --- 221,225 ---- <li>Browse the files and see the template <em>page2.html</em> and all ! the templates in the folder <em>templates/page3/</em>. See them both in preview mode and in code view mode. These two pages are the same in terms of what they display, however they are implemented *************** *** 259,263 **** <li>Open the file ! <a href="javascript:codeReview('{{APP2_PATH}}templates/page2.html','60')"> page2.html</a> and change the text in the highlighted lines to "This box is red!".</li> --- 259,263 ---- <li>Open the file ! <a href="javascript:codeReview('{{APP2_PATH}}templates/page2.html','64')"> page2.html</a> and change the text in the highlighted lines to "This box is red!".</li> *************** *** 291,297 **** <li>Change the value of the <strong>IMG_URL</strong> constant in the file ! <a href="javascript:codeReview('{{APP2_PATH}}config/const.Paths.php','6')"> const.Paths.php</a>. ! Reload the application. The images should be allright.</li> </ol> --- 291,297 ---- <li>Change the value of the <strong>IMG_URL</strong> constant in the file ! <a href="javascript:codeReview('{{APP2_PATH}}config/const.Paths.php','8')"> const.Paths.php</a>. ! Reload the application. The images should be alright.</li> </ol> *************** *** 354,358 **** <li>If you test the application now, you will get an error. Open the file ! <a href="javascript:codeReview('{{APP2_PATH}}config/const.Options.php','9-13')"> <em>config/const.Options.php</em></a> and change the value of the constant <strong>FIRSTPAGE</strong> to "page1/page1.html".</li> --- 354,358 ---- <li>If you test the application now, you will get an error. Open the file ! <a href="javascript:codeReview('{{APP2_PATH}}config/const.Options.php','30-34')"> <em>config/const.Options.php</em></a> and change the value of the constant <strong>FIRSTPAGE</strong> to "page1/page1.html".</li> *************** *** 360,364 **** <li>If you test the application now, it will not be able to find the stylesheet and the header and footer templates. Open the file ! <a href="javascript:codeReview('{{APP2_PATH}}templates/page1.html','4,7,9','')"> <em>page1/page1.html</em></a> and replace <strong>{{#./}}</strong> with <strong>{{#TPL_URL}}</strong> for the stylesheet, and with --- 360,364 ---- <li>If you test the application now, it will not be able to find the stylesheet and the header and footer templates. Open the file ! <a href="javascript:codeReview('{{APP2_PATH}}templates/page1.html','8,12,14','')"> <em>page1/page1.html</em></a> and replace <strong>{{#./}}</strong> with <strong>{{#TPL_URL}}</strong> for the stylesheet, and with *************** *** 382,386 **** <ol> ! <li>In the folder <em>/templates/page1/</em> create the file <em>page1_content.css</em> which has these lines: <pre> --- 382,386 ---- <ol> ! <li>In the folder <em>templates/page1/</em> create the file <em>page1_content.css</em> which has these lines: <pre> *************** *** 425,438 **** <ul> ! <li>Create a new folder <em>/templates/page2/</em> and move the files <em>page2.html</em> and <em>page2.css</em> to it.</li> ! <li>Create a new folder <em>/templates/page3/tpl_1</em> and move the files <em>tpl_1.html</em> and <em>tpl_1.css</em> to it.</li> ! <li>Create a new folder <em>/templates/page3/tpl_2/tpl_2_1</em> and move the files <em>tpl_2_1.html</em> and <em>tpl_2_1.css</em> to it.</li> ! <li>Create a new folder <em>/templates/page3/tpl_2/tpl_2_2</em> and move the files <em>tpl_2_2.html</em> and <em>tpl_2_2.css</em> to it.</li> </ul> --- 425,438 ---- <ul> ! <li>Create a new folder <em>templates/page2/</em> and move the files <em>page2.html</em> and <em>page2.css</em> to it.</li> ! <li>Create a new folder <em>templates/page3/tpl_1</em> and move the files <em>tpl_1.html</em> and <em>tpl_1.css</em> to it.</li> ! <li>Create a new folder <em>templates/page3/tpl_2/tpl_2_1</em> and move the files <em>tpl_2_1.html</em> and <em>tpl_2_1.css</em> to it.</li> ! <li>Create a new folder <em>templates/page3/tpl_2/tpl_2_2</em> and move the files <em>tpl_2_2.html</em> and <em>tpl_2_2.css</em> to it.</li> </ul> *************** *** 442,446 **** <ol> <li>Open the file ! <a href="javascript:codeReview('{{APP2_PATH}}config/const.Debug.php','18-22')"> <em>config/const.Debug.php</em></a> and set the constant <strong>DEBUG_TEMPLATES</strong> to <em>true</em>.</li> --- 442,446 ---- <ol> <li>Open the file ! <a href="javascript:codeReview('{{APP2_PATH}}config/const.Debug.php','39-43')"> <em>config/const.Debug.php</em></a> and set the constant <strong>DEBUG_TEMPLATES</strong> to <em>true</em>.</li> *************** *** 452,456 **** <p>Suppose that you would like to add the current date at the top ! of each file (whithout using JavaScript, using PHP). How would you do it? Or, in general, how could you display something from PHP in the page?</p> --- 452,456 ---- <p>Suppose that you would like to add the current date at the top ! of each file (without using JavaScript, using PHP). How would you do it? Or, in general, how could you display something from PHP in the page?</p> Index: intro.html =================================================================== RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/intro.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** intro.html 21 Jul 2004 17:15:32 -0000 1.6 --- intro.html 29 Jul 2004 14:43:36 -0000 1.7 *************** *** 1,3 **** ! <p>The tutorial consists of a list of sample applications which are built using phpWebApp. Each application uses some features of phpWebApp and has explanations about the features used. It also has --- 1,3 ---- ! <p>The tutorial consists of some sample applications which are built using phpWebApp. Each application uses some features of phpWebApp and has explanations about the features used. It also has *************** *** 56,60 **** code of the weboxes declares the function onRender(), where some variables are added using WebApp::addVar(), and these ! {{variables}} are used in the corresponding template. </td> --- 56,60 ---- code of the weboxes declares the function onRender(), where some variables are added using WebApp::addVar(), and these ! {{#variables}} are used in the corresponding template. </td> *************** *** 79,83 **** <br /> Explains what are the session variables and how to use them. ! Explains further how the {{template variables}} are evaluated. Explains how the session variables are used to keep the state of the weboxes and the states of the application (introduces --- 79,83 ---- <br /> Explains what are the session variables and how to use them. ! Explains further how the {{#template variables}} are evaluated. Explains how the session variables are used to keep the state of the weboxes and the states of the application (introduces |
From: Dashamir H. <das...@us...> - 2004-07-29 14:43:45
|
Update of /cvsroot/phpwebapp/documentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18452 Modified Files: ToDo.txt Log Message: Index: ToDo.txt =================================================================== RCS file: /cvsroot/phpwebapp/documentation/ToDo.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ToDo.txt 8 Sep 2003 13:29:44 -0000 1.7 --- ToDo.txt 29 Jul 2004 14:43:36 -0000 1.8 *************** *** 1,3 **** --- 1,8 ---- + - fix some bugs in the documentation application (codeReview) + - add the forth tutorial + - update documentation + - remove the downloads from the page of the framework + * Make sample apps 4, 5 etc. * Write tutorials 4, 5 etc. *************** *** 6,17 **** * Find a replacement or rewrite them (because they are not GPL): web_app/webobjects/datebox/datebox.js - web_app/boxes/editMenus/hierMenus.js - web_app/boxes/editMenus/include_menus.js - web_app/boxes/editMenus/sample_menu/... * Rewrite and improve the UML model. * Study the texinfo format. * Convert user manuals either in texinfo format or in DocBook format - and construct a webbox that can display such formats in a web application. * Build a code library for webobjects. It should be hierarchical, so that --- 11,18 ---- |
From: Dashamir H. <das...@us...> - 2004-07-29 14:43:45
|
Update of /cvsroot/phpwebapp/documentation/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18452/templates Modified Files: about.html Log Message: Index: about.html =================================================================== RCS file: /cvsroot/phpwebapp/documentation/templates/about.html,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** about.html 21 Jul 2004 17:15:32 -0000 1.7 --- about.html 29 Jul 2004 14:43:36 -0000 1.8 *************** *** 74,81 **** <h3>Installation</h3> <p> ! phpWebApp is written in PHP, so, before installing it, make sure ! that PHP is installed and works correctly with your web server. ! phpWebApp works on any platform that PHP works, i.e Windows9x/NT/2000, ! Linux/UNIX, Apache, IIS, etc. </p> <p> --- 74,81 ---- <h3>Installation</h3> <p> ! phpWebApp is written in PHP, and it works in a Linux+Apache ! webserver. It may be possible to fix it in order to make it ! work in other platforms or webservers, however this is not ! supported. </p> <p> |
From: Dashamir H. <das...@us...> - 2004-07-29 14:42:44
|
Update of /cvsroot/phpwebapp/app2/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18276/templates Modified Files: page1_content.html Log Message: Index: page1_content.html =================================================================== RCS file: /cvsroot/phpwebapp/app2/templates/page1_content.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** page1_content.html 21 Jul 2004 17:11:34 -0000 1.6 --- page1_content.html 29 Jul 2004 14:42:35 -0000 1.7 *************** *** 14,25 **** double curly braces: <strong>{{#tpl_var}}</strong>.</p> ! <h4>The &lt;Include&gt; tag</h4> <p>The templates may also contain some extra tags, which are not HTML tags. These tags are reckognised and processed by the ! framework. One of them is the <strong>&lt;Include&gt;</strong> tag, which is used to include another template inside the current template:</p> <pre> ! &lt;Include src="file_to_be_included" /&gt; </pre> --- 14,25 ---- double curly braces: <strong>{{#tpl_var}}</strong>.</p> ! <h4>The &lt;include&gt; tag</h4> <p>The templates may also contain some extra tags, which are not HTML tags. These tags are reckognised and processed by the ! framework. One of them is the <strong>&lt;include&gt;</strong> tag, which is used to include another template inside the current template:</p> <pre> ! &lt;include src="file_to_be_included" /&gt; </pre> *************** *** 34,42 **** <p>The templates may contain some special comments as well:</p> <pre> ! &lt;!--# Framework comments #--&gt; </pre> <p>These comments are like HTML comments by they have a diesis (#) ! at the opening and closing marks. These comments are not processed by the framework and are not displayed in the HTML page that is generated.</p> --- 34,42 ---- <p>The templates may contain some special comments as well:</p> <pre> ! &lt;!--# Framework comments --&gt; </pre> <p>These comments are like HTML comments by they have a diesis (#) ! at the opening mark. These comments are not processed by the framework and are not displayed in the HTML page that is generated.</p> *************** *** 51,56 **** into another page. They are included like this:</p> <pre> ! &lt;script language="javascript" src="file.js"&gt;&lt;/script&gt; ! &lt;link rel="stylesheet" type="text/css" href="file.css"&gt; </pre> --- 51,56 ---- into another page. They are included like this:</p> <pre> ! &lt;script type="text/javascript" language="javascript" src="file.js"&gt;&lt;/script&gt; ! &lt;link type="text/css" rel="stylesheet" href="file.css"&gt; </pre> |
From: Dashamir H. <das...@us...> - 2004-07-29 14:42:03
|
Update of /cvsroot/phpwebapp/app1/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18003/config Modified Files: const.Debug.php Log Message: Index: const.Debug.php =================================================================== RCS file: /cvsroot/phpwebapp/app1/config/const.Debug.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** const.Debug.php 25 Aug 2003 13:41:13 -0000 1.2 --- const.Debug.php 29 Jul 2004 14:41:54 -0000 1.3 *************** *** 27,31 **** /** * if this constant is true, the framework displays an alert ! * (each time that the function GoTo() is called (for debug) */ define("DEBUG_GOTO", false); --- 27,31 ---- /** * if this constant is true, the framework displays an alert ! * each time that the function GoTo() is called (for debug) */ define("DEBUG_GOTO", false); |
From: Dashamir H. <das...@us...> - 2004-07-29 07:58:26
|
Update of /cvsroot/phpwebapp/web_app/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19835/doc Modified Files: xhtml_template_specification.txt tasks.txt changes.txt ToDo.txt Added Files: changes_4.txt Log Message: --- NEW FILE: changes_4.txt --- phpwebapp-1.1 Changes made to the application framework that the framework users should know: =========================================== ------------------------------------------------------------------- * Parsing is done using an XML parser. This means that some restrictions that were due to the previous parser, now are removed. Such improvments are: - The names of the framework tags and their attributes now are case insensitive (however lowercase is recommended, according to XHTML standards). - The framework comments can be like this: <!--#Comment .... -->. The empty space after the first diesis is not requried anymore, and the ending diesis (#-->) can be omitted. - The closing and ending tags are not required to be in separate lines anymore. E.g. something like this is ok: <if condition="..."> ... </if> Previously it was required to be like this: <If contition="..."> ... </If> - Templates are now required to be XHTML code, otherwise the parser will not parse them successfully. ------------------------------------------------------------------- * The main (root) template should start like this: <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="EN"> because if no DOCTYPE is defined, the parser will have problems with reckognizing entities ( & etc.), and there may be any other problems as well. For the other templates, however, these headers shoud not be added, because the parser will add them automatically to them, so that they become well-formed xml and are parsed successfully. The headers that will be added to the other templates will be a copy of the headers of the main template. ------------------------------------------------------------------- * <Repeat> syntax changed. There was a problem with the <Header>/<Footer> tags, because the contents of the <Header> usually is not well-formed xml and it breaks the parser. E.g. it may be something like this: <repeat rs="rs_id"> <header> <table> <---- not well-formed XML </header> <tr><td>{{xyz}}</td></tr> <footer> </table> </footer> </repeat> In order to solve this, <Header> and <Footer> tags were removed at all. Now it can be done like this (which is well-formed xml): <table> <repeat rs="rs_id"> <tr><td>{{xyz}}</td></tr> </repeat> </table> For the case of paged recordsets, when we need the navigation variables (to get the next page, previous page, etc.) a new framework tag was added: <RSNavig rs="paged_rs_id"> ... </RSNavig> The tags <IfEmpty>, <Separator> and the dummy tag <RepeatBody> can be used the same as before. ------------------------------------------------------------------- * This is wrong: <If condition="'{{CurrPage}}'<>'{{PrevPage}}'"> This is right: <If condition="'{{CurrPage}}'!='{{PrevPage}}'"> because the xml parser complains about the characters < and > inside the value of an attribute. ------------------------------------------------------------------- * In order to put a check in a checkbox according to the value of some state variable, framework used something like this: <input type="checkbox" name="all_books" {{all_books}} onclick="set_chkbox(this)> where the variable {{all_books}} has a value of 'checked' or ''. This is not well-formed XHTML and it breaks the xml parser, because, instead of {{all_books}} the parser expects an attribute name and value. In XHTML this attribute should be used like this: checked="checked". However, doing it like this: <input type="checkbox" name="all_books" checked="{{all_books}}" onclick="set_chkbox(this)> would not solve the problem, because the browser will check the checkbox no matter what is the value of the checked attribute; the presense of the 'checked' attribute is enough for the browser to check the checkbox. In order to solve this problem, the framework, when it renders the HTML page, replaces 'checked=""' with empty (removes it). It also removes: checked="no" and checked="false". On the other hand, it replaces checked="yes" and checked="true" by checked="checked", so that the output complies with XHTML. The same thing is done for: selected="selected", selected="", selected="yes", selected="no", selected="true" and selected="false". ------------------------------------------------------------------- * Added the tag <example>. It can be used like this: <example style="border: 1px solid #eeeeee;"> test <b>test</b> {{test}} <Include SRC="{{content_html}}" /> </example> It is converted by the framework to an <xmp> element, like this: <xmp style="border: 1px solid #eeeeee;"> test <b>test</b> {{test}} <Include SRC="{{content_html}}" /> </xmp> The content of the element is copied verbatim, no variable replacement or other processing is done. Even the white-space is preserved and the overall indentation of the generated page does not touch the original indentation of this element. Also, the framework preserves the original white-space and indentation for the xhtml tags <pre> and <xmp>, however their contents are processed for template variables and framework tags. ------------------------------------------------------------------- * When switching an existing web application to the new version of the framework (with the xml parser), these modifications need to be done to the templates: 1 - Find and remove all <Header> and <Footer> tags and place their contents outside the <Repeat> element. In case that the recordset of the <Repeat> is a paged recordset and page variables ({{PrevPage}}, {{NextPage}} etc.) are used for navigation, then put the navigation part of the template inside the element <RSNavig>. 2 - Replace 'not-equal operator' <> by !=, in the condition of <If> elements: <If condition="'{{CurrPage}}'<>'{{PrevPage}}'"> If there is any 'smaller-than' operator < in attribute values, replace it by &lt;. If it is in the contents of an element (e.g. in the contents of a <Query> element), then either replace it by < or enclose the query inside <![CDATA[...]]>, like this: <Query><![CDATA[ . . . ]]></Query> 3 - Replace the old usage of 'checked' in checkboxes with the new usage; replace {{checked_var}} with checked="{{checked_var}}". Do the same for the 'selected' attribute of the listboxes: replace {{selected_var}} with selected="{{selected_var}}" 4 - Convert all the templates to clean XHTML code (convert all tags and attributes to lowercase, replace <img...> by <img ... />, etc.). Maybe 'tidy' can be used for this, however sometimes it does not produce the desired results (because of the framework tags). 5 - Add these lines at the beginning of the root templates: <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="EN"> 6 - Each xml parser is required to process the entities: & < > " and ' and to return the corresponding character instead of the entity itself. So, it is neccessary to replace in the templates all the xml builtin entities, like this: & --> &amp; < --> &lt; > --> &gt; " --> &quot; ' --> &apos; ------------------------------------------------------------------- * Some conversion scripts are added (in the forlder web_app/convert/), in order to automate most of the modifications to the templates. Read web_app/convert/README. ------------------------------------------------------------------- Index: xhtml_template_specification.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/xhtml_template_specification.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** xhtml_template_specification.txt 13 Jul 2004 16:15:20 -0000 1.4 --- xhtml_template_specification.txt 29 Jul 2004 07:58:16 -0000 1.5 *************** *** 6,10 **** ========== <!--# Comments are denoted like this #--> - <!--# diesis at the beginning, diesis at the end #--> <!--# Such comments are not included --- 6,9 ---- Index: tasks.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/tasks.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tasks.txt 13 Jul 2004 13:18:08 -0000 1.4 --- tasks.txt 29 Jul 2004 07:58:16 -0000 1.5 *************** *** 4,19 **** ======================================================== - + 1 - Automatic Documentation - - 2 - Implement Template Merge/Separator Tool - + 3 - Find HTML Reformater Tool (tidy) - + 4 - Improve the Output of the Framework to be Regular HTML - - 5 - Parse and the templates using an XML parser. - - 6 - Corrections in WebBoxes and WebClasses. - - - 7 - Page and Component Caching. - 8 - Improvments in DB Component. + class.OracleCnn.php etc --- 4,7 ---- *************** *** 24,34 **** 9 - Misc (small changes) + WebApp::GoTo() ! + Improve Error Handling and Multiple Language Support ! for Framework Messages. ! + formWebObject ! + etc ! ! 10 - Apply the improvements in framework to the "documentation" ! project. 11 - Update and improve the model of the framework --- 12,16 ---- 9 - Misc (small changes) + WebApp::GoTo() ! + Multiple Language Support for Framework Messages. 11 - Update and improve the model of the framework Index: changes.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/changes.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** changes.txt 23 Jul 2004 10:17:07 -0000 1.9 --- changes.txt 29 Jul 2004 07:58:16 -0000 1.10 *************** *** 5,201 **** ------------------------------------------------------------------- ! ! * Parsing is done using an XML parser. This means that some ! restrictions that were due to the previous parser, now are removed. ! Such improvments are: ! ! - The names of the framework tags and their attributes now are ! case insensitive (however lowercase is recommended, according ! to XHTML standards). ! ! - The framework comments can be like this: <!--#Comment .... -->. ! The empty space after the first diesis is not requried anymore, ! and the ending diesis (#-->) can be omitted. ! ! - The closing and ending tags are not required to be in separate ! lines anymore. E.g. something like this is ok: ! <if condition="..."> ... </if> ! Previously it was required to be like this: ! <If contition="..."> ! ... ! </If> ! ! - Templates are now required to be XHTML code, otherwise the ! parser will not parse them successfully. ! ! ------------------------------------------------------------------- ! ! * The main (root) template should start like this: ! ! <?xml version="1.0" encoding="iso-8859-1"?> ! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ! "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ! <html xmlns="http://www.w3.org/1999/xhtml" lang="EN"> ! ! because if no DOCTYPE is defined, the parser will have problems ! with reckognizing entities ( & etc.), and there may ! be any other problems as well. ! ! For the other templates, however, these headers shoud not be ! added, because the parser will add them automatically to them, ! so that they become well-formed xml and are parsed successfully. ! The headers that will be added to the other templates will be ! a copy of the headers of the main template. ! ! ------------------------------------------------------------------- ! ! * <Repeat> syntax changed. ! ! There was a problem with the <Header>/<Footer> tags, because the ! contents of the <Header> usually is not well-formed xml and ! it breaks the parser. E.g. it may be something like this: ! <repeat rs="rs_id"> ! <header> ! <table> <---- not well-formed XML ! </header> ! <tr><td>{{xyz}}</td></tr> ! <footer> ! </table> ! </footer> ! </repeat> ! ! In order to solve this, <Header> and <Footer> tags were removed at all. ! Now it can be done like this (which is well-formed xml): ! <table> ! <repeat rs="rs_id"> ! <tr><td>{{xyz}}</td></tr> ! </repeat> ! </table> ! ! For the case of paged recordsets, when we need the navigation variables ! (to get the next page, previous page, etc.) a new framework tag was added: ! <RSNavig rs="paged_rs_id"> ... </RSNavig> ! ! The tags <IfEmpty>, <Separator> and the dummy tag <RepeatBody> can be ! used the same as before. ! ! ------------------------------------------------------------------- ! ! * This is wrong: <If condition="'{{CurrPage}}'<>'{{PrevPage}}'"> ! This is right: <If condition="'{{CurrPage}}'!='{{PrevPage}}'"> ! because the xml parser complains about the characters < and > ! inside the value of an attribute. ! ! ------------------------------------------------------------------- ! ! * In order to put a check in a checkbox according to the value of ! some state variable, framework used something like this: ! <input type="checkbox" name="all_books" {{all_books}} ! onclick="set_chkbox(this)> ! where the variable {{all_books}} has a value of 'checked' or ''. ! ! This is not well-formed XHTML and it breaks the xml parser, ! because, instead of {{all_books}} the parser expects an attribute ! name and value. ! ! In XHTML this attribute should be used like this: checked="checked". ! However, doing it like this: ! <input type="checkbox" name="all_books" checked="{{all_books}}" ! onclick="set_chkbox(this)> ! would not solve the problem, because the browser will check the ! checkbox no matter what is the value of the checked attribute; ! the presense of the 'checked' attribute is enough for the browser ! to check the checkbox. ! ! In order to solve this problem, the framework, when it renders the ! HTML page, replaces 'checked=""' with empty (removes it). ! It also removes: checked="no" and checked="false". On the other hand, ! it replaces checked="yes" and checked="true" by checked="checked", ! so that the output complies with XHTML. ! ! The same thing is done for: selected="selected", selected="", ! selected="yes", selected="no", selected="true" and selected="false". ! ------------------------------------------------------------------- - - * Added the tag <example>. It can be used like this: - - <example style="border: 1px solid #eeeeee;"> test - <b>test</b> - {{test}} - <Include SRC="{{content_html}}" /> - </example> - - It is converted by the framework to an <xmp> element, like this: - - <xmp style="border: 1px solid #eeeeee;"> test - <b>test</b> - {{test}} - <Include SRC="{{content_html}}" /> - </xmp> - - The content of the element is copied verbatim, no variable replacement - or other processing is done. Even the white-space is preserved and - the overall indentation of the generated page does not touch the - original indentation of this element. - - Also, the framework preserves the original white-space and indentation - for the xhtml tags <pre> and <xmp>, however their contents are processed - for template variables and framework tags. - ------------------------------------------------------------------- - - * When switching an existing web application to the new version - of the framework (with the xml parser), these modifications - need to be done to the templates: - - 1 - Find and remove all <Header> and <Footer> tags and place their - contents outside the <Repeat> element. In case that the - recordset of the <Repeat> is a paged recordset and page variables - ({{PrevPage}}, {{NextPage}} etc.) are used for navigation, - then put the navigation part of the template inside the element - <RSNavig>. - - 2 - Replace 'not-equal operator' <> by !=, in the condition of <If> - elements: <If condition="'{{CurrPage}}'<>'{{PrevPage}}'"> - If there is any 'smaller-than' operator < in attribute values, - replace it by &lt;. If it is in the contents of an element - (e.g. in the contents of a <Query> element), then either replace - it by < or enclose the query inside <![CDATA[...]]>, like - this: <Query><![CDATA[ . . . ]]></Query> - - 3 - Replace the old usage of 'checked' in checkboxes with the new - usage; replace {{checked_var}} with checked="{{checked_var}}". - Do the same for the 'selected' attribute of the listboxes: - replace {{selected_var}} with selected="{{selected_var}}" - - 4 - Convert all the templates to clean XHTML code (convert all tags - and attributes to lowercase, replace <img...> by <img ... />, - etc.). Maybe 'tidy' can be used for this, however sometimes - it does not produce the desired results (because of the framework - tags). - - 5 - Add these lines at the beginning of the root templates: - <?xml version="1.0" encoding="iso-8859-1"?> - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml" lang="EN"> - - 6 - Each xml parser is required to process the entities: & < - > " and ' and to return the corresponding character - instead of the entity itself. So, it is neccessary to replace - in the templates all the xml builtin entities, like this: - & --> &amp; - < --> &lt; - > --> &gt; - " --> &quot; - ' --> &apos; - - - ------------------------------------------------------------------- - - * Some conversion scripts are added (in the forlder web_app/convert/), - in order to automate most of the modifications to the templates. - Read web_app/convert/README. - ------------------------------------------------------------------- --- 5,12 ---- ------------------------------------------------------------------- ! * The tag <textarea> is treated as preformated (similar to <pre>, ! <xmp> and <example>). This means that the indentation and the ! white-space of its contents are preserved by the framework. ------------------------------------------------------------------- ------------------------------------------------------------------- ------------------------------------------------------------------- Index: ToDo.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/ToDo.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ToDo.txt 13 Jul 2004 13:18:08 -0000 1.6 --- ToDo.txt 29 Jul 2004 07:58:16 -0000 1.7 *************** *** 73,78 **** that helps when working with phpWebApp. ------------------------------------------------------------- - * - Parse and process the templates using an XML parser. - ------------------------------------------------------------- * - Parse and process the templates using a DOM XML parser. ------------------------------------------------------------- --- 73,76 ---- *************** *** 392,398 **** (actually 'browse' is implemented like a tool, or a webbox that is not totally independent from the application that it browses). - It may also be useful for "tidy", an application that rewrites - the templates of an egzisting application in XHTML format, with - good indentation etc. It will also be useful for the WADE (Web Application Development Environment), so that it is an independent application and --- 390,393 ---- |
From: Dashamir H. <das...@us...> - 2004-07-28 14:27:04
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20861/parser Modified Files: class.Render.php class.Parser.php Log Message: handle textarea as preformated tag Index: class.Render.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Render.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** class.Render.php 23 Jul 2004 09:40:17 -0000 1.15 --- class.Render.php 28 Jul 2004 14:26:55 -0000 1.16 *************** *** 189,199 **** break; case "PreTpl": - $this->render_PreTpl($tpl); - break; case "XmpTpl": - $this->render_XmpTpl($tpl); - break; case "ExampleTpl": ! $this->render_ExampleTpl($tpl); break; case "IfTpl": --- 189,196 ---- break; case "PreTpl": case "XmpTpl": case "ExampleTpl": ! case "TextAreaTpl": ! $this->render_preformated_tpl($tpl); break; case "IfTpl": *************** *** 218,242 **** } ! function render_PreTpl($tpl) ! { ! $attr_list = $tpl->vars['attr_list']; ! $tpl->contents = "<pre$attr_list>".$tpl->contents."</pre>"; ! $this->render_tpl_unindented($tpl); ! } ! ! function render_XmpTpl($tpl) { $attr_list = $tpl->vars['attr_list']; ! $tpl->contents = "<xmp$attr_list>".$tpl->contents."</xmp>"; $this->render_tpl_unindented($tpl); } - function render_ExampleTpl($tpl) - { - $attr_list = $tpl->vars['attr_list']; - $contents = $tpl->contents; - $this->output("<xmp$attr_list>".$contents."</xmp>"); - } - /** * Renders the given IfTpl, if its $condition evaluates to true. --- 215,227 ---- } ! function render_preformated_tpl($tpl) { + $tag = substr($tpl->type, 0, -3); + $tag = strtolower($tag); $attr_list = $tpl->vars['attr_list']; ! $tpl->contents = "<$tag$attr_list>".$tpl->contents."</$tag>"; $this->render_tpl_unindented($tpl); } /** * Renders the given IfTpl, if its $condition evaluates to true. Index: class.Parser.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Parser.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** class.Parser.php 22 Jul 2004 16:25:37 -0000 1.17 --- class.Parser.php 28 Jul 2004 14:26:55 -0000 1.18 *************** *** 310,313 **** --- 310,314 ---- case 'XMP': case 'EXAMPLE': + case 'TEXTAREA': $start_ELEMENT = 'start_'.$name; $this->$start_ELEMENT($attribs); *************** *** 358,361 **** --- 359,363 ---- case 'PRE': case 'XMP': + case 'TEXTAREA': $end_ELEMENT = 'end_'.$name; $this->$end_ELEMENT(); *************** *** 1027,1030 **** --- 1029,1046 ---- } + function start_TEXTAREA($attribs) + { + static $tpl_id = "TextArea_001"; + $tpl = new Template($tpl_id++, 'TextAreaTpl'); + $tpl->addVar('attr_list', $this->get_attr_list($attribs)); + $this->push_current_tpl($tpl); + } + function end_TEXTAREA() + { + //the param 'false' in order not to normalize space + $tpl = $this->pop_current_tpl(false); + $this->link_template($tpl); + } + function start_EXAMPLE($attribs) { |
From: Dashamir H. <das...@us...> - 2004-07-26 10:06:18
|
Update of /cvsroot/phpwebapp/top10/templates/admin/users In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5895/templates/admin/users Modified Files: Tag: maisp users.php users.db Log Message: Index: users.php =================================================================== RCS file: /cvsroot/phpwebapp/top10/templates/admin/users/Attic/users.php,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -C2 -d -r1.1.2.8 -r1.1.2.9 *** users.php 2 Feb 2004 13:54:58 -0000 1.1.2.8 --- users.php 26 Jul 2004 10:06:07 -0000 1.1.2.9 *************** *** 82,85 **** --- 82,113 ---- WebApp::message($msg); } + + function onRender() + { + WebApp::addVar('user_filter', $this->get_user_filter()); + } + + /** + * Construct an SQL filter (condition) + * based on the variables of the user_filter. + */ + function get_user_filter() + { + //get state vars of user_filter + $username = WebApp::getSVar('user_filter->username'); + $realname = WebApp::getSVar('user_filter->realname'); + $email = WebApp::getSVar('user_filter->email'); + $status = WebApp::getSVar('user_filter->status'); + + $arr_conditions = array(); + if ($username<>'') $arr_conditions[] = "username LIKE '%$username%'"; + if ($realname<>'') $arr_conditions[] = "realname LIKE '%$realname%'"; + if ($email<>'') $arr_conditions[] = "email LIKE '%$email%'"; + if ($status<>'') $arr_conditions[] = "status LIKE '%$status%'"; + $user_filter = implode(' AND ', $arr_conditions); + if ($user_filter=='') $user_filter = '1=1'; + + return $user_filter; + } } ?> \ No newline at end of file Index: users.db =================================================================== RCS file: /cvsroot/phpwebapp/top10/templates/admin/users/Attic/users.db,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -C2 -d -r1.1.2.6 -r1.1.2.7 *** users.db 7 Feb 2004 14:23:59 -0000 1.1.2.6 --- users.db 26 Jul 2004 10:06:07 -0000 1.1.2.7 *************** *** 3,8 **** <Recordset ID="users_rs" type="PagedRS" recs_per_page="10"> <Query> ! SELECT * FROM users ! WHERE {{user_filter->condition}} </Query> </Recordset> --- 3,7 ---- <Recordset ID="users_rs" type="PagedRS" recs_per_page="10"> <Query> ! SELECT * FROM users WHERE ({{user_filter}}) </Query> </Recordset> |
From: Dashamir H. <das...@us...> - 2004-07-26 10:06:18
|
Update of /cvsroot/phpwebapp/top10/templates/edituser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5895/templates/edituser Modified Files: Tag: maisp edituser.js Log Message: Index: edituser.js =================================================================== RCS file: /cvsroot/phpwebapp/top10/templates/edituser/Attic/edituser.js,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** edituser.js 2 Feb 2004 13:54:58 -0000 1.1.2.1 --- edituser.js 26 Jul 2004 10:06:06 -0000 1.1.2.2 *************** *** 46,50 **** } ! function saveuser() { var form = document.edituser; --- 46,50 ---- } ! function save_user() { var form = document.edituser; |
From: Dashamir H. <das...@us...> - 2004-07-26 10:06:18
|
Update of /cvsroot/phpwebapp/top10/templates/admin/users/filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5895/templates/admin/users/filter Modified Files: Tag: maisp user_filter.html Log Message: Index: user_filter.html =================================================================== RCS file: /cvsroot/phpwebapp/top10/templates/admin/users/filter/Attic/user_filter.html,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** user_filter.html 22 Jul 2004 14:09:30 -0000 1.1.2.3 --- user_filter.html 26 Jul 2004 10:06:07 -0000 1.1.2.4 *************** *** 6,34 **** <tr><td bgcolor="#eeeeee"> <table width="100%" cellpadding="2"> ! <form name="users" onsubmit="return false;"> <tr> <td align="right">username:</td> <td> ! <input type="text" name="username" value="{{username}}" ! size="10" class="filter_input" ! onfocus="select()" onblur="set_filter_var(this)" /> </td> <td align="right">Real Name:</td> <td> ! <input type="text" name="realname" value="{{realname}}" ! size="10" class="filter_input" ! onfocus="select()" onblur="set_filter_var(this)" /> </td> <td align="right">E-mail:</td> <td> ! <input type="text" name="email" value="{{email}}" ! size="10" class="filter_input" ! onfocus="select()" onblur="set_filter_var(this)" /> </td> <td align="right">Status:</td> <td> ! <webobject class="listbox" name="status" ! rs="status" value="{{status}}" ! onchange="set_status(this)" /> </td> <td align="center"> --- 6,34 ---- <tr><td bgcolor="#eeeeee"> <table width="100%" cellpadding="2"> ! <form name="user_filter" onsubmit="return false;"> <tr> <td align="right">username:</td> <td> ! <input type="text" name="username" value="{{username}}" ! size="10" class="filter_input" ! onfocus="select()" onblur="set_filter_var(this)" /> </td> <td align="right">Real Name:</td> <td> ! <input type="text" name="realname" value="{{realname}}" ! size="10" class="filter_input" ! onfocus="select()" onblur="set_filter_var(this)" /> </td> <td align="right">E-mail:</td> <td> ! <input type="text" name="email" value="{{email}}" ! size="10" class="filter_input" ! onfocus="select()" onblur="set_filter_var(this)" /> </td> <td align="right">Status:</td> <td> ! <webobject class="listbox" name="status" ! rs="status" value="{{status}}" ! onchange="set_status(this)" /> </td> <td align="center"> |
From: Dashamir H. <das...@us...> - 2004-07-23 12:59:45
|
Update of /cvsroot/phpwebapp/web_app/append In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2443 Modified Files: append.html Log Message: Index: append.html =================================================================== RCS file: /cvsroot/phpwebapp/web_app/append/append.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** append.html 21 Jul 2004 17:04:32 -0000 1.5 --- append.html 23 Jul 2004 12:59:36 -0000 1.6 *************** *** 7,10 **** --- 7,11 ---- <!--# insert phpWebApp logo #--> <div class="webapp_logo"> + <br /> <a href="http://phpwebapp.sourceforge.net/" target="_blank"> Powered by phpWebApp |
From: Dashamir H. <das...@us...> - 2004-07-23 10:17:16
|
Update of /cvsroot/phpwebapp/web_app/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12265/doc Modified Files: to_do.txt changes.txt Log Message: Index: to_do.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/to_do.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** to_do.txt 23 Jul 2004 09:40:17 -0000 1.11 --- to_do.txt 23 Jul 2004 10:17:07 -0000 1.12 *************** *** 1,3 **** ! - Fix some bugs in the documentation application and improve its ! contents a little bit. --- 1,5 ---- ! - fix some bugs in the documentation application (codeReview) ! - add the forth tutorial ! - update documentation ! - remove the downloads from the page of the framework Index: changes.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/changes.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** changes.txt 23 Jul 2004 09:40:17 -0000 1.8 --- changes.txt 23 Jul 2004 10:17:07 -0000 1.9 *************** *** 194,195 **** --- 194,201 ---- ------------------------------------------------------------------- + + * Some conversion scripts are added (in the forlder web_app/convert/), + in order to automate most of the modifications to the templates. + Read web_app/convert/README. + + ------------------------------------------------------------------- |
From: Dashamir H. <das...@us...> - 2004-07-23 10:06:13
|
Update of /cvsroot/phpwebapp/top10/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10695 Added Files: top10_db.sql Log Message: --- NEW FILE: top10_db.sql --- -- MySQL dump 8.23 -- -- Host: localhost Database: top10_db --------------------------------------------------------- -- Server version 3.23.58 CREATE DATABASE IF NOT EXISTS top10_db; USE top10_db; -- -- Table structure for table `categories` -- DROP TABLE IF EXISTS categories; CREATE TABLE categories ( category varchar(50) NOT NULL default '' ) TYPE=MyISAM; -- -- Dumping data for table `categories` -- INSERT INTO categories (category) VALUES ('web application framework'),('content managment system'),('document managment system'),('groupware'),('wiki'); -- -- Table structure for table `comments` -- DROP TABLE IF EXISTS comments; CREATE TABLE comments ( comment_id int(10) unsigned NOT NULL auto_increment, proj_id varchar(100) NOT NULL default '', username varchar(30) NOT NULL default '', title varchar(255) NOT NULL default '', comment text NOT NULL, date date NOT NULL default '0000-00-00', ip varchar(20) NOT NULL default '', PRIMARY KEY (comment_id) ) TYPE=MyISAM; -- -- Dumping data for table `comments` -- -- -- Table structure for table `languages` -- DROP TABLE IF EXISTS languages; CREATE TABLE languages ( prog_lang varchar(30) NOT NULL default '' ) TYPE=MyISAM; -- -- Dumping data for table `languages` -- INSERT INTO languages (prog_lang) VALUES ('PHP'),('Perl'),('JSP'),('Java'); -- -- Table structure for table `licenses` -- DROP TABLE IF EXISTS licenses; CREATE TABLE licenses ( license varchar(50) NOT NULL default '' ) TYPE=MyISAM; -- -- Dumping data for table `licenses` -- INSERT INTO licenses (license) VALUES ('GPL'),('LGPL'); -- -- Table structure for table `preference_list` -- DROP TABLE IF EXISTS preference_list; CREATE TABLE preference_list ( proj_id varchar(100) NOT NULL default '', username varchar(30) NOT NULL default '', position smallint(4) NOT NULL default '0', PRIMARY KEY (proj_id,username) ) TYPE=MyISAM; -- -- Dumping data for table `preference_list` -- INSERT INTO preference_list (proj_id, username, position) VALUES ('doulos','test',10),('webdocwf','test',9),('struts-menu','dashohoxha',0),('echo','dasho',1),('echopoint','dasho',0),('eservices','test',8),('htmltable','test',7),('jspwidget','test',6),('wact','test',5),('ojbc','test',4),('nunitasp','test',3),('j-tr','test',2),('realmethods','test',1),('obliquid','test',0),('tapestry','test',11),('aft','test',12),('doulos','dashohoxha',2),('tapestry','dashohoxha',3),('phpmvc','dashohoxha',4),('ojbc','dashohoxha',5),('wact','dashohoxha',6); -- -- Table structure for table `proj_list` -- DROP TABLE IF EXISTS proj_list; CREATE TABLE proj_list ( proj_id varchar(100) NOT NULL default '', proj_name varchar(100) NOT NULL default '', proj_descr text NOT NULL, category varchar(100) NOT NULL default '', status varchar(10) NOT NULL default '', license varchar(100) NOT NULL default '', prog_lang varchar(100) NOT NULL default '', register_date date default NULL, group_id varchar(10) NOT NULL default '', points int(11) NOT NULL default '0', nr_comments int(11) NOT NULL default '0', PRIMARY KEY (proj_id) ) TYPE=MyISAM; -- -- Dumping data for table `proj_list` -- INSERT INTO proj_list (proj_id, proj_name, proj_descr, category, status, license, prog_lang, register_date, group_id, points, nr_comments) VALUES ('sslext','Struts SSL Switching Extension','Extension to the Apache Jakarta Struts <span style=\"background-color:pink\">framework</span> that allows developers to configure <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s to automatically switch between the http and https protocols. Configuration is performed within the Struts config xml file. ','web application framework','approved','','',NULL,'',2,0),('salmon','SOFIA','The Salmon Open <span style=\"background-color:pink\">Framework</span> for Internet <span style=\"background-color:pink\">Application</span>s (SOFIA) is a RAD tool set for the J2EE. It integrates best-of-breed tools with a Java <span style=\"background-color:pink\">framework</span> to provide an end-to-end solution for developing high quality database driven <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s. ','web application framework','approved','','',NULL,'',12,0),('jaffa','Java Application Framework For All','An Enterprise Focused Java <span style=\"background-color:pink\">Framework</span> For Rapid <span style=\"background-color:pink\">Application</span> Development. JAFFA is a Java <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> development stack, extending exsiting projects like Tomcat and Struts with MVC based <span style=\"background-color:pink\">web</span> widgets, built-in persistence and component generators too ','web application framework','approved','','',NULL,'',17,0),('strutsgenerator','Karapan Sapi Struts Generator','Karapan Sapi is <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span> generator, based on Struts <span style=\"background-color:pink\">Framework</span>. Karapan Sapi will generate some common code that always repeated in developing <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>. Karapan Sapi automatically create SQL DDL, Java Object, DAO code, Struts Action and St ','web application framework','approved','','',NULL,'',7,0),('jwebunit','jWebUnit','j<span style=\"background-color:pink\">Web</span>Unit is a Java-based <span style=\"background-color:pink\">framework</span> for testing <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s. It provides a set of test assertions and <span style=\"background-color:pink\">application</span> navigation methods. j<span style=\"background-color:pink\">Web</span>Unit utilizes JUnit and HttpUnit. See the project Home Page for an overview and documentation. ','web application framework','approved','','',NULL,'',7,0),('merlinwork','Merlin Web Application Framework','\"Merlin <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span> <span style=\"background-color:pink\">Framework</span>\" is a <span style=\"background-color:pink\">framework</span> for <span style=\"background-color:pink\">web</span>-based database driven <span style=\"background-color:pink\">application</span>s written in php. \"Merlin <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span> <span style=\"background-color:pink\">Framework</span>\" uses PEAR for the data layer and SMARTY template engine for the presentation layer. ','web application framework','approved','','',NULL,'',0,0),('jbanana','JBanana','JBanana is a <span style=\"background-color:pink\">framework</span> MVC 2 based on java, servlet and XML/XSL which allows quick development of <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s, reducing the time normally required to develop these types of <span style=\"background-color:pink\">application</span>s. ','web application framework','approved','','',NULL,'',0,0),('phpmvc','php.MVC Web Application Framework','php.MVC is an open source <span style=\"background-color:pink\">framework</span> for PHP <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">application</span>s. php.MVC implements the Model-View-Controller (MVC) design pattern, and encourages <span style=\"background-color:pink\">application</span> design based on the Model 2 paradigm. The <span style=\"background-color:pink\">framework</span> provides a single entry point Controller. ','web application framework','approved','','',NULL,'',6,0),('perl-oak','Perl Oak','The Perl Oak Component tree is a implementation of a complete <span style=\"background-color:pink\">framework</span> for designing enterprise <span style=\"background-color:pink\">application</span>s. Includes: The Oak <span style=\"background-color:pink\">framework</span>, the Forest <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span> Builder (a <span style=\"background-color:pink\">Web</span> Interface to create <span style=\"background-color:pink\">Web</span> interfaces) and OakXP, a XP project manager. ','web application framework','approved','','',NULL,'',0,0),('test1','test 1','-','framework','approved','GPL','PHP','2004-07-22','123',0,0),('struts-menu','Struts Menu','<span style=\"background-color:pink\">Web</span> menuing <span style=\"background-color:pink\">framework</span> for JSP and Struts based <span style=\"background-color:pink\">application</span>s. Menus can be defined in an XML file and displayed through the use of JSP tags. Support for dynamic javascript menus is included. ','web application framework','approved','','',NULL,'',10,0),('nunitasp','NUnitAsp','NUnitAsp extends the popular NUnit testing <span style=\"background-color:pink\">framework</span> to allow automated testing of ASP.NET <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s. ','web application framework','approved','','',NULL,'',7,0),('echopoint','Echo Point','The EchoPoint project provides a rich collection of <span style=\"background-color:pink\">web</span> components which seamlessly integrate with the Echo <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Framework</span>. EchoPoint, combined with the Echo <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Framework</span>, provides the one of the simplest and richest <span style=\"background-color:pink\">framework</span>s for <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">application</span> devel ','web application framework','approved','','',NULL,'',10,0),('obliquid','obliquid','Obliquid is a PHP/XML <span style=\"background-color:pink\">framework</span> for building groupware <span style=\"background-color:pink\">Web</span> portals. It provides Lego bricks that may be composed to build an Internet <span style=\"background-color:pink\">application</span>. It has multilingual support and themes. Modules include user management, calendar, news, cms and messaging. ','web application framework','approved','','',NULL,'',10,0),('echo','Echo','Echo is an event-driven <span style=\"background-color:pink\">framework</span> for developing <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s in Java. Programming with the Echo <span style=\"background-color:pink\">framework</span> is similar to creating <span style=\"background-color:pink\">application</span>s or applets with the Swing API. ','web application framework','approved','','',NULL,'',9,0),('realmethods','realMethods Framework','A J2EE <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span>, based on the core J2EE design patterns. Provides support for BMP, CMR/CMP 2.0, security, logging, connec tion pooling, <span style=\"background-color:pink\">Web</span> Services, and much more. Integrates and leverages many 3rd party open source and commercial efforts. ','web application framework','approved','','',NULL,'',9,0),('j-tr','j-tr.net','<span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">application</span> for infrastructure of j-tr.net, based on Struts <span style=\"background-color:pink\">framework</span>. ','web application framework','approved','','',NULL,'',8,0),('ojbc','OJB Console','The OJB Console is an extensible struts <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> featuring transparent browse, search, create, update and delete functionality for the objects configured within the Object Relational Bridge (OJB) persistence <span style=\"background-color:pink\">framework</span>. ','web application framework','approved','','',NULL,'',11,0),('wact','Web Application Component Toolkit','A Patterns based <span style=\"background-color:pink\">framework</span> for developing <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s in PHP. A Lightweight runtime component tree is generated from compiling templates marked with customizable tags. ','web application framework','approved','','',NULL,'',9,0),('phpwebapp','phpWebApp','This is a <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span>, which makes easy and simple the task of building PHP <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s based on relational databases. See the Home Page for more details. ','web application framework','approved','','',NULL,'',0,0),('dnn','DotNetNuke','An open source <span style=\"background-color:pink\">Web</span> Portal <span style=\"background-color:pink\">Framework</span> / Content Management System <span style=\"background-color:pink\">application</span> written in ASP.NET / VB.NET for the Windows OS platform. ','web application framework','approved','','',NULL,'',9,0),('jspwidget','JSPWidget','JSPWidget is a JSP <span style=\"background-color:pink\">Framework</span> that provides event-driven,view state retained,server-side GUI controls to make JSP development as intuitive as in traditional client forms or in client-based <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">application</span>s. ','web application framework','approved','','',NULL,'',4,0),('htmltable','HTMLTable','Rendering tables in HTML with capability of sorting, paging and multiple items operations can be tricky. If you are bulding <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s using JSP/Servlet APIs and moreover using Struts, then this <span style=\"background-color:pink\">framework</span> is what you need. ','web application framework','approved','','',NULL,'',3,0),('webonswing','WebOnSwing','Component based <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span>. You can map your Swing based <span style=\"background-color:pink\">application</span>s to html <span style=\"background-color:pink\">web</span> pages, using exactly the same source code for both contexts. ','web application framework','approved','','',NULL,'',0,0),('tinypersistence','tinypersistence .NET','Persistence <span style=\"background-color:pink\">framework</span> for .NET, composed of a ligthweight <span style=\"background-color:pink\">framework</span> and a source code generator, think for small to medium <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s. ','web application framework','approved','','',NULL,'',0,0),('eservices','eservices','The goal of this project is to create an <span style=\"background-color:pink\">application</span> that will allow service based organizations to have a <span style=\"background-color:pink\">web</span> presence. Java, J2EE, and various <span style=\"background-color:pink\">framework</span>s and tools will be used to develop the <span style=\"background-color:pink\">application</span>. ','web application framework','approved','','',NULL,'',2,0),('webdocwf','Web document management and workflow','<span style=\"background-color:pink\">Web</span>DocWf is an object oriented <span style=\"background-color:pink\">framework</span> to develop business <span style=\"background-color:pink\">application</span>s based on XML technology, relational databases and <span style=\"background-color:pink\">Web</span>Dav with an HTML user interface and workflow functionality. Aonyx is the follow up project for Enhydra 3.11 ! ','web application framework','approved','','',NULL,'',1,0),('doulos','Doulos Web Application Framework','Doulos is a <span style=\"background-color:pink\">framework</span> for rapidly developing object-oriented <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s in PHP using the Model View Controller (MVC) paradigm. It elegantly reduces the total code to be written, manages and validates form data, encapsulates SQL databases, and more! ','web application framework','approved','','',NULL,'',8,0),('tapestry','Tapestry: Java Web Components','Comprehensive component-based <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span>. Works with Servlet API 2.2 and JDK 1.2 or above. Tapestry reconceptualizes <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> development in terms of Java objects, methods and properties, instead of URLs and query parameters. ','web application framework','approved','','',NULL,'',7,0),('aft','AFT - Anteater: Ant Functional Testing','Anteater is an Ant-based functional testing <span style=\"background-color:pink\">framework</span> for <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">application</span>s and <span style=\"background-color:pink\">Web</span> services. ','web application framework','approved','','',NULL,'',0,0),('edscontacts','eDreamers','Set of added-value PHP based <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s, modules and components to use to build more complex <span style=\"background-color:pink\">web</span> based <span style=\"background-color:pink\">application</span>s (eD<span style=\"background-color:pink\">Framework</span>) or to include in your existing developments (eDNews, eDExplorer, ...) ','web application framework','approved','','',NULL,'',0,0),('simper','Simper - Simple Persistence in Java','A lightweight persistence <span style=\"background-color:pink\">framework</span> in Java, specifically designed for <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s. Uses Servlet Filters (2.3) and the Apache Jakarta DynaBeans. ','web application framework','approved','','',NULL,'',0,0),('pamweb','PAMWeb','PAM<span style=\"background-color:pink\">Web</span> stands for Pluggable <span style=\"background-color:pink\">Application</span> Modules for the <span style=\"background-color:pink\">Web</span>. It comprises a simple <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> with ready-made reusable modules (e.g. user profile and permissions management) to be plugged into Java-based <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>. ','web application framework','approved','','',NULL,'',0,0),('jzonic','jZonic','jZonic is a Java <span style=\"background-color:pink\">framework</span> for <span style=\"back ground-color:pink\">web</span>-<span style=\"background-color:pink\">application</span> supporting an XML workflow, XML sitemap management, connection pooling, uses jConfig, build upon the MVC architecture and include several demo <span style=\"background-color:pink\">application</span>s ','web application framework','approved','','',NULL,'',0,0),('bugkilla','Bugkilla - J2EE Functional Test Suite','Bugkilla is a set of java tools for the functional test of J2EE <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span>s. Specification and execution of tests will be automated for <span style=\"background-color:pink\">web</span> front end and business logic layer. One goal is to integrate with existing <span style=\"background-color:pink\">framework</span>s and tools. ','web application framework','approved','','',NULL,'',0,0),('jmf','Jade Management Framework','Provides a general purpose JSP management <span style=\"background-color:pink\">framework</span> and extensive <span style=\"background-color:pink\">application</span> development utilities, such as a persistence <span style=\"background-color:pink\">framework</span> and a 2D applet graphics engine. The idea is to provide comprehensive core services for any <span style=\"background-color:pink\">web</span>-enabled <span style=\"background-color:pink\">application</span>. ','web application framework','approved','','',NULL,'',0,0),('fatphpframework','fatPHPFramework','fatPHP<span style=\"background-color:pink\">Framework</span> - object oriented <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span> <span style=\"background-color:pink\">Framework</span> written in PHP This <span style=\"background-color:pink\">Framework</span> will provide basic funtionality needed for most <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span>s. ','web application framework','approved','','',NULL,'',0,0),('xtremesuite','WebOS','<span style=\"background-color:pink\">Web</span>OS is an <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> built with Jini services exposed as JMX Managed Beans (MBeans for short). It provides ease of configuration, ease of administration, ease of programming and improved performances. ','web application framework','approved','','',NULL,'',0,0),('webrad','Web Rapid Application Development','<span style=\"background-color:pink\">Web</span>RAD is a <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> development <span style=\"background-color:pink\">framework</span> and library of components for Delphi/Kylix that replaces HTML editing with a drag-and-drop approach. <span style=\"background-color:pink\">Web</span>RAD includes over 30 components including javascript enabled data-aware tables, images and forms ','web application framework','approved','','',NULL,'',0,0),('plankton','Plankton','Plankton is a <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span> <span style=\"background-color:pink\">Framework</span> - an integrated collection of classes that provide the building blocks and underlying architecture for an entire <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> - for the PHP scripting language. ','web application framework','approved','','',NULL,'',0,0),('presentingxml','Presenting XML','Presenting XML is a Java <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> for presenting HTML, PDF, WML etc. in a device independent manner. The <span style=\"background-color:pink\">framework</span> supports a flow of content (XML files, flat files, SQL, dynamic XML) through SAX pipelines and XSLT transforms to a device ','web application framework','approved','','',NULL,'',0,0),('pagebox','PageBox - presentation deployment','Creation of a <span style=\"background-color:pink\">framework</span> for deployment of <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">application</span> on <span style=\"background-color:pink\">application</span> servers. J2EE and Java embedded servers, .NET and PHP versions. We also develop a <span style=\"background-color:pink\">Web</span> authoring tool, Cuckoo in Word VBA. ','web application framework','approved','','',NULL,'',0,0),('openthought','OpenThought','<span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span> <span style=\"background-color:pink\">Framework</span> which allows you to build <span style=\"background-color:pink\">application</span>s that never require the page to reload. Communications between the browser and server are done in the background, and displayed automatically using DHTML. ','web application framework','approved','','',NULL,'',0,0),('bc4j-multi-row','JDeveloper BC4J Multi-Row Extensions','Extensions to Oracle JDeveloper Business Components for Java (BC4J) <span style=\"background-color:pink\">framework</span> support libraries, that provide multiple-row database DML operations in Servlet and JSP <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s via an easy-to-use Java API and JSP tag library. ','web application framework','approved','','',NULL,'',0,0),('lino','Lino Database Application Framework','Lino is a <span style=\"background-color:pink\">framework</span> to create database-oriented <span style=\"background-color:pink\">application</span>s with an extensible library of highly reusable schema modules. A Lino database can run via a <span style=\"background-color:pink\">web</span> or GUI <span style=\"background-color:pink\">application</span>, via console interface, via agents, or via any combination of those. ','web application framework','new','','',NULL,'',0,0),('poof','PHP Object Oriented Framework','POOF is a PHP library that separates the Page Content, Layout and <span style=\"background-color:pink\">Application</span> Logic in an object oriented fashion. POOF is designed to give the <span style=\"background-color:pink\">web</span> developer a <span style=\"background-color:pink\">framework</span> for efficient and modular <span style=\"background-color:pink\">application</span> development. ','web application framework','new','','',NULL,'',0,0),('webunit','WebUnit framework','A <span style=\"background-color:pink\">framework</span> for performing client-side tests of <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s, based on PyUnit. ','web application framework','new','','',NULL,'',0,0),('cassandra','Cassandra','<span style=\"background-color:pink\">Application</span> <span style=\"background-color:pink\">Framework</span> for the development of large scale <span style=\"background-color:pink\">web</span> portals. ','web application framework','new','','',NULL,'',0,0),('tags','TAGS','TAGS is a <span style=\"background-color:pink\">framework</span> for <span style=\"background-color:pink\">web</span>-based educational tools (with some similarities to <span style=\"background-color:pink\">Web</span>CT). Although numerous <span style=\"background-color:pink\">application</span>s have been built into it, Finesse (used to teach students about stock market trading) and the document approval tool (used for electronic ','web application framework','new','','',NULL,'',0,0),('labeo','Labeo Web Application Framework','Labeo is a <span style=\"background-color:pink\">framework</span> for building Java(tm) 2 Enterprise Edition <span style=\"background-color:pink\">application</span>s. It separates business logic from presentation, allowing the Java programmer and presentation layer developer (HTML/WML etc) to collaborate effectively. ','web application framework', 'new','','',NULL,'',0,0),('dracoweb','Draco','Draco is a <span style=\"background-color:pink\">framework</span> for the rapid development of dynamic <span style=\"background-color:pink\">web</span> sites and <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s. It provides a method for a clean separation of code and markup and has an extensive standard library. Draco is written in and makes use of the Python language. ','web application framework','new','','',NULL,'',0,0),('zang','Zang CMS Framework','Zang! is a portal <span style=\"background-color:pink\">framework</span> written in object oriented PHP, based on best practices and object oriented design patterns to provide a platform to easily develop modules for all kinds of <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s. ','web application framework','new','','',NULL,'',0,0),('wafer','Web Application Framework Research','Wafer is a research project which compares numerous open source <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span>s and provides a common example <span style=\"background-color:pink\">application</span> implemented in each <span style=\"background-color:pink\">framework</span>. ','web application framework','new','','',NULL,'',0,0),('actionframework','ActionFramework','Action-driven component-oriented <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> based on Model-View-Controller (MVC) architecture. Goals: minimum complexity & dependency on the <span style=\"background-color:pink\">framework</span> API, maximum power, reliability and conformance to common standards. ','web application framework','new','','',NULL,'',0,0),('ismo','Ismo the PHP web application framework','Ismo is a <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> that takes care of all the boring stuff and let\'s you focus on the fun and interesting parts! ','web application framework','new','','',NULL,'',0,0),('j2ee-fusebox','J2EE Fusebox Application Framework','In pursuit of developing a \"simple to use\" yet very powerful <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> in the J2EE environment that will appeal to both the Java community and Fusebox architects and coders from other platforms. ','web application framework','new','','',NULL,'',0,0),('wdialog','WDialog framework for web applications','WDialog is a system to make dialog-centric <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s. It imitates the behaviour of widgets found in GUIs, but acts in a HTML/HTTP environment. There is a UI language (XML), but callbacks are coded in a normal programming language (O\'Caml, Perl) ','web application framework','new','','',NULL,'',0,0),('gandalf','gandalf wizard framework','A Java-based <span style=\"background-color:pink\">framework</span> that allows developers to quickly generate Java-based wizard forms. Forms can be created using Java Swing (<span style=\"background-color:pink\">application</span>-based) or Java Servlet (<span style=\"background-color:pink\">web</span>-based). ','web application framework','new','','',NULL,'',0,0),('jwaf','Java Web Application Framework','Java <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span> <span style=\"background-color:pink\">Framework</span> (JWAF) is a <span style=\"background-color:pink\">framework</span> designed to extend existing per-tier <span style=\"background-color:pink\">framework</span>s such as Struts and Castor, to provide a complete 5-tier <span style=\"background-color:pink\">framework</span> and toolset that can be used to rapidly build business process <span style=\"background-color:pink\">application</span> and more. ','web application framework','new','','',NULL,'',0,0),('colander','Colander Internet Agent','Colander is a Java <span style=\"background-color:pink\">application</span> which acts as a scripted personal Internet agent (performance of arbitrary scripted tasks through the provided <span style=\"background-color:pink\">framework</span>.) Access is possible through a standard <span style=\"background-color:pink\">web</span> browser. ','web application framework','new','','',NULL,'',0,0),('bsframework','Bright Side Framework','The BS <span style=\"background-color:pink\">Framework</span> provides ready-to-use high level J2EE components which will help you quickly build database-oriented J2EE <span style=\"background-color:pink\">application</span>s accessed by rich java/Swing clients on HTTP (for the <span style=\"background-color:pink\">web</span> aficionado, we also have a Struts client). ','web application framework','new','','',NULL,'',0,0),('big-brother','Big Brother','Big-Brother is a collection of J2EE filters and servlets that provide custom monitoring and auditing of <span style=\"background-color:pink\">web</span>-<span style=\"background-color:pink\">application</span>s, keeping track of who does what, when, and how often. It makes use of the jakarta-apache Struts <span style=\"background-color:pink\">framework</span> for the interface GUI. ','web application framework','new','','',NULL,'',0,0),('foowd','FOOWD','FOOWD is a <span style=\"background-color:pink\">framework</span> for building object orientated (OO) <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s in PHP. It is a collection of base classes ripe for extending that handle object persistency, user authorisation, security, data administration, input handling, all the things requ ','web application framework','new','','',NULL,'',0,0),('wotonomy','wotonomy','A pure java user interface <span style=\"background-color:pink\">framework</span> for building both <span style=\"background-color:pink\">web</span> and gui <span style=\"background-color:pink\">application</span>s, heavily inspired by the NeXT and OpenStep APIs. Includes clean-room implementations of parts of the <span style=\"background-color:pink\">Web</span>Objects and JavaClient <span style=\"background-color:pink\">framework</span>s plus the Foundation classes. ','web application framework','new','','',NULL,'',0,0),('wildweb','WildWEB','Wild<span style=\"background-color:pink\">WEB</span> is an opensource <span style=\"background-color:pink\">framework</span> to <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> development. It provides a complete set of core services to <span style=\"background-color:pink\">web</span> aplications such as HTML/code separation through an advanced Template system, database abstraction, rich set of functions to automaticall ','web application framework','new','','',NULL,'',0,0),('genie-framework','Genie Framework','Genie is a Java <span style=\"background-color:pink\">framework</span> for JSP based <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s. It provides a JSP tag library and services for configuration and session handling, request dispatching, parameter conversion and validation and error handling. ','web application framework','new','','',NULL,'',0,0),('niggle','Niggle web application framework','The Niggle <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> is a java class library that allows a complete separation of data and presentation from the servlet\'s dispatching logic. It leverages various Java API\'s as well as the freemarker template library.& nbsp;','web application framework','new','','',NULL,'',0,0),('beanfactory','BeanFactory','BeanFactory is a JavaBean component <span style=\"background-color:pink\">framework</span> that allows software components to be configured and deployed using simple runtime deployment descriptors. It also has an integrated Model View Controller <span style=\"background-color:pink\">framework</span> for building J2EE <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s. ','web application framework','new','','',NULL,'',0,0),('webwork','WebWork','[Attention]: <span style=\"background-color:pink\">Web</span>Work has moved to http://sf.net/projects/opensymphony. <span style=\"background-color:pink\">Web</span>Work is a <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> for J2EE. It is based on a concept called \"Pull HMVC\" (Pull Hierarchical Model View Controller). ','web application framework','new','','',NULL,'',0,0),('gestinanna','Gestinanna','A secure, scalable (one or more machines with one or more sites) <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> for the Uttu <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> driver running under mod_perl. Gestinanna tries to put security and reliability first. ','web application framework','new','','',NULL,'',0,0),('mapper','Mapper: WEB/GUI Presentation Framework','Mapper is a presentation <span style=\"background-color:pink\">framework</span> for XML, <span style=\"background-color:pink\">WEB</span> & GUI <span style=\"background-color:pink\">application</span>s based on the Model-View-Controller pattern. Its event driven components & models provide an easy & consistent way to bind fields to ValueObjects or Collections for all presentation types. ','web application framework','new','','',NULL,'',0,0),('wraf','Web Resource Application Framework','Wraf implements a RDF API that hopes to realize the Semantic <span style=\"background-color:pink\">Web</span>. The <span style=\"background-color:pink\">framework</span> uses RDF for data, user interface, modules and object methods. It uses interfaces to other sources in order to integrate all data in one enviroment, regardless of storage form ','web application framework','new','','',NULL,'',0,0),('sawa','SAWA: Simple API for Web Applications','The Simple API for <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span>s (SAWA for short) is a Perl <span style=\"background-color:pink\">framework</span> designed to allow developers to rapidly create and deploy modular, component-based <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">application</span>s both in mod_perl and plain CGI environments. ','web application framework','new','','',NULL,'',0,0),('aquarium','Aquarium Web Application Framework','Aquarium is a <span style=\"background-color:pink\">Web</span> site <span style=\"background-color:pink\">framework</span> written in Python. It\'s goal is to allow <span style=\"background-color:pink\">Web</span> engineers to develop <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">application</span>s quickly. To this end, it provides necessary toolkits, session management, and, most importantly, a convenient modular structure. ','web application framework','new','','',NULL,'',0,0),('warfare','WARFARE','WARFARE is a lightweight, extensible <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span> <span style=\"background-color:pink\">Framework</span> to enable Construction and maintenace of <span style=\"background-color:pink\">web</span> based <span style=\"background-color:pink\">application</span>s without writing any Java code. A <span style=\"background-color:pink\">Web</span> based interface allows for real time maintenance and tweaks to the system. ','web application framework','new','','',NULL,'',0,0),('watf','Web Application Testing Framework','HttpUnit like <span style=\"background-color:pink\">framework</span> (written on Java) designed for testing <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s containing embended in HTML JavaScript. ','web application framework','new','','',NULL,'',0,0),('stleaf','stLeaf - smartLeaf','stLeaf (SmarT, Lightweight Enterprise <span style=\"background-color:pink\">Application</span> <span style=\"background-color:pink\">Framework</span>) is a <span style=\"background-color:pink\">framework</span> to build end-to-end, highly-dynamic <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>. ','web application framework','new','','',NULL,'',0,0),('wounittest','WOUnitTest','WOUnitTest is a <span style=\"background-color:pink\">Web</span>Objects <span style=\"background-color:pink\">framework</span> for unit testing <span style=\"background-color:pink\">Web</span>Objects <span style=\"background-color:pink\">application</span>s based on JUnit. ','web application framework','new','','',NULL,'',0,0),('perlwebmvc','perl WebMVC','perl <span style=\"background-color:pink\">Web</span>MVC is a mod_perl <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> designed around the Model View Controller design pattern. It is written in perl with an XML configuration component. ','web application framework','new','','',NULL,'',0,0),('webleaf','WebLEAF','STILL ACTIVE AND BEING DEVELOPED INTERNALLY AT THE UIB (http://www.uib.es) BUT NO LONGER SUPPORTED THROUGH SOURCEFORGE DUE TO LACK OF TIME AND PUBLIC INTEREST. <span style=\"background-color:pink\">Web</span>LEAF is a servlet <span style=\"background-color:pink\">framework</span> for the development of <span style=\"background-color:pink\">web</span> server side java <span style=\"background-color:pink\">application</span>s, speci ','web application framework','new','','',NULL,'',0,0),('xkins','Xkins','Xkins is a <span style=\"background-color:pink\">framework</span> that manages skins. Skins are used for a <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> to look in a different way for each skin. A skin not only manages colors and images, but also layout of the <span style=\"background-color:pink\">web</span> page. Its written in Java. Can use Velocity templates and Struts ','web application framework','new','','',NULL,'',0,0),('pcstoolkit','PCS Java Toolkit','PCS Java Toolkit provides useful stuff for developing Java <span style=\"background-color:pink\">Application</span>s, especially <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span>s. E.g. a small and simple <span style=\"background-color:pink\">framework</span> for building <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s similar to Jakarta\'s Struts. ','web application framework','new','','',NULL,'',0,0),('websyntax','Syntax','Syntax is a <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> for building CMS, KMS and many other forms of dynamic and personalized database-driven <span style=\"background-color:pink\">web</span>sites. It includes an object-oriented PHP API and ultimately will run in multiple environments. ','web application framework','new','','',NULL,'',0,0),('satyr','Satyr','Satyr is a highly flexible <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> designed to make it easier to build and maintain sophisticated <span style=\"background-color:pink\">we b</span> <span style=\"background-color:pink\">application</span>s that incorporate complex flow logic. Satyr draws on industry proven patterns and standards such as JMS, XML, and MVC. ','web application framework','new','','',NULL,'',0,0),('winservlet','WIN-Servlet','WIN-Servlet is a <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> that supports a windows-like program structure. A browser has its own session-context and window-stack. Supports: component-based dialogs (FORM), input validation, standard HTML/JavaScript pages, servlet API 2.2 ','web application framework','new','','',NULL,'',0,0),('xorro','Xorro Presentation Layer','Xorro is a presentation <span style=\"background-color:pink\">framework</span> for <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s that facilitates two-way iterative development between programmers and <span style=\"background-color:pink\">web</span> designers. It provides the power of XSLT in a simpler, more maintainable form. ','web application framework','new','','',NULL,'',0,0),('phlexdb','PHlexDB CMF','PHlexDB is a set of tools written in PHP that together make up an unassuming, flexible content management <span style=\"background-color:pink\">framework</span>. This system is designed for building <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s that deal with multiple and related datatypes. ','web application framework','new','','',NULL,'',0,0),('webdialog','webdialog','<span style=\"background-color:pink\">web</span>dialog is a java Servlet/JSP <span style=\"background-color:pink\">framework</span> for writing <span style=\"background-color:pink\">application</span>s that use a standards based <span style=\"background-color:pink\">web</span> browser (Mozilla 1.01+, IE 6+) to render their gui. The <span style=\"background-color:pink\">framework</span> will make the fact that the <span style=\"background-color:pink\">application</span> is browser based as transparent as possible. ','web application framework','new','','',NULL,'',0,0),('xwidget','XWidget Application Framework','XWidget is a widget -oriented GUI <span style=\"background-color:pink\">framework</span> for build <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s that run on a J2EE <span style=\"background-color:pink\">application</span> server. It is a component- and event- based <span style=\"background-color:pink\">framework</span> that is modelled after the Java Swing <span style=\"background-color:pink\">framework</span>. ','web application framework','new','','',NULL,'',0,0),('swazoo','Swazoo','The goal of the Swazoo (Smalltalk <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span> Zoo) project is to provide an Open Source, vendor agnostic, dialect neutral <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> for Smalltalk. ','web application framework','new','','',NULL,'',0,0),('ruby-waf','Ruby Web Application Framework','Based on the Jakarta Struts project, the Ruby <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span> <span style=\"background-color:pink\">framework</span> is a <span style=\"background-color:pink\">framework</span> for developing <span style=\"background-color:pink\">web</span>/wap <span style=\"background-color:pink\">application</span>s founded in the Ruby programming language. ','web application framework','new','','',NULL,'',0,0),('piproject','The Pi project','JavaUniverse is proud to provide the \"Pi\" <span style=\"background-color:pink\">framework</span> to the open source community. \"Pi\" is a <span style=\"background-color:pink\">web</span> presentation and <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> based on Servlet/JSP technology and implements the MVC pattern. Pi is evolving into a full fledge J2EE <span style=\"background-color:pink\">framework</span>. ','web application framework','new','','',NULL,'',0,0),('coursetracking','Training Course - Employee Tracking','This is a database-driven <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> to track training courses information in a company. The project uses Jakarta Struts <span style=\"background-color:pink\">framework</span>. You can add/edit course information and add/delete employees to/from courses. ','web application framework','new','','',NULL,'',0,0),('swas','SWAS: Simple Web Application System','SWAS is the Simple <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span> System, a <span style=\"background-color:pink\">web</span> database-based <span style=\"background-color:pink\">application</span> development <span style=\"background-color:pink\">framework</span>: +The best form-based <span style=\"background-color:pink\">web</span>-database interface +Easy report generation +Templating language: SWAL (Simple <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span> Language) ','web application framework','new','','',NULL,'',0,0),('bingox','BingoX - Web Development Framework','BingoX is an open source, object oriented <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">Application</span> <span style=\"background-color:pink\">Framework</span> written in mod_perl meant to dramatically reduce the time required to build large dynamic, database driven <span style=\"background-color:pink\">web</span> sites and <span style=\"background-color:pink\">application</span>s. ','web application framework','new','','',NULL,'',0,0),('zifx','Z39.50/XML Interoperability Framework.','ZiFX is a Z39.50/XML Interoperability <span style=\"background-color:pink\">Framework</span> available as two Java APIs suitable to develop stand-alone and <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">application</span>s for cross-searching (XS). It provides a Z39.50 Client/Server, a Z39.50/XML TagLib and a XS Portlet for Apache Cocoon. ','web application framework','new','','',NULL,'',0,0),('dante-framework','Dante','Dante is a Java-based <span style=\"background-color:pink\">Web</span>-<span style=\"background-color:pink\">Application</span> <span style=\"background-color:pink\">Framework</span> which allows programmers to develop <span style=\"background-color:pink\">Web</span>-<span style=\"background-color:pink\">Application</span> like normal Swing-<span style=\"background-color:pink\">Application</span>s. No HTML / CSS /JavaScript knowledge needed. ','web application framework','new','','',NULL,'',0,0),('webwrench','Web Wrench','<span style=\"background-color:pink\">Web</span> Wrench is a <span style=\"background-color:pink\">web</span>site <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> written in PHP. This object-oriented solution simplifies <span style=\"background-color:pink\">web</span>-based site management and provides an API for <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> development. ','web application framework','new','','',NULL,'',0,0),('wspark','Spark Application Server','Python <span style=\"background-color:pink\">framework</span> for developing distributed <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s. Composed by a <span style=\"background-color:pink\">web</span>server and a number of registered <span style=\"background-color:pink\">application</span>s, each handling an url family (www.foo.com/*). The <span style=\"background- color:pink\">application</span>s can run on the same server or on other servers. ','web application framework','new','','',NULL,'',0,0),('ventana','Ventana','Ventana is a strongly OO Flash MX <span style=\"background-color:pink\">Application</span> <span style=\"background-color:pink\">Framework</span>, to let you build DB-driven, full multi-windows, module-based <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s. ','web application framework','new','','',NULL,'',0,0),('eocene-php','Eocene (PHP Version)','A simple and easy to use OO (Object Oriented) <span style=\"background-color:pink\">Web</span> development <span style=\"background-color:pink\">framework</span> to provide a foundation for building <span style=\"background-color:pink\">Web</span> <span style=\"background-color:pink\">application</span>s. It uses PHP for foundation classes and xml-based text files for <span style=\"background-color:pink\">application</span> configurations. ','web application framework','new','','',NULL,'',0,0),('fishcap','Fishcap','Fishcap is a Java <span style=\"background-color:pink\">framework</span> to develop service driven portlet <span style=\"background-color:pink\">application</span>s independent of the Portal vendor. It can also be used as a <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span>. ','web application framework','new','','',NULL,'',0,0),('ducky','Ducky','Ducky is the <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> with many possibilities. Current status is a planning. For further information see the project homepage. This project will have more description when production process will be alive. ','web application framework','new','','',NULL,'',0,0),('integratis','Integratis Web Development Framework','A <span style=\"background-color:pink\">web</span> development <span style=\"background-color:pink\">framework</span>; includes an <span style=\"background-color:pink\">application</span> server which provides a persistent object cache and transaction support, an intelligent HTML parser, multi-threaded scripting, multiple scripting language support within a single OO <span style=\"background-color:pink\">framework</span>. ','web application framework','new','','',NULL,'',0,0),('tacos','Tacos - Tapestry Components','Tacos provides a component repository for the Tapestry <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> development <span style=\"background-color:pink\">framework</span>. It defines a component descriptor language in XML, and provides a Java API to manipulate it. ','web application framework','new','','',NULL,'',0,0),('changingpages','Changing Pages','Changing Pages is a Content Management and delivery <span style=\"background-color:pink\">application</span> written in Perl and using MySQL. Uses a set of Perl modules and scripts that form a <span style=\"background-color:pink\">framework</span> for creating bespoke <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s incorporating secure login through encrypted cookies. ','web application framework','new','','',NULL,'',0,0),('webpuzzle','Web Puzzle','<span style=\"background-color:pink\">Web</span> Puzzle will be a new python <span style=\"background-color:pink\">framework</span> to build: a) an object database b) an <span style=\"background-color:pink\">application</span> storage c) an <span style=\"background-color:pink\">application</span> server d) a content management system e) a virtual file system ','web application framework','new','','',NULL,'',0,0),('hawk','hawk application framework','hawk <span style=\"background-color:pink\">application</span> <span style=\"background-color:pink\">framework</span> is a powerful solution for people whom understand weakness of template-based technologies for building <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s like jsp, asp, etc. hawk nestling edition is an open source product. ','web application framework','new','','',NULL,'',0,0),('mara','MARA','Multiple <span style=\"background-color:pink\">Application</span>s Reduced Administration, a simplified <span style=\"background-color:pink\">framework</span> for building service oriented servers like firewalls, filers, mail gateways, mail servers, <span style=\"background-color:pink\">web</span> servers, ... ','web application framework','new','','',NULL,'',0,0),('stamina','Stamina','A <span style=\"background-color:pink\">framework</span> for building <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s (servlets) in Java. The main emphasis is on state machine based <span style=\"background-color:pink\">application</span> flow control and user interface componentisation ','web application framework','new','','',NULL,'',0,0),('aspenos','AspenOS Servlet Framework','AspenOS is used by <span style=\"background-color:pink\">web</span> development teams to develop <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s with a moderately complex core and flexible content delivery. It is a Java servlet <span style=\"background-color:pink\">framework</span> with multiple role support for users. ','web application framework','new','','',NULL,'',0,0),('projectapollo','Project Apollo','Project Apollo seeks to provide a Java based <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span> development <span style=\"background-color:pink\">framework</span>. The <span style=\"background-color:pink\">framework</span> is not a RAD tool, but a set of tools and design patterns which can be used to build a properly designed and robust <span style=\"background-color:pink\">application</span>. ','web application framework','new','','',NULL,'',0,0),('p2pe','Peer2Peer Extreme','The Development of A Peer2Peer Software that will help users to make use of the .net <span style=\"background-color:pink\">framework</span> and its many advantages. In Addition this will be a p2p <span style=\"background-color:pink\">application</span> with a <span style=\"background-color:pink\">web</span> site where users can register and download files from other peers. ','web application framework','new','','',NULL,'',0,0),('webzap','Webzap','<span style=\"background-color:pink\">Web</span>zap is an <span style=\"background-color:pink\">framework</span> for the development of <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s or views of multiple tier client server systems. For component based client server systems it could also be used as a \"glue\" language. <span style=\"background-color:pink\">Web</span>zap needs an J2EE compliant <span style=\"background-color:pink\">application</span> server. ','web application framework','new','','',NULL,'',0,0),('studs','Studs Web Application Framework','Studs is a PHP implementation of the Model-View-Controller (MVC) design pattern based on Jakarta Struts. The design goal is to provide an open source <span style=\"background-color:pink\">framework</span> for the PHP community for creating <span style=\"background-color:pink\">web</span> <span style=\"background-color:pink\">application</span>s that easily separate the presentation lay ','web application framework','new','','',NULL,'',0,0),('sitesimple','siteSimple','siteSimple is <span style=\"background-color:pink\">web</span> site content management solution for the simple site author. Simple in design the PHP based <span style=\"background-color:pink\">application</span> provides a <span style=\"background-color:pink\">framework</span> for site hosting that allows the end-user to own and author content with minimal <span style=\"background-... [truncated message content] |
From: Dashamir H. <das...@us...> - 2004-07-23 09:40:26
|
Update of /cvsroot/phpwebapp/web_app/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7295/database Modified Files: class.PagedRS.php Log Message: Index: class.PagedRS.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/database/class.PagedRS.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** class.PagedRS.php 22 Jul 2004 16:25:38 -0000 1.13 --- class.PagedRS.php 23 Jul 2004 09:40:17 -0000 1.14 *************** *** 120,132 **** if ($this->current_page>$nr_of_pages) $this->current_page=$nr_of_pages; ! if ($this->current_page==$nr_of_pages) ! $next_page = "1"; //next page of the last page is the first page ! else ! $next_page = $this->current_page + 1; ! if ($this->current_page==1) ! $prev_page = 1; //previous page of the first page is the first page itself ! else ! $prev_page = $this->current_page - 1; $first_rec = 1 + ($this->current_page - 1)*$this->recs_per_page; --- 120,128 ---- if ($this->current_page>$nr_of_pages) $this->current_page=$nr_of_pages; ! $next_page = $this->current_page + 1; ! if ($next_page > $nr_of_pages) $next_page = $nr_of_pages; ! $prev_page = $this->current_page - 1; ! if ($prev_page < 1) $prev_page = 1; $first_rec = 1 + ($this->current_page - 1)*$this->recs_per_page; |
From: Dashamir H. <das...@us...> - 2004-07-23 09:40:26
|
Update of /cvsroot/phpwebapp/web_app/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7295/doc Modified Files: to_do.txt changes.txt Log Message: Index: to_do.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/to_do.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** to_do.txt 22 Jul 2004 16:01:38 -0000 1.10 --- to_do.txt 23 Jul 2004 09:40:17 -0000 1.11 *************** *** 1,62 **** - - Use the new framework with the other web applications - (smewapp etc.) in order to test the new parser (and the conversion tool). - - Fix some bugs in the documentation application and improve its contents a little bit. - - - Reformat all the files (automatically with emacs). - - - Make any small improvments in the documentation. - - - Make a new release of phpwebapp that includes the latest - changes in the parser any improvments in the docs, etc. - - ---------------------------------------------------------------------- - - * When switching an existing web application to the new version - of the framework (with the xml parser), these modifications - need to be done to the templates: - - 1 - Find and remove all <Header> and <Footer> tags and place their - contents outside the <Repeat> element. In case that the - recordset of the <Repeat> is a paged recordset and page variables - ({{PrevPage}}, {{NextPage}} etc.) are used for navigation, - then put the navigation part of the template inside the element - <RSNavig>. - - 2 - Replace 'not-equal operator' <> by !=, in the condition of <If> - elements: <If condition="'{{CurrPage}}'<>'{{PrevPage}}'"> - If there is any 'smaller-than' operator < in attribute values, - replace it by &lt;. If it is in the contents of an element - (e.g. in the contents of a <Query> element), then either replace - it by < or enclose the query inside <![CDATA[...]]>, like - this: <Query><![CDATA[ . . . ]]></Query> - - 3 - Replace the old usage of 'checked' in checkboxes with the new - usage; replace {{checked_var}} with checked="{{checked_var}}". - Do the same for the 'selected' attribute of the listboxes: - replace {{selected_var}} with selected="{{selected_var}}" - - 4 - Convert all the templates to clean XHTML code (convert all tags - and attributes to lowercase, replace <img...> by <img ... />, - etc.). Maybe 'tidy' can be used for this, however sometimes - it does not produce the desired results (because of the framework - tags). - - 5 - Add these lines at the beginning of the root templates: - <?xml version="1.0" encoding="iso-8859-1"?> - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml" lang="EN"> - - 6 - Each xml parser is required to process the entities: & < - > " and ' and to return the corresponding character - instead of the entity itself. So, it is neccessary to replace - in the templates all the xml builtin entities, like this: - & --> &amp; - < --> &lt; - > --> &gt; - " --> &quot; - ' --> &apos; - --- 1,3 ---- Index: changes.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/changes.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** changes.txt 16 Jul 2004 14:45:14 -0000 1.7 --- changes.txt 23 Jul 2004 09:40:17 -0000 1.8 *************** *** 118,122 **** ------------------------------------------------------------------- - ------------------------------------------------------------------- * Added the tag <example>. It can be used like this: --- 118,121 ---- *************** *** 146,149 **** --- 145,195 ---- ------------------------------------------------------------------- + + * When switching an existing web application to the new version + of the framework (with the xml parser), these modifications + need to be done to the templates: + + 1 - Find and remove all <Header> and <Footer> tags and place their + contents outside the <Repeat> element. In case that the + recordset of the <Repeat> is a paged recordset and page variables + ({{PrevPage}}, {{NextPage}} etc.) are used for navigation, + then put the navigation part of the template inside the element + <RSNavig>. + + 2 - Replace 'not-equal operator' <> by !=, in the condition of <If> + elements: <If condition="'{{CurrPage}}'<>'{{PrevPage}}'"> + If there is any 'smaller-than' operator < in attribute values, + replace it by &lt;. If it is in the contents of an element + (e.g. in the contents of a <Query> element), then either replace + it by < or enclose the query inside <![CDATA[...]]>, like + this: <Query><![CDATA[ . . . ]]></Query> + + 3 - Replace the old usage of 'checked' in checkboxes with the new + usage; replace {{checked_var}} with checked="{{checked_var}}". + Do the same for the 'selected' attribute of the listboxes: + replace {{selected_var}} with selected="{{selected_var}}" + + 4 - Convert all the templates to clean XHTML code (convert all tags + and attributes to lowercase, replace <img...> by <img ... />, + etc.). Maybe 'tidy' can be used for this, however sometimes + it does not produce the desired results (because of the framework + tags). + + 5 - Add these lines at the beginning of the root templates: + <?xml version="1.0" encoding="iso-8859-1"?> + <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml" lang="EN"> + + 6 - Each xml parser is required to process the entities: & < + > " and ' and to return the corresponding character + instead of the entity itself. So, it is neccessary to replace + in the templates all the xml builtin entities, like this: + & --> &amp; + < --> &lt; + > --> &gt; + " --> &quot; + ' --> &apos; + ------------------------------------------------------------------- |
From: Dashamir H. <das...@us...> - 2004-07-23 09:40:25
|
Update of /cvsroot/phpwebapp/web_app/webobjects/dbTable In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7295/webobjects/dbTable Modified Files: editRecord.html Log Message: Index: editRecord.html =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/dbTable/editRecord.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** editRecord.html 21 Jul 2004 17:04:30 -0000 1.6 --- editRecord.html 23 Jul 2004 09:40:16 -0000 1.7 *************** *** 10,14 **** name="{{fld_name}}" id="{{fld_name}}" value="{{{{fld_name}}}}" /> </td> ! <tr> </repeat> </table> --- 10,14 ---- name="{{fld_name}}" id="{{fld_name}}" value="{{{{fld_name}}}}" /> </td> ! </tr> </repeat> </table> |
From: Dashamir H. <das...@us...> - 2004-07-23 09:40:25
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7295/parser Modified Files: class.Render.php Log Message: Index: class.Render.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Render.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** class.Render.php 22 Jul 2004 16:25:37 -0000 1.14 --- class.Render.php 23 Jul 2004 09:40:17 -0000 1.15 *************** *** 405,408 **** --- 405,416 ---- } + //find the first record nr, if the recordset is a PagedRS + $firstRecNr = 1; + if ($rs->type=='PagedRS') + { + $page_vars = $rs->getPageVars(); + $firstRecNr = $page_vars['FirstRec']; + } + //render the body of repeat for each record $row_nr = 1; *************** *** 412,416 **** //add variables {{CurrentRecNr}} and {{CurrentRowNr}} - $firstRecNr = ($rs->type=="PagedRS") ? WebApp::getVar("FirstRec") : 1; WebApp::addVar("CurrentRecNr", $firstRecNr + $row_nr - 1); WebApp::addVar("CurrentRowNr", $row_nr); --- 420,423 ---- |
From: Dashamir H. <das...@us...> - 2004-07-22 16:26:21
|
Update of /cvsroot/phpwebapp/web_app/webobjects/table In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9224/webobjects/table Modified Files: table.php Log Message: reformated and modified the copyleft notice Index: table.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/table/table.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** table.php 25 Aug 2003 13:18:28 -0000 1.4 --- table.php 22 Jul 2004 16:25:35 -0000 1.5 *************** *** 1,21 **** <?php /* ! Copyright 2001,2002,2003 Dashamir Hoxha, das...@us... ! This file is part of phpWebApp. ! phpWebApp is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, or ! (at your option) any later version. ! phpWebApp is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with phpWebApp; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ --- 1,22 ---- <?php /* ! This file is part of phpWebApp, which is a framework for building web ! application based on relational databases. ! Copyright 2001,2002,2003,2004 Dashamir Hoxha, das...@us... ! phpWebApp is free software; you can redistribute it and/or modify it ! under the terms of the GNU General Public License as published by the ! Free Software Foundation; either version 2 of the License, or (at your ! option) any later version. ! phpWebApp is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with phpWebApp; if not, write to the Free Software Foundation, ! Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ *************** *** 28,71 **** { function onRender() ! { ! //get the name of the table ! $table = $this->params["table"]; ! $table = WebApp::replaceVars($table); ! $fields = $this->params["fields"]; ! $where = $this->params["where"]; ! $where = WebApp::replaceVars($where); ! //get the recordset "{{table}}->fields" ! $arr_fields = explode(",", $fields); ! $table_fields = new EditableRS($table."->fields"); ! $rs = WebApp::execQuery("SHOW FIELDS FROM $table"); ! while (!$rs->EOF()) ! { ! $fld_name = $rs->Field("Field"); ! $rec = array("fld_name"=>$fld_name); ! if ($fields=="*") ! { ! $table_fields->addRec($rec); ! } ! else if (in_array($fld_name, $arr_fields)) ! { ! $table_fields->addRec($rec); ! } ! $rs->MoveNext(); ! } ! //get the recordset "{{table}}->records" ! $id = $table."->records"; ! if ($where<>"") $where = "WHERE $where"; ! $query = "SELECT $fields FROM $table $where"; ! $table_records = new EditableRS($id, $query); ! $table_records->Open(); ! //add the recordsets to $webPage ! global $webPage; ! $webPage->addRecordset($table_fields); ! $webPage->addRecordset($table_records); ! } } ?> \ No newline at end of file --- 29,72 ---- { function onRender() ! { ! //get the name of the table ! $table = $this->params["table"]; ! $table = WebApp::replaceVars($table); ! $fields = $this->params["fields"]; ! $where = $this->params["where"]; ! $where = WebApp::replaceVars($where); ! //get the recordset "{{table}}->fields" ! $arr_fields = explode(",", $fields); ! $table_fields = new EditableRS($table."->fields"); ! $rs = WebApp::execQuery("SHOW FIELDS FROM $table"); ! while (!$rs->EOF()) ! { ! $fld_name = $rs->Field("Field"); ! $rec = array("fld_name"=>$fld_name); ! if ($fields=="*") ! { ! $table_fields->addRec($rec); ! } ! else if (in_array($fld_name, $arr_fields)) ! { ! $table_fields->addRec($rec); ! } ! $rs->MoveNext(); ! } ! //get the recordset "{{table}}->records" ! $id = $table."->records"; ! if ($where<>"") $where = "WHERE $where"; ! $query = "SELECT $fields FROM $table $where"; ! $table_records = new EditableRS($id, $query); ! $table_records->Open(); ! //add the recordsets to $webPage ! global $webPage; ! $webPage->addRecordset($table_fields); ! $webPage->addRecordset($table_records); ! } } ?> \ No newline at end of file |
From: Dashamir H. <das...@us...> - 2004-07-22 16:26:21
|
Update of /cvsroot/phpwebapp/web_app/webobjects/dbTable In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9224/webobjects/dbTable Modified Files: editRecord.php dbTable.php Log Message: reformated and modified the copyleft notice Index: editRecord.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/dbTable/editRecord.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** editRecord.php 11 May 2004 06:45:29 -0000 1.5 --- editRecord.php 22 Jul 2004 16:25:36 -0000 1.6 *************** *** 1,7 **** <?php /* ! Copyright 2001,2002,2003 Dashamir Hoxha, das...@us... ! This file is part of phpWebApp. phpWebApp is free software; you can redistribute it and/or modify it --- 1,8 ---- <?php /* ! This file is part of phpWebApp, which is a framework for building web ! application based on relational databases. ! Copyright 2001,2002,2003,2004 Dashamir Hoxha, das...@us... phpWebApp is free software; you can redistribute it and/or modify it *************** *** 28,139 **** { function init() ! { ! /** state can be 'add', 'edit' or 'hidden' */ ! $this->addSVar("state", "hidden"); ! /** the rec_id of the record that is being edited */ ! $this->addSVar("rec_id", UNDEFINED); ! } function on_cancel($event_args) ! { ! $this->setSVar("state", "hidden"); ! $this->setSVar("rec_id", UNDEFINED); ! } function on_save($event_args) ! { ! //get the related dbTable ! $edTbl = $this->get_dbTable(); ! //get params 'table' and 'fields' of the dbTable ! $table = $edTbl->params["table"]; ! $table = WebApp::replaceVars($table); ! $fields = $edTbl->params["fields"]; ! //get $values ! while (list($name, $value) = each($event_args)) ! { ! $arr_values[] = "$name='$value'"; ! } ! $values = implode(", ", $arr_values); ! $state = $this->getSVar("state"); ! if ($state=="add") ! { ! //insert ! $vars["table"] = $table; ! $vars["values"] = $values; ! WebApp::execDBCmd("editRecord::insert", $vars); ! } ! else if ($state=="edit") ! { ! //update ! $rec_id = $this->getSVar("rec_id"); ! $rec_id = str_replace("\\'", "'", $rec_id); ! $vars = array( ! "table" => $table, ! "values" => $values, ! "rec_id" => $rec_id ! ); ! WebApp::execDBCmd("editRecord::update", $vars); ! } ! else ! { ! $msg = "editRecord::save(): invalid state '$state'."; ! print WebApp::warning_msg($msg); ! } ! $this->setSVar("state", "hidden"); ! } /** returns the related 'dbTable' object */ function get_dbTable() ! { ! global $webPage; ! $obj_vars = $this->getObjVars(); ! $edTable_id = "dbTable::".$obj_vars["obj_name"]; ! $dbTable = $webPage->getObject($edTable_id); ! return $dbTable; ! } function onRender() ! { ! //get the related dbTable ! $edTbl = $this->get_dbTable(); ! //get params 'table' and 'fields' of the dbTable ! $table = $edTbl->params["table"]; ! $table = WebApp::replaceVars($table); ! $fields = $edTbl->params["fields"]; ! //get the recordset {{table}}->fields ! global $webPage; ! $table_fields = $webPage->getRecordset($table."->fields"); ! $state = $this->getSVar("state"); ! if ($state=="add") ! { ! //add empty variables for each field ! $table_fields->MoveFirst(); ! while (!$table_fields->EOF()) ! { ! $fld_name = $table_fields->Field("fld_name"); ! WebApp::addVar($fld_name, ""); ! $table_fields->MoveNext(); ! } ! } ! else if ($state=="edit") ! { ! //add vars for each field of the selected record ! $rec_id = $this->getSVar("rec_id"); ! $rec_id = str_replace("\\'", "'", $rec_id); ! $query = "SELECT $fields FROM $table WHERE $rec_id"; ! $rs = new Recordset($edTbl->params['id'].'_editRecord', $query); ! $rs->Open(); ! WebApp::addVars($rs->Fields()); ! } ! } } ?> \ No newline at end of file --- 29,140 ---- { function init() ! { ! /** state can be 'add', 'edit' or 'hidden' */ ! $this->addSVar("state", "hidden"); ! /** the rec_id of the record that is being edited */ ! $this->addSVar("rec_id", UNDEFINED); ! } function on_cancel($event_args) ! { ! $this->setSVar("state", "hidden"); ! $this->setSVar("rec_id", UNDEFINED); ! } function on_save($event_args) ! { ! //get the related dbTable ! $edTbl = $this->get_dbTable(); ! //get params 'table' and 'fields' of the dbTable ! $table = $edTbl->params["table"]; ! $table = WebApp::replaceVars($table); ! $fields = $edTbl->params["fields"]; ! //get $values ! while (list($name, $value) = each($event_args)) ! { ! $arr_values[] = "$name='$value'"; ! } ! $values = implode(", ", $arr_values); ! $state = $this->getSVar("state"); ! if ($state=="add") ! { ! //insert ! $vars["table"] = $table; ! $vars["values"] = $values; ! WebApp::execDBCmd("editRecord::insert", $vars); ! } ! else if ($state=="edit") ! { ! //update ! $rec_id = $this->getSVar("rec_id"); ! $rec_id = str_replace("\\'", "'", $rec_id); ! $vars = array( ! "table" => $table, ! "values" => $values, ! "rec_id" => $rec_id ! ); ! WebApp::execDBCmd("editRecord::update", $vars); ! } ! else ! { ! $msg = "editRecord::save(): invalid state '$state'."; ! print WebApp::warning_msg($msg); ! } ! $this->setSVar("state", "hidden"); ! } /** returns the related 'dbTable' object */ function get_dbTable() ! { ! global $webPage; ! $obj_vars = $this->getObjVars(); ! $edTable_id = "dbTable::".$obj_vars["obj_name"]; ! $dbTable = $webPage->getObject($edTable_id); ! return $dbTable; ! } function onRender() ! { ! //get the related dbTable ! $edTbl = $this->get_dbTable(); ! //get params 'table' and 'fields' of the dbTable ! $table = $edTbl->params["table"]; ! $table = WebApp::replaceVars($table); ! $fields = $edTbl->params["fields"]; ! //get the recordset {{table}}->fields ! global $webPage; ! $table_fields = $webPage->getRecordset($table."->fields"); ! $state = $this->getSVar("state"); ! if ($state=="add") ! { ! //add empty variables for each field ! $table_fields->MoveFirst(); ! while (!$table_fields->EOF()) ! { ! $fld_name = $table_fields->Field("fld_name"); ! WebApp::addVar($fld_name, ""); ! $table_fields->MoveNext(); ! } ! } ! else if ($state=="edit") ! { ! //add vars for each field of the selected record ! $rec_id = $this->getSVar("rec_id"); ! $rec_id = str_replace("\\'", "'", $rec_id); ! $query = "SELECT $fields FROM $table WHERE $rec_id"; ! $rs = new Recordset($edTbl->params['id'].'_editRecord', $query); ! $rs->Open(); ! WebApp::addVars($rs->Fields()); ! } ! } } ?> \ No newline at end of file Index: dbTable.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/dbTable/dbTable.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dbTable.php 11 May 2004 06:45:29 -0000 1.5 --- dbTable.php 22 Jul 2004 16:25:36 -0000 1.6 *************** *** 1,7 **** <?php /* ! Copyright 2001,2002,2003 Dashamir Hoxha, das...@us... ! This file is part of phpWebApp. phpWebApp is free software; you can redistribute it and/or modify it --- 1,8 ---- <?php /* ! This file is part of phpWebApp, which is a framework for building web ! application based on relational databases. ! Copyright 2001,2002,2003,2004 Dashamir Hoxha, das...@us... phpWebApp is free software; you can redistribute it and/or modify it *************** *** 28,128 **** { function init() ! { ! $this->addSVar("selected_rec", UNDEFINED); ! } function on_rmAll($event_args) ! { ! $table = $this->params["table"]; ! $table = WebApp::replaceVars($table); ! $where = $this->params["where"]; ! $condition = ($where=="" ? "1=1" : $where); ! //remove all ! $vars["table"] = $table; ! $vars["condition"] = $condition; ! WebApp::execDBCmd("dbTable::removeAll", $vars); ! } function on_rm($event_args) ! { ! $table = $this->params["table"]; ! $table = WebApp::replaceVars($table); ! $rec_id = $event_args["rec_id"]; ! $rec_id = str_replace("\\'", "'", $rec_id); ! //remove ! $vars["table"] = $table; ! $vars["rec_id"] = $rec_id; ! WebApp::execDBCmd("dbTable::remove", $vars); ! } function on_add($event_args) ! { ! $objVars = $this->getObjVars(); ! $obj_name = $objVars["obj_name"]; ! $editRecId = "editRecord::".$obj_name; ! WebApp::setSVar($editRecId."->rec_id", UNDEFINED); ! WebApp::setSVar($editRecId."->state", "add"); ! } function on_edit($event_args) ! { ! $rec_id = $event_args["rec_id"]; ! $objVars = $this->getObjVars(); ! $obj_name = $objVars["obj_name"]; ! $editRecId = "editRecord::".$obj_name; ! WebApp::setSVar($editRecId."->rec_id", $rec_id); ! WebApp::setSVar($editRecId."->state", "edit"); ! } function on_select($event_args) ! { ! $rec_id = $event_args["rec_id"]; ! $this->setSVar("selected_rec", $rec_id); ! } function onParse() ! { ! $this->add_selectedRec_vars(); ! } /** add the fields of the selected record as variables */ function add_selectedRec_vars() ! { ! $rec_id = $this->getSVar("selected_rec"); ! if ($rec_id==UNDEFINED) return; ! $rec_id = str_replace("\\'", "'", $rec_id); ! $vars["rec_id"] = $rec_id; ! $table = $this->params["table"]; ! $table = WebApp::replaceVars($table); ! $vars["table"] = $table; ! $rs = WebApp::openRS("dbTable::select", $vars); ! WebApp::addGlobalVars($rs->Fields()); ! } function onRender() ! { ! //get all the fields of the table ! $table = $this->params["table"]; ! $table = WebApp::replaceVars($table); ! $rs = WebApp::execQuery("SHOW FIELDS FROM $table"); ! //get the key fields and add the variable {{rec_id}} ! $arr_key = $this->getKey($rs); ! $this->add_rec_id($arr_key); ! //get the recordsets "{{table}}->fields" and "{{table}}->records" ! $table_fields = $this->getTableFields($rs); ! $table_records = $this->getTableRecords($arr_key); ! //add the recordsets to $webPage ! global $webPage; ! $webPage->addRecordset($table_fields); ! $webPage->addRecordset($table_records); ! } /** --- 29,129 ---- { function init() ! { ! $this->addSVar("selected_rec", UNDEFINED); ! } function on_rmAll($event_args) ! { ! $table = $this->params["table"]; ! $table = WebApp::replaceVars($table); ! $where = $this->params["where"]; ! $condition = ($where=="" ? "1=1" : $where); ! //remove all ! $vars["table"] = $table; ! $vars["condition"] = $condition; ! WebApp::execDBCmd("dbTable::removeAll", $vars); ! } function on_rm($event_args) ! { ! $table = $this->params["table"]; ! $table = WebApp::replaceVars($table); ! $rec_id = $event_args["rec_id"]; ! $rec_id = str_replace("\\'", "'", $rec_id); ! //remove ! $vars["table"] = $table; ! $vars["rec_id"] = $rec_id; ! WebApp::execDBCmd("dbTable::remove", $vars); ! } function on_add($event_args) ! { ! $objVars = $this->getObjVars(); ! $obj_name = $objVars["obj_name"]; ! $editRecId = "editRecord::".$obj_name; ! WebApp::setSVar($editRecId."->rec_id", UNDEFINED); ! WebApp::setSVar($editRecId."->state", "add"); ! } function on_edit($event_args) ! { ! $rec_id = $event_args["rec_id"]; ! $objVars = $this->getObjVars(); ! $obj_name = $objVars["obj_name"]; ! $editRecId = "editRecord::".$obj_name; ! WebApp::setSVar($editRecId."->rec_id", $rec_id); ! WebApp::setSVar($editRecId."->state", "edit"); ! } function on_select($event_args) ! { ! $rec_id = $event_args["rec_id"]; ! $this->setSVar("selected_rec", $rec_id); ! } function onParse() ! { ! $this->add_selectedRec_vars(); ! } /** add the fields of the selected record as variables */ function add_selectedRec_vars() ! { ! $rec_id = $this->getSVar("selected_rec"); ! if ($rec_id==UNDEFINED) return; ! $rec_id = str_replace("\\'", "'", $rec_id); ! $vars["rec_id"] = $rec_id; ! $table = $this->params["table"]; ! $table = WebApp::replaceVars($table); ! $vars["table"] = $table; ! $rs = WebApp::openRS("dbTable::select", $vars); ! WebApp::addGlobalVars($rs->Fields()); ! } function onRender() ! { ! //get all the fields of the table ! $table = $this->params["table"]; ! $table = WebApp::replaceVars($table); ! $rs = WebApp::execQuery("SHOW FIELDS FROM $table"); ! //get the key fields and add the variable {{rec_id}} ! $arr_key = $this->getKey($rs); ! $this->add_rec_id($arr_key); ! //get the recordsets "{{table}}->fields" and "{{table}}->records" ! $table_fields = $this->getTableFields($rs); ! $table_records = $this->getTableRecords($arr_key); ! //add the recordsets to $webPage ! global $webPage; ! $webPage->addRecordset($table_fields); ! $webPage->addRecordset($table_records); ! } /** *************** *** 131,159 **** */ function getKey(&$rs) ! { ! $arr_keys = array(); ! $rs->MoveFirst(); ! while (!$rs->EOF()) ! { ! $key = $rs->Field("Key"); ! $fld = $rs->Field("Field"); ! if ($key=="PRI") $arr_keys[] = $fld; ! $rs->MoveNext(); ! } ! $rs->MoveFirst(); ! //if no key found, take all the fields as key ! if (sizeof($arr_keys)==0) ! { ! while (!$rs->EOF()) ! { ! $arr_keys[]=$key; ! $rs->MoveNext(); ! } ! $rs->MoveFirst(); ! } ! return $arr_keys; ! } /** --- 132,160 ---- */ function getKey(&$rs) ! { ! $arr_keys = array(); ! $rs->MoveFirst(); ! while (!$rs->EOF()) ! { ! $key = $rs->Field("Key"); ! $fld = $rs->Field("Field"); ! if ($key=="PRI") $arr_keys[] = $fld; ! $rs->MoveNext(); ! } ! $rs->MoveFirst(); ! //if no key found, take all the fields as key ! if (sizeof($arr_keys)==0) ! { ! while (!$rs->EOF()) ! { ! $arr_keys[]=$key; ! $rs->MoveNext(); ! } ! $rs->MoveFirst(); ! } ! return $arr_keys; ! } /** *************** *** 162,174 **** */ function add_rec_id($arr_key) ! { ! for ($i=0; $i < sizeof($arr_key); $i++) ! { ! $fld = $arr_key[$i]; ! $arr_flds[] = $fld."=\\'{{".$fld."}}\\'"; ! } ! $rec_id = implode(" AND ", $arr_flds); ! WebApp::addVar("rec_id", $rec_id); ! } /** --- 163,175 ---- */ function add_rec_id($arr_key) ! { ! for ($i=0; $i < sizeof($arr_key); $i++) ! { ! $fld = $arr_key[$i]; ! $arr_flds[] = $fld."=\\'{{".$fld."}}\\'"; ! } ! $rec_id = implode(" AND ", $arr_flds); ! WebApp::addVar("rec_id", $rec_id); ! } /** *************** *** 178,213 **** */ function getTableFields(&$rs) ! { ! //get the params of the <WebObject> ! $table = $this->params["table"]; ! $table = WebApp::replaceVars($table); ! $fields = $this->params["fields"]; ! $table_fields = new EditableRS($table."->fields"); ! if ($fields=="*") ! { ! //all the fields of the table ! $rs->MoveFirst(); ! while (!$rs->EOF()) ! { ! $fld_name = $rs->Field("Field"); ! $rec = array("fld_name"=>$fld_name); ! $table_fields->addRec($rec); ! $rs->MoveNext(); ! } ! } ! else ! { ! //add the fields selected in the parameter ! $arr_fields = explode(",", $fields); ! for ($i=0; $i < sizeof($arr_fields); $i++) ! { ! $fld_name = $arr_fields[$i]; ! $rec = array("fld_name"=>$fld_name); ! $table_fields->addRec($rec); ! } ! } ! return $table_fields; ! } /** --- 179,214 ---- */ function getTableFields(&$rs) ! { ! //get the params of the <WebObject> ! $table = $this->params["table"]; ! $table = WebApp::replaceVars($table); ! $fields = $this->params["fields"]; ! $table_fields = new EditableRS($table."->fields"); ! if ($fields=="*") ! { ! //all the fields of the table ! $rs->MoveFirst(); ! while (!$rs->EOF()) ! { ! $fld_name = $rs->Field("Field"); ! $rec = array("fld_name"=>$fld_name); ! $table_fields->addRec($rec); ! $rs->MoveNext(); ! } ! } ! else ! { ! //add the fields selected in the parameter ! $arr_fields = explode(",", $fields); ! for ($i=0; $i < sizeof($arr_fields); $i++) ! { ! $fld_name = $arr_fields[$i]; ! $rec = array("fld_name"=>$fld_name); ! $table_fields->addRec($rec); ! } ! } ! return $table_fields; ! } /** *************** *** 216,250 **** */ function getTableRecords($arr_key) ! { ! //get parameter values ! $table = $this->params["table"]; ! $fields = $this->params["fields"]; ! $where = $this->params["where"]; ! $table = WebApp::replaceVars($table); ! $where = WebApp::replaceVars($where); ! //make sure that the key fields are among the $fields ! if ($fields<>"*") ! { ! $arr_fields = explode(",", $fields); ! for ($i=0; $i < sizeof($arr_key); $i++) ! { ! $fld = $arr_key[$i]; ! if (!in_array($fld, $arr_fields)) array_unshift($arr_fields, $fld); ! } ! $fields = implode(",", $arr_fields); ! } ! //construct the query ! if ($where<>"") $where = "WHERE $where"; ! $query = "SELECT $fields FROM $table $where"; ! //create and open the recordset ! $id = $table."->records"; ! $table_records = new EditableRS($id, $query); ! $table_records->Open(); ! return $table_records; ! } } ?> \ No newline at end of file --- 217,251 ---- */ function getTableRecords($arr_key) ! { ! //get parameter values ! $table = $this->params["table"]; ! $fields = $this->params["fields"]; ! $where = $this->params["where"]; ! $table = WebApp::replaceVars($table); ! $where = WebApp::replaceVars($where); ! //make sure that the key fields are among the $fields ! if ($fields<>"*") ! { ! $arr_fields = explode(",", $fields); ! for ($i=0; $i < sizeof($arr_key); $i++) ! { ! $fld = $arr_key[$i]; ! if (!in_array($fld, $arr_fields)) array_unshift($arr_fields, $fld); ! } ! $fields = implode(",", $arr_fields); ! } ! //construct the query ! if ($where<>"") $where = "WHERE $where"; ! $query = "SELECT $fields FROM $table $where"; ! //create and open the recordset ! $id = $table."->records"; ! $table_records = new EditableRS($id, $query); ! $table_records->Open(); ! return $table_records; ! } } ?> \ No newline at end of file |
From: Dashamir H. <das...@us...> - 2004-07-22 16:26:21
|
Update of /cvsroot/phpwebapp/web_app/webobjects/xlistbox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9224/webobjects/xlistbox Modified Files: xlistbox.php Log Message: reformated and modified the copyleft notice Index: xlistbox.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/xlistbox/xlistbox.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** xlistbox.php 25 Aug 2003 13:18:28 -0000 1.4 --- xlistbox.php 22 Jul 2004 16:25:35 -0000 1.5 *************** *** 1,21 **** <?php /* ! Copyright 2001,2002,2003 Dashamir Hoxha, das...@us... ! This file is part of phpWebApp. ! phpWebApp is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, or ! (at your option) any later version. ! phpWebApp is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with phpWebApp; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ --- 1,22 ---- <?php /* ! This file is part of phpWebApp, which is a framework for building web ! application based on relational databases. ! Copyright 2001,2002,2003,2004 Dashamir Hoxha, das...@us... ! phpWebApp is free software; you can redistribute it and/or modify it ! under the terms of the GNU General Public License as published by the ! Free Software Foundation; either version 2 of the License, or (at your ! option) any later version. ! phpWebApp is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with phpWebApp; if not, write to the Free Software Foundation, ! Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ *************** *** 28,118 **** { function onRender() ! { ! if ($this->params["mainlist"]=="false") ! { ! $this->add_listsize_rs(); ! } ! } function add_listsize_rs() ! { ! //build the listsize recordset ! $obj_name = $this->get_obj_name(); ! $rs = new EditableRS($obj_name."_listsize"); ! $list_size = $this->get_sublist_size(); ! for ($i=0; $i < $list_size; $i++) ! { ! $rec = array("dummy"=>""); ! $rs->addRec($rec); ! } ! //add this recordset to the page ! global $webPage; ! $webPage->addRecordset($rs); ! } function get_sublist_size() ! { ! //get the query of the slave_list ! global $webPage; ! $rs_id = $this->params["rs"]; ! $rs_id = WebApp::replaceVars($rs_id); ! $rs = $webPage->getRecordset($rs_id); ! $query = $rs->query; ! //get the count query ! $cnt_query = $this->get_count_query($query); ! //find the max count ! $max_count = 0; ! $rs = WebApp::execQuery($cnt_query); ! while (!$rs->EOF()) ! { ! $count = $rs->Field("count"); ! if ($count > $max_count) $max_count = $count; ! $rs->MoveNext(); ! } ! return $max_count; ! } function get_count_query($query) ! { ! eregi("(SELECT .*)([[:space:]]FROM .*)", $query, $regs); ! $before_from = $regs[1]; ! $after_from = $regs[2]; ! //get the field name of the master_id ! eregi("SELECT[[:space:]]+(.*)", $before_from, $regs); ! $arr_fields = explode(",", $regs[1]); ! for ($i=0; $i < sizeof($arr_fields); $i++) ! { ! list($fld_name, $fld_alias) = split(" +[Aa][Ss] +", $arr_fields[$i]); ! if (trim($fld_alias)=="master_id") break; ! } ! $arr = split("[[:space:]]+", trim($fld_name)); ! $fld_name = array_pop($arr); ! if (eregi("GROUP +BY", $after_from)) ! { ! $after_from = eregi_replace("ORDER +BY.*", "", $after_from); ! eregi("GROUP +BY(.*)", $after_from, $regs); ! $group_by_fields = $regs[1]; ! $after_from = eregi_replace("GROUP +BY.*", "", $after_from); ! $count_query = "SELECT COUNT(DISTINCT $group_by_fields) AS count $after_from"; ! } ! else if (eregi("SELECT +DISTINCT", $before_from)) ! { ! $before_from = eregi_replace("SELECT +(DISTINCT.*)", "SELECT COUNT(\\1) AS count", $before_from); ! $count_query = $before_from.$after_from; ! } ! else ! { ! $count_query = "SELECT COUNT(1) AS count" . $after_from; ! } ! $count_query .= " GROUP BY $fld_name"; ! return $count_query; ! } } ?> \ No newline at end of file --- 29,119 ---- { function onRender() ! { ! if ($this->params["mainlist"]=="false") ! { ! $this->add_listsize_rs(); ! } ! } function add_listsize_rs() ! { ! //build the listsize recordset ! $obj_name = $this->get_obj_name(); ! $rs = new EditableRS($obj_name."_listsize"); ! $list_size = $this->get_sublist_size(); ! for ($i=0; $i < $list_size; $i++) ! { ! $rec = array("dummy"=>""); ! $rs->addRec($rec); ! } ! //add this recordset to the page ! global $webPage; ! $webPage->addRecordset($rs); ! } function get_sublist_size() ! { ! //get the query of the slave_list ! global $webPage; ! $rs_id = $this->params["rs"]; ! $rs_id = WebApp::replaceVars($rs_id); ! $rs = $webPage->getRecordset($rs_id); ! $query = $rs->query; ! //get the count query ! $cnt_query = $this->get_count_query($query); ! //find the max count ! $max_count = 0; ! $rs = WebApp::execQuery($cnt_query); ! while (!$rs->EOF()) ! { ! $count = $rs->Field("count"); ! if ($count > $max_count) $max_count = $count; ! $rs->MoveNext(); ! } ! return $max_count; ! } function get_count_query($query) ! { ! eregi("(SELECT .*)([[:space:]]FROM .*)", $query, $regs); ! $before_from = $regs[1]; ! $after_from = $regs[2]; ! //get the field name of the master_id ! eregi("SELECT[[:space:]]+(.*)", $before_from, $regs); ! $arr_fields = explode(",", $regs[1]); ! for ($i=0; $i < sizeof($arr_fields); $i++) ! { ! list($fld_name, $fld_alias) = split(" +[Aa][Ss] +", $arr_fields[$i]); ! if (trim($fld_alias)=="master_id") break; ! } ! $arr = split("[[:space:]]+", trim($fld_name)); ! $fld_name = array_pop($arr); ! if (eregi("GROUP +BY", $after_from)) ! { ! $after_from = eregi_replace("ORDER +BY.*", "", $after_from); ! eregi("GROUP +BY(.*)", $after_from, $regs); ! $group_by_fields = $regs[1]; ! $after_from = eregi_replace("GROUP +BY.*", "", $after_from); ! $count_query = "SELECT COUNT(DISTINCT $group_by_fields) AS count $after_from"; ! } ! else if (eregi("SELECT +DISTINCT", $before_from)) ! { ! $before_from = eregi_replace("SELECT +(DISTINCT.*)", "SELECT COUNT(\\1) AS count", $before_from); ! $count_query = $before_from.$after_from; ! } ! else ! { ! $count_query = "SELECT COUNT(1) AS count" . $after_from; ! } ! $count_query .= " GROUP BY $fld_name"; ! return $count_query; ! } } ?> \ No newline at end of file |
From: Dashamir H. <das...@us...> - 2004-07-22 16:26:21
|
Update of /cvsroot/phpwebapp/web_app/session In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9224/session Modified Files: wbSession.php class.Session.php class.Request.php class.Event.php Log Message: reformated and modified the copyleft notice Index: wbSession.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/session/wbSession.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wbSession.php 14 Jul 2004 14:45:41 -0000 1.6 --- wbSession.php 22 Jul 2004 16:25:36 -0000 1.7 *************** *** 1,21 **** <?php /* ! Copyright 2001,2002,2003 Dashamir Hoxha, das...@us... ! This file is part of phpWebApp. ! phpWebApp is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, or ! (at your option) any later version. ! phpWebApp is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with phpWebApp; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ --- 1,22 ---- <?php /* ! This file is part of phpWebApp, which is a framework for building web ! application based on relational databases. ! Copyright 2001,2002,2003,2004 Dashamir Hoxha, das...@us... ! phpWebApp is free software; you can redistribute it and/or modify it ! under the terms of the GNU General Public License as published by the ! Free Software Foundation; either version 2 of the License, or (at your ! option) any later version. ! phpWebApp is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with phpWebApp; if not, write to the Free Software Foundation, ! Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ *************** *** 28,56 **** { function onParse() ! { ! global $webPage; ! $session_url = WebApp::to_url(SESSION_PATH); ! $func_goto = ' <script type="text/javascript" language="javascript" ' ! . "src=\"${session_url}func.GoTo.js\"></script>\n"; ! $webPage->append_to_head($func_goto); ! } function onRender() ! { ! global $session, $event; ! //save dbVars in DB ! $session->saveDBVars(); ! //add the variable {{method}} ! $method = (DISPLAY_CGI_VARS ? "get" : "post"); ! WebApp::addVar("method", $method); ! WebApp::addVar("sourcePage", $event->targetPage); ! //add the template variable {{SESSION_VARS}} ! //which embeds the session into the page ! WebApp::addVar("SESSION_VARS", $session->to_JS()); ! } } ?> \ No newline at end of file --- 29,57 ---- { function onParse() ! { ! global $webPage; ! $session_url = WebApp::to_url(SESSION_PATH); ! $func_goto = ' <script type="text/javascript" language="javascript" ' ! . "src=\"${session_url}func.GoTo.js\"></script>\n"; ! $webPage->append_to_head($func_goto); ! } function onRender() ! { ! global $session, $event; ! //save dbVars in DB ! $session->saveDBVars(); ! //add the variable {{method}} ! $method = (DISPLAY_CGI_VARS ? "get" : "post"); ! WebApp::addVar("method", $method); ! WebApp::addVar("sourcePage", $event->targetPage); ! //add the template variable {{SESSION_VARS}} ! //which embeds the session into the page ! WebApp::addVar("SESSION_VARS", $session->to_JS()); ! } } ?> \ No newline at end of file Index: class.Session.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/session/class.Session.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** class.Session.php 15 Jul 2004 14:46:04 -0000 1.10 --- class.Session.php 22 Jul 2004 16:25:37 -0000 1.11 *************** *** 1,21 **** <?php /* ! Copyright 2001,2002,2003 Dashamir Hoxha, das...@us... ! This file is part of phpWebApp. ! phpWebApp is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, or ! (at your option) any later version. ! phpWebApp is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with phpWebApp; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ --- 1,22 ---- <?php /* ! This file is part of phpWebApp, which is a framework for building web ! application based on relational databases. ! Copyright 2001,2002,2003,2004 Dashamir Hoxha, das...@us... ! phpWebApp is free software; you can redistribute it and/or modify it ! under the terms of the GNU General Public License as published by the ! Free Software Foundation; either version 2 of the License, or (at your ! option) any later version. ! phpWebApp is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with phpWebApp; if not, write to the Free Software Foundation, ! Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ *************** *** 35,76 **** function Session() ! { ! global $request; ! $this->Vars = array(); ! $this->dbVars = array(); ! if ($request->firstTime) ! { ! //new session ! $this->init(); ! } ! else ! { ! $this->getVars($request->sessionVars); ! $this->getDBVars(); ! } ! $this->extractPhpVars($request->phpVars); ! } /** Initialize a new session. */ function init() ! { ! $ip = $_SERVER["REMOTE_ADDR"]; ! $sess_id = "IP: $ip; DATE: ".date("Y-m-d H:i:s"); ! $this->Vars["sess_id"] = $sess_id; ! if (USES_DB) //create a new record for the session ! { ! $this->create_table_session(); ! //insert a new record for this session ! $vars = serialize($this->dbVars); ! $db_cmd = "INSERT INTO session (id, vars) " ! . "VALUES ('$sess_id', '$vars')"; ! WebApp::execQuery($db_cmd); ! } ! } /** --- 36,77 ---- function Session() ! { ! global $request; ! $this->Vars = array(); ! $this->dbVars = array(); ! if ($request->firstTime) ! { ! //new session ! $this->init(); ! } ! else ! { ! $this->getVars($request->sessionVars); ! $this->getDBVars(); ! } ! $this->extractPhpVars($request->phpVars); ! } /** Initialize a new session. */ function init() ! { ! $ip = $_SERVER["REMOTE_ADDR"]; ! $sess_id = "IP: $ip; DATE: ".date("Y-m-d H:i:s"); ! $this->Vars["sess_id"] = $sess_id; ! if (USES_DB) //create a new record for the session ! { ! $this->create_table_session(); ! //insert a new record for this session ! $vars = serialize($this->dbVars); ! $db_cmd = "INSERT INTO session (id, vars) " ! . "VALUES ('$sess_id', '$vars')"; ! WebApp::execQuery($db_cmd); ! } ! } /** *************** *** 79,109 **** */ function create_table_session() ! { ! //get the name of the database ! $query = "SELECT DATABASE()"; ! $rs = WebApp::execQuery($query); ! $db_name = $rs->Field("DATABASE()"); ! //get a list of the tables in this database ! $query = "SHOW TABLES"; ! $rs = WebApp::execQuery($query); ! //search for the table 'session' ! $found = false; ! $table_name = "Tables_in_".$db_name; ! while (!$rs->EOF()) ! { ! $tab_name = $rs->Field($table_name); ! if ($tab_name=="session") ! { ! $found = true; ! break; ! } ! $rs->MoveNext(); ! } ! if ($found) return; //do nothing ! //not found, create the table 'session' ! $db_cmd = "CREATE TABLE session ( --- 80,110 ---- */ function create_table_session() ! { ! //get the name of the database ! $query = "SELECT DATABASE()"; ! $rs = WebApp::execQuery($query); ! $db_name = $rs->Field("DATABASE()"); ! //get a list of the tables in this database ! $query = "SHOW TABLES"; ! $rs = WebApp::execQuery($query); ! //search for the table 'session' ! $found = false; ! $table_name = "Tables_in_".$db_name; ! while (!$rs->EOF()) ! { ! $tab_name = $rs->Field($table_name); ! if ($tab_name=="session") ! { ! $found = true; ! break; ! } ! $rs->MoveNext(); ! } ! if ($found) return; //do nothing ! //not found, create the table 'session' ! $db_cmd = "CREATE TABLE session ( *************** *** 112,117 **** PRIMARY KEY (id) )"; ! WebApp::execQuery($db_cmd); ! } /** --- 113,118 ---- PRIMARY KEY (id) )"; ! WebApp::execQuery($db_cmd); ! } /** *************** *** 121,135 **** */ function str2arr($strVars) ! { ! $arrVars = array(); ! $arr = explode("&", $strVars); ! while (list($i,$strVar) = each($arr)) ! { ! if ($strVar=="") continue; ! list($var_name,$var_value) = split("=", $strVar, 2); ! $arrVars[$var_name] = $var_value; ! } ! return $arrVars; ! } /** --- 122,136 ---- */ function str2arr($strVars) ! { ! $arrVars = array(); ! $arr = explode("&", $strVars); ! while (list($i,$strVar) = each($arr)) ! { ! if ($strVar=="") continue; ! list($var_name,$var_value) = split("=", $strVar, 2); ! $arrVars[$var_name] = $var_value; ! } ! return $arrVars; ! } /** *************** *** 139,186 **** */ function getVars($sessVars) ! { ! $arrVars = $this->str2arr($sessVars); ! while (list($var_name,$var_value) = each($arrVars)) ! { ! $var_value = $this->js_decode($var_value); ! $this->addVar($var_name, $var_value); ! } ! } function js_decode($str) ! { ! $str = str_replace("\\\\", "\\", $str); ! $str = str_replace('\"', '"', $str); ! $str = str_replace("\'", "'", $str); ! $str = str_replace('\n', "\n", $str); ! return $str; ! } /** Replace some chars that are bad for JS code. */ function js_encode($str) ! { ! $str = str_replace("\\", "\\\\", $str); ! $str = str_replace("\n", '\n', $str); ! $str = str_replace("'", "\\'", $str); ! return $str; ! } /** Get dbVars from DB. Requires the table session(id,vars) in DB. */ function getDBVars() ! { ! if (USES_DB) ! { ! $id = $this->Vars["sess_id"]; ! $query = "SELECT vars FROM session WHERE id='$id'"; ! $rs = WebApp::execQuery($query); ! $vars = $rs->Field("vars"); ! $this->dbVars = unserialize($vars); ! if (!is_array($this->dbVars)) ! { ! //something went wrong ! $this->dbVars = array(); ! } ! } ! } /** --- 140,187 ---- */ function getVars($sessVars) ! { ! $arrVars = $this->str2arr($sessVars); ! while (list($var_name,$var_value) = each($arrVars)) ! { ! $var_value = $this->js_decode($var_value); ! $this->addVar($var_name, $var_value); ! } ! } function js_decode($str) ! { ! $str = str_replace("\\\\", "\\", $str); ! $str = str_replace('\"', '"', $str); ! $str = str_replace("\'", "'", $str); ! $str = str_replace('\n', "\n", $str); ! return $str; ! } /** Replace some chars that are bad for JS code. */ function js_encode($str) ! { ! $str = str_replace("\\", "\\\\", $str); ! $str = str_replace("\n", '\n', $str); ! $str = str_replace("'", "\\'", $str); ! return $str; ! } /** Get dbVars from DB. Requires the table session(id,vars) in DB. */ function getDBVars() ! { ! if (USES_DB) ! { ! $id = $this->Vars["sess_id"]; ! $query = "SELECT vars FROM session WHERE id='$id'"; ! $rs = WebApp::execQuery($query); ! $vars = $rs->Field("vars"); ! $this->dbVars = unserialize($vars); ! if (!is_array($this->dbVars)) ! { ! //something went wrong ! $this->dbVars = array(); ! } ! } ! } /** *************** *** 189,201 **** */ function extractPhpVars($phpVars) ! { ! $arrVars = $this->str2arr($phpVars); ! while (list($var_name,$var_value) = each($arrVars)) ! { ! //global PHP variable ! global $$var_name; ! $$var_name = $var_value; ! } ! } /** --- 190,202 ---- */ function extractPhpVars($phpVars) ! { ! $arrVars = $this->str2arr($phpVars); ! while (list($var_name,$var_value) = each($arrVars)) ! { ! //global PHP variable ! global $$var_name; ! $$var_name = $var_value; ! } ! } /** *************** *** 205,245 **** */ function addVar($var_name, $var_value, $db =false) ! { ! if ($db) //add DB var ! { ! if (isset($this->dbVars[$var_name])) ! { ! $msg ="Session::addVar(): DB var '$var_name' already exists."; ! print WebApp::warning_msg($msg); ! } ! if (isset($this->Vars[$var_name])) ! { ! $msg = "Session::addVar(): DB var '$var_name' shadows an existing JS var with the same name."; ! print WebApp::warning_msg($msg); ! } ! $this->dbVars[$var_name] = $var_value; ! } ! else //add JS var ! { ! if (isset($this->dbVars[$var_name])) ! { ! $msg = "Session::addVar(): JS var '$var_name' is shadowed by an existing DB var with the same name."; ! print WebApp::warning_msg($msg); ! } ! if (isset($this->Vars[$var_name])) ! { ! $msg = "Session::addVar(): JS var '$var_name' already exists."; ! print WebApp::warning_msg($msg); ! } ! $this->Vars[$var_name] = $var_value; ! } ! } /** Removes a variable from the session. */ function rmVar($var_name) ! { ! unset($this->Vars[$var_name]); ! unset($this->dbVars[$var_name]); ! } /** --- 206,246 ---- */ function addVar($var_name, $var_value, $db =false) ! { ! if ($db) //add DB var ! { ! if (isset($this->dbVars[$var_name])) ! { ! $msg ="Session::addVar(): DB var '$var_name' already exists."; ! print WebApp::warning_msg($msg); ! } ! if (isset($this->Vars[$var_name])) ! { ! $msg = "Session::addVar(): DB var '$var_name' shadows an existing JS var with the same name."; ! print WebApp::warning_msg($msg); ! } ! $this->dbVars[$var_name] = $var_value; ! } ! else //add JS var ! { ! if (isset($this->dbVars[$var_name])) ! { ! $msg = "Session::addVar(): JS var '$var_name' is shadowed by an existing DB var with the same name."; ! print WebApp::warning_msg($msg); ! } ! if (isset($this->Vars[$var_name])) ! { ! $msg = "Session::addVar(): JS var '$var_name' already exists."; ! print WebApp::warning_msg($msg); ! } ! $this->Vars[$var_name] = $var_value; ! } ! } /** Removes a variable from the session. */ function rmVar($var_name) ! { ! unset($this->Vars[$var_name]); ! unset($this->dbVars[$var_name]); ! } /** *************** *** 248,261 **** */ function setVar($var_name, $var_value) ! { ! if (isset($this->dbVars[$var_name])) ! { ! $this->dbVars[$var_name] = $var_value; ! } ! else ! { ! $this->Vars[$var_name] = $var_value; ! } ! } /** --- 249,262 ---- */ function setVar($var_name, $var_value) ! { ! if (isset($this->dbVars[$var_name])) ! { ! $this->dbVars[$var_name] = $var_value; ! } ! else ! { ! $this->Vars[$var_name] = $var_value; ! } ! } /** *************** *** 265,284 **** */ function getVar($var_name) ! { ! if (isset($this->dbVars[$var_name])) ! { ! $var_value = $this->dbVars[$var_name]; ! } ! else if (isset($this->Vars[$var_name])) ! { ! $var_value = $this->Vars[$var_name]; ! } ! else ! { ! $var_value = UNDEFINED; ! } ! return $var_value; ! } /** --- 266,285 ---- */ function getVar($var_name) ! { ! if (isset($this->dbVars[$var_name])) ! { ! $var_value = $this->dbVars[$var_name]; ! } ! else if (isset($this->Vars[$var_name])) ! { ! $var_value = $this->Vars[$var_name]; ! } ! else ! { ! $var_value = UNDEFINED; ! } ! return $var_value; ! } /** *************** *** 287,332 **** */ function to_JS() ! { ! $session_vars = '<script type="text/javascript" language="javascript">' ! . "\n//<![CDATA[\n" ! . " session = new Session();\n"; ! reset($this->Vars); ! //add each variable of the session ! while (list($var_name,$var_value) = each($this->Vars)) ! { ! $var_value = $this->js_encode($var_value); ! $session_vars .= " session.addVar('$var_name','$var_value');\n"; ! } ! $session_vars .= "//]]>\n" ! . "</script>"; ! return $session_vars; ! } /** Save dbVars in DB. */ function saveDBVars() ! { ! if (USES_DB) ! { ! $id = $this->Vars["sess_id"]; ! $vars = serialize($this->dbVars); ! $query = "UPDATE session SET vars='$vars' WHERE id='$id'"; ! WebApp::execQuery($query); ! } ! else ! { ! //no DB, no DB connection ! if (sizeof($this->dbVars) > 0) ! { ! //convert DB vars to JS vars ! $this->Vars = array_merge($this->Vars, $this->dbVars); ! $this->dbVars = array(); ! //give a warning ! print WebApp::warning_msg("session DB vars saved as JS vars," ! . " there is no DB connection, make 'true' the USES_DB " ! . " constant in 'config/const.Settings.php'."); ! } ! } ! } /** --- 288,333 ---- */ function to_JS() ! { ! $session_vars = '<script type="text/javascript" language="javascript">' ! . "\n//<![CDATA[\n" ! . " session = new Session();\n"; ! reset($this->Vars); ! //add each variable of the session ! while (list($var_name,$var_value) = each($this->Vars)) ! { ! $var_value = $this->js_encode($var_value); ! $session_vars .= " session.addVar('$var_name','$var_value');\n"; ! } ! $session_vars .= "//]]>\n" ! . "</script>"; ! return $session_vars; ! } /** Save dbVars in DB. */ function saveDBVars() ! { ! if (USES_DB) ! { ! $id = $this->Vars["sess_id"]; ! $vars = serialize($this->dbVars); ! $query = "UPDATE session SET vars='$vars' WHERE id='$id'"; ! WebApp::execQuery($query); ! } ! else ! { ! //no DB, no DB connection ! if (sizeof($this->dbVars) > 0) ! { ! //convert DB vars to JS vars ! $this->Vars = array_merge($this->Vars, $this->dbVars); ! $this->dbVars = array(); ! //give a warning ! print WebApp::warning_msg("session DB vars saved as JS vars," ! . " there is no DB connection, make 'true' the USES_DB " ! . " constant in 'config/const.Settings.php'."); ! } ! } ! } /** *************** *** 335,341 **** */ function to_HTML_table() ! { ! //build the table of vars ! $html = " <br /> <a name='session' id='session'> </a>[<a href='tree'>Top</a>] --- 336,342 ---- */ function to_HTML_table() ! { ! //build the table of vars ! $html = " <br /> <a name='session' id='session'> </a>[<a href='tree'>Top</a>] *************** *** 350,361 **** </tr>"; ! //add JS vars ! reset($this->Vars); ! while (list($var_name,$var_value) = each($this->Vars)) ! { ! //don't display the box state vars ! if (strpos($var_name, "->")===false) ! { ! $html .= " <tr> <td bgcolor='#f9f9f9'> </td> --- 351,362 ---- </tr>"; ! //add JS vars ! reset($this->Vars); ! while (list($var_name,$var_value) = each($this->Vars)) ! { ! //don't display the box state vars ! if (strpos($var_name, "->")===false) ! { ! $html .= " <tr> <td bgcolor='#f9f9f9'> </td> *************** *** 363,377 **** <td bgcolor='#f9f9ff'>$var_value</td> </tr>"; ! } ! } ! //add DB vars ! reset($this->dbVars); ! while (list($var_name,$var_value) = each($this->dbVars)) ! { ! //don't display the box state vars ! if (strpos($var_name, "->")===false) ! { ! $html .= " <tr> <td bgcolor='#f9f9f9'>DB</td> --- 364,378 ---- <td bgcolor='#f9f9ff'>$var_value</td> </tr>"; ! } ! } ! //add DB vars ! reset($this->dbVars); ! while (list($var_name,$var_value) = each($this->dbVars)) ! { ! //don't display the box state vars ! if (strpos($var_name, "->")===false) ! { ! $html .= " <tr> <td bgcolor='#f9f9f9'>DB</td> *************** *** 379,388 **** <td bgcolor='#f9f9ff'>$var_value</td> </tr>"; ! } ! } ! $html .= "</table>"; ! return $html; ! } } ?> \ No newline at end of file --- 380,389 ---- <td bgcolor='#f9f9ff'>$var_value</td> </tr>"; ! } ! } ! $html .= "</table>"; ! return $html; ! } } ?> \ No newline at end of file Index: class.Request.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/session/class.Request.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** class.Request.php 8 Sep 2003 13:18:23 -0000 1.6 --- class.Request.php 22 Jul 2004 16:25:37 -0000 1.7 *************** *** 1,21 **** <?php /* ! Copyright 2001,2002,2003 Dashamir Hoxha, das...@us... ! This file is part of phpWebApp. ! phpWebApp is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, or ! (at your option) any later version. ! phpWebApp is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with phpWebApp; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ --- 1,22 ---- <?php /* ! This file is part of phpWebApp, which is a framework for building web ! application based on relational databases. ! Copyright 2001,2002,2003,2004 Dashamir Hoxha, das...@us... ! phpWebApp is free software; you can redistribute it and/or modify it ! under the terms of the GNU General Public License as published by the ! Free Software Foundation; either version 2 of the License, or (at your ! option) any later version. ! phpWebApp is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with phpWebApp; if not, write to the Free Software Foundation, ! Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ *************** *** 37,55 **** function Request() ! { ! $browser_vars = (DISPLAY_CGI_VARS ? $_GET : $_POST); ! $this->sourcePage = ( isset($browser_vars["sourcePage"]) ? ! $browser_vars["sourcePage"] : UNDEFINED ); ! $this->targetPage = ( isset($browser_vars["targetPage"]) ? ! $browser_vars["targetPage"] : UNDEFINED ); ! $this->sessionVars = ( isset($browser_vars["sessionVars"]) ? ! $browser_vars["sessionVars"] : UNDEFINED ); ! $this->strEvent = ( isset($browser_vars["strEvent"]) ? ! $browser_vars["strEvent"] : UNDEFINED ); ! $this->phpVars = ( isset($browser_vars["phpVars"]) ? ! $browser_vars["phpVars"] : UNDEFINED ); ! $this->firstTime = ($this->targetPage==UNDEFINED ? true : false); ! } } ?> \ No newline at end of file --- 38,56 ---- function Request() ! { ! $browser_vars = (DISPLAY_CGI_VARS ? $_GET : $_POST); ! $this->sourcePage = ( isset($browser_vars["sourcePage"]) ? ! $browser_vars["sourcePage"] : UNDEFINED ); ! $this->targetPage = ( isset($browser_vars["targetPage"]) ? ! $browser_vars["targetPage"] : UNDEFINED ); ! $this->sessionVars = ( isset($browser_vars["sessionVars"]) ? ! $browser_vars["sessionVars"] : UNDEFINED ); ! $this->strEvent = ( isset($browser_vars["strEvent"]) ? ! $browser_vars["strEvent"] : UNDEFINED ); ! $this->phpVars = ( isset($browser_vars["phpVars"]) ? ! $browser_vars["phpVars"] : UNDEFINED ); ! $this->firstTime = ($this->targetPage==UNDEFINED ? true : false); ! } } ?> \ No newline at end of file Index: class.Event.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/session/class.Event.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** class.Event.php 25 Aug 2003 13:18:31 -0000 1.5 --- class.Event.php 22 Jul 2004 16:25:37 -0000 1.6 *************** *** 1,21 **** <?php /* ! Copyright 2001,2002,2003 Dashamir Hoxha, das...@us... ! This file is part of phpWebApp. ! phpWebApp is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, or ! (at your option) any later version. ! phpWebApp is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with phpWebApp; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ --- 1,22 ---- <?php /* ! This file is part of phpWebApp, which is a framework for building web ! application based on relational databases. ! Copyright 2001,2002,2003,2004 Dashamir Hoxha, das...@us... ! phpWebApp is free software; you can redistribute it and/or modify it ! under the terms of the GNU General Public License as published by the ! Free Software Foundation; either version 2 of the License, or (at your ! option) any later version. ! phpWebApp is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with phpWebApp; if not, write to the Free Software Foundation, ! Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ *************** *** 44,55 **** /** Constructs an event from an event string. */ function Event() ! { ! global $request; ! $this->sourcePage = $request->sourcePage; ! $this->targetPage = $request->targetPage; ! $this->parse($request->strEvent); ! } /** --- 45,56 ---- /** Constructs an event from an event string. */ function Event() ! { ! global $request; ! $this->sourcePage = $request->sourcePage; ! $this->targetPage = $request->targetPage; ! $this->parse($request->strEvent); ! } /** *************** *** 58,113 **** */ function parse($strEvent) ! { ! if ($strEvent==UNDEFINED) $strEvent = ""; ! list($x, $event_str) = split("=", $strEvent, 2); ! //extract event name and event args from $event_str ! $args_pos = strpos($event_str, "("); ! if ($args_pos) ! { ! $event_name = substr($event_str, 0, $args_pos); ! $event_args = substr($event_str, $args_pos); ! } ! else ! { ! $event_name = $event_str; ! $event_args = ""; ! } ! //extract event target and event name from $event_name ! $dot_pos = strpos($event_name, "."); ! if ($dot_pos) ! { ! $this->target = substr($event_name, 0, $dot_pos); ! $this->name = substr($event_name, $dot_pos+1); ! } ! else ! { ! $this->target = UNDEFINED; ! $this->name = $event_name; ! } ! //put the arguments in $this->args ! $this->args = array(); ! if ($event_args<>"") ! { ! //strip off parantheses ! $event_args = substr($event_args, 1, strlen($event_args)-2); ! $args = explode(";", $event_args); ! while (list($i,$arg) = each($args)) ! { ! if ($arg=="") continue; ! list($arg_name,$arg_value) = split("=", $arg, 2); ! $arg_value = $this->decode_arg_value($arg_value); ! $this->args[$arg_name] = $arg_value; ! } ! } ! } function decode_arg_value($str) ! { ! $str = str_replace('#semicolumn#', ';', $str); ! return $str; ! } /** --- 59,114 ---- */ function parse($strEvent) ! { ! if ($strEvent==UNDEFINED) $strEvent = ""; ! list($x, $event_str) = split("=", $strEvent, 2); ! //extract event name and event args from $event_str ! $args_pos = strpos($event_str, "("); ! if ($args_pos) ! { ! $event_name = substr($event_str, 0, $args_pos); ! $event_args = substr($event_str, $args_pos); ! } ! else ! { ! $event_name = $event_str; ! $event_args = ""; ! } ! //extract event target and event name from $event_name ! $dot_pos = strpos($event_name, "."); ! if ($dot_pos) ! { ! $this->target = substr($event_name, 0, $dot_pos); ! $this->name = substr($event_name, $dot_pos+1); ! } ! else ! { ! $this->target = UNDEFINED; ! $this->name = $event_name; ! } ! //put the arguments in $this->args ! $this->args = array(); ! if ($event_args<>"") ! { ! //strip off parantheses ! $event_args = substr($event_args, 1, strlen($event_args)-2); ! $args = explode(";", $event_args); ! while (list($i,$arg) = each($args)) ! { ! if ($arg=="") continue; ! list($arg_name,$arg_value) = split("=", $arg, 2); ! $arg_value = $this->decode_arg_value($arg_value); ! $this->args[$arg_name] = $arg_value; ! } ! } ! } function decode_arg_value($str) ! { ! $str = str_replace('#semicolumn#', ';', $str); ! return $str; ! } /** *************** *** 116,139 **** */ function getArgs() ! { ! while ( list($arg_name,$arg_value) = each($this->args) ) ! { ! $arg_values[] = $arg_value; ! } ! return $arg_values; ! } /** Prints out the event (for debug). */ function to_text() ! { ! print "Name: $this->name\n"; ! print "Target: $this->target\n"; ! print "Args: "; ! while (list($arg_name,$arg_value) = each($this->args)) ! { ! print "$arg_name=$arg_value;"; ! } ! print "\n\n"; ! } } ?> \ No newline at end of file --- 117,140 ---- */ function getArgs() ! { ! while ( list($arg_name,$arg_value) = each($this->args) ) ! { ! $arg_values[] = $arg_value; ! } ! return $arg_values; ! } /** Prints out the event (for debug). */ function to_text() ! { ! print "Name: $this->name\n"; ! print "Target: $this->target\n"; ! print "Args: "; ! while (list($arg_name,$arg_value) = each($this->args)) ! { ! print "$arg_name=$arg_value;"; ! } ! print "\n\n"; ! } } ?> \ No newline at end of file |