$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]); } } $uploadmanager->setClass(utf8_decode($imageclass)); if ($_POST['pattrib'] == 'other') { $uploadmanager->setCredit(stripslashes(utf8_decode($_POST['pattrib_name']))); $smarty->assign('credit_realname', utf8_decode($_POST['pattrib_name'])); } elseif ($_POST['pattrib'] == 'self') { $uploadmanager->setCredit(''); } $ok = $uploadmanager->processUpload($_FILES[$files_key]['tmp_name']); if ($ok) { $err = $uploadmanager->commit('puploader'); if (empty($err)) { $status[$key] = "ok:" . $uploadmanager->gridimage_id; } else { $status[$key] = $err; } } else { $status[$key] = $uploadmanager->errormsg; }