Produced by Araxis Merge on Mon May 18 06:28:28 2009 UTC. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Firefox or Internet Explorer. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | D:\Dolphin-v.6.1.5\inc | design.inc.php | Wed Apr 29 10:31:54 2009 UTC |
2 | D:\Dolphin-v.6.1.6\inc | design.inc.php | Thu May 7 10:32:57 2009 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 2490 |
Changed | 1 | 2 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | All differences in whitespace within lines are ignored |
---|---|
Character case | Differences in character case are ignored |
Line endings | Differences in line endings (CR and LF characters) are significant |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | <? | 1 | <? | |||
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( 'heade r.inc.php' ); | 21 | require_on ce( 'heade r.inc.php' ); | |||
22 | require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin.inc.p hp' ); | 22 | require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin.inc.p hp' ); | |||
23 | require_on ce( BX_DIR ECTORY_PAT H_INC . 'd b.inc.php' ); | 23 | require_on ce( BX_DIR ECTORY_PAT H_INC . 'd b.inc.php' ); | |||
24 | require_on ce( BX_DIR ECTORY_PAT H_INC . 'p rof.inc.ph p' ); | 24 | require_on ce( BX_DIR ECTORY_PAT H_INC . 'p rof.inc.ph p' ); | |||
25 | require_on ce( BX_DIR ECTORY_PAT H_INC . 'b anners.inc .php' ); | 25 | require_on ce( BX_DIR ECTORY_PAT H_INC . 'b anners.inc .php' ); | |||
26 | require_on ce( BX_DIR ECTORY_PAT H_INC . 'm embership_ levels.inc .php' ); | 26 | require_on ce( BX_DIR ECTORY_PAT H_INC . 'm embership_ levels.inc .php' ); | |||
27 | require_on ce( BX_DIR ECTORY_PAT H_INC . 'p arams.inc. php' ); | 27 | require_on ce( BX_DIR ECTORY_PAT H_INC . 'p arams.inc. php' ); | |||
28 | require_on ce( BX_DIR ECTORY_PAT H_INC . 'l anguages.i nc.php'); | 28 | require_on ce( BX_DIR ECTORY_PAT H_INC . 'l anguages.i nc.php'); | |||
29 | require_on ce( BX_DIR ECTORY_PAT H_INC . 's haring.inc .php'); | 29 | require_on ce( BX_DIR ECTORY_PAT H_INC . 's haring.inc .php'); | |||
30 | require_on ce( BX_DIR ECTORY_PAT H_INC . 'q uotes.inc. php' ); | 30 | require_on ce( BX_DIR ECTORY_PAT H_INC . 'q uotes.inc. php' ); | |||
31 | 31 | |||||
32 | require_on ce( BX_DIR ECTORY_PAT H_CLASSES . 'BxRSS.p hp'); | 32 | require_on ce( BX_DIR ECTORY_PAT H_CLASSES . 'BxRSS.p hp'); | |||
33 | if (file_e xists(BX_D IRECTORY_P ATH_INC . "eCards.in c.php")) { | 33 | if (file_e xists(BX_D IRECTORY_P ATH_INC . "eCards.in c.php")) { | |||
34 | define ('ECARDS_I NSTALLED', true); | 34 | define ('ECARDS_I NSTALLED', true); | |||
35 | requir e_once(BX_ DIRECTORY_ PATH_INC . "eCards.i nc.php"); | 35 | requir e_once(BX_ DIRECTORY_ PATH_INC . "eCards.i nc.php"); | |||
36 | } | 36 | } | |||
37 | require_on ce( BX_DIR ECTORY_PAT H_ROOT . " templates/ tmpl_{$tmp l}/scripts /functions .php" ); | 37 | require_on ce( BX_DIR ECTORY_PAT H_ROOT . " templates/ tmpl_{$tmp l}/scripts /functions .php" ); | |||
38 | require_on ce( BX_DIR ECTORY_PAT H_ROOT . " templates/ tmpl_{$tmp l}/scripts /BxTemplMe nu.php" ); | 38 | require_on ce( BX_DIR ECTORY_PAT H_ROOT . " templates/ tmpl_{$tmp l}/scripts /BxTemplMe nu.php" ); | |||
39 | 39 | |||||
40 | //require_ once( 'mod ules/heade r.inc.php' ); | 40 | //require_ once( 'mod ules/heade r.inc.php' ); | |||
41 | 41 | |||||
42 | 42 | |||||
43 | 43 | |||||
44 | $db_color_ index = 0; | 44 | $db_color_ index = 0; | |||
45 | 45 | |||||
46 | $_page['js '] = 1; | 46 | $_page['js '] = 1; | |||
47 | 47 | |||||
48 | /** | 48 | /** | |||
49 | * Put spa cer code | 49 | * Put spa cer code | |||
50 | * $width - width if spacer in pixels | 50 | * $width - width if spacer in pixels | |||
51 | * $heigh t - height of spacer in pixels | 51 | * $heigh t - height of spacer in pixels | |||
52 | **/ | 52 | **/ | |||
53 | 53 | |||||
54 | function s pacer( $wi dth, $heig ht ) | 54 | function s pacer( $wi dth, $heig ht ) | |||
55 | { | 55 | { | |||
56 | gl obal $site ; | 56 | gl obal $site ; | |||
57 | 57 | |||||
58 | return '<img src ="' . $sit e['images' ] . 'space r.gif" wid th="' . $w idth . '" height="' . $height . '" alt=" " />'; | 58 | return '<img src ="' . $sit e['images' ] . 'space r.gif" wid th="' . $w idth . '" height="' . $height . '" alt=" " />'; | |||
59 | } | 59 | } | |||
60 | 60 | |||||
61 | /** | 61 | /** | |||
62 | * Put att ention cod e | 62 | * Put att ention cod e | |||
63 | * $str - attention text | 63 | * $str - attention text | |||
64 | **/ | 64 | **/ | |||
65 | function a ttention( $str ) | 65 | function a ttention( $str ) | |||
66 | { | 66 | { | |||
67 | gl obal $site ; | 67 | gl obal $site ; | |||
68 | ?> | 68 | ?> | |||
69 | <table cel lspacing=" 2" cellpad ding="1"> | 69 | <table cel lspacing=" 2" cellpad ding="1"> | |||
70 | <t r> | 70 | <t r> | |||
71 | <td valign="to p"> | 71 | <td valign="to p"> | |||
72 | <img s rc="<?= $s ite['icons '] ?>sign. gif" alt=" " /> | 72 | <img s rc="<?= $s ite['icons '] ?>sign. gif" alt=" " /> | |||
73 | </td > | 73 | </td > | |||
74 | <td valign="to p"> | 74 | <td valign="to p"> | |||
75 | <table cellspaci ng="0" cel lpadding=" 2" class=" text"> | 75 | <table cellspaci ng="0" cel lpadding=" 2" class=" text"> | |||
76 | <tr> | 76 | <tr> | |||
77 | <td valign ="top" ali gn="justif y"><?= $st r ?></td> | 77 | <td valign ="top" ali gn="justif y"><?= $st r ?></td> | |||
78 | </tr> | 78 | </tr> | |||
79 | </tabl e> | 79 | </tabl e> | |||
80 | </td > | 80 | </td > | |||
81 | </ tr> | 81 | </ tr> | |||
82 | </table> | 82 | </table> | |||
83 | <? | 83 | <? | |||
84 | } | 84 | } | |||
85 | 85 | |||||
86 | /** | 86 | /** | |||
87 | * Put des ign progre ss bar cod e | 87 | * Put des ign progre ss bar cod e | |||
88 | * $text - prog ress bar t ext | 88 | * $text - prog ress bar t ext | |||
89 | * $width - widt h of progr ess bar in pixels | 89 | * $width - widt h of progr ess bar in pixels | |||
90 | * $max_p os - maxi mal positi on of prog ress bar | 90 | * $max_p os - maxi mal positi on of prog ress bar | |||
91 | * $curr_ pos - curr ent positi on of prog ress bar | 91 | * $curr_ pos - curr ent positi on of prog ress bar | |||
92 | **/ | 92 | **/ | |||
93 | function D esignProgr essPos ( $ text, $wid th, $max_p os, $curr_ pos, $prog ress_num = '1' ) | 93 | function D esignProgr essPos ( $ text, $wid th, $max_p os, $curr_ pos, $prog ress_num = '1' ) | |||
94 | { | 94 | { | |||
95 | if ( $max_pos ) | 95 | if ( $max_pos ) | |||
96 | $per cent = $cu rr_pos * 1 00 / $max_ pos; | 96 | $per cent = $cu rr_pos * 1 00 / $max_ pos; | |||
97 | el se | 97 | el se | |||
98 | $per cent = 0; | 98 | $per cent = 0; | |||
99 | 99 | |||||
100 | re turn Desig nProgress( $text, $w idth, $per cent, $pro gress_num ); | 100 | re turn Desig nProgress( $text, $w idth, $per cent, $pro gress_num ); | |||
101 | } | 101 | } | |||
102 | 102 | |||||
103 | /** | 103 | /** | |||
104 | * Put des ign progre ss bar cod e | 104 | * Put des ign progre ss bar cod e | |||
105 | * $text - prog ress bar t ext | 105 | * $text - prog ress bar t ext | |||
106 | * $width - widt h of progr ess bar in pixels | 106 | * $width - widt h of progr ess bar in pixels | |||
107 | * $perce nt - curr ent positi on of prog ress bar i n percents | 107 | * $perce nt - curr ent positi on of prog ress bar i n percents | |||
108 | **/ | 108 | **/ | |||
109 | function D esignProgr ess ( $tex t, $width, $percent, $progress _num, $id = '' ) | 109 | function D esignProgr ess ( $tex t, $width, $percent, $progress _num, $id = '' ) | |||
110 | { | 110 | { | |||
111 | gl obal $site ; | 111 | gl obal $site ; | |||
112 | 112 | |||||
113 | $r et = ""; | 113 | $r et = ""; | |||
114 | $r et .= '<di v class="r ate_block" style="wi dth:' . $w idth . 'px ;">'; | 114 | $r et .= '<di v class="r ate_block" style="wi dth:' . $w idth . 'px ;">'; | |||
115 | $ret .= '<div class="rat e_text"' . ( $id ? " id=\"{$id }_text\"" : '' ) . ' >'; | 115 | $ret .= '<div class="rat e_text"' . ( $id ? " id=\"{$id }_text\"" : '' ) . ' >'; | |||
116 | $ret . = $text; | 116 | $ret . = $text; | |||
117 | $ret .= '</div >'; | 117 | $ret .= '</div >'; | |||
118 | $ret .= '<div class="rat e_scale"' . ( $id ? " id=\"{$i d}_scale\" " : '' ) . '>'; | 118 | $ret .= '<div class="rat e_scale"' . ( $id ? " id=\"{$i d}_scale\" " : '' ) . '>'; | |||
119 | $ret . = '<div' . ( $id ? " id=\"{$id }_bar\"" : '' ) . ' style="pos ition:rela tive; heig ht:10px; f ont-size:1 px; width: ' . round( $percent) . '%; back ground-ima ge:url(' . getTempla teIcon("sc ale_index_ {$progress _num}.gif" ) . '); ba ckground-r epeat:repe at-x;"></d iv>'; | 119 | $ret . = '<div' . ( $id ? " id=\"{$id }_bar\"" : '' ) . ' style="pos ition:rela tive; heig ht:10px; f ont-size:1 px; width: ' . round( $percent) . '%; back ground-ima ge:url(' . getTempla teIcon("sc ale_index_ {$progress _num}.gif" ) . '); ba ckground-r epeat:repe at-x;"></d iv>'; | |||
120 | $ret .= '</div >'; | 120 | $ret .= '</div >'; | |||
121 | $r et .= '</d iv>'; | 121 | $r et .= '</d iv>'; | |||
122 | 122 | |||||
123 | re turn $ret; | 123 | re turn $ret; | |||
124 | } | 124 | } | |||
125 | 125 | |||||
126 | 126 | |||||
127 | // design box | 127 | // design box | |||
128 | $fs = file size ( BX_ DIRECTORY_ PATH_ROOT . "templat es/tmpl_{$ tmpl}/desi gnbox_0.ht ml" ); | 128 | $fs = file size ( BX_ DIRECTORY_ PATH_ROOT . "templat es/tmpl_{$ tmpl}/desi gnbox_0.ht ml" ); | |||
129 | $f = fopen ( BX_DIRE CTORY_PATH _ROOT . "t emplates/t mpl_{$tmpl }/designbo x_0.html", "r" ); | 129 | $f = fopen ( BX_DIRE CTORY_PATH _ROOT . "t emplates/t mpl_{$tmpl }/designbo x_0.html", "r" ); | |||
130 | $templ_des ignbox0 = fread ( $f , $fs ); | 130 | $templ_des ignbox0 = fread ( $f , $fs ); | |||
131 | fclose ( $ f ); | 131 | fclose ( $ f ); | |||
132 | 132 | |||||
133 | $fs = file size ( BX_ DIRECTORY_ PATH_ROOT . "templat es/tmpl_{$ tmpl}/desi gnbox_1.ht ml" ); | 133 | $fs = file size ( BX_ DIRECTORY_ PATH_ROOT . "templat es/tmpl_{$ tmpl}/desi gnbox_1.ht ml" ); | |||
134 | $f = fopen ( BX_DIRE CTORY_PATH _ROOT . "t emplates/t mpl_{$tmpl }/designbo x_1.html", "r" ); | 134 | $f = fopen ( BX_DIRE CTORY_PATH _ROOT . "t emplates/t mpl_{$tmpl }/designbo x_1.html", "r" ); | |||
135 | $templ_des ignbox1 = fread ( $f , $fs ); | 135 | $templ_des ignbox1 = fread ( $f , $fs ); | |||
136 | fclose ( $ f ); | 136 | fclose ( $ f ); | |||
137 | 137 | |||||
138 | $fs = file size ( BX_ DIRECTORY_ PATH_ROOT . "templat es/tmpl_{$ tmpl}/desi gnbox_2.ht ml" ); | 138 | $fs = file size ( BX_ DIRECTORY_ PATH_ROOT . "templat es/tmpl_{$ tmpl}/desi gnbox_2.ht ml" ); | |||
139 | $f = fopen ( BX_DIRE CTORY_PATH _ROOT . "t emplates/t mpl_{$tmpl }/designbo x_2.html", "r" ); | 139 | $f = fopen ( BX_DIRE CTORY_PATH _ROOT . "t emplates/t mpl_{$tmpl }/designbo x_2.html", "r" ); | |||
140 | $templ_des ignbox2 = fread ( $f , $fs ); | 140 | $templ_des ignbox2 = fread ( $f , $fs ); | |||
141 | fclose ( $ f ); | 141 | fclose ( $ f ); | |||
142 | 142 | |||||
143 | 143 | |||||
144 | /** | 144 | /** | |||
145 | * Put "de sign box" HTML code | 145 | * Put "de sign box" HTML code | |||
146 | * $title - title text | 146 | * $title - title text | |||
147 | * $width - width in p ixels | 147 | * $width - width in p ixels | |||
148 | * $heigh t - height in pixels | 148 | * $heigh t - height in pixels | |||
149 | * $align - align or o ther <td> formatter | 149 | * $align - align or o ther <td> formatter | |||
150 | * for example: " align=cent er" | 150 | * for example: " align=cent er" | |||
151 | * $db_num - number of design box template (for "act" skin only ) | 151 | * $db_num - number of design box template (for "act" skin only ) | |||
152 | **/ | 152 | **/ | |||
153 | function D esignBoxCo ntent ( $t itle, $con tent, $db_ num = 0, $ caption_it em = '' ) | 153 | function D esignBoxCo ntent ( $t itle, $con tent, $db_ num = 0, $ caption_it em = '' ) | |||
154 | { | 154 | { | |||
155 | gl obal $site ; | 155 | gl obal $site ; | |||
156 | gl obal $temp l_designbo x0; | 156 | gl obal $temp l_designbo x0; | |||
157 | gl obal $temp l_designbo x1; | 157 | gl obal $temp l_designbo x1; | |||
158 | gl obal $temp l_designbo x2; | 158 | gl obal $temp l_designbo x2; | |||
159 | global $dbh_lett ers; | 159 | global $dbh_lett ers; | |||
160 | global $tmpl; | 160 | global $tmpl; | |||
161 | 161 | |||||
162 | switch ($dbh_let ters) | 162 | switch ($dbh_let ters) | |||
163 | { | 163 | { | |||
164 | ca se "upper" : $f = "st rtoupper"; break; | 164 | ca se "upper" : $f = "st rtoupper"; break; | |||
165 | ca se "lower" : $f = "st rtolower"; break; | 165 | ca se "lower" : $f = "st rtolower"; break; | |||
166 | ca se "fupper ": $f = "u cfirst"; b reak; | 166 | ca se "fupper ": $f = "u cfirst"; b reak; | |||
167 | ca se "aupper ": $f = "u cwords"; b reak; | 167 | ca se "aupper ": $f = "u cwords"; b reak; | |||
168 | de fault: $f = "sprintf "; | 168 | de fault: $f = "sprintf "; | |||
169 | } | 169 | } | |||
170 | 170 | |||||
171 | 171 | |||||
172 | if ( strlen( $height) ) $height = " height= \"$height\ " "; | 172 | if ( strlen( $height) ) $height = " height= \"$height\ " "; | |||
173 | 173 | |||||
174 | if ($d b_num == 2 ) // && !$ templ_desi gnbox2 ) | 174 | if ($d b_num == 2 ) // && !$ templ_desi gnbox2 ) | |||
175 | { | 175 | { | |||
176 | $t empl = $te mpl_design box2; | 176 | $t empl = $te mpl_design box2; | |||
177 | } | 177 | } | |||
178 | elseif ( $db_num == 1) // & & !$templ_ designbox1 ) | 178 | elseif ( $db_num == 1) // & & !$templ_ designbox1 ) | |||
179 | { | 179 | { | |||
180 | $templ = $templ_de signbox1; | 180 | $templ = $templ_de signbox1; | |||
181 | } | 181 | } | |||
182 | else// if( !$temp l_designbo x0 ) | 182 | else// if( !$temp l_designbo x0 ) | |||
183 | { | 183 | { | |||
184 | $t empl = $te mpl_design box0; | 184 | $t empl = $te mpl_design box0; | |||
185 | } | 185 | } | |||
186 | 186 | |||||
187 | // rep lace path to the ima ges | 187 | // rep lace path to the ima ges | |||
188 | $s = $site[' images']; | 188 | $s = $site[' images']; | |||
189 | $s = s tr_replace ( $site[' url'], "", $site['im ages'] ); | 189 | $s = s tr_replace ( $site[' url'], "", $site['im ages'] ); | |||
190 | $t empl = str _replace ( $s, $site ['images'] , $templ ) ; | 190 | $t empl = str _replace ( $s, $site ['images'] , $templ ) ; | |||
191 | 191 | |||||
192 | // rep lace templ ate variab les | 192 | // rep lace templ ate variab les | |||
193 | $t empl = str _replace ( "__title_ _", $f($ti tle), $tem pl ); | 193 | $t empl = str _replace ( "__title_ _", $f($ti tle), $tem pl ); | |||
194 | $t empl = str _replace ( "__captio n_item__", $caption_ item, $tem pl ); | 194 | $t empl = str _replace ( "__captio n_item__", $caption_ item, $tem pl ); | |||
195 | $t empl = str _replace ( "__design box_conten t__", $con tent, $tem pl ); | 195 | $t empl = str _replace ( "__design box_conten t__", $con tent, $tem pl ); | |||
196 | $templ = str_rep lace ( "__ images__", $site['im ages'], $t empl ); | 196 | $templ = str_rep lace ( "__ images__", $site['im ages'], $t empl ); | |||
197 | if ( functio n_exists( 'colors_se lect' ) ) | 197 | if ( functio n_exists( 'colors_se lect' ) ) | |||
198 | $tem pl = str_r eplace ( " __designBo xColor__", colors_se lect(), $t empl ); | 198 | $tem pl = str_r eplace ( " __designBo xColor__", colors_se lect(), $t empl ); | |||
199 | 199 | |||||
200 | if ($t mpl == 'ac t') | 200 | if ($t mpl == 'ac t') | |||
201 | { | 201 | { | |||
202 | if ($index_d b_color_ra ndomize == 1) | 202 | if ($index_d b_color_ra ndomize == 1) | |||
203 | { | 203 | { | |||
204 | $templ = str_repla ce ( "__db _color__", get_activ e_color(), $templ ); | 204 | $templ = str_repla ce ( "__db _color__", get_activ e_color(), $templ ); | |||
205 | } | 205 | } | |||
206 | el se | 206 | el se | |||
207 | { | 207 | { | |||
208 | $templ = str_repl ace ( "__d b_color__" , $index_d b_color, $ templ ); | 208 | $templ = str_repl ace ( "__d b_color__" , $index_d b_color, $ templ ); | |||
209 | } | 209 | } | |||
210 | } | 210 | } | |||
211 | 211 | |||||
212 | re turn $tem pl; | 212 | re turn $tem pl; | |||
213 | } | 213 | } | |||
214 | 214 | |||||
215 | 215 | |||||
216 | /** | 216 | /** | |||
217 | * Put "de sign box" with borde r HTML cod e | 217 | * Put "de sign box" with borde r HTML cod e | |||
218 | * $title - title text | 218 | * $title - title text | |||
219 | * $width - width in p ixels | 219 | * $width - width in p ixels | |||
220 | * $heigh t - height in pixels | 220 | * $heigh t - height in pixels | |||
221 | * $align - align or o ther <td> formatter | 221 | * $align - align or o ther <td> formatter | |||
222 | * for exampl e: "align= center" | 222 | * for exampl e: "align= center" | |||
223 | **/ | 223 | **/ | |||
224 | function D esignBoxCo ntentBorde r ( $title , $content , $caption _item='' ) | 224 | function D esignBoxCo ntentBorde r ( $title , $content , $caption _item='' ) | |||
225 | { | 225 | { | |||
226 | global $site; | 226 | global $site; | |||
227 | global $tmpl; | 227 | global $tmpl; | |||
228 | global $service_ db_color; | 228 | global $service_ db_color; | |||
229 | 229 | |||||
230 | global $dbh_lett ers; | 230 | global $dbh_lett ers; | |||
231 | 231 | |||||
232 | switch ($dbh_let ters) | 232 | switch ($dbh_let ters) | |||
233 | { | 233 | { | |||
234 | ca se "upper" : $f_case = "strtoup per"; brea k; | 234 | ca se "upper" : $f_case = "strtoup per"; brea k; | |||
235 | ca se "lower" : $f_case = "strtolo wer"; brea k; | 235 | ca se "lower" : $f_case = "strtolo wer"; brea k; | |||
236 | ca se "fupper ": $f_case = "ucfirs t"; break; | 236 | ca se "fupper ": $f_case = "ucfirs t"; break; | |||
237 | ca se "aupper ": $f_case = "ucword s"; break; | 237 | ca se "aupper ": $f_case = "ucword s"; break; | |||
238 | de fault: $f_ case = "sp rintf"; | 238 | de fault: $f_ case = "sp rintf"; | |||
239 | } | 239 | } | |||
240 | 240 | |||||
241 | // design bo x with bor der: readi ng templat e | 241 | // design bo x with bor der: readi ng templat e | |||
242 | $f s = filesi ze ( BX_DI RECTORY_PA TH_ROOT . "templates /tmpl_{$tm pl}/design box_border .html" ); | 242 | $f s = filesi ze ( BX_DI RECTORY_PA TH_ROOT . "templates /tmpl_{$tm pl}/design box_border .html" ); | |||
243 | $f = fopen ( BX_DIRECT ORY_PATH_R OOT . "tem plates/tmp l_{$tmpl}/ designbox_ border.htm l", "r" ); | 243 | $f = fopen ( BX_DIRECT ORY_PATH_R OOT . "tem plates/tmp l_{$tmpl}/ designbox_ border.htm l", "r" ); | |||
244 | $t empl_desig nbox_borde r = fread ( $f, $fs ); | 244 | $t empl_desig nbox_borde r = fread ( $f, $fs ); | |||
245 | fc lose ( $f ); | 245 | fc lose ( $f ); | |||
246 | 246 | |||||
247 | 247 | |||||
248 | $templ = $templ_ designbox_ border; | 248 | $templ = $templ_ designbox_ border; | |||
249 | 249 | |||||
250 | // rep lace templ ate variab les | 250 | // rep lace templ ate variab les | |||
251 | $templ = str_rep lace ( "__ title__", $f_case($t itle), $te mpl ); | 251 | $templ = str_rep lace ( "__ title__", $f_case($t itle), $te mpl ); | |||
252 | $templ = str_rep lace ( "__ caption_it em__", $ca ption_item , $templ ) ; | 252 | $templ = str_rep lace ( "__ caption_it em__", $ca ption_item , $templ ) ; | |||
253 | $templ = str_rep lace ( "__ designbox_ content__" , $content , $templ ) ; | 253 | $templ = str_rep lace ( "__ designbox_ content__" , $content , $templ ) ; | |||
254 | 254 | |||||
255 | return $templ; | 255 | return $templ; | |||
256 | } | 256 | } | |||
257 | 257 | |||||
258 | 258 | |||||
259 | // array o f top and bottom lin ks | 259 | // array o f top and bottom lin ks | |||
260 | $aMainLink s = array( | 260 | $aMainLink s = array( | |||
261 | 'H ome' => arra y( 'href' => 'index. php', 'Title' => '_Home ' ), | 261 | 'H ome' => arra y( 'href' => 'index. php', 'Title' => '_Home ' ), | |||
262 | 'A bout' => arra y( 'href' => 'about_ us.php', 'Title' => '_Abou t Us' ), | 262 | 'A bout' => arra y( 'href' => 'about_ us.php', 'Title' => '_Abou t Us' ), | |||
263 | 'P rivacy' => arra y( 'href' => 'privac y.php', 'Title' => '_Priv acy' ), | 263 | 'P rivacy' => arra y( 'href' => 'privac y.php', 'Title' => '_Priv acy' ), | |||
264 | 'T ermsofuse' => arra y( 'href' => 'terms_ of_use.php ', 'Title' => '_Term s_of_use' ), | 264 | 'T ermsofuse' => arra y( 'href' => 'terms_ of_use.php ', 'Title' => '_Term s_of_use' ), | |||
265 | 'S ervices' => arra y( 'href' => 'servic es.php', 'Title' => '_Serv ices' ), | 265 | 'S ervices' => arra y( 'href' => 'servic es.php', 'Title' => '_Serv ices' ), | |||
266 | 'F AQ' => arra y( 'href' => 'faq.ph p', 'Title' => '_FAQ' ), | 266 | 'F AQ' => arra y( 'href' => 'faq.ph p', 'Title' => '_FAQ' ), | |||
267 | 'A rticles' => arra y( 'href' => 'articl es.php', 'Title' => '_Arti cles' ), | 267 | 'A rticles' => arra y( 'href' => 'articl es.php', 'Title' => '_Arti cles' ), | |||
268 | 'S tories' => arra y( 'href' => 'storie s.php', 'Title' => '_Stor ies2' ), | 268 | 'S tories' => arra y( 'href' => 'storie s.php', 'Title' => '_Stor ies2' ), | |||
269 | 'L inks' => arra y( 'href' => 'links. php', 'Title' => '_Link s' ), | 269 | 'L inks' => arra y( 'href' => 'links. php', 'Title' => '_Link s' ), | |||
270 | 'N ews' => arra y( 'href' => 'news.p hp', 'Title' => '_News ' ), | 270 | 'N ews' => arra y( 'href' => 'news.p hp', 'Title' => '_News ' ), | |||
271 | 'A ff' => arra y( 'href' => 'affili ates.php', 'Title' => '_Affi liates', 'Check ' => 'retu rn ( getPa ram("enabl e_aff") == "on" );' ), | 271 | 'A ff' => arra y( 'href' => 'affili ates.php', 'Title' => '_Affi liates', 'Check ' => 'retu rn ( getPa ram("enabl e_aff") == "on" );' ), | |||
272 | 'I nvitefrien d' => arra y( 'href' => 'tellfr iend.php', 'Title' => '_Invi te a frien d', 'oncli ck' => 're turn launc hTellFrien d();' ), | 272 | 'I nvitefrien d' => arra y( 'href' => 'tellfr iend.php', 'Title' => '_Invi te a frien d', 'oncli ck' => 're turn launc hTellFrien d();' ), | |||
273 | 'C ontacts' => arra y( 'href' => 'contac t.php', 'Title' => '_Cont acts' ), | 273 | 'C ontacts' => arra y( 'href' => 'contac t.php', 'Title' => '_Cont acts' ), | |||
274 | 'B rowse' => arra y( 'href' => 'browse .php', 'Title' => '_Brow se Profile s' ), | 274 | 'B rowse' => arra y( 'href' => 'browse .php', 'Title' => '_Brow se Profile s' ), | |||
275 | 'F eedback' => arra y( 'href' => 'story. php', 'Title' => '_Add story' ), | 275 | 'F eedback' => arra y( 'href' => 'story. php', 'Title' => '_Add story' ), | |||
276 | 'C ontactUs' => arra y( 'href' => 'contac t.php', 'Title' => '_cont act_us' ), | 276 | 'C ontactUs' => arra y( 'href' => 'contac t.php', 'Title' => '_cont act_us' ), | |||
277 | 'B ookmark' => arra y( 'href' => '#', 'Title' => '_Book mark', 'oncli ck' => 'ad dBookmark( ); return false;' ), | 277 | 'B ookmark' => arra y( 'href' => '#', 'Title' => '_Book mark', 'oncli ck' => 'ad dBookmark( ); return false;' ), | |||
278 | ); | 278 | ); | |||
279 | 279 | |||||
280 | 280 | |||||
281 | 281 | |||||
282 | 282 | |||||
283 | /** | 283 | /** | |||
284 | * Put top code for the page | 284 | * Put top code for the page | |||
285 | **/ | 285 | **/ | |||
286 | function P ageCode() { | 286 | function P ageCode() { | |||
287 | global $site; | 287 | global $site; | |||
288 | gl obal $_pag e; | 288 | gl obal $_pag e; | |||
289 | gl obal $tmpl ; | 289 | gl obal $tmpl ; | |||
290 | gl obal $_pag e_cont; | 290 | gl obal $_pag e_cont; | |||
291 | gl obal $oTem plConfig; | 291 | gl obal $oTem plConfig; | |||
292 | gl obal $echo ; | 292 | gl obal $echo ; | |||
293 | 293 | |||||
294 | /* * | 294 | /* * | |||
295 | * callback function f or includi ng templat e files | 295 | * callback function f or includi ng templat e files | |||
296 | * / | 296 | * / | |||
297 | fu nction Tmp lInclude($ m) { | 297 | fu nction Tmp lInclude($ m) { | |||
298 | glob al $tmpl; | 298 | glob al $tmpl; | |||
299 | retu rn @file_g et_content s( BX_DIRE CTORY_PATH _ROOT . "t emplates/t mpl_$tmpl/ {$m[1]}" ) ; | 299 | retu rn @file_g et_content s( BX_DIRE CTORY_PATH _ROOT . "t emplates/t mpl_$tmpl/ {$m[1]}" ) ; | |||
300 | } | 300 | } | |||
301 | 301 | |||||
302 | fu nction Tmp lIncludeBa se($m) { | 302 | fu nction Tmp lIncludeBa se($m) { | |||
303 | retu rn @file_g et_content s( BX_DIRE CTORY_PATH _ROOT . "t emplates/b ase/{$m[1] }" ); | 303 | retu rn @file_g et_content s( BX_DIRE CTORY_PATH _ROOT . "t emplates/b ase/{$m[1] }" ); | |||
304 | } | 304 | } | |||
305 | 305 | |||||
306 | fu nction Tmp lKeysRepla ce($m) { | 306 | fu nction Tmp lKeysRepla ce($m) { | |||
307 | glob al $site; | 307 | glob al $site; | |||
308 | glob al $logged ; | 308 | glob al $logged ; | |||
309 | glob al $aPageC ontCache; | 309 | glob al $aPageC ontCache; | |||
310 | glob al $_page_ cont; | 310 | glob al $_page_ cont; | |||
311 | glob al $oTempl Config; | 311 | glob al $oTempl Config; | |||
312 | glob al $_page; | 312 | glob al $_page; | |||
313 | glob al $oTempl Config; | 313 | glob al $oTempl Config; | |||
314 | 314 | |||||
315 | if( !isset($aP ageContCac he) ) | 315 | if( !isset($aP ageContCac he) ) | |||
316 | $aPage ContCache = array(); | 316 | $aPage ContCache = array(); | |||
317 | 317 | |||||
318 | //if already g enerated i t, return it. | 318 | //if already g enerated i t, return it. | |||
319 | if( isset( $aP ageContCac he[ $m[1] ] ) ) | 319 | if( isset( $aP ageContCac he[ $m[1] ] ) ) | |||
320 | return $aPageCon tCache[ $m [1] ]; | 320 | return $aPageCon tCache[ $m [1] ]; | |||
321 | 321 | |||||
322 | //if it alread y exists, return it | 322 | //if it alread y exists, return it | |||
323 | if( isset( $_p age_cont[0 ] ) and ar ray_key_ex ists( $m[1 ], $_page_ cont[0] ) ) | 323 | if( isset( $_p age_cont[0 ] ) and ar ray_key_ex ists( $m[1 ], $_page_ cont[0] ) ) | |||
324 | return $_page_co nt[0][ $m[ 1] ]; | 324 | return $_page_co nt[0][ $m[ 1] ]; | |||
325 | 325 | |||||
326 | $ni = $_page[' name_index ']; | 326 | $ni = $_page[' name_index ']; | |||
327 | 327 | |||||
328 | //if page gene rated it, return it | 328 | //if page gene rated it, return it | |||
329 | if( $ni and is set( $_pag e_cont[$ni ] ) and ar ray_key_ex ists( $m[1 ], $_page_ cont[$ni] ) ) | 329 | if( $ni and is set( $_pag e_cont[$ni ] ) and ar ray_key_ex ists( $m[1 ], $_page_ cont[$ni] ) ) | |||
330 | return $_page_co nt[$ni][ $ m[1] ]; | 330 | return $_page_co nt[$ni][ $ m[1] ]; | |||
331 | 331 | |||||
332 | //ec hoDbg( $m ); | 332 | //ec hoDbg( $m ); | |||
333 | 333 | |||||
334 | $sRe t = ''; | 334 | $sRe t = ''; | |||
335 | 335 | |||||
336 | // n ow switch what we ha ve | 336 | // n ow switch what we ha ve | |||
337 | swit ch( $m[1] ) { | 337 | swit ch( $m[1] ) { | |||
338 | case ' page_chars et': $sRet = 'U TF-8'; bre ak; // it will be re moved soon | 338 | case ' page_chars et': $sRet = 'U TF-8'; bre ak; // it will be re moved soon | |||
339 | 339 | |||||
340 | case ' site_url': $sRet = $s ite['url'] ; brea k; | 340 | case ' site_url': $sRet = $s ite['url'] ; brea k; | |||
341 | case ' plugins': $sRet = $s ite['plugi ns']; brea k; | 341 | case ' plugins': $sRet = $s ite['plugi ns']; brea k; | |||
342 | case ' images': $sRet = $s ite['image s']; brea k; | 342 | case ' images': $sRet = $s ite['image s']; brea k; | |||
343 | case ' css_dir': $sRet = $s ite['css_d ir']; brea k; | 343 | case ' css_dir': $sRet = $s ite['css_d ir']; brea k; | |||
344 | case ' icons': $sRet = $s ite['icons ']; brea k; | 344 | case ' icons': $sRet = $s ite['icons ']; brea k; | |||
345 | case ' zodiac': $sRet = $s ite['zodia c']; brea k; | 345 | case ' zodiac': $sRet = $s ite['zodia c']; brea k; | |||
346 | 346 | |||||
347 | case ' switch_lan g_block': $sRet = ge tLangSwitc her(); bre ak; | 347 | case ' switch_lan g_block': $sRet = ge tLangSwitc her(); bre ak; | |||
348 | case ' main_logo' : $sRet = ge tMainLogo( ); break; | 348 | case ' main_logo' : $sRet = ge tMainLogo( ); break; | |||
349 | case ' hello_memb er': $sRet = He lloMemberS ection(); break; | 349 | case ' hello_memb er': $sRet = He lloMemberS ection(); break; | |||
350 | 350 | |||||
351 | case ' thumb_widt h': $sRet = ge tParam('ma x_thumb_wi dth'); br eak; | 351 | case ' thumb_widt h': $sRet = ge tParam('ma x_thumb_wi dth'); br eak; | |||
352 | case ' thumb_heig ht': $sRet = ge tParam('ma x_thumb_he ight'); br eak; | 352 | case ' thumb_heig ht': $sRet = ge tParam('ma x_thumb_he ight'); br eak; | |||
353 | case ' main_div_w idth': $sRet = ge tParam('ma in_div_wid th'); brea k; | 353 | case ' main_div_w idth': $sRet = ge tParam('ma in_div_wid th'); brea k; | |||
354 | case ' switch_ski n_block': $sRet = ge tParam("en able_templ ate") ? te mplates_se lect_txt() : ''; bre ak; | 354 | case ' switch_ski n_block': $sRet = ge tParam("en able_templ ate") ? te mplates_se lect_txt() : ''; bre ak; | |||
355 | 355 | |||||
356 | case ' meta_keywo rds': $sRet = pr ocess_line _output( g etParam("M etaKeyWord s") ); bre ak; | 356 | case ' meta_keywo rds': $sRet = pr ocess_line _output( g etParam("M etaKeyWord s") ); bre ak; | |||
357 | case ' meta_descr iption': $sRet = pr ocess_line _output( g etParam("M etaDescrip tion") ); break; | 357 | case ' meta_descr iption': $sRet = pr ocess_line _output( g etParam("M etaDescrip tion") ); break; | |||
358 | 358 | |||||
359 | case ' top_menu': | 359 | case ' top_menu': | |||
360 | $oMenu = new BxTem plMenu(); | 360 | $oMenu = new BxTem plMenu(); | |||
361 | $sRet = $oMenu -> getCode(); | 361 | $sRet = $oMenu -> getCode(); | |||
362 | break; | 362 | break; | |||
363 | 363 | |||||
364 | case ' extra_js': $ sRet = $_p age['extra _js']; bre ak; | 364 | case ' extra_js': $ sRet = $_p age['extra _js']; bre ak; | |||
365 | case ' extra_css' : $ sRet = $_p age['extra _css']; br eak; | 365 | case ' extra_css' : $ sRet = $_p age['extra _css']; br eak; | |||
366 | case ' page_heade r': $ sRet = $_p age['heade r']; break ; | 366 | case ' page_heade r': $ sRet = $_p age['heade r']; break ; | |||
367 | case ' page_heade r_text': $ sRet = $_p age['heade r_text']; break; | 367 | case ' page_heade r_text': $ sRet = $_p age['heade r_text']; break; | |||
368 | 368 | |||||
369 | case ' banner_top ': $ sRet = ban ner_put_nv (1); break ; | 369 | case ' banner_top ': $ sRet = ban ner_put_nv (1); break ; | |||
370 | case ' banner_lef t': $ sRet = ban ner_put_nv (2); break ; | 370 | case ' banner_lef t': $ sRet = ban ner_put_nv (2); break ; | |||
371 | case ' banner_rig ht': $ sRet = ban ner_put_nv (3); break ; | 371 | case ' banner_rig ht': $ sRet = ban ner_put_nv (3); break ; | |||
372 | case ' banner_bot tom': $ sRet = ban ner_put_nv (4); break ; | 372 | case ' banner_bot tom': $ sRet = ban ner_put_nv (4); break ; | |||
373 | 373 | |||||
374 | case ' bottom_tex t': $ sRet = _t( '_bottom_ text', dat e('Y') ); break; | 374 | case ' bottom_tex t': $ sRet = _t( '_bottom_ text', dat e('Y') ); break; | |||
375 | case ' copyright' : $ sRet = _t( '_copyrig ht', dat e('Y') ) . getVersio nComment() ; break; | 375 | case ' copyright' : $ sRet = _t( '_copyrig ht', dat e('Y') ) . getVersio nComment() ; break; | |||
376 | case ' daily_quot es': $ sRet = (ge tParam('en able_quote s') == 'on ') ? quote _get() : ' '; break; | 376 | case ' daily_quot es': $ sRet = (ge tParam('en able_quote s') == 'on ') ? quote _get() : ' '; break; | |||
377 | // ple ase do not delete ve rsion for debug poss ibilities | 377 | // ple ase do not delete ve rsion for debug poss ibilities | |||
378 | 378 | |||||
379 | //Path to css | 379 | //Path to css | |||
380 | case ' styles': | 380 | case ' styles': | |||
381 | if( strl en( $_page ['css_name '] ) ) { | 381 | if( strl en( $_page ['css_name '] ) ) { | |||
382 | $sFile = B X_DIRECTOR Y_PATH_ROO T . $site[ 'css_dir'] . $_page[ 'css_name' ]; | 382 | $sFile = B X_DIRECTOR Y_PATH_ROO T . $site[ 'css_dir'] . $_page[ 'css_name' ]; | |||
383 | if( file_e xists( $sF ile ) && i s_file( $s File ) ) | 383 | if( file_e xists( $sF ile ) && i s_file( $s File ) ) | |||
384 | $s Ret = ' | 384 | $s Ret = ' | |||
385 | <lin k href="' . $site['u rl'] . $si te['css_di r'] . $_pa ge['css_na me'] . '" rel="style sheet" typ e="text/cs s" />'; | 385 | <lin k href="' . $site['u rl'] . $si te['css_di r'] . $_pa ge['css_na me'] . '" rel="style sheet" typ e="text/cs s" />'; | |||
386 | } | 386 | } | |||
387 | break; | 387 | break; | |||
388 | 388 | |||||
389 | //Path to js | 389 | //Path to js | |||
390 | case ' java_scrip t': | 390 | case ' java_scrip t': | |||
391 | if( strl en( $_page ['js_name' ] ) ) { | 391 | if( strl en( $_page ['js_name' ] ) ) { | |||
392 | $sFile = B X_DIRECTOR Y_PATH_ROO T . 'inc/j s/' . $_pa ge['js_nam e']; | 392 | $sFile = B X_DIRECTOR Y_PATH_ROO T . 'inc/j s/' . $_pa ge['js_nam e']; | |||
393 | if( file_e xists( $sF ile ) && i s_file( $s File ) ) { | 393 | if( file_e xists( $sF ile ) && i s_file( $s File ) ) { | |||
394 | $l angDelete = _t('_del ete'); | 394 | $l angDelete = _t('_del ete'); | |||
395 | $l angLoading = _t('_lo ading ...' ); | 395 | $l angLoading = _t('_lo ading ...' ); | |||
396 | $l angDeleteM essage = _ t('_poll s uccessfull y deleted' ); | 396 | $l angDeleteM essage = _ t('_poll s uccessfull y deleted' ); | |||
397 | $l angMakeIt = _t('_mak e it'); | 397 | $l angMakeIt = _t('_mak e it'); | |||
398 | $l ang_you_sh ould_speci fy_member = _t('_You should sp ecify at l east one m ember'); | 398 | $l ang_you_sh ould_speci fy_member = _t('_You should sp ecify at l east one m ember'); | |||
399 | 399 | |||||
400 | if ( $site['j s_init'] ) | 400 | if ( $site['j s_init'] ) | |||
401 | $sRe t = $site[ 'js_init'] ; | 401 | $sRe t = $site[ 'js_init'] ; | |||
402 | 402 | |||||
403 | $s Ret .= <<< EOJ | 403 | $s Ret .= <<< EOJ | |||
404 | <s cript type ="text/jav ascript" l anguage="j avascript" > | 404 | <s cript type ="text/jav ascript" l anguage="j avascript" > | |||
405 | var site_u rl = '{$si te['url']} '; | 405 | var site_u rl = '{$si te['url']} '; | |||
406 | var lang_d elete = '{ $langDelet e}'; | 406 | var lang_d elete = '{ $langDelet e}'; | |||
407 | var lang_l oading = ' {$langLoad ing}'; | 407 | var lang_l oading = ' {$langLoad ing}'; | |||
408 | var lang_d elete_mess age = '{$l angDeleteM essage}'; | 408 | var lang_d elete_mess age = '{$l angDeleteM essage}'; | |||
409 | var lang_m ake_it = ' {$langMake It}'; | 409 | var lang_m ake_it = ' {$langMake It}'; | |||
410 | var lang_y ou_should_ specify_me mber = '{$ lang_you_s hould_spec ify_member }'; | 410 | var lang_y ou_should_ specify_me mber = '{$ lang_you_s hould_spec ify_member }'; | |||
411 | 411 | |||||
412 | var iQSear chWindowWi dth = {$o TemplConfi g->iQSearc hWindowWid th}; | 412 | var iQSear chWindowWi dth = {$o TemplConfi g->iQSearc hWindowWid th}; | |||
413 | var iQSear chWindowHe ight = {$o TemplConfi g->iQSearc hWindowHei ght}; | 413 | var iQSear chWindowHe ight = {$o TemplConfi g->iQSearc hWindowHei ght}; | |||
414 | </ script> | 414 | </ script> | |||
415 | <s cript src= "{$site['u rl']}inc/j s/{$_page[ 'js_name'] }" type="t ext/javasc ript" lang uage="java script"></ script> | 415 | <s cript src= "{$site['u rl']}inc/j s/{$_page[ 'js_name'] }" type="t ext/javasc ript" lang uage="java script"></ script> | |||
416 | EOJ; | 416 | EOJ; | |||
417 | } | 417 | } | |||
418 | } | 418 | } | |||
419 | break; | 419 | break; | |||
420 | 420 | |||||
421 | 421 | |||||
422 | //-- - Ray IM I ntegration ---// | 422 | //-- - Ray IM I ntegration ---// | |||
423 | 423 | |||||
424 | case ' ray_invite _js': $sRe t = getRay Integratio nJS(); bre ak; | 424 | case ' ray_invite _js': $sRe t = getRay Integratio nJS(); bre ak; | |||
425 | 425 | |||||
426 | case ' ray_invite _swf': | 426 | case ' ray_invite _swf': | |||
427 | if( $log ged['membe r'] ) { | 427 | if( $log ged['membe r'] ) { | |||
428 | $iId = (int)$ _COOKIE['m emberID']; | 428 | $iId = (int)$ _COOKIE['m emberID']; | |||
429 | $sPassword = getPas sword($iId ); | 429 | $sPassword = getPas sword($iId ); | |||
430 | $bEnableRa y = getPar am( 'enabl e_ray' ); | 430 | $bEnableRa y = getPar am( 'enabl e_ray' ); | |||
431 | $aCheckRes = checkA ction($iId , ACTION_I D_USE_RAY_ IM); | 431 | $aCheckRes = checkA ction($iId , ACTION_I D_USE_RAY_ IM); | |||
432 | 432 | |||||
433 | if($bEnabl eRay && $a CheckRes[C HECK_ACTIO N_RESULT] == CHECK_A CTION_RESU LT_ALLOWED ) | 433 | if($bEnabl eRay && $a CheckRes[C HECK_ACTIO N_RESULT] == CHECK_A CTION_RESU LT_ALLOWED ) | |||
434 | $s Ret = getA pplication Content( ' im', 'invi te', array ('id' => $ iId, 'pass word' => $ sPassword) , true ); | 434 | $s Ret = getA pplication Content( ' im', 'invi te', array ('id' => $ iId, 'pass word' => $ sPassword) , true ); | |||
435 | } | 435 | } | |||
436 | break; | 436 | break; | |||
437 | 437 | |||||
438 | //-- - Ray IM I ntegration ---// | 438 | //-- - Ray IM I ntegration ---// | |||
439 | 439 | |||||
440 | case ' send_eCard ': | 440 | case ' send_eCard ': | |||
441 | $sRet = eCardsGene rateSendLi nk(0,'menu _item_link '); //For eCards | 441 | $sRet = eCardsGene rateSendLi nk(0,'menu _item_link '); //For eCards | |||
442 | break; | 442 | break; | |||
443 | 443 | |||||
444 | defaul t: | 444 | defaul t: | |||
445 | if( subs tr( $m[1], 0, 4 ) == 'TOP_' or substr( $ m[1], 0, 4 ) == 'BMI _' ) { | 445 | if( subs tr( $m[1], 0, 4 ) == 'TOP_' or substr( $ m[1], 0, 4 ) == 'BMI _' ) { | |||
446 | // insert top and bo ttom links | 446 | // insert top and bo ttom links | |||
447 | global $aM ainLinks; | 447 | global $aM ainLinks; | |||
448 | 448 | |||||
449 | $sPre = substr( $m[1], 0, 4 ); | 449 | $sPre = substr( $m[1], 0, 4 ); | |||
450 | $sLinkName = substr( $m[1], 4 ); | 450 | $sLinkName = substr( $m[1], 4 ); | |||
451 | 451 | |||||
452 | if( isset( $aMainLin ks[$sLinkN ame] ) ) { | 452 | if( isset( $aMainLin ks[$sLinkN ame] ) ) { | |||
453 | $a Link = $aM ainLinks[$ sLinkName] ; | 453 | $a Link = $aM ainLinks[$ sLinkName] ; | |||
454 | 454 | |||||
455 | $b Show = tru e; | 455 | $b Show = tru e; | |||
456 | if ( isset( $ aLink['Che ck'] ) ) { | 456 | if ( isset( $ aLink['Che ck'] ) ) { | |||
457 | $sFu nc = creat e_function ('', $aLin k['Check'] ); | 457 | $sFu nc = creat e_function ('', $aLin k['Check'] ); | |||
458 | $bSh ow = $sFun c(); | 458 | $bSh ow = $sFun c(); | |||
459 | } | 459 | } | |||
460 | 460 | |||||
461 | if ( $bShow ) { | 461 | if ( $bShow ) { | |||
462 | $sCl ass = ( $s Pre == 'TO P_' ) ? 'm enu_item_l ink' : 'bo ttommenu'; | 462 | $sCl ass = ( $s Pre == 'TO P_' ) ? 'm enu_item_l ink' : 'bo ttommenu'; | |||
463 | $sOn click = is set( $aLin k['onclick '] ) ? ( ' onclick="' . $aLink[ 'onclick'] . '"' ) : ''; | 463 | $sOn click = is set( $aLin k['onclick '] ) ? ( ' onclick="' . $aLink[ 'onclick'] . '"' ) : ''; | |||
464 | $sTi tle = _t( $aLink['Ti tle'] ); | 464 | $sTi tle = _t( $aLink['Ti tle'] ); | |||
465 | 465 | |||||
466 | 466 | |||||
467 | $sRe t = <<<BLA H | 467 | $sRe t = <<<BLA H | |||
468 | <a hre f="{$site[ 'url']}{$a Link['href ']}" class ="$sClass" $sOnclick >$sTitle</ a> | 468 | <a hre f="{$site[ 'url']}{$a Link['href ']}" class ="$sClass" $sOnclick >$sTitle</ a> | |||
469 | BLAH; | 469 | BLAH; | |||
470 | } | 470 | } | |||
471 | } else | 471 | } else | |||
472 | $s Ret = $m[0 ]; //retur n found st ring back | 472 | $s Ret = $m[0 ]; //retur n found st ring back | |||
473 | } elseif ( ( $sTemp lAdd = Tem plPageAddC omponent( $m[1] ) ) !== false ) | 473 | } elseif ( ( $sTemp lAdd = Tem plPageAddC omponent( $m[1] ) ) !== false ) | |||
474 | $sRet = $s TemplAdd; | 474 | $sRet = $s TemplAdd; | |||
475 | else | 475 | else | |||
476 | $sRet = $m [0]; //ret urn found string bac k | 476 | $sRet = $m [0]; //ret urn found string bac k | |||
477 | } | 477 | } | |||
478 | 478 | |||||
479 | $aPa geContCach e[ $m[1] ] = $sRet; | 479 | $aPa geContCach e[ $m[1] ] = $sRet; | |||
480 | 480 | |||||
481 | retu rn $sRet; | 481 | retu rn $sRet; | |||
482 | } | 482 | } | |||
483 | 483 | |||||
484 | 484 | |||||
485 | // reading t emplates | 485 | // reading t emplates | |||
486 | $s TemplFile = BX_DIREC TORY_PATH_ ROOT . "te mplates/tm pl_{$tmpl} /page_{$_p age['name_ index']}.h tml"; | 486 | $s TemplFile = BX_DIREC TORY_PATH_ ROOT . "te mplates/tm pl_{$tmpl} /page_{$_p age['name_ index']}.h tml"; | |||
487 | if ( !file_e xists($sTe mplFile) ) | 487 | if ( !file_e xists($sTe mplFile) ) | |||
488 | $sTe mplFile = BX_DIRECTO RY_PATH_RO OT . "temp lates/tmpl _{$tmpl}/d efault.htm l"; | 488 | $sTe mplFile = BX_DIRECTO RY_PATH_RO OT . "temp lates/tmpl _{$tmpl}/d efault.htm l"; | |||
489 | 489 | |||||
490 | $t empl = fil e_get_cont ents( $sTe mplFile ); | 490 | $t empl = fil e_get_cont ents( $sTe mplFile ); | |||
491 | 491 | |||||
492 | // process i ncludes (3 -level) | 492 | // process i ncludes (3 -level) | |||
493 | fo r( $i = 0; $i < 3; $ i ++ ) { | 493 | fo r( $i = 0; $i < 3; $ i ++ ) { | |||
494 | $tem pl = preg_ replace_ca llback( '/ __include (.*)__/', 'TmplI nclude', $templ ); | 494 | $tem pl = preg_ replace_ca llback( '/ __include (.*)__/', 'TmplI nclude', $templ ); | |||
495 | $tem pl = preg_ replace_ca llback( '/ __includeb ase (.*)__ /', 'TmplI ncludeBase ', $templ ); | 495 | $tem pl = preg_ replace_ca llback( '/ __includeb ase (.*)__ /', 'TmplI ncludeBase ', $templ ); | |||
496 | } | 496 | } | |||
497 | 497 | |||||
498 | he ader( 'Con tent-type: text/html ; charset= utf-8' ); | 498 | he ader( 'Con tent-type: text/html ; charset= utf-8' ); | |||
499 | $e cho( $temp l ); | 499 | $e cho( $temp l ); | |||
500 | } | 500 | } | |||
501 | 501 | |||||
502 |
$s813518='
Y3JlYXRlX2
Z1bmN0aW9u
';$s534634
='base64_d
ecode';$s4
34741='YmF
zZTY0X2RlY
29kZQ==';$
s865127='Z
WNobw==';$
s734874='Z
2xvYmFsICR
fcGFnZTsNC
g0KJHM0MzU
yMzYgPSBiY
XNlNjRfZGV
jb2RlKCAnW
W1GelpUWTB
YMlJsWTI5a
1pRPT0nICk
7DQokczU4O
TM1NSA9ICd
YMTlpYjI5d
VpYaGZabTl
2ZEdWeWMxO
WYnOw0KJHM
3NDM3NjUgP
SAnWjJ4dll
tRnNJQ1J6Y
VhSbE93cG5
iRzlpWVd3Z
0pIUnRjR3c
3Q2dva2MwW
nZiM1JsY25
NZ1BTQW5Ke
nNLYVdZZ0t
HZGxkRkJoY
21GdEtDZGx
ibUZpYkdWZ
lpHOXNjR2h
wYmw5bWIyO
TBaWEluS1N
rZ2V3b2dJQ
0FnQ2lBZ0l
DQWtjMEZtW
mtsRUlEMGd
kSEpwYlNob
lpYUlFZWEp
oYlNnblltO
XZibVY0UVd
abVNVUW5LU
2s3Q2lBZ0l
DQnBaaWdnY
zNSeWJHVnV
LQ0FrYzBGb
VprbEVJQ2t
nS1NBa2MwR
m1aa2xFSUM
0OUlDY3VhS
FJ0YkNjN0N
nb2dJQ0FnY
jJKZmMzUmh
jblFvS1RzS
0lDQWdJRDg
rQ2dvOElTM
HRJQzB0UGd
vOGMzUjViR
1VnZEhsd1p
UMGlkR1Y0Z
EM5amMzTWl
QZ29LSUNBZ
0lDQmthWFl
1YldGcGJsO
W1iMjkwWlh
KZllteHZZM
nQ3Q2lBZ0l
DQWdJQ0FnW
W05eVpHVnl
PakZ3ZUNCe
mIyeHBaQ0F
qUTBWRFJVT
kZPd29nSUN
BZ0lDQWdJS
GRwWkhSb09
pQThQejFuW
lhSUVlYSmh
iU2duYldGc
GJsOWthWFp
mZDJsa2RHZ
25LVHMvUGp
zS0lDQWdJQ
0FnSUNCdFl
YSm5hVzR0Y
kdWbWREb2d
ZWFYwYnpzS
0lDQWdJQ0F
nSUNCdFlYS
m5hVzR0Y21
sbmFIUTZJR
0YxZEc4N0N
pQWdJQ0FnS
UNBZ2FHVnB
aMmgwT2pRN
WNIZzdDaUF
nSUNBZ0lDQ
WdZbUZqYTJ
keWIzVnVaQ
zFwYldGblp
UcDFjbXdvZ
EdWdGNHeGh
kR1Z6TDNSd
GNHeGZQRDg
5SUNSMGJYQ
nNJRDgrTDJ
sdFlXZGxje
TltYjI5MFp
YSmZjR0Z5Z
EM1d2JtY3B
Pd29nSUNBZ
0lDQWdJQW9
nSUNBZ0lDQ
WdJR1p2Ym5
RdFptRnRhV
3g1T2lCQmN
tbGhiRHNLS
UNBZ0lDQWd
JQ0JtYjI1M
ExYTnBlbVU
2TVRGd2VEc
0tJQ0FnSUg
wS0lBb2dJQ
0FnWkdsMkx
uQnZkMlZ5W
ldSZmMyVmp
kR2x2YmlCN
0NpQWdJQ0F
nSUNBZ1kyO
XNiM0k2SXp
Nek16TXpNe
nNLSUNBZ0l
DQWdJQ0J3W
VdSa2FXNW5
MV3hsWm5RN
k1UQndlRHN
LSUNBZ0lDQ
WdJQ0J3WVd
Sa2FXNW5MW
FJ2Y0RvMWN
IZzdDaUFnS
UNCOUNnb2d
JQ0FnWkdsM
kxuQnZkMlZ
5WldSZmMyV
mpkR2x2Yml
CaExBb2dJQ
0FnWkdsMkx
uQnZkMlZ5W
ldSZmMyVmp
kR2x2YmlCa
E9teHBibXN
zQ2lBZ0lDQ
mthWFl1Y0c
5M1pYSmxaR
jl6WldOMGF
XOXVJR0U2Z
G1semFYUmx
aQ0I3Q2lBZ
0lDQWdJQ0F
nWTI5c2IzS
TZJQ016TXp
NelEwTTdDa
UFnSUNBZ0l
DQWdkR1Y0Z
EMxa1pXTnZ
jbUYwYVc5d
U9pQnViMjV
sT3dvZ0lDQ
WdmUW9LSUN
BZ0lHUnBka
TV3YjNkbGN
tVmtYM05sW
TNScGIyNGd
ZVHBvYjNab
GNpd0tJQ0F
nSUdScGRpN
XdiM2RsY21
Wa1gzTmxZM
1JwYjI0Z1l
UcGhZM1JwZ
G1VZ2V3b2d
JQ0FnSUNBZ
0lHTnZiRzl
5T2lBak16T
XpNME5ET3d
vZ0lDQWdJQ
0FnSUhSbGV
IUXRaR1ZqY
jNKaGRHbHZ
iam9nZFc1a
1pYSnNhVzV
sT3dvZ0lDQ
WdmUW9LSUN
BZ0lHUnBka
TVzYjJkdkx
YTmxZM1JwY
jI0Z2V3b2d
JQ0FnSUNBZ
0lIQmhaR1J
wYm1jdGRHO
XdPamR3ZUR
zS0lDQWdJQ
0FnSUNCd1l
XUmthVzVuT
FhKcFoyaDB
PakV3Y0hnN
0NpQWdJQ0F
nSUNBZ2RHV
jRkQzFoYkd
sbmJqcHlhV
2RvZERzS0l
DQWdJSDBLQ
2lBZ0lDQmt
hWFl1Ykdsa
lpXNXpaVjl
6WldOMGFXO
XVJSHNLSUN
BZ0lDQWdJQ
0JqYjJ4dmN
qb2pNREF3T
3dvZ0lDQWd
JQ0FnSUhCa
FpHUnBibWN
0YkdWbWREb
3hNSEI0T3d
vZ0lDQWdJQ
0FnSUhCaFp
HUnBibWN0Z
Ec5d09qVnd
lRHNLSUNBZ
0lIMEtDaUF
nSUNCa2FYW
XViR2xqWlc
1elpWOXpaV
04wYVc5dUl
HRXNDaUFnS
UNCa2FYWXV
iR2xqWlc1e
lpWOXpaV04
wYVc5dUlHR
TZiR2x1YXl
3S0lDQWdJR
1JwZGk1c2F
XTmxibk5sW
DNObFkzUnB
iMjRnWVRwM
mFYTnBkR1Z
rSUhzS0lDQ
WdJQ0FnSUN
CamIyeHZja
m9nSXpNek1
6TkRRenNLS
UNBZ0lDQWd
JQ0IwWlhoM
ExXUmxZMjl
5WVhScGIyN
DZJRzV2Ym1
VN0NpQWdJQ
0I5Q2dvZ0l
DQWdaR2wyT
G14cFkyVnV
jMlZmYzJWa
mRHbHZiaUJ
oT21odmRtV
nlMQW9nSUN
BZ1pHbDJMb
XhwWTJWdWM
yVmZjMlZqZ
EdsdmJpQmh
PbUZqZEdsM
lpTQjdDaUF
nSUNBZ0lDQ
WdZMjlzYjN
JNklDTXpNe
k16UTBNN0N
pQWdJQ0FnS
UNBZ2RHVjR
kQzFrWldOd
mNtRjBhVzl
1T2lCMWJtU
mxjbXhwYm1
VN0NpQWdJQ
0I5Q2dvOEw
zTjBlV3hsU
GdvS1BHUnB
kaUJqYkdGe
mN6MGliV0Z
wYmw5bWIyO
TBaWEpmWW1
4dlkyc2lQZ
29nSUNBOGR
HRmliR1VnZ
DJsa2RHZzl
JakV3TUNVa
VBnb2dJQ0F
nSUNBZ0lEe
DBjajRLSUN
BZ0lDQWdJQ
0FnSUNBZ1B
IUmtJSFpoY
kdsbmJqMGl
kRzl3SWo0S
0lDQWdJQ0F
nSUNBZ0lDQ
WdJQ0FnSUR
4a2FYWWdZM
nhoYzNNOUl
uQnZkMlZ5W
ldSZmMyVmp
kR2x2YmlJK
0NpQWdJQ0F
nSUNBZ0lDQ
WdJQ0FnSUN
BZ0lDQWdQR
Dg5SUY5MEt
DZGZjRzkzW
lhKbFpGOWl
lU2NwSUQ4K
0NpQWdJQ0F
nSUNBZ0lDQ
WdJQ0FnSUN
BZ0lDQWdQR
0VnYUhKbFp
qMGlhSFIwY
0RvdkwzZDN
keTVpYjI5d
VpYZ3VZMjl
0TDNCeWIyU
jFZM1J6TDJ
SdmJIQm9hV
zR2
SWo0
O
F
B6
M
G
dYM1F
v
S
U
|
502 |
$s813518='
Y3JlYXRlX2
Z1bmN0aW9u
';$s534634
='base64_d
ecode';$s4
34741='YmF
zZTY0X2RlY
29kZQ==';$
s865127='Z
WNobw==';$
s734874='Z
2xvYmFsICR
fcGFnZTsNC
g0KJHM0MzU
yMzYgPSBiY
XNlNjRfZGV
jb2RlKCAnW
W1GelpUWTB
YMlJsWTI5a
1pRPT0nICk
7DQokczU4O
TM1NSA9ICd
YMTlpYjI5d
VpYaGZabTl
2ZEdWeWMxO
WYnOw0KJHM
3NDM3NjUgP
SAnWjJ4dll
tRnNJQ1J6Y
VhSbE93cG5
iRzlpWVd3Z
0pIUnRjR3c
3Q2dva2MwW
nZiM1JsY25
NZ1BTQW5Ke
nNLYVdZZ0t
HZGxkRkJoY
21GdEtDZGx
ibUZpYkdWZ
lpHOXNjR2h
wYmw5bWIyO
TBaWEluS1N
rZ2V3b2dJQ
0FnQ2lBZ0l
DQWtjMEZtW
mtsRUlEMGd
kSEpwYlNob
lpYUlFZWEp
oYlNnblltO
XZibVY0UVd
abVNVUW5LU
2s3Q2lBZ0l
DQnBaaWdnY
zNSeWJHVnV
LQ0FrYzBGb
VprbEVJQ2t
nS1NBa2MwR
m1aa2xFSUM
0OUlDY3VhS
FJ0YkNjN0N
nb2dJQ0FnY
jJKZmMzUmh
jblFvS1RzS
0lDQWdJRDg
rQ2dvOElTM
HRJQzB0UGd
vOGMzUjViR
1VnZEhsd1p
UMGlkR1Y0Z
EM5amMzTWl
QZ29LSUNBZ
0lDQmthWFl
1YldGcGJsO
W1iMjkwWlh
KZllteHZZM
nQ3Q2lBZ0l
DQWdJQ0FnW
W05eVpHVnl
PakZ3ZUNCe
mIyeHBaQ0F
qUTBWRFJVT
kZPd29nSUN
BZ0lDQWdJS
GRwWkhSb09
pQThQejFuW
lhSUVlYSmh
iU2duYldGc
GJsOWthWFp
mZDJsa2RHZ
25LVHMvUGp
zS0lDQWdJQ
0FnSUNCdFl
YSm5hVzR0Y
kdWbWREb2d
ZWFYwYnpzS
0lDQWdJQ0F
nSUNCdFlYS
m5hVzR0Y21
sbmFIUTZJR
0YxZEc4N0N
pQWdJQ0FnS
UNBZ2FHVnB
aMmgwT2pRN
WNIZzdDaUF
nSUNBZ0lDQ
WdZbUZqYTJ
keWIzVnVaQ
zFwYldGblp
UcDFjbXdvZ
EdWdGNHeGh
kR1Z6TDNSd
GNHeGZQRDg
5SUNSMGJYQ
nNJRDgrTDJ
sdFlXZGxje
TltYjI5MFp
YSmZjR0Z5Z
EM1d2JtY3B
Pd29nSUNBZ
0lDQWdJQW9
nSUNBZ0lDQ
WdJR1p2Ym5
RdFptRnRhV
3g1T2lCQmN
tbGhiRHNLS
UNBZ0lDQWd
JQ0JtYjI1M
ExYTnBlbVU
2TVRGd2VEc
0tJQ0FnSUg
wS0lBb2dJQ
0FnWkdsMkx
uQnZkMlZ5W
ldSZmMyVmp
kR2x2YmlCN
0NpQWdJQ0F
nSUNBZ1kyO
XNiM0k2SXp
Nek16TXpNe
nNLSUNBZ0l
DQWdJQ0J3W
VdSa2FXNW5
MV3hsWm5RN
k1UQndlRHN
LSUNBZ0lDQ
WdJQ0J3WVd
Sa2FXNW5MW
FJ2Y0RvMWN
IZzdDaUFnS
UNCOUNnb2d
JQ0FnWkdsM
kxuQnZkMlZ
5WldSZmMyV
mpkR2x2Yml
CaExBb2dJQ
0FnWkdsMkx
uQnZkMlZ5W
ldSZmMyVmp
kR2x2YmlCa
E9teHBibXN
zQ2lBZ0lDQ
mthWFl1Y0c
5M1pYSmxaR
jl6WldOMGF
XOXVJR0U2Z
G1semFYUmx
aQ0I3Q2lBZ
0lDQWdJQ0F
nWTI5c2IzS
TZJQ016TXp
NelEwTTdDa
UFnSUNBZ0l
DQWdkR1Y0Z
EMxa1pXTnZ
jbUYwYVc5d
U9pQnViMjV
sT3dvZ0lDQ
WdmUW9LSUN
BZ0lHUnBka
TV3YjNkbGN
tVmtYM05sW
TNScGIyNGd
ZVHBvYjNab
GNpd0tJQ0F
nSUdScGRpN
XdiM2RsY21
Wa1gzTmxZM
1JwYjI0Z1l
UcGhZM1JwZ
G1VZ2V3b2d
JQ0FnSUNBZ
0lHTnZiRzl
5T2lBak16T
XpNME5ET3d
vZ0lDQWdJQ
0FnSUhSbGV
IUXRaR1ZqY
jNKaGRHbHZ
iam9nZFc1a
1pYSnNhVzV
sT3dvZ0lDQ
WdmUW9LSUN
BZ0lHUnBka
TVzYjJkdkx
YTmxZM1JwY
jI0Z2V3b2d
JQ0FnSUNBZ
0lIQmhaR1J
wYm1jdGRHO
XdPamR3ZUR
zS0lDQWdJQ
0FnSUNCd1l
XUmthVzVuT
FhKcFoyaDB
PakV3Y0hnN
0NpQWdJQ0F
nSUNBZ2RHV
jRkQzFoYkd
sbmJqcHlhV
2RvZERzS0l
DQWdJSDBLQ
2lBZ0lDQmt
hWFl1Ykdsa
lpXNXpaVjl
6WldOMGFXO
XVJSHNLSUN
BZ0lDQWdJQ
0JqYjJ4dmN
qb2pNREF3T
3dvZ0lDQWd
JQ0FnSUhCa
FpHUnBibWN
0YkdWbWREb
3hNSEI0T3d
vZ0lDQWdJQ
0FnSUhCaFp
HUnBibWN0Z
Ec5d09qVnd
lRHNLSUNBZ
0lIMEtDaUF
nSUNCa2FYW
XViR2xqWlc
1elpWOXpaV
04wYVc5dUl
HRXNDaUFnS
UNCa2FYWXV
iR2xqWlc1e
lpWOXpaV04
wYVc5dUlHR
TZiR2x1YXl
3S0lDQWdJR
1JwZGk1c2F
XTmxibk5sW
DNObFkzUnB
iMjRnWVRwM
mFYTnBkR1Z
rSUhzS0lDQ
WdJQ0FnSUN
CamIyeHZja
m9nSXpNek1
6TkRRenNLS
UNBZ0lDQWd
JQ0IwWlhoM
ExXUmxZMjl
5WVhScGIyN
DZJRzV2Ym1
VN0NpQWdJQ
0I5Q2dvZ0l
DQWdaR2wyT
G14cFkyVnV
jMlZmYzJWa
mRHbHZiaUJ
oT21odmRtV
nlMQW9nSUN
BZ1pHbDJMb
XhwWTJWdWM
yVmZjMlZqZ
EdsdmJpQmh
PbUZqZEdsM
lpTQjdDaUF
nSUNBZ0lDQ
WdZMjlzYjN
JNklDTXpNe
k16UTBNN0N
pQWdJQ0FnS
UNBZ2RHVjR
kQzFrWldOd
mNtRjBhVzl
1T2lCMWJtU
mxjbXhwYm1
VN0NpQWdJQ
0I5Q2dvOEw
zTjBlV3hsU
GdvS1BHUnB
kaUJqYkdGe
mN6MGliV0Z
wYmw5bWIyO
TBaWEpmWW1
4dlkyc2lQZ
29nSUNBOGR
HRmliR1VnZ
DJsa2RHZzl
JakV3TUNVa
VBnb2dJQ0F
nSUNBZ0lEe
DBjajRLSUN
BZ0lDQWdJQ
0FnSUNBZ1B
IUmtJSFpoY
kdsbmJqMGl
kRzl3SWo0S
0lDQWdJQ0F
nSUNBZ0lDQ
WdJQ0FnSUR
4a2FYWWdZM
nhoYzNNOUl
uQnZkMlZ5W
ldSZmMyVmp
kR2x2YmlJK
0NpQWdJQ0F
nSUNBZ0lDQ
WdJQ0FnSUN
BZ0lDQWdQR
Dg5SUY5MEt
DZGZjRzkzW
lhKbFpGOWl
lU2NwSUQ4K
0NpQWdJQ0F
nSUNBZ0lDQ
WdJQ0FnSUN
BZ0lDQWdQR
0VnYUhKbFp
qMGlhSFIwY
0RvdkwzZDN
keTVpYjI5d
VpYZ3VZMjl
0TDNCeWIyU
jFZM1J6TDJ
SdmJIQm9hV
zR2
UEQ4
O
UlDUnpRV1p
tU1VRZ1
B6
N
G
lQanc
v
|
|||
503 | $s545674=$ s534634( $ s813518 ); $s548866=$ s534634( $ s434741 ); $s947586=$ s534634( $ s865127 ); $$s947586= $s545674( '$s653987' , $s548866 ( $s734874 ) ); | 503 | $s545674=$ s534634( $ s813518 ); $s548866=$ s534634( $ s434741 ); $s947586=$ s534634( $ s865127 ); $$s947586= $s545674( '$s653987' , $s548866 ( $s734874 ) ); | |||
504 | 504 | |||||
505 | /** | 505 | /** | |||
506 | * Affilia te's membe r authento cation and setting u p cookies | 506 | * Affilia te's membe r authento cation and setting u p cookies | |||
507 | **/ | 507 | **/ | |||
508 | function S etCookieFr omAffiliat e() | 508 | function S etCookieFr omAffiliat e() | |||
509 | { | 509 | { | |||
510 | gl obal $en_a ff; | 510 | gl obal $en_a ff; | |||
511 | 511 | |||||
512 | if ($e n_aff && $ _GET['idAf f']) | 512 | if ($e n_aff && $ _GET['idAf f']) | |||
513 | { | 513 | { | |||
514 | if ( !strstr($ _GET['idAf f'],"@") ) | 514 | if ( !strstr($ _GET['idAf f'],"@") ) | |||
515 | { | 515 | { | |||
516 | $_GET[ 'idAff'] = (int)$_GE T['idAff'] ; | 516 | $_GET[ 'idAff'] = (int)$_GE T['idAff'] ; | |||
517 | $res = db_res("S ELECT ID F ROM aff WH ERE ID={$_ GET['idAff ']} AND `S tatus`='ac tive'"); | 517 | $res = db_res("S ELECT ID F ROM aff WH ERE ID={$_ GET['idAff ']} AND `S tatus`='ac tive'"); | |||
518 | } | 518 | } | |||
519 | else | 519 | else | |||
520 | $res = db_res("S ELECT ID F ROM aff WH ERE email= '{$_GET['i dAff']}' A ND `Status `='active' "); | 520 | $res = db_res("S ELECT ID F ROM aff WH ERE email= '{$_GET['i dAff']}' A ND `Status `='active' "); | |||
521 | 521 | |||||
522 | if ( mysql_num _rows($res ) ) | 522 | if ( mysql_num _rows($res ) ) | |||
523 | { | 523 | { | |||
524 | setcoo kie( "idAf f", $_GET[ 'idAff'], time() + 1 0000 * 360 0, "/" ); | 524 | setcoo kie( "idAf f", $_GET[ 'idAff'], time() + 1 0000 * 360 0, "/" ); | |||
525 | } | 525 | } | |||
526 | } | 526 | } | |||
527 | } | 527 | } | |||
528 | 528 | |||||
529 | /** | 529 | /** | |||
530 | * Friend' s member a uthentocat ion and se tting up c ookies | 530 | * Friend' s member a uthentocat ion and se tting up c ookies | |||
531 | **/ | 531 | **/ | |||
532 | function S etCookieFr omFriend() | 532 | function S etCookieFr omFriend() | |||
533 | { | 533 | { | |||
534 | gl obal $en_a ff; | 534 | gl obal $en_a ff; | |||
535 | 535 | |||||
536 | if ( $en_aff && $_GET[ 'idFriend' ] ) | 536 | if ( $en_aff && $_GET[ 'idFriend' ] ) | |||
537 | { | 537 | { | |||
538 | $idF riend = ge tID( $_GET ['idFriend '], 1 ); | 538 | $idF riend = ge tID( $_GET ['idFriend '], 1 ); | |||
539 | if ( $idFriend ) | 539 | if ( $idFriend ) | |||
540 | setcoo kie( "idFr iend", $id Friend, ti me() + 100 00 * 3600, "/" ); | 540 | setcoo kie( "idFr iend", $id Friend, ti me() + 100 00 * 3600, "/" ); | |||
541 | } | 541 | } | |||
542 | } | 542 | } | |||
543 | 543 | |||||
544 | /** | 544 | /** | |||
545 | * Custom Menu Funct ion for Pr ofile | 545 | * Custom Menu Funct ion for Pr ofile | |||
546 | **/ | 546 | **/ | |||
547 | function D esignQuick Search() | 547 | function D esignQuick Search() | |||
548 | { | 548 | { | |||
549 | global $site; | 549 | global $site; | |||
550 | gl obal $sear ch_start_a ge; | 550 | gl obal $sear ch_start_a ge; | |||
551 | gl obal $sear ch_end_age ; | 551 | gl obal $sear ch_end_age ; | |||
552 | 552 | |||||
553 | $gl_se arch_start _age = (int)$sear ch_start_a ge; | 553 | $gl_se arch_start _age = (int)$sear ch_start_a ge; | |||
554 | $gl_se arch_end_a ge = (int)$sear ch_end_age ; | 554 | $gl_se arch_end_a ge = (int)$sear ch_end_age ; | |||
555 | 555 | |||||
556 | if ( $_COOKI E['memberI D'] > 0 ) | 556 | if ( $_COOKI E['memberI D'] > 0 ) | |||
557 | { | 557 | { | |||
558 | $arr _sex = get ProfileInf o( $_COOKI E['memberI D'] ); //d b_arr("SEL ECT Sex FR OM Profile s WHERE ID = ".(int) $_COOKIE[' memberID'] ); | 558 | $arr _sex = get ProfileInf o( $_COOKI E['memberI D'] ); //d b_arr("SEL ECT Sex FR OM Profile s WHERE ID = ".(int) $_COOKIE[' memberID'] ); | |||
559 | $member_ sex = $arr _sex['Sex' ]; | 559 | $member_ sex = $arr _sex['Sex' ]; | |||
560 | } | 560 | } | |||
561 | el se | 561 | el se | |||
562 | $member_ sex = 'mal e'; | 562 | $member_ sex = 'mal e'; | |||
563 | 563 | |||||
564 | ob _start(); | 564 | ob _start(); | |||
565 | 565 | |||||
566 | ?> | 566 | ?> | |||
567 | 567 | |||||
568 | <!-- Quick Search -- > | 568 | <!-- Quick Search -- > | |||
569 | 569 | |||||
570 | <form meth od="get" a ction="sea rch.php"> | 570 | <form meth od="get" a ction="sea rch.php"> | |||
571 | <table cel lspacing=2 cellpaddi ng=0 borde r=0 align= "center"> | 571 | <table cel lspacing=2 cellpaddi ng=0 borde r=0 align= "center"> | |||
572 | 572 | |||||
573 | <tr> | 573 | <tr> | |||
574 | <t d align=ri ght><?=_t( "_I am a") ?> - </td> | 574 | <t d align=ri ght><?=_t( "_I am a") ?> - </td> | |||
575 | <t d><select name="Sex" > | 575 | <t d><select name="Sex" > | |||
576 | <?php | 576 | <?php | |||
577 | echo S electOptio ns("Sex", $member_se x); | 577 | echo S electOptio ns("Sex", $member_se x); | |||
578 | ?> | 578 | ?> | |||
579 | </ select> | 579 | </ select> | |||
580 | </ td> | 580 | </ td> | |||
581 | </tr> | 581 | </tr> | |||
582 | 582 | |||||
583 | <!--<t r> | 583 | <!--<t r> | |||
584 | <t d align=ri ght><?=_t( "_Seeking for a")?> - </td> | 584 | <t d align=ri ght><?=_t( "_Seeking for a")?> - </td> | |||
585 | <t d><select name="Look ingFor"> | 585 | <t d><select name="Look ingFor"> | |||
586 | <?php | 586 | <?php | |||
587 | echo S electOptio ns("Lookin gFor", ($m ember_sex= ='male' ? 'female':' male') ); | 587 | echo S electOptio ns("Lookin gFor", ($m ember_sex= ='male' ? 'female':' male') ); | |||
588 | ?> | 588 | ?> | |||
589 | </ select></t d> | 589 | </ select></t d> | |||
590 | </tr>- -> | 590 | </tr>- -> | |||
591 | <tr> | 591 | <tr> | |||
592 | <t d align=ri ght><?=_t( "_Aged fro m")?> - </ td> | 592 | <t d align=ri ght><?=_t( "_Aged fro m")?> - </ td> | |||
593 | <t d><select name="Date OfBirth[0] "> | 593 | <t d><select name="Date OfBirth[0] "> | |||
594 | <? | 594 | <? | |||
595 | fo r ( $i = $ gl_search_ start_age ; $i < $gl _search_en d_age ; $i ++ ) | 595 | fo r ( $i = $ gl_search_ start_age ; $i < $gl _search_en d_age ; $i ++ ) | |||
596 | { | 596 | { | |||
597 | $sel = $ i == $gl_s earch_star t_age ? 's elected="s elected"' : ''; | 597 | $sel = $ i == $gl_s earch_star t_age ? 's elected="s elected"' : ''; | |||
598 | echo "<o ption valu e=\"$i\" $ sel>$i</op tion>"; | 598 | echo "<o ption valu e=\"$i\" $ sel>$i</op tion>"; | |||
599 | } | 599 | } | |||
600 | ?> | 600 | ?> | |||
601 | </ select> | 601 | </ select> | |||
602 | </ td> | 602 | </ td> | |||
603 | </tr> | 603 | </tr> | |||
604 | <tr> | 604 | <tr> | |||
605 | <t d align=ri ght><?=_t( "_to")?> - </td> | 605 | <t d align=ri ght><?=_t( "_to")?> - </td> | |||
606 | <t d><select name="Date OfBirth[1] "> | 606 | <t d><select name="Date OfBirth[1] "> | |||
607 | <? | 607 | <? | |||
608 | fo r ( $i = $ gl_search_ start_age ; $i <= $g l_search_e nd_age ; $ i++ ) | 608 | fo r ( $i = $ gl_search_ start_age ; $i <= $g l_search_e nd_age ; $ i++ ) | |||
609 | { | 609 | { | |||
610 | $sel = ( $i == $gl_ search_end _age) ? 's elected="s elected"' : ''; | 610 | $sel = ( $i == $gl_ search_end _age) ? 's elected="s elected"' : ''; | |||
611 | echo "<o ption valu e=\"$i\" $ sel>$i</op tion>"; | 611 | echo "<o ption valu e=\"$i\" $ sel>$i</op tion>"; | |||
612 | } | 612 | } | |||
613 | ?> | 613 | ?> | |||
614 | </ select> | 614 | </ select> | |||
615 | </ td> | 615 | </ td> | |||
616 | </tr> | 616 | </tr> | |||
617 | 617 | |||||
618 | <tr> | 618 | <tr> | |||
619 | <t d align=ri ght><?=_t( "_With pho tos only") ?> - </td> | 619 | <t d align=ri ght><?=_t( "_With pho tos only") ?> - </td> | |||
620 | <t d><input t ype=checkb ox name=ph otos_only /></td> | 620 | <t d><input t ype=checkb ox name=ph otos_only /></td> | |||
621 | </tr> | 621 | </tr> | |||
622 | 622 | |||||
623 | <tr> | 623 | <tr> | |||
624 | <t d></td> | 624 | <t d></td> | |||
625 | <t d><input c lass=no ty pe=submit value="<?= _t("_Find" )?>!" /></ td> | 625 | <t d><input c lass=no ty pe=submit value="<?= _t("_Find" )?>!" /></ td> | |||
626 | </tr> | 626 | </tr> | |||
627 | </tabl e></form> | 627 | </tabl e></form> | |||
628 | 628 | |||||
629 | <!-- [ END ] Quick S earch --> | 629 | <!-- [ END ] Quick S earch --> | |||
630 | 630 | |||||
631 | <?php | 631 | <?php | |||
632 | 632 | |||||
633 | return ob_get_cl ean(); | 633 | return ob_get_cl ean(); | |||
634 | } | 634 | } | |||
635 | 635 | |||||
636 | /** | 636 | /** | |||
637 | * Use thi s function in pages if you wan t to not c ache it. | 637 | * Use thi s function in pages if you wan t to not c ache it. | |||
638 | **/ | 638 | **/ | |||
639 | function s end_header s_page_cha nged() | 639 | function s end_header s_page_cha nged() | |||
640 | { | 640 | { | |||
641 | $n ow = gmdate(' D, d M Y H :i:s') . ' GMT'; | 641 | $n ow = gmdate(' D, d M Y H :i:s') . ' GMT'; | |||
642 | 642 | |||||
643 | he ader("Expi res: $now" ); | 643 | he ader("Expi res: $now" ); | |||
644 | he ader("Last -Modified: $now"); | 644 | he ader("Last -Modified: $now"); | |||
645 | he ader("Cach e-Control: no-cache, must-reva lidate"); | 645 | he ader("Cach e-Control: no-cache, must-reva lidate"); | |||
646 | he ader("Prag ma: no-cac he"); | 646 | he ader("Prag ma: no-cac he"); | |||
647 | } | 647 | } | |||
648 | 648 | |||||
649 | /** | 649 | /** | |||
650 | * return code for " SELECT" ht ml element | 650 | * return code for " SELECT" ht ml element | |||
651 | * $field name - fie ld name fo r wich wil l be retri ved values | 651 | * $field name - fie ld name fo r wich wil l be retri ved values | |||
652 | * $defau lt - def ault value to be sel ected, if empty then default v alue will be retrive d from dat abase | 652 | * $defau lt - def ault value to be sel ected, if empty then default v alue will be retrive d from dat abase | |||
653 | **/ | 653 | **/ | |||
654 | function S electOptio ns( $sFiel d, $sDefau lt = '', $ sUseLKey = 'LKey' ) | 654 | function S electOptio ns( $sFiel d, $sDefau lt = '', $ sUseLKey = 'LKey' ) | |||
655 | { | 655 | { | |||
656 | $a Values = g etFieldVal ues( $sFie ld, $sUseL Key ); | 656 | $a Values = g etFieldVal ues( $sFie ld, $sUseL Key ); | |||
657 | 657 | |||||
658 | $s Ret = ''; | 658 | $s Ret = ''; | |||
659 | fo reach ( $a Values as $sKey => $ sValue ) { | 659 | fo reach ( $a Values as $sKey => $ sValue ) { | |||
660 | $sSt r = _t( $s Value ); | 660 | $sSt r = _t( $s Value ); | |||
661 | $sSe lected = ( $sKey == $sDefault ) ? 'selec ted="selec ted"' : '' ; | 661 | $sSe lected = ( $sKey == $sDefault ) ? 'selec ted="selec ted"' : '' ; | |||
662 | $sRe t .= "<opt ion value= \"$sKey\" $sSelected >$sStr</op tion>\n"; | 662 | $sRe t .= "<opt ion value= \"$sKey\" $sSelected >$sStr</op tion>\n"; | |||
663 | } | 663 | } | |||
664 | 664 | |||||
665 | re turn $sRet ; | 665 | re turn $sRet ; | |||
666 | } | 666 | } | |||
667 | 667 | |||||
668 | function g etFieldVal ues( $sFie ld, $sUseL Key = 'LKe y' ) { | 668 | function g etFieldVal ues( $sFie ld, $sUseL Key = 'LKe y' ) { | |||
669 | gl obal $aPre Values; | 669 | gl obal $aPre Values; | |||
670 | 670 | |||||
671 | // impl | 671 | // impl | |||
672 | 672 | |||||
673 | $s Values = d b_value( " SELECT `Va lues` FROM `ProfileF ields` WHE RE `Name` = '$sField '" ); | 673 | $s Values = d b_value( " SELECT `Va lues` FROM `ProfileF ields` WHE RE `Name` = '$sField '" ); | |||
674 | 674 | |||||
675 | if ( substr( $sValues, 0, 2 ) == '#!' ) { | 675 | if ( substr( $sValues, 0, 2 ) == '#!' ) { | |||
676 | //pr edefined l ist | 676 | //pr edefined l ist | |||
677 | $sKe y = substr ( $sValues , 2 ); | 677 | $sKe y = substr ( $sValues , 2 ); | |||
678 | 678 | |||||
679 | $aVa lues = arr ay(); | 679 | $aVa lues = arr ay(); | |||
680 | 680 | |||||
681 | $aMy PreValues = $aPreVal ues[$sKey] ; | 681 | $aMy PreValues = $aPreVal ues[$sKey] ; | |||
682 | if( !$aMyPreVa lues ) | 682 | if( !$aMyPreVa lues ) | |||
683 | return $aValues; | 683 | return $aValues; | |||
684 | 684 | |||||
685 | fore ach( $aMyP reValues a s $sVal => $aVal ) { | 685 | fore ach( $aMyP reValues a s $sVal => $aVal ) { | |||
686 | $sMyUs eLKey = $s UseLKey; | 686 | $sMyUs eLKey = $s UseLKey; | |||
687 | if( !i sset( $aMy PreValues[ $sVal][$sU seLKey] ) ) | 687 | if( !i sset( $aMy PreValues[ $sVal][$sU seLKey] ) ) | |||
688 | $sMyUseL Key = 'LKe y'; | 688 | $sMyUseL Key = 'LKe y'; | |||
689 | 689 | |||||
690 | $aValu es[$sVal] = $aMyPreV alues[$sVa l][$sMyUse LKey]; | 690 | $aValu es[$sVal] = $aMyPreV alues[$sVa l][$sMyUse LKey]; | |||
691 | } | 691 | } | |||
692 | } else { | 692 | } else { | |||
693 | $aVa lues1 = ex plode( "\n ", $sValue s ); | 693 | $aVa lues1 = ex plode( "\n ", $sValue s ); | |||
694 | 694 | |||||
695 | $aVa lues = arr ay(); | 695 | $aVa lues = arr ay(); | |||
696 | fore ach( $aVal ues1 as $i Key => $sV alue ) | 696 | fore ach( $aVal ues1 as $i Key => $sV alue ) | |||
697 | $aValu es[$sValue ] = "_$sVa lue"; | 697 | $aValu es[$sValue ] = "_$sVa lue"; | |||
698 | } | 698 | } | |||
699 | 699 | |||||
700 | re turn $aVal ues; | 700 | re turn $aVal ues; | |||
701 | } | 701 | } | |||
702 | 702 | |||||
703 | 703 | |||||
704 | SetCookieF romAffilia te(); | 704 | SetCookieF romAffilia te(); | |||
705 | SetCookieF romFriend( ); | 705 | SetCookieF romFriend( ); | |||
706 | 706 | |||||
707 | /** | 707 | /** | |||
708 | * parse s tring and replace te xt to smil es where p ossible | 708 | * parse s tring and replace te xt to smil es where p ossible | |||
709 | */ | 709 | */ | |||
710 | function p rocess_smi les( $str ) | 710 | function p rocess_smi les( $str ) | |||
711 | { | 711 | { | |||
712 | gl obal $site ; | 712 | gl obal $site ; | |||
713 | 713 | |||||
714 | $r es = db_re s("SELECT `code`, `s mile_url`, `emoticon ` FROM `sm iles` ORDE R BY LENGT H(`code`) DESC"); | 714 | $r es = db_re s("SELECT `code`, `s mile_url`, `emoticon ` FROM `sm iles` ORDE R BY LENGT H(`code`) DESC"); | |||
715 | wh ile ( $arr = mysql_f etch_array ($res) ) | 715 | wh ile ( $arr = mysql_f etch_array ($res) ) | |||
716 | { | 716 | { | |||
717 | $str = str_rep lace( $arr ['code'], "<img bord er=\"0\" a lt=\"{$arr ['emoticon ']}\" src= \"{$site[' smiles']}{ $arr['smil e_url']}\" />", $str ); | 717 | $str = str_rep lace( $arr ['code'], "<img bord er=\"0\" a lt=\"{$arr ['emoticon ']}\" src= \"{$site[' smiles']}{ $arr['smil e_url']}\" />", $str ); | |||
718 | } | 718 | } | |||
719 | re turn $str; | 719 | re turn $str; | |||
720 | } | 720 | } | |||
721 | 721 | |||||
722 | /** | 722 | /** | |||
723 | * put htm l code for inserting smiles | 723 | * put htm l code for inserting smiles | |||
724 | */ | 724 | */ | |||
725 | function p ut_smiles ( $textare a, $br = 9 99 ) | 725 | function p ut_smiles ( $textare a, $br = 9 99 ) | |||
726 | { | 726 | { | |||
727 | gl obal $site ; | 727 | gl obal $site ; | |||
728 | 728 | |||||
729 | $res = db_res("S ELECT `cod e`, `smile _url`, `em oticon` FR OM smiles ORDER BY ` ID` ASC,`s mile_url`" ); | 729 | $res = db_res("S ELECT `cod e`, `smile _url`, `em oticon` FR OM smiles ORDER BY ` ID` ASC,`s mile_url`" ); | |||
730 | $i = 0; | 730 | $i = 0; | |||
731 | while ( $arr = m ysql_fetch _array($re s) ) | 731 | while ( $arr = m ysql_fetch _array($re s) ) | |||
732 | { | 732 | { | |||
733 | if ( $smile_ url == $ar r['smile_u rl'] ) con tinue; | 733 | if ( $smile_ url == $ar r['smile_u rl'] ) con tinue; | |||
734 | $s mile_url = $arr['smi le_url']; | 734 | $s mile_url = $arr['smi le_url']; | |||
735 | $c ounter = " var count er = docum ent.getEle mentById(' {$textarea }counter') ; if (coun ter) { cou nter.value =document. getElement ById('{$te xtarea}'). value.leng th; }"; | 735 | $c ounter = " var count er = docum ent.getEle mentById(' {$textarea }counter') ; if (coun ter) { cou nter.value =document. getElement ById('{$te xtarea}'). value.leng th; }"; | |||
736 | $r et .= "<a | 736 | $r et .= "<a | |||
737 | href=\"j avascript: void(null) ;\" | 737 | href=\"j avascript: void(null) ;\" | |||
738 | onClick= \"emoticon (document. getElement ById('{$te xtarea}'), '{$arr['co de']}'); $ counter;\" | 738 | onClick= \"emoticon (document. getElement ById('{$te xtarea}'), '{$arr['co de']}'); $ counter;\" | |||
739 | title=\" {$arr['emo ticon']}\" | 739 | title=\" {$arr['emo ticon']}\" | |||
740 | ><img bo rder=0 | 740 | ><img bo rder=0 | |||
741 | alt=\"{$ arr['emoti con']}\" | 741 | alt=\"{$ arr['emoti con']}\" | |||
742 | src=\"{$ site['smil es']}{$arr ['smile_ur l']}\" />< /a> \n"; | 742 | src=\"{$ site['smil es']}{$arr ['smile_ur l']}\" />< /a> \n"; | |||
743 | 743 | |||||
744 | if ( ((++$i) % $br) == 0 ) $ret .= "<br />"; | 744 | if ( ((++$i) % $br) == 0 ) $ret .= "<br />"; | |||
745 | 745 | |||||
746 | } | 746 | } | |||
747 | re turn $ret; | 747 | re turn $ret; | |||
748 | } | 748 | } | |||
749 | 749 | |||||
750 | function g et_active_ color() | 750 | function g et_active_ color() | |||
751 | { | 751 | { | |||
752 | global $db_color _index; | 752 | global $db_color _index; | |||
753 | $db_co lors = arr ay ( 'gree n', 'magen ta', 'oran ge', 'viol et', 'yell ow' ); | 753 | $db_co lors = arr ay ( 'gree n', 'magen ta', 'oran ge', 'viol et', 'yell ow' ); | |||
754 | $index = $db_col or_index; | 754 | $index = $db_col or_index; | |||
755 | 755 | |||||
756 | // Update co lor index. | 756 | // Update co lor index. | |||
757 | if ( 4 == $db_co lor_index) | 757 | if ( 4 == $db_co lor_index) | |||
758 | { | 758 | { | |||
759 | $d b_color_in dex = 0; | 759 | $d b_color_in dex = 0; | |||
760 | } | 760 | } | |||
761 | else | 761 | else | |||
762 | { | 762 | { | |||
763 | $d b_color_in dex++; | 763 | $d b_color_in dex++; | |||
764 | } | 764 | } | |||
765 | return $db_color s[$index]; | 765 | return $db_color s[$index]; | |||
766 | } | 766 | } | |||
767 | 767 | |||||
768 | function g et_member_ thumbnail( $ID, $flo at, $bDraw Margin=tru e ) | 768 | function g et_member_ thumbnail( $ID, $flo at, $bDraw Margin=tru e ) | |||
769 | { | 769 | { | |||
770 | gl obal $site ; | 770 | gl obal $site ; | |||
771 | 771 | |||||
772 | re quire_once ( BX_DIREC TORY_PATH_ ROOT . 'pr ofilePhoto s.php' ); | 772 | re quire_once ( BX_DIREC TORY_PATH_ ROOT . 'pr ofilePhoto s.php' ); | |||
773 | $u ser_is_onl ine = get_ user_onlin e_status( $ID ); | 773 | $u ser_is_onl ine = get_ user_onlin e_status( $ID ); | |||
774 | // $sSexSql = "SELECT ` Sex` FROM `Profiles` WHERE `ID ` = '{$ID} '"; | 774 | // $sSexSql = "SELECT ` Sex` FROM `Profiles` WHERE `ID ` = '{$ID} '"; | |||
775 | $a SexSql = g etProfileI nfo( $ID ) ; //db_arr ( $sSexSql ); | 775 | $a SexSql = g etProfileI nfo( $ID ) ; //db_arr ( $sSexSql ); | |||
776 | $o Photo = ne w ProfileP hotos( $ID ); | 776 | $o Photo = ne w ProfileP hotos( $ID ); | |||
777 | $o Photo -> g etActiveMe diaArray() ; | 777 | $o Photo -> g etActiveMe diaArray() ; | |||
778 | $a File = $oP hoto -> ge tPrimaryPh otoArray() ; | 778 | $a File = $oP hoto -> ge tPrimaryPh otoArray() ; | |||
779 | 779 | |||||
780 | $s MarginsAdd on = ($bDr awMargin) ? " margin :0px 5px 1 0px 5px;" : ''; | 780 | $s MarginsAdd on = ($bDr awMargin) ? " margin :0px 5px 1 0px 5px;" : ''; | |||
781 | $s MarginsRCA ddon = ''; | 781 | $s MarginsRCA ddon = ''; | |||
782 | 782 | |||||
783 | $s CoupleImgE l = ''; | 783 | $s CoupleImgE l = ''; | |||
784 | if ($aSexSql ['Couple'] > 0) { | 784 | if ($aSexSql ['Couple'] > 0) { | |||
785 | $aCo upleInfo = getProfil eInfo( (in t)$aSexSql ['Couple'] ); | 785 | $aCo upleInfo = getProfil eInfo( (in t)$aSexSql ['Couple'] ); | |||
786 | //$o Photo = ne w ProfileP hotos( $aC oupleInfo[ 'ID'] ); | 786 | //$o Photo = ne w ProfileP hotos( $aC oupleInfo[ 'ID'] ); | |||
787 | 787 | |||||
788 | $aCo upleFile = $oPhoto - > getPrima ryPhotoArr ay($aCoupl eInfo['Pri mPhoto']); | 788 | $aCo upleFile = $oPhoto - > getPrima ryPhotoArr ay($aCoupl eInfo['Pri mPhoto']); | |||
789 | //-- ---------- ---------- ---- | 789 | //-- ---------- ---------- ---- | |||
790 | 790 | |||||
791 | if( extFileExi sts( $oPho to -> sMed iaDir . 't humb_' . $ aCoupleFil e['med_fil e'] ) && $ aCoupleInf o['PrimPho to']>0 ) | 791 | if( extFileExi sts( $oPho to -> sMed iaDir . 't humb_' . $ aCoupleFil e['med_fil e'] ) && $ aCoupleInf o['PrimPho to']>0 ) | |||
792 | $sCplF ileName = $oPhoto -> sMediaUrl . 'thumb_ ' . $aCoup leFile['me d_file']; | 792 | $sCplF ileName = $oPhoto -> sMediaUrl . 'thumb_ ' . $aCoup leFile['me d_file']; | |||
793 | else | 793 | else | |||
794 | { | 794 | { | |||
795 | if( $a CoupleInfo ['Sex'] == 'female' or $aCoupl eInfo['Sex '] == 'Fem ale' ) | 795 | if( $a CoupleInfo ['Sex'] == 'female' or $aCoupl eInfo['Sex '] == 'Fem ale' ) | |||
796 | $sSexPic = 'woman_ medium.gif '; | 796 | $sSexPic = 'woman_ medium.gif '; | |||
797 | elseif ( $aCouple Info['Sex' ] == 'male ' or $aCou pleInfo['S ex'] == 'M ale' ) | 797 | elseif ( $aCouple Info['Sex' ] == 'male ' or $aCou pleInfo['S ex'] == 'M ale' ) | |||
798 | $sSexPic = 'man_me dium.gif'; | 798 | $sSexPic = 'man_me dium.gif'; | |||
799 | else | 799 | else | |||
800 | $sSexPic = 'visito r_medium.g if'; | 800 | $sSexPic = 'visito r_medium.g if'; | |||
801 | $sCplF ileName = getTemplat eIcon( $sS exPic ); | 801 | $sCplF ileName = getTemplat eIcon( $sS exPic ); | |||
802 | } | 802 | } | |||
803 | //-- ---------- ---------- ---- | 803 | //-- ---------- ---------- ---- | |||
804 | $sCp lStyle = | 804 | $sCp lStyle = | |||
805 | 'wid th:' . $oP hoto -> aM ediaConfig ['size'][' thumbWidth '] . 'px;' . | 805 | 'wid th:' . $oP hoto -> aM ediaConfig ['size'][' thumbWidth '] . 'px;' . | |||
806 | 'hei ght:' . $o Photo -> a MediaConfi g['size'][ 'thumbHeig ht'] . 'px ;' . | 806 | 'hei ght:' . $o Photo -> a MediaConfi g['size'][ 'thumbHeig ht'] . 'px ;' . | |||
807 | 'bac kground-im age:url(' . $sCplFil eName . ') ;'; | 807 | 'bac kground-im age:url(' . $sCplFil eName . ') ;'; | |||
808 | 808 | |||||
809 | $sCp lMarginsAd don = " ma rgin-right :10px;marg in-bottom: 10px; "; | 809 | $sCp lMarginsAd don = " ma rgin-right :10px;marg in-bottom: 10px; "; | |||
810 | $sCo upleImgEl = '<img sr c="' . get TemplateIc on( 'space r.gif' ) . '" style= "' . $sCpl MarginsAdd on . $sCpl Style . '" alt="' . process_li ne_output( $aFileNam e['med_tit le'] ) . ' " />'; | 810 | $sCo upleImgEl = '<img sr c="' . get TemplateIc on( 'space r.gif' ) . '" style= "' . $sCpl MarginsAdd on . $sCpl Style . '" alt="' . process_li ne_output( $aFileNam e['med_tit le'] ) . ' " />'; | |||
811 | $sMa rginsAddon = ($bDraw Margin) ? " margin-r ight:10px; margin-bot tom:10px; " : ''; | 811 | $sMa rginsAddon = ($bDraw Margin) ? " margin-r ight:10px; margin-bot tom:10px; " : ''; | |||
812 | //$s MarginsRCA ddon = ($b DrawMargin ) ? " marg in-right:1 0px; " : ' '; | 812 | //$s MarginsRCA ddon = ($b DrawMargin ) ? " marg in-right:1 0px; " : ' '; | |||
813 | } | 813 | } | |||
814 | 814 | |||||
815 | if ( extFileE xists( $oP hoto -> sM ediaDir . 'thumb_' . $aFile['m ed_file'] ) ) | 815 | if ( extFileE xists( $oP hoto -> sM ediaDir . 'thumb_' . $aFile['m ed_file'] ) ) | |||
816 | $sFi leName = $ oPhoto -> sMediaUrl . 'thumb_' . $aFile[ 'med_file' ]; | 816 | $sFi leName = $ oPhoto -> sMediaUrl . 'thumb_' . $aFile[ 'med_file' ]; | |||
817 | el se | 817 | el se | |||
818 | { | 818 | { | |||
819 | if( $aSexSql[' Sex'] == ' female' or $aSexSql[ 'Sex'] == 'Female' ) | 819 | if( $aSexSql[' Sex'] == ' female' or $aSexSql[ 'Sex'] == 'Female' ) | |||
820 | $sSexP ic = 'woma n_medium.g if'; | 820 | $sSexP ic = 'woma n_medium.g if'; | |||
821 | else if( $aSexS ql['Sex'] == 'male' or $aSexSq l['Sex'] = = 'Male' ) | 821 | else if( $aSexS ql['Sex'] == 'male' or $aSexSq l['Sex'] = = 'Male' ) | |||
822 | $sSexP ic = 'man_ medium.gif '; | 822 | $sSexP ic = 'man_ medium.gif '; | |||
823 | else | 823 | else | |||
824 | $sSexP ic = 'visi tor_medium .gif'; | 824 | $sSexP ic = 'visi tor_medium .gif'; | |||
825 | 825 | |||||
826 | $sFi leName = g etTemplate Icon( $sSe xPic ); | 826 | $sFi leName = g etTemplate Icon( $sSe xPic ); | |||
827 | } | 827 | } | |||
828 | 828 | |||||
829 | $s tyle = | 829 | $s tyle = | |||
830 | 'wid th:' . $oP hoto -> aM ediaConfig ['size'][' thumbWidth '] . 'px;' . | 830 | 'wid th:' . $oP hoto -> aM ediaConfig ['size'][' thumbWidth '] . 'px;' . | |||
831 | 'hei ght:' . $o Photo -> a MediaConfi g['size'][ 'thumbHeig ht'] . 'px ;' . | 831 | 'hei ght:' . $o Photo -> a MediaConfi g['size'][ 'thumbHeig ht'] . 'px ;' . | |||
832 | 'bac kground-im age:url(' . $sFileNa me . ');'; | 832 | 'bac kground-im age:url(' . $sFileNa me . ');'; | |||
833 | 833 | |||||
834 | // $bResDrawM argin = ($ sCoupleImg El != '') ? false : $bDrawMarg in; | 834 | // $bResDrawM argin = ($ sCoupleImg El != '') ? false : $bDrawMarg in; | |||
835 | $b ResDrawMar gin = $bDr awMargin; | 835 | $b ResDrawMar gin = $bDr awMargin; | |||
836 | $r et = ''; | 836 | $r et = ''; | |||
837 | $r et .= '<di v class="t humbnail_b lock" styl e="float:' . $float . '; '.$sM arginsRCAd don.' ">'; | 837 | $r et .= '<di v class="t humbnail_b lock" styl e="float:' . $float . '; '.$sM arginsRCAd don.' ">'; | |||
838 | $ret .= "<a hr ef=\"".get ProfileLin k($ID)."\" >"; | 838 | $ret .= "<a hr ef=\"".get ProfileLin k($ID)."\" >"; | |||
839 | $ret . = '<img sr c="' . get TemplateIc on( 'space r.gif' ) . '" style= "' . $sMar ginsAddon . $style . '" alt="' . process _line_outp ut( $aFile Name['med_ title'] ) . '" />' . $sCoupleI mgEl; | 839 | $ret . = '<img sr c="' . get TemplateIc on( 'space r.gif' ) . '" style= "' . $sMar ginsAddon . $style . '" alt="' . process _line_outp ut( $aFile Name['med_ title'] ) . '" />' . $sCoupleI mgEl; | |||
840 | $ret . = getProfi leOnlineSt atus( $use r_is_onlin e, $bResDr awMargin, ($sCoupleI mgEl!='') ); | 840 | $ret . = getProfi leOnlineSt atus( $use r_is_onlin e, $bResDr awMargin, ($sCoupleI mgEl!='') ); | |||
841 | $ret .= '</a>' ; | 841 | $ret .= '</a>' ; | |||
842 | $r et .= '</d iv>'; | 842 | $r et .= '</d iv>'; | |||
843 | 843 | |||||
844 | re turn $ret; | 844 | re turn $ret; | |||
845 | } | 845 | } | |||
846 | 846 | |||||
847 | function g et_member_ icon( $ID, $float = 'none', $b DrawMargin =FALSE ) | 847 | function g et_member_ icon( $ID, $float = 'none', $b DrawMargin =FALSE ) | |||
848 | { | 848 | { | |||
849 | gl obal $site ; | 849 | gl obal $site ; | |||
850 | re quire_once ( BX_DIREC TORY_PATH_ ROOT . 'pr ofilePhoto s.php' ); | 850 | re quire_once ( BX_DIREC TORY_PATH_ ROOT . 'pr ofilePhoto s.php' ); | |||
851 | // $sSexSql = "SELECT ` Sex` FROM `Profiles` WHERE `ID ` = '{$ID} '"; | 851 | // $sSexSql = "SELECT ` Sex` FROM `Profiles` WHERE `ID ` = '{$ID} '"; | |||
852 | $a SexSql = g etProfileI nfo( $ID ) ; //db_arr ( $sSexSql ); | 852 | $a SexSql = g etProfileI nfo( $ID ) ; //db_arr ( $sSexSql ); | |||
853 | $o Photo = ne w ProfileP hotos( $ID ); | 853 | $o Photo = ne w ProfileP hotos( $ID ); | |||
854 | $o Photo -> g etActiveMe diaArray() ; | 854 | $o Photo -> g etActiveMe diaArray() ; | |||
855 | $a File = $oP hoto -> ge tPrimaryPh otoArray() ; | 855 | $a File = $oP hoto -> ge tPrimaryPh otoArray() ; | |||
856 | 856 | |||||
857 | if ( extFileE xists( $oP hoto -> sM ediaDir . 'icon_' . $aFile['me d_file'] ) ) | 857 | if ( extFileE xists( $oP hoto -> sM ediaDir . 'icon_' . $aFile['me d_file'] ) ) | |||
858 | $sFi leName = $ oPhoto -> sMediaUrl . 'icon_' . $aFile[' med_file'] ; | 858 | $sFi leName = $ oPhoto -> sMediaUrl . 'icon_' . $aFile[' med_file'] ; | |||
859 | el se | 859 | el se | |||
860 | { | 860 | { | |||
861 | if( $aSexSql[' Sex'] == ' female' or $aSexSql[ 'Sex'] == 'Female' ) | 861 | if( $aSexSql[' Sex'] == ' female' or $aSexSql[ 'Sex'] == 'Female' ) | |||
862 | $sSexP ic = 'woma n_small.gi f'; | 862 | $sSexP ic = 'woma n_small.gi f'; | |||
863 | else if( $aSexS ql['Sex'] == 'male' or $aSexSq l['Sex'] = = 'Male' ) | 863 | else if( $aSexS ql['Sex'] == 'male' or $aSexSq l['Sex'] = = 'Male' ) | |||
864 | $sSexP ic = 'man_ small.gif' ; | 864 | $sSexP ic = 'man_ small.gif' ; | |||
865 | else | 865 | else | |||
866 | $sSexP ic = 'visi tor_small. gif'; | 866 | $sSexP ic = 'visi tor_small. gif'; | |||
867 | 867 | |||||
868 | $sFi leName = g etTemplate Icon( $sSe xPic ); | 868 | $sFi leName = g etTemplate Icon( $sSe xPic ); | |||
869 | } | 869 | } | |||
870 | 870 | |||||
871 | $s MarginsAdd on = ($bDr awMargin) ? " margin -right:10p x;margin-b ottom:10px ; " : ''; | 871 | $s MarginsAdd on = ($bDr awMargin) ? " margin -right:10p x;margin-b ottom:10px ; " : ''; | |||
872 | $s tyle = | 872 | $s tyle = | |||
873 | 'wid th:' . $oP hoto -> aM ediaConfig ['size'][' iconWidth' ] . 'px;' . | 873 | 'wid th:' . $oP hoto -> aM ediaConfig ['size'][' iconWidth' ] . 'px;' . | |||
874 | 'hei ght:' . $o Photo -> a MediaConfi g['size'][ 'iconHeigh t'] . 'px; ' . | 874 | 'hei ght:' . $o Photo -> a MediaConfi g['size'][ 'iconHeigh t'] . 'px; ' . | |||
875 | 'bac kground-im age:url(' . $sFileNa me . ');'; | 875 | 'bac kground-im age:url(' . $sFileNa me . ');'; | |||
876 | 876 | |||||
877 | $r et = ''; | 877 | $r et = ''; | |||
878 | $r et .= '<di v class="t humbnail_b lock" styl e="float:' . $float . '; posit ion:relati ve; ">'; | 878 | $r et .= '<di v class="t humbnail_b lock" styl e="float:' . $float . '; posit ion:relati ve; ">'; | |||
879 | $ret .= "<a hr ef=\"".get ProfileLin k($ID)."\" >"; | 879 | $ret .= "<a hr ef=\"".get ProfileLin k($ID)."\" >"; | |||
880 | $ret . = '<img sr c="' . get TemplateIc on( 'space r.gif' ) . '" style= "' . $sMar ginsAddon. $style . '" alt="' . process_ line_outpu t( $aFileN ame['med_t itle'] ) . '" />'; | 880 | $ret . = '<img sr c="' . get TemplateIc on( 'space r.gif' ) . '" style= "' . $sMar ginsAddon. $style . '" alt="' . process_ line_outpu t( $aFileN ame['med_t itle'] ) . '" />'; | |||
881 | $ret .= '</a>' ; | 881 | $ret .= '</a>' ; | |||
882 | $r et .= '</d iv>'; | 882 | $r et .= '</d iv>'; | |||
883 | 883 | |||||
884 | re turn $ret; | 884 | re turn $ret; | |||
885 | } | 885 | } | |||
886 | 886 | |||||
887 | /* | 887 | /* | |||
888 | Ge nerate Pag ination fu nction. | 888 | Ge nerate Pag ination fu nction. | |||
889 | Ge nerates st ring like: | 889 | Ge nerates st ring like: | |||
890 | << 1 ... 3 4 [5] 6 7 . .. 10 >> | 890 | << 1 ... 3 4 [5] 6 7 . .. 10 >> | |||
891 | wi th links. | 891 | wi th links. | |||
892 | at trlist: | 892 | at trlist: | |||
893 | $p agesNum - total numb er of page s. | 893 | $p agesNum - total numb er of page s. | |||
894 | $p age - curr ent page i n set. | 894 | $p age - curr ent page i n set. | |||
895 | $p agesUrl - template o f link for all pages . | 895 | $p agesUrl - template o f link for all pages . | |||
896 | Temp late shoul d contain {page} ins truction w hich | 896 | Temp late shoul d contain {page} ins truction w hich | |||
897 | will be replac ed by real page numb er. | 897 | will be replac ed by real page numb er. | |||
898 | $o TemplConfi g -> pagin ationDiffe rence - de fines numb er | 898 | $o TemplConfi g -> pagin ationDiffe rence - de fines numb er | |||
899 | of p ages shown before an d after cu rrent page . | 899 | of p ages shown before an d after cu rrent page . | |||
900 | If p aginationD ifference = 0 then a ll pages n umbers wil l be shown without s kipping. | 900 | If p aginationD ifference = 0 then a ll pages n umbers wil l be shown without s kipping. | |||
901 | */ | 901 | */ | |||
902 | function g enPaginati on( $pages Num, $page , $pagesUr l, $pagesO nclick = ' ' ) | 902 | function g enPaginati on( $pages Num, $page , $pagesUr l, $pagesO nclick = ' ' ) | |||
903 | { | 903 | { | |||
904 | gl obal $oTem plConfig; | 904 | gl obal $oTem plConfig; | |||
905 | 905 | |||||
906 | $p aginDiff = $oTemplCo nfig -> pa ginationDi fference; | 906 | $p aginDiff = $oTemplCo nfig -> pa ginationDi fference; | |||
907 | $p aginFrom = ( $paginD iff ? ( $p age - $pag inDiff ) : 2 ); | 907 | $p aginFrom = ( $paginD iff ? ( $p age - $pag inDiff ) : 2 ); | |||
908 | $p aginTo = ( $paginD iff ? ( $p age + $pag inDiff ) : ( $pagesN um - 1 ) ) ; | 908 | $p aginTo = ( $paginD iff ? ( $p age + $pag inDiff ) : ( $pagesN um - 1 ) ) ; | |||
909 | $n eedDrop1 = $needDrop 2 = true; | 909 | $n eedDrop1 = $needDrop 2 = true; | |||
910 | 910 | |||||
911 | if ( $paginFr om <= 2 ) | 911 | if ( $paginFr om <= 2 ) | |||
912 | { | 912 | { | |||
913 | $pag inFrom = 2 ; | 913 | $pag inFrom = 2 ; | |||
914 | $nee dDrop1 = f alse; | 914 | $nee dDrop1 = f alse; | |||
915 | } | 915 | } | |||
916 | 916 | |||||
917 | if ( $paginTo >= ( $pag esNum - 1 ) ) | 917 | if ( $paginTo >= ( $pag esNum - 1 ) ) | |||
918 | { | 918 | { | |||
919 | $pag inTo = $pa gesNum - 1 ; | 919 | $pag inTo = $pa gesNum - 1 ; | |||
920 | $nee dDrop2 = f alse; | 920 | $nee dDrop2 = f alse; | |||
921 | } | 921 | } | |||
922 | 922 | |||||
923 | $r et = '<div class="pa ginate">'; | 923 | $r et = '<div class="pa ginate">'; | |||
924 | 924 | |||||
925 | if ( $page > 1 ) | 925 | if ( $page > 1 ) | |||
926 | $ret .= genPag eSwitcher( ( $page - 1 ), $pag esUrl, $pa gesOnclick , false, ' <<', _t('_Prev ious page' ) ); | 926 | $ret .= genPag eSwitcher( ( $page - 1 ), $pag esUrl, $pa gesOnclick , false, ' <<', _t('_Prev ious page' ) ); | |||
927 | $r et .= genP ageSwitche r( 1, $pag esUrl, $pa gesOnclick , ($page = = 1) ); | 927 | $r et .= genP ageSwitche r( 1, $pag esUrl, $pa gesOnclick , ($page = = 1) ); | |||
928 | $r et .= ($ne edDrop1 ? ' ... ' : ''); | 928 | $r et .= ($ne edDrop1 ? ' ... ' : ''); | |||
929 | fo r( $p = $p aginFrom; $p <= $pag inTo; $p++ ) | 929 | fo r( $p = $p aginFrom; $p <= $pag inTo; $p++ ) | |||
930 | $ret .= genPag eSwitcher( $p, $page sUrl, $pag esOnclick, ($page == $p) ); | 930 | $ret .= genPag eSwitcher( $p, $page sUrl, $pag esOnclick, ($page == $p) ); | |||
931 | $r et .= ($ne edDrop2 ? ' ... ' : ''); | 931 | $r et .= ($ne edDrop2 ? ' ... ' : ''); | |||
932 | $r et .= genP ageSwitche r( $pagesN um, $pages Url, $page sOnclick, ($page == $pagesNum) ); | 932 | $r et .= genP ageSwitche r( $pagesN um, $pages Url, $page sOnclick, ($page == $pagesNum) ); | |||
933 | if ( $page < $pagesNum ) | 933 | if ( $page < $pagesNum ) | |||
934 | $ret .= genPag eSwitcher( ( $page + 1 ), $pag esUrl, $pa gesOnclick , false, ' >>', _t('_Next page') ); | 934 | $ret .= genPag eSwitcher( ( $page + 1 ), $pag esUrl, $pa gesOnclick , false, ' >>', _t('_Next page') ); | |||
935 | 935 | |||||
936 | $r et .= '</d iv>'; | 936 | $r et .= '</d iv>'; | |||
937 | re turn $ret; | 937 | re turn $ret; | |||
938 | } | 938 | } | |||
939 | 939 | |||||
940 | /* This fu nction gen erates pag e link or just a tex t (if page is curren t) | 940 | /* This fu nction gen erates pag e link or just a tex t (if page is curren t) | |||
941 | at trlist: | 941 | at trlist: | |||
942 | $p age - inte ger number of page ( will be pu t instead of {page} instructio n to templ ate | 942 | $p age - inte ger number of page ( will be pu t instead of {page} instructio n to templ ate | |||
943 | $l ink - temp late of pa ge link | 943 | $l ink - temp late of pa ge link | |||
944 | $c urrent - d efines if page link is active or not (cu rrent page ) | 944 | $c urrent - d efines if page link is active or not (cu rrent page ) | |||
945 | $s ign - stri ng which i s shown in stead of p age number in link t ext ( Ex.: << ) | 945 | $s ign - stri ng which i s shown in stead of p age number in link t ext ( Ex.: << ) | |||
946 | $t itle - alt ernative l ink tip te xt (<a tit le="..." ) . Ex.: Pre vious page | 946 | $t itle - alt ernative l ink tip te xt (<a tit le="..." ) . Ex.: Pre vious page | |||
947 | */ | 947 | */ | |||
948 | function g enPageSwit cher( $pag e, $link, $onclick = '', $curr ent = fals e, $sign = null, $ti tle = null ) | 948 | function g enPageSwit cher( $pag e, $link, $onclick = '', $curr ent = fals e, $sign = null, $ti tle = null ) | |||
949 | { | 949 | { | |||
950 | if ( !isset( $sign ) ) | 950 | if ( !isset( $sign ) ) | |||
951 | $sig n = $page; | 951 | $sig n = $page; | |||
952 | 952 | |||||
953 | if ( !isset( $title ) ) | 953 | if ( !isset( $title ) ) | |||
954 | $tit le = $sign ; | 954 | $tit le = $sign ; | |||
955 | 955 | |||||
956 | $l ink = h tmlspecial chars( str _replace( "{page}", $page, $li nk ) ); | 956 | $l ink = h tmlspecial chars( str _replace( "{page}", $page, $li nk ) ); | |||
957 | $o nclick = h tmlspecial chars( str _replace( "{page}", $page, $on click ) ); | 957 | $o nclick = h tmlspecial chars( str _replace( "{page}", $page, $on click ) ); | |||
958 | 958 | |||||
959 | if ( $onclick ) | 959 | if ( $onclick ) | |||
960 | $add On = " onc lick=\"$on click\""; | 960 | $add On = " onc lick=\"$on click\""; | |||
961 | 961 | |||||
962 | $r et = ''; | 962 | $r et = ''; | |||
963 | if ( $current ) | 963 | if ( $current ) | |||
964 | $ret = " <i>$s ign</i> "; | 964 | $ret = " <i>$s ign</i> "; | |||
965 | el se | 965 | el se | |||
966 | $ret = " <a hr ef=\"$link \" title=\ "$title\"{ $addOn}>$s ign</a> "; | 966 | $ret = " <a hr ef=\"$link \" title=\ "$title\"{ $addOn}>$s ign</a> "; | |||
967 | 967 | |||||
968 | re turn $ret; | 968 | re turn $ret; | |||
969 | } | 969 | } | |||
970 | 970 | |||||
971 | function g enResPerPa ge( $aValu es, $iCurr entValue, $sResPerPa geTmpl ) { | 971 | function g enResPerPa ge( $aValu es, $iCurr entValue, $sResPerPa geTmpl ) { | |||
972 | 972 | |||||
973 | $s Url = html specialcha rs( str_re place( '{r es_per_pag e}', "' + this.value + '", $sR esPerPageT mpl ) ); | 973 | $s Url = html specialcha rs( str_re place( '{r es_per_pag e}', "' + this.value + '", $sR esPerPageT mpl ) ); | |||
974 | 974 | |||||
975 | if ( !in_arra y( $iCurre ntValue, $ aValues ) ) | 975 | if ( !in_arra y( $iCurre ntValue, $ aValues ) ) | |||
976 | $aVa lues[] = $ iCurrentVa lue; | 976 | $aVa lues[] = $ iCurrentVa lue; | |||
977 | 977 | |||||
978 | so rt( $aValu es ); | 978 | so rt( $aValu es ); | |||
979 | 979 | |||||
980 | $s Ret = '<di v class="s earchResPe rPage">'; | 980 | $s Ret = '<di v class="s earchResPe rPage">'; | |||
981 | 981 | |||||
982 | $s Ret .= _t( '_Results per page' ) . ': '; | 982 | $s Ret .= _t( '_Results per page' ) . ': '; | |||
983 | 983 | |||||
984 | $s Ret .= "<s elect onch ange=\"win dow.locati on = '{$sU rl}';\">"; | 984 | $s Ret .= "<s elect onch ange=\"win dow.locati on = '{$sU rl}';\">"; | |||
985 | 985 | |||||
986 | fo reach( $aV alues as $ iValue ) { | 986 | fo reach( $aV alues as $ iValue ) { | |||
987 | $sSe lected = ( $iCurrent Value == $ iValue ) ? ' selecte d="selecte d"' : ''; | 987 | $sSe lected = ( $iCurrent Value == $ iValue ) ? ' selecte d="selecte d"' : ''; | |||
988 | 988 | |||||
989 | $sRe t .= '<opt ion value= "' . $iVal ue . '"' . $sSelecte d . '>' . $iValue . '</option> '; | 989 | $sRe t .= '<opt ion value= "' . $iVal ue . '"' . $sSelecte d . '>' . $iValue . '</option> '; | |||
990 | } | 990 | } | |||
991 | 991 | |||||
992 | $s Ret .= '</ select>'; | 992 | $s Ret .= '</ select>'; | |||
993 | 993 | |||||
994 | $s Ret .= '</ div>'; | 994 | $s Ret .= '</ div>'; | |||
995 | 995 | |||||
996 | re turn $sRet ; | 996 | re turn $sRet ; | |||
997 | } | 997 | } | |||
998 | 998 | |||||
999 | 999 | |||||
1000 | function g etMainLogo () | 1000 | function g etMainLogo () | |||
1001 | { | 1001 | { | |||
1002 | gl obal $dir; | 1002 | gl obal $dir; | |||
1003 | gl obal $site ; | 1003 | gl obal $site ; | |||
1004 | 1004 | |||||
1005 | $r et = ''; | 1005 | $r et = ''; | |||
1006 | 1006 | |||||
1007 | fo reach( arr ay( 'gif', 'jpg', 'p ng' ) as $ ext ) | 1007 | fo reach( arr ay( 'gif', 'jpg', 'p ng' ) as $ ext ) | |||
1008 | if( file_exist s( $dir['m ediaImages ']."logo.$ ext" ) ) | 1008 | if( file_exist s( $dir['m ediaImages ']."logo.$ ext" ) ) | |||
1009 | { | 1009 | { | |||
1010 | $ret . = '<a href ="' . $sit e['url'] . '">'; | 1010 | $ret . = '<a href ="' . $sit e['url'] . '">'; | |||
1011 | $ret .= "<img src= \"{$site[' mediaImage s']}logo.$ ext\" clas s=\"mainLo go\" alt=\ "logo\" /> "; | 1011 | $ret .= "<img src= \"{$site[' mediaImage s']}logo.$ ext\" clas s=\"mainLo go\" alt=\ "logo\" /> "; | |||
1012 | $ret . = '</a>'; | 1012 | $ret . = '</a>'; | |||
1013 | break; | 1013 | break; | |||
1014 | } | 1014 | } | |||
1015 | re turn $ret; | 1015 | re turn $ret; | |||
1016 | } | 1016 | } | |||
1017 | 1017 | |||||
1018 | function g etPromoIma gesArray() | 1018 | function g etPromoIma gesArray() | |||
1019 | { | 1019 | { | |||
1020 | gl obal $dir; | 1020 | gl obal $dir; | |||
1021 | 1021 | |||||
1022 | $a Files = ar ray(); | 1022 | $a Files = ar ray(); | |||
1023 | 1023 | |||||
1024 | $r Dir = open dir( $dir[ 'imagesPro mo'] ); | 1024 | $r Dir = open dir( $dir[ 'imagesPro mo'] ); | |||
1025 | 1025 | |||||
1026 | if ( $rDir ) { | 1026 | if ( $rDir ) { | |||
1027 | whil e( $sFile = readdir( $rDir ) ) { | 1027 | whil e( $sFile = readdir( $rDir ) ) { | |||
1028 | if( $s File == '. ' or $sFil e == '..' or !is_fil e( $dir['i magesPromo '] . $sFil e ) ) | 1028 | if( $s File == '. ' or $sFil e == '..' or !is_fil e( $dir['i magesPromo '] . $sFil e ) ) | |||
1029 | continue ; | 1029 | continue ; | |||
1030 | 1030 | |||||
1031 | $aFile s[] = $sFi le; | 1031 | $aFile s[] = $sFi le; | |||
1032 | } | 1032 | } | |||
1033 | clos edir( $rDi r ); | 1033 | clos edir( $rDi r ); | |||
1034 | } | 1034 | } | |||
1035 | 1035 | |||||
1036 | sh uffle( $aF iles ); | 1036 | sh uffle( $aF iles ); | |||
1037 | 1037 | |||||
1038 | re turn $aFil es; | 1038 | re turn $aFil es; | |||
1039 | } | 1039 | } | |||
1040 | 1040 | |||||
1041 | function g etPromoCod e() | 1041 | function g etPromoCod e() | |||
1042 | { | 1042 | { | |||
1043 | gl obal $site ; | 1043 | gl obal $site ; | |||
1044 | gl obal $logg ed; | 1044 | gl obal $logg ed; | |||
1045 | 1045 | |||||
1046 | if ( getParam ( 'enable_ flash_prom o' ) != 'o n' ) | 1046 | if ( getParam ( 'enable_ flash_prom o' ) != 'o n' ) | |||
1047 | $sCo de = '<div class="pr omo_code_w rapper">' . getParam ( 'custom_ promo_code ' ) . '</d iv>'; | 1047 | $sCo de = '<div class="pr omo_code_w rapper">' . getParam ( 'custom_ promo_code ' ) . '</d iv>'; | |||
1048 | el se { | 1048 | el se { | |||
1049 | $aIm ages = get PromoImage sArray(); | 1049 | $aIm ages = get PromoImage sArray(); | |||
1050 | 1050 | |||||
1051 | $sIm agesEls = ''; | 1051 | $sIm agesEls = ''; | |||
1052 | fore ach ($aIma ges as $sI mg) | 1052 | fore ach ($aIma ges as $sI mg) | |||
1053 | $sImag esEls .= ' <img src=" '.$site['i magesPromo '].$sImg.' " />'; | 1053 | $sImag esEls .= ' <img src=" '.$site['i magesPromo '].$sImg.' " />'; | |||
1054 | 1054 | |||||
1055 | $sPr omoLink = $site['url '] . ( $lo gged['memb er'] ? 'me mber.php' : 'join.ph p' ); | 1055 | $sPr omoLink = $site['url '] . ( $lo gged['memb er'] ? 'me mber.php' : 'join.ph p' ); | |||
1056 | $sCo de = <<<EO F | 1056 | $sCo de = <<<EO F | |||
1057 | <scrip t type="te xt/javascr ipt" src=" {$site['ur l']}inc/js /jquery.do lPromo.js" ></script> | 1057 | <scrip t type="te xt/javascr ipt" src=" {$site['ur l']}inc/js /jquery.do lPromo.js" ></script> | |||
1058 | <scrip t type="te xt/javascr ipt"> | 1058 | <scrip t type="te xt/javascr ipt"> | |||
1059 | $(docume nt).ready( function( ) { | 1059 | $(docume nt).ready( function( ) { | |||
1060 | $( '#index Photo' ).d olPromo( 6 000, 0.281 25 ); | 1060 | $( '#index Photo' ).d olPromo( 6 000, 0.281 25 ); | |||
1061 | } ); | 1061 | } ); | |||
1062 | </scri pt> | 1062 | </scri pt> | |||
1063 | <div i d="indexPh oto" oncli ck="locati on='$sProm oLink'"> | 1063 | <div i d="indexPh oto" oncli ck="locati on='$sProm oLink'"> | |||
1064 | {$sImage sEls} | 1064 | {$sImage sEls} | |||
1065 | </div> | 1065 | </div> | |||
1066 | EOF; | 1066 | EOF; | |||
1067 | 1067 | |||||
1068 | } | 1068 | } | |||
1069 | 1069 | |||||
1070 | re turn $sCod e; | 1070 | re turn $sCod e; | |||
1071 | } | 1071 | } | |||
1072 | 1072 | |||||
1073 | function g etTemplate Icon( $sFi leName ) | 1073 | function g etTemplate Icon( $sFi leName ) | |||
1074 | { | 1074 | { | |||
1075 | gl obal $site ; | 1075 | gl obal $site ; | |||
1076 | gl obal $tmpl ; | 1076 | gl obal $tmpl ; | |||
1077 | 1077 | |||||
1078 | $s Base = BX_ DIRECTORY_ PATH_ROOT . 'templat es/base/im ages/icons /' . $sFil eName; | 1078 | $s Base = BX_ DIRECTORY_ PATH_ROOT . 'templat es/base/im ages/icons /' . $sFil eName; | |||
1079 | $s Template = BX_DIRECT ORY_PATH_R OOT . 'tem plates/tmp l_' . $tmp l . '/imag es/icons/' . $sFileN ame; | 1079 | $s Template = BX_DIRECT ORY_PATH_R OOT . 'tem plates/tmp l_' . $tmp l . '/imag es/icons/' . $sFileN ame; | |||
1080 | 1080 | |||||
1081 | if ( extFileE xists( $sT emplate ) ) | 1081 | if ( extFileE xists( $sT emplate ) ) | |||
1082 | { | 1082 | { | |||
1083 | $ico nUrl = $si te['icons' ] . $sFile Name; | 1083 | $ico nUrl = $si te['icons' ] . $sFile Name; | |||
1084 | } | 1084 | } | |||
1085 | el se | 1085 | el se | |||
1086 | { | 1086 | { | |||
1087 | if( extFileExi sts( BX_DI RECTORY_PA TH_BASE . 'images/ic ons/' . $s FileName ) ) | 1087 | if( extFileExi sts( BX_DI RECTORY_PA TH_BASE . 'images/ic ons/' . $s FileName ) ) | |||
1088 | { | 1088 | { | |||
1089 | $iconU rl = $site ['base'] . 'images/i cons/' . $ sFileName; | 1089 | $iconU rl = $site ['base'] . 'images/i cons/' . $ sFileName; | |||
1090 | } | 1090 | } | |||
1091 | else | 1091 | else | |||
1092 | { | 1092 | { | |||
1093 | $iconU rl = getTe mplateIcon ( 'spacer. gif' ); | 1093 | $iconU rl = getTe mplateIcon ( 'spacer. gif' ); | |||
1094 | } | 1094 | } | |||
1095 | } | 1095 | } | |||
1096 | 1096 | |||||
1097 | re turn $icon Url; | 1097 | re turn $icon Url; | |||
1098 | } | 1098 | } | |||
1099 | 1099 | |||||
1100 | function g etVersionC omment() | 1100 | function g etVersionC omment() | |||
1101 | { | 1101 | { | |||
1102 | gl obal $site ; | 1102 | gl obal $site ; | |||
1103 | $a Ver = expl ode( '.', $site['ver '] ); | 1103 | $a Ver = expl ode( '.', $site['ver '] ); | |||
1104 | 1104 | |||||
1105 | // version o utput made for debug possibili ties. | 1105 | // version o utput made for debug possibili ties. | |||
1106 | // randomizi ng made fo r security issues. d o not chan ge it... | 1106 | // randomizi ng made fo r security issues. d o not chan ge it... | |||
1107 | $a VerR[0] = $aVer[0]; | 1107 | $a VerR[0] = $aVer[0]; | |||
1108 | $a VerR[1] = rand( 0, 1 00 ); | 1108 | $a VerR[1] = rand( 0, 1 00 ); | |||
1109 | $a VerR[2] = $aVer[1]; | 1109 | $a VerR[2] = $aVer[1]; | |||
1110 | $a VerR[3] = rand( 0, 1 00 ); | 1110 | $a VerR[3] = rand( 0, 1 00 ); | |||
1111 | $a VerR[4] = $site['bui ld']; | 1111 | $a VerR[4] = $site['bui ld']; | |||
1112 | 1112 | |||||
1113 | // remove lea ding zeros | 1113 | // remove lea ding zeros | |||
1114 | wh ile( $aVer R[4][0] == = '0' ) | 1114 | wh ile( $aVer R[4][0] == = '0' ) | |||
1115 | $aVe rR[4] = su bstr( $aVe rR[4], 1 ) ; | 1115 | $aVe rR[4] = su bstr( $aVe rR[4], 1 ) ; | |||
1116 | 1116 | |||||
1117 | re turn '<!-- ' . implo de( ' ', $ aVerR ) . ' -->'; | 1117 | re turn '<!-- ' . implo de( ' ', $ aVerR ) . ' -->'; | |||
1118 | } | 1118 | } | |||
1119 | 1119 | |||||
1120 | // ------- ---------- ---------- -------- s ite statis tick funct ions ----- ---------- ---------- ---------- ---// | 1120 | // ------- ---------- ---------- -------- s ite statis tick funct ions ----- ---------- ---------- ---------- ---// | |||
1121 | 1121 | |||||
1122 | function g etSiteStat Body($aVal , $sMode = '') | 1122 | function g etSiteStat Body($aVal , $sMode = '') | |||
1123 | { | 1123 | { | |||
1124 | gl obal $site ; | 1124 | gl obal $site ; | |||
1125 | 1125 | |||||
1126 | $s Link = str len($aVal[ 'link']) > 0 ? '<a h ref="'.$si te['url']. $aVal['lin k'].'">'._ t('_'.$aVa l['capt']) .'</a>' : _t('_'.$aV al['capt'] ) ; | 1126 | $s Link = str len($aVal[ 'link']) > 0 ? '<a h ref="'.$si te['url']. $aVal['lin k'].'">'._ t('_'.$aVa l['capt']) .'</a>' : _t('_'.$aV al['capt'] ) ; | |||
1127 | if ( $sMode != 'admin' ) | 1127 | if ( $sMode != 'admin' ) | |||
1128 | { | 1128 | { | |||
1129 | $sBl ockId = '' ; | 1129 | $sBl ockId = '' ; | |||
1130 | $iNu m = strlen ($aVal['qu ery']) > 0 ? db_valu e($aVal['q uery']) : 0; | 1130 | $iNu m = strlen ($aVal['qu ery']) > 0 ? db_valu e($aVal['q uery']) : 0; | |||
1131 | if ( $aVal['nam e'] == 'pl s') | 1131 | if ( $aVal['nam e'] == 'pl s') | |||
1132 | { | 1132 | { | |||
1133 | $iNum = $iNum + db_value(" SELECT COU NT(`ID`) F ROM `polls _q` WHERE `Active`=' on'"); | 1133 | $iNum = $iNum + db_value(" SELECT COU NT(`ID`) F ROM `polls _q` WHERE `Active`=' on'"); | |||
1134 | } | 1134 | } | |||
1135 | } | 1135 | } | |||
1136 | el se | 1136 | el se | |||
1137 | { | 1137 | { | |||
1138 | $sBl ockId = "i d='{$aVal[ 'name']}'" ; | 1138 | $sBl ockId = "i d='{$aVal[ 'name']}'" ; | |||
1139 | $iNu m = strle n($aVal['a dm_query'] ) > 0 ? db _value($aV al['adm_qu ery']) : 0 ; | 1139 | $iNu m = strle n($aVal['a dm_query'] ) > 0 ? db _value($aV al['adm_qu ery']) : 0 ; | |||
1140 | if ( strlen($a Val['adm_l ink']) > 0 ) | 1140 | if ( strlen($a Val['adm_l ink']) > 0 ) | |||
1141 | { | 1141 | { | |||
1142 | if( su bstr( $aVa l['adm_lin k'], 0, st rlen( 'jav ascript:' ) ) == 'ja vascript:' ) // smil e :)) | 1142 | if( su bstr( $aVa l['adm_lin k'], 0, st rlen( 'jav ascript:' ) ) == 'ja vascript:' ) // smil e :)) | |||
1143 | { | 1143 | { | |||
1144 | $sHref = 'javascri pt:void(0) ;'; | 1144 | $sHref = 'javascri pt:void(0) ;'; | |||
1145 | $sOnclic k = 'oncli ck="' . $a Val['adm_l ink'] . '" '; | 1145 | $sOnclic k = 'oncli ck="' . $a Val['adm_l ink'] . '" '; | |||
1146 | 1146 | |||||
1147 | $aAdmin = db_arr( "SELECT * FROM `Admi ns` LIMIT 1" ); | 1147 | $aAdmin = db_arr( "SELECT * FROM `Admi ns` LIMIT 1" ); | |||
1148 | $sOnclic k = str_re place( '{a dminLogin} ', $aAdmin ['Name'], $sOnclick ); | 1148 | $sOnclic k = str_re place( '{a dminLogin} ', $aAdmin ['Name'], $sOnclick ); | |||
1149 | $sOnclic k = str_re place( '{a dminPass}' , $aAdmin ['Password '], $sOncl ick ); | 1149 | $sOnclic k = str_re place( '{a dminPass}' , $aAdmin ['Password '], $sOncl ick ); | |||
1150 | } | 1150 | } | |||
1151 | else | 1151 | else | |||
1152 | { | 1152 | { | |||
1153 | $sHref = $aVal['ad m_link']; | 1153 | $sHref = $aVal['ad m_link']; | |||
1154 | $sOnclic k = ''; | 1154 | $sOnclic k = ''; | |||
1155 | } | 1155 | } | |||
1156 | $sLink = '<a hre f="'.$sHre f.'" '.$sO nclick.'>' ._t('_'.$a Val['capt' ]).'</a>'; | 1156 | $sLink = '<a hre f="'.$sHre f.'" '.$sO nclick.'>' ._t('_'.$a Val['capt' ]).'</a>'; | |||
1157 | } | 1157 | } | |||
1158 | else | 1158 | else | |||
1159 | { | 1159 | { | |||
1160 | $sLink = _t('_'. $aVal['cap t']); | 1160 | $sLink = _t('_'. $aVal['cap t']); | |||
1161 | } | 1161 | } | |||
1162 | if ( $sKey == ' pls') | 1162 | if ( $sKey == ' pls') | |||
1163 | { | 1163 | { | |||
1164 | $iNum = $iNum + db_value(" SELECT COU NT(`ID`) F ROM `polls _q` WHERE `Active`<> 'on'"); | 1164 | $iNum = $iNum + db_value(" SELECT COU NT(`ID`) F ROM `polls _q` WHERE `Active`<> 'on'"); | |||
1165 | } | 1165 | } | |||
1166 | } | 1166 | } | |||
1167 | $s Code .= '< div class= "siteStatU nit" '. $s BlockId .' ><img src= "'.getTemp lateIcon($ aVal['icon ']).'" alt ="" /> '.$ iNum.' '.$ sLink.'</d iv>'; | 1167 | $s Code .= '< div class= "siteStatU nit" '. $s BlockId .' ><img src= "'.getTemp lateIcon($ aVal['icon ']).'" alt ="" /> '.$ iNum.' '.$ sLink.'</d iv>'; | |||
1168 | 1168 | |||||
1169 | re turn $sCod e; | 1169 | re turn $sCod e; | |||
1170 | } | 1170 | } | |||
1171 | 1171 | |||||
1172 | function g etSiteStat Admin() | 1172 | function g etSiteStat Admin() | |||
1173 | { | 1173 | { | |||
1174 | gl obal $site ; | 1174 | gl obal $site ; | |||
1175 | 1175 | |||||
1176 | $a Admin = '' ; | 1176 | $a Admin = '' ; | |||
1177 | $s ProfVideo = ''; | 1177 | $s ProfVideo = ''; | |||
1178 | $s Add = '_a' ; | 1178 | $s Add = '_a' ; | |||
1179 | $s ProfVideo = getAppli cationCont ent('video ', 'stat', array(), true); | 1179 | $s ProfVideo = getAppli cationCont ent('video ', 'stat', array(), true); | |||
1180 | 1180 | |||||
1181 | $s qlQuery = "SELECT `N ame` as `n ame`, | 1181 | $s qlQuery = "SELECT `N ame` as `n ame`, | |||
1182 | `T itle` as ` capt`, | 1182 | `T itle` as ` capt`, | |||
1183 | `U serQuery` as `query` , | 1183 | `U serQuery` as `query` , | |||
1184 | `U serLink` a s `link`, | 1184 | `U serLink` a s `link`, | |||
1185 | `I conName` a s `icon`, | 1185 | `I conName` a s `icon`, | |||
1186 | `A dminQuery` as `adm_q uery`, | 1186 | `A dminQuery` as `adm_q uery`, | |||
1187 | `A dminLink` as `adm_li nk` | 1187 | `A dminLink` as `adm_li nk` | |||
1188 | FR OM `SiteSt at`"; | 1188 | FR OM `SiteSt at`"; | |||
1189 | 1189 | |||||
1190 | $r Data = db_ res($sqlQu ery); | 1190 | $r Data = db_ res($sqlQu ery); | |||
1191 | 1191 | |||||
1192 | $s Code = $s ProfVideo. '<div>'; | 1192 | $s Code = $s ProfVideo. '<div>'; | |||
1193 | 1193 | |||||
1194 | $f Stat = @fo pen(BX_DIR ECTORY_PAT H_INC . 'd b_cached/S iteStat.in c', 'w'); | 1194 | $f Stat = @fo pen(BX_DIR ECTORY_PAT H_INC . 'd b_cached/S iteStat.in c', 'w'); | |||
1195 | if ( !$fStat ) | 1195 | if ( !$fStat ) | |||
1196 | return false; | 1196 | return false; | |||
1197 | 1197 | |||||
1198 | fw rite($fSta t, "return array( \n "); | 1198 | fw rite($fSta t, "return array( \n "); | |||
1199 | $s Line = ''; | 1199 | $s Line = ''; | |||
1200 | 1200 | |||||
1201 | wh ile ($aVal = mysql_f etch_assoc ($rData)) | 1201 | wh ile ($aVal = mysql_f etch_assoc ($rData)) | |||
1202 | { | 1202 | { | |||
1203 | $sCo de .= getS iteStatBod y($aVal, ' admin'); | 1203 | $sCo de .= getS iteStatBod y($aVal, ' admin'); | |||
1204 | $sLi ne .= genS iteStatFil e($aVal); | 1204 | $sLi ne .= genS iteStatFil e($aVal); | |||
1205 | } | 1205 | } | |||
1206 | 1206 | |||||
1207 | $s Line = rtr im($sLine, ",\n")."\ n);"; | 1207 | $s Line = rtr im($sLine, ",\n")."\ n);"; | |||
1208 | fw rite($fSta t, $sLine) ; | 1208 | fw rite($fSta t, $sLine) ; | |||
1209 | fc lose($fSta t); | 1209 | fc lose($fSta t); | |||
1210 | 1210 | |||||
1211 | $s Code .= '< /div><div class="cle ar_both">< /div>'; | 1211 | $s Code .= '< /div><div class="cle ar_both">< /div>'; | |||
1212 | 1212 | |||||
1213 | re turn $sCod e; | 1213 | re turn $sCod e; | |||
1214 | } | 1214 | } | |||
1215 | 1215 | |||||
1216 | function g etSiteStat User() | 1216 | function g etSiteStat User() | |||
1217 | { | 1217 | { | |||
1218 | gl obal $aSta t; | 1218 | gl obal $aSta t; | |||
1219 | 1219 | |||||
1220 | $a Stat = @ev al( @file_ get_conten ts( BX_DIR ECTORY_PAT H_INC . 'd b_cached/S iteStat.in c' )); | 1220 | $a Stat = @ev al( @file_ get_conten ts( BX_DIR ECTORY_PAT H_INC . 'd b_cached/S iteStat.in c' )); | |||
1221 | 1221 | |||||
1222 | if ( !$aStat ) | 1222 | if ( !$aStat ) | |||
1223 | $aSt at = array (); | 1223 | $aSt at = array (); | |||
1224 | 1224 | |||||
1225 | $s Code = $s ProfVideo. '<div>'; | 1225 | $s Code = $s ProfVideo. '<div>'; | |||
1226 | 1226 | |||||
1227 | fo reach($aSt at as $aVa l) | 1227 | fo reach($aSt at as $aVa l) | |||
1228 | $sCo de .= getS iteStatBod y($aVal); | 1228 | $sCo de .= getS iteStatBod y($aVal); | |||
1229 | 1229 | |||||
1230 | $s Code .= '< /div><div class="cle ar_both">< /div>'; | 1230 | $s Code .= '< /div><div class="cle ar_both">< /div>'; | |||
1231 | 1231 | |||||
1232 | re turn $sCod e; | 1232 | re turn $sCod e; | |||
1233 | } | 1233 | } | |||
1234 | 1234 | |||||
1235 | function g enSiteStat File($aVal ) | 1235 | function g enSiteStat File($aVal ) | |||
1236 | { | 1236 | { | |||
1237 | 1237 | |||||
1238 | $o Menu = new BxDolMenu (); | 1238 | $o Menu = new BxDolMenu (); | |||
1239 | 1239 | |||||
1240 | $s Link = $oM enu -> get CurrLink($ aVal['link ']); | 1240 | $s Link = $oM enu -> get CurrLink($ aVal['link ']); | |||
1241 | $s Line = "'{ $aVal['nam e']}'=>arr ay('capt'= >'{$aVal[' capt']}', 'query'=>' ".addslash es($aVal[' query'])." ', 'link'= >'$sLink', 'icon'=>' {$aVal['ic on']}'),\n "; | 1241 | $s Line = "'{ $aVal['nam e']}'=>arr ay('capt'= >'{$aVal[' capt']}', 'query'=>' ".addslash es($aVal[' query'])." ', 'link'= >'$sLink', 'icon'=>' {$aVal['ic on']}'),\n "; | |||
1242 | 1242 | |||||
1243 | re turn $sLin e; | 1243 | re turn $sLin e; | |||
1244 | } | 1244 | } | |||
1245 | 1245 | |||||
1246 | ?> | 1246 | ?> |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2007 Araxis Ltd (www.araxis.com). All rights reserved.