/[cvs]/nfo/php/libs/org.netfrag.glib/DesignPattern/RemoteProxy.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.glib/DesignPattern/RemoteProxy.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by joko, Fri Mar 28 03:05:54 2003 UTC revision 1.12 by joko, Sat Mar 29 08:01:21 2003 UTC
# Line 18  Line 18 
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
25     *    VERBOSE mode
26     *
27   *    Revision 1.10  2003/03/28 03:05:54  joko   *    Revision 1.10  2003/03/28 03:05:54  joko
28   *    more fancy debugging-output   *    more fancy debugging-output
29   *   *
# Line 513  class DesignPattern_RemoteProxy extends Line 519  class DesignPattern_RemoteProxy extends
519      $status = $this->backend->getStatus();      $status = $this->backend->getStatus();
520      //print Dumper($status);      //print Dumper($status);
521            
522      $style = html_style("text/css", '.caption { color: yellow }');      $style = html_style("text/css", '.boxlabel_yellow { color: yellow; font-weight:bold; }');
       
523      $statusbox = html_div();      $statusbox = html_div();
524      $statusbox->set_style('background: #558856; border: 2px black groove; width:640px; padding:10px; margin:40px;');      $statusbox->set_style('background: red; border: 2px black groove; width:640px; padding:10px; margin:40px;');
525      $statusbox->add( html_b("Connected:"), $status[connected], html_br() );      $statusbox->add( html_span('boxlabel_yellow', "Connected:"), $status[connected], html_br() );
     $statusbox->add( html_span('caption', "Connected:"), $status[connected], html_br() );  
526      foreach ($status[errors] as $error) {      foreach ($status[errors] as $error) {
527        $statusbox->add( html_span('caption', "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)) {
531        $good = 1;        $good = 1;
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.";
       $statusbox->add( $message, html_br() );  
534        logp($message, PEAR_LOG_CRIT);        logp($message, PEAR_LOG_CRIT);
535          $statusbox->add( html_span('boxlabel_yellow', "Critical:"), $message, html_br() );
536      }      }
537    
538      if ($good && sizeof($result)) {      if ($good && sizeof($result)) {
# Line 546  class DesignPattern_RemoteProxy extends Line 550  class DesignPattern_RemoteProxy extends
550        $this->flushState();        $this->flushState();
551            
552      } else {      } else {
553        print $style->render();        if (constants::get('VERBOSE') || constants::get('ERRORS_ONLY')) {
554        print $statusbox->render();          print $style->render();
555            print $statusbox->render();
556          } else {
557            foreach ($status[errors] as $error) {
558              print Dumper($error);
559            }
560          }
561            
562      }      }
563            

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.12

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed