ACC SHELL

Path : /srv/www/vhosts/petrikov/test/
File Upload :
Current File : /srv/www/vhosts/petrikov/test/index.php

<?php 

  require_once('epf/main.php'); 

  class IndexServlet extends Servlet { 

    function get_title() { 
      return 'EPF tutorial'; 
    } 

    function work() { 
      $q = query('SELECT `name`, `email`, `message` FROM `comments`'); 
           
      foreach ($q as $comment): 
        $message = nl2br_and_link2a_XML($this->get_doc(), $comment->message); 
        $message = xml_convert_regex2elem($this->get_doc(), $message, 
                     '#(\[b\].*?\[/b\])#i', 
                     new ExtractingElementCreator('#\[b\](.*?)\[/b\]#i', 'b')); 

        $this->add('comment', array( 
          'message' => $message, 
          'name' => $comment->name, 
          'email' => email($this->get_doc(), $comment->email) 
        )); 
      endforeach; 
    } 

  } 

  $servlet = new IndexServlet(); 
  $servlet->run(); 

?>

ACC SHELL 2018