248. File Comparison Report

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

248.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\install clean_db.php Thu Sep 20 08:58:32 2007 UTC
2 Mon May 12 13:05:36 2008 UTC

248.2 Comparison summary

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

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

248.4 Active regular expressions

No regular expressions were active.

248.5 Comparison detail

1   <?php    
2      
3   /********* ********** ********** ********** ********** ********** ********** ******    
4   *                              D olphin Sma rt Communi ty Builder    
5   *                                 --------- --------    
6   *     begi n                 : M on Mar 23  2006    
7   *     copy right             : ( C) 2006 Bo onEx Group    
8   *     webs ite               : h ttp://www. boonex.com /    
9   * This fil e is part  of Dolphin  - Smart C ommunity B uilder    
10   *    
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/    
13   *    
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.    
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    
18   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m    
19   ********** ********** ********** ********** ********** ********** ********** *****/    
20      
21   $config_fi le = "../i nc/header. inc.php";    
22   $config_di r = "../in c/";    
23      
24   $config_ar r[db_host]  = array(    
25       name = > "Databas e host nam e",    
26       ex =>  "localhost ",    
27       desc = > "Your My SQL databa se host na me here.",    
28       def =>  "localhos t",    
29       check  => 'return  strlen($a rg0) >= 1  ? true : f alse;'    
30       );    
31   $config_ar r[db_user]  = array(    
32       name = > "Databas e user",    
33       ex =>  "YourName" ,    
34       desc = > "Your My SQL databa se read/wr ite user n ame here." ,    
35       check  => 'return  strlen($a rg0) >= 1  ? true : f alse;'    
36       );    
37   $config_ar r[db_passw ord] = arr ay(    
38       name = > "Databas e password ",    
39       ex =>  "YourPassw ord",    
40       desc = > "Your My SQL databa se passwor d here.",    
41       check  => 'return  strlen($a rg0) >= 0  ? true : f alse;'    
42       );    
43   $config_ar r[db_name]  = array(    
44       name = > "Databas e name",    
45       ex =>  "YourDatab aseName",    
46       desc = > "Your My SQL databa se name he re.",    
47       check  => 'return  strlen($a rg0) >= 1  ? true : f alse;'    
48       );    
49      
50      
51   ?>    
52   <html>    
53   <head>    
54       <title >Dolphin i nstallatio n</title>    
55       <link  href="../s tyles.css"  rel=style sheet type =text/css>    
56   </head>    
57   <body>    
58       <table  width=100 % height=1 00%><td al ign=center  valign=ce nter>    
59           <t able width =70% bgcol or=#d7d3fa  align=cen ter cellpa dding=0 ce llspacing= 5><td>    
60           <b >Dolphin c lean db</b >.    
61           </ td></table >    
62           <b r>    
63      
64   <?php    
65      
66   function P rintInput( )    
67   {    
68       global  $config_f ile;    
69       global  $config_a rr;    
70       global  $templ;    
71      
72      
73       echo < <<EOS    
74      
75       <form  method=pos t>    
76           <t able width =70% bgcol or=#d7d3fa  align=cen ter cellpa dding=0 ce llspacing= 5><td>    
77           5)  DB inform ation <br>    
78           </ td></table >    
79       <table  width=70%  height=70 % bgcolor= #d7d3fa cl ass=text a lign=cente r cellpadd ing=0 cell spacing=5  class=text >    
80       <td va lign=top>    
81   EOS;    
82      
83       foreac h ( $confi g_arr as $ key => $va l )    
84       {    
85           ec ho <<<EOS    
86           <t r class=te xt><td>$va l[name]</t d><td><inp ut size=30  name="$ke y" value=" $val[def]" ></td></tr >    
87           <t r class=te xt><td>Des cription:< /td><td>$v al[desc]</ td></tr>    
88           <t r class=te xt><td>Exa mple:</td> <td>$val[e x]</td></t r>    
89           <t r height=1 ><td colsp an=2 bgcol or=black>< /td></tr>    
90   EOS;    
91       }    
92       echo " </table>      
93           <b r>    
94      
95              <center><i nput type= submit nam e=Save val ue=Save></ center>    
96              </form>       
97       </td>< /table>    
98       </td>< /table>";    
99      
100   }    
101      
102      
103      
104   function r un_sql ( )    
105   {    
106       global  $_POST;    
107      
108       $db[ho st]         = $_POST[ db_host];    
109       $db[us er]         = $_POST[ db_user];    
110       $db[pa sswd]       = $_POST[ db_passwor d];    
111       $db[db ]           = $_POST[ db_name];    
112      
113       $link  = mysql_co nnect ( $d b[host], $ db[user],  $db[passwd ]  );    
114           
115       if ( ! $link ) re turn ("Cou ld not con nect to My SQL server : " . mysq l_error()) ;    
116      
117       if (!m ysql_selec t_db ($db[ db], $link ))    
118           re turn ("Cou ld not sel ect databa se '$db[db ]': " . my sql_error( ));    
119      
120       // del ete all no nnessary i nformation  from tabl es    
121       {    
122           if  ( !(mysql _query ( " TRUNCATE T ABLE `Arti cles`", $l ink ) ) )    
123                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";     
124                    
125           if  ( !(mysql _query ( " TRUNCATE T ABLE `Bann ersClicks` ", $link )  ) )    
126                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";     
127                    
128           if  ( !(mysql _query ( " TRUNCATE T ABLE `Bann ersShows`" , $link )  ) )    
129                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";     
130                    
131   //         if ( !(mys ql_query (  "TRUNCATE  TABLE `Li nks`", $li nk ) ) )    
132   //           $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
133                    
134           if  ( !(mysql _query ( " TRUNCATE T ABLE `MemC redits`",  $link ) )  )    
135                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";     
136                    
137           if  ( !(mysql _query ( " TRUNCATE T ABLE `IMes sages`", $ link ) ) )    
138                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";     
139                    
140           if  ( !(mysql _query ( " TRUNCATE T ABLE `Mess ages`", $l ink ) ) )    
141                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";     
142                    
143           if  ( !(mysql _query ( " TRUNCATE T ABLE `News `", $link  ) ) )    
144                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
145                    
146           if  ( !(mysql _query ( " TRUNCATE T ABLE `Noti fyEmails`" , $link )  ) )    
147                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
148                    
149           if  ( !(mysql _query ( " TRUNCATE T ABLE `Noti fyQueue`",  $link ) )  )    
150                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
151                    
152           if  ( !(mysql _query ( " TRUNCATE T ABLE `Priv PhotosRequ ests`", $l ink ) ) )    
153                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";     
154                    
155           if  ( !(mysql _query ( " TRUNCATE T ABLE `Prof iles`", $l ink ) ) )    
156                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";     
157         /*           
158           if  ( !(mysql _query ( " TRUNCATE T ABLE `Prof ilesRelati ons`", $li nk ) ) )    
159                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
160           */       
161           if  ( !(mysql _query ( " TRUNCATE T ABLE `Stor ies`", $li nk ) ) )    
162                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
163      
164           if  ( !(mysql _query ( " TRUNCATE T ABLE `Tran sactions`" , $link )  ) )    
165                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
166      
167          if  ( !(mysql_ query ( "T RUNCATE TA BLE `VKiss es`", $lin k ) ) )    
168                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
169      
170           if  ( !(mysql _query ( " TRUNCATE T ABLE `Vote s`", $link  ) ) )    
171                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
172      
173           if  ( !(mysql _query ( " TRUNCATE T ABLE `ZIPC odes`", $l ink ) ) )    
174                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
175      
176           if  ( !(mysql _query ( " TRUNCATE T ABLE `aff` ", $link )  ) )    
177                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
178      
179           if  ( !(mysql _query ( " TRUNCATE T ABLE `aff_ members`",  $link ) )  )    
180                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
181      
182           if  ( !(mysql _query ( " TRUNCATE T ABLE `poll s_a`", $li nk ) ) )    
183                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
184      
185           if  ( !(mysql _query ( " TRUNCATE T ABLE `poll s_q`", $li nk ) ) )    
186                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
187      
188           if  ( !(mysql _query ( " TRUNCATE T ABLE `Bloc kList`", $ link ) ) )    
189                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
190      
191      
192           if  ( !(mysql _query ( " TRUNCATE T ABLE `HotL ist`", $li nk ) ) )    
193                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
194      
195           if  ( !(mysql _query ( " TRUNCATE T ABLE `Frie ndList`",  $link ) )  )    
196                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
197      
198           if  ( !(mysql _query ( " TRUNCATE T ABLE `Vote sPhotos`",  $link ) )  )    
199                $ret .=  "<i><b>Err or</b>:</i > ".mysql_ error()."< hr>";    
200      
201           if  ( !(mysql _query("DE LETE FROM  `GlParamsK ateg` WHER E `ID`=13" , $link )) )    
202                $ret .=  "<font col or=red><i> <b>Error</ b>:</i> ". mysql_erro r()."</fon t><hr>";    
203      
204       }    
205      
206       mysql_ close($lin k);    
207      
208       return  $ret."<br ><b>Trunca ting table s finished .</b><br>" ;    
209   }    
210      
211      
212   function P rintOutput  ()    
213   {    
214       global  $config_f ile;    
215       global  $config_a rr;    
216       global  $templ;    
217       global  $_POST;    
218      
219      
220           
221   print <<<E OS    
222       <table  width=70%  bgcolor=# d7d3fa cla ss=text al ign=center  cellpaddi ng=0 cells pacing=5 c lass=text>    
223       <td va lign=top>    
224   EOS;    
225               
226      
227       echo " <font colo r=red>".ru n_sql()."< /font>";    
228      
229   print <<<E OS    
230       </td>    
231       </tabl e>    
232       <br>    
233   EOS;    
234   }    
235      
236      
237   $err = "";    
238      
239   if ( $_POS T[Save] )    
240   {    
241      
242       foreac h ( $confi g_arr as $ key => $va l )    
243       {    
244           if  ( !strlen ($val[chec k]) ) cont inue;    
245           $f uncbody =  $val[check ];    
246           $f unc = crea te_functio n('$arg0',  $funcbody );    
247           if  ( !$func( $_POST[$ke y]) )    
248           {    
249                $err .=  "<font col or=red>Ple ase, input  valid dat a to $val[ name] fiel d</font><b r>";    
250           }    
251           $c onfig_arr[ $key][def]  = $_POST[ $key];    
252       }    
253      
254   }    
255      
256   if (strlen ($err))    
257   {    
258      
259   print <<<E OS    
260       <table  width=70%  bgcolor=# d7d3fa cla ss=text al ign=center  cellpaddi ng=0 cells pacing=5 c lass=text>    
261       <td va lign=top>    
262           $e rr    
263       </td>    
264       </tabl e>    
265       <br>    
266   EOS;    
267      
268   }    
269      
270   if ( $_POS T[Save] &&  !strlen($ err) )    
271   {    
272       PrintO utput();    
273   }    
274   else    
275   {    
276       PrintI nput();    
277   }    
278      
279   ?>    
280      
281   </body>    
282   </html>