Version 4.0.13.1 (nulled)
This commit is contained in:
1 parent
c6a86f0d9b
commit
3ba79295ee
19 files changed
+277
-490
No files matched your search
@@ -7,6 +7,7 @@
|
||||
* @package IPS Social Suite
|
||||
* @since 21 May 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
* @modified 13.09.2015 by IAF
|
||||
*/
|
||||
|
||||
namespace IPS\core\modules\admin\support;
|
||||
@@ -297,19 +298,7 @@ class _support extends \IPS\Dispatcher\Controller
|
||||
* @return string|NULL
|
||||
*/
|
||||
public function _md5sumChecker( $id )
|
||||
{
|
||||
try
|
||||
{
|
||||
$key = \IPS\IPS::licenseKey();
|
||||
$correctMd5s = \IPS\Http\Url::ips( 'md5/' . $key['key'] )->request()->get()->decodeJson();
|
||||
|
||||
$files = $this->_md5sumCheckerIterator( \IPS\ROOT_PATH, $correctMd5s );
|
||||
if ( count( $files ) )
|
||||
{
|
||||
return \IPS\Theme::i()->getTemplate( 'support' )->md5sum( $files, $id );
|
||||
}
|
||||
}
|
||||
catch ( \Exception $e ) {}
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -561,123 +550,7 @@ class _support extends \IPS\Dispatcher\Controller
|
||||
*/
|
||||
public function _contactSupport( $data )
|
||||
{
|
||||
$licenseData = \IPS\IPS::licenseKey();
|
||||
if ( !$licenseData or strtotime( $licenseData['expires'] ) < time() )
|
||||
{
|
||||
return \IPS\Theme::i()->getTemplate( 'global' )->message( 'get_support_no_license', 'warning' );
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$supportedVerions = \IPS\Http\Url::ips('support/versions')->request()->get()->decodeJson();
|
||||
|
||||
if ( \IPS\Application::load('core')->long_version > $supportedVerions['max'] )
|
||||
{
|
||||
return \IPS\Theme::i()->getTemplate( 'global' )->message( 'get_support_unsupported_prerelease', 'warning' );
|
||||
}
|
||||
if ( \IPS\Application::load('core')->long_version < $supportedVerions['min'] )
|
||||
{
|
||||
return \IPS\Theme::i()->getTemplate( 'global' )->message( 'get_support_unsupported_obsolete', 'warning' );
|
||||
}
|
||||
}
|
||||
catch ( \Exception $e ) {}
|
||||
|
||||
$form = new \IPS\Helpers\Form( 'contact_support', 'contact_support' );
|
||||
$form->class = 'ipsForm_vertical ipsPad';
|
||||
|
||||
$extraOptions = array( 'admin' => 'support_request_admin' );
|
||||
if ( $this->_supportLog( TRUE ) )
|
||||
{
|
||||
$form->hiddenValues['_log'] = '1';
|
||||
$extraOptions['log'] = 'support_request_log';
|
||||
}
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'support_request_title', NULL, TRUE, array( 'maxLength' => 128 ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\Editor( 'support_request_body', NULL, TRUE, array( 'app' => 'core', 'key' => 'Admin', 'autoSaveKey' => 'acp-support-request' ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\CheckboxSet( 'support_request_extra', array( 'admin', 'log' ), FALSE, array( 'options' => $extraOptions ) ) );
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
$admin = NULL;
|
||||
if ( in_array( 'admin', $values['support_request_extra'] ) )
|
||||
{
|
||||
$password = '';
|
||||
$length = rand( 8, 15 );
|
||||
for ( $i = 0; $i < $length; $i++ )
|
||||
{
|
||||
do {
|
||||
$key = rand( 33, 126 );
|
||||
} while ( in_array( $key, array( 34, 39, 60, 62, 92 ) ) );
|
||||
$password .= chr( $key );
|
||||
}
|
||||
|
||||
$supportAccount = \IPS\Member::load( 'nobody@invisionpower.com', 'email' );
|
||||
if ( !$supportAccount->member_id )
|
||||
{
|
||||
$name = 'IPS Support';
|
||||
$_supportAccount = \IPS\Member::load( $name, 'name' );
|
||||
if ( $_supportAccount->member_id )
|
||||
{
|
||||
$number = 2;
|
||||
while ( $_supportAccount->member_id )
|
||||
{
|
||||
$name = "IPS Support {$number}";
|
||||
$_supportAccount = \IPS\Member::load( $name, 'name' );
|
||||
$number++;
|
||||
}
|
||||
}
|
||||
|
||||
$supportAccount = new \IPS\Member;
|
||||
$supportAccount->name = $name;
|
||||
$supportAccount->email = 'nobody@invisionpower.com';
|
||||
$supportAccount->member_group_id = \IPS\Settings::i()->admin_group;
|
||||
}
|
||||
|
||||
$supportAccount->members_pass_salt = $supportAccount->generateSalt();
|
||||
$supportAccount->members_pass_hash = $supportAccount->encryptedPassword( $password );
|
||||
$supportAccount->save();
|
||||
|
||||
$admin = json_encode( array( 'name' => $supportAccount->name, 'email' => $supportAccount->email, 'password' => $password, 'dir' => \IPS\CP_DIRECTORY ) );
|
||||
}
|
||||
|
||||
$log = NULL;
|
||||
if ( in_array( 'log', $values['support_request_extra'] ) )
|
||||
{
|
||||
$log = $this->_supportLog( FALSE );
|
||||
}
|
||||
|
||||
$key = md5( \IPS\Http\Url::internal('app=core&module=support&controller=support') );
|
||||
unset( $_SESSION["wizard-{$key}-step"] );
|
||||
unset( $_SESSION["wizard-{$key}-data"] );
|
||||
|
||||
\IPS\Output::i()->parseFileObjectUrls( $values['support_request_body'] );
|
||||
|
||||
$response = \IPS\Http\Url::ips('support')->request()->login( \IPS\Settings::i()->ipb_reg_number, '' )->post( array(
|
||||
'title' => $values['support_request_title'],
|
||||
'message' => $values['support_request_body'],
|
||||
'admin' => $admin,
|
||||
'log' => $log,
|
||||
'_log' => intval( isset( $values['_log'] ) )
|
||||
) );
|
||||
|
||||
switch ( $response->httpResponseCode )
|
||||
{
|
||||
case 200:
|
||||
case 201:
|
||||
return \IPS\Theme::i()->getTemplate( 'global' )->message( \IPS\Member::loggedIn()->language()->addToStack( 'get_support_done', FALSE, array( 'pluralize' => array( intval( (string) $response ) ) ) ), 'success' );
|
||||
|
||||
case 401:
|
||||
case 403:
|
||||
return \IPS\Theme::i()->getTemplate( 'global' )->message( 'get_support_no_license', 'warning' );
|
||||
|
||||
case 429:
|
||||
return \IPS\Theme::i()->getTemplate( 'global' )->message( 'get_support_duplicate', 'error' );
|
||||
|
||||
case 502:
|
||||
default:
|
||||
return \IPS\Theme::i()->getTemplate( 'global' )->message( 'get_support_error', 'error' );
|
||||
}
|
||||
}
|
||||
return (string) $form;
|
||||
return \IPS\Theme::i()->getTemplate( 'global' )->message( '__iaf__nulling_null_alert', 'error' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -724,4 +597,6 @@ class _support extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate('support')->logToSend( $this->_supportLog( FALSE ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Nulled by IandroidFan (IAF) */
|
||||
Reference in new issue
Block a user