-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ed9d6e
commit 4b62b21
Showing
53 changed files
with
3,076 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,8 +114,10 @@ | |
<p class="autochmo"><a target="_blank" href="http://autochmo.ru/" title="Доска позора водителей åвточмо">åutochmo</a><br>Доска позора водителей</p> | ||
<p class="copy">© <a href="http://navalny.ru/">Алексей Навальный</a>, 2011<br /> | ||
<a href="mailto:[email protected]">[email protected]</a><br /> | ||
<br /> | ||
<br /> | ||
<?php if($this->beginCache('countHoles', array('duration'=>3600))) { ?> | ||
<?php $this->widget('application.widgets.collection.collectionWidget'); ?> | ||
<?php $this->endCache(); } ?> | ||
<p class="friends">Чиним ямы <a href="http://ukryama.com/">в Украине</a>, <a href="http://belyama.by/">Беларуси</a> и <a href="http://kazyama.kz/">Казахстане</a></p> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
body | ||
{ | ||
background: white; | ||
font-family:'Lucida Grande',Verdana,Geneva,Lucida,Helvetica,Arial,sans-serif; | ||
font-size:10pt; | ||
font-weight:normal; | ||
} | ||
|
||
#page | ||
{ | ||
width: 800px; | ||
margin: 0 auto; | ||
} | ||
|
||
#header | ||
{ | ||
} | ||
|
||
#content | ||
{ | ||
} | ||
|
||
#footer | ||
{ | ||
color: gray; | ||
font-size:8pt; | ||
border-top:1px solid #aaa; | ||
margin-top:10px; | ||
} | ||
|
||
h1 | ||
{ | ||
color:black; | ||
font-size:1.6em; | ||
font-weight:bold; | ||
margin:0.5em 0pt; | ||
} | ||
|
||
h2 | ||
{ | ||
color:black; | ||
font-size:1.25em; | ||
font-weight:bold; | ||
margin:0.3em 0pt; | ||
} | ||
|
||
h3 | ||
{ | ||
color:black; | ||
font-size:1.1em; | ||
font-weight:bold; | ||
margin:0.2em 0pt; | ||
} | ||
|
||
table.result | ||
{ | ||
background:#E6ECFF none repeat scroll 0% 0%; | ||
border-collapse:collapse; | ||
width:100%; | ||
} | ||
|
||
table.result th | ||
{ | ||
background:#CCD9FF none repeat scroll 0% 0%; | ||
text-align:left; | ||
} | ||
|
||
table.result th, table.result td | ||
{ | ||
border:1px solid #BFCFFF; | ||
padding:0.2em; | ||
} | ||
|
||
td.passed | ||
{ | ||
background-color: #60BF60; | ||
border: 1px solid silver; | ||
padding: 2px; | ||
} | ||
|
||
td.warning | ||
{ | ||
background-color: #FFFFBF; | ||
border: 1px solid silver; | ||
padding: 2px; | ||
} | ||
|
||
td.failed | ||
{ | ||
background-color: #FF8080; | ||
border: 1px solid silver; | ||
padding: 2px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,251 @@ | ||
<?php | ||
|
||
/** | ||
* Yii Requirement Checker script | ||
* | ||
* This script will check if your system meets the requirements for running | ||
* Yii-powered Web applications. | ||
* | ||
* @author Qiang Xue <[email protected]> | ||
* @link http://www.yiiframework.com/ | ||
* @copyright Copyright © 2008-2011 Yii Software LLC | ||
* @license http://www.yiiframework.com/license/ | ||
* @version $Id: index.php 3243 2011-05-28 22:32:30Z alexander.makarow $ | ||
* @package system | ||
* @since 1.0 | ||
*/ | ||
/** | ||
* @var array List of requirements (name, required or not, result, used by, memo) | ||
*/ | ||
$requirements=array( | ||
array( | ||
t('yii','PHP version'), | ||
true, | ||
version_compare(PHP_VERSION,"5.1.0",">="), | ||
'<a href="http://www.yiiframework.com">Yii Framework</a>', | ||
t('yii','PHP 5.1.0 or higher is required.')), | ||
array( | ||
t('yii','$_SERVER variable'), | ||
true, | ||
($message=checkServerVar()) === '', | ||
'<a href="http://www.yiiframework.com">Yii Framework</a>', | ||
$message), | ||
array( | ||
t('yii','Reflection extension'), | ||
true, | ||
class_exists('Reflection',false), | ||
'<a href="http://www.yiiframework.com">Yii Framework</a>', | ||
''), | ||
array( | ||
t('yii','PCRE extension'), | ||
true, | ||
extension_loaded("pcre"), | ||
'<a href="http://www.yiiframework.com">Yii Framework</a>', | ||
''), | ||
array( | ||
t('yii','SPL extension'), | ||
true, | ||
extension_loaded("SPL"), | ||
'<a href="http://www.yiiframework.com">Yii Framework</a>', | ||
''), | ||
array( | ||
t('yii','DOM extension'), | ||
false, | ||
class_exists("DOMDocument",false), | ||
'<a href="http://www.yiiframework.com/doc/api/CHtmlPurifier">CHtmlPurifier</a>, <a href="http://www.yiiframework.com/doc/api/CWsdlGenerator">CWsdlGenerator</a>', | ||
''), | ||
array( | ||
t('yii','PDO extension'), | ||
false, | ||
extension_loaded('pdo'), | ||
t('yii','All <a href="http://www.yiiframework.com/doc/api/#system.db">DB-related classes</a>'), | ||
''), | ||
array( | ||
t('yii','PDO SQLite extension'), | ||
false, | ||
extension_loaded('pdo_sqlite'), | ||
t('yii','All <a href="http://www.yiiframework.com/doc/api/#system.db">DB-related classes</a>'), | ||
t('yii','This is required if you are using SQLite database.')), | ||
array( | ||
t('yii','PDO MySQL extension'), | ||
false, | ||
extension_loaded('pdo_mysql'), | ||
t('yii','All <a href="http://www.yiiframework.com/doc/api/#system.db">DB-related classes</a>'), | ||
t('yii','This is required if you are using MySQL database.')), | ||
array( | ||
t('yii','PDO PostgreSQL extension'), | ||
false, | ||
extension_loaded('pdo_pgsql'), | ||
t('yii','All <a href="http://www.yiiframework.com/doc/api/#system.db">DB-related classes</a>'), | ||
t('yii','This is required if you are using PostgreSQL database.')), | ||
array( | ||
t('yii','Memcache extension'), | ||
false, | ||
extension_loaded("memcache") || extension_loaded("memcached"), | ||
'<a href="http://www.yiiframework.com/doc/api/CMemCache">CMemCache</a>', | ||
extension_loaded("memcached") ? t('yii', 'To use memcached set <a href="http://www.yiiframework.com/doc/api/CMemCache#useMemcached-detail">CMemCache::useMemcached</a> to <code>true</code>.') : ''), | ||
array( | ||
t('yii','APC extension'), | ||
false, | ||
extension_loaded("apc"), | ||
'<a href="http://www.yiiframework.com/doc/api/CApcCache">CApcCache</a>', | ||
''), | ||
array( | ||
t('yii','Mcrypt extension'), | ||
false, | ||
extension_loaded("mcrypt"), | ||
'<a href="http://www.yiiframework.com/doc/api/CSecurityManager">CSecurityManager</a>', | ||
t('yii','This is required by encrypt and decrypt methods.')), | ||
array( | ||
t('yii','SOAP extension'), | ||
false, | ||
extension_loaded("soap"), | ||
'<a href="http://www.yiiframework.com/doc/api/CWebService">CWebService</a>, <a href="http://www.yiiframework.com/doc/api/CWebServiceAction">CWebServiceAction</a>', | ||
''), | ||
array( | ||
t('yii','GD extension with<br />FreeType support'), | ||
false, | ||
($message=checkGD()) === '', | ||
//extension_loaded('gd'), | ||
'<a href="http://www.yiiframework.com/doc/api/CCaptchaAction">CCaptchaAction</a>', | ||
$message), | ||
array( | ||
t('yii','Ctype extension'), | ||
false, | ||
extension_loaded("ctype"), | ||
'<a href="http://www.yiiframework.com/doc/api/CDateFormatter">CDateFormatter</a>, <a href="http://www.yiiframework.com/doc/api/CDateFormatter">CDateTimeParser</a>, <a href="http://www.yiiframework.com/doc/api/CTextHighlighter">CTextHighlighter</a>, <a href="http://www.yiiframework.com/doc/api/CHtmlPurifier">CHtmlPurifier</a>', | ||
'' | ||
) | ||
); | ||
|
||
function checkServerVar() | ||
{ | ||
$vars=array('HTTP_HOST','SERVER_NAME','SERVER_PORT','SCRIPT_NAME','SCRIPT_FILENAME','PHP_SELF','HTTP_ACCEPT','HTTP_USER_AGENT'); | ||
$missing=array(); | ||
foreach($vars as $var) | ||
{ | ||
if(!isset($_SERVER[$var])) | ||
$missing[]=$var; | ||
} | ||
if(!empty($missing)) | ||
return t('yii','$_SERVER does not have {vars}.',array('{vars}'=>implode(', ',$missing))); | ||
|
||
if(realpath($_SERVER["SCRIPT_FILENAME"]) !== realpath(__FILE__)) | ||
return t('yii','$_SERVER["SCRIPT_FILENAME"] must be the same as the entry script file path.'); | ||
|
||
if(!isset($_SERVER["REQUEST_URI"]) && isset($_SERVER["QUERY_STRING"])) | ||
return t('yii','Either $_SERVER["REQUEST_URI"] or $_SERVER["QUERY_STRING"] must exist.'); | ||
|
||
if(!isset($_SERVER["PATH_INFO"]) && strpos($_SERVER["PHP_SELF"],$_SERVER["SCRIPT_NAME"]) !== 0) | ||
return t('yii','Unable to determine URL path info. Please make sure $_SERVER["PATH_INFO"] (or $_SERVER["PHP_SELF"] and $_SERVER["SCRIPT_NAME"]) contains proper value.'); | ||
|
||
return ''; | ||
} | ||
|
||
function checkGD() | ||
{ | ||
if(extension_loaded('gd')) | ||
{ | ||
$gdinfo=gd_info(); | ||
if($gdinfo['FreeType Support']) | ||
return ''; | ||
return t('yii','GD installed<br />FreeType support not installed'); | ||
} | ||
return t('yii','GD not installed'); | ||
} | ||
|
||
function getYiiVersion() | ||
{ | ||
$coreFile=dirname(__FILE__).'/../framework/YiiBase.php'; | ||
if(is_file($coreFile)) | ||
{ | ||
$contents=file_get_contents($coreFile); | ||
$matches=array(); | ||
if(preg_match('/public static function getVersion.*?return \'(.*?)\'/ms',$contents,$matches) > 0) | ||
return $matches[1]; | ||
} | ||
return ''; | ||
} | ||
|
||
/** | ||
* Returns a localized message according to user preferred language. | ||
* @param string message category | ||
* @param string message to be translated | ||
* @param array parameters to be applied to the translated message | ||
* @return string translated message | ||
*/ | ||
function t($category,$message,$params=array()) | ||
{ | ||
static $messages; | ||
|
||
if($messages === null) | ||
{ | ||
$messages=array(); | ||
if(($lang=getPreferredLanguage()) !== false) | ||
{ | ||
$file=dirname(__FILE__)."/messages/$lang/yii.php"; | ||
if(is_file($file)) | ||
$messages=include($file); | ||
} | ||
} | ||
|
||
if(empty($message)) | ||
return $message; | ||
|
||
if(isset($messages[$message]) && $messages[$message] !== '') | ||
$message=$messages[$message]; | ||
|
||
return $params !== array() ? strtr($message,$params) : $message; | ||
} | ||
|
||
function getPreferredLanguage() | ||
{ | ||
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && ($n=preg_match_all('/([\w\-]+)\s*(;\s*q\s*=\s*(\d*\.\d*))?/',$_SERVER['HTTP_ACCEPT_LANGUAGE'],$matches)) > 0) | ||
{ | ||
$languages=array(); | ||
for($i=0; $i < $n; ++$i) | ||
$languages[$matches[1][$i]]=empty($matches[3][$i]) ? 1.0 : floatval($matches[3][$i]); | ||
arsort($languages); | ||
foreach($languages as $language=>$pref) | ||
return strtolower(str_replace('-','_',$language)); | ||
} | ||
return false; | ||
} | ||
|
||
function getServerInfo() | ||
{ | ||
$info[]=isset($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : ''; | ||
$info[]='<a href="http://www.yiiframework.com/">Yii Framework</a>/'.getYiiVersion(); | ||
$info[]=@strftime('%Y-%m-%d %H:%M',time()); | ||
|
||
return implode(' ',$info); | ||
} | ||
|
||
function renderFile($_file_,$_params_=array()) | ||
{ | ||
extract($_params_); | ||
require($_file_); | ||
} | ||
|
||
$result=1; // 1: all pass, 0: fail, -1: pass with warnings | ||
|
||
foreach($requirements as $i=>$requirement) | ||
{ | ||
if($requirement[1] && !$requirement[2]) | ||
$result=0; | ||
else if($result > 0 && !$requirement[1] && !$requirement[2]) | ||
$result=-1; | ||
if($requirement[4] === '') | ||
$requirements[$i][4]=' '; | ||
} | ||
|
||
$lang=getPreferredLanguage(); | ||
$viewFile=dirname(__FILE__)."/views/$lang/index.php"; | ||
if(!is_file($viewFile)) | ||
$viewFile=dirname(__FILE__).'/views/index.php'; | ||
|
||
renderFile($viewFile,array( | ||
'requirements'=>$requirements, | ||
'result'=>$result, | ||
'serverInfo'=>getServerInfo())); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
deny from all |
Oops, something went wrong.