Jump to content

unidox

Members
  • Posts

    557
  • Joined

  • Last visited

    Never

Everything posted by unidox

  1. I have this code: <? if ($_REQUEST['p']){ include("incs/files.inc.php"); } else { echo "We are still in developement"; } Now as of now, if someone types in index.php?p=asd It will not find it, and it will go blank, is there a way I can set a default so if someone does go to asd, it shows the default page? Thanks
  2. Well, I fixed the t var part, by restarting apache. Thanks
  3. Max, can you paste the code?
  4. I changed it, but I am still getting the error.
  5. I dont see anything wrong... Its really annoying
  6. Nope. still have the problem. I am using mysql, do I need mysqli?
  7. // Start the session @session_start(); // Mysql Info $db_user = "root" // Username $db_pass = "********" // Password $db_database = "pcp" // Database Name $db_host = "localhost" // Server Hostname // DO NOT EDIT ANYTHING AFTER THIS LINE! $db_connect = @mysql_connect ($db_host, $db_user, $db_pass); $db_select = @mysql_select_db ($db_database); // Requests information for clan name and the link to the forums. if ($db_connect && $db_select) { $q = @mysql_query("SELECT 'info' FROM 'pcp_information' WHERE type = 'name';"); $r = @mysql_fetch_array($q); $clanname = $r['info']; $q = @mysql_query("SELECT 'info' FROM 'pcp_information' WHERE type = 'forumlink';"); $r = mysql_fetch_array($q); $forumlink = ($r['info'] == "") ? "index.php?p=forum" : $r['info']; } else ( $db_error = 1; } // Switch Statements for title switch($_GET['p']) { default: $title = " Welcome!"; break; case "admin": $title = "Pure cP"; break; case "admin_settings": $title = "PcP - Settings"; break; case "admin_preview": $title = "PcP - Preview"; break; case "admin_news": $title = "PcP - News"; break; case "admin_sponsors": $title = "PcP - Sponsors"; break; case "admin_servers": $title = "PcP - Servers"; break; case "admin_roster": $title = "PcP - Roster"; break; case "admin_matches": $title = "PcP - Matches"; break; case "admin_contact": $title = "PcP - Contact"; break; case "admin_upcoming_matches": $title = "PcP - Upcoming Matches"; break; case "admin_media": $title = "PcP - Media"; break; case "admin_demos": $title = "PcP - Demos"; break; case "admin_cotw": $title = "PcP - Clip Of The Week"; break; case "admin_gallery": $title = "PcP - Gallery"; break; case "admin_events": $title = "PcP - Events"; break; case "admin_ads": $title = "PcP - Events"; break; case "admin_lead_sponsor": $title = "PcP - Lead Sponsor"; break; case "admin_premier_sponsor": $title = "PcP - Premier Sponsor"; break; case "admin_poll": $title = "PcP - Poll"; break; case "roster": $title = "Roster"; break; case "contact": $title = "Contact"; break; case "upcoming_matches": $title = "Upcoming Matches"; break; case "media": $title = "Media"; break; case "demos": $title = "Demos"; break; case "cotw": $title = "Clip Of The Week"; break; case "gallery": $title = "Gallery"; break; case "events": $title = "Events"; break; case "ads": $title = "Advertisements"; break; case "lead_sponsor": $title = "Lead Sponsor"; case "premier_sponsor": $title = "Premier Sponsor"; break; case "poll": $title = "Poll"; break; case "sponsors": $title = "Sponsors"; break; case "matches": $title = "Matches"; break; case "about": $title = "About Us"; break; case "profile": $title = "Profile"; break; case "contact": $title = "Contact Information"; break; }
  8. Yes, would you like the config?
  9. There is no line 24. btw, I tried on a real server, and same problem. So its not the server.
  10. hmm, I dont know what could be wrong.
  11. didnt work, I am using it on my home server, is there something I need to enable in php to have it work?
  12. This is the error: Parse error: syntax error, unexpected T_VARIABLE in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\acp\incs\conf.inc.php on line 24 This is my code: <form action="../actions/admin_login.php" method="post"> Admin Login <div> <div style="text-align: center;"> <? include("conf.inc.php"); $q = mysql_query("SELECT * FROM `pcp_users` ORDER BY `user_id` DESC"); $r = mysql_fetch_array($q); if($_GET['e'] != 1) { echo "Please enter the admin password to continue."; } else { echo "The password/username you entered was incorrect. Please try again."; } echo "<br /><br />"; ?> Username: <input type="text" name="username" size="20" /> Password: <input type="password" name="password" size="20" /> <input type="submit" value="Log In" /> </div> </div> </form>
  13. unidox

    [SOLVED] Input

    Works, how do I make a checkbox and submit butten hidden?
  14. unidox

    [SOLVED] Input

    didnt work, I am basically trying to hide the texzt box, so you have to highlight it to see it
  15. How would I make an input field have no black border, and just be plain old white? Same with a check box. How? Thanks
  16. unidox

    Readmore

    so for the $string I would put the news_message like $string = $mysql[news_message]; ?
  17. unidox

    Readmore

    is there anyway I can make it so it only allows like 100 letters?
  18. How would I make a read more to a news post? Right now it echos everything in the news_message table.
  19. unidox

    Roster

    lol, im no idiot, I need it so it doesn't refresh the page.
  20. unidox

    Roster

    How would I do that? Got IM so we can talk?
  21. unidox

    Roster

    This is my code: <img src="images/demo_20.gif" width="216" height="25" alt="" /> <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-image: url(images/demo_27.gif)"> <tr> <td><?php $mysql_table = "cp_roster"; require_once ("inc/required.inc.php"); $result = MYSQL_QUERY("SELECT * FROM $mysql_table ORDER BY type ASC") or die (mysql_error()); $result2 = MYSQL_QUERY("SELECT * FROM cp_divisions ORDER BY division_id ASC") or die (mysql_error()); $rows = mysql_num_rows($result); if ($rows == "0") { echo "<b>No Members in the roster database table.</b>"; } else { echo '<table border="0" align="center" cellpadding="0" cellspacing="3">'; $i = 0; echo "<tr><td colspan='3'><div align='center'>"; while ($mysql2=mysql_fetch_array($result2)) { if ($mysql2[image] !== "0") { ?> <img src="/games/<?=$mysql2[image]?>.gif" width="15" height="15" /> <? } else { echo "2"; ?> <? } } echo "</div></td></tr>"; while ($mysql=mysql_fetch_array($result)) { $i++; if ($i == 1) echo '<tr>'; if ($mysql[image] !== "0") { ?> <td style="border: 1px solid rgb(42,49,52)"><a href="index.php?id=roster&roster_id=<?=$mysql[roster_id]?>"><img src="<?=$imagefilepath . 'rosterpic' . $mysql[roster_id] . '.' . $mysql['imagetype']?>" width="45" height="45" border="0" onmouseover="swapOnRoster('<?=$mysql[first]?>','<?=$mysql[last]?>','<?=$mysql[alias]?>')" onmouseout="swapOffRoster()"></img></a></td> <? } else { ?> <td style="border: 1px solid rgb(42,49,52)"><a href="index.php?id=roster&roster_id=<?=$mysql[roster_id]?>"><img src="pics/roster.gif" width="45" height="45" border="0" onmouseover="swapOnRoster('<?=$mysql[first]?>','<?=$mysql[last]?>','<?=$mysql[alias]?>')" onmouseout="swapOffRoster()"></img></a></td> <? } if ($i == 4) { echo '</tr>'; $i = 0; } } if ($i != 0) echo '</tr>'; echo '</table><div id="handleDivision"> <div align="center" id="rosterHandle">Select to view profile</div> <div class="clearBoth"></div></div>'; } ?> </td> </tr> </table> What I am trying to do is have everyone on the roster have a team. It will sort the members by the team, so when you click on the team image, it goes to that part of the roster, how would I go about doing this? Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.