Вход Регистрация
Файл: 04/04/index.php
Строк: 114
<? 
include("news_config.php"); 

if(
file_exists("install.php")){
   die(
"<br><br><center style='font-size: 12px;
    font-family: Verdana, Arial, Helvetica, sans-serif;'>Вы не удалили файл install.php!</center>"
);
}
?>
<!-- This script powered by www.WebCommersant.ru -->
<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>NewsBlog - скрипт публикации новостей</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<meta name="keywords" content="<? echo $keywords?>">
<meta name="description" content="<? echo $description?>">
<meta http-equiv="Content-Style-Type" content="text/css">
<link href="style.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="js/tbl.js"></script>
</head>
<body bgcolor=#EBEBEB leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
<table width=766 border=0 cellpadding=0 cellspacing=0 align="center">
    <tr>
        <td width=766 height=34 alt="" valign="top">
        <table width=766 border=0 cellpadding=0 cellspacing=0>
    <tr><td><img src="images/top_left.jpg" width=75 height=34 alt=""></td>
        <td background="images/top_px.jpg"><img src="images/spacer.gif" width=607 height=34 alt=""></td>
        <td><img src="images/top_right.jpg" width=84 height=34 alt=""></td>
      </tr>
</table>
      </td>
    </tr>
      <tr>
        <td width="766" height="100%" alt="" valign="top">
        <table width="766" border=0 cellpadding=0 cellspacing=0>
          <tr>
        <td valign="top" background="images/left_px.jpg"><img src="images/left.jpg"></td>
        <td width="621" height="100%" alt="" valign="top" bgcolor="#FFFFFF">
        <table width="621" border=0 cellpadding=0 cellspacing=0>
          <tr>
        <td width=621 height=58 alt="" valign="top">
        <table width="100%" height="0%" border="0" cellspacing="0" cellpadding="0">
        <tr>
    <td width="621" height="169" valign="top" style="background-position:right; background-repeat:repeat-y; padding:15px; line-height:14px">
<table width="100%" border="0" cellspacing="10" cellpadding="0">
  <tr>
    <td><center><img src='images/logo.jpg' /></center>
      <table id="tbl" width="100%" cellspacing="0" cellpadding="2">
          <td valign="top"><br />
              <table width="100%" id="tbl" cellspacing="1" cellpadding="3">
                <tr valign="bottom" bgcolor="#cccccc">
                  <td width="1">№</td>
                  <td width="300">Название</td>
                  <td width="80">Просмотров</td>
                  <td width="40">Добавленно</td>
                  <?  
                  
if($passwd == $sha){
                  echo 
"<td width='40'>Админ</td>";
                  }
                  
?>
                </tr>
                <?
                $query
=mysql_query("select count(id) from news");
                
$count=mysql_fetch_array($query);
                
$pages ceil($count[0] / $f);
                if(
$page=="" or $page=="0"){$lim="0";}
                else{
$lim=($page 1) * $f;}

               
$base=mysql_query("select * from news order by id desc limit $lim$f;");

               
$n=0;
               
$show "<center>";
                    while(
$row=mysql_fetch_array($base)){
                        
$n++;
                 
$show.= "<tr align='left'>";
                 
$show.= "<td class='style1'>$n</td>";
                 
$show.= "<td class='style1'><a href=article_$row[id].html>$row[head]</td>";
                 
$show.= "<td class='style1'>$row[view]</td>";
                 
$show.= "<td class='style1'>$row[date]</td>";
                 if(
$passwd == $sha){
                 
$show.= "<td class='style3'><a href='article.php?action=edit&id=$row[id]'><img src='images/edit.gif' border='0' /></a> <a href='article.php?action=delete&id=$row[id]'><img src='images/delete.gif' border='0' /></a></td>";
                 }
                 
$show.= "</tr>";
                    }
                    
$show.= "</center>";
                    echo 
$show;
                    echo 
"</table><br />";
            echo 
"<span class='style3'>Всего новостей: $count[0]<br>   Страницы: ";
            if(
$count[0]>$f){
              if(!isset(
$page))
                {
                
$page="1";
                }
                for(
$i 1$i <= $pages$i++){
                  if(
$i != $page){
                    
$r2=$f*$i;
                    
$r1=$r2-($f-1);
                    if(
$i==$pages){
                      echo 
' <a href="page_'.$i.'.html" >['.$r1.'-'.$count[0].']</a>';
                      }else
                      echo 
' <a href="page_'.$i.'.html" >['.$r1.'-'.$r2.']</a>';
                    }else{
                    
$r2=$f*$i;
                    
$r1=$r2-($f-1);
                    if(
$i==$pages){
                      echo 
' ['.$r1.'-'.$count[0].']';
                      }else
                      echo 
' ['.$r1.'-'.$r2.']';
                    }
                  }
              }
?></span>
<script language="JavaScript">
<!--
    tigra_tables('tbl', 1, 0, '#ffffff', '#E9E9E9', '#C8D0E6', '#cccccc');
// -->
</script>
          </td>
        </tr>
        <span class="style3">
        <?
        
if($passwd == $sha){
        echo 
"<img src='images/add.gif' width='16' height='16' /> <a href='article.php?action=add'>добавить новость/статью</a>&nbsp; | &nbsp;<img src='images/exit.gif' width='16' height='16' /> <a href='login.php?action=logout'>выйти</a>";
        }
        
?>
        </span>
      </table>
</td>
  </tr>
</table>
</td>  
  </tr>
</table>
        </td>
    </tr>
</table>
    </td>
       <td valign="top" background="images/right_px.jpg"><img src="images/right.jpg">< a href="login.php"></a></td>
    </tr>
</table>
      </td>
    </tr>
       <tr>
        <td width=766 height=51 alt="" valign="top">
        <table width=766 border=0 cellpadding=0 cellspacing=0>
          <tr>
        <td><img src="images/bot_left.jpg" width=73 height=51 alt=""></td>
        <td background="images/bot_px.jpg" width=609 height=51 alt="" valign="top" style="padding-top:13px ">        </td>
        <td><img src="images/bot_right.jpg" width=84 height=51 alt=""></td>
          </tr>
            </table>
       </td>
    </tr>
</table>
<center class="style3"><a href="http://webcommersant.ru">WC</a> &copy; <a href="http://www.aceweb.ru/">AW</a></center>
</body>
</html>
Онлайн: 0
Реклама