Added new (clean) yii boilerplate
This commit is contained in:
37
framework/views/zh_cn/error.php
Normal file
37
framework/views/zh_cn/error.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html PUBLIC
|
||||
"-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>错误 <?php echo $data['code']; ?></title>
|
||||
|
||||
<style type="text/css">
|
||||
/*<![CDATA[*/
|
||||
body {font-family:"Verdana";font-weight:normal;color:black;background-color:white;}
|
||||
h1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
|
||||
h2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
|
||||
h3 {font-family:"Verdana";font-weight:bold;font-size:11pt}
|
||||
p {font-family:"Verdana";font-weight:normal;color:black;font-size:9pt;margin-top: -5px}
|
||||
.version {color: gray;font-size:8pt;border-top:1px solid #aaaaaa;}
|
||||
/*]]>*/
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>错误 <?php echo $data['code']; ?></h1>
|
||||
<h2><?php echo nl2br(CHtml::encode($data['message'])); ?></h2>
|
||||
<p>
|
||||
当网页服务器处理您的请求时, 发生以上错误.
|
||||
</p>
|
||||
<p>
|
||||
如果您认为此错误是服务器造成的,请与管理员联系 <?php echo $data[ 'admin']; ?>.
|
||||
</p>
|
||||
<p>
|
||||
谢谢.
|
||||
</p>
|
||||
<div class="version">
|
||||
<?php echo date('Y-m-d H:i:s',$data['time']) .' '. $data['version']; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
33
framework/views/zh_cn/error400.php
Normal file
33
framework/views/zh_cn/error400.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html PUBLIC
|
||||
"-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>请求错误</title>
|
||||
<style type="text/css">
|
||||
/*<![CDATA[*/
|
||||
body {font-family:"Verdana";font-weight:normal;color:black;background-color:white;}
|
||||
h1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
|
||||
h2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
|
||||
h3 {font-family:"Verdana";font-weight:bold;font-size:11pt}
|
||||
p {font-family:"Verdana";font-weight:normal;color:black;font-size:9pt;margin-top: -5px}
|
||||
.version {color: gray;font-size:8pt;border-top:1px solid #aaaaaa;}
|
||||
/*]]>*/
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>请求错误</h1>
|
||||
<h2><?php echo nl2br(CHtml::encode($data['message'])); ?></h2>
|
||||
<p>
|
||||
由于语法错误,服务器无法解析.
|
||||
请修改请求后重试.
|
||||
</p>
|
||||
<p>
|
||||
如果您认为此错误是服务器造成的,请与管理员联系 <?php echo $data[ 'admin']; ?>.
|
||||
</p>
|
||||
<div class="version">
|
||||
<?php echo date('Y-m-d H:i:s',$data['time']) .' '. $data['version']; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
32
framework/views/zh_cn/error403.php
Normal file
32
framework/views/zh_cn/error403.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html PUBLIC
|
||||
"-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>未被授权</title>
|
||||
<style type="text/css">
|
||||
/*<![CDATA[*/
|
||||
body {font-family:"Verdana";font-weight:normal;color:black;background-color:white;}
|
||||
h1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
|
||||
h2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
|
||||
h3 {font-family:"Verdana";font-weight:bold;font-size:11pt}
|
||||
p {font-family:"Verdana";font-weight:normal;color:black;font-size:9pt;margin-top: -5px}
|
||||
.version {color: gray;font-size:8pt;border-top:1px solid #aaaaaa;}
|
||||
/*]]>*/
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>未被授权</h1>
|
||||
<h2><?php echo nl2br(CHtml::encode($data['message'])); ?></h2>
|
||||
<p>
|
||||
你没有访问此页面的授权.
|
||||
</p>
|
||||
<p>
|
||||
如果您认为此错误是服务器造成的,请与管理员联系 <?php echo $data[ 'admin']; ?>.
|
||||
</p>
|
||||
<div class="version">
|
||||
<?php echo date('Y-m-d H:i:s',$data['time']) .' '. $data['version']; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
33
framework/views/zh_cn/error404.php
Normal file
33
framework/views/zh_cn/error404.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html PUBLIC
|
||||
"-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>无法找到网页</title>
|
||||
<style type="text/css">
|
||||
/*<![CDATA[*/
|
||||
body {font-family:"Verdana";font-weight:normal;color:black;background-color:white;}
|
||||
h1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
|
||||
h2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
|
||||
h3 {font-family:"Verdana";font-weight:bold;font-size:11pt}
|
||||
p {font-family:"Verdana";font-weight:normal;color:black;font-size:9pt;margin-top: -5px}
|
||||
.version {color: gray;font-size:8pt;border-top:1px solid #aaaaaa;}
|
||||
/*]]>*/
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>无法找到网页</h1>
|
||||
<h2><?php echo nl2br(CHtml::encode($data['message'])); ?></h2>
|
||||
<p>
|
||||
服务器无法找到请求的 URL 所对应的网页.
|
||||
如果您是手动输入URL, 请检查是否拼写无误后重试.
|
||||
</p>
|
||||
<p>
|
||||
如果您认为此错误是服务器造成的,请与管理员联系 <?php echo $data[ 'admin']; ?>.
|
||||
</p>
|
||||
<div class="version">
|
||||
<?php echo date('Y-m-d H:i:s',$data['time']) .' '. $data['version']; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
35
framework/views/zh_cn/error500.php
Normal file
35
framework/views/zh_cn/error500.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html PUBLIC
|
||||
"-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>服务器内部错误</title>
|
||||
|
||||
<style type="text/css">
|
||||
/*<![CDATA[*/
|
||||
body {font-family:"Verdana";font-weight:normal;color:black;background-color:white;}
|
||||
h1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
|
||||
h2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
|
||||
h3 {font-family:"Verdana";font-weight:bold;font-size:11pt}
|
||||
p {font-family:"Verdana";font-weight:normal;color:black;font-size:9pt;margin-top: -5px}
|
||||
.version {color: gray;font-size:8pt;border-top:1px solid #aaaaaa;}
|
||||
/*]]>*/
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>服务器内部错误</h1>
|
||||
<h2><?php echo nl2br(CHtml::encode($data['message'])); ?></h2>
|
||||
<p>
|
||||
当前网页服务器在处理您的请求时,发生了一个内部错误.
|
||||
请将此问题报告给服务器管理员 <?php echo $data['admin']; ?>.
|
||||
</p>
|
||||
<p>
|
||||
谢谢.
|
||||
</p>
|
||||
<div class="version">
|
||||
<?php echo date('Y-m-d H:i:s',$data['time']) .' '. $data['version']; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
31
framework/views/zh_cn/error503.php
Normal file
31
framework/views/zh_cn/error503.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html PUBLIC
|
||||
"-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>目前服务不可用</title>
|
||||
<style type="text/css">
|
||||
/*<![CDATA[*/
|
||||
body {font-family:"Verdana";font-weight:normal;color:black;background-color:white;}
|
||||
h1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
|
||||
h2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
|
||||
h3 {font-family:"Verdana";font-weight:bold;font-size:11pt}
|
||||
p {font-family:"Verdana";font-weight:normal;color:black;font-size:9pt;margin-top: -5px}
|
||||
.version {color: gray;font-size:8pt;border-top:1px solid #aaaaaa;}
|
||||
/*]]>*/
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>目前服务不可用</h1>
|
||||
<p>
|
||||
系统目前正在维护中,请稍候再试.
|
||||
</p>
|
||||
<p>
|
||||
对此带来的不便,深感歉意.
|
||||
</p>
|
||||
<div class="version">
|
||||
<?php echo date('Y-m-d H:i:s',$data['time']) .' '. $data['version']; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
23
framework/views/zh_cn/log-firebug.php
Normal file
23
framework/views/zh_cn/log-firebug.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<script type="text/javascript">
|
||||
/*<![CDATA[*/
|
||||
if(typeof(console)=='object')
|
||||
{
|
||||
console.<?php echo $this->collapsedInFireBug?'groupCollapsed':'group'; ?>("程序日志");
|
||||
<?php
|
||||
foreach($data as $index=>$log)
|
||||
{
|
||||
$time=date('H:i:s.',$log[3]).(int)(($log[3]-(int)$log[3])*1000);
|
||||
if($log[1]===CLogger::LEVEL_WARNING)
|
||||
$func='warn';
|
||||
elseif($log[1]===CLogger::LEVEL_ERROR)
|
||||
$func='error';
|
||||
else
|
||||
$func='log';
|
||||
$content=CJavaScript::quote("[$time][$log[1]][$log[2]] $log[0]");
|
||||
echo "\tconsole.{$func}(\"{$content}\");\n";
|
||||
}
|
||||
?>
|
||||
console.groupEnd();
|
||||
}
|
||||
/*]]>*/
|
||||
</script>
|
||||
40
framework/views/zh_cn/log.php
Normal file
40
framework/views/zh_cn/log.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<!-- start log messages -->
|
||||
<table class="yiiLog" width="100%" cellpadding="2" style="border-spacing:1px;font:11px Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;color:#666666;">
|
||||
<tr>
|
||||
<th style="background:black;color:white;" colspan="5">
|
||||
程序日志
|
||||
</th>
|
||||
</tr>
|
||||
<tr style="background-color: #ccc;">
|
||||
<th style="width:120px">时间</th>
|
||||
<th>等级</th>
|
||||
<th>类别</th>
|
||||
<th>信息</th>
|
||||
</tr>
|
||||
<?php
|
||||
$colors=array(
|
||||
CLogger::LEVEL_PROFILE=>'#DFFFE0',
|
||||
CLogger::LEVEL_INFO=>'#FFFFDF',
|
||||
CLogger::LEVEL_WARNING=>'#FFDFE5',
|
||||
CLogger::LEVEL_ERROR=>'#FFC0CB',
|
||||
);
|
||||
foreach($data as $index=>$log)
|
||||
{
|
||||
$color=($index%2)?'#F5F5F5':'#FFFFFF';
|
||||
if(isset($colors[$log[1]]))
|
||||
$color=$colors[$log[1]];
|
||||
$message='<pre>'.CHtml::encode(wordwrap($log[0])).'</pre>';
|
||||
$time=date('H:i:s.',$log[3]).(int)(($log[3]-(int)$log[3])*1000000);
|
||||
|
||||
echo <<<EOD
|
||||
<tr style="background:{$color}">
|
||||
<td align="center">{$time}</td>
|
||||
<td>{$log[1]}</td>
|
||||
<td>{$log[2]}</td>
|
||||
<td>{$message}</td>
|
||||
</tr>
|
||||
EOD;
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<!-- end of log messages -->
|
||||
19
framework/views/zh_cn/profile-callstack-firebug.php
Normal file
19
framework/views/zh_cn/profile-callstack-firebug.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<script type="text/javascript">
|
||||
/*<![CDATA[*/
|
||||
if(typeof(console)=='object')
|
||||
{
|
||||
console.group("程序概要分析 - 堆栈调用报告");
|
||||
<?php
|
||||
foreach($data as $index=>$entry)
|
||||
{
|
||||
list($proc,$time,$level)=$entry;
|
||||
$proc=CJavaScript::quote($proc);
|
||||
$time=sprintf('%0.5f',$time);
|
||||
$spaces=str_repeat(' ',$level*8);
|
||||
echo "\tconsole.log(\"[$time]{$spaces}{$proc}\");\n";
|
||||
}
|
||||
?>
|
||||
console.groupEnd();
|
||||
}
|
||||
/*]]>*/
|
||||
</script>
|
||||
28
framework/views/zh_cn/profile-callstack.php
Normal file
28
framework/views/zh_cn/profile-callstack.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<!-- start profiling callstack -->
|
||||
<table class="yiiLog" width="100%" cellpadding="2"
|
||||
style="border-spacing: 1px; font: 11px Verdana, Arial, Helvetica, sans-serif; background: #EEEEEE; color: #666666;">
|
||||
<tr>
|
||||
<th style="background: black; color: white;" colspan="2">程序概要分析 - 堆栈调用报告</th>
|
||||
</tr>
|
||||
<tr style="background-color: #ccc;">
|
||||
<th>步骤</th>
|
||||
<th>时间 (秒)</th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ( $data as $index => $entry ) {
|
||||
$color = ($index % 2) ? '#F5F5F5' : '#FFFFFF';
|
||||
list ( $proc, $time, $level ) = $entry;
|
||||
$proc = CHtml::encode ( $proc );
|
||||
$time = sprintf ( '%0.5f', $time );
|
||||
$spaces = str_repeat ( ' ', $level * 8 );
|
||||
|
||||
echo <<<EOD
|
||||
<tr style="background:{$color}">
|
||||
<td>{$spaces}{$proc}</td>
|
||||
<td align="center">{$time}</td>
|
||||
</tr>
|
||||
EOD;
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<!-- end of profiling callstack -->
|
||||
22
framework/views/zh_cn/profile-summary-firebug.php
Normal file
22
framework/views/zh_cn/profile-summary-firebug.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<script type="text/javascript">
|
||||
/*<![CDATA[*/
|
||||
if(typeof(console)=='object')
|
||||
{
|
||||
console.group("程序概要分析 - 报告概述");
|
||||
console.log(" 数量 总计 平均 最小 最大 ");
|
||||
<?php
|
||||
foreach($data as $index=>$entry)
|
||||
{
|
||||
$proc=CJavaScript::quote($entry[0]);
|
||||
$count=sprintf('%5d',$entry[1]);
|
||||
$min=sprintf('%0.5f',$entry[2]);
|
||||
$max=sprintf('%0.5f',$entry[3]);
|
||||
$total=sprintf('%0.5f',$entry[4]);
|
||||
$average=sprintf('%0.5f',$entry[4]/$entry[1]);
|
||||
echo "\tconsole.log(\" $count $total $average $min $max {$proc}\");\n";
|
||||
}
|
||||
?>
|
||||
console.groupEnd();
|
||||
}
|
||||
/*]]>*/
|
||||
</script>
|
||||
41
framework/views/zh_cn/profile-summary.php
Normal file
41
framework/views/zh_cn/profile-summary.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<!-- start profiling summary -->
|
||||
<table class="yiiLog" width="100%" cellpadding="2" style="border-spacing:1px;font:11px Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;color:#666666;">
|
||||
<tr>
|
||||
<th style="background:black;color:white;" colspan="6">
|
||||
程序概要分析 - 报告概述
|
||||
(时间: <?php echo sprintf('%0.5f',Yii::getLogger()->getExecutionTime()); ?> 秒,
|
||||
内存: <?php echo number_format(Yii::getLogger()->getMemoryUsage()/1024); ?>KB)
|
||||
</th>
|
||||
</tr>
|
||||
<tr style="background-color: #ccc;">
|
||||
<th>程序</th>
|
||||
<th>数量</th>
|
||||
<th>总计 (秒)</th>
|
||||
<th>平均 (秒)</th>
|
||||
<th>最小 (秒)</th>
|
||||
<th>最大 (秒)</th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach($data as $index=>$entry)
|
||||
{
|
||||
$color=($index%2)?'#F5F5F5':'#FFFFFF';
|
||||
$proc=CHtml::encode($entry[0]);
|
||||
$min=sprintf('%0.5f',$entry[2]);
|
||||
$max=sprintf('%0.5f',$entry[3]);
|
||||
$total=sprintf('%0.5f',$entry[4]);
|
||||
$average=sprintf('%0.5f',$entry[4]/$entry[1]);
|
||||
|
||||
echo <<<EOD
|
||||
<tr style="background:{$color}">
|
||||
<td>{$proc}</td>
|
||||
<td align="center">{$entry[1]}</td>
|
||||
<td align="center">{$total}</td>
|
||||
<td align="center">{$average}</td>
|
||||
<td align="center">{$min}</td>
|
||||
<td align="center">{$max}</td>
|
||||
</tr>
|
||||
EOD;
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<!-- end of profiling summary -->
|
||||
Reference in New Issue
Block a user