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
-- getTotal -- | |
SELECT | |
tfv.*, | |
COUNT(*) FROM `#__xfx_brokers` AS t | |
LEFT JOIN ( | |
SELECT fv.`broker_id`, | |
MAX(IF(fv.`field_id` = 1, fv.`field_value`, NULL)) AS field_1, | |
MAX(IF(fv.`field_id` = 3, fv.`field_value`, NULL)) AS field_3, | |
MAX(IF(fv.`field_id` = 5, fv.`field_value`, NULL)) AS field_5 |
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
<?php | |
namespace common\components; | |
use Yii; | |
use \yii\web\AssetManager; | |
class AssetManagerDev extends AssetManager | |
{ |
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
public function afterValidate() | |
{ | |
$schema = static::getTableSchema(); | |
foreach ($this->attributes as $attribute => $value) { | |
if (!$this->hasErrors($attribute)) { | |
$typecasted = $schema->getColumn($attribute)->phpTypecast($value); | |
if ($value !== $typecasted) { | |
$this->setAttribute($attribute, $typecasted); |
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
SELECT | |
`broker_id`, | |
`account_number`, | |
`account_id`, | |
EXTRACT(YEAR_MONTH FROM `payment_date`) AS `yyyymm`, | |
SUM(`amount_total`) AS `sum_amount_total`, | |
SUM(`amount`) AS `sum_amount` | |
FROM `lk_withdrawals` | |
WHERE | |
(`user_id`=1) AND (`status`=1) |
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
public static function removeDirectory($dir, $options = []) | |
{ | |
if (!is_dir($dir)) { | |
echo 'Path is not a directory or not exists: ' . $dir . PHP_EOL; | |
return; | |
} | |
if (!is_link($dir) || isset($options['traverseSymlinks']) && $options['traverseSymlinks']) { | |
if (!($handle = opendir($dir))) { | |
echo 'Failed to open: ' . $dir . PHP_EOL; |
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
public static function getValue($array, $key, $default = null) | |
{ | |
if ($key instanceof \Closure) { | |
return $key($array, $default); | |
} | |
if (is_array($array) && array_key_exists($key, $array)) { | |
return $array[$key]; | |
} |
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
<?php | |
/** | |
* @author Serge Postrash aka SDKiller <jexy.ru@gmail.com> | |
*/ | |
namespace frontend\widgets; | |
use Yii; | |
use yii\helpers\Html; | |
use yii\widgets\LinkPager; |
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
<?php | |
/** | |
* @author Serge Postrash aka SDKiller <jexy.ru@gmail.com> | |
*/ | |
namespace frontend\widgets; | |
use Yii; | |
use yii\helpers\Html; | |
use yii\widgets\LinkPager; |
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
Performance Profiling | |
Total processing time: 2,225,665 ms; Peak memory: 24.0 MB. | |
Всего 490 записи. | |
# Time Duration Category Info | |
1 07:58:33.995 932.1 ms app\controllers\ListController requestCategories (siteId: 215, categoryId: -1, attempt 1) | |
2 07:58:34.928 667.0 ms app\controllers\ListController requestCategories (siteId: 215, categoryId: 20081, attempt 1) | |
3 07:58:35.595 424.0 ms app\controllers\ListController requestCategories (siteId: 215, categoryId: 550, attempt 1) | |
4 07:58:36.019 461.0 ms app\controllers\ListController requestCategories (siteId: 215, categoryId: 2984, attempt 1) |
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
<?php | |
/*------------------------------------------------------------------------ | |
# mod_newscalendar - News Calendar | |
# ------------------------------------------------------------------------ | |
# author Jesús Vargas Garita | |
# Copyright (C) 2010 www.joomlahill.com. All Rights Reserved. | |
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL | |
# Websites: http://www.joomlahill.com | |
# Technical Support: Forum - http://www.joomlahill.com/forum | |
-------------------------------------------------------------------------*/ |
OlderNewer