PageRenderTime 53ms CodeModel.GetById 30ms RepoModel.GetById 0ms app.codeStats 1ms

/my.friends.php

https://bitbucket.org/DESURE/dcms
PHP | 30 lines | 23 code | 7 blank | 0 comment | 1 complexity | 3ea4d71e4fae023bc69a0db3f4dbeeca MD5 | raw file
  1. <?php
  2. include_once 'sys/inc/start.php';
  3. $doc = new document(1);
  4. $doc->title = __('??? ??????');
  5. $user->friend_new_count = mysql_result(mysql_query("SELECT COUNT(*) FROM `friends` WHERE `id_user` = '$user->id' AND `confirm` = '0'"), 0);
  6. $pages = new pages;
  7. $pages->posts = mysql_result(mysql_query("SELECT COUNT(*) FROM `friends` WHERE `id_user` = '$user->id'"), 0);
  8. $pages->this_page();
  9. $q = mysql_query("SELECT * FROM `friends` WHERE `id_user` = '$user->id' ORDER BY `confirm` ASC, `time` DESC LIMIT $pages->limit");
  10. $listing = new listing();
  11. while ($friend = mysql_fetch_assoc($q)) {
  12. $post = $listing -> post();
  13. $ank = new user($friend['id_friend']);
  14. $post -> url = '/profile.view.php?id=' . $ank->id;
  15. $post -> title = $ank->nick();
  16. $post -> icon ($ank->icon());
  17. $post -> hightlight = !$friend['confirm'];
  18. $post->content = $friend['confirm'] ? null : __('????? ???? ????? ??????');
  19. }
  20. $listing -> display(__('?????? ???'));
  21. $pages->display('?');
  22. $doc->ret(__('?????? ????'), '/menu.user.php');
  23. ?>