\n"; ECHO " \n"; $db = @mysql_connect("fdb1.awardspace.com", "littlebeast_tma", blizzard); @mysql_select_db("littlebeast_tma", $db); if($id == "") { if ($_SERVER['QUERY_STRING'] == "") { $id = newest; } } if($id == "newest" || $id == "latest") { $id = 2; do { $trueid = $id; $id = $id + 1; $temp = @mysql_query("SELECT * FROM pages WHERE '$id' = true_id"); } while(@mysql_num_rows($temp)); $temp = @mysql_query("SELECT * FROM pages WHERE '$trueid' = true_id"); $id = @mysql_result($temp, 0, id); } $_SESSION['stripid'] = $id; $page = @mysql_query("SELECT * FROM pages WHERE '$id'=id"); $temp = @mysql_result($page, 0, "layout"); $layout = @mysql_query("SELECT * FROM layouts WHERE '$temp' = layout"); $trueid = @mysql_result($page, 0, true_id); $extra = @mysql_result($layout, 0, "extra"); $date = @mysql_result($page, 0, date); $temp = @mysql_result($page, 0, "mod"); $mod = explode(" ", $temp); $prev = 0; if ($trueid > 1) { $prev = $trueid - 1; true_to_view($prev); } $next = $trueid + 1; true_to_view($next); $temp = explode(" ", $extra); $PTN = NULL; $orig = 0; $wiki = false; $crossover = false; $bold = false; $cw = false; for($i = 0; $i < count($temp); $i++) { switch($temp[$i]) { case "wiki": $wiki = true; break; case "crossover": $crossover = true; break; case "bold": $bold = true; break; case "CW": $CW = true; break; case "prev": $prev = array_shift($mod); break; case "next": $next = array_shift($mod); break; case "PTN": $PTN = array_shift($mod); verify($PTN); break; case "replace": $orig = array_shift($mod); verify($orig); break; case "insert": $temp = array_shift($mod); $prev = $temp - 1; $next = $temp + 1; true_to_view($prev); true_to_view($next); } } verify($prev); verify($next); $temp = @mysql_num_rows($page); if($PTN == NULL) { printf(" \n", $next); } else { printf(" \n", $PTN); } if($temp == 0) { ECHO " Yut-oh.\n"; $temp = @mysql_query("SELECT * FROM pages WHERE 2=id"); $temp = @mysql_num_rows($temp); if($temp > 0) { ECHO "Hey. This comic doesn't exist yet. Stop screwing around."; } else { ECHO "Hmm. The SQL server seems to be down. Try again in a minute or so."; } } elseif($wiki) { $header = mysql_result($layout, 0, "head"); $title = mysql_result($page, 0, "title"); $header = str_replace("[pagename]", $title, $header); printf("%s\n", $header); $icon = mysql_result($layout, 0, "icon"); if ($icon != "none") { printf("\n", $icon); } ECHO "\n"; ECHO "\n"; $bgcolor = mysql_result($layout, 0, "bgcolor"); $tcolor = mysql_result($layout, 0, "tcolor"); $links = mysql_result($layout, 0, "links"); if ($bgcolor == "cyber") { printf("", $tcolor); } else { if ($links == null) { printf("", $bgcolor, $tcolor); } else { $alink = mysql_result($layout, 0, "alink"); $vlink = mysql_result($layout, 0, "vlink"); if ($alink == null) { printf("", $bgcolor, $tcolor, $links, $vlink); } else { printf("", $bgcolor, $tcolor, $links, $alink, $vlink); } } } ECHO ""; ECHO ""; ECHO ""; ECHO ""; ECHO "
"; $tpic = mysql_result($layout, 0, "title_pic"); printf("", $tpic); ECHO "
"; ECHO "navigation"; $nav = mysql_result($layout, 0, "nav"); ECHO ""; ECHO "
"; ECHO ""; if ($trueid > 1) { ECHO " Oldest pages
"; $temp = $trueid - 1; $temp = mysql_query("SELECT * FROM pages WHERE '$temp'=true_id"); $temp = mysql_result($temp, 0, "id"); printf(" What links here
", $temp); } $temp = $trueid + 1; $otemp = mysql_query("SELECT * FROM pages WHERE '$temp' = true_id"); $atemp = mysql_num_rows($otemp); if ($atemp != 0) { $otemp = mysql_result($otemp, 0, "layout"); $otemp = mysql_query("SELECT * FROM layouts WHERE '$otemp' = layout"); $next = mysql_result($otemp, 0, "extra"); $temp = mysql_query("SELECT * FROM pages WHERE '$temp'=true_id"); $temp = mysql_result($temp, 0, "id"); if ($next != "wiki") { printf(" Related changes
", $temp); } ECHO " Recent changes
"; } ECHO"
"; ECHO "advanced"; ECHO ""; ECHO "
"; ECHO ""; ECHO " Community portal
"; printf(" About %s
", $nav); printf(" Contact %s
", $nav); ECHO " Contents
"; ECHO " Current events
"; ECHO "
"; ECHO "toolbox"; ECHO ""; ECHO "
"; ECHO ""; printf(" Upload file
", $id); ECHO "
"; ECHO "
"; ECHO " "; ECHO ""; printf("Create an account / change password
", $id, $id); ECHO ""; ECHO "
"; printf("%s
From Wikipedia, the free encyclopedia

", $title); ECHO ""; ECHO "
"; ECHO ""; printf("%s
", $title); ECHO "
"; printf("", $id); ECHO "
"; ECHO ""; if (isset($_SESSION['message'])) { ECHO ""; $message = $_SESSION['message']; printf("%s", $message); unset($_SESSION['message']); ECHO ""; } ECHO ""; $comment = mysql_result($page, 0, "notes"); $comment = str_replace("[title]", "".$title."", $comment); $comment = str_replace("[bullet]", "", $comment); $comment = str_replace("[quote]", "
", $comment); $comment = str_replace("[/quote]", "
", $comment); global $pageid; $pageid = $id; $comment = preg_replace_callback("/\[image\-([^\]]*)\]/", create_function('$matches', 'global $pageid; return "";'), $comment); $count = 0; $comment = preg_replace_callback("/\[ch]([^\[]*)\[\/ch]/", create_function('$matches', 'global $chapters, $count; $match = $matches[1]; $chapters[$count] = $match; $count++; return "".$match."
";'), $comment); $subc = 0; $comment = preg_replace_callback("/\[subch]([^\[]*)\[\/subch]/", create_function('$matches', 'global $subchs, $subc; $match = $matches[1]; $subchs[$subc] = $match; $subc++; $name = substr($match, 1); return "".$name."";'), $comment); $toc = "
Contents
"; $j = 0; for($i = 0; $i < $count; $i++) { $temp = $i + 1; $toc = $toc."
".$temp." ".$chapters[$i].""; $otemp = 0; while(substr($subchs[$j], 0, 1) == $temp) { $otemp++; $name = substr($subchs[$j], 1); $toc = $toc."
     ".$temp.".".$atemp." ".$name.""; $j++; } } $toc = $toc."
"; $comment = str_replace("[contents]", $toc, $comment); if($atemp != 0) { $temp = $trueid + 1; $temp = mysql_query("SELECT * FROM pages WHERE '$temp'=true_id"); $temp = mysql_result($temp, 0, "id"); $comment = preg_replace("/\[next]([^[]*)\[\/next]/", "$1", $comment); } else { $comment = preg_replace("/\[next]([^[]*)\[\/next]/", "$1", $comment); } printf("%s", $comment); ECHO "
"; ECHO ""; ECHO ""; ECHO "
"; ECHO ""; $temp = mysql_query("SELECT * FROM comments WHERE '$id'=page ORDER BY id"); while($otemp = mysql_fetch_array($temp)) { $user = $otemp[user]; $comment = $otemp[comment]; printf("%s --%s
--
", $comment, $user); } printf("
", $id); ECHO "Username: "; ECHO " Password: "; ECHO "
"; ECHO ""; ECHO "
"; ECHO "
"; ECHO "
"; ECHO "
"; ECHO ""; ECHO ""; ECHO "Wikipedia is a registered trademark of the Wikimedia Foundation, Inc., and is not associated with LittleBeast or Too Many Authors.
"; ECHO "Too Many Authors is registered under a creative commons license which can be found on pages that aren't imitating Wikipedia.
"; ECHO "Etc."; ECHO '
", $id); ECHO "
"; ECHO "
"; } elseif($crossover) { $header = mysql_result($layout, 0, "head"); $title = mysql_result($page, 0, "title"); if ($header == "standard") { ECHO "Too Many Authors by LittleBeast"; } else { $header = str_replace("[title]", $title, $header); printf("%s", $header); } $icon = mysql_result($layout, 0, "icon"); if ($icon != "none") { printf("", $icon); } ECHO ""; $bgcolor = mysql_result($layout, 0, "bgcolor"); $tcolor = mysql_result($layout, 0, "tcolor"); $links = mysql_result($layout, 0, "links"); if ($bgcolor == "cyber") { printf("", $tcolor); } else { if ($links == null) { printf("", $bgcolor, $tcolor); } else { $alink = mysql_result($layout, 0, "alink"); $vlink = mysql_result($layout, 0, "vlink"); if ($alink == null) { printf("", $bgcolor, $tcolor, $links, $vlink); } else { printf("", $bgcolor, $tcolor, $links, $alink, $vlink); } } } ECHO "
"; if (isset($_SESSION['message'])) { ECHO ""; $message = $_SESSION['message']; printf("%s", $message); unset($_SESSION['message']); ECHO ""; } $tpic = mysql_result($layout, 0, "title_pic"); printf("", $tpic); ECHO "
"; $titlemod = mysql_result($layout, 0, "title"); ECHO "
"; ECHO ""; if ($titlemod == "no_num") { printf("%s", $title); } elseif ($titlemod == "!") { printf("%s!", $id); } elseif ($titlemod == "EOU") { printf("EOU Territory LTNXY Strip #%s", $id); } elseif ($titlemod == "none") { } else { printf("%s: %s", $id, $title); } ECHO "
"; ECHO "
"; $ext = mysql_result($layout, 0, "avatar"); //stored in avatar for no good reason. printf("", $id, $ext); ECHO ""; $notes = mysql_result($page, 0, "notes"); if ($notes == "none") {} else { ECHO ""; ECHO ""; ECHO ""; } $nav = mysql_result($layout, 0, "nav"); ECHO ""; ECHO ""; ECHO ""; ECHO "
"; printf("Crossover strip! See the original here!", $notes); ECHO "
"; ECHO ""; ECHO ""; $next = array_shift($mod); verify($next); if($nav == "text") { ECHO ""; if($next != NULL) { ECHO ""; ECHO ""; } else { ECHO ""; } } else { ECHO ""; if ($next != NULL) { ECHO ""; ECHO ""; } else { ECHO ""; } } ECHO ""; ECHO "
"; printf("", $PHP_SELF); ECHO "First strip"; ECHO ""; ECHO ""; printf("", $PHP_SELF, $next); ECHO "Next in timeline"; ECHO ""; printf("", $PHP_SELF); ECHO "Latest strip"; ECHO ""; ECHO " "; printf("", $PHP_SELF); printf("", $nav); ECHO ""; ECHO ""; printf("", $PHP_SELF, $next); printf("", $nav); ECHO ""; ECHO ""; printf("", $PHP_SELF); printf("", $nav); ECHO ""; ECHO ""; ECHO " "; ECHO "
"; ECHO "
"; ECHO "
"; ECHO "
"; ECHO ""; ECHO "The page above was not created by LittleBeast, but is a crossover page in another webcomic. Visit the original page to see its own legal junk. If it has any."; ECHO ""; ECHO "
"; } else { $header = mysql_result($layout, 0, "head"); if ($header == "standard") { ECHO " Too Many Authors by LittleBeast\n"; } else { printf(" %s\n", $header); } $icon = mysql_result($layout, 0, "icon"); if ($icon != "none") { printf(" \n", $icon); } if($id == null) { ECHO " \n"; } ECHO " \n"; ECHO " \n"; $bgcolor = mysql_result($layout, 0, "bgcolor"); $tcolor = mysql_result($layout, 0, "tcolor"); $links = mysql_result($layout, 0, "links"); if ($bgcolor == "cyber") { printf(" \n", $tcolor); } else { if ($links == null) { printf(" \n", $bgcolor, $tcolor); } else { $alink = mysql_result($layout, 0, "alink"); $vlink = mysql_result($layout, 0, "vlink"); if ($alink == null) { printf(" \n", $bgcolor, $tcolor, $links, $vlink); } else { printf(" \n", $bgcolor, $tcolor, $links, $alink, $vlink); } } } ECHO "
\n"; if (isset($_SESSION['message'])) { ECHO " "; $message = $_SESSION['message']; printf("%s", $message); unset($_SESSION['message']); ECHO "\n"; } $tpic = mysql_result($layout, 0, "title_pic"); printf(" \"Too\n", $tpic); ECHO "
\n"; $titlemod = mysql_result($layout, 0, "title"); $title = mysql_result($page, 0, "title"); ECHO "
\n"; ECHO " \n"; pretext(); if ($titlemod == "no_num") { printf(" %s\n", $title); } elseif ($titlemod == "!") { printf(" %s!\n", $id); } elseif ($titlemod == "EOU") { printf(" EOU Territory LTNXY Strip #%s\n", $id); } elseif (substr($titlemod, 0, 5) == "color") { printf(" %s: %s\n", substr($titlemod, 6, 6), $id, $title); } else { printf(" %s: %s\n", $id, $title); } posttext(); ECHO " \n"; ECHO "
\n"; ECHO "
\n"; pretext(); if($id == null) { ECHO " \"Too\n"; } else { printf(" \"Too\n", $id, $id, $title); } ECHO " \n"; if ($CW) { ECHO " \n"; ECHO " \n"; ECHO " \n"; } posttext(); $notes = mysql_result($page, 0, "notes"); if ($notes == "none") {} else { ECHO " \n"; ECHO " \n"; ECHO " \n"; } $nav = mysql_result($layout, 0, "nav"); ECHO " \n"; ECHO " \n"; ECHO " "; if($orig != NULL) { ECHO " \n"; ECHO " \n"; ECHO " \n"; } ECHO " \n"; ECHO "
\n"; ECHO " This storyline part of the \n"; ECHO "
\n"; ECHO " \n"; ECHO " \n"; ECHO " \n"; ECHO " \n"; ECHO " \n"; ECHO "
\n"; $avatar = mysql_result($layout, 0, "avatar"); if ($avatar == "none") {} else { printf(" \n", $avatar); } ECHO " \n"; pretext(); printf(" %s\n", $notes); posttext(); ECHO "
\n"; ECHO "
\n"; ECHO " \n"; ECHO " \n"; if($nav == "text" && $PTN !== NULL) { nav_text_ptn(); } elseif($nav == "text") { nav_text(); } elseif($PTN !== NULL) { nav_ptn($nav); } else { nav_norm($nav); } ECHO " \n"; ECHO "
\n"; ECHO "
\n"; printf(" This isn't the first version of this comic! See the original here.\n", $PHP_SELF, $orig); ECHO "
\n"; ECHO " \n"; ECHO " \n"; ECHO " \n"; ECHO "
\n"; ECHO " \n"; ECHO " "; ECHO " "; ECHO " "; ECHO " "; ECHO "
"; ECHO ""; ECHO "
"; ECHO " "; ECHO " "; ECHO " "; ECHO "
"; ECHO "
"; ECHO ""; $temp = mysql_query("SELECT * FROM comments WHERE '$id'=page ORDER BY id"); while($otemp = mysql_fetch_array($temp)) { $user = $otemp[user]; $comment = $otemp[comment]; $otemp = mysql_query("SELECT * FROM users WHERE '$user'=username"); $ext = mysql_result($otemp, 0, "extension"); ECHO ""; ECHO ""; } ECHO "
"; if ($bold) { ECHO ""; } printf("
%s", $user); if ($bold) { ECHO "
"; } ECHO ""; ECHO ""; ECHO "
"; if($ext == "noimg") { ECHO ""; } else { printf("", $user, $ext); } ECHO ""; pretext(); printf("%s", $comment); posttext(); ECHO "
"; pretext(); printf("
", $id); ECHO "Username: "; ECHO " Password: "; ECHO "
"; ECHO ""; ECHO "
"; printf("Don't have an account? Sign up or post as anonymous! (password anon)
", $id); printf("Add an avatar to your account! Or you can change your password.
", $id, $id); posttext(); ECHO "
"; ECHO "
"; pretext(); ECHO ""; if($date != NULL) { $date = date("l, F j, Y", $date); printf("Page posted on %s.
", $date); } ECHO '
", $id); ECHO "
"; ECHO "Yay, legal junk!
Megaman characters and their sprites are (c) Capcom, who I'm pretty sure doesn't care about sprite comics. However, even if they do, I'm protected by some law that allows parodyers to use the material they're parodying or some such.
Chrono Trigger & its sprites are owned by Square Enix. Or SquareSoft. Same difference.
Also, there may be other video game sprites in here. These are owned by their creators.
Anyone I crossover with owns their own characters, and I'm NOT going to list all of them here. That would be ridiculous.
"; ECHO " \"Creative
Too Many Authors is licensed under the license above. This means that you may share and/or modify it as you like, so long as you credit me, tell me what you're doing with it(just post in the forums or summat), and share it in the same way (particularly, no profiting off of it)."; posttext(); ECHO "
"; } //functions begin function pretext(){ global $bold; if ($bold) { ECHO "\n"; } } function posttext(){ global $bold; if($bold) { ECHO "\n"; } } function verify(&$id) { $temp = @mysql_query("SELECT * FROM pages WHERE '$id'=id"); $temp = @mysql_num_rows($temp); if($temp == 0) { $id = 0; } $temp = urlencode($temp); } function true_to_view(&$id) { $id = @mysql_query("SELECT * FROM pages WHERE '$id'=true_id"); $id = @mysql_result($id, 0, id); } function nav_norm($nav) { global $prev, $next, $id; if ($prev != NULL || $id == 187) { ECHO ""; printf("", $PHP_SELF); printf("", $nav); ECHO ""; ECHO ""; ECHO ""; printf("", $PHP_SELF, $prev); printf("", $nav); ECHO ""; ECHO ""; } else { ECHO " "; } ECHO ""; if ($next != NULL || $id == 185) { ECHO ""; printf("", $PHP_SELF, $next); printf("", $nav); ECHO ""; ECHO ""; ECHO ""; printf("", $PHP_SELF); printf("", $nav); ECHO ""; ECHO ""; } else { ECHO " "; } } function nav_ptn($nav) { global $prev, $next, $PTN; if ($prev != NULL) { ECHO ""; printf("", $PHP_SELF); printf("", $nav); ECHO ""; ECHO ""; ECHO ""; printf("", $PHP_SELF, $prev); printf("", $nav); ECHO ""; ECHO ""; } else { ECHO " "; } if ($next != NULL) { ECHO ""; printf("", $PHP_SELF, $next); printf("", $nav); ECHO ""; ECHO ""; } else { ECHO " "; } if($PTN != NULL) { ECHO ""; printf("", $PHP_SELF, $PTN); printf("", $nav); ECHO ""; ECHO ""; } else { ECHO " "; } if ($next != NULL) { ECHO ""; printf("", $PHP_SELF); printf("", $nav); ECHO ""; ECHO ""; } else { ECHO " "; } } function nav_text() { global $prev, $next; if ($prev != NULL) { ECHO ""; printf("", $PHP_SELF); printf("First strip"); ECHO ""; ECHO ""; ECHO ""; printf("", $PHP_SELF, $prev); printf("Previous strip"); ECHO ""; ECHO ""; } else { ECHO " "; } ECHO ""; if ($next != NULL) { ECHO ""; printf("", $PHP_SELF, $next); printf("Next strip"); ECHO ""; ECHO ""; ECHO ""; printf("", $PHP_SELF); printf("Newest strip"); ECHO ""; ECHO ""; } else { ECHO " "; } } function nav_text_ptn() { global $prev, $next, $PTN; if ($prev != NULL) { ECHO ""; printf("", $PHP_SELF); printf("First strip"); ECHO ""; ECHO ""; ECHO ""; printf("", $PHP_SELF, $prev); printf("Previous strip"); ECHO ""; ECHO ""; } else { ECHO " "; } if ($next != NULL) { ECHO ""; printf("", $PHP_SELF, $next); printf("Next strip"); ECHO ""; ECHO ""; } else { ECHO " "; } if($PTN != NULL) { ECHO ""; printf("", $PHP_SELF, $PTN); printf("Next in timeline"); ECHO ""; ECHO ""; } else { ECHO " "; } if ($next != NULL) { ECHO ""; printf("", $PHP_SELF); printf("Current strip"); ECHO ""; ECHO ""; } else { ECHO " "; } } ?>