예제 #1
0
             /* === Hook === */
             foreach (cot_getextplugins('admin.structure.add.done') as $pl) {
                 include $pl;
             }
             /* ===== */
             cot_message('Added');
         } elseif (is_array($res)) {
             cot_error($res[0], $res[1]);
         } else {
             cot_error('Error');
         }
     }
     cot_redirect(cot_url('admin', 'm=structure&n=' . $n . '&mode=' . $mode . '&d=' . $durl, '', true));
 } elseif ($a == 'delete') {
     cot_check_xg();
     if (cot_structure_delete($n, $c, $is_module)) {
         /* === Hook === */
         foreach (cot_getextplugins('admin.structure.delete.done') as $pl) {
             include $pl;
         }
         /* ===== */
         cot_message('Deleted');
     }
     cot_redirect(cot_url('admin', 'm=structure&n=' . $n . '&mode=' . $mode . '&d=' . $durl, '', true));
 } elseif ($a == 'resyncall') {
     cot_check_xg();
     $res = false;
     $area_sync = 'cot_' . $n . '_sync';
     if (function_exists($area_sync)) {
         $res = true;
         $sql = $db->query("SELECT structure_code FROM {$db_structure} WHERE structure_area='" . $db->prep($n) . "'");
<?php

/**
 * pagecattree Plugin for Cotonti CMF
 *
 * @version 2.0.0
 * @author esclkm, http://www.littledev.ru
 * @copyright (c) 2008-2011 esclkm, http://www.littledev.ru
 */
defined('COT_CODE') or die('Wrong URL.');
cot_check_xg();
/* @var $cot_structure structure */
/* @var $db CotDB */
/* @var $cache Cache */
/* @var $t Xtemplate */
$cat = $cot_structure->category($id);
$c = $cat['structure_code'];
if (cot_structure_delete($n, $cat['structure_code'], $is_module)) {
    /* === Hook === */
    foreach (cot_getextplugins('admin.structure.delete.done') as $pl) {
        include $pl;
    }
    /* ===== */
    cot_message('Deleted');
}
cot_redirect(cot_url('admin', 'm=other&p=cateditor&n=' . $n, '', true));