コード例 #1
0
 public function delete_block()
 {
     $this->loadLanguage('developer_tools/developer_tools');
     $block_id = (int) $this->request->get['block_id'];
     if ($block_id) {
         $layout = new ALayoutManager();
         //check is block in some layout
         $bl = $layout->getBlocksLayouts($block_id);
         if ($bl) {
             $this->session->data['warning'] = $this->language->get('developer_tools_error_delete');
         } else {
             $layout->deleteBlock('', $block_id);
             $this->session->data['success'] = $this->language->get('developer_tools_text_success_deleted');
         }
     }
     $this->redirect($this->html->getSecureURL('design/blocks'));
 }
コード例 #2
0
ファイル: uninstall.php プロジェクト: harshzalavadiya/fatak
<?php

/*------------------------------------------------------------------------------
  $Id$

  AbanteCart, Ideal OpenSource Ecommerce Solution
  http://www.AbanteCart.com

  Copyright © 2011-2014 Belavier Commerce LLC

  This source file is subject to Open Software License (OSL 3.0)
  Lincence details is bundled with this package in the file LICENSE.txt.
  It is also available at this URL:
  <http://www.opensource.org/licenses/OSL-3.0>

 UPGRADE NOTE:
   Do not edit or add to this file if you wish to upgrade AbanteCart to newer
   versions in the future. If you wish to customize AbanteCart for your
   needs please refer to http://www.AbanteCart.com for more information.
------------------------------------------------------------------------------*/
if (!defined('DIR_CORE')) {
    header('Location: static_pages/');
}
$layout = new ALayoutManager();
$layout->deleteBlock('default_google_talk');
コード例 #3
0
 public function delete_block()
 {
     $block_id = (int) $this->request->get['block_id'];
     if ($block_id) {
         $layout = new ALayoutManager();
         if (!$layout->deleteBlock('', $block_id)) {
             $this->session->data['warning'] = $this->language->get('error_delete');
         } else {
             $this->session->data['success'] = $this->language->get('text_success_deleted');
         }
     }
     $this->redirect($this->html->getSecureURL('design/blocks'));
 }
コード例 #4
0
<?php

if (!defined('DIR_CORE')) {
    header('Location: static_pages/');
}
// delete block
$lm = new ALayoutManager();
$lm->deleteBlock('default_pp_express_button');
$lm->deleteBlock('default_pp_express_banner');
$block_names = array('paypal_billmelater_marketing');
$custom_blocks = $lm->getBlocksList(array('subsql_filter' => 'cb.custom_block_id <> 0'));
foreach ($custom_blocks as $block) {
    if (in_array($block['block_name'], $block_names)) {
        $this->db->query("DELETE FROM " . DB_PREFIX . "block_layouts\n\t\t\t\t\t\t   WHERE custom_block_id = '" . (int) $block['custom_block_id'] . "'");
        $this->cache->delete('layout.a.blocks');
        $this->cache->delete('layout.blocks');
        $lm->deleteCustomBlock($block['custom_block_id']);
    }
}
$rm = new AResourceManager();
$rm->setType('image');
$resources = $rm->getResources('extensions', 'default_pp_express');
if (is_array($resources)) {
    foreach ($resources as $resource) {
        $rm->deleteResource($resource['resource_id']);
    }
}