pic $c info: $this_userfile, $userfile_name, $img_date, $img_desc, $usr_event

"); if($usr_event == 73) { $rp = "/www/smallworldbrunch.org/album"; } if (is_uploaded_file("$this_userfile")) { $orientation = 1; // default $prefix = substr($userfile_name, 0, strrpos($userfile_name, ".")); $prefix = str_replace(" ", "_", $prefix); $ext = strtolower(strrchr($userfile_name, ".")); $dup_count = 1; if (file_exists("${rp}${usr_dir}/images/${prefix}${ext}")) { $orig_prefix = $prefix; $prefix = $orig_prefix . $dup_count++; //echo "

file existed, renaming: $prefix

"; while (file_exists("${rp}${usr_dir}/images/${prefix}${ext}")) { $prefix = $orig_prefix . $dup_count++; //echo "

file existed, renaming: $prefix

"; } } $event_id = $usr_event; $img_thumb = $prefix."_tn".$ext; $img_web = $prefix."_w".$ext; $img_full = $prefix . $ext; $img_dir = "$usr_dir/images"; $date_created = date("Y-m-d H:i:s"); move_uploaded_file($this_userfile, "$rp$usr_dir/images/" . $img_full); unset($output); exec("/www/kathyahn.com/album/scripts/im_resize_new $rp$usr_dir/images/ $img_full $img_web $img_thumb", $output, $retval); #$output[0] is the orientation $orientation = $output[0]; $images_insert = "insert into album.album_image values(0, $event_id, '$img_thumb', '$img_web', '$img_full', '$orientation', '$img_desc', '$img_date', '$date_created')"; //print "

$images_insert

"; $status = mysql_query($images_insert, $link); $ret_str .= "$userfile_name was uploaded
"; } else { $ret_str .= "$userfile_name did not get uploaded"; } $tblRows = " $ret_str "; $rowNum = 1; } } } else { $userfile = ""; $img_date = ""; $usr_event = ""; $MAX_FILE_SIZE = ""; } if ($usr_id != "" && $userfile == "") { $db_query = "select id, event_title from album.album_event where user_id = '$usr_id' order by id DESC"; $event_rs = mysql_query($db_query, $link); while($row = mysql_fetch_array($event_rs)) { $event_options = $event_options . "\n"; $event_num++; } if ($event_num > 0) { $tblRows = " Event*

"; $rowNum = 1; for($tbli = 0; $tbli < 5; $tbli++) { $imgn = $tbli+1; $tblRows .= "
Image $imgn Img File Img Date (yyyy-mm-dd) Img Description "; $rowNum+=5; } $tblRows .= "   "; $rowNum++; } else { $tblRows = "   You need to add an event before adding images.   "; $rowNum = 3; } } elseif(!isset($usr_id)) { $tblRows = "   You have not logged in. log in here.   "; $rowNum = 3; } mysql_close($link); $pgeTitle = "Upload Images to Album"; $pgeKeywords = "online photo album upload new images"; $pgeContent = "Online photo album: upload new images"; $pgeJavascript = " "; $rowSpan = $rowNum + 6; $pgeContent = "
$tblRows
Upload Images to Album
You can upload up to 5 images at a time. Remember, the more images you upload and the bigger the file sizes, the longer it will take for the upload to complete.
"; include("$incrp/template.inc"); ?>