DarePoo Posted February 11, 2011 Share Posted February 11, 2011 Ok, so the error I get is Parse error: syntax error, unexpected $end in /home/a3868616/public_html/skin_files/skin_manager.php on line 168. In dreamweaver, it tells me there is an error on line 141, which is the first line to be returned ( <table cellspacing="0" class="tableborder" width="85%" align="center"> ) in the contract function. I've looked at this over and over, and I can't find any brackets that aren't closed. All of the lines of code seem to be in their correct syntax. I was thinking maybe the EOF in the else after the while was causing it, but same errors different line numbers when I removed that. What the hell can it be!? The whole php file is below. <?php class skin_manager{ function show(){ global $DB, $projectx, $func, $game; return <<<EOF <table cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="40%" valign="top"> <table cellspacing="0" class="tableborder" width="100%"> <tr> <td class="mainrow">Manager Page</td> </tr> <tr> <td> <div class="tablepad"> <table cellspacing="0" cellpadding="3" width="100%"> <tr> <td class="row1"><a href="#">Finances</a></td> </tr> <tr> <td class="row2"><a href="manager.php?act=contracts">Contracts</a></td> </tr> <tr> <td class="row1"><a href="#">Holiday Mode</a></td> </tr> </table> </div> </td> </tr> </table> </td> <td width="2%"></td> <td width="40%"> <table cellspacing="0" class="tableborder" width="100%"> <tr> <td class="mainrow">Manager Releases</td> </tr> <tr> <td> <div class="tablepad"> <table cellspacing="0" cellpadding="3" width="100%"> <tr> <td class="rowheader" colspan="2">Singles</td> </tr> <tr> <td class="row2" width="25%">Gold:</td> <td class="row2" width="75%">{$band_name}</td> </tr> <tr> <td class="row1" width="25%">Platinum:</td> <td class="row1" width="75%">{$band_genre}</td> </tr> <tr> <td class="row2" width="25%">Multi-Platinum:</td> <td class="row2" width="75%">{$band_status}</td> </tr> <tr> <td class="row1" width="25%">Number 1:</td> <td class="row1" width="75%">{$band_created}</td> </tr> <tr> <td class="row1" width="25%">Total:</td> <td class="row1" width="75%">{$band_created}</td> </tr> <tr> <td class="rowheader" colspan="2">Albums</td> </tr> <tr> <td class="row2" width="25%">Gold:</td> <td class="row2" width="75%">{$band_name}</td> </tr> <tr> <td class="row1" width="25%">Platinum:</td> <td class="row1" width="75%">{$band_genre}</td> </tr> <tr> <td class="row2" width="25%">Multi-Platinum:</td> <td class="row2" width="75%">{$band_status}</td> </tr> <tr> <td class="row1" width="25%">Number 1:</td> <td class="row1" width="75%">{$band_created}</td> </tr> <tr> <td class="row1" width="25%">Total:</td> <td class="row1" width="75%">{$band_created}</td> </tr> </table> </div> </td> </tr> </table> </td> <td width="18%"></td> </tr> </table> EOF; } // end function show function contract(){ global $DB, $projectx, $func; $contracts_q = $DB->query("SELECT * FROM `contracts` RIGHT JOIN `bands` ON (contracts.contract_band = bands.band_id) LEFT JOIN `labels` ON (contracts.contract_from = labels.label_id) WHERE contracts.contract_manager='{$projectx->member['id']}'"); if($DB->get_num_rows()){ while($row = $DB->fetch_array($contracts_q)){ $pcontracts .= "<tr>"; if($style != 2){ $class = "row2"; $style = 1; }else{ $class = "row1"; $style = 2; } $pcontracts .= "<td class=\"{$class}\" width=\"20%\">{$row['band_name']}</td>"; $pcontracts .= "<td class=\"{$class}\" width=\"20%\">{$row['label_name']}</td>"; $clength = explode(",", $row['contract_length']); $csingles = explode("|", $clength[0]); $calbums = explode("|", $clength[1]); $pcontracts .= "<td class=\"{$class}\" width=\"30%\">{$csingles[0]} singles ({$csingles[1]}% cut), {$calbums[0]} albums ({$calbums[1]}% cut)</td>"; $pcontracts .= "<td class=\"{$class}\" width=\"10%\">{$row['contract_amount']}</td>"; $pcontracts .= "<td class=\"{$class}\" width=\"20%\">Accept / Reject</td>"; $pcontracts .= "</tr>"; } }else{ $pcontracts = <<<EOF <tr> <td class="row2" colspan="5">You have no contracts.</td> </tr> EOF; } return <<<EOF <table cellspacing="0" class="tableborder" width="85%" align="center"> <tr> <td class="mainrow">Contracts</td> </tr> <tr> <td> <div class="tablepad"> <table cellspacing="0" cellpadding="3" width="100%"> <tr> <td class="rowheader" width="20%">Band</td> <td class="rowheader" width="20%">From</td> <td class="rowheader" width="30%">Terms</td> <td class="rowheader" width="10%">Amount</td> <td class="rowheader" width="20%">Decision</td> </tr> </table> </div> </td> </tr> </table> EOF; } // end function contract } // end class skin_manager ?> Quote Link to comment Share on other sites More sharing options...
acefirefighter Posted February 11, 2011 Share Posted February 11, 2011 On line 162 it looks like there might be two tabs after the EOF; This line can't have anything else on it and there always has to be line after it so it can't be the last line in your php file. I would remove the two tabs and add an extra emply line after line 162. Try that and get back to us. </tr> </table> EOF; } // end function contract Quote Link to comment Share on other sites More sharing options...
DarePoo Posted February 11, 2011 Author Share Posted February 11, 2011 Well don't I feel stupid now - it was the tabs after the EOF;. I wasn't even aware that they were there! Ughh!! Thanks a ton though, especially for such a speedy reply Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 11, 2011 Share Posted February 11, 2011 On line 162 it looks like there might be two tabs after the EOF; This line can't have anything else on it and there always has to be line after it so it can't be the last line in your php file. I would remove the two tabs and add an extra emply line after line 162. Try that and get back to us. </tr> </table> EOF; } // end function contract I wish we had a thumbs up, what great debugging Quote Link to comment Share on other sites More sharing options...
acefirefighter Posted February 11, 2011 Share Posted February 11, 2011 I wish we had a thumbs up, what great debugging Ya.... ummm.... we have that too..... _ ( (( \ =\ __\_ `-\ (____))( \---- (____)) _ (____)) (____))____/---- Thumbs Up Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 11, 2011 Share Posted February 11, 2011 :thumb-up: :thumb-up: Yes. I did that on purpose :-P Quote Link to comment 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.