Esempio n. 1
0
 /**
  * ฟังก์ชั่นแสดงเนื้อหา
  *
  * @param string $detail ข้อความ
  * @param boolean $canview true จะแสดงข้อความเตือน 'ยังไม่ได้เข้าระบบ' หากไม่ได้เข้าระบบ สำหรับส่วนที่อยู่ในกรอบ code
  * @param [boolean] $rude (optional) true=ตรวจสอบคำหยาบด้วย (default true)
  * @param [boolean] $txt (optional) true=เปลี่ยน tab เป็นช่องว่าง 4 ตัวอักษร (default false)
  * @return string คืนค่าข้อความ
  */
 public static function showDetail($detail, $canview, $rude = true, $txt = false)
 {
     if ($txt) {
         $detail = preg_replace('/[\\t]/', '    ', $detail);
     }
     if ($rude) {
         return gcms::htmlhighlighter(gcms::CheckRude($detail), $canview);
     } else {
         return gcms::htmlhighlighter($detail, $canview);
     }
 }