Please enter valid uniqname
"; } } # If the user has not yet entered the uniqname, ask for it if (!$_SESSION['uniqname']) { ?> To ensure that not the entire class downloads these, and only the people I have given the address, I would appreciate if you would enter your uniqname. If you decide to try to get around it by typing "none" or "joeschmoe" I can just as easily remove the timelines / term sheets from the web and not provide you with the resource that I have graciously posted online. So please, don't be a dick, just type in your real uniqname.
Please enter your uniqname to ensure that you are a University of Michigan student:
Uniqname:
"; $success = false; # If they haven't downloaded, insert in, else update the database if ($downloaded == 0) { mysql_query("INSERT INTO nes100_download SET ip='$ip', hostname='$hostname', filename='$filename', lastDownload='$dateTime', uniqname='$uniqname'") or die("Error inserting: ". mysql_error()); $success = true; } # Else update the database else { mysql_query("UPDATE nes100_download SET numDownloads=(numDownloads+1), lastDownload='$dateTime' WHERE ip='$ip' AND filename='$filename'") or die("Error updating: ". mysql_error()); $success = true; } if ($success) echo ''; else echo "Error downloading file: $filename
"; $filename = NULL; $_POST['filename'] = NULL; } #end of if ($submitUniqname) ?>