<?php
#-- by 2ziz --#
#-- E-mail: 2ziz@spaces.ru --#
#-- http://friendka.tk --#
define('_IN_JOHNCMS', 1);
$headmod = 'man';
$textl = 'Парни';
require_once('../incfiles/core.php');
require_once('../incfiles/head.php');
echo '<div class="phdr">Парни</div>';
$req = mysql_query("SELECT `id`, `name`, `sex`, `lastdate`, `datereg`, `rights`, `ip`, `browser`, `rights` FROM `users` WHERE `preg` = 1 AND `sex` = 'm' ORDER BY `balans` DESC LIMIT $start, $kmess");
while ($res = mysql_fetch_assoc($req)) {
echo ($i % 2) ? '<div class="list2">' : '<div class="list1">';
echo functions::display_user($res, 1, (($rights > 1) ? 2 : 0)) . '</div>';
++$i;
}
$req = mysql_query("SELECT COUNT(*) FROM `users` WHERE `preg` = 1 AND `sex` = 'm' ");
$total = mysql_result($req, 0);
echo '<div class="phdr">Всего: ' . $total . '</div><p>';
if ($total > $kmess) {
echo '<p>' . functions::display_pagination('man.php?', $start, $total, $kmess) . '</p>';
echo '<p><form action="man.php" method="post"><input type="text" name="page" size="2"/><input type="submit" value="К странице >>"/></form></p>';
}
echo '</p>';
echo '<div class="topmenu"><a href="index.php">Назад</a></div>';
require_once("../incfiles/end.php");
?>
<?php
// by SiCk icq 870303
define('_IN_JOHNCMS', 1);
$headmod = 'man';
$textl = 'Парни';
require_once('../incfiles/core.php');
require_once('../incfiles/head.php');
$req = mysql_query("SELECT `id`, `name`, `sex`, `lastdate`, `datereg`, `rights`, `ip`, `browser`, `rights` FROM `users` WHERE `preg` = 1 AND `sex` = 'm' ORDER BY `balans` DESC LIMIT $start, $kmess");
while ($res = mysql_fetch_assoc($req)) {
echo ($i % 2) ? '<div class="list2">' : '<div class="list1">';
echo show_user($res, 1, (($rights > 1) ? 2 : 0)) . '</div>';
++$i;
}
$req = mysql_query("SELECT COUNT(*) FROM `users` WHERE `preg` = 1 AND `sex` = 'm' ");
$total = mysql_result($req, 0);
echo '<div class="phdr">Всего: ' . $total . '</div><p>';
if ($total > $kmess) {
echo '<p>' . pagenav('man.php?', $start, $total, $kmess) . '</p>';
echo '<p><form action="man.php" method="post"><input type="text" name="page" size="2"/><input type="submit" value="К странице >>"/></form></p>';
}
echo '</p>';
echo '<div class="fmenu"><a href="index.php">Назад</a></div>';
require_once("../incfiles/end.php");
?>
в чем фишка то? Список юзеров и все...
Taltos, Хорошо,хорошо я плагиатор...Взял все стырял...
<?php
#-- by 2ziz --#
#-- E-mail: 2ziz@spaces.ru --#
#-- http://friendka.tk --#
define('_IN_JOHNCMS', 1);
$textl = 'Поиск пользователей';
$headmod = 'usersearch';
require_once('../incfiles/core.php');
require('../incfiles/head.php');
echo '<div class="phdr">Поиск пользователей</div>';
$sex = isset($_REQUEST['sex']) ? abs(intval($_REQUEST['sex'])) : 0;
$from_age = isset($_REQUEST['from']) ? abs(intval($_REQUEST['from'])) : 0;
$to_age = isset($_REQUEST['to']) ? abs(intval($_REQUEST['to'])) : 0;
$live = isset($_POST['live']) ? mb_strtolower(functions::check(mb_substr($_POST['live'], 0, 50)), 'utf-8') : '';
$live = $live ? $live : mb_strtolower(functions::check(mb_substr(rawurldecode($_GET['live']), 0, 50)), 'utf-8');
$photo = intval($_REQUEST['photo']) ? 1 : 0;
$online = intval($_REQUEST['online']) ? 1 : 0;
$new = intval($_REQUEST['new']) ? 1 : 0;
if ($sex) {
$sql = '`sex` = \'' . ($sex == 1 ? 'm' : 'zh') . '\'';
$md = date('m-d', time());
if ($from_age) {
$year_from = date('Y', time()) - $from_age;
$date = $year_from . '-' . $md;
$sql .= ' AND UNIX_TIMESTAMP(CONCAT_WS("-",`yearofbirth`,`monthb`,`dayb`)) <= UNIX_TIMESTAMP(\'' . $date . '\') AND `yearofbirth` != \'0\'';
}
if ($to_age) {
$year_to = date('Y', time()) - $to_age;
$date = $year_to . '-' . $md;
$sql .= ' AND UNIX_TIMESTAMP(CONCAT_WS("-",`yearofbirth`,`monthb`,`dayb`)) >= UNIX_TIMESTAMP(\'' . $date . '\')';
}
if ($live)
$sql .= ' AND LOWER(`live`) LIKE \'%' . functions::trans($live) . '%\' OR LOWER(`live`) LIKE \'%' . functions::rus_lat($live) . '%\'';
if ($photo) {
$sql .= ' AND `id` IN ( ';
$dir = opendir('../files/users/photo');
while ($file = readdir($dir)) {
$name = explode(".", $file);
$names = preg_replace('#^(.*?)_small.(gif|jpg|png)$#isU', '$1', $file);
if ($name[1] == 'jpg' && $name[0] != $names.'_small' && $name[0] != $user_id) {
$name[0] = $name[0].', ';
$sql .= $name[0];
}
}
closedir($dir);
$sql .= '0 )';
}
<?php
/*
////////////////////////////////////////////////////////////////////////////////
// JohnCMS Mobile Content Management System //
// Project site: http://johncms.com //
// Support site: http://gazenwagen.com //
////////////////////////////////////////////////////////////////////////////////
// Lead Developer: Oleg Kasyanov (AlkatraZ) alkatraz@gazenwagen.com //
// Development Team: Eugene Ryabinin (john77) john77@gazenwagen.com //
// Dmitry Liseenko (FlySelf) flyself@johncms.com //
////////////////////////////////////////////////////////////////////////////////
// Search_ex: by Ares^ (ICQ#) //
////////////////////////////////////////////////////////////////////////////////
*/
defined('_IN_JOHNCMS') or die('Error: restricted access');
$textl = 'Расширенный поиск пользователей';
$headmod = 'usersearch';
require('../incfiles/head.php');
echo '<div class="phdr"><a href="index.php"><b>Актив сайта</b></a> | Расширенный поиск пользователей</div>';
/*
-----------------------------------------------------------------
Принимаем данные
-----------------------------------------------------------------
*/
$sex = isset($_REQUEST['sex']) ? abs(intval($_REQUEST['sex'])) : 0;
$from_age = isset($_REQUEST['from']) ? abs(intval($_REQUEST['from'])) : 0;
$to_age = isset($_REQUEST['to']) ? abs(intval($_REQUEST['to'])) : 0;
$live = isset($_POST['live']) ? functions::check(mb_substr($_POST['live'], 0, 50)) : '';
$live = $live ? $live : functions::check(mb_substr(rawurldecode($_GET['live']), 0, 50));
$photo = intval($_REQUEST['photo']) ? 1 : 0;
$online = intval($_REQUEST['online']) ? 1 : 0;
$new = intval($_REQUEST['new']) ? 1 : 0;
/*
-----------------------------------------------------------------
Задаем запрос к БД
-----------------------------------------------------------------
*/
if ($sex) {
$sql = '`sex` = \'' . ($sex == 1 ? 'm' : 'zh') . '\'';
$md = date('m-d', $realtime);
if ($from_age) {
$year_from = date('Y', $realtime) - $from_age;
$date = $year_from . '-' . $md;
$sql .= ' AND UNIX_TIMESTAMP(CONCAT_WS("-",`yearofbirth`,`monthb`,`dayb`)) <= UNIX_TIMESTAMP(\'' . $date . '\') AND `yearofbirth` != \'0\'';
}
if ($to_age) {
$year_to = date('Y', $realtime) - $to_age;
$date = $year_to . '-' . $md;
$sql .= ' AND UNIX_TIMESTAMP(CONCAT_WS("-",`yearofbirth`,`monthb`,`dayb`)) >= UNIX_TIMESTAMP(\'' . $date . '\')';
}
if ($live)
$sql .= ' AND `live` LIKE \'%' . $live . '%\'';
if ($photo) {
$sql .= ' AND `id` IN ( ';
$dir = opendir('../files/users/photo');
while ($file = readdir($dir)) {
$name = explode(".", $file);
$names = preg_replace('#^(.*?)_small.(gif|jpg|png)$#isU', '$1', $file);
if ($name[1] == 'jpg' && $name[0] != $names.'_small' && $name[0] != $user_id) {
$name[0] = $name[0].', ';
$sql .= $name[0];
}
}
closedir($dir);
$sql .= '0 )';
}
2ziz (14.11.2011/18:19)
Taltos, Хорошо,хорошо я плагиатор...Взял все стырял...
Я и не сомневался, но ты начал доказывать....
ДА!Я же не умею выводить юзеров!?#
Тема естессна офф. Афтору - не красиво это.