190. File Comparison Report

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

190.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\inc\classes BxDolComments.php Thu Oct 18 11:13:34 2007 UTC
2 Dolphin-v.6.1.0\inc\classes BxDolComments.php Thu Apr 10 09:53:28 2008 UTC

190.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 15 784
Changed 8 22
Inserted 4 7
Removed 2 3

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

190.4 Active regular expressions

No regular expressions were active.

190.5 Comparison detail

1   <?   1   <?
2     2  
3   require_on ce(BX_DIRE CTORY_PATH _INC . 'he ader.inc.p hp' );   3   require_on ce(BX_DIRE CTORY_PATH _INC . 'he ader.inc.p hp' );
4   require_on ce(BX_DIRE CTORY_PATH _INC . 'ad min.inc.ph p');   4   require_on ce(BX_DIRE CTORY_PATH _INC . 'ad min.inc.ph p');
5   require_on ce(BX_DIRE CTORY_PATH _INC . 'de sign.inc.p hp' );   5   require_on ce(BX_DIRE CTORY_PATH _INC . 'de sign.inc.p hp' );
6   require_on ce(BX_DIRE CTORY_PATH _INC . 'pr ofiles.inc .php' );   6   require_on ce(BX_DIRE CTORY_PATH _INC . 'pr ofiles.inc .php' );
7   require_on ce(BX_DIRE CTORY_PATH _INC . 'ut ils.inc.ph p' );   7   require_on ce(BX_DIRE CTORY_PATH _INC . 'ut ils.inc.ph p' );
8   require_on ce(BX_DIRE CTORY_PATH _INC . 'ta gs.inc.php ' );   8   require_on ce(BX_DIRE CTORY_PATH _INC . 'ta gs.inc.php ' );
9     9  
10   /*   10   /*
11    * class f or Events   11    * class f or Events
12    */   12    */
13   class BxDo lComments  {   13   class BxDo lComments  {
14     14  
15       //comm ents type  (1-Classif ieds, 2-Bl ogs, )   15       //comm ents type  (1-Classif ieds, 2-Bl ogs, )
16       var $i CType;   16       var $i CType;
17     17  
18       //name  of table  with comme nts   18       //name  of table  with comme nts
19       var $s TableComme ntsName;   19       var $s TableComme ntsName;
20     20  
21       //admi n mode, ca n All acti ons   21       //admi n mode, ca n All acti ons
22       var $b AdminMode;   22       var $b AdminMode;
23     23  
24       //frie nds abilit y   24       //frie nds abilit y
25       var $b FriendsMod e;   25       var $b FriendsMod e;
26     26  
27       var $s CurrBrowse dFile;   27       var $s CurrBrowse dFile;
28     28  
29       var $i VisitorID;   29       var $i VisitorID;
30       //var  $iBigThumb Size = 110 ;   30       //var  $iBigThumb Size = 110 ;
31     31  
32       //cons tructor   32       //cons tructor
33       functi on BxDolCo mments( $i CType, $sC urrBrowsed File='' )  {   33       functi on BxDolCo mments( $i CType, $sC urrBrowsed File='' )  {
34           $t his->iCTyp e = $iCTyp e;   34           $t his->iCTyp e = $iCTyp e;
35           $t his->iVisi torID = (i nt)$_COOKI E['memberI D'];   35           $t his->iVisi torID = (i nt)$_COOKI E['memberI D'];
36           $t his->sCurr BrowsedFil e = ($sCur rBrowsedFi le=='') ?  $_SERVER[' PHP_SELF']  : $sCurrB rowsedFile ;   36           $t his->sCurr BrowsedFil e = ($sCur rBrowsedFi le=='') ?  $_SERVER[' PHP_SELF']  : $sCurrB rowsedFile ;
37       }   37       }
38     38  
39       /**   39       /**
40        * Gen erate Comm ents Secti on   40        * Gen erate Comm ents Secti on
41        *   41        *
42        * @pa ram $iElem entID - Po st ID   42        * @pa ram $iElem entID - Po st ID
43        * @pa ram $iOwne rID - Owne r ID   43        * @pa ram $iOwne rID - Owne r ID
44        * @re turn HTML  presentati on of data   44        * @re turn HTML  presentati on of data
45        */   45        */
46        function   PrintComme ntSection( $iElementI D,   $sCommentL bl=''  
)   {
  46        function   PrintComme ntSection( $iElementI D,   $sCommentL bl='' ,   $bDesignBo xed   =   true   )   {
47            global   $ p r of ;   47            global   $ aP r eValues ;
48           gl obal $site ;   48           gl obal $site ;
49     49  
50           $s RetHtml =  '';   50           $s RetHtml =  '';
51     51  
52           $s CommentsC  = ($sComme ntLbl=='')  ? _t('_co mments') :  $sComment Lbl;   52           $s CommentsC  = ($sComme ntLbl=='')  ? _t('_co mments') :  $sComment Lbl;
53           $s SbjN = _t( '_Subject' );   53           $s SbjN = _t( '_Subject' );
54           $s PostedByC  = _t('_Pos ted by');   54           $s PostedByC  = _t('_Pos ted by');
55           $s DateC = _t ('_Date');   55           $s DateC = _t ('_Date');
56           $s LocationC  = _t('_Loc ation');   56           $s LocationC  = _t('_Loc ation');
57           $s AdminLocal AreaC = _t ('_AdminAr ea');   57           $s AdminLocal AreaC = _t ('_AdminAr ea');
58           $s AdminC = _ t('_Admin' );   58           $s AdminC = _ t('_Admin' );
59           $s SureC = _t ("_Are you  sure");   59           $s SureC = _t ("_Are you  sure");
60           $s PostCommen tC = _t('_ Post Comme nt');   60           $s PostCommen tC = _t('_ Post Comme nt');
61           $s LeaveComme ntC = _t(' _LeaveComm ent');   61           $s LeaveComme ntC = _t(' _LeaveComm ent');
62           $s AddComment C = _t('_A dd comment ');   62           $s AddComment C = _t('_A dd comment ');
63           $s EditC = _t ('_Edit');   63           $s EditC = _t ('_Edit');
64           $s DeleteC =  _t('_Delet e');   64           $s DeleteC =  _t('_Delet e');
65           $s CommentFri endsOnlyC  = _t('_com menting_th is_blog_al lowed_only _for_frien ds');   65           $s CommentFri endsOnlyC  = _t('_com menting_th is_blog_al lowed_only _for_frien ds');
66           $s ReportC =  _t('_Repor t');   66           $s ReportC =  _t('_Repor t');
67     67  
68           $s PostDataSQ L = $this- >Selection ObjectSQL( $iElementI D);   68           $s PostDataSQ L = $this- >Selection ObjectSQL( $iElementI D);
69     69  
70           $a PostData =  db_arr($s PostDataSQ L);   70           $a PostData =  db_arr($s PostDataSQ L);
71           $i OwnerID =  $aPostData ['OwnerID' ];   71           $i OwnerID =  $aPostData ['OwnerID' ];
72     72  
73           // $bFriend =  is_friend s( $this-> iVisitorID , $aPostDa ta['OwnerI D'] );   73           // $bFriend =  is_friend s( $this-> iVisitorID , $aPostDa ta['OwnerI D'] );
74           // $bOwner =  ($this->iV isitorID== $aPostData ['OwnerID' ]) ? true  : false;   74           // $bOwner =  ($this->iV isitorID== $aPostData ['OwnerID' ]) ? true  : false;
75     75  
76           $b CanPostCom ment = $th is->GetPos tNewCommen tPermissio n($aPostDa ta);   76           $b CanPostCom ment = $th is->GetPos tNewCommen tPermissio n($aPostDa ta);
77           $b CanPostCom mentReport  = $this-> GetComment ReportPerm ission($aP ostData);   77           $b CanPostCom mentReport  = $this-> GetComment ReportPerm ission($aP ostData);
78     78  
    79           $s FullPermis sions = fa lse;
    80           $s FullPermis sions2Form s = false;
    81  
79           $s Query = $t his->Selec tionCommen tsObjectSQ L($iElemen tID);   82           $s Query = $t his->Selec tionCommen tsObjectSQ L($iElemen tID);
80     83  
81           $v SqlRes = d b_res ($sQ uery);   84           $v SqlRes = d b_res ($sQ uery);
82           $s CommsHtml  = '';   85           $s CommsHtml  = '';
83           wh ile( $aSql ResStr = m ysql_fetch _assoc($vS qlRes) ) {   86           wh ile( $aSql ResStr = m ysql_fetch _assoc($vS qlRes) ) {
84                $aCommen tData = $t his->FillC ommentsDat a($aSqlRes Str);   87                $aCommen tData = $t his->FillC ommentsDat a($aSqlRes Str);
85                $aProfil eInfo = ge tProfileIn fo($aComme ntData['Pr ofID']);   88                $aProfil eInfo = ge tProfileIn fo($aComme ntData['Pr ofID']);
86     89  
87                $sPosted By = ($aCo mmentData[ 'ProfID']= =0) ? $sAd minC : '<a  href="'.g etProfileL ink($aComm entData['P rofID']).' ">'.$aProf ileInfo['N ickName']. '</a>';   90                $sPosted By = ($aCo mmentData[ 'ProfID']= =0) ? $sAd minC : '<a  href="'.g etProfileL ink($aComm entData['P rofID']).' ">'.$aProf ileInfo['N ickName']. '</a>';
88                 $sCountryN ame   =   ($aProfile Info['Coun try']=="") ?$sAdminLo calAreaC:_ t( '__'. $ p r of [' c ountr ies '][   $aProfileI nfo['Count ry']   ]  
);
  91                 $sCountryN ame   =   ($aProfile Info['Coun try']=="") ?$sAdminLo calAreaC:_ t(
$ aP r eValues [' C ountr y '][   $aProfileI nfo['Count ry']   ] ['LKey']   );
89                $sCountr yPic = ($a ProfileInf o['Country ']=='')?'' :' <img al t="'.$aPro fileInfo[' Country']. '" src="'. ($site['fl ags'].strt olower($aP rofileInfo ['Country' ])).'.gif" />';   92                $sCountr yPic = ($a ProfileInf o['Country ']=='')?'' :' <img al t="'.$aPro fileInfo[' Country']. '" src="'. ($site['fl ags'].strt olower($aP rofileInfo ['Country' ])).'.gif" />';
90                $sUserIc on = get_m ember_icon ($aComment Data['Prof ID'], 'lef t', true);   93                $sUserIc on = get_m ember_icon ($aComment Data['Prof ID'], 'lef t', true);
91                $aCommen tData['Tex t'] = ( $a CommentDat a['Text']) ;   94                $aCommen tData['Tex t'] = ( $a CommentDat a['Text']) ;
92                $sTimeAg o = _forma t_when($aC ommentData ['Time']);   95                $sTimeAg o = _forma t_when($aC ommentData ['Time']);
93     96  
94                $sMessag eBR = $thi s->ActionP repareForE dit($aComm entData['T ext']);   97                $sMessag eBR = $thi s->ActionP repareForE dit($aComm entData['T ext']);
95     98  
96                $sFullPe rmissions  = $this->G etElementF ullPermiss ion($aPost Data, $aCo mmentData) ;   99                $sFullPe rmissions  = $this->G etElementF ullPermiss ion($aPost Data, $aCo mmentData) ;
    100                $sFullPe rmissions2 Forms = ($ sFullPermi ssions==tr ue) ?  $sF ullPermiss ions: $sFu llPermissi ons2Forms;
97     101  
98                $sAdminA ctions = ' ';   102                $sAdminA ctions = ' ';
99                if ($sFu llPermissi ons) {   103                if ($sFu llPermissi ons) {
100                    if ( $this->iCT ype==1) {   104                    if ( $this->iCT ype==1) {
101                         $sAdminAct ions = <<< EOF   105                         $sAdminAct ions = <<< EOF
102   <!-- <span  class="co mment_text _r"> -->   106   <!-- <span  class="co mment_text _r"> -->
103   <div class ="comment_ actions">   107   <div class ="comment_ actions">
104       <a hre f="{$this- >sCurrBrow sedFile}"  onclick="j avascript:  UpdateFie ld('EditCo mmentID',{ $aCommentD ata['ID']} );UpdateFi eld('EAdvI D',{$iElem entID}); U pdateField Style('ans wer_form_t o_1','bloc k');Update FieldTiny( 'commentTe xt','{$sMe ssageBR}') ; return f alse;">{$s EditC}</a> |   108       <a hre f="{$this- >sCurrBrow sedFile}"  onclick="j avascript:  UpdateFie ld('EditCo mmentID',{ $aCommentD ata['ID']} );UpdateFi eld('EAdvI D',{$iElem entID}); U pdateField Style('ans wer_form_t o_1','bloc k');Update FieldTiny( 'commentTe xt','{$sMe ssageBR}') ; return f alse;">{$s EditC}</a> |
105       <a hre f="{$_SERV ER['PHP_SE LF']}?Show Advertisem entID={$aC ommentData ['ID']}" o nclick="ja vascript:  UpdateFiel d('DeleteC ommentID', {$aComment Data['ID'] });UpdateF ield('DAdv ID',{$iEle mentID});d ocument.fo rms.comman d_delete_c omment.sub mit(); ret urn false; ">{$sDelet eC}</a>   109       <a hre f="{$_SERV ER['PHP_SE LF']}?Show Advertisem entID={$aC ommentData ['ID']}" o nclick="ja vascript:  UpdateFiel d('DeleteC ommentID', {$aComment Data['ID'] });UpdateF ield('DAdv ID',{$iEle mentID});d ocument.fo rms.comman d_delete_c omment.sub mit(); ret urn false; ">{$sDelet eC}</a>
106   <!-- </spa n> -->   110   <!-- </spa n> -->
107   </div>   111   </div>
108   EOF;   112   EOF;
109                    }   113                    }
110                    if ( $this->iCT ype==2) {   114                    if ( $this->iCT ype==2) {
111                         $sAdminAct ions = <<< EOF   115                         $sAdminAct ions = <<< EOF
112   <span clas s="comment _text_r">   116   <span clas s="comment _text_r">
113       <a hre f="{$this- >sCurrBrow sedFile}"  onclick="j avascript:  UpdateFie ld('EditCo mmentID',{ $aCommentD ata['ID']} );UpdateFi eld('EPost ID',{$iEle mentID});U pdateField Style('ans wer_form_t o_1','bloc k');Update FieldTiny( 'commentTe xt','{$sMe ssageBR}') ; return f alse;">{$s EditC}</a> |   117       <a hre f="{$this- >sCurrBrow sedFile}"  onclick="j avascript:  UpdateFie ld('EditCo mmentID',{ $aCommentD ata['ID']} );UpdateFi eld('EPost ID',{$iEle mentID});U pdateField Style('ans wer_form_t o_1','bloc k');Update FieldTiny( 'commentTe xt','{$sMe ssageBR}') ; return f alse;">{$s EditC}</a> |
114       <a hre f="{$this- >sCurrBrow sedFile}"  onclick="j avascript:  UpdateFie ld('Delete CommentID' ,{$aCommen tData['ID' ]});Update Field('DPo stID',{$iE lementID}) ;document. forms.comm and_delete _comment.s ubmit(); r eturn fals e;">{$sDel eteC}</a>   118       <a hre f="{$this- >sCurrBrow sedFile}"  onclick="j avascript:  UpdateFie ld('Delete CommentID' ,{$aCommen tData['ID' ]});Update Field('DPo stID',{$iE lementID}) ;document. forms.comm and_delete _comment.s ubmit(); r eturn fals e;">{$sDel eteC}</a>
115   </span>   119   </span>
116   EOF;   120   EOF;
117                    }   121                    }
118                }   122                }
119     123  
120                if ($bCa nPostComme ntReport)  {   124                if ($bCa nPostComme ntReport)  {
121                    if ( $this->iCT ype==1) {   125                    if ( $this->iCT ype==1) {
122                         $sReport =  <<<EOF   126                         $sReport =  <<<EOF
123   <div class ="comment_ actions">   127   <div class ="comment_ actions">
124       <a onc lick="java script: wi ndow.open(  'classifi eds.php?co mmentID={$ aCommentDa ta['ID']}& clsID={$iE lementID}& action=rep ort', 'com ment', 'wi dth=500, h eight=380,  menubar=n o,status=n o,resizabl e=yes,scro llbars=yes ,toolbar=n o,location =no' );ret urn false; " href="#{ $aCommentD ata['ID']} ">{$sRepor tC}</a>   128       <a onc lick="java script: wi ndow.open(  'classifi eds.php?co mmentID={$ aCommentDa ta['ID']}& clsID={$iE lementID}& action=rep ort', 'com ment', 'wi dth=500, h eight=380,  menubar=n o,status=n o,resizabl e=yes,scro llbars=yes ,toolbar=n o,location =no' );ret urn false; " href="#{ $aCommentD ata['ID']} ">{$sRepor tC}</a>
125   </div>   129   </div>
126   EOF;   130   EOF;
127                    }   131                    }
128                }   132                }
129     133  
130                $sCommsH tml .= <<< EOF   134                $sCommsH tml .= <<< EOF
131   <div class ="comment_ row">   135   <div class ="comment_ row">
132       {$sUse rIcon}   136       {$sUse rIcon}
133       {$sPos tedBy} ({$ sTimeAgo}) <br />   137       {$sPos tedBy} ({$ sTimeAgo}) <br />
134       {$aCom mentData[' Text']}<br  />   138       {$aCom mentData[' Text']}<br  />
135       {$sRep ort}<br />   139       {$sRep ort}<br />
136       {$sAdm inActions}   140       {$sAdm inActions}
137       <div c lass="clea r_both"></ div>   141       <div c lass="clea r_both"></ div>
138   </div>   142   </div>
139   EOF;   143   EOF;
140     144  
141           }   145           }
142     146  
143           $s PostNewCom m = '';   147           $s PostNewCom m = '';
144           if  ($bCanPos tComment== true) {   148           if  ($bCanPos tComment== true) {
145                if ($thi s->iCType= =1) {   149                if ($thi s->iCType= =1) {
146                    $sPo stNewComm  = <<<EOF   150                    $sPo stNewComm  = <<<EOF
147   <form acti on="{$this ->sCurrBro wsedFile}"  method="p ost" name= "post_comm ent_adv_fo rm">   151   <form acti on="{$this ->sCurrBro wsedFile}"  method="p ost" name= "post_comm ent_adv_fo rm">
148       <input  type="hid den" name= "CommAdver tisementID " value="{ $iElementI D}" />   152       <input  type="hid den" name= "CommAdver tisementID " value="{ $iElementI D}" />
149        <textarea   name="mess age"   id="postNe wComm"   rows="5"   cols="30"  
class="cla ssfiedsTex tArea"></t extarea>
  153        <textarea   name="mess age"   id="postNe wComm"   rows="5"   cols="30"   style="wid th:100%;"   class="cla ssfiedsTex tArea"></t extarea>
150       <input  id="postC ommentAdv"  name="pos tCommentAd v" type="s ubmit" val ue="{$sPos tCommentC} "/>   154       <input  id="postC ommentAdv"  name="pos tCommentAd v" type="s ubmit" val ue="{$sPos tCommentC} "/>
151   </form>   155   </form>
152   EOF;   156   EOF;
153                }   157                }
154                if ($thi s->iCType= =2) {   158                if ($thi s->iCType= =2) {
155                    $sPo stNewComm  = <<<EOF   159                    $sPo stNewComm  = <<<EOF
156   <form acti on="{$this ->sCurrBro wsedFile}? action=sho w_member_p ost&amp;ow nerID={$iO wnerID}&am p;post_id= {$iElement ID}" metho d="post" n ame="post_ comment_ad v_form">   160   <form acti on="{$this ->sCurrBro wsedFile}? action=sho w_member_p ost&amp;ow nerID={$iO wnerID}&am p;post_id= {$iElement ID}" metho d="post" n ame="post_ comment_ad v_form">
157       <input  type="hid den" name= "action" v alue="addc omment" />   161       <input  type="hid den" name= "action" v alue="addc omment" />
158       <input  type="hid den" name= "CommPostI D" value=" {$iElement ID}" />   162       <input  type="hid den" name= "CommPostI D" value=" {$iElement ID}" />
159        <input   type="hidd en"   name="owne rID"   value="{$ th i s->aBlogCo nf['o wnerID '] }"   />   163        <input   type="hidd en"   name="owne rID"   value="{$
i O wnerID
}"   />
160        <textarea   name="mess age"   id="postNe wComm"   rows="5"   cols="30"  
class="cla ssfiedsTex tArea"></t extarea>
  164        <textarea   name="mess age"   id="postNe wComm"   rows="5"   cols="30"   style="wid th:100%;"   class="cla ssfiedsTex tArea"></t extarea>
161       <input  id="postC ommentPost " name="po stCommentP ost" type= "submit" v alue="{$sP ostComment C}"/>   165       <input  id="postC ommentPost " name="po stCommentP ost" type= "submit" v alue="{$sP ostComment C}"/>
162   </form>   166   </form>
163   EOF;   167   EOF;
164                }   168                }
165           }   169           }
166     170  
167            if   ($sFullPer missions
==true)   {
  171            if   ($sFullPer missions 2Forms ==true)   {
168                if ($thi s->iCType= =1) {   172                if ($thi s->iCType= =1) {
169                    $sAd minFormAct ions = <<< EOF   173                    $sAd minFormAct ions = <<< EOF
170   <form acti on="{$this ->sCurrBro wsedFile}"  method="p ost" name= "command_e dit_commen t_adv_form ">   174   <form acti on="{$this ->sCurrBro wsedFile}"  method="p ost" name= "command_e dit_commen t_adv_form ">
171       <input  type="hid den" name= "EditComme ntID" id=" EditCommen tID" value =""/>   175       <input  type="hid den" name= "EditComme ntID" id=" EditCommen tID" value =""/>
172       <input  type="hid den" name= "EAdvID" i d="EAdvID"  value=""/ >   176       <input  type="hid den" name= "EAdvID" i d="EAdvID"  value=""/ >
173        <textarea   name="comm entText"   id="commen tText"   rows="20"   cols="60"   class="cla ssfiedsTex tArea"   style="wid th: {$this->iB igThumbSiz e}px ;"></texta rea>   177        <textarea   name="comm entText"   id="commen tText"   rows="20"   cols="60"   class="cla ssfiedsTex tArea"   style="wid th: 100% ;"></texta rea>
174       <input  type="sub mit" value ="{$sPostC ommentC}"/ >   178       <input  type="sub mit" value ="{$sPostC ommentC}"/ >
175   </form>   179   </form>
176   EOF;   180   EOF;
177                }   181                }
178                if ($thi s->iCType= =2) {   182                if ($thi s->iCType= =2) {
179                    $sAd minFormAct ions = <<< EOF   183                    $sAd minFormAct ions = <<< EOF
180   <form acti on="{$this ->sCurrBro wsedFile}? action=sho w_member_p ost&amp;ow nerID={$iO wnerID}&am p;post_id= {$iElement ID}" metho d="post" n ame="comma nd_edit_co mment_post _form">   184   <form acti on="{$this ->sCurrBro wsedFile}? action=sho w_member_p ost&amp;ow nerID={$iO wnerID}&am p;post_id= {$iElement ID}" metho d="post" n ame="comma nd_edit_co mment_post _form">
181       <input  type="hid den" name= "action" v alue="edit comment" / >   185       <input  type="hid den" name= "action" v alue="edit comment" / >
182       <input  type="hid den" name= "EditComme ntID" id=" EditCommen tID" value =""/>   186       <input  type="hid den" name= "EditComme ntID" id=" EditCommen tID" value =""/>
183       <input  type="hid den" name= "EPostID"  id="EPostI D" value=" "/>   187       <input  type="hid den" name= "EPostID"  id="EPostI D" value=" "/>
184        <input   type="hidd en"   name="owne rID"   value="{$ th i s->aBlogCo nf['o wnerID '] }"   />   188        <input   type="hidd en"   name="owne rID"   value="{$
i O wnerID
}"   />
185        <textarea   name="comm entText"   id="commen tText"   rows="10"   cols="60"   class="cla ssfiedsTex tArea"   style="wid th: {$this->iB igThumbSiz e}px ;"></texta rea>   189        <textarea   name="comm entText"   id="commen tText"   rows="10"   cols="60"   class="cla ssfiedsTex tArea"   style="wid th: 100% ;"></texta rea>
186       <input  type="sub mit" value ="{$sPostC ommentC}"/ >   190       <input  type="sub mit" value ="{$sPostC ommentC}"/ >
187   </form>   191   </form>
188   <form acti on="{$this ->sCurrBro wsedFile}? action=sho w_member_p ost&amp;ow nerID={$iO wnerID}&am p;post_id= {$iElement ID}" metho d="post" n ame="comma nd_delete_ comment">   192   <form acti on="{$this ->sCurrBro wsedFile}? action=sho w_member_p ost&amp;ow nerID={$iO wnerID}&am p;post_id= {$iElement ID}" metho d="post" n ame="comma nd_delete_ comment">
189       <input  type="hid den" name= "DeleteCom mentID" id ="DeleteCo mmentID" v alue=""/>   193       <input  type="hid den" name= "DeleteCom mentID" id ="DeleteCo mmentID" v alue=""/>
190       <input  type="hid den" name= "DPostID"  id="DPostI D" value=" "/>   194       <input  type="hid den" name= "DPostID"  id="DPostI D" value=" "/>
191       <input  type="hid den" name= "action" i d="action"  value="de lete_comme nt" />   195       <input  type="hid den" name= "action" i d="action"  value="de lete_comme nt" />
192        <input   type="hidd en"   name="owne rID"   value="{$ th i s->aBlogCo nf['o wnerID '] }"   />   196        <input   type="hidd en"   name="owne rID"   value="{$
i O wnerID
}"   />
193   </form>   197   </form>
194   EOF;   198   EOF;
195                }   199                }
196           }   200           }
197     201  
198     202  
199           $s CommentAct ions = '';   203           $s CommentAct ions = '';
200           if ( $bCanPos tComment== false && $ aPostData[ 'PostComme ntPermissi on']=='fri ends' ) {   204           if ( $bCanPos tComment== false && $ aPostData[ 'PostComme ntPermissi on']=='fri ends' ) {
201                $sImgFri end = <<<E OF   205                $sImgFri end = <<<E OF
202   <img src=" {$site['ic ons']}lock 32.gif" al t="{$sComm entFriends OnlyC}" ti tle="{$sCo mmentFrien dsOnlyC}"  class="mar g_icon" st yle="margi n-top:10px ;" />   206   <img src=" {$site['ic ons']}lock 32.gif" al t="{$sComm entFriends OnlyC}" ti tle="{$sCo mmentFrien dsOnlyC}"  class="mar g_icon" st yle="margi n-top:10px ;" />
203   EOF;   207   EOF;
204                $sCommen tActions =  $sImgFrie nd.MsgBox( $sCommentF riendsOnly C);   208                $sCommen tActions =  $sImgFrie nd.MsgBox( $sCommentF riendsOnly C);
205           }  else {   209           }  else {
206                $sCommen tActions =  <<<EOF   210                $sCommen tActions =  <<<EOF
207   <div id="a dd_comment _label">   211   <div id="a dd_comment _label">
208       <img s rc="{$site ['icons']} add_commen t.gif" alt ="{$sAddCo mmentC}" t itle="{$sA ddCommentC }" class=" marg_icon"  />   212       <img s rc="{$site ['icons']} add_commen t.gif" alt ="{$sAddCo mmentC}" t itle="{$sA ddCommentC }" class=" marg_icon"  />
209       <a cla ss="action s" onclick ="document .getElemen tById('ans wer_form_t o_0').styl e.display  = 'block';  document. getElement ById('add_ comment_la bel').styl e.display  = 'none';  return fal se;" href= "{$this->s CurrBrowse dFile}">{$ sAddCommen tC}</a>   213       <a cla ss="action s" onclick ="document .getElemen tById('ans wer_form_t o_0').styl e.display  = 'block';  document. getElement ById('add_ comment_la bel').styl e.display  = 'none';  return fal se;" href= "{$this->s CurrBrowse dFile}">{$ sAddCommen tC}</a>
210   </div>   214   </div>
211   EOF;   215   EOF;
212           }   216           }
213     217  
214           $s CommentsCo ntent = << <EOF   218           $s CommentsCo ntent = << <EOF
215   <div id="c omments_se ction">   219   <div id="c omments_se ction">
    220       {$sCom msHtml}
    221       {$sCom mentAction s}
216       <div i d="answer_ form_to_0"  style="di splay: non e;">   222       <div i d="answer_ form_to_0"  style="di splay: non e;">
217           {$ sPostNewCo mm}   223           {$ sPostNewCo mm}
218       </div>   224       </div>
219       <div i d="answer_ form_to_1"  style="di splay: non e;">   225       <div i d="answer_ form_to_1"  style="di splay: non e;">
220           {$ sAdminForm Actions}   226           {$ sAdminForm Actions}
221       </div>   227       </div>
222       {$sCom msHtml}    
223       {$sCom mentAction s}    
224   </div>   228   </div>
225   EOF;   229   EOF;
226           $s how_hide =  $this ->  genShowHid eItem( 'co mments_sec tion' );   230           $s how_hide =  $this ->  genShowHid eItem( 'co mments_sec tion' );
227           $s RetHtml =  DesignBoxC ontent ( $ sCommentsC , $sCommen tsContent,  1, $show_ hide);    
228     231  
    232           $s RetHtml =  ($bDesignB oxed == tr ue) ? Desi gnBoxConte nt ( $sCom mentsC, $s CommentsCo ntent, 1,  $show_hide ) : $sComm entsConten t;
229           re turn $sRet Html;   233           re turn $sRet Html;
230       }   234       }
231     235  
232       functi on GetPost NewComment Permission ($aPostDat a){   236       functi on GetPost NewComment Permission ($aPostDat a){
233           $b CanPostCom ment = tru e;   237           $b CanPostCom ment = tru e;
234     238  
235           $b Friend = i s_friends(  $this->iV isitorID,  $aPostData ['OwnerID' ] );   239           $b Friend = i s_friends(  $this->iV isitorID,  $aPostData ['OwnerID' ] );
236           $b Owner = ($ this->iVis itorID==$a PostData[' OwnerID'])  ? true :  false;   240           $b Owner = ($ this->iVis itorID==$a PostData[' OwnerID'])  ? true :  false;
237     241  
238           sw itch ($thi s->iCType)  {   242           sw itch ($thi s->iCType)  {
239                case 2:   243                case 2:
240                    if ( $aPostData ['PostComm entPermiss ion']=='pu blic' || $ bFriend ||  $bOwner | | $this->b AdminMode)  {   244                    if ( $aPostData ['PostComm entPermiss ion']=='pu blic' || $ bFriend ||  $bOwner | | $this->b AdminMode)  {
241                         $bCanPostC omment = t rue;   245                         $bCanPostC omment = t rue;
242                    } el se {   246                    } el se {
243                         $bCanPostC omment = f alse;   247                         $bCanPostC omment = f alse;
244                    }   248                    }
245                    brea k;   249                    brea k;
246           }   250           }
247           re turn $bCan PostCommen t;   251           re turn $bCan PostCommen t;
248       }   252       }
249     253  
250       functi on GetComm entReportP ermission( $aPostData ){   254       functi on GetComm entReportP ermission( $aPostData ){
251           $b ReportAcce ss = false ;   255           $b ReportAcce ss = false ;
252     256  
253           // $bFriend =  is_friend s( $this-> iVisitorID , $aPostDa ta['OwnerI D'] );   257           // $bFriend =  is_friend s( $this-> iVisitorID , $aPostDa ta['OwnerI D'] );
254           $b Owner = ($ this->iVis itorID==$a PostData[' OwnerID'])  ? true :  false;   258           $b Owner = ($ this->iVis itorID==$a PostData[' OwnerID'])  ? true :  false;
255     259  
256           sw itch ($thi s->iCType)  {   260           sw itch ($thi s->iCType)  {
257                case 1:   261                case 1:
258                    if (  $bOwner )  {   262                    if (  $bOwner )  {
259                         $bReportAc cess = tru e;   263                         $bReportAc cess = tru e;
260                    } el se {   264                    } el se {
261                         $bReportAc cess = fal se;   265                         $bReportAc cess = fal se;
262                    }   266                    }
263                    brea k;   267                    brea k;
264                /*case 2 :   268                /*case 2 :
265                    if ( $bOwner ||  $this->bA dminMode | | $aCommen tData['Pro fID']==$th is->iVisit orID) {   269                    if ( $bOwner ||  $this->bA dminMode | | $aCommen tData['Pro fID']==$th is->iVisit orID) {
266                         $bReportAc cess = tru e;   270                         $bReportAc cess = tru e;
267                    } el se {   271                    } el se {
268                         $bReportAc cess = fal se;   272                         $bReportAc cess = fal se;
269                    }   273                    }
270                    brea k;*/   274                    brea k;*/
271           }   275           }
272           re turn $bRep ortAccess;   276           re turn $bRep ortAccess;
273       }   277       }
274     278  
275       functi on GetElem entFullPer mission($a PostData,  $aCommentD ata){   279       functi on GetElem entFullPer mission($a PostData,  $aCommentD ata){
276           $b FullAccess  = true;   280           $b FullAccess  = true;
277     281  
278           // $bFriend =  is_friend s( $this-> iVisitorID , $aPostDa ta['OwnerI D'] );   282           // $bFriend =  is_friend s( $this-> iVisitorID , $aPostDa ta['OwnerI D'] );
279           $b Owner = ($ this->iVis itorID==$a PostData[' OwnerID'])  ? true :  false;   283           $b Owner = ($ this->iVis itorID==$a PostData[' OwnerID'])  ? true :  false;
280     284  
281           sw itch ($thi s->iCType)  {   285           sw itch ($thi s->iCType)  {
282                case 1:   286                case 1:
283                    if (  /*$bOwner  ||*/ $thi s->bAdminM ode /*|| $ aCommentDa ta['ProfID ']==$this- >iVisitorI D*/ ) {   287                    if (  /*$bOwner  ||*/ $thi s->bAdminM ode /*|| $ aCommentDa ta['ProfID ']==$this- >iVisitorI D*/ ) {
284                         $bFullAcce ss = true;   288                         $bFullAcce ss = true;
285                    } el se {   289                    } el se {
286                         $bFullAcce ss = false ;   290                         $bFullAcce ss = false ;
287                    }   291                    }
288                    brea k;   292                    brea k;
289                case 2:   293                case 2:
290                    if ( $bOwner ||  $this->bA dminMode | | $aCommen tData['Pro fID']==$th is->iVisit orID) {   294                    if ( $bOwner ||  $this->bA dminMode | | $aCommen tData['Pro fID']==$th is->iVisit orID) {
291                         $bFullAcce ss = true;   295                         $bFullAcce ss = true;
292                    } el se {   296                    } el se {
293                         $bFullAcce ss = false ;   297                         $bFullAcce ss = false ;
294                    }   298                    }
295                    brea k;   299                    brea k;
296           }   300           }
297           re turn $bFul lAccess;   301           re turn $bFul lAccess;
298       }   302       }
299     303  
300       /**   304       /**
301        * Fil l Array by  comments  data   305        * Fil l Array by  comments  data
302        *   306        *
303        * @pa ram $aSqlR esStr - co mment data   307        * @pa ram $aSqlR esStr - co mment data
304        * @re turn SQL r equest   308        * @re turn SQL r equest
305        */   309        */
306       functi on FillCom mentsData( $aSqlResSt r) {   310       functi on FillCom mentsData( $aSqlResSt r) {
307           $a CommentDat a = array( );   311           $a CommentDat a = array( );
308           sw itch ($thi s->iCType)  {   312           sw itch ($thi s->iCType)  {
309                case 1:   313                case 1:
310                    $aCo mmentData[ 'ProfID']  = $aSqlRes Str['IDPro file'];   314                    $aCo mmentData[ 'ProfID']  = $aSqlRes Str['IDPro file'];
311                    $aCo mmentData[ 'Text'] =  $aSqlResSt r['Message '];   315                    $aCo mmentData[ 'Text'] =  $aSqlResSt r['Message '];
312                    $aCo mmentData[ 'ID'] = $a SqlResStr[ 'ID'];   316                    $aCo mmentData[ 'ID'] = $a SqlResStr[ 'ID'];
313                    $aCo mmentData[ 'Time'] =  $aSqlResSt r['sec'];   317                    $aCo mmentData[ 'Time'] =  $aSqlResSt r['sec'];
314                    //$a CommentDat a[''] = $a SqlResStr[ ''];   318                    //$a CommentDat a[''] = $a SqlResStr[ ''];
315                    brea k;   319                    brea k;
316                case 2:   320                case 2:
317                    $aCo mmentData[ 'ProfID']  = $aSqlRes Str['Sende rID'];   321                    $aCo mmentData[ 'ProfID']  = $aSqlRes Str['Sende rID'];
318                    $aCo mmentData[ 'Text'] =  $aSqlResSt r['Comment Text'];   322                    $aCo mmentData[ 'Text'] =  $aSqlResSt r['Comment Text'];
319                    $aCo mmentData[ 'ID'] = $a SqlResStr[ 'CommentID '];   323                    $aCo mmentData[ 'ID'] = $a SqlResStr[ 'CommentID '];
320                    $aCo mmentData[ 'Time'] =  $aSqlResSt r['sec'];   324                    $aCo mmentData[ 'Time'] =  $aSqlResSt r['sec'];
321                    //$a CommentDat a[''] = $a SqlResStr[ ''];   325                    //$a CommentDat a[''] = $a SqlResStr[ ''];
322                    brea k;   326                    brea k;
323           }   327           }
324           re turn $aCom mentData;   328           re turn $aCom mentData;
325       }   329       }
326     330  
327       functi on genShow HideItem(  $wrapperID , $default  = '' ) {   331       functi on genShow HideItem(  $wrapperID , $default  = '' ) {
328           $s HideC = _t ( '_Hide'  );   332           $s HideC = _t ( '_Hide'  );
329           $s ShowC = _t ( '_Show'  );   333           $s ShowC = _t ( '_Show'  );
330           if ( !$defaul t )   334           if ( !$defaul t )
331                $default  = $sHideC ;   335                $default  = $sHideC ;
332     336  
333           re turn <<<EO F   337           re turn <<<EO F
334   <div class ="caption_ item">   338   <div class ="caption_ item">
335       <a hre f="{$this- >sCurrBrow sedFile}"   339       <a hre f="{$this- >sCurrBrow sedFile}"
336         oncl ick="javas cript: el  = document .getElemen tById('{$w rapperID}' );   340         oncl ick="javas cript: el  = document .getElemen tById('{$w rapperID}' );
337                    if(e l.style.di splay == ' none') {el .style.dis play = 'bl ock'; this .innerHTML ='{$sHideC }'; }   341                    if(e l.style.di splay == ' none') {el .style.dis play = 'bl ock'; this .innerHTML ='{$sHideC }'; }
338                    else  {el.style .display =  'none'; t his.innerH TML = '{$s ShowC}';}  return fal se;">{$def ault}</a>   342                    else  {el.style .display =  'none'; t his.innerH TML = '{$s ShowC}';}  return fal se;">{$def ault}</a>
339   </div>   343   </div>
340   EOF;   344   EOF;
341       }   345       }
342     346  
343       /**   347       /**
344        * SAF E SQL - Ge t Main dat a about El ement: own er, catego ry,    348        * SAF E SQL - Ge t Main dat a about El ement: own er, catego ry, 
345        *   349        *
346        * @pa ram $iElem entID - Po st ID   350        * @pa ram $iElem entID - Po st ID
347        * @re turn SQL r equest   351        * @re turn SQL r equest
348        */   352        */
349       functi on Selecti onObjectSQ L($iElemen tID){   353       functi on Selecti onObjectSQ L($iElemen tID){
350           $s PostDataSQ L = '';   354           $s PostDataSQ L = '';
351           sw itch ($thi s->iCType)  {   355           sw itch ($thi s->iCType)  {
352                case 1:   356                case 1:
353                    $sPo stDataSQL  = "SELECT  `Classifie dsAdvertis ements`.`I DProfile`  AS 'OwnerI D'   357                    $sPo stDataSQL  = "SELECT  `Classifie dsAdvertis ements`.`I DProfile`  AS 'OwnerI D'
354                    FROM  `Classifi edsAdverti sements`   358                    FROM  `Classifi edsAdverti sements`
355                    /* I NNER JOIN  `Classifie dsSubs` ON  `Classifi edsSubs`.` ID` = `Cla ssifiedsAd vertisemen ts`.`IDCla ssifiedsSu bs`   359                    /* I NNER JOIN  `Classifie dsSubs` ON  `Classifi edsSubs`.` ID` = `Cla ssifiedsAd vertisemen ts`.`IDCla ssifiedsSu bs`
356                    INNE R JOIN `Cl assifieds`  ON `Class ifieds`.`I D` = `Clas sifiedsSub s`.`IDClas sified` */   360                    INNE R JOIN `Cl assifieds`  ON `Class ifieds`.`I D` = `Clas sifiedsSub s`.`IDClas sified` */
357                    WHER E `Classif iedsAdvert isements`. `ID` = {$i ElementID}  LIMIT 1";   361                    WHER E `Classif iedsAdvert isements`. `ID` = {$i ElementID}  LIMIT 1";
358                    brea k;   362                    brea k;
359                case 2:   363                case 2:
360                    $sPo stDataSQL  = "SELECT  `BlogPosts `.`PostCom mentPermis sion`, `Bl ogCategori es`.`Owner ID`   364                    $sPo stDataSQL  = "SELECT  `BlogPosts `.`PostCom mentPermis sion`, `Bl ogCategori es`.`Owner ID`
361                    FROM  `BlogPost s`   365                    FROM  `BlogPost s`
362                    INNE R JOIN `Bl ogCategori es` ON `Bl ogCategori es`.`Categ oryID` = ` BlogPosts` .`Category ID`   366                    INNE R JOIN `Bl ogCategori es` ON `Bl ogCategori es`.`Categ oryID` = ` BlogPosts` .`Category ID`
363                    WHER E `BlogPos ts`.`PostI D` = {$iEl ementID} L IMIT 1";   367                    WHER E `BlogPos ts`.`PostI D` = {$iEl ementID} L IMIT 1";
364                    brea k;   368                    brea k;
365           }   369           }
366           re turn $sPos tDataSQL;   370           re turn $sPos tDataSQL;
367       }   371       }
368     372  
369       /**   373       /**
370        * SAF E SQL - Ge t Comments  data of E lement:   374        * SAF E SQL - Ge t Comments  data of E lement:
371        *   375        *
372        * @pa ram $iElem entID - Po st ID   376        * @pa ram $iElem entID - Po st ID
373        * @re turn SQL r equest   377        * @re turn SQL r equest
374        */   378        */
375       functi on Selecti onComments ObjectSQL( $iElementI D){   379       functi on Selecti onComments ObjectSQL( $iElementI D){
376           $s PostDataSQ L = '';   380           $s PostDataSQ L = '';
377           sw itch ($thi s->iCType)  {   381           sw itch ($thi s->iCType)  {
378                case 1:   382                case 1:
379                    $sQu ery = "   383                    $sQu ery = "
380                         SELECT `Cl sAdvCommen ts`.*, (UN IX_TIMESTA MP() - UNI X_TIMESTAM P(`ClsAdvC omments`.` DateTime`) ) AS `sec`   384                         SELECT `Cl sAdvCommen ts`.*, (UN IX_TIMESTA MP() - UNI X_TIMESTAM P(`ClsAdvC omments`.` DateTime`) ) AS `sec`
381                         FROM `ClsA dvComments `   385                         FROM `ClsA dvComments `
382                         WHERE `Cls AdvComment s`.`IDAdv`  = {$iElem entID}   386                         WHERE `Cls AdvComment s`.`IDAdv`  = {$iElem entID}
383                         ORDER BY ' sec' DESC   387                         ORDER BY ' sec' DESC
384                    ";   388                    ";
385                    brea k;   389                    brea k;
386                case 2:   390                case 2:
387                    $sQu ery = "   391                    $sQu ery = "
388                         SELECT `Bl ogPostComm ents`.*, ( UNIX_TIMES TAMP() - U NIX_TIMEST AMP(`BlogP ostComment s`.`Date`) ) AS `sec`   392                         SELECT `Bl ogPostComm ents`.*, ( UNIX_TIMES TAMP() - U NIX_TIMEST AMP(`BlogP ostComment s`.`Date`) ) AS `sec`
389                         FROM `Blog PostCommen ts`   393                         FROM `Blog PostCommen ts`
390                         WHERE `Blo gPostComme nts`.`Post ID` = {$iE lementID}   394                         WHERE `Blo gPostComme nts`.`Post ID` = {$iE lementID}
391                         ORDER BY ' sec' DESC   395                         ORDER BY ' sec' DESC
392                    ";   396                    ";
393                    brea k;   397                    brea k;
394           }   398           }
395           re turn $sQue ry;   399           re turn $sQue ry;
396       }   400       }
397     401  
398       functi on ActionP repareForE dit($sInpu t) {   402       functi on ActionP repareForE dit($sInpu t) {
399           $s ResJSHTML  = addslash es(htmlspe cialchars( $sInput));   403           $s ResJSHTML  = addslash es(htmlspe cialchars( $sInput));
400           $s ResJSHTML  = str_repl ace( "\r\n ", '', $sR esJSHTML ) ;   404           $s ResJSHTML  = str_repl ace( "\r\n ", '', $sR esJSHTML ) ;
401           re turn $sRes JSHTML;   405           re turn $sRes JSHTML;
402       }   406       }
403     407  
404   }   408   }
405     409  
406   ?>   410   ?>