Вход Регистрация
Файл: Source/pages/readpm.php
Строк: 135
<?php
/*
 * Script name: Points4Prize
 * Author: Soft Projects
 * Date created: 15/07/2015
 */

require_once 'inc/header.php';
?>
<body class="no-slider">
    <!-- <body class="has-top-menu"> -->
    <!-- BEGIN #slider-imgs -->
    <div id="slider-imgs">
        <div class="featured-img-box">
            <div id="featured-img-1" class="featured-img"></div>
            <div id="featured-img-2" class="featured-img invisible"></div>
            <div id="featured-img-3" class="featured-img invisible"></div>
            <div id="featured-img-4" class="featured-img invisible"></div>
        </div>
        <!-- END #slider-imgs -->
    </div>

    <!-- BEGIN #top-layer -->
    <div id="top-layer">
        <div id="header-top">
            <?php
            
require_once 'inc/header_top.php';
            
?>
        </div>
        <section id="content">
            <header id="header">
                <div id="menu-bottom">

                    <?php
                    
require_once 'inc/menu_bottom.php';
                    
?>

                </div>

                <div class="wrapper">
                    <div class="header-breadcrumbs">
 <?php
 
require_once 'inc/stats.php';
 
?>
                        <ul>
                            <li><a href="index.php">Home</a></li>
                            <li><a href="/pm">Messages</a></li>
                            <li>View </li>
                        </ul>
                    </div>
                </div>

            </header>
            <div id="main-box" class="full-width">
            
                    <?php
            $id     
$_GET['id'];     $id sprintf("%s",mysql_real_escape_string($id));
            if(isset(
$_POST['back'])) {
                
header('Location: /pm'); exit(); 
            }

            if(!isset(
$_SESSION['logged_in'])) { 
                
$_SESSION['location'] = "/readpm-$id"header('Location: /login'); exit(); 
            } else {
                if(isset(
$_SESSION['user'], $_SESSION['pass'])) {
                    
$user     str_replace(" """$_SESSION['user']);     $user     sprintf("%s",mysql_real_escape_string($user));
                } else {
                    
$user     str_replace(" """$_COOKIE['user']);     $user     sprintf("%s",mysql_real_escape_string($user));
                }
                
$result mysql_query("SELECT * FROM vn_messages WHERE id='{$id}'") or die (mysql_error());
                
$row     mysql_fetch_assoc($result);            
                if(
strtolower($row['forw']) != strtolower($user)) {
                    
header('Location: /pm'); exit();
                }
                if(
$row['readed'] == 0) {
                    
mysql_query("UPDATE vn_messages SET readed='1' WHERE id='{$id}' and forw='{$user}'") or die (mysql_error());
                }
                
$title htmlspecialchars($row['title']);
                
$rtitle 'Re: '.$title;
                
$message htmlspecialchars($row['message']);
                
$message str_replace("[br]""<br />"$message);
                
$message str_replace("[b]""<b>"$message);
                
$message str_replace("[/b]""</b>"$message);
                
$message str_replace("[quote]""<i>"$message);
                
$message nl2br(str_replace("[/quote]""</i>"$message));
                
$rmessage "[quote]".$message."[/quote]";
                
$date date("d.m.Y H:i"$row[time]);            
                
$result2 mysql_query("SELECT * FROM vn_users WHERE user='".$row['fromw']."'") or die (mysql_error());
                
$row2     mysql_fetch_array($result2);
                if(empty(
$row2['avatar'])) { 
                    
$avatar "/uploads/avatars/noavatar.png";
                } else {
                    
$avatar $row2['avatar'];
                }
                
            }
                
$time time();
                    if (
$row2['lastact'] < $time 600 or $row2['loged'] == 0) {
                        
$maistatus 'offline';
                    } else {
                        
$maistatus 'online'
                    }
        
?>    
        


                <div id="main"> 
                    <div class="signup-panel">
                        <div>
                        <h2><span><?php echo $title;?></span></h2>
                        
                        <div class="conversation-container">
                            <div class="inline-conv-tools content-padding">
                                <span class="right">
                                    <a href="/pm" class="defbutton"><i class="fa fa-arrow-left"></i> Return</a>
                                    <a href="/deletepm-<?php echo $row['id'];?>" class="defbutton"><i class="fa fa-trash-o"></i> Delete message</a>
                                </span>
                            </div>
                            <div class="inline-conversation" style="height:auto;">

                                <!-- BEGIN .inline-table-fix -->
                                <div class="inline-table-fix">
                                    <div class="unread-messageline" style="width:860px;"><span><i class="fa fa-caret-down"></i>&nbsp;&nbsp;
                                    <?php echo $date?>
                                    &nbsp;&nbsp;<i class="fa fa-caret-down"></i></span></div>
                                    
                                    
                                    
                                    <div class="conversation-single has-avatar">
                                        <div class="conversation-user">
                                            <a href="/u:<?php echo $row2['user'];?>" class="avatar <?php echo $maistatus;?>">
                                                <span class="wrapimg" style="display:inline-block;position:relative;
                                                border-radius:inherit;-moz-border-radius:inherit;overflow:hidden;">
                                                <img src="<?php echo $avatar;?>" class="setborder" title="" alt=""></span>
                                            </a>
                                        </div>
                                        <div class="conversation-text">
                                            <span class="date-time strike-tooltip" title="20.Mar 2014">12:30</span>
                                            <strong class="user-name"><a href="#"><?php echo $row2['user'];?></a></strong>
                                            <p style="word-wrap:break-word; width:700px">
                                                <?php echo $message?>
                                            </p>
                                        </div>
                                    <!-- END .conversation-single -->
                                    </div>
                            
                                </div>

                                <!-- END .inline-table-fix -->
                                </div>


                            <div class="conv-submit">
                             <center>
                                <form action="/sendpm" method="POST">
                                <input type='hidden' name='rforw' value='<?php echo $row2['user']; ?>' />
                                <input type='hidden' name='rtitle' value='<?php echo $rtitle?>' />
                                
                                        <input type='hidden' name="rmessage" style="height:100px;"  class="auto-height"
                                        placeholder="Message.." value="<?php echo $rmessage?>" />
                                        <div class="conv-bottom">
                                            <input value="Send response" class="send-conv-button"  type="submit">
                                        </div>
                            
                                </form> 
                                     </center>
                            </div>
                        <!-- END .conversation-container -->
                        </div>
                        
                        <div class="clear-float"></div>
                    </div>
                    <div class="clear-float"></div>
                    
                </div>
                <div class="clear-float"></div>
            </div>
    </div>
</div>

<?php
require_once 'inc/footer.php';
?>
Онлайн: 4
Реклама