<?php header("Content-type: text/html; charset=utf-8"); error_reporting(0); include "search.class.php"; include "tpl.class.php"; $tpl = new Template(); $ga = new Find(); if ($_POST['keyword'] && $_POST['by'] != '4' && $_POST['by'] != '5') { if ($ga->Zing()) { $arr = $ga->arr; $main = $tpl->get('theme/list_song'); $row = $tpl->get_block($main, 'list_row', 1); $html = ""; for ($i = 1; $i <= count($arr) - 2; $i++) { if ($i % 2 != 0) { $class = "class=even"; } else { $class = ""; } $html .= $tpl->assign($row, array('song.NAME' => $ga->cut_string($arr[$i]['name'], 27, true), 'song.SINGER' => $ga->cut_string($arr[$i]['singer'], 27, true), 'song.ID' => $arr[$i]['id'], 'song.KAT' => $arr[$i]['kat'], 'song.CAT' => $arr[$i]['cat'], 'song.KBS' => $arr[$i]['kbs'], 'song.TYPE' => $arr[$i]['type'], 'song.RATE' => $arr[$i]['rate'], 'song.CLASS' => $class, 'song.NUM' => $i, 'server' => URL_SERVER)); } # Phân Trang if ($ga->page > 1) { $prev = $ga->page - 1; $pre = '<a href="javascript:void(0);" onclick="loadAjax(\'' . $ga->keyword . '\',\'' . $prev . '\',\'' . $_POST['by'] . '\',\'' . $ga->total . '\');"><img src="theme/img/prev.png" style="border:0px solid;"></a>'; } if ($ga->page < $ga->result) { $next = $ga->page + 1; $ne = '<a href="javascript:void(0);" onclick="loadAjax(\'' . $ga->keyword . '\',\'' . $next . '\',\'' . $_POST['by'] . '\',\'' . $ga->total . '\');"><img src="theme/img/next.png" style="border:0px solid;"></a>'; }