예제 #1
0
	function d3download_set_default_user_access( $mydirname )
	{
		require_once dirname( dirname(__FILE__) ).'/class/user_access.php' ;

		$db =& Database::getInstance() ;
		$user_access = new user_access( $mydirname ) ;
		$crs = $db->query( "SELECT cid FROM ".$db->prefix( $mydirname."_cat" )." WHERE pid = 0" ) ;
		while( list( $id ) = $db->fetchRow( $crs ) ) {
			$cid = intval( $id );
			$error = $user_access->default_user_access( $cid, 1, 1 ) ;
		}
		return $error ;
	}