No regular expressions were active.
1 |
|
<?php
|
|
1 |
|
<?php
|
2 |
|
|
|
2 |
|
|
3 |
|
/*********
**********
**********
**********
**********
**********
**********
******
|
|
3 |
|
/*********
**********
**********
**********
**********
**********
**********
******
|
4 |
|
*
D
olphin Sma
rt Communi
ty Builder
|
|
4 |
|
*
D
olphin Sma
rt Communi
ty Builder
|
5 |
|
*
---------
--------
|
|
5 |
|
*
---------
--------
|
6 |
|
* begi
n
: M
on Mar 23
2006
|
|
6 |
|
* begi
n
: M
on Mar 23
2006
|
7 |
|
* copy
right
: (
C) 2006 Bo
onEx Group
|
|
7 |
|
* copy
right
: (
C) 2006 Bo
onEx Group
|
8 |
|
* webs
ite
: h
ttp://www.
boonex.com
/
|
|
8 |
|
* webs
ite
: h
ttp://www.
boonex.com
/
|
9 |
|
* This fil
e is part
of Dolphin
- Smart C
ommunity B
uilder
|
|
9 |
|
* This fil
e is part
of Dolphin
- Smart C
ommunity B
uilder
|
10 |
|
*
|
|
10 |
|
*
|
11 |
|
* Dolphin
is free so
ftware. Th
is work is
licensed
under a Cr
eative Com
mons Attri
bution 3.0
License.
|
|
11 |
|
* Dolphin
is free so
ftware. Th
is work is
licensed
under a Cr
eative Com
mons Attri
bution 3.0
License.
|
12 |
|
* http://c
reativecom
mons.org/l
icenses/by
/3.0/
|
|
12 |
|
* http://c
reativecom
mons.org/l
icenses/by
/3.0/
|
13 |
|
*
|
|
13 |
|
*
|
14 |
|
* Dolphin
is distrib
uted in th
e hope tha
t it will
be useful,
but WITHO
UT ANY WAR
RANTY;
|
|
14 |
|
* Dolphin
is distrib
uted in th
e hope tha
t it will
be useful,
but WITHO
UT ANY WAR
RANTY;
|
15 |
|
* without
even the i
mplied war
ranty of
MERCHANTAB
ILITY or F
ITNESS FOR
A PARTICU
LAR PURPOS
E.
|
|
15 |
|
* without
even the i
mplied war
ranty of
MERCHANTAB
ILITY or F
ITNESS FOR
A PARTICU
LAR PURPOS
E.
|
16 |
|
* See the
Creative C
ommons Att
ribution 3
.0 License
for more
details.
|
|
16 |
|
* See the
Creative C
ommons Att
ribution 3
.0 License
for more
details.
|
17 |
|
* You shou
ld have re
ceived a c
opy of the
Creative
Commons At
tribution
3.0 Licens
e along wi
th Dolphin
,
|
|
17 |
|
* You shou
ld have re
ceived a c
opy of the
Creative
Commons At
tribution
3.0 Licens
e along wi
th Dolphin
,
|
18 |
|
* see lice
nse.txt fi
le; if not
, write to
marketing
@boonex.co
m
|
|
18 |
|
* see lice
nse.txt fi
le; if not
, write to
marketing
@boonex.co
m
|
19 |
|
**********
**********
**********
**********
**********
**********
**********
*****/
|
|
19 |
|
**********
**********
**********
**********
**********
**********
**********
*****/
|
20 |
|
|
|
20 |
|
|
21 |
|
require_on
ce('inc/he
ader.inc.p
hp');
|
|
21 |
|
require_on
ce('inc/he
ader.inc.p
hp');
|
22 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'd
esign.inc.
php' );
|
|
|
23 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'a
dmin.inc.p
hp' );
|
|
|
24 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'i
mages.inc.
php' );
|
|
|
25 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 's
haring.inc
.php' );
|
|
22 |
|
require_on
ce(BX_DIRE
CTORY_PATH
_INC . 'sh
aring.inc.
php');
|
|
|
23 |
|
require_on
ce(BX_DIRE
CTORY_PATH
_CLASSES .
'BxDolSha
redMedia.p
hp');
|
26 |
|
|
|
24 |
|
|
27 |
|
$_page['na
me_index']
= 82;
|
|
25 |
|
check_logg
ed();
|
28 |
|
$_page['cs
s_name']
= 'vie
wVideo.css
';
|
|
|
29 |
|
|
|
26 |
|
|
30 |
|
$oVotingVi
ew = new B
xTemplVoti
ngView('gv
ideo', 0,
0);
|
|
27 |
|
$member['I
D'] = (int
)$_COOKIE[
'memberID'
];
|
31 |
|
$_page['ex
tra_js']
= $oVoting
View->getE
xtraJs();
|
|
|
32 |
|
|
|
28 |
|
|
33 |
|
if ( !( $l
ogged['adm
in'] = mem
ber_auth(
1, false )
) )
|
|
29 |
|
$oNew = ne
w BxDolSha
redMedia('
video', $s
ite, $dir,
$member);
|
34 |
|
{
|
|
|
35 |
|
if ( !
( $logged[
'member']
= member_a
uth( 0, fa
lse ) ) )
|
|
|
36 |
|
{
|
|
|
37 |
|
if
( !( $log
ged['aff']
= member_
auth( 2, f
alse ) ) )
|
|
|
38 |
|
{
|
|
|
39 |
|
$logged[
'moderator
'] = membe
r_auth( 3,
false );
|
|
|
40 |
|
}
|
|
|
41 |
|
}
|
|
|
42 |
|
}
|
|
|
43 |
|
|
|
30 |
|
|
|
|
31 |
|
$_page['na
me_index']
= 82;
|
|
|
32 |
|
$_page['cs
s_name'] =
$oNew->sC
ssName;
|
44 |
|
|
|
33 |
|
|
45 |
|
$_page['he
ader'] = _
t( "_brows
eVideo" );
|
|
34 |
|
$_page['he
ader'] = _
t( "_brows
eVideo" );
|
46 |
|
$_page['he
ader_text'
] = _t("_b
rowseVideo
");
|
|
35 |
|
$_page['he
ader_text'
] = _t("_b
rowseVideo
");
|
47 |
|
|
|
36 |
|
|
48 |
|
$_ni = $_p
age['name_
index'];
|
|
37 |
|
$_ni = $_p
age['name_
index'];
|
49 |
|
|
|
38 |
|
|
50 |
|
$member['I
D'] = (int
)$_COOKIE[
'memberID'
];
|
|
39 |
|
$aConditio
n = $oNew
->getCondi
tionArray(
$logged);
|
51 |
|
|
|
40 |
|
if ($aCond
ition !==
false) {
|
52 |
|
$aWhere =
array();
|
|
41 |
|
$aSqlQ
uery = $
aCondition
['query'];
|
53 |
|
$aWhere[]
= '1';
|
|
42 |
|
$iTota
lPages = $
aCondition
['total'];
|
54 |
|
|
|
43 |
|
$iCurP
age = $
aCondition
['cur_page
'];
|
55 |
|
if (isset(
$_GET['use
rID']))
|
|
44 |
|
$iPerP
age = $
aCondition
['per_page
'];
|
56 |
|
{
|
|
|
57 |
|
$iUser
= (int)$_
GET['userI
D'];
|
|
|
58 |
|
$aWher
e[] = "`Ra
yMovieFile
s`.`Owner`
=$iUser";
|
|
|
59 |
|
}
|
|
|
60 |
|
|
|
|
61 |
|
if (isset(
$_GET['tag
']))
|
|
|
62 |
|
{
|
|
|
63 |
|
$sTag
= htmlspec
ialchars_a
dv($_GET['
tag']);
|
|
|
64 |
|
$aWher
e[] = "`Ra
yMovieFile
s`.`Tags`
like '%$sT
ag%'";
|
|
|
65 |
|
}
|
|
|
66 |
|
|
|
|
67 |
|
if (isset(
$_GET['act
ion']))
|
|
|
68 |
|
{
|
|
|
69 |
|
$sAct
= htmlspec
ialchars_a
dv($_GET['
action']);
|
|
|
70 |
|
$sAddo
n = define
BrowseActi
on($sAct,'
Video',$me
mber['ID']
);
|
|
|
71 |
|
}
|
|
45 |
|
}
|
72 |
|
|
|
46 |
|
else {
|
73 |
|
$sqlWhere
= "WHERE "
. implode
( ' AND ',
$aWhere )
.$sAddon."
AND `Appr
oved`= 'tr
ue'";
|
|
|
74 |
|
|
|
|
75 |
|
$iTotalNum
= db_valu
e( "SELECT
COUNT( *
) FROM `Ra
yMovieFile
s` $sqlWhe
re" );
|
|
|
76 |
|
if( !$iTot
alNum )
|
|
|
77 |
|
{
|
|
|
78 |
|
$_page
_cont[$_ni
]['page_ma
in_code']
= _t( '_So
rry, nothi
ng found'
);
|
|
47 |
|
$_page
_cont[$_ni
]['page_ma
in_code']
= _t( '_So
rry, nothi
ng found'
);
|
79 |
|
|
|
|
80 |
|
PageCo
de();
|
|
48 |
|
PageCo
de();
|
81 |
|
exit;
|
|
49 |
|
exit;
|
82 |
|
}
|
|
50 |
|
}
|
83 |
|
|
|
51 |
|
|
84 |
|
$iPerPage
= (int)$_G
ET['per_pa
ge'];
|
|
52 |
|
$rData = $
oNew->getF
ilesList($
aSqlQuery)
;
|
85 |
|
if( !$iPer
Page )
|
|
|
86 |
|
$iPerP
age = 10;
|
|
|
87 |
|
$iTotalPag
es = ceil(
$iTotalNu
m / $iPerP
age );
|
|
|
88 |
|
|
|
|
89 |
|
$iCurPage
= (int)$_G
ET['page']
;
|
|
|
90 |
|
|
|
|
91 |
|
if( $iCurP
age > $iTo
talPages )
|
|
|
92 |
|
$iCurP
age = $iTo
talPages;
|
|
|
93 |
|
|
|
|
94 |
|
if( $iCurP
age < 1 )
|
|
|
95 |
|
$iCurP
age = 1;
|
|
|
96 |
|
|
|
|
97 |
|
$sLimitFro
m = ( $iCu
rPage - 1
) * $iPerP
age;
|
|
|
98 |
|
|
|
|
99 |
|
$sqlOrderB
y = 'ORDER
BY `medDa
te` DESC';
|
|
|
100 |
|
|
|
|
101 |
|
if (isset(
$_GET['rat
e']))
|
|
|
102 |
|
{
|
|
|
103 |
|
$oVoti
ngView = n
ew BxTempl
VotingView
('gvideo'
, 0, 0);
|
|
|
104 |
|
|
|
|
105 |
|
$aSql
= $
oVotingVie
w->getSqlP
arts('`Ray
MovieFiles
`', '`ID`'
);
|
|
|
106 |
|
$sHow
= $
_GET['rate
'] == 'top
' ? "DESC"
: "ASC";
|
|
|
107 |
|
$sqlOr
derBy = $
oVotingVie
w->isEnabl
ed() ? "OR
DER BY `vo
ting_rate`
$sHow, `v
oting_coun
t` $sHow,
`medDate`
$sHow" : $
sqlOrderBy
;
|
|
|
108 |
|
$sqlFi
elds = $
aSql['fiel
ds'];
|
|
|
109 |
|
$sqlLJ
oin = $
aSql['join
'];
|
|
|
110 |
|
}
|
|
|
111 |
|
$sqlLimit
= "LIMIT $
sLimitFrom
, $iPerPag
e";
|
|
|
112 |
|
|
|
|
113 |
|
$sQuery =
"
|
|
|
114 |
|
SELECT
|
|
|
115 |
|
`R
ayMovieFil
es`.`ID`
as `medI
D`,
|
|
|
116 |
|
`R
ayMovieFil
es`.`Owner
` as `medP
rofId`,
|
|
|
117 |
|
`R
ayMovieFil
es`.`Title
` as `medT
itle`,
|
|
|
118 |
|
`R
ayMovieFil
es`.`Date`
as `medD
ate`,
|
|
|
119 |
|
`R
ayMovieFil
es`.`Views
` as `medV
iews`,
|
|
|
120 |
|
`P
rofiles`.`
NickName`
|
|
|
121 |
|
$s
qlFields
|
|
|
122 |
|
FROM `
RayMovieFi
les`
|
|
|
123 |
|
LEFT J
OIN `Profi
les` ON
|
|
|
124 |
|
`P
rofiles`.`
ID` = `Ray
MovieFiles
`.`Owner`
|
|
|
125 |
|
$sqlLJ
oin
|
|
|
126 |
|
$sqlWh
ere
|
|
|
127 |
|
$sqlOr
derBy
|
|
|
128 |
|
$sqlLi
mit
|
|
|
129 |
|
";
|
|
|
130 |
|
|
|
|
131 |
|
$rData = d
b_res($sQu
ery);
|
|
|
132 |
|
|
|
|
133 |
|
$_page_con
t[$_ni]['p
age_main_c
ode'] = Pa
geCompPage
MainCode()
;
|
|
|
134 |
|
|
|
|
135 |
|
PageCode()
;
|
|
|
136 |
|
|
|
|
137 |
|
function P
ageCompPag
eMainCode(
)
|
|
|
138 |
|
{
|
|
|
139 |
|
global
$site;
|
|
|
140 |
|
global
$rData;
|
|
|
141 |
|
global
$iTotalPa
ges;
|
|
|
142 |
|
global
$iCurPage
;
|
|
|
143 |
|
global
$iPerPage
;
|
|
|
144 |
|
global
$member;
|
|
|
145 |
|
|
|
53 |
|
|
146 |
|
$sCode
= '<div s
tyle="posi
tion: rela
tive; floa
t: left;">
';
|
|
54 |
|
while
($aData
=
mysql_fetc
h_a
ssoc
($rData))
|
147 |
|
if (my
sql_num_ro
ws($rData)
)
|
|
55 |
|
$sCode
.= $oNew-
>showBrows
eUnit($aDa
ta);
|
148 |
|
{
|
|
|
149 |
|
while
($aData
=
mysql_fetc
h_a
rray
($rData))
|
|
|
150 |
|
{
|
|
|
151 |
|
$sProfLi
nk = '<div
>'._t("_By
").': <a h
ref="'.get
ProfileLin
k($aData['
medProfId'
]).'">'.$a
Data['Nick
Name'].'</
a></div>';
|
|
|
152 |
|
|
|
56 |
|
|
153 |
|
$oVoting
View = new
BxTemplVo
tingView (
'gvideo',
$aData['me
dID']);
|
|
|
154 |
|
if( $oVo
tingView->
isEnabled(
))
|
|
|
155 |
|
{
|
|
|
156 |
|
$sRa
te = $oVot
ingView->g
etSmallVot
ing (0);
|
|
|
157 |
|
$sSh
owRate = '
<div class
="galleryR
ate">'. $s
Rate . '</
div>';
|
|
|
158 |
|
}
|
|
|
159 |
|
$sHref =
$site['ur
l'].'viewV
ideo.php?f
ileID='.$a
Data['medI
D'];
|
|
|
160 |
|
$sImg =
'<a href=
"'.$sHref.
'"><img sr
c="'.$site
['url'].'r
ay/modules
/movie/fil
es/'.$aDat
a['medID']
.'_small.j
pg"></a>';
|
|
|
161 |
|
|
|
|
162 |
|
$sVidTit
le = strle
n($aData['
medTitle']
) > 0 ? $a
Data['medT
itle'] : _
t("_Untitl
ed");
|
|
|
163 |
|
$sDelLin
k = $membe
r['ID'] ==
$aData['m
edProfId']
? '<div><
a href="'.
$_SERVER['
PHP_SELF']
.'?action=
del&fileID
='.$aData[
'medID'].'
"
|
|
|
164 |
|
onClick=
"return co
nfirm( \''
._t("_are
you sure?"
).'\');">'
._t("_Dele
te").'</a>
</div>' :
"" ;
|
|
|
165 |
|
|
|
|
166 |
|
$sCode .
= '<div cl
ass="brows
eUnit">';
|
|
|
167 |
|
$sCo
de .= '<di
v class="l
astFilesPi
c">'.$sImg
.'</div>';
|
|
|
168 |
|
$sCo
de .= '<di
v><a href=
"'.$sHref.
'"><b>'.$s
VidTitle.'
</b></a></
div>';
|
|
|
169 |
|
$sCo
de .= $sPr
ofLink;
|
|
|
170 |
|
$sCo
de .= '<di
v>'._t("_A
dded").':
<b>'.defin
eTimeInter
val($aData
['medDate'
]).'</b></
div>';
|
|
|
171 |
|
$sCo
de .= '<di
v>'._t("_V
iews").':
<b>'.$aDat
a['medView
s'].'</b><
/div>';
|
|
|
172 |
|
$sCo
de .= $sSh
owRate;
|
|
|
173 |
|
$sCo
de .= $sDe
lLink;
|
|
|
174 |
|
$sCode .
= '</div>'
;
|
|
|
175 |
|
}
|
|
|
176 |
|
}
|
|
|
177 |
|
$sCode
.= '<div
class="cle
ar_both"><
/div>';
|
|
57 |
|
$sCode .=
'<div clas
s="clear_b
oth"></div
>';
|
178 |
|
|
|
58 |
|
|
|
|
59 |
|
$sCode .=
$oNew->sho
wPaginatio
n($iTotalP
ages, $iCu
rPage, $iP
erPage);
|
179 |
|
|
|
60 |
|
|
180 |
|
// gen
erate pagi
nation
|
|
61 |
|
$_page_con
t[$_ni]['p
age_main_c
ode'] = $s
Code;
|
181 |
|
if( $i
TotalPages
> 1)
|
|
|
182 |
|
{
|
|
|
183 |
|
$s
Request =
$_SERVER['
PHP_SELF']
. '?';
|
|
|
184 |
|
$a
Fields = a
rray( 'use
rID', 'tag
', 'rate'
);
|
|
|
185 |
|
|
|
62 |
|
|
186 |
|
fo
reach( $aF
ields as $
field )
|
|
63 |
|
PageCode()
;
|
187 |
|
if( isse
t( $_GET[$
field] ) )
|
|
|
188 |
|
$sRe
quest .= "
&{$fie
ld}=" . ht
mlentities
( process_
pass_data(
$_GET[$fi
eld] ) );
|
|
|
189 |
|
|
|
|
190 |
|
$p
agination
= '<div st
yle="text-
align: cen
ter; posit
ion: relat
ive;">'._t
("_Results
per page"
).':
|
|
|
191 |
|
<sel
ect name="
per_page"
onchange="
window.loc
ation=\''
. $sReques
t . '&
per_page=\
' + this.v
alue;">
|
|
|
192 |
|
<option va
lue="10"'
. ( $iPerP
age == 10
? ' select
ed="select
ed"' : ''
) . '>10</
option>
|
|
|
193 |
|
<option va
lue="20"'
. ( $iPerP
age == 20
? ' select
ed="select
ed"' : ''
) . '>20</
option>
|
|
|
194 |
|
<option va
lue="50"'
. ( $iPerP
age == 50
? ' select
ed="select
ed"' : ''
) . '>50</
option>
|
|
|
195 |
|
<option va
lue="100"'
. ( $iPer
Page == 10
0 ? ' sele
cted="sele
cted"' : '
' ) . '>10
0</option>
|
|
|
196 |
|
</se
lect></div
>' .
|
|
|
197 |
|
genPagin
ation( $iT
otalPages,
$iCurPage
, ( $sRequ
est . '&am
p;page={pa
ge}&pe
r_page='.$
iPerPage )
);
|
|
|
198 |
|
}
|
|
|
199 |
|
else
|
|
|
200 |
|
$p
agination
= '';
|
|
|
201 |
|
|
|
|
202 |
|
return
$sCode .
$paginatio
n.'</div>'
;
|
|
|
203 |
|
}
|
|
|
204 |
|
|
|
64 |
|
|
205 |
|
?>
|
|
65 |
|
?>
|