๑๑۩۞۩๑๑...TuThienBao.Com...๑๑۩۞۩๑๑

๑๑۩۞۩๑๑...TuThienBao.Com...๑๑۩۞۩๑๑ (http://tuthienbao.com/forum/index.php)
-   Code php,asp,html... (http://tuthienbao.com/forum/forumdisplay.php?f=102)
-   -   [php] Code Clone của KyUcTinhYeu (http://tuthienbao.com/forum/showthread.php?t=11359)

adminbao 09-07-2010 12:42 PM

[php] Code Clone của KyUcTinhYeu
 
Demo:
http://img.photo.zing.vn/file_upload...1278649605.jpg
http://d.f2.photo.zdn.vn/file_upload...1278649620.jpg

Chức năng:
Chẳng thiếu thứ gì từ NCT cả, List thành viên cũng nghe được hết.
Đặc biệt còn linh hoạt hơn là cho phép "Nghe theo danh sách tìm kiếm" ( Tìm Ca sĩ hoặc Bài hát ).

Skin: XanhHồng ( Cứ load trang 1 lần là lại change skin 1 lần )

Đọc kỹ hướng dẫn sử dụng trước khi dùng:

Mở file "functions.php" lên, tìm dòng:
Code:

$folder  = 'php/project/search'
đây là folder chứa code, bạn sửa thành của bạn nhé.

File "kuty.js"
Tìm dòng:
Code:

function TitleSong(title)
{
  document.title =''+Replaces(title)+' | wWw.ChiaSeVn.Tk';
}

Thay thành của bạn là ok,

Quan trọng nhất là mỗi file "functions.php" kia thôi.

Còn bạn nào ko mún dùng 2 Css mỗi khi load trang ( tức là chỉ dùng 1 cái thui á, hoặc là tự dùng theo ý mình. Thì mở file "index.php" ra, tìm dòng:
Code:

include('css.txt'); ?>" type=text/css rel=stylesheet>
thay
Code:

include('css.txt'); ?>
thành file css của bạn.

Sau đó tìm đoạn này xóa đi nếu muốn:
Code:

//variable declarations
$counter_data = "css.txt"; //counter data file
$image_dir = "img/7"; //image directory
$style = "text"; //enter text for text.Anything else for graphics
//check if file exists
if(!($fp = fopen($counter_data,"r+"))) die ("cannot open counter file");
//read in the current count from the file
$count = fread($fp, 20);
//close the file
fclose($fp);
//increment count
if($count == 'xanh.css')
{
$ghi = 'style.css' ; }
elseif(
$count == 'style.css')
{
$ghi = 'xanh.css';
}
//echo $count;
$fp = fopen($counter_data, "w");
fwrite($fp , $ghi);
//close the file
fclose($fp);
?>

Đoạn đó là đoạn để mình change Css, mình ghi nội dung vào file "css.txt"

Phần quảng cáo bên phải, là đoạn này trong file Index.php
Code:




// echo $box_right
?>
       

 
   
       
   
 
   
 

 

Bật mí thêm 1 điều nữa, nhiều bạn ko biết cái Random ảnh trong Player của mình, trong code mình cũng có cả đấy, FuLL mà.
Cái đó là file "imgran_love.php":
Code:

// Code by Http://ChiaseVn.Tk - Y!m: nongdanbaclieu15
$folder = 'bgplay/'; //tên thu muc chua hinh anh của bạn nhé, hj                   
$exts = 'JPG jpg jpeg png gif'
$files = array(); $i = -1
if (
'' == $folder) $folder = './'
$handle = opendir($folder); 
$exts = explode(' ', $exts); 
while (
false !== ($file = readdir($handle))) { 
    foreach(
$exts as $ext) { 
        if (
preg_match('/\.'.$ext.'$/i', $file, $test)) { 
           
$files[] = $file
            ++
$i
            } 
        } 
    } 
closedir($handle); 
mt_srand((double)microtime()*1000000); 
$rand = mt_rand(0, $i); 
header('Location: '.$folder.$files[$rand]); 
?>

Download:http://www.mediafire.com/?jkwgmdonytd
Pass: it-vn.org

kool_men 09-08-2010 09:54 PM

admin oi . minh không hiu cái $folder = 'php/project/search';
là sao vay ? bạn giải thích rõ cho mình dc ko ?


Múi giờ GMT. Hiện tại là 01:49 PM.

Powered by: vBulletin v3.8.2 Copyright ©2000-2025, Jelsoft Enterprises Ltd.