Jump to content

DarePoo

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

DarePoo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 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
  2. 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 ?>
  3. I'm not very well versed on creating images with the GD functions so that is most likely the problem. I actually just learned all of this within the past 2 days. Anyway, I can't get an image to be created. The code is as follows: <?php // make uniform picture $imgdir = "ranks/uniforms/".$_GET['gender']."/"; $uniform = array(); $uniform['rank'] = strtolower($_GET['rank']); $uniform['uniform'] = @imagecreatefrompng($imgdir."rank-".$uniform['rank'].".png") $uniform['nametag'] = imagecreatefrompng($imgdir."name-tag.png"); imagecopy($uniform['uniform'], $uniform['nametag'], 80, 170, 0, 0, 47, 16); $uniform['name'] = strtoupper($_GET['name']); $uniform['nametag']['font'] = imageloadfont("../font.gdf"); $uniform['nametag']['color'] = imagecolorallocate($uniform['nametag'], 255, 255, 255); imagestring($uniform['uniform'], $uniform['nametag']['font'], 80, 170, $uniform['name'], $uniform['nametag']['color']); imagepng($uniform['uniform']); ?> That is uniform.php. How I am displaying the image is: <img src="'.e_PLUGIN.'roster/images/uniform.php?gender='.$member_a['roster_member_gender'].'&rank='.$rank[2].'&name='.$member_a['roster_member_name'].'" border="0" /> All of that is correct. The HTML output is: <img border="0" src="../../e107_plugins/roster/images/uniform.php?gender=Male&rank=COL&name=Beckwith"/> That is exactly how it should be, the image just isn't being created. All the paths are correct in the uniform.php file. Any and all help would be greatly appreciated.
×
×
  • 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.