46. File Comparison Report

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

46.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\admin lang_file.php Thu Sep 20 08:58:42 2007 UTC
2 Dolphin-v.6.1.0\admin lang_file.php Sat Apr 26 08:19:16 2008 UTC

46.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 150 2310
Changed 93 440
Inserted 13 25
Removed 44 71

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

46.4 Active regular expressions

No regular expressions were active.

46.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     21  
22   require_on ce( '../in c/header.i nc.php' );   22   require_on ce( '../in c/header.i nc.php' );
23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd esign.inc. php' );   23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd esign.inc. php' );
24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin_desig n.inc.php'  );   24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin_desig n.inc.php'  );
25   require_on ce( BX_DIR ECTORY_PAT H_INC . 'l anguages.i nc.php' );   25   require_on ce( BX_DIR ECTORY_PAT H_INC . 'l anguages.i nc.php' );
26   require_on ce( BX_DIR ECTORY_PAT H_INC . 'u tils.inc.p hp' );   26   require_on ce( BX_DIR ECTORY_PAT H_INC . 'u tils.inc.p hp' );
27     27  
28   // DECLARA TIONS   28   // DECLARA TIONS
29     29  
30   define('SE ARCH_COMBI NE_WORDS_A S_AND',            0) ;   30   define('SE ARCH_COMBI NE_WORDS_A S_AND',            0) ;
31   define('SE ARCH_COMBI NE_WORDS_A S_OR',             1) ;   31   define('SE ARCH_COMBI NE_WORDS_A S_OR',             1) ;
32   define('SE ARCH_COMBI NE_WORDS_A S_EXACT',          2) ;   32   define('SE ARCH_COMBI NE_WORDS_A S_EXACT',          2) ;
33     33  
34   // find    
35   // words    
36   // setting s    
37   // keys    
38   // strings    
39   // params    
40   // sCats    
41   // sLangs    
42      
43   function m essageTemp late($mess age)   34   function m essageTemp late($mess age)
44   {   35   {
45       ob_sta rt();   36       ob_sta rt();
    37       
46   ?>   38       ?>
47   <div style ="text-ali gn:center; font-famil y:Arial;fo nt-size:12 px;height: 100%;width :100%;marg in:0px;pad ding:0px;m argin-top: 40%;">   39       <div s tyle="text -align:cen ter;font-f amily:Aria l;font-siz e:12px;hei ght:100%;w idth:100%; margin:0px ;padding:0 px;margin- top:40%;">
48       <?= $m essage ?>   40           <? = $message  ?>
49   </div>   41       </div>
50   <?   42       <?
51       $conte nts = ob_g et_clean() ;    
52     43  
53        return   $c o n t
e
n ts ;
  44        return  
o b_ge t _cl e a n () ;
54   }   45   }
55     46  
56   /**   47   /**
57    * Validat es an arra y, moving  all intege r values t o keys.   48    * Validat es an arra y, moving  all intege r values t o keys.
58    *   49    *
59    * @param  array $arr ay   50    * @param  array $arr ay
60    * @return   array( 0  => true)  if the ori ginal arra y containe d non-inte gers   51    * @return   array( 0  => true)  if the ori ginal arra y containe d non-inte gers
61    *           array( i nt_key =>  true) if t he origina l array wa s OK   52    *           array( i nt_key =>  true) if t he origina l array wa s OK
62    */   53    */
63   function v alidateLis tArray($ar ray)   54   function v alidateLis tArray($ar ray)
64   {   55   {
65        if(is_arra y($array))
  56        if(is_arra y($array))   {
66       {    
67           $t mp = array ();   57           $t mp = array ();
68            foreach   ($array   as   $value)
  58            foreach   ($array   as   $value)   {
69           {    
70                $iVal =  (int)$valu e;   59                $iVal =  (int)$valu e;
71                if($iVal  != $value ) return a rray(0 =>  true);   60                if($iVal  != $value ) return a rray(0 =>  true);
72                $tmp[$iV al] = true ;   61                $tmp[$iV al] = true ;
73           }   62           }
74           $a rray = $tm p;   63           $a rray = $tm p;
75       }   64       }
76     65  
77       return  count($ar ray) <= 0  || isset($ array[0])  ? array(0  => true) :  $array;   66       return  count($ar ray) <= 0  || isset($ array[0])  ? array(0  => true) :  $array;
78   }   67   }
79     68  
80   function f indLangStr ings(   69   function f indLangStr ings(
81       $searc hText,   70       $searc hText,
82       $group Words = SE ARCH_COMBI NE_WORDS_A S_EXACT,   71       $group Words = SE ARCH_COMBI NE_WORDS_A S_EXACT,
83       $searc hInKeys =  true,   72       $searc hInKeys =  true,
84       $searc hInStrings  = true,   73       $searc hInStrings  = true,
85       $searc hInParams  = true,   74       $searc hInParams  = true,
86       $arrCa tegoryIDs  = null,   75       $arrCa tegoryIDs  = null,
87       $arrLa nguageIDs  = null   76       $arrLa nguageIDs  = null
88        )
  77        )   {
89   {   78  
    
90        function   sqlLikeCla use($field Name,   $arrWords,   $groupWord s)
  79        function   sqlLikeCla use($field Name,   $arrWords,   $groupWord s)   {
91       {    
92           if  (!is_arra y($arrWord s) || strl en($fieldN ame) <= 0)  return '' ;   80           if  (!is_arra y($arrWord s) || strl en($fieldN ame) <= 0)  return '' ;
93     81  
94            switch   ($groupWor ds)
  82            switch   ($groupWor ds)   {
95           {    
96                case SEA RCH_COMBIN E_WORDS_AS _AND: $sql  = implode ("%' AND $ fieldName  LIKE '%",  $arrWords) ;   83                case SEA RCH_COMBIN E_WORDS_AS _AND: $sql  = implode ("%' AND $ fieldName  LIKE '%",  $arrWords) ;
97                    brea k;   84                    brea k;
98                case SEA RCH_COMBIN E_WORDS_AS _OR: $sql  = implode( "%' OR $fi eldName LI KE '%", $a rrWords);   85                case SEA RCH_COMBIN E_WORDS_AS _OR: $sql  = implode( "%' OR $fi eldName LI KE '%", $a rrWords);
99                    brea k;   86                    brea k;
100                default:  $sql = im plode(' ',  $arrWords );   87                default:  $sql = im plode(' ',  $arrWords );
101           }   88           }
102     89  
103           $s ql = "($fi eldName LI KE '%$sql% ')";   90           $s ql = "($fi eldName LI KE '%$sql% ')";
104     91  
105           re turn $sql;   92           re turn $sql;
106       }   93       }
107     94  
108        function   sqlInClaus e($fieldNa me,   $arrIDs)
  95        function   sqlInClaus e($fieldNa me,   $arrIDs)   {
109       {    
110           $s ql = '';   96           $s ql = '';
111     97  
112           $s qlValid =  false;   98           $s qlValid =  false;
113     99  
114           if (is_array( $arrIDs))   100           if (is_array( $arrIDs))
115           {   101           {
116                $sql = " ($fieldNam e IN(";   102                $sql = " ($fieldNam e IN(";
117     103  
118                foreach  ($arrIDs a s $ID => $ val)   104                foreach  ($arrIDs a s $ID => $ val)
119                {   105                {
120                    $ID  = (int)$ID ;   106                    $ID  = (int)$ID ;
121     107  
122                    if($ ID <= 0) c ontinue;   108                    if($ ID <= 0) c ontinue;
123     109  
124                    $sql Valid = tr ue;   110                    $sql Valid = tr ue;
125     111  
126                    $sql  .= $ID.', ';   112                    $sql  .= $ID.', ';
127                }   113                }
128                $sql = t rim($sql,' ,');   114                $sql = t rim($sql,' ,');
129                $sql .=  '))';   115                $sql .=  '))';
130           }   116           }
131     117  
132           re turn $sqlV alid ? $sq l : '';   118           re turn $sqlV alid ? $sq l : '';
133       }   119       }
134     120  
135        function   implodeNon Empty($str Glue,   $arr)
  121        function   implodeNon Empty($str Glue,   $arr)   {
136       {    
137           fo reach ($ar r as $key  => $val)   122           fo reach ($ar r as $key  => $val)
138           {    
139                if (strl en($val) < = 0) unset ($arr[$key ]);   123                if (strl en($val) < = 0) unset ($arr[$key ]);
140           }    
141     124  
142           re turn implo de($strGlu e, $arr);   125           re turn implo de($strGlu e, $arr);
143       }   126       }
144     127  
145        if   (   strlen($se archText)   >   0   )
  128        if   (   strlen($se archText)   >   0   )   {
146       {    
147           $s earchText  = addslash es($search Text);   129           $s earchText  = addslash es($search Text);
148     130  
149           $l ikeWildcar ds = array  ('%', '_' );   131           $l ikeWildcar ds = array  ('%', '_' );
150           $l ikeWildcar dsEscaped  = array('\ %', '\_');   132           $l ikeWildcar dsEscaped  = array('\ %', '\_');
151     133  
152           $s earchText  = str_repl ace($likeW ildcards,  $likeWildc ardsEscape d, $search Text);   134           $s earchText  = str_repl ace($likeW ildcards,  $likeWildc ardsEscape d, $search Text);
153     135  
154           $a rrWords =  preg_split ("/\s+/",  $searchTex t, -1, PRE G_SPLIT_NO _EMPTY);   136           $a rrWords =  preg_split ("/\s+/",  $searchTex t, -1, PRE G_SPLIT_NO _EMPTY);
155              137           
156           fo reach( $ar rWords as  $key => $v al )   138           fo reach( $ar rWords as  $key => $v al )
157                $arrWord s[$key] =  strtoupper ( $val );   139                $arrWord s[$key] =  strtoupper ( $val );
158              140           
159           $s qlSearchIn Keys = $se archInKeys  ? sqlLike Clause('UP PER(`Local izationKey s`.`Key`)' , $arrWord s, $groupW ords) : '' ;   141           $s qlSearchIn Keys = $se archInKeys  ? sqlLike Clause('UP PER(`Local izationKey s`.`Key`)' , $arrWord s, $groupW ords) : '' ;
160           $s qlSearchIn Strings =  $searchInS trings ? s qlLikeClau se('UPPER( `Localizat ionStrings `.`String` )', $arrWo rds, $grou pWords) :  '';   142           $s qlSearchIn Strings =  $searchInS trings ? s qlLikeClau se('UPPER( `Localizat ionStrings `.`String` )', $arrWo rds, $grou pWords) :  '';
161           $s qlSearchIn Params = $ searchInPa rams ? sql LikeClause ('UPPER(`L ocalizatio nStringPar ams`.`Desc ription`)' , $arrWord s, $groupW ords) : '' ;   143           $s qlSearchIn Params = $ searchInPa rams ? sql LikeClause ('UPPER(`L ocalizatio nStringPar ams`.`Desc ription`)' , $arrWord s, $groupW ords) : '' ;
162     144  
163           $s qlSearchCl ause = imp lodeNonEmp ty(' OR ',  array($sq lSearchInK eys, $sqlS earchInStr ings, $sql SearchInPa rams));   145           $s qlSearchCl ause = imp lodeNonEmp ty(' OR ',  array($sq lSearchInK eys, $sqlS earchInStr ings, $sql SearchInPa rams));
164     146  
165           $s qlSearchCl ause = "($ sqlSearchC lause)";   147           $s qlSearchCl ause = "($ sqlSearchC lause)";
166       }
  148       }  else
167       else    
168       {    
169           $s qlSearchCl ause = '';   149           $s qlSearchCl ause = '';
170       }    
171     150  
172       $sqlSe archInCate gories = s qlInClause ('`Localiz ationCateg ories`.`ID `', $arrCa tegoryIDs) ;   151       $sqlSe archInCate gories = s qlInClause ('`Localiz ationCateg ories`.`ID `', $arrCa tegoryIDs) ;
173       $sqlSe archInLang uages = sq lInClause( '`Localiza tionLangua ges`.`ID`' , $arrLang uageIDs);   152       $sqlSe archInLang uages = sq lInClause( '`Localiza tionLangua ges`.`ID`' , $arrLang uageIDs);
174     153  
175       $sqlWh ereClause  = implodeN onEmpty('  AND ', arr ay($sqlSea rchClause,  $sqlSearc hInCategor ies, $sqlS earchInLan guages));   154       $sqlWh ereClause  = implodeN onEmpty('  AND ', arr ay($sqlSea rchClause,  $sqlSearc hInCategor ies, $sqlS earchInLan guages));
176     155  
177        if   (      strlen($sq lWhereClau se)   >   0   )   156        if   (   strlen($sq lWhereClau se)  
)
178       {    
179           $s qlWhereCla use = " WH ERE $sqlWh ereClause  ";   157           $s qlWhereCla use = "WHE RE $sqlWhe reClause " ;
180       }    
181       else   158       else
182       {    
183           $s qlWhereCla use = '';   159           $s qlWhereCla use = '';
184       }    
185     160  
186       $sql =  "   161       $sql =  "
187           SE LECT  DIST INCT   162           SE LECT  DIST INCT
188                    `Loc alizationS trings`.`I DKey`        AS `IDKe y`,   163                    `Loc alizationS trings`.`I DKey`        AS `IDKe y`,
189                    `Loc alizationS trings`.`I DLanguage`   AS `IDLa nguage`,   164                    `Loc alizationS trings`.`I DLanguage`   AS `IDLa nguage`,
190                    `Loc alizationK eys`.`Key`              AS `Key` ,   165                    `Loc alizationK eys`.`Key`              AS `Key` ,
191                    `Loc alizationS trings`.`S tring`       AS `Stri ng`,   166                    `Loc alizationS trings`.`S tring`       AS `Stri ng`,
192                     `Localizat ionLanguag es`.` Nam e`        AS   `Language` ,   167                     `Localizat ionLanguag es`.` Titl e`       AS   `Language` ,
193                    `Loc alizationC ategories` .`Name`      AS `Cate gory`   168                    `Loc alizationC ategories` .`Name`      AS `Cate gory`
194      
195           FR OM    `Loc alizationS tringParam s`   169           FR OM `Locali zationStri ngParams`
196                     RIGHT   JOIN   `Localizat ionKeys`
  170            RIGHT   JOIN   `Localizat ionKeys`   ON
197                         ON   (`Localiza tionString Params`.`I DKey`   =   `Localizat ionKeys`.` ID`)   171                
(`Localiza tionString Params`.`I DKey`   =   `Localizat ionKeys`.` ID`)
198     172            LEFT   JOIN   `Localizat ionStrings `   ON
199                     LEFT   JOIN   `Localizat ionStrings `
  173                
(`Localiza tionString s`.`IDKey`   =   `Localizat ionKeys`.` ID`)
200                         ON   (`Localiza tionString s`.`IDKey`   =   `Localizat ionKeys`.` ID`)   174            LEFT   JOIN   `Localizat ionCategor ies`   ON
201     175                
(`Localiza tionKeys`. `IDCategor y`   =   `Localizat ionCategor ies`.`ID`)
202                     LEFT   JOIN   `Localizat ionCategor ies`
  176            LEFT   JOIN   `Localizat ionLanguag es`   ON
203                         ON   (`Localiza tionKeys`. `IDCategor y`   =   `Localizat ionCategor ies`.`ID`)   177                
(`Localiza tionString s`.`IDLang uage`   =   `Localizat ionLanguag es`.`ID`)
204      
205                     LEFT   JOIN   `Localizat ionLanguag es`
   
206                         ON   (`Localiza tionString s`.`IDLang uage`   =   `Localizat ionLanguag es`.`ID`)    
207      
208           $s qlWhereCla use   178           $s qlWhereCla use
    179           OR DER BY
    180                `Languag e`, `Categ ory`, `Key `";
209     181       
210           OR DER BY `La nguage`, ` Category`,  `Key`";   182        $resSearch Result   =   db _
r es ($sql);
211      
212        $resSearch Result   =   mysql _ que r y ($sql);    
213     183  
214       return  $resSearc hResult;   184       return  $resSearc hResult;
215   }   185   }
216     186  
217   function   searchBloc k()
  187   function   searchBloc k()   {
218   {    
219       global   $searchS tring,   188       global   $searchS tring,
220                $searchC ombineWord sAs,   189                $searchC ombineWord sAs,
221                $searchS howAdvance dSettings,   190                $searchS howAdvance dSettings,
222                $searchI nKeys,   191                $searchI nKeys,
223                $searchI nStrings,   192                $searchI nStrings,
224                $searchI nParams,   193                $searchI nParams,
225                $searchC ategories,   194                $searchC ategories,
226                $searchL anguages;   195                $searchL anguages;
227     196  
228       ob_sta rt();   197       ob_sta rt();
229   ?>   198   ?>
230     199  
231   <style typ e="text/cs s">   200   <style typ e="text/cs s">
232     201  
233   input.inpu t_chbox   202   input.inpu t_chbox
234   {   203   {
235       vertic al-align:  middle;   204       vertic al-align:  middle;
236   }   205   }
237     206  
238   input.inpu t_radio   207   input.inpu t_radio
239   {   208   {
240       vertic al-align:  middle;   209       vertic al-align:  middle;
241   }   210   }
242     211  
243   div.Advanc edSearchBo dy   212   div.Advanc edSearchBo dy
244   {   213   {
245   }   214   }
246     215  
247   </style>   216   </style>
248     217  
249   <script ty pe="text/j avascript" >   218   <script ty pe="text/j avascript" >
250     219  
251   function s howHideExt ended(strD ivID, strL abelID, st rShowText,  strHideTe xt)   220   function s howHideExt ended(strD ivID, strL abelID, st rShowText,  strHideTe xt)
252   {   221   {
253       div =  document.g etElementB yId(strDiv ID);   222       div =  document.g etElementB yId(strDiv ID);
254       label  = document .getElemen tById(strL abelID);   223       label  = document .getElemen tById(strL abelID);
255       input  = document .getElemen tById('Sho wAdvancedS earchSetti ngsInput') ;   224       input  = document .getElemen tById('Sho wAdvancedS earchSetti ngsInput') ;
256     225  
257       if(div .style.dis play == '' )   226       if(div .style.dis play == '' )
258           di v.style.di splay = 'n one';   227           di v.style.di splay = 'n one';
259     228  
260       if(div .style.dis play == 'n one'){   229       if(div .style.dis play == 'n one'){
261           di v.style.di splay = 'b lock';   230           di v.style.di splay = 'b lock';
262           in put.value  = 'yes';   231           in put.value  = 'yes';
263           la bel.innerH TML = strH ideText;   232           la bel.innerH TML = strH ideText;
264       }else{   233       }else{
265           di v.style.di splay = 'n one';   234           di v.style.di splay = 'n one';
266           in put.value  = 'no';   235           in put.value  = 'no';
267           la bel.innerH TML = strS howText;   236           la bel.innerH TML = strS howText;
268       }   237       }
269   }   238   }
270     239  
271   </script>   240   </script>
272     241  
273   <form acti on="<?= $_ SERVER['SC RIPT_NAME' ] ?>" meth od="get" s tyle="marg in: 0px">   242   <form acti on="<?= $_ SERVER['SC RIPT_NAME' ] ?>" meth od="get" s tyle="marg in: 0px">
274     243  
275   <table wid th="100%"  border="0"  style="ma rgin: 0px" >   244   <table wid th="100%"  border="0"  style="ma rgin: 0px" >
276       <tr>   245       <tr>
277           <t d>   246           <t d>
278                Look for :   247                Look for :
279                <input   248                <input
280                    type ="text"   249                    type ="text"
281                    name ="find"   250                    name ="find"
282                    valu e="<?= $se archString  ?>"   251                    valu e="<?= $se archString  ?>"
283                    styl e="width:  150px"   252                    styl e="width:  150px"
284                />   253                />
285                <input   254                <input
286                    type ="radio"   255                    type ="radio"
287                    name ="words"   256                    name ="words"
288                    valu e="<?= SEA RCH_COMBIN E_WORDS_AS _AND ?>"   257                    valu e="<?= SEA RCH_COMBIN E_WORDS_AS _AND ?>"
289                    id=" RadioCombi neWordsAs_ AND"   258                    id=" RadioCombi neWordsAs_ AND"
290                    clas s="input_r adio"   259                    clas s="input_r adio"
291                    <?=  $searchCom bineWordsA s == SEARC H_COMBINE_ WORDS_AS_A ND ? 'chec ked' : ''  ?>   260                    <?=  $searchCom bineWordsA s == SEARC H_COMBINE_ WORDS_AS_A ND ? 'chec ked' : ''  ?>
292                /><label  for="Radi oCombineWo rdsAs_AND" >and</labe l>   261                /><label  for="Radi oCombineWo rdsAs_AND" >and</labe l>
293                <input   262                <input
294                    type ="radio"   263                    type ="radio"
295                    name ="words"   264                    name ="words"
296                    valu e="<?= SEA RCH_COMBIN E_WORDS_AS _OR ?>"   265                    valu e="<?= SEA RCH_COMBIN E_WORDS_AS _OR ?>"
297                    id=" RadioCombi neWordsAs_ OR"   266                    id=" RadioCombi neWordsAs_ OR"
298                    clas s="input_r adio"   267                    clas s="input_r adio"
299                    <?=  $searchCom bineWordsA s == SEARC H_COMBINE_ WORDS_AS_O R ? 'check ed' : '' ? >   268                    <?=  $searchCom bineWordsA s == SEARC H_COMBINE_ WORDS_AS_O R ? 'check ed' : '' ? >
300                /><label  for="Radi oCombineWo rdsAs_OR"> or</label>   269                /><label  for="Radi oCombineWo rdsAs_OR"> or</label>
301                <input   270                <input
302                    type ="radio"   271                    type ="radio"
303                    name ="words"   272                    name ="words"
304                    valu e="<?= SEA RCH_COMBIN E_WORDS_AS _EXACT ?>"   273                    valu e="<?= SEA RCH_COMBIN E_WORDS_AS _EXACT ?>"
305                    id=" RadioCombi neWordsAs_ EXACT"   274                    id=" RadioCombi neWordsAs_ EXACT"
306                    clas s="input_r adio"   275                    clas s="input_r adio"
307                    <?=  $searchCom bineWordsA s == SEARC H_COMBINE_ WORDS_AS_E XACT ? 'ch ecked' : ' ' ?>   276                    <?=  $searchCom bineWordsA s == SEARC H_COMBINE_ WORDS_AS_E XACT ? 'ch ecked' : ' ' ?>
308                /><label  for="Radi oCombineWo rdsAs_EXAC T">exact s equence</l abel>   277                /><label  for="Radi oCombineWo rdsAs_EXAC T">exact s equence</l abel>
309           </ td>   278           </ td>
310           <t d>   279           <t d>
311                <input t ype="submi t" value=" Search" st yle="width : 70px; he ight: 25px " />   280                <input t ype="submi t" value=" Search" st yle="width : 70px; he ight: 25px " />
312           </ td>   281           </ td>
313           <t d align="r ight" widt h="90">   282           <t d align="r ight" widt h="90">
314                <a   283                <a
315                    href ="javascri pt:void(0) "   284                    href ="javascri pt:void(0) "
316                    oncl ick="   285                    oncl ick="
317                         showHideEx tended(   286                         showHideEx tended(
318                             'Advan cedSearchS ettings',   287                             'Advan cedSearchS ettings',
319                             'ShowH ideAdvSear chSettings ',   288                             'ShowH ideAdvSear chSettings ',
320                             'more  settings',   289                             'more  settings',
321                             'less  settings') ;   290                             'less  settings') ;
322                         return fal se;"   291                         return fal se;"
323                    id=" ShowHideAd vSearchSet tings"   292                    id=" ShowHideAd vSearchSet tings"
324                >   293                >
325                    <?=  $searchSho wAdvancedS ettings ?  'less sett ings' : 'm ore settin gs' ?>   294                    <?=  $searchSho wAdvancedS ettings ?  'less sett ings' : 'm ore settin gs' ?>
326                </a>   295                </a>
327                <input   296                <input
328                    type ="hidden"   297                    type ="hidden"
329                    name ="settings "   298                    name ="settings "
330                    valu e="<?= $se archShowAd vancedSett ings ? 'ye s' : 'no'  ?>"   299                    valu e="<?= $se archShowAd vancedSett ings ? 'ye s' : 'no'  ?>"
331                    id=" ShowAdvanc edSearchSe ttingsInpu t"   300                    id=" ShowAdvanc edSearchSe ttingsInpu t"
332                />   301                />
333           </ td>   302           </ td>
334       </tr>   303       </tr>
335   </table>   304   </table>
336     305  
337   <div   306   <div
338       id="Ad vancedSear chSettings "   307       id="Ad vancedSear chSettings "
339       class= "AdvancedS earchBody"   308       class= "AdvancedS earchBody"
340       style= "display:  <?= $searc hShowAdvan cedSetting s ? 'block ' : 'none'  ?>;"   309       style= "display:  <?= $searc hShowAdvan cedSetting s ? 'block ' : 'none'  ?>;"
341   >   310   >
342   <table sty le="width:  100%" bor der="0" cl ass="Searc hFormTable ">   311   <table sty le="width:  100%" bor der="0" cl ass="Searc hFormTable ">
343       <tr>   312       <tr>
344           <t d colspan= "2" valign ="top">   313           <t d colspan= "2" valign ="top">
345                <table b order="0"  width="100 %">   314                <table b order="0"  width="100 %">
346                    <tr>   315                    <tr>
347                         <td valign ="top" col span="2" s tyle="heig ht: 20px">   316                         <td valign ="top" col span="2" s tyle="heig ht: 20px">
348                             Search  in:   317                             Search  in:
349                         </td>   318                         </td>
350                    </tr >   319                    </tr >
351                    <tr>   320                    <tr>
352                         <td width= "10"></td>   321                         <td width= "10"></td>
353                         <td valign ="top">   322                         <td valign ="top">
354                             <input   323                             <input
355                                 ty pe="checkb ox"   324                                 ty pe="checkb ox"
356                                 na me="keys"   325                                 na me="keys"
357                                 va lue="yes"   326                                 va lue="yes"
358                                 id ="ChboxSea rchInKeys"   327                                 id ="ChboxSea rchInKeys"
359                                 cl ass="input _chbox"   328                                 cl ass="input _chbox"
360                                 <? = $searchI nKeys ? 'c hecked' :  '' ?>   329                                 <? = $searchI nKeys ? 'c hecked' :  '' ?>
361                             />   330                             />
362                             <label  for="Chbo xSearchInK eys">key s trings (ca se-sensiti ve)</label >   331                             <label  for="Chbo xSearchInK eys">key s trings (ca se-sensiti ve)</label >
363                             <br />   332                             <br />
364                             <input   333                             <input
365                                 ty pe="checkb ox"   334                                 ty pe="checkb ox"
366                                 na me="string s"   335                                 na me="string s"
367                                 va lue="yes"   336                                 va lue="yes"
368                                 id ="ChboxSea rchInStrin gs"   337                                 id ="ChboxSea rchInStrin gs"
369                                 cl ass="input _chbox"   338                                 cl ass="input _chbox"
370                                 <? = $searchI nStrings ?  'checked'  : '' ?>   339                                 <? = $searchI nStrings ?  'checked'  : '' ?>
371                             />   340                             />
372                             <label  for="Chbo xSearchInS trings">la nguage-spe cific stri ngs</label >   341                             <label  for="Chbo xSearchInS trings">la nguage-spe cific stri ngs</label >
373                             <br />   342                             <br />
374                             <input   343                             <input
375                                 ty pe="checkb ox"   344                                 ty pe="checkb ox"
376                                 na me="params "   345                                 na me="params "
377                                 va lue="yes"   346                                 va lue="yes"
378                                 id ="ChboxSea rchInParam s"   347                                 id ="ChboxSea rchInParam s"
379                                 cl ass="input _chbox"   348                                 cl ass="input _chbox"
380                                 <? = $searchI nParams ?  'checked'  : '' ?>   349                                 <? = $searchI nParams ?  'checked'  : '' ?>
381                             />   350                             />
382                             <label  for="Chbo xSearchInP arams">par ameter des criptions< /label><br  />   351                             <label  for="Chbo xSearchInP arams">par ameter des criptions< /label><br  />
383                         </td>   352                         </td>
384                    </tr >   353                    </tr >
385                </table>   354                </table>
386           </ td>   355           </ td>
387           <t d colspan= "2" align= "center">   356           <t d colspan= "2" align= "center">
388                <table b order="0"  style="wid th: 100%">   357                <table b order="0"  style="wid th: 100%">
389                    <tr>   358                    <tr>
390                         <td align= "center">   359                         <td align= "center">
391                             Show s trings fro m categori es:   360                             Show s trings fro m categori es:
392                             <br />   361                             <br />
393                             <selec t name="sC ats[]" mul tiple styl e="height:  90px; wid th: 170px" >   362                             <selec t name="sC ats[]" mul tiple styl e="height:  90px; wid th: 170px" >
394   <?   363   <?
395       $arrCa ts = getLo calization Categories ();   364       $arrCa ts = getLo calization Categories ();
396       $arrCa tegories[0 ] = '---Al l Categori es---';   365       $arrCa tegories[0 ] = '---Al l Categori es---';
397       foreac h($arrCats  as $key = > $val)   366       foreac h($arrCats  as $key = > $val)
398       {   367       {
399           $a rrCategori es[$key] =  $val;   368           $a rrCategori es[$key] =  $val;
400       }   369       }
401     370  
402       foreac h ($arrCat egories as  $category ID => $cat egoryName)   371       foreac h ($arrCat egories as  $category ID => $cat egoryName)
403       {   372       {
404   ?>   373   ?>
405                                 <o ption valu e="<?= $ca tegoryID ? >" <?= iss et($search Categories [$category ID]) ? 'se lected' :  '' ?> ><?=  $category Name ?></o ption>   374                                 <o ption valu e="<?= $ca tegoryID ? >" <?= iss et($search Categories [$category ID]) ? 'se lected' :  '' ?> ><?=  $category Name ?></o ption>
406   <?   375   <?
407       }   376       }
408   ?>   377   ?>
409                             </sele ct>   378                             </sele ct>
410                         </td>   379                         </td>
411                         <td align= "center">   380                         <td align= "center">
412                             Show s trings fro m language s:   381                             Show s trings fro m language s:
413                             <br />   382                             <br />
414                             <selec t name="sL angs[]" mu ltiple sty le="height : 90px;  w idth: 170p x">   383                             <selec t name="sL angs[]" mu ltiple sty le="height : 90px;  w idth: 170p x">
415   <?   384   <?
416        $arrLangs   =   getL ocaliz a tio n Langua g e s
();
  385        $arrLangs   =   getL
a
n
g
s Arr ();
417       $arrLa nguages[0]  = '---All  Languages ---';   386       $arrLa nguages[0]  = '---All  Languages ---';
418     387  
419       foreac h($arrLang s as $key  => $val)   388       foreac h($arrLang s as $key  => $val)
420       {   389       {
421            $arrLangua ges[$ key ]   =   $val;   390           $i d = (int)d b_value( " SELECT `ID ` FROM `Lo calization Languages`  WHERE `Na me` = '$ke y'" );
    391            $arrLangua ges[$ id ]   =   $val;
422       }   392       }
423     393  
424       foreac h ($arrLan guages as  $langID =>  $langName )   394       foreac h ($arrLan guages as  $langID =>  $langName )
425       {   395       {
426   ?>   396   ?>
427                                 <o ption valu e="<?= $la ngID ?>" < ?= isset($ searchLang uages[$lan gID]) ? 's elected' :  '' ?> ><? = $langNam e ?></opti on>   397                                 <o ption valu e="<?= $la ngID ?>" < ?= isset($ searchLang uages[$lan gID]) ? 's elected' :  '' ?> ><? = $langNam e ?></opti on>
428   <?   398   <?
429       }   399       }
430   ?>   400   ?>
431                             </sele ct>   401                             </sele ct>
432                         </td>   402                         </td>
433                    </tr >   403                    </tr >
434                </table>   404                </table>
435           </ td>   405           </ td>
436       </tr>   406       </tr>
437   </table>   407   </table>
438   </div>   408   </div>
439   </form>   409   </form>
440   <?   410   <?
441       $conte nt = ob_ge t_contents ();    
442       ob_end _clean();    
443     411  
444        return   panelSecti on("Search   for   strings",   $c o n t
e
n t );
  412        return   panelSecti on("Search   for   strings",  
o b_ge t _cl e a n ()   );
445   }   413   }
446     414  
447   function   addLangKey Form()
  415   function   addLangKey Form()   {
448   {   416  
449       functi on addLang Key()   417       functi on addLang Key()
450       {   418       {
451           $m agic_quote s = get_ma gic_quotes _gpc();   419            $newKeyNam e           =   pr o c es s _
d b_input ($_POST['N ewKeyName' ]);
452            $newKeyNam e   =   $magic_qu o t es   ?   $ _ POST['NewK eyName']   :   a d dslashes ($_POST['N ewKeyName' ]);   420            $newCatego ryName      =   pr o c es s _
d b_input ($_POST['N ewCategory Name']);
453            $newCatego ryName   =   $magic_qu o t es   ?   $ _ POST['NewC ategoryNam e']   :   ad d slashes ($_POST['N ewCategory Name']);    
454           $c ategoryID  = (int)$_P OST['NewKe yCategory' ];   421           $c ategoryID          =  (int)$_POS T['NewKeyC ategory'];
455           $n ewStringPa rams = $_P OST['NewSt ringParame ters'];   422           $n ewStringPa rams    =  $_POST['Ne wStringPar ameters'];
456           $l angStrings  = $_POST[ 'LangStrin gs'];   423           $l angStrings         =  $_POST['La ngStrings' ];
457     424  
458           if  (!is_arra y($langStr ings) || c ount($lang Strings) <  1) return  '<font co lor="red"> Error: wro ng form da ta.</font> ';   425           if  (!is_arra y($langStr ings) || c ount($lang Strings) <  1) return  '<font co lor="red"> Error: wro ng form da ta.</font> ';
459     426  
460           fo reach ($la ngStrings  as $key =>  $value)   427           fo reach ($la ngStrings  as $key =>  $value)
461           {   428                
$langStrin gs[$key]   =   proc es s_db_input ($value);
462                 if   (!$magic_q uotes)   $langStrin gs[$key]   =   addslash es
($value);
   
463           }    
464     429  
465           if  ( strlen( $newKeyNam e) <= 0 )  return '<f ont color= "red">Erro r: Key nam e is not s pecified.< /font>';   430           if  ( strlen( $newKeyNam e) <= 0 )  return '<f ont color= "red">Erro r: Key nam e is not s pecified.< /font>';
466     431  
467           if  ( strlen( $newCatego ryName) >  0 )   432           if  ( strlen( $newCatego ryName) >  0 )
468           {   433           {
469                 mysql _ que r y ("INSERT   INTO   `Localizat ionCategor ies`   (`Name`)   VALUES   ('$newCate goryName') ");   434                 db _
r es ("INSERT   INTO   `Localizat ionCategor ies`   (`Name`)   VALUES   ('$newCate goryName') ");
470                $categor yID = mysq l_insert_i d();   435                $categor yID = mysq l_insert_i d();
471     436  
472                 if   (   $categoryI D   <=   0   )   return   '<font   color="red ">Error:   Could   not   create   a   new   category.< /font>';   437                if ( !$c ategoryID  )
    438                    
return   '<font   color="red ">Error:   Could   not   create   a   new   category.< /font>';
473           }   439           }
474           el se   440           el se
475           {   441           {
476                 $cnt   =   mysql _ que r y ('SELECT   COUNT(*)   FROM   `Localizat ionCategor ies`   WHERE   `ID`='.$ca tegoryID);   442                 $cnt   =   db _
r es ('SELECT   COUNT(*)   FROM   `Localizat ionCategor ies`   WHERE   `ID`='.$ca tegoryID);
477                $cnt = m ysql_fetch _row($cnt) ;   443                $cnt = m ysql_fetch _row($cnt) ;
478     444  
479                if ( $cn t[0] <= 0  ) return ' <font colo r="red">Er ror: Wrong  category  specified. </font>';   445                if ( $cn t[0] <= 0  ) return ' <font colo r="red">Er ror: Wrong  category  specified. </font>';
480           }   446           }
481     447  
482            mysql _ que r y ("INSERT   INTO   `Localizat ionKeys`   (`IDCatego ry`,   `Key`)   VALUES   ($category ID,   '$newKeyNa me')"
);
  448            db _
r es ("INSERT   INTO   `Localizat ionKeys`   (`IDCatego ry`,   `Key`)   VALUES   ($category ID,   '$newKeyNa me')" ,   0 );
483     449  
484           $n ewKeyID =  mysql_inse rt_id();   450           $n ewKeyID =  mysql_inse rt_id();
485     451  
486           if  ( $newKey ID <= 0 )  return '<f ont color= "red">Erro r: Could n ot insert  a new lang uage key.< /font>';   452           if  ( $newKey ID <= 0 )  return '<f ont color= "red">Erro r: Could n ot insert  a new lang uage key.< /font>';
487     453  
488           //  parse str ing params   454           //  parse str ing params
489     455  
490           $a rrParams =  array();   456           $a rrParams =  array();
491     457  
492           pr eg_match_a ll('/([0-9 ]+) - (\S+ [^\\n\\r]* )/', $newS tringParam s, $arrPar ams);   458           pr eg_match_a ll('/([0-9 ]+) - (\S+ [^\\n\\r]* )/', $newS tringParam s, $arrPar ams);
493     459  
494           fo reach ($ar rParams[1]  as $key = > $paramID )   460           fo reach ($ar rParams[1]  as $key = > $paramID )
495           {   461           {
496                $paramID  = (int)$p aramID;   462                $paramID  = (int)$p aramID;
497                $paramDe scription  = $arrPara ms[2][$key ];   463                $paramDe scription  = $arrPara ms[2][$key ];
498     464  
499                 if   (!$magic_q uotes)   $paramDesc ription   =   addslash es
($paramDes cription);
  465                
$paramDesc ription   =   proc es s_db_input ($paramDes cription);
500     466  
501                mysql_qu ery("   467                db_res("
502                    INSE RT INTO `L ocalizatio nStringPar ams`   468                    INSE RT INTO `L ocalizatio nStringPar ams`
503                    (`ID Key`, `IDP aram`, `De scription` )   469                    (`ID Key`, `IDP aram`, `De scription` )
504                    VALU ES ($newKe yID, $para mID, '$par amDescript ion')"   470                    VALU ES ($newKe yID, $para mID, '$par amDescript ion')"
505                );   471                );
506     472  
507                 if   (mysql_aff ected_rows ()   <=   0)   return   '<font   color="red ">Could   not   insert   a   string   parameter. </font>';   473                if( !mys ql_affecte d_rows() )
    474                    
return   '<font   color="red ">Could   not   insert   a   string   parameter. </font>';
508           }   475           }
509     476  
510            foreach   ($langStri ngs   as   $langKey   =>   $langStrin g)
  477            foreach(   $langStrin gs   as   $langKey   =>   $langStrin g   )   {
511           {    
512                //NOTE:  This piece  of code c an potenti ally   478                //NOTE:  This piece  of code c an potenti ally
513                //       insert lan guage stri ngs that d on't belon g   479                //       insert lan guage stri ngs that d on't belon g
514                //       to any lan guage in c ase if a c lient gene rates   480                //       to any lan guage in c ase if a c lient gene rates
515                //       his POST d ata himsel f in an un usual way.   481                //       his POST d ata himsel f in an un usual way.
516                //       As this is sue is not  in fact d angerous f or the scr ipt's   482                //       As this is sue is not  in fact d angerous f or the scr ipt's
517                //       security,  no checks  have been  added to p revent thi s.   483                //       security,  no checks  have been  added to p revent thi s.
518     484  
519                $langKey  = (int)$l angKey;   485                $langKey  = (int)$l angKey;
520     486  
521                mysql_qu ery("   487                db_res("
522                    INSE RT INTO `L ocalizatio nStrings`   488                    INSE RT INTO `L ocalizatio nStrings`
523                    (`ID Key`, `IDL anguage`,  `String`)   489                    (`ID Key`, `IDL anguage`,  `String`)
524                    VALU ES ($newKe yID, $lang Key, '$lan gString')   490                    VALU ES ($newKe yID, $lang Key, '$lan gString')
525                ");   491                ");
526     492  
527                if (mysq l_affected _rows() <=  0) return  '<font co lor="red"> Error: cou ld not add  a languag e string.< /font>';   493                if (mysq l_affected _rows() <=  0) return  '<font co lor="red"> Error: cou ld not add  a languag e string.< /font>';
528           }   494           }
529     495  
530           if  ( $_POST[ 'Recompile LangFiles' ] == 'on'  )   496           if  ( $_POST[ 'Recompile LangFiles' ] == 'on'  )
531           {   497           {
532                if ( !co mpileLangu age() )   498                if ( !co mpileLangu age() )
533                {   499                {
534                    retu rn '<font  color="red ">Error: c ould not r ecompile l anguage fi les.</font >';   500                    retu rn '<font  color="red ">Error: c ould not r ecompile l anguage fi les.</font >';
535                }   501                }
536           }   502           }
537     503  
538           re turn 'A ne w language  key has b een succes sfully cre ated.';   504           re turn 'A ne w language  key has b een succes sfully cre ated.';
539       }   505       }
    506       
    507       
540       ob_sta rt();   508       ob_sta rt();
541   ?>   509   ?>
542   <!DOCTYPE  html PUBLI C "-//W3C/ /DTD XHTML  1.0 Trans itional//E N" "http:/ /www.w3.or g/TR/xhtml 1/DTD/xhtm l1-transit ional.dtd" >   510   <!DOCTYPE  html PUBLI C "-//W3C/ /DTD XHTML  1.0 Trans itional//E N" "http:/ /www.w3.or g/TR/xhtml 1/DTD/xhtm l1-transit ional.dtd" >
543   <html>   511   <html>
544   <head>   512   <head>
545       <meta  http-equiv ="Content- Type" cont ent="text/ html; char set=utf-8"  />   513       <meta  http-equiv ="Content- Type" cont ent="text/ html; char set=utf-8"  />
546       <title >Add a new  language  key</title >   514       <title >Add a new  language  key</title >
547       <style  type="tex t/css">   515       <style  type="tex t/css">
548       table. EditString Form   516       table. EditString Form
549       {   517       {
550           fo nt-family:  Arial;   518           fo nt-family:  Arial;
551           fo nt-size: 1 2px;   519           fo nt-size: 1 2px;
552       }   520       }
553     521  
554       table. EditString Form td   522       table. EditString Form td
555       {   523       {
556           ba ckground-c olor: #e6e 6e6;   524           ba ckground-c olor: #e6e 6e6;
557           pa dding: 3px ;   525           pa dding: 3px ;
558       }   526       }
559          527       
560       select #NewKeyCat egory   528       select #NewKeyCat egory
561       {   529       {
562           wi dth:130px;   530           wi dth:130px;
563       }   531       }
564       </styl e>   532       </styl e>
565   </head>   533   </head>
566   <body>   534   <body>
567   <?   535   <?
568       if ( i sset($_POS T['AddLang Key']) )   536       if ( i sset($_POS T['AddLang Key']) )
569       {   537       {
570   ?>   538   ?>
571   <br /><br  /><br /><b r /><br /> <br /><br  /><br />   539   <br /><br  /><br /><b r /><br /> <br /><br  /><br />
572       <div a lign="cent er" style= "font-fami ly: Arial;  font-size : 12px; he ight: 500p x">   540       <div a lign="cent er" style= "font-fami ly: Arial;  font-size : 12px; he ight: 500p x">
573           <? = addLangK ey() ?>   541           <? = addLangK ey() ?>
574           <b r />   542           <b r />
575           <b r />   543           <b r />
576           <a  href="jav ascript:vo id(0)" onc lick="java script: wi ndow.close (); return  false;">C lose</a>   544           <a  href="jav ascript:vo id(0)" onc lick="java script: wi ndow.close (); return  false;">C lose</a>
577       </div>   545       </div>
578   </body>   546   </body>
579   </html>   547   </html>
580   <?   548   <?
581           ex it();   549           ex it();
582       }   550       }
583   ?>   551   ?>
584       <form  action="<? = $_SERVER ['PHP_SELF '] ?>?view =addLangua geKey" met hod="post" >   552       <form  action="<? = $_SERVER ['PHP_SELF '] ?>?view =addLangua geKey" met hod="post" >
585       <table  width="10 0%" class= "EditStrin gForm" cel lspacing=" 2">   553       <table  width="10 0%" class= "EditStrin gForm" cel lspacing=" 2">
586           <t r>   554           <t r>
587                <td widt h="140"><b >New langu age key na me:</b></t d>   555                <td widt h="140"><b >New langu age key na me:</b></t d>
588                <td><inp ut name="N ewKeyName"  style="wi dth: 99%"/ ></td>   556                <td><inp ut name="N ewKeyName"  style="wi dth: 99%"/ ></td>
589           </ tr>   557           </ tr>
590           <t r>   558           <t r>
591                <td><b>C ategory:</ b></td>   559                <td><b>C ategory:</ b></td>
592                <td>   560                <td>
593                    Use  existing:   561                    Use  existing:
594                    <sel ect name=" NewKeyCate gory" id=" NewKeyCate gory">   562                    <sel ect name=" NewKeyCate gory" id=" NewKeyCate gory">
595   <?   563   <?
596                    $arr Categories  = getLoca lizationCa tegories() ;   564                    $arr Categories  = getLoca lizationCa tegories() ;
597                    fore ach ($arrC ategories  as $catID  => $catNam e)   565                    fore ach ($arrC ategories  as $catID  => $catNam e)
598                    {   566                    {
599   ?>   567   ?>
600                         <option va lue="<?= $ catID ?>"> <?= htmlsp ecialchars ($catName)  ?></optio n>   568                         <option va lue="<?= $ catID ?>"> <?= htmlsp ecialchars ($catName)  ?></optio n>
601   <?   569   <?
602                    }   570                    }
603   ?>   571   ?>
604                    </se lect>   572                    </se lect>
605                    or c reate a ne w one:   573                    or c reate a ne w one:
606                    <inp ut name="N ewCategory Name" type ="text" st yle="width : 100px"/>   574                    <inp ut name="N ewCategory Name" type ="text" st yle="width : 100px"/>
607                </td>   575                </td>
608           </ tr>   576           </ tr>
609           <t r>   577           <t r>
610                <td vali gn="top">< b>Language  string pa rameters:< /b></td>   578                <td vali gn="top">< b>Language  string pa rameters:< /b></td>
611                <td>   579                <td>
612                Describe  string pa rameters,  each on a  separate l ine. Follo w the exam ple below:   580                Describe  string pa rameters,  each on a  separate l ine. Follo w the exam ple below:
613   <pre>   581   <pre>
614   0 - member 's nicknam e   582   0 - member 's nicknam e
615   1 - curren t membersh ip name   583   1 - curren t membersh ip name
616   </pre>   584   </pre>
617                Note tha t, if you  don't exac tly follow  this form at, parame ters won't  be saved.   585                Note tha t, if you  don't exac tly follow  this form at, parame ters won't  be saved.
618                <br />   586                <br />
619                <textare a name="Ne wStringPar ameters" r ows="5" st yle="width : 99%"></t extarea>   587                <textare a name="Ne wStringPar ameters" r ows="5" st yle="width : 99%"></t extarea>
620                </td>   588                </td>
621           </ tr>   589           </ tr>
622           <t r>   590           <t r>
623                <td vali gn="top">< b>String t exts for a vailable l anguages:< /b></td>   591                <td vali gn="top">< b>String t exts for a vailable l anguages:< /b></td>
624                <td>   592                <td>
625   <?   593   <?
626                     $arrLangua ges   =   getL ocaliz a tio n Langua g e s
();
  594                     $arrLangua ges   =   getL
a
n
g
s Arr ();
627                     foreach   ($arrLangu ages   as   $lang ID   =>   $lang Nam e)   595                     foreach   ($arrLangu ages   as   $lang Name   =>   $lang Titl e)
628                    {   596                    {
629                         echo   '<b>'.html specialcha rs($lang Nam e).':</b>' ;   597                         $langID =  db_value(  "SELECT `I D` FROM `L ocalizatio nLanguages ` WHERE `N ame` = '$l angName'"  );
    598                        
    599                         echo   '<b>'.html specialcha rs($lang Titl e).':</b>' ;
630   ?>   600   ?>
631                         <br />   601                         <br />
632                         <textarea  name="Lang Strings[<? = $langID  ?>]" style ="width: 9 9%"></text area>   602                         <textarea  name="Lang Strings[<? = $langID  ?>]" style ="width: 9 9%"></text area>
633                         <hr />   603                         <hr />
634   <?   604   <?
635                    }   605                    }
636   ?>   606   ?>
637                </td>   607                </td>
638           </ tr>   608           </ tr>
639           <t r>   609           <t r>
640                <td cols pan="2" al ign="cente r"><input  name="Reco mpileLangF iles" type ="checkbox " checked  /> Recompi le languag e files to  apply cha nges.</td>   610                <td cols pan="2" al ign="cente r"><input  name="Reco mpileLangF iles" type ="checkbox " checked  /> Recompi le languag e files to  apply cha nges.</td>
641           </ tr>   611           </ tr>
642       </tabl e>   612       </tabl e>
643       <div a lign="cent er"><br /> <input typ e="submit"  name="Add LangKey" v alue="Save  changes"  /></div>   613       <div a lign="cent er"><br /> <input typ e="submit"  name="Add LangKey" v alue="Save  changes"  /></div>
644       </form >   614       </form >
645   </body>   615   </body>
646   </html>   616   </html>
647   <?   617   <?
648       $conte nt = ob_ge t_contents ();    
649       ob_end _clean();    
650     618  
651        return   $c o n t
e
n t ;
  619        return  
o b_ge t _cl e a n () ;
652   }   620   }
653     621  
654   function e ditStringF orm()   622   function e ditStringF orm()
655   {   623   {
656       functi on updateL anguageStr ing()   624       functi on updateL anguageStr ing()
657       {   625       {
658           $k eyID = (in t)$_POST[' UpdateStri ng_KeyID'] ;   626           $k eyID = (in t)$_POST[' UpdateStri ng_KeyID'] ;
659           $l angID = (i nt)$_POST[ 'UpdateStr ing_LangID '];   627           $l angID = (i nt)$_POST[ 'UpdateStr ing_LangID '];
660            $string   =   get_magic_ qu o t es
_ gpc()   ?   $_POST['Up d ateString _ Str in g']   :   addslashes ($_POST['U pdateStrin g_String'] );
  628            $string   =   pr o c es s _
d b _
in put ($_POST['U pdateStrin g_String'] );
661     629  
662           my sql_query( "   630           db _res("
663                UPDATE   `Localizat ionStrings `   631                UPDATE   `Localizat ionStrings `
664                SET      `String` =  '$string'   632                SET      `String` =  '$string'
665                WHERE    `IDKey` =  $keyID AND   633                WHERE    `IDKey` =  $keyID AND
666                         `IDLanguag e` = $lang ID");   634                         `IDLanguag e` = $lang ID");
667     635  
668           if  (mysql_af fected_row s() <= 0)   636           if  (mysql_af fected_row s() <= 0)
669           {   637           {
670                return ' <font colo r="red">Th e string h as <b>NOT< /b> been u pdated.</f ont>';   638                return ' <font colo r="red">Th e string h as <b>NOT< /b> been u pdated.</f ont>';
671           }   639           }
672     640  
673           if  ( $_POST[ 'Recompile LangFile']  == 'on' )   641           if  ( $_POST[ 'Recompile LangFile']  == 'on' )
674           {   642           {
675                if ( !co mpileLangu age($langI D) )   643                if ( !co mpileLangu age($langI D) )
676                {   644                {
677                    retu rn '<font  color="red ">Error: c ould not r ecompile l anguage fi le.</font> ';   645                    retu rn '<font  color="red ">Error: c ould not r ecompile l anguage fi le.</font> ';
678                }   646                }
679           }   647           }
680     648  
681           re turn 'The  string has  been succ essfully u pdated.';   649           re turn 'The  string has  been succ essfully u pdated.';
682       }   650       }
683     651  
684       $IDKey  = (int)$_ GET['editS tringKeyID '];   652       $IDKey  = (int)$_ GET['editS tringKeyID '];
685       $IDLan guage = (i nt)$_GET[' editString LangID'];   653       $IDLan guage = (i nt)$_GET[' editString LangID'];
686     654  
687       ob_sta rt();   655       ob_sta rt();
688     656  
689       $scrip t = "   657       $scrip t = "
690       functi on insertP aram(strTe xtAreaID,  strSelectP aramsID)   658       functi on insertP aram(strTe xtAreaID,  strSelectP aramsID)
691       {   659       {
692           te xtArea = d ocument.ge tElementBy Id(strText AreaID);   660           te xtArea = d ocument.ge tElementBy Id(strText AreaID);
693           se lectParams  = documen t.getEleme ntById(str SelectPara msID);   661           se lectParams  = documen t.getEleme ntById(str SelectPara msID);
    662           
    663           if ( !selectP arams.opti ons.length  || select Params.sel ectedIndex  == -1 )
    664                return f alse;
    665           
694           se lectedOpti on = selec tParams.op tions[sele ctParams.s electedInd ex];   666           se lectedOpti on = selec tParams.op tions[sele ctParams.s electedInd ex];
695     667  
696           te xtArea.val ue = '' +  textArea.v alue + sel ectedOptio n.value;   668           te xtArea.val ue = '' +  textArea.v alue + sel ectedOptio n.value;
697     669  
698           te xtArea.foc us();   670           te xtArea.foc us();
699        } ";   671        }
    672       ";
700     673  
701       if ( i sset($_POS T['UpdateL angString' ]) )   674       if ( i sset($_POS T['UpdateL angString' ]) )
702       {   675       {
703           $b ody = mess ageTemplat e(updateLa nguageStri ng().'<br  /><br /><a  href="jav ascript:vo id(0)" onc lick="java script: wi ndow.close (); return  false;">C lose</a>') ;   676           $b ody = mess ageTemplat e(updateLa nguageStri ng().'<br  /><br /><a  href="jav ascript:vo id(0)" onc lick="java script: wi ndow.close (); return  false;">C lose</a>') ;
704     677  
705           re turn Popup PageTempla te('Edit L anguage St ring', $bo dy, $scrip t);   678           re turn Popup PageTempla te('Edit L anguage St ring', $bo dy, $scrip t);
706       }   679       }
707     680  
708       $sql =  "   681       $sql =  "
709           SE LECT  `Loc alizationS trings`.`I DKey`        AS `IDKe y`,   682           SE LECT  `Loc alizationS trings`.`I DKey`        AS `IDKe y`,
710                    `Loc alizationS trings`.`I DLanguage`   AS `IDLa nguage`,   683                    `Loc alizationS trings`.`I DLanguage`   AS `IDLa nguage`,
711                    `Loc alizationK eys`.`Key`              AS `Key` ,   684                    `Loc alizationK eys`.`Key`              AS `Key` ,
712                    `Loc alizationS trings`.`S tring`       AS `Stri ng`,   685                    `Loc alizationS trings`.`S tring`       AS `Stri ng`,
713                     `Localizat ionLanguag es`.` Nam e`        AS   `Language` ,   686                     `Localizat ionLanguag es`.` Titl e`       AS   `Language` ,
714                    `Loc alizationC ategories` .`Name`      AS `Cate gory`   687                    `Loc alizationC ategories` .`Name`      AS `Cate gory`
715      
716           FR OM    `Loc alizationS tringParam s`   688           FR OM `Locali zationStri ngParams`
717                     RIGHT   JOIN   `Localizat ionKeys`
  689            RIGHT   JOIN   `Localizat ionKeys`   ON
718                         ON   (`Localiza tionString Params`.`I DKey`   =   `Localizat ionKeys`.` ID`)   690                
(`Localiza tionString Params`.`I DKey`   =   `Localizat ionKeys`.` ID`)
719     691           LE FT JOIN `L ocalizatio nStrings`  ON
720                     LEFT   JOIN   `Localizat ion Stri ng
s`
  692                (`Locali zationStri ngs`.`IDKe y` = `Loca lizationKe ys`.`ID`)
721                         ON   (`Localiza tionString s`.`ID K e y `   =   `Localizat ion K e y s`.`ID`)   693           LE FT JOIN `L ocalizatio nCategorie s` ON
    694                (`Locali zationKeys `.`IDCateg ory` = `Lo calization Categories `.`ID`)
    695            LEFT   JOIN   `Localizat ion La ng uage s`   ON
    696                
(`Localiza tionString s`.`ID Languag e
`   =   `Localizat ion Languag e
s`.`ID`)
    697           WH ERE
    698                `Localiz ationStrin gs`.`IDKey ` = $IDKey  AND
    699                `Localiz ationStrin gs`.`IDLan guage` = $ IDLanguage
    700           ";
722     701  
723                    LEFT  JOIN `Loc alizationC ategories`   702       $resLa ngString =  db_res($s ql);
724                         ON (`Local izationKey s`.`IDCate gory` = `L ocalizatio nCategorie s`.`ID`)    
725     703  
726                    LEFT  JOIN `Loc alizationL anguages`   704        if   (   ! mysql_num_ rows($resL angString)  
)
727                         ON (`Local izationStr ings`.`IDL anguage` =  `Localiza tionLangua ges`.`ID`)    
728      
729           WH ERE   `Loc alizationS trings`.`I DKey` = $I DKey AND ` Localizati onStrings` .`IDLangua ge` = $IDL anguage";    
730      
731       $resLa ngString =  mysql_que ry($sql);    
732      
733        if   (  
mysql_num_ rows($resL angString)   <=   0   )
   
734       {    
735           re turn Popup PageTempla te('Edit L anguage St ring', mes sageTempla te('Error:  specified  string no t found.') );   705           re turn Popup PageTempla te('Edit L anguage St ring', mes sageTempla te('Error:  specified  string no t found.') );
736       }   706        else  {
737       else    
738       
{
   
739           $a rrLangStri ng = mysql _fetch_ass oc($resLan gString);   707           $a rrLangStri ng = mysql _fetch_ass oc($resLan gString);
740           ob _start();   708           ob _start();
741   ?>   709   ?>
742       <form  action="<? = $_SERVER ['PHP_SELF '] ?>?view =editLangS tring" met hod="post" >   710       <form  action="<? = $_SERVER ['PHP_SELF '] ?>?view =editLangS tring" met hod="post" >
743       <input  name="Upd ateString_ KeyID" typ e="hidden"  value="<? = $arrLang String['ID Key'] ?>"  />   711       <input  name="Upd ateString_ KeyID" typ e="hidden"  value="<? = $arrLang String['ID Key'] ?>"  />
744       <input  name="Upd ateString_ LangID" ty pe="hidden " value="< ?= $arrLan gString['I DLanguage' ] ?>" />   712       <input  name="Upd ateString_ LangID" ty pe="hidden " value="< ?= $arrLan gString['I DLanguage' ] ?>" />
745       <table  width="10 0%" class= "EditStrin gForm" cel lspacing=" 2">   713       <table  width="10 0%" class= "EditStrin gForm" cel lspacing=" 2">
746           <t r>   714           <t r>
747                <td alig n="right"  width="60" ><b>Key:</ b></td>   715                <td alig n="right"  width="60" ><b>Key:</ b></td>
748                <td><?=  htmlspecia lchars($ar rLangStrin g['Key']);  ?></td>   716                <td><?=  htmlspecia lchars($ar rLangStrin g['Key']);  ?></td>
749           </ tr>   717           </ tr>
750           <t r>   718           <t r>
751                 <td   align="rig ht"   rowspan="2 " ><b>String :</b></td>   719                 <td   align="rig ht"
><b>String :</b></td>
752                <td><tex tarea name ="UpdateSt ring_Strin g" id='Str ingTextAre a' rows="1 6" style=" width: 99% "><?= html specialcha rs($arrLan gString['S tring']);  ?></textar ea></td>   720                <td><tex tarea name ="UpdateSt ring_Strin g" id='Str ingTextAre a' rows="1 6" style=" width: 99% "><?= html specialcha rs($arrLan gString['S tring']);  ?></textar ea></td>
753           </ tr>   721           </ tr>
    722   <?
    723       $arrPa rams = get Localizati onStringPa rams($arrL angString[ 'IDKey']);
    724       if( $a rrParams   ) {
    725   ?>
754           <t r>   726           <t r>
    727                <td alig n="right"> <b>Paramet ers:</b></ td>
755                <td>   728                <td>
756                Availabl e string p arameters  (click on  a paramete r to inser t it at th e end of t he string) :   729                Availabl e string p arameters  (click on  a paramete r to inser t it at th e end of t he string) :
757                <br />   730                <br />
758                <select  id='Select Params' mu ltiple sty le="width:  100%; hei ght: 100px " onclick= "insertPar am('String TextArea',  'SelectPa rams');">   731                <select  id='Select Params' mu ltiple sty le="width:  100%; hei ght: 100px " onclick= "insertPar am('String TextArea',  'SelectPa rams');">
759   <?   732   <?
760       $arrPa rams = get Localizati onStringPa rams($arrL angString[ 'IDKey']);   733       
761       $first Selected =  false;   734           $f irstSelect ed = false ;
762        foreach   ($arrParam s   as   $paramID   =>   $paramDesc ription)
  735            foreach   ($arrParam s   as   $paramID   =>   $paramDesc ription)   {
763       {   736                 if   (   !$firstSel ected   )   {
764            if   (   !$firstSel ected   )
   
765           {    
766                $firstSe lected = t rue;   737                    $fir stSelected  = true;
767                $selecte d = 'selec ted';   738                    $sel ected = 's elected';
768           }
  739                }  else
769           el se    
770           {    
771                $selecte d = '';   740                    $sel ected = '' ;
772           }    
773   ?>   741   ?>
774                    <opt ion value= "{<?= $par amID ?>}"  <?= $selec ted ?>><?=  '{'.$para mID.'} - ' .htmlspeci alchars($p aramDescri ption) ?>< /option>   742                    <opt ion value= "{<?= $par amID ?>}"  <?= $selec ted ?>><?=  '{'.$para mID.'} - ' .htmlspeci alchars($p aramDescri ption) ?>< /option>
775   <?   743   <?
776       }   744           }
777   ?>   745   ?>
778                </select >   746                </select >
779                </td>   747                </td>
780           </ tr>   748           </ tr>
    749   <?
    750       }
    751   ?>
781           <t r>   752           <t r>
782                <td alig n="right"> <b>Categor y:</b></td >   753                <td alig n="right"> <b>Categor y:</b></td >
783                <td><?=  htmlspecia lchars($ar rLangStrin g['Categor y']); ?></ td>   754                <td><?=  htmlspecia lchars($ar rLangStrin g['Categor y']); ?></ td>
784           </ tr>   755           </ tr>
785           <t r>   756           <t r>
786                <td alig n="right"> <b>Languag e:</b></td >   757                <td alig n="right"> <b>Languag e:</b></td >
787                <td><?=  htmlspecia lchars($ar rLangStrin g['Languag e']); ?></ td>   758                <td><?=  htmlspecia lchars($ar rLangStrin g['Languag e']); ?></ td>
788           </ tr>   759           </ tr>
789           <t r>   760           <t r>
790                 <td   colspan="2 "   align="cen ter"><inpu t   name="Reco mpileLangF ile"   type="chec kbox"   checked   />   Recompile   correspond ing   language   file   to   apply   changes. </td>   761                <td cols pan="2" al ign="cente r">
    762                    <inp ut name="R ecompileLa ngFile" ty pe="checkb ox" checke d />
    763                    
Recompile   correspond ing   language   file   to   apply   changes.
    764                </td>
791           </ tr>   765           </ tr>
792       </tabl e>   766       </tabl e>
793       <div a lign="cent er"><br /> <input typ e="submit"  name="Upd ateLangStr ing" value ="Save cha nges" /></ div>   767       <div a lign="cent er"><br /> <input typ e="submit"  name="Upd ateLangStr ing" value ="Save cha nges" /></ div>
794       </form >   768       </form >
795   <?   769   <?
796           $b ody = ob_g et_content s();    
797           ob _end_clean ();    
798     770           
799            return   PopupPageT emplate('E dit   Language   String',   $b o dy ,   $script);   771            return   PopupPageT emplate('E dit   Language   String',  
o b_get_clea n() ,   $script);
800       }   772       }
801   }   773   }
802     774  
803   function s tringTable Block($sho wMoreThanM ax = false , $maxRows ToShow = 1 00)   775   function s tringTable Block($sho wMoreThanM ax = false , $maxRows ToShow = 1 00)
804   {   776   {
805       functi on htmlPro cessedPref ix($string , $prefixL en = 15)   777       functi on htmlPro cessedPref ix($string , $prefixL en = 15)
806       {   778       {
807           $s trLen = st rlen($stri ng);   779           $s trLen = st rlen($stri ng);
808      
809           if ( $strLen  <= 0) retu rn '&nbsp; ';   780           if ( $strLen  <= 0) retu rn '&nbsp; ';
810     781            $prefix   =   htmlspecia lchars( mb_ substr($st ring,   0,   $prefixLen ));
811            $prefix   =   htmlspecia lchars(
substr($st ring,   0,   $prefixLen ));
  782            if   (   $strLen   >   $prefixLen   )
812     783                $prefix  .= '<font  color="#ee 0000">...< /font>';
813            if   (   $strLen   >   $prefixLen   )   $prefix   .=   '<font   color="#ee 0000">...< /font>';    
814      
815           re turn $pref ix;   784           re turn $pref ix;
816       }   785       }
817     786  
818       functi on deleteL anguageKey ()   787       functi on deleteL anguageKey ()
819       {   788       {
820           $l angKeyID =  (int)$_PO ST['Delete LangKey'];   789           $l angKeyID =  (int)$_PO ST['Delete LangKey'];
    790           $r esKey = db _res('SELE CT `Key` F ROM `Local izationKey s` WHERE ` ID` = '.$l angKeyID);
    791           if  ( !mysql_ num_rows($ resKey) )
    792                return ' <font colo r="red">Er ror: langu age key no t found.</ font>';
821     793           
822            $ res Key   =   mysql_quer y (' S ELE C T   `Key`   FROM   `Localizat ionKeys`   WHERE   `ID`   =   '.$langKey ID);   794            db_ res
(' D ELE
T E   FROM   `Localizat ionKeys`   WHERE   `ID`='.$la ngKeyID);
823     795            db _
r es ('DELETE   FROM   `Localizat ion String s`   WHERE   `ID Key `   =   '.$langKey ID);
824           if  ( mysql_n um_rows($r esKey) <=  0 ) return  '<font co lor="red"> Error: lan guage key  not found. </font>';   796            db _
r es ('DELETE   FROM   `Localizat ionString Param s`   WHERE   `IDKey`   =   '.$langKey ID);
825      
826            mysql _ que r y ('DELETE   FROM   `Localizat ion Key s`   WHERE   `ID
`='.$langK eyID);
   
827      
828            mysql _ que r y ('DELETE   FROM   `Localizat ionString
s`   WHERE   `IDKey`   =   '.$langKey ID);
   
829     797  
830           my sql_query( 'DELETE FR OM `Locali zationStri ngParams`  WHERE `IDK ey` = '.$l angKeyID);   798           if  (!compile Language() )
831     799                
return   '<font   color="red ">Error:   could   not   recompile   language   files.</fo nt>';
832            if   (!compileL anguage())   return   '<font   color="red ">Error:   could   not   recompile   language   files.</fo nt>';    
833     800  
834           $a rrKey = my sql_fetch_ assoc($res Key);   801           $a rrKey = my sql_fetch_ assoc($res Key);
835     802  
836           re turn '<fon t color="g reen">The  <b>'.htmls pecialchar s($arrKey[ 'Key']).'< /b> langua ge key has  been succ essfully r emoved.</f ont>';   803           re turn '<fon t color="g reen">The  <b>'.htmls pecialchar s($arrKey[ 'Key']).'< /b> langua ge key has  been succ essfully r emoved.</f ont>';
837       }   804       }
838     805  
839       if ( i sset($_POS T['DeleteL angKey'])  )   806       if ( i sset($_POS T['DeleteL angKey'])  )
840       {    
841           $r esultMsg =  deleteLan guageKey() ;   807           $r esultMsg =  deleteLan guageKey() ;
842       }    
843     808  
844       global   809       global
845           $s earchStrin g,   810           $s earchStrin g,
846           $s earchCombi neWordsAs,   811           $s earchCombi neWordsAs,
847           $s earchInKey s,   812           $s earchInKey s,
848           $s earchInStr ings,   813           $s earchInStr ings,
849           $s earchInPar ams,   814           $s earchInPar ams,
850           $s earchCateg ories,   815           $s earchCateg ories,
851           $s earchLangu ages;   816           $s earchLangu ages;
852     817  
853       $res =  findLangS trings(   818       $res =  findLangS trings(
854       $searc hString,   819       $searc hString,
855       $searc hCombineWo rdsAs,   820       $searc hCombineWo rdsAs,
856       $searc hInKeys,   821       $searc hInKeys,
857       $searc hInStrings ,   822       $searc hInStrings ,
858       $searc hInParams,   823       $searc hInParams,
859       $searc hCategorie s,   824       $searc hCategorie s,
860       $searc hLanguages );   825       $searc hLanguages );
861     826  
862       ob_sta rt();   827       ob_sta rt();
863   ?>   828   ?>
864       <a hre f="javascr ipt:void(0 )" onclick ="popupFor m('<?= $_S ERVER['PHP _SELF'] ?> ?view=addL anguageKey ', 200, 10 0, 750, 50 0, 'yes');  return fa lse;">Add  a new lang uage key</ a><br /><h r />   829       <a hre f="javascr ipt:void(0 )" onclick ="popupFor m('<?= $_S ERVER['PHP _SELF'] ?> ?view=addL anguageKey ', 200, 10 0, 750, 50 0, 'yes');  return fa lse;">Add  a new lang uage key</ a><br /><h r />
865   <?   830   <?
866     831  
867       echo $ resultMsg. '<br />';   832       echo $ resultMsg. '<br />';
868     833  
869       $numRo ws = mysql _num_rows( $res);   834       $numRo ws = mysql _num_rows( $res);
870     835  
871       if ( $ numRows >  $maxRowsTo Show && !$ showMoreTh anMax)   836       if ( $ numRows >  $maxRowsTo Show && !$ showMoreTh anMax)
872       {   837       {
873           $g etQuery =  $_SERVER[" QUERY_STRI NG"];   838           $g etQuery =  $_SERVER[" QUERY_STRI NG"];
874           if (strlen($g etQuery) >  0) $getQu ery .= '&' ;   839           if (strlen($g etQuery) >  0) $getQu ery .= '&' ;
875           $g etQuery .=  'showMore ThanMax=ye s';   840           $g etQuery .=  'showMore ThanMax=ye s';
876   ?>   841   ?>
877   <div align ="center"  style="pad ding: 20px ">   842   <div align ="center"  style="pad ding: 20px ">
878       Your s earch crit eria resul t in <b><? = $numRows  ?></b> st rings.   843       Your s earch crit eria resul t in <b><? = $numRows  ?></b> st rings.
879       <br />   844       <br />
880       Are yo u sure you  want to s how all of  them?   845       Are yo u sure you  want to s how all of  them?
881       <br />   846       <br />
882       <a hre f="<?= $_S ERVER['PHP _SELF'].'? '.$getQuer y ?>">Yes< /a>   847       <a hre f="<?= $_S ERVER['PHP _SELF'].'? '.$getQuer y ?>">Yes< /a>
883   </div>   848   </div>
884   <?   849   <?
885           $c ontent = o b_get_cont ents();   850            return   panelSecti on("Langua ge   strings",  
o b_ge t _cl e a n () );
886           ob _end_clean ();    
887      
888            return   panelSecti on("Langua ge   strings",   $c o n t
e
n t );
   
889       }   851       }
890   ?>   852   ?>
891   <table bor der="0" ce llpadding= "0" cellsp acing="0"  class="Lan guagesStri ngs">   853   <table bor der="0" ce llpadding= "0" cellsp acing="0"  class="Lan guagesStri ngs">
892       <tr cl ass="Heade rRow">   854       <tr cl ass="Heade rRow">
893           <t d>Key</td>   855           <t d>Key</td>
894           <t d>String</ td>   856           <t d>String</ td>
895           <t d>Category </td>   857           <t d>Category </td>
896           <t d>Language </td>   858           <t d>Language </td>
897           <t d colspan= "2">&nbsp; </td>   859           <t d colspan= "2">&nbsp; </td>
898       </tr>   860       </tr>
899   <?   861   <?
900        if   (  
mysql_num_ rows($res)   <=   0 )
  862        if   (   ! mysql_num_ rows($res)  
)   {
901       {    
902   ?>   863   ?>
903       <tr>   864       <tr>
904           <t d colspan= "5" align= "center" c lass="Left ">No strin gs found m atching yo ur criteri a.</td>   865           <t d colspan= "5" align= "center" c lass="Left ">No strin gs found m atching yo ur criteri a.</td>
905       </tr>   866       </tr>
906   <?   867   <?
907       }   868       }
908       while( $arrString  = mysql_f etch_assoc ($res))   869  
    
909        {   870       while( $arrString  = mysql_f etch_assoc ($res)) {
910   ?>   871   ?>
911       <tr>   872       <tr>
912       <td cl ass="Left" ><?= htmlP rocessedPr efix($arrS tring['Key '], 20) ?> </td>   873       <td cl ass="Left" ><?= htmlP rocessedPr efix($arrS tring['Key '], 20) ?> </td>
913       <td><? = htmlProc essedPrefi x($arrStri ng['String '], 32) ?> </td>   874       <td><? = htmlProc essedPrefi x($arrStri ng['String '], 32) ?> </td>
914       <td><? = htmlProc essedPrefi x($arrStri ng['Catego ry'], 25)  ?></td>   875       <td><? = htmlProc essedPrefi x($arrStri ng['Catego ry'], 25)  ?></td>
915       <td><? = htmlProc essedPrefi x($arrStri ng['Langua ge'], 20)  ?></td>   876       <td><? = htmlProc essedPrefi x($arrStri ng['Langua ge'], 20)  ?></td>
916       <td wi dth="20">< a   877       <td wi dth="20">< a
917                href="ja vascript:  void(0)"   878                href="ja vascript:  void(0)"
918                onclick= "popupForm ('<?=   879                onclick= "popupForm ('<?=
919                    $_SE RVER['PHP_ SELF'].   880                    $_SE RVER['PHP_ SELF'].
920                    '?vi ew=editLan gString&ed itStringKe yID='.   881                    '?vi ew=editLan gString&ed itStringKe yID='.
921                    $arr String['ID Key'].   882                    $arr String['ID Key'].
922                    '&ed itStringLa ngID='.   883                    '&ed itStringLa ngID='.
923                    $arr String['ID Language']  ?>', 300,  100, 600,  570, 'no' ); return  false;">Ed it</a>   884                    $arr String['ID Language']  ?>', 300,  100, 600,  570, 'no' ); return  false;">Ed it</a>
924       </td>   885       </td>
925       <td wi dth="30">   886       <td wi dth="30">
926           <f orm   887           <f orm
927                id="Dele teLangKeyF orm_<?= $a rrString[' IDKey'] ?> "   888                id="Dele teLangKeyF orm_<?= $a rrString[' IDKey'] ?> "
928                style="m argin: 0px ; padding:  0px"   889                style="m argin: 0px ; padding:  0px"
929                action=" <?= htmlsp ecialchars ($_SERVER[ 'PHP_SELF' ].'?'.$_SE RVER['QUER Y_STRING'] ) ?>"   890                action=" <?= htmlsp ecialchars ($_SERVER[ 'PHP_SELF' ].'?'.$_SE RVER['QUER Y_STRING'] ) ?>"
930                method=" post"><inp ut name="D eleteLangK ey" value= "<?= $arrS tring['IDK ey'] ?>" t ype="hidde n"/></form ><a   891                method=" post"><inp ut name="D eleteLangK ey" value= "<?= $arrS tring['IDK ey'] ?>" t ype="hidde n"/></form ><a
931                href="ja vascript:v oid(0)"   892                href="ja vascript:v oid(0)"
932                onclick= "if(confir m('This op eration wi ll delete  the langua ge key its elf and al l correspo nding lang uage strin gs from al l language s. Are you  sure you  want to co ntinue?')) { document .getElemen tById('Del eteLangKey Form_<?= $ arrString[ 'IDKey'] ? >').submit ();} retur n false;"> Delete</a>   893                onclick= "if(confir m('This op eration wi ll delete  the langua ge key its elf and al l correspo nding lang uage strin gs from al l language s. Are you  sure you  want to co ntinue?')) { document .getElemen tById('Del eteLangKey Form_<?= $ arrString[ 'IDKey'] ? >').submit ();} retur n false;"> Delete</a>
933       </td>   894       </td>
934       </tr>   895       </tr>
935   <?   896   <?
936       }   897       }
937   ?>   898   ?>
938   </table>   899   </table>
939   <br />   900   <br />
940   <?   901   <?
941       $conte nt = ob_ge t_contents ();    
942       ob_end _clean();    
943       return  panelSect ion("Langu age string s", $conte nt);    
944   }    
945     902       
946   // followi ng functio n is unuse d already   903       return  panelSect ion("Langu age string s", ob_get _clean());
947   /*function  newLangua ge($newLan gName, $ne wLangCodep age, $sNew Flag, $old LangID)    
948   {    
949       $oldLa ngID = (in t)$oldLang ID;    
950      
951       if(str len($newLa ngName) <=  0) return  false;    
952      
953       if (!g et_magic_q uotes_gpc( )) $newLan gName = ad dslashes($ newLangNam e);    
954       if (!g et_magic_q uotes_gpc( )) $newLan gCodepage  = addslash es($newLan gCodepage) ;    
955       $sFlag  = htmlspe cialchars_ adv($sNewF lag);    
956      
957       $resOl dStrings =  mysql_que ry("    
958           SE LECT  `IDK ey`, `Stri ng`    
959           FR OM    `Loc alizationS trings`    
960           WH ERE   `IDL anguage` =  $oldLangI D    
961       ");    
962      
963       mysql_ query("INS ERT INTO ` Localizati onLanguage s` (`Name` , `Flag`)  VALUES ('$ newLangNam e', '$sNew Flag')");    
964      
965       if(mys ql_affecte d_rows() < = 0) retur n false;    
966      
967       $newLa ngID = mys ql_insert_ id();    
968      
969       while( $arr = mys ql_fetch_a ssoc($resO ldStrings) )    
970       {    
971           $a rr['String '] = addsl ashes($arr ['String'] );    
972           my sql_query( "    
973                INSERT I NTO `Local izationStr ings`    
974                (`IDKey` , `IDLangu age`, `Str ing`) VALU ES    
975                ('{$arr[ 'IDKey']}' , $newLang ID, '{$arr ['String'] }')    
976                ");    
977           if (mysql_aff ected_rows () <= 0) r eturn fals e;    
978       }   904   }
979     905  
980       return  true;    
981   }*/    
982      
983   function e ditLanguag eForm()   906   function e ditLanguag eForm()
984   {   907   {
985       $langI D = (int)$ _GET['edit LanguageID '];   908       $langI D = (int)$ _GET['edit LanguageID '];
    909       $resLa ng = db_re s('SELECT  `Name`, `F lag`, `Tit le` FROM ` Localizati onLanguage s` WHERE ` ID` = '.$l angID);
986     910  
987       $resLa ng = mysql _query('SE LECT `Name `, `Flag`  FROM `Loca lizationLa nguages` W HERE `ID`  = '.$langI D);   911       if ( ! mysql_num_ rows($resL ang) )
988     912           
return   PopupPageT emplate('E dit   Language',   messageTem plate('<fo nt   color="red ">Error:   language   does   not   exist.</fo nt>'));
989        if   (   mysql_num_ rows($resL ang)   <=   0   )   return   PopupPageT emplate('E dit   Language',   messageTem plate('<fo nt   color="red ">Error:   language   does   not   exist.</fo nt>'));    
990     913  
991        function   updateLang uage($lang ID)
  914        function   updateLang uage($lang ID)   {
992       {    
993           $l angID = (i nt)$langID ;   915           $l angID = (i nt)$langID ;
994     916  
995            $newLangua geName   =   get_magic_ qu o t es
_ gpc()   ?   $ _ POST['La n g u ageName']   :   addslashes ($_POST['L anguageNam e']);
  917            $newLangua geName    =   pr o c es s _ db _ i n p u t ($_POST['L anguageNam e']);
996            $ sN ew Fl ag   =   htmlsp e c i a l cha r
s_ a d v ($_POST[' Fl ag
']);
  918           $s NewFlag          = pr ocess_db_i nput($_POS T['Flag']) ;
    919            $ n ew Langu ag
e T i t l e   =   p r oces s_
d b_input ($_POST[' Langu ag eTitle ']);
997     920  
998            if   (   strlen($ne wLanguageN ame)   <=   0)   return   '<font   color="red ">Error:   language   name   not   specified. </font>';   921           if  ( !strlen ($newLangu ageName) )
    922                
return   '<font   color="red ">Error:   language   name   not   specified. </font>';
999     923  
1000           my sql_query( "UPDATE `L ocalizatio nLanguages ` SET `Nam e`='$newLa nguageName ', `Flag`  = '$sNewFl ag' WHERE  `ID` = $la ngID");   924           $s Query = "
    925                UPDATE ` Localizati onLanguage s` SET
    926                    `Nam e`='$newLa nguageName ',
    927                    `Tit le`='$newL anguageTit le',
    928                    `Fla g` = '$sNe wFlag'
    929                WHERE `I D` = $lang ID";
1001     930           
1002           if  ( mysql_a ffected_ro ws() > 0 )  return 'L anguage ha s been suc cessfully  updated.';   931           db _res( $sQu ery );
1003     932  
1004           re turn '<fon t color="r ed">Error:  language  could not  be updated .</font>';   933           if  ( mysql_a ffected_ro ws() )
    934                return ' Language h as been su ccessfully  updated.' ;
1005     935  
    936           re turn '<fon t color="r ed">Error:  language  could not  be updated .</font>';
1006       }   937       }
1007     938  
1008       if ( i sset($_POS T['UpdateL anguage'])  )   939       if ( i sset($_POS T['UpdateL anguage'])  )
1009       {    
1010           re turn Popup PageTempla te('Edit L anguage',  messageTem plate(upda teLanguage ($langID)) );   940           re turn Popup PageTempla te('Edit L anguage',  messageTem plate(upda teLanguage ($langID)) );
1011       }    
1012     941  
1013       $arrLa ng = mysql _fetch_ass oc($resLan g);   942       $arrLa ng = mysql _fetch_ass oc($resLan g);
1014     943  
1015       ob_sta rt();   944       ob_sta rt();
1016     945  
1017       $isLan gDefault =  getParam( 'lang_defa ult') == $ arrLang['N ame'];   946       $isLan gDefault =  getParam( 'lang_defa ult') == $ arrLang['N ame'];
1018   ?>   947   ?>
1019   <form acti on="<?= $_ SERVER['PH P_SELF'] ? >?view=edi tLanguage& editLangua geID=<?= $ langID ?>"  method="p ost">   948   <form acti on="<?= $_ SERVER['PH P_SELF'] ? >?view=edi tLanguage& editLangua geID=<?= $ langID ?>"  method="p ost">
1020   <table>   949   <table>
1021       <tr>   950       <tr>
1022            <td>Langua ge   nam e:</td>   951            <td>Langua ge   titl e:</td>
1023            <td> <input   952            <td>
1024                name="La nguageName "   953                 <input   name="Lang uageTitle"   type="text "   value="<?=   htmlspecia lchars($ar rLang[' Titl e'])   ?>"   />
1025                type="te xt"   954           </ td>
1026                
value="<?=   htmlspecia lchars($ar rLang[' Nam e'])   ?>"
  955       </tr>
1027                 <?=   getParam(' lang_defau lt')==$arr Lang['Name ']   ?   'disabled'   :   ''   ?>/> </td>   956       <tr>
    957           <t d>Language  code:</td >
    958           <t d>
    959                <input n ame="Langu ageName" t ype="text"  value="<? = htmlspec ialchars($ arrLang['N ame']) ?>"
    960                   <?=   getParam(' lang_defau lt')==$arr Lang['Name ']   ?   'disabled'   :   ''   ?>   />
    961           </ td>
1028       </tr>   962       </tr>
1029       <tr>   963       <tr>
1030           <t d>Flag:</t d>   964           <t d>Flag:</t d>
1031           <t d><?= show LangIcons( $arrLang[' Flag']); ? ></td>   965           <t d><?= show LangIcons( $arrLang[' Flag']); ? ></td>
1032       </tr>   966       </tr>
1033   </table>   967   </table>
1034   <br />   968   <br />
1035   <center><i nput type= "submit" n ame="Updat eLanguage"  value="Sa ve Changes " /></cent er>   969   <center><i nput type= "submit" n ame="Updat eLanguage"  value="Sa ve Changes " /></cent er>
1036   </form>   970   </form>
1037   <?   971   <?
1038       $conte nts = ob_g et_content s();    
1039       ob_end _clean();    
1040     972       
1041        return   PopupPageT emplate('E dit   Language',   $c o n t
e
n ts );
  973        return   PopupPageT emplate('E dit   Language',  
o b_ge t _cl e a n () );
1042   }   974   }
1043     975  
1044   function   manageLang uagesBlock ()
  976   function   manageLang uagesBlock ()   {
1045   {    
1046       global  $site;   977       global  $site;
1047       functi on copyLan guage()   978  
    
1048        {   979       functi on copyLan guage() {
1049           $n ewLangName  = get_mag ic_quotes_ gpc() ?   980            $newL a ngN a m e   =   proces s _db_input ($_POST['C opyLanguag e_Name']);
1050                $_POST[' CopyLangua ge_Name']  :    
1051                
a ddsl a sh e
s
($_POST['C opyLanguag e_Name']);
   
1052     981  
1053           $s Flag = htm lspecialch ars_adv($_ POST['Flag ']);   982           $s Flag = htm lspecialch ars_adv($_ POST['Flag ']);
1054     983  
1055           $s ourceLangI D = (int)$ _POST['Cop yLanguage_ SourceLang ID'];   984           $s ourceLangI D = (int)$ _POST['Cop yLanguage_ SourceLang ID'];
1056     985  
1057           if (strlen($n ewLangName ) <= 0) re turn '<fon t color="r ed">Error:  please sp ecify a na me for the  new langu age.</font >';   986           if (strlen($n ewLangName ) <= 0) re turn '<fon t color="r ed">Error:  please sp ecify a na me for the  new langu age.</font >';
1058     987  
1059           my sql_query( "   988           db _res("
1060                INSERT I NTO `Local izationLan guages`   989                INSERT I NTO `Local izationLan guages`
1061                 (`Name`,   `Flag`
)   VALUES
  990                 (`Name`,   `Flag` ,   `Title` )   VALUES
1062                 ('
$newLangNa me
',   '
$sFlag
')
  991                 (' { $newLangNa me } ',   ' { $sFlag }',   '{$newLang Name} ')
1063           ") ;   992           ") ;
1064     993  
1065           if (mysql_aff ected_rows () <= 0) r eturn '<fo nt color=" red">Error : could no t add a ne w language  to the da tabase.</f ont>';   994           if (mysql_aff ected_rows () <= 0) r eturn '<fo nt color=" red">Error : could no t add a ne w language  to the da tabase.</f ont>';
1066     995  
1067           $n ewLangID =  mysql_ins ert_id();   996           $n ewLangID =  mysql_ins ert_id();
1068     997  
1069            $resSource LangString s   =   mysql _ que r y ("   998            $resSource LangString s   =   db _
r es ("
1070                SELECT   `IDKey`, ` String`   999                SELECT   `IDKey`, ` String`
1071                FROM     `Localizat ionStrings `   1000                FROM     `Localizat ionStrings `
1072                WHERE    `IDLanguag e` = $sour ceLangID   1001                WHERE    `IDLanguag e` = $sour ceLangID
1073           ") ;   1002           ") ;
1074     1003  
1075           wh ile($arr =  mysql_fet ch_assoc($ resSourceL angStrings ))   1004           wh ile($arr =  mysql_fet ch_assoc($ resSourceL angStrings ))
1076           {   1005           {
1077                $arr['St ring'] = a ddslashes( $arr['Stri ng']);   1006                $arr['St ring'] = a ddslashes( $arr['Stri ng']);
1078                mysql_qu ery("   1007                db_res("
1079                    INSE RT INTO `L ocalizatio nStrings`   1008                    INSE RT INTO `L ocalizatio nStrings`
1080                    (`ID Key`, `IDL anguage`,  `String`)  VALUES   1009                    (`ID Key`, `IDL anguage`,  `String`)  VALUES
1081                    ('{$ arr['IDKey ']}', $new LangID, '{ $arr['Stri ng']}')   1010                    ('{$ arr['IDKey ']}', $new LangID, '{ $arr['Stri ng']}')
1082                    ");   1011                    ");
1083                 if(mysql_a ffected_ro ws()   <=   0)   return   '<font   color="red ">Error:   could   not   add   a   language   string   to   the   database.< /font>';   1012                
    1013                if( !mys ql_affecte d_rows() )
    1014                    
return   '<font   color="red ">Error:   could   not   add   a   language   string   to   the   database.< /font>';
1084           }   1015           }
1085     1016  
1086           re turn '<fon t color="g reen"><b>' .htmlspeci alchars(st ripslashes ($newLangN ame)).'</b > language  has been  successful ly created .</font>';   1017           re turn '<fon t color="g reen"><b>' .htmlspeci alchars(st ripslashes ($newLangN ame)).'</b > language  has been  successful ly created .</font>';
1087       }   1018       }
1088     1019  
1089        function   getLangNam e($langID)
  1020        function   getLangNam e($langID)   {
1090       {   1021            $langName   =   db _
r es ('SELECT   `Name`   FROM   `Localizat ionLanguag es`   WHERE   `ID`   =   '.(int)$la ngID);
1091            $langName   =   mysql _ que r y ('SELECT   `Name`   FROM   `Localizat ionLanguag es`   WHERE   `ID`   =   '.(int)$la ngID);    
1092           $l angName =  mysql_fetc h_row($lan gName);   1022           $l angName =  mysql_fetc h_row($lan gName);
1093           re turn $lang Name[0];   1023           re turn $lang Name[0];
1094       }   1024       }
1095     1025  
1096       if ( $ _POST['Cop yLanguage' ] )   1026       if ( $ _POST['Cop yLanguage' ] )
1097       {    
1098           $r esultMsg =  copyLangu age();   1027           $r esultMsg =  copyLangu age();
1099       }   1028        else   if   (   isset($_PO ST['Compil eLanguage' ])   )   {
1100        else   if   (   isset($_PO ST['Compil eLanguage' ])   )
   
1101       {    
1102           $l angName =  getLangNam e($_POST[' CompileLan guage']);   1029           $l angName =  getLangNam e($_POST[' CompileLan guage']);
1103     1030  
1104           if  ( compile Language(( int)$_POST ['CompileL anguage'])  )   1031           if  ( compile Language(( int)$_POST ['CompileL anguage'])  )
1105           {    
1106                $resultM sg = '<fon t color="g reen"><b>' .htmlspeci alchars($l angName).' </b> langu age has be en success fully comp iled.</fon t>';   1032                $resultM sg = '<fon t color="g reen"><b>' .htmlspeci alchars($l angName).' </b> langu age has be en success fully comp iled.</fon t>';
1107           }    
1108           el se   1033           el se
1109           {    
1110                $resultM sg = '<fon t color="r ed>Error:  could not  compile a  language.< /font>';   1034                $resultM sg = '<fon t color="r ed>Error:  could not  compile a  language.< /font>';
1111           }   1035        }   else   if   (   isset($_PO ST['Delete Language'] )   )   {
1112       }    
1113       
else   if   (   isset($_PO ST['Delete Language'] )   )
   
1114       {    
1115           $l angName =  getLangNam e($_POST[' DeleteLang uage']);   1036           $l angName =  getLangNam e($_POST[' DeleteLang uage']);
1116     1037  
1117           if  ( $langNa me == getP aram('lang _default') )   1038           if  ( $langNa me == getP aram('lang _default') )
1118           {    
1119                $resultM sg = '<fon t color="r ed">Cannot  delete th e default  language.  You have t o set anot her defaul t language  for the s ite in <b> global set tings -> C hange lang uage setti ngs</b> to  be able t o delete t his one.</ font>';   1039                $resultM sg = '<fon t color="r ed">Cannot  delete th e default  language.  You have t o set anot her defaul t language  for the s ite in <b> global set tings -> C hange lang uage setti ngs</b> to  be able t o delete t his one.</ font>';
1120           }    
1121           el se   1040           el se
1122           {   1041           {
1123                if ( del eteLanguag e((int)$_P OST['Delet eLanguage' ]) )   1042                if ( del eteLanguag e((int)$_P OST['Delet eLanguage' ]) )
1124                {    
1125                    $res ultMsg = ' <font colo r="green"> <b>'.htmls pecialchar s($langNam e).'</b> l anguage ha s been suc cessfully  removed.</ font>';   1043                    $res ultMsg = ' <font colo r="green"> <b>'.htmls pecialchar s($langNam e).'</b> l anguage ha s been suc cessfully  removed.</ font>';
1126                }    
1127                else   1044                else
1128                {    
1129                    $res ultMsg = ' <font colo r="red">Er ror: could  not delet e a langua ge.</font> ';   1045                    $res ultMsg = ' <font colo r="red">Er ror: could  not delet e a langua ge.</font> ';
1130                }   1046           }
1131           }   1047       }
1132       }    
1133      
1134       ob_sta rt();    
1135     1048  
1136       $arrLa ngs = getL ocalizatio nLanguages ();    
1137          1049       
    1050       ob_sta rt();
1138       displa yLanguageS ettings();   1051       displa yLanguageS ettings();
    1052       $sCon1  = panelSe ction('Lan guage', ob _get_clean ());
1139          1053       
1140       $conte nts = ob_g et_content s();   1054       $arrLa ngs = getL angsArr(fa lse, true) ;
1141       ob_end _clean();    
1142      
1143       $sCon1  = panelSe ction('Lan guage', $c ontents);    
1144          1055  
1145       ob_sta rt();   1056       ob_sta rt();
1146   ?>   1057   ?>
1147   <form acti on="<?= $_ SERVER['PH P_SELF'] ? >" method= "post" sty le="margin :0px">   1058   <form acti on="<?= $_ SERVER['PH P_SELF'] ? >" method= "post" sty le="margin :0px">
1148   New langua ge:   1059       New la nguage:
1149   <input   type="text "   name="Copy Language_N ame"   style="wid th:   8 0px"   />   1060        <input   type="text "   name="Copy Language_N ame"   style="wid th:   10 0px"   />
1150   Copy from:   1061       Copy f rom:
1151   <select   name="Copy Language_S ourceLangI D"   style="wid th:   8 0px">   1062        <select   name="Copy Language_S ourceLangI D"   style="wid th:   10 0px">
1152   <?   1063            <?   foreach   ($arrLangs   as   $langID   =>   $langName)   {   ?>
1153       
foreach   ($arrLangs   as   $langID   =>   $langName)
   
1154       {    
1155   ?>    
1156       <optio n value="< ?= $langID  ?>"><?= h tmlspecial chars($lan gName) ?>< /option>   1064           <o ption valu e="<?= $la ngID ?>">< ?= htmlspe cialchars( $langName)  ?></optio n>
1157   <?
  1065            <?   }   ?>
1158       }    
1159   ?>    
1160   </select>   1066       </sele ct>
1161   Flag:    1067       Flag: 
1162   <?   1068   <?
1163   echo showL angIcons() ;   1069       echo s howLangIco ns();
1164   ?>   1070   ?>
1165   <br />   1071       <br />
1166   <br />   1072       <br />
1167   <center>   1073       <cente r>
1168   <input typ e="submit"  name="Cop yLanguage"  value="Cr eate" />   1074       <input  type="sub mit" name= "CopyLangu age" value ="Create"  />
1169   </center>   1075       </cent er>
1170   </form>   1076   </form>
1171   <br />   1077   <br />
1172   <?   1078   <?
1173        if   (   strlen($re sultMsg) >0   )   echo   $resultMsg .'<br   /><br   />';   1079        if   (   strlen($re sultMsg)  
)
    1080           ec ho $result Msg.'<br / ><br />';
1174   ?>   1081   ?>
1175   <table cla ss="Langua gesStrings " cellpadd ing="0" ce llspacing= "0">   1082   <table cla ss="Langua gesStrings " cellpadd ing="0" ce llspacing= "0">
1176       <tr cl ass="Heade rRow">   1083       <tr cl ass="Heade rRow">
1177           <t d width="8 5%" align= "left">Lan guage</td>   1084           <t d width="8 5%" align= "left">Lan guage</td>
1178           <t d width="1 5%" align= "left">Fla g</td>   1085           <t d width="1 5%" align= "left">Fla g</td>
1179           <t d colspan= "3">&nbsp; </td>   1086           <t d colspan= "3">&nbsp; </td>
1180       </tr>   1087       </tr>
1181   <?   1088   <?
1182        $resLangs   =   mysql _ que r y ('   1089        $resLangs   =   db _
r es ('
1183            SELECT   `ID`,   `Name`,   `Flag`
  1090            SELECT   `ID`,   `Name`,   `Flag` ,   `Title`
1184           FR OM `Locali zationLang uages`   1091           FR OM `Locali zationLang uages`
1185           OR DER BY `Na me`   1092           OR DER BY `Na me`
1186       ');   1093       ');
1187     1094  
1188       $defau ltLangName  = getPara m('lang_de fault');   1095       $defau ltLangName  = getPara m('lang_de fault');
1189     1096  
1190       while  ($arrLang  = mysql_fe tch_assoc( $resLangs) )   1097       while  ($arrLang  = mysql_fe tch_assoc( $resLangs) )
1191       {   1098       {
1192   ?>   1099   ?>
1193       <tr>   1100       <tr>
1194            < td   class="Lef t">< ?=   htmlspecia lchars($ar rLang['Nam e']). ($arrLang[ 'Name']   ==   $defaultLa ngName   ?   '<font   color="red ">   (default)< /font>'   :   '')   ?> </td>   1101           <t d class="L eft">
    1102                <?= html specialcha rs($arrLan g['Title'] ) ?>
    1103                [<?= $ar rLang['Nam e'] ?>]
    1104                 <
?=  
($arrLang[ 'Name']   ==   $defaultLa ngName   ?   '<font   color="red ">   (default)< /font>'   :   '')   ?>
    1105           </ td>
1195           <t d><img src ="<?= $sit e['flags'] .$arrLang[ 'Flag'].'. gif'?>"></ td>   1106           <t d><img src ="<?= $sit e['flags'] .$arrLang[ 'Flag'].'. gif'?>"></ td>
1196           <t d><a href= "javascrip t:void(0)"  onclick=" popupForm( '<?= $_SER VER['PHP_S ELF'] ?>?v iew=editLa nguage&edi tLanguageI D=<?= $arr Lang['ID']  ?>', 500,  300, 300,  200, 'no' ); return  false;">Ed it</a></td >   1107           <t d><a href= "javascrip t:void(0)"  onclick=" popupForm( '<?= $_SER VER['PHP_S ELF'] ?>?v iew=editLa nguage&edi tLanguageI D=<?= $arr Lang['ID']  ?>', 500,  300, 300,  200, 'no' ); return  false;">Ed it</a></td >
1197           <t d>   1108           <t d>
1198                <form id ="CompileF orm_<?= $a rrLang['ID '] ?>" act ion="<?= $ _SERVER['P HP_SELF']  ?>" method ="post" st yle="paddi ng: 0px; m argin: 0px ">   1109                <form id ="CompileF orm_<?= $a rrLang['ID '] ?>" act ion="<?= $ _SERVER['P HP_SELF']  ?>" method ="post" st yle="paddi ng: 0px; m argin: 0px ">
1199                    <inp ut type="h idden" nam e="Compile Language"  value="<?=  $arrLang[ 'ID'] ?>"  />   1110                    <inp ut type="h idden" nam e="Compile Language"  value="<?=  $arrLang[ 'ID'] ?>"  />
1200                </form>   1111                </form>
1201                <a href= "javascrip t:void(0)"  onclick=" document.g etElementB yId('Compi leForm_<?=  $arrLang[ 'ID'] ?>') .submit();  return fa lse;">Comp ile</a>   1112                <a href= "javascrip t:void(0)"  onclick=" document.g etElementB yId('Compi leForm_<?=  $arrLang[ 'ID'] ?>') .submit();  return fa lse;">Comp ile</a>
1202           </ td>   1113           </ td>
1203           <t d>   1114           <t d>
1204                <form id ="DeleteFo rm_<?= $ar rLang['ID' ] ?>" acti on="<?= $_ SERVER['PH P_SELF'] ? >" method= "post" sty le="paddin g: 0px; ma rgin: 0px" >   1115                <form id ="DeleteFo rm_<?= $ar rLang['ID' ] ?>" acti on="<?= $_ SERVER['PH P_SELF'] ? >" method= "post" sty le="paddin g: 0px; ma rgin: 0px" >
1205                    <inp ut type="h idden" nam e="DeleteL anguage" v alue="<?=  $arrLang[' ID'] ?>" / >   1116                    <inp ut type="h idden" nam e="DeleteL anguage" v alue="<?=  $arrLang[' ID'] ?>" / >
1206                </form>   1117                </form>
1207                <a href= "javascrip t:void(0)"  onclick=" document.g etElementB yId('Delet eForm_<?=  $arrLang[' ID'] ?>'). submit();  return fal se;"><font  color="re d">Delete< /font></a>   1118                <a href= "javascrip t:void(0)"  onclick=" document.g etElementB yId('Delet eForm_<?=  $arrLang[' ID'] ?>'). submit();  return fal se;"><font  color="re d">Delete< /font></a>
1208           </ td>   1119           </ td>
1209       </tr>   1120       </tr>
1210   <?   1121   <?
1211       }   1122       }
1212   ?>   1123   ?>
1213   </table>   1124   </table>
1214   <?   1125   <?
1215       $conte nts = ob_g et_content s();    
1216       ob_end _clean();    
1217     1126       
1218        $sCon2   =   panelSecti on('Langua ge   Files',   $c o n t
e
n ts );
  1127        $sCon2   =   panelSecti on('Langua ge   Files',  
o b_ge t _cl e a n () );
1219          1128       
1220       return  $sCon1.$s Con2;   1129       return  $sCon1.$s Con2;
1221   }   1130   }
1222     1131  
1223   function p anelSectio n($header,  $content,  $padding  = 10)   1132   function p anelSectio n($header,  $content,  $padding  = 10)
1224   {   1133   {
1225       ob_sta rt();   1134       ob_sta rt();
1226          1135       
1227       Conten tBlockHead ("$header" );   1136       Conten tBlockHead ("$header" );
1228       echo $ content;   1137       echo $ content;
1229       Conten tBlockFoot ();   1138       Conten tBlockFoot ();
1230     1139  
1231        $ ret   =   ob_get_c ont e
n ts ();
  1140       
ret urn   ob_get_c l e a n
();
1232       ob_end _clean();    
1233      
1234       return  $ret;    
1235   }   1141   }
1236     1142  
1237   function s howLangIco ns($sCurLa ng = '')   1143   function s howLangIco ns($sCurLa ng = '')
1238   {   1144   {
1239       global  $site;   1145       global  $site;
1240          1146       
1241       $sCode  = '';   1147       $sCode  = '';
1242     1148  
1243       $sQuer y = "SELEC T `ISO2`,  `Country`  FROM `Coun tries` ORD ER BY `Cou ntry`";   1149       $sQuer y = "SELEC T `ISO2`,  `Country`  FROM `Coun tries` ORD ER BY `Cou ntry`";
1244       $rCoun tryList =  db_res($sQ uery);   1150       $rCoun tryList =  db_res($sQ uery);
1245          1151       
1246       $sOnCh ange = "on Change=\"j avascript:  flagImage  = documen t.getEleme ntById('fl agImageId' ); flagIma ge.src = ' {$site['fl ags']}' +  this.value  + '.gif'; \"";   1152       $sOnCh ange = "on Change=\"j avascript:  flagImage  = documen t.getEleme ntById('fl agImageId' ); flagIma ge.src = ' {$site['fl ags']}' +  this.value  + '.gif'; \"";
1247          1153       
1248        $sCode   =   '<select   name="Flag "   id="Flag"   style="wid th:
80px;"   '.$sOnChan ge.'>';
  1154        $sCode   =   '<select   name="Flag "   id="Flag"   style="wid th: 1 80px;"   '.$sOnChan ge.'>';
1249        if   (strlen($s CurLang)   >   0 )   1155        if   (strlen($s CurLang)
)
1250       {    
1251           $s DefC = $sC urLang;   1156           $s DefC = $sC urLang;
1252       }    
1253       else   1157       else
1254       {    
1255           $s DefC = str tolower(ge tParam( 'd efault_cou ntry' ));   1158           $s DefC = str tolower(ge tParam( 'd efault_cou ntry' ));
1256       }    
1257              1159       
1258        while($aLi st   =   mysql_fetc h_array($r CountryLis t))
  1160        while($aLi st   =   mysql_fetc h_array($r CountryLis t))   {
1259       {    
1260           $s FlagCode =  strtolowe r($aList[' ISO2']);   1161           $s FlagCode =  strtolowe r($aList[' ISO2']);
1261           $s Select = $ sDefC == $ sFlagCode  ? 'selecte d="selecte d"' : '' ;   1162           $s Select = $ sDefC == $ sFlagCode  ? 'selecte d="selecte d"' : '' ;
1262           $s Code .= '< option val ue="'.$sFl agCode.'"  '.$sSelect .'>'.$aLis t['Country '].'</opti on>';   1163           $s Code .= '< option val ue="'.$sFl agCode.'"  '.$sSelect .'>'.$aLis t['Country '].'</opti on>';
1263           $s Select = ' ';   1164           $s Select = ' ';
1264       }   1165       }
    1166       
1265       $sCode  .= '</sel ect>';   1167       $sCode  .= '</sel ect>';
1266       $sImag eCode = '< img id="fl agImageId"  src="'. ( $site['fla gs']) .$sD efC.'.gif"  alt="flag " />';   1168       $sImag eCode = '< img id="fl agImageId"  src="'. ( $site['fla gs']) .$sD efC.'.gif"  alt="flag " />';
1267       $sCode  .= '&nbsp ;'.$sImage Code;   1169       $sCode  .= '&nbsp ;'.$sImage Code;
1268     1170  
1269       return  $sCode;   1171       return  $sCode;
1270   }   1172   }
1271     1173  
1272   function d isplayLang uageSettin gs()   1174   function d isplayLang uageSettin gs()
1273   {   1175   {
1274       ?>   1176       ?>
1275       <cente r>   1177       <cente r>
1276       <form  method="po st" action ="<? echo  $_SERVER[P HP_SELF].' ?cat=ls';  ?>">   1178       <form  method="po st" action ="<? echo  $_SERVER[P HP_SELF].' ?cat=ls';  ?>">
1277       <input  type="hid den" name= "save_sett ings" valu e="yes">   1179       <input  type="hid den" name= "save_sett ings" valu e="yes">
1278       <table  width="10 0%" cellsp acing="2"  cellpaddin g="3" clas s="text">   1180       <table  width="10 0%" cellsp acing="2"  cellpaddin g="3" clas s="text">
1279           <! --<tr clas s="panel">    
1280                <td cols pan=2><b>  Change lan guage sett ings </b>< /td>    
1281           </ tr>-->    
1282           <t r class="t able">   1181           <t r class="t able">
1283                <td alig n="right"  width="50% "> <?php e cho getPar amDesc("la ng_default ") ?>: </t d>   1182                <td alig n="right"  width="50% "> <?php e cho getPar amDesc("la ng_default ") ?>: </t d>
1284                <td alig n="left">   1183                <td alig n="left">
1285                    <sel ect name=" lang_defau lt">   1184                    <sel ect name=" lang_defau lt">
1286                         <?php   1185                         <?php
1287                         $ l ang _arr   =   getL ocalizatio nL ang uage s
();
  1186                         $ aL ang s   =   getL
ang
s Arr ();
1288                         $ old_v a l   =   getParam( " lang_defau lt " );   1187                         $ sCurL a ng   =   getParam(   ' lang_defau lt '   );
1289                         foreach ($ lang_arr a s $val)   1188  
                     
1290                         {   1189                         foreach( $ aLangs as  $sName =>  $sTitle )  {
1291                              if ($old_v al == $val )   1190                             $sSele cted = ( $ sName == $ sCurLang )  ? 'select ed="select ed"' : '';
1292                              {   1191                              ?>
1293                                  echo   " <option   value= \ "
$ v a l\ "  
s
elected
> $v al
</option> \n";
  1192                             
<option   value=
" <?=   $ sN a me   ?> "   <?=   $ s S elected   ? > ><?=   htmlspeci al chars_adv(   $sTitle   )   ?> </option>
1294                             }   1193                              <?
1295                             else    
1296                             {    
1297                                 ec ho "<optio n value=\" $val\">$va l</option> ";    
1298                              }    
1299                         }   1194                         }
1300                         ?>   1195                         ?>
1301                    </se lect>   1196                    </se lect>
1302                </td>   1197                </td>
1303           </ tr>   1198           </ tr>
1304           <t r class="t able">    
1305                <td alig n="right"  width="30% "> <?=getP aramDesc(" lang_enabl e") ?>: </ td>    
1306                <td alig n="left">    
1307                    <inp ut type="c heckbox" n ame="lang_ enable" <? =(getParam ("lang_ena ble")==1?" checked":" ")?>>    
1308                </td>    
1309           </ tr>    
1310       </tabl e>   1199       </tabl e>
1311       <br />   1200       <br />
1312       <input  class=no  type="subm it" value= "Save chan ges" name= "saveLangC hanges" cl ass=text>   1201       <input  class=no  type="subm it" value= "Save chan ges" name= "saveLangC hanges" cl ass=text>
1313       </form >   1202       </form >
1314       </cent er>   1203       </cent er>
1315       <?php   1204       <?php
1316          1205       
1317       return  'Language s';   1206       return  'Language s';
1318   }   1207   }
1319     1208  
1320   function s aveLanguag eSettings( )   1209   function s aveLanguag eSettings( )
1321   {   1210   {
1322       // sav e default  language.   1211       // sav e default  language.
1323       if ($_ POST['lang _default'] )   1212       if ($_ POST['lang _default'] )
1324       {   1213            setParam (' la n g_default ' ,   $_POST['la ng_ d e f a u l t ']) ;
1325           se tparam('la ng_default ', $_POST[ 'lang_defa ult']);    
1326       }    
1327       //    
1328        if   (' o n
'   ==   $_POST['la ng_
e n a b l e '])
   
1329       {    
1330           se tparam('la ng_enable' , '1');    
1331       }    
1332       else    
1333       {    
1334           se tparam('la ng_enable' , '0');    
1335       }    
1336      
1337      // echo  '<div cla ss="succ"> Language s ettings ch anged.</di v><br />';    
1338   }   1214   }
1339     1215  
1340   function q uickHelp()   1216   function q uickHelp()
1341   {   1217   {
1342       ob_sta rt();   1218       ob_sta rt();
1343   ?>   1219   ?>
1344   <h3 style= "font: Ari al"><font  size="3" f ace="Arial " color="b lack">What  you shoul d know abo ut the new  <b>Dolphi n</b> lang uage manag ement syst em.</font> </h3>   1220   <h3 style= "font: Ari al"><font  size="3" f ace="Arial " color="b lack">What  you shoul d know abo ut the new  <b>Dolphi n</b> lang uage manag ement syst em.</font> </h3>
1345   <font size ="2" face= "Arial" co lor="black ">   1221   <font size ="2" face= "Arial" co lor="black ">
1346   The new <b >Dolphin</ b> languag e manageme nt system  is develop ed to ease  your work  with lang uage   1222   The new <b >Dolphin</ b> languag e manageme nt system  is develop ed to ease  your work  with lang uage
1347   strings by  managing  them via t his specia lly design ed web int erface rat her than e diting the m directly   1223   strings by  managing  them via t his specia lly design ed web int erface rat her than e diting the m directly
1348   in a langu age file,  unlike it  was in pre vious <b>D olphin</b>  versions.  Note that , in <b>Do lphin</b>,   1224   in a langu age file,  unlike it  was in pre vious <b>D olphin</b>  versions.  Note that , in <b>Do lphin</b>,
1349   you should  <b>NOT</b > edit lan guage file s manually  – they’re  now used  by   1225   you should  <b>NOT</b > edit lan guage file s manually  – they’re  now used  by
1350   the script  as tempor ary files  with parti al languag e informat ion only f or the sak e of perfo rmance.   1226   the script  as tempor ary files  with parti al languag e informat ion only f or the sak e of perfo rmance.
1351   All necess ary langua ge informa tion is no w stored i n the data base and c an be mana ged via th is web int erface.   1227   All necess ary langua ge informa tion is no w stored i n the data base and c an be mana ged via th is web int erface.
1352   <br /><br  />   1228   <br /><br  />
1353   You can se e an optio n of compi ling langu ages in th e top sect ion of the  language  management  interface .   1229   You can se e an optio n of compi ling langu ages in th e top sect ion of the  language  management  interface .
1354   <b>Compili ng a langu age</b> me ans creati ng and wri ting a fre sh version  of a corr esponding  language f ile   1230   <b>Compili ng a langu age</b> me ans creati ng and wri ting a fre sh version  of a corr esponding  language f ile
1355   in the <b> langs</b>  folder of  the script  with the  updated in formation  about lang uage strin gs and key s   1231   in the <b> langs</b>  folder of  the script  with the  updated in formation  about lang uage strin gs and key s
1356   stored in  the databa se. After  you change /add a lan guage stri ng or a la nguage key , a corres ponding la nguage   1232   stored in  the databa se. After  you change /add a lan guage stri ng or a la nguage key , a corres ponding la nguage
1357   file (or f iles) need s to be re compiled s o the chan ges are ap plied and  shown on t he pages w here that  string   1233   file (or f iles) need s to be re compiled s o the chan ges are ap plied and  shown on t he pages w here that  string
1358   is used. A t the bott om of the  forms for  editing an d adding l anguage st rings/keys  there are  checkboxe s that   1234   is used. A t the bott om of the  forms for  editing an d adding l anguage st rings/keys  there are  checkboxe s that
1359   specify wh ether to r ecompile c orrespondi ng languag e files au tomaticall y after th e changes  are saved.  These   1235   specify wh ether to r ecompile c orrespondi ng languag e files au tomaticall y after th e changes  are saved.  These
1360   checkboxes  are check ed by defa ult. You c an uncheck  them befo re submitt ing a form  not to re compile la nguage   1236   checkboxes  are check ed by defa ult. You c an uncheck  them befo re submitt ing a form  not to re compile la nguage
1361   files ever y time in  case you’r e editing  a lot of l anguage st rings one  by one. Th is option  is availab le   1237   files ever y time in  case you’r e editing  a lot of l anguage st rings one  by one. Th is option  is availab le
1362   because co mpiling a  language f ile is a r elatively  resource-i ntensive p rocess, so  you bette r recompil e   1238   because co mpiling a  language f ile is a r elatively  resource-i ntensive p rocess, so  you bette r recompil e
1363   language f iles once  after you’ ve finishe d with edi ting langu age string s rather t han loadin g your ser ver by   1239   language f iles once  after you’ ve finishe d with edi ting langu age string s rather t han loadin g your ser ver by
1364   recompilin g language  files aft er editing  each stri ng.</font>   1240   recompilin g language  files aft er editing  each stri ng.</font>
1365     1241  
1366   <?   1242   <?
1367       $conte nts = ob_g et_content s();   1243       $conte nts = ob_g et_content s();
1368       ob_end _clean();   1244       ob_end _clean();
1369     1245  
1370       return  PopupPage Template(' Language M anagement  System Not es', $cont ents);   1246       return  PopupPage Template(' Language M anagement  System Not es', $cont ents);
1371   }   1247   }
1372     1248  
1373   $logged['a dmin']   =   member_aut h(1
);
  1249   $logged['a dmin']   =   member_aut h(   1 ,   true,   true   );
1374     1250  
1375   $_page['he ader'] = ' Manage Lan guages'; / / Set page  title.   1251   $_page['he ader'] = ' Manage Lan guages'; / / Set page  title.
1376     1252  
1377   if ($_POST ['saveLang Changes'])   1253   if ($_POST ['saveLang Changes'])
1378   {    
1379       saveLa nguageSett ings();   1254       saveLa nguageSett ings();
1380   }   1255  
1381   // add/edi t a langua ge string   1256   // add/edi t a langua ge string
1382   if   (   $_GET['vie w']   ==   'addLangKe y'   )
  1257   if   (   $_GET['vie w']   ==   'addLangKe y'   )   {
1383   {    
1384       echo a ddLangKeyF orm();   1258       echo a ddLangKeyF orm();
1385       exit() ;   1259       exit() ;
1386   }   1260   }   else   if   (   $_GET['vie w']   ==   'editLangS tring')   {
1387  
else   if   (   $_GET['vie w']   ==   'editLangS tring')
   
1388   {    
1389       echo e ditStringF orm();   1261       echo e ditStringF orm();
1390       exit() ;   1262       exit() ;
1391   }   1263   }   else   if   (   $_GET['vie w']   ==   'editLangu age'   )   {
1392  
else   if   (   $_GET['vie w']   ==   'editLangu age'   )
   
1393   {    
1394       echo e ditLanguag eForm();   1264       echo e ditLanguag eForm();
1395       exit() ;   1265       exit() ;
1396   }   1266   }   else   if   (   $_GET['vie w']   ==   'addLangua geKey'   )   {
1397  
else   if   (   $_GET['vie w']   ==   'addLangua geKey'   )
   
1398   {    
1399       echo a ddLangKeyF orm();   1267       echo a ddLangKeyF orm();
1400       exit() ;   1268       exit() ;
1401   }   1269   }   else   if   (   $_GET['vie w']   ==   'quickHelp '   )   {
1402  
else   if   (   $_GET['vie w']   ==   'quickHelp '   )
   
1403   {    
1404       echo q uickHelp() ;   1270       echo q uickHelp() ;
1405       exit() ;   1271       exit() ;
1406   }   1272   }
1407     1273  
1408   // INPUT V ALIDATION   1274   // INPUT V ALIDATION
1409     1275  
1410   $searchStr ing = $_GE T['find'];   1276   $searchStr ing = $_GE T['find'];
1411     1277  
1412   $searchCom bineWordsA s = $_GET[ 'words'];   1278   $searchCom bineWordsA s = $_GET[ 'words'];
1413     1279  
1414   if   ($searchCo mbineWords As   !=   SEARCH_COM BINE_WORDS _AS_AND   &&
  1280   if   ($searchCo mbineWords As   !=   SEARCH_COM BINE_WORDS _AS_AND   &&   $searchCom bineWordsA s   !=   SEARCH_COM BINE_WORDS _AS_OR)
1415       $searc hCombineWo rdsAs != S EARCH_COMB INE_WORDS_ AS_OR)    
1416   {    
1417       $searc hCombineWo rdsAs = SE ARCH_COMBI NE_WORDS_A S_EXACT;   1281       $searc hCombineWo rdsAs = SE ARCH_COMBI NE_WORDS_A S_EXACT;
1418   }    
1419     1282  
1420   $searchSho wAdvancedS ettings =  $_GET['set tings'] ==  'yes' ? t rue : fals e;   1283   $searchSho wAdvancedS ettings =  $_GET['set tings'] ==  'yes' ? t rue : fals e;
1421     1284  
1422   $searchInK eys = $_GE T['keys']  == 'yes' ?  true : fa lse;   1285   $searchInK eys = $_GE T['keys']  == 'yes' ?  true : fa lse;
1423   $searchInS trings = $ _GET['stri ngs'] == ' yes' ? tru e : false;   1286   $searchInS trings = $ _GET['stri ngs'] == ' yes' ? tru e : false;
1424   $searchInP arams = $_ GET['param s'] == 'ye s' ? true  : false;   1287   $searchInP arams = $_ GET['param s'] == 'ye s' ? true  : false;
1425     1288  
1426   if (!$sear chInKeys & & !$search InStrings  && !$searc hInParams)   1289   if (!$sear chInKeys & & !$search InStrings  && !$searc hInParams)
1427   {    
1428       $searc hInKeys =  $searchInS trings = $ searchInPa rams = tru e;   1290       $searc hInKeys =  $searchInS trings = $ searchInPa rams = tru e;
1429   }    
1430     1291  
1431   $searchCat egories =  validateLi stArray($_ GET['sCats ']);   1292   $searchCat egories =  validateLi stArray($_ GET['sCats ']);
1432   $searchLan guages = v alidateLis tArray($_G ET['sLangs ']);   1293   $searchLan guages = v alidateLis tArray($_G ET['sLangs ']);
1433     1294  
1434   TopCodeAdm in();   1295   TopCodeAdm in();
1435     1296  
1436   ?>   1297   ?>
1437   <style typ e="text/cs s">   1298   <style typ e="text/cs s">
1438   table.Lang uagesStrin gs   1299   table.Lang uagesStrin gs
1439   {   1300   {
1440       width:  100%;   1301       width:  100%;
1441   }   1302   }
1442     1303  
1443   table.Lang uagesStrin gs td   1304   table.Lang uagesStrin gs td
1444   {   1305   {
1445       border -right: 1p x solid si lver;   1306       border -right: 1p x solid si lver;
1446       border -bottom: 1 px solid s ilver;   1307       border -bottom: 1 px solid s ilver;
1447       paddin g: 2px;   1308       paddin g: 2px;
1448       backgr ound-color : #f5f5f5;   1309       backgr ound-color : #f5f5f5;
1449   }   1310   }
1450     1311  
1451   table.Lang uagesStrin gs td.Left   1312   table.Lang uagesStrin gs td.Left
1452   {   1313   {
1453       border -left: 1px  solid sil ver;   1314       border -left: 1px  solid sil ver;
1454   }   1315   }
1455     1316  
1456   table.Lang uagesStrin gs tr.Head erRow td   1317   table.Lang uagesStrin gs tr.Head erRow td
1457   {   1318   {
1458       font-w eight: bol d;   1319       font-w eight: bol d;
1459       backgr ound-color : #ccccde;   1320       backgr ound-color : #ccccde;
1460       border : 1px soli d silver;   1321       border : 1px soli d silver;
1461   }   1322   }
1462   </style>   1323   </style>
1463     1324  
1464   <script ty pe="text/j avascript" >   1325   <script ty pe="text/j avascript" >
1465   function p opupForm(u rl, left,  top, width , height,  scrollbars )   1326   function p opupForm(u rl, left,  top, width , height,  scrollbars )
1466   {   1327   {
1467       var wi nSettings  = "width=" +width+   1328       var wi nSettings  = "width=" +width+
1468       ", hei ght="+heig ht+   1329       ", hei ght="+heig ht+
1469       ", lef t="+left+   1330       ", lef t="+left+
1470       ", top ="+top+   1331       ", top ="+top+
1471       ", scr ollbars="+ scrollbars +   1332       ", scr ollbars="+ scrollbars +
1472       ", cop yhistory=n o, directo ries=no, m enubar=no,  location= no, resiza ble=no";   1333       ", cop yhistory=n o, directo ries=no, m enubar=no,  location= no, resiza ble=no";
1473       window .open(url,  'editStri ng', winSe ttings);   1334       window .open(url,  'editStri ng', winSe ttings);
1474       return  false;   1335       return  false;
1475   }   1336   }
1476   </script>   1337   </script>
1477     1338  
1478     1339  
1479   <?   1340   <?
1480   ContentBlo ckHead("Pl ease Pay A ttention") ;   1341   ContentBlo ckHead("Pl ease Pay A ttention") ;
1481   ?>   1342   ?>
1482   <b>IMPORTA NT:</b> <a  href="jav ascript:vo id(0)" onc lick="popu pForm('<?=  $_SERVER[ 'PHP_SELF' ] ?>?view= quickHelp' , 350, 100 , 500, 600 , 'yes');  return fal se;">What  you should  know abou t the <b>D olphin</b>  language  management  system.</ a>   1343   <b>IMPORTA NT:</b> <a  href="jav ascript:vo id(0)" onc lick="popu pForm('<?=  $_SERVER[ 'PHP_SELF' ] ?>?view= quickHelp' , 350, 100 , 500, 600 , 'yes');  return fal se;">What  you should  know abou t the <b>D olphin</b>  language  management  system.</ a>
1483     1344  
1484   <?   1345   <?
1485   ContentBlo ckFoot();   1346   ContentBlo ckFoot();
1486   echo manag eLanguages Block();   1347   echo manag eLanguages Block();
1487     1348  
1488   echo searc hBlock();   1349   echo searc hBlock();
1489     1350  
1490   echo strin gTableBloc k($_GET['s howMoreTha nMax']=='y es' ? true  : false);   1351   echo strin gTableBloc k($_GET['s howMoreTha nMax']=='y es' ? true  : false);
1491     1352  
1492   BottomCode ();   1353   BottomCode ();
1493   ?>