".(!$title ? "*" : "")."
"; $authorquery = dbquery("SELECT "._PENNAMEFIELD." as penname, "._UIDFIELD." as uid FROM "._AUTHORTABLE." ORDER BY "._PENNAMEFIELD); if($admin) { if(!isset($authors)) { $authors = ""; while($authorresult = dbassoc($authorquery)) { $authors .= ""; } } $output .= "


"; } if($coauthallowed) { $output .= "
"._COAUTHORSEARCH."
"; $output .= "
"; } $output .= "

".(!$summary ? "*" : "")."
"; if($tinyMCE) $output .= "

"; $output .= "


"; if($tinyMCE) $output .= "
"; if(!$multiplecats) $output .= ""; else { include("includes/categories.php"); $output .= ""; } $output .= "
"; $count = 0; $result4 = dbquery("SELECT charname, catid, charid FROM ".TABLEPREFIX."fanfiction_characters ORDER BY charname"); if(dbnumrows($result4)) { $output .= "

"; $count++; } unset($result4); $result = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_classtypes ORDER BY classtype_name"); while($type = dbassoc($result)) { $result2 = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_classes WHERE class_type = '$type[classtype_id]' ORDER BY class_name"); $select = ""; while ($class = dbassoc($result2)) { $select .= ""; } $output .= "

"; if($count % 2) $output .= "
 
"; $count++; } $output .= "
 
"; $result5 = dbquery("SELECT rid, rating FROM ".TABLEPREFIX."fanfiction_ratings"); $output .= "".(!$rid ? " *" : "")." "; if($roundrobins) $output .= " "; if(isADMIN && uLEVEL < 4) $output .= "
"; $codequery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_type = 'storyform'"); while($code = dbassoc($codequery)) { eval($code['code_text']); } return $output; } // end storyform // function to build chapter info section of the form. function chapterform($inorder, $notes, $endnotes, $storytext, $chaptertitle, $uid = 0) { global $admin, $tinyMCE, $action, $preview; $inorder++; $default = _CHAPTER." ". $inorder; if($chaptertitle != "") $default = $chaptertitle; if($tinyMCE && strpos($storytext, "
") === false && strpos($storytext, "

") === false && strpos($storytext, "
") === false) $storytext = nl2br($storytext); $output = ""; if($admin && ($action == "newchapter" || $action == "editchapter")) { $authorquery = dbquery("SELECT "._PENNAMEFIELD." as penname, "._UIDFIELD." as uid FROM "._AUTHORTABLE." ORDER BY penname"); $output .= "
"; } $output .= "

"._ALLOWEDTAGS."


"; if($tinyMCE) $output .= "
"; $output .= "
".(!$storytext ? "*" : "")."
"; if($tinyMCE) $output .= "
"; $output .= "

"._OR."


"; if($tinyMCE) $output .= "
"; return $output; } // end chapterform ?>