phpwebapp-commits Mailing List for phpWebApp (Page 9)
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...> - 2005-06-09 13:21:47
|
Update of /cvsroot/phpwebapp/web_app/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30970/doc Modified Files: changes.txt Log Message: Index: changes.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/changes.txt,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** changes.txt 12 Oct 2004 10:01:46 -0000 1.15 --- changes.txt 9 Jun 2005 13:21:34 -0000 1.16 *************** *** 49,52 **** --- 49,77 ---- page that is going to be constructed. ------------------------------------------------------------------- + * Added debug options DEBUG_INCLUDES and DEBUG_WEBOBJECTS. They + should be included in 'config/const.Debug.php' like this: + + /** + * if this constant is true, the framework outputs a box + * around each file that is included in the page + */ + define("DEBUG_INCLUDES", false); + + /** + * if this constant is true, the framework outputs a box + * around each webobject that is used in the page + */ + define("DEBUG_WEBOBJECTS", false); + + ------------------------------------------------------------------- + * Added the (framework) tag <unindented>. By default the framework indents + all the templates that are processed or included. However sometimes may + be usefull not to indent a part of a template. This can be done by + including it inside the <unindeted> tag, like this: + <unindented> + {{file_revision}} + </unindented> + ------------------------------------------------------------------- + ------------------------------------------------------------------- ------------------------------------------------------------------- ------------------------------------------------------------------- |
From: Dashamir H. <das...@us...> - 2005-06-09 13:13:04
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24745/parser Modified Files: class.Parser.php class.Render.php Log Message: Added the (framework) tag <unindented>. By default the framework indents all the templates that are processed or included. However sometimes may be usefull not to indent a part of a template. This can be done by including it inside the <unindeted> tag, like this: <unindented> {{file_revision}} </unindented> Index: class.Parser.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Parser.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** class.Parser.php 14 May 2005 05:45:17 -0000 1.22 --- class.Parser.php 9 Jun 2005 13:12:53 -0000 1.23 *************** *** 307,310 **** --- 307,311 ---- case 'EXAMPLE': case 'TEXTAREA': + case 'UNINDENTED': $start_ELEMENT = 'start_'.$name; $this->$start_ELEMENT($attribs); *************** *** 356,359 **** --- 357,361 ---- case 'XMP': case 'TEXTAREA': + case 'UNINDENTED': $end_ELEMENT = 'end_'.$name; $this->$end_ELEMENT(); *************** *** 1061,1064 **** --- 1063,1080 ---- } + function start_UNINDENTED($attribs) + { + static $tpl_id = "Unindented_001"; + $tpl = new Template($tpl_id++, 'UnindentedTpl'); + $tpl->attr_list = $this->get_attr_list($attribs); + $this->push_current_tpl($tpl); + } + function end_UNINDENTED() + { + //the param 'false' in order not to normalize space + $tpl = $this->pop_current_tpl(false); + $this->link_template($tpl); + } + ///////////////////////////////////////////////////////////// Index: class.Render.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Render.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** class.Render.php 18 Apr 2005 09:41:27 -0000 1.20 --- class.Render.php 9 Jun 2005 13:12:53 -0000 1.21 *************** *** 189,192 **** --- 189,195 ---- $this->render_tpl($tpl); break; + case "UnindentedTpl": + $this->render_tpl_unindented($tpl); + break; case "PreTpl": case "XmpTpl": |
From: Dashamir H. <das...@us...> - 2005-06-09 13:07:46
|
Update of /cvsroot/phpwebapp/web_app/boxes/menu/edit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23863/boxes/menu/edit Modified Files: edit_menu.php Log Message: small improvments Index: edit_menu.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/boxes/menu/edit/edit_menu.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** edit_menu.php 22 Jul 2004 16:25:38 -0000 1.2 --- edit_menu.php 9 Jun 2005 13:07:34 -0000 1.3 *************** *** 38,55 **** function transform_menu($transformer, $arr_params =array()) { - //apply the transformer and get the new menu - $new_menu = $this->transform($transformer, $arr_params); - - //save the transformed menu to a tmp file - $tmpfname = tempnam("/tmp", "menu"); - $fp = fopen($tmpfname, 'w'); - fputs($fp, $new_menu); - fclose($fp); - - //move to menu.xml and set permissions $menu_xml = MENU.'edit/menu.xml'; ! shell_exec("./wrapper mv $tmpfname $menu_xml"); ! shell_exec("./wrapper chown dasho.dasho $menu_xml"); ! shell_exec("./wrapper chmod 664 $menu_xml"); } --- 38,44 ---- function transform_menu($transformer, $arr_params =array()) { $menu_xml = MENU.'edit/menu.xml'; ! $new_menu = $this->transform($transformer, $arr_params); ! write_file($menu_xml, $new_menu); } *************** *** 138,170 **** function on_apply($event_args) { ! $menu_xml = MENU.'menu.xml'; $edit_menu_xml = MENU.'edit/menu.xml'; ! shell_exec("./wrapper cp $edit_menu_xml $menu_xml"); ! //get menu_items.js ! $menu_items = $this->transform('menu_items.xsl'); ! //save it to a tmp file ! $tmpfname = tempnam("/tmp", "menu"); ! $fp = fopen($tmpfname, 'w'); ! fputs($fp, $menu_items); ! fclose($fp); ! //move to menu_items.js and set permissions $menu_items_js = MENU.'menu_items.js'; ! shell_exec("./wrapper mv $tmpfname $menu_items_js"); ! shell_exec("./wrapper chown dasho.dasho $menu_items_js"); ! shell_exec("./wrapper chmod 664 $menu_items_js"); ! //get book_list.php ! $book_list = $this->transform('book_list.xsl'); ! //save it to a tmp file ! $tmpfname = tempnam("/tmp", "menu"); ! $fp = fopen($tmpfname, 'w'); ! fputs($fp, $book_list); ! fclose($fp); ! //move to book_list_php and set permissions $book_list_php = MENU.'book_list.php'; ! shell_exec("./wrapper mv $tmpfname $book_list_php"); ! shell_exec("./wrapper chown dasho.dasho $book_list_php"); ! shell_exec("./wrapper chmod 664 $book_list_php"); } --- 127,144 ---- function on_apply($event_args) { ! //update menu.xml $edit_menu_xml = MENU.'edit/menu.xml'; ! $menu_xml = MENU.'menu.xml'; ! shell("cp $edit_menu_xml $menu_xml"); ! //update menu_items.js $menu_items_js = MENU.'menu_items.js'; ! $menu_items = $this->transform('menu_items.xsl'); ! write_file($menu_items_js, $menu_items); ! //update book_list.php $book_list_php = MENU.'book_list.php'; ! $book_list = $this->transform('book_list.xsl'); ! write_file($book_list_php, $book_list); } *************** *** 174,178 **** $menu_xml = MENU.'menu.xml'; $edit_menu_xml = MENU.'edit/menu.xml'; ! shell_exec("./wrapper cp $menu_xml $edit_menu_xml"); } --- 148,152 ---- $menu_xml = MENU.'menu.xml'; $edit_menu_xml = MENU.'edit/menu.xml'; ! shell("cp $menu_xml $edit_menu_xml"); } |
From: Dashamir H. <das...@us...> - 2005-05-14 05:45:26
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22099/parser Modified Files: class.Parser.php Log Message: Index: class.Parser.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Parser.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** class.Parser.php 11 Apr 2005 06:02:47 -0000 1.21 --- class.Parser.php 14 May 2005 05:45:17 -0000 1.22 *************** *** 1007,1011 **** static $tpl_id = "Pre_001"; $tpl = new Template($tpl_id++, 'PreTpl'); ! $tpl->addVar('attr_list', $this->get_attr_list($attribs)); $this->push_current_tpl($tpl); } --- 1007,1011 ---- static $tpl_id = "Pre_001"; $tpl = new Template($tpl_id++, 'PreTpl'); ! $tpl->attr_list = $this->get_attr_list($attribs); $this->push_current_tpl($tpl); } |
From: Dashamir H. <das...@us...> - 2005-04-18 10:08:51
|
Update of /cvsroot/phpwebapp/documentation/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3280/config Modified Files: const.Debug.php Log Message: Index: const.Debug.php =================================================================== RCS file: /cvsroot/phpwebapp/documentation/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:29:19 -0000 1.2 --- const.Debug.php 18 Apr 2005 10:08:43 -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 */ define("DEBUG_GOTO", false); *************** *** 33,37 **** /** * if this constant is true, the framework outputs the state ! * variables of each webox in HTML format (for debug) */ define("DEBUG_STATEVARS", false); --- 33,37 ---- /** * if this constant is true, the framework outputs the state ! * variables of each webox in HTML format */ define("DEBUG_STATEVARS", false); *************** *** 39,49 **** /** * if this constant is true, the framework outputs the tree ! * structure of the templates of the page (for debug) */ define("DEBUG_TEMPLATES", false); /** * if this constant is true, the framework outputs all the ! * recordsets of the page and their contents (for debug) */ define("DEBUG_RECORDSETS", false); --- 39,61 ---- /** * if this constant is true, the framework outputs the tree ! * structure of the templates of the page */ define("DEBUG_TEMPLATES", false); /** + * if this constant is true, the framework outputs a box + * around each file that is included in the page + */ + define("DEBUG_INCLUDES", true); + + /** + * if this constant is true, the framework outputs a box + * around each webobject that is used in the page + */ + define("DEBUG_WEBOBJECTS", false); + + /** * if this constant is true, the framework outputs all the ! * recordsets of the page and their contents */ define("DEBUG_RECORDSETS", false); *************** *** 51,55 **** /** * if this constant is true, the framework outputs information ! * about the execution time of several processes (for debug) */ define("EXECUTION_TIME_INFO", false); --- 63,67 ---- /** * if this constant is true, the framework outputs information ! * about the execution time of several processes */ define("EXECUTION_TIME_INFO", false); |
From: Dashamir H. <das...@us...> - 2005-04-18 10:08:27
|
Update of /cvsroot/phpwebapp/top10/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2896/config Modified Files: const.Debug.php Log Message: Index: const.Debug.php =================================================================== RCS file: /cvsroot/phpwebapp/top10/config/const.Debug.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** const.Debug.php 23 Sep 2003 14:04:12 -0000 1.1.1.1 --- const.Debug.php 18 Apr 2005 10:08:17 -0000 1.2 *************** *** 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 */ define("DEBUG_GOTO", false); *************** *** 33,37 **** /** * if this constant is true, the framework outputs the state ! * variables of each webox in HTML format (for debug) */ define("DEBUG_STATEVARS", false); --- 33,37 ---- /** * if this constant is true, the framework outputs the state ! * variables of each webox in HTML format */ define("DEBUG_STATEVARS", false); *************** *** 39,49 **** /** * if this constant is true, the framework outputs the tree ! * structure of the templates of the page (for debug) */ define("DEBUG_TEMPLATES", false); /** * if this constant is true, the framework outputs all the ! * recordsets of the page and their contents (for debug) */ define("DEBUG_RECORDSETS", false); --- 39,61 ---- /** * if this constant is true, the framework outputs the tree ! * structure of the templates of the page */ define("DEBUG_TEMPLATES", false); /** + * if this constant is true, the framework outputs a box + * around each file that is included in the page + */ + define("DEBUG_INCLUDES", true); + + /** + * if this constant is true, the framework outputs a box + * around each webobject that is used in the page + */ + define("DEBUG_WEBOBJECTS", false); + + /** * if this constant is true, the framework outputs all the ! * recordsets of the page and their contents */ define("DEBUG_RECORDSETS", false); *************** *** 51,55 **** /** * if this constant is true, the framework outputs information ! * about the execution time of several processes (for debug) */ define("EXECUTION_TIME_INFO", false); --- 63,67 ---- /** * if this constant is true, the framework outputs information ! * about the execution time of several processes */ define("EXECUTION_TIME_INFO", false); |
From: Dashamir H. <das...@us...> - 2005-04-18 10:02:04
|
Update of /cvsroot/phpwebapp/app1/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv490/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.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** const.Debug.php 29 Jul 2004 14:41:54 -0000 1.3 --- const.Debug.php 18 Apr 2005 10:01:52 -0000 1.4 *************** *** 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 */ define("DEBUG_GOTO", false); *************** *** 33,37 **** /** * if this constant is true, the framework outputs the state ! * variables of each webox in HTML format (for debug) */ define("DEBUG_STATEVARS", false); --- 33,37 ---- /** * if this constant is true, the framework outputs the state ! * variables of each webox in HTML format */ define("DEBUG_STATEVARS", false); *************** *** 39,49 **** /** * if this constant is true, the framework outputs the tree ! * structure of the templates of the page (for debug) */ define("DEBUG_TEMPLATES", false); /** * if this constant is true, the framework outputs all the ! * recordsets of the page and their contents (for debug) */ define("DEBUG_RECORDSETS", false); --- 39,61 ---- /** * if this constant is true, the framework outputs the tree ! * structure of the templates of the page */ define("DEBUG_TEMPLATES", false); /** + * if this constant is true, the framework outputs a box + * around each file that is included in the page + */ + define("DEBUG_INCLUDES", true); + + /** + * if this constant is true, the framework outputs a box + * around each webobject that is used in the page + */ + define("DEBUG_WEBOBJECTS", false); + + /** * if this constant is true, the framework outputs all the ! * recordsets of the page and their contents */ define("DEBUG_RECORDSETS", false); *************** *** 51,55 **** /** * if this constant is true, the framework outputs information ! * about the execution time of several processes (for debug) */ define("EXECUTION_TIME_INFO", false); --- 63,67 ---- /** * if this constant is true, the framework outputs information ! * about the execution time of several processes */ define("EXECUTION_TIME_INFO", false); |
From: Dashamir H. <das...@us...> - 2005-04-18 10:01:43
|
Update of /cvsroot/phpwebapp/app2/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv372/config Modified Files: const.Debug.php Log Message: Index: const.Debug.php =================================================================== RCS file: /cvsroot/phpwebapp/app2/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:46:53 -0000 1.2 --- const.Debug.php 18 Apr 2005 10:01:32 -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 */ define("DEBUG_GOTO", false); *************** *** 33,37 **** /** * if this constant is true, the framework outputs the state ! * variables of each webox in HTML format (for debug) */ define("DEBUG_STATEVARS", false); --- 33,37 ---- /** * if this constant is true, the framework outputs the state ! * variables of each webox in HTML format */ define("DEBUG_STATEVARS", false); *************** *** 39,49 **** /** * if this constant is true, the framework outputs the tree ! * structure of the templates of the page (for debug) */ define("DEBUG_TEMPLATES", false); /** * if this constant is true, the framework outputs all the ! * recordsets of the page and their contents (for debug) */ define("DEBUG_RECORDSETS", false); --- 39,61 ---- /** * if this constant is true, the framework outputs the tree ! * structure of the templates of the page */ define("DEBUG_TEMPLATES", false); /** + * if this constant is true, the framework outputs a box + * around each file that is included in the page + */ + define("DEBUG_INCLUDES", true); + + /** + * if this constant is true, the framework outputs a box + * around each webobject that is used in the page + */ + define("DEBUG_WEBOBJECTS", false); + + /** * if this constant is true, the framework outputs all the ! * recordsets of the page and their contents */ define("DEBUG_RECORDSETS", false); *************** *** 51,55 **** /** * if this constant is true, the framework outputs information ! * about the execution time of several processes (for debug) */ define("EXECUTION_TIME_INFO", false); --- 63,67 ---- /** * if this constant is true, the framework outputs information ! * about the execution time of several processes */ define("EXECUTION_TIME_INFO", false); |
From: Dashamir H. <das...@us...> - 2005-04-18 10:01:22
|
Update of /cvsroot/phpwebapp/app3/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32510/config Modified Files: const.Debug.php Log Message: Index: const.Debug.php =================================================================== RCS file: /cvsroot/phpwebapp/app3/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:52:02 -0000 1.2 --- const.Debug.php 18 Apr 2005 10:01:08 -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 */ define("DEBUG_GOTO", false); *************** *** 33,37 **** /** * if this constant is true, the framework outputs the state ! * variables of each webox in HTML format (for debug) */ define("DEBUG_STATEVARS", false); --- 33,37 ---- /** * if this constant is true, the framework outputs the state ! * variables of each webox in HTML format */ define("DEBUG_STATEVARS", false); *************** *** 39,49 **** /** * if this constant is true, the framework outputs the tree ! * structure of the templates of the page (for debug) */ define("DEBUG_TEMPLATES", false); /** * if this constant is true, the framework outputs all the ! * recordsets of the page and their contents (for debug) */ define("DEBUG_RECORDSETS", false); --- 39,61 ---- /** * if this constant is true, the framework outputs the tree ! * structure of the templates of the page */ define("DEBUG_TEMPLATES", false); /** + * if this constant is true, the framework outputs a box + * around each file that is included in the page + */ + define("DEBUG_INCLUDES", true); + + /** + * if this constant is true, the framework outputs a box + * around each webobject that is used in the page + */ + define("DEBUG_WEBOBJECTS", false); + + /** * if this constant is true, the framework outputs all the ! * recordsets of the page and their contents */ define("DEBUG_RECORDSETS", false); *************** *** 51,55 **** /** * if this constant is true, the framework outputs information ! * about the execution time of several processes (for debug) */ define("EXECUTION_TIME_INFO", false); --- 63,67 ---- /** * if this constant is true, the framework outputs information ! * about the execution time of several processes */ define("EXECUTION_TIME_INFO", false); |
From: Dashamir H. <das...@us...> - 2005-04-18 10:00:50
|
Update of /cvsroot/phpwebapp/empty-sample/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32324/config Modified Files: const.Debug.php Log Message: Index: const.Debug.php =================================================================== RCS file: /cvsroot/phpwebapp/empty-sample/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:43:35 -0000 1.2 --- const.Debug.php 18 Apr 2005 10:00:41 -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 */ define("DEBUG_GOTO", false); *************** *** 33,37 **** /** * if this constant is true, the framework outputs the state ! * variables of each webox in HTML format (for debug) */ define("DEBUG_STATEVARS", false); --- 33,37 ---- /** * if this constant is true, the framework outputs the state ! * variables of each webox in HTML format */ define("DEBUG_STATEVARS", false); *************** *** 39,49 **** /** * if this constant is true, the framework outputs the tree ! * structure of the templates of the page (for debug) */ define("DEBUG_TEMPLATES", false); /** * if this constant is true, the framework outputs all the ! * recordsets of the page and their contents (for debug) */ define("DEBUG_RECORDSETS", false); --- 39,61 ---- /** * if this constant is true, the framework outputs the tree ! * structure of the templates of the page */ define("DEBUG_TEMPLATES", false); /** + * if this constant is true, the framework outputs a box + * around each file that is included in the page + */ + define("DEBUG_INCLUDES", true); + + /** + * if this constant is true, the framework outputs a box + * around each webobject that is used in the page + */ + define("DEBUG_WEBOBJECTS", false); + + /** * if this constant is true, the framework outputs all the ! * recordsets of the page and their contents */ define("DEBUG_RECORDSETS", false); *************** *** 51,55 **** /** * if this constant is true, the framework outputs information ! * about the execution time of several processes (for debug) */ define("EXECUTION_TIME_INFO", false); --- 63,67 ---- /** * if this constant is true, the framework outputs information ! * about the execution time of several processes */ define("EXECUTION_TIME_INFO", false); |
From: Dashamir H. <das...@us...> - 2005-04-18 09:42:06
|
Update of /cvsroot/phpwebapp/web_app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22746 Modified Files: styles.css Log Message: added debug for includes and webobjects Index: styles.css =================================================================== RCS file: /cvsroot/phpwebapp/web_app/styles.css,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** styles.css 21 Jul 2004 17:04:32 -0000 1.6 --- styles.css 18 Apr 2005 09:41:25 -0000 1.7 *************** *** 117,118 **** --- 117,162 ---- background-color: #f2f2f2; } + + /*---------------------------------------*/ + + .webapp_filetpl_filename + { + margin: 1px; + margin-bottom: 0px; + border: none; + padding: 0px; + padding-left: 5px; + padding-right: 5px; + background-color: #006600; + color: #ffffff; + font-size: 80%; + font-weight: bold; + } + .webapp_filetpl + { + margin: 1px; + margin-top: 0px; + border: 1px solid #006600; + padding: 1px; + } + + .webapp_webobjtpl_id + { + margin: 1px; + margin-bottom: 0px; + border: none; + padding: 0px; + padding-left: 5px; + padding-right: 5px; + background-color: #bb0000; + color: #ffffff; + font-size: 80%; + font-weight: bold; + } + .webapp_webobjtpl + { + margin: 1px; + margin-top: 0px; + border: 1px solid #bb0000; + padding: 1px; + } |
From: Dashamir H. <das...@us...> - 2005-04-18 09:41:43
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22746/parser Modified Files: class.Render.php Log Message: added debug for includes and webobjects Index: class.Render.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Render.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** class.Render.php 11 Apr 2005 06:02:48 -0000 1.19 --- class.Render.php 18 Apr 2005 09:41:27 -0000 1.20 *************** *** 251,256 **** function render_FileTpl($file_tpl) { ! global $tplVars; $tplVars->pushScope(); --- 251,263 ---- function render_FileTpl($file_tpl) { ! if (DEBUG_INCLUDES) ! { ! $this->output("<span class='webapp_filetpl_filename'>\n"); ! $this->output($file_tpl->filename); ! $this->output("</span>\n"); ! $this->output("<div class='webapp_filetpl'>\n"); ! } + global $tplVars; $tplVars->pushScope(); *************** *** 260,267 **** --- 267,277 ---- $tplVars->addVar("./", $tpl_path); + //render the FileTpl $this->render_tpl($file_tpl); $tplVars->popScope(); + + if (DEBUG_INCLUDES) $this->output("</div>\n"); } *************** *** 288,294 **** function render_WebObjectTpl($wobj_tpl) { ! global $tplVars; $tplVars->pushScope(); //save the current scope of the var stack $wobj_tpl->scope = $tplVars->getCurrentScope(); --- 298,312 ---- function render_WebObjectTpl($wobj_tpl) { ! if (DEBUG_WEBOBJECTS) ! { ! $this->output("<span class='webapp_webobjtpl_id'>\n"); ! $this->output($wobj_tpl->id); ! $this->output("</span>\n"); ! $this->output("<div class='webapp_webobjtpl'>\n"); ! } + global $tplVars; $tplVars->pushScope(); + //save the current scope of the var stack $wobj_tpl->scope = $tplVars->getCurrentScope(); *************** *** 315,318 **** --- 333,338 ---- $tplVars->popScope(); + + if (DEBUG_WEBOBJECTS) $this->output("</div>\n"); } |
From: Dashamir H. <das...@us...> - 2005-04-11 06:02:56
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7097/parser Modified Files: class.Parser.php class.Render.php Log Message: bug fix Index: class.Parser.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Parser.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** class.Parser.php 7 Oct 2004 09:41:43 -0000 1.20 --- class.Parser.php 11 Apr 2005 06:02:47 -0000 1.21 *************** *** 1021,1025 **** static $tpl_id = "Xmp_001"; $tpl = new Template($tpl_id++, 'XmpTpl'); ! $tpl->addVar('attr_list', $this->get_attr_list($attribs)); $this->push_current_tpl($tpl); } --- 1021,1025 ---- static $tpl_id = "Xmp_001"; $tpl = new Template($tpl_id++, 'XmpTpl'); ! $tpl->attr_list = $this->get_attr_list($attribs); $this->push_current_tpl($tpl); } *************** *** 1035,1039 **** 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); } --- 1035,1039 ---- static $tpl_id = "TextArea_001"; $tpl = new Template($tpl_id++, 'TextAreaTpl'); ! $tpl->attr_list = $this->get_attr_list($attribs); $this->push_current_tpl($tpl); } *************** *** 1049,1053 **** static $tpl_id = "Example_001"; $tpl = new Template($tpl_id++, 'ExampleTpl'); ! $tpl->addVar('attr_list', $this->get_attr_list($attribs)); $this->push_current_tpl($tpl); $this->copy_mode = true; --- 1049,1053 ---- static $tpl_id = "Example_001"; $tpl = new Template($tpl_id++, 'ExampleTpl'); ! $tpl->attr_list = $this->get_attr_list($attribs); $this->push_current_tpl($tpl); $this->copy_mode = true; Index: class.Render.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Render.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** class.Render.php 30 Jul 2004 07:00:47 -0000 1.18 --- class.Render.php 11 Apr 2005 06:02:48 -0000 1.19 *************** *** 220,224 **** function render_ExampleTpl($tpl) { ! $attr_list = $tpl->vars['attr_list']; $contents = $tpl->contents; $this->output("<xmp$attr_list>".$contents."</xmp>"); --- 220,224 ---- function render_ExampleTpl($tpl) { ! $attr_list = $tpl->attr_list; $contents = $tpl->contents; $this->output("<xmp$attr_list>".$contents."</xmp>"); *************** *** 229,233 **** $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); --- 229,233 ---- $tag = substr($tpl->type, 0, -3); $tag = strtolower($tag); ! $attr_list = $tpl->attr_list; $tpl->contents = "<$tag$attr_list>".$tpl->contents."</$tag>"; $this->render_tpl_unindented($tpl); |
From: Dashamir H. <das...@us...> - 2004-10-12 10:02:03
|
Update of /cvsroot/phpwebapp/web_app/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18880/doc Modified Files: to_do.txt changes.txt ToDo.txt Log Message: Index: to_do.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/to_do.txt,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** to_do.txt 29 Jul 2004 14:46:54 -0000 1.13 --- to_do.txt 12 Oct 2004 10:01:46 -0000 1.14 *************** *** 15,31 **** 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. --- 15,18 ---- Index: changes.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/changes.txt,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** changes.txt 8 Oct 2004 10:01:56 -0000 1.14 --- changes.txt 12 Oct 2004 10:01:46 -0000 1.15 *************** *** 41,44 **** --- 41,51 ---- $name = window.open($url, $name, $features); ------------------------------------------------------------------- + * Added function: + WebApp::GoTo($target_page, $target_object =UNDEFINED, + $event_name =UNDEFINED, $event_args =UNDEFINED) + This function stops constructing the current page and starts + loading and constructing the given target page. Similar to + the JS function GoTo(), it can also send an event to the new + page that is going to be constructed. ------------------------------------------------------------------- ------------------------------------------------------------------- Index: ToDo.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/ToDo.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ToDo.txt 29 Jul 2004 14:46:54 -0000 1.8 --- ToDo.txt 12 Oct 2004 10:01:47 -0000 1.9 *************** *** 69,76 **** The messages that have to be translated by the framework can be ! denoted like this: {{i)Hello World!}} Then a tool similar to ! xgettext can be used to extract all the messages from the ! templates. Then we can either continue in the same way that ! gettext does, or we can create a message file for each webbox. In the second case we will have to create the files --- 69,77 ---- The messages that have to be translated by the framework can be ! denoted like this: {{i)Hello World!}}, or like this: <i18n>Hello ! World!<i18n>. Then a tool similar to xgettext can be used to ! extract all the messages from the templates. Then we can either ! continue in the same way that gettext does, or we can create a ! message file for each webbox. In the second case we will have to create the files *************** *** 200,217 **** WebApp::setRS("class_id", $rs); ------------------------------------------------------------- - * ?? - 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. - - ------------------------------------------------------------- * WebClass & WebObject --- 201,204 ---- |
From: Dashamir H. <das...@us...> - 2004-10-12 10:01:33
|
Update of /cvsroot/phpwebapp/web_app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18792 Modified Files: class.WebApp.php Log Message: Added function WebApp::GoTo() Index: class.WebApp.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/class.WebApp.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** class.WebApp.php 11 Oct 2004 09:50:53 -0000 1.23 --- class.WebApp.php 12 Oct 2004 10:01:10 -0000 1.24 *************** *** 114,117 **** --- 114,155 ---- /** + * This function stops constructing the current page + * and starts loading and constructing the given target page. + * Similar to the JS function GoTo(), it can also send an event + * to the new page that is going to be constructed (actually + * modifies the current event). + */ + function GoTo($target_page, $target_object =UNDEFINED, + $event_name =UNDEFINED, $event_args =UNDEFINED) + { + global $event, $webPage, $tplVars, $parser, $render; + + //modify $event according to the given params + if ($target_page<>'thisPage' and $target_page<>'') + { + $event->sourcePage = $event->targetPage; + $event->targetPage = $target_page; + } + if ($target_object<>UNDEFINED) $event->target = $target_object; + if ($event_name<>UNDEFINED) $event->name = $event_name; + if ($event_args<>UNDEFINED) $event->args = $event_args; + + //create new global vars + $webPage = new WebPage; + $tplVars = new VarStack; + $parser = new Parser; + $render = new Render; + + WebApp::constructHtmlPage(TPL.$event->targetPage); + + //after the page is constructed, stop php execution immediately + //in order to avoid any side effects of the previous call of + //constructHtmlPage() etc. (because this function is called + //somewhere in the middle of some functions, and we don't want + //the rest of the code of those functions to be executed + exit(0); + } + + /** * Constructs an HTML page and returns it as a string. * Then resumes constructing the previous page. *************** *** 192,218 **** } - /** - * This function stops loading the current page - * and starts loading and constructing the given page. - * If no page is given, reloads the same page again. - * - * @todo It doesn't work yet, see how to fix it. - */ - function reloadPage($tpl_file=UNDEFINED) - { - global $webPage, $tplVars; - - if ($tpl_file==UNDEFINED) //no parameter given - { - //reload again the same template - $tpl_file = $webPage->tpl_file; - } - unset($webPage); - unset($varStack); - $webPage = new WebPage; - $tplVars = new VarStack; - $webPage->load($tpl_file); - } - /*------ end construct functions ----------------*/ --- 230,233 ---- |
From: Dashamir H. <das...@us...> - 2004-10-12 09:23:42
|
Update of /cvsroot/phpwebapp/web_app/session In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12273/session Modified Files: Tag: phpwebapp-1_0 func.GoTo.js Log Message: Index: func.GoTo.js =================================================================== RCS file: /cvsroot/phpwebapp/web_app/session/func.GoTo.js,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -C2 -d -r1.4.2.1 -r1.4.2.2 *** func.GoTo.js 12 Oct 2004 09:17:03 -0000 1.4.2.1 --- func.GoTo.js 12 Oct 2004 09:23:33 -0000 1.4.2.2 *************** *** 82,97 **** * Submits the form of the page to the 'target' specified as parameter * by taking care to serialize and transmit the session vars as well. ! * The 'target' parameter is something like this: ! * "page1.html?event=list.add(event_args)" ! * target_page and event are separated by '?' */ ! function GoTo(target) { var idx, target_page, event; ! var form; //debug if (debug_GoTo==true) alert("GoTo('"+target+"')"); //the 'target' parameter is something like this: //"page1.html?event=list.add(event_args)" --- 82,111 ---- * Submits the form of the page to the 'target' specified as parameter * by taking care to serialize and transmit the session vars as well. ! * ! * @param target is something like this: ! * "page1.html?event=list.add(event_args)" ! * target_page and event are separated by '?'; ! * if target_page is 'thisPage' then the target ! * is the same as the source. ! * @param action (optional) is the action to which the form is submitted; ! * if missing, then it is the same as the current url; ! * if 'index' then the file part is removed from the current url; */ ! function GoTo(target, action) { var idx, target_page, event; ! var form, href, app_href; //debug if (debug_GoTo==true) alert("GoTo('"+target+"')"); + //set the action of the form + if (action==null) action = location.href; + if (action=='index') + { + href = location.href; + action = href.replace(/[^\/\?]+(\?.*)?$/, ''); + } + //the 'target' parameter is something like this: //"page1.html?event=list.add(event_args)" *************** *** 123,126 **** --- 137,141 ---- //now submit the form + form.action = action; form.submit(); } |
From: Dashamir H. <das...@us...> - 2004-10-12 09:17:14
|
Update of /cvsroot/phpwebapp/web_app/session In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11107/session Modified Files: Tag: phpwebapp-1_0 func.GoTo.js Log Message: Index: func.GoTo.js =================================================================== RCS file: /cvsroot/phpwebapp/web_app/session/func.GoTo.js,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** func.GoTo.js 25 Aug 2003 13:18:31 -0000 1.4 --- func.GoTo.js 12 Oct 2004 09:17:03 -0000 1.4.2.1 *************** *** 82,85 **** --- 82,88 ---- * Submits the form of the page to the 'target' specified as parameter * by taking care to serialize and transmit the session vars as well. + * The 'target' parameter is something like this: + * "page1.html?event=list.add(event_args)" + * target_page and event are separated by '?' */ function GoTo(target) |
From: Dashamir H. <das...@us...> - 2004-10-12 09:17:14
|
Update of /cvsroot/phpwebapp/web_app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11107 Modified Files: Tag: phpwebapp-1_0 class.WebApp.php Log Message: Index: class.WebApp.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/class.WebApp.php,v retrieving revision 1.12.2.4 retrieving revision 1.12.2.5 diff -C2 -d -r1.12.2.4 -r1.12.2.5 *** class.WebApp.php 11 Oct 2004 09:53:21 -0000 1.12.2.4 --- class.WebApp.php 12 Oct 2004 09:17:04 -0000 1.12.2.5 *************** *** 115,118 **** --- 115,156 ---- /** + * This function stops constructing the current page + * and starts loading and constructing the given target page. + * Similar to the JS function GoTo(), because it also sends + * an event to the new page that is going to be constructed + * (actually modifies the current event). + */ + function GoTo($target_page, $target_object =UNDEFINED, + $event_name =UNDEFINED, $event_args =UNDEFINED) + { + global $event, $webPage, $tplVars, $parser, $render; + + //modify $event according to the given params + if ($target_page<>'thisPage' and $target_page<>'') + { + $event->sourcePage = $event->targetPage; + $event->targetPage = $target_page; + } + if ($target_object<>UNDEFINED) $event->target = $target_object; + if ($event_name<>UNDEFINED) $event->name = $event_name; + if ($event_args<>UNDEFINED) $event->args = $event_args; + + //create new global vars + $webPage = new WebPage; + $tplVars = new VarStack; + $parser = new Parser; + $render = new Render; + + WebApp::constructHtmlPage(TPL_PATH.$event->targetPage); + + //after the page is constructed, stop php execution immediately + //in order to avoid any side effects of the previous call of + //constructHtmlPage() etc. (because this function is called + //somewhere in the middle of some functions, and we don't want + //the rest of the code of those functions to be executed + exit(0); + } + + /** * Constructs an HTML page and returns it as a string. * Then resumes constructing the previous page. *************** *** 188,216 **** } - /** - * This function stops loading the current page - * and starts loading and constructing the given page. - * If no page is given, reloads the same page again. - * - * @todo It doesn't work yet, see how to fix it. - */ - function reloadPage($tpl_file=UNDEFINED) - { - global $webPage, $tplVars, $parser; - - if ($tpl_file==UNDEFINED) //no parameter given - { - //reload again the same template - $tpl_file = $webPage->tpl_file; - } - //XX - $tplVars = new VarStack; - $parser = new Parser; - print "<xmp>--------------------------------------</xmp>\n"; //XX - $parser->parse_main(TPL_PATH.$tpl_file); - global $webapp_stop_parser; - $webapp_stop_parser = true; - } - /*------ end construct functions ----------------*/ --- 226,229 ---- |
From: Dashamir H. <das...@us...> - 2004-10-11 09:53:30
|
Update of /cvsroot/phpwebapp/web_app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6140 Modified Files: Tag: phpwebapp-1_0 class.WebApp.php Log Message: fix Index: class.WebApp.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/class.WebApp.php,v retrieving revision 1.12.2.3 retrieving revision 1.12.2.4 diff -C2 -d -r1.12.2.3 -r1.12.2.4 *** class.WebApp.php 8 Oct 2004 10:12:56 -0000 1.12.2.3 --- class.WebApp.php 11 Oct 2004 09:53:21 -0000 1.12.2.4 *************** *** 611,615 **** * $name = window.open($url, $name, $features); */ ! function popup_window($name, $url, $features ='nil') { global $webPage; --- 611,615 ---- * $name = window.open($url, $name, $features); */ ! function popup_window($name, $url, $features =UNDEFINED) { global $webPage; |
From: Dashamir H. <das...@us...> - 2004-10-11 09:53:30
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6140/parser Modified Files: Tag: phpwebapp-1_0 class.WebPage.php Log Message: fix Index: class.WebPage.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebPage.php,v retrieving revision 1.8.2.1 retrieving revision 1.8.2.2 diff -C2 -d -r1.8.2.1 -r1.8.2.2 *** class.WebPage.php 8 Oct 2004 10:12:56 -0000 1.8.2.1 --- class.WebPage.php 11 Oct 2004 09:53:20 -0000 1.8.2.2 *************** *** 222,226 **** $url = $data['url']; $features = $data['features']; ! $js .= " $name = window.open('$url', '$name', '$features');\n"; } $js .= "</script>\n"; --- 222,229 ---- $url = $data['url']; $features = $data['features']; ! if ($features==UNDEFINED) ! $js .= " $name = window.open('$url', '$name');\n"; ! else ! $js .= " $name = window.open('$url', '$name', '$features');\n"; } $js .= "</script>\n"; |
From: Dashamir H. <das...@us...> - 2004-10-11 09:51:19
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5476/parser Modified Files: class.WebPage.php Log Message: fix Index: class.WebPage.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebPage.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** class.WebPage.php 8 Oct 2004 10:01:55 -0000 1.14 --- class.WebPage.php 11 Oct 2004 09:50:52 -0000 1.15 *************** *** 234,238 **** $url = $data['url']; $features = $data['features']; ! $js .= " $name = window.open('$url', '$name', '$features');\n"; } $js .= "</script>\n"; --- 234,241 ---- $url = $data['url']; $features = $data['features']; ! if ($features==UNDEFINED) ! $js .= " $name = window.open('$url', '$name');\n"; ! else ! $js .= " $name = window.open('$url', '$name', '$features');\n"; } $js .= "</script>\n"; |
From: Dashamir H. <das...@us...> - 2004-10-11 09:51:07
|
Update of /cvsroot/phpwebapp/web_app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5476 Modified Files: class.WebApp.php Log Message: fix Index: class.WebApp.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/class.WebApp.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** class.WebApp.php 8 Oct 2004 10:01:56 -0000 1.22 --- class.WebApp.php 11 Oct 2004 09:50:53 -0000 1.23 *************** *** 605,609 **** * $name = window.open($url, $name, $features); */ ! function popup_window($name, $url, $features ='nil') { global $webPage; --- 605,609 ---- * $name = window.open($url, $name, $features); */ ! function popup_window($name, $url, $features =UNDEFINED) { global $webPage; |
From: Dashamir H. <das...@us...> - 2004-10-08 10:13:08
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19096/parser Modified Files: Tag: phpwebapp-1_0 class.WebPage.php class.Parser.php Log Message: Added function WebApp::popup_window($name, $url, $features ='nil') Index: class.WebPage.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebPage.php,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** class.WebPage.php 25 Aug 2003 13:18:32 -0000 1.8 --- class.WebPage.php 8 Oct 2004 10:12:56 -0000 1.8.2.1 *************** *** 44,53 **** var $rs_collection; ! /** Keeps a list of messages that are displayed with alert() ! * to the user after the page is loaded. */ var $messages; ! /** Keeps a list of debug messages that are displayed ! * after the page is rendered. */ var $dbg_messages; --- 44,66 ---- var $rs_collection; ! /** ! * Keeps a list of messages that are displayed with alert() ! * to the user after the page is loaded. ! * @see WebApp::message($msg) ! */ var $messages; ! /** ! * Keeps a list of windows that are poped up after the page is loaded. ! * It is a two dimensional array, indexed by name and with columns for ! * 'url' and 'features'. ! * @see WebApp::window($name, $url, $features) ! */ ! var $popup_windows; ! ! /** ! * Keeps a list of debug messages that are displayed ! * after the page is rendered. ! */ var $dbg_messages; *************** *** 63,66 **** --- 76,80 ---- $this->messages = array(); + $this->popup_windows = array(); $this->dbg_messages = array(); *************** *** 86,89 **** --- 100,105 ---- { print "Error:WebPage:addTemplate: unidentified template.\n"; + global $webPage; + print $webPage->template_list(); $tpl->toText(); return; *************** *** 187,191 **** $msg = str_replace("\n", '\n', $msg); //replace new lines with '\n' $msg = str_replace("'", "\\'", $msg); //escape single quotes ! $js .= "\talert('$msg');\n"; } $js .= "</script>\n"; --- 203,207 ---- $msg = str_replace("\n", '\n', $msg); //replace new lines with '\n' $msg = str_replace("'", "\\'", $msg); //escape single quotes ! $js .= " alert('$msg');\n"; } $js .= "</script>\n"; *************** *** 193,196 **** --- 209,230 ---- } + /** + * Returns JS code that will open a popup window + * for each window in the list popup_windows + */ + function popup_windows_to_js() + { + if (sizeof($this->popup_windows)==0) return ''; + + $js = "<script language='javascript'>\n"; + while ( list($name,$data) = each ($this->popup_windows) ) + { + $url = $data['url']; + $features = $data['features']; + $js .= " $name = window.open('$url', '$name', '$features');\n"; + } + $js .= "</script>\n"; + return $js; + } function print_dbg_messages() Index: class.Parser.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Parser.php,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -C2 -d -r1.6.2.1 -r1.6.2.2 *** class.Parser.php 4 Oct 2004 09:09:32 -0000 1.6.2.1 --- class.Parser.php 8 Oct 2004 10:12:56 -0000 1.6.2.2 *************** *** 93,101 **** { global $webPage; - $webPage->tpl_file = $tpl_file; - $webPage->tpl_collection = array(); - $webPage->rs_collection = array(); - $webPage->wb_collection = array(); $tpl = new MainTpl($tpl_file); --- 93,97 ---- |
From: Dashamir H. <das...@us...> - 2004-10-08 10:13:07
|
Update of /cvsroot/phpwebapp/web_app/append In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19096/append Modified Files: Tag: phpwebapp-1_0 append.html Added Files: Tag: phpwebapp-1_0 wbPopupWindows.php Log Message: Added function WebApp::popup_window($name, $url, $features ='nil') --- NEW FILE: wbPopupWindows.php --- <?php /* This file is part of phpWebApp. */ /** * @package append */ class wbPopupWindows extends WebObject { function onRender() { global $webPage; $popup_windows = $webPage->popup_windows_to_js(); WebApp::addVar("POPUP_WINDOWS", $popup_windows); } } ?> Index: append.html =================================================================== RCS file: /cvsroot/phpwebapp/web_app/append/append.html,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** append.html 15 Aug 2003 07:05:07 -0000 1.3 --- append.html 8 Oct 2004 10:12:56 -0000 1.3.2.1 *************** *** 19,22 **** --- 19,26 ---- {{MESSAGES}} </WebBox> + <!--# open any popup windows from server-side code #--> + <WebBox ID="wbPopupWindows"> + {{POPUP_WINDOWS}} + </WebBox> <!--# include debug info #--> <Include SRC="{{./}}wbDebug.html" /> |
From: Dashamir H. <das...@us...> - 2004-10-08 10:13:07
|
Update of /cvsroot/phpwebapp/web_app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19096 Modified Files: Tag: phpwebapp-1_0 class.WebApp.php Log Message: Added function WebApp::popup_window($name, $url, $features ='nil') Index: class.WebApp.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/class.WebApp.php,v retrieving revision 1.12.2.2 retrieving revision 1.12.2.3 diff -C2 -d -r1.12.2.2 -r1.12.2.3 *** class.WebApp.php 7 Oct 2004 09:58:16 -0000 1.12.2.2 --- class.WebApp.php 8 Oct 2004 10:12:56 -0000 1.12.2.3 *************** *** 605,608 **** --- 605,621 ---- } + /** + * Open a pop-up window (in a new browser). + * Parameters $name, $url, and $features will be used + * in a javascript statement like this: + * $name = window.open($url, $name, $features); + */ + function popup_window($name, $url, $features ='nil') + { + global $webPage; + $webPage->popup_windows[$name]['url'] = $url; + $webPage->popup_windows[$name]['features'] = $features; + } + /** Output a debug message. */ function debug_msg($dbg_msg, $comment ="") |