77. File Comparison Report

Produced on Wed Jun 18 08:02:08 2008 UTC. 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.

77.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.1.1 compose.php Sat Apr 26 08:19:18 2008 UTC
2 Dolphin-v.6.1.2 compose.php Thu Jun 12 09:57:46 2008 UTC

77.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 822
Changed 1 2
Inserted 0 0
Removed 0 0

77.3 Comparison options

Whitespace All differences in whitespace within lines are ignored
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

77.4 Active regular expressions

No regular expressions were active.

77.5 Comparison detail

1   <?php   1   <?php
2     2  
3   /********* ********** ********** ********** ********** ********** ********** ******   3   /********* ********** ********** ********** ********** ********** ********** ******
4   *                              D olphin Sma rt Communi ty Builder   4   *                              D olphin Sma rt Communi ty Builder
5   *                                 --------- --------   5   *                                 --------- --------
6   *     begi n                 : M on Mar 23  2006   6   *     begi n                 : M on Mar 23  2006
7   *     copy right             : ( C) 2006 Bo onEx Group   7   *     copy right             : ( C) 2006 Bo onEx Group
8   *     webs ite               : h ttp://www. boonex.com /   8   *     webs ite               : h ttp://www. boonex.com /
9   * This fil e is part  of Dolphin  - Smart C ommunity B uilder   9   * This fil e is part  of Dolphin  - Smart C ommunity B uilder
10   *   10   *
11   * Dolphin  is free so ftware. Th is work is  licensed  under a Cr eative Com mons Attri bution 3.0  License.    11   * Dolphin  is free so ftware. Th is work is  licensed  under a Cr eative Com mons Attri bution 3.0  License. 
12   * http://c reativecom mons.org/l icenses/by /3.0/   12   * http://c reativecom mons.org/l icenses/by /3.0/
13   *   13   *
14   * Dolphin  is distrib uted in th e hope tha t it will  be useful,  but WITHO UT ANY WAR RANTY;   14   * Dolphin  is distrib uted in th e hope tha t it will  be useful,  but WITHO UT ANY WAR RANTY;
15   * without  even the i mplied war ranty of   MERCHANTAB ILITY or F ITNESS FOR  A PARTICU LAR PURPOS E.   15   * without  even the i mplied war ranty of   MERCHANTAB ILITY or F ITNESS FOR  A PARTICU LAR PURPOS E.
16   * See the  Creative C ommons Att ribution 3 .0 License  for more  details.    16   * See the  Creative C ommons Att ribution 3 .0 License  for more  details. 
17   * You shou ld have re ceived a c opy of the  Creative  Commons At tribution  3.0 Licens e along wi th Dolphin   17   * You shou ld have re ceived a c opy of the  Creative  Commons At tribution  3.0 Licens e along wi th Dolphin
18   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m   18   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m
19   ********** ********** ********** ********** ********** ********** ********** *****/   19   ********** ********** ********** ********** ********** ********** ********** *****/
20     20  
21   require_on ce( 'inc/h eader.inc. php' );   21   require_on ce( 'inc/h eader.inc. php' );
22   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd esign.inc. php' );   22   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd esign.inc. php' );
23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'p rofiles.in c.php' );   23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'p rofiles.in c.php' );
24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'm embers.inc .php' );   24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'm embers.inc .php' );
25   require_on ce( BX_DIR ECTORY_PAT H_INC . 'u tils.inc.p hp' );   25   require_on ce( BX_DIR ECTORY_PAT H_INC . 'u tils.inc.p hp' );
26     26  
27   // ------- -------- p age variab les and lo gin   27   // ------- -------- p age variab les and lo gin
28     28  
29     29  
30     30  
31   $logged['m ember'] =  member_aut h( 0 );   31   $logged['m ember'] =  member_aut h( 0 );
32     32  
33   $_page['na me_index']     = 19;   33   $_page['na me_index']     = 19;
34   $_page['he ader']         = _t(  "_COMPOSE_ H" );   34   $_page['he ader']         = _t(  "_COMPOSE_ H" );
35   $_page['he ader_text' ]   = _t(  "_COMPOSE_ H1" );   35   $_page['he ader_text' ]   = _t(  "_COMPOSE_ H1" );
36   $_page['cs s_name']       = 'com pose.css';   36   $_page['cs s_name']       = 'com pose.css';
37     37  
38   $_page['ex tra_js'] =  $oTemplCo nfig -> sT inyMceEdit orCompactJ S;   38   $_page['ex tra_js'] =  $oTemplCo nfig -> sT inyMceEdit orCompactJ S;
39     39  
40   // ------- -------- p age compon ents   40   // ------- -------- p age compon ents
41     41  
42   $_ni = $_p age['name_ index'];   42   $_ni = $_p age['name_ index'];
43   $_page_con t[$_ni]['p age_main_c ode'] = De signBoxCon tent( '',  PageCompPa geMainCode (), $oTemp lConfig ->  PageCompo se_db_num  );   43   $_page_con t[$_ni]['p age_main_c ode'] = De signBoxCon tent( '',  PageCompPa geMainCode (), $oTemp lConfig ->  PageCompo se_db_num  );
44     44  
45   // ------- -------- [ END] page  components   45   // ------- -------- [ END] page  components
46     46  
47   PageCode() ;   47   PageCode() ;
48     48  
49   // ------- -------- p age compon ents funct ions   49   // ------- -------- p age compon ents funct ions
50     50  
51   /**   51   /**
52   * page cod e function   52   * page cod e function
53   */   53   */
54   function P ageCompPag eMainCode( )   54   function P ageCompPag eMainCode( )
55   {   55   {
56       global  $site;   56       global  $site;
57     57  
58       $ret =  '';   58       $ret =  '';
59       $en_in box_notify         =  getParam(" enable_inb ox_notify" );   59       $en_in box_notify         =  getParam(" enable_inb ox_notify" );
60       $en_de st_choice          =  getParam(" enable_msg _dest_choi ce");   60       $en_de st_choice          =  getParam(" enable_msg _dest_choi ce");
61       $free_ mode               =  getParam(  "free_mode " );   61       $free_ mode               =  getParam(  "free_mode " );
62     62  
63       $membe r['ID']            =  (int)$_COO KIE['membe rID'];   63       $membe r['ID']            =  (int)$_COO KIE['membe rID'];
64       $membe r['Passwor d']     =  $_COOKIE[' memberPass word'];   64       $membe r['Passwor d']     =  $_COOKIE[' memberPass word'];
65       $recip ientID             =  getID( $_R EQUEST['ID '], 0 );   65       $recip ientID             =  getID( $_R EQUEST['ID '], 0 );
66     66  
67       $recip ient = get ProfileInf o( $recipi entID );   67       $recip ient = get ProfileInf o( $recipi entID );
68          68       
69       $conta ct_allowed         =  contact_al lowed($mem ber['ID'],  $recipien tID);   69       $conta ct_allowed         =  contact_al lowed($mem ber['ID'],  $recipien tID);
70     70  
71       // Che ck if memb er can sen d messages   71       // Che ck if memb er can sen d messages
72       $check _res = che ckAction(  $member['I D'], ACTIO N_ID_SEND_ MESSAGE );   72       $check _res = che ckAction(  $member['I D'], ACTIO N_ID_SEND_ MESSAGE );
73       if ( $ check_res[ CHECK_ACTI ON_RESULT]  != CHECK_ ACTION_RES ULT_ALLOWE D   73       if ( $ check_res[ CHECK_ACTI ON_RESULT]  != CHECK_ ACTION_RES ULT_ALLOWE D
74           &&  !$contact _allowed )   74           &&  !$contact _allowed )
75       {   75       {
76           $r et = '   76           $r et = '
77                <table w idth="100% " cellpadd ing="4" ce llspacing= "4" border ="0">   77                <table w idth="100% " cellpadd ing="4" ce llspacing= "4" border ="0">
78                    <tr>   78                    <tr>
79                         <td align= "center">'  . $check_ res[CHECK_ ACTION_MES SAGE] . '< /td>   79                         <td align= "center">'  . $check_ res[CHECK_ ACTION_MES SAGE] . '< /td>
80                    </tr >   80                    </tr >
81                </table> ';   81                </table> ';
82           re turn $ret;   82           re turn $ret;
83       }   83       }
84     84  
85       //ob_s tart();   85       //ob_s tart();
86     86  
87       $ret =  '';   87       $ret =  '';
88     88  
89       if ( $ _POST['act ion'] == " send" && s trlen($_PO ST['text'] ) )   89       if ( $ _POST['act ion'] == " send" && s trlen($_PO ST['text'] ) )
90       {   90       {
91           $a ction_resu lt = "";   91           $a ction_resu lt = "";
92     92  
93           //  Check if  recipient  found   93           //  Check if  recipient  found
94           if ( !$recipi ent )   94           if ( !$recipi ent )
95           {   95           {
96                $ret = "   96                $ret = "
97                    <tab le width=\ "100%\" ce llpadding= \"4\" cell spacing=\" 4\" align= \"center\" >   97                    <tab le width=\ "100%\" ce llpadding= \"4\" cell spacing=\" 4\" align= \"center\" >
98                         <tr>   98                         <tr>
99                             <td al ign=center >". _t("_C OMPOSE_REJ ECT_MEMBER _NOT_FOUND ") ."</td>   99                             <td al ign=center >". _t("_C OMPOSE_REJ ECT_MEMBER _NOT_FOUND ") ."</td>
100                         </tr>   100                         </tr>
101                    </ta ble>\n";   101                    </ta ble>\n";
102                return $ ret;   102                return $ ret;
103           }   103           }
104     104  
105           //  Perform s ending   105           //  Perform s ending
106           $s end_result  = MemberS endMessage ( $member,  $recipien t );   106           $s end_result  = MemberS endMessage ( $member,  $recipien t );
107              107           
108           sw itch ( $se nd_result  )   108           sw itch ( $se nd_result  )
109           {   109           {
110                case 1:   110                case 1:
111                    $act ion_result  .= _t_err ( "_FAILED _TO_SEND_M ESSAGE" );   111                    $act ion_result  .= _t_err ( "_FAILED _TO_SEND_M ESSAGE" );
112                    $hid e_form = ' 0';   112                    $hid e_form = ' 0';
113                    brea k;   113                    brea k;
114                case 3:   114                case 3:
115                    $act ion_result  .= _t_err ( "_You ha ve to wait  for PERIO D minutes  before you  can write  another m essage!",  1 );   115                    $act ion_result  .= _t_err ( "_You ha ve to wait  for PERIO D minutes  before you  can write  another m essage!",  1 );
116                    $hid e_form = ' 1';   116                    $hid e_form = ' 1';
117                    brea k;   117                    brea k;
118                case 5:   118                case 5:
119                    $act ion_result  .= _t_err ( "_FAILED _TO_SEND_M ESSAGE_BLO CK" );   119                    $act ion_result  .= _t_err ( "_FAILED _TO_SEND_M ESSAGE_BLO CK" );
120                    $hid e_form = ' 0';   120                    $hid e_form = ' 0';
121                    brea k;   121                    brea k;
122                case 10:   122                case 10:
123                    $act ion_result  .= _t_err ( "_FAILED _TO_SEND_M ESSAGE_NOT _ACTIVE" ) ;   123                    $act ion_result  .= _t_err ( "_FAILED _TO_SEND_M ESSAGE_NOT _ACTIVE" ) ;
124                    $hid e_form = ' 0';   124                    $hid e_form = ' 0';
125                    brea k;   125                    brea k;
126                default:   126                default:
127                    $act ion_result  .= _t_act ion( "_MES SAGE_SENT"  );   127                    $act ion_result  .= _t_act ion( "_MES SAGE_SENT"  );
128                    $hid e_form = ' 1';   128                    $hid e_form = ' 1';
129                    brea k;   129                    brea k;
130           }   130           }
131       }   131       }
132       $ret . = '<div cl ass="com_b ox"">';   132       $ret . = '<div cl ass="com_b ox"">';
133       if ( s trlen($act ion_result ) )   133       if ( s trlen($act ion_result ) )
134       {   134       {
135           $r et .= $act ion_result ;   135           $r et .= $act ion_result ;
136       }   136       }
137     137  
138     138  
139       if ( $ recipient  &&  $hide_ form != '1 ' )   139       if ( $ recipient  &&  $hide_ form != '1 ' )
140       {   140       {
141           $r et .= '<di v class="c lear_both" ></div>';   141           $r et .= '<di v class="c lear_both" ></div>';
142           $r et .= Prof ileDetails ( $recipie nt['ID'] ) ;   142           $r et .= Prof ileDetails ( $recipie nt['ID'] ) ;
143           $r et .= '<di v class="c lear_both" ></div>';   143           $r et .= '<di v class="c lear_both" ></div>';
144       }   144       }
145     145  
146       if( '1 ' != $hide _form )   146       if( '1 ' != $hide _form )
147       {   147       {
148            $sSubject   =   (isset($_R EQUEST['su bject']))   ?   'Re:   '.process_ db_in p u t
($_REQUEST ['subject' ])   :   '';
  148            $sSubject   =   (isset($_R EQUEST['su bject']))   ?   'Re:   '.process_
p ass_da t a ($_REQUEST ['subject' ])   :   '';
149           ob _start()   149           ob _start()
150              150           
151           ?>   151           ?>
152           <s cript type ="text/jav ascript">   152           <s cript type ="text/jav ascript">
153                <!--   153                <!--
154                function  changeDes t(control)   154                function  changeDes t(control)
155                {   155                {
156                    if (  control.v alue == 'l ovemail' )   156                    if (  control.v alue == 'l ovemail' )
157                    {   157                    {
158                         z = docume nt.getElem entById("i d0004");   158                         z = docume nt.getElem entById("i d0004");
159                         z.disabled  = false;   159                         z.disabled  = false;
160                    }   160                    }
161                    else   161                    else
162                    {   162                    {
163                         xxx = docu ment.getEl ementById( "id0004");   163                         xxx = docu ment.getEl ementById( "id0004");
164                         xxx.disabl ed = true;   164                         xxx.disabl ed = true;
165                    }   165                    }
166                }   166                }
167                   167                
168                function  checkForm ()   168                function  checkForm ()
169                {   169                {
170                    var  el;   170                    var  el;
171                    var  hasErr = f alse;   171                    var  hasErr = f alse;
172                    var  fild = "";   172                    var  fild = "";
173                    el =  document. getElement ById("inpS ubj");   173                    el =  document. getElement ById("inpS ubj");
174                    if(  el.value.l ength < 3  )   174                    if(  el.value.l ength < 3  )
175                    {   175                    {
176                         el.style.b ackgroundC olor = "pi nk";   176                         el.style.b ackgroundC olor = "pi nk";
177                         el.style.b order = "1 px solid s ilver";   177                         el.style.b order = "1 px solid s ilver";
178                         hasErr = t rue;   178                         hasErr = t rue;
179                         fild += "  <?= _t('_S ubject') ? >";   179                         fild += "  <?= _t('_S ubject') ? >";
180                    }   180                    }
181                    else   181                    else
182                         el.style.b ackgroundC olor = "#f ff";   182                         el.style.b ackgroundC olor = "#f ff";
183                       183                    
184                    if ( hasErr)   184                    if ( hasErr)
185                    {   185                    {
186                         alert( "<? = _t('_ple ase_fill_n ext_fields _first') ? >!" + fild  )   186                         alert( "<? = _t('_ple ase_fill_n ext_fields _first') ? >!" + fild  )
187                         return fal se;   187                         return fal se;
188                    }   188                    }
189                    else   189                    else
190                    {   190                    {
191                         return tru e;   191                         return tru e;
192                    }   192                    }
193                    retu rn false;   193                    retu rn false;
194                }   194                }
195                //-->   195                //-->
196           </ script>   196           </ script>
197              197           
198           <f orm name=" compose_fo rm" method ="post"   198           <f orm name=" compose_fo rm" method ="post"
199              action="<? = $_SERVER ['PHP_SELF '] . ( $re cipient ?  "?ID={$rec ipient['ID ']}" : ""  ) ?>" onsu bmit="retu rn checkFo rm();">   199              action="<? = $_SERVER ['PHP_SELF '] . ( $re cipient ?  "?ID={$rec ipient['ID ']}" : ""  ) ?>" onsu bmit="retu rn checkFo rm();">
200                <table c lass="comp oseTable">   200                <table c lass="comp oseTable">
201                    <tr>   201                    <tr>
202           <?   202           <?
203           if  ( !$recip ient )   203           if  ( !$recip ient )
204           {   204           {
205                ?>   205                ?>
206                         <td class= "form_labe l"><?= _t(  "_SEND_MS G_TO" )?>< /td>   206                         <td class= "form_labe l"><?= _t(  "_SEND_MS G_TO" )?>< /td>
207                         <td class= "form_valu e">   207                         <td class= "form_valu e">
208                             <input  class="in pMessageTo " type="te xt" name=" ID" />   208                             <input  class="in pMessageTo " type="te xt" name=" ID" />
209                         </td>   209                         </td>
210                    </tr >   210                    </tr >
211                    <tr>   211                    <tr>
212                <?   212                <?
213           }   213           }
214           ?>   214           ?>
215                         <td class= "form_labe l"><?= _t( '_Subject' ) ?>:</td>   215                         <td class= "form_labe l"><?= _t( '_Subject' ) ?>:</td>
216                         <td class= "form_valu e">   216                         <td class= "form_valu e">
217                             <input  class="in pSubj" id= "inpSubj"  name="mes_ subject" t ype="text"  value="<? = $sSubjec t; ?>" />   217                             <input  class="in pSubj" id= "inpSubj"  name="mes_ subject" t ype="text"  value="<? = $sSubjec t; ?>" />
218                         </td>   218                         </td>
219                    </tr >   219                    </tr >
220                    <tr>   220                    <tr>
221                         <td class= "form_labe l"><?= _t(  "_Message  text" ) ? >:</td>   221                         <td class= "form_labe l"><?= _t(  "_Message  text" ) ? >:</td>
222                         <td class= "form_valu e">   222                         <td class= "form_valu e">
223                             <texta rea class= "blogText"  id="blogT ext" name= "text"></t extarea>   223                             <texta rea class= "blogText"  id="blogT ext" name= "text"></t extarea>
224                         </td>   224                         </td>
225                    </tr >   225                    </tr >
226           <?   226           <?
227              227           
228           if  ( $_POST[ 'notify']  == 'on' )   228           if  ( $_POST[ 'notify']  == 'on' )
229                $notify_ sel = "che cked";   229                $notify_ sel = "che cked";
230           el se   230           el se
231                $notify_ sel = "";   231                $notify_ sel = "";
232     232  
233           sw itch( $_PO ST['sendto '] )   233           sw itch( $_PO ST['sendto '] )
234           {   234           {
235                case 'em ail':   235                case 'em ail':
236                    $ema il_sel = '  checked=" checked" ' ;   236                    $ema il_sel = '  checked=" checked" ' ;
237                    $lov email_sel  = "";   237                    $lov email_sel  = "";
238                    $bot h_sel = "" ;   238                    $bot h_sel = "" ;
239                    brea k;   239                    brea k;
240                case 'lo vemail':   240                case 'lo vemail':
241                    $ema il_sel = " ";   241                    $ema il_sel = " ";
242                    $lov email_sel  = ' checke d="checked "';   242                    $lov email_sel  = ' checke d="checked "';
243                    $bot h_sel = "" ;   243                    $bot h_sel = "" ;
244                    brea k;   244                    brea k;
245                default:   245                default:
246                    $ema il_sel = " ";   246                    $ema il_sel = " ";
247                    $lov email_sel  = "";   247                    $lov email_sel  = "";
248                    $bot h_sel = '  checked="c hecked"';   248                    $bot h_sel = '  checked="c hecked"';
249                    brea k;   249                    brea k;
250           }   250           }
251     251  
252     252  
253     253  
254           if  ( 'on' ==  $en_dest_ choice )   254           if  ( 'on' ==  $en_dest_ choice )
255           {   255           {
256                $javascr ipt = ( $e n_inbox_no tify ? ""  : "onClick =\"javascr ipt: chang eDest(this );\"" );   256                $javascr ipt = ( $e n_inbox_no tify ? ""  : "onClick =\"javascr ipt: chang eDest(this );\"" );
257                   257                
258                $notify_ dis = "";   258                $notify_ dis = "";
259                if ( !$l ovemail_se l && $en_d est_choice  )   259                if ( !$l ovemail_se l && $en_d est_choice  )
260                {   260                {
261                    $not ify_sel =  "";   261                    $not ify_sel =  "";
262                    $not ify_dis =  ' disabled ="disabled "';   262                    $not ify_dis =  ' disabled ="disabled "';
263                }   263                }
264                   264                
265                ?>   265                ?>
266                    <tr>   266                    <tr>
267                         <td>&nbsp; </td>   267                         <td>&nbsp; </td>
268                         <td nowrap ="nowrap">   268                         <td nowrap ="nowrap">
269                             <input  type="rad io" id="id 0001" name ="sendto"  value="ema il"  <?= $ javascript  . $email_ sel ?> />   269                             <input  type="rad io" id="id 0001" name ="sendto"  value="ema il"  <?= $ javascript  . $email_ sel ?> />
270                             <label  for="id00 01"><?= _t ( "_Send t o e-mail"  )?></label >   270                             <label  for="id00 01"><?= _t ( "_Send t o e-mail"  )?></label >
271                         </td>   271                         </td>
272                    </tr >   272                    </tr >
273                    <tr>   273                    <tr>
274                         <td>&nbsp; </td>   274                         <td>&nbsp; </td>
275                         <td>   275                         <td>
276                             <input  type="rad io" id="id 0002" name ="sendto"  value="lov email" <?=  $javascri pt . $love mail_sel ? > />   276                             <input  type="rad io" id="id 0002" name ="sendto"  value="lov email" <?=  $javascri pt . $love mail_sel ? > />
277                             <label  for="id00 02"><?= _t ( "_Send t o communic ator" ) ?> </label>   277                             <label  for="id00 02"><?= _t ( "_Send t o communic ator" ) ?> </label>
278                                278                             
279                             <input  type="che ckbox" id= "id0004" n ame="notif y" <?= $no tify_sel   . $notify_ dis ?> />   279                             <input  type="che ckbox" id= "id0004" n ame="notif y" <?= $no tify_sel   . $notify_ dis ?> />
280                             <label  for="id00 04"><?=  _ t( "_Notif y by e-mai l" ) ?></l abel>   280                             <label  for="id00 04"><?=  _ t( "_Notif y by e-mai l" ) ?></l abel>
281                         </td>   281                         </td>
282                    </tr >   282                    </tr >
283                    <tr>   283                    <tr>
284                         <td>&nbsp; </td>   284                         <td>&nbsp; </td>
285                         <td nowrap ="nowrap"  colspan="3 " align="l eft" style ="padding- left:5px;" >   285                         <td nowrap ="nowrap"  colspan="3 " align="l eft" style ="padding- left:5px;" >
286                             <input  type="rad io" id="id 0003" name ="sendto"  value="bot h" <?= $ja vascript .   $both_se l ?> />   286                             <input  type="rad io" id="id 0003" name ="sendto"  value="bot h" <?= $ja vascript .   $both_se l ?> />
287                             <label  for=id000 3> <?= _t(  "_both2"  ) ?></labe l>   287                             <label  for=id000 3> <?= _t(  "_both2"  ) ?></labe l>
288                         </td>   288                         </td>
289                    </tr >   289                    </tr >
290                <?   290                <?
291           }   291           }
292           el se   292           el se
293           {   293           {
294                ?>   294                ?>
295                    <inp ut type="h idden" nam e="sendto"  value="lo vemail" />   295                    <inp ut type="h idden" nam e="sendto"  value="lo vemail" />
296                <?   296                <?
297           }   297           }
298           ?>   298           ?>
299                    <tr>   299                    <tr>
300                         <td colspa n="2" clas s="form_co lspan">   300                         <td colspa n="2" clas s="form_co lspan">
301                             <input  class="bu tton" type ="submit"  value=" <? =_t( "_Sen d" ) ?>" / >   301                             <input  class="bu tton" type ="submit"  value=" <? =_t( "_Sen d" ) ?>" / >
302                         </td>   302                         </td>
303                    </tr >   303                    </tr >
304                </table>   304                </table>
305                <input t ype="hidde n" name="a ction" val ue="send"  />   305                <input t ype="hidde n" name="a ction" val ue="send"  />
306           </ form>   306           </ form>
307              307           
308           <?   308           <?
309           $r et .= ob_g et_clean() ;   309           $r et .= ob_g et_clean() ;
310       }   310       }
311       else   311       else
312       {   312       {
313           $r et .= '<di v style="m argin:15px  0px; text -align:cen ter;">' .  _t('_to_co mpose_new_ message',  $recipient ['NickName '], $recip ient['ID'] , $site['u rl'] ) . ' </div>';   313           $r et .= '<di v style="m argin:15px  0px; text -align:cen ter;">' .  _t('_to_co mpose_new_ message',  $recipient ['NickName '], $recip ient['ID'] , $site['u rl'] ) . ' </div>';
314       }   314       }
315       $ret . = '</div>' ;   315       $ret . = '</div>' ;
316     316  
317     317  
318       return  $ret;   318       return  $ret;
319   }   319   }
320     320  
321   /**   321   /**
322    * Send me ssage   322    * Send me ssage
323    */   323    */
324   function M emberSendM essage( $m ember, $re cipient )   324   function M emberSendM essage( $m ember, $re cipient )
325   {   325   {
326       global  $site;   326       global  $site;
327     327  
328       $en_de st_choice      = getP aram( "ena ble_msg_de st_choice"  );   328       $en_de st_choice      = getP aram( "ena ble_msg_de st_choice"  );
329       $max_m essage_siz e   = getP aram( "max _inbox_mes sage_size"  );   329       $max_m essage_siz e   = getP aram( "max _inbox_mes sage_size"  );
330       $max_m essages        = getP aram( "max _inbox_mes sages" );   330       $max_m essages        = getP aram( "max _inbox_mes sages" );
331     331  
332       // Che ck if reci pient is a ctive   332       // Che ck if reci pient is a ctive
333       if( 'A ctive' !=  $recipient ['Status']  )   333       if( 'A ctive' !=  $recipient ['Status']  )
334       {   334       {
335           re turn 10;   335           re turn 10;
336       }   336       }
337     337  
338       // Che ck if memb er is bloc ked   338       // Che ck if memb er is bloc ked
339       if ( d b_arr( "SE LECT `ID`,  `Profile`  FROM `Blo ckList` WH ERE `Profi le` = {$me mber['ID'] } AND `ID`  = '{$reci pient['ID' ]}';" ) )   339       if ( d b_arr( "SE LECT `ID`,  `Profile`  FROM `Blo ckList` WH ERE `Profi le` = {$me mber['ID'] } AND `ID`  = '{$reci pient['ID' ]}';" ) )
340       {   340       {
341           re turn 5;   341           re turn 5;
342       }   342       }
343     343  
344   // antispa m ))   344   // antispa m ))
345       if ( d b_arr("SEL ECT `ID` F ROM `Messa ges` WHERE  `Sender`  = {$member [ID]} AND  date_add(` Date`, INT ERVAL 1 MI NUTE) > No w()") )   345       if ( d b_arr("SEL ECT `ID` F ROM `Messa ges` WHERE  `Sender`  = {$member [ID]} AND  date_add(` Date`, INT ERVAL 1 MI NUTE) > No w()") )
346       {   346       {
347           re turn 3;   347           re turn 3;
348       }   348       }
349     349  
350     350  
351       // Get  sender in fo   351       // Get  sender in fo
352       $sende r = getPro fileInfo(  $member['I D'] );   352       $sende r = getPro fileInfo(  $member['I D'] );
353     353  
354       $aPlus  = array() ;   354       $aPlus  = array() ;
355       $aPlus ['ProfileR eference']  = $sender  ? '<a hre f="' . get ProfileLin k($member[ 'ID']) . ' ">' . $sen der['NickN ame'] . '< /a> (' . g etProfileL ink($membe r['ID']) .  ') ' : '< b>'. _t("_ Visitor")  .'</b>';   355       $aPlus ['ProfileR eference']  = $sender  ? '<a hre f="' . get ProfileLin k($member[ 'ID']) . ' ">' . $sen der['NickN ame'] . '< /a> (' . g etProfileL ink($membe r['ID']) .  ') ' : '< b>'. _t("_ Visitor")  .'</b>';
356     356  
357       // Don 't send no tification  if messag e is sendi ng to emai l   357       // Don 't send no tification  if messag e is sendi ng to emai l
358       if ( $ _POST['not ify'] && ! ($_POST['s endto'] ==  "email" | | $_POST[' sendto'] = = "both")  )   358       if ( $ _POST['not ify'] && ! ($_POST['s endto'] ==  "email" | | $_POST[' sendto'] = = "both")  )
359       {   359       {
360           $m essage_tex t = getPar am("t_Comp ose");   360           $m essage_tex t = getPar am("t_Comp ose");
361           $s ubject = g etParam('t _Compose_s ubject');   361           $s ubject = g etParam('t _Compose_s ubject');
362     362  
363           $a Plus['send erNickName '] = $send er ? $send er['NickNa me'] : _t( "_Visitor" );   363           $a Plus['send erNickName '] = $send er ? $send er['NickNa me'] : _t( "_Visitor" );
364     364  
365           $n otify_res  = sendMail ( $recipie nt['Email' ], $subjec t, $messag e_text, $r ecipient[' ID'], $aPl us );   365           $n otify_res  = sendMail ( $recipie nt['Email' ], $subjec t, $messag e_text, $r ecipient[' ID'], $aPl us );
366     366  
367           if  ( !$notif y_res )   367           if  ( !$notif y_res )
368                echo "<d iv class=\ "err\">".  _t("_Notif ication se nd failed" ) ."</div> <br />\n";   368                echo "<d iv class=\ "err\">".  _t("_Notif ication se nd failed" ) ."</div> <br />\n";
369       }   369       }
370     370  
371       // Sen d message  to email   371       // Sen d message  to email
372       if ( $ en_dest_ch oice && ($ _POST['sen dto'] == " email" ||  $_POST['se ndto'] ==  "both") )   372       if ( $ en_dest_ch oice && ($ _POST['sen dto'] == " email" ||  $_POST['se ndto'] ==  "both") )
373       {   373       {
374           $m essage_tex t = getPar am("t_Mess age");   374           $m essage_tex t = getPar am("t_Mess age");
375           $s ubject       = proces s_pass_dat a( $_POST[ 'mes_subje ct'] );   375           $s ubject       = proces s_pass_dat a( $_POST[ 'mes_subje ct'] );
376     376  
377           $a Plus['Mess ageText']  = strmaxte xtlen( cle ar_xss( re place_full _uris( pro cess_pass_ data( $_PO ST['text']  ) ) ), $m ax_message _size);   377           $a Plus['Mess ageText']  = strmaxte xtlen( cle ar_xss( re place_full _uris( pro cess_pass_ data( $_PO ST['text']  ) ) ), $m ax_message _size);
378              378           
379           $r esult = se ndMail( $r ecipient[' Email'], $ subject, $ message_te xt, $recip ient['ID'] , $aPlus ) ;   379           $r esult = se ndMail( $r ecipient[' Email'], $ subject, $ message_te xt, $recip ient['ID'] , $aPlus ) ;
380       }   380       }
381     381  
382       // Sen d message  to communi cator   382       // Sen d message  to communi cator
383       if ( $ _POST['sen dto'] == " lovemail"  || $_POST[ 'sendto']  == "both"  )   383       if ( $ _POST['sen dto'] == " lovemail"  || $_POST[ 'sendto']  == "both"  )
384       {   384       {
385           //  Restrict  with total  messages  count   385           //  Restrict  with total  messages  count
386           $m essages_co unt = db_a rr( "SELEC T COUNT(*)  AS `mess_ count` FRO M `Message s` WHERE ` Recipient`  = '{$reci pient['ID' ]}'" );   386           $m essages_co unt = db_a rr( "SELEC T COUNT(*)  AS `mess_ count` FRO M `Message s` WHERE ` Recipient`  = '{$reci pient['ID' ]}'" );
387           $m essages_co unt = $mes sages_coun t['mess_co unt'];   387           $m essages_co unt = $mes sages_coun t['mess_co unt'];
388           if  ( ($messa ges_count  - 1) > $ma x_messages  )   388           if  ( ($messa ges_count  - 1) > $ma x_messages  )
389           {   389           {
390                $del_res  = db_res(  "SELECT ` ID` FROM ` Messages`  WHERE `Rec ipient` =  '{$recipie nt['ID']}'  ORDER BY  `Date` ASC  LIMIT ".  ($messages _count - $ max_messag es + 1) );   390                $del_res  = db_res(  "SELECT ` ID` FROM ` Messages`  WHERE `Rec ipient` =  '{$recipie nt['ID']}'  ORDER BY  `Date` ASC  LIMIT ".  ($messages _count - $ max_messag es + 1) );
391                while (  $del_arr =  mysql_fet ch_array($ del_res) )   391                while (  $del_arr =  mysql_fet ch_array($ del_res) )
392                    db_r es( "DELET E FROM `Me ssages` WH ERE `ID` =  {$del_arr ['ID']}" ) ;   392                    db_r es( "DELET E FROM `Me ssages` WH ERE `ID` =  {$del_arr ['ID']}" ) ;
393           }   393           }
394     394  
395           //  Insert me ssage into  database   395           //  Insert me ssage into  database
396           $m essage_tex t    = str maxtextlen ( addslash es( clear_ xss( proce ss_pass_da ta( $_POST ['text'] )  ) ), $max _message_s ize );   396           $m essage_tex t    = str maxtextlen ( addslash es( clear_ xss( proce ss_pass_da ta( $_POST ['text'] )  ) ), $max _message_s ize );
397           $m essage_sub ject = str maxwordlen ( process_ db_input(  $_POST['me s_subject' ] ), 30);   397           $m essage_sub ject = str maxwordlen ( process_ db_input(  $_POST['me s_subject' ] ), 30);
398           $r esult = db _res( "INS ERT INTO ` Messages`  ( `Date`,  `Sender`,  `Recipient `, `Text`,  `Subject` , `New` )  VALUES ( N OW(), {$me mber['ID'] }, {$recip ient['ID'] }, '$messa ge_text',  '$message_ subject',  '1' )" );   398           $r esult = db _res( "INS ERT INTO ` Messages`  ( `Date`,  `Sender`,  `Recipient `, `Text`,  `Subject` , `New` )  VALUES ( N OW(), {$me mber['ID'] }, {$recip ient['ID'] }, '$messa ge_text',  '$message_ subject',  '1' )" );
399       }   399       }
400     400  
401       // If  sending su ccessful t hen mark a s performe d action   401       // If  sending su ccessful t hen mark a s performe d action
402       if ( $ result )   402       if ( $ result )
403       {   403       {
404           ch eckAction(  $member[' ID'], ACTI ON_ID_SEND _MESSAGE,  true );   404           ch eckAction(  $member[' ID'], ACTI ON_ID_SEND _MESSAGE,  true );
405       }   405       }
406       else   406       else
407           re turn 1;   407           re turn 1;
408     408  
409       return  0;   409       return  0;
410     410  
411   }   411   }
412   ?>   412   ?>