function galLoader_form_submit($form_id, $form_values) {
$op = $_POST['op'];
if($op == 'submit'){
$dir = 'files';
if(!$save){
print('ERROR downloading the file to '.
$dir);
} else {
print('File successfully uploaded <br /> If this is the image you want to send in, please hit Save and Send below. Otherwise, upload another <br />');
print theme('imagecache',
'products',
'/files/'.
$save->
filename.
'');
}
} else {
drupal_set_message( t('WARNING: Server DIR is not accessible. Consult with site admin!',
'status') );
}
} elseif($op == 'save'){
//no file
//print("You haven't uploaded a file!");
} else {
//pass to image.module
$node = image_create_node_from
(variable_get('galLoader_file',
NULL ),
$form_values['title'],
$form_values['body'],
'Main Gallery');
}
}
//handle the file, using file_save_upload, or something similar
}