58. File Comparison Report

Produced on Thu Jul 17 07:17:33 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.

58.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.1.2 profile_poll.php Mon Jun 16 05:18:34 2008 UTC
2 Dolphin-v.6.1.3 profile_poll.php Wed Jul 16 09:51:23 2008 UTC

58.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 23 384
Changed 11 37
Inserted 0 0
Removed 11 14

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

58.4 Active regular expressions

No regular expressions were active.

58.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      
53       $membe r['ID'] =  (int)$_COO KIE['membe rID'];   52       $membe r['ID'] =  (int)$_COO KIE['membe rID'];
54     53  
55        if   (   $_POST['qu estion']   )
  54        if   (   $_POST['qu estion']   )   {
56       {    
57      
58       $poll_ answers =  '';   55           $p oll_answer s = '';
59        for   (   $i   =   0;   $i   <   $_POST['ne xt_val'];   $i++   )
  56            for   (   $i   =   0;   $i   <   $_POST['ne xt_val'];   $i++   )   {
60       {   57                 if   (   $_POST[   'v'   .   $i   ]   )   {
61            if   (   $_POST[   'v'   .   $i   ]   )
  58                     $poll_answ ers   .=   process_db _input($_P OST[   'v'   .   $i   ] ,   1 )   .   '<delim>';
62           {    
63            $poll_answ ers   .=   process_db _input($_P OST[   'v'   .   $i   ]
)   .   '<delim>';
   
64           $p oll_result s .= '0;';   59                    $pol l_results  .= '0;';
65           }   60                }
66       }   61           }
67     62  
68        if   (   $poll_answ ers   )
  63            if   (   $poll_answ ers   )   {
69       {    
70      
71           $q uery = "SE LECT COUNT (*) FROM P rofilesPol ls WHERE i d_profile  = '" . $me mber['ID']  . "'";   64                $query =  "SELECT C OUNT(*) FR OM Profile sPolls WHE RE id_prof ile = '" .  $member[' ID'] . "'" ;
72           $p olls_num =  db_arr( $ query );   65                $polls_n um = db_ar r( $query  );
73     66  
74           $p rofile_pol l_num = ge tParam("pr ofile_poll _num");   67                $profile _poll_num  = getParam ("profile_ poll_num") ;
75            if   (   $profile_p oll_num   &&   $polls_num [0]   <   $profile_p oll_num   )  
//   limit   number   of   polls
  68                 if   (   $profile_p oll_num   &&   $polls_num [0]   <   $profile_p oll_num   )   {   //   limit   number   of   polls
76           {    
77                $iAct =  getParam(" profile_po ll_act") = = 'on' ? 1  : 0;   69                    $iAc t = getPar am("profil e_poll_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 )   70                    $que ry = "INSE RT INTO Pr ofilesPoll s ( id_pro file, poll _question,  poll_answ ers, poll_ results, p oll_status , poll_app roval )
79                 VALUES   (   '{$member[ 'ID']}',   '"   .   process_db _input($_P OST['quest ion']
)   .   "',   '
$poll_answ ers
',   '
$poll_resu lts
',   'active',   '
$iAct
')";
  71                     VALUES   (   '{$member[ 'ID']}',   '"   .   process_db _input($_P OST['quest ion'] ,   1 )   .   "',   ' { $poll_answ ers } ',   ' { $poll_resu lts } ',   'active',   ' { $iAct } ')";
80                db_res(  $query );   72                    db_r es( $query  );
81      
82           $m essage = _ t("_poll c reated");   73                    $mes sage = _t( "_poll cre ated");
83      
84           }   74                }
85       }   75           }
86       }   76       }
87     77  
88      
89      
90      
91   // ------- -------- p age compon ents   78   // ------- -------- p age compon ents
92     79  
93   $_ni = $_p age['name_ index'];   80   $_ni = $_p age['name_ index'];
94   $_page_con t[$_ni]['p age_main_c ode'] = Th isPageMain Code();   81   $_page_con t[$_ni]['p age_main_c ode'] = Th isPageMain Code();
95     82  
96   // ------- -------- [ END] page  components   83   // ------- -------- [ END] page  components
97     84  
98     85  
99   PageCode() ;   86   PageCode() ;
100     87  
101     88  
102   // ------- -------- p age compon ents funct ions   89   // ------- -------- p age compon ents funct ions
103     90  
104   /**   91   /**
105    * page co de functio n   92    * page co de functio n
106    */   93    */
107   function   ThisPageMa inCode()
  94   function   ThisPageMa inCode()   {
108   {    
109       global  $logged;   95       global  $logged;
110       global  $member;   96       global  $member;
111     97  
112      
113   // create  poll secti on ------- ---------- ---------- ---------- ---------- ---------- ----------   98       // cre ate poll s ection --- ---------- ---------- ---------- ---------- ---------- ---------- ----
114       $ret . = '<div cl ass="creat ePollSecti on">';   99       $ret . = '<div cl ass="creat ePollSecti on">';
115     100  
116        $query   =   "SELECT   COUNT(
id_poll
)   FROM  
ProfilesPo lls  
WHERE  
id_profile  
=   '{$member[ 'ID']}'";
  101        $query   =   "SELECT   COUNT( ` id_poll ` )   FROM   ` ProfilesPo lls `   WHERE   ` id_profile `   =   '{$member[ 'ID']}'";
117       $ras_a rr = db_ar r( $query  );   102       $ras_a rr = db_ar r( $query  );
118     103  
119       $polls _num = db_ arr( $quer y );   104       $polls _num = db_ arr( $quer y );
120       $profi le_poll_nu m = getPar am("profil e_poll_num ");   105       $profi le_poll_nu m = getPar am("profil e_poll_num ");
121     106  
122       if ( $ profile_po ll_num &&  $polls_num [0] < $pro file_poll_ num ) // l imit numbe r of polls   107       if ( $ profile_po ll_num &&  $polls_num [0] < $pro file_poll_ num ) // l imit numbe r of polls
123           $r et .= Show PollCreati onForm();   108           $r et .= Show PollCreati onForm();
124       else   109       else
125           $r et .= _t(' _max_poll_ reached');   110           $r et .= _t(' _max_poll_ reached');
126     111  
127       $ret . = '</div>' ;   112       $ret . = '</div>' ;
128     113  
129      
130   // show po lls sectio n -------- ---------- ---------- ---------- ---------- ---------- ----------   114       // sho w polls se ction ---- ---------- ---------- ---------- ---------- ---------- ---------- ----
131      
132       $ret . = '<div cl ass="pollC ontainer"  id="pol_co ntainer">' ;   115       $ret . = '<div cl ass="pollC ontainer"  id="pol_co ntainer">' ;
133       $ret . = '<div cl ass="clear _both"></d iv>';   116       $ret . = '<div cl ass="clear _both"></d iv>';
134        $query   =   "SELECT  
id_poll
,  
poll_statu s  
FROM  
ProfilesPo lls  
WHERE  
id_profile  
=   '{$member[ 'ID']}'";
  117        $query   =   "SELECT   ` id_poll ` ,   ` poll_statu s `   FROM   ` ProfilesPo lls `   WHERE   ` id_profile `   =   '{$member[ 'ID']}'";
135       $polls _num = db_ res( $quer y );   118       $polls _num = db_ res( $quer y );
136     119  
137        while(   $poll_arr   =   mysql_fetc h_array   (   $polls_num   )   )
  120        while(   $poll_arr   =   mysql_fetc h_array   (   $polls_num   )   )   {
138       {    
139      
140           $u ID = $poll _arr['id_p oll'];   121           $u ID = $poll _arr['id_p oll'];
141     122  
142           $r et .= '<di v id="pol_ container_ pol_' . $u ID . '" cl ass="contr olsDiv">';   123           $r et .= '<di v id="pol_ container_ pol_' . $u ID . '" cl ass="contr olsDiv">';
143           $r et .= Show Poll( $uID  );   124           $r et .= Show Poll( $uID  );
144     125  
145           $r et .= '<di v class="i nnerContro lBlock">';   126           $r et .= '<di v class="i nnerContro lBlock">';
146     127  
147           // $ret .= '< div class= "controlsH eader">' .  _t('_cont rols') . ' :</div>';   128           // $ret .= '< div class= "controlsH eader">' .  _t('_cont rols') . ' :</div>';
148     129  
149           $s CurStatus  = '';   130           $s CurStatus  = '';
150           $s CTStatus =  '';   131           $s CTStatus =  '';
151           $s tatus_chan ge_to = '' ;   132           $s tatus_chan ge_to = '' ;
152           if  ( 'active ' == $poll _arr['poll _status']  ) {   133           if  ( 'active ' == $poll _arr['poll _status']  ) {
153                $sCurSta tus = _t(' _Active');   134                $sCurSta tus = _t(' _Active');
154                $sCTStat us = _t('_ Disabled') ;   135                $sCTStat us = _t('_ Disabled') ;
155                $status_ change_to  = 'disable d';   136                $status_ change_to  = 'disable d';
156           }  else {   137           }  else {
157                $sCurSta tus = _t(' _Disabled' );   138                $sCurSta tus = _t(' _Disabled' );
158                $sCTStat us = _t('_ Active');   139                $sCTStat us = _t('_ Active');
159                $status_ change_to  = 'active' ;   140                $status_ change_to  = 'active' ;
160           }   141           }
161     142  
162            $ret   .=   "<span   id=\"poll_ status_
$uID
\"   style=\"pa dding:   0px   2px;\"></s pan>";
  143            $ret   .=   "<span   id=\"poll_ status_ { $uID } \"   style=\"pa dding:   0px   2px;\"></s pan>";
163     144  
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>';   145           $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>';
165              146           
166           $r et .= '<sc ript langu age="javas cript">   147           $r et .= '<sc ript langu age="javas cript">
167                poll_sta tus_show(  \'' . $uID  . '\', \' poll_statu s_' . $uID  . '\', \' ' . $poll_ arr['poll_ status'] .  '\', \''  . $status_ change_to  . '\', \''  . $sCurSt atus . '\' , \'' . $s CTStatus .  '\' );   148                poll_sta tus_show(  \'' . $uID  . '\', \' poll_statu s_' . $uID  . '\', \' ' . $poll_ arr['poll_ status'] .  '\', \''  . $status_ change_to  . '\', \''  . $sCurSt atus . '\' , \'' . $s CTStatus .  '\' );
168                    </sc ript>';   149                    </sc ript>';
169     150  
170      
171           $r et .= '</d iv>';   151           $r et .= '</d iv>';
172     152  
173      
174           $r et .= '</d iv>';   153           $r et .= '</d iv>';
175      
176       }   154       }
177     155  
178   // if no p olls   156       // if  no polls
179       if ( ! $uID )   157       if ( ! $uID )
180           $r et .= _t_e rr('_no po ll');   158           $r et .= _t_e rr('_no po ll');
181       $ret . = '<div cl ass="clear _both"></d iv>';   159       $ret . = '<div cl ass="clear _both"></d iv>';
182       $ret . = '</div>' ;   160       $ret . = '</div>' ;
183     161  
184       return  $ret;   162       return  $ret;
185      
186      
187   }   163   }
188     164  
189   function   ShowPollCr eationForm ()
  165   function   ShowPollCr eationForm ()   {
190   {    
191       ob_sta rt();   166       ob_sta rt();
192       ?>   167       ?>
193       <form  id="poll"  method="po st" action ="<?= $_SE RVER['PHP_ SELF'] ?>" >   168       <form  id="poll"  method="po st" action ="<?= $_SE RVER['PHP_ SELF'] ?>" >
194           <i nput id="n ext_val" n ame="next_ val" type= "hidden" v alue="1" / >   169           <i nput id="n ext_val" n ame="next_ val" type= "hidden" v alue="1" / >
195           <t able id="q uestions">   170           <t able id="q uestions">
196                <tr>   171                <tr>
197                    <th  colspan="2 "><?= _t(' _create po ll') ?></t h>   172                    <th  colspan="2 "><?= _t(' _create po ll') ?></t h>
198                </tr>   173                </tr>
199                <tr>   174                <tr>
200                    <td  class="for m_label">< ?= _t('_qu estion') ? >:</td>   175                    <td  class="for m_label">< ?= _t('_qu estion') ? >:</td>
201                    <td  class="for m_value">   176                    <td  class="for m_value">
202                         <input id= "question"  name="que stion">   177                         <input id= "question"  name="que stion">
203                    </td >   178                    </td >
204                </tr>   179                </tr>
205                <tr>   180                <tr>
206                    <td  class="for m_label">< ?= _t('_an swer varia nts') ?>:< /td>   181                    <td  class="for m_label">< ?= _t('_an swer varia nts') ?>:< /td>
207                    <td  class="for m_value">   182                    <td  class="for m_value">
208                         <div id="q uestions_b ar_cont">< /div>   183                         <div id="q uestions_b ar_cont">< /div>
209                    </td >   184                    </td >
210                </tr>   185                </tr>
211                <tr>   186                <tr>
212                    <td  colspan="2 " class="f orm_colspa n">   187                    <td  colspan="2 " class="f orm_colspa n">
213                    <a h ref="javas cript:void (0);"   188                    <a h ref="javas cript:void (0);"
214                      on click="add _question_ bar( 'ques tions_bar_ cont', 'ne xt_val', t rue ); ret urn false; "><?= _t(' _add answe r') ?></a>   189                      on click="add _question_ bar( 'ques tions_bar_ cont', 'ne xt_val', t rue ); ret urn false; "><?= _t(' _add answe r') ?></a>
215                    |   190                    |
216                    <a h ref="javas cript:void (0);" oncl ick="docum ent.getEle mentById(' poll').sub mit(); ret urn false; "><?= _t(' _generate  poll') ?>< /a>   191                    <a h ref="javas cript:void (0);" oncl ick="docum ent.getEle mentById(' poll').sub mit(); ret urn false; "><?= _t(' _generate  poll') ?>< /a>
217                    </td >   192                    </td >
218                </tr>   193                </tr>
219           </ table>   194           </ table>
220       </form >   195       </form >
221       <scrip t type="te xt/javascr ipt">   196       <scrip t type="te xt/javascr ipt">
222           ad d_question _bar( 'que stions_bar _cont', 'n ext_val',  false );   197           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 );   198           ad d_question _bar( 'que stions_bar _cont', 'n ext_val',  false );
224       </scri pt>   199       </scri pt>
225       <?   200       <?
226          201       
227       return  ob_get_cl ean();   202       return  ob_get_cl ean();
228   }   203   }
229     204  
230   ?>   205   ?>