X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=app%2Fout%2Fdefault%2Ffunctions.php;fp=app%2Fout%2Fdefault%2Ffunctions.php;h=f96e4b8865c00116c87516d001c18072dc80b655;hb=5ebd33d09a045a0f88bc5b2fec1bed8b9571ce53;hp=0000000000000000000000000000000000000000;hpb=a3ee9fb267bbf0f639d711287a25dd31f0ab0fea;p=mw_pages diff --git a/app/out/default/functions.php b/app/out/default/functions.php new file mode 100644 index 0000000..f96e4b8 --- /dev/null +++ b/app/out/default/functions.php @@ -0,0 +1,112 @@ +url("pages/view/page", array("id" => $page["id"]))."\">".$page["title"]."\n"; + if($path_item["id"] == $page["id"]){ + if($sub_content = pages_arbo_navig_lis($env, $page, $ariane)){ + $content .= + "\n"; + } + } + } + } + else{ + foreach($arbo["subs"] as $page){ + $content .= "
  • url("pages/view/page", array("id" => $page["id"]))."\">".$page["title"]."
  • \n"; + } + } + } + return $content; + } + endif; + + if(!function_exists("pages_arbo_edit_select_options")) : + function pages_arbo_edit_select_options($arbo, $id_page, $id_parent, $indent_increment = "", $indent = ""){ + $arbo["id"] = $arbo["id"] ? $arbo["id"] : ""; + $content = + "" + .$indent.($arbo["id"] ? $arbo["title"] : "Aucune") + .""; + if($arbo["subs"]){ + $indent .= $indent_increment; + foreach($arbo["subs"] as $i => $sub){ + if(!isset($id_page) || $id_page != $sub["id"]){ + $content .= pages_arbo_edit_select_options($sub, $id_page, $id_parent, $indent_increment, $indent); + } + } + } + return $content; + } + endif; + + if(!function_exists("pages_arbo_list_select_options")) : + function pages_arbo_list_select_options($env, $etat, $arbo, $current_page_id, $indent_increment = "", $indent = ""){ + $arbo["id"] = isset($arbo["id"]) ? $arbo["id"] : ""; + $content = + "url($etat, array("parent" => $arbo["id"]))."\"" + .(isset($current_page_id) && ($arbo["id"] == $current_page_id) ? " selected=\"selected\"" : "") + .">" + .$indent.($arbo["id"] ? $arbo["title"] : "Racine des pages") + .""; + if($arbo["subs"]){ + $indent .= $indent_increment; + foreach($arbo["subs"] as $i => $sub){ + $content .= pages_arbo_list_select_options($env, $etat, $sub, $current_page_id, $indent_increment, $indent); + } + } + return $content; + } + endif; + + if(!function_exists("pages_arbo_start_select_options")) : + function pages_arbo_start_select_options($env, $arbo, $current_start_action, $current_start_action_params, $indent_increment = "", $indent = ""){ + $arbo["id"] = isset($arbo["id"]) ? $arbo["id"] : ""; + if($arbo["id"]){ + $content = + "" + .$indent.$arbo["title"] + .""; + } + if($arbo["subs"]){ + $indent .= $indent_increment; + $indent .= "  "; + foreach($arbo["subs"] as $i => $sub){ + $content .= pages_arbo_start_select_options($env, $sub, $current_start_action, $current_start_action_params, $indent_increment, $indent); + } + } + return $content; + } + endif; + +?> \ No newline at end of file