Example #1
0
function textarea_edit($string)
{
    if (!is_array($string)) {
        return forTag($string);
    }
    foreach ($string as $key => $val) {
        $string[$key] = textarea_edit($val);
    }
    return $string;
}
 public function edit()
 {
     if (strtolower($_SERVER["REQUEST_METHOD"]) != "post") {
         $Dao = D("App");
         $vo = $Dao->where("id=" . $_GET["id"])->find();
         if ($vo === false) {
             $this->assign("jumpUrl", __URL__);
             $this->error("Non-existed record");
         }
         // dump($vo);
         $this->assign("app", textarea_edit($vo));
         $this->display();
     } else {
         $this->save("save");
     }
 }