当前位置: 首页>>代码示例>>PHP>>正文


PHP HTML::error方法代码示例

本文整理汇总了PHP中HTML::error方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML::error方法的具体用法?PHP HTML::error怎么用?PHP HTML::error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTML的用法示例。


在下文中一共展示了HTML::error方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

 /**
  * Display
  */
 public function display()
 {
     if (is_null($this->Exporter)) {
         echo HTML::error(__('The chosen exporter could not be located.'));
     } else {
         $this->Exporter->display();
     }
 }
开发者ID:n0rthface,项目名称:Runalyze,代码行数:11,代码来源:class.ExporterFactory.php

示例2: display

 /**
  * Display
  */
 public function display()
 {
     if (empty(self::$IDs)) {
         echo HTML::error(__('No activities for editing were set.'));
     } else {
         $this->displayEditor();
         $this->displayNavigation();
     }
 }
开发者ID:9x,项目名称:Runalyze,代码行数:12,代码来源:class.MultiEditor.php

示例3: display

 /**
  * Display
  */
 public function display()
 {
     if (!$this->Context->activity()->isPublic()) {
         echo HTML::error(__('This training is private and cannot be shared.'));
         return;
     }
     $Linklist = new BlocklinkList();
     $Linklist->addCompleteLink($this->externalLink($this->getUrl(), __('Share!')));
     $Linklist->display();
     echo HTML::info(__('You will be forwarded to Facebook, where you can define which text shall be displayed.'));
     $this->throwLinkErrorForLocalhost();
 }
开发者ID:9x,项目名称:Runalyze,代码行数:15,代码来源:class.ExporterFacebook.php

示例4: display

 /**
  * Display
  */
 public function display()
 {
     if (!$this->Context->activity()->isPublic()) {
         echo HTML::error(__('This training is private and cannot be shared.'));
         return;
     }
     $url = 'https://plus.google.com/share?url=' . urlencode($this->getPublicURL()) . '&h1=de';
     $Linklist = new BlocklinkList();
     $Linklist->addCompleteLink($this->externalLink($url, __('Share +1')));
     $Linklist->display();
     echo HTML::info(__('You will be forwared to Google+, where you can define which text shall be displayed.'));
     $this->throwLinkErrorForLocalhost();
 }
开发者ID:n0rthface,项目名称:Runalyze,代码行数:16,代码来源:class.ExporterGoogle.php

示例5: display

    /**
     * Display
     */
    public final function display()
    {
        $this->setFileContent();
        $this->writeFile();
        if (count($this->getAllErrors()) > 0) {
            foreach ($this->getAllErrors() as $Error) {
                echo HTML::error($Error);
            }
        } else {
            echo HTML::info('
				' . __('Your activity has been exported.') . '<br>
				<br>
				<a href="inc/export/files/' . $this->getFilename() . '"><strong>' . __('Download') . ': ' . $this->getFilename() . '</strong></a>
			');
        }
    }
开发者ID:9x,项目名称:Runalyze,代码行数:19,代码来源:class.ExporterAbstractFile.php

示例6: Frontend

<?php

/**
 * File for displaying sum data for each week or month
 * Call:   call/window.plotSumData.php
 */
require '../inc/class.Frontend.php';
$Frontend = new Frontend();
if (!isset($_GET['y'])) {
    $_GET['y'] = PlotSumData::LAST_12_MONTHS;
}
if (!isset($_GET['type'])) {
    $_GET['type'] = 'month';
}
if ($_GET['type'] == 'week') {
    $Plot = new PlotWeekSumData();
    $Plot->display();
} elseif ($_GET['type'] == 'month') {
    $Plot = new PlotMonthSumData();
    $Plot->display();
} else {
    echo HTML::error(__('There was a problem.'));
}
开发者ID:guancio,项目名称:Runalyze,代码行数:23,代码来源:window.plotSumData.php

示例7: throwErrorForPrivateTraining

 /**
  * Throw error: This training is private
  */
 protected function throwErrorForPrivateTraining()
 {
     echo HTML::h1(__('Error'));
     echo HTML::error(sprintf('<strong>%s</strong>', __('Private activity')) . '<br><br>' . __('This activity is private. The user does not allow you to see it.'));
     $this->displayLinkToRunalyze();
 }
开发者ID:9x,项目名称:Runalyze,代码行数:9,代码来源:class.FrontendShared.php

示例8: wrap

 /**
  * Create Anqh styles form input wrapped in list
  *
  * @param   string        $input
  * @param   string|array  $name
  * @param   string        $label
  * @param   string|array  $error
  * @param   string|array  $tip
  * @param   bool          $label_after
  * @return  string
  */
 public static function wrap($input, $name, $label = null, $error = null, $tip = null, $label_after = false)
 {
     // Find the input error if any
     $error = HTML::error($error, $name);
     $wrap = empty($error) ? '<li>' : '<li class="error">' . $error;
     // Input label if any
     if ($label) {
         $wrap .= is_array($label) ? Form::label(key($label), current($label)) : Form::label($name, $label);
     }
     // Input tip if any
     if ($tip) {
         $tip = '<p class="tip">' . (is_array($tip) ? Arr::get($tip, $name) : $tip) . '</p>';
     }
     return ($label_after ? $input . $wrap : $wrap . $input) . $tip . "</li>\n";
 }
开发者ID:netbiel,项目名称:core,代码行数:26,代码来源:form.php

示例9: while

$minLng = 180;
$maxLng = -180;
while ($RouteData = $Routes->fetch()) {
    $Route = new Model\Route\Entity($RouteData);
    $MinCoordinate = (new League\Geotools\Geohash\Geohash())->decode($RouteData['min'])->getCoordinate();
    $MaxCoordinate = (new League\Geotools\Geohash\Geohash())->decode($RouteData['max'])->getCoordinate();
    $minLat = $MinCoordinate->getLatitude() != 0 ? min($minLat, $MinCoordinate->getLatitude()) : $minLat;
    $minLng = $MinCoordinate->getLongitude() != 0 ? min($minLng, $MinCoordinate->getLongitude()) : $minLng;
    $maxLat = $MaxCoordinate->getLatitude() != 0 ? max($maxLat, $MaxCoordinate->getLatitude()) : $maxLat;
    $maxLng = $MaxCoordinate->getLongitude() != 0 ? max($maxLng, $MaxCoordinate->getLongitude()) : $maxLng;
    $Path = new Leaflet\Activity('route-' . $RouteData['id'], $Route, null, false);
    $Path->addOption('hoverable', false);
    $Path->addOption('autofit', false);
    $Map->addRoute($Path);
}
if (!isset($Route)) {
    echo HTML::error(__('There are no routes matching the criterias.'));
}
$Map->setBounds(array('lat.min' => $minLat, 'lat.max' => $maxLat, 'lng.min' => $minLng, 'lng.max' => $maxLng));
$Map->display();
?>

<p class="info">
	<?php 
echo sprintf(__('The map contains your %s most recent routes matching the criterias.'), RunalyzePluginStat_Strecken::MAX_ROUTES_ON_NET);
?>
	<?php 
_e('More routes are not possible at the moment due to performance issues.');
?>
</p>
</div>
开发者ID:guancio,项目名称:Runalyze,代码行数:31,代码来源:window.routenet.php

示例10: checkWritePermissions

 /**
  * Check write permissions
  * 
  * Will show an error if folder is not writable
  * 
  * @param string $folder path relative to runalyze/
  */
 public static function checkWritePermissions($folder)
 {
     $realfolder = FRONTEND_PATH . '../' . $folder;
     if (!is_writable($realfolder)) {
         echo HTML::error(sprintf(__('The directory <strong>%s</strong> is not writable. <em>(chmod = %s)</em>'), $folder, substr(decoct(fileperms($realfolder)), 1)));
     }
 }
开发者ID:guancio,项目名称:Runalyze,代码行数:14,代码来源:class.Filesystem.php

示例11: displayFailures

 /**
  * Display failures
  */
 protected function displayFailures()
 {
     foreach ($this->failures as $message) {
         echo HTML::error($message);
     }
 }
开发者ID:guancio,项目名称:Runalyze,代码行数:9,代码来源:class.Formular.php

示例12: wrap

 /**
  * Create Anqh styles form input wrapped in list
  *
  * @param   string        $input
  * @param   string|array  $name
  * @param   string        $label
  * @param   string|array  $error
  * @param   string|array  $tip
  * @param   boolean       $label_after
  * @param   array         $attributes
  * @return  string
  */
 public static function wrap($input, $name, $label = null, $error = null, $tip = null, $label_after = false, array $attributes = null)
 {
     // Find the input error if any
     $error = HTML::error($error, $name);
     if (!empty($error)) {
         $attributes['class'] = trim('error ' . Arr::get($attributes, 'class'));
     }
     $attributes['class'] .= ' control-group';
     // Label
     if ($label) {
         $label = is_array($label) ? Form::label(key($label), current($label), array('class' => 'control-label')) : Form::label($name, $label, array('class' => 'control-label'));
     }
     // Tip
     if ($tip) {
         $tip = '<p class="help-block">' . (is_array($tip) ? Arr::get($tip, $name) : $tip) . '</p>';
     }
     return '<div' . HTML::attributes($attributes) . '>' . ($label_after ? $input . $label : $label . $input) . $error . $tip . "</div>\n";
 }
开发者ID:anqh,项目名称:core,代码行数:30,代码来源:form.php

示例13: filter_input

<?php

/**
 * File for uninstalling plugins.
 * Call:   call.Plugin.uninstall.php?key=
 */
require '../inc/class.Frontend.php';
$Pluginkey = filter_input(INPUT_GET, 'key');
$Frontend = new Frontend();
$Installer = new PluginInstaller($Pluginkey);
echo '<h1>' . __('Uninstall') . ' ' . $Pluginkey . '</h1>';
if ($Installer->uninstall()) {
    echo HTML::okay(__('The plugin has been uninstalled.'));
    PluginFactory::clearCache();
    Ajax::setReloadFlag(Ajax::$RELOAD_ALL);
    echo Ajax::getReloadCommand();
} else {
    echo HTML::error(__('There was a problem, the plugin could not be uninstalled.'));
}
echo '<ul class="blocklist">';
echo '<li>';
echo Ajax::window('<a href="' . ConfigTabPlugins::getExternalUrl() . '">' . Icon::$TABLE . ' ' . __('back to list') . '</a>');
echo '</li>';
echo '</ul>';
开发者ID:guancio,项目名称:Runalyze,代码行数:24,代码来源:call.Plugin.uninstall.php

示例14: tryToChangePassword

 /**
  * Try to change password
  */
 private function tryToChangePassword()
 {
     if ($_POST['new_pw'] == $_POST['new_pw_repeat']) {
         $Account = DB::getInstance()->query('SELECT `password`, `salt` FROM `' . PREFIX . 'account`' . ' WHERE id = ' . SessionAccountHandler::getId())->fetch();
         if (AccountHandler::comparePasswords($_POST['old_pw'], $Account['password'], $Account['salt'])) {
             if (strlen($_POST['new_pw']) < AccountHandler::$PASS_MIN_LENGTH) {
                 ConfigTabs::addMessage(HTML::error(sprintf(__('The password has to contain at least %s characters.'), AccountHandler::$PASS_MIN_LENGTH)));
             } else {
                 AccountHandler::setNewPassword(SessionAccountHandler::getUsername(), $_POST['new_pw']);
                 ConfigTabs::addMessage(HTML::okay(__('Your password has been changed.')));
             }
         } else {
             ConfigTabs::addMessage(HTML::error(__('You current password is wrong.')));
         }
     } else {
         ConfigTabs::addMessage(HTML::error(__('The passwords have to be the same.')));
     }
 }
开发者ID:rob-st,项目名称:Runalyze,代码行数:21,代码来源:class.ConfigTabAccount.php

示例15: throwErrorForPrivateList

 /**
  * Throw error: This training is private 
  */
 protected function throwErrorForPrivateList()
 {
     echo HTML::h1(__('Error'));
     echo HTML::error(sprintf('<strong>%s</strong>', __('This list is private')) . '<br><br>' . __('The user does not share his activity list.'));
     $this->displayLinkToRunalyze();
 }
开发者ID:n0rthface,项目名称:Runalyze,代码行数:9,代码来源:class.FrontendSharedList.php


注:本文中的HTML::error方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。