diff options
Diffstat (limited to 'framework/views/bg')
| -rw-r--r-- | framework/views/bg/error.php | 37 | ||||
| -rw-r--r-- | framework/views/bg/error400.php | 33 | ||||
| -rw-r--r-- | framework/views/bg/error403.php | 32 | ||||
| -rw-r--r-- | framework/views/bg/error404.php | 32 | ||||
| -rw-r--r-- | framework/views/bg/error500.php | 35 | ||||
| -rw-r--r-- | framework/views/bg/error503.php | 30 | ||||
| -rw-r--r-- | framework/views/bg/log-firebug.php | 23 | ||||
| -rw-r--r-- | framework/views/bg/log.php | 32 | ||||
| -rw-r--r-- | framework/views/bg/profile-callstack-firebug.php | 19 | ||||
| -rw-r--r-- | framework/views/bg/profile-callstack.php | 30 | ||||
| -rw-r--r-- | framework/views/bg/profile-summary-firebug.php | 22 | ||||
| -rw-r--r-- | framework/views/bg/profile-summary.php | 41 |
12 files changed, 366 insertions, 0 deletions
diff --git a/framework/views/bg/error.php b/framework/views/bg/error.php new file mode 100644 index 0000000..0b1b2d6 --- /dev/null +++ b/framework/views/bg/error.php @@ -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> diff --git a/framework/views/bg/error400.php b/framework/views/bg/error400.php new file mode 100644 index 0000000..3266e4c --- /dev/null +++ b/framework/views/bg/error400.php @@ -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> diff --git a/framework/views/bg/error403.php b/framework/views/bg/error403.php new file mode 100644 index 0000000..904b6e5 --- /dev/null +++ b/framework/views/bg/error403.php @@ -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> diff --git a/framework/views/bg/error404.php b/framework/views/bg/error404.php new file mode 100644 index 0000000..9abe1a3 --- /dev/null +++ b/framework/views/bg/error404.php @@ -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> +Поисканата страница не е намерена на сървъра. Ако сте въвели 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> diff --git a/framework/views/bg/error500.php b/framework/views/bg/error500.php new file mode 100644 index 0000000..74dbe90 --- /dev/null +++ b/framework/views/bg/error500.php @@ -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> diff --git a/framework/views/bg/error503.php b/framework/views/bg/error503.php new file mode 100644 index 0000000..df59363 --- /dev/null +++ b/framework/views/bg/error503.php @@ -0,0 +1,30 @@ +<!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> diff --git a/framework/views/bg/log-firebug.php b/framework/views/bg/log-firebug.php new file mode 100644 index 0000000..63ba98d --- /dev/null +++ b/framework/views/bg/log-firebug.php @@ -0,0 +1,23 @@ +<script type="text/javascript"> +/*<![CDATA[*/ +if(typeof(console)=='object') +{ + console.group("Application Log"); +<?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'; + else if($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>
\ No newline at end of file diff --git a/framework/views/bg/log.php b/framework/views/bg/log.php new file mode 100644 index 0000000..7e67f2e --- /dev/null +++ b/framework/views/bg/log.php @@ -0,0 +1,32 @@ +<!-- start log messages --> +<table 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 +foreach($data as $index=>$log) +{ + $color=($index%2)?'#F5F5F5':'#EBF8FE'; + $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 --> diff --git a/framework/views/bg/profile-callstack-firebug.php b/framework/views/bg/profile-callstack-firebug.php new file mode 100644 index 0000000..76bc33c --- /dev/null +++ b/framework/views/bg/profile-callstack-firebug.php @@ -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> diff --git a/framework/views/bg/profile-callstack.php b/framework/views/bg/profile-callstack.php new file mode 100644 index 0000000..ccca138 --- /dev/null +++ b/framework/views/bg/profile-callstack.php @@ -0,0 +1,30 @@ +<!-- start profiling callstack --> +<table 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':'#EBF8FE'; + 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 --> diff --git a/framework/views/bg/profile-summary-firebug.php b/framework/views/bg/profile-summary-firebug.php new file mode 100644 index 0000000..e4eb3ab --- /dev/null +++ b/framework/views/bg/profile-summary-firebug.php @@ -0,0 +1,22 @@ +<script type="text/javascript"> +/*<![CDATA[*/ +if(typeof(console)=='object') +{ + console.group("Обобщен доклад от профилирането"); + console.log(" count total average min max "); +<?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> diff --git a/framework/views/bg/profile-summary.php b/framework/views/bg/profile-summary.php new file mode 100644 index 0000000..b72e979 --- /dev/null +++ b/framework/views/bg/profile-summary.php @@ -0,0 +1,41 @@ +<!-- start profiling summary --> +<table 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>Общо (s)</th> + <th>Средно (s)</th> + <th>Минимално (s)</th> + <th>Максимално (s)</th> + </tr> +<?php +foreach($data as $index=>$entry) +{ + $color=($index%2)?'#F5F5F5':'#EBF8FE'; + $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 --> |
