Вход Регистрация
Файл: audio/all.php
Строк: 52
<?php

require_once '../incfiles/core.php';
require_once 
'../incfiles/func.php';
require_once 
'../incfiles/auth.php';
require_once 
'../incfiles/user.php';
if (empty(
$user_id)) {go(URL.'/');}
$title lang('Музыка','Музика');
require_once 
'../incfiles/head.php';

if (!empty(
$_REQUEST['search']) && mb_strlen(check($_REQUEST['search']))>2$search substr(check($_REQUEST['search']),0,100);
    
?>
<script type="text/javascript">
$(function(){
    $('#form').on('submit', function(e){
    Page.Loading('start');
    e.preventDefault();
    var $that = $(this),
        formData = new FormData($that.get(0));
    $.ajax({
      url: $that.attr('action'),
      type: $that.attr('method'),
      contentType: false,
      processData: false,
      data: formData,
      success: function(response){
        if(response){
             $('.content').html(response);
       }
        Page.Loading('stop');
     }
    });
  });
});
</script>
<?
                                        
echo '<div class="title">    
                                            <div class="block2">
    <form id="form" action="'
.URL.'/audio/poshuk.php" method="post">
    <input class="input2" style="width:70%" type="text" name="search" value="'
.$search.'"/>
    <input class="button2" type="submit" value="'
.lang('Поиск','Пошук').'"/>
    </form>
    </div></div>'
;    

$all mysql_result(mysql_query("SELECT COUNT(`id`) FROM `audio`"),0);
if (
$all 0)
{
    
$cp ceil($all/10);
    
$p = (isset($_GET['p']) and is_numeric($_GET['p']) and $_GET['p']>and $_GET['p']<=$cp) ? $_GET['p'] : 1;
    
$start $p*10-10;
    
$res mysql_query("SELECT * FROM `audio` ORDER by `file` AND `name` DESC LIMIT $start,10");
        while (
$array mysql_fetch_array($res)) echo '<div class="block">'.track($array['id']).'<div class="right"><a href="'.URL.'/audio/add.php?id=track_'.$array['id'].'" onclick="Page.Go(this.href); return false"><img src="'.URL.'/design/img/adds.png"/></a></div></div>';
        
navi($p,$cp,'/audio/all.php?');
}


require_once 
'../incfiles/foot.php';


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