| 18 |
* $Id$ |
* $Id$ |
| 19 |
* ------------------------------------------------------------------------- |
* ------------------------------------------------------------------------- |
| 20 |
* $Log$ |
* $Log$ |
| 21 |
|
* Revision 1.11 2003/03/28 06:44:51 joko |
| 22 |
|
* VERBOSE mode |
| 23 |
|
* |
| 24 |
* Revision 1.10 2003/03/28 03:05:54 joko |
* Revision 1.10 2003/03/28 03:05:54 joko |
| 25 |
* more fancy debugging-output |
* more fancy debugging-output |
| 26 |
* |
* |
| 516 |
$status = $this->backend->getStatus(); |
$status = $this->backend->getStatus(); |
| 517 |
//print Dumper($status); |
//print Dumper($status); |
| 518 |
|
|
| 519 |
$style = html_style("text/css", '.caption { color: yellow }'); |
if (constants::get('VERBOSE')) { |
| 520 |
|
$style = html_style("text/css", '.boxlabel_yellow { color: yellow; font-weight:bold; }'); |
| 521 |
$statusbox = html_div(); |
$statusbox = html_div(); |
| 522 |
$statusbox->set_style('background: #558856; border: 2px black groove; width:640px; padding:10px; margin:40px;'); |
$statusbox->set_style('background: #558856; border: 2px black groove; width:640px; padding:10px; margin:40px;'); |
| 523 |
$statusbox->add( html_b("Connected:"), $status[connected], html_br() ); |
$statusbox->add( html_span('boxlabel_yellow', "Connected:"), $status[connected], html_br() ); |
| 524 |
$statusbox->add( html_span('caption', "Connected:"), $status[connected], html_br() ); |
foreach ($status[errors] as $error) { |
| 525 |
foreach ($status[errors] as $error) { |
$statusbox->add( html_span('boxlabel_yellow', "Error($error[code]):"), $error[message], html_br() ); |
| 526 |
$statusbox->add( html_span('caption', "Error[$error[code]]:"), $error[message], html_br() ); |
} |
| 527 |
} |
} |
| 528 |
|
|
| 529 |
if (is_array($result)) { |
if (is_array($result)) { |
| 530 |
$good = 1; |
$good = 1; |
| 531 |
} else { |
} else { |
| 532 |
$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."; |
|
$statusbox->add( $message, html_br() ); |
|
| 533 |
logp($message, PEAR_LOG_CRIT); |
logp($message, PEAR_LOG_CRIT); |
| 534 |
|
if (constants::get('VERBOSE')) { |
| 535 |
|
$statusbox->add( html_span('boxlabel_yellow', "Critical:"), $message, html_br() ); |
| 536 |
|
} |
| 537 |
} |
} |
| 538 |
|
|
| 539 |
if ($good && sizeof($result)) { |
if ($good && sizeof($result)) { |
| 551 |
$this->flushState(); |
$this->flushState(); |
| 552 |
|
|
| 553 |
} else { |
} else { |
| 554 |
print $style->render(); |
if (constants::get('VERBOSE')) { |
| 555 |
print $statusbox->render(); |
print $style->render(); |
| 556 |
|
print $statusbox->render(); |
| 557 |
|
} else { |
| 558 |
|
foreach ($status[errors] as $error) { |
| 559 |
|
print Dumper($error); |
| 560 |
|
} |
| 561 |
|
} |
| 562 |
|
|
| 563 |
} |
} |
| 564 |
|
|