38. Araxis Merge File Comparison Report

Produced by Araxis Merge on Mon May 18 06:28:42 2009 UTC. See www.araxis.com for information about Merge. 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.

38.1 Files compared

# Location File Last Modified
1 D:\Dolphin-v.6.1.5 guestbook.php Thu Apr 23 05:18:05 2009 UTC
2 D:\Dolphin-v.6.1.6 guestbook.php Thu May 7 04:43:56 2009 UTC

38.2 Comparison summary

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

38.3 Comparison options

Whitespace All differences in whitespace within lines are ignored
Character case Differences in character case are ignored
Line endings Differences in line endings (CR and LF characters) are significant
CR/LF characters Not shown in the comparison detail

38.4 Active regular expressions

No regular expressions were active.

38.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   // Authent ification  no require d here. Ju st check i f somebody  logged in .   26   // Authent ification  no require d here. Ju st check i f somebody  logged in .
27     27  
28   if ( !( $l ogged['adm in'] = mem ber_auth(  1, false )  ) )   28   if ( !( $l ogged['adm in'] = mem ber_auth(  1, false )  ) )
29           if  ( !( $log ged['membe r'] = memb er_auth( 0 , false )  ) )   29           if  ( !( $log ged['membe r'] = memb er_auth( 0 , false )  ) )
30                    if (  !( $logge d['aff'] =  member_au th( 2, fal se )) )   30                    if (  !( $logge d['aff'] =  member_au th( 2, fal se )) )
31                             $logge d['moderat or'] = mem ber_auth(  3, false ) ;   31                             $logge d['moderat or'] = mem ber_auth(  3, false ) ;
32     32  
33     33  
34   // ------- -------- p age variab les and lo gin   34   // ------- -------- p age variab les and lo gin
35     35  
36   $_page['na me_index']     = 47;   36   $_page['na me_index']     = 47;
37   $_page['cs s_name']                = 'guest book.css';   37   $_page['cs s_name']                = 'guest book.css';
38   $_page['ex tra_js'] =  $oTemplCo nfig -> sT inyMceEdit orJS;   38   $_page['ex tra_js'] =  $oTemplCo nfig -> sT inyMceEdit orJS;
39     39  
40     40  
41   $period =  1; // time  period be fore user  can add an other reco rd (in min utes)   41   $period =  1; // time  period be fore user  can add an other reco rd (in min utes)
42   $records_o n_page = 1 6; // numb er of reco rds at the  page   42   $records_o n_page = 1 6; // numb er of reco rds at the  page
43   $record_ma xlength =  1600; // m ax length  of record   43   $record_ma xlength =  1600; // m ax length  of record
44   $record_li mit = 100;  // maximu m number o f records  in the gue st book   44   $record_li mit = 100;  // maximu m number o f records  in the gue st book
45     45  
46     46  
47   $_page['he ader'] = _ t("_guestb ook");   47   $_page['he ader'] = _ t("_guestb ook");
48   /* $_page[ 'header_te xt'] = ('g 4' != $tmp l) ? _t("_ guestbook" ) : "<img  src=\"{$si te['images ']}guestbo ok.gif\">" ; */   48   /* $_page[ 'header_te xt'] = ('g 4' != $tmp l) ? _t("_ guestbook" ) : "<img  src=\"{$si te['images ']}guestbo ok.gif\">" ; */
49   $_page['he ader_text' ] =_t("_gu estbook");   49   $_page['he ader_text' ] =_t("_gu estbook");
50   // ------- -------- p age compon ents   50   // ------- -------- p age compon ents
51     51  
52   //$w_ex =  20;   52   //$w_ex =  20;
53     53  
54   $_ni = $_p age['name_ index'];   54   $_ni = $_p age['name_ index'];
55     55  
56   $_page_con t[$_ni]['p age_main_c ode'] = Th isPageMain Code();   56   $_page_con t[$_ni]['p age_main_c ode'] = Th isPageMain Code();
57     57  
58   // ------- -------- [ END] page  components   58   // ------- -------- [ END] page  components
59     59  
60   PageCode() ;   60   PageCode() ;
61     61  
62   // ------- -------- p age compon ents funct ions   62   // ------- -------- p age compon ents funct ions
63     63  
64   /**   64   /**
65    * page co de functio n   65    * page co de functio n
66    */   66    */
67   function T hisPageMai nCode()   67   function T hisPageMai nCode()
68   {   68   {
69           gl obal $logg ed;   69           gl obal $logg ed;
70     70  
71           $r et = "";   71           $r et = "";
72     72  
73           $m ember['ID' ] = (int)$ _COOKIE['m emberID'];   73           $m ember['ID' ] = (int)$ _COOKIE['m emberID'];
74           $o wner = $_R EQUEST['ow ner'] ? (i nt)$_REQUE ST['owner' ] : (int)$ _COOKIE['m emberID'];   74           $o wner = $_R EQUEST['ow ner'] ? (i nt)$_REQUE ST['owner' ] : (int)$ _COOKIE['m emberID'];
75     75  
76           //  Check if  membership  allows th is action   76           //  Check if  membership  allows th is action
77           $c heck_res =  checkActi on( $membe r['ID'], A CTION_ID_V IEW_GUESTB OOK );   77           $c heck_res =  checkActi on( $membe r['ID'], A CTION_ID_V IEW_GUESTB OOK );
78           if  ( $check_ res[CHECK_ ACTION_RES ULT] != CH ECK_ACTION _RESULT_AL LOWED && ! $logged['a dmin'] &&  $member['I D'] != $ow ner )   78           if  ( $check_ res[CHECK_ ACTION_RES ULT] != CH ECK_ACTION _RESULT_AL LOWED && ! $logged['a dmin'] &&  $member['I D'] != $ow ner )
79           {   79           {
80                    $ret  .= "<br / >   80                    $ret  .= "<br / >
81                             <table  width=\"1 00%\" cell padding=1  cellspacin g=1 border =0>   81                             <table  width=\"1 00%\" cell padding=1  cellspacin g=1 border =0>
82                                      <tr>   82                                      <tr>
83                                               <td class= text align =center>   83                                               <td class= text align =center>
84                                                       <b r />". $ch eck_res[CH ECK_ACTION _MESSAGE]  ."<br />   84                                                       <b r />". $ch eck_res[CH ECK_ACTION _MESSAGE]  ."<br />
85                                               </td>   85                                               </td>
86                                      </tr>   86                                      </tr>
87                             </tabl e>\n";   87                             </tabl e>\n";
88                    retu rn $ret;   88                    retu rn $ret;
89           }   89           }
90              90           
91           $c heck_res =  checkActi on( $owner , ACTION_I D_USE_GUES TBOOK );   91           $c heck_res =  checkActi on( $owner , ACTION_I D_USE_GUES TBOOK );
92           if ( $check_r es[CHECK_A CTION_RESU LT] != CHE CK_ACTION_ RESULT_ALL OWED && !$ logged['ad min'] )   92           if ( $check_r es[CHECK_A CTION_RESU LT] != CHE CK_ACTION_ RESULT_ALL OWED && !$ logged['ad min'] )
93           {   93           {
94                    $ret  .= $membe r['ID'] ==  $owner ?  $check_res [CHECK_ACT ION_MESSAG E] : _t_er r("_This g uestbook d isabled by  it's owne r");   94                    $ret  .= $membe r['ID'] ==  $owner ?  $check_res [CHECK_ACT ION_MESSAG E] : _t_er r("_This g uestbook d isabled by  it's owne r");
95                    retu rn $ret;   95                    retu rn $ret;
96           }   96           }
97              97           
98           if ( $_GET['a ction'] ==  'show_add ' && $_GET ['owner']  )   98           if ( $_GET['a ction'] ==  'show_add ' && $_GET ['owner']  )
99           {   99           {
100                    $ret  .= ShowAd dRecord();   100                    $ret  .= ShowAd dRecord();
101                    retu rn $ret;   101                    retu rn $ret;
102           }   102           }
103              103           
104           if ( $_POST[' action'] = = 'new' &&  $_POST['o wner'] &&  strlen($_P OST['newre cord']) )   104           if ( $_POST[' action'] = = 'new' &&  $_POST['o wner'] &&  strlen($_P OST['newre cord']) )
105                    $ret  .= AddRec ord();   105                    $ret  .= AddRec ord();
106     106  
107           if ( $_GET['a ction'] ==  'delete'  && $_GET[' owner'] &&  (int)$_GE T['delete_ id'] != 0  )   107           if ( $_GET['a ction'] ==  'delete'  && $_GET[' owner'] &&  (int)$_GE T['delete_ id'] != 0  )
108                    $ret  .= Delete Record();   108                    $ret  .= Delete Record();
109     109  
110           $r et .= Prin tGuestbook ();   110           $r et .= Prin tGuestbook ();
111     111  
112           re turn $ret;   112           re turn $ret;
113   }   113   }
114     114  
115   function P rintGuestb ook()   115   function P rintGuestb ook()
116   {   116   {
117           gl obal $logg ed;   117           gl obal $logg ed;
118           gl obal $site ;   118           gl obal $site ;
119           gl obal $reco rds_on_pag e;   119           gl obal $reco rds_on_pag e;
120           gl obal $date _format;   120           gl obal $date _format;
121           gl obal $oTem plConfig;   121           gl obal $oTem plConfig;
122     122  
123           $r et = "";   123           $r et = "";
124           $o wner = $_R EQUEST['ow ner'] ? (i nt)$_REQUE ST['owner' ] : (int)$ _COOKIE['m emberID'];   124           $o wner = $_R EQUEST['ow ner'] ? (i nt)$_REQUE ST['owner' ] : (int)$ _COOKIE['m emberID'];
125           $i d = ($_COO KIE['membe rID'] ? $_ COOKIE['me mberID'] :  0);   125           $i d = ($_COO KIE['membe rID'] ? $_ COOKIE['me mberID'] :  0);
126           $f rom = (int )$_REQUEST ['from'];   126           $f rom = (int )$_REQUEST ['from'];
127     127  
128           if  ( !$owner  )   128           if  ( !$owner  )
129                    retu rn $ret;   129                    retu rn $ret;
130     130  
131           //  Print own er's infor mation   131           //  Print own er's infor mation
132           $r et .= "<br  />   132           $r et .= "<br  />
133                    <tab le width=\ "100%\" ce llpadding= \"0\" cell spacing=\" 0\" border =\"0\">   133                    <tab le width=\ "100%\" ce llpadding= \"0\" cell spacing=\" 0\" border =\"0\">
134                             <tr>   134                             <tr>
135                                      <td cols pan=\"2\"> " .   135                                      <td cols pan=\"2\"> " .
136                                               ProfileDet ails( $own er ) .   136                                               ProfileDet ails( $own er ) .
137                                      "</td>   137                                      "</td>
138                             </tr>   138                             </tr>
139                    </ta ble>\n";   139                    </ta ble>\n";
140     140  
141           //  Print pag e controls   141           //  Print pag e controls
142           $r ecords_num  = db_arr( "SELECT CO UNT( * ) A S `rec_num ` FROM `Gu estbook` W HERE `Reci pient` = ' {$owner}'" );   142           $r ecords_num  = db_arr( "SELECT CO UNT( * ) A S `rec_num ` FROM `Gu estbook` W HERE `Reci pient` = ' {$owner}'" );
143           if  ( $record s_num['rec _num'] > $ records_on _page )   143           if  ( $record s_num['rec _num'] > $ records_on _page )
144           {   144           {
145                    $ret  .= "<br / >   145                    $ret  .= "<br / >
146                             <table  border=\" 0\" cellpa dding=\"1\ " cellspac ing=\"1\"  width=\"10 0%\">   146                             <table  border=\" 0\" cellpa dding=\"1\ " cellspac ing=\"1\"  width=\"10 0%\">
147                                      <tr>   147                                      <tr>
148                                               <td align= \"center\"  class=\"t ext\">";   148                                               <td align= \"center\"  class=\"t ext\">";
149     149  
150                    if(  $from >= $ records_on _page )   150                    if(  $from >= $ records_on _page )
151                    {   151                    {
152                             $nfrom  = (0 < ($ from - $re cords_on_p age)) ? ($ from - $re cords_on_p age) : 0;   152                             $nfrom  = (0 < ($ from - $re cords_on_p age)) ? ($ from - $re cords_on_p age) : 0;
153                             $ret . = "   153                             $ret . = "
154                                                       <a  href=\"gu estbook.ph p?owner={$ owner}&fro m={$nfrom} \">&lt;&lt ;&nbsp;</a >";   154                                                       <a  href=\"gu estbook.ph p?owner={$ owner}&fro m={$nfrom} \">&lt;&lt ;&nbsp;</a >";
155                    }   155                    }
156     156  
157                    $i =  0;   157                    $i =  0;
158                    $pag es = 1;   158                    $pag es = 1;
159                    whil e ( $i < $ records_nu m['rec_num '] )   159                    whil e ( $i < $ records_nu m['rec_num '] )
160                    {   160                    {
161                             if ($i  == $from)   161                             if ($i  == $from)
162                                      $ret .=  "   162                                      $ret .=  "
163                                                       {$ pages}&nbs p;";   163                                                       {$ pages}&nbs p;";
164                             else   164                             else
165                                      $ret .=  "   165                                      $ret .=  "
166                                                       <a  href=\"gu estbook.ph p?owner={$ owner}&fro m=". $i ." \">{$pages }&nbsp;</a >";   166                                                       <a  href=\"gu estbook.ph p?owner={$ owner}&fro m=". $i ." \">{$pages }&nbsp;</a >";
167                             $i = $ i + $recor ds_on_page ;   167                             $i = $ i + $recor ds_on_page ;
168                             $pages ++;   168                             $pages ++;
169                    }   169                    }
170     170  
171                    if (  $records_ num['rec_n um'] > ($f rom + $rec ords_on_pa ge) )   171                    if (  $records_ num['rec_n um'] > ($f rom + $rec ords_on_pa ge) )
172                    {   172                    {
173                             $nfrom  = $from +  $records_ on_page;   173                             $nfrom  = $from +  $records_ on_page;
174                             $ret . = "   174                             $ret . = "
175                                                       <a  href=\"gu estbook.ph p?owner={$ owner}&fro m={$nfrom} \">&nbsp;> ></a>";   175                                                       <a  href=\"gu estbook.ph p?owner={$ owner}&fro m={$nfrom} \">&nbsp;> ></a>";
176                    }   176                    }
177     177  
178                    $ret  .= "   178                    $ret  .= "
179                                               </td>   179                                               </td>
180                                      </tr>   180                                      </tr>
181                             </tabl e>\n";   181                             </tabl e>\n";
182           }   182           }
183     183  
184           //  Print gue stbook ent ries   184           //  Print gue stbook ent ries
185           $q uery = "   185           $q uery = "
186                    SELE CT   186                    SELE CT
187                             `Guest book`.`ID` ,   187                             `Guest book`.`ID` ,
188                             DATE_F ORMAT(`Dat e`, '$date _format' )  AS 'Date' ,   188                             DATE_F ORMAT(`Dat e`, '$date _format' )  AS 'Date' ,
189                             `IP`,   189                             `IP`,
190                             `Sende r`,   190                             `Sende r`,
191                             `Profi les`.`Nick Name`,   191                             `Profi les`.`Nick Name`,
192                             `Recip ient`,   192                             `Recip ient`,
193                             `Text` ,   193                             `Text` ,
194                             `New`   194                             `New`
195                    FROM  `Guestboo k`   195                    FROM  `Guestboo k`
196                    LEFT  JOIN `Pro files` ON   196                    LEFT  JOIN `Pro files` ON
197                             `Profi les`.`ID`  = `Sender`   197                             `Profi les`.`ID`  = `Sender`
198                    WHER E   198                    WHER E
199                             `Recip ient`='{$o wner}'   199                             `Recip ient`='{$o wner}'
200                    ORDE R BY `Date ` DESC   200                    ORDE R BY `Date ` DESC
201                    LIMI T {$from},  {$records _on_page}   201                    LIMI T {$from},  {$records _on_page}
202                    ";   202                    ";
203           $r ecords_res  = db_res(  $query );   203           $r ecords_res  = db_res(  $query );
204           if  ( $record s_num['rec _num'] > 0  )   204           if  ( $record s_num['rec _num'] > 0  )
205           {   205           {
206                    $ret  .= "<br / >   206                    $ret  .= "<br / >
207                             <table  class=\"g b_msgs_tab le\">   207                             <table  class=\"g b_msgs_tab le\">
208                                      <tr>   208                                      <tr>
209                                               <th width= \"20%\">"  . _t( "_Fr om") . "</ th>   209                                               <th width= \"20%\">"  . _t( "_Fr om") . "</ th>
210                                               <th width= \"80%\">"  . _t( "_Te xt") . "</ th>   210                                               <th width= \"80%\">"  . _t( "_Te xt") . "</ th>
211                                      </tr>";   211                                      </tr>";
212                       212                    
213                    $tr_ class = 'o dd';   213                    $tr_ class = 'o dd';
214                       214                    
215                    whil e ( $recor ds_arr = m ysql_fetch _array($re cords_res)  )   215                    whil e ( $recor ds_arr = m ysql_fetch _array($re cords_res)  )
216                    {   216                    {
217                             $recor d_text =   $records_a rr['Text']  ;   217                             $recor d_text =   $records_a rr['Text']  ;
218                             $ret . = "   218                             $ret . = "
219                                      <tr clas s=\"gb_msg _row_{$tr_ class}\">   219                                      <tr clas s=\"gb_msg _row_{$tr_ class}\">
220                                               <td width= \"20%\" cl ass=\"picP osition\"> " .   220                                               <td width= \"20%\" cl ass=\"picP osition\"> " .
221                                                       ge t_member_t humbnail($ records_ar r['Sender' ], 'none'  ) .   221                                                       ge t_member_t humbnail($ records_ar r['Sender' ], 'none'  ) .
222                                                       '< b><a href= "'.getProf ileLink($o wner).'">' .$records_ arr['NickN ame'].'</a ></b><br / >'.   222                                                       '< b><a href= "'.getProf ileLink($o wner).'">' .$records_ arr['NickN ame'].'</a ></b><br / >'.
223                                                       $r ecords_arr ['Date'] .   223                                                       $r ecords_arr ['Date'] .
224                                               "</td>   224                                               "</td>
225                                               <td width= \"80%\" va lign=\"top \">";   225                                               <td width= \"80%\" va lign=\"top \">";
226                                226                             
227                             if ( $ owner == $ id || $log ged['admin '] )   227                             if ( $ owner == $ id || $log ged['admin '] )
228                             {   228                             {
229                                      $ret .=  "   229                                      $ret .=  "
230                                                                <div  class=\"g b_msg_acti ons\">   230                                                                <div  class=\"g b_msg_acti ons\">
231                                                                         <a hre f=\"guestb ook.php?ow ner={$owne r}&action= delete&del ete_id={$r ecords_arr ['ID']}\"> ".   231                                                                         <a hre f=\"guestb ook.php?ow ner={$owne r}&action= delete&del ete_id={$r ecords_arr ['ID']}\"> ".
232                                                                                  _t("_Del ete") .   232                                                                                  _t("_Del ete") .
233                                                                         "</a>   233                                                                         "</a>
234                                                                </di v>";   234                                                                </di v>";
235                             }   235                             }
236                                236                             
237                             $ret . = "   237                             $ret . = "
238                                                                <div >{$record_ text}</div >   238                                                                <div >{$record_ text}</div >
239                                                          239                                                       
240                                               </td>   240                                               </td>
241                                      </tr>";   241                                      </tr>";
242                                242                             
243                             $tr_cl ass = ($tr _class ==  'odd') ? ' even' : 'o dd';   243                             $tr_cl ass = ($tr _class ==  'odd') ? ' even' : 'o dd';
244                    }   244                    }
245                    $ret  .= "   245                    $ret  .= "
246                             </tabl e>";   246                             </tabl e>";
247           }   247           }
248              248           
249           //  Print add  new entry  link   249           //  Print add  new entry  link
250       $ret . = "   250       $ret . = "
251                    <div  class=\"a dd_link\">   251                    <div  class=\"a dd_link\">
252                                      <a href= \"{$_SERVE R['PHP_SEL F']}?owner ={$owner}& amp;action =show_add\ ">" . _t(  "_Add reco rd") . "</ a>   252                                      <a href= \"{$_SERVE R['PHP_SEL F']}?owner ={$owner}& amp;action =show_add\ ">" . _t(  "_Add reco rd") . "</ a>
253                             </div> ";   253                             </div> ";
254           re turn $ret;   254           re turn $ret;
255   }   255   }
256     256  
257   // Print a dd new ent ry form   257   // Print a dd new ent ry form
258   function S howAddReco rd()   258   function S howAddReco rd()
259   {   259   {
    260           me mber_auth(  0);
260           $o wner = $_R EQUEST['ow ner'] ? (i nt)$_REQUE ST['owner' ] : (int)$ _COOKIE['m emberID'];   261           $o wner = $_R EQUEST['ow ner'] ? (i nt)$_REQUE ST['owner' ] : (int)$ _COOKIE['m emberID'];
261              262           
262       $ret =  "   263       $ret =  "
263                    <for m name=\"g uestbook_f orm\" meth od=\"POST\ " action=\ "guestbook .php?owner ={$owner}\ ">   264                    <for m name=\"g uestbook_f orm\" meth od=\"POST\ " action=\ "guestbook .php?owner ={$owner}\ ">
264                    <inp ut type=\" hidden\" n ame=\"owne r\" value= \"{$owner} \">   265                    <inp ut type=\" hidden\" n ame=\"owne r\" value= \"{$owner} \">
265                    <inp ut type=\" hidden\" n ame=\"acti on\" value =\"new\">   266                    <inp ut type=\" hidden\" n ame=\"acti on\" value =\"new\">
266                             <table  width=\"1 00%\" cell padding=\" 1\" cellsp acing=\"1\ " border=\ "0\">   267                             <table  width=\"1 00%\" cell padding=\" 1\" cellsp acing=\"1\ " border=\ "0\">
267                                      <tr>   268                                      <tr>
268                                               <td align= \"center\"  class=\"t ext\"><b>"  . _t( "_A dd record" ) . "</b>< /td>   269                                               <td align= \"center\"  class=\"t ext\"><b>"  . _t( "_A dd record" ) . "</b>< /td>
269                                      </tr>   270                                      </tr>
270                                      <tr>   271                                      <tr>
271                                               <td style= \"text-ali gn:center; \" class=\ "text\">   272                                               <td style= \"text-ali gn:center; \" class=\ "text\">
272                                               <textarea  name=\"new record\" c lass=\"gue stbookText Area\" id= \"newrecor d\" style= \"width:10 0%;\"></te xtarea></t d>   273                                               <textarea  name=\"new record\" c lass=\"gue stbookText Area\" id= \"newrecor d\" style= \"width:10 0%;\"></te xtarea></t d>
273                                      </tr>   274                                      </tr>
274                                      <tr>   275                                      <tr>
275                                               <td align= \"center\" ><input cl ass=\"no\"  name=\"ad d\" type=\ "submit\"  value=\"".  _t("_Add  record") . "\"></td>   276                                               <td align= \"center\" ><input cl ass=\"no\"  name=\"ad d\" type=\ "submit\"  value=\"".  _t("_Add  record") . "\"></td>
276                                      </tr>   277                                      </tr>
277                             </tabl e>   278                             </tabl e>
278                             </form >\n";   279                             </form >\n";
279           re turn $ret;   280           re turn $ret;
280   }   281   }
281     282  
282   function A ddRecord()   283   function A ddRecord()
283   {   284   {
    285           me mber_auth(  0);
    286  
284           gl obal $reco rd_maxleng th;   287           gl obal $reco rd_maxleng th;
285           gl obal $peri od;   288           gl obal $peri od;
286           gl obal $reco rd_limit;   289           gl obal $reco rd_limit;
287           gl obal $logg ed;   290           gl obal $logg ed;
288     291  
289           $r et = "";   292           $r et = "";
290     293  
291           $r ecord_text  = addslas hes(clear_ xss( proce ss_pass_da ta($_POST[ 'newrecord '])));   294           $r ecord_text  = addslas hes(clear_ xss( proce ss_pass_da ta($_POST[ 'newrecord '])));
292           $r ecord_send er = strle n($_COOKIE ['memberID ']) ? (int )$_COOKIE[ 'memberID' ] : "";   295           $r ecord_send er = strle n($_COOKIE ['memberID ']) ? (int )$_COOKIE[ 'memberID' ] : "";
293           $r ecord_reci pient = (i nt)$_REQUE ST['owner' ];   296           $r ecord_reci pient = (i nt)$_REQUE ST['owner' ];
294           $i p = ( gete nv('HTTP_C LIENT_IP')  ? getenv( 'HTTP_CLIE NT_IP') :  getenv('RE MOTE_ADDR' ) );   297           $i p = ( gete nv('HTTP_C LIENT_IP')  ? getenv( 'HTTP_CLIE NT_IP') :  getenv('RE MOTE_ADDR' ) );
295           if  ( !$recor d_recipien t)   298           if  ( !$recor d_recipien t)
296                    retu rn $ret;   299                    retu rn $ret;
297     300  
298           //  Test if I P is defin ed   301           //  Test if I P is defin ed
299           if  ( !$ip ||  !$record_ sender )   302           if  ( !$ip ||  !$record_ sender )
300           {   303           {
301                    $ret  .= "<br / >   304                    $ret  .= "<br / >
302                             <table  width=\"1 00%\" cell padding=\" 1\" cellsp acing=\"1\ " border=\ "0\">   305                             <table  width=\"1 00%\" cell padding=\" 1\" cellsp acing=\"1\ " border=\ "0\">
303                                      <tr>   306                                      <tr>
304                                               <td class= \"text\" a lign=\"cen ter\">   307                                               <td class= \"text\" a lign=\"cen ter\">
305                                                       <b r />". _t_ err("_sorr y, i can n ot define  you ip adr ess. IT'S  TIME TO CO ME OUT !")  ."<br />   308                                                       <b r />". _t_ err("_sorr y, i can n ot define  you ip adr ess. IT'S  TIME TO CO ME OUT !")  ."<br />
306                                               </td>   309                                               </td>
307                                      </tr>   310                                      </tr>
308                             </tabl e>\n";   311                             </tabl e>\n";
309                    retu rn $ret;   312                    retu rn $ret;
310           }   313           }
311     314  
312           //  Test if l ast messag e is old e nough   315           //  Test if l ast messag e is old e nough
313           $l ast_count  = db_arr(  "SELECT CO UNT( * ) A S `last_co unt` FROM  `Guestbook ` WHERE `I P` = '{$ip }' AND (UN IX_TIMESTA MP(NOW())  - UNIX_TIM ESTAMP(`Da te`) < {$p eriod}*60) " );   316           $l ast_count  = db_arr(  "SELECT CO UNT( * ) A S `last_co unt` FROM  `Guestbook ` WHERE `I P` = '{$ip }' AND (UN IX_TIMESTA MP(NOW())  - UNIX_TIM ESTAMP(`Da te`) < {$p eriod}*60) " );
314           if  ( $last_c ount['last _count'] ! = 0 )   317           if  ( $last_c ount['last _count'] ! = 0 )
315           {   318           {
316                    $ret  .= "<br / >   319                    $ret  .= "<br / >
317                             <table  width=\"1 00%\" cell padding=\" 1\" cellsp acing=\"1\ " border=\ "0\">   320                             <table  width=\"1 00%\" cell padding=\" 1\" cellsp acing=\"1\ " border=\ "0\">
318                                      <tr>   321                                      <tr>
319                                               <td class= \"text\" a lign=\"cen ter\">   322                                               <td class= \"text\" a lign=\"cen ter\">
320                                                       <b r />". _t_ err("_You  have to wa it for PER IOD minute s before y ou can wri te another  message!" , $period)  ."<br />   323                                                       <b r />". _t_ err("_You  have to wa it for PER IOD minute s before y ou can wri te another  message!" , $period)  ."<br />
321                                               </td>   324                                               </td>
322                                      </tr>   325                                      </tr>
323                             </tabl e>\n";   326                             </tabl e>\n";
324                    retu rn $ret;   327                    retu rn $ret;
325           }   328           }
326     329  
327           //  Restrict  with total  records c ount   330           //  Restrict  with total  records c ount
328           $t otal_count  = db_arr(  "SELECT C OUNT(*) AS  `total_co unt` FROM  `Guestbook ` WHERE `R ecipient`  = '{$recor d_recipien t}'" );   331           $t otal_count  = db_arr(  "SELECT C OUNT(*) AS  `total_co unt` FROM  `Guestbook ` WHERE `R ecipient`  = '{$recor d_recipien t}'" );
329           if  ( ($total _count['to tal_count' ] - 1) > $ record_lim it )   332           if  ( ($total _count['to tal_count' ] - 1) > $ record_lim it )
330           {   333           {
331                    $del _res = db_ res( "SELE CT `ID` FR OM `Guestb ook` WHERE  `Recipien t` = '{$re cord_recip ient}' ORD ER BY `Dat e` ASC LIM IT ". ($to tal_count[ 'total_cou nt'] - $re cord_limit  + 1) );   334                    $del _res = db_ res( "SELE CT `ID` FR OM `Guestb ook` WHERE  `Recipien t` = '{$re cord_recip ient}' ORD ER BY `Dat e` ASC LIM IT ". ($to tal_count[ 'total_cou nt'] - $re cord_limit  + 1) );
332                    whil e ( $del_a rr = mysql _fetch_arr ay($del_re s) )   335                    whil e ( $del_a rr = mysql _fetch_arr ay($del_re s) )
333                             db_res ( "DELETE  FROM `Gues tbook` WHE RE `ID` =  {$del_arr[ 'ID']}" );   336                             db_res ( "DELETE  FROM `Gues tbook` WHE RE `ID` =  {$del_arr[ 'ID']}" );
334           }   337           }
335     338  
336           //  Perform i nsertion   339           //  Perform i nsertion
337           db _res( "INS ERT INTO ` Guestbook`  SET `Date ` = NOW(),  `IP` = '{ $ip}', `Se nder` = '{ $record_se nder}', `R ecipient`  = '{$recor d_recipien t}', `Text ` = '{$rec ord_text}' , `New` =  '1'" );   340           db _res( "INS ERT INTO ` Guestbook`  SET `Date ` = NOW(),  `IP` = '{ $ip}', `Se nder` = '{ $record_se nder}', `R ecipient`  = '{$recor d_recipien t}', `Text ` = '{$rec ord_text}' , `New` =  '1'" );
338     341  
339           re turn $ret;   342           re turn $ret;
340   }   343   }
341     344  
342   function D eleteRecor d()   345   function D eleteRecor d()
343   {   346   {
344           gl obal $logg ed;   347           gl obal $logg ed;
345     348  
346           $r et = "";   349           $r et = "";
347           $o wner = (in t)$_REQUES T['owner'] ;   350           $o wner = (in t)$_REQUES T['owner'] ;
348           $i d = ($_COO KIE['membe rID'] ? $_ COOKIE['me mberID'] :  0);   351           $i d = ($_COO KIE['membe rID'] ? $_ COOKIE['me mberID'] :  0);
349           $d elete_id =  (int)$_GE T['delete_ id'];   352           $d elete_id =  (int)$_GE T['delete_ id'];
350     353  
351           if  ( !$owner  || !($own er == $id  || $logged ['admin'])  )   354           if  ( !$owner  || !($own er == $id  || $logged ['admin'])  )
352                    retu rn $ret;   355                    retu rn $ret;
353     356  
354           db _res( "DEL ETE FROM ` Guestbook`  WHERE `ID ` = '$dele te_id'" );   357           db _res( "DEL ETE FROM ` Guestbook`  WHERE `ID ` = '$dele te_id'" );
355     358  
356           re turn $ret;   359           re turn $ret;
357   }   360   }
358     361  
359   function P rintInfo(  $id = 0 )   362   function P rintInfo(  $id = 0 )
360   {   363   {
361           if  ( $id > 0  )   364           if  ( $id > 0  )
362           {   365           {
363                    $inf o_arr = ge tProfileIn fo( $id );   366                    $inf o_arr = ge tProfileIn fo( $id );
364                    $inf o_sex = _t ( "_{$info _arr['Sex' ]}" );   367                    $inf o_sex = _t ( "_{$info _arr['Sex' ]}" );
365                    $inf o_age = ag e( $info_a rr['DateOf Birth'] );   368                    $inf o_age = ag e( $info_a rr['DateOf Birth'] );
366                    $ret  = "<p ali gn=\"left\ ">". _t("_ Nickname")  .": <stro ng>{$info_ arr['NickN ame']}</st rong><br / >". _t("_S ex") .": < strong>{$i nfo_sex}</ strong><br  />". _t(" _DateOfBir th") .": < strong>{$i nfo_age}</ strong><br  /></p>";   369                    $ret  = "<p ali gn=\"left\ ">". _t("_ Nickname")  .": <stro ng>{$info_ arr['NickN ame']}</st rong><br / >". _t("_S ex") .": < strong>{$i nfo_sex}</ strong><br  />". _t(" _DateOfBir th") .": < strong>{$i nfo_age}</ strong><br  /></p>";
367           }   370           }
368           el se   371           el se
369           {   372           {
370                    $ret  = _t("_no _info");   373                    $ret  = _t("_no _info");
371           }   374           }
372     375  
373           re turn $ret;   376           re turn $ret;
374   }   377   }
375     378  
376   ?>   379   ?>