Beispiel #1
0
 /**
  * Generate <head> output
  */
 public function head()
 {
     echo HTML::paired_tag('title', $this->info->title->toString(config('meta.title.delimiter', ' &raquo; '))) . "\n";
     echo HTML::tag('meta', array('type' => 'keywords', 'content' => $this->info->keywords->toString(', '))) . "\n";
     echo HTML::tag('meta', array('type' => 'description', 'content' => $this->info->description->toString('. '))) . "\n";
     event('theme.head.meta.after');
 }
Beispiel #2
0
 public function render()
 {
     if ($this->callback) {
         $callback = Cogear::prepareCallback($this->callback);
         $this->setValues(call_user_func($callback));
     }
     $this->setAttributes();
     $code = array();
     foreach ($this->values as $key => $value) {
         $attributes = $this->attributes;
         $attributes['value'] = $key;
         if ($key === $this->value) {
             $attributes['checked'] = 'checked';
         }
         $code[] = HTML::tag('input', $attributes) . $value;
     }
     $code = implode("<br/>", $code);
     if ($this->wrapper) {
         $tpl = new Template($this->wrapper);
         $tpl->assign($this->attributes);
         $tpl->code = $code;
         $code = $tpl->render();
     }
     return $code;
 }
Beispiel #3
0
 public static function default_option($title = NULL)
 {
     if ($title === NULL) {
         $title = 'Seleccione';
     }
     return HTML::tag('option', __($title), array('value' => ''));
 }
Beispiel #4
0
 public function __construct()
 {
     $this->html = HTML::tag('table', array());
     $this->html->setOption('br.beforeContent', TRUE);
     $this->html->content = array();
     $this->firstTR = TRUE;
 }
Beispiel #5
0
 protected function _build($result, $default = NULL)
 {
     $html = $this->request->query('multiple') ? '' : HTML::default_option($default);
     foreach ($result as $key => $val) {
         $html .= HTML::tag('option', $val, array('value' => $key));
     }
     return $html;
 }
Beispiel #6
0
 /**
  * Hook meta
  */
 public function hookResponse($Response)
 {
     $output = "";
     $output .= HTML::paired_tag('title', $this->info->title->toString(config('meta.title.delimiter', ' &raquo; '))) . "\n";
     $output .= HTML::tag('meta', array('type' => 'keywords', 'content' => $this->info->keywords->toString(', '))) . "\n";
     $output .= HTML::tag('meta', array('type' => 'description', 'content' => $this->info->description->toString('. '))) . "\n";
     $Response->output = str_replace(self::SNIPPET, $output, $Response->output);
 }
Beispiel #7
0
 /**
  * Helper method for building media tags.
  *
  * @param string $type       Tag type
  * @param mixed  $files      File or array of files
  * @param array  $attributes (optional) Tag attributes
  */
 protected static function buildMedia($type, $files, $attributes)
 {
     $sources = '';
     foreach ((array) $files as $file) {
         $sources .= HTML::tag('source', array('src' => $file));
     }
     return static::tag($type, $attributes, $sources);
 }
Beispiel #8
0
 protected function doInit()
 {
     $avaibleWidth = 100;
     $leftSpace = (int) floor($this->space / 2);
     $rightSpace = $this->space - $leftSpace;
     $left = $this->width - $leftSpace;
     $right = $avaibleWidth - $this->width - $rightSpace;
     $this->html = HTML::tag('div', (object) array('left' => HTML::tag('div', $this->leftContent, array('class' => 'left'))->setStyles(array('float' => 'left', 'width' => $left . '%', 'height' => '100%', 'margin-right' => $this->space . '%')), 'right' => HTML::tag('div', $this->rightContent, array('class' => 'right'))->setStyles(array('width' => $right . '%', 'float' => 'left', 'height' => '100%')), 'clear' => HTML::tag('div', NULL, array('style' => 'clear: left'))), array('class' => '\\Psc\\splitpane'));
 }
Beispiel #9
0
 public static function imageUrlDefault()
 {
     $pathImage = IMAGE_PATH . '/default.png';
     if (file_exists($pathImage) && !is_dir($pathImage)) {
         list($width, $height) = getimagesize($pathImage);
         // พบไฟล์
         return HTML::tag('img', System::$urlImage . 'default.png' . HTML::getFileCache(), ['width' => $width, 'height' => $height]);
     }
 }
Beispiel #10
0
 /**
  * return a script tag
  */
 function script($content = '')
 {
     $tag = 'script';
     $attr = array();
     // html5 specifies default values for type attributes
     if (HTML::html_version() != 5) {
         $attr['type'] = 'text/javascript';
     }
     return HTML::tag($tag, $attr, $content);
 }
Beispiel #11
0
 /**
  * Build the UI alerts
  *
  * @param array 		$alerts
  * @return UI\HTML
  */
 public function build_alert($alerts)
 {
     return HTML::tag('div', function () use($alerts) {
         // loop trough all alert types
         foreach ($alerts as $type => $items) {
             foreach ($items as $alert) {
                 $alert = implode("<br>\n", $alert);
                 // close button
                 $close = HTML::tag('button', '&times;')->add_class('close')->type('button')->data('dismiss', 'alert');
                 // alert div
                 echo HTML::tag('div', $close . $alert)->add_class('alert fade in')->add_class('alert-' . $type);
             }
         }
     })->add_class('ui-alert-container');
 }
Beispiel #12
0
 public function morph()
 {
     foreach ($this->inputs as $key => $input) {
         if (!$input instanceof FormInput) {
             $input = new FormInput($input);
         }
         foreach ($this->styles as $style => $v) {
             if ($input->isAllowedStyle($style)) {
                 $input->getTag()->setStyle($style, $v);
             }
         }
         if ($this->getOption('wrap', TRUE)) {
             $wrapper = HTML::tag('div', new \stdClass(), array('class' => 'input-set-wrapper'));
             $wrapper->content->input = $input;
             $wrapper->content->input->morph();
             $this->elements[$key] = $wrapper;
         } else {
             $input->morph();
             $this->elements[$key] = $input;
         }
     }
     $this->morphed = TRUE;
     return $this;
 }
Beispiel #13
0
if (defined("OPEN_BUFFER") && OPEN_BUFFER) {
    defined("OPEN_ENCODING") && OPEN_ENCODING == "UTF-8" ? ob_start("_convert2Utf8") : ob_start();
}
if (strpos($_contentType, "application/xhtml+xml") !== false) {
    // To prevent 'short_open_tag = On' mistake
    echo '<?xml version="1.0" encoding="' . OPEN_ENCODING . '" standalone="no" ?>' . PHP_EOL;
}
echo '<!DOCTYPE html PUBLIC "' . $_docType . '">' . PHP_EOL;
echo HTML::start('html', array('xmlns' => 'http://www.w3.org/1999/xhtml', 'xml:lang' => str_replace("_", "-", OPEN_LANGUAGE), 'dir' => OPEN_DIRECTION));
echo HTML::start('head');
echo HTML::start('meta', array('http-equiv' => 'Content-Type', 'content' => $_contentType), true);
$_titlePage = isset($titlePage) ? $titlePage : (isset($title) && !empty($title) ? $title : "");
/**
 * @since 0.8
 */
$_titlePage .= isset($formError) && count($formError) > 0 && isset($focusFormField) ? " : " . _("Error occurred") : "";
if (defined("OPEN_CLINIC_NAME") && OPEN_CLINIC_NAME) {
    $_titlePage .= ' : ' . OPEN_CLINIC_NAME;
}
echo HTML::tag('title', $_titlePage);
//echo HTML::start('meta', array('http-equiv' => 'Content-Style-Type', 'content' => 'text/css2'), true);
echo HTML::start('meta', array('http-equiv' => 'Cache-Control', 'content' => 'no-store,no-cache,must-revalidate'), true);
echo HTML::start('meta', array('http-equiv' => 'Pragma', 'content' => 'no-cache'), true);
echo HTML::start('meta', array('http-equiv' => 'Expires', 'content' => '-1'), true);
echo HTML::start('meta', array('http-equiv' => 'imagetoolbar', 'content' => 'no'), true);
echo HTML::start('meta', array('name' => 'robots', 'content' => 'noindex,nofollow,noarchive'), true);
echo HTML::start('meta', array('name' => 'MSSmartTagsPreventParsing', 'content' => 'TRUE'), true);
echo HTML::start('meta', array('name' => 'author', 'content' => 'Jose Antonio Chavarría'), true);
echo HTML::start('meta', array('name' => 'copyright', 'content' => '2002-' . date("Y") . ' Jose Antonio Chavarría'), true);
echo HTML::start('meta', array('name' => 'keywords', 'content' => 'OpenClinic, open source, gpl, healthcare, php, mysql, coresis'), true);
echo HTML::start('meta', array('name' => 'description', 'content' => 'OpenClinic is an easy to use, open source, medical records system written in PHP'), true);
Beispiel #14
0
function tag($tag)
{
    HTML::macro($tag, function ($innards = '', $attributes = null) use($tag) {
        return HTML::tag($tag, $innards, $attributes);
    });
}
Beispiel #15
0
/**
 * test_fields.php
 *
 * Fields of medical test
 *
 * Licensed under the GNU GPL. For full terms see the file LICENSE.
 *
 * @package   OpenClinic
 * @copyright 2002-2008 jact
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL
 * @version   CVS: $Id: test_fields.php,v 1.22 2008/03/23 12:00:18 jact Exp $
 * @author    jact <*****@*****.**>
 */
require_once dirname(__FILE__) . "/../lib/exe_protect.php";
executionProtection(__FILE__);
$tbody = array();
$row = Form::label("document_type", _("Document Type") . ":");
$row .= Form::text("document_type", isset($formVar["document_type"]) ? $formVar["document_type"] : null, array('size' => 40, 'maxlength' => 128, 'error' => isset($formError["document_type"]) ? $formError["document_type"] : null));
$tbody[] = $row;
//$row .= Form::hidden("MAX_FILE_SIZE", "70000");
// @todo hacer helper para esta estructura
$row = Form::label("path_filename", _("Path Filename") . ":", array('class' => 'required'));
$row .= Form::file("path_filename", isset($formVar['path_filename']) ? $formVar['path_filename'] : null, array('size' => 50, 'readonly' => true, 'error' => isset($formError["path_filename"]) ? $formError["path_filename"] : null));
if (isset($formVar['path_filename'])) {
    $row .= Form::hidden('previous', $formVar['path_filename']);
    $row .= HTML::tag('strong', $formVar['path_filename'], array('class' => 'previous_file'));
}
$tbody[] = $row;
$tfoot = array(Form::button("save", _("Submit")) . Form::generateToken());
echo Form::fieldset($title, $tbody, $tfoot);
Beispiel #16
0
    echo Form::fieldset(_("Install file"), $body, $foot);
    echo HTML::end('form');
    echo HTML::para(HTML::link(_("Cancel"), './index.php'));
    include_once "../layout/footer.php";
    exit;
}
// end if
require_once "../model/Query.php";
$installQ = new Query();
$installQ->captureError(true);
if ($installQ->isError()) {
    echo HTML::para(_("The connection to the database failed with the following error:"));
    echo Msg::error($installQ->getDbError());
    echo HTML::rule();
    echo HTML::para(_("Please make sure the following has been done before running this install script."));
    $array = array(sprintf(_("Create OpenClinic database (%s of the install instructions)"), HTML::link(sprintf(_("step %d"), 4), '../install.html#step4')), sprintf(_("Create OpenClinic database user (%s of the install instructions)"), HTML::link(sprintf(_("step %d"), 5), '../install.html#step5')), sprintf(_("Update %s with your new database username and password (%s of the install instructions)"), HTML::tag('strong', 'openclinic/config/database_constants.php'), HTML::link(sprintf(_("step %d"), 8), '../install.html#step8')));
    echo HTML::itemList($array, null, true);
    echo HTML::para(sprintf(_("See %s for more details."), HTML::link(_("Install Instructions"), '../install.html')));
    include_once "../layout/footer.php";
    exit;
}
// end if
$installQ->close();
echo Msg::info(_("Database connection is good."));
echo HTML::start('form', array('method' => 'post', 'action' => $_SERVER['PHP_SELF'], 'enctype' => 'multipart/form-data'));
$body = array();
$body[] = Form::file("sql_file", null, array('size' => 50));
$foot = array(Form::button("view_file", _("View file")));
echo Form::fieldset(_("Install a SQL file"), $body, $foot);
echo HTML::end('form');
require_once "../layout/footer.php";
Beispiel #17
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\web\View;
use bedezign\yii2\audit\models\AuditEntrySearch;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('audit', 'Audit Entries');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="audit-entry-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view}'], 'id', ['attribute' => 'user_id', 'label' => Yii::t('audit', 'User ID'), 'class' => 'yii\\grid\\DataColumn', 'value' => function ($data) {
    return $data->user_id ?: Yii::t('audit', 'Guest');
}], 'request_method', 'created', ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'route', 'filter' => AuditEntrySearch::routeFilter(), 'format' => 'html', 'value' => function ($data) {
    return HTML::tag('span', '', ['title' => $data->url, 'class' => 'glyphicon glyphicon-link']) . ' ' . $data->route;
}], ['attribute' => 'duration', 'format' => 'decimal'], ['attribute' => 'memory', 'format' => 'shortsize'], ['attribute' => 'memory_max', 'format' => 'shortsize'], ['attribute' => 'errors', 'value' => function ($data) {
    return is_array($data->linkedErrors) ? count($data->linkedErrors) : 0;
}], ['attribute' => 'javascript', 'value' => function ($data) {
    return is_array($data->javascript) ? count($data->javascript) : 0;
}]]]);
?>
</div>
Beispiel #18
0
$array[] = HTML::link(_("Search Patient"), '../medical/patient_search_form.php', null, $nav == 'searchform' || $nav == 'search' ? array('class' => 'selected') : null);
if ($nav == 'search') {
    //$array[] = array(HTML::link(_("Search Results"), '../medical/???.php', null, array('class' => 'selected')));
    $array[] = array(HTML::tag('span', _("Search Results"), array('class' => 'selected')));
}
if (defined("OPEN_DEMO") && !OPEN_DEMO) {
    $_viewedPatients = LastViewedPatient::get();
    if ($_viewedPatients) {
        foreach ($_viewedPatients as $arrKey => $arrValue) {
            if (isset($idPatient) && $arrKey == $idPatient) {
                $array[] = HTML::link(HTML::tag('em', $arrValue), '../medical/patient_view.php', array('id_patient' => $arrKey), array('class' => 'selected'));
                if ($nav == "social" || $nav == "relatives" || $nav == "history" || $nav == "problems" || $nav == "print") {
                    $array[] = patientLinks($idPatient, $nav);
                }
            } else {
                $array[] = HTML::link(HTML::tag('em', $arrValue), '../medical/patient_view.php', array('id_patient' => $arrKey));
            }
        }
    }
} else {
    if ($nav == "relatives" || $nav == "history" || $nav == "problems" || $nav == "print") {
        $array[] = patientLinks($idPatient, $nav);
    }
}
if ($_SESSION['auth']['is_administrative']) {
    $array[] = HTML::link(_("New Patient"), '../medical/patient_new_form.php', null, $nav == 'new' ? array('class' => 'selected') : null);
}
/*$array[] = HTML::link(_("Help"), '../doc/index.php',
    array(
      'tab' => $tab,
      'nav' => $nav
<?php

/*
 * Client module for HiPanel
 *
 * @link      https://github.com/hiqdev/hipanel-module-client
 * @package   hipanel-module-client
 * @license   BSD-3-Clause
 * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
 */
use hipanel\grid\GridView;
use yii\helpers\Html;
use yii\widgets\Pjax;
$this->title = 'Set language';
$this->params['breadcrumbs'][] = $this->title;
echo Html::beginForm(['set-credit'], 'POST');
if (!Yii::$app->request->isAjax) {
    echo Html::submitButton(Yii::t('hipanel', 'Submit'), ['class' => 'btn btn-primary']);
}
if (!Yii::$app->request->isAjax) {
    echo Html::submitButton(Yii::t('hipanel', 'Cancel'), ['type' => 'cancel', 'class' => 'btn btn-success', 'onClick' => 'history.back()']);
}
Pjax::begin();
$widgetIndexConfig = ['dataProvider' => $dataProvider, 'columns' => [['label' => Yii::t('hipanel', 'Client'), 'format' => 'raw', 'value' => function ($data) {
    return HTML::input('hidden', "ids[{$data->id}][Client][id]", $data->id, ['readonly' => 'readonly']) . HTML::tag('span', $data->login);
}], ['label' => Yii::t('hipanel', 'Language'), 'format' => 'raw', 'value' => function ($data) {
    return Html::dropDownList("ids[{$data->id}}][Client][language]", $data->language, \hipanel\models\Ref::getList('type,lang', 'hipanel'));
}]]];
echo GridView::widget($widgetIndexConfig);
Pjax::end();
echo Html::endForm();
Beispiel #20
0
/**
 * string clinicInfo(void)
 *
 * @return string div#clinic_info (microformat hCard)
 * @access public
 * @see OPEN_CLINIC_NAME
 * @see OPEN_CLINIC_URL
 * @see OPEN_CLINIC_HOURS
 * @see OPEN_CLINIC_ADDRESS
 * @see OPEN_CLINIC_PHONE
 */
function clinicInfo()
{
    if (!defined("OPEN_CLINIC_NAME") || !OPEN_CLINIC_NAME) {
        return;
    }
    $_html = HTML::start('div', array('id' => 'clinic_info', 'class' => 'vcard contact'));
    $_name = OPEN_CLINIC_NAME;
    if (defined("OPEN_CLINIC_URL") && OPEN_CLINIC_URL) {
        $_name = HTML::link($_name, OPEN_CLINIC_URL, null, array('class' => 'url'));
    }
    $_html .= HTML::para($_name, array('class' => 'fn org'));
    if (defined("OPEN_CLINIC_HOURS") && OPEN_CLINIC_HOURS) {
        $_html .= HTML::para(sprintf(_("Clinic hours: %s"), OPEN_CLINIC_HOURS));
    }
    if (defined("OPEN_CLINIC_ADDRESS") && OPEN_CLINIC_ADDRESS || defined("OPEN_CLINIC_PHONE") && OPEN_CLINIC_PHONE) {
        $_html .= HTML::start('address', array('class' => 'adr'));
        if (defined("OPEN_CLINIC_ADDRESS") && OPEN_CLINIC_ADDRESS) {
            $_html .= HTML::para(sprintf(_("Clinic address: %s"), HTML::tag('span', OPEN_CLINIC_ADDRESS, array('class' => 'street-address'))));
        }
        if (defined("OPEN_CLINIC_PHONE") && OPEN_CLINIC_PHONE) {
            $_html .= HTML::para(sprintf(_("Clinic phone: %s"), HTML::tag('span', OPEN_CLINIC_PHONE, array('class' => 'tel value'))));
        }
        $_html .= HTML::end('address');
    }
    $_html .= HTML::end('div');
    return $_html;
}
 public function render()
 {
     $html = "\n\t<thead>\n\t\t<tr>";
     foreach ($this->columns as $header => $data) {
         $html .= "\n\t\t\t<th>";
         // If we allow sorting by this column
         if ($data[0]) {
             // If this column matches the current sort column - go in reverse
             if ($this->column === $data[0]) {
                 $sort = $this->sort == 'asc' ? 'desc' : 'asc';
             } else {
                 $sort = $this->sort == 'asc' ? 'asc' : 'desc';
             }
             // Build URL parameters taking existing parameters into account
             $url = site_url(NULL, array('column' => $data[0], 'sort' => $sort) + $this->params);
             $html .= '<a href="' . $url . '" class="table_sort_' . $sort . '">' . $header . '</a>';
         } else {
             $html .= $header;
         }
         $html .= "</th>";
     }
     $html .= "\n\t\t</tr>\n\t</thead>\n\t<tbody>";
     $odd = 0;
     foreach ($this->rows as $row) {
         $odd = 1 - $odd;
         $html .= "\n\t\t<tr class=\"" . ($odd ? 'odd' : 'even') . '">';
         foreach ($this->columns as $header => $data) {
             if ($data[1]) {
                 $html .= "\n\t\t\t<td>" . $data[1]($row) . "</td>";
             } else {
                 $html .= "\n\t\t\t<td>" . $row->{$data}[0] . "</td>";
             }
         }
         $html .= "\n\t\t</tr>";
     }
     $html .= "\n\t</tbody>\n";
     return HTML::tag('table', $html, $this->attributes);
 }
Beispiel #22
0
    exit;
}
/**
 * Show page
 */
$title = _("Record Logs");
require_once "../layout/header.php";
/**
 * Breadcrumb
 */
$links = array(_("Admin") => "../admin/index.php", _("Users") => $returnLocation, $title => "");
echo HTML::breadcrumb($links, "icon icon_user");
unset($links);
echo HTML::section(2, sprintf(_("Record Logs List for user %s"), $login) . ":");
// Printing result stats and page nav
echo HTML::para(HTML::tag('strong', sprintf(_("%d transactions."), $recordQ->getRowCount())));
$params = array('id_user='******'login='******'&', $params);
$pageCount = $recordQ->getPageCount();
$pageLinks = Search::pageLinks($currentPage, $pageCount, $_SERVER['PHP_SELF'] . '?' . $params);
echo $pageLinks;
$thead = array(_("Access Date") => array('colspan' => 2), _("Login"), _("Table"), _("Operation"), _("Data"));
$options = array(0 => array('align' => 'right'), 1 => array('align' => 'center', 'nowrap' => 1), 2 => array('align' => 'center'), 3 => array('align' => 'center'), 4 => array('align' => 'center'));
$tbody = array();
while ($record = $recordQ->fetch()) {
    $row = $recordQ->getCurrentRow() . ".";
    $row .= OPEN_SEPARATOR;
    $row .= I18n::localDate($record["access_date"]);
    $row .= OPEN_SEPARATOR;
    $row .= $record["login"];
    $row .= OPEN_SEPARATOR;
    exit;
}
/**
 * Show page
 */
$title = _("Access Logs");
require_once "../layout/header.php";
/**
 * Breadcrumb
 */
$links = array(_("Admin") => "../admin/index.php", _("Users") => $returnLocation, $title => "");
echo HTML::breadcrumb($links, "icon icon_user");
unset($links);
echo HTML::section(2, sprintf(_("Access Logs List for user %s"), $login) . ":");
// Printing result stats and page nav
echo HTML::para(HTML::tag('strong', sprintf(_("%d accesses."), $accessQ->getRowCount())));
$params = array('id_user='******'login='******'&', $params);
$pageCount = $accessQ->getPageCount();
$pageLinks = Search::pageLinks($currentPage, $pageCount, $_SERVER['PHP_SELF'] . '?' . $params);
echo $pageLinks;
$profiles = array(OPEN_PROFILE_ADMINISTRATOR => _("Administrator"), OPEN_PROFILE_ADMINISTRATIVE => _("Administrative"), OPEN_PROFILE_DOCTOR => _("Doctor"));
$thead = array(_("Access Date") => array('colspan' => 2), _("Login"), _("Profile"));
$options = array(0 => array('align' => 'right'), 2 => array('align' => 'center'), 3 => array('align' => 'center'));
$tbody = array();
while ($access = $accessQ->fetch()) {
    $row = $accessQ->getCurrentRow() . ".";
    $row .= OPEN_SEPARATOR;
    $row .= I18n::localDate($access["access_date"]);
    $row .= OPEN_SEPARATOR;
    $row .= $access["login"];
		<h1 class="hide-on-small-only"><?php 
echo HTML::a(URL, SITE_NAME, SITE_DESCRIPTION, 'orange-text');
?>
</h1>
		<h5 class="hide-on-med-and-up"><?php 
echo HTML::a(URL, SITE_NAME, SITE_DESCRIPTION, 'orange-text');
?>
</h5>
		<noscript>
			<p><?php 
_e("È necessario abilitare JavaScript. Tranquillo, viene utilizzato escusivamente software libero.");
?>
</p>
		</noscript>
		<p><?php 
printf(_("Confronta velocemente i prezzi fra %s stazioni di rifornimento."), HTML::tag('b', query_value("SELECT COUNT(*) as count FROM {$T('station')}", 'count'), HTML::property('class', 'station-counter')));
?>
</p>
		<p class="last-update"><?php 
printf(_("Ultimo aggiornamento: %s."), "<time datetime=\"{$last_price_rfc3339}\">{$last_price_text}</time>");
?>
</p>
		<div class="divider"></div>
		<div class="section">
			<a class="btn blue waves-effect waves-white" href="<?php 
echo URL;
?>
/about.php" title="<?php 
_esc_attr(_("Maggiori informazioni"));
?>
"><?php 
Beispiel #25
0
    if (isset($_SESSION['auth']['user_id']) && $user->getIdUser() == $_SESSION['auth']['user_id']) {
        $row .= '*';
        //'*' . _("del");
    } else {
        $row .= HTML::link(HTML::image('../img/action_delete.png', _("delete")), '../admin/user_del_confirm.php', array('id_user' => $user->getIdUser(), 'login' => $user->getLogin()));
    }
    $row .= OPEN_SEPARATOR;
    $row .= HTML::link(HTML::image('../img/action_edit_user.png', _("edit member")), '../admin/staff_edit_form.php', array('id_member' => $user->getIdMember()));
    $row .= OPEN_SEPARATOR;
    $row .= HTML::link(HTML::image('../img/action_access.png', _("accesses")), '../admin/user_access_log.php', array('id_user' => $user->getIdUser(), 'login' => $user->getLogin()));
    $row .= OPEN_SEPARATOR;
    $row .= HTML::link(HTML::image('../img/action_record.png', _("transactions")), '../admin/user_record_log.php', array('id_user' => $user->getIdUser(), 'login' => $user->getLogin()));
    $row .= OPEN_SEPARATOR;
    $row .= $user->getLogin();
    $row .= OPEN_SEPARATOR;
    $row .= $user->getEmail();
    $row .= OPEN_SEPARATOR;
    $row .= $user->isActived() ? _("yes") : HTML::tag('strong', _("no"));
    $row .= OPEN_SEPARATOR;
    $row .= $profiles[$user->getIdProfile()];
    $tbody[] = explode(OPEN_SEPARATOR, $row);
}
// end while
$userQ->freeResult();
$userQ->close();
echo HTML::table($thead, $tbody, null, $options);
unset($user);
unset($userQ);
unset($profiles);
echo Msg::hint('* ' . _("Note: The del function will not be applicated to the session user."));
require_once "../layout/footer.php";
Beispiel #26
0
 /**
  * generate the output
  */
 public function render()
 {
     $buffer = '';
     if (!empty($this->header)) {
         $buffer .= '<tr' . HTML::attr($this->header[1]) . '>';
         foreach ($this->header[0] as $head) {
             $head->name = 'th';
             $buffer .= $head->render();
         }
         $buffer .= '</tr>';
         foreach ($this->data as $row) {
             $buffer .= '<tr' . HTML::attr($row[1]) . '>';
             foreach ($this->header[0] as $key => $value) {
                 $buffer .= HTML::tag('td', $row[0][$key]->value, $row[0][$key]->attr);
             }
             $buffer .= '</tr>';
         }
     } else {
         foreach ($this->data as $row) {
             $buffer .= '<tr' . HTML::attr($row[1]) . '>';
             foreach ($row[0] as $value) {
                 $buffer .= $value->render();
             }
             $buffer .= '</tr>';
         }
     }
     $this->element->value = $buffer;
     return $this->element->render();
 }
 /**
  * Return an HTML pagination string
  *
  * @return string
  */
 public function __toString()
 {
     try {
         // Start and end must be valid integers
         $start = $this->current - $this->links > 0 ? $this->current - $this->links : 1;
         $end = $this->current + $this->links < $this->total ? $this->current + $this->links : $this->total;
         $html = $this->previous();
         for ($i = $start; $i <= $end; ++$i) {
             // Current link is "active"
             $attributes = $this->current == $i ? array('class' => 'active') : array();
             // Wrap the link in a list item
             $html .= HTML::tag('li', HTML::link($this->url($i), $i), $attributes);
         }
         $html .= $this->next();
         return HTML::tag('div', "<ul>\n" . $html . "</ul>\n", $this->attributes);
     } catch (\Exception $e) {
         Error::exception($e);
         return '';
     }
 }
 /**
  * Render Reset Button
  * @return string
  */
 protected function resetButton()
 {
     $defaultOptions = ['id' => $this->id . '_reset', 'class' => 'btn btn-default', 'onclick' => new JsExpression("\$('#{$this->id}').val('{$this->value}'); \$('#{$this->id}').data('daterangepicker').elementChanged()")];
     $options = ArrayHelper::merge($defaultOptions, $this->resetButtonOptions);
     $content = ArrayHelper::remove($options, 'content', HTML::tag('span', null, ['class' => 'glyphicon glyphicon-refresh', 'aria-hidden' => true]));
     $tag = ArrayHelper::remove($options, 'tag', 'span');
     $button = Html::tag($tag, $content, $options);
     return Html::tag('span', $button, ['class' => 'input-group-btn']);
 }
	<?php 
echo HTML::tag('div', array('class' => 'tag', 'file' => $tag->file, 'line' => isset($tag->line) ? $tag->line : null, 'title' => $tag->file));
?>
		<span class="name"><?php 
echo $tag->name;
?>
</span>
<?php 
if (isset($tag->line)) {
    ?>
		<br />
		<span class="line">Line: <?php 
    echo $tag->line;
    ?>
</span>
<?php 
}
?>
	</div>
Beispiel #30
0
/**
 * Breadcrumb
 */
$links = array(_("Home") => "../home/index.php", $title => "");
echo HTML::breadcrumb($links);
unset($links);
if ($lines === false) {
    // End Of Text
    $license = <<<EOT
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program 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 this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
EOT;
} else {
    $license = '';
    foreach ($lines as $line) {
        $license .= htmlspecialchars($line);
    }
}
echo HTML::tag('pre', $license);
require_once "../layout/footer.php";