No regular expressions were active.
1 |
|
<?
|
|
|
2 |
|
|
|
|
3 |
|
/*********
**********
**********
**********
**********
**********
**********
******
|
|
|
4 |
|
*
D
olphin Sma
rt Communi
ty Builder
|
|
|
5 |
|
*
---------
--------
|
|
|
6 |
|
* begi
n
: M
on Mar 23
2006
|
|
|
7 |
|
* copy
right
: (
C) 2006 Bo
onEx Group
|
|
|
8 |
|
* webs
ite
: h
ttp://www.
boonex.com
/
|
|
|
9 |
|
* This fil
e is part
of Dolphin
- Smart C
ommunity B
uilder
|
|
|
10 |
|
*
|
|
|
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/
|
|
|
13 |
|
*
|
|
|
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.
|
|
|
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
,
|
|
|
18 |
|
* see lice
nse.txt fi
le; if not
, write to
marketing
@boonex.co
m
|
|
|
19 |
|
**********
**********
**********
**********
**********
**********
**********
*****/
|
|
|
20 |
|
|
|
|
21 |
|
require_on
ce( 'inc/h
eader.inc.
php' );
|
|
|
22 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'd
esign.inc.
php' );
|
|
|
23 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'g
roups.inc.
php' );
|
|
|
24 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'u
tils.inc.p
hp' );
|
|
|
25 |
|
|
|
|
26 |
|
// -------
-------- p
age variab
les and lo
gin
|
|
|
27 |
|
|
|
|
28 |
|
$_page['na
me_index']
= 72;
|
|
|
29 |
|
$_page['cs
s_name']
= 'gro
ups.css';
|
|
|
30 |
|
|
|
|
31 |
|
|
|
|
32 |
|
$logged['m
ember'] =
member_aut
h( 0, true
);
|
|
|
33 |
|
$memberID
= (int)$_C
OOKIE['mem
berID'];
|
|
|
34 |
|
|
|
|
35 |
|
$_page['he
ader'] = _
t( "_Creat
e Group" )
;
|
|
|
36 |
|
$_page['he
ader_text'
] = _t( "_
Create Gro
up" );
|
|
|
37 |
|
$_page['ex
tra_js'] =
$oTemplCo
nfig -> sT
inyMceEdit
orCompactJ
S;
|
|
|
38 |
|
|
|
|
39 |
|
// -------
-------- p
age compon
ents
|
|
|
40 |
|
$_ni = $_p
age['name_
index'];
|
|
|
41 |
|
|
|
|
42 |
|
$arrMember
= getProf
ileInfo( $
memberID )
; //db_arr
( "SELECT
`Status` F
ROM `Profi
les` WHERE
`ID`=$mem
berID" );
|
|
|
43 |
|
|
|
|
44 |
|
if( $arrMe
mber['Stat
us'] == 'A
ctive' )
|
|
|
45 |
|
$_page
_cont[$_ni
]['page_ma
in_code']
= PageComp
MainCode()
;
|
|
|
46 |
|
else
|
|
|
47 |
|
$_page
_cont[$_ni
]['page_ma
in_code']
= _t( '_Yo
u must be
active mem
ber to cre
ate groups
' );
|
|
|
48 |
|
|
|
|
49 |
|
// -------
-------- [
END] page
components
|
|
|
50 |
|
|
|
|
51 |
|
PageCode()
;
|
|
|
52 |
|
|
|
|
53 |
|
// -------
-------- p
age compon
ents funct
ions
|
|
|
54 |
|
|
|
|
55 |
|
/**
|
|
|
56 |
|
* page co
de functio
n
|
|
|
57 |
|
*/
|
|
|
58 |
|
function P
ageCompMai
nCode()
|
|
|
59 |
|
{
|
|
|
60 |
|
global
$memberID
;
|
|
|
61 |
|
global
$site;
|
|
|
62 |
|
|
|
|
63 |
|
$arrNe
wGroup = g
etDefaultG
roupEditAr
r();
|
|
|
64 |
|
$arrEr
r = array(
);
|
|
|
65 |
|
|
|
|
66 |
|
if( is
set( $_POS
T['do_subm
it'] ) )
|
|
|
67 |
|
{
|
|
|
68 |
|
fi
llGroupArr
ByPostValu
es( $arrNe
wGroup );
|
|
|
69 |
|
$a
rrErr = ch
eckGroupEr
rors( $arr
NewGroup )
;
|
|
|
70 |
|
|
|
|
71 |
|
if
( md5( $_P
OST['simg'
] ) != $_C
OOKIE['str
Sec'] )
|
|
|
72 |
|
$arrErr[
'simg'] =
'SIMG_ERR'
;
|
|
|
73 |
|
un
set( $_COO
KIE['strSe
c'] );
|
|
|
74 |
|
|
|
|
75 |
|
if
( empty( $
arrErr ) )
|
|
|
76 |
|
{
|
|
|
77 |
|
$arrNewG
roup['crea
torID'] =
array(
|
|
|
78 |
|
'Nam
e' => 'cre
atorID',
|
|
|
79 |
|
'Typ
e' => 'tex
t',
|
|
|
80 |
|
'Val
ue' => $me
mberID
|
|
|
81 |
|
);
|
|
|
82 |
|
|
|
|
83 |
|
$newGrou
pID = save
Group( $ar
rNewGroup
);
|
|
|
84 |
|
if( $new
GroupID )
|
|
|
85 |
|
{
|
|
|
86 |
|
addM
ember2Grou
p( $member
ID, $newGr
oupID, 'Ac
tive' );
|
|
|
87 |
|
|
|
|
88 |
|
$gro
upHomeLink
= "{$site
['url']}gr
oup.php?ID
=$newGroup
ID";
|
|
|
89 |
|
$res
= _t( '_G
roup creat
ion succes
sful', $gr
oupHomeLin
k );
|
|
|
90 |
|
$res
.= "<br /
>";
|
|
|
91 |
|
$res
.= _t('_G
allery upl
oad_desc')
;
|
|
|
92 |
|
$res
.= genUpl
oadForm( $
newGroupID
, true, tr
ue );
|
|
|
93 |
|
}
|
|
|
94 |
|
else
|
|
|
95 |
|
$res
= _t('_Gr
oup creati
on unknown
error');
|
|
|
96 |
|
|
|
|
97 |
|
return $
res;
|
|
|
98 |
|
}
|
|
|
99 |
|
}
|
|
|
100 |
|
|
|
|
101 |
|
$res =
genGroupE
ditForm( $
arrNewGrou
p, $arrErr
, true );
|
|
|
102 |
|
|
|
|
103 |
|
return
$res;
|
|
|
104 |
|
}
|
|
|
105 |
|
|
|
|
106 |
|
?>
|
|
|