18 |
* $Id$ |
* $Id$ |
19 |
* ------------------------------------------------------------------------- |
* ------------------------------------------------------------------------- |
20 |
* $Log$ |
* $Log$ |
21 |
|
* Revision 1.12 2003/03/29 08:01:21 joko |
22 |
|
* modified ErrorBoxing |
23 |
|
* |
24 |
* Revision 1.11 2003/03/28 06:44:51 joko |
* Revision 1.11 2003/03/28 06:44:51 joko |
25 |
* VERBOSE mode |
* VERBOSE mode |
26 |
* |
* |
519 |
$status = $this->backend->getStatus(); |
$status = $this->backend->getStatus(); |
520 |
//print Dumper($status); |
//print Dumper($status); |
521 |
|
|
522 |
if (constants::get('VERBOSE')) { |
$style = html_style("text/css", '.boxlabel_yellow { color: yellow; font-weight:bold; }'); |
523 |
$style = html_style("text/css", '.boxlabel_yellow { color: yellow; font-weight:bold; }'); |
$statusbox = html_div(); |
524 |
$statusbox = html_div(); |
$statusbox->set_style('background: red; border: 2px black groove; width:640px; padding:10px; margin:40px;'); |
525 |
$statusbox->set_style('background: #558856; border: 2px black groove; width:640px; padding:10px; margin:40px;'); |
$statusbox->add( html_span('boxlabel_yellow', "Connected:"), $status[connected], html_br() ); |
526 |
$statusbox->add( html_span('boxlabel_yellow', "Connected:"), $status[connected], html_br() ); |
foreach ($status[errors] as $error) { |
527 |
foreach ($status[errors] as $error) { |
$statusbox->add( html_span('boxlabel_yellow', "Error($error[code]):"), $error[message], html_br() ); |
|
$statusbox->add( html_span('boxlabel_yellow', "Error($error[code]):"), $error[message], html_br() ); |
|
|
} |
|
528 |
} |
} |
529 |
|
|
530 |
if (is_array($result)) { |
if (is_array($result)) { |
532 |
} else { |
} else { |
533 |
$message = get_class($this) . "->_loadRemote: Error while trying to talk to remote side. Please check wire, socket or api."; |
$message = get_class($this) . "->_loadRemote: Error while trying to talk to remote side. Please check wire, socket or api."; |
534 |
logp($message, PEAR_LOG_CRIT); |
logp($message, PEAR_LOG_CRIT); |
535 |
if (constants::get('VERBOSE')) { |
$statusbox->add( html_span('boxlabel_yellow', "Critical:"), $message, html_br() ); |
|
$statusbox->add( html_span('boxlabel_yellow', "Critical:"), $message, html_br() ); |
|
|
} |
|
536 |
} |
} |
537 |
|
|
538 |
if ($good && sizeof($result)) { |
if ($good && sizeof($result)) { |
550 |
$this->flushState(); |
$this->flushState(); |
551 |
|
|
552 |
} else { |
} else { |
553 |
if (constants::get('VERBOSE')) { |
if (constants::get('VERBOSE') || constants::get('ERRORS_ONLY')) { |
554 |
print $style->render(); |
print $style->render(); |
555 |
print $statusbox->render(); |
print $statusbox->render(); |
556 |
} else { |
} else { |