Location: PHPKode > projects > ProPHP > ProPHP/include/functions.php
<?php
/*****************************************************************
************* BKWORKS PRO PHP V 0.5 BETA 1 ***********************
******************** BRYAN KOOIENGA ******************************
****************** DECEMBER 20, 2007 *****************************
*****************************************************************/

function is_admin($var_to_check) {
	if(strtoupper($var_to_check) == "ADMIN") { 
		return 1;
	} else {
		return 0;
	}
}

function  delete_directory($dirname)  {
        if  (is_dir($dirname))
                $dir_handle  =  opendir($dirname);
        if  (!$dir_handle)
                return  false;
        while($file  =  readdir($dir_handle))  {
                if  ($file  !=  "."  &&  $file  !=  "..")  {
                        if  (!is_dir($dirname."/".$file))
                                unlink($dirname."/".$file);
                        else
                                delete_directory($dirname.'/'.$file);                       
                }
        }
        closedir($dir_handle);
        rmdir($dirname);
        return  true;
}
Return current item: ProPHP