function addImageColumn($imagePath, $columnClass)
 {
     $div = new html_element("div");
     $div->set('class', 'col-md-6');
     $this->img = new html_element("img");
     $this->img->set('src', $imagePath);
     $div->inject($this->img);
     $this->row->inject($div);
 }
 public function validateUser()
 {
     if (!isset($_SESSION['usuario'])) {
         print 'No tienes permisos para estar aqui';
         $button = new html_element('a');
         $button->set('href', '/index/login');
         $button->set('text', 'Click here!');
         $button->output();
         die;
     }
 }
function displayHTML($contentTileArray)
{
    // Sort tiles based on defined order
    uasort($contentTileArray, 'sortByOrder');
    $count = 1;
    foreach ($contentTileArray as $tile) {
        // get the layout for the current tile and render using proper HTML
        switch (intval($tile['layout'])) {
            case 1:
                // Default 2 column layout with with alternating columns.
                $row = new pageTile("contentTile " . $tile['containerClass']);
                if ($count % 2 == 0) {
                    $row->addTextColumn($tile['col1'], "col-md-push-6");
                    $row->addTextColumn($tile['col2'], "col-md-pull-6");
                } else {
                    $row->addTextColumn($tile['col1'], "");
                    $row->addTextColumn($tile['col2'], "");
                }
                echo $row->build();
                break;
            case 2:
                // Image Slider layout
                $row = new pageTile("contentTile " . $tile['containerClass']);
                echo "NOT IMPLEMENTED";
                break;
            case 4:
                // Employee directory display
                $row = new pageTile("contentTile employeeBio");
                $row->addsmTextColumn($tile['col1'], "");
                $row->addsmTextColumn($tile['col2'], "");
                echo $row->build();
                break;
            case 5:
                // Custom Layout, create row and insert col1 data
                $row = new pageTile($tile['containerClass']);
                // REMOVED ." hidden-xs"
                $row->setText($tile['col1']);
                echo $row->build();
                break;
            case 6:
                // Google serch results layout
                $row = new html_element("div");
                $row->set("class", "row");
                $col = new html_element("div");
                $col->set("class", "col-md-12 " . $tile['col12']);
                $col->set("text", $tile['col1']);
                $row->inject($col);
                echo $row->build();
                break;
        }
        $count++;
    }
}
Example #4
0
 protected function render($param = null)
 {
     $encoding = $this->htdoc->get('encoding');
     $title = htmlspecialchars($this->htdoc->get('title'));
     $this->meta_content_type->attr = array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=' . $encoding);
     $this->title_elm->members = array($title);
     return parent::render($param);
 }
Example #5
0
 public function set_form_context($context)
 {
     if (!empty($this->form_context)) {
         $this->form_context->detach_control($this);
     }
     parent::set_form_context($context);
     if (!empty($this->form_context)) {
         $this->form_context->attach_control($this);
     }
 }
Example #6
0
 public function __construct()
 {
     parent::__construct('table');
     $this->attr['border'] = 0;
     $this->attr['cellspacing'] = 0;
     $this->attr['cellpadding'] = 0;
     $args = func_get_args();
     foreach ($args as $key => $col) {
         if ($col instanceof html_column) {
             $this->columns[$key] = $col;
         } else {
             throw new Exception("Invalid column");
         }
     }
 }
Example #7
0
 /**
  * @desc Construct a form element, any arguments after the 3 first are passed to html_block::__construct()
  * @param string $action action URL
  * @param string $method post or get
  * @param boolean $file_upload if true, enctype="multipart/form-data"
  * @param unknown_type $attr
  */
 public function __construct($action, $method = 'post', $file_upload = false)
 {
     parent::__construct('form', $attr);
     $this->form_context = new html_form_context($method);
     $this->attr['action'] = (string) $action;
     $this->attr['method'] = $method;
     if ($file_upload) {
         $this->set_upload();
     }
     if (func_num_args() > 4) {
         $args = func_get_args();
         array_shift($args);
         array_shift($args);
         array_shift($args);
         $this->add($args);
     }
 }
Example #8
0
 public function addElement($text, $value, $type = '', $id = '', $class = '')
 {
     $label = new html_element('label');
     $label->set('text', $this->clean($text));
     $element = new html_element('input');
     $element->set('id', $id);
     $element->set('class', $class);
     $element->set('value', $value);
     if ($type != '') {
         $element->set('type', $type);
     }
     $this->form .= $label->build() . $element->build();
 }
Example #9
0
 public function __construct($script, $is_link = true, $do_shrink = true)
 {
     $attr = array('type' => 'text/javascript');
     // check for character mask to distinguish inline script
     if (strcspn($script, "\n\r{}\$;") != strlen($script)) {
         $is_link = false;
     }
     if ($is_link) {
         $attr['src'] = $script;
         parent::__construct("script", $attr, " ");
     } else {
         $is_xml = empty($this->htdoc) ? true : $this->htdoc->is_xml;
         // strip out any comments
         if ($do_shrink) {
             $script = preg_replace("#//.*#", "", $script);
             $script = preg_replace("#/\\*.*\\*/#s", "", $script);
             $script = preg_replace('/[\\s]+/', ' ', $script);
         }
         if ($is_xml) {
             $script = "/* <![CDATA[ */ {$script} /* ]]> */";
         }
         parent::__construct("script", $attr, $script);
     }
 }
Example #10
0
 protected function render($param = null)
 {
     $pkg = self::get_pkg();
     $size = $this->size;
     if (isset($param[0])) {
         $size = $param[0];
     }
     if (preg_match('/\\.swf$/i', $this->attr['src'])) {
         return $this->render_flash($pkg, $size);
     }
     if (isset($pkg->config['thumb_sizes'][$size])) {
         $attr_save = $this->attr;
         $sz = $pkg->config['thumb_sizes'][$size];
         unset($this->attr['width']);
         unset($this->attr['height']);
         if (isset($sz['w'])) {
             $this->attr['width'] = $sz['w'];
         }
         if (isset($sz['h'])) {
             $this->attr['height'] = $sz['h'];
         }
         if ($this->set_thumb_size && isset($this->width) && isset($this->height)) {
             if (!isset($this->attr['width']) && isset($sz['h'])) {
                 $thumb_w = floor($this->width * ($sz['h'] / $this->height));
                 $this->attr['width'] = $thumb_w;
             }
             if (!isset($this->attr['height']) && isset($sz['w'])) {
                 $thumb_h = floor($this->height * ($sz['w'] / $this->width));
                 $this->attr['height'] = $thumb_h;
             }
         }
         $phpthumb = $pkg->config['phpthumb_url'];
         // display thumbnails using phpThumb if availiable
         if ((function_exists('phpThumbURL') || !empty($phpthumb)) && !preg_match('/\\.gif$/i', $this->attr['src'])) {
             $pt_param = '';
             foreach ($sz as $k => $v) {
                 $pt_param .= "&{$k}={$v}";
             }
             if (function_exists('phpThumbURL')) {
                 $this->attr['src'] = phpThumbURL('src=' . urlencode($this->attr['src']) . $pt_param);
             } else {
                 $this->attr['src'] = $phpthumb . '?src=' . urlencode($this->attr['src']) . $pt_param;
             }
         }
         $res = parent::render();
         $this->attr = $attr_save;
         return $res;
     }
     return parent::render();
 }
Example #11
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<?php 
// Create the HTML header tag with the class of the session page type variable.
$html_opening_tag = new html_element('html', null, array('xmlns' => 'http://www.w3.org/1999/xhtml', 'class' => $_SESSION['pageType']));
$html_opening_tag->__toString();
?>
<head>
  <link rel="stylesheet" href="build/css/main.css">
  <link rel="stylesheet" href="build/css/server.css">
  <link rel="stylesheet" href="build/css/roster.css">
  <link rel="stylesheet" href="build/css/ranks.css">
  <link rel="stylesheet" href="build/css/about.css">
  <link rel="stylesheet" href="build/css/laws.css">
  
  <title>ExiledOrder.com</title>
  <link rel="shortcut icon" href="http://www.exiledorder.com/favicon.ico">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
  <nav class="desktop-nav-wrapper">
    <ul class="desktop-nav">
      <li class="logo icn"></li>
      <li><a href="index.php?id=home">HOMEPAGE</a></li>
      <li><a href="index.php?id=roster">ROSTER</a></li>
      <li><a href="/forums">FORUMS</a></li>
      <li><a href="index.php?id=rank">RANKS</a></li>
      <li><a href="index.php?id=laws">LAWS</a></li>
      <li><a href="index.php?id=servers">SERVERS</a></li>
      <li><a href="http://exiledorder.com/forums/index.php?/forms/2-application-form/">JOIN&nbsp;US</a></li>