http://www.fsf.org/ or write * to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. * */ /* DEBUG CLASS */ /** * This is the cmsdAm debug class. You can use it in your templates to print a debug line * with a level of debuging. If the debuging level is less or equal to the configuration parameter * LOG_debuglevel then the line is printed. You can use the CSS class .debug to make changes to * the format of the text.

* Class instance: $cms->debug * @author dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net> */ class cmsdam_debug { /** * You should not use this variable from your section. * @access private */ var $conf; /** * This api method write debug strings on html. * You can use $level for the debuging level and $test for the string to print. * If the debug is off it returns false. To set debugging off please take a look at the * cmsdam_conf class for the correct parameter to set in the configuration file. * * @param int level This is the debuging level of your string * @param str text This is the debuging string you want to print to your section * @return boolean True on debugging actions, False if debug is off * @author dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net> */ function debug_write($level, $text) { if ($this->conf->LOG_debuglevel < $level) { // debug level low, please don't debug! return false; } if ($this->conf->LOG_debug == "YES") { // Debug is ON echo "
DEBUG[$level]: " . $text . "
\n"; return true; } return false; } } ?>