82. File Comparison Report

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

82.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.1.1 profile_poll.php Sat Apr 26 08:19:18 2008 UTC
2 Dolphin-v.6.1.2 profile_poll.php Mon Jun 16 05:18:35 2008 UTC

82.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 434
Changed 2 18
Inserted 0 0
Removed 0 0

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

82.4 Active regular expressions

No regular expressions were active.

82.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 . '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   $ADMIN = m ember_auth ( 1, false  );   26   $ADMIN = m ember_auth ( 1, false  );
27   $logged['a dmin'] = $ ADMIN;   27   $logged['a dmin'] = $ ADMIN;
28     28  
29   // Check i f moderato r logged i n.   29   // Check i f moderato r logged i n.
30   $moderator  = member_ auth(3, fa lse);   30   $moderator  = member_ auth(3, fa lse);
31   $logged['m oderator']  = $modera tor;   31   $logged['m oderator']  = $modera tor;
32   // Give mo derator al l admin ri ghts for t his page.   32   // Give mo derator al l admin ri ghts for t his page.
33   $ADMIN = $ ADMIN || $ moderator;   33   $ADMIN = $ ADMIN || $ moderator;
34     34  
35   if ( !$ADM IN )   35   if ( !$ADM IN )
36   $logged['m ember'] =  member_aut h( 0 );   36   $logged['m ember'] =  member_aut h( 0 );
37     37  
38   // ------- -------- p age variab les and lo gin   38   // ------- -------- p age variab les and lo gin
39     39  
40   $_page['na me_index']     = 72;   40   $_page['na me_index']     = 72;
41   $_page['cs s_name']   = 'profile _poll.css' ;   41   $_page['cs s_name']   = 'profile _poll.css' ;
42   $_page['js _name']    = 'profile _poll.js';   42   $_page['js _name']    = 'profile _poll.js';
43     43  
44     44  
45   $_page['he ader'] = _ t("_Polls" );   45   $_page['he ader'] = _ t("_Polls" );
46   $_page['he ader_text' ] = _t("_P olls");   46   $_page['he ader_text' ] = _t("_P olls");
47     47  
48     48  
49     49  
50   // ------- -------- h andle post  values   50   // ------- -------- h andle post  values
51     51  
52     52  
53       $membe r['ID'] =  (int)$_COO KIE['membe rID'];   53       $membe r['ID'] =  (int)$_COO KIE['membe rID'];
54     54  
55       if ( $ _POST['que stion'] )   55       if ( $ _POST['que stion'] )
56       {   56       {
57     57  
58       $poll_ answers =  '';   58       $poll_ answers =  '';
59       for (  $i = 0; $i  < $_POST[ 'next_val' ]; $i++ )   59       for (  $i = 0; $i  < $_POST[ 'next_val' ]; $i++ )
60       {   60       {
61           if  ( $_POST[  'v' . $i  ] )   61           if  ( $_POST[  'v' . $i  ] )
62           {   62           {
63           $p oll_answer s .= proce ss_db_inpu t($_POST[  'v' . $i ] ) . '<deli m>';   63           $p oll_answer s .= proce ss_db_inpu t($_POST[  'v' . $i ] ) . '<deli m>';
64           $p oll_result s .= '0;';   64           $p oll_result s .= '0;';
65           }   65           }
66       }   66       }
67     67  
68       if ( $ poll_answe rs )   68       if ( $ poll_answe rs )
69       {   69       {
70     70  
71           $q uery = "SE LECT COUNT (*) FROM P rofilesPol ls WHERE i d_profile  = '" . $me mber['ID']  . "'";   71           $q uery = "SE LECT COUNT (*) FROM P rofilesPol ls WHERE i d_profile  = '" . $me mber['ID']  . "'";
72           $p olls_num =  db_arr( $ query );   72           $p olls_num =  db_arr( $ query );
73     73  
74           $p rofile_pol l_num = ge tParam("pr ofile_poll _num");   74           $p rofile_pol l_num = ge tParam("pr ofile_poll _num");
75           if  ( $profil e_poll_num  && $polls _num[0] <  $profile_p oll_num )  // limit n umber of p olls   75           if  ( $profil e_poll_num  && $polls _num[0] <  $profile_p oll_num )  // limit n umber of p olls
76           {   76           {
77                $iAct =  getParam(" profile_po ll_act") = = 'on' ? 1  : 0;   77                $iAct =  getParam(" profile_po ll_act") = = 'on' ? 1  : 0;
78                $query =  "INSERT I NTO Profil esPolls (  id_profile , poll_que stion, pol l_answers,  poll_resu lts, poll_ status, po ll_approva l )   78                $query =  "INSERT I NTO Profil esPolls (  id_profile , poll_que stion, pol l_answers,  poll_resu lts, poll_ status, po ll_approva l )
79                VALUES (  '{$member ['ID']}',  '" . proce ss_db_inpu t($_POST[' question'] ) . "', '$ poll_answe rs', '$pol l_results' , 'active' , '$iAct') ";   79                VALUES (  '{$member ['ID']}',  '" . proce ss_db_inpu t($_POST[' question'] ) . "', '$ poll_answe rs', '$pol l_results' , 'active' , '$iAct') ";
80                db_res(  $query );   80                db_res(  $query );
81     81  
82           $m essage = _ t("_poll c reated");   82           $m essage = _ t("_poll c reated");
83     83  
84           }   84           }
85       }   85       }
86       }   86       }
87     87  
88     88  
89     89  
90     90  
91   // ------- -------- p age compon ents   91   // ------- -------- p age compon ents
92     92  
93   $_ni = $_p age['name_ index'];   93   $_ni = $_p age['name_ index'];
94   $_page_con t[$_ni]['p age_main_c ode'] = Th isPageMain Code();   94   $_page_con t[$_ni]['p age_main_c ode'] = Th isPageMain Code();
95     95  
96   // ------- -------- [ END] page  components   96   // ------- -------- [ END] page  components
97     97  
98     98  
99   PageCode() ;   99   PageCode() ;
100     100  
101     101  
102   // ------- -------- p age compon ents funct ions   102   // ------- -------- p age compon ents funct ions
103     103  
104   /**   104   /**
105    * page co de functio n   105    * page co de functio n
106    */   106    */
107   function T hisPageMai nCode()   107   function T hisPageMai nCode()
108   {   108   {
109       global  $logged;   109       global  $logged;
110       global  $member;   110       global  $member;
111     111  
112     112  
113   // create  poll secti on ------- ---------- ---------- ---------- ---------- ---------- ----------   113   // create  poll secti on ------- ---------- ---------- ---------- ---------- ---------- ----------
114       $ret . = '<div cl ass="creat ePollSecti on">';   114       $ret . = '<div cl ass="creat ePollSecti on">';
115     115  
116       $query  = "SELECT  COUNT(id_ poll) FROM  ProfilesP olls WHERE  id_profil e = '{$mem ber['ID']} '";   116       $query  = "SELECT  COUNT(id_ poll) FROM  ProfilesP olls WHERE  id_profil e = '{$mem ber['ID']} '";
117       $ras_a rr = db_ar r( $query  );   117       $ras_a rr = db_ar r( $query  );
118     118  
119       $polls _num = db_ arr( $quer y );   119       $polls _num = db_ arr( $quer y );
120       $profi le_poll_nu m = getPar am("profil e_poll_num ");   120       $profi le_poll_nu m = getPar am("profil e_poll_num ");
121     121  
122       if ( $ profile_po ll_num &&  $polls_num [0] < $pro file_poll_ num ) // l imit numbe r of polls   122       if ( $ profile_po ll_num &&  $polls_num [0] < $pro file_poll_ num ) // l imit numbe r of polls
123           $r et .= Show PollCreati onForm();   123           $r et .= Show PollCreati onForm();
124       else   124       else
125           $r et .= _t(' _max_poll_ reached');   125           $r et .= _t(' _max_poll_ reached');
126     126  
127       $ret . = '</div>' ;   127       $ret . = '</div>' ;
128     128  
129     129  
130   // show po lls sectio n -------- ---------- ---------- ---------- ---------- ---------- ----------   130   // show po lls sectio n -------- ---------- ---------- ---------- ---------- ---------- ----------
131     131  
132       $ret . = '<div cl ass="pollC ontainer"  id="pol_co ntainer">' ;   132       $ret . = '<div cl ass="pollC ontainer"  id="pol_co ntainer">' ;
133       $ret . = '<div cl ass="clear _both"></d iv>';   133       $ret . = '<div cl ass="clear _both"></d iv>';
134       $query  = "SELECT  id_poll,  poll_statu s FROM Pro filesPolls  WHERE id_ profile =  '{$member[ 'ID']}'";   134       $query  = "SELECT  id_poll,  poll_statu s FROM Pro filesPolls  WHERE id_ profile =  '{$member[ 'ID']}'";
135       $polls _num = db_ res( $quer y );   135       $polls _num = db_ res( $quer y );
136     136  
137       while(  $poll_arr  = mysql_f etch_array  ( $polls_ num ) )   137       while(  $poll_arr  = mysql_f etch_array  ( $polls_ num ) )
138       {   138       {
139     139  
140           $u ID = $poll _arr['id_p oll'];   140           $u ID = $poll _arr['id_p oll'];
141     141  
142           $r et .= '<di v id="pol_ container_ pol_' . $u ID . '" cl ass="contr olsDiv">';   142           $r et .= '<di v id="pol_ container_ pol_' . $u ID . '" cl ass="contr olsDiv">';
143           $r et .= Show Poll( $uID  );   143           $r et .= Show Poll( $uID  );
144     144  
145           $r et .= '<di v class="i nnerContro lBlock">';   145           $r et .= '<di v class="i nnerContro lBlock">';
146     146  
147           // $ret .= '< div class= "controlsH eader">' .  _t('_cont rols') . ' :</div>';   147           // $ret .= '< div class= "controlsH eader">' .  _t('_cont rols') . ' :</div>';
148     148  
149            if   (   'active'   ==   $poll_arr[ 'poll_stat us']   )
  149           $s CurStatus  = '';
150                 $s
tatus _change _t o   =   "d isabled " ;
  150           $s CTStatus =  '';
151           
else
  151           $s tatus_chan ge_to = '' ;
152                 $s
tatus _change _t o   =   "a ctive " ;
  152            if   (   'active'   ==   $poll_arr[ 'poll_stat us']   )   {
    153                $sCurSta tus = _t(' _Active');
    154                 $s CTS tatus   =   _t ('_D isabled ') ;
    155                $status_ change_to  = 'disable d';
    156            }   else   {
    157                $sCurSta tus = _t(' _Disabled' );
    158                 $s CTS tatus   =   _t ('_A ctive ') ;
    159                $status_ change_to  = 'active' ;
    160           }
153     161  
154           $r et .= "<sp an id=\"po ll_status_ $uID\" sty le=\"paddi ng: 0px 2p x;\"></spa n>";   162           $r et .= "<sp an id=\"po ll_status_ $uID\" sty le=\"paddi ng: 0px 2p x;\"></spa n>";
155     163  
156           $r et .= '<sp an class=" deleteDiv" ><a href=" #" onclick =" if ( wi ndow.confi rm(\'' . _ t('_are yo u sure?')  . '\') ) {  send_data ( \'\', \' delete\',  \'\', \''  . $uID . ' \' ); del_ question_b ar( docume nt.getElem entById(\' pol_contai ner\'), do cument.get ElementByI d(\'pol_co ntainer_po l_' . $uID  . '\') );  } return  false;">'.  _t('_dele te') .'</a ></span>';   164           $r et .= '<sp an class=" deleteDiv" ><a href=" #" onclick =" if ( wi ndow.confi rm(\'' . _ t('_are yo u sure?')  . '\') ) {  send_data ( \'\', \' delete\',  \'\', \''  . $uID . ' \' ); del_ question_b ar( docume nt.getElem entById(\' pol_contai ner\'), do cument.get ElementByI d(\'pol_co ntainer_po l_' . $uID  . '\') );  } return  false;">'.  _t('_dele te') .'</a ></span>';
157              165           
158           $r et .= '<sc ript langu age="javas cript">   166           $r et .= '<sc ript langu age="javas cript">
159                 poll_statu s_show(   \''   .   $uID   .   '\',   \'poll_sta tus_'   .   $uID   .   '\',   \''   .   $poll_arr[ 'poll_stat us']   .   '\',   \''   .   $status_ch ange_to   .   '\'  
);
  167                 poll_statu s_show(   \''   .   $uID   .   '\',   \'poll_sta tus_'   .   $uID   .   '\',   \''   .   $poll_arr[ 'poll_stat us']   .   '\',   \''   .   $status_ch ange_to   .   '\' ,   \''   .   $sCurStatu s   .   '\',   \''   .   $sCTStatus   .   '\'   );
160                    </sc ript>';   168                    </sc ript>';
161     169  
162     170  
163           $r et .= '</d iv>';   171           $r et .= '</d iv>';
164     172  
165     173  
166           $r et .= '</d iv>';   174           $r et .= '</d iv>';
167     175  
168       }   176       }
169     177  
170   // if no p olls   178   // if no p olls
171       if ( ! $uID )   179       if ( ! $uID )
172           $r et .= _t_e rr('_no po ll');   180           $r et .= _t_e rr('_no po ll');
173       $ret . = '<div cl ass="clear _both"></d iv>';   181       $ret . = '<div cl ass="clear _both"></d iv>';
174       $ret . = '</div>' ;   182       $ret . = '</div>' ;
175     183  
176       return  $ret;   184       return  $ret;
177     185  
178     186  
179   }   187   }
180     188  
181   function S howPollCre ationForm( )   189   function S howPollCre ationForm( )
182   {   190   {
183       ob_sta rt();   191       ob_sta rt();
184       ?>   192       ?>
185       <form  id="poll"  method="po st" action ="<?= $_SE RVER['PHP_ SELF'] ?>" >   193       <form  id="poll"  method="po st" action ="<?= $_SE RVER['PHP_ SELF'] ?>" >
186           <i nput id="n ext_val" n ame="next_ val" type= "hidden" v alue="1" / >   194           <i nput id="n ext_val" n ame="next_ val" type= "hidden" v alue="1" / >
187           <t able id="q uestions">   195           <t able id="q uestions">
188                <tr>   196                <tr>
189                    <th  colspan="2 "><?= _t(' _create po ll') ?></t h>   197                    <th  colspan="2 "><?= _t(' _create po ll') ?></t h>
190                </tr>   198                </tr>
191                <tr>   199                <tr>
192                    <td  class="for m_label">< ?= _t('_qu estion') ? >:</td>   200                    <td  class="for m_label">< ?= _t('_qu estion') ? >:</td>
193                    <td  class="for m_value">   201                    <td  class="for m_value">
194                         <input id= "question"  name="que stion">   202                         <input id= "question"  name="que stion">
195                    </td >   203                    </td >
196                </tr>   204                </tr>
197                <tr>   205                <tr>
198                    <td  class="for m_label">< ?= _t('_an swer varia nts') ?>:< /td>   206                    <td  class="for m_label">< ?= _t('_an swer varia nts') ?>:< /td>
199                    <td  class="for m_value">   207                    <td  class="for m_value">
200                         <div id="q uestions_b ar_cont">< /div>   208                         <div id="q uestions_b ar_cont">< /div>
201                    </td >   209                    </td >
202                </tr>   210                </tr>
203                <tr>   211                <tr>
204                    <td  colspan="2 " class="f orm_colspa n">   212                    <td  colspan="2 " class="f orm_colspa n">
205                    <a h ref="javas cript:void (0);"   213                    <a h ref="javas cript:void (0);"
206                      on click="add _question_ bar( 'ques tions_bar_ cont', 'ne xt_val', t rue ); ret urn false; "><?= _t(' _add answe r') ?></a>   214                      on click="add _question_ bar( 'ques tions_bar_ cont', 'ne xt_val', t rue ); ret urn false; "><?= _t(' _add answe r') ?></a>
207                    |   215                    |
208                    <a h ref="javas cript:void (0);" oncl ick="docum ent.getEle mentById(' poll').sub mit(); ret urn false; "><?= _t(' _generate  poll') ?>< /a>   216                    <a h ref="javas cript:void (0);" oncl ick="docum ent.getEle mentById(' poll').sub mit(); ret urn false; "><?= _t(' _generate  poll') ?>< /a>
209                    </td >   217                    </td >
210                </tr>   218                </tr>
211           </ table>   219           </ table>
212       </form >   220       </form >
213       <scrip t type="te xt/javascr ipt">   221       <scrip t type="te xt/javascr ipt">
214           ad d_question _bar( 'que stions_bar _cont', 'n ext_val',  false );   222           ad d_question _bar( 'que stions_bar _cont', 'n ext_val',  false );
215           ad d_question _bar( 'que stions_bar _cont', 'n ext_val',  false );   223           ad d_question _bar( 'que stions_bar _cont', 'n ext_val',  false );
216       </scri pt>   224       </scri pt>
217       <?   225       <?
218          226       
219       return  ob_get_cl ean();   227       return  ob_get_cl ean();
220   }   228   }
221     229  
222   ?>   230   ?>