$smarty->assign('comment2', trim(stripslashes($_POST['comment2']))); $smarty->assign('user_status', stripslashes($_POST['user_status'])); if ($ok) { $step = 4; } else { $smarty->assign('errormsg', "Please provide information about this image, see messages below..."); $smarty->assign_by_ref('error', $error); $step = 3; } } } elseif (isset($_POST['finalise'])) { //create the image record if ($uploadmanager->setUploadId($_POST['upload_id'])) { $uploadmanager->setTitle(stripslashes(trim($_POST['title']))); $uploadmanager->setComment(stripslashes(trim($_POST['comment']))); $uploadmanager->setTitle2(stripslashes(trim($_POST['title2']))); $uploadmanager->setComment2(stripslashes(trim($_POST['comment2']))); $uploadmanager->setTaken(stripslashes($_POST['imagetaken'])); $uploadmanager->setClass(stripslashes(trim($_POST['imageclass']))); $uploadmanager->setViewpoint(stripslashes($_POST['photographer_gridref'])); $uploadmanager->setDirection(stripslashes($_POST['view_direction'])); $uploadmanager->setUse6fig(stripslashes($_POST['use6fig'])); $uploadmanager->setUserStatus(stripslashes($_POST['user_status'])); $uploadmanager->setLargestSize($_POST['largestsize']); $uploadmanager->setClearExif($_POST['clearexif']); if ($_POST['pattrib'] == 'other') { $uploadmanager->setCredit(stripslashes($_POST['pattrib_name'])); $smarty->assign('credit_realname', $_POST['pattrib_name']); } elseif ($_POST['pattrib'] == 'self') { $uploadmanager->setCredit(''); }
$filenames = array(); foreach ($_POST['field'] as $key => $value) { $uploadmanager = new UploadManager(); $square = new GridSquare(); $files_key = str_replace('.', '_', $value); $filenames[$key] = $_FILES[$files_key]['name']; $ok = $square->setByFullGridRef($_POST['grid_reference'][$key]); if ($ok) { // set up attributes from uploaded data $uploadmanager->setSquare($square); $uploadmanager->setViewpoint($_POST['photographer_gridref'][$key]); $uploadmanager->setDirection($_POST['view_direction'][$key]); $uploadmanager->setUse6fig(stripslashes($_POST['use6fig'][$key])); $uploadmanager->setTaken($_POST['imagetaken'][$key]); $uploadmanager->setTitle(utf8_decode($_POST['title'][$key])); $uploadmanager->setTitle2(utf8_decode($_POST['title2'][$key])); if ($_POST['comment'][$key] != "comment[{$key}]") { //bug? in Picasa sends the name in the value if blank, useful! (but only seems to apply to textareas) $uploadmanager->setComment(utf8_decode($_POST['comment'][$key])); } if ($_POST['comment2'][$key] != "comment2[{$key}]") { //bug? in Picasa sends the name in the value if blank, useful! (but only seems to apply to textareas) $uploadmanager->setComment2(utf8_decode($_POST['comment2'][$key])); } if (($_POST['imageclass'][$key] == 'Other' || empty($_POST['imageclass'][$key])) && !empty($_POST['imageclassother'][$key])) { $imageclass = stripslashes($_POST['imageclassother'][$key]); } else { if ($_POST['imageclass'] != 'Other') { $imageclass = stripslashes($_POST['imageclass'][$key]); } }
$status = array(); $filenames = array(); foreach ($_POST['upload_id'] as $key => $upload_id) { $uploadmanager = new UploadManager(); $square = new GridSquare(); $filenames[$key] = $_POST['title'][$key]; $ok = $square->setByFullGridRef($grid_reference = $_POST['grid_reference'][$key]); if ($ok) { // set up attributes from uploaded data $uploadmanager->setSquare($square); $uploadmanager->setViewpoint($_POST['photographer_gridref'][$key]); $uploadmanager->setDirection($_POST['view_direction'][$key]); $uploadmanager->setUse6fig(stripslashes($_POST['use6fig'][$key])); $uploadmanager->setTaken($_POST['imagetaken'][$key]); $uploadmanager->setTitle($_POST['title'][$key]); $uploadmanager->setTitle2($_POST['title2'][$key]); $uploadmanager->setLargestSize($_POST['largestsize'][$key]); $uploadmanager->setClearExif($_POST['clearexif']); //$uploadmanager->setClearExif($_POST['clearexif'][$key]); if ($_POST['comment'][$key] != "comment[{$key}]") { //bug? in Picasa sends the name in the value if blank, useful! (but only seems to apply to textareas) $uploadmanager->setComment($_POST['comment'][$key]); } if ($_POST['comment2'][$key] != "comment2[{$key}]") { //bug? in Picasa sends the name in the value if blank, useful! (but only seems to apply to textareas) $uploadmanager->setComment2($_POST['comment2'][$key]); } if (($_POST['imageclass'][$key] == 'Other' || empty($_POST['imageclass'][$key])) && !empty($_POST['imageclassother'][$key])) { $imageclass = stripslashes($_POST['imageclassother'][$key]); } else { if ($_POST['imageclass'] != 'Other') {