353. File Comparison Report

Produced on Mon May 12 13:05:51 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.

353.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\periodic notifies.php Mon Jan 28 09:41:40 2008 UTC
2 Dolphin-v.6.1.0\periodic notifies.php Wed Apr 9 17:44:48 2008 UTC

353.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 22 246
Changed 14 117
Inserted 1 3
Removed 7 43

353.3 Comparison options

Whitespace
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

353.4 Active regular expressions

No regular expressions were active.

353.5 Comparison detail

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( '[path _to]inc/he ader.inc.p hp' );   21   require_on ce( '[path _to]inc/he ader.inc.p hp' );
22   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd b.inc.php'  );   22   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd b.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 . 'u tils.inc.p hp' );   24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'u tils.inc.p hp' );
25     25  
26   // - Funct ions -    
27   function f inish()    
28   {    
29       global  $site;    
30       global  $MODE;    
31      
32       if ( $ MODE != "_ LIVE_" )    
33       {    
34           $o utput = ob _get_conte nts();    
35           ob _end_clean ();    
36           if  ( $MODE = = "_MAIL_"  )    
37           {    
38                mail( $s ite['email '], "{$sit e['title'] }: Periodi c Report ( Notify Let ters)", $o utput, "Fr om: Period ic(Notify  Letters) < $site[emai l]>", "-f$ site[email ]" );    
39           }    
40       }    
41       exit;    
42   }    
43      
44   // ------- ------   26   // ------- ------
45     27  
46   // - Defau lts -    
47   $MODE   =  "_MAIL_";    
48   $DAY    =  "_OBEY_";    
49      
50   // - Alway s finish   28   // - Alway s finish
51   set_time_l imit( 3600 0 );   29   set_time_l imit( 3600 0 );
52   ignore_use r_abort();   30   ignore_use r_abort();
53     31  
    32   // - Defau lts -
    33   $MODE   =  "_MAIL_";
    34   $DAY    =  "_OBEY_";
54     35  
55   // - Param eters chec k -   36   // - Param eters chec k -
56   for   (   $i   =   0;   strlen(   $argv[$i]   );   $i++   )
  37   for   (   $i   =   0;   strlen(   $argv[$i]   );   $i++   )   {
57   {   38        switch(   $argv[$i]   )   {
58        switch(   $argv[$i]   )
  39            case   ' --live ' :   $MODE   =   "_LIVE_";   break;
59       {   40            case   ' --mail ' :   $MODE   =   "_MAIL_";   break;
60            case   " --live " :   $MODE   =   "_LIVE_";   break;    
61            case   " --mail " :   $MODE   =   "_MAIL_";   break;    
62       }   41       }
63   }   42   }
64     43  
65   if   (   $MODE   ! =   " _ L I VE _ "   )   44   // - Begin  -
    45   if   (   $MODE  
= =   ' _ MA I L _ '   )
66       ob_sta rt();   46       ob_sta rt();
67     47  
68   $msgs_per_ start   =   getParam(   " msgs_per_s tart "   );   48   $msgs_per_ start   =   getParam(   ' msgs_per_s tart '   );
69     49  
70   $ arr   =  
db_
a rr (   " SELECT   COUNT(*)   FROM   NotifyQueu e " ,   0   );
  50   $ iFullCount   =   (int) db_ v a lue (   ' SELECT   COUNT(*)   FROM   NotifyQueu e ' ,   0   );
71   if   (  
$ arr[0]   <=   0   )   exit;
  51   if   (   ! $ iFullCount   )   exit;
72     52  
73   echo "\n-  Start emai l send -\n ";   53   echo "\n-  Start emai l send -\n ";
74   echo   "Total   queued   emails:   $ arr[0] \n";   54   echo   "Total   queued   emails:   $ iFullCount \n";
75   $total_cou nt   =   ($ arr[0]   <   $msgs_per_ start   ?   $ arr[0]   :   $msgs_per_ start);   55   $total_cou nt   =   ($ iFullCount   <   $msgs_per_ start   ?   $ iFullCount   :   $msgs_per_ start);
76   $total_per _query   =   round(   $total_cou nt   /   4   )   +   1;   56   $total_per _query   =   round(   $total_cou nt   /   3   )   +   1;
77   echo "Read y for send : ". $tota l_count ." \n";   57   echo "Read y for send : ". $tota l_count ." \n";
78     58  
79   if ( $arr[ 0] > 0 )   59   if ( $iFul lCount ) {
80   {    
81       $count _ok = 0;   60       $count _ok = 0;
82       $err =  0;   61       $err =  0;
83     62  
84        if   (   $count_ok   <   $total_cou nt   )
  63        if   (   $count_ok   <   $total_cou nt   )   {
85       {   64            //   Notify   Messages
86            //   Notify   Messages   -   HTML      
87           $n fs_res = d b_res("   65           $n fs_res = d b_res("
88                SELECT   66                SELECT
89                    Noti fyQueue.Em ail as ID1 ,   67                    Noti fyQueue.Em ail as ID1 ,
90                    Noti fyQueue.Ms g as ID2,   68                    Noti fyQueue.Ms g as ID2,
91                    Noti fyEmails.N ame as Nam e,   69                    Noti fyEmails.N ame as Nam e,
92                    Noti fyEmails.E mail,   70                    Noti fyEmails.E mail,
93                    Noti fyMsgs.Sub j,   71                    Noti fyMsgs.Sub j,
94                    Noti fyMsgs.HTM L as Body   72                    Noti fyMsgs.HTM L as Body
95                FROM Not ifyQueue   73                FROM Not ifyQueue
96                   74                 INNER   JOIN   NotifyMsgs   ON
97                 INNER   JOIN   NotifyMsgs
  75                    
(NotifyMsg s.ID   =    NotifyQueu e.Msg)
98                 ON   (NotifyMsg s.ID   =    NotifyQueu e.Msg)   76                 INNER   JOIN   NotifyEmai ls   ON
99                   77                    
(NotifyEma ils.ID   =   NotifyQueu e.Email)
100                 INNER   JOIN   NotifyEmai ls
   
101                 ON   (NotifyEma ils.ID   =   NotifyQueu e.Email)    
102                    
103                WHERE   78                WHERE
104                    Noti fyQueue.`F rom` = 'No tifyEmails ' AND   79                    Noti fyQueue.`F rom` = 'No tifyEmails ' AND
105                     NotifyEmai ls.EmailFl ag   =   'NotifyMe'   AND   80                     NotifyEmai ls.EmailFl ag   =   'NotifyMe'
106                    Noti fyEmails.E mailText =  'HTML'   81                 LIMIT   $total_per _query
107                 LIMIT   $total_per _query ",0   );   82           ", 0 );
    83           
108           wh ile( $row  = mysql_fe tch_array(  $nfs_res  ) )   84           wh ile( $row  = mysql_fe tch_array(  $nfs_res  ) )
109           {   85           {
110                $headers  = "From:  {$site['ti tle']} <{$ site['emai l_notify'] }>";   86                $headers  = "From:  {$site['ti tle']} <{$ site['emai l_notify'] }>";
111                $headers  = "MIME-V ersion: 1. 0\r\n" . " Content-ty pe: text/h tml; chars et=UTF-8\r \n" . $hea ders;   87                $headers  = "MIME-V ersion: 1. 0\r\n" . " Content-ty pe: text/h tml; chars et=UTF-8\r \n" . $hea ders;
112                if ( !ma il( $row[' Email'], $ row['Subj' ], $row['B ody'], $he aders, "-f {$site['em ail_notify ']}") )   88                if ( !ma il( $row[' Email'], $ row['Subj' ], $row['B ody'], $he aders, "-f {$site['em ail_notify ']}") )
113                    ++$e rr;   89                    ++$e rr;
114                if ( $ro w[ID1] &&  $row[ID2]  )   90                if ( $ro w[ID1] &&  $row[ID2]  )
115                    db_r es("DELETE  FROM Noti fyQueue WH ERE `Email ` = $row[I D1] AND `M sg` = $row [ID2] AND  `From` = ' NotifyEmai ls'", 0 );   91                    db_r es("DELETE  FROM Noti fyQueue WH ERE `Email ` = $row[I D1] AND `M sg` = $row [ID2] AND  `From` = ' NotifyEmai ls'", 0 );
116                else   92                else
117                    echo  "ERROR: w hile delet ing from ' NotifyQueu e' ( Email  ID: $row[ ID1], Msg  ID: $row[I D2] )\n";   93                    echo  "ERROR: w hile delet ing from ' NotifyQueu e' ( Email  ID: $row[ ID1], Msg  ID: $row[I D2] )\n";
118                ++$count _ok;   94                ++$count _ok;
119                if ( $co unt_ok >=  $total_cou nt ) break ;   95                if ( $co unt_ok >=  $total_cou nt ) break ;
120           }   96           }
121       }   97       }
122     98  
123     99  
124        if   (   $count_ok   <   $total_cou nt   )
  100        if   (   $count_ok   <   $total_cou nt   )   {
125       {   101            //   Profiles   Messages
126           //  Notify Me ssages - T EXT    
127           $n fs_res = d b_res("SEL ECT Notify Queue.Emai l as ID1,  NotifyQueu e.Msg as I D2, Notify Emails.Nam e as Name,  NotifyEma ils.Email,  NotifyMsg s.Subj, No tifyMsgs.T ext as Bod y FROM  No tifyQueue  INNER JOIN  NotifyMsg s ON (Noti fyMsgs.ID  =  NotifyQ ueue.Msg)  INNER JOIN  NotifyEma ils ON (No tifyEmails .ID = Noti fyQueue.Em ail) WHERE   NotifyQu eue.`From`  = 'Notify Emails' AN D  NotifyE mails.Emai lFlag = 'N otifyMe' A ND NotifyE mails.Emai lText <> ' HTML'",0);    
128           wh ile( $row  = mysql_fe tch_array(  $nfs_res  ) )    
129           {    
130                if ( !ma il( $row[' Email'], $ row['Subj' ], $row['B ody'], "Fr om: {$site ['title']}  <{$site[' email_noti fy']}>", " -f{$site[' email_noti fy']}") )    
131                    ++$e rr;    
132                if ( $ro w[ID1] &&  $row[ID2]  )    
133                    db_r es("DELETE  FROM Noti fyQueue WH ERE Email  = $row[ID1 ] AND Msg  = $row[ID2 ] AND `Fro m` = 'Noti fyEmails'" , 0 );    
134                else    
135                    echo  "ERROR: w hile delet ing from ' NotifyQueu e' ( Email  ID: $row[ ID1], Msg  ID: $row[I D2] )\n";    
136                ++$count _ok;    
137                if ( $co unt_ok >=  $total_cou nt ) break ;    
138           }    
139       }    
140      
141       if ( $ count_ok <  $total_co unt )    
142       {    
143            //   Profiles   Messages   -   HTML    
144           $n fs_res = d b_res("   102           $n fs_res = d b_res("
145                SELECT   103                SELECT
146                    Noti fyQueue.Em ail as ID1 ,   104                    Noti fyQueue.Em ail as ID1 ,
147                    Noti fyQueue.Ms g as ID2,   105                    Noti fyQueue.Ms g as ID2,
148                    Prof iles.NickN ame as Nam e,   106                    Prof iles.NickN ame as Nam e,
149                    Prof iles.Email ,   107                    Prof iles.Email ,
150                    Noti fyMsgs.Sub j,   108                    Noti fyMsgs.Sub j,
151                    Noti fyMsgs.HTM L as Body   109                    Noti fyMsgs.HTM L as Body
152                FROM Not ifyQueue   110                FROM Not ifyQueue             
153                   111                 INNER   JOIN   NotifyMsgs   ON
154                 INNER   JOIN   NotifyMsgs
  112                    
(NotifyMsg s.ID   =    NotifyQueu e.Msg)
155                 ON   (NotifyMsg s.ID   =    NotifyQueu e.Msg)   113                 INNER   JOIN   Profiles   ON
156                   114                    
(Profiles. ID   =   NotifyQueu e.Email)
157                 INNER   JOIN   Profiles
   
158                 ON   (Profiles. ID   =   NotifyQueu e.Email)    
159                    
160                WHERE   115                WHERE
161                    Noti fyQueue.`F rom` = 'Pr ofiles' AN D   116                    Noti fyQueue.`F rom` = 'Pr ofiles' AN D
162                     Profiles.E mailNotify    =   'NotifyMe'   AND   117                     Profiles.E mailNotify    =   'NotifyMe'
163                    Prof iles.Email Flag = 'HT ML'",0 );   118                ",0 );
164              119           
165           wh ile( $row  = mysql_fe tch_array(  $nfs_res  ) )   120           wh ile( $row  = mysql_fe tch_array(  $nfs_res  ) )
166           {   121           {
167                $headers  = "From:  {$site['ti tle']} <{$ site['emai l_notify'] }>";   122                $headers  = "From:  {$site['ti tle']} <{$ site['emai l_notify'] }>";
168                $headers  = "MIME-V ersion: 1. 0\r\n" . " Content-ty pe: text/h tml; chars et=UTF-8\r \n" . $hea ders;   123                $headers  = "MIME-V ersion: 1. 0\r\n" . " Content-ty pe: text/h tml; chars et=UTF-8\r \n" . $hea ders;
169                if ( !ma il( $row[' Email'], $ row['Subj' ], $row['B ody'], $he aders, "-f {$site['em ail_notify ']}") )   124                if ( !ma il( $row[' Email'], $ row['Subj' ], $row['B ody'], $he aders, "-f {$site['em ail_notify ']}") )
170                    ++$e rr;   125                    ++$e rr;
171                if ( $ro w[ID1] &&  $row[ID2]  )   126                if ( $ro w[ID1] &&  $row[ID2]  )
172                    db_r es("DELETE  FROM Noti fyQueue WH ERE Email  = $row[ID1 ] AND Msg  = $row[ID2 ] AND Noti fyQueue.`F rom` = 'Pr ofiles'",  0 );   127                    db_r es("DELETE  FROM Noti fyQueue WH ERE Email  = $row[ID1 ] AND Msg  = $row[ID2 ] AND Noti fyQueue.`F rom` = 'Pr ofiles'",  0 );
173                else   128                else
174                    echo  "ERROR: w hile delet ing from ' NotifyQueu e' ( Email  ID: $row[ ID1], Msg  ID: $row[I D2] )\n";   129                    echo  "ERROR: w hile delet ing from ' NotifyQueu e' ( Email  ID: $row[ ID1], Msg  ID: $row[I D2] )\n";
175                ++$count _ok;   130                ++$count _ok;
176                if ( $co unt_ok >=  $total_cou nt ) break ;   131                if ( $co unt_ok >=  $total_cou nt ) break ;
177           }   132           }
178       }   133       }
179     134  
180       if ( $ count_ok <  $total_co unt )    
181       {    
182           //  Profiles  Messages -  TEXT    
183           $n fs_res = d b_res("SEL ECT Notify Queue.Emai l as ID1,  NotifyQueu e.Msg as I D2, Profil es.NickNam e as Name,  Profiles. Email, Not ifyMsgs.Su bj, Notify Msgs.Text  as Body FR OM  Notify Queue INNE R JOIN Not ifyMsgs ON  (NotifyMs gs.ID =  N otifyQueue .Msg) INNE R JOIN Pro files ON ( Profiles.I D = Notify Queue.Emai l) WHERE   NotifyQueu e.`From` =  'Profiles ' AND Prof iles.Email Notify  =  'NotifyMe'  AND Profi les.EmailF lag <> 'HT ML'",0);    
184           wh ile( $row  = mysql_fe tch_array(  $nfs_res  ) )    
185           {    
186                if ( !ma il( $row[' Email'], $ row['Subj' ], $row['B ody'], "Fr om: {$site ['title']}  <{$site[' email_noti fy']}>", " -f{$site[' email_noti fy']}") )    
187                    ++$e rr;    
188                if ( $ro w[ID1] &&  $row[ID2]  )    
189                    db_r es("DELETE  FROM Noti fyQueue WH ERE Email  = $row[ID1 ] AND Msg  = $row[ID2 ] AND Noti fyQueue.`F rom` = 'Pr ofiles'",  0 );    
190                else    
191                    echo  "ERROR: w hile delet ing from ' NotifyQueu e' ( Email  ID: $row[ ID1], Msg  ID: $row[I D2] )\n";    
192                ++$count _ok;    
193                if ( $co unt_ok >=  $total_cou nt ) break ;    
194           }    
195       }    
196     135  
197     136  
198        if   (   $count_ok   <   $total_cou nt   )
  137        if   (   $count_ok   <   $total_cou nt   )   {
199       {   138            //   Profiles   Messages
200            //   Profiles   Messages   -   TEXT   or   HTML   139           $n fs_res = d b_res("
201           $n fs_res = d b_res("SEL ECT Notify Queue.Emai l as ID1,  NotifyQueu e.Msg as I D2, Notify Queue.MsgT ext as Bod y, NotifyQ ueue.MsgSu bj as Subj , Profiles .NickName  as Name, P rofiles.Em ail FROM   NotifyQueu e INNER JO IN Profile s ON (Prof iles.ID =  NotifyQueu e.Email) W HERE  Noti fyQueue.`F rom` = 'Pr ofilesMsgT ext' AND P rofiles.Em ailNotify   = 'Notify Me'",0);   140                SELECT
    141                    Noti fyQueue.Em ail as ID1 ,
    142                    Noti fyQueue.Ms g as ID2,
    143                    Noti fyQueue.Ms gText as B ody,
    144                    Noti fyQueue.Ms gSubj as S ubj,
    145                    Prof iles.NickN ame as Nam e,
    146                    Prof iles.Email
    147                FROM Not ifyQueue
    148                INNER JO IN Profile s ON
    149                    (Pro files.ID =  NotifyQue ue.Email)
    150                WHERE
    151                    Noti fyQueue.`F rom` = 'Pr ofilesMsgT ext' AND
    152                    Prof iles.Email Notify  =  'NotifyMe'
    153                ",0);
    154           
202           wh ile( $row  = mysql_fe tch_array(  $nfs_res  ) )   155           wh ile( $row  = mysql_fe tch_array(  $nfs_res  ) )
203           {   156           {
204                $email_f lag = db_a rr("SELECT  EmailFlag  FROM Prof iles WHERE  Email = ' " . $row[' Email'] .  "' LIMIT 1 ");    
205                $body =  $row['Body '];   157                $body =  $row['Body '];
206                $headers  = "From:  {$site['ti tle']} <{$ site['emai l_notify'] }>";   158                $headers  = "From:  {$site['ti tle']} <{$ site['emai l_notify'] }>";
207     159  
208                if ( $em ail_flag[' EmailFlag' ] == "HTML " )    
209                {    
210                    $hea ders = "MI ME-Version : 1.0\r\n"  . "Conten t-type: te xt/html; c harset=UTF -8\r\n" .  $headers;   160                $headers  = "MIME-V ersion: 1. 0\r\n" . " Content-ty pe: text/h tml; chars et=UTF-8\r \n" . $hea ders;
211                }    
212     161  
213                if ( !ma il( $row[' Email'], $ row['Subj' ], $body,  $headers,  "-f{$site[ 'email_not ify']}") )   162                if ( !ma il( $row[' Email'], $ row['Subj' ], $body,  $headers,  "-f{$site[ 'email_not ify']}") )
214                    ++$e rr;   163                    ++$e rr;
215                if ( !db _res("DELE TE FROM No tifyQueue  WHERE Emai l = $row[I D1] AND No tifyQueue. `From` = ' ProfilesMs gText'", 0  ) )   164                if ( !db _res("DELE TE FROM No tifyQueue  WHERE Emai l = $row[I D1] AND No tifyQueue. `From` = ' ProfilesMs gText'", 0  ) )
216                    echo  "ERROR: w hile delet ing from ' NotifyQueu e' ( Email  ID: $row[ ID1], Msg  ID: $row[I D2] )\n";   165                    echo  "ERROR: w hile delet ing from ' NotifyQueu e' ( Email  ID: $row[ ID1], Msg  ID: $row[I D2] )\n";
217                ++$count _ok;   166                ++$count _ok;
218                if ( $co unt_ok >=  $total_cou nt ) break ;   167                if ( $co unt_ok >=  $total_cou nt ) break ;
219           }   168           }
220       }   169       }
221     170  
222       echo " Processed  emails: $c ount_ok\n" ;   171       echo " Processed  emails: $c ount_ok\n" ;
223       echo " Processed  emails wit h errors:  $err\n";   172       echo " Processed  emails wit h errors:  $err\n";
224   }   173   }
225     174  
226   if ( $err  ) finish() ;   175   if( $err a nd $MODE = = '_MAIL_'  ) {
    176       $outpu t = ob_get _clean();
    177       mail(  $site['ema il'], "{$s ite['title ']}: Perio dic Report  (Notify L etters)",  $output, " From: Peri odic(Notif y Letters)  <$site[em ail]>", "- f$site[ema il]" );
    178   }
    179  
    180   periodic_c heck_ban() ;
227     181  
228   ?>