| | Copyright: copyright (C) 2004 by Mike de Boer | | Description: zOOm Image Gallery, a multi-gallery component for | | Mambo based on RSGallery by Ronald Smit. It's the most | | feature-rich gallery component for Mambo! | | Filename: movefiles.php | | Version: 2.1.2 | | | ----------------------------------------------------------------------- **/ // MOS Intruder Alerts defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); $zoom->createSubmitScript("select_cat"); $zoom->createCheckAllScript(); ?>
<?php echo _ZOOM_MOVEFILES;?>   .php?option=com_zoom&Itemid=&page=admin"> <?php echo _ZOOM_MAINSCREEN;?>
 
setQuery("SELECT catdir FROM #__zoom WHERE catid = ".$movecat." LIMIT 1"); $result = $database->query(); $row = mysql_fetch_object($result); $movedir = $row->catdir; // get filename of image,,, $database->setQuery("SELECT imgfilename FROM #__zoomfiles WHERE imgid = $wannamove LIMIT 1"); $result = $database->query(); $row = mysql_fetch_object($result); $filename = $row->imgfilename; //now copy the file... if(fs_copy($mosConfig_absolute_path."/".$zoom->_CONFIG['imagepath'].$zoom->_gallery->_dir."/".$filename, $mosConfig_absolute_path."/".$zoom->_CONFIG['imagepath'].$movedir."/".$filename)){ //delete the file from the OLD location... if(fs_unlink($mosConfig_absolute_path."/".$zoom->_CONFIG['imagepath'].$zoom->_gallery->_dir."/".$filename)){ //Do the same for the thumbnail... if(fs_copy($mosConfig_absolute_path."/".$zoom->_CONFIG['imagepath'].$zoom->_gallery->_dir."/thumbs/".$filename, $mosConfig_absolute_path."/".$zoom->_CONFIG['imagepath'].$movedir."/thumbs/".$filename)){ if(fs_unlink($mosConfig_absolute_path."/".$zoom->_CONFIG['imagepath'].$zoom->_gallery->_dir."/thumbs/".$filename)){ //update dbase... $database->setQuery("UPDATE #__zoomfiles SET catid = $movecat WHERE imgid = $wannamove"); $database->query(); ?>


.php?option=com_zoom&Itemid=&page=movefiles" method="post">
createCatDropDown('catid', '', 1, $catid);?>



.php?option=com_zoom&Itemid=&page=movefiles"> _gallery->getNumOfImages() >= 0 ){ $tabcnt = 0; foreach($zoom->_gallery->_images as $image){ if($tabcnt > 1) $tabcnt = 0; $image->getInfo(); echo ''; $tabcnt++; } } ?>
 
'.$image->_name.''.$image->_filename.'_filename.'" border="0">

createCatDropDown('movecat', '');?>



.php?option=com_zoom&Itemid=&page=movefiles" method="post">
createCatDropDown('catid', '', 1, $catid);?>