Вход Регистрация
Файл: muzxit.ru/stars/new.php
Строк: 55
<?php

/**
* @package     JohnCMS
* @link        http://johncms.com
* @copyright   Copyright (C) 2008-2011 JohnCMS Community
* @license     LICENSE.txt (see attached file)
* @version     VERSION.txt (see attached file)
* @author      http://johncms.com/about
*/

define('_IN_JOHNCMS', 1);

$headmod = 'stars';
require(
'../incfiles/core.php');
$lng_stars = core::load_lng('stars');
$textl = $_GET['type'] == 1 ? $lng_stars['new_7'] : $lng_stars['new'];
require(
'../incfiles/head.php');
$time_new = $_GET['type'] == 1 ? 604800 : 259200;
$sql = mysql_query("select * from `stars` where `type` = '1' and `date` > '" . (time() - $time_new) . "' order by `date` desc LIMIT $start, $kmess");
$total = mysql_result(mysql_query("select count(`id`) from `stars` where `type` = '1' and `date` > '" . (time() - $time_new) . "'"),0);
if(
$total == 0)
{
    echo 
'<div class="rmenu"><p>' . $lng['search_results_empty'] . '</p></div>';
}
else
{
    echo 
'<div class="phdr">' . $textl . '</div>';
    
$i = 0;
    
$razm = $agent_web == 'web' ? '64' : '32';
    while(
$cat = mysql_fetch_assoc($sql))
    {
        echo 
$i % 2 ? '<div class="list2">' : '<div class="list1">';
            echo 
'<table cellpadding="0" cellspacing="0"><tr><td>';
                if(
file_exists('photo/' . $cat['id'] . '.jpg'))
                    
$img = '<img src="photo/' . $cat['id'] . '.jpg" alt="' . $cat['name'] . '" width="' . $razm . '" height="' . $razm . '" />&#160;</td><td>';
                elseif(
file_exists('photo/' . $cat['id'] . '.jpeg'))
                    
$img = '<img src="photo/' . $cat['id'] . '.jpeg" alt="' . $cat['name'] . '" width="' . $razm . '" height="' . $razm . '" />&#160;</td><td>';
                elseif(
file_exists('photo/' . $cat['id'] . '.bmp'))
                    
$img = '<img src="photo/' . $cat['id'] . '.bmp" alt="' . $cat['name'] . '" width="' . $razm . '" height="' . $razm . '" />&#160;</td><td>';
                elseif(
file_exists('photo/' . $cat['id'] . '.png'))
                    
$img = '<img src="photo/' . $cat['id'] . '.png" alt="' . $cat['name'] . '" width="' . $razm . '" height="' . $razm . '" />&#160;</td><td>';
                elseif(
file_exists('photo/' . $cat['id'] . '.gif'))
                    
$img = '<img src="photo/' . $cat['id'] . '.gif" alt="' . $cat['name'] . '" width="' . $razm . '" height="' . $razm . '" />&#160;</td><td>';
                else
                    
$img = '<img src="../images/star.gif" width="' . $razm . '" height="' . $razm . '" />&#160;</td><td>';
            echo 
$img . '<a href="index.php?id=' . $cat['id'] . '">' . $cat['name'] . '</a>';
            echo 
'</td></tr></table></div>';
              ++
$i;
    }
    echo 
'<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
    if (
$total > $kmess) {
        echo 
'<div class="topmenu">' . functions::display_pagination('new.php?' . ($_GET['type'] == 1 ? 'type=1&amp;' : '') . '&amp;', $start, $total, $kmess) . '</div>' .
            
'<p><form action="new.php?' . ($_GET['type'] == 1 ? 'type=11&amp;' : '') . '" method="post">' .
            
'<input type="text" name="page" size="2"/>' .
            
'<input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/>' .
            
'</form></p>';
    }
}
echo 
'<p><a href="index.php">' . $lng_stars['stars'] . '</a></p>';

require(
'../incfiles/end.php');

?>
Онлайн: 2
Реклама