View file ViPTurbo 3.0/help/smileys.php

File size: 948B
<?
include '../include/path.php';

function put_content()
  {
    global $path;

      echo '<div class="header" align="center">Смайлы</div>';
      $ph=(isset($_GET['ph']) && preg_match('/^[0-9]{1,3}$/',$_GET['ph']))?$_GET['ph']:0;

      $onpage=(!isset($user))?10:$user['tpage'];  $i=0;

      $q=sql_query('SELECT * FROM `'.PRE.'smileys` ORDER BY `name`');

      while($row=mysql_fetch_assoc($q))
      {

        if($i>$ph*$onpage)  echo '<img src="../smileys/'.$row['name'].'" alt=""/>   '.$row['smile'].'<br>';

        $i++;

        if($i>($ph+1)*$onpage) break;
      }

      echo '<div class="nav">';
      if($ph>0) { echo '<a href="?ph='.($ph-1).'&amp;'.SID.'">&lt;&lt;</a> '; }
      if($i>($ph+1)*$onpage) { echo '<a href="?ph='.($ph+1).'&amp;'.SID.'">&gt;&gt;</a> '; }
      echo '</div>';

     echo'<div class="nav"><a href="../index.php?'.SID.'">назад</a></div>';


  }
design();
?>