if ($type == "single") {
             $art_cat_obj->setCat_type("single");
         }
     }
 }
 if ($slt_cat_id == 0) {
     $art_index = $top_index;
 } else {
     $art_index = $art_cat_arr[$slt_cat_id]['art_index'];
 }
 $flag = $art_cat_arr[$slt_cat_id];
 while ($flag['art_cat_pid']) {
     $flag = $art_cat_arr[$flag['art_cat_pid']];
 }
 if ($hdn_art_cat_id) {
     $art_cat_obj->setArt_cat_id($hdn_art_cat_id);
     $art_index = $art_index . "{{$hdn_art_cat_id}}";
     $art_cat_obj->setArt_index($art_index);
     $res = $art_cat_obj->edit_keke_witkey_article_category();
     if ($res) {
         kekezu::admin_system_log($_lang['edit_article_cat'] . $txt_cat_name);
         kekezu::admin_show_msg($_lang['edit_article_cat_success'], 'index.php?do=' . $do . '&view=' . $view . '&type=' . $type . '&art_cat_id=' . $hdn_art_cat_id, 3, '', 'success');
     }
 } else {
     $res = $art_cat_obj->create_keke_witkey_article_category();
     $art_index = $art_index . "{{$res}}";
     if ($res) {
         $art_cat_obj->setWhere("art_cat_id='{$res}'");
         $art_cat_obj->setArt_index($art_index);
         $art_cat_obj->edit_keke_witkey_article_category();
         kekezu::admin_system_log($_lang['add_article_cat'] . $txt_cat_name);