Xtremer360 Posted January 20, 2009 Share Posted January 20, 2009 Line 118 is print '<td width=120 class=rowheading>Username:</td><td class=row3><input type=text name=login class=fieldtext490 value=\"".$row['username']."\"></td>'; <?php include ('database.php'); //include ('TheAjaxHandler.php'); /* Gets the value of 'f' from the URL and secures the variable against XSS */ $f = htmlentities ( $_GET ['f'], ENT_QUOTES ); if (function_exists ( $f )) { $f (); } else { die ( 'Error 404!' ); } function handlers() { print '<h1 class=backstage>Handler Management</h1><br />'; print "<h2 class=backstage>Handlers :: <a href=\"#\" onclick=\"ajaxpage('newhandler', 'content'); return false;\">Add New</a></h2><br />"; print '<table width="100%" class="table1">'; print '<tr class="rowheading">'; print '<td width=30> </td>'; print '<td>Username</td>'; print '<td>Surname</td>'; print '<td>First Name</td>'; print '<td>E-Mail</td>'; print '</tr>'; $query = "SELECT * FROM users"; $result = mysql_query ( $query ); // Run The Query if ($result) { // Fetch and print all records. $i = 0; while ( $row = mysql_fetch_array ( $result, MYSQL_ASSOC ) ) { $sClass = 'row2'; if ($i ++ & 1) { $sClass = 'row1'; } printf ( "<tr class=\"%s\">", $sClass ); print "<td valign=\"top\" align=\"center\" width=\"30\"><a href=\"#\" onclick=\"ajaxpage('edithandler', 'content'); return false;\">Edit</a></td>"; printf ( "<td valign=\"top\">%s</td>", $row [username] ); printf ( "<td valign=\"top\">%s</td>", $row [surname] ); printf ( "<td valign=\"top\">%s</td>", $row [firstname] ); printf ( "<td valign=\"top\">%s</td>", $row [email] ); print '</tr>'; } } print '</table><br />'; print '<h2 class=backstage><form method=POST><input type=hidden name=action value=mainmenu><input type=submit value="Return to Main Menu" class=button200></form></h2>'; } function addhandler() { print '<h1 class="backstage">Handler Management</h1><br />'; print '<h2 class="backstage">Add New Handler Account</h2><br />'; print '<form name="addhandler" method="post" action="backstage.php" id="addhandler">'; print '<table width="100%" class="table2">'; print '<tr>'; print '<td width="120" class="rowheading">Username:</td><td class="row3"><input type="text" name="login" class="fieldtext490"></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Password:</td><td class="row3"><input type="password" name="password" class="fieldtext490"></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Surname:</td><td class="row3">'; print '<input type="text" name="surname" class="fieldtext490"></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Firstname:</td>'; print '<td class="row3"><input type="text" name="firstname" class="fieldtext490"></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Email:</td>'; print '<td class="row3"><input type="text" name="email" class="fieldtext490"></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">AIM:</td>'; print '<td class="row3"><input type="text" name="aim" class="fieldtext490"></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">MSN:</td>'; print '<td class="row3"><input type="text" name="msn" class="fieldtext490"></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Forum ID:</td>'; print '<td class="row3"><input type="text" name="forumid" class="fieldtext490"></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Account:</td>'; print '<td class="row3"><select name="account" class="selection"><option value="0">- Select -</option>'; print '<option value="Active">Active</option><option value="Inactive">Inactive</option>'; print '</select></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Administrator:</td>'; print '<td class="row3"><select name="admin" class="selection"><option value="0">- Select -</option>'; print '<option value="2">No</option><option value="1">Yes</option>'; print '</select></td>'; print '</tr>'; print '</table><br />'; print '<input type="submit" value="Save Handler" class="button" name="addhandler"></form><br />'; print '<input type="hidden" name="action" value="handlers"><input type="submit" value="Return to Handler List" class="button200"><br />'; print '<script type="text/javascript" src="ajax.js"></script>'; print '<h2 class="backstage">Characters<br /><br />'; print '<form method=post name="addwrestler" onsubmit="return WrestlerList(this);"><select name="characterid" class="dropdown">'; print '<option value="">- Select -</option>'; $query = 'SELECT charactername FROM characters'; $result = mysql_query ( $query ); while ( $row = mysql_fetch_assoc ( $result ) ) { print "<option value=\"".$row['charactername']."\">".$row['charactername']."</option>\r"; } print '</select> <input name="submit" type="submit" value="Add" class="button"></form></h2><br />'; print '<ul id="characterlist"></ul>'; print '<h2 class="backstage"><form method="post"><input type="submit" value="Return to Main Menu" class="button200"></form></h2>'; } function edithandler() { print '<h1 class=backstage>Handler Management</h1><br />'; print '<h2 class=backstage>Edit Handler Details</h2><br />'; print '<table width="100%" class="table2">'; print '<tr>'; print '<td width=120 class=rowheading>Username:</td><td class=row3><input type=text name=login class=fieldtext490 value=\"".$row['username']."\"></td>'; print '</tr>'; print '<tr>'; print '<td class=rowheading>Password:</td><td class=row3><input type=password name=password class=fieldtext490 onfocus="this.select()" value=""></td>'; print '</tr>'; print '<tr>'; print '<td class=rowheading>Surname:</td><td class=row3>'; print '<input type=text name=surname class=fieldtext490 value=\"".$row['surname']."\"></td>'; print '</tr>'; print '<tr>'; print '<td class=rowheading>Firstname:</td>'; print '<td class=row3><input type=text name=firstname class=fieldtext490 value=\"".$row['firstname']."\"></td>'; print '</tr>'; print '<tr>'; print '<td class=rowheading>Email:</td>'; print '<td class=row3><input type=text name=email class=fieldtext490 value=\"".$row['email']."\"></td>'; print '</tr>'; print '<tr>'; print '<td class=rowheading>AIM:</td>'; print '<td class=row3><input type=text name=aim class=fieldtext490 value=\"".$row['aim']."\"></td>'; print '</tr>'; print '<tr>'; print '<td class=rowheading>MSN:</td>'; print '<td class=row3><input type=text name=msn class=fieldtext490 value=\"".$row['msn']."\"></td>'; print '</tr>'; print '<tr>'; print '<td class=rowheading>Forum ID:</td>'; print '<td class=row3><input type=text name=forumid class=fieldtext490 value=\"".$row['forumid']."\"></td>'; print '</tr>'; print '<tr>'; print '<td class=rowheading>Account:</td>'; print '<td class=row3><select name=enabled class=selection>'; print '<option value=1>Enabled<option value=0>Disabled</option>'; print '</select></td>'; print '</tr>'; print '<tr>'; print '<td class=rowheading>Administrator:</td>'; print '<td class=row3><select name=isadministrator class=selection>'; print '<option value=1>Yes<option value=0>No'; print '</select></td>'; print '</tr>'; print '<tr>'; print '<td class=rowheading>Default Character:</td>'; print '<td class=row3></td>'; print '</tr>'; print '</table><br />'; print '<input type=checkbox name=deletehandler> <span class=table1heading>Delete Handler?</span><br /><br />'; print '<input type="submit" value="Save Handler" class="button" name="edithandler"></form><br />'; print '<form method=POST><input type=hidden name=action value=handler><input type=submit value="Return to Handler List" class=button200></form><br />'; print '<h2 class=backstage>Characters<br /><br /><form method=post><input type=hidden name=action value=handler><input type=hidden name=routine value=addcharacter><input type=hidden name=option value=0><input type=hidden name=id value="130"><select name=characterid class=dropdown>'; print '<option value=0>- Select -</select> <input type=submit value="Add" class=button></form></h2><br />'; print '<br /><br />'; print '<h2 class=backstage><form method=POST><input type=hidden name=action value=mainmenu><input type=submit value="Return to Main Menu" class=button200></form></h2>'; } function characters() { print '<h1 class=backstage>Character Management</h1><br />'; print "<h2 class=backstage>Characters :: <a href=\"#\" onclick=\"ajaxpage('addcharacters', 'content'); return false;\">Add New</a></h2><br />"; print '<h2 class=backstage>Active</h2><br />'; print '<table width="100%" class="table1">'; print '<tr class="rowheading">'; print '<td> </td>'; print '<td> </td>'; print '<td align=center width=40>Sort</td>'; print '<td>Character Name</td>'; print '<td align=center width=100>Poser Name</td>'; print '<td align=center width=60>Style</td>'; print '<td align=center width=60>Alignment</td>'; print '</tr>'; $query = "SELECT * FROM characters WHERE status = 'Active' "; $result = mysql_query ( $query ); // Run The Query if ($result) { // Fetch and print all records. $i = 0; while ( $row = mysql_fetch_array ( $result, MYSQL_ASSOC ) ) { $sClass = 'row2'; if ($i ++ & 1) { $sClass = 'row1'; } printf ( "<tr class=\"%s\">", $sClass ); print "<td valign=\"top\" align=center width=35><a href=\"#\" onclick=\"ajaxpage('editcharacter', 'content'); return false;\">Edit</a></td>"; print "<td valign=\"top\" align=center width=25><a href=\"#\" onclick=\"ajaxpage('bio', 'content'); return false;\">Bio</a></td>"; printf ( "<td align=\"center\" valign=\"top\">%s</td>", $row [sort] ); printf ( "<td valign=\"top\">%s</td>", $row [charactername] ); printf ( "<td align=\"center\" valign=\"top\">%s</td>", $row [posername] ); printf ( "<td align=\"center\" valign=\"top\">%s</td>", $row [style] ); printf ( "<td align=\"center\" valign=\"top\">%s</td>", $row [alignment] ); print '</tr>'; } } print '</table><br />'; print '<h2 class=backstage>Inactive</h2><br />'; print '<table width="100%" class="table1">'; print '<tr class="rowheading">'; print '<td> </td>'; print '<td> </td>'; print '<td align=center width=40>Sort</td>'; print '<td>Character Name</td>'; print '<td align=center width=100>Poser Name</td>'; print '<td align=center width=60>Style</td>'; print '<td align=center width=60>Alignment</td>'; print '</tr>'; $query = "SELECT * FROM characters WHERE status = 'Inactive' "; $result = mysql_query ( $query ); // Run The Query if ($result) { // Fetch and print all records. $i = 0; while ( $row = mysql_fetch_array ( $result, MYSQL_ASSOC ) ) { $sClass = 'row2'; if ($i ++ & 1) { $sClass = 'row1'; } printf ( "<tr class=\"%s\">", $sClass ); print "<td valign=\"top\" align=center width=35><a href=\"#\" onclick=\"ajaxpage('editcharacter', 'content'); return false;\">Edit</a></td>"; print "<td valign=\"top\" align=center width=25><a href=\"#\" onclick=\"ajaxpage('bio', 'content'); return false;\">Bio</a></td>"; printf ( "<td align=\"center\" valign=\"top\">%s</td>", $row [sort] ); printf ( "<td valign=\"top\">%s</td>", $row [charactername] ); printf ( "<td align=\"center\" valign=\"top\">%s</td>", $row [posername] ); printf ( "<td align=\"center\" valign=\"top\">%s</td>", $row [style] ); printf ( "<td align=\"center\" valign=\"top\">%s</td>", $row [alignment] ); print '</tr>'; } } print '</table><br />'; print '<h2 class=backstage><form method=POST><input type=hidden name=action value=home><input type=submit value="Return to Main Menu" class=button200></form></h2>'; } function addcharacter() { print '<h1 class="backstage">Character Management</h1><br />'; print '<h2 class="backstage">Add New Character</h2><br />'; print '<form name="newcharacter" method="post" action="backstage.php" id="newcharacter">'; print '<table width="100%" class="table2">'; print '<tr>'; print '<td class="rowheading">Character Name:</td><td class="row3">'; print '<input type="text" name="charactername" class="fieldtext490"></td>'; print '</tr>'; print '<tr>'; print '<td width="120" class="rowheading">Username:</td><td class="row3"><input type="text" name="username" class="fieldtext160"></td>'; print '</tr>'; print '<tr>'; print '<td width="120" class="rowheading">Poser name:</td><td class="row3"><input type="text" name="posername" class="fieldtext160"></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Style:</td>'; print '<td class="row3"><select name="style" class="dropdown"><option>- Select -</option><option value="Manager">Manager</option><option value="Referee">Referee</option><option value="Singles">Singles</option><option value="Stable">Stable</option><option value="Staff">Staff</option><option value="Tag Team">Tag Team</option></select></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Gender:</td>'; print '<td class="row3"><select name="gender" class="dropdown"><option>- Select -</option><option value="Male">Male</option><option value="Female">Female</option></select></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Status:</td>'; print '<td class="row3"><select name="status" class="dropdown"><option>- Select -</option><option value="Active">Active</option><option value="Inactive">Inactive</option></select></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Division:</td>'; print '<td class=row3><select name="division" class="dropdown"><option>- Select -</option><option value="Wrestling">Wrestling</option></select></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Alignment:</td>'; print '<td class="row3"><select name="alignment" class="dropdown"><option>- Select -</option><option value="Face">Face</option><option value="Heel">Heel</option><option value="Neutral">Neutral</option></select></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Sort:</td>'; print '<td class="row3"><select name="sort" class="dropdown"><option>- Select -</option><option value="A">A</option><option value="B">B</option><option value="C">C</option><option value="D">D</option><option value="E">E</option><option value="F">F</option><option value="G">G</option><option value="H">H</option><option value="I">I</option><option value="J">J</option><option value="K">K</option><option value="L">L</option><option value="M">M</option><option value="N">N</option><option value="O">O</option><option value="P">P</option><option value="Q">Q</option><option value="R">R</option><option value="S">S</option><option value="T">T</option><option value="U">U</option><option value="V">V</option><option value="W">W</option><option value="X">X</option><option value="Y">Y</option><option value="Z">Z</option><option value="0-9">0-9</option></select></td>'; print '</tr>'; print '</table><br />'; print '<input type="submit" value="Save Character" class="button" name="addcharacter"></form><br />'; print '<input type="hidden" name="action" value="character"><input type="submit" value="Return to Character List" class="button200"><br />'; print '<h2 class=backstage><input type="hidden" name="action" value="mainmenu"><input type="submit" value="Return to Main Menu" class="button200"></h2>'; } function directory() { $query = "SELECT * FROM users WHERE status = 'Active'"; $result = mysql_query ( $query ); // Run The Query if ($result) { print '<h1 class=backstage>Active Handler Directory</h1><br />'; print '<table width="100%" class="table1">'; print '<tr class="rowheading">'; print '<td>Name</td>'; print '<td>Forum Name</td>'; print '<td>Characters</td>'; print '</tr>'; // Fetch and print all records. $i = 0; while ( $row = mysql_fetch_array ( $result, MYSQL_ASSOC ) ) { $sClass = 'row2'; if ($i ++ & 1) { $sClass = 'row1'; } printf ( "<tr class=\"%s\">", $sClass ); printf ( "<td valign=\"top\">%s</td>", $row [username] ); printf ( "<td valign=\"top\">%s</td>", $row [forumname] ); printf ( "<td valign=\"top\"><ul class=\"characters\"><li>%s</li>", $row [characters] ); print '</ul></td>'; print '</tr>'; } print '</table><br />'; print '<h2 class=backstage><form method=POST><input type=hidden name=action value=mainmenu><input type=submit value="Return to Main Menu" class=button200></form></h2>'; } } function eventnames() { print '<h1 class=backstage>Event Name Management</h1><br />'; print '</table><br />'; print "<h2 class=backstage>Weekly Events :: <a href=\"#\" onclick=\"ajaxpage('addeventnameweekly', 'content'); return false;\">Add New</a></h2><br />"; print '<table width="100%" class="table1">'; print '<tr class="rowheading">'; print '<td width=1> </td>'; print '<td width=30 align=center>Sort</td>'; print '<td width=10> </td>'; print '<td width=10> </td>'; print '<td width=100 align=center>Short Name</td>'; print '<td>Event Name</td>'; print '<td>Lineup Template</td>'; print '<td>Show Template</td>'; print '</tr>'; print '<tr class=row2>'; print '<td align=center width=30><a href="#" onclick="ajaxpage(\"editshow\", \"content\"); return false;">Edit</a></td>'; print '<td width=30 align=center>1</td>'; print '<td width=10 align=center> </td>'; print '<td width=10 align=center><form method=post><input type=hidden name=action value=eventname><input type=hidden name=down value=yes><input type=hidden name=eventid value=8><input type=hidden name=eventtype value=recurring><input type=hidden name=sortorder value=1><input type=submit value=↓ class=button15></form></td>'; print '<td width=100 align=center>Short Name 1</td>'; print '<td>Show 1</td>'; print '<td>Show 1 Preview</td>'; print '<td>Show 1 Results</td>'; print '</tr>'; print '<tr class=row1>'; print '<td align=center width=30<a href="#" onclick="ajaxpage(\"editshow\", \"content\"); return false;">Edit</a></td>'; print '<td width=30 align=center>2</td>'; print '<td width=10 align=center><form method=post><input type=hidden name=action value=eventname><input type=hidden name=up value=yes><input type=hidden name=eventid value=26><input type=hidden name=eventtype value=recurring><input type=hidden name=sortorder value=2><input type=submit value=↑ class=button15></form></td>'; print '<td width=10 align=center> </td>'; print '<td width=100 align=center>Show 2</td>'; print '<td>Show 2</td>'; print '<td>Show 2 Preview</td>'; print '<td>Show 2 Results</td>'; print '</tr>'; print '</table><br />'; print "<h2 class=backstage>Weekly Events :: <a href=\"#\" onclick=\"ajaxpage('addeventnameppv', 'content'); return false;\">Add New</a></h2><br />"; print '<table width="100%" class="table1">'; print '<tr class="rowheading">'; print '<td width=1> </td>'; print '<td width=30 align=center>Sort</td>'; print '<td width=10> </td>'; print '<td width=10> </td>'; print '<td width=100 align=center>Short Name</td>'; print '<td>Event Name</td>'; print '<td>Lineup Template</td>'; print '<td>Show Template</td>'; print '</tr>'; print '<tr class=row2>'; print '<td align=center width=30><a href="#" onclick="ajaxpage(\"editshow\", \"content\"); return false;">Edit</a></td>'; print '<td width=30 align=center>1</td>'; print '<td width=10 align=center> </td>'; print '<td width=10 align=center><form method=post><input type=hidden name=action value=eventname><input type=hidden name=down value=yes><input type=hidden name=eventid value=8><input type=hidden name=eventtype value=recurring><input type=hidden name=sortorder value=1><input type=submit value=↓ class=button15></form></td>'; print '<td width=100 align=center>Short Name 1</td>'; print '<td>Show 1</td>'; print '<td>Show 1 Preview</td>'; print '<td>Show 1 Results</td>'; print '</tr>'; print '<tr class=row1>'; print '<td align=center width=30<a href="#" onclick="ajaxpage(\"editshow\", \"content\"); return false;">Edit</a></td>'; print '<td width=30 align=center>2</td>'; print '<td width=10 align=center><form method=post><input type=hidden name=action value=eventname><input type=hidden name=up value=yes><input type=hidden name=eventid value=26><input type=hidden name=eventtype value=recurring><input type=hidden name=sortorder value=2><input type=submit value=↑ class=button15></form></td>'; print '<td width=10 align=center> </td>'; print '<td width=100 align=center>Show 2</td>'; print '<td>Show 2</td>'; print '<td>Show 2 Preview</td>'; print '<td>Show 2 Results</td>'; print '</tr>'; print '</table><br />'; print '<h2 class=backstage><form method=POST><input type=hidden name=action value=mainmenu><input type=submit value="Return to Main Menu" class=button200></form></h2>'; } function addeventnameweekly() { print '<h1 class=backstage>Event Name Management</h1><br />'; print '</table><br />'; print '<h2 class=backstage>Event Name Editor</h1><br />'; print '<form name="addeventname" method="post" action="backstage.php" id="addeventname">'; print '<table width="100%" class="table2">'; print '<tr>'; print '<td width=120 class=rowheading valign=center>Event Name:</td>'; print '<td class=row3><input type=text name=eventname class=fieldtext490></td>'; print '</tr>'; print '<tr>'; print '<td width=120 class=rowheading valign=center>Short Name:</td>'; print '<td class=row3><input type=text name=shortname class=fieldtext140></td>'; print '</tr>'; print '<tr>'; print '</table><br />'; print '<input type="submit" value="Save Event Name" class="button" name="addeventnameweekly"></form><br />'; print '<form method=post><input type=hidden name=action value=eventname><input type=submit value="Return to Event Name List" class=button200></form><br /><br />'; print '<h2 class=backstage><form method=POST><input type=hidden name=action value=mainmenu><input type=submit value="Return to Main Menu" class=button200></form></h2>'; } function home() { print '<h1 class=backstage>Backstage Admin Console</h1><br />'; print '<h2 class=backstage>Upcoming Events</h2><br />'; print '<h3 class=backstage>Upcoming Show 1</h3><br />'; print '<table class="table1" width="100%">'; print '<tr class="rowheading">'; print '<td>Match</td>'; print '<td>Lead Writer</td>'; print '</tr>'; print '<tr class=row2>'; print '<td>Troy Douglas vs. Jason Natas</td>'; print '<td>Alex Clark</td>'; print '</tr>'; print '<tr class=row1>'; print '<td>Kaiser Vashaun vs. Rhett Locke</td>'; print '<td>Matt Ward</td>'; print '</tr>'; print '<tr class=row2>'; print '<td>DUI vs. The Awakening vs. Union Jack and Jeeves</td>'; print '<td>Will Otto</td>'; print '</tr>'; print '<tr class=row1>'; print '<td>Team VIAGRA vs. The Princes of New England</td>'; print '<td>Mike Renner</td>'; print '</tr>'; print '<tr class=row2>'; print '<td>Cozen vs. Dusk</td>'; print '<td>Craig Maloof</td>'; print '</tr>'; print '<tr class=row1>'; print '<td>The Roulette</td>'; print '<td>Matt Repchak</td>'; print '</tr>'; print '</table><br />'; print '<h2 class=backstage>Maintenance</h2><br />'; print '<h3 class=backstage>Records requiring editing</h3><br />'; print '<table class=table2 width="100%">'; print '<tr class=rowheading>'; print '<td> </td>'; print '<td>Show</td>'; print '</tr>'; print '<tr class=row2>'; print '<td valign=top align=center width=30><a href="#" onClick="executeformrecords(\"listrecords\",\"139\");">W/L</td>'; print '<td valign=top>ReVolution 175 (08 Oct 2008) </td>'; print '</tr>'; print '<tr class=row1>'; print '<td valign=top align=center width=30><a href="#" onClick="executeformrecords(\"listrecords\",\"138\");">W/L</td>'; print '<td valign=top>ReVolution 174 (01 Oct 2008) </td>'; print '</tr>'; print '<tr class=row2>'; print '<td valign=top align=center width=30><a href="#" onClick="executeformrecords(\"listrecords\",\"137\");">W/L</td>'; print '<td valign=top>ReVolution 173 (24 Sep 2008) </td>'; print '</tr>'; print '</table><br />'; } function titlenames() { print '<h1 class="backstage">Title Management</h1><br />'; print "<h2 class=backstage>Titles :: <a href=\"#\" onclick=\"ajaxpage('addtitle', 'content'); return false;\">Add New</a></h2><br />"; print '<table width="100%" class="table1">'; print '<tr class="rowheading">'; print '<td> </td>'; print '<td align="center" width="40">Order</td>'; print '<td width="1"> </td>'; print '<td width="1"> </td>'; print '<td width="100" align="center">Shortname</td>'; print '<td>Name</td>'; print '<td align="center" width="50">Style</td>'; print '<td align="center" width="40">Active</td>'; print '</tr>'; print '<tr class="row2">'; print '<td valign="top" align="center" width="30"><a href="#" onclick="ajaxpage(\"edittitle\", \"content\"); return false;">Edit</a></td>'; print '<td valign="top" align="center" width="40">1</td>'; print '<td valign="top" align="center" width="1"> </td>'; print '<td valign="top" align="center" width="1"><form method="post"><input type="hidden" name="action" value="title"><input type="hidden" name="down" value="yes"><input type="hidden" name="titleid" value="15"><input type="hidden" name="sortorder" value="1"><input type="submit" value="↓" class="button15"></form></td>'; print '<td valign="top" width="100" align="center">Title 1</td>'; print '<td valign="top">Title 1</td>'; print '<td valign="top" align="center" width="50">Style 1</td>'; print '<td valign="top" align="center" width="40">yes</td></tr>'; print '<tr class="row1">'; print '<td valign="top" align="center" width="30"><a href="#" onclick="ajaxpage(\"edittitle\", \"content\"); return false;">Edit</a></td>'; print '<td valign="top" align="center" width="40">2</td>'; print '<td valign="top" align="center" width="1"><form method="post"><input type="hidden" name="action" value="title"><input type="hidden" name="up" value="yes"><input type="hidden" name="titleid" value="13"><input type="hidden" name="sortorder" value="2"><input type="submit" value="↑" class="button15"></form></td>'; print '<td valign="top" align="center" width="1"><form method="post"><input type="hidden" name="action" value="title"><input type="hidden" name="down" value="yes"><input type="hidden" name="titleid" value="13"><input type="hidden" name="sortorder" value="2"><input type="submit" value="↓" class="button15"></form></td>'; print '<td valign="top" width="100" align="center">Title 2</td>'; print '<td valign="top">Title 2</td>'; print '<td valign="top" align="center" width="50">Style 2</td>'; print '<td valign="top" align="center" width="40">yes</td></tr>'; print '</table><br />'; print '<form method="POST"><input type="hidden" name="action" value="champions"><input type="submit" value="Go to Champions Manager" class="button200"></form><br />'; print '<h2 class="backstage"><form method="POST"><input type="hidden" name="action" value="mainmenu"><input type="submit" value="Return to Main Menu" class="button200"></form></h2>'; } function matchtypes() { print '<h1 class="backstage">Match Type Management</h1><br />'; print "<h2 class=backstage>Match Types :: <a href=\"#\" onclick=\"ajaxpage('addmatchtype', 'content'); return false;\">Add New</a></h2><br />"; print '<table width="100%" class="table1">'; print '<tr class="rowheading">'; print '<td> </td>'; print '<td>Name</td>'; print '</tr>'; $query = "SELECT * FROM matchtypes"; $result = mysql_query ( $query ); // Run The Query if ($result) { // Fetch and print all records. $i = 0; while ( $row = mysql_fetch_array ( $result, MYSQL_ASSOC ) ) { $sClass = 'row2'; if ($i ++ & 1) { $sClass = 'row1'; } printf ( "<tr class=\"%s\">", $sClass ); print "<td valign=\"top\" align=center width=35><a href=\"#\" onclick=\"ajaxpage('editmatchtype', 'content'); return false;\">Edit</a></td>"; printf ( "<td valign=\"top\">%s</td>", $row [matchtype] ); print '</tr>'; } } print '</table><br />'; print '<h2 class="backstage"><form method="POST"><input type="hidden" name="action" value="mainmenu"><input type="submit" value="Return to Main Menu" class="button200"></form></h2>'; } function addmatchtype() { print '<h1 class="backstage">Match Type Management</h1><br />'; print '<h2 class="backstage">Add New Match Type</h2><br />'; print '<form name="addmatchtype" method="post" action="backstage.php" id="addmatchtype">'; print '<table width="100%" class="table2">'; print '<tr>'; print '<td width="120" class="rowheading" valign="center">Type Name:</td><td class="row3"><input type="text" name="typename" class="fieldtext490"></td>'; print '</tr>'; print '</table><br />'; print '<input type="submit" value="Save Match Type" class="button" name="addmatchtype"></form><br />'; print '<form method="POST"><input type=hidden name=action value="matchtypes"><input type="submit" value="Return to Match Type List" class="button200"></form><br />'; print '<h2 class="backstage"><form method="POST"><input type="hidden" name="action" value="mainmenu"><input type="submit" value="Return to Main Menu" class="button200"></form></h2>'; } function divisions() { print '<h1 class="backstage">Division Management</h1><br />'; print "<h2 class=backstage>Divisions :: <a href=\"#\" onclick=\"ajaxpage('adddivision', 'content'); return false;\">Add New</a></h2><br />"; print '<table width="100%" class="table1">'; print '<tr class="rowheading">'; print '<td> </td>'; print '<td>Name</td>'; print '</tr>'; $query = "SELECT * FROM divisions"; $result = mysql_query ( $query ); // Run The Query if ($result) { // Fetch and print all records. $i = 0; while ( $row = mysql_fetch_array ( $result, MYSQL_ASSOC ) ) { $sClass = 'row2'; if ($i ++ & 1) { $sClass = 'row1'; } printf ( "<tr class=\"%s\">", $sClass ); print "<td valign=\"top\" align=center width=35><a href=\"#\" onclick=\"ajaxpage('editcharacter', 'content'); return false;\">Edit</a></td>"; printf ( "<td valign=\"top\">%s</td>", $row [name] ); print '</tr>'; } } print '</table><br />'; print '<h2 class=backstage><form method=POST><input type=hidden name=action value=mainmenu><input type=submit value="Return to Main Menu" class=button200></form></h2>'; } function adddivision() { print '<h1 class=backstage>Division Management</h1><br />'; print '<h2 class=backstage>Add New Division</h2><br />'; print '<form name="adddivision" method="post" action="backstage.php" id="adddivision">'; print '<table width="100%" class="table2">'; print '<tr>'; print '<td width=120 class=rowheading valign=center>Division Name:</td><td class=row3><input type=text name=divisionname class=fieldtext490></td>'; print '</tr>'; print '</table><br />'; print '<input type="submit" value="Save Division" class="button" name="adddivision"></form><br />'; print '<form method=POST><input type=hidden name=action value=division><input type=submit value="Return to Division List" class=button200></form><br />'; print '<h2 class=backstage><form method=POST><input type=hidden name=action value=mainmenu><input type=submit value="Return to Main Menu" class=button200></form></h2>'; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/141620-solved-unable-to-locate-parse-error-syntax-error-unexpected-t_string-on-118/ Share on other sites More sharing options...
Philip Posted January 20, 2009 Share Posted January 20, 2009 print '<td width=120 class=rowheading>Username:</td><td class=row3><input type=text name=login class=fieldtext490 value=\"".$row['username']."\"></td>'; Should be print '<td width=120 class=rowheading>Username:</td><td class=row3><input type=text name=login class=fieldtext490 value="'.$row['username'].'"></td>'; You have multiple rows that are like that, so take a look at them again. Quote Link to comment https://forums.phpfreaks.com/topic/141620-solved-unable-to-locate-parse-error-syntax-error-unexpected-t_string-on-118/#findComment-741281 Share on other sites More sharing options...
Prismatic Posted January 20, 2009 Share Posted January 20, 2009 Also theres really no need to print out one line at a time, you can clump groups of text to be sent in one print or echo function print "Line 1\n"; print "Line 2\n"; print "Line 3\n"; print "Line 4\n"; vs print "Line 1\n Line 2\n Line 3\n Line 4\n"; Quote Link to comment https://forums.phpfreaks.com/topic/141620-solved-unable-to-locate-parse-error-syntax-error-unexpected-t_string-on-118/#findComment-741306 Share on other sites More sharing options...
Xtremer360 Posted January 20, 2009 Author Share Posted January 20, 2009 Cool but now I have one in this line I added meaning a parse t_else problem: print '<h2 class=backstage>Characters<br /><br /><form method=post><select name=characterid class=dropdown>'; print '<option value=0>- Select -</select> <input type=submit value="Add" class=button></form></h2><br />'; { print 'This handler does not have any characters assigned.<br /><br />'; } else { print '<ul id="characterlist"></ul>'; } Quote Link to comment https://forums.phpfreaks.com/topic/141620-solved-unable-to-locate-parse-error-syntax-error-unexpected-t_string-on-118/#findComment-741307 Share on other sites More sharing options...
premiso Posted January 20, 2009 Share Posted January 20, 2009 There is no if statement near the first bracket. Quote Link to comment https://forums.phpfreaks.com/topic/141620-solved-unable-to-locate-parse-error-syntax-error-unexpected-t_string-on-118/#findComment-741308 Share on other sites More sharing options...
Xtremer360 Posted January 20, 2009 Author Share Posted January 20, 2009 I'm not sure what I need to make my if statement be. Here's what it's supposed to be like: ajax.js page function WrestlerList() { var addWrestler = document.addwrestler.characterid.value; if (addWrestler) { document.getElementById("characterlist").innerHTML += "<li>" + addWrestler + "</li>"; return WrestlerList; } else { document.getElementById("characterlist").innerHTML += "<li>This handler does not have any characters assigned.</li>"; } } And that second part of the coding on my backstagefunctions.php file print '<h2 class=backstage>Characters<br /><br /><form method=post><select name=characterid class=dropdown>'; print '<option value=0>- Select -</select> <input type=submit value="Add" class=button></form></h2><br />'; { print 'This handler does not have any characters assigned.<br /><br />'; } else { print '<ul id="characterlist"></ul>'; } Quote Link to comment https://forums.phpfreaks.com/topic/141620-solved-unable-to-locate-parse-error-syntax-error-unexpected-t_string-on-118/#findComment-741314 Share on other sites More sharing options...
Xtremer360 Posted January 20, 2009 Author Share Posted January 20, 2009 I copied the wrong function holdon Quote Link to comment https://forums.phpfreaks.com/topic/141620-solved-unable-to-locate-parse-error-syntax-error-unexpected-t_string-on-118/#findComment-741316 Share on other sites More sharing options...
Xtremer360 Posted January 20, 2009 Author Share Posted January 20, 2009 print '<script type="text/javascript" src="ajax.js"></script>'; print '<h2 class="backstage">Characters<br /><br />'; print '<form method=post name="addwrestler" onsubmit="return WrestlerList(this);"><select name="characterid" class="dropdown">'; print '<option value="">- Select -</option>'; $query = 'SELECT charactername FROM characters'; $result = mysql_query ( $query ); while ( $row = mysql_fetch_assoc ( $result ) ) { print "<option value=\"".$row['charactername']."\">".$row['charactername']."</option>\r"; } print '</select> <input name="submit" type="submit" value="Add" class="button"></form></h2><br />'; print '<ul id="characterlist"></ul>'; Quote Link to comment https://forums.phpfreaks.com/topic/141620-solved-unable-to-locate-parse-error-syntax-error-unexpected-t_string-on-118/#findComment-741319 Share on other sites More sharing options...
Xtremer360 Posted January 20, 2009 Author Share Posted January 20, 2009 I'm an idiot. SOlved. Quote Link to comment https://forums.phpfreaks.com/topic/141620-solved-unable-to-locate-parse-error-syntax-error-unexpected-t_string-on-118/#findComment-741323 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.