New Pages Error Code
22 posts by 5 authors in: Forums > CMS Builder
Last Post: September 10, 2010 (RSS)
I copy and pasted the code, stripped out a few of the things i didn't want and this is what i get.
"Parse error: syntax error, unexpected T_ENDFOREACH in /hermes/bosweb/web251/b2519/sl.evsmc/public_html/cmsAdmin/services.php on line 61"
It was working properly earlier but now it's not.
any suggestions?
thx
tim
Re: [dakrusha] New Pages Error Code
By zip222 - September 9, 2010
Re: [dakrusha] New Pages Error Code
By Jason - September 9, 2010
It looks like the beginning of a foreachloop was removed, but not the end.
Remove this line:
<?php endforeach ?>
This should be around line 68.
Hope this helps.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] New Pages Error Code
i removed that line and now i'm getting....
Warning: Cannot modify header information - headers already sent by (output started at /hermes/bosweb/web251/b2519/sl.evsmc/public_html/cmsAdmin/services.php:6) in /hermes/bosweb/web251/b2519/sl.evsmc/public_html/cmsAdmin/services.php on line 38
strange
Re: [dakrusha] New Pages Error Code
By Jason - September 9, 2010
You need to take this code:
<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/hermes/bosweb/web251/b2519/sl.evsmc/public_html/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
// load records
list($servicesRecords, $servicesMetaData) = getRecords(array(
'tableName' => 'services',
'loadUploads' => '0',
));
?>
and move it to the very top of your page. You'll want to make sure that there isn't even a blank line between the beginning of this code and the top of the page.
That should take care of that issue.
Hope this helps.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] New Pages Error Code
now that that's working...thank you very much.
how do a i get multiple record e.g. on a news page with several items...
to show themselves as a title and a portion of the article rather than the entire article.
thx
tim
Re: [dakrusha] New Pages Error Code
By Jason - September 9, 2010
Take a look at this thread:
http://www.interactivetools.com/forum/gforum.cgi?post=77525#77525
It has a function in it called maxWords. You could use this to limit the amount of output you display.
Hope this helps.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] New Pages Error Code
how bout this?
i have a grey background in my content.
i don't want it grey, i want nothing there.
ideas?
Re: [dakrusha] New Pages Error Code
http://www.equinevetspecialists.com/cmsAdmin/index.php
1. i hate the gret background on the pages. I have an image in my template that i can't see because of the grey.
2. on all the pages that are lists..news. services...about. they all have errors.
3. the content on the Home page and the Contact us Page doesn't show up.
here is the code from the services page
<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/hermes/bosweb/web251/b2519/sl.evsmc/public_html/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
// load records
list($servicesRecords, $servicesMetaData) = getRecords(array(
'tableName' => 'services',
));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>EVS Services</title>
<style type="text/css">
<!--
body {
background-image: url(http://www.equinevetspecialists.com/images/evs_background.jpg);
}
-->
</style></head>
<body>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><?php include 'header.php'; ?></td>
</tr>
<tr>
<td align="center"><?php include 'menu.php'; ?></td>
</tr>
<tr>
<td><table width="972" border="0" cellspacing="0" cellpadding="0" background="http://www.equinevetspecialists.com/images/body_bg.jpg">
<tr>
<td><table width="972" border="0" cellspacing="5" cellpadding="0">
<tr>
<td>
<?php foreach ($record['images'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>
<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>
<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>
<?php endif ?>
<?php endforeach ?>
<!-- STEP2a: /Display Uploads -->
<hr/>
<?php if (!$servicesRecords): ?>
No records were found!<br/><br/>
<?php endif ?>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"><?php include 'footer.php'; ?></td>
</tr>
</table>
</body>
</html>