Пример #1
0
     echo message::success(lang::get('save_status'));
 }
 if (ajax::is()) {
     $sort = type::post('array', 'array');
     $sql = sql::factory();
     $sql->setTable('structure_area');
     foreach ($sort as $s => $s_id) {
         $sql->setWhere('id=' . $s_id . ' AND block = 0');
         $sql->addPost('sort', $s + 1);
         $sql->update();
     }
     pageCache::generateArticle($structure_id);
     ajax::addReturn(message::success(lang::get('save_sorting'), true));
 }
 if ($action == 'delete' && dyn::get('user')->hasPerm('page[delete]')) {
     $id = pageAreaAction::delete($id);
     pageCache::deleteFile($id);
     echo message::success(lang::get('structure_content_delete'));
 }
 $pageSql = sql::factory();
 $pageSql->result('SELECT name FROM ' . sql::table('structure') . ' WHERE id = ' . $structure_id);
 if ($action == 'add' || $action == 'edit') {
     $where = 'AND s.id = ' . $id;
 } else {
     $where = '';
 }
 $sql = sql::factory();
 $sql->result('SELECT s.*, m.name, m.output, m.input
                 FROM ' . sql::table('structure_area') . ' as s
                 LEFT JOIN
                     ' . sql::table('module') . ' as m
Пример #2
0
        echo message::success(lang::get('save_status'));
    }
    if (ajax::is()) {
        $sort = type::post('array', 'array');
        $sql = sql::factory();
        $sql->setTable('structure_area');
        foreach ($sort as $s => $s_id) {
            $sql->setWhere('id=' . $s_id . ' AND block = 1');
            $sql->addPost('sort', $s + 1);
            $sql->update();
        }
        pageCache::generateArticle($structure_id, true);
        ajax::addReturn(message::success(lang::get('save_sorting'), true));
    }
    if ($action == 'delete') {
        $id = pageAreaAction::delete($id, true);
        pageCache::deleteFile($id, 'block');
        echo message::success(lang::get('structure_content_delete'));
    }
    $blockSql = sql::factory();
    $blockSql->result('SELECT name FROM ' . sql::table('blocks') . ' WHERE id = ' . $structure_id);
    ?>
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title pull-left"><?php 
    echo $blockSql->get('name');
    ?>
</h3>
                    <div class="pull-right">