179. File Comparison Report

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

179.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\groups\orca\xml orca.php Mon Jan 28 09:41:42 2008 UTC
2 Dolphin-v.6.1.0\groups\orca\xml orca.php Mon Apr 14 11:47:22 2008 UTC

179.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 30 318
Changed 23 131
Inserted 4 6
Removed 2 21

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

179.4 Active regular expressions

No regular expressions were active.

179.5 Comparison detail

1   <?   1   <?
2   /**   2   /**
3   *                              O rca Intera ctive Foru m Script   3   *                              O rca Intera ctive Foru m Script
4   *                                 --------- ------   4   *                                 --------- ------
5   *     Star ted              : Mo n Mar 23 2 006   5   *     Star ted              : Mo n Mar 23 2 006
6   *     Copy right            : (C ) 2007 Boo nEx Group   6   *     Copy right            : (C ) 2007 Boo nEx Group
7   *     Webs ite              : ht tp://www.b oonex.com   7   *     Webs ite              : ht tp://www.b oonex.com
8   * This fil e is part  of Orca -  Interactiv e Forum Sc ript   8   * This fil e is part  of Orca -  Interactiv e Forum Sc ript
9   * GPL   9   * Creative  Commons A ttribution  3.0 Licen se
10   **/   10   **/
11          11  
12     12  
13   /**   13   /**
14    * Main in tegration  file   14    * Main in tegration  file
15    */    15    */ 
16     16  
17           er ror_report ing(E_ALL  & ~E_NOTIC E);   17           /* *
    18            *  determine  special u ser permis sions
    19            *  @param $u ser userna me to chec k
    20            *  @param re turn true  if user ha s special  permission s in the f orum 
    21            *
    22           if  (!functio n_exists(' isSpecialO rcaUser'))
    23           {
    24                function  isSpecial OrcaUser ( $user)
    25                {
    26                    retu rn 0;
    27                }       
    28           }
    29  
    30           /* *
    31            *  determine  admin use
    32            *  @param $u ser userna me to chec k
    33            *  @param re turn true  if user ha s special  permission s in the f orum 
    34            * /         
    35           if  (!functio n_exists(' isOrcaAdmi n'))
    36           {
    37                function  isOrcaAdm in ($user)
    38                {
    39                    glob al $logged ;
    40                    retu rn $logged ['admin']  ? true : f alse;
    41                }
    42           }         
    43  
    44           //  --------- ---------- ---------- ---------- --
18     45  
    46           if  ('url' ==  $gConf['i ntegration '] || !iss et($gConf) )
    47           {                          
19           ch dir ('..') ;           48                chdir (' ..');             
20              49  
21           $_ COOKIE['me mberID'] =  $_GET['me mberID'];   50                header ( "content-t ype: text/ xml");
22           $_ COOKIE['me mberPasswo rd'] = $_G ET['member Password'] ;    
23     51  
24           $_ COOKIE['ad minID'] =  $_GET['adm inID'];   52                $orca_in tegration_ xml = '<?x ml version ="1.0" enc oding="utf -8"?>';
25           $_ COOKIE['ad minPasswor d'] = $_GE T['adminPa ssword'];   53  
    54                $orca_in tegration_ vars = &$_ GET;
26     55  
27           re quire_once ( './inc/h eader.inc. php'); //  orca confi g file   56                require_ once( './i nc/header. inc.php');  // orca c onfig file
28           re quire_once ( './../.. /inc/heade r.inc.php' ); // dolp hin config  file   57                require_ once( './. ./../inc/h eader.inc. php'); //  dolphin co nfig file              
29     58  
30           re quire_once ( BX_DIREC TORY_PATH_ INC . 'uti ls.inc.php ' );   59                require_ once( BX_D IRECTORY_P ATH_INC .  'utils.inc .php' );
31           re quire_once ( BX_DIREC TORY_PATH_ INC . 'db. inc.php' ) ;   60                require_ once( BX_D IRECTORY_P ATH_INC .  'db.inc.ph p' );
32           re quire_once ( BX_DIREC TORY_PATH_ INC . 'adm in.inc.php ' );   61                require_ once( BX_D IRECTORY_P ATH_INC .  'admin.inc .php' );             
33           re quire_once ( BX_DIREC TORY_PATH_ INC . 'gro ups.inc.ph p' );   62           }
    63           el se
    64           {
    65                global $ MySQL;
    66                global $ dir;
    67                $orca_in tegration_ xml = '';
    68           }
    69  
    70           $_ COOKIE['me mberID'] =  $orca_int egration_v ars['membe rID'];
    71           $_ COOKIE['me mberPasswo rd'] = $or ca_integra tion_vars[ 'memberPas sword'];
    72  
    73           $_ COOKIE['ad minID'] =  $orca_inte gration_va rs['adminI D'];
    74           $_ COOKIE['ad minPasswor d'] = $orc a_integrat ion_vars[' adminPassw ord'];
34     75  
35           if  ( !( $log ged['admin '] = membe r_auth( 1,  false ) )  )   76           if  ( !( $log ged['admin '] = membe r_auth( 1,  false ) )  )
36                 if   (   !(   $logged['m ember']   =   member_aut h(   0,   false   )   )   )   77                
$logged['m ember']   =   member_aut h(   0,   false   ) ;
37                    if (  !( $logge d['aff'] =  member_au th( 2, fal se )) )   78  
38                         $logged['m oderator']  = member_ auth( 3, f alse );    
39     79  
40          if(  $logged[' admin'] )   80          if(  $logged[' admin'] )
41                $who = ' admin';   81                $who = ' admin';
42           el seif( $log ged['membe r'] )   82           el seif( $log ged['membe r'] )
43                $who = ' member';   83                $who = ' member';
44           el se   84           el se
45                $who = ' ';   85                $who = ' ';
46     86  
47           he ader ("con tent-type:  text/xml" );    
48     87  
49           ec ho '<?xml  version="1 .0" encodi ng="utf-8" ?>';   88           $o rca_integr ation_xml  .= '<bxfor um>';
    89           $o rca_integr ation_xml  .= '<time> ' . time ( ) . '</tim e>';
50     90  
51           ec ho '<bxfor um>';   91           $a ction = $o rca_integr ation_vars ['action'] ;
52           ec ho '<time> ' . time ( ) . '</tim e>';   92           $u ser = $orc a_integrat ion_vars[' user'];
53              93  
54           $a ction   =  $_GET['act ion'];   94           if  (empty($u ser) && $_ COOKIE['me mberID'] & & $logged[ 'member'])
55            $user       =   $_ G E T [' user '];   95           {
    96                $user =  getNickNam e(getID((i nt)$_COOKI E['memberI D']));
    97           }
    98  
    99           if  (empty($u ser) && $_ COOKIE['ad minID'] &&  $logged[' admin'])
    100           {
    101                 $user   =   $_ COOKI E
[' adminID '];
    102           }
56                                103  
57           sw itch ($act ion)   104           sw itch ($act ion)
58           {   105           {
59                /**   106                /**
60                 * get l ogged in u ser (initi al informa tion about  logged in  user must  be provid ed in url)   107                 * get l ogged in u ser (initi al informa tion about  logged in  user must  be provid ed in url)
61                 */    108                 */ 
62                case 'lo gin_user':   109                case 'lo gin_user':
63     110  
64                    //   check logi n and pass word   111                    //   check logi n and pass word                 
65     112  
66                    $use r = '';   113                    $use r = '';
67     114                    
68                    if ( $logged['m ember'])   115                    if ( $logged['m ember'])
69                         $user = ge tNickName( getID((int )$_COOKIE[ 'memberID' ]));   116                         $user = ge tNickName( getID((int )$_COOKIE[ 'memberID' ]));
70                    else if ($logge d['admin'] )   117                    else if ($logge d['admin'] )
71                         $user   =  
'admin
'
;
  118                         $user   =   $_COOKIE[ 'admin ID ' ] ;
72     119  
73     120                    $orc a_integrat ion_xml .=  <<<EOF
74                    echo  <<<EOF    
75                <login_u ser>$user< /login_use r>   121                <login_u ser>$user< /login_use r>
76   EOF;   122   EOF;
77                    brea k;   123                    brea k;
78     124  
79                   125                
80                /**   126                /**
81                 * get u ser info   127                 * get u ser info
82                 */   128                 */
83                case 'us er_info':   129                case 'us er_info':
84     130  
85                     if   (!$user)   echo   '<false   />'   ;   131                     if   (!$user)  
86  
  132                    {
    133                         $orca_inte gration_xm l .= '<fal se />' ;
    134                    }
    135                    else
    136                     {
87                    $spe cial_user  = isSpecia lOrcaUser  ($user);   137                         $special_u ser = isSp ecialOrcaU ser ($user );
88                         $orca_admi n   =   (   $who   ==   ' a
dmin '   )   ?   1   :   0 ;
  138                         $orca_admi n   =   isOrc a A dmin   ($user )
;
89     139  
90                         require_on ce( BX_DIR ECTORY_PAT H_ROOT . ' inc/utils. inc.php' ) ;   140                         require_on ce( BX_DIR ECTORY_PAT H_ROOT . ' inc/utils. inc.php' ) ;
91                         require_on ce( BX_DIR ECTORY_PAT H_ROOT . ' profilePho tos.php' ) ;                         141                         require_on ce( BX_DIR ECTORY_PAT H_ROOT . ' profilePho tos.php' ) ;                      
92                           142  
93                         $oProfile  = new BxDo lProfile ( $user);   143                         $oProfile  = new BxDo lProfile ( $user);
94                         $userID =  $oProfile- >_iProfile ID;   144                         $userID =  $oProfile- >_iProfile ID;
95                       145  
96                          $av = $gC onf['url'] ['icon'] . 'basic.gif ';   146                         $av = $gCo nf['url'][ 'icon'] .' basic.gif' ;
97                          $profile_ url = $gCo nf['url'][ 'base'] .  "?action=g oto&amp;am p;user=$us er";   147                         $profile_u rl = $gCon f['url'][' base'] . " ?action=go to&amp;amp ;user=$use r";
98          148  
99                     if   ( $orca_ admin
)
  149                         if   ( ' admin '   ==   $user )
100                    {   150                         {
101                         $av = $gCo nf['url'][ 'icon'] .  'admin.gif ';   151                             $av =  $gConf['ur l']['icon' ] . 'admin .gif';
102                    }   152                         }
103                    else if ($userI D)   153                         elseif ($u serID)
104                    {                        154                         {                    
105                         $oPhoto =  new Profil ePhotos( $ userID );   155                             $oPhot o = new Pr ofilePhoto s ($userID );
106                         $oPhoto ->  getMediaA rray();   156                             $oPhot o->getMedi aArray();
107                         $aFile = $ oPhoto ->  getPrimary PhotoArray ();   157                             $aFile  = $oPhoto ->getPrima ryPhotoArr ay();
108                           158  
109                         if( extFil eExists( $ oPhoto ->  sMediaDir  . 'icon_'  . $aFile[' med_file']  ) )   159                             if (ex tFileExist s ($oPhoto ->sMediaDi r . 'icon_ ' . $aFile ['med_file ']))
110                             $av =  $oPhoto ->  sMediaUrl  . 'icon_'  . $aFile[ 'med_file' ];   160                                 $a v = $oPhot o->sMediaU rl . 'icon _' . $aFil e['med_fil e'];
111                         elseif($sp ecial_user  )   161                             elseif  ($special _user)
112                             $av =  $gConf['ur l']['icon' ] .'specia l.gif';                         162                                 $a v = $gConf ['url']['i con'] .'sp ecial.gif' ;
113                           163                             
114                         $profile_u rl = $site ['url'] .  'profile.p hp?ID=' .  $userID;   164                             $profi le_url = $ site['url' ] . 'profi le.php?ID= ' . $userI D;
115                    }   165                         }
116                           166  
117                    // R ay integra tion [begi n]   167                         // Ray int egration [ begin]
118     168  
119                    $iId  = $userID ;   169                         $iId = $us erID;
120                    $sPa ssword = m d5(getPass word($iId) );   170                         $sPassword  = md5(get Password($ iId));
121                    $bEn ableRay =  (getParam(  'enable_r ay' ) == ' on');   171                         $bEnableRa y = (getPa ram( 'enab le_ray' )  == 'on');
122                    $che ck_res = c heckAction  ($iId, AC TION_ID_US E_RAY_IM);   172                         $check_res  = checkAc tion ($iId , ACTION_I D_USE_RAY_ IM);
123     173  
124                    $aRa y = '<ray_ on>0</ray_ on>';   174                         $aRay = '< ray_on>0</ ray_on>';
125                    if ( $bEnableRa y && $chec k_res[CHEC K_ACTION_R ESULT] ==  CHECK_ACTI ON_RESULT_ ALLOWED)                         175                         if ($bEnab leRay && $ check_res[ CHECK_ACTI ON_RESULT]  == CHECK_ ACTION_RES ULT_ALLOWE D)                      
126                         $aRay = '< ray_on>1</ ray_on><ra y_id>' . $ iId . '</r ay_id><ray _pwd>' . $ sPassword  . '</ray_p wd>';   176                             $aRay  = '<ray_on >1</ray_on ><ray_id>'  . $iId .  '</ray_id> <ray_pwd>'  . $sPassw ord . '</r ay_pwd>';
127                       177                        
128                    // R ay integra tion [ end  ]   178                         // Ray int egration [  end ]
129                       179                        
130                     echo  <<<EOF   180                         $orca_inte gration_xm l .=  <<<EOF
131                <user_in fo name="$ user">                     181                             <user_ info name= "$user">
132                    <ava tar>$av</a vatar>   182                                 <a vatar>$av< /avatar>
133                    <spe cial>$spec ial_user</ special>   183                                 <s pecial>$sp ecial_user </special>
134                    <adm in>$orca_a dmin</admi n>   184                                 <a dmin>$orca _admin</ad min>
135                    <pro file_url>$ profile_ur l</profile _url>   185                                 <p rofile_url >$profile_ url</profi le_url>
136                    <pro file_oncli ck />   186                                 <p rofile_onc lick />
137                    <joi n_date>$jo in_date</j oin_date>   187                                 <j oin_date>$ join_date< /join_date >
138                    $aRa y   188                                 $a Ray
139                </user_i nfo>   189                             </user _info>
140   EOF;   190   EOF;
    191                    }
141                    brea k;   192                    brea k;
142     193  
143                /**   194                /**
144                 * get u ser permis sions   195                 * get u ser permis sions
145                 */    196                 */ 
146                case 'us er_perm':                    197                case 'us er_perm':                 
147     198  
148            $forum_id   =   (int)$
_ GET ['forum_id '];
  199                     $forum_id   =   (int)$ orca _ integratio n_vars ['forum_id '];
149           $u ser_id  =  getID( $us er );   200                    $use r_id  = ge tID( $user  );
150              201  
151            $arrGroup         =  
getGroupIn fo(   $forum_id   );
  202                    requ ire_once(  BX_DIRECTO RY_PATH_CL ASSES . 'B xDolGroups .php' );
152            $isGroupMe mber    =   (   isGroupMem ber(   $user_id,   $forum_id   )   )   ?   1   :   0;   203                    $oGr oups = new  BxDolGrou ps(false);
153            $isGroupCr eator   =   (   $arrGroup[ 'creatorID ']   ==   $user_id   )   ?   1   :   0;   204                     $arrGroup         =   $oGroups-> getGroupIn fo   ($forum_id );
154            $isAdmin          =   (   $who   ==   ' a
dmin '   )   ?   1   :   0;
  205                     $isGroupMe mber    =   $oGroups-> isGroupMem ber   ($user_id,   $forum_id)  
?   1   :   0;
    206                     $isGroupCr eator   =  
$arrGroup[ 'creatorID ']   ==   $user_id  
?   1   :   0;
    207                     $isAdmin          =   isOrc a A dmin   ($user )   ?   1   :   0;
155     208  
156                    $rea d_public   = 1;   209                    $rea d_public   = 1;
157                     $post_publ ic    =   (   $isGroupMe mber    or   $isAdmin   )   ?   1   :   0;   210                     $post_publ ic    =  
$isGroupMe mber    ||   $isAdmin  
?   1   :   0;
158                     $edit_publ ic    =   (   $isGroupCr eator   or   $isAdmin   )   ?   1   :   0;   211                     $edit_publ ic    =  
$isGroupCr eator   ||   $isAdmin  
?   1   :   0;
159                     $del_publi c     =   (   $isGroupCr eator   or   $isAdmin   )   ?   1   :   0;   212                     $del_publi c     =  
$isGroupCr eator   ||   $isAdmin  
?   1   :   0;
160                       213  
161                     $read_priv ate   =   (   $isGroupMe mber    or   $isAdmin   )   ?   1   :   0;   214                     $read_priv ate   =  
$isGroupMe mber    ||   $isAdmin  
?   1   :   0;
162                     $post_priv ate   =   (   $isGroupMe mber    or   $isAdmin   )   ?   1   :   0;   215                     $post_priv ate   =  
$isGroupMe mber    ||   $isAdmin  
?   1   :   0;
163                     $edit_priv ate   =   (   $isGroupCr eator   or   $isAdmin   )   ?   1   :   0;   216                     $edit_priv ate   =  
$isGroupCr eator   ||   $isAdmin  
?   1   :   0;
164                     $del_priva te    =   (   $isGroupCr eator   or   $isAdmin   )   ?   1   :   0;   217                     $del_priva te    =  
$isGroupCr eator   ||   $isAdmin  
?   1   :   0;
165                       218  
166                     $edit_own       =   (   $isGroupMe mber    or   $isAdmin   )   ?   1   :   0;   219                     $edit_own       =  
$isGroupMe mber    ||   $isAdmin  
?   1   :   0;
167                     $del_own        =   (   $isGroupMe mber    or   $isAdmin   )   ?   1   :   0;   220                     $del_own        =  
$isGroupMe mber    ||   $isAdmin  
?   1   :   0;
168                       221  
169                    $sea rch = 0;   222                    $sea rch = 0;
170                     $sticky   =   (   $isGroupMe mber    or   $isAdmin   )   ?   1   :   0;   223                     $sticky   =  
$isGroupMe mber   ||   $isAdmin  
?   1   :   0;
171     224  
172                    echo  <<<EOF   225                    $orc a_integrat ion_xml .=  <<<EOF
173                <user_pe rm name="$ user">   226                <user_pe rm name="$ user">
174                       227                    
175                    <rea d_public>$ read_publi c</read_pu blic>   228                    <rea d_public>$ read_publi c</read_pu blic>
176                    <pos t_public>$ post_publi c</post_pu blic>   229                    <pos t_public>$ post_publi c</post_pu blic>
177                    <edi t_public>$ edit_publi c</edit_pu blic>   230                    <edi t_public>$ edit_publi c</edit_pu blic>
178                    <del _public>$d el_public< /del_publi c>   231                    <del _public>$d el_public< /del_publi c>
179                       232                    
180                    <rea d_private> $read_priv ate</read_ private>   233                    <rea d_private> $read_priv ate</read_ private>
181                    <pos t_private> $post_priv ate</post_ private>   234                    <pos t_private> $post_priv ate</post_ private>
182                    <edi t_private> $edit_priv ate</edit_ private>   235                    <edi t_private> $edit_priv ate</edit_ private>
183                    <del _private>$ del_privat e</del_pri vate>   236                    <del _private>$ del_privat e</del_pri vate>
184                       237                    
185                    <edi t_own>$edi t_own</edi t_own>   238                    <edi t_own>$edi t_own</edi t_own>
186                    <del _own>$del_ own</del_o wn>   239                    <del _own>$del_ own</del_o wn>
187                       240                    
188                    <sea rch_>$sear ch</search _>   241                    <sea rch_>$sear ch</search _>
189                    <sti cky_>$stic ky</sticky _>   242                    <sti cky_>$stic ky</sticky _>
190                       243                    
191                </user_p erm>   244                </user_p erm>
192   EOF;   245   EOF;
    246  
193                    brea k;   247                    brea k;
194                default:   248                default:
195           }   249           }
196     250  
197            e c h o  
'</bxforum >';
  251            $or c a_integrat i o n_xml   .=   '</bxforum >';
198     252  
    253           if  ('url' ==  $gConf['i ntegration '])
    254                echo $or ca_integra tion_xml;
199     255  
200           /* *    
201            *  determine  special u ser permis sions    
202            *  @param $u ser userna me to chec k    
203            *  @param re turn true  if user ha s special  permission s in the f orum     
204            *    
205           fu nction isS pecialOrca User ($use r)    
206           {    
207                return 0 ;    
208           }            
209      
210           /* *    
211            *  determine  admin use    
212            *  @param $u ser userna me to chec k    
213            *  @param re turn true  if user ha s special  permission s in the f orum     
214            * /             
215           fu nction isO rcaAdmin ( $user)    
216           {    
217                global $ logged;    
218                return $ logged['ad min'];    
219           }                     
220   ?>   256   ?>