phpwebapp-commits Mailing List for phpWebApp (Page 10)
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-10-08 10:02:13
|
Update of /cvsroot/phpwebapp/web_app/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16923/doc Modified Files: changes.txt Log Message: Added function WebApp::popup_window($name, $url, $features ='nil') Index: changes.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/changes.txt,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** changes.txt 7 Oct 2004 09:41:17 -0000 1.13 --- changes.txt 8 Oct 2004 10:01:56 -0000 1.14 *************** *** 35,38 **** --- 35,43 ---- like debug information, session variables, etc. ------------------------------------------------------------------- + * Function WebApp::popup_window($name, $url, $features ='nil') + can be used to 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); ------------------------------------------------------------------- ------------------------------------------------------------------- |
From: Dashamir H. <das...@us...> - 2004-10-08 10:02:12
|
Update of /cvsroot/phpwebapp/web_app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16923 Modified Files: 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.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** class.WebApp.php 7 Oct 2004 09:41:17 -0000 1.21 --- class.WebApp.php 8 Oct 2004 10:01:56 -0000 1.22 *************** *** 599,602 **** --- 599,615 ---- } + /** + * 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 ="") |
From: Dashamir H. <das...@us...> - 2004-10-08 10:02:12
|
Update of /cvsroot/phpwebapp/web_app/append In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16923/append Modified Files: append.html Added Files: 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.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** append.html 23 Jul 2004 12:59:36 -0000 1.6 --- append.html 8 Oct 2004 10:01:56 -0000 1.7 *************** *** 20,23 **** --- 20,27 ---- {{MESSAGES}} </webbox> + <!--# open any popup windows from server-side code #--> + <WebBox ID="wbPopupWindows"> + {{POPUP_WINDOWS}} + </WebBox> <!--# include debug info #--> |
From: Dashamir H. <das...@us...> - 2004-10-08 10:02:11
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16923/parser Modified Files: class.WebPage.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.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** class.WebPage.php 22 Jul 2004 16:25:37 -0000 1.13 --- class.WebPage.php 8 Oct 2004 10:01:55 -0000 1.14 *************** *** 45,54 **** 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; --- 45,67 ---- 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; *************** *** 64,67 **** --- 77,81 ---- $this->messages = array(); + $this->popup_windows = array(); $this->dbg_messages = array(); *************** *** 207,210 **** --- 221,242 ---- } + /** + * 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() |
From: Dashamir H. <das...@us...> - 2004-10-07 09:58:29
|
Update of /cvsroot/phpwebapp/web_app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1192 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.1 retrieving revision 1.12.2.2 diff -C2 -d -r1.12.2.1 -r1.12.2.2 *** class.WebApp.php 4 Oct 2004 09:09:31 -0000 1.12.2.1 --- class.WebApp.php 7 Oct 2004 09:58:16 -0000 1.12.2.2 *************** *** 148,151 **** --- 148,192 ---- /** + * Process the given template file and return it as + * a string where the variables have been replaced, etc. + * @see getHtmlPage() + */ + function fill_template($tpl_file, $vars =array()) + { + global $webPage, $tplVars, $parser, $render; + + //save the current webPage and whatever + //is already constructed in it + $old_webPage = $webPage; + $old_tplVars = $tplVars; + $old_parser = $parser; + $old_render = $render; + + //create a new web page in the global variable $webPage + $webPage = new WebPage; + $webPage->tpl_file = $tpl_file; + $tplVars = new VarStack; + $tplVars->addVars($vars); + $parser = new Parser; + $render = new Render; + $render->collect = true; + + //construct it into the $html_page variable + $tpl = $parser->parse_file($tpl_file); + $render->render_tpl($tpl); + $html_page = $render->html_page; + + //return to the previous web page + //and continue with its construction + $webPage = $old_webPage; + $tplVars = $old_tplVars; + $parser = $old_parser; + $render = $old_render; + + //return the constructed page + return $html_page; + } + + /** * This function stops loading the current page * and starts loading and constructing the given page. *************** *** 156,160 **** function reloadPage($tpl_file=UNDEFINED) { ! global $webPage, $tplVars; if ($tpl_file==UNDEFINED) //no parameter given --- 197,201 ---- function reloadPage($tpl_file=UNDEFINED) { ! global $webPage, $tplVars, $parser; if ($tpl_file==UNDEFINED) //no parameter given *************** *** 163,171 **** $tpl_file = $webPage->tpl_file; } ! unset($webPage); ! unset($varStack); ! $webPage = new WebPage; $tplVars = new VarStack; ! $webPage->load($tpl_file); } --- 204,214 ---- $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; } |
From: Dashamir H. <das...@us...> - 2004-10-07 09:58:07
|
Update of /cvsroot/phpwebapp/web_app/webobjects/datebox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1127/webobjects/datebox Modified Files: datebox.html datebox.css Log Message: Index: datebox.html =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/datebox/datebox.html,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** datebox.html 21 Jul 2004 17:04:30 -0000 1.7 --- datebox.html 7 Oct 2004 09:57:52 -0000 1.8 *************** *** 8,13 **** value="{{text_value}}" onchange="{{onchange}}" ! onfocus="blur()" /> ! <input type="image" src="{{./}}show_calendar.png" onclick="show_calendar(this.form.name+'.text_{{obj_name}}', null, null, '{{format}}');" --- 8,14 ---- value="{{text_value}}" onchange="{{onchange}}" ! onfocus="blur()" ! size="10" /> ! <input type="image" class="calendar" src="{{./}}show_calendar.png" onclick="show_calendar(this.form.name+'.text_{{obj_name}}', null, null, '{{format}}');" Index: datebox.css =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/datebox/datebox.css,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** datebox.css 20 Jan 2004 07:33:24 -0000 1.3 --- datebox.css 7 Oct 2004 09:57:52 -0000 1.4 *************** *** 3,11 **** font-family: Arial, Helvetica, sans-serif; font-size: 9pt; - width: 75px; border-style: solid; ! border-top-width: 1px; ! border-right-width: 1px; ! border-bottom-width: 1px; ! border-left-width: 1px } --- 3,13 ---- font-family: Arial, Helvetica, sans-serif; font-size: 9pt; border-style: solid; ! border-width: 1px; ! } ! ! .calendar ! { ! border: none; ! vertical-align: middle; } |
From: Dashamir H. <das...@us...> - 2004-10-07 09:57:51
|
Update of /cvsroot/phpwebapp/web_app/webobjects/datebox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1029/webobjects/datebox Modified Files: Tag: phpwebapp-1_0 datebox.html datebox.css Log Message: Index: datebox.html =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/datebox/datebox.html,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -C2 -d -r1.4.2.1 -r1.4.2.2 *** datebox.html 4 Oct 2004 09:09:32 -0000 1.4.2.1 --- datebox.html 7 Oct 2004 09:57:26 -0000 1.4.2.2 *************** *** 8,13 **** value="{{text_value}}" onchange="{{onchange}}" ! onfocus="blur()" /> ! <input type="image" src="{{./}}show_calendar.png" onclick="show_calendar(this.form.name+'.text_{{obj_name}}', null, null, '{{format}}');" --- 8,14 ---- value="{{text_value}}" onchange="{{onchange}}" ! onfocus="blur()" ! size="10" /> ! <input type="image" class="calendar" src="{{./}}show_calendar.png" onclick="show_calendar(this.form.name+'.text_{{obj_name}}', null, null, '{{format}}');" Index: datebox.css =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/datebox/datebox.css,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -C2 -d -r1.2.2.1 -r1.2.2.2 *** datebox.css 4 Oct 2004 09:09:32 -0000 1.2.2.1 --- datebox.css 7 Oct 2004 09:57:26 -0000 1.2.2.2 *************** *** 3,11 **** font-family: Arial, Helvetica, sans-serif; font-size: 9pt; - width: 75px; border-style: solid; ! border-top-width: 1px; ! border-right-width: 1px; ! border-bottom-width: 1px; ! border-left-width: 1px } --- 3,13 ---- font-family: Arial, Helvetica, sans-serif; font-size: 9pt; border-style: solid; ! border-width: 1px; ! } ! ! .calendar ! { ! border: none; ! vertical-align: middle; } |
From: Dashamir H. <das...@us...> - 2004-10-07 09:42:01
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30181/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.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** class.Parser.php 29 Jul 2004 14:46:54 -0000 1.19 --- class.Parser.php 7 Oct 2004 09:41:43 -0000 1.20 *************** *** 65,73 **** { global $webPage; - $webPage->tpl_file = $tpl_file; - $webPage->tpl_collection = array(); - $webPage->rs_collection = array(); - $webPage->wb_collection = array(); $tpl = new MainTpl($tpl_file); --- 65,69 ---- |
From: Dashamir H. <das...@us...> - 2004-10-07 09:41:33
|
Update of /cvsroot/phpwebapp/web_app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30117 Modified Files: class.WebApp.php Log Message: added the function WebApp::fill_template($tpl_file) Index: class.WebApp.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/class.WebApp.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** class.WebApp.php 22 Jul 2004 16:25:39 -0000 1.20 --- class.WebApp.php 7 Oct 2004 09:41:17 -0000 1.21 *************** *** 104,108 **** global $render; $render->collect = $collect; - //$render = new RenderAnnotated($collect); $render->render_MainTpl($webPage->rootTpl); --- 104,107 ---- *************** *** 148,151 **** --- 147,196 ---- /** + * Process the given template file and return it as + * a string where the variables have been replaced, etc. + * @see getHtmlPage() + */ + function fill_template($tpl_file, $vars =array()) + { + global $webPage, $tplVars, $parser, $render; + + //save the current webPage and whatever + //is already constructed in it + $old_webPage = $webPage; + $old_tplVars = $tplVars; + $old_parser = $parser; + $old_render = $render; + + //create a new web page in the global variable $webPage + $webPage = new WebPage; + $webPage->tpl_file = $tpl_file; + $tplVars = new VarStack; + $tplVars->addVars($vars); + $parser = new Parser; + $parser->xml_prolog = '<?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"> + '; + $render = new Render; + $render->collect = true; + + //construct it into the $html_page variable + $tpl = $parser->parse_file($tpl_file); + $render->render_tpl($tpl); + $html_page = $render->html_page; + + //return to the previous web page + //and continue with its construction + $webPage = $old_webPage; + $tplVars = $old_tplVars; + $parser = $old_parser; + $render = $old_render; + + //return the constructed page + return $html_page; + } + + /** * This function stops loading the current page * and starts loading and constructing the given page. |
From: Dashamir H. <das...@us...> - 2004-10-07 09:41:33
|
Update of /cvsroot/phpwebapp/web_app/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30117/doc Modified Files: changes.txt Log Message: added the function WebApp::fill_template($tpl_file) Index: changes.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/changes.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** changes.txt 20 Sep 2004 13:28:06 -0000 1.12 --- changes.txt 7 Oct 2004 09:41:17 -0000 1.13 *************** *** 21,24 **** --- 21,37 ---- without being afraid that init() will override them. ------------------------------------------------------------------- + * Added function: + WebApp::fill_template($tpl_file, $vars) + This function processes the given template, replacing any variables, + including any other templates, etc. and returns the resulting + string. The parameter $vars(optional) is an array of variables + (associative array), which can be used to replace the template vars. + This function is different from: + WebApp::getHtmlPage($tpl_file) and from + WebApp::constructHtmlPage($tpl_file) + because they assume that the given template file is a main template + (which has a prolog <?xml ...?> and an <html> root element), + and also they append some extra things to the consructed page, + like debug information, session variables, etc. ------------------------------------------------------------------- ------------------------------------------------------------------- |
Update of /cvsroot/phpwebapp/web_app/webobjects/dbTable In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5614/webobjects/dbTable Modified Files: Tag: phpwebapp-1_0 dbTable.html dbTable.js dbTable.php editRecord.css editRecord.html editRecord.js editRecord.php Log Message: All the changes that are done after release 1.0 (but without the XML parser and XHML template requirement) are placed in the branch phpwebapp-1_0, so that old applications can get them, without having to modify their templates. Index: dbTable.html =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/dbTable/dbTable.html,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** dbTable.html 22 Aug 2003 06:47:19 -0000 1.4 --- dbTable.html 4 Oct 2004 09:09:32 -0000 1.4.2.1 *************** *** 8,25 **** <Parameter name="editable" default="false" /> - <br> <table bgcolor="#aaaaaa" border="0" cellspacing="1" cellpadding="2"> <tr> <If condition="{{editable}}"> <th bgcolor="#eeeeee"> ! <a href="javascript: dbTable_rmAll('{{obj_id}}')">X</a> </th> <th bgcolor="#eeeeee"> ! <a href="javascript: dbTable_add('{{obj_id}}')">A</a> </th> </If> <If condition="{{selectable}}"> <th bgcolor="#eeeeee"> ! <a href="javascript: dbTable_select('{{obj_id}}', '{{UNDEFINED}}')"><img border="0" src="{{GRAPHICS}}blue_tri.png"></a> </th> </If> --- 8,26 ---- <Parameter name="editable" default="false" /> <table bgcolor="#aaaaaa" border="0" cellspacing="1" cellpadding="2"> <tr> <If condition="{{editable}}"> <th bgcolor="#eeeeee"> ! <a href="javascript: dbTable_rmAll('{{obj_id}}')">X</a> </th> <th bgcolor="#eeeeee"> ! <a href="javascript: dbTable_add('{{obj_id}}')">A</a> </th> </If> <If condition="{{selectable}}"> <th bgcolor="#eeeeee"> ! <a href="javascript: dbTable_select('{{obj_id}}', '{{UNDEFINED}}')"> ! <img border="0" src="{{./}}select.png"> ! </a> </th> </If> *************** *** 33,52 **** <tr> <If condition="{{editable}}"> ! <td bgcolor="{{bgcolor}}"> ! <a href="javascript: dbTable_rm('{{obj_id}}', '{{rec_id}}')">X</a> ! </td> ! <td bgcolor="{{bgcolor}}"> ! <a href="javascript: dbTable_edit('{{obj_id}}', '{{rec_id}}')">E</a> ! </td> </If> <If condition="{{selectable}}"> ! <td bgcolor="{{bgcolor}}"> ! <a href="javascript: dbTable_select('{{obj_id}}', '{{rec_id}}')"> ! <img border="0" src="{{./}}select.png"> ! </a> ! </td> </If> <Repeat rs="{{table}}->fields"> ! <td bgcolor="{{bgcolor}}"> {{{{fld_name}}}} </td> </Repeat> </tr> --- 34,53 ---- <tr> <If condition="{{editable}}"> ! <td bgcolor="{{bgcolor}}"> ! <a href="javascript: dbTable_rm('{{obj_id}}', '{{rec_id}}')">X</a> ! </td> ! <td bgcolor="{{bgcolor}}"> ! <a href="javascript: dbTable_edit('{{obj_id}}', '{{rec_id}}')">E</a> ! </td> </If> <If condition="{{selectable}}"> ! <td bgcolor="{{bgcolor}}"> ! <a href="javascript: dbTable_select('{{obj_id}}', '{{rec_id}}')"> ! <img border="0" src="{{./}}select.png"> ! </a> ! </td> </If> <Repeat rs="{{table}}->fields"> ! <td bgcolor="{{bgcolor}}"> {{{{fld_name}}}} </td> </Repeat> </tr> Index: dbTable.js =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/dbTable/dbTable.js,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** dbTable.js 25 Aug 2003 13:18:29 -0000 1.3 --- dbTable.js 4 Oct 2004 09:09:32 -0000 1.3.2.1 *************** *** 1,21 **** //-*- mode: C; -*-//tells emacs to use mode C for this file /* ! 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,21 ---- //-*- mode: C; -*-//tells emacs to use mode C for this file /* ! 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 */ Index: dbTable.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/dbTable/dbTable.php,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** dbTable.php 25 Aug 2003 13:18:29 -0000 1.4 --- dbTable.php 4 Oct 2004 09:09:32 -0000 1.4.2.1 *************** *** 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,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 */ Index: editRecord.css =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/dbTable/editRecord.css,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -C2 -d -r1.1.1.1 -r1.1.1.1.2.1 *** editRecord.css 21 Feb 2003 08:17:06 -0000 1.1.1.1 --- editRecord.css 4 Oct 2004 09:09:33 -0000 1.1.1.1.2.1 *************** *** 4,8 **** font-size: 9pt; width: 100px; - height: 15px; border-style: solid; border-top-width: 1px; --- 4,7 ---- Index: editRecord.html =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/dbTable/editRecord.html,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** editRecord.html 22 Aug 2003 06:47:19 -0000 1.3 --- editRecord.html 4 Oct 2004 09:09:33 -0000 1.3.2.1 *************** *** 5,14 **** <Repeat rs="{{table}}->fields"> <tr> ! <td bgcolor="#eeeeee" align="right"> ! {{fld_name}}: ! </td> <td> ! <input type="text" class="editRecord_field" ! name="{{fld_name}}" value="{{{{fld_name}}}}"> </td> <tr> --- 5,12 ---- <Repeat rs="{{table}}->fields"> <tr> ! <td bgcolor="#eeeeee" align="right">{{fld_name}}:</td> <td> ! <input type="text" class="editRecord_field" ! name="{{fld_name}}" value="{{{{fld_name}}}}"> </td> <tr> Index: editRecord.js =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/dbTable/editRecord.js,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** editRecord.js 25 Aug 2003 13:18:29 -0000 1.3 --- editRecord.js 4 Oct 2004 09:09:33 -0000 1.3.2.1 *************** *** 1,21 **** //-*- mode: C; -*-//tells emacs to use mode C for this file /* ! 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,21 ---- //-*- mode: C; -*-//tells emacs to use mode C for this file /* ! 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 */ Index: editRecord.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/dbTable/editRecord.php,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** editRecord.php 25 Aug 2003 13:18:29 -0000 1.4 --- editRecord.php 4 Oct 2004 09:09:33 -0000 1.4.2.1 *************** *** 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,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 */ *************** *** 131,136 **** $rec_id = str_replace("\\'", "'", $rec_id); $query = "SELECT $fields FROM $table WHERE $rec_id"; ! $rs = new Recordset; ! $rs->Open($query); WebApp::addVars($rs->Fields()); } --- 131,136 ---- $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()); } |
Update of /cvsroot/phpwebapp/web_app/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5614/database Modified Files: Tag: phpwebapp-1_0 class.EditableRS.php class.PagedRS.php class.Recordset.php class.StaticRS.php class.TableRS.php package.DB.php Log Message: All the changes that are done after release 1.0 (but without the XML parser and XHML template requirement) are placed in the branch phpwebapp-1_0, so that old applications can get them, without having to modify their templates. Index: class.EditableRS.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/database/class.EditableRS.php,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** class.EditableRS.php 25 Aug 2003 13:18:32 -0000 1.6 --- class.EditableRS.php 4 Oct 2004 09:09:32 -0000 1.6.2.1 *************** *** 226,229 **** --- 226,231 ---- function addCol($fld_name, $default_value =UNDEFINED) { + if (isset($this->content[0][$fld_name])) return; + for ($i=0; $i < $this->count; $i++) { *************** *** 231,234 **** --- 233,256 ---- } } + + /** + * Change the name of a column. + */ + function renameCol($fld_name, $new_fld_name) + { + if (isset($this->content[0][$new_fld_name])) + { + $msg = "EditableRS::renameCol(): there is already" + . " a field named '$new_fld_name'.\n"; + print WebApp::error_msg($msg); + return; + } + + for ($i=0; $i < $this->count; $i++) + { + $this->content[$i][$new_fld_name] = $this->content[$i][$fld_name]; + unset($this->content[$i][$fld_name]); + } + } } ?> \ No newline at end of file Index: class.PagedRS.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/database/class.PagedRS.php,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** class.PagedRS.php 25 Aug 2003 13:18:32 -0000 1.6 --- class.PagedRS.php 4 Oct 2004 09:09:32 -0000 1.6.2.1 *************** *** 21,25 **** ! include_once DB_PATH."class.Recordset.php"; /** --- 21,25 ---- ! include_once DB_PATH."class.EditableRS.php"; /** *************** *** 31,35 **** * @package database */ ! class PagedRS extends Recordset { /** --- 31,35 ---- * @package database */ ! class PagedRS extends EditableRS { /** *************** *** 48,52 **** function PagedRS($id, $query =UNDEFINED, $rp =UNDEFINED, $conn =UNDEFINED) { ! $this->Recordset($id, $query, $conn); $this->type = "PagedRS"; $this->recs_per_page = ($rp==UNDEFINED ? 0 : $rp); --- 48,52 ---- function PagedRS($id, $query =UNDEFINED, $rp =UNDEFINED, $conn =UNDEFINED) { ! $this->EditableRS($id, $query, $conn); $this->type = "PagedRS"; $this->recs_per_page = ($rp==UNDEFINED ? 0 : $rp); *************** *** 70,80 **** /** Executes the query and puts the result into $this->content. */ ! function Open($cp ="default", $rp ="default", $query ="default") { ! global $cnn; ! ! if ($query<>"default") $this->query = $query; ! if ($rp<>"default") $this->recs_per_page = $rp; ! if ($cp=="default") { //default is to get it from SVars --- 70,82 ---- /** Executes the query and puts the result into $this->content. */ ! function Open($cp =UNDEFINED, $conn =UNDEFINED) { ! if ($this->opened) ! { ! $this->MoveFirst(); ! return; //don't open it a second time ! } ! ! if ($cp==UNDEFINED) { //default is to get it from SVars *************** *** 87,91 **** $this->nr_of_recs = $this->get_nr_of_recs(); $nr_of_pages = ceil($this->nr_of_recs / $this->recs_per_page); ! if ($this->current_page>$nr_of_pages) $this->current_page=$nr_of_pages; //modify and execute the query --- 89,93 ---- $this->nr_of_recs = $this->get_nr_of_recs(); $nr_of_pages = ceil($this->nr_of_recs / $this->recs_per_page); ! if ($this->current_page > $nr_of_pages) $this->current_page = $nr_of_pages; //modify and execute the query *************** *** 93,101 **** $query = WebApp::replaceVars($this->query); $query .= " LIMIT $first_rec_idx, ".$this->recs_per_page; ! $result = $this->cnn->execQuery($query); $this->content = $result; $this->count = count($result); $this->pos = 0; } --- 95,111 ---- $query = WebApp::replaceVars($this->query); $query .= " LIMIT $first_rec_idx, ".$this->recs_per_page; ! if ($conn==UNDEFINED) ! { ! $result = $this->cnn->execQuery($query, $this->ID); ! } ! else ! { ! $result = $conn->execQuery($query, $this->ID); ! } $this->content = $result; $this->count = count($result); $this->pos = 0; + $this->opened = true; } *************** *** 162,167 **** $query = WebApp::replaceVars($this->query); $query = $this->get_count_query($query); ! $rs = new Recordset; ! $rs->Open($query); $nrRecs = $rs->Field("COUNT_OF_RECS"); --- 172,177 ---- $query = WebApp::replaceVars($this->query); $query = $this->get_count_query($query); ! $rs = new Recordset($this->ID."_countQuery", $query); ! $rs->Open(); $nrRecs = $rs->Field("COUNT_OF_RECS"); Index: class.Recordset.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/database/class.Recordset.php,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** class.Recordset.php 25 Aug 2003 13:18:32 -0000 1.7 --- class.Recordset.php 4 Oct 2004 09:09:32 -0000 1.7.2.1 *************** *** 81,85 **** } ! /** Returns the value of the field given as parameter. */ function Field($fld_name) { --- 81,88 ---- } ! /** ! * Returns the value of the given field. ! * Returns UNDEFINED if there is no such field, or EOF or BOF. ! */ function Field($fld_name) { *************** *** 103,107 **** $this->ID = $id; $this->query = $query; ! $this->cnn = ($conn==UNDEFINED ? $cnn : $conn); $this->content = array(); $this->count = 0; --- 106,117 ---- $this->ID = $id; $this->query = $query; ! if ($conn==UNDEFINED) ! { ! $this->cnn = &$cnn; ! } ! else ! { ! $this->cnn = $conn; ! } $this->content = array(); $this->count = 0; *************** *** 110,117 **** } ! /** Executes the query and puts the result into $this->content. */ ! function Open($q =UNDEFINED) { - if ($q<>UNDEFINED) $this->query = $q; $query = $this->query; if ($query==UNDEFINED) return; --- 120,129 ---- } ! /** ! * Executes the query and puts the result into $this->content. ! * If $conn is given, it is used instead of its own connection. ! */ ! function Open($conn =UNDEFINED) { $query = $this->query; if ($query==UNDEFINED) return; *************** *** 120,124 **** $query = WebApp::replaceVars($query); ! $result = $this->cnn->execQuery($query, $this->ID); if (is_array($result)) { --- 132,144 ---- $query = WebApp::replaceVars($query); ! if ($conn==UNDEFINED) ! { ! $result = $this->cnn->execQuery($query, $this->ID); ! } ! else ! { ! $result = $conn->execQuery($query, $this->ID); ! } ! if (is_array($result)) { *************** *** 126,129 **** --- 146,150 ---- $this->count = count($result); $this->pos = 0; + return; } else Index: class.StaticRS.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/database/class.StaticRS.php,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** class.StaticRS.php 25 Aug 2003 13:18:32 -0000 1.5 --- class.StaticRS.php 4 Oct 2004 09:09:32 -0000 1.5.2.1 *************** *** 44,48 **** } ! function Open() { if ($this->opened) --- 44,48 ---- } ! function Open($conn =UNDEFINED) { if ($this->opened) *************** *** 51,55 **** return; //don't open it a second time } ! if ($this->query<>"") Recordset::Open(); $this->opened = true; } --- 51,55 ---- return; //don't open it a second time } ! if ($this->query<>"") Recordset::Open($conn); $this->opened = true; } Index: class.TableRS.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/database/class.TableRS.php,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** class.TableRS.php 25 Aug 2003 13:18:32 -0000 1.5 --- class.TableRS.php 4 Oct 2004 09:09:32 -0000 1.5.2.1 *************** *** 21,25 **** ! include_once DB_PATH."class.Recordset.php"; /** --- 21,25 ---- ! include_once DB_PATH."class.EditableRS.php"; /** Index: package.DB.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/database/package.DB.php,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** package.DB.php 25 Aug 2003 13:18:32 -0000 1.5 --- package.DB.php 4 Oct 2004 09:09:32 -0000 1.5.2.1 *************** *** 40,50 **** break; } - include_once DB_PATH."class.$CnnType.php"; - - include_once DB_PATH."class.Recordset.php"; - include_once DB_PATH."class.PagedRS.php"; - include_once DB_PATH."class.StaticRS.php"; - include_once DB_PATH."class.TableRS.php"; /** --- 40,44 ---- *************** *** 55,62 **** * can create and use other connections as well, or override this one. */ $cnn = new $CnnType; } include_once DB_PATH."class.EditableRS.php"; ! ! ?> \ No newline at end of file --- 49,60 ---- * can create and use other connections as well, or override this one. */ + include_once CONFIG_PATH."const.DB.php"; $cnn = new $CnnType; } + include_once DB_PATH."class.Recordset.php"; + include_once DB_PATH."class.StaticRS.php"; include_once DB_PATH."class.EditableRS.php"; ! include_once DB_PATH."class.PagedRS.php"; ! include_once DB_PATH."class.TableRS.php"; ! ?> |
From: Dashamir H. <das...@us...> - 2004-10-04 09:09:47
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5614/parser Modified Files: Tag: phpwebapp-1_0 class.Parser.php class.Render.php class.WebClassTpl.php class.WebObject.php class.WebObjectTpl.php Log Message: All the changes that are done after release 1.0 (but without the XML parser and XHML template requirement) are placed in the branch phpwebapp-1_0, so that old applications can get them, without having to modify their templates. Index: class.Parser.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Parser.php,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** class.Parser.php 25 Aug 2003 13:18:32 -0000 1.6 --- class.Parser.php 4 Oct 2004 09:09:32 -0000 1.6.2.1 *************** *** 662,665 **** --- 662,667 ---- $tpl->params = $webClassTpl->params; $tpl->construct_WebObject($full_obj_name); + ereg("(^ *)", $line, $regs); + $tpl->indentation = $regs[1]; //get the values of the parameter attributes *************** *** 763,767 **** global $webPage, $session; ! //get the attributes 'ID' and 'recs_per_page' $id = Parser::get_attr_value($line, "ID"); --- 765,769 ---- global $webPage, $session; ! //get the attribute 'ID' $id = Parser::get_attr_value($line, "ID"); Index: class.Render.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Render.php,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** class.Render.php 25 Aug 2003 13:18:32 -0000 1.6 --- class.Render.php 4 Oct 2004 09:09:32 -0000 1.6.2.1 *************** *** 223,228 **** --- 223,235 ---- $wobj_tpl->onRender(); + //increase indentation + $prev_indent = $this->indent; + $this->indent .= $wobj_tpl->indentation; + $this->render_tpl($wobj_tpl); //render it to HTML + //revert to previous indentation + $this->indent = $prev_indent; + $tplVars->popScope(); } Index: class.WebClassTpl.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebClassTpl.php,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** class.WebClassTpl.php 25 Aug 2003 13:18:32 -0000 1.7 --- class.WebClassTpl.php 4 Oct 2004 09:09:32 -0000 1.7.2.1 *************** *** 76,81 **** /** ! * Looks for the PHP file in the same folder as WebClass ! * (with the same name as the webclass' ID) and includes it * if it exists; if not, define a dummy class for this webclass. */ --- 76,81 ---- /** ! * Look for the PHP file in the same folder as WebClass ! * (with the same name as the webclass' ID) and include it * if it exists; if not, define a dummy class for this webclass. */ Index: class.WebObject.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebObject.php,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** class.WebObject.php 25 Aug 2003 13:18:32 -0000 1.6 --- class.WebObject.php 4 Oct 2004 09:09:32 -0000 1.6.2.1 *************** *** 95,99 **** { $sVars = $this->getSVars(); ! if (sizeof($sVars)==0) { //this is the first time that this webobj is --- 95,100 ---- { $sVars = $this->getSVars(); ! if (!isset($sVars['initialized'])) ! //if (sizeof($sVars)==0) { //this is the first time that this webobj is *************** *** 165,169 **** break; default: ! print WebApp::warning_msg("IWebObject::getSVars(): unreckognized \$type '$type'."); case UNDEFINED: $arr_vars = array_merge($session->Vars, $session->dbVars); --- 166,170 ---- break; default: ! print WebApp::warning_msg("WebObject::getSVars(): unreckognized \$type '$type'."); case UNDEFINED: $arr_vars = array_merge($session->Vars, $session->dbVars); Index: class.WebObjectTpl.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebObjectTpl.php,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** class.WebObjectTpl.php 25 Aug 2003 13:18:32 -0000 1.6 --- class.WebObjectTpl.php 4 Oct 2004 09:09:32 -0000 1.6.2.1 *************** *** 41,44 **** --- 41,46 ---- var $obj_count; + /** Helps to render the template with a good indentation. */ + var $indentation; /** Constructor */ |
From: Dashamir H. <das...@us...> - 2004-10-04 09:09:46
|
Update of /cvsroot/phpwebapp/web_app/webobjects/datebox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5614/webobjects/datebox Modified Files: Tag: phpwebapp-1_0 datebox.css datebox.html Log Message: All the changes that are done after release 1.0 (but without the XML parser and XHML template requirement) are placed in the branch phpwebapp-1_0, so that old applications can get them, without having to modify their templates. Index: datebox.css =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/datebox/datebox.css,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** datebox.css 16 Jul 2003 09:27:59 -0000 1.2 --- datebox.css 4 Oct 2004 09:09:32 -0000 1.2.2.1 *************** *** 4,8 **** font-size: 9pt; width: 75px; - height: 15px; border-style: solid; border-top-width: 1px; --- 4,7 ---- Index: datebox.html =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/datebox/datebox.html,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** datebox.html 22 Aug 2003 06:47:19 -0000 1.4 --- datebox.html 4 Oct 2004 09:09:32 -0000 1.4.2.1 *************** *** 10,14 **** onfocus="blur()" /> <input type="image" ! src="{{./}}show_calendar.png" width="12" height="12" onclick="show_calendar(this.form.name+'.text_{{obj_name}}', null, null, '{{format}}');" onmouseover="window.status='Calendar'; return true;" --- 10,14 ---- onfocus="blur()" /> <input type="image" ! src="{{./}}show_calendar.png" onclick="show_calendar(this.form.name+'.text_{{obj_name}}', null, null, '{{format}}');" onmouseover="window.status='Calendar'; return true;" |
From: Dashamir H. <das...@us...> - 2004-10-04 09:09:46
|
Update of /cvsroot/phpwebapp/web_app/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5614/doc Modified Files: Tag: phpwebapp-1_0 ToDo.txt changes_2.txt Log Message: All the changes that are done after release 1.0 (but without the XML parser and XHML template requirement) are placed in the branch phpwebapp-1_0, so that old applications can get them, without having to modify their templates. Index: ToDo.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/ToDo.txt,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** ToDo.txt 4 Aug 2003 12:06:13 -0000 1.4 --- ToDo.txt 4 Oct 2004 09:09:32 -0000 1.4.2.1 *************** *** 359,362 **** --- 359,366 ---- {{class_name}} to {{Class}} + - {{CurrentRecNr}} to {{RecNr}} + {{CurrentRowNr}} to {{RowNr}} + etc. + - Rename path constants from 'XYZ_PATH' to 'XYZ/'. (!?) *************** *** 370,382 **** like this. (Why is it better? Does it have any disadvantages?) ------------------------------------------------------------- ! * Improve the structure of the framework and the application so ! that two independent applications can comunicate easily with ! each other. E.g. one of the applications can include the other ! (like a webbox that can include another webbox) and both of them ! work independently in the same window. One of the applications ! can check or modify the state of the other application, can ! modify its behaviour, can use its resources (images, templates, ! etc.), etc. Such a capability would be useful for applications like "browse", --- 374,394 ---- like this. (Why is it better? Does it have any disadvantages?) + + - Find another name (terminology) for free events. E.g. they may be + called 'independent events' (because the handler is not a member + function on any webbox), 'global events' (because they are handled + globally and before any page construction has started), 'switches' + or 'conditionals' (because they usually switch on some conditions + and decide which page to construct), etc. + ------------------------------------------------------------- ! ! * Improve the structure of the framework and the application so that ! two independent applications can comunicate easily with each ! other. E.g. one of the applications can include the other (like a ! webbox that can include another webbox) and both of them work ! independently in the same window. One of the applications can check ! or modify the state of the other application, can modify its ! behaviour, can use its resources (images, templates, etc.), etc. Such a capability would be useful for applications like "browse", Index: changes_2.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/changes_2.txt,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** changes_2.txt 26 Aug 2003 07:33:28 -0000 1.2 --- changes_2.txt 4 Oct 2004 09:09:32 -0000 1.2.2.1 *************** *** 1,3 **** --- 1,39 ---- + + --- Improved documentation: + + * Added some comments that help phpDocumentor to divide the classes + and files into packages and subpackages (@package and @subpackage). + + * Improved a little bit some comments of the code. + + * Improved a little bit the pages of the UML model. + + * Generated code documentation with phpDocumentor and doxygen. + + * Fixed some webapp_styles and improved its look. + + * Updated sample applications 'app1' and 'app2' and the tutorials 1 and 2. + + * Added sample application 'empty-sample'. + + * Added sample application 'app3' and tutorial 3 (about webbox-es). + + + --- Preparing it for being a GNU package: + + * .gif images replaced by .png images + + * Added copying permission statements of GNU GPL at the top of most + of the files. + + * Converted CRLF to LF for all the files. + + * Added COPYING to 'app1', 'app2', 'app3', 'documentation', 'empty-sample' + as well. + + + --- Small changes and fixes: + * APP_URL is found automatically in the 'webapp.php' of the application, so there is no need to modify it in 'config/const.Paths.php'. *************** *** 8,16 **** APP_PATH."../web_app/" now we can use UP_PATH."web_app/". - * .gif images are replaced by .png images - - * Added some comments that help phpDocumentor to divide the classes - and files into packages and subpackages. - * The folder 'eventhandler/' was removed. The file: --- 44,47 ---- *************** *** 21,27 **** The file 'global.php' is added, which is included for each page. - * Fixed webapp_styles. ! * Added copying permission statements of GNU GPL. ! * Converted CRLF to LF for all the files. --- 52,125 ---- The file 'global.php' is added, which is included for each page. ! --------------------------------------------------------------- ! * In order to use DB features of the framework only in a module ! of the application (when the rest of the application doesn't ! need them and USES_DB is false), add at the top of the module ! lines like these: ! ! <?php ! include_once DB_PATH."class.MySQLCnn.php"; ! global $cnn; ! $cnn = new MySQLCnn("db_host", "user", "passwd", "db_name"); ! ! class comments extends WebObject ! { ! } ! ?> ! ! When the application in general uses DB, however you want ! to use another default connection for a certain module, ! then again you can add lines like in the above example, ! but without the 'include "class.MySQLCnn.php";' line. ! The lines: ! global $cnn; ! $cnn = new MySQLCnn("localhost", "user", "passwd", "db_name"); ! change the default connection for the rest of the page. ! ! In case that you want to use another connection just for a certain ! query, whithout changing the default connection in general, then ! you can use something like this: ! ! $new_conn = new MySQLCnn("localhost", "root", "", "hy"); ! WebApp::execDBCmd("add_comment", $params, $new_conn); ! $rs = WebApp::openRS("comment_list", $params, $new_conn); ! WebApp::execQuery($query, $new_conn); ! //in case that there are no parameters: ! WebApp::execDBCmd("add_comment", array(), $new_conn); ! WebApp::execDBCmd("add_comment", UNDEFINED, $new_conn); ! ! --------------------------------------------------------------- ! * class PagedRS extends EditableRS (it was: extends Recordset) ! ! 'PagedRS' does not need to be dynamic, once it is opened, ! it doesn't need to be opened a second time. On the other hand, ! sometimes it is useful to modify its fields before it rendered ! on the page. ! ! ToDo: Merge class StaticRS with Recordset (make Recordset static ! by default) and add another class called DynamicRS to be used for ! dynamic recordsets. ! --------------------------------------------------------------- ! * Free events are handled by the file 'on.eventName.php' which is ! placed in the same folder as 'sourcePage'. This file now contains ! global code (not the function on_eventName()). ! ! ToDo: Find another name (terminology) for free events. E.g. they ! may be called 'independent events' (because the handler is not a ! member function on any webbox), 'global events' (because they are ! handled globally and before any page construction has started), ! 'switches' or 'conditionals' (because they usually switch on some ! conditions and decide which page to construct), etc. ! --------------------------------------------------------------- ! --------------------------------------------------------------- ! --------------------------------------------------------------- ! --------------------------------------------------------------- ! --------------------------------------------------------------- ! --------------------------------------------------------------- ! --------------------------------------------------------------- ! --------------------------------------------------------------- ! --------------------------------------------------------------- ! --------------------------------------------------------------- ! --------------------------------------------------------------- |
From: Dashamir H. <das...@us...> - 2004-10-04 09:09:46
|
Update of /cvsroot/phpwebapp/web_app/webobjects/listbox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5614/webobjects/listbox Modified Files: Tag: phpwebapp-1_0 listbox.html listbox.txt Log Message: All the changes that are done after release 1.0 (but without the XML parser and XHML template requirement) are placed in the branch phpwebapp-1_0, so that old applications can get them, without having to modify their templates. Index: listbox.html =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/listbox/listbox.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -C2 -d -r1.1.1.1 -r1.1.1.1.2.1 *** listbox.html 21 Feb 2003 08:17:06 -0000 1.1.1.1 --- listbox.html 4 Oct 2004 09:09:33 -0000 1.1.1.1.2.1 *************** *** 1,16 **** <WebClass ID="listbox"> ! <Parameter name="rs" default="{{obj_id}}" /> ! <Parameter name="onchange" default="return false;" /> ! <Parameter name="width" default="" /> - <select name="{{obj_name}}" onchange="{{onchange}}"> - <Repeat rs="{{rs}}"> - <Var name="selected">('{{id}}'=='{{{{obj_name}}}}' ? "selected" : "")</Var> - <option value="{{id}}" {{selected}}>{{label}}</option> - </Repeat> - <If condition="'{{width}}'<>''"> - <Var name="selected">('{{{{obj_name}}}}'=='' ? "selected" : "")</Var> - <option value="" {{selected}}>{{width}}</option> - </If> - </select> </WebClass> --- 1,18 ---- <WebClass ID="listbox"> ! <Parameter name="rs" default="{{obj_id}}" /> ! <Parameter name="value" default="{{{{obj_name}}}}" /> ! <Parameter name="onchange" default="return false;" /> ! <Parameter name="width" default="" /> ! ! <select name="{{obj_name}}" onchange="{{onchange}}"> ! <Repeat rs="{{rs}}"> ! <Var name="selected">('{{id}}'=='{{value}}' ? "selected" : "")</Var> ! <option value="{{id}}" {{selected}}>{{label}}</option> ! </Repeat> ! <If condition="'{{width}}'<>''"> ! <Var name="selected">('{{value}}'=='' ? "selected" : "")</Var> ! <option value="" {{selected}}>{{width}}</option> ! </If> ! </select> </WebClass> Index: listbox.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/listbox/listbox.txt,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** listbox.txt 16 Jul 2003 09:27:59 -0000 1.3 --- listbox.txt 4 Oct 2004 09:09:33 -0000 1.3.2.1 *************** *** 18,25 **** --- 18,35 ---- <Include SRC="{{LISTBOX_PATH}}listbox.html" /> <WebObject Class="listbox" Name="country" + value = "selected_value" rs = "rs_id" onchange = "alert(this.options[this.selectedIndex].text)" width = "---------------" /> + The attribute "value" is optional. It has the value of the selected item + (the item with id equal to this value is the one that will be selected). + It can be a variable, like this: value="{{var_name}}", in this case the + value of this variable is used. If it is not given, then its default + value is '{{{{obj_name}}}}' (in the example above, it would be '{{country}}', + since the name of the object is 'country'; this means that the value of + the variable {{country}} will determine which item will be displayed as + selected). + The attribute "rs" is optional. Its default value (if not specified) is {{obj_id}} (in the example above, it would be 'listbox::country'). |
From: Dashamir H. <das...@us...> - 2004-10-04 09:09:46
|
Update of /cvsroot/phpwebapp/web_app/session In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5614/session Modified Files: Tag: phpwebapp-1_0 class.Request.php class.Session.php Log Message: All the changes that are done after release 1.0 (but without the XML parser and XHML template requirement) are placed in the branch phpwebapp-1_0, so that old applications can get them, without having to modify their templates. Index: class.Request.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/session/class.Request.php,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** class.Request.php 25 Aug 2003 13:18:31 -0000 1.5 --- class.Request.php 4 Oct 2004 09:09:32 -0000 1.5.2.1 *************** *** 33,37 **** var $phpVars; ! /** If true, then this page is the first in the session. */ var $firstTime; --- 33,37 ---- var $phpVars; ! /** Is true only for the first page in the session. */ var $firstTime; Index: class.Session.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/session/class.Session.php,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** class.Session.php 25 Aug 2003 13:18:31 -0000 1.6 --- class.Session.php 4 Oct 2004 09:09:32 -0000 1.6.2.1 *************** *** 41,46 **** $this->dbVars = array(); ! $sessVars = $request->sessionVars; ! if ($sessVars==UNDEFINED ) { //new session --- 41,45 ---- $this->dbVars = array(); ! if ($request->firstTime) { //new session *************** *** 49,53 **** else { ! $this->getVars($sessVars); $this->getDBVars(); } --- 48,52 ---- else { ! $this->getVars($request->sessionVars); $this->getDBVars(); } *************** *** 211,216 **** 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])) --- 210,215 ---- if (isset($this->dbVars[$var_name])) { ! //this variable is already initialized ! return; } if (isset($this->Vars[$var_name])) *************** *** 230,235 **** 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; --- 229,234 ---- if (isset($this->Vars[$var_name])) { ! //this variable is already initialized ! return; } $this->Vars[$var_name] = $var_value; |
From: Dashamir H. <das...@us...> - 2004-10-04 09:09:43
|
Update of /cvsroot/phpwebapp/web_app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5614 Modified Files: Tag: phpwebapp-1_0 class.WebApp.php const.Paths.php Log Message: All the changes that are done after release 1.0 (but without the XML parser and XHML template requirement) are placed in the branch phpwebapp-1_0, so that old applications can get them, without having to modify their templates. Index: class.WebApp.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/class.WebApp.php,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** class.WebApp.php 22 Aug 2003 15:54:43 -0000 1.12 --- class.WebApp.php 4 Oct 2004 09:09:31 -0000 1.12.2.1 *************** *** 41,48 **** /** * A free event has target 'none', doesn't have a target webobject, ! * so no webobject can handle it. Instead, it is handled by the ! * function on_eventName($event), that is in the file 'on.eventName.php', ! * which is placed in the same folder as the target page or the source ! * page of the event. */ function callFreeEvent() --- 41,47 ---- /** * A free event has target 'none', doesn't have a target webobject, ! * so no webobject can handle it. Instead, it is handled by the ! * file 'on.eventName.php', which is placed in the same folder as the ! * source page of the event. */ function callFreeEvent() *************** *** 50,78 **** global $event; $file_name = "on.".$event->name.".php"; - $fun_name = "on_".$event->name; - - //look for the event handler in the path of targetPage - $path = TPL_PATH.dirname($event->targetPage); $fname = $path."/".$file_name; if (file_exists($fname)) { include_once $fname; - $fun_name($event); - return; } ! ! //look for the event handler in the path of sourcePage ! $path = TPL_PATH.dirname($event->sourcePage); ! $fname = $path."/".$file_name; ! if (file_exists($fname)) { ! include_once $fname; ! $fun_name($event); ! return; } - - //no event handler found - print WebApp::error_msg("event handler '$file_name' not found."); } --- 49,65 ---- global $event; + //look for the event handler in the path of sourcePage + $path = TPL_PATH.dirname($event->sourcePage); $file_name = "on.".$event->name.".php"; $fname = $path."/".$file_name; if (file_exists($fname)) { include_once $fname; } ! else { ! $err_msg = "WebApp::callFreeEvent(): File '$fname' not found."; ! print WebApp::error_msg($err_msg); } } *************** *** 310,314 **** eval("global $var_names;"); } ! eval("\$webApp_value = $expr;"); return $webApp_value; } --- 297,309 ---- eval("global $var_names;"); } ! ! @eval("\$webApp_value = $expr;"); ! $errormsg = $php_errormsg; ! if ($errormsg<>'') ! { ! $err_msg = "Evaluating expression: '\$value = $expr;' $errormsg"; ! print WebApp::error_msg($err_msg); ! } ! return $webApp_value; } *************** *** 484,489 **** * @see execQuery(), openRS() */ ! function execDBCmd($cmd_id, $params =array()) { global $webPage, $tplVars; --- 479,485 ---- * @see execQuery(), openRS() */ ! function execDBCmd($cmd_id, $params =UNDEFINED, $conn =UNDEFINED) { + if ($params==UNDEFINED) $params = array(); global $webPage, $tplVars; *************** *** 496,500 **** return false; } ! $result = $rs->Open(); $tplVars->popScope(); --- 492,496 ---- return false; } ! $result = $rs->Open($conn); $tplVars->popScope(); *************** *** 508,513 **** * @see execDBCmd(), execQuery() */ ! function openRS($rs_id, $params =array()) { global $webPage, $tplVars; --- 504,510 ---- * @see execDBCmd(), execQuery() */ ! function openRS($rs_id, $params =UNDEFINED, $conn =UNDEFINED) { + if ($params==UNDEFINED) $params = array(); global $webPage, $tplVars; *************** *** 517,521 **** $tplVars->addVars($params); $rs = &$webPage->rs_collection[$rs_id]; ! $rs->Open(); $tplVars->popScope(); return $rs; --- 514,518 ---- $tplVars->addVars($params); $rs = &$webPage->rs_collection[$rs_id]; ! $rs->Open($conn); $tplVars->popScope(); return $rs; Index: const.Paths.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/const.Paths.php,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** const.Paths.php 25 Aug 2003 13:18:39 -0000 1.4 --- const.Paths.php 4 Oct 2004 09:09:32 -0000 1.4.2.1 *************** *** 40,44 **** define("TABLE_PATH", WEBOBJ_PATH."table/"); define("DBTABLE_PATH", WEBOBJ_PATH."dbTable/"); ! define("LEFTMENU_PATH", WEBOBJ_PATH."leftMenu/"); //WebBox paths --- 40,44 ---- define("TABLE_PATH", WEBOBJ_PATH."table/"); define("DBTABLE_PATH", WEBOBJ_PATH."dbTable/"); ! define("TABS_PATH", WEBOBJ_PATH."tabs/"); //WebBox paths |
From: Dashamir H. <das...@us...> - 2004-09-20 13:28:15
|
Update of /cvsroot/phpwebapp/web_app/session In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1796/session Modified Files: class.Session.php Log Message: Index: class.Session.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/session/class.Session.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** class.Session.php 22 Jul 2004 16:25:37 -0000 1.11 --- class.Session.php 20 Sep 2004 13:28:06 -0000 1.12 *************** *** 211,216 **** 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])) --- 211,216 ---- if (isset($this->dbVars[$var_name])) { ! //this variable is already initialized ! return; } if (isset($this->Vars[$var_name])) *************** *** 230,235 **** 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; --- 230,235 ---- if (isset($this->Vars[$var_name])) { ! //this variable is already initialized ! return; } $this->Vars[$var_name] = $var_value; |
From: Dashamir H. <das...@us...> - 2004-09-20 13:28:15
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1796/parser Modified Files: class.WebObject.php Log Message: Index: class.WebObject.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebObject.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** class.WebObject.php 22 Jul 2004 16:25:37 -0000 1.10 --- class.WebObject.php 20 Sep 2004 13:28:06 -0000 1.11 *************** *** 96,100 **** { $sVars = $this->getSVars(); ! if (sizeof($sVars)==0) { //this is the first time that this webobj is --- 96,100 ---- { $sVars = $this->getSVars(); ! if (!isset($sVars['initialized'])) { //this is the first time that this webobj is |
From: Dashamir H. <das...@us...> - 2004-09-20 13:28:15
|
Update of /cvsroot/phpwebapp/web_app/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1796/doc Modified Files: changes.txt Log Message: Index: changes.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/changes.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** changes.txt 16 Sep 2004 07:44:41 -0000 1.11 --- changes.txt 20 Sep 2004 13:28:06 -0000 1.12 *************** *** 14,16 **** --- 14,28 ---- action (ant the action will become in fact index.php in the path). ------------------------------------------------------------------- + * WebApp::addSVar() or $this->addSVar() initialize a state variable + by calling $session->addVar(). Now the behaviour of $session->addVar() + is modified so that it will not re-initialize a variable (it will + not change the value of a variable, if it already exists). This is + done in order to be able to set some state variables of a webbox + without being afraid that init() will override them. + ------------------------------------------------------------------- + ------------------------------------------------------------------- + ------------------------------------------------------------------- + ------------------------------------------------------------------- + ------------------------------------------------------------------- + ------------------------------------------------------------------- ------------------------------------------------------------------- |
From: Dashamir H. <das...@us...> - 2004-09-16 07:44:49
|
Update of /cvsroot/phpwebapp/web_app/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28678/doc Modified Files: changes.txt Log Message: Index: changes.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/changes.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** changes.txt 29 Jul 2004 07:58:16 -0000 1.10 --- changes.txt 16 Sep 2004 07:44:41 -0000 1.11 *************** *** 9,12 **** --- 9,16 ---- white-space of its contents are preserved by the framework. ------------------------------------------------------------------- + * GoTo() can have a second optional parameter which specifies the action + where the form is to be submitted. Default is the previous action. + If it is 'index' then the filename will be removed from the previous + action (ant the action will become in fact index.php in the path). ------------------------------------------------------------------- ------------------------------------------------------------------- |
From: Dashamir H. <das...@us...> - 2004-09-16 07:43:04
|
Update of /cvsroot/phpwebapp/web_app/session In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27680/session Modified Files: func.GoTo.js Log Message: GoTo() can have a second optional parameter which specifies the action where the form is to be submitted. Default is the previous action. If it is 'index' then the filename will be removed from the previous action (ant the action will become in fact index.php in the path). Index: func.GoTo.js =================================================================== RCS file: /cvsroot/phpwebapp/web_app/session/func.GoTo.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** func.GoTo.js 25 Aug 2003 13:18:31 -0000 1.4 --- func.GoTo.js 16 Sep 2004 07:42:55 -0000 1.5 *************** *** 82,94 **** * Submits the form of the page to the 'target' specified as parameter * by taking care to serialize and transmit the session vars as well. */ ! 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)" *************** *** 120,123 **** --- 137,141 ---- //now submit the form + form.action = action; form.submit(); } |
From: Dashamir H. <das...@us...> - 2004-07-30 09:57:23
|
Update of /cvsroot/phpwebapp/documentation/templates/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6665/templates/tutorial Modified Files: weboxes.html Log Message: Index: weboxes.html =================================================================== RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/weboxes.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** weboxes.html 21 Jul 2004 17:15:31 -0000 1.5 --- weboxes.html 30 Jul 2004 09:57:13 -0000 1.6 *************** *** 111,115 **** <a href="javascript:codeReview('{{APP3_PATH}}templates/menu/menu.html','1')"> <em>templates/menu/menu.html</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}templates/menu/menu.php','2')"> <em>templates/menu/menu.php</em></a>. </p> --- 111,115 ---- <a href="javascript:codeReview('{{APP3_PATH}}templates/menu/menu.html','1')"> <em>templates/menu/menu.html</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}templates/menu/menu.php','4')"> <em>templates/menu/menu.php</em></a>. </p> *************** *** 144,148 **** <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.html','5')"> <em>templates/tip/tip.html</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.php','10,13')"> <em>templates/tip/tip.php</em></a>. The framework replaces the variables {{#rand}} and {{#tip_text}} by the --- 144,148 ---- <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.html','5')"> <em>templates/tip/tip.html</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.php','12,15')"> <em>templates/tip/tip.php</em></a>. The framework replaces the variables {{#rand}} and {{#tip_text}} by the *************** *** 197,211 **** with the same <strong>ID</strong>.</li> - <li>The framework tags are case sensitive, e.g. the framework will - reckognize the tag <strong>&lt;WebBox&gt;</strong>, however will not - reckognize the tag <strong>&lt;webbox&gt;</strong>. (This is a - limitation of the current implementation, it may be improved - later.)</li> - - <li>The framework tag attributes are case sensitive, e.g. the - framework will reckognize the attribute <strong>ID</strong> of the - tag &lt;WebBox&gt;, however will not reckognize the attribute - <strong>id</strong> of the tag &lt;WebBox&gt;.</li> - <li>All the files of a WebBox (<strong>.js</strong>, <strong>.css</strong>, <strong>.db</strong>, etc.) must have the --- 197,200 ---- *************** *** 227,239 **** <li>Never construct HTML code in the PHP, put all the HTML in the template instead!</li> - - <li>Assign to template variables only a value that is really a - variable, what is not a variable should be placed in the - template.</li> </ul> - <p>Don't worry if you don't understand these last 3 tips, we will - discuss them later.</p> - <span class="button"><a href="#toc">TOC</a></span> <hr /> --- 216,221 ---- *************** *** 258,262 **** <li>Notice how are included several webboxes in ! <a href="javascript:codeReview('{{APP3_PATH}}templates/page2.html','22,25,28,31,34')"> <em>Page 2</em></a>. To include a webbox we simply include the template that contains the webbox (it is a template inclusion). --- 240,244 ---- <li>Notice how are included several webboxes in ! <a href="javascript:codeReview('{{APP3_PATH}}templates/page2.html','25,28,31,34')"> <em>Page 2</em></a>. To include a webbox we simply include the template that contains the webbox (it is a template inclusion). *************** *** 272,281 **** <li>The application has defined a constant TIP_PATH in ! <a href="javascript:codeReview('{{APP3_PATH}}config/const.Paths.php','8')"> <em>config/const.Paths.php</em></a> and then has used it in several places, like in ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.php','2')"> <em>tip.php</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/fun.get_random_tip.php','9')"> <em>fun.get_random_tip.php</em></a>, etc. This is better than hardcoding paths, because in case that you move --- 254,263 ---- <li>The application has defined a constant TIP_PATH in ! <a href="javascript:codeReview('{{APP3_PATH}}config/const.Paths.php','10')"> <em>config/const.Paths.php</em></a> and then has used it in several places, like in ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.php','4')"> <em>tip.php</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/fun.get_random_tip.php','11')"> <em>fun.get_random_tip.php</em></a>, etc. This is better than hardcoding paths, because in case that you move *************** *** 288,292 **** the application. This is done using the function <strong>WebApp::message()</strong> in the file ! <a href="javascript:codeReview('{{APP3_PATH}}init.php','7')"> <em>init.php</em></a>. <br /><br /> --- 270,274 ---- the application. This is done using the function <strong>WebApp::message()</strong> in the file ! <a href="javascript:codeReview('{{APP3_PATH}}init.php','9')"> <em>init.php</em></a>. <br /><br /> *************** *** 296,304 **** The application has also support for counting clicks and displaying them, however it is optional. See how it is done: ! <a href="javascript:codeReview('{{APP3_PATH}}config/const.Options.php','51-55')"> <em>config/const.Options.php</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}init.php','9-12')"> <em>init.php</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}global.php','8-14')"> <em>global.php</em></a>. --- 278,286 ---- The application has also support for counting clicks and displaying them, however it is optional. See how it is done: ! <a href="javascript:codeReview('{{APP3_PATH}}config/const.Options.php','72-76')"> <em>config/const.Options.php</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}init.php','11-14')"> <em>init.php</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}global.php','10-16')"> <em>global.php</em></a>. *************** *** 329,333 **** <dd>This file is included by the framework only the first time that the application is openned (at the beginning of the session).It may ! be used to initialize anything.</dd> <dt><strong>global.php</strong></dt> --- 311,315 ---- <dd>This file is included by the framework only the first time that the application is openned (at the beginning of the session).It may ! be used to initialize any thing.</dd> <dt><strong>global.php</strong></dt> *************** *** 375,379 **** <a href="javascript:codeReview('{{APP2_PATH}}templates/header.html')"> header.html</a> and append the line: <br /> ! <kbd>&lt;Include src="{{#UP_PATH}}app3/templates/menu/menu.html" /&gt;</kbd> </li> --- 357,361 ---- <a href="javascript:codeReview('{{APP2_PATH}}templates/header.html')"> header.html</a> and append the line: <br /> ! <kbd>&lt;include src="{{#UP_PATH}}app3/templates/menu/menu.html" /&gt;</kbd> </li> *************** *** 407,416 **** <li>Open ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.php','2')"> tip.php</a> and replace the include statement with:<br /> <kbd>$tip_path = dirname(__FILE__)."/";</kbd><br /> <kbd>include_once $tip_path."fun.get_random_tip.php";</kbd><br /> Do the same thing with ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/fun.get_random_tip.php','9')"> fun.get_random_tip.php</a>.</li> --- 389,398 ---- <li>Open ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.php','4')"> tip.php</a> and replace the include statement with:<br /> <kbd>$tip_path = dirname(__FILE__)."/";</kbd><br /> <kbd>include_once $tip_path."fun.get_random_tip.php";</kbd><br /> Do the same thing with ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/fun.get_random_tip.php','11')"> fun.get_random_tip.php</a>.</li> *************** *** 432,436 **** <ol> <li>Open the file ! <a href="javascript:codeReview('{{APP3_PATH}}config/const.Options.php','51-55')"> config/const.Options.php</a> and set the constant <em>COUNT_CLICKS</em> to <em>true</em>.</li> --- 414,418 ---- <ol> <li>Open the file ! <a href="javascript:codeReview('{{APP3_PATH}}config/const.Options.php','72-76')"> config/const.Options.php</a> and set the constant <em>COUNT_CLICKS</em> to <em>true</em>.</li> *************** *** 449,455 **** <ol> <li>Open the files ! <a href="javascript:codeReview('{{APP3_PATH}}before_page.php','6')"> before_page.php</a> and ! <a href="javascript:codeReview('{{APP3_PATH}}after_page.php','6')"> after_page.php</a> and uncomment the <em>print</em> statements.</li> --- 431,437 ---- <ol> <li>Open the files ! <a href="javascript:codeReview('{{APP3_PATH}}before_page.php','8')"> before_page.php</a> and ! <a href="javascript:codeReview('{{APP3_PATH}}after_page.php','8')"> after_page.php</a> and uncomment the <em>print</em> statements.</li> |
From: Dashamir H. <das...@us...> - 2004-07-30 09:56:00
|
Update of /cvsroot/phpwebapp/app3/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6385/templates Modified Files: page3.html page2.html page1_content.html Log Message: Index: page3.html =================================================================== RCS file: /cvsroot/phpwebapp/app3/templates/page3.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** page3.html 21 Jul 2004 17:13:04 -0000 1.3 --- page3.html 30 Jul 2004 09:55:50 -0000 1.4 *************** *** 1,3 **** ! <html> <head> <title>Page 3</title> --- 1,7 ---- ! <?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"> ! <head> <title>Page 3</title> Index: page2.html =================================================================== RCS file: /cvsroot/phpwebapp/app3/templates/page2.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** page2.html 21 Jul 2004 17:13:04 -0000 1.3 --- page2.html 30 Jul 2004 09:55:50 -0000 1.4 *************** *** 1,3 **** ! <html> <head> <title>Page 2</title> --- 1,6 ---- ! <?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"> <head> <title>Page 2</title> *************** *** 28,34 **** <include src="{{./}}tip/tip3.html" /> <br /> - This is a terribly bad example: - <include src="{{./}}tip/tip4.html" /> - <br /> This is a good example: <include src="{{./}}tip/tip.html" /> --- 31,34 ---- Index: page1_content.html =================================================================== RCS file: /cvsroot/phpwebapp/app3/templates/page1_content.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** page1_content.html 21 Jul 2004 17:13:04 -0000 1.3 --- page1_content.html 30 Jul 2004 09:55:50 -0000 1.4 *************** *** 77,82 **** <pre> ! &lt;script language='JavaScript' src='/app3/templates/menu/<strong>menu.js</strong>'&gt;&lt;/script&gt; ! &lt;link rel='stylesheet' href='/app3/templates/menu/<strong>menu.css</strong>' type='text/css'&gt; </pre> --- 77,82 ---- <pre> ! &lt;script type='text/javascript' language='JavaScript' src='/app3/templates/menu/<strong>menu.js</strong>'&gt;&lt;/script&gt; ! &lt;link type='text/css' rel='stylesheet' href='/app3/templates/menu/<strong>menu.css</strong>'&gt; </pre> |