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


PHP Skin::build_error_block方法代码示例

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


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

示例1: ucfirst

// if it was a HEAD request, stop here
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'HEAD') {
    return;
}
// add language information, if known
if (isset($context['page_language'])) {
    $language = ' xml:lang="' . $context['page_language'] . '" ';
} else {
    $language = '';
}
// do our own rendering
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">' . "\n" . '<html ' . $language . ' xmlns="http://www.w3.org/1999/xhtml">' . "\n" . '<head>' . "\n";
// the title
if (isset($context['page_title'])) {
    echo '<title>' . ucfirst(strip_tags($context['page_title'])) . '</title>';
}
// styles
echo '<style type="text/css" media="screen">' . "\n" . '<!--' . "\n" . '	body, body p {' . "\n" . '		font-family: Verdana, Arial, Helvetica, sans-serif;' . "\n" . '		font-size:	  x-small;' . "\n" . '		voice-family: "\\"}\\"";' . "\n" . '		voice-family: inherit;' . "\n" . '		font-size:	  small;' . "\n" . '	}' . "\n" . "\n" . '	body {' . "\n" . '		scrollbar-face-color: #FFFFAA;' . "\n" . '	}' . "\n" . "\n" . '	textarea {' . "\n" . '		border: 0px none;' . "\n" . '		width: 99%;' . "\n" . '		background-color: rgb(255, 255, 170);' . "\n" . '	}' . "\n" . '-->' . "\n" . '</style>' . "\n";
// end of meta information
echo "</head>\n<body>\n";
// display error messages, if any
echo Skin::build_error_block();
// render and display the content
if (isset($context['text'])) {
    echo $context['text'];
}
// debug output, if any
if (is_array($context['debug']) && count($context['debug'])) {
    echo "\n" . '<ul id="debug">' . "\n" . '<li>' . implode('</li>' . "\n" . '<li>', $context['debug']) . '<li>' . "\n" . '</ul>' . "\n";
}
echo "\n</body>\n</html>";
开发者ID:rair,项目名称:yacs,代码行数:31,代码来源:panel.php

示例2: sprintf

 // link to the original page
 $context['text'] .= '<p>' . sprintf(i18n::s('The original page is located at %s'), Skin::build_link(Articles::get_permalink($item), Articles::get_permalink($item))) . "</p>\n";
 // insert anchor suffix
 if (is_object($anchor)) {
     $context['text'] .= $anchor->get_suffix();
 }
 //
 // special rendering if everything is ok
 //
 $text = '<html><body>' . "\n";
 // display the title
 if (isset($context['page_title']) && $context['page_title']) {
     $text .= Skin::build_block($context['page_title'], 'page_title');
 }
 // display error messages, if any
 $text .= Skin::build_error_block();
 // render and display the content, if any
 $text .= $context['text'] . "\n";
 $text .= '</body></html>' . "\n";
 // MS-WORD won't import pictures
 $text = preg_replace('/<img (.*?)\\/>/i', '', $text);
 // strip relative links
 $text = preg_replace('/<a (.*?)>(.*?)<\\/a>/is', '\\2', $text);
 //
 // transfer to the user agent
 //
 // handle the output correctly
 render_raw('application/msword; charset=' . $context['charset']);
 // suggest a download
 if (!headers_sent()) {
     $file_name = utf8::to_ascii(Skin::strip($context['page_title']) . '.doc');
开发者ID:rair,项目名称:yacs,代码行数:31,代码来源:fetch_as_msword.php

示例3: echo_error

 /**
  * echo error messages
  *
  * You can override this function into your skin
  */
 public static function echo_error()
 {
     global $context;
     // delegate this to the skin
     if (is_callable(array('Skin', 'build_error_block'))) {
         echo Skin::build_error_block();
     }
 }
开发者ID:rair,项目名称:yacs,代码行数:13,代码来源:page.php

示例4: foreach


//.........这里部分代码省略.........
         case 'bottom':
             if ($text) {
                 $text = '<div class="bottom"' . $id . '>' . $text . '</div>';
             }
             break;
         case 'caution':
             Skin::define_img('CAUTION_FLAG', 'codes/caution.gif', i18n::s('<b>Warning:</b> '), '!!!');
             if ($text) {
                 $text = '<div class="caution"' . $id . '>' . CAUTION_FLAG . $text . '</div>';
             }
             break;
         case 'center':
             if ($text) {
                 $text = '<div class="center"' . $id . '>' . $text . '</div>';
             }
             break;
         case 'code':
             if ($text) {
                 $text = '<pre' . $id . '>' . $text . '</pre>';
             }
             break;
         case 'decorated':
             if ($text) {
                 $text = '<table class="decorated"' . $id . '><tr>' . '<td class="image">' . DECORATED_IMG . '</td>' . '<td class="content">' . $text . '</td>' . "</tr></table>\n";
             }
             break;
         case 'description':
             if ($text) {
                 $text = '<div class="description"' . $id . '>' . Codes::beautify($text, $options) . '</div>' . "\n";
             }
             break;
         case 'error':
             if ($text) {
                 $text = Skin::build_error_block($text, $id);
             }
             break;
         case 'header1':
         case 'title':
             if ($text) {
                 $text = '<h2' . $id . '><span>' . Codes::beautify_title($text) . '</span></h2>';
             }
             break;
         case 'header2':
         case 'subtitle':
             if ($text) {
                 $text = '<h3' . $id . '><span>' . Codes::beautify_title($text) . '</span></h3>';
             }
             break;
         case 'header3':
             if ($text) {
                 $text = '<h4' . $id . '>' . Codes::beautify_title($text) . '</h4>';
             }
             break;
         case 'header4':
             if ($text) {
                 $text = '<h5' . $id . '>' . Codes::beautify_title($text) . '</h5>';
             }
             break;
         case 'header5':
             if ($text) {
                 $text = '<h6' . $id . '>' . Codes::beautify_title($text) . '</h6>';
             }
             break;
         case 'indent':
             if ($text) {
                 $text = '<div class="indent"' . $id . '>' . $text . '</div>';
开发者ID:rair,项目名称:yacs,代码行数:67,代码来源:skin_skeleton.php


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