()
{$ this- gt; errorCode;
} error_info ()
{$ this- gt; errorInfo;
} get_error_line ($ db_alias)
{(! isset ($ this- gt; db- gt; db_params [$ db_alias] [ host ]))
{
$ host= undefined host raquo ;;
}
{
$ host=$ this- gt; db- gt; db_params [$ db_alias] [ host ];
} (! isset ($ this- gt; db- gt; db_params [$ db_alias] [ db ]))
{
$ db= undefined db raquo ;;
}
{
$ db=$ this- gt; db- gt; db_params [$ db_alias] [ db ];
}
$ query=str_replace (array ( n , r , t ), raquo ;, $ this- gt; query); date ( laquo ; Ymd H: i: s ). :[MySQL - ERROR] ._errno ($ this- gt; db_handle). triggered by [. ($ _ SERVER [ PHP_SELF ]). | Raquo;.
$ operation. $ db_alias. /. $ host. /. $ db. | Raquo ;. $ query. ]: Raquo;. mysql_error ($ this- gt; db_handle). n n raquo ;;
} sqlString ($ string, $ nonDB=false)
{(get_magic_quotes_gpc ())
{
$ string=stripslashes ($ string);
} mysql_real_escape_string ($ string);
} sqlInteger ($ i, $ isNegative=false)
{
$ isNegative=$ i lt; 0; ($ isNegative)
{(int) $ i;
} else
{abs ((int) $ i);
}
}
} log
{static $ logs=array (); static $ files=array (); static $ enable=true; static function enabled ()
{config :: get ( log_enabled );
} static function msg ($ msg)
{
$ tmp [ msg ]=$ msg; self :: log_data (__ FUNCTION__, $ tmp);
} static function err ($ errno, $ errstr= raquo ;, $ errfile= raquo ;, $ errline= raquo ;, $ errcontext= )
{(func_num_args () == 1)
{
$ errstr=$ errno;
}
$ tmp [ msg ]=$ errstr; self :: log_data (__ FUNCTION__, $ tmp);
} static function exc ($ e)
{
$ tmp [ msg ]=$ e- gt; getMessage ();
$ tmp [ file ]=$ e- gt; getFile ();
$ tmp [ line ]=$ e- gt; getLine ();
$ tmp [ trace ]=$ e- gt; getTraceAsString (); self :: log_data (__ FUNCTION__, $ tmp);
} static function sql ($ msg)
{
$ msg=str_replace ( n raquo ;, raquo ;, $ msg);
$ msg=str_replace ( t raquo ;, raquo ;, $ msg);
$ msg=str_replace ( raquo ;, raquo ;, $ msg); :: write2file ( sql raquo ;, $ msg);
} static function show ($ type= )
{
$ str= raquo ;; (! $ type)
{
$ tmp=self :: $ logs;
}
{
$ tmp [$ type]=self :: $ logs [$ type];
} ($ tmp as $ type= gt; $ data)
{(! $ data)
{;
}
$ str.= lt; fieldset style=" font-size: 14px; border: 1px solid #ccc; clear:both;"gt;nlt;legendgt;raquo;.strtoupper($type).laquo;lt;/legendgt;nlt;pregt;nraquo;;($data as $ d)
{
$ str.=var_export ($ d, true);
}
$ str.= lt;/pre gt; n lt;/fieldset gt; n raquo ;;
} $ str;
} static function write2file ($ type, $ str)
{(! self :: enabled ())
{false;
}
$ str.= n raquo ;;
$ files=config :: get ( log_files ); (! $ fp =fopen (self :: $ files [$ type], a + ))
{;
} ($ fp, $ str); ($ fp);
} static function dump2file ()
{(! self :: enabled ())
{false;
} (self :: $ logs as $ type= gt; $ data)
{(! $ data)
{;
<...