Pomoc - Szukaj - U¿ytkownicy - Kalendarz
Pe³na wersja: B³±d Parse error: syntax error, unexpected T_STRING on line 149
Forum PHP.pl > Forum > Przedszkole
-Maker3-
  1. <?PHP
  2. if(!IsSet($indexloaded)) {
  3. header("Location: index.php");
  4. }
  5.  
  6. $out[mainurl]="$url[base]/$file[main]";
  7. $out[bulletleft] ="<font class='catfont'>»</font>";
  8. include("$dir[curthemeroot]/snips.inc");
  9. include("config/config.php");
  10. $menuhead=menu_head();
  11. $menufoot=menu_foot();
  12. $forumlink = "";
  13. $f1='PGZvbnQgc2l6ZT0xIGNvbG9yPXdoaXRlPjxicj5MYWRkZXIgU2NyaXB0cyBieSA8YSBocmVmPWh0dHA6
  14. y93d3cubXlnYW1pbmdsYWRkZXIuY29tPmh0dHA6Ly93d3cubXlnYW1pbmdsYWRkZXIuY29tPC9hPiA8Y
  15. I+IKkgTXkgR2FtaW5nIExhZGRlciBhbmQgDQoNCg==';
  16. if($url[forums] != ''){
  17. $forumlink = "$out[bulletleft] <a href='$url[forums]'>Forums</a><br>";}
  18.  
  19. $gt=date("Y");
  20. if($misc[passrequests] != 'no'){
  21. $lostpasslink = "$out[bulletleft] <a href='$url[base]/$file[join]?action=lostpass'>Lost Password</a><br>";
  22. }else{
  23.  
  24. $lostpasslink="";
  25. }
  26.  
  27. //PLAYER LOGIN/LOGGED-IN BLOCK
  28. if($plyr[id]){
  29. $servertime = date("D g:i A");
  30. $out[toprightcorner]=$out[toprightcorner]."
  31. <strong>
  32. <font class='catfont' style='color: black;'>
  33. $plyr[alias] jeste¶ ju¿ zalogowany
  34. <!-- Server Time: $servertime -->
  35. </font>
  36. </strong>";
  37. }else{
  38.  
  39. $out[toprightcorner]=$out[toprightcorner]."
  40.  
  41.  <table width='100%' cellpadding='2' cellspacing='0'>
  42. <form method='post' action='$url[base]/$file[login]'>
  43. <tr><td>
  44. <font class='catfont'><strong>Login:</strong></font><input type='text' name='playerid' class='loginforma' onblur=\"if (value == '') {value = 'Login'}\" onfocus=\"if (value == 'Login') {value =''}\" value='' size='10'><font class='catfont'> <strong>Has³o:</strong></font><input type='password' name='playerpass' size='10' value='' class='loginformb'>
  45. <input type='hidden' name='action' value='login'>
  46. <input type='submit' value='Zaloguj' class='loginformc'> • <a href='join.php?action=join'>Rejestracja</a></td>
  47. </tr>
  48. </form>
  49. </table>";
  50. }
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59. //PLAYER LOGIN/LOGGED-IN BLOCK
  60. if($plyr[id]){
  61. $servertime = date("D g:i A");
  62. $out[toprightcorner2]=$out[toprightcorner2]."
  63. <strong>
  64. <font class='catfont' style='color: black;'>
  65. Witaj $plyr[alias]!
  66. <!-- Server Time: $servertime -->
  67. </font>
  68. </strong>";
  69. }else{
  70.  
  71. $out[toprightcorner2]=$out[toprightcorner2]."<!-- Jeste¶ ju¿ zalogowany -->";
  72. }
  73.  
  74.  
  75.  
  76. // MAIN BLOCK
  77. //PLAYER MENU BLOCK
  78. $out[mainblock]=$out[mainblock]."
  79. <br>
  80. <!-- $menuhead -->
  81.  <strong><font class='catfont'>Main</font></strong><br>
  82. $out[bulletleft] <a href='$url[base]/$file[main]'>Home</a><br>
  83. $out[bulletleft] <a href='$url[base]/$file[search]'>Search</a><br>
  84. $out[bulletleft] <a href='$url[base]/$file[help]'>News Archive</a><br>
  85. $forumlink";
  86. //DATA BLOCK
  87. $out[datablock]=$out[datablock]." <br><br>
  88. $menuhead
  89.  <strong><font class='catfont'>Data</font></strong><br>
  90. $out[bulletleft] <a href='$url[base]/stats.php?action=matchdb'>Match Results</a><br>
  91. $out[bulletleft] <a href='$url[base]/stats.php?action=playerdb'>Player List</a><br>
  92. $out[bulletleft] <a href='$url[base]/stats.php?action=teamdb'>Team List</a><br>
  93. $out[bulletleft] <a href='$url[base]/stats.php?action=ladderdb'>Ladder List</a><br>
  94. $menufoot";
  95. //MANAGER BLOCK
  96. if(!$f1){$f2=include("$dir[func]/error.php");display_error("");;}else{$f2=base64_decode($f1);} //Verify ID
  97.  
  98. if($plyr[id]){$out[mangerblock]=$out[mangerblock]."
  99. $menuhead  <strong><font class='catfont'>Player Manager</font></strong><br>
  100. $out[bulletleft] <a href='$url[base]/$file[join]?action=chooseladder'>Join a Ladder</a><br>
  101. $out[bulletleft] <a href='$url[base]/$file[phome]'>Account Manager</a></a><br>
  102. $out[bulletleft] <a href='$url[base]/$file[match]?action=report_init'>Report a Loss</a></a><br>
  103. $out[bulletleft] <a href='$url[base]/$file[match]?action=confirm'>Confirm a Win</a></a><br>
  104. $out[bulletleft] <a href='$url[base]/$file[login]?action=logout'>Logout</a></a><br>
  105. $menufoot";
  106. }else{
  107.  
  108. //PLAYER MENU BLOCK
  109. $out[mangerblock]=$out[mangerblock]."
  110. $menuhead
  111.  <strong><font class='catfont'>Player Manager</font></strong><br>
  112. $out[bulletleft] <a href='$url[base]/$file[join]?action=join'>New Player Signup</a><br>
  113. $out[bulletleft] <a href='$url[base]/$file[join]?action=validate'>Validate Account</a><br>
  114. $menufoot"; }
  115.  
  116. //GAMES BLOCK
  117. if(!$f2){$f2=include("$dir[func]/error.php");display_error("");}else{$pr="$f2 $site[longname] $gt";}
  118.  
  119. $out[mainblock]=$out[mainblock]."$menufoot";
  120. $listgames=mysql_query("SELECT id,gamename,status FROM games ORDER by gamename");
  121. while(list($id,$name,$status)=mysql_fetch_row($listgames)){
  122. if($status){
  123. $gamelink=$gamelink."$out[bulletleft] <a href='$url[base]/$file[game]?gameid=$id'>$name</a><br>";
  124. $gamesavail++;} }
  125.  
  126. //TOURNAMENTS
  127. $out[tourneyblock]=$out[tourneyblock]."
  128. $menuhead
  129.  <strong><font class='catfont'>Tournaments</font></strong><br>
  130. $out[bulletleft] <a href='$url[base]/$file[tournament]'>Tournaments</a><br>
  131. $menufoot";
  132. //HELP BLOCK
  133. if($gamesavail){
  134. $out[gamesblock]=$out[gamesblock]."
  135. $menuhead
  136.  <strong><font class='catfont'>Ladders</font></strong><br>
  137. $gamelink$menufoot";}$out[footer]="$pr";$out[helpblock]=$out[helpblock]."$menuhead
  138.  
  139.  <strong><font class='catfont'>Support</font></strong><br>
  140. $out[bulletleft] <a href='$url[base]/$file[staff]?ladderid=$ladderid'>Staff List</a><br>
  141. $out[bulletleft] <a href='$url[base]/$file[rules]?ladderid=$ladderid'>Ladder Rules</a><br>
  142. $lostpasslink
  143. $menufoot";if((!$out[footer])||($out[footer]!="$pr")){include("$dir[func]/error.php");display_error("");}else{$pr="$f2 $site[longname] $gt";}
  144.  
  145. //MY BLOCK
  146. $out[myblock]=$out[myblock]."
  147.  
  148.  
  149.  
  150.  
  151. $query = "SELECT matchid,winneralias,loseralias FROM matchdb ORDER by confirmdate DESC LIMIT 5";
  152. $lastmatches = mysql_query($query);
  153. while(list($matchid,$winneralias,$loseralias)=mysql_fetch_row($lastmatches)){
  154. $recentmatches=$recentmatches."$out[bulletleft] <a href='$url[base]/$file[match]?matchid=$matchid'>$winneralias vs $loseralias</a><br>";
  155. }
  156.  
  157. if(!$recentmatches){
  158. $recentmatches = "$out[bulletleft] No Recent Matches";
  159. }
  160.  
  161. $date = date('Y-m-d H:i:s', mktime(0, 0, 0, date("m") , date("d") + 7, date("Y")));
  162.  
  163.  
  164.  
  165.  
  166. <strong><font class='catfont'>Recent Matches</font></strong><br>
  167. <hr class='catfont' size='1'>
  168. $recentmatches
  169.  
  170.  
  171.  
  172.  
  173.  
  174. "; 
  175.  
  176. //ADMIN BLOCK
  177. if($admn[id]){
  178. $out[adminblock]=$out[adminblock]."
  179. $menuhead
  180.  <strong><font class='catfont'>Admin [$admn[id]]</font></strong><br>
  181. $out[bulletleft] <a href='$url[base]/$file[admin]'>Admin Main</a></a><br>
  182. $out[bulletleft] <a href='$url[base]/$file[login]?action=adminlogout'>Admin Logout</a></a><br>
  183. $menufoot";
  184. }
  185.  
  186. //MENU BLOCK ORDER
  187. $out[menu]="
  188. $out[mainblock]
  189. $out[mangerblock]
  190. $out[gamesblock]
  191. $out[tourneyblock]
  192. $out[datablock]
  193. $out[helpblock]
  194. $out[myblock]
  195. $out[adminblock]
  196. ";
  197. ?>
Foxx
Zaczynasz do³±czaæ string w l.145 ale nie robisz tego tylko dalej piszesz instrukcje php
  1. <?php
  2. $out[myblock]=$out[myblock]."
  3. ?>


a potem w linii 165 masz nagle html wrzucony miêdzy kod php
-Maker3-
Cytat(Foxx @ 11.11.2007, 16:04:02 ) *
Zaczynasz do³±czaæ string w l.145 ale nie robisz tego tylko dalej piszesz instrukcje php
  1. <?php
  2. $out[myblock]=$out[myblock]."
  3. ?>


a potem w linii 165 masz nagle html wrzucony miêdzy kod php

Tak bedzie dobrze?
Moja wiedza na temat php jest znikoma,
przerabiam skrypt metod± prób i b³êdów.

  1. <?php
  2. //MY BLOCK
  3.  
  4. $query = "SELECT matchid,winneralias,loseralias FROM matchdb ORDER by confirmdate DES
    C LIMIT 5"
    ;
  5. $lastmatches = mysql_query($query);
  6. while(list($matchid,$winneralias,$loseralias)=mysql_fetch_row($lastmatches)){
  7. $recentmatches=$recentmatches."$out[bulletleft] <a href='$url[base]/$file[match]?matchid=$matchid'>$winneralias vs $loseralias</a><br>";
  8. }
  9.  
  10. if(!$recentmatches){
  11. $recentmatches = "$out[bulletleft] No Recent Matches";
  12. }
  13.  
  14. $date = date('Y-m-d H:i:s', mktime(0, 0, 0, date("m") , date("d") + 7, date("Y")));
  15.  
  16.  
  17.  
  18. $out[myblock]=$out[myblock]."<strong><font class='catfont'>Recent Matches</font></strong><br>
  19. <hr class='catfont' size='1'>
  20. $recentmatches";
  21. ?>
Foxx
Raczej tak:
  1. <?php
  2. $out[myblock] = $out[myblock].'<strong><font class="catfont">Recent Matches</font></strong><br>
  3. <hr class="catfont" size="1">'.$recentmatches;
  4. ?>


Tip:

  1. <?php
  2. $w = $w."xxxx";
  3. // to to samo co
  4. $w .= "xxxx";
  5. // ale krócej :)
  6. ?>
To jest wersja lo-fi g³ównej zawarto¶ci. Aby zobaczyæ pe³n± wersjê z wiêksz± zawarto¶ci±, obrazkami i formatowaniem proszê kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.