771. File Comparison Report

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

771.1 Files compared

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

771.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 7 282
Changed 4 16
Inserted 1 25
Removed 1 1

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

771.4 Active regular expressions

No regular expressions were active.

771.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 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 . 'l anguages.i nc.php' );   23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'l anguages.i nc.php' );
24     24  
25   $member['I D'] = (int )$_COOKIE[ 'memberID' ];   25   $member['I D'] = (int )$_COOKIE[ 'memberID' ];
26     26  
    27  
    28   if ( 'vote ' == $_GET ['action']  ) {
    29       if (   '' != $_GE T['ID'] )  {
    30           if  ( '' != $ _GET['para m'] ) {
    31                $query =  "SELECT p oll_result s FROM Pro filesPolls  WHERE id_ poll='" .  (int)$_GET ['ID'] . " '";
    32                $res_arr  = db_arr(  $query );
    33  
    34                $results  = explode ( ';', $re s_arr['pol l_results' ] );
    35                $results [$_GET['pa ram']]++;
    36                $poll_to tal_votes  = array_su m($results );
    37                $results  = implode (';', $res ults);
    38  
    39                $iPollID  = (int)$_ GET['ID'];
    40                if ( $_C OOKIE["pro file_polls _question_ {$iPollID} "] > 0 ) {
    41                    //pr int 'Dubli cate';
    42                } else {
    43                    $que ry = "UPDA TE Profile sPolls SET  poll_resu lts = '{$r esults}',  poll_total _votes = ' {$poll_tot al_votes}'  WHERE id_ poll='{$iP ollID}'";
    44                    $vPr ofPollRes  = db_res(  $query );
    45                    if (  $vProfPol lRes ) set cookie("pr ofile_poll s_question _{$iPollID }", 1 , ti me() + ( 1 0000 * 360 0 ), '/' ) ;
    46                }
    47           }
    48       }
    49   }
    50  
    51  
27   header('Co ntent-Type : applicat ion/xml');   52   header('Co ntent-Type : applicat ion/xml');
28   echo   " <?xml   version= ' 1.0 '   encoding= '$langH T MLCharset' ?> " ;   53   echo   ' <?xml   version= " 1.0 "   encoding= "U T F-8" ?> ' ;
29     54  
30   // ======= ========== ========== ========== ========== ========== ========== ==   55   // ======= ========== ========== ========== ========== ========== ========== ==
31   // TODO :  protect fr om malicio us calls ! !!!!!   56   // TODO :  protect fr om malicio us calls ! !!!!!
32   // ======= ========== ========== ========== ========== ========== ========== ==   57   // ======= ========== ========== ========== ========== ========== ========== ==
33   // DELETE  action --- ---------- ---------- ---------- ---------- ---------- --   58   // DELETE  action --- ---------- ---------- ---------- ---------- ---------- --
34       if ( ' delete' ==  $_GET['ac tion'] )   59       if ( ' delete' ==  $_GET['ac tion'] )
35       {   60       {
36           if  (  '' !=  $_GET['ID' ] )   61           if  (  '' !=  $_GET['ID' ] )
37           {   62           {
38                $query =  "DELETE F ROM Profil esPolls WH ERE id_pol l = '" . ( int)$_GET[ 'ID'] . "'  AND id_pr ofile = '{ $member['I D']}' LIMI T 1";   63                $query =  "DELETE F ROM Profil esPolls WH ERE id_pol l = '" . ( int)$_GET[ 'ID'] . "'  AND id_pr ofile = '{ $member['I D']}' LIMI T 1";
39                if ( db_ res( $quer y ) )   64                if ( db_ res( $quer y ) )
40                echo '<a nswer>no r esults</an swer>';   65                echo '<a nswer>no r esults</an swer>';
41           }   66           }
42       }   67       }
43   // CHANGE  STATUS act ion ------ ---------- ---------- ---------- ---------- --   68   // CHANGE  STATUS act ion ------ ---------- ---------- ---------- ---------- --
44       elseif  ( 'status ' == $_GET ['action']  )   69       elseif  ( 'status ' == $_GET ['action']  )
45       {   70       {
46           if  (  '' !=  $_GET['ID' ] && $_GET ['param']  )   71           if  (  '' !=  $_GET['ID' ] && $_GET ['param']  )
47           {   72           {
48                $query =  "UPDATE P rofilesPol ls SET `po ll_status`  = '{$_GET ['param']} ' WHERE id _poll = '"  . (int)$_ GET['ID']  . "' AND i d_profile  = '{$membe r['ID']}'  LIMIT 1";   73                $query =  "UPDATE P rofilesPol ls SET `po ll_status`  = '{$_GET ['param']} ' WHERE id _poll = '"  . (int)$_ GET['ID']  . "' AND i d_profile  = '{$membe r['ID']}'  LIMIT 1";
49                if ( db_ res( $quer y ) )   74                if ( db_ res( $quer y ) )
50                echo '<a nswer>no r esults</an swer>';   75                echo '<a nswer>no r esults</an swer>';
51           }   76           }
52       }   77       }
53   // VOTE ac tion ----- ---------- ---------- ---------- ---------- ---------- -   78   // VOTE ac tion ----- ---------- ---------- ---------- ---------- ---------- -
54       elseif  ( 'vote'  == $_GET[' action'] )   79       elseif  ( 'vote'  == $_GET[' action'] )
55       {   80       {
56     81  
57       if (   '' != $_GE T['ID'] )   82       if (   '' != $_GE T['ID'] )
58       {   83       {
59     84           /*   if   (   ''   !=   $_GET['par am']   )
60           
if   (   ''   !=   $_GET['par am']   )
   
61           {   85           {
62                $query =  "SELECT p oll_result s FROM Pro filesPolls  WHERE id_ poll='" .  (int)$_GET ['ID'] . " '";   86                $query =  "SELECT p oll_result s FROM Pro filesPolls  WHERE id_ poll='" .  (int)$_GET ['ID'] . " '";
63                $res_arr  = db_arr(  $query );   87                $res_arr  = db_arr(  $query );
64     88  
65                $results  = explode ( ';', $re s_arr['pol l_results' ] );   89                $results  = explode ( ';', $re s_arr['pol l_results' ] );
66                $results [$_GET['pa ram']]++;   90                $results [$_GET['pa ram']]++;
67                $poll_to tal_votes  = array_su m($results );   91                $poll_to tal_votes  = array_su m($results );
68                $results  = implode (';', $res ults);   92                $results  = implode (';', $res ults);
69     93  
70                 $query   =   "UPDATE   ProfilesPo lls   SET   poll_resul ts   =   '
$results
',   poll_total _votes   =   '
$poll_tota l_votes
'   WHERE   id_poll=' "   .   (int) $ _GET[' ID ']   .   " '";
  94                $iPollID  = (int)$_ GET['ID'];
71                
db_res(   $query   );
  95                if ( $_C OOKIE["pro file_polls _question_ {$iPollID} "] > 0 ) {
    96                    //pr int 'Dubli cate';
    97                } else {
    98                     $query   =   "UPDATE   ProfilesPo lls   SET   poll_resul ts   =   ' { $results } ',   poll_total _votes   =   ' { $poll_tota l_votes } '   WHERE   id_poll=' { $ iPoll ID } '";
    99                     $vProfPoll Res   =   db_res(   $query   );
    100                    if (  $vProfPol lRes ) set cookie("pr ofile_poll s_question _{$iPollID }", 1 , ti me() + ( 1 0000 * 360 0 ), '/' ) ;
72           }   101                }
73  
  102            }*/
74     103  
75           $q uery = "SE LECT * FRO M Profiles Polls WHER E id_poll= '" . (int) $_GET['ID' ] . "'";   104           $q uery = "SE LECT * FRO M Profiles Polls WHER E id_poll= '" . (int) $_GET['ID' ] . "'";
76           $r es_arr = d b_arr( $qu ery );   105           $r es_arr = d b_arr( $qu ery );
77     106  
78           $a nswers_poi nts = expl ode(';', $ res_arr['p oll_result s'] );   107           $a nswers_poi nts = expl ode(';', $ res_arr['p oll_result s'] );
79     108  
80           $a nswers_nam es = explo de('<delim >', $res_a rr['poll_a nswers'] ) ;   109           $a nswers_nam es = explo de('<delim >', $res_a rr['poll_a nswers'] ) ;
81     110  
82      
83           ec ho '<resul ts>';   111           ec ho '<resul ts>';
84     112  
85           $p oll_total_ votes = $r es_arr['po ll_total_v otes'];   113           $p oll_total_ votes = $r es_arr['po ll_total_v otes'];
86     114  
87           fo reach ($an swers_poin ts as $val ue)   115           fo reach ($an swers_poin ts as $val ue)
88           {   116           {
89                if  ( ''  != $value  )   117                if  ( ''  != $value  )
90                {   118                {
91                    echo  '<answer_ point>';   119                    echo  '<answer_ point>';
92                    echo  round( (0  != $poll_ total_vote s ? (( $va lue / $pol l_total_vo tes ) * 10 0) : 0), 1 );   120                    echo  round( (0  != $poll_ total_vote s ? (( $va lue / $pol l_total_vo tes ) * 10 0) : 0), 1 );
93                    echo  '</answer _point>';   121                    echo  '</answer _point>';
94     122  
95                    echo  '<answer_ num>';   123                    echo  '<answer_ num>';
96                    echo  htmlspeci alchars (  $value );   124                    echo  htmlspeci alchars (  $value );
97                    echo  '</answer _num>';   125                    echo  '</answer _num>';
98                }   126                }
99           }   127           }
100     128  
101     129  
102           fo reach ($an swers_name s as $valu e)   130           fo reach ($an swers_name s as $valu e)
103           {   131           {
104                if  ( ''  != $value  )   132                if  ( ''  != $value  )
105                {   133                {
106                    echo  '<answer_ name>';   134                    echo  '<answer_ name>';
107                    echo  htmlspeci alchars (  $value );   135                    echo  htmlspeci alchars (  $value );
108                    echo  '</answer _name>';   136                    echo  '</answer _name>';
109                }   137                }
110           }   138           }
111     139  
112           ec ho '</resu lts>';   140           ec ho '</resu lts>';
113     141  
114       }   142       }
115     143  
116       }   144       }
117       else i f ( 'quest ions' == $ _GET[actio n] && $_GE T[ID] )   145       else i f ( 'quest ions' == $ _GET[actio n] && $_GE T[ID] )
118       {   146       {
119           $q uery = "SE LECT * FRO M Profiles Polls WHER E id_poll  = '" . (in t)$_GET[ID ] . "'";   147           $q uery = "SE LECT * FRO M Profiles Polls WHER E id_poll  = '" . (in t)$_GET[ID ] . "'";
120     148  
121           $r es_arr = d b_arr( $qu ery );   149           $r es_arr = d b_arr( $qu ery );
122     150  
123           ec ho '<poll> ';   151           ec ho '<poll> ';
124     152  
125           ec ho '<quest ion>';   153           ec ho '<quest ion>';
126           ec ho htmlspe cialchars  ( $res_arr ['poll_que stion'] );   154           ec ho htmlspe cialchars  ( $res_arr ['poll_que stion'] );
127           ec ho '</ques tion>';   155           ec ho '</ques tion>';
128     156  
129           $q uestions =  explode(  '<delim>',  $res_arr[ 'poll_answ ers']);   157           $q uestions =  explode(  '<delim>',  $res_arr[ 'poll_answ ers']);
130     158  
131           fo reach ($qu estions as  $value)   159           fo reach ($qu estions as  $value)
132           {   160           {
133                if ( ''  != $value  )   161                if ( ''  != $value  )
134                {   162                {
135                    echo  '<answer> ';   163                    echo  '<answer> ';
136                    echo  htmlspeci alchars (  $value );   164                    echo  htmlspeci alchars (  $value );
137                    echo  '</answer >';   165                    echo  '</answer >';
138                }   166                }
139     167  
140           }   168           }
141     169  
142           ec ho '</poll >';   170           ec ho '</poll >';
143       }   171       }
144       else   172       else
145       {   173       {
146           ec ho '<answe r>no resul ts</answer >';   174           ec ho '<answe r>no resul ts</answer >';
147       }   175       }
148   ?>   176   ?>