Zines by name [Categories] [Add]

"); $zines = file("zines.db"); sort($zines); //alphabetize for($i=0;$i$part[0]
\n"); } } function showForm(){ print("Zines [List all] [Categories]

URL
Zine name
Category
"); } function handleSubmission($url,$name,$category){ error_reporting(1); #Turn off warnings so we can send our own $test = fopen($url,"r"); #Test the URL if(!$test) $test = fopen("$url/","r"); #May have lacked a trailing slash if(!$test){ showForm(); print("

URL could not be reached!"); } else{ fclose($test); $f = fopen ("zines.db","a"); if(!$f) print("

Error appending to database!"); else{ fwrite($f,"$name::$url::$category::\n"); fclose($f); categoryList($zines); print("

Thanks for your submission!"); mail("deck","Zine URL submission",$entry); } } } function categoryList($openCatList){ print("Zines by category [List all] [Add]

"); $zines = file("zines.db"); for($i=0;$i+] $label
"); for($i=0;$i$part[0]
"); } } else{ $ctlStr = rawurlencode("$openCatList$label"); print("[+] $label
"); } } } /********* END FUNCTIONS ****************************************/ if(isset($all)) listAll(); else if(isset($add)) showForm(); else if(isset($url)) handleSubmission($url,$name,$category); else categoryList($cat); #--> ?> Database file zines.db contains: Bunnyhop::http://www.bunnyhop.com::Pop Potpourri:: Fortean Times::http://www.forteantimes.com::Strange:: Women's Work::http://www.eskimo.com/~dammit/::Feminist:: Pif Magazine::http://www.pifmagazine.com::Pop Potpourri:: Crank::http://www.btf.com/crank.html::Rebel Punk:: 2600::http://www.2600.com::Hacker:: Rat and Mouse Gazette::http://www.rmca.org::Strange:: Lies::http://cent.com/abetting/::Defunct:: Stay Free!::http://metalab.unc.edu/stayfree/::Media critique and parody:: Strange Magazine::http://www.strangemag.com::Strange:: Lumpen::http://www.lumpen.com::Rebel Punk:: The Onion::http://www.theonion.com/::Media critique and parody::