Пример #1
0
 /**
  * Handle a generic error.
  * Shows a message and uses the context to determine how much additional information
  * to show (in the page title or the navigation bar).
  * @param $message
  * @param string $caption
  * @param int|\WEBCORE_OBJECT $context
  * @internal param string $msg
  */
 public function raise_error($message, $caption = '', $context = 0)
 {
     if (is_a($context, 'folder')) {
         $this->location->add_folder_link($context);
         $this->title->add_object($context);
     } else {
         $this->location->add_root_link();
         if (is_a($context, 'group')) {
             $this->location->append('Groups', 'view_groups.php');
         } elseif (is_a($context, 'user')) {
             $this->location->append('Users', 'view_users.php');
         }
     }
     if (!$caption) {
         $caption = $this->title->subject;
     }
     $this->title->subject = $caption;
     $this->location->append($this->title->subject, '', '{icons}/indicators/error');
     $this->start_display();
     ?>
 <div class="main-box">
   <div class="text-flow">
     <?php 
     $this->show_message($message);
     ?>
   <div>
 </div>
 <?php 
     $this->finish_display();
 }