<?php // +-------------------------------------------------+ // © 2002-2011 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net) // +-------------------------------------------------+ // $Id: cms_section_delete.inc.php,v 1.1 2015-03-10 17:12:25 arenou Exp $ if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) { die("no access"); } require_once $class_path . "/cms/cms_section.class.php"; require_once $class_path . "/cms/cms_editorial_tree.class.php"; if (!$cms_editorial_form_obj_id) { return false; } else { $section = new cms_section($cms_editorial_form_obj_id); $section->delete(); } print cms_editorial_tree::get_listing();
break; case "save_section": //header('Content-type: text/html;charset=iso-8859-1'); $section = new cms_section(); $section->get_from_form(); $section->save(); break; case "save_article": //header('Content-type: text/html;charset=iso-8859-1'); $article = new cms_article(); $article->get_from_form(); $article->save(); break; case "delete_section": $section = new cms_section($id); $res = $section->delete(); if ($res !== true) { $result = array("status" => "ko", "error_message" => $charset != "uft-8" ? utf8_encode($res) : $res); } else { $result = array('status' => "ok"); } print json_encode($result); break; case "delete_article": $article = new cms_article($id); $res = $article->delete(); if ($res !== true) { $result = array("status" => "ko", "error_message" => $charset != "uft-8" ? utf8_encode($res) : $res); } else { $result = array('status' => "ok"); }