here is my website, www.froshfairytales.com, it seems as though there is a problem with line 73 on the third character, but I dont see how its wrong. below is the code for the index page.
<?php
include("include/config.php");
include("include/functions/import.php");
$thebaseurl = $config['baseurl'];
$page = intval($_REQUEST[page]);
if($page=="")
{
$page = "1";
}
$currentpage = $page;
if ($page >=2)
{
$pagingstart = ($page-1)*$config[items_per_page];
}
else
{
$pagingstart = "0";
}
$query1 = "SELECT count() as total from posts where active='1' order by PID desc limit $config[maximum_results]";
$query2 = "SELECT from posts A, categories B where A.active='1' AND A.category=B.CATID order by A.PID desc limit $pagingstart, $config[items_per_page]";
$executequery1 = $conn->Execute($query1);
$totalvideos = $executequery1->fields['total'];
if ($totalvideos > 0)
{
if($executequery1->fields['total']<=$config[maximum_results])
{
$total = $executequery1->fields['total'];
}
else
{
$total = $config[maximum_results];
}
$toppage = ceil($total/$config[items_per_page]);
if($toppage==0)
{
$xpage=$toppage+1;
}
else
{
$xpage = $toppage;
}
$executequery2 = $conn->Execute($query2);
$posts = $executequery2->getrows();
$beginning=$pagingstart+1;
$ending=$pagingstart+$executequery2->recordcount();
$pagelinks="";
$k=1;
$theprevpage=$currentpage-1;
$thenextpage=$currentpage+1;
if ($currentpage > 0)
{
if($currentpage > 1)
{
$pagelinks.="<a href='$thebaseurl/?page=1'>$lang[64]</a> ";
$pagelinks.="... ";
$pagelinks.="<a href='$thebaseurl/?page=$theprevpage'>« $lang[65]</a> ";
STemplate::assign('tpp',$theprevpage);
}
$counter=0;
$lowercount = $currentpage-5;
if ($lowercount <= 0) $lowercount = 1;
while ($lowercount < $currentpage)
{
$pagelinks.="<a href='$thebaseurl/?page=$lowercount'>$lowercount</a> ";
$lowercount++;
$counter++;
}
$pagelinks.="<strong>$currentpage</strong> ";
$uppercounter = $currentpage+1;
while (($uppercounter < $currentpage+10-$counter) && ($uppercounter<=$toppage))
{
$pagelinks.="<a href='$thebaseurl/?page=$uppercounter'>$uppercounter</a> ";
$uppercounter++;
}
if($currentpage < $toppage)
{
$pagelinks.="<a href='$thebaseurl/?page=$thenextpage'>$lang[66] »</a> ";
STemplate::assign('tnp',$thenextpage);
$pagelinks.="... ";
$pagelinks.="<a href='$thebaseurl/?page=$toppage'>$lang[67]</a> ";
}
}
}
$templateselect = "index.tpl";
$pagetitle = $lang[1];
STemplate::assign('pagetitle',$pagetitle);
//TEMPLATES BEGIN
STemplate::assign('beginning',$beginning);
STemplate::assign('ending',$ending);
STemplate::assign('pagelinks',$pagelinks);
STemplate::assign('total',$total);
STemplate::assign('posts',$posts);
STemplate::display('header.tpl');
STemplate::display($templateselect);
STemplate::display('footer.tpl');
//TEMPLATES END
?>