function delete($block_id = false, $dump = true) { if (!$block_id) { $block_id = params::get('block_id'); } if ($dump) { trash::tables('blocks'); trash::conf('blocks'); trash::dump(); } db::table('blocks'); db::where('block_id', $block_id); db::delete(); conf::delete('blocks', $block_id); }
function delete() { $tmpl_id = params::get('tmpl_id'); db::table('templates'); db::where('tmpl_id', $tmpl_id); $row = db::assoc(); $file = SYS_ROOT . 'tmpls/' . ADMIN_SITE . '/' . $row['tmpl_file']; trash::tables('templates', 'templates_versions'); trash::conf('tmpls'); trash::files($file); trash::dump(); @unlink($file); db::table('templates'); db::where('tmpl_id', $tmpl_id); db::delete(); conf::delete('tmpls', $tmpl_id); db::table('templates_versions'); db::where('tmpl_id', $tmpl_id); db::delete(); }
function files() { self::$files = func_get_args(); }
function delete($page_id = false, $dump = true) { if (!$page_id) { $page_id = params::get('page_id'); } if ($page_id == 1) { return false; } db::table('pages'); db::where('page_id', $page_id); db::limit(1); $page = db::assoc(); if ($page['page_child'] == '1') { return false; } if ($dump) { trash::tables('pages', 'pages_content', 'pages_versions'); trash::conf('pages', 'blocks', 'menus'); trash::dump(); } $parent = $page['page_parent']; if ($parent != 0) { db::table('pages'); db::where('page_parent', $parent); db::select(); if (db::rows() == 1) { db::table('pages'); db::where('page_id', $parent); db::update('page_child', '0'); } } db::table('menus_points'); db::where('site_id', $page['site_id']); db::where('point_link', $page['page_folder']); db::delete(); db::table('pages'); db::where('page_id', $page_id); db::delete(); db::table('pages_content'); db::where('page_id', $page_id); db::delete(); db::table('pages_versions'); db::where('page_id', $page_id); db::delete(); conf::delete('pages', $page_id); conf::deleteFrom('blocks', 'pages', $page_id); conf::deleteFrom('menus', 'pages', $page_id); db::table('pages_files'); db::where('page_id', $page_id); $r = db::select(); while ($a = mysql_fetch_assoc($r)) { self::deleteFilesFileForce($a); } }
function delete() { $user_id = params::get('user_id'); if ($user_id == 1) { return false; } trash::tables('admin_users'); trash::dump(); db::table('admin_users'); db::where('user_id', $user_id); db::delete(); }
function clear() { trash::clear(); }