22. File Comparison Report

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

22.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.1.2\inc\classes BxDolProfile.php Thu Mar 27 04:18:10 2008 UTC
2 Dolphin-v.6.1.3\inc\classes BxDolProfile.php Wed Jul 16 09:51:19 2008 UTC

22.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 4 360
Changed 3 6
Inserted 0 0
Removed 0 0

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

22.4 Active regular expressions

No regular expressions were active.

22.5 Comparison detail

1   <?   1   <?
2     2  
3   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolPr ofileQuery .php' );   3   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolPr ofileQuery .php' );
4   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolMi stake.php'  );   4   require_on ce( BX_DIR ECTORY_PAT H_CLASSES  . 'BxDolMi stake.php'  );
5     5  
6   class BxDo lProfile e xtends BxD olMistake   6   class BxDo lProfile e xtends BxD olMistake
7   {   7   {
8       var $_ iProfileID ;   8       var $_ iProfileID ;
9       var $_ aProfile;   9       var $_ aProfile;
10       var $b Couple;   10       var $b Couple;
11       var $_ iCoupleID;   11       var $_ iCoupleID;
12       var $_ aCouple;   12       var $_ aCouple;
13     13  
14       /**   14       /**
15        * Con structor   15        * Con structor
16        *   16        *
17        * @re turn User   17        * @re turn User
18        */   18        */
19       functi on BxDolPr ofile( $vP rofileID,  $bWithEmai l = 1 )   19       functi on BxDolPr ofile( $vP rofileID,  $bWithEmai l = 1 )
20       {   20       {
21           $t his -> _iP rofileID =  $this ->  getID( $vP rofileID,  $bWithEmai l );   21           $t his -> _iP rofileID =  $this ->  getID( $vP rofileID,  $bWithEmai l );
22       }   22       }
23     23  
24       /**   24       /**
25        * Ent er descrip tion here. ..   25        * Ent er descrip tion here. ..
26        *   26        *
27        * @pa ram unknow n_type $ID   27        * @pa ram unknow n_type $ID
28        * @pa ram unknow n_type $fl oat   28        * @pa ram unknow n_type $fl oat
29        */   29        */
30       functi on getProf ileThumbna il( $float  )   30       functi on getProf ileThumbna il( $float  )
31       {   31       {
32           $r et = $this  -> getPro fileImageU rl( $iProf ileID, 0);   32           $r et = $this  -> getPro fileImageU rl( $iProf ileID, 0);
33       }   33       }
34     34  
35       /**   35       /**
36        * ret urn link t o profile  image only .   36        * ret urn link t o profile  image only .
37        *   37        *
38        * @pa ram unknow n_type $ID   38        * @pa ram unknow n_type $ID
39        * @pa ram unknow n_type $im ageNum   39        * @pa ram unknow n_type $im ageNum
40        */   40        */
41       functi on getProf ileImageUr l( $imageN um )   41       functi on getProf ileImageUr l( $imageN um )
42       {   42       {
43     43  
44       }   44       }
45     45  
46       /**   46       /**
47        *  re turn assoc  array of  all frofil e fields   47        *  re turn assoc  array of  all frofil e fields
48        */   48        */
49       functi on getProf ileData()   49       functi on getProf ileData()
50       {   50       {
51           gl obal $aUse r;   51           gl obal $aUse r;
52           gl obal $dir;   52           
53           $o PDb = new  BxDolProfi leQuery();   53           $o PDb = new  BxDolProfi leQuery();
54            $sProfileC ache   =   $dir['cach e']   .   'user'   .   $this   ->   _iProfileI D   .   '.php';   54            $sProfileC ache   =   BX_DIRECTO RY_PATH_CA CHE   .   'user'   .   $this   ->   _iProfileI D   .   '.php';
55           if ( file_exi sts( $sPro fileCache  ) && is_fi le( $sProf ileCache )  ) {   55           if ( file_exi sts( $sPro fileCache  ) && is_fi le( $sProf ileCache )  ) {
56                require_ once($sPro fileCache) ;   56                require_ once($sPro fileCache) ;
57                $this ->  _aProfile  = $aUser[ $this -> _ iProfileID ];   57                $this ->  _aProfile  = $aUser[ $this -> _ iProfileID ];
58           }  else   58           }  else
59                $this ->  _aProfile  = $oPDb - > getProfi leDataById ( $this ->  _iProfile ID );   59                $this ->  _aProfile  = $oPDb - > getProfi leDataById ( $this ->  _iProfile ID );
60              60           
61              61           
62           // get couple  data   62           // get couple  data
63           if ( $this ->  _aProfile ['Couple']  ) {   63           if ( $this ->  _aProfile ['Couple']  ) {
64                $this ->  bCouple =  true;   64                $this ->  bCouple =  true;
65                $this ->  _iCoupleI D = $this  -> _aProfi le['Couple '];   65                $this ->  _iCoupleI D = $this  -> _aProfi le['Couple '];
66                   66                
67                 $sProfileC ache   =   $dir['cach e']   .   'user'   .   $this   ->   _iCoupleID   .   '.php';   67                 $sProfileC ache   =   BX_DIRECTO RY_PATH_CA CHE   .   'user'   .   $this   ->   _iCoupleID   .   '.php';
68                if( file _exists( $ sProfileCa che ) && i s_file( $s ProfileCac he ) ) {   68                if( file _exists( $ sProfileCa che ) && i s_file( $s ProfileCac he ) ) {
69                    requ ire_once($ sProfileCa che);   69                    requ ire_once($ sProfileCa che);
70                    $thi s -> _aCou ple = $aUs er[$this - > _iCouple ID];   70                    $thi s -> _aCou ple = $aUs er[$this - > _iCouple ID];
71                } else   71                } else
72                    $thi s -> _aCou ple = $oPD b -> getPr ofileDataB yId( $this  -> _iCoup leID );   72                    $thi s -> _aCou ple = $oPD b -> getPr ofileDataB yId( $this  -> _iCoup leID );
73           }   73           }
74     74  
75           re turn $this  -> _aProf ile;   75           re turn $this  -> _aProf ile;
76       }   76       }
77     77  
78       /**   78       /**
79        * Upd ate profil e info to  database   79        * Upd ate profil e info to  database
80        *   80        *
81        *   81        *
82        * @pa ram int $i UserID   82        * @pa ram int $i UserID
83        * @pa ram array  $aData   83        * @pa ram array  $aData
84        * whe re the key  of the ar ray is nam e of datab ase table  field   84        * whe re the key  of the ar ray is nam e of datab ase table  field
85        *   85        *
86        * exa mple:   86        * exa mple:
87        * $aD ata['Sex']  = 'male';   87        * $aD ata['Sex']  = 'male';
88        *   88        *
89        */   89        */
90       functi on updateP rofileData ( $aData )   90       functi on updateP rofileData ( $aData )
91       {   91       {
92           if ( is_array ( $aData )  )   92           if ( is_array ( $aData )  )
93           {   93           {
94                $sQueryA dd = '';   94                $sQueryA dd = '';
95                foreach( $aData as  $key => $v alue )   95                foreach( $aData as  $key => $v alue )
96                {   96                {
97                    $sQu eryAdd .=  " `$key` =  '$value',  ";   97                    $sQu eryAdd .=  " `$key` =  '$value',  ";
98                }   98                }
99           }   99           }
100     100  
101           $t his -> upd ateProfile DataFile(  $iProfileI D );   101           $t his -> upd ateProfile DataFile(  $iProfileI D );
102       }   102       }
103     103  
104       /**   104       /**
105        * fun ction crea te cache d ata file   105        * fun ction crea te cache d ata file
106        *   106        *
107        * @pa ram int $i ProfileID   107        * @pa ram int $i ProfileID
108        */   108        */
109       functi on updateP rofileData File( $iPr ofileID )   109       functi on updateP rofileData File( $iPr ofileID )
110       {   110       {
111     111  
112       }   112       }
113     113  
114       /**   114       /**
115        * Pri nt code fo r membersh ip status   115        * Pri nt code fo r membersh ip status
116        * $me mberID - m ember ID   116        * $me mberID - m ember ID
117        * $of fer_upgrad e - will t his code b e printed  at [c]ontr ol [p]anel   117        * $of fer_upgrad e - will t his code b e printed  at [c]ontr ol [p]anel
118        * $cr edits - wi ll print c redits sta tus if $cr edits == 1   118        * $cr edits - wi ll print c redits sta tus if $cr edits == 1
119        */   119        */
120       functi on getMemb ershipStat us( $iPrif ileID, $of fer_upgrad e = true,  $credits =  0 )   120       functi on getMemb ershipStat us( $iPrif ileID, $of fer_upgrad e = true,  $credits =  0 )
121       {   121       {
122     122  
123       }   123       }
124     124  
125       /**   125       /**
126        * Sho ws how man y days, ho urs, minut es member  was onine  last time   126        * Sho ws how man y days, ho urs, minut es member  was onine  last time
127        *   127        *
128        * @pa ram  $last NavTime   128        * @pa ram  $last NavTime
129        *   129        *
130        * @re turn int   130        * @re turn int
131        */   131        */
132       functi on  getPro fileLastOn linePeriod ( $lastNav Time )   132       functi on  getPro fileLastOn linePeriod ( $lastNav Time )
133       {   133       {
134     134  
135       }   135       }
136     136  
137     137  
138       functi on getNick Name()   138       functi on getNick Name()
139       {   139       {
140           $o ProfileQue ry = new B xDolProfil eQuery();   140           $o ProfileQue ry = new B xDolProfil eQuery();
141           re turn proce ss_line_ou tput( $oPr ofileQuery  -> getNic kName( $th is -> _iPr ofileID )  );   141           re turn proce ss_line_ou tput( $oPr ofileQuery  -> getNic kName( $th is -> _iPr ofileID )  );
142       }   142       }
143     143  
144       functi on getPass word()   144       functi on getPass word()
145       {   145       {
146     146  
147       }   147       }
148     148  
149       functi on getID(  $vID, $bWi thEmail =  1 )   149       functi on getID(  $vID, $bWi thEmail =  1 )
150       {   150       {
151           $o PDb = new  BxDolProfi leQuery();   151           $o PDb = new  BxDolProfi leQuery();
152     152  
153           if  ( $bWithE mail )   153           if  ( $bWithE mail )
154           {   154           {
155                if ( ere gi("^[_.0- 9a-z-]+@([ 0-9a-z][0- 9a-z-]+.)+ [a-z]{2,4} $", $vID)  )   155                if ( ere gi("^[_.0- 9a-z-]+@([ 0-9a-z][0- 9a-z-]+.)+ [a-z]{2,4} $", $vID)  )
156                {   156                {
157                    $aMa il = $oPDb  -> getIdB yEmail( $v ID );   157                    $aMa il = $oPDb  -> getIdB yEmail( $v ID );
158                    if (  (int)$aMa il['ID'] )   158                    if (  (int)$aMa il['ID'] )
159                    {   159                    {
160                         return (in t)$aMail[' ID'];   160                         return (in t)$aMail[' ID'];
161                    }   161                    }
162                }   162                }
163           }   163           }
164              164           
165           $i ID = (int) $vID;   165           $i ID = (int) $vID;
166           if  ( strcmp( "$vID", "$ iID") == 0  )   166           if  ( strcmp( "$vID", "$ iID") == 0  )
167           {   167           {
168                return $ iID;   168                return $ iID;
169           }   169           }
170           el se   170           el se
171           {   171           {
172                $aNick =  $oPDb ->  getIdByNic kname( $vI D );   172                $aNick =  $oPDb ->  getIdByNic kname( $vI D );
173                if ( (in t)$aNick[' ID'] )   173                if ( (in t)$aNick[' ID'] )
174                {   174                {
175                    retu rn (int)$a Nick['ID'] ;   175                    retu rn (int)$a Nick['ID'] ;
176                }   176                }
177           }   177           }
178     178  
179           re turn false ;   179           re turn false ;
180       }   180       }
181     181  
182   }   182   }
183   ?>   183   ?>