Warning: include(): open_basedir restriction in effect. File(includes/header.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/OA7fB on line 7
Warning: include(includes/header.php): Failed to open stream: Operation not permitted in /in/OA7fB on line 7
Warning: include(): Failed opening 'includes/header.php' for inclusion (include_path='.:') in /in/OA7fB on line 7
<h2>My Unread Messages:</h2><p />
<?
//-------------- SPACE -- Grab the messages for the logged in user
$grab_messages = $dbh->prepare("SELECT * FROM pvt_messages WHERE user_to=:user && opened='no' && deleted='no'");
$grab_messages->bindValue(':user', $user, PDO::PARAM_STR);
$grab_messages->execute();
$numrows = $grab_messages->fetch(PDO::FETCH_ASSOC);
//-------------- SPACE
if ($numrows != 0) {
while ($get_msg = $grab_messages->fetch(PDO::FETCH_ASSOC)){
echo "--".$id = $get_msg['id'];
$user_from = $get_msg['user_from'];
$user_to = $get_msg['user_to'];
$msg_title = $get_msg['msg_title'];
$msg_body = $get_msg['msg_body'];
$date = $get_msg['date'];
$opened = $get_msg['opened'];
$deleted = $get_msg['deleted'];
?>
<script language="javascript">
function toggle<? echo $id; ?>() {
var ele = document.getElementById("toggleText<? echo $id; ?>");
var text = document.getElementById("displayText<? echo $id; ?>");
if (ele.style.display == "block") {
ele.style.display = "none";
}
else
{
ele.style.display = "block";
}
}
</script>
<?
if (strlen($msg_title) > 50) {
$msg_title = substr($msg_title, 0, 50)." ...";
}
else
$msg_title = $msg_title;
if (strlen($msg_body) > 150) {
$msg_body = substr($msg_body, 0, 150)." ...";
}
else
$msg_body = $msg_body;
if (@$_POST['setopened_' . $id . '']) {
//-------------- SPACE -- Update the private messages table
$setopened_query = $dbh->prepare("UPDATE pvt_messages SET opened='yes' WHERE id=:id");
$setopened_query->bindValue(':id', $id, PDO::PARAM_STR);
$setopened_query->execute();
}
echo "
<form method='POST' action='my_messages.php' name='$msg_title'>
<b><a href='$user_from'>$user_from</a></b>
<input type='button' name='openmsg' value='$msg_title' onClick='javascript:toggle$id()'>
<input type='submit' name='setopened_$id' value=\"I've Read This\">
</form>
<div id='toggleText$id' style='display: none;'>
<br />$msg_body
</div>
<hr /><br />
";
}
}
else
{
echo "You haven't read any messages yet.";
}
?>
Output for 8.0.13
Warning: include(includes/header.php): Failed to open stream: No such file or directory in /in/OA7fB on line 7
Warning: include(): Failed opening 'includes/header.php' for inclusion (include_path='.:') in /in/OA7fB on line 7
<h2>My Unread Messages:</h2><p />
Warning: Undefined variable $dbh in /in/OA7fB on line 17
Fatal error: Uncaught Error: Call to a member function prepare() on null in /in/OA7fB:17
Stack trace:
#0 {main}
thrown in /in/OA7fB on line 17
Process exited with code 255.
Output for 7.0.5 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0, 7.4.33
Warning: include(includes/header.php): failed to open stream: No such file or directory in /in/OA7fB on line 7
Warning: include(): Failed opening 'includes/header.php' for inclusion (include_path='.:') in /in/OA7fB on line 7
<h2>My Unread Messages:</h2><p />
Notice: Undefined variable: dbh in /in/OA7fB on line 17
Fatal error: Uncaught Error: Call to a member function prepare() on null in /in/OA7fB:17
Stack trace:
#0 {main}
thrown in /in/OA7fB on line 17
Process exited with code 255.
Warning: include(): open_basedir restriction in effect. File(includes/header.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/OA7fB on line 7
Warning: include(includes/header.php): failed to open stream: Operation not permitted in /in/OA7fB on line 7
Warning: include(): Failed opening 'includes/header.php' for inclusion (include_path='.:') in /in/OA7fB on line 7
<h2>My Unread Messages:</h2><p />
<?
//-------------- SPACE -- Grab the messages for the logged in user
$grab_messages = $dbh->prepare("SELECT * FROM pvt_messages WHERE user_to=:user && opened='no' && deleted='no'");
$grab_messages->bindValue(':user', $user, PDO::PARAM_STR);
$grab_messages->execute();
$numrows = $grab_messages->fetch(PDO::FETCH_ASSOC);
//-------------- SPACE
if ($numrows != 0) {
while ($get_msg = $grab_messages->fetch(PDO::FETCH_ASSOC)){
echo "--".$id = $get_msg['id'];
$user_from = $get_msg['user_from'];
$user_to = $get_msg['user_to'];
$msg_title = $get_msg['msg_title'];
$msg_body = $get_msg['msg_body'];
$date = $get_msg['date'];
$opened = $get_msg['opened'];
$deleted = $get_msg['deleted'];
?>
<script language="javascript">
function toggle<? echo $id; ?>() {
var ele = document.getElementById("toggleText<? echo $id; ?>");
var text = document.getElementById("displayText<? echo $id; ?>");
if (ele.style.display == "block") {
ele.style.display = "none";
}
else
{
ele.style.display = "block";
}
}
</script>
<?
if (strlen($msg_title) > 50) {
$msg_title = substr($msg_title, 0, 50)." ...";
}
else
$msg_title = $msg_title;
if (strlen($msg_body) > 150) {
$msg_body = substr($msg_body, 0, 150)." ...";
}
else
$msg_body = $msg_body;
if (@$_POST['setopened_' . $id . '']) {
//-------------- SPACE -- Update the private messages table
$setopened_query = $dbh->prepare("UPDATE pvt_messages SET opened='yes' WHERE id=:id");
$setopened_query->bindValue(':id', $id, PDO::PARAM_STR);
$setopened_query->execute();
}
echo "
<form method='POST' action='my_messages.php' name='$msg_title'>
<b><a href='$user_from'>$user_from</a></b>
<input type='button' name='openmsg' value='$msg_title' onClick='javascript:toggle$id()'>
<input type='submit' name='setopened_$id' value=\"I've Read This\">
</form>
<div id='toggleText$id' style='display: none;'>
<br />$msg_body
</div>
<hr /><br />
";
}
}
else
{
echo "You haven't read any messages yet.";
}
?>
Output for 7.3.32 - 7.3.33, 7.4.26
Warning: include(includes/header.php): failed to open stream: No such file or directory in /in/OA7fB on line 7
Warning: include(): Failed opening 'includes/header.php' for inclusion (include_path='.:') in /in/OA7fB on line 7
<h2>My Unread Messages:</h2><p />
Fatal error: Uncaught Error: Call to a member function prepare() on null in /in/OA7fB:17
Stack trace:
#0 {main}
thrown in /in/OA7fB on line 17
Process exited with code 255.
Output for 7.1.20, 7.2.6
Warning: include(): open_basedir restriction in effect. File(includes/header.php) is not within the allowed path(s): (/tmp:/in) in /in/OA7fB on line 7
Warning: include(includes/header.php): failed to open stream: Operation not permitted in /in/OA7fB on line 7
Warning: include(): Failed opening 'includes/header.php' for inclusion (include_path='.:') in /in/OA7fB on line 7
<h2>My Unread Messages:</h2><p />
Notice: Undefined variable: dbh in /in/OA7fB on line 17
Fatal error: Uncaught Error: Call to a member function prepare() on null in /in/OA7fB:17
Stack trace:
#0 {main}
thrown in /in/OA7fB on line 17
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Warning: include(includes/header.php): failed to open stream: No such file or directory in /in/OA7fB on line 7
Warning: include(): Failed opening 'includes/header.php' for inclusion (include_path='.:') in /in/OA7fB on line 7
<h2>My Unread Messages:</h2><p />
Notice: Undefined variable: dbh in /in/OA7fB on line 17
Fatal error: Uncaught Error: Call to a member function prepare() on unknown in /in/OA7fB:17
Stack trace:
#0 {main}
thrown in /in/OA7fB on line 17
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Warning: include(includes/header.php): failed to open stream: No such file or directory in /in/OA7fB on line 7
Warning: include(): Failed opening 'includes/header.php' for inclusion (include_path='.:') in /in/OA7fB on line 7
<h2>My Unread Messages:</h2><p />
Notice: Undefined variable: dbh in /in/OA7fB on line 17
Fatal error: Call to a member function prepare() on null in /in/OA7fB on line 17
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38
Warning: include(includes/header.php): failed to open stream: No such file or directory in /in/OA7fB on line 7
Warning: include(): Failed opening 'includes/header.php' for inclusion (include_path='.:') in /in/OA7fB on line 7
<h2>My Unread Messages:</h2><p />
Notice: Undefined variable: dbh in /in/OA7fB on line 17
Fatal error: Call to a member function prepare() on a non-object in /in/OA7fB on line 17
Process exited with code 255.