Commit 4dac201e authored by Dries's avatar Dries

- Patch by Ulf: XHTML-ified the code.
parent c52a3fea
......@@ -58,7 +58,7 @@ function _db_query($query, $debug = 0) {
$result = $db_handle->query($query);
if ($debug) {
print "<p>query: $query<br />";
print "<p>query: $query</p>";
}
if (DB::isError($result)) {
......
......@@ -29,13 +29,13 @@ function pager_display($tags = "", $limit = 10, $element = 0, $type = "default",
* @see pager_display
*/
function pager_display_default($tags = "", $limit = 10, $element = 0, $attributes = array()) {
$output .= "<center><table cellpadding=\"10\"><tbody><tr>";
$output .= "<div align=\"center\"><table cellpadding=\"10\"><tbody><tr>";
$output .= "<td align=\"center\">". pager_first(($tags[0] ? $tags[0] : t("first page")), $limit, $element, $attributes) ."</td>";
$output .= "<td align=\"center\">". pager_previous(($tags[1] ? $tags[1] : t("previous page")), $limit, $element, 1, $attributes) ."</td>";
$output .= "<td align=\"center\">". pager_list($limit, $element, ($tags[2] ? $tags[2] : 9 ), "", $attributes) ."</td>";
$output .= "<td align=\"center\">". pager_next(($tags[3] ? $tags[3] : t("next page")), $limit, $element, 1, $attributes) ."</td>";
$output .= "<td align=\"center\">". pager_last(($tags[4] ? $tags[4] : t("last page")), $limit, $element, $attributes) ."</td>";
$output .= "</tr></tbody></table></center>";
$output .= "</tr></tbody></table></div>";
return "$output";
}
......
......@@ -65,7 +65,7 @@ function node($node, $main) {
}
function box($subject, $content, $region = "main") {
$output = "<b>$subject</b><br />$content<p />";
$output = "<p><b>$subject</b><br />$content</p>";
print $output;
}
......
......@@ -644,8 +644,8 @@ function parseResponse($data="") {
$xmlrpc_value=new xmlrpcval;
if ($this->debug)
print "<PRE>---GOT---\n" . htmlspecialchars($data) .
"\n---END---\n</PRE>";
print "<pre>---GOT---\n" . htmlspecialchars($data) .
"\n---END---\n</pre>";
if ($data=="") {
error_log("No response received from server.");
$r=new xmlrpcresp(0, $xmlrpcerr["no_data"],
......@@ -701,9 +701,9 @@ function parseResponse($data="") {
}
xml_parser_free($parser);
if ($this->debug) {
print "<PRE>---EVALING---[" .
print "<pre>---EVALING---[" .
strlen($_xh[$parser]['st']) . " chars]---\n" .
htmlspecialchars($_xh[$parser]['st']) . ";\n---END---</PRE>";
htmlspecialchars($_xh[$parser]['st']) . ";\n---END---</pre>";
}
if (strlen($_xh[$parser]['st'])==0) {
// then something odd has happened
......@@ -752,12 +752,12 @@ function addScalar($val, $type="string") {
global $xmlrpcTypes, $xmlrpcBoolean;
if ($this->mytype==1) {
echo "<B>xmlrpcval</B>: scalar can have only one value<BR>";
echo "<b>xmlrpcval</b>: scalar can have only one value<br />";
return 0;
}
$typeof=$xmlrpcTypes[$type];
if ($typeof!=1) {
echo "<B>xmlrpcval</B>: not a scalar type (${typeof})<BR>";
echo "<b>xmlrpcval</b>: not a scalar type (${typeof})<br />";
return 0;
}
......@@ -787,8 +787,8 @@ function addScalar($val, $type="string") {
function addArray($vals) {
global $xmlrpcTypes;
if ($this->mytype!=0) {
echo "<B>xmlrpcval</B>: already initialized as a [" .
$this->kindOf() . "]<BR>";
echo "<b>xmlrpcval</b>: already initialized as a [" .
$this->kindOf() . "]<br />";
return 0;
}
......@@ -800,8 +800,8 @@ function addArray($vals) {
function addStruct($vals) {
global $xmlrpcTypes;
if ($this->mytype!=0) {
echo "<B>xmlrpcval</B>: already initialized as a [" .
$this->kindOf() . "]<BR>";
echo "<b>xmlrpcval</b>: already initialized as a [" .
$this->kindOf() . "]<br />";
return 0;
}
$this->mytype=$xmlrpcTypes["struct"];
......@@ -812,10 +812,10 @@ function addStruct($vals) {
function dump($ar) {
reset($ar);
while ( list( $key, $val ) = each( $ar ) ) {
echo "$key => $val<br>";
echo "$key => $val<br />";
if ($key == 'array')
while ( list( $key2, $val2 ) = each( $val ) ) {
echo "-- $key2 => $val2<br>";
echo "-- $key2 => $val2<br />";
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment