<?php if (!is_null($structure_id) && dyn::get('user')->hasPerm('page[content]')) { $sort = type::super('sort', 'int'); // Bugfix, das neu erstelle Blöcke nicht einzgezeigt werden if (!is_null(type::post('save-back')) || !is_null(type::post('save'))) { pageAreaAction::saveBlock(); page::generateArticle($structure_id); echo message::success(lang::get('structure_content_save'), true); } if ($action == 'online') { $sql = sql::factory(); $sql->query('SELECT online FROM ' . sql::table('structure_area') . ' WHERE id=' . $id)->result(); $online = $sql->get('online') ? 0 : 1; $sql->setTable('structure_area'); $sql->setWhere('id=' . $id); $sql->addPost('online', $online); $sql->update(); page::generateArticle($structure_id); 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); $sql->addPost('sort', $s + 1); $sql->update(); } page::generateArticle($structure_id);
<?php if (!is_null($structure_id) && dyn::get('user')->hasPerm('page[content]')) { $sort = type::super('sort', 'int'); // Bugfix, das neu erstelle Blöcke nicht einzgezeigt werden if (!is_null(type::post('save-back')) || !is_null(type::post('save'))) { pageAreaAction::saveBlock(false); pageCache::generateArticle($structure_id); echo message::success(lang::get('structure_content_save'), true); } if ($action == 'online') { $sql = sql::factory(); $sql->query('SELECT online FROM ' . sql::table('structure_area') . ' WHERE id=' . $id)->result(); $online = $sql->get('online') ? 0 : 1; $sql->setTable('structure_area'); $sql->setWhere('id=' . $id); $sql->addPost('online', $online); $sql->update(); pageCache::generateArticle($structure_id); 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);
<?php if (!is_null($structure_id) && dyn::get('user')->hasPerm('page[content]')) { $sort = type::super('sort', 'int'); // Bugfix, das neu erstelle Blöcke nicht einzgezeigt werden if (!is_null(type::post('save-back')) || !is_null(type::post('save'))) { pageAreaAction::saveBlock(true); pageCache::generateArticle($structure_id, true); echo message::success(lang::get('structure_content_save'), true); } if ($action == 'online') { $sql = sql::factory(); $sql->query('SELECT online FROM ' . sql::table('structure_area') . ' WHERE id=' . $id)->result(); $online = $sql->get('online') ? 0 : 1; $sql->setTable('structure_area'); $sql->setWhere('id=' . $id); $sql->addPost('online', $online); $sql->update(); pageCache::generateArticle($structure_id, true); 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);