Hi guys,
I had this working then DW crashed and it works no more :S
It might be a case of me looking into the code to long but i cant find were the error is.
<?
// Include config file
include('common.php');
//$link = dbConnect();
//$numOfUpload = param('numOfUpload');
//echo "num of uploaded =". $numOfUpload;
$folder_id = param('folder_id');
if(is_dir("../images/gallery/" . $folder_id) == false){
echo "Folder <font color='#3300CC'>$folder_id</font> created successfully...<BR>";
mkdir("../images/gallery/". $folder_id, 0777);
mkdir("../images/gallery/". $folder_id."/thumbs", 0777);
mkdir("../images/gallery/". $folder_id."/images", 0777);
}
echo "Folder <font color='#3300CC'>$folder_id</font> open and ready for upload...<BR>";
for($x=0;$x<$numOfUpload;$x++){
$thumbName = strtolower(eregi_replace('#| |\?|!', '',$_FILES['thumbfile'.$x]['name']));
$thumbDestination = '../images/gallery/'. $folder_id . '/thumbs/' .$thumbName;
if(move_uploaded_file($_FILES['thumbfile'.$x]['tmp_name'], $thumbDestination)) {
$imgThumb = 'images/gallery/'. $folder_id . '/thumbs/' .$thumbName
echo "<font color='#3300CC'>$imgThumb</font> thumbnail uploaded successfully...<BR>";
$xlName = strtolower(eregi_replace('#| |\?|!', '',$_FILES['xlfile'.$x]['name']));
$xlDestination = '../images/gallery/'. $folder_id . '/images/' .$xlName;
if(move_uploaded_file($_FILES['xlfile'.$x]['tmp_name'], $xlDestination)) {
$imgXL = '../images/gallery/'. $folder_id . '/images/' .$xlName;
echo "<font color='#3300CC'>$imgXL</font> large uploaded successfully...<BR>";
}
}
}
echo "Uploaded complete. Would you like to add more?";
?>
Returns:
Parse error: parse error, unexpected T_ECHO in /home/public_html/mxgb/admcms/galAddimage2.php on line 20
Anyone
thanks
Paul