phpwebapp-commits Mailing List for phpWebApp (Page 7)
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-08-31 07:42:55
|
Update of /cvsroot/phpwebapp/web_app/webobjects/form In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22728 Modified Files: formWebObj.js Log Message: Index: formWebObj.js =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/form/formWebObj.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** formWebObj.js 6 Jul 2005 06:13:16 -0000 1.4 --- formWebObj.js 31 Aug 2005 07:42:47 -0000 1.5 *************** *** 53,58 **** } function getFormData(form) - //returns all the data filled in the given form { var arrFormData = new Array(); --- 53,58 ---- } + /** returns all the data filled in the given form */ function getFormData(form) { var arrFormData = new Array(); *************** *** 67,70 **** --- 67,71 ---- { case "text": + case "password": case "hidden": case "textarea": *************** *** 135,138 **** --- 136,140 ---- case "hidden": case "text": + case "password": case "textarea": str += '}'; *************** *** 152,157 **** } function setFormData(form, formData) - //fills the form with the given data { if (formData.charAt(0)!='[') return; --- 154,159 ---- } + /** fills the form with the given data */ function setFormData(form, formData) { if (formData.charAt(0)!='[') return; *************** *** 168,171 **** --- 170,174 ---- case "hidden": case "text": + case "password": case "textarea": elem.value = data.value; |
From: Dashamir H. <das...@us...> - 2005-07-07 07:08:48
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3751 Modified Files: class.WebPage.php Log Message: bugfix Index: class.WebPage.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebPage.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** class.WebPage.php 6 Jul 2005 06:13:16 -0000 1.19 --- class.WebPage.php 7 Jul 2005 07:08:40 -0000 1.20 *************** *** 257,261 **** $js .= " $name.document.close();"; } ! $js .= " $name.location.href=\"$url\";"; } $js .= "</script>\n"; --- 257,264 ---- $js .= " $name.document.close();"; } ! if ($url!='') ! { ! $js .= " $name.location.href=\"$url\";"; ! } } $js .= "</script>\n"; |
From: Dashamir H. <das...@us...> - 2005-07-06 15:28:34
|
Update of /cvsroot/phpwebapp/web_app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3598 Modified Files: class.WebApp.php Log Message: Index: class.WebApp.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/class.WebApp.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** class.WebApp.php 30 Jun 2005 06:24:43 -0000 1.26 --- class.WebApp.php 6 Jul 2005 15:28:24 -0000 1.27 *************** *** 583,588 **** function to_url($path) { ! $DocumentRoot = ereg_replace(APP_URL.'$', '', APP_PATH); ! $url = str_replace($DocumentRoot, '', $path); return $url; } --- 583,603 ---- function to_url($path) { ! if ($path[0]!='/') ! { ! //$path is a relative path ! $url = APP_URL.$path; ! } ! else ! { ! //$path is an absolute path ! $app_url = APP_URL; ! ereg('^(/~[^/]+)/', $app_url, $regs); ! $user_dir = $regs[1]; ! $app_url = ereg_replace("^$user_dir", '', $app_url); ! $DocumentRoot = ereg_replace($app_url.'$', '', APP_PATH); ! $url = str_replace($DocumentRoot, '', $path); ! $url = $user_dir.$url; ! } ! return $url; } |
From: Dashamir H. <das...@us...> - 2005-07-06 15:27:49
|
Update of /cvsroot/phpwebapp/documentation/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3078/config Modified Files: const.Debug.php const.Paths.php Log Message: Index: const.Debug.php =================================================================== RCS file: /cvsroot/phpwebapp/documentation/config/const.Debug.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** const.Debug.php 18 Apr 2005 10:08:43 -0000 1.3 --- const.Debug.php 6 Jul 2005 15:27:24 -0000 1.4 *************** *** 47,51 **** * around each file that is included in the page */ ! define("DEBUG_INCLUDES", true); /** --- 47,51 ---- * around each file that is included in the page */ ! define("DEBUG_INCLUDES", false); /** Index: const.Paths.php =================================================================== RCS file: /cvsroot/phpwebapp/documentation/config/const.Paths.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** const.Paths.php 25 Aug 2003 16:12:35 -0000 1.7 --- const.Paths.php 6 Jul 2005 15:27:24 -0000 1.8 *************** *** 24,30 **** define("WEBAPP_PATH", UP_PATH."web_app/"); ! define("GRAPHICS", APP_URL."graphics/"); ! define("TPL_PATH", APP_PATH."templates/"); ! define("WOBJ_PATH", APP_PATH."webobjects/"); //define paths and URLs of the sample applications --- 24,30 ---- define("WEBAPP_PATH", UP_PATH."web_app/"); ! define("GRAPHICS", "graphics/"); ! define("TPL_PATH", "templates/"); ! define("WOBJ_PATH", "webobjects/"); //define paths and URLs of the sample applications |
From: Dashamir H. <das...@us...> - 2005-07-06 15:27:35
|
Update of /cvsroot/phpwebapp/documentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3078 Modified Files: webapp.php Log Message: Index: webapp.php =================================================================== RCS file: /cvsroot/phpwebapp/documentation/webapp.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** webapp.php 8 Sep 2003 13:22:39 -0000 1.6 --- webapp.php 6 Jul 2005 15:27:24 -0000 1.7 *************** *** 20,23 **** --- 20,30 ---- */ + /** + * Standard file for all the applications, + * doesn't need to be modified. + * + * @package sample-application + */ + /** */ //define APP_PATH and APP_URL *************** *** 25,28 **** --- 32,36 ---- $app_path = dirname($script_filename)."/"; define("APP_PATH", $app_path); + $script_name = $_SERVER["SCRIPT_NAME"]; $app_url = dirname($script_name)."/"; *************** *** 36,40 **** //define CONFIG_PATH and include the other path constants ! define("CONFIG_PATH", APP_PATH."config/"); include CONFIG_PATH."const.Paths.php"; --- 44,49 ---- //define CONFIG_PATH and include the other path constants ! define("CONFIG_PATH", APP_PATH."config/"); ! include CONFIG_PATH."const.Paths.php"; *************** *** 61,63 **** WebApp::callFreeEvent($event); } ! ?> --- 70,72 ---- WebApp::callFreeEvent($event); } ! ?> \ No newline at end of file |
From: Dashamir H. <das...@us...> - 2005-07-06 14:07:30
|
Update of /cvsroot/phpwebapp/web_app/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31588/doc Modified Files: to_do.txt Log Message: Index: to_do.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/to_do.txt,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** to_do.txt 6 Jul 2005 06:13:16 -0000 1.18 --- to_do.txt 6 Jul 2005 14:07:21 -0000 1.19 *************** *** 7,11 **** * - Write more tutorials for phpWebApp. ! * ------------- Make a new release 1.2 * - Add this functionality to the framework: any webobject can --- 7,11 ---- * - Write more tutorials for phpWebApp. ! * ------------- Make a new release 1.3 * - Add this functionality to the framework: any webobject can |
From: Dashamir H. <das...@us...> - 2005-07-06 14:07:30
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31588/parser Modified Files: class.Render.php Log Message: Index: class.Render.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Render.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** class.Render.php 22 Jun 2005 12:56:28 -0000 1.24 --- class.Render.php 6 Jul 2005 14:07:21 -0000 1.25 *************** *** 258,265 **** 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"); --- 258,266 ---- function render_FileTpl($file_tpl) { ! $relative_filename = str_replace(APP_PATH, '', $file_tpl->filename); ! if (DEBUG_INCLUDES and $file_tpl->type!='MainTpl') { $this->output("<span class='webapp_filetpl_filename'>\n"); ! $this->output($relative_filename); $this->output("</span>\n"); $this->output("<div class='webapp_filetpl'>\n"); |
From: Dashamir H. <das...@us...> - 2005-07-06 14:06:51
|
Update of /cvsroot/phpwebapp/top10/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31257/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.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** const.Debug.php 18 Apr 2005 10:08:17 -0000 1.2 --- const.Debug.php 6 Jul 2005 14:06:41 -0000 1.3 *************** *** 47,51 **** * around each file that is included in the page */ ! define("DEBUG_INCLUDES", true); /** --- 47,51 ---- * around each file that is included in the page */ ! define("DEBUG_INCLUDES", false); /** |
From: Dashamir H. <das...@us...> - 2005-07-06 14:06:19
|
Update of /cvsroot/phpwebapp/empty-sample/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31097/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.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** const.Debug.php 18 Apr 2005 10:00:41 -0000 1.3 --- const.Debug.php 6 Jul 2005 14:06:11 -0000 1.4 *************** *** 47,51 **** * around each file that is included in the page */ ! define("DEBUG_INCLUDES", true); /** --- 47,51 ---- * around each file that is included in the page */ ! define("DEBUG_INCLUDES", false); /** |
From: Dashamir H. <das...@us...> - 2005-07-06 14:05:57
|
Update of /cvsroot/phpwebapp/app3/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30908/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.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** const.Debug.php 18 Apr 2005 10:01:08 -0000 1.3 --- const.Debug.php 6 Jul 2005 14:05:47 -0000 1.4 *************** *** 47,51 **** * around each file that is included in the page */ ! define("DEBUG_INCLUDES", true); /** --- 47,51 ---- * around each file that is included in the page */ ! define("DEBUG_INCLUDES", false); /** |
From: Dashamir H. <das...@us...> - 2005-07-06 14:05:34
|
Update of /cvsroot/phpwebapp/app2/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30675/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.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** const.Debug.php 18 Apr 2005 10:01:32 -0000 1.3 --- const.Debug.php 6 Jul 2005 14:05:23 -0000 1.4 *************** *** 47,51 **** * around each file that is included in the page */ ! define("DEBUG_INCLUDES", true); /** --- 47,51 ---- * around each file that is included in the page */ ! define("DEBUG_INCLUDES", false); /** |
From: Dashamir H. <das...@us...> - 2005-07-06 14:04:54
|
Update of /cvsroot/phpwebapp/app1/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29761/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.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** const.Debug.php 18 Apr 2005 10:01:52 -0000 1.4 --- const.Debug.php 6 Jul 2005 14:04:42 -0000 1.5 *************** *** 47,51 **** * around each file that is included in the page */ ! define("DEBUG_INCLUDES", true); /** --- 47,51 ---- * around each file that is included in the page */ ! define("DEBUG_INCLUDES", false); /** |
From: Dashamir H. <das...@us...> - 2005-07-06 06:13:30
|
Update of /cvsroot/phpwebapp/web_app/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19869/database Modified Files: class.MySQLCnn.php Log Message: Index: class.MySQLCnn.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/database/class.MySQLCnn.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** class.MySQLCnn.php 22 Jul 2004 16:25:38 -0000 1.9 --- class.MySQLCnn.php 6 Jul 2005 06:13:16 -0000 1.10 *************** *** 66,76 **** /** Convert the mysql $result to a two-dimentional table. */ function result2table(&$result) ! { ! if (!$result) ! { ! print WebApp::error_msg("Query was not executed successfully."); ! return; ! } ! $arr_result = array(); $i = 0; --- 66,70 ---- /** Convert the mysql $result to a two-dimentional table. */ function result2table(&$result) ! { $arr_result = array(); $i = 0; *************** *** 89,99 **** } ! function show_error($query = "") { if (mysql_errno()==0) return; //no error if (mysql_errno()==1062) return; //ignore this error if (mysql_errno()==1136) return; //ignore this error ! print "Query: '$query' <br /> \n"; ! print mysql_errno().": ".mysql_error()." <br /> \n"; } } --- 83,102 ---- } ! function show_error($query ='') { if (mysql_errno()==0) return; //no error if (mysql_errno()==1062) return; //ignore this error if (mysql_errno()==1136) return; //ignore this error ! ! $err_msg = mysql_errno() . ": " . mysql_error(); ! $err_msg = htmlentities($err_msg); ! $query = htmlentities($query); ! ! print " ! <span class='db_error'> ! <strong>MySQL Error:</strong>$err_msg ! <br/> ! <strong>Query:</strong>$query</span> ! "; } } |
From: Dashamir H. <das...@us...> - 2005-07-06 06:13:30
|
Update of /cvsroot/phpwebapp/web_app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19869 Modified Files: styles.css Log Message: Index: styles.css =================================================================== RCS file: /cvsroot/phpwebapp/web_app/styles.css,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** styles.css 24 Jun 2005 14:50:35 -0000 1.8 --- styles.css 6 Jul 2005 06:13:16 -0000 1.9 *************** *** 59,62 **** --- 59,69 ---- font-weight: bold; } + .db_error, .db_error strong + { + color: #0088ff; + font-family: sans-serif; + font-size: 10px; + background-color: #ffffff; + } |
From: Dashamir H. <das...@us...> - 2005-07-06 06:13:30
|
Update of /cvsroot/phpwebapp/web_app/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19869/doc Modified Files: to_do.txt Log Message: Index: to_do.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/doc/to_do.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** to_do.txt 24 Jun 2005 14:50:35 -0000 1.17 --- to_do.txt 6 Jul 2005 06:13:16 -0000 1.18 *************** *** 7,10 **** --- 7,12 ---- * - Write more tutorials for phpWebApp. + * ------------- Make a new release 1.2 + * - Add this functionality to the framework: any webobject can handle an event sent to another webobject, if it defines the |
From: Dashamir H. <das...@us...> - 2005-07-06 06:13:29
|
Update of /cvsroot/phpwebapp/web_app/webobjects/listbox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19869/webobjects/listbox Modified Files: listbox.php Log Message: Index: listbox.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/listbox/listbox.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** listbox.php 22 Jul 2004 16:25:36 -0000 1.4 --- listbox.php 6 Jul 2005 06:13:17 -0000 1.5 *************** *** 29,33 **** function onRender() { ! } } --- 29,40 ---- function onRender() { ! //get the name of the recordset of the listbox ! $params = $this->getParams(); ! $rs = $params['rs']; ! ! //open the recordset, so that in case of error, ! //the error is not displayed inside the <select> ! //where it is invisible, but is displayed before it ! WebApp::openRS($rs); } } |
From: Dashamir H. <das...@us...> - 2005-07-06 06:13:26
|
Update of /cvsroot/phpwebapp/web_app/webobjects/form In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19869/webobjects/form Modified Files: formWebObj.js Log Message: Index: formWebObj.js =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/form/formWebObj.js,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** formWebObj.js 25 Aug 2003 13:18:29 -0000 1.3 --- formWebObj.js 6 Jul 2005 06:13:16 -0000 1.4 *************** *** 74,77 **** --- 74,78 ---- case "select-one": + if (elem.selectedIndex==-1) break; //nothing selected val = elem.options[elem.selectedIndex].value; val = encode_str(val); |
From: Dashamir H. <das...@us...> - 2005-07-06 06:13:26
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19869/parser Modified Files: class.WebPage.php Log Message: Index: class.WebPage.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebPage.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** class.WebPage.php 30 Jun 2005 06:24:43 -0000 1.18 --- class.WebPage.php 6 Jul 2005 06:13:16 -0000 1.19 *************** *** 245,251 **** $features = $data['features']; if ($features==UNDEFINED) ! $js .= " $name = window.open('$url', '$name');\n"; else ! $js .= " $name = window.open('$url', '$name', '$features');\n"; //write the content --- 245,251 ---- $features = $data['features']; if ($features==UNDEFINED) ! $js .= " $name = window.open('', '$name');\n"; else ! $js .= " $name = window.open('', '$name', '$features');\n"; //write the content *************** *** 255,259 **** --- 255,261 ---- $html_content = WebApp::js_encode($html_content); $js .= " $name.document.write('$html_content');"; + $js .= " $name.document.close();"; } + $js .= " $name.location.href=\"$url\";"; } $js .= "</script>\n"; |
From: Dashamir H. <das...@us...> - 2005-06-30 06:24:52
|
Update of /cvsroot/phpwebapp/web_app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25213 Modified Files: class.WebApp.php Log Message: Index: class.WebApp.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/class.WebApp.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** class.WebApp.php 24 Jun 2005 14:50:35 -0000 1.25 --- class.WebApp.php 30 Jun 2005 06:24:43 -0000 1.26 *************** *** 589,592 **** --- 589,622 ---- /** + * When a string is inserted inside a JS code, + * enclosed in single quotes, like this: 'str', + * some characters inside the string must be replaced + * by some others, in order not to break the JS code. + * These replacements are: '\' to '\\', '\n\' is added + * before a new line, and single quotes are escaped + * by a slash. + */ + function js_encode($str) + { + $str = str_replace("\\", "\\\\", $str); + $str = str_replace("\n", "\\n\\\n", $str); + $str = str_replace("'", "\\'", $str); + return $str; + } + + /** + * Decodes a string that comes to PHP from JS code. + * Used in session to convert variable values. + */ + function js_decode($str) + { + $str = str_replace("\\\\", "\\", $str); + $str = str_replace('\"', '"', $str); + $str = str_replace("\'", "'", $str); + $str = str_replace('\n', "\n", $str); + return $str; + } + + /** * Construct and return a link that can be used to access * from outside a certain page of the application, in a certain |
From: Dashamir H. <das...@us...> - 2005-06-30 06:24:52
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25213/parser Modified Files: class.WebPage.php Log Message: Index: class.WebPage.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebPage.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** class.WebPage.php 24 Jun 2005 14:50:35 -0000 1.17 --- class.WebPage.php 30 Jun 2005 06:24:43 -0000 1.18 *************** *** 222,227 **** { $msg = $this->messages[$i]; ! $msg = str_replace("\n", '\n', $msg); //replace new lines with '\n' ! $msg = str_replace("'", "\\'", $msg); //escape single quotes $js .= "\talert('$msg');\n"; } --- 222,226 ---- { $msg = $this->messages[$i]; ! $msg = WebApp::js_encode($msg); $js .= "\talert('$msg');\n"; } *************** *** 254,259 **** if ($html_content!=UNDEFINED) { ! $html_content = str_replace("\n", '\\n', $html_content); ! $html_content = str_replace("'", "\\'", $html_content); $js .= " $name.document.write('$html_content');"; } --- 253,257 ---- if ($html_content!=UNDEFINED) { ! $html_content = WebApp::js_encode($html_content); $js .= " $name.document.write('$html_content');"; } |
From: Dashamir H. <das...@us...> - 2005-06-30 06:24:52
|
Update of /cvsroot/phpwebapp/web_app/l10n In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25213/l10n Modified Files: class.L10n.php Log Message: Index: class.L10n.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/l10n/class.L10n.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** class.L10n.php 22 Jun 2005 12:56:29 -0000 1.4 --- class.L10n.php 30 Jun 2005 06:24:43 -0000 1.5 *************** *** 275,279 **** //get the parent directory ! $path = ereg_replace('[^/]+/?$', '', $path); } --- 275,279 ---- //get the parent directory ! $path = ereg_replace('[^/]*/?$', '', $path); } |
From: Dashamir H. <das...@us...> - 2005-06-30 06:24:51
|
Update of /cvsroot/phpwebapp/web_app/session In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25213/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.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** class.Session.php 20 Sep 2004 13:28:06 -0000 1.12 --- class.Session.php 30 Jun 2005 06:24:43 -0000 1.13 *************** *** 144,170 **** while (list($var_name,$var_value) = each($arrVars)) { ! $var_value = $this->js_decode($var_value); $this->addVar($var_name, $var_value); } } - function js_decode($str) - { - $str = str_replace("\\\\", "\\", $str); - $str = str_replace('\"', '"', $str); - $str = str_replace("\'", "'", $str); - $str = str_replace('\n', "\n", $str); - return $str; - } - - /** Replace some chars that are bad for JS code. */ - function js_encode($str) - { - $str = str_replace("\\", "\\\\", $str); - $str = str_replace("\n", '\n', $str); - $str = str_replace("'", "\\'", $str); - return $str; - } - /** Get dbVars from DB. Requires the table session(id,vars) in DB. */ function getDBVars() --- 144,152 ---- while (list($var_name,$var_value) = each($arrVars)) { ! $var_value = WebApp::js_decode($var_value); $this->addVar($var_name, $var_value); } } /** Get dbVars from DB. Requires the table session(id,vars) in DB. */ function getDBVars() *************** *** 296,300 **** while (list($var_name,$var_value) = each($this->Vars)) { ! $var_value = $this->js_encode($var_value); $session_vars .= " session.addVar('$var_name','$var_value');\n"; } --- 278,282 ---- while (list($var_name,$var_value) = each($this->Vars)) { ! $var_value = WebApp::js_encode($var_value); $session_vars .= " session.addVar('$var_name','$var_value');\n"; } |
From: Dashamir H. <das...@us...> - 2005-06-24 14:50:50
|
Update of /cvsroot/phpwebapp/web_app/append In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3358/append Modified Files: append.html Log Message: Index: append.html =================================================================== RCS file: /cvsroot/phpwebapp/web_app/append/append.html,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** append.html 21 Jun 2005 08:39:51 -0000 1.8 --- append.html 24 Jun 2005 14:50:35 -0000 1.9 *************** *** 24,30 **** </webbox> <!--# open any popup windows from server-side code #--> ! <WebBox ID="wbPopupWindows"> {{POPUP_WINDOWS}} ! </WebBox> <!--# include debug info #--> --- 24,30 ---- </webbox> <!--# open any popup windows from server-side code #--> ! <webbox id="wbPopupWindows"> {{POPUP_WINDOWS}} ! </webbox> <!--# include debug info #--> |
From: Dashamir H. <das...@us...> - 2005-06-24 14:50:50
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3358/parser Modified Files: class.WebPage.php class.Parser.php Log Message: Index: class.WebPage.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebPage.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** class.WebPage.php 21 Jun 2005 08:39:51 -0000 1.16 --- class.WebPage.php 24 Jun 2005 14:50:35 -0000 1.17 *************** *** 47,51 **** /** * Keeps a list of translatable messages that are used ! * in the JavaScript code. */ var $js_i18n_messages; --- 47,52 ---- /** * Keeps a list of translatable messages that are used ! * in the JavaScript code. It is an associative array ! * with msgid as key and msgstr (translation) as value. */ var $js_i18n_messages; *************** *** 61,66 **** * 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; --- 62,67 ---- * 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', 'features' and 'html_content'. ! * @see WebApp::popup_window($name, $url, $features, $html_content) */ var $popup_windows; *************** *** 241,244 **** --- 242,246 ---- while ( list($name,$data) = each ($this->popup_windows) ) { + //open the window $url = $data['url']; $features = $data['features']; *************** *** 247,250 **** --- 249,261 ---- else $js .= " $name = window.open('$url', '$name', '$features');\n"; + + //write the content + $html_content = $data['html_content']; + if ($html_content!=UNDEFINED) + { + $html_content = str_replace("\n", '\\n', $html_content); + $html_content = str_replace("'", "\\'", $html_content); + $js .= " $name.document.write('$html_content');"; + } } $js .= "</script>\n"; Index: class.Parser.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Parser.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** class.Parser.php 9 Jun 2005 13:12:53 -0000 1.23 --- class.Parser.php 24 Jun 2005 14:50:35 -0000 1.24 *************** *** 184,192 **** $err_idx = xml_get_current_byte_index($xml_parser); ! //get the part of the file arround the error $start = ( (($err_idx-40) < 0) ? 0 : ($err_idx-40) ); $str_1 = substr($content, $start, $err_idx - $start); $str_2 = substr($content, $err_idx, 10); ! $bad_xml = "... $str_1 ^err^ $str_2 ..."; $xml_err_msg = WebApp::xml_err_msg($fname, $line_nr, $col_nr, --- 184,192 ---- $err_idx = xml_get_current_byte_index($xml_parser); ! //get the part of the file around the error $start = ( (($err_idx-40) < 0) ? 0 : ($err_idx-40) ); $str_1 = substr($content, $start, $err_idx - $start); $str_2 = substr($content, $err_idx, 10); ! $bad_xml = "... $str_1^err^$str_2 ..."; $xml_err_msg = WebApp::xml_err_msg($fname, $line_nr, $col_nr, |
From: Dashamir H. <das...@us...> - 2005-06-24 14:50:50
|
Update of /cvsroot/phpwebapp/web_app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3358 Modified Files: styles.css class.WebApp.php Log Message: Index: styles.css =================================================================== RCS file: /cvsroot/phpwebapp/web_app/styles.css,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** styles.css 18 Apr 2005 09:41:25 -0000 1.7 --- styles.css 24 Jun 2005 14:50:35 -0000 1.8 *************** *** 48,56 **** background-color: #ffffff; } ! .xml_err_str, .xml_err_str strong { color: #dd0066; font-family: fixed; } --- 48,62 ---- background-color: #ffffff; } ! .xml_err_str { color: #dd0066; font-family: fixed; } + .xml_err_str strong + { + color: #ff0000; + font-family: sans-serif; + font-weight: bold; + } Index: class.WebApp.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/class.WebApp.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** class.WebApp.php 12 Oct 2004 10:01:10 -0000 1.24 --- class.WebApp.php 24 Jun 2005 14:50:35 -0000 1.25 *************** *** 618,627 **** * 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 =UNDEFINED) { global $webPage; $webPage->popup_windows[$name]['url'] = $url; $webPage->popup_windows[$name]['features'] = $features; } --- 618,632 ---- * Parameters $name, $url, and $features will be used * in a javascript statement like this: ! * name = window.open(url, name, features); ! * and $html_content is an html code that is displayed in the ! * window, like this: ! * name.document.write(content); */ ! function popup_window($name, $url, $html_content =UNDEFINED, ! $features =UNDEFINED) { global $webPage; $webPage->popup_windows[$name]['url'] = $url; + $webPage->popup_windows[$name]['html_content'] = $html_content; $webPage->popup_windows[$name]['features'] = $features; } *************** *** 663,666 **** --- 668,672 ---- $fname = str_replace(UP_PATH, '', $fname); $xml_string = htmlentities($xml_string); + $xml_string = str_replace('^err^', "<strong>X</strong>",$xml_string); $err_msg = " |