示例#1
0
 public static function display()
 {
     $id = $_GET['id'];
     if (!is_numeric($id)) {
         $r = self::invalidIdError();
         i18n::restore();
         cc_redirect(Admin::link('content'));
         return array('Error', $r);
     }
     $pageInfo = Database::select('content', '*', array('content_id = ?', $id));
     $row = $pageInfo->fetch(PDO::FETCH_ASSOC);
     if (!$row) {
         $r = self::invalidIdError();
         i18n::restore();
         cc_redirect(Admin::link('content'));
         return $r;
     }
     $row['settings'] = unserialize($row['settings']);
     self::$row = $row;
     return Content::nodeDisplay('edit_display', $row['type'], $row);
 }