Dear people,
A while ago I installed a script. It all worked just fine untill my host upgraded the servers. Since that moment I have an error message when I try to do a search.
This is the error:
Warning: include(usr/local/lib/php/index.php) [function.include]: failed to open stream: No such file or directory in /var/www/g28894/planthunteronline.com/HTML/directory/links.php on line 13
Warning: include() [function.include]: Failed opening 'usr/local/lib/php/index.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/g28894/planthunteronline.com/HTML/directory/links.php on line 13
Below I have added a part the script that may cause the problem (the complete script is to large to post).
Please keep in mind that I am not a php programmer and I don't understand anything about it. I am just looking for a part of code that can solve the problem.
Thanks a lot already!
Ozzy
<?
include("paramlink.inc.php");
if (($action) OR ($cat) OR ($search))
{
$cat = $cat;
$action = $action;
$search = $search;
}
else
{
include ("usr/local/lib/php/index.php");
exit;
}
function showaddlink() {
require( './paramlink.inc.php');
?>
<font class='standard'><? echo $sitename ?> : How to add a links</font>
<font class='text10'>
<ul type="square">
<li>Find the appropriate category in the Directory.
<li>Suggest your site from the category you think most appropriate. Do this by clicking on the "Add Link" link.
<li>We update our database on average every day so you can expect to be added in this time.
<? echo $sitename ?>
Links Manager
</font>
</ul>
</td></tr></table></td></tr></table></center>
<? include "footer.inc.php"; ?>
<?
}
function showvote() {
require( './paramlink.inc.php');
?>
<center><table width='<? echo "$tablewidth"; ?>' border='<? echo "$tableborder"; ?>' cellpadding=10 cellspacing=0 bordercolor='#000000'><tr>
<td class='standard'>
<font class='standard'><? echo $sitename ?> : You Are Rated</font>
<font class='text10'>
<ul type="square">
<li>Sorry, our record shows you've already rated this link recently..
<li>Please contact the site administrator if you have any questions.
<? echo $sitename ?>
Links Manager
</font>
</ul>
</td></tr></table></td></tr></table></center>
<? include "footer.inc.php"; ?>
<?
}
function showrate() {
require( './paramlink.inc.php');
?>
<center><table width='<? echo "$tablewidth"; ?>' border='<? echo "$tableborder"; ?>' cellpadding=10 cellspacing=0 bordercolor='#000000'><tr>
<td class='standard'>
<font class='standard'><? echo $sitename ?> : Error Rating Link</font>
<font class='text10'>
<ul type="square">
<li>Please select a rate
<? echo $sitename ?>
Links Manager
</font>
</ul>
</td></tr></table></td></tr></table></center>
<? include "footer.inc.php"; ?>
<?
}
function showthankyou() {
require( './paramlink.inc.php');
?>
<center><table width='<? echo "$tablewidth"; ?>' border='<? echo "$tableborder"; ?>' cellpadding=10 cellspacing=0 bordercolor='#000000'><tr>
<td class='standard'>
<font class='standard'><? echo $sitename ?> : Thank You</font>
<font class='text10'>
<ul type="square">
<li>Thank You for Rating <? echo $link_id ?>
<li>You have rated <? echo $link_id ?> as <? echo $rating ?>.
<li>Your rating will be included in our database shortly.
</font>
</ul>
</td></tr></table></td></tr></table></center>
<? include "footer.inc.php"; ?>
<?
}
if ($cat)
{
$sitenames = "$sitename - $lcat_name";
include('header.inc.php');
}
?>
<?
//Number of records to show per page
$limit = $nolinks;
//Set the default offset = 0
$offset = ($offset) ? $offset : 0;
//Encoded query string that needs to be passed to each page
$query = "&cat=".urlencode($cat);
$mysql_mylink = mysql_connect($mysql_host, $mysql_user, $mysql_pass)
or die ("Cannot make the connection");
mysql_select_db($mysql_db, $mysql_mylink)
or die ("Cannot connect to the database");
$rime1 = mysql_query("SELECT COUNT(*) from links WHERE link_val LIKE 'yes' AND cat_id LIKE '$cat'") or die(mysql_error());
$totalnum = mysql_result($rime1, 0, 0);
$rime2 = mysql_query("SELECT * from category WHERE lcat_id='$cat'")
or die(mysql_error());
while($row = mysql_fetch_array($rime2)) {
extract($row);
$id = $row["lcat_id"];
$name = $row["lcat_name"];
$sub_cat = $row["sub_cat"];
$navigator = $name . "" ;