<?php

function get_cotent(){
   GLOBAL $dbback;
   $arr = $dbback->GetAll("SELECT * FROM `navigation_type` where esta=1");
   foreach($arr as $key=>$value)
    {
      $detail = get_detail($value['id']);
      $array[$key]['str'] = $detail;
      $array[$key]['name'] = $value['name'];
      $array[$key]['id'] = $value['id'];
    }
   return $array;
}

//获得每个具体的类型的链接
function get_detail($kind)
{
   GLOBAL $dbback;
   $arr = $dbback->GetAll("SELECT * FROM `navigation_common` where kind=$kind");
   if($arr){
   foreach($arr as $key=>$value)
    {
   $ss.=$value['k_order'].'.<a href="/module/navigation/navigation_modify.php?action=modify&id='.$value['id'].'">'.$value['k_name'].'</a>&nbsp;&nbsp;';
    }
   }
    return $ss;
}
?>