Hi, I was updating my website, well trying to... and I somehow messed it up. I didnt build it, I bought it so I don't know alot about programming. I receive these errors when going to minbiketrader.c om :
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/content/m/i/n/minibiketrader/html/index.php on line 2
Parse error: parse error, unexpected T_REQUIRE_ONCE in /home/content/m/i/n/minibiketrader/html/index.php on line 3
Here is the coding,
[Code=php]
<?
require_once 'common.php';
require_once 'config.php'; // Configuration information
require_once 'include/mysql.php';
// Access to all the database functions
// Open the database
$db = new MySQL;
if(!$db->init()) {
echo '<div>Cannot open database</div>';
exit;
}
$cat = (int)$_REQUEST['cat'];
$db->AUTOAPPROVE = false;
$ADMIN_MODE = false;
$msg = '';
$title = 'Links ';
$linkcats = array();
$links = array();
$newlinks = array();
$i = 0;
if ($_REQUEST['KeyWords'])
{
$links = $db->search($_REQUE ST['KeyWords']);
//print '<pre>'; print_r($links) ;
if(!is_array($l inks))
{
$title = "Search Results";
$msg = "No Matches";
// start_page($jun k,$title,$msg);
}
else
{
$total = count($links);
$title = "Search Results";
$msg = "Search returned $total matches";
$lnks = array();
foreach($links as $lnk)
{
if (!in_array($lnk['CatID'], $lnks))
{
$lnks[] = $lnk['CatID'];
$linkcats[$i]['CatId'] = $lnk['CatID'];
$linkcats[$i]['CatName'] = $lnk['CatName'];
$i++;
}
}
//print '<pre>'; print_r($linkca ts);
}
}
else
{
$linkcats = $db->get_Cats($cat) ;
//links
$hotlinks = array();
if ((int)$cat == 0)
{
$hotlinks = $db->get_HotLinks() ;
$newlinks = $db->get_NewLinks() ;
}
$links = array_merge($ho tlinks, $db->get_Links($cat ));
}
$t->setRoot('../templates');
$t->loadTemplatefi le('link.htm');
$t->setCurrentbloc k('__global__') ;
$t->setVariable('p agedesc', 'New and used pocketbikes, pocketbide racing, event calendar, forum and links');
$t->setVariable('p agedkeywords', 'pocket bike minimoto minibike used pocketbikes for sale');
$t->setVariable('m sg', $msg);
$t->setVariable('t rail', breadcrumbs($ca t));
$t->setVariable('C atID', $cat);
// categories
for ($i=0; $i < round(count($li nkcats)/2); $i++)
{
$t->setCurrentBloc k('link_categor ies_left');
$t->setVariable('C atID', $linkcats[$i]['CatID']);
$t->setVariable('C atName', stripslashes($l inkcats[$i]['CatName']));
$t->parseCurrentBl ock('link_categ ories_left');
}
for ($i; $i < round(count($li nkcats)); $i++)
{
$t->setCurrentBloc k('link_categor ies_right');
$t->setVariable('C atID', $linkcats[$i]['CatID']);
$t->setVariable('C atName', stripslashes($l inkcats[$i]['CatName']));
$t->parseCurrentBl ock('link_categ ories_right');
}
//print '<pre>';print_r ($links);print '</pre>';
for ($i=0; $i < count($links); $i++)
{
if ((int)$links[$i]['SortWeight'] < 6)
{
$t->setVariable('L inkStyle', 'featlink');
}
else
{
$t->setVariable('L inkStyle', 'normlnk');
}
$t->setCurrentBloc k('links');
$t->setVariable('U rl', stripslashes($l inks[$i]['Url']));
$t->setVariable('L inkName', stripslashes($l inks[$i]['LinkName']));
$t->setVariable('D escription', stripslashes($l inks[$i]['Description']));
$t->parseCurrentBl ock('links');
}
if (!count($newlin ks))
{
$t->hideBlock('new links');
}
else
{
for ($i=0; $i < count($newlinks ); $i++)
{
$t->setCurrentBloc k('newlinks');
$t->setVariable('U rl', $newlinks[$i]['Url']);
$t->setVariable('L inkName', stripslashes($n ewlinks[$i]['LinkName']));
$t->setVariable('D escription', stripslashes($n ewlinks[$i]['Description']));
$t->parseCurrentBl ock('newlinks') ;
}
}
parseHeader($t, $title);
parseFooter($t) ;
$t->show();
?>
[/CODE]
If someone could please help me it would be GREATLY appreciated.
Thanks!
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/content/m/i/n/minibiketrader/html/index.php on line 2
Parse error: parse error, unexpected T_REQUIRE_ONCE in /home/content/m/i/n/minibiketrader/html/index.php on line 3
Here is the coding,
[Code=php]
<?
require_once 'common.php';
require_once 'config.php'; // Configuration information
require_once 'include/mysql.php';
// Access to all the database functions
// Open the database
$db = new MySQL;
if(!$db->init()) {
echo '<div>Cannot open database</div>';
exit;
}
$cat = (int)$_REQUEST['cat'];
$db->AUTOAPPROVE = false;
$ADMIN_MODE = false;
$msg = '';
$title = 'Links ';
$linkcats = array();
$links = array();
$newlinks = array();
$i = 0;
if ($_REQUEST['KeyWords'])
{
$links = $db->search($_REQUE ST['KeyWords']);
//print '<pre>'; print_r($links) ;
if(!is_array($l inks))
{
$title = "Search Results";
$msg = "No Matches";
// start_page($jun k,$title,$msg);
}
else
{
$total = count($links);
$title = "Search Results";
$msg = "Search returned $total matches";
$lnks = array();
foreach($links as $lnk)
{
if (!in_array($lnk['CatID'], $lnks))
{
$lnks[] = $lnk['CatID'];
$linkcats[$i]['CatId'] = $lnk['CatID'];
$linkcats[$i]['CatName'] = $lnk['CatName'];
$i++;
}
}
//print '<pre>'; print_r($linkca ts);
}
}
else
{
$linkcats = $db->get_Cats($cat) ;
//links
$hotlinks = array();
if ((int)$cat == 0)
{
$hotlinks = $db->get_HotLinks() ;
$newlinks = $db->get_NewLinks() ;
}
$links = array_merge($ho tlinks, $db->get_Links($cat ));
}
$t->setRoot('../templates');
$t->loadTemplatefi le('link.htm');
$t->setCurrentbloc k('__global__') ;
$t->setVariable('p agedesc', 'New and used pocketbikes, pocketbide racing, event calendar, forum and links');
$t->setVariable('p agedkeywords', 'pocket bike minimoto minibike used pocketbikes for sale');
$t->setVariable('m sg', $msg);
$t->setVariable('t rail', breadcrumbs($ca t));
$t->setVariable('C atID', $cat);
// categories
for ($i=0; $i < round(count($li nkcats)/2); $i++)
{
$t->setCurrentBloc k('link_categor ies_left');
$t->setVariable('C atID', $linkcats[$i]['CatID']);
$t->setVariable('C atName', stripslashes($l inkcats[$i]['CatName']));
$t->parseCurrentBl ock('link_categ ories_left');
}
for ($i; $i < round(count($li nkcats)); $i++)
{
$t->setCurrentBloc k('link_categor ies_right');
$t->setVariable('C atID', $linkcats[$i]['CatID']);
$t->setVariable('C atName', stripslashes($l inkcats[$i]['CatName']));
$t->parseCurrentBl ock('link_categ ories_right');
}
//print '<pre>';print_r ($links);print '</pre>';
for ($i=0; $i < count($links); $i++)
{
if ((int)$links[$i]['SortWeight'] < 6)
{
$t->setVariable('L inkStyle', 'featlink');
}
else
{
$t->setVariable('L inkStyle', 'normlnk');
}
$t->setCurrentBloc k('links');
$t->setVariable('U rl', stripslashes($l inks[$i]['Url']));
$t->setVariable('L inkName', stripslashes($l inks[$i]['LinkName']));
$t->setVariable('D escription', stripslashes($l inks[$i]['Description']));
$t->parseCurrentBl ock('links');
}
if (!count($newlin ks))
{
$t->hideBlock('new links');
}
else
{
for ($i=0; $i < count($newlinks ); $i++)
{
$t->setCurrentBloc k('newlinks');
$t->setVariable('U rl', $newlinks[$i]['Url']);
$t->setVariable('L inkName', stripslashes($n ewlinks[$i]['LinkName']));
$t->setVariable('D escription', stripslashes($n ewlinks[$i]['Description']));
$t->parseCurrentBl ock('newlinks') ;
}
}
parseHeader($t, $title);
parseFooter($t) ;
$t->show();
?>
[/CODE]
If someone could please help me it would be GREATLY appreciated.
Thanks!
Comment