classified
02-15-2007, 08:48 PM
I have been trying to remove a script from my site that disables users from right clicking and copying my website. Its just a pain in the rear for folks using my site. However, every time I try and delete or modify the script I get an error message like this one.
warning:[function.main] failed to open stream. no such file or in
directory/home.php on line 43
...and I get the error anywhere I have this line of include code on the page
<? include('anyfile.php'); ?>
Why would removing a javascript cause the rest of my site to loose its functionality?
I have included the javascript below(red) as it is written at the end my home.php code.
Any suggestions to how I can remove or modify it would be very appreciated.
<? include('featured.php'); //fetch 5 featured properties ?>
</td>
</table></td>
<td height="15"><img src="images/pixel.gif" width="1" height="1" alt=""></
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<td class="pageTitle">Featured Article</td>
###FETCH FEATURED NEWS FROM SETTINGS
$settingsSql = 'select * from settings where id = 1';
$settingsR = mysql_query($settingsSql,$myconn) or die(mysql_error());
$settings = mysql_fetch_assoc($settingsR);
$featuredSql = 'select * from news where id = '.$settings['defaultNewsID'];
$featuredR = mysql_query($featuredSql,$myconn) or die(mysql_error());
$featured = mysql_fetch_assoc($featuredR);?>
<div class="pageSubTitle"><? echo $featured['title']; ?></div>
<div class="pageText"><? echo substr($featured['description'],1,300);,<br>
<a href="fullnews.php?id=<? echo $featured['id']; ?>" class="pageLink">Full Story
</tr>
</table>
<SCRIPT LANGUAGE="JavaScript1.1">
<!-- Begin
function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("Sorry Pal, Permission Disallowed !");
return false;
}
return true;
}
document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;
// End -->
</script>
warning:[function.main] failed to open stream. no such file or in
directory/home.php on line 43
...and I get the error anywhere I have this line of include code on the page
<? include('anyfile.php'); ?>
Why would removing a javascript cause the rest of my site to loose its functionality?
I have included the javascript below(red) as it is written at the end my home.php code.
Any suggestions to how I can remove or modify it would be very appreciated.
<? include('featured.php'); //fetch 5 featured properties ?>
</td>
</table></td>
<td height="15"><img src="images/pixel.gif" width="1" height="1" alt=""></
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<td class="pageTitle">Featured Article</td>
###FETCH FEATURED NEWS FROM SETTINGS
$settingsSql = 'select * from settings where id = 1';
$settingsR = mysql_query($settingsSql,$myconn) or die(mysql_error());
$settings = mysql_fetch_assoc($settingsR);
$featuredSql = 'select * from news where id = '.$settings['defaultNewsID'];
$featuredR = mysql_query($featuredSql,$myconn) or die(mysql_error());
$featured = mysql_fetch_assoc($featuredR);?>
<div class="pageSubTitle"><? echo $featured['title']; ?></div>
<div class="pageText"><? echo substr($featured['description'],1,300);,<br>
<a href="fullnews.php?id=<? echo $featured['id']; ?>" class="pageLink">Full Story
</tr>
</table>
<SCRIPT LANGUAGE="JavaScript1.1">
<!-- Begin
function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("Sorry Pal, Permission Disallowed !");
return false;
}
return true;
}
document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;
// End -->
</script>