-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathlisten.php
More file actions
108 lines (71 loc) · 3.61 KB
/
listen.php
File metadata and controls
108 lines (71 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
/**
* Allomani Audio & Video (Songs) v3.0
*
* @package Allomani.Songs
* @version 3.0
* @copyright (c) 2006-2018 Allomani , All rights reserved.
* @author Ali Allomani <info@allomani.com>
* @link http://allomani.com
* @license GNU General Public License version 3.0 (GPLv3)
*
*/
require("global.php");
require(CWD . "/includes/framework_start.php");
//---------------------------------------------------------
$id= (int) $id;
$cat = iif($cat,intval($cat),1);
$qr=db_query("select * from songs_songs where id='$id'");
if(db_num($qr)){
if(song_listen_permission($id,$cat)){
$data = db_fetch($qr);
$url = $data['url_'.$cat];
if($url){
db_query("update songs_songs set listens_".$cat."=listens_".$cat."+1 where id='$id'");
$data_singer = db_qr_fetch("select * from songs_singers where id='$data[album]'");
if($data['video_id']){
$data_video = db_qr_fetch("select * from songs_videos_data where id='$data[video_id]'");
}else{
$data_video = array();
}
/* $data_singer['songs_count'] = valueof(db_qr_fetch("select count(*) as count from songs_songs where album='$data_singer[id]'"),"count");
$data_singer['albums_count'] = valueof(db_qr_fetch("select count(*) as count from songs_albums where cat='$data_singer[id]'"),"count");
$data_singer['photos_count'] = valueof(db_qr_fetch("select count(*) as count from songs_singers_photos where cat='$data_singer[id]'"),"count");
// $data_singer['videos_count'] = valueof(db_qr_fetch("select count(*) as count from songs_videos_tags where singer_id='$data_singer[id]'"),"count");
$data_singer['videos_count'] = valueof(db_qr_fetch("select count(*) as count from songs_songs where album='$data_singer[id]' and video_id > 0"),"count");
*/
$data_cat = db_qr_fetch("select * from songs_cats where id='$data_singer[cat]'");
print "<span class='path'> <img src='images/arrw.gif' border=0> <a class=path_link href=\"".cat_url($data_cat['id'],$data_cat['page_name'],$data_cat['name'])."\" title=\"$data_cat[name]\">$data_cat[name]</a> $phrases[path_sep] <a class=path_link href=\"".singer_url($data_singer['id'],$data_singer['page_name'],$data_singer['name'])."\" title=\"$data_singer[name]\">$data_singer[name]</a> ";
if($data['album_id']){
$data_album = db_qr_fetch("select * from songs_albums where id='$data[album_id]'");
$data_album['songs_count'] = valueof(db_qr_fetch("select count(*) as count from songs_songs where album='$data_singer[id]' and album_id='$data[album_id]'"),"count");
print " $phrases[path_sep] <a class=path_link href=\"".album_url($data_album['id'],$data_album['page_name'],$data_album['name'],$data_singer['id'],$data_singer['page_name'],$data_singer['name'])."\">$data_album[name]</a>";
}else{
if($data_albums_count['count']){
print " $phrases[path_sep] $phrases[another_songs]" ;
}
}
print " $phrases[path_sep] $data[name] ";
print" <br><br></span>" ;
compile_hook('songs_after_path_links');
run_template('singer_info_table');
compile_hook('songs_after_singer_table');
run_template('song_listen');
if($settings['prev_next_song']){
prev_next_song($id,$data_singer['id']);
}
}else{
open_table();
print "<center> $phrases[file_is_not_available]</center>";
close_table();
}
}else{
login_redirect();
}
}else{
open_table();
print "<center> $phrases[err_wrong_url]</center>";
close_table();
}
//---------------------------------------------
require(CWD . "/includes/framework_end.php");