812. File Comparison Report

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

812.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5 shoutbox.php Thu Oct 18 10:02:56 2007 UTC
2 Mon May 12 13:07:13 2008 UTC

812.2 Comparison summary

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

812.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

812.4 Active regular expressions

No regular expressions were active.

812.5 Comparison detail

1   <?    
2      
3   /********* ********** ********** ********** ********** ********** ********** ******    
4   *                              D olphin Sma rt Communi ty Builder    
5   *                                 --------- --------    
6   *     begi n                 : M on Mar 23  2006    
7   *     copy right             : ( C) 2006 Bo onEx Group    
8   *     webs ite               : h ttp://www. boonex.com /    
9   * This fil e is part  of Dolphin  - Smart C ommunity B uilder    
10   *    
11   * Dolphin  is free so ftware. Th is work is  licensed  under a Cr eative Com mons Attri bution 3.0  License.     
12   * http://c reativecom mons.org/l icenses/by /3.0/    
13   *    
14   * Dolphin  is distrib uted in th e hope tha t it will  be useful,  but WITHO UT ANY WAR RANTY;    
15   * without  even the i mplied war ranty of   MERCHANTAB ILITY or F ITNESS FOR  A PARTICU LAR PURPOS E.    
16   * See the  Creative C ommons Att ribution 3 .0 License  for more  details.     
17   * You shou ld have re ceived a c opy of the  Creative  Commons At tribution  3.0 Licens e along wi th Dolphin    
18   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m    
19   ********** ********** ********** ********** ********** ********** ********** *****/    
20      
21   require_on ce( 'inc/h eader.inc. php' );    
22   require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin.inc.p hp' );    
23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd esign.inc. php' );    
24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'u tils.inc.p hp' );    
25      
26   //-------- ---------- ---------- ----- cons tants    
27      
28      
29   $delay = 2 ;    
30      
31   $class_nam e = 'shout bg';    
32      
33   //-------- ---------- ---------- ---------- -----    
34      
35   if ( !( $l ogged['adm in'] = mem ber_auth(  1, false )  ) )    
36       if ( ! ( $logged[ 'member']  = member_a uth( 0, fa lse ) ) )    
37           if  ( !( $log ged['aff']  = member_ auth( 2, f alse )) )    
38                $logged[ 'moderator '] = membe r_auth( 3,  false );    
39      
40      
41   if ( $_POS T['shout']  )    
42   {    
43       $id =  (int)$_COO KIE['membe rID'];    
44       // Thi s is for a nti-spam p urpose    
45       $count _arr = db_ arr( "SELE CT COUNT(  * ) AS `my _count` FR OM `shoutb ox` WHERE  `id` = '$i d' AND (UN IX_TIMESTA MP(NOW())  - UNIX_TIM ESTAMP(dat e) < $dela y)" );    
46       if ( $ count_arr[ 'my_count' ] == 0 )    
47       {    
48           $t ext = strm axtextlen(  $_POST['s hout'], $o TemplConfi g -> maxte xtlength ) ;    
49           $t ext = proc ess_db_inp ut( $text  );    
50           //  Delete th e oldest r ecord if c ount more  than $maxr ecords    
51           $c ount_arr =  db_arr("S ELECT COUN T( * ) AS  `total_cou nt` FROM ` shoutbox`" );    
52           if  ( $count_ arr['total _count'] > = $oTemplC onfig -> m axrecords  )    
53           {    
54                $oldest_ date = db_ arr("SELEC T DATE_FOR MAT(`date` , '$date_f ormat' ) A S 'date' F ROM `shout box` ORDER  BY `date`  ASC LIMIT  1");    
55                db_res(  "DELETE FR OM `shoutb ox` WHERE  `date` = ' {$oldest_d ate['date' ]}'" );    
56           }    
57           //  Select la st class    
58           $l ast_class  = db_arr(" SELECT `cl ass` FROM  `shoutbox`  ORDER BY  `date` DES C LIMIT 1" );    
59           if  ( ($cn =  substr($la st_class[' class'], - 1)) >= $oT emplConfig  -> classe s )    
60                $cn = $c lass_name  . '1';    
61           el se    
62                $cn = $c lass_name  . ($cn + 1 );    
63           //  Insert to  database    
64           $q uery = "IN SERT INTO  `shoutbox`  VALUES (' $id', '$te xt', NOW() , '$cn')";    
65           db _res( $que ry );    
66       }    
67   }    
68      
69      
70   echo "<!DO CTYPE html  PUBLIC \" -//W3C//DT D XHTML 1. 0 Transiti onal//EN\"    
71       \"http ://www.w3. org/TR/xht ml1/DTD/xh tml1-trans itional.dt d\">    
72           <h tml xmlns= \"http://w ww.w3.org/ 1999/xhtml \" xml:lan g=\"en-US\ " lang=\"e n-US\">    
73           <h ead>    
74           <t itle></tit le>    
75           <m eta http-e quiv=\"Ref resh\" con tent=\"60\ " />    
76           <l ink href=\ "templates /tmpl_".$t mpl."/css/ shoutbox.c ss\" rel=\ "styleshee t\" type=\ "text/css\ " />    
77           <l ink href=\ "templates /tmpl_".$t mpl."/css/ anchor.css \" rel=\"s tylesheet\ " type=\"t ext/css\"  />    
78           <m eta http-e quiv=\"Con tent-Type\ " content= \"text/htm l; charset ={$langHTM LCharset}\ " />    
79       </head >    
80       <body> \n";    
81      
82   echo ThisP ageMainCod e();    
83      
84   echo "    
85       </body >    
86   </html>\n" ;    
87      
88   // ------- -------- p age compon ents funct ions    
89      
90   /**    
91    * page co de functio n    
92    */    
93   function T hisPageMai nCode()    
94   {    
95       global  $site;    
96       global  $oTemplCo nfig;    
97       global  $logged;    
98       global  $tmpl;    
99       global  $date_for mat;    
100      
101       $conte nt = "    
102           <f orm name=\ "shoutbox\ " method=\ "post\" ac tion=\"" .  $_SERVER[ 'PHP_SELF' ] . "\">    
103                <table b order=\"0\ " cellpadd ing=\"0\"  cellspacin g=\"0\" wi dth=\"100% \">    
104                    <tr> <td>    
105                         <table bor der=\"0\"  cellpaddin g=\"0\" ce llspacing= \"0\" widt h=\"100%\" >";    
106      
107       $class  = 'shoutb g1';    
108       // Pri nt input b ox    
109       $conte nt .= "    
110                             <tr><t d align=\" center\" c lass=\"$cl ass\">";    
111       if ($_ COOKIE['me mberID'] & & $logged[ 'member'])    
112       {    
113           if  ($tmpl ==  'g4')    
114           {    
115                $content  .= "    
116                                 <t able borde r=\"0\" ce llpadding= \"7\" cell spacing=\" 0\" width= \"100%\" b gcolor=\"# FFFFFF\">    
117                                      <tr>    
118                                          <td  align=\"le ft\"><inpu t maxlengt h=\"" . $o TemplConfi g -> maxte xtlength .  "\" type= \"text\" n ame=\"shou t\" class= \"shoutinp \"></td>    
119                                          <td> <strong>"  . _t('_sho ut_box_tit le') . "</ td>    
120                                      </tr>    
121                                 </ table>";    
122           }    
123           el se    
124           {    
125                $content  .= "    
126                                 <i nput maxle ngth=\"" .  $oTemplCo nfig -> ma xtextlengt h . "\" ty pe=\"text\ " name=\"s hout\" />" ;    
127           }    
128       }    
129       else    
130       {    
131           $c ontent .=  _t('_to_po st');    
132       }    
133      
134       $conte nt .= "    
135                             </td>< /tr>";    
136       // End  of print  input box    
137       $query  = "SELECT  `shoutbox `.`id`, `s houtbox`.` text`, DAT E_FORMAT(` shoutbox`. `date`,  ' $date_form at' ) AS ' date', `sh outbox`.`c lass`, `Pr ofiles`.`I D` as `prI D`, `Profi les`.`Nick Name` FROM  `shoutbox ` LEFT JOI N `Profile s` ON `Pro files`.`ID ` = `shout box`.`id`  ORDER BY ` shoutbox`. `date` DES C";    
138       $shout _res = db_ res( $quer y );    
139      
140       while  ( $shout_a rr = mysql _fetch_arr ay($shout_ res) )    
141       {    
142           $s hout_text  = process_ smiles( pr ocess_line _output( $ shout_arr[ 'text'], $ oTemplConf ig -> maxw ordlength)  );    
143           $c ontent .=  "    
144                             <tr><t d title=\" {$shout_ar r['date']} \" class=\ "{$shout_a rr['class' ]}\">    
145                                 <a  target=\" _blank\" h ref=\"".ge tProfileLi nk($shout_ arr['prID' ])."\" cla ss=\"membe rmenu\">{$ shout_arr[ 'NickName' ]}</a>: {$ shout_text }    
146                             </td>< /tr>";    
147       }    
148      
149       $conte nt .= "    
150                         </table>    
151                    </td ></tr>    
152                </table>    
153           </ form>\n";    
154      
155       return  $content;    
156   }    
157      
158   ?>