[phpwebapp-commits] CVS: web_app styles.css,1.4,1.5 class.WebApp.php,1.16,1.17
Brought to you by:
dashohoxha
From: Dashamir H. <das...@us...> - 2004-07-13 13:18:18
|
Update of /cvsroot/phpwebapp/web_app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4377 Modified Files: styles.css class.WebApp.php Log Message: xml parser Index: styles.css =================================================================== RCS file: /cvsroot/phpwebapp/web_app/styles.css,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** styles.css 20 Aug 2003 07:00:52 -0000 1.4 --- styles.css 13 Jul 2004 13:18:08 -0000 1.5 *************** *** 10,14 **** margin: 0; padding: 2px; ! font-family: arial, helvetica, sans-se; font-size: 10pt; font-weight: bold; --- 10,14 ---- margin: 0; padding: 2px; ! font-family: sans-serif; font-size: 10pt; font-weight: bold; *************** *** 30,34 **** { color: #ff0000; ! font-family: arial, helvetica, sans-se; font-size: 10px; background-color: #ffffff; --- 30,34 ---- { color: #ff0000; ! font-family: sans-serif; font-size: 10px; background-color: #ffffff; *************** *** 37,65 **** { color: #bb0000; ! font-family: arial, helvetica, sans-se; font-size: 10px; background-color: #ffffff; } /*---------------------------------------*/ ! pre.webapp, div.webapp { background-color: #ffffff; - border: 1px solid #660000; color: #006699; ! font-style: courier; ! font-size: 12pt; font-weight: normal; } ! pre.webapp a, div.webapp a { ! color: #0000ee; text-decoration: none; } pre.webapp strong, div.webapp strong { color: #660000; ! font-style: arial, helvetica, sans-se; ! font-size: 14pt; font-weight: bold; text-decoration: underline; --- 37,99 ---- { color: #bb0000; ! font-family: sans-serif; ! font-size: 10px; ! background-color: #ffffff; ! } ! .xml_error ! { ! color: #ff0088; ! font-family: sans-serif; font-size: 10px; background-color: #ffffff; } + .xml_err_str + { + color: #dd0066; + font-family: fixed; + } + /*---------------------------------------*/ ! /* p, div, span, li, td, dt */ ! .webapp ! { ! margin: 3px; ! } ! .webapp td, .webapp div, div.webapp ! { ! font-style: sans-serif; ! font-size: 10pt; ! font-weight: normal; ! color: #000000; ! } ! div.webapp a ! { ! font-family: sans-serif; ! font-size: 10pt; ! color: #0000cc; ! text-decoration: none; ! } ! pre.webapp, .webapp pre { background-color: #ffffff; color: #006699; ! font-family: fixed; ! font-size: 10pt; font-weight: normal; } ! pre.webapp a { ! font-family: sans-serif; ! font-size: 10pt; ! color: #0044cc; text-decoration: none; } + pre.webapp strong, div.webapp strong { color: #660000; ! font-style: sans-serif; ! font-size: 12pt; font-weight: bold; text-decoration: underline; Index: class.WebApp.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/class.WebApp.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** class.WebApp.php 11 May 2004 06:53:22 -0000 1.16 --- class.WebApp.php 13 Jul 2004 13:18:08 -0000 1.17 *************** *** 98,103 **** //parse and add the append.html after the MainTpl $tpl = $parser->parse_file(APPEND_PATH."append.html"); ! $webPage->append_to_body("##\n"); ! $webPage->append_to_body($tpl->id."\n"); //render the html page --- 98,102 ---- //parse and add the append.html after the MainTpl $tpl = $parser->parse_file(APPEND_PATH."append.html"); ! $webPage->link_to_body($tpl); //render the html page *************** *** 370,374 **** /** ! * Search in the given line for variable occourences * like this: {{var_name}} and replace them by their values. * --- 369,373 ---- /** ! * Search in the given string for variable occourences * like this: {{var_name}} and replace them by their values. * *************** *** 380,386 **** * the value, then it may break the string. */ ! function replaceVars($line) { ! while ( ereg("\{\{([^#{][^{}]*[^#}])\}\}", $line, $regs) ) { $str2replace = $regs[0]; --- 379,385 ---- * the value, then it may break the string. */ ! function replaceVars($str) { ! while ( ereg("\{\{([^#{][^{}]*[^#}])\}\}", $str, $regs) ) { $str2replace = $regs[0]; *************** *** 390,398 **** $var_value = WebApp::getVarValue($var_name); $var_value = WebApp::escape_quotes($var_value, $quote); ! $line = str_replace($str2replace, $var_value, $line); } ! $line = str_replace('{{#', '{{', $line); ! $line = str_replace('#}}', '}}', $line); ! return $line; } /** --- 389,397 ---- $var_value = WebApp::getVarValue($var_name); $var_value = WebApp::escape_quotes($var_value, $quote); ! $str = str_replace($str2replace, $var_value, $str); } ! $str = str_replace('{{#', '{{', $str); ! $str = str_replace('#}}', '}}', $str); ! return $str; } /** *************** *** 576,580 **** $err_msg = str_replace(UP_PATH, '', $err_msg); $err_msg = htmlentities($err_msg); ! return "\n<span class='webapp_error'><b>WebApp Error:</b> " . $err_msg . "</span>\n"; } --- 575,579 ---- $err_msg = str_replace(UP_PATH, '', $err_msg); $err_msg = htmlentities($err_msg); ! return "\n<span class='webapp_error'><strong>WebApp Error:</strong> " . $err_msg . "</span>\n"; } *************** *** 587,594 **** $err_msg = str_replace(UP_PATH, '', $err_msg); $warn_msg = htmlentities($warn_msg); ! return "\n<span class='webapp_warning'><b>WebApp Warning:</b> " . $warn_msg . "</span>\n"; } ! } ?> \ No newline at end of file --- 586,611 ---- $err_msg = str_replace(UP_PATH, '', $err_msg); $warn_msg = htmlentities($warn_msg); ! return "\n<span class='webapp_warning'><strong>WebApp Warning:</strong> " . $warn_msg . "</span>\n"; } ! ! /** Format and return an xml error message. */ ! function xml_err_msg($fname, $line_nr, $col_nr, $error_string, $xml_string) ! { ! if (!SHOW_ERROR_MESSAGES) return ""; ! ! $fname = str_replace(UP_PATH, '', $fname); ! $xml_string = htmlentities($xml_string); ! ! $err_msg = " ! <div class='xml_error'> ! <strong>XML Error:</strong> $error_string. At <strong>$fname</strong>, ! line <strong>$line_nr</strong>, column <strong>$col_nr</strong>: <br> ! <span class='xml_err_str'>...$xml_string</span>. ! </div> ! "; ! ! return $err_msg; ! } } ?> \ No newline at end of file |