Тема: Скоро 14 февраля.
ramzes [Off] [#] (12.02.2012 / 21:35) Крайне позитивный раздолбай |
давай канешнаты сам напросилсо
<?php /** * Created by: ramzes * Date: 01.02.12 * Time: 16:52 * Only from Android Club Project * All right recerved. */ $headTitle = $title = 'Стена'; include('tmp/head.php'); if(AUT){ echo'<form name="form" action="/wall/add/back/" method="post"> <textarea rows="2" cols="20" name="message" onKeyUp="ResizeTextarea(event, this)" placeholder=""></textarea> <input type="submit" value="Отправить" /> <img src="/image/smiles/Happy.png" alt="" class="smiles" onclick="getSmiles();" /> </form> '; } if($total > 0){ $page = CurrentPage($this->query[0]); $list = $sql->query("SELECT wall.*, users.login, users.name FROM wall LEFT JOIN users ON wall.author = users.id WHERE wall.type!='4' ORDER BY wall.update_time DESC LIMIT ".$page.", ".STEP_PAGE.";"); while( $wall = $list->fetch_assoc() ){ $listwall[$wall['id']] = $wall; $in[] = (int)$wall['id']; } if($in!=''){ $parent = $sql->query("SELECT wall.*, users.login, users.name FROM wall LEFT JOIN users ON wall.author = users.id WHERE wall.type = '4' AND wall.parent IN(".$in.") ORDER BY wall.update_time;"); echo $sql->error; while($subparent = $parent->fetch_assoc() ) { $listwall[$subparent['parent']]['sub_comment'][] = $subparent; } } echo'<div class="list"><div class="text">'; foreach($listwall as $wall){ $avatar = '<img class="user" src="/image/avatar/'.$wall['author'].'.png" alt="" /></a>'; }else{ $avatar = '<img class="user" src="/image/avatar/0.png" alt="" /></a>'; } echo'<div id="wall_'.$wall['id'].'" style="border-bottom: 1px solid #666;"> <div style="height:36px;padding-top:3px;"> <a href="/user/'.$wall['login'].'/">'.$avatar.'<div style="margin-left: 48px;"><a href="/user/'.$wall['login'].'/"><b>'.$wall['name'].'</b></a>'; if(AUT AND (UID==$wall['author'] OR LEVEL==4 OR LEVEL==3)){ echo'<span class="r date" onclick="dropPost('.$wall['id'].', \'wall\');">'.datePost($wall['add_time']).'</span>'; }else{ echo'<span class="r date">'.datePost($wall['add_time']).'</span>'; } echo' </div> <div style="font-weight:bold; margin-left:42px;">'.wall_type($wall['type']).'</div>'; echo'</div>'; if($wall['link']!=''){ echo'<div><a href="'.$wall['link'].'">'.$wall['link_name'].'</a></div>'; } echo'<div style="border-bottom:1px solid #ccc; margin: 1px -6px; padding: 3px;">'.bb($wall['message']).'</div>'; echo'<div class="open_wall_comments">Комментарии</div> <div style="display:none; padding-left:32px; padding-right:3px; border: 1px solid #ccc;">'; foreach($wall['sub_comment'] as $parent){ $avatar = '<img class="user" style="margin-left:32px" src="/image/avatar/'.$parent['author'].'.png" alt="" /></a>'; }else{ $avatar = '<img class="user" style="margin-left:32px" src="/image/avatar/0.png" alt="" /></a>'; } echo'<div style="height:36px;padding-top:3px;border-top:1px solid #ccc;"> <a href="/user/'.$parent['login'].'/">'.$avatar.'<div style="margin-left: 48px;"> <a href="/user/'.$parent['login'].'/"><b>'.$parent['name'].'</b></a>'; if(AUT AND (UID==$parent['author'] OR LEVEL==4 OR LEVEL==3)){ echo'<span class="r date" onclick="dropPost('.$parent['id'].', \'wall\');">'.datePost($parent['add_time']).'</span>'; }else{ echo'<span class="r date">'.datePost($parent['add_time']).'</span>'; } echo'</div><div style=" margin:1px -6px; padding:3px; margin-left: 48px;">'.bb($wall['message']).'</div>'; echo'</div>'; } echo'</div> <div style="text-align:right;padding:3px;"><a href="/wall/post/'.$wall['id'].'/">Ответить (<b>'.$wall['total'].'</b>)</a></div>'; } echo'</div>'; } echo'</div></div> <div class="infobox">На стене '.$total.' '.num2words($total, 'запись', 'записи', 'записей').'</div>'; echo navi('/wall/', $total, $page); }else{ echo'<div class="infobox">На стене еще нет ни одной записи!</div>'; } include('tmp/foot.php');