7500)) { $uc_story = tc_Truncate($uc_story,7500); $uc_action = "w"; $uc_msg = "Please shorten your story"; } else if (!$uc_name || !strlen($uc_name)) { $uc_action = "w"; $uc_msg = "Please add your name"; } else if (!$uc_scene || !strlen($uc_scene)) // should never happen { $uc_action = "w"; $uc_msg = "Please select a city (or add a new city in your response)"; } else { if ("Submit" == $uc_action) { $referer = $_SERVER["HTTP_REFERER"]; $host = $_SERVER["HTTP_HOST"]; if (stristr($referer,"http://".$host)) { $header_txt = "Story Submitted"; $uc_obj = new tc_UserComment(); $uc_obj->setAuthor($uc_name); $uc_obj->setContent($uc_story); $uc_obj->setDate(time()); $uc_obj->setCityID($uc_scene); $uc_obj->setImage($uc_image); $uc_obj->setAge($uc_age); $uc_obj->persist(); $uc_action = "c"; } else { tc_log("WARN","Illegal submit:$referer"); $uc_action = "w"; $uc_msg = "Please trying submitting again"; } } else { $image_orig_name = $_FILES['uc_image']['name']; $image_file_size = $_FILES['uc_image']['size']; $image_tmp_name = $_FILES['uc_image']['tmp_name']; $image_error = $_FILES['uc_image']['error']; if ($image_orig_name) { $path = pathinfo($image_orig_name); $tmp = $path["extension"]; if (!in_array($tmp,Array("jpg","jpeg"))) { $uc_msg = "Please upload a JPG image"; $uc_action = "w"; } else if ($image_file_size > 150000) { $uc_msg = "Please upload an image less than 150KB ($image_file_size)"; $uc_action = "w"; } else if ($image_error) { switch ($image_error) { case 1: // php.ini file size case 2: // specified file size { $uc_msg = "Please upload an image less than 150 KB"; $uc_action = "w"; break; } case 0: case 3: // partial upload case 4: // no upload default: { $uc_msg = "Internal error $image_error"; $uc_action = "w"; break; } } } else if (is_uploaded_file($_FILES['uc_image']['tmp_name'])) { $parts = explode('/', $image_tmp_name); $uc_image = $parts[count($parts) - 1].".jpg"; if (move_uploaded_file($image_tmp_name,"./_uc/$uc_image")) { $uc_action = "p"; } } else { $uc_msg = "Image error"; $uc_action = "w"; } } else { $uc_action = "p"; } } } } else { $uc_action = "w"; $uc_msg = "Please add your name"; } break; } default: { tc_log("ERR","Bad submit for uc:$uc_action"); break; } } ?> National Scene Stories - User Comments - Towncraft
Thanks for sharing your story! We'll post it in a New York minute. Until then ... keep being nosy!
getName(); } else { $uc_scene = -1; } } ?>
Tell us a story from your hometown scene. What were the best bands? Where did shows happen? Who were the characters? How did it change your life?
",$uc_story) ?>
Story
"; echo "
Image
"; } ?>
Scene
Name
Age
Tell us a story from your hometown scene. What were the best bands? Where did shows happen? Who were the characters? How did it change your life?
$uc_msg
"; } else { echo "
"; } ?>
All HTML tags will be removed
Story
Image (Optional) Format: JPG, Size: Max 150 KB
Scene
Name
Age (Optional)
Having problems submitting? Email us instead