From 9daf4133bf6f61cbe3787a46b021d261242a85f0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 19 May 2007 08:34:02 +0100 Subject: add tagwall --- tw/error/LINK_error.php | 94 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 tw/error/LINK_error.php (limited to 'tw/error/LINK_error.php') diff --git a/tw/error/LINK_error.php b/tw/error/LINK_error.php new file mode 100644 index 000000000..580e15fbc --- /dev/null +++ b/tw/error/LINK_error.php @@ -0,0 +1,94 @@ +TW_errors($options); + } + + function add($errval, $position, $show_code, $param1=null, $param2=null ) + { + $err_id = "TW_err_".$this->identifier++; + $this->ErrorArray[$err_id] = array($errval, $param1, $param2, $position, $show_code); + if($errval & 0xff00) $this->IsError = 1; + + // append errors and warnings + if(($errval & 0x0ff0) && $show_code != null ) + return ''.$show_code.''; + + return null; + } + + // You can call this method from your project and create nice list of errors. + // + // $lang - error string pack + // $mask - any combination of following masks: + // 0xf000 - internal, + // 0x0f00 - errors, + // 0x00f0 - warnings, + // 0x000f - comments + // + function create_list (&$lang, $mask = 0x0ff0) + { + $errors = $this->get_by_mask($mask); + + $out = ""; + } + + function get_error_class ($error) + { + if($error&0xf000) return "tw-err-int"; + if($error&0x0f00) return "tw-err-err"; + if($error&0x00f0) return "tw-err-war"; + return "tw-err-com"; + } +} +?> \ No newline at end of file -- cgit v1.2.3