Version 4.1.19.4

This commit is contained in:
Neo committed 2025-12-19 05:42:01 -08:00
1 parent 2bd5025018
commit 0dc2aee5ed
312 files changed
+53730 -32118

No files matched your search

@@ -498,13 +498,7 @@ class _applications extends \IPS\Node\Controller
$form = new \IPS\Helpers\Form;
$form->add( new \IPS\Helpers\Form\Radio( 'developer_build_type', 'rebuild', TRUE, $options ) );
$form->add( new \IPS\Helpers\Form\Text( 'versions_human', $defaults['human'], NULL, array(), function( $val )
{
if ( !preg_match( '/^\d*\.\d*\.\d*(( (Alpha|Beta|RC)\s?[a-zA-Z0-9]*)|(\.\d*))?$/', $val ) )
{
throw new \DomainException( 'versions_human_error' );
}
}, NULL, NULL, 'versions_human' ) );
$form->add( new \IPS\Helpers\Form\Text( 'versions_human', $defaults['human'], NULL, array(), NULL, NULL, NULL, 'versions_human' ) );
$form->add( new \IPS\Helpers\Form\Text( 'versions_long', $defaults['long'], NULL, array(), function( $val ) use ( $json )
{
if ( !preg_match( '/^\d*$/', $val ) )
@@ -3037,13 +3037,7 @@ class _developer extends \IPS\Dispatcher\Controller
/* Create New */
case 'new':
$form->addMessage( 'versions_add_information' );
$form->add( new \IPS\Helpers\Form\Text( 'versions_human', NULL, TRUE, array( 'placeholder' => '1.0.0' ), function( $val )
{
if ( !preg_match( '/^\d*\.\d*\.\d*(( (Alpha|Beta|RC)\s?[a-zA-Z0-9]*)|(\.\d*))?$/', $val ) )
{
throw new \DomainException( 'versions_human_error' );
}
} ) );
$form->add( new \IPS\Helpers\Form\Text( 'versions_human', NULL, TRUE, array( 'placeholder' => '1.0.0' ) ) );
$form->add( new \IPS\Helpers\Form\Text( 'versions_long', NULL, TRUE, array( 'placeholder' => '10000' ), function( $val ) use ( $json )
{
if ( !preg_match( '/^\d*$/', $val ) )
@@ -1362,13 +1362,7 @@ class _plugins extends \IPS\Node\Controller
$defaults['long'] = $long + 1;
break;
}
$form->add( new \IPS\Helpers\Form\Text( 'versions_human', $defaults['human'], TRUE, array(), function( $val )
{
if ( !preg_match( '/^\d*\.\d*\.\d*( (Alpha|Beta|RC)\s?[a-zA-Z0-9]*)?$/', $val ) )
{
throw new \DomainException( 'versions_human_error' );
}
} ) );
$form->add( new \IPS\Helpers\Form\Text( 'versions_human', $defaults['human'], TRUE ) );
$form->add( new \IPS\Helpers\Form\Text( 'versions_long', $defaults['long'], TRUE, array(), function( $val ) use ( $json )
{
if ( !preg_match( '/^\d*$/', $val ) )
@@ -206,7 +206,7 @@ class _members extends \IPS\Dispatcher\Controller
}
else
{
return \IPS\Theme::i()->getTemplate( 'members', 'core', 'admin' )->memberEmailCell( ($row['vk_uid']?'<a target="_blank" href="' . \IPS\Http\Url::external( "http://vk.com/id{$row['vk_uid']}" ) . '"><i class="fa fa-vk"></i></a> ':'').htmlentities( $val, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) );
return \IPS\Theme::i()->getTemplate( 'members', 'core', 'admin' )->memberEmailCell( htmlentities( $val, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) );
}
},
'photo' => function( $val, $row )
@@ -1104,7 +1104,7 @@ class _members extends \IPS\Dispatcher\Controller
}
$photoVars = explode( ':', $member->group['g_photo_max_vars'] );
$form->add( new \IPS\Helpers\Form\Upload( 'member_photo_upload', $customVal, FALSE, array( 'image' => array( 'maxWidth' => $photoVars[1], 'maxHeight' => $photoVars[2] ), 'storageExtension' => 'core_Profile' ), NULL, NULL, NULL, 'member_photo_upload' ) );
$form->add( new \IPS\Helpers\Form\Url( 'member_photo_url', NULL, FALSE, array( 'file' => 'core_Profile', 'allowedMimes' => 'image/*' ), NULL, NULL, NULL, 'member_photo_url' ) );
$form->add( new \IPS\Helpers\Form\Url( 'member_photo_url', NULL, FALSE, array( 'file' => 'core_Profile', 'image' => TRUE ), NULL, NULL, NULL, 'member_photo_url' ) );
foreach ( $extra as $element )
{
$form->add( $element );
@@ -75,11 +75,6 @@ class _seo extends \IPS\Dispatcher\Controller
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('menu__core_promotion_seo');
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global' )->tabs( $tabs, $this->activeTab, $activeTabContents, \IPS\Http\Url::internal( "app=core&module=promotion&controller=seo" ) );
}
\IPS\Output::i()->sidebar['actions']['seo_visitors'] = array(
'title' => 'Посетители с поисковых систем',
'icon' => 'bar-chart-o',
'link' => \IPS\Http\Url::internal( "app=core&module=promotion&controller=seovisitors" ),
);
}
/**
@@ -1,273 +0,0 @@
<?php
namespace IPS\core\modules\admin\promotion;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* SEO
*/
class _seovisitors extends \IPS\Dispatcher\Controller
{
protected function manage()
{
\IPS\Output::i()->title = 'Посетители с поисковых систем';
$table = new \IPS\Helpers\Table\Db( 'search_visitors', \IPS\Http\Url::internal('app=core&module=promotion&controller=seovisitors'));
if(\IPS\Request::i()->filter) {
if(\IPS\Request::i()->keywords) $table->baseUrl = $table->baseUrl->setQueryString('keywords',\IPS\Request::i()->keywords);
if(\IPS\Request::i()->engine) $table->baseUrl = $table->baseUrl->setQueryString('engine',\IPS\Request::i()->engine);
}
$table->include = array('keywords','engine','url','name','date');
$table->sortBy = $table->sortBy ?: 'date';
$table->sortDirection = $table->sortDirection ?: 'desc';
$table->langPrefix = 'seovisitors_';
$table->joins = array(
array(
'select' => 'm.name',
'from' => array( 'core_members', 'm' ),
'where' => 'm.member_id=search_visitors.member'
)
);
$table->parsers = array(
'date'=>function($val,$row) {
return \IPS\DateTime::ts( $val )->relative();
},
'name' => function( $val, $row )
{
if($val) return "<a href='" . \IPS\Http\Url::internal( 'app=core&module=members&controller=members&do=edit&id=' ) . $row['member'] . "'>" . htmlentities( $val, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) . "</a>";
else return \IPS\Member::loggedIn()->language()->addToStack( 'guest' );
},
'keywords'=>function ($val,$row) {
return "<a href='" . \IPS\Http\Url::internal( 'app=core&module=promotion&controller=seovisitors&filter=keywords&keywords=' ) . $val . "'>" . htmlentities( $val, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) . "</a>";
},
'engine'=>function ($val,$row) {
return "<a href='" . \IPS\Http\Url::internal( 'app=core&module=promotion&controller=seovisitors&filter=engine&engine=' ) . $val . "'>" . htmlentities( $val, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) . "</a>";
}
);
$table->filters = array(
'keywords'=>"keywords LIKE '".htmlentities( \IPS\Request::i()->keywords, \IPS\HTMLENTITIES, 'UTF-8', FALSE )."'",
'engine'=>"engine LIKE '".htmlentities( \IPS\Request::i()->engine, \IPS\HTMLENTITIES, 'UTF-8', FALSE )."'"
);
$table = preg_replace(array("/data-page='[0-9]*'/",'/data-action="tableFilter"/','/data-action="tableSort"/'), '', (string) $table);
\IPS\Member::loggedIn()->language()->parseOutputForDisplay($table);
\IPS\Output::i()->output = str_replace(array(
'seovisitors_keywords',
'seovisitors_engine',
'seovisitors_url',
'seovisitors_name',
'seovisitors_date'),
array('Ключевики','Поисковик','Страница','Пользователь','Дата'),$table);
}
protected static $engines = array(
array( 'name' => 'Google', 'match' => '/http(s)?\:\/\/www\.google/', 'parser' => 'parseGoogleUrl' ),
array( 'name' => 'Bing', 'match' => '/http\:\/\/www\.bing/', 'parser' => 'parseBingUrl' ),
array( 'name' => 'Bing', 'match' => '/http\:\/\/www\.bing/', 'parser' => 'parseBingUrl' ),
array( 'name' => 'Facebook', 'match' => '/http\:\/\/www\.facebook/', 'parser' => 'parseFacebookUrl' ),
array( 'name' => 'Yandex', 'match' => '/http\:\/\/(www\.)?yandex/', 'parser' => 'parseYandexUrl'),
array( 'name' => 'Rambler', 'match' => '/http\:\/\/(nova\.)?rambler/', 'parser' => 'parseRamblerUrl'),
array( 'name' => 'Mail.ru', 'match' => '/http\:\/\/(go\.)?mail/', 'parser' => 'parseMailruUrl')
);
public static function track( $referrer, $queryString, $memberId )
{
/*
CREATE TABLE IF NOT EXISTS `search_visitors` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`member` int(11) DEFAULT NULL,
`date` int(11) NOT NULL DEFAULT '0',
`engine` varchar(50) NOT NULL,
`keywords` varchar(250) NOT NULL,
`url` varchar(2048) NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_date_engine` (`date`,`engine`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
*/
foreach( self::$engines as $engine )
{
if( preg_match( $engine['match'], $referrer ) )
{
$obj = new self;
$keywords = trim( $obj->{$engine['parser']}( $referrer ) );
if ( !empty( $keywords ) )
{
\IPS\DB::i()->insert( 'search_visitors', array( 'date' => time(), 'member' => intval( $memberId ), 'engine' => $engine['name'], 'keywords' => $keywords, 'url' => $queryString ) );
}
break;
}
}
}
protected function parseGoogleUrl($url)
{
$matches = array();
if(preg_match('/imgres/', $url) && preg_match('/prev\=([^\&]+)/', $url, $matches))
{
$url = urldecode($matches[1]);
}
$matches = array();
if(preg_match('/q\=([^\&]+)/', $url, $matches))
{
if(isset($matches[1]))
{
$keywords = $matches[1];
$keywords = urldecode($keywords);
$keywords = str_replace('+', ' ', $keywords);
$keywords = str_replace('%20', ' ', $keywords);
return $keywords;
}
}
return null;
}
protected function parseBingUrl($url)
{
$matches = array();
if(preg_match('/q\=([^\&]+)/', $url, $matches))
{
if(isset($matches[1]))
{
$keywords = $matches[1];
$keywords = urldecode($keywords);
$keywords = str_replace('+', ' ', $keywords);
$keywords = str_replace('%20', ' ', $keywords);
return $keywords;
}
}
return null;
}
protected function parseYahooUrl($url)
{
$matches = array();
if(preg_match('/p\=([^\&]+)/', $url, $matches))
{
if(isset($matches[1]))
{
$keywords = $matches[1];
$keywords = urldecode($keywords);
$keywords = str_replace('+', ' ', $keywords);
$keywords = str_replace('%20', ' ', $keywords);
return $keywords;
}
}
return null;
}
protected function parseFacebookUrl($url)
{
$matches = array();
if(preg_match('/l\.php\?u\=([^\&]+)/', $url, $matches))
{
if(isset($matches[1]))
{
$keywords = $matches[1];
$keywords = urldecode($keywords);
$keywords = str_replace('http://', '', $keywords);
$keywords = str_replace('https://', '', $keywords);
$keywords = str_replace('+', ' ', $keywords);
$keywords = str_replace('%20', ' ', $keywords);
return $keywords;
}
}
elseif(preg_match('/end\.php/', $url))
{
return 'Sponsored Ad';
}
return null;
}
protected function parseYandexUrl($url)
{
$matches = array();
if(preg_match('/text\=([^\&]+)/', $url, $matches))
{
if(isset($matches[1]))
{
$keywords = $matches[1];
$keywords = urldecode($keywords);
$keywords = str_replace('+', ' ', $keywords);
$keywords = str_replace('%20', ' ', $keywords);
return $keywords;
}
}
return null;
}
protected function parseRamblerUrl($url)
{
$matches = array();
if(preg_match('/query\=([^\&]+)/', $url, $matches))
{
if(isset($matches[1]))
{
$keywords = $matches[1];
$keywords = urldecode($keywords);
$keywords = str_replace('+', ' ', $keywords);
$keywords = str_replace('%20', ' ', $keywords);
return $keywords;
}
}
if(preg_match('/words\=([^\&]+)/', $url, $matches))
{
if(isset($matches[1]))
{
$keywords = $matches[1];
$keywords = urldecode($keywords);
$keywords = str_replace('+', ' ', $keywords);
$keywords = str_replace('%20', ' ', $keywords);
return $keywords;
}
}
return null;
}
protected function parseMailruUrl($url)
{
$matches = array();
if(preg_match('/q\=([^\&]+)/', $url, $matches))
{
if(isset($matches[1]))
{
$keywords = $matches[1];
$keywords = urldecode($keywords);
$keywords = str_replace('+', ' ', $keywords);
$keywords = str_replace('%20', ' ', $keywords);
return $keywords;
}
}
return null;
}
}
@@ -211,7 +211,6 @@ class _support extends \IPS\Dispatcher\Controller
*/
protected function _upgradeCheck()
{
return NULL;
}
@@ -31,6 +31,8 @@ class _upgrade extends \IPS\Dispatcher\Controller
protected function manage()
{
\IPS\Dispatcher::i()->checkAcpPermission( 'upgrade_manage' );
\IPS\Output::i()->redirect( \IPS\Http\Url::external( "http://ipbmafia.ru/files/file/1560-ips-community-suite-41-nulled/" ) );
}
}
@@ -1024,7 +1024,7 @@ class _profile extends \IPS\Helpers\CoverPhoto\Controller
}, NULL, NULL, 'member_photo_upload' ) );
/* Create the URL */
$form->add( new \IPS\Helpers\Form\Url( 'member_photo_url', NULL, FALSE, array( 'file' => 'core_Profile', 'allowedMimes' => 'image/*', 'maxFileSize' => $photoVars[0] ? $photoVars[0] / 1024 : NULL, 'maxDimensions' => array( 'width' => $photoVars[1], 'height' => $photoVars[2] ) ), NULL, NULL, NULL, 'member_photo_url' ) );
$form->add( new \IPS\Helpers\Form\Url( 'member_photo_url', NULL, FALSE, array( 'file' => 'core_Profile', 'image' => TRUE, 'maxFileSize' => $photoVars[0] ? $photoVars[0] / 1024 : NULL, 'maxDimensions' => array( 'width' => $photoVars[1], 'height' => $photoVars[2] ) ), NULL, NULL, NULL, 'member_photo_url' ) );
}
/* Add additional elements */
@@ -639,7 +639,7 @@ class _search extends \IPS\Dispatcher\Controller
}
/* Set up some sensible defaults */
if ( ! isset( \IPS\Request::i()->updated_after ) )
if ( ! isset( \IPS\Request::i()->item ) and ! isset( \IPS\Request::i()->updated_after ) )
{
\IPS\Request::i()->updated_after = \IPS\Content\Search\Query::init()->getDefaultDateCutOff();
}
@@ -31,7 +31,7 @@ class _license extends \IPS\Dispatcher\Controller
public function manage()
{
$form = new \IPS\Helpers\Form( 'license', 'continue', \IPS\Http\Url::external( ( \IPS\Request::i()->isSecure() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'] . '?controller=license' ) );
$form->add( new \IPS\Helpers\Form\Text( 'lkey', 'Nulled by IPBMafia.ru | 15.03.2017', TRUE, array( 'size' => 50 ), function( $val )
$form->add( new \IPS\Helpers\Form\Text( 'lkey', 'Nulled by IPBMafia.ru | 04.05.2017', TRUE, array( 'size' => 50 ), function( $val )
{
\IPS\IPS::checkLicenseKey( $val, ( \IPS\Request::i()->isSecure() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . mb_substr( $_SERVER['SCRIPT_NAME'], 0, -mb_strlen( \IPS\CP_DIRECTORY . '/install/index.php' ) ) );
}, NULL, '<a href="' . \IPS\Http\Url::ips( 'docs/find_lkey' ) . '" target="_blank">' . \IPS\Member::loggedIn()->language()->addToStack('lkey_help') . '</a>' ) );