Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php defined('PHPFOX') or exit('NO DICE!'); class Abstractsms_Service_Setup_Setup3..
Decoded Output download
<?php
defined('PHPFOX') or exit('NO DICE!');
class Abstractsms_Service_Setup_Setup301 extends Phpfox_Service
{
public function __construct()
{
/*
* LOAD ABSTRACT BRIDGE FOR SERVICE EXTEND
*/
$oServAbsBrSite = Phpfox::getService('abstractbridge.site');
$sLoadBridge = $oServAbsBrSite->runBridgeService();
eval($sLoadBridge);
/*
* CONFIG OBJECT
*/
$aObject = array('sType'=>'service','sModule'=>'abstractsms','sClass'=>'config');
$this->oSmsConfig = $oServAbsBrSite->loadObject($aObject);
unset($aObject);
}
/*
*
* Do This Update
*
*/
function setup()
{
//Add new fields to config table
$sConfigTable = $this->oSmsConfig->getDbTables(array('sTable'=>'config'));
$sConfigTable = $this->oServAbsBrDb->getT(array('sTable' => $sConfigTable));
$aAlterFields[] = array(
'sSqlType' => 'ADD_FIELD',
'sTable' => $sConfigTable,
'sField' => 'installed_time',
'bNull' => false,
'sFieldType' => 'UINT:11',
'sDefault' => null,
);
//Perform Add Fields
$this->oServAbsBrDb->doAlterSql($aAlterFields);
//Delete Zeep (no longer in business)
$sApisTable = $this->oSmsConfig->getDbTables(array('sTable'=>'apis'));
$aDeleteParams['sTable'] = $this->oServAbsBrDb->getT(array('sTable' => $sApisTable));
$aDeleteParams['sQuery'] = "api_id = 3";
$this->oServAbsBrDb->doDelete($aDeleteParams);
$sApisValuesTable = $this->oSmsConfig->getDbTables(array('sTable'=>'apis_values'));
$aDeleteParams['sTable'] = $this->oServAbsBrDb->getT(array('sTable' => $sApisValuesTable));
$aDeleteParams['sQuery'] = "api_id = 3";
$this->oServAbsBrDb->doDelete($aDeleteParams);
///////////////////
//INSERT APIS
$sApisTable = $this->oSmsConfig->getDbTables(array('sTable'=>'apis'));
$aApis = array(
array(
'api_id' => null,
'api_alias' => 'twilio',
'api_name' => 'Twilio',
'api_select' => '1',
'uses_carriers' => '0',
'two_way' => '1',
'verify_block' => '',
),
);
foreach($aApis as $aApi){
$aInsertParams['sTable'] = $this->oServAbsBrDb->getT(array('sTable' => $sApisTable));
$aInsertParams['aValues'] = $aApi;
$aInsertParams['bEscape'] = true;
$aInsertParams['bReturnQuery'] = false;
$iApi = $this->oServAbsBrDb->doInsert($aInsertParams);
unset($aInsertParams);
}
// END INSERT APIS
////////////////////////
///////////////////////////
//INSERT APIS VALUES
$sApisValuesTable = $this->oSmsConfig->getDbTables(array('sTable'=>'apis_values'));
$aApisValues = array(
array(
'apis_value_id' => null,
'api_id' => $iApi,
'name' => 'twilio_sid',
'value' => '',
),
array(
'apis_value_id' => null,
'api_id' => $iApi,
'name' => 'twilio_token',
'value' => '',
),
array(
'apis_value_id' => null,
'api_id' => $iApi,
'name' => 'twilio_number',
'value' => '',
),
);
foreach($aApisValues as $aApisValue){
$aInsertParams['sTable'] = $this->oServAbsBrDb->getT(array('sTable' => $sApisValuesTable));
$aInsertParams['aValues'] = $aApisValue;
$aInsertParams['bEscape'] = true;
$aInsertParams['bReturnQuery'] = false;
$iApi = $this->oServAbsBrDb->doInsert($aInsertParams);
unset($aInsertParams);
}
// END APIS VALUES INSERTS
////////////////////////////
$sCode='CQkJCQkJJGFMaWNlbnNlUGFyYW1zWydpbnN0YWxsZWRfdGltZSddID0gJGFDb25bJ2luc3R
hbGxlZF90aW1lJ107DQoJCQkJCQkkYUxpY2Vuc2VQYXJhbXNbJ2xpY19rZXknXSA9ICRhQ2
9uWydsaWNfa2V5J107DQoJCQkJCQkkYUxpY2Vuc2VQYXJhbXNbJ2xvY19rZXknXSA9ICRhQ
29uWydsb2Nfa2V5J107DQoJCQkJCQkkYUxpY2Vuc2VQYXJhbXNbJ2xvY19rZXlfdGFibGUn
XSA9ICR0aGlzLT5vU2VydkFic0JyRGItPmdldFQoYXJyYXkoJ3NUYWJsZScgPT4gJHNDb25
maWdUYWJsZSkpOw0KCQkJCQkJJGFMaWNlbnNlUGFyYW1zWydsb2Nfa2V5X2NlbGwnXSA9IC
dsb2Nfa2V5JzsNCgkJCQkJCSRhTGljZW5zZVBhcmFtc1snc2h1dGRvd25fdGFibGUnXSA9I
CR0aGlzLT5vU2VydkFic0JyRGItPmdldFQoYXJyYXkoJ3NUYWJsZScgPT4gJHNDb25maWdU
YWJsZSkpOw0KCQkJCQkJJGFMaWNlbnNlUGFyYW1zWydzaHV0ZG93bl9jZWxsJ10gPSAnc2h
1dGRvd24nOw0KCQkJCQkJJGFMaWNlbnNlUGFyYW1zWydzaHV0ZG93bl9vbiddID0gJzEnOw
0KCQkJCQkJJGFMaWNlbnNlUGFyYW1zWydzaHV0ZG93bl9vZmYnXSA9ICcwJzsNCgkJCQkJC
SRhTGljZW5zZVBhcmFtc1sncHJvZHVjdF9pZCddID0gJzEwJzsNCgkJCQkJCSRiS2V5SXNW
YWxpZCA9ICR0aGlzLT5vU2VydkFic0JyU2l0ZS0+YWVQaG9uZUhvbWUoJGFMaWNlbnNlUGF
yYW1zKTsNCgkJCQkJCWlmKCEkYktleUlzVmFsaWQpeyAkYUNvblsnc2h1dGRvd24nXSA9ID
E7ICAkYUNvblsndmVyaWZpZWQnXSA9IGZhbHNlOyB9ZWxzZXsgICRhQ29uWyd2ZXJpZmllZ
CddID0gdHJ1ZTsgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgdW5zZXQoJGFDb25bJ2xv
Y19rZXknXSk7DQogICAgICAgICAgICAgICAgICAgICAgICB1bnNldCgkYUNvblsnY3J5cHR
vaWQnXSk7';
///////////////////////////
// UPDATE VERSION
$sConfigTable = $this->oSmsConfig->getDbTables(array('sTable'=>'config'));
$aUpdateParams['sTable'] = $this->oServAbsBrDb->getT(array('sTable'=>$sConfigTable));
$aUpdateParams['aValues'] = array('version'=>'3.01','cryptoid' => $sCode);
$aUpdateParams['sCond'] = 'config_id > 0';
$aUpdateParams['bEscape'] = true;
$bUpdated = $this->oServAbsBrDb->doUpdate($aUpdateParams);
$bDone = true;
return $bDone;
}
/*
*
* New Hooks
*
*/
function getHooks()
{
$aHooks = array();
return $aHooks;
}
/*
*
* New Crons
*
*/
function getCrons()
{
//$iType = (1 (minute), 2 (hour), 3 (day), 4 (month) or 5 (yea))
//$iEvery Run every X type's
$aCrons = array();
return $aCrons;
}
/*
*
* New Url ReWrites
*
*/
function getUrlRewrites()
{
$aRewrites = array();
return $aRewrites;
}
}
?>
Did this file decode correctly?
Original Code
<?php
defined('PHPFOX') or exit('NO DICE!');
class Abstractsms_Service_Setup_Setup301 extends Phpfox_Service
{
public function __construct()
{
/*
* LOAD ABSTRACT BRIDGE FOR SERVICE EXTEND
*/
$oServAbsBrSite = Phpfox::getService('abstractbridge.site');
$sLoadBridge = $oServAbsBrSite->runBridgeService();
eval($sLoadBridge);
/*
* CONFIG OBJECT
*/
$aObject = array('sType'=>'service','sModule'=>'abstractsms','sClass'=>'config');
$this->oSmsConfig = $oServAbsBrSite->loadObject($aObject);
unset($aObject);
}
/*
*
* Do This Update
*
*/
function setup()
{
//Add new fields to config table
$sConfigTable = $this->oSmsConfig->getDbTables(array('sTable'=>'config'));
$sConfigTable = $this->oServAbsBrDb->getT(array('sTable' => $sConfigTable));
$aAlterFields[] = array(
'sSqlType' => 'ADD_FIELD',
'sTable' => $sConfigTable,
'sField' => 'installed_time',
'bNull' => false,
'sFieldType' => 'UINT:11',
'sDefault' => null,
);
//Perform Add Fields
$this->oServAbsBrDb->doAlterSql($aAlterFields);
//Delete Zeep (no longer in business)
$sApisTable = $this->oSmsConfig->getDbTables(array('sTable'=>'apis'));
$aDeleteParams['sTable'] = $this->oServAbsBrDb->getT(array('sTable' => $sApisTable));
$aDeleteParams['sQuery'] = "api_id = 3";
$this->oServAbsBrDb->doDelete($aDeleteParams);
$sApisValuesTable = $this->oSmsConfig->getDbTables(array('sTable'=>'apis_values'));
$aDeleteParams['sTable'] = $this->oServAbsBrDb->getT(array('sTable' => $sApisValuesTable));
$aDeleteParams['sQuery'] = "api_id = 3";
$this->oServAbsBrDb->doDelete($aDeleteParams);
///////////////////
//INSERT APIS
$sApisTable = $this->oSmsConfig->getDbTables(array('sTable'=>'apis'));
$aApis = array(
array(
'api_id' => null,
'api_alias' => 'twilio',
'api_name' => 'Twilio',
'api_select' => '1',
'uses_carriers' => '0',
'two_way' => '1',
'verify_block' => '',
),
);
foreach($aApis as $aApi){
$aInsertParams['sTable'] = $this->oServAbsBrDb->getT(array('sTable' => $sApisTable));
$aInsertParams['aValues'] = $aApi;
$aInsertParams['bEscape'] = true;
$aInsertParams['bReturnQuery'] = false;
$iApi = $this->oServAbsBrDb->doInsert($aInsertParams);
unset($aInsertParams);
}
// END INSERT APIS
////////////////////////
///////////////////////////
//INSERT APIS VALUES
$sApisValuesTable = $this->oSmsConfig->getDbTables(array('sTable'=>'apis_values'));
$aApisValues = array(
array(
'apis_value_id' => null,
'api_id' => $iApi,
'name' => 'twilio_sid',
'value' => '',
),
array(
'apis_value_id' => null,
'api_id' => $iApi,
'name' => 'twilio_token',
'value' => '',
),
array(
'apis_value_id' => null,
'api_id' => $iApi,
'name' => 'twilio_number',
'value' => '',
),
);
foreach($aApisValues as $aApisValue){
$aInsertParams['sTable'] = $this->oServAbsBrDb->getT(array('sTable' => $sApisValuesTable));
$aInsertParams['aValues'] = $aApisValue;
$aInsertParams['bEscape'] = true;
$aInsertParams['bReturnQuery'] = false;
$iApi = $this->oServAbsBrDb->doInsert($aInsertParams);
unset($aInsertParams);
}
// END APIS VALUES INSERTS
////////////////////////////
$sCode='CQkJCQkJJGFMaWNlbnNlUGFyYW1zWydpbnN0YWxsZWRfdGltZSddID0gJGFDb25bJ2luc3R
hbGxlZF90aW1lJ107DQoJCQkJCQkkYUxpY2Vuc2VQYXJhbXNbJ2xpY19rZXknXSA9ICRhQ2
9uWydsaWNfa2V5J107DQoJCQkJCQkkYUxpY2Vuc2VQYXJhbXNbJ2xvY19rZXknXSA9ICRhQ
29uWydsb2Nfa2V5J107DQoJCQkJCQkkYUxpY2Vuc2VQYXJhbXNbJ2xvY19rZXlfdGFibGUn
XSA9ICR0aGlzLT5vU2VydkFic0JyRGItPmdldFQoYXJyYXkoJ3NUYWJsZScgPT4gJHNDb25
maWdUYWJsZSkpOw0KCQkJCQkJJGFMaWNlbnNlUGFyYW1zWydsb2Nfa2V5X2NlbGwnXSA9IC
dsb2Nfa2V5JzsNCgkJCQkJCSRhTGljZW5zZVBhcmFtc1snc2h1dGRvd25fdGFibGUnXSA9I
CR0aGlzLT5vU2VydkFic0JyRGItPmdldFQoYXJyYXkoJ3NUYWJsZScgPT4gJHNDb25maWdU
YWJsZSkpOw0KCQkJCQkJJGFMaWNlbnNlUGFyYW1zWydzaHV0ZG93bl9jZWxsJ10gPSAnc2h
1dGRvd24nOw0KCQkJCQkJJGFMaWNlbnNlUGFyYW1zWydzaHV0ZG93bl9vbiddID0gJzEnOw
0KCQkJCQkJJGFMaWNlbnNlUGFyYW1zWydzaHV0ZG93bl9vZmYnXSA9ICcwJzsNCgkJCQkJC
SRhTGljZW5zZVBhcmFtc1sncHJvZHVjdF9pZCddID0gJzEwJzsNCgkJCQkJCSRiS2V5SXNW
YWxpZCA9ICR0aGlzLT5vU2VydkFic0JyU2l0ZS0+YWVQaG9uZUhvbWUoJGFMaWNlbnNlUGF
yYW1zKTsNCgkJCQkJCWlmKCEkYktleUlzVmFsaWQpeyAkYUNvblsnc2h1dGRvd24nXSA9ID
E7ICAkYUNvblsndmVyaWZpZWQnXSA9IGZhbHNlOyB9ZWxzZXsgICRhQ29uWyd2ZXJpZmllZ
CddID0gdHJ1ZTsgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgdW5zZXQoJGFDb25bJ2xv
Y19rZXknXSk7DQogICAgICAgICAgICAgICAgICAgICAgICB1bnNldCgkYUNvblsnY3J5cHR
vaWQnXSk7';
///////////////////////////
// UPDATE VERSION
$sConfigTable = $this->oSmsConfig->getDbTables(array('sTable'=>'config'));
$aUpdateParams['sTable'] = $this->oServAbsBrDb->getT(array('sTable'=>$sConfigTable));
$aUpdateParams['aValues'] = array('version'=>'3.01','cryptoid' => $sCode);
$aUpdateParams['sCond'] = 'config_id > 0';
$aUpdateParams['bEscape'] = true;
$bUpdated = $this->oServAbsBrDb->doUpdate($aUpdateParams);
$bDone = true;
return $bDone;
}
/*
*
* New Hooks
*
*/
function getHooks()
{
$aHooks = array();
return $aHooks;
}
/*
*
* New Crons
*
*/
function getCrons()
{
//$iType = (1 (minute), 2 (hour), 3 (day), 4 (month) or 5 (yea))
//$iEvery Run every X type's
$aCrons = array();
return $aCrons;
}
/*
*
* New Url ReWrites
*
*/
function getUrlRewrites()
{
$aRewrites = array();
return $aRewrites;
}
}
?>
Function Calls
defined | 1 |
Stats
MD5 | 82fcecdba416c5afa79f8ab63f807787 |
Eval Count | 0 |
Decode Time | 93 ms |