Posted on: 07/23/03 09:38pm
By: Sardog
function phpblock_suggest(){
global $_TABLES, $_CONF, $_USER;
$message=\"what would you like to see on the site?\";
$siteurl = $_CONF[\'site_url\'];
if($_USER[\'username\'] != \'\'){
// we only need the email cos we know the username. They have already passed validation and therefore
// this cannot be spoofed. So, only select email from the database.
$result = DB_query(\"SELECT email FROM {$_TABLES[\'users\']} WHERE username = \'{$_USER[\'username\']}\'\");
$U = DB_fetchArray($result);
$username = $_USER[\'username\'];
$useremail = $U[email];
if($useremail == \'\'){
$useremail = \'anonymous@anonymous.com\';
}
}elseif($_USER[\'username\'] == \'\'){
$username = \'Guest\';
$useremail = \'anonymous@anonymous.com\';
}
$display =\"\";
$display .=\"<B>Hello $username, $message<B><BR>\";
$display .=\"\";
$display .=\"<BR>\";
$display .= \"\";
$display .= \"\";
$display .= \"\";
$display .= \"\";
$display .=\"\";
return $display;
}
Now when I bring my site up I have this error at the top:
Warning: fopen(\"/home/sardog/logs/error.log\", \"a\") - Permission denied in /home/sardog/public_html/lib-common.php on line 1555
I never made any changes to the lib_common.php. Also when I try to log out I get a flash of about 4 errors but its not long enough to see what they are. It refreshes back to my GL too quick. I can tell that 2 of the erors are in the lib_common.php and the other 2 are in users.php. How can I correct this?
Posted on: 07/23/03 09:52pm
By: Sardog
<?php
include(\'lib-common.php\');
global $_CONF;
$email=\"anonymous@anonymous.com\";
$adminemail = $_CONF[\'site_mail\'];
// Suggestion Box phpBlock created by Mr.GxBlock of http://www.gxblock.com Please don\'t remove this message.
echo COM_siteHeader();
if($suggest != \'\'){
if(strlen($suggest) < 10){
echo COM_startBlock(\'Error\');
printf(\"Please go back and enter insert at unique message with at least 10 characters.\");
echo COM_endBlock();
echo COM_siteFooter(true);
exit();
}
if($suggest == \'$textareamessage\'){
echo COM_startBlock(\'Error\');
printf(\"Please go back and enter insert at unique message with at least 10 characters.\");
echo COM_endBlock();
echo COM_siteFooter(true);
exit();
}
$suggest = str_replace(array(\">\", \"<\",\""\", \"&\"), array(\">\",\"<\", \"\"\", \"&\"), $suggest);
$suggest = stripslashes($suggest);
$suggest = COM_checkWords($suggest);
mail
(
\"$adminemail\",
\"From Your Suggestion Box - A New Request\",
\"Name : $username from $REMOTE_ADDR
Email : $useremail
Note:
$suggest
\",
\"From: $useremailn\"
);
echo COM_refresh($HTTP_REFERER);
echo COM_startBlock(\'Your suggestion has been proccessed\');
printf(\"Thank you $username, you are now being transferring back to previous page. You may also <A HREF=\"$HTTP_REFERER\">click here</A>.\");
echo COM_endBlock();
echo COM_siteFooter(true);
exit();
}else{
echo COM_startBlock(\'Error\');
printf(\"Please try again.\");
echo COM_endBlock();
echo COM_siteFooter();
exit();
}
?>
Could any of this code be causing my problem?
Posted on: 07/23/03 09:57pm
By: Anonymous (Mark)
Posted on: 07/23/03 10:15pm
By: Sardog
Posted on: 08/02/03 06:41pm
By: Shiva
Posted on: 08/03/03 03:20am
By: Anonymous (Mark)
Posted on: 10/17/04 10:55pm
By: Anonymous (Mark Bradbourne)
Posted on: 10/17/04 11:37pm
By: Anonymous (Mark)
Posted on: 10/17/04 11:47pm
By: Robin