/**
  * Display page content
  *
  * @access	public
  */
 public function display_content()
 {
     if (VPost::submit(false)) {
         Html::header_contact();
         Html::contact_submitted($this->_result);
     } else {
         echo '<form method="post" action="#" accept-charset="utf-8">';
         Html::header_contact();
         Html::contact('o');
         foreach ($this->_users as $user) {
             Html::option($user['user_email'], $user['user_publicname']);
         }
         Html::contact('c');
         echo '</form>';
     }
 }
    echo '<li class="tmenu"><a href="' . WS_URL . '?ctl=' . $item['ctl'] . '">' . $item['name'] . '</a></li>';
}
?>
        		
        	</ul>
            
        </header>
        
        <section id="corps">
        
        	<ul id="menu">
        		<li id="search">
        			<form class="form" method="get" action="index.php">
        				<input type="hidden" name="ctl" value="search" />
        				<input type="text" name="q" placeholder="  Search..." list="titles" />
        				<?php 
Html::datalist('titles');
?>
        			</form>
        		</li>
        		<?php 
foreach ($menu as $item) {
    echo '<li class="menut">' . $item . '</li>';
}
?>
        	</ul>
        	                        
        	                        
        	<section id="content">
        	                        
        		
Exemplo n.º 3
0
 *   Lynxpress is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with Lynxpress.  If not, see http://www.gnu.org/licenses/.
 */
namespace Site;

use Library\Variable\Server as VServer;
use Library\Mail\Mail;
use Exception;
try {
    define('PATH', '');
    define('INC', 'includes/');
    define('ADMIN', 'admin/');
    require_once 'config.php';
    require_once INC . 'class.loader.inc.php';
    Loader::load();
    new Session();
    $title = '404 Page Not Found';
    $menu = array('Sorry but the Lynx didn\'t show up');
    require_once Html::header();
    Html::_404();
    require_once Html::footer();
    $mail = new Mail(WS_EMAIL, '"404 not found reached', str_replace('",', "\",\n", json_encode(VServer::all())));
    $mail->send();
} catch (Exception $e) {
    die('<h1>' . $e->getMessage() . '</h1>');
}
 /**
  * Display page content
  *
  * @access	public
  */
 public function display_content()
 {
     Html::header_authors(VGet::author());
     if (!empty($this->_content)) {
         if (!VSession::html5()) {
             echo '<ul id="authors">';
         }
         foreach ($this->_content as $user) {
             Html::author($user->_publicname, $user->_email, $user->_website, $user->_msn, $user->_twitter, $user->_facebook, $user->_google, $user->_avatar, $user->_bio);
         }
         if (!VSession::html5()) {
             echo '</ul>';
         }
     } else {
         Html::no_content('Wanted user doesn\'t exist');
     }
 }
 /**
  * Display page content
  *
  * @access	public
  */
 public function display_content()
 {
     if (!empty($this->_content)) {
         Html::header_links();
         if (!VSession::html5()) {
             echo '<ul id="links">';
         }
         foreach ($this->_content as $link) {
             Html::related_link($link->_name, $link->_link, $link->_rss_link, $link->_notes, $link->_priority);
         }
         if (!Vsession::html5()) {
             echo '</ul>';
         }
     } else {
         Html::header_links();
         if (!VSession::html5()) {
             echo '<ul id="links">';
         }
         Html::no_content('There\'s no link registered yet.');
         if (!Vsession::html5()) {
             echo '</ul>';
         }
     }
 }
 /**
  * Display comments about an album
  *
  * @access	private
  */
 private function display_comments()
 {
     Html::header_albums($this->_album->_name . ' > Comments');
     Html::album_details($this->_album->_id, $this->_album->_author_name, $this->_album->_date, nl2br($this->_album->_description), $this->_album->_name, WS_URL . '?ctl=' . $this->_pid . '&album=' . $this->_album->_id);
     echo '<br/><span id="go_back_album"><a href="' . PATH . '?ctl=' . $this->_pid . '&album=' . VGet::album() . '">Go Back</a></span>';
     if (VSession::renderer() != 'mobile') {
         //create comment section
         if ($this->_album->_allow_comment == 'open') {
             $c = new Comments($this->_album->_id);
             $c->display_content();
         } else {
             Html::comment_closed();
         }
     }
 }
 /**
  * Display a specific post
  *
  * @access	private
  */
 private function display_news()
 {
     if (!empty($this->_content)) {
         $cats = explode(',', $this->_content[0]->_category);
         try {
             foreach ($cats as &$cat) {
                 $id = $cat;
                 $infos = new Category($id);
                 $cat = Helper\Posts::make_category_link($id, $infos->_name);
             }
         } catch (Exception $e) {
             @error_log($e->getMessage() . ' file: ' . __FILE__ . '; line: ' . __LINE__, 1, WS_EMAIL);
         }
         $content = nl2br($this->_content[0]->_content);
         $tags = explode(',', $this->_content[0]->_tags);
         foreach ($tags as &$tag) {
             $tag = Helper\Posts::make_tag_link($tag);
         }
         $link = WS_URL . '?ctl=posts&news=' . $this->_content[0]->_title;
         Html::html5('o', 'id="news_alone">');
         Html::article_alone($this->_content[0]->_title, $this->_content[0]->_date, $this->_content[0]->_author_name, $cats, $content, $tags, $link, $this->_content[0]->_updated, $this->_content[0]->_update_author_name);
         if (VSession::renderer() != 'mobile') {
             //create comment section
             if ($this->_content[0]->_allow_comment == 'open') {
                 $c = new Comments($this->_content[0]->_id);
                 $c->display_content();
             } else {
                 Html::comment_closed();
             }
         }
         Html::html5('c');
     }
 }
 /**
  * Display an error message what says there's no result for the search
  *
  * @access	private
  */
 private function display_error()
 {
     if (!empty($this->_search)) {
         $msg = $this->_search;
     } elseif (!empty($this->_by_date)) {
         $msg = date('M Y', strtotime($this->_by_date));
     } elseif (!empty($this->_tag)) {
         $msg = $this->_tag;
     } elseif (!empty($this->_cat)) {
         try {
             $cat = new Category($this->_cat);
             $msg = ucwords($cat->_name);
         } catch (Exception $e) {
             header('Location: 404.php');
         }
     }
     if (!VSession::html5()) {
         echo '<ul id="listing_articles">';
     }
     Html::no_content('No results founded for "' . $msg . '"');
     if (!VSession::html5()) {
         echo '</ul>';
     }
 }
 /**
  * Display message after contact form has been submitted
  *
  * @static
  * @access	public
  * @param	mixed [$result]
  */
 public static function contact_submitted($result)
 {
     MHtml::html5('o', 'id="contact_form">');
     if ($result === 'false email') {
         echo '<span id="c_error">Your e-mail is not a valid one</span>';
     } elseif ($result === false) {
         echo '<span id="c_error">You need to fill all inputs</span>';
     } else {
         echo '<span id="c_well">Your message has been sent</span>';
     }
     MHtml::html5('c');
 }
 /**
  * Display retrieved comments
  *
  * @access	private
  */
 private function display_comments()
 {
     if (!empty($this->_comments)) {
         $com_link = $this->build_link();
         Html::html5('o');
         foreach ($this->_comments as $comment) {
             Html::comment($comment->_id, $comment->_name, $comment->_date, $com_link, nl2br($comment->_content), $comment->_email);
         }
         Html::html5('c');
     }
 }
 /**
  * Display page content
  *
  * @access	public
  */
 public function display_content()
 {
     if (VGet::cat()) {
         $add = $this->_menu[VGet::cat()];
     } else {
         $add = null;
     }
     Html::header_videos($add);
     if (!empty($this->_content)) {
         Html::html5('o', 'id="videos">');
         if (!VSession::html5()) {
             echo '<ul>';
         }
         foreach ($this->_content as $video) {
             Html::video($video->_name, $video->_author_publicname, $video->_permalink, $video->_embed_code, nl2br($video->_description), $video->_date);
         }
         if (!VSession::html5()) {
             echo '</ul>';
         }
         Html::html5('c');
     } else {
         if (!VSession::html5()) {
             echo '<ul>';
         }
         Html::no_content('There\'s no videos right now.');
         if (!VSession::html5()) {
             echo '</ul>';
         }
     }
 }