コード例 #1
0
             print $section->get_ajax_form("cms_section_edit", "cms_section_edit");
             break;
         case "article":
             $article = new cms_article($id);
             print $article->get_ajax_form("cms_article_edit", "cms_article_edit");
             break;
         case "list_articles":
             $articles = new cms_articles($id);
             print $articles->get_tab();
             break;
     }
     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");