799. File Comparison Report

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

799.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5 news.php Thu Sep 20 09:00:20 2007 UTC
2 Dolphin-v.6.1.0 news.php Wed Apr 9 17:45:00 2008 UTC

799.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 11 178
Changed 7 22
Inserted 2 54
Removed 1 11

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

799.4 Active regular expressions

No regular expressions were active.

799.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( '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 . 'n ews.inc.ph p' );
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 . 'p rofiles.in c.php' );
24   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' );
25     26  
26   // ------- -------- p age variab les / logi n   27   // ------- -------- p age variab les / logi n
27     28  
28   $_page['na me_index']     = 20;   29   $_page['na me_index']     = 20;
29   $_page['cs s_name']       = 'new s.css';   30   $_page['cs s_name']       = 'new s.css';
30     31  
31   $logged['m ember'] =  member_aut h( 0, fals e );   32   $logged['m ember'] =  member_aut h( 0, fals e );
32     33  
33   $_page['he ader'] = _ t("_NEWS_H ");   34   $_page['he ader'] = _ t("_NEWS_H ");
34   $_page['he ader_text' ] = _t("_N EWS_H");   35   $_page['he ader_text' ] = _t("_N EWS_H");
35     36  
36   //$news_li mit_chars  = getParam ("max_news _preview") ;    
37      
38   $max_l  =  getParam(  "max_news_ text" );    
39   //$max_p   = getParam ( "max_new s_preview"  );    
40   $max_h  =  getParam(  "max_news_ header" );    
41      
42   if ( !$max _l )    
43       $max_l  = 4096;    
44   if ( !$max _h )    
45       $max_h  = 32;    
46      
47   // ------- -------- p age compon ents   37   // ------- -------- p age compon ents
48     38  
49   $_ni = $_p age['name_ index'];   39   $_ni = $_p age['name_ index'];
50   $_page_con t[$_ni]['p age_main_c ode']   =   M e mb e
r P rintNewsLi st();
  40   $_page_con t[$_ni]['p age_main_c ode']   =   iss e t($_GET['I D'])   ||   isset($_GE T['n e wsU r i'])   ?   getNews()   :   p rintNewsLi st();
51     41  
52   // ------- -------- [ END] page  components   42   // ------- -------- [ END] page  components
53     43  
54   PageCode() ;   44   PageCode() ;
55     45  
56   // ------- -------- p age compon ents funct ions   46   // ------- -------- p age compon ents funct ions
57     47  
58     48  
59   /**   49   /**
60    * Print n ews   50    * Print n ews
61    */   51    */
62   function   MemberP rintNewsLi st()   52   function   p rintNewsLi st()
63   {   53   {
64       global  $news_lim it_chars;   54       global  $news_lim it_chars;
65       global  $short_da te_format;   55       global  $short_da te_format;
66       global  $tmpl;   56       global  $tmpl;
67     57  
68       $query  = "   58       $bNews Friendly =  getParam( 'permalink s_news') = = 'on' ? t rue : fals e;
69           SE LECT    
70                `ID`,    
71                `Header` ,    
72                `Snippet `,    
73                DATE_FOR MAT(`Date` , '$short_ date_forma t' ) AS 'D ate'    
74           FR OM `News`    
75           OR DER BY `Da te` DESC    
76           ";    
77          59  
78        $res   =   db_r e
s
(   $query   );
  60        $res   =   g e tNew s List (
);
79     61  
80       ob_sta rt();   62       ob_sta rt();
81     63  
82       if ( ! mysql_num_ rows($res)  )   64       if ( ! mysql_num_ rows($res)  )
83       {   65       {
84           ?>   66           ?>
85                <div cla ss="no_new s">   67                <div cla ss="no_new s">
86                    <?=_ t("_No new s availabl e")?>   68                    <?=_ t("_No new s availabl e")?>
87                </div>   69                </div>
88           <?   70           <?
89       }   71       }
90       else   72       else
91       {   73       {
92           wh ile ( $new s_arr = my sql_fetch_ array($res ))   74           wh ile ( $new s_arr = my sql_fetch_ array($res ))
93           {   75           {
94                ?>   76                ?>
95                <div cla ss="news_c ont">   77                <div cla ss="news_c ont">
96                    <div  class="cl ear_both"> </div>   78                    <div  class="cl ear_both"> </div>
97                    <div  class="ne ws_header" >   79                    <div  class="ne ws_header" >
98                         <a   href="<?= "{$si t
e ['u rl ']} news_ vi ew .php? ID ={ $news_arr[ ' ID '] }" ?>">
  80                         <a   href="<?= ge t N e wsU rl ($ news_ arr['n ew s ID '],   $news_arr[ ' NewsUri '] ,   $bNewsFrie ndly) ?>">
99                             <?=pro cess_line_ output( $n ews_arr['H eader'] )? >   81                             <?=pro cess_line_ output( $n ews_arr['H eader'] )? >
100                         </a>   82                         </a>
101                    </di v>   83                    </di v>
102                     <div   class="new s_date"><? =
$news_arr[ 'Date']
?></div>
  84                     <div   class="new s_date"><? = date(   str_replac e('%','',$ short_date _format),   $news_arr[ 'Date']   ) ?></div>
103                    <div  class="ne ws_snippet ">   85                    <div  class="ne ws_snippet ">
104                         <?=process _
t ext _output(   $news_arr[ 'Snippet']   )?>
  86                         <?=process _ h t ml _output(   $news_arr[ 'Snippet']   )?>
105                    </di v>   87                    </di v>
106                    <div  class="cl ear_both"> </div>   88                    <div  class="cl ear_both"> </div>
107                </div>   89                </div>
108                <?   90                <?
109           }   91           }
110       }   92       }
111          93       
112       return  ob_get_cl ean();   94       return  ob_get_cl ean();
113   }   95   }
114     96  
    97   function g etNewsByFi eld($sFiel d, $sVal)
    98   {
    99       global  $date_for mat;
    100       
    101       $sFiel d = proces s_db_input ($sField);
    102       $sVal    = proces s_db_input ($sVal);
    103       
    104       $sqlQu ery = "
    105       SELECT
    106           `H eader`,
    107           `S nippet`,
    108           `T ext`,
    109           DA TE_FORMAT( `Date`, '$ date_forma t' ) AS 'D ate'
    110       FROM ` News`
    111       WHERE  `$sField`= '$sVal'";
    112  
    113       return  db_arr( $ sqlQuery ) ;
    114   }
    115       
    116   function p rintNews($ news_arr)
    117   {
    118       if ($n ews_arr)
    119       {
    120           $s Code  = '< div class= "news_cont ">';
    121           $s Code .= '< div class= "news_head er">'.proc ess_line_o utput( $ne ws_arr['He ader'] ).' </div>';
    122           $s Code .= '< div class= "news_date ">'.$news_ arr['Date' ].'</div>' ;
    123           // $sCode .=  '<div clas s="news_sn ippet">'.p rocess_tex t_output(  $news_arr[ 'Snippet']  ).'</div> ';
    124           $s Code .= '< div class= "news_snip pet">'.pro cess_html_ output( $n ews_arr['S nippet'] ) .'</div>';
    125           // $sCode .=  '<div clas s="news_te xt">'.proc ess_text_w ithlinks_o utput( $ne ws_arr['Te xt'] ).'</ div></div> ';
    126           $s Code .= '< div class= "news_text ">'.proces s_html_out put( $news _arr['Text '] ).'</di v></div>';
    127       }
    128       else
    129       {
    130           $s Code = Msg Box( _t( ' _No news a vailable'  ) );
    131       }
    132  
    133       return  $sCode;
    134   }
    135  
    136   function g etNews()
    137   {
    138       if (is set($_GET[ 'newsUri'] ))
    139       {
    140           $s Code = pri ntNews(get NewsByFiel d('NewsUri ', $_GET[' newsUri']) );
    141       }
    142       elseif  (isset($_ GET['ID']) )
    143       {
    144           $s Code = pri ntNews(get NewsByFiel d('ID', $_ GET['ID']) );
    145       }
    146  
    147       return  $sCode;
    148   }
    149  
115   ?>   150   ?>