########################################################### # # oxyl # ########################################################### # You must replace "oxyl" and "OXYL" with the lower case name and # upper case name of your new package. Some places below will say # "Do not change this" - that does not include this global change, # which must always be done to ensure we have unique names. # # OXYL_VERSION, OXYL_SITE and OXYL_SOURCE define # the upstream location of the source code for the package. # OXYL_DIR is the directory which is created when the source # archive is unpacked. # OXYL_UNZIP is the command used to unzip the source. # It is usually "zcat" (for .gz) or "bzcat" (for .bz2) # # You should change all these variables to suit your package. # Please make sure that you add a description, and that you # list all your packages' dependencies, seperated by commas. # # If you list yourself as MAINTAINER, please give a valid email # address, and indicate your irc nick if it cannot be easily deduced # from your name or email address. If you leave MAINTAINER set to # "NSLU2 Linux" other developers will feel free to edit. # OXYL_SITE=http://www.oxyl.de OXYL_VERSION=2.5.36 OXYL_SOURCE=oxyl-$(OXYL_VERSION).tar.gz OXYL_DIR=oxyl OXYL_UNZIP=zcat OXYL_MAINTAINER=NSLU2 Linux OXYL_DESCRIPTION=Oxyl is a Mediaplayer for Pinnacle Showcenter and other Syabas Clients OXYL_SECTION=Multimedia OXYL_PRIORITY=optional OXYL_DEPENDS=php, php-gd, php-fcgi, lighhtpd OXYL_SUGGESTS= OXYL_CONFLICTS= # # OXYL_IPK_VERSION should be incremented when the ipk changes. # OXYL_IPK_VERSION=1 # # OXYL_CONFFILES should be a list of user-editable files OXYL_CONFFILES=/opt/etc/lighttpd/lighttpd.conf # # OXYL_PATCHES should list any patches, in the the order in # which they should be applied to the source code. # OXYL_PATCHES=$(OXYL_SOURCE_DIR)/functions.inc.patch \ $(OXYL_SOURCE_DIR)/oxyl_box_check.php.patch # # If the compilation of the package requires additional # compilation or linking flags, then list them here. # OXYL_CPPFLAGS= OXYL_LDFLAGS= # # OXYL_BUILD_DIR is the directory in which the build is done. # OXYL_SOURCE_DIR is the directory which holds all the # patches and ipkg control files. # OXYL_IPK_DIR is the directory in which the ipk is built. # OXYL_IPK is the name of the resulting ipk files. # # You should not change any of these variables. # OXYL_BUILD_DIR=$(BUILD_DIR)/oxyl OXYL_SOURCE_DIR=$(SOURCE_DIR)/oxyl OXYL_IPK_DIR=$(BUILD_DIR)/oxyl-$(OXYL_VERSION)-ipk OXYL_IPK=$(BUILD_DIR)/oxyl_$(OXYL_VERSION)-$(OXYL_IPK_VERSION)_$(TARGET_ARCH).ipk .PHONY: oxyl-source oxyl-unpack oxyl oxyl-stage oxyl-ipk oxyl-clean oxyl-dirclean oxyl-check # # This is the dependency on the source code. If the source is missing, # then it will be fetched from the site using wget. # $(DL_DIR)/$(OXYL_SOURCE): $(WGET) -P $(DL_DIR) $(OXYL_SITE)/$(OXYL_SOURCE) || \ $(WGET) -P $(DL_DIR) $(SOURCES_NLO_SITE)/$(OXYL_SOURCE) # # The source code depends on it existing within the download directory. # This target will be called by the top level Makefile to download the # source code's archive (.tar.gz, .bz2, etc.) # oxyl-source: $(DL_DIR)/$(OXYL_SOURCE) $(OXYL_PATCHES) # # This target unpacks the source code in the build directory. # If the source archive is not .tar.gz or .tar.bz2, then you will need # to change the commands here. Patches to the source code are also # applied in this target as required. # # This target also configures the build within the build directory. # Flags such as LDFLAGS and CPPFLAGS should be passed into configure # and NOT $(MAKE) below. Passing it to configure causes configure to # correctly BUILD the Makefile with the right paths, where passing it # to Make causes it to override the default search paths of the compiler. # # If the compilation of the package requires other packages to be staged # first, then do that first (e.g. "$(MAKE) -stage -stage"). # # If the package uses GNU libtool, you should invoke $(PATCH_LIBTOOL) as # shown below to make various patches to it. # $(OXYL_BUILD_DIR)/.configured: $(DL_DIR)/$(OXYL_SOURCE) $(OXYL_PATCHES) # $(MAKE) -stage -stage rm -rf $(BUILD_DIR)/$(OXYL_DIR) $(OXYL_BUILD_DIR) $(OXYL_UNZIP) $(DL_DIR)/$(OXYL_SOURCE) | tar -C $(BUILD_DIR) -xvf - if test -n "$(OXYL_PATCHES)" ; \ then cat $(OXYL_PATCHES) | \ patch -d $(BUILD_DIR)/$(OXYL_DIR) -p0 ; \ fi if test "$(BUILD_DIR)/$(OXYL_DIR)" != "$(OXYL_BUILD_DIR)" ; \ mv $(BUILD_DIR)/$(OXYL_DIR) $(OXYL_BUILD_DIR) ; \ fi # (cd $(OXYL_BUILD_DIR); \ # $(TARGET_CONFIGURE_OPTS) \ # CPPFLAGS="$(STAGING_CPPFLAGS) $(OXYL_CPPFLAGS)" \ # LDFLAGS="$(STAGING_LDFLAGS) $(OXYL_LDFLAGS)" \ # ./configure \ # --build=$(GNU_HOST_NAME) \ # --host=$(GNU_TARGET_NAME) \ # --target=$(GNU_TARGET_NAME) \ # --prefix=/opt \ # --disable-nls \ # --disable-static \ # ) # $(PATCH_LIBTOOL) $(OXYL_BUILD_DIR)/libtool touch $@ # touch $(OXYL_BUILD_DIR)/.configured oxyl-unpack: $(OXYL_BUILD_DIR)/.configured # # This builds the actual binary. # #$(OXYL_BUILD_DIR)/.built: $(OXYL_BUILD_DIR)/.configured # rm -f $@ # $(MAKE) -C $(OXYL_BUILD_DIR) # touch $@ # # This is the build convenience target. # oxyl: $(OXYL_BUILD_DIR)/.configured # # If you are building a library, then you need to stage it too. # #$(OXYL_BUILD_DIR)/.staged: $(OXYL_BUILD_DIR)/.built # rm -f $@ # $(MAKE) -C $(OXYL_BUILD_DIR) DESTDIR=$(STAGING_DIR) install # touch $@ #oxyl-stage: $(OXYL_BUILD_DIR)/.staged # # This rule creates a control file for ipkg. It is no longer # necessary to create a seperate control file under sources/oxyl # $(OXYL_IPK_DIR)/CONTROL/control: @install -d $(@D) @rm -f $@ @echo "Package: oxyl" >>$@ @echo "Architecture: $(TARGET_ARCH)" >>$@ @echo "Priority: $(OXYL_PRIORITY)" >>$@ @echo "Section: $(OXYL_SECTION)" >>$@ @echo "Version: $(OXYL_VERSION)-$(OXYL_IPK_VERSION)" >>$@ @echo "Maintainer: $(OXYL_MAINTAINER)" >>$@ @echo "Source: $(OXYL_SITE)/$(OXYL_SOURCE)" >>$@ @echo "Description: $(OXYL_DESCRIPTION)" >>$@ @echo "Depends: $(OXYL_DEPENDS)" >>$@ @echo "Suggests: $(OXYL_SUGGESTS)" >>$@ @echo "Conflicts: $(OXYL_CONFLICTS)" >>$@ # # This builds the IPK file. # # Binaries should be installed into $(OXYL_IPK_DIR)/opt/sbin or $(OXYL_IPK_DIR)/opt/bin # (use the location in a well-known Linux distro as a guide for choosing sbin or bin). # Libraries and include files should be installed into $(OXYL_IPK_DIR)/opt/{lib,include} # Configuration files should be installed in $(OXYL_IPK_DIR)/opt/etc/oxyl/... # Documentation files should be installed in $(OXYL_IPK_DIR)/opt/doc/oxyl/... # Daemon startup scripts should be installed in $(OXYL_IPK_DIR)/opt/etc/init.d/S??oxyl # # You may need to patch your application to make it use these locations. # $(OXYL_IPK): $(OXYL_BUILD_DIR)/.configured rm -rf $(OXYL_IPK_DIR) $(BUILD_DIR)/oxyl_*_$(TARGET_ARCH).ipk # $(MAKE) -C $(OXYL_BUILD_DIR) DESTDIR=$(OXYL_IPK_DIR) install-strip install -d $(OXYL_IPK_DIR)/opt/share/www/oxyl cp -a $(OXYL_BUILD_DIR)/* $(OXYL_IPK_DIR)/opt/share/www/oxyl install -d $(OXYL_IPK_DIR)/opt/etc/lighttpd install -m 644 $(OXYL_SOURCE_DIR)/lighttpd.conf $(OXYL_IPK_DIR)/opt/etc/lighttpd/lighttpd.conf install -m 644 $(OXYL_SOURCE_DIR)/lighttpd.conf.oxyl $(OXYL_IPK_DIR)/opt/etc/lighttpd/lighttpd.conf.oxyl install -d $(OXYL_IPK_DIR)/opt/var/log/lighttpd install -m 755 $(OXYL_SOURCE_DIR)/error.log $(OXYL_IPK_DIR)/opt/var/log/lighttpd/error.log # sed -i -e '/^#!/aOPTWARE_TARGET=${OPTWARE_TARGET}' $(OXYL_IPK_DIR)/opt/etc/init.d/SXXoxyl $(MAKE) $(OXYL_IPK_DIR)/CONTROL/control install -m 755 $(OXYL_SOURCE_DIR)/postinst $(OXYL_IPK_DIR)/CONTROL/postinst sed -i -e '/^#!/aOPTWARE_TARGET=${OPTWARE_TARGET}' $(OXYL_IPK_DIR)/CONTROL/postinst # install -m 755 $(OXYL_SOURCE_DIR)/prerm $(OXYL_IPK_DIR)/CONTROL/prerm # sed -i -e '/^#!/aOPTWARE_TARGET=${OPTWARE_TARGET}' $(OXYL_IPK_DIR)/CONTROL/prerm echo $(OXYL_CONFFILES) | sed -e 's/ /\n/g' > $(OXYL_IPK_DIR)/CONTROL/conffiles cd $(BUILD_DIR); $(IPKG_BUILD) $(OXYL_IPK_DIR) # # This is called from the top level makefile to create the IPK file. # oxyl-ipk: $(OXYL_IPK) # # This is called from the top level makefile to clean all of the built files. # oxyl-clean: rm -f $(OXYL_BUILD_DIR)/.built -$(MAKE) -C $(OXYL_BUILD_DIR) clean # # This is called from the top level makefile to clean all dynamically created # directories. # oxyl-dirclean: rm -rf $(BUILD_DIR)/$(OXYL_DIR) $(OXYL_BUILD_DIR) $(OXYL_IPK_DIR) $(OXYL_IPK) # # # Some sanity check for the package. # oxyl-check: $(OXYL_IPK) perl scripts/optware-check-package.pl --target=$(OPTWARE_TARGET) $(OXYL_IPK) the output from make oxyl if test -n "/home/heinz/devel/optware/sources/oxyl/functions.inc.patch /home/heinz/devel/optware/sources/oxyl/oxyl_box_check.php.patch " ; \ then cat /home/heinz/devel/optware/sources/oxyl/functions.inc.patch /home/heinz/devel/optware/sources/oxyl/oxyl_box_check.php.patch | \ patch -d /home/heinz/devel/optware/builds/oxyl -p0 ; \ fi patching file common/functions.inc Hunk #1 FAILED at 708. Hunk #2 FAILED at 741. Hunk #3 FAILED at 1825. Hunk #4 FAILED at 1892. Hunk #5 FAILED at 1933. Hunk #6 FAILED at 1951. Hunk #7 FAILED at 1966. 7 out of 7 hunks FAILED -- saving rejects to file common/functions.inc.rej patching file common/oxyl_box_check.php Hunk #1 FAILED at 68. 1 out of 1 hunk FAILED -- saving rejects to file common/oxyl_box_check.php.rej make: *** [/home/heinz/devel/optware/builds/oxyl/.configured] Fehler 1 oxyl_box_check.php.patch : --- common/oxyl_box_check.php.org 2007-06-10 21:11:40.000000000 +0200 +++ common/oxyl_box_check.php 2007-06-09 07:20:20.000000000 +0200 @@ -68,8 +68,8 @@ echo ''; //apache version -$apache_check = stristr($_SERVER["SERVER_SOFTWARE"],'apache/2')!== FALSE ? 1 : 0; -echo 'Apache Version: '; +$apache_check = stristr($_SERVER["SERVER_SOFTWARE"],'lighttpd')!== FALSE ? 1 : 0; +echo 'Server Version: '; echo ''.$_SERVER["SERVER_SOFTWARE"].($apache_check ? '' : '  < Apache/2.0 !').''; echo ''; oxyl_box_check.php.rej : *************** *** 68,75 **** echo ''; //apache version - $apache_check = stristr($_SERVER["SERVER_SOFTWARE"],'apache/2')!== FALSE ? 1 : 0; - echo 'Apache Version: '; echo ''.$_SERVER["SERVER_SOFTWARE"].($apache_check ? '' : '  < Apache/2.0 !').''; echo ''; --- 68,75 ---- echo ''; //apache version + $apache_check = stristr($_SERVER["SERVER_SOFTWARE"],'lighttpd')!== FALSE ? 1 : 0; + echo 'Server Version: '; echo ''.$_SERVER["SERVER_SOFTWARE"].($apache_check ? '' : '  < Apache/2.0 !').''; echo ''; oxyl_box_check.php.org : '; // Creates Directory if needed //------------------------------- if (isset($action) && $action=='mkdir') { check_dirs($dir); } // Logfilekopf $LOGFile = "\r\n"; $LOGFile .= '+---------------------------------------------------------------------------------+' . "\r\n"; $LOGFile .= '| oxyl~box Check START ' . date("j M Y - H:i:s"). "\r\n"; $LOGFile .= '+---------------------------------------------------------------------------------+' . "\r\n"; $LOGFile .= '| Server IP: ' . $GLOBALS['ip'] . ' Port: ' . $GLOBALS['port'] . "\r\n"; $LOGFile .= '+---------------------------------------------------------------------------------+' . "\r\n"; $LOGFile .= '| Operating System: ' . PHP_OS . "\r\n"; $LOGFile .= '| Webserver Software: ' . $_SERVER["SERVER_SOFTWARE"] . "\r\n"; $LOGFile .= '| PHP Version: ' . PHP_VERSION . "\r\n"; $LOGFile .= '+---------------------------------------------------------------------------------+' . "\r\n"; $LOGFile .= '' . "\r\n"; // Parameter $frwidth = 400; $frwidth2 = 100; //$tabwidth = 500; $io = getimghref('oxyl_nav_ok.gif'); $nio = getimghref('oxyl_nav_cancel.gif'); gen_header_setup(); echo '

Oxyl Check ' . OXYLBOX_VERSION. '

'; echo '
'; echo ''; // Internet Check //--------------------------------------------------------------------------------------- echo ''; //oxylbox version echo ''; echo ''; echo ''; //apache version $apache_check = stristr($_SERVER["SERVER_SOFTWARE"],'apache/2')!== FALSE ? 1 : 0; echo ''; echo ''; echo ''; //php version $php_check = ((PHP_VERSION>='4.3.11'&&PHP_VERSION<5)||(PHP_VERSION>='5.0.4'&&PHP_VERSION>=5)) ? 1 : 0; echo ''; echo ''; echo ''; //-------------------------------------------------------------------------------------- echo ''; // Oxyl-Pfad Check //--------------------------------------------------------------------------------------- echo ''; $ospc=''; // Check all oxyl path if (! is_dir(OXYL_EXEC)) $ospc.='-BIN path not found!
'; if (! is_dir(OXYL_KERN)) //lol wenn der nicht da ist funktioniert nichts $ospc.='-COMMON path not found!
'; if (! is_dir(OXYL_CONF)) $ospc.='-CONFIG path not found!
'; if (! is_dir(OXYL_PICS)) $ospc.='-IMAGES path not found!
'; if (! is_dir(OXYL_PLUG)) $ospc.='-PLUGINS path not found!
'; if (! is_dir(OXYL_SKIN)) $ospc.='-SKINS path not found!
'; if (! is_dir(OXYL_ROOT.'versions')) $ospc.='-VERSIONS path not found!
'; if (strlen($ospc)>0) { $LOGFile.='# Oxyl System Paths ERROR #'. "\r\n" . '---------------------------' . "\r\n".'#!'. str_replace('
',"\r\n" . '#!',$ospc). "\r\n"; echo ''; echo ''; } else { $LOGFile.='Oxyl System Paths OK'. "\r\n"; echo ''; echo ''; } //----------------------------------------------------------------------------------------------- echo ''; // Oxyl-Consistency Check //--------------------------------------------------------------------------------------- echo ''; $ospc=''; // Check all oxyl path if (! is_dir(OXYL_PLUG.'oxyl_setup')) $ospc.='-oxyl_setup path not found!
'; if (! file_exists(OXYL_PLUG.'oxyl_setup/oxyl_setup_main.php')) $ospc.='-oxyl_setup_main.php not found!
'; if (! file_exists(OXYL_PLUG.'oxyl_setup/oxyl_plugin.cfg')) $ospc.='-oxyl_plugin.cfg not found!
'; if (! file_exists(OXYL_PLUG.'oxyl_setup/oxyl_box_setup.php')) $ospc.='-oxyl_box_setup.php not found!
'; if (strlen($ospc)>0) { echo ''; echo ''; $LOGFile.='# System Check ERROR #'. "\r\n" . '-----------------------' . "\r\n".'#!'. str_replace('
',"\r\n" . '#!',$ospc) . "\r\n"; } else { $LOGFile.='Oxyl System Check OK'. "\r\n"; echo ''; echo ''; } //----------------------------------------------------------------------------------------------- echo ''; // Temp-Pfad Check //--------------------------------------------------------------------------------------- echo ''; if (file_exists(OXYL_CONF.'temp.cfg')) { echo ''; if (is_dir(OXYL_TEMP)){ $ctp=@fopen(OXYL_TEMP.'/testfile.txt','w'); @fwrite($ctp,'Hallo Welt'."\n"); @fclose($ctp); $ctp=''; $ctp=@fopen(OXYL_TEMP.'/testfile.txt','r'); $ctpline = trim(@fgets($ctp,1024)); @fclose($ctp); if (strlen($ctpline)>0) { if (strpos($ctpline, 'Welt')) { echo ''; unlink ($path .'/testfile.txt'); } else{ echo ''; echo ''; } } else{ echo ''; echo ''; } } else{// wenn "is_dir" false ist if(file_exists($path)){// falls datei oder link... echo ''; echo ''; } elseif($path==""){// falls inhalt von cfg leer echo ''; echo ''; } else{// wenn gar kein Verzeichnis oder file existiert echo ''; echo ''; } } } else{ echo ''; echo ''; } $LOGFile.='Temp Path= ' . $path. "\r\n"; //----------------------------------------------------------------------------------------------- echo ''; // Playlist-Pfad Check //--------------------------------------------------------------------------------------- echo ''; if (file_exists(OXYL_CONF.'plugins_oxyl_mp3_playlist.cfg')) { $fh=fopen(OXYL_CONF.'plugins_oxyl_mp3_playlist.cfg','r'); $path=trim(fgets($fh,999)); fclose($fh); echo ''; if(is_dir($path)) { $ctp=@fopen($path.'/testfile.txt','w'); @fwrite($ctp,'Hallo Welt'."\n"); @fclose($ctp); $ctp=''; $ctp=@fopen($path.'/testfile.txt','r'); $ctpline = trim(@fgets($ctp,1024)); @fclose($ctp); if (strlen($ctpline)>0) { if (strpos($ctpline, 'Welt')) { echo ''; unlink ($path .'/testfile.txt'); } else{ echo ''; echo ''; } } else{ echo ''; echo ''; } } else{// wenn "is_dir" false ist if(file_exists($path)){// falls datei oder link... echo ''; echo ''; } elseif($path==""){// falls inhalt von cfg leer echo ''; echo ''; } else{// wenn gar kein Verzeichnis oder file existiert echo ''; echo ''; } } } else{ echo ''; echo ''; } $LOGFile.='Playlist Path= ' . $path. "\r\n"; //----------------------------------------------------------------------------------------------- echo ''; // Video-Pfad Check //--------------------------------------------------------------------------------------- $LOGFile.='Video Devices:'. "\r\n"; echo ''; $devices = get_devices('plugins_oxyl_video_devices.cfg'); for ($i=0;$i'; elseif($ret==1) echo ''; else echo ""; } //-------------------------------------------------------------------------------------- echo ''; // Audio-Pfad Check //--------------------------------------------------------------------------------------- $LOGFile.='Audio Devices:'. "\r\n"; echo ''; $devices = get_devices('plugins_oxyl_mp3_devices.cfg'); for ($i=0;$i'; else echo ''; } //-------------------------------------------------------------------------------------- echo ''; // Pictures-Pfad Check //--------------------------------------------------------------------------------------- $LOGFile.='Pictures Devices:'. "\r\n"; echo ''; $devices = get_devices('plugins_oxyl_pic_devices.cfg'); for ($i=0;$i'; elseif($ret==1) echo ''; else echo ""; } //-------------------------------------------------------------------------------------- echo ''; // File-Pfad Check //--------------------------------------------------------------------------------------- $LOGFile.='File Devices:'. "\r\n"; echo ''; $devices = get_devices('plugins_oxyl_file_devices.cfg'); for ($i=0;$i'; elseif($ret==1) echo ''; else echo ""; } //-------------------------------------------------------------------------------------- echo ''; // Internet Check //--------------------------------------------------------------------------------------- echo ''; echo ''; if (remote_file_exists(OXYL_HP)){ $LOGFile.='Internet Connection OK'. "\r\n"; echo ''; } else{ $LOGFile.='Internet Connection failed'. "\r\n"; echo ''; echo ''; } echo '
Oxylbox Versionen:
Oxyl~Box Version: '.OXYLBOX_VERSION.' (Rel. '.OXYLBOX_RELEASE.' Kern '.OXYLBOX_KERN.')
Apache Version: '.$_SERVER["SERVER_SOFTWARE"].($apache_check ? '' : '  < Apache/2.0 !').'
PHP Version: '.PHP_VERSION.($php_check ? '' : '  < 4.3.11 or 5.0.4 !').'

Oxyl System Paths:
' . $ospc . '
Checked

Oxyl System Check:
' . $ospc . '
Checked

Temp-Path:
' . OXYL_TEMP.'
Error during write access! Check Autorization and HTTP Config!
No write access! Check Autorization and HTTP Config!
Temp-Path is not a Directory!
Temp-Path is not set! Set the Temp-Path in Oxyl Setup
'; echo str_replace('###','TEMP',$progcall); echo ' Directory not found!  '; echo ''; echo ''; echo ''; echo '
Temp-Path not set!
Set the Temp-Path in Oxyl Setup

Playlist-Path:
' . $path . '
Error during write access! Check Autorization and HTTP Config!
No write access! Check Autorization and HTTP Config!
Playlist-Path is not a Directory!
Playlist-Path is not set! Set the Temp-Path in Oxyl Setup
'; echo str_replace('###','PLPATH',$progcall); echo ' Directory not found!  '; echo ''; echo ''; echo ''; echo '
Playlist-Path not set!
Set the Playlist-Path in Oxyl Setup

Video-Path:
'; $ret=Check_path($devices[$i]['path'],$devices[$i]['name'],$devices[$i]['level'],$GLOBALS['actuserlevel'],'OFF'); if ($ret==0) echo '

Audio-Path:
'; $ret=Check_path($devices[$i]['path'],$devices[$i]['name'],$devices[$i]['level'],0,'OFF'); if ($ret==0) echo '

Pictures-Path:
'; $ret=Check_path($devices[$i]['path'],$devices[$i]['name'],$devices[$i]['level'],$GLOBALS['actuserlevel'],'OFF'); if ($ret==0) echo '

File-Path:
'; $ret=Check_path($devices[$i]['path'],$devices[$i]['name'],$devices[$i]['level'],$GLOBALS['actuserlevel'],'OFF'); if ($ret==0) echo '

Internet Connection:
' . OXYL_HP . '
No Internet Connection Check Internet and Proxy Settings
'; //--------------------------------------------------------------------------------------- echo '

'; echo '
'; echo ' ... '.trans('','back').'


'; gen_end(); $LOGFile .= '' . "\r\n"; $LOGFile .= '+---------------------------------------------------------------------------------+' . "\r\n"; $LOGFile .= '| oxyl~box Check E N D ' . date("j M Y - H:i:s"). "\r\n"; $LOGFile .= '+---------------------------------------------------------------------------------+'; $ctp=@fopen(OXYL_ROOT.'oxyl_CHECK_Log.txt','wb'); @fwrite($ctp,$LOGFile); @fclose($ctp); die(); //-------------------------------------------------------------------------------------------- //+------------------------------------------------------------------------------------------ //|FUNKTION: Check_Path //| Überprüft ob Pfad existiert, darauf Zugegriffen werden kann //| und der Benutzer authorisiert ist! //| //| History: //| 20040817 .............. LongDan - erstellt //| 20040828 .............. LongDan - silent mode added //| 20050120 .............. Brause - Kosmetik durch tabellenlayout ersetzt //+------------------------------------------------------------------------------------------ function Check_Path($pathname,$oname,$level,$userlevel,$silent='OFF') { Global $LOGFile; $IS_UNC = substr($pathname,0,2)=='//' ? 1 : 0; // Authorisation if ((int)($level)<(int)($userlevel)) { //if ($silent=='OFF') // echo '---No authorisation with current User!
'; $LOGFile.="--- \tNo authorisation with current User! \r\n"; return 2; } // Pfad gültig? //---------------------- if($IS_UNC) { if(!$handle=opendir ($pathname)) { if ($silent=='OFF') echo '' . $oname . '  Netshare - invalid:   ' . $pathname . '
'; $LOGFile.=$oname."\t".$pathname. "\tNetshare - invalid\r\n"; return 0; } closedir($handle); } else // Dateiverzeichnis { // Pfad gültig? //---------------------- if (!is_dir($pathname)) { if ($silent=='OFF') echo '' . $oname . '  Path - invalid:   ' . $pathname . '
'; $LOGFile.=$oname."\t".$pathname. "\tPath - invalid\r\n"; return 0; } // Zugriff auf Pfad? //---------------------- if (@dir($pathname) =='') { if ($silent=='OFF') echo '' . $oname . '  Unmounted:   ' . $pathname . '
'; $LOGFile.=$oname."\t".$pathname. "\tUnmounted\r\n"; return 0; } } if ($silent=='OFF') echo '' . $oname .'  ' .($IS_UNC ? 'Netshare: ':''). $pathname . '
'; $LOGFile.=$oname."\t".$pathname. "\tOK\r\n"; return 1; }// end function //***************************************************************************************************** ?>