mudzakkir

see_all_visitors.php

Feb 9th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.14 KB | None | 0 0
  1. <?php
  2. require_once("init.php");
  3. require_once("config_db.php");
  4. require_once("config.php");
  5. if ($fetch_u['user_status'] != 1) {
  6. header("Location: login.php");
  7. }
  8. // Config. for pagination //
  9. $page = $_GET['page']; // get variable for page
  10. $perpage = '15'; // Show per page
  11. $tabl = "users";
  12. $item = 'Visitors'; // table name for query
  13. $namep = "see_all_visitors.php"; // Page name
  14. //Get stcom value
  15. $stcom = stcom($page, $perpage);
  16. $sql_visit = "select * from $tabl where user_status='1' AND status='1' ";
  17.  
  18. $sql_visit = "select visiter_id, timestamp
  19. from who_visit_myprofile
  20. where user_id='" . $_SESSION['user'] . "' AND visiter_id!='" . $_SESSION['user'] . "' GROUP BY who_visit_myprofile.visiter_id";
  21.  
  22. $sqlq = $sql_visit;
  23. $sql2 = $sql_visit . " order by timestamp DESC LIMIT $stcom , $perpage"; //echo $sql2;
  24. // pagination file include
  25. include "include/pagination.php";
  26. $exec_visit = mysql_query($sql2);
  27. $num = mysql_num_rows($exec_visit);
  28. ?>
  29. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  30. <html xmlns="http://www.w3.org/1999/xhtml">
  31. <head>
  32. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  33. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >
  34. </meta>
  35. <title><?php echo $site_name; ?></title>
  36. <link href="css/style.css" rel="stylesheet" type="text/css" />
  37. <style type="text/css">
  38. .highlightit img {
  39. filter:progid:DXImageTransform.Microsoft.Alpha(opacity=70);
  40. -moz-opacity: 0.5;
  41. opacity: 0.5;
  42. }
  43. .highlightit:hover img {
  44. filter:progid:DXImageTransform.Microsoft.Alpha(opacity=100);
  45. -moz-opacity: 1;
  46. opacity: 1;
  47. }
  48. </style>
  49. <style type="text/css">
  50. div.pagination {
  51. padding: 3px;
  52. margin: 3px;
  53. }
  54. div.pagination a {
  55. padding: 2px 5px 2px 5px;
  56. margin: 2px;
  57. border: 1px solid #AAAADD;
  58. text-decoration: none; /* no underline */
  59. color: #000099;
  60. }
  61. div.pagination a:hover, div.pagination a:active {
  62. border: 1px solid #000099;
  63. color: #000;
  64. }
  65. div.pagination span.current {
  66. padding: 2px 5px 2px 5px;
  67. margin: 2px;
  68. border: 1px solid #000099;
  69. font-weight: bold;
  70. background-color: #000099;
  71. color: #FFF;
  72. }
  73. div.pagination span.disabled {
  74. padding: 2px 5px 2px 5px;
  75. margin: 2px;
  76. border: 1px solid #EEE;
  77. color: #DDD;
  78. }
  79. </style>
  80. </head>
  81.  
  82. <body>
  83. <div id="fb-root"></div>
  84. <div id="wrapper">
  85. <?php include "include/header.php"; ?>
  86. <div class="clear"></div>
  87. <div class="spaceThirty">&nbsp;</div>
  88. <div class="clear"></div>
  89. <div id="content" class="red">
  90. <?php include "include/home_menu.php"; ?>
  91. <div class="clear"></div>
  92. <div id="leftareainner" style="padding-left:30px;">
  93. <div id="form_leftArea">
  94. <p class="headingRed" style="color:#998; float:left; padding-left:25px;">All Visitors(<?php echo $num; ?>)</p>
  95. <div class="form_area">
  96. <?php
  97. while ($fetch_visit = mysql_fetch_assoc($exec_visit)) { //if($fetch_visit['uniq'] != $user_uniq){
  98. $sql = "select * from users where uniq='" . $fetch_visit['visiter_id'] . "' AND status='1'";
  99. $exec = mysql_query($sql);
  100. $fetch = mysql_fetch_assoc($exec);
  101. ?>
  102. <div class="detailcatblock">
  103. <div class="likebox">
  104. <div class="likeboxcontent"> <a href="profile_details_log.php?id=<?php echo $fetch['uniq']; ?>"><img src="<?php
  105. if ($fetch['thumb'] != '') {
  106. echo 'thumb/' . $fetch['thumb'];
  107. } else {
  108. echo 'images/no_image.jpg';
  109. }
  110. ?>" height="50" width="60" /></a></div>
  111. <div class="float-left" style="margin-left:20px; width:250px;">
  112. <a href="profile_details_log.php?<?php echo $fetch['uniq']; ?>"><span class="form_heading"> <?php echo $fetch['first_name']; ?></span></a> <br/>
  113. <span class="form_heading">
  114. <?php
  115. //if ($fetch['age'] != '' || $fetch['age'] != 0) {
  116. if (($fetch['birth_month'] != "" && $fetch['birth_month'] != "0" ) && ($fetch['birth_day'] != "" && $fetch['birth_day'] != "0" ) && ($fetch['birth_year'] != '' && $fetch['birth_year'] != "0")) {
  117. //echo $fetch['age'] . " &nbsp;years old";
  118. echo age_counter($fetch['birth_month'], $fetch['birth_day'], $fetch['birth_year']) . " &nbsp;years old";
  119. } else {
  120. echo age_counter($fetch['birth_month'], $fetch['birth_day'], $fetch['birth_year']) . " &nbsp;years old";
  121. }
  122. ?>
  123. </span> <br/>
  124. <span class="form_heading"><?php echo $fetch['city']; ?> </span><br />
  125. <!-- <span class="form_heading" style="font-size:12px"><?php echo date("j M Y, h:i:s A", $fetch_visit['timestamp']); ?></span>-->
  126. </div>
  127. </div>
  128. </div>
  129. <div class="clear"></div>
  130. <?php } //} ?>
  131. <div style="float:left; margin-left:20px;">
  132. <?php require("include/pagination_show.php"); ?>
  133. </div>
  134. <br />
  135. </div>
  136. <div class="clear"></div>
  137. <div class="clear"></div>
  138. <div class="float-left" style="width:100%; margin-bottom:20px;"> </div>
  139. <div class="clear"></div>
  140. </div>
  141. </div>
  142. </div>
  143. <?php include "include/footer.php"; ?>
  144. </div>
  145. </body>
  146. </html>
Advertisement
Add Comment
Please, Sign In to add comment