Вход Регистрация
Файл: wall.php
Строк: 153
<?

include $_SERVER['DOCUMENT_ROOT']."/template/head.php";
if(isset(
$id))
{


    if(
$_GET['id']!="")
    {
$ank=$_GET['id'];}
    else
    {
$ank=$id;}
    if(
$str mysql_fetch_array(mysql_query("select * from `prof` where `id`='$ank'")))
    {
    




?>
<!--<div id="mhead" class="mhead">
    <div class="btn home">
        <a href="/" class="b" accesskey="*">
            <i></i>
        </a>
    </div>
    <div class="btn notify">
        <a id="header_msgs" href="/mail" class="b no_notify" accesskey="#">
            <i></i>
        </a>
    </div>
    <div class="btn back">
        <div class="b">
            <div class="title">
                <h1>Михаил</h1>
            </div>
        </div>
    </div>
</div>
<div id="mcont" class="mcont">
    <div class="pcont prof">-->
        <div class="panel prof_panel">
            <?if($_GET['id']==$id or !isset($_GET['id'])){?>
            <a href="edit_foto.php?id=<?=$str[id]?>">
                <img src="data/photo/<?=$str[id]?>/<?=$str[foto]?>" class="u" align="left" />
            </a>
            <?}
            if(
$_GET['id']!=$id){?>
                <img src="data/photo/<?=$str[id]?>/<?=$str[foto]?>" class="u" align="left" />
            <?}?>
            <div class="cont">
                <h2><?=$str[name]?> <?=$str[fam]?><? online($str[id]); ?></h2>
                <div class="status">
                    <?status($str[id]);?>
                </div>
                <div class="info"><?$voz=date("Y")-$str[g_r]; if($voz!=date("Y")){echo $voz.' год(а)';}?> <?=$str[gorod]?></div>
            </div>
            <div class="cb"></div>
        </div>
        <div class="upanel">
            <div class="prof_info">
                <ul class="page_menu">
                </ul>
            </div>
        <!--<div class="prof_info">
                <a class="h4" href="/photos45204147"><h4><span>Фотографии</span> <em>534</em></h4></a>
                <div class="cont">
                    <div class="top_photos_wrap">
                        <div class="top_photos simple">
                            <a href="/photo45204147_277758543?list=photos45204147&from=profile" class="al_photo">
                                <img src="http://cs10701.userapi.com/u45204147/-6/s_e2074a78.jpg" data-photo="http://cs10701.userapi.com/u45204147/-6/x_4765ceaf.jpg|604|340" />
                            </a>
                            <a href="/photo45204147_272953807?list=photos45204147&from=profile" class="al_photo">
                                <img src="http://cs11285.userapi.com/u45204147/-14/s_e640c6db.jpg" data-photo="http://cs11285.userapi.com/u45204147/-14/x_3eb2913c.jpg|0|0" />
                            </a>
                            <a href="/photo45204147_264067429?list=photos45204147&from=profile" class="al_photo">
                                <img src="http://cs4372.userapi.com/u45204147/-6/s_06403aa2.jpg" data-photo="http://cs4372.userapi.com/u45204147/-6/x_eb27a309.jpg|0|0" />
                            </a>
                            <a href="/photo45204147_263344408?list=photos45204147&from=profile" class="al_photo">
                                <img src="http://cs9931.userapi.com/u45204147/-6/s_f1a1f75e.jpg" data-photo="http://cs9931.userapi.com/u45204147/-6/x_2b72baac.jpg|0|0" />
                            </a>
                            <a href="/photo45204147_263140411?list=photos45204147&from=profile" class="al_photo">
                                <img src="http://cs4155.userapi.com/u52189087/98931553/s_bb3b5dc1.jpg" data-photo="http://cs4155.userapi.com/u52189087/98931553/x_98d9f63e.jpg|0|0" />
                            </a>
                        </div>
                    </div>
                </div>
            </div>-->
            <div class="prof_info">
                <ul class="page_menu">
            
                        <?
                        
if($str[id]==$id)
                        {
                        
?>
                                
                                
                        <li><a class="h4" href="profil.php"><h4><span>Информация</span><span class="rl">ред.</span><div class="cb"></div></h4></a></li>
                            
                        <?
                        
}else{
                        
?>
                        
                        <li><a href="priv.php?id=<?=$str[id]?>"><i class="p edit"></i>Отправить сообщение</a></li>
                        <?
                        $drug 
mysql_query("select * from `drug` where `id_user`='$id' and `drug`='$str[id]'");
                        if(
mysql_num_rows($drug)==0)
                        {
                        
?>
                        <li><a href="user.php?add=<?=$str[id]?>"><i class="p friends"></i>Добавить в друзья</a></li>
                        <?}?>
                        
                        <li><a class="h4"><h4><span>Информация</span><div class="cb"></div></h4></a></li>
                        <?}?>
                </ul>
            </div>
            
            
            
                <div class="cont">
                    <div>
                        <dl class="pinfo">
                            <dt>День рождения:</dt>
                            <dd>
                                <?if($str[d_r]!="" and $str[m_r]!="" and $str[g_r]!=""){?><?=$str[d_r]?> / <?=$str[m_r]?> / <?=$str[g_r]?><?}?>
                            </dd>
                        </dl>
                        <dl class="pinfo">
                            <dt>Семейное положение:</dt>
                            <dd><?=$str[sp]?></dd>
                        </dl>
                        <dl class="pinfo">
                            <dt>Моб. телефон:</dt>
                            <dd><a href='tel:<?=$str[m_tel]?>'><?=$str[m_tel]?></a></dd>
                        </dl>
                        <dl class="pinfo">
                            <dt>Дом. телефон:</dt>
                            <dd><a href='tel:<?=$str[d_tel]?>'><?=$str[d_tel]?></a></dd>
                        </dl>
                    </div>
                    <a class="pinfo al_pinfo wide_link" href="anketa.php?id=<?=$str[id]?>">Полная информация »</a>
                </div>
            </div>
        <!--<div class="prof_info">
                <h4>Другое</h4>
                <ul class="page_menu">
                    <li><a href="/tag45204147">Фотографии со мной <em>7</em></a></li>
                    <li><a href="/friends?id=45204147">Друзья <em>62</em></a></li>
                    <li><a href="/photos45204147">Фотографии <em>534</em></a></li>
                    <li><a href="#" onclick="this.parentNode.parentNode.nextSibling.style.display='block';this.parentNode.style.display='none';return false;">Ещё..</a></li>
                </ul>
                <ul class="page_menu" style="display:none">
                    <li><a href="/audios45204147">Аудиозаписи <em>37</em></a></li>
                    <li><a href="/videos45204147">Видеозаписи <em>12</em></a></li>
                    <li><a href="/gifts45204147">Подарки <em>1</em></a></li>
                    <li><a href="/id45204147?act=fans">Подписчики <em>11</em></a></li>
                </ul>
            </div>-->
            
            
            
            
            <div class="wall_edit">
                <div class="post_add">
                    <form action="?id=<?=$str[id]?>" method="post">
                        <div class="iwrap">
                            <textarea name="text" rows="3" placeholder="Что у Вас нового?"></textarea>
                        </div>
                        <div class="ibwrap">
                            <div class="attached_wrap" id="attached_wrap"></div>
                            <div class="near_box">
                                <input class="btn" type="submit" value="Отправить" />
                                <!--<a class="add_btn add_attach" href="/wall45204147?act=attachments&from=profile" onclick="return post.add_attach(this);">
                                    <i></i>
                                </a>
                                <span id="geo_btn" class="add_btn add_geo" onclick="checkin.add();" style="display:none"><i></i></span>
                                <span id="geo_waiting" class="add_btn add_waiting"><i></i></span>
                                <span class="add_btn add_opts" onclick="toggle('post_options_box'); toggleClass('sel', this);"><i></i></span>-->
                            </div>
                            <!--<div id="post_options_box" style="display:none">
                                <label class="option" onclick="">
                                <input type="checkbox" name="friends_only" value="1" /> только для друзей</label>
                            </div>-->
                        </div>
                    </form>
                </div>
            </div>
            
            
            <?
            
            
            
if ($_POST['text']!="")
            {
                
$r_m=mysql_fetch_array(mysql_query("select * from `wall` where `wall`='$ank' and id_user='$id' ORDER BY `id` DESC  LIMIT 1"));
                if(
$r_m[text]!=$_POST['text'])
                {
                    
$data $den.' '.$mesac.' в '.$time;
                    
mysql_query("insert into `wall`(`wall`,`id_user`,`data`,`text`) values('$ank','$id','$data','".$_POST['text']."');");
                }
            }
            
            
$max_mess_sten=30;
            
$page_wall=$_GET['page_wall'];
            if(empty(
$page_wall)){$page_wall=0;}
            
$mess_sten mysql_query("select * from `wall` where `wall`='$ank' ORDER BY `id` DESC  LIMIT ".$page_wall." ,".$max_mess_sten."");
            if(
mysql_num_rows($mess_sten)==0){echo'<div>Сообщений нет!</div>';}
            while (
$mess_sten_array mysql_fetch_array($mess_sten)) 
            {
                
$sten_log mysql_fetch_array(mysql_query("select * from `prof` where id='$mess_sten_array[id_user]'"));
            
?>
            
            
            <a name="posts"></a>
            <div class="posts bl_cont">
                <div id="wall" class="post">
                    <a class="al" href="wall.php?id=<?=$sten_log[id]?>">
                        <img src="data/photo/<?=$sten_log[id]?>/<?=$sten_log[foto]?>" class="u" align="left" />
                    </a>
                    <div class="cont">
                        <div class="ch">
                            <div>
                                <a class="author al" href="wall.php?id=<?=$sten_log[id]?>"><?=$sten_log[name]?> <?=$sten_log[fam]?></a> 
                            </div>
                        </div>
                        <div class="cc">
                            <div class="text">
                                <?=check($mess_sten_array[text])?>
                            </div>
                            <div class="info">
                                <a class="date al_post" data-header="<?=$sten_log[name]?>"><?=$mess_sten_array[data]?></a>
                                <span class="repost" style="display:none"></span>
                            </div>
                            <!--<div class="links">
                                <span class="like_wrap">
                                    <a href="/like?act=add&object=wall45204147_414&from=id45204147&hash=105052437d210eb21b" onclick="return ajax.click(this, Like);">Мне нравится</a>
                                </span> - <a class="replies_link al_post" href="/wall45204147_414?post_add#comments" data-header="Леха">Комментировать</a>
                            </div>-->
                        </div>
                    </div>
                </div>
                
                <?    
                
}
                
                
$dop="where `wall`='$ank'";
                
mess_str("wall",$max_mess_sten,$page_wall,$dop);
                
    }
    else
    {echo
'<div>Такой страницы нет!</div>';}
                
?>    
                
            </div>
        </div>
        <div id="mfoot" class="mfoot">
            <ul class="main_menu footer_menu">
                <li><a href="/">На главную</a></li>
                <li><a href="/?exit">Выход</a></li>
            </ul>
        </div>
<?
    
}


include 
$_SERVER['DOCUMENT_ROOT']."/template/foot.php";
?>
Онлайн: 2
Реклама