2. Araxis Merge File Comparison Report

Produced by Araxis Merge on Mon May 18 06:28:19 2009 UTC. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Firefox or Internet Explorer. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

2.1 Files compared

# Location File Last Modified
1 D:\Dolphin-v.6.1.5\admin lang_file.php Fri May 1 05:23:59 2009 UTC
2 D:\Dolphin-v.6.1.6\admin lang_file.php Thu May 14 05:32:07 2009 UTC

2.2 Comparison summary

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

2.3 Comparison options

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

2.4 Active regular expressions

No regular expressions were active.

2.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   function m essageTemp late($mess age)   34   function m essageTemp late($mess age)
35   {   35   {
36           ob _start();   36           ob _start();
37              37           
38           ?>   38           ?>
39           <d iv style=" text-align :center;fo nt-family: Arial;font -size:12px ;height:10 0%;width:1 00%;margin :0px;paddi ng:0px;mar gin-top:40 %;">   39           <d iv style=" text-align :center;fo nt-family: Arial;font -size:12px ;height:10 0%;width:1 00%;margin :0px;paddi ng:0px;mar gin-top:40 %;">
40                    <?=  $message ? >   40                    <?=  $message ? >
41           </ div>   41           </ div>
42           <?   42           <?
43     43  
44           re turn ob_ge t_clean();   44           re turn ob_ge t_clean();
45   }   45   }
46     46  
47   /**   47   /**
48    * 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.
49    *   49    *
50    * @param  array $arr ay   50    * @param  array $arr ay
51    * @return       arra y( 0 => tr ue) if the  original  array cont ained non- integers   51    * @return       arra y( 0 => tr ue) if the  original  array cont ained non- integers
52    *                        array(  int_key = > true) if  the origi nal array  was OK   52    *                        array(  int_key = > true) if  the origi nal array  was OK
53    */   53    */
54   function v alidateLis tArray($ar ray)   54   function v alidateLis tArray($ar ray)
55   {   55   {
56           if (is_array( $array)) {   56           if (is_array( $array)) {
57                    $tmp  = array() ;   57                    $tmp  = array() ;
58                    fore ach ($arra y as $valu e) {   58                    fore ach ($arra y as $valu e) {
59                             $iVal  = (int)$va lue;   59                             $iVal  = (int)$va lue;
60                             if($iV al != $val ue) return  array(0 = > true);   60                             if($iV al != $val ue) return  array(0 = > true);
61                             $tmp[$ iVal] = tr ue;   61                             $tmp[$ iVal] = tr ue;
62                    }   62                    }
63                    $arr ay = $tmp;   63                    $arr ay = $tmp;
64           }   64           }
65     65  
66           re turn count ($array) < = 0 || iss et($array[ 0]) ? arra y(0 => tru e) : $arra y;   66           re turn count ($array) < = 0 || iss et($array[ 0]) ? arra y(0 => tru e) : $arra y;
67   }   67   }
68     68  
69   function f indLangStr ings(   69   function f indLangStr ings(
70           $s earchText,   70           $s earchText,
71           $g roupWords  = SEARCH_C OMBINE_WOR DS_AS_EXAC T,   71           $g roupWords  = SEARCH_C OMBINE_WOR DS_AS_EXAC T,
72           $s earchInKey s = true,   72           $s earchInKey s = true,
73           $s earchInStr ings = tru e,   73           $s earchInStr ings = tru e,
74           $s earchInPar ams = true ,   74           $s earchInPar ams = true ,
75           $a rrCategory IDs = null ,   75           $a rrCategory IDs = null ,
76           $a rrLanguage IDs = null   76           $a rrLanguage IDs = null
77           )  {   77           )  {
78              78           
79           fu nction sql LikeClause ($fieldNam e, $arrWor ds, $group Words) {   79           fu nction sql LikeClause ($fieldNam e, $arrWor ds, $group Words) {
80                    if ( !is_array( $arrWords)  || strlen ($fieldNam e) <= 0) r eturn '';   80                    if ( !is_array( $arrWords)  || strlen ($fieldNam e) <= 0) r eturn '';
81     81  
82                    swit ch ($group Words) {   82                    swit ch ($group Words) {
83                             case S EARCH_COMB INE_WORDS_ AS_AND: $s ql = implo de("%' AND  $fieldNam e LIKE '%" , $arrWord s);   83                             case S EARCH_COMB INE_WORDS_ AS_AND: $s ql = implo de("%' AND  $fieldNam e LIKE '%" , $arrWord s);
84                                      break;   84                                      break;
85                             case S EARCH_COMB INE_WORDS_ AS_OR: $sq l = implod e("%' OR $ fieldName  LIKE '%",  $arrWords) ;   85                             case S EARCH_COMB INE_WORDS_ AS_OR: $sq l = implod e("%' OR $ fieldName  LIKE '%",  $arrWords) ;
86                                      break;   86                                      break;
87                             defaul t: $sql =  implode('  ', $arrWor ds);   87                             defaul t: $sql =  implode('  ', $arrWor ds);
88                    }   88                    }
89     89  
90                    $sql  = "($fiel dName LIKE  '%$sql%') ";   90                    $sql  = "($fiel dName LIKE  '%$sql%') ";
91     91  
92                    retu rn $sql;   92                    retu rn $sql;
93           }   93           }
94     94  
95           fu nction sql InClause($ fieldName,  $arrIDs)  {   95           fu nction sql InClause($ fieldName,  $arrIDs)  {
96                    $sql  = '';   96                    $sql  = '';
97     97  
98                    $sql Valid = fa lse;   98                    $sql Valid = fa lse;
99     99  
100                    if(i s_array($a rrIDs))   100                    if(i s_array($a rrIDs))
101                    {   101                    {
102                             $sql =  "($fieldN ame IN(";   102                             $sql =  "($fieldN ame IN(";
103     103  
104                             foreac h ($arrIDs  as $ID =>  $val)   104                             foreac h ($arrIDs  as $ID =>  $val)
105                             {   105                             {
106                                      $ID = (i nt)$ID;   106                                      $ID = (i nt)$ID;
107     107  
108                                      if($ID < = 0) conti nue;   108                                      if($ID < = 0) conti nue;
109     109  
110                                      $sqlVali d = true;   110                                      $sqlVali d = true;
111     111  
112                                      $sql .=  $ID.',';   112                                      $sql .=  $ID.',';
113                             }   113                             }
114                             $sql =  trim($sql ,',');   114                             $sql =  trim($sql ,',');
115                             $sql . = '))';   115                             $sql . = '))';
116                    }   116                    }
117     117  
118                    retu rn $sqlVal id ? $sql  : '';   118                    retu rn $sqlVal id ? $sql  : '';
119           }   119           }
120     120  
121           fu nction imp lodeNonEmp ty($strGlu e, $arr) {   121           fu nction imp lodeNonEmp ty($strGlu e, $arr) {
122                    fore ach ($arr  as $key =>  $val)   122                    fore ach ($arr  as $key =>  $val)
123                             if (st rlen($val)  <= 0) uns et($arr[$k ey]);   123                             if (st rlen($val)  <= 0) uns et($arr[$k ey]);
124     124  
125                    retu rn implode ($strGlue,  $arr);   125                    retu rn implode ($strGlue,  $arr);
126           }   126           }
127     127  
128           if  ( strlen( $searchTex t) > 0 ) {   128           if  ( strlen( $searchTex t) > 0 ) {
129                    $sea rchText =  addslashes ($searchTe xt);   129                    $sea rchText =  addslashes ($searchTe xt);
130     130  
131                    $lik eWildcards  = array ( '%', '_');   131                    $lik eWildcards  = array ( '%', '_');
132                    $lik eWildcards Escaped =  array('\%' , '\_');   132                    $lik eWildcards Escaped =  array('\%' , '\_');
133     133  
134                    $sea rchText =  str_replac e($likeWil dcards, $l ikeWildcar dsEscaped,  $searchTe xt);   134                    $sea rchText =  str_replac e($likeWil dcards, $l ikeWildcar dsEscaped,  $searchTe xt);
135     135  
136                    $arr Words = pr eg_split(" /\s+/", $s earchText,  -1, PREG_ SPLIT_NO_E MPTY);   136                    $arr Words = pr eg_split(" /\s+/", $s earchText,  -1, PREG_ SPLIT_NO_E MPTY);
137                       137                    
138                    fore ach( $arrW ords as $k ey => $val  )   138                    fore ach( $arrW ords as $k ey => $val  )
139                             $arrWo rds[$key]  = strtoupp er( $val ) ;   139                             $arrWo rds[$key]  = strtoupp er( $val ) ;
140                       140                    
141                    $sql SearchInKe ys = $sear chInKeys ?  sqlLikeCl ause('UPPE R(`Localiz ationKeys` .`Key`)',  $arrWords,  $groupWor ds) : '';   141                    $sql SearchInKe ys = $sear chInKeys ?  sqlLikeCl ause('UPPE R(`Localiz ationKeys` .`Key`)',  $arrWords,  $groupWor ds) : '';
142                    $sql SearchInSt rings = $s earchInStr ings ? sql LikeClause ('UPPER(`L ocalizatio nStrings`. `String`)' , $arrWord s, $groupW ords) : '' ;   142                    $sql SearchInSt rings = $s earchInStr ings ? sql LikeClause ('UPPER(`L ocalizatio nStrings`. `String`)' , $arrWord s, $groupW ords) : '' ;
143                    $sql SearchInPa rams = $se archInPara ms ? sqlLi keClause(' UPPER(`Loc alizationS tringParam s`.`Descri ption`)',  $arrWords,  $groupWor ds) : '';   143                    $sql SearchInPa rams = $se archInPara ms ? sqlLi keClause(' UPPER(`Loc alizationS tringParam s`.`Descri ption`)',  $arrWords,  $groupWor ds) : '';
144     144  
145                    $sql SearchClau se = implo deNonEmpty (' OR ', a rray($sqlS earchInKey s, $sqlSea rchInStrin gs, $sqlSe archInPara ms));   145                    $sql SearchClau se = implo deNonEmpty (' OR ', a rray($sqlS earchInKey s, $sqlSea rchInStrin gs, $sqlSe archInPara ms));
146     146  
147                    $sql SearchClau se = "($sq lSearchCla use)";   147                    $sql SearchClau se = "($sq lSearchCla use)";
148           }  else   148           }  else
149                    $sql SearchClau se = '';   149                    $sql SearchClau se = '';
150     150  
151           $s qlSearchIn Categories  = sqlInCl ause('`Loc alizationC ategories` .`ID`', $a rrCategory IDs);   151           $s qlSearchIn Categories  = sqlInCl ause('`Loc alizationC ategories` .`ID`', $a rrCategory IDs);
152           $s qlSearchIn Languages  = sqlInCla use('`Loca lizationLa nguages`.` ID`', $arr LanguageID s);   152           $s qlSearchIn Languages  = sqlInCla use('`Loca lizationLa nguages`.` ID`', $arr LanguageID s);
153     153  
154           $s qlWhereCla use = impl odeNonEmpt y(' AND ',  array($sq lSearchCla use, $sqlS earchInCat egories, $ sqlSearchI nLanguages ));   154           $s qlWhereCla use = impl odeNonEmpt y(' AND ',  array($sq lSearchCla use, $sqlS earchInCat egories, $ sqlSearchI nLanguages ));
155     155  
156           if  ( strlen( $sqlWhereC lause) )   156           if  ( strlen( $sqlWhereC lause) )
157                    $sql WhereClaus e = "WHERE  $sqlWhere Clause ";   157                    $sql WhereClaus e = "WHERE  $sqlWhere Clause ";
158           el se   158           el se
159                    $sql WhereClaus e = '';   159                    $sql WhereClaus e = '';
160     160  
161           $s ql = "   161           $s ql = "
162                    SELE CT  DISTIN CT   162                    SELE CT  DISTIN CT
163                                      `Localiz ationStrin gs`.`IDKey `            AS `IDKe y`,   163                                      `Localiz ationStrin gs`.`IDKey `            AS `IDKe y`,
164                                      `Localiz ationStrin gs`.`IDLan guage`       AS `IDLa nguage`,   164                                      `Localiz ationStrin gs`.`IDLan guage`       AS `IDLa nguage`,
165                                      `Localiz ationKeys` .`Key`                           AS `Key`,   165                                      `Localiz ationKeys` .`Key`                           AS `Key`,
166                                      `Localiz ationStrin gs`.`Strin g`           AS `Stri ng`,   166                                      `Localiz ationStrin gs`.`Strin g`           AS `Stri ng`,
167                                      `Localiz ationLangu ages`.`Tit le`          AS `Lang uage`,   167                                      `Localiz ationLangu ages`.`Tit le`          AS `Lang uage`,
168                                      `Localiz ationCateg ories`.`Na me`          AS `Cate gory`   168                                      `Localiz ationCateg ories`.`Na me`          AS `Cate gory`
169                    FROM  `Localiza tionString Params`   169                    FROM  `Localiza tionString Params`
170                    RIGH T JOIN `Lo calization Keys` ON   170                    RIGH T JOIN `Lo calization Keys` ON
171                             (`Loca lizationSt ringParams `.`IDKey`  = `Localiz ationKeys` .`ID`)   171                             (`Loca lizationSt ringParams `.`IDKey`  = `Localiz ationKeys` .`ID`)
172                    LEFT  JOIN `Loc alizationS trings` ON   172                    LEFT  JOIN `Loc alizationS trings` ON
173                             (`Loca lizationSt rings`.`ID Key` = `Lo calization Keys`.`ID` )   173                             (`Loca lizationSt rings`.`ID Key` = `Lo calization Keys`.`ID` )
174                    LEFT  JOIN `Loc alizationC ategories`  ON   174                    LEFT  JOIN `Loc alizationC ategories`  ON
175                             (`Loca lizationKe ys`.`IDCat egory` = ` Localizati onCategori es`.`ID`)   175                             (`Loca lizationKe ys`.`IDCat egory` = ` Localizati onCategori es`.`ID`)
176                    LEFT  JOIN `Loc alizationL anguages`  ON   176                    LEFT  JOIN `Loc alizationL anguages`  ON
177                             (`Loca lizationSt rings`.`ID Language`  = `Localiz ationLangu ages`.`ID` )   177                             (`Loca lizationSt rings`.`ID Language`  = `Localiz ationLangu ages`.`ID` )
178                    $sql WhereClaus e   178                    $sql WhereClaus e
179                    ORDE R BY   179                    ORDE R BY
180                             `Langu age`, `Cat egory`, `K ey`";   180                             `Langu age`, `Cat egory`, `K ey`";
181              181           
182           $r esSearchRe sult = db_ res($sql);   182           $r esSearchRe sult = db_ res($sql);
183     183  
184           re turn $resS earchResul t;   184           re turn $resS earchResul t;
185   }   185   }
186     186  
187   function s earchBlock () {   187   function s earchBlock () {
188           gl obal  $sea rchString,   188           gl obal  $sea rchString,
189                             $searc hCombineWo rdsAs,   189                             $searc hCombineWo rdsAs,
190                             $searc hShowAdvan cedSetting s,   190                             $searc hShowAdvan cedSetting s,
191                             $searc hInKeys,   191                             $searc hInKeys,
192                             $searc hInStrings ,   192                             $searc hInStrings ,
193                             $searc hInParams,   193                             $searc hInParams,
194                             $searc hCategorie s,   194                             $searc hCategorie s,
195                             $searc hLanguages ;   195                             $searc hLanguages ;
196     196  
197           ob _start();   197           ob _start();
198   ?>   198   ?>
199     199  
200   <style typ e="text/cs s">   200   <style typ e="text/cs s">
201     201  
202   input.inpu t_chbox   202   input.inpu t_chbox
203   {   203   {
204           ve rtical-ali gn: middle ;   204           ve rtical-ali gn: middle ;
205   }   205   }
206     206  
207   input.inpu t_radio   207   input.inpu t_radio
208   {   208   {
209           ve rtical-ali gn: middle ;   209           ve rtical-ali gn: middle ;
210   }   210   }
211     211  
212   div.Advanc edSearchBo dy   212   div.Advanc edSearchBo dy
213   {   213   {
214   }   214   }
215     215  
216   </style>   216   </style>
217     217  
218   <script ty pe="text/j avascript" >   218   <script ty pe="text/j avascript" >
219     219  
220   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)
221   {   221   {
222           di v = docume nt.getElem entById(st rDivID);   222           di v = docume nt.getElem entById(st rDivID);
223           la bel = docu ment.getEl ementById( strLabelID );   223           la bel = docu ment.getEl ementById( strLabelID );
224           in put = docu ment.getEl ementById( 'ShowAdvan cedSearchS ettingsInp ut');   224           in put = docu ment.getEl ementById( 'ShowAdvan cedSearchS ettingsInp ut');
225     225  
226           if (div.style .display = = '')   226           if (div.style .display = = '')
227                    div. style.disp lay = 'non e';   227                    div. style.disp lay = 'non e';
228     228  
229           if (div.style .display = = 'none'){   229           if (div.style .display = = 'none'){
230                    div. style.disp lay = 'blo ck';   230                    div. style.disp lay = 'blo ck';
231                    inpu t.value =  'yes';   231                    inpu t.value =  'yes';
232                    labe l.innerHTM L = strHid eText;   232                    labe l.innerHTM L = strHid eText;
233           }e lse{   233           }e lse{
234                    div. style.disp lay = 'non e';   234                    div. style.disp lay = 'non e';
235                    inpu t.value =  'no';   235                    inpu t.value =  'no';
236                    labe l.innerHTM L = strSho wText;   236                    labe l.innerHTM L = strSho wText;
237           }   237           }
238   }   238   }
239     239  
240   </script>   240   </script>
241     241  
242   <form acti on="<?= $_ SERVER['PH P_SELF'] ? >" method= "get" styl e="margin:  0px">   242   <form acti on="<?= $_ SERVER['PH P_SELF'] ? >" method= "get" styl e="margin:  0px">
243     243  
244   <table wid th="100%"  border="0"  style="ma rgin: 0px" >   244   <table wid th="100%"  border="0"  style="ma rgin: 0px" >
245           <t r>   245           <t r>
246                    <td>   246                    <td>
247                             Look f or:   247                             Look f or:
248                             <input   248                             <input
249                                      type="te xt"   249                                      type="te xt"
250                                      name="fi nd"   250                                      name="fi nd"
251                                      value="< ?= $search String ?>"   251                                      value="< ?= $search String ?>"
252                                      style="w idth: 150p x"   252                                      style="w idth: 150p x"
253                             />   253                             />
254                             <input   254                             <input
255                                      type="ra dio"   255                                      type="ra dio"
256                                      name="wo rds"   256                                      name="wo rds"
257                                      value="< ?= SEARCH_ COMBINE_WO RDS_AS_AND  ?>"   257                                      value="< ?= SEARCH_ COMBINE_WO RDS_AS_AND  ?>"
258                                      id="Radi oCombineWo rdsAs_AND"   258                                      id="Radi oCombineWo rdsAs_AND"
259                                      class="i nput_radio "   259                                      class="i nput_radio "
260                                      <?= $sea rchCombine WordsAs ==  SEARCH_CO MBINE_WORD S_AS_AND ?  'checked'  : '' ?>   260                                      <?= $sea rchCombine WordsAs ==  SEARCH_CO MBINE_WORD S_AS_AND ?  'checked'  : '' ?>
261                             /><lab el for="Ra dioCombine WordsAs_AN D">and</la bel>   261                             /><lab el for="Ra dioCombine WordsAs_AN D">and</la bel>
262                             <input   262                             <input
263                                      type="ra dio"   263                                      type="ra dio"
264                                      name="wo rds"   264                                      name="wo rds"
265                                      value="< ?= SEARCH_ COMBINE_WO RDS_AS_OR  ?>"   265                                      value="< ?= SEARCH_ COMBINE_WO RDS_AS_OR  ?>"
266                                      id="Radi oCombineWo rdsAs_OR"   266                                      id="Radi oCombineWo rdsAs_OR"
267                                      class="i nput_radio "   267                                      class="i nput_radio "
268                                      <?= $sea rchCombine WordsAs ==  SEARCH_CO MBINE_WORD S_AS_OR ?  'checked'  : '' ?>   268                                      <?= $sea rchCombine WordsAs ==  SEARCH_CO MBINE_WORD S_AS_OR ?  'checked'  : '' ?>
269                             /><lab el for="Ra dioCombine WordsAs_OR ">or</labe l>   269                             /><lab el for="Ra dioCombine WordsAs_OR ">or</labe l>
270                             <input   270                             <input
271                                      type="ra dio"   271                                      type="ra dio"
272                                      name="wo rds"   272                                      name="wo rds"
273                                      value="< ?= SEARCH_ COMBINE_WO RDS_AS_EXA CT ?>"   273                                      value="< ?= SEARCH_ COMBINE_WO RDS_AS_EXA CT ?>"
274                                      id="Radi oCombineWo rdsAs_EXAC T"   274                                      id="Radi oCombineWo rdsAs_EXAC T"
275                                      class="i nput_radio "   275                                      class="i nput_radio "
276                                      <?= $sea rchCombine WordsAs ==  SEARCH_CO MBINE_WORD S_AS_EXACT  ? 'checke d' : '' ?>   276                                      <?= $sea rchCombine WordsAs ==  SEARCH_CO MBINE_WORD S_AS_EXACT  ? 'checke d' : '' ?>
277                             /><lab el for="Ra dioCombine WordsAs_EX ACT">exact  sequence< /label>   277                             /><lab el for="Ra dioCombine WordsAs_EX ACT">exact  sequence< /label>
278                    </td >   278                    </td >
279                    <td>   279                    <td>
280                             <input  type="sub mit" value ="Search"  style="wid th: 70px;  height: 25 px" />   280                             <input  type="sub mit" value ="Search"  style="wid th: 70px;  height: 25 px" />
281                    </td >   281                    </td >
282                    <td  align="rig ht" width= "90">   282                    <td  align="rig ht" width= "90">
283                             <a   283                             <a
284                                      href="ja vascript:v oid(0)"   284                                      href="ja vascript:v oid(0)"
285                                      onclick= "   285                                      onclick= "
286                                               showHideEx tended(   286                                               showHideEx tended(
287                                                       'A dvancedSea rchSetting s',   287                                                       'A dvancedSea rchSetting s',
288                                                       'S howHideAdv SearchSett ings',   288                                                       'S howHideAdv SearchSett ings',
289                                                       'm ore settin gs',   289                                                       'm ore settin gs',
290                                                       'l ess settin gs');   290                                                       'l ess settin gs');
291                                               return fal se;"   291                                               return fal se;"
292                                      id="Show HideAdvSea rchSetting s"   292                                      id="Show HideAdvSea rchSetting s"
293                             >   293                             >
294                                      <?= $sea rchShowAdv ancedSetti ngs ? 'les s settings ' : 'more  settings'  ?>   294                                      <?= $sea rchShowAdv ancedSetti ngs ? 'les s settings ' : 'more  settings'  ?>
295                             </a>   295                             </a>
296                             <input   296                             <input
297                                      type="hi dden"   297                                      type="hi dden"
298                                      name="se ttings"   298                                      name="se ttings"
299                                      value="< ?= $search ShowAdvanc edSettings  ? 'yes' :  'no' ?>"   299                                      value="< ?= $search ShowAdvanc edSettings  ? 'yes' :  'no' ?>"
300                                      id="Show AdvancedSe archSettin gsInput"   300                                      id="Show AdvancedSe archSettin gsInput"
301                             />   301                             />
302                    </td >   302                    </td >
303           </ tr>   303           </ tr>
304   </table>   304   </table>
305     305  
306   <div   306   <div
307           id ="Advanced SearchSett ings"   307           id ="Advanced SearchSett ings"
308           cl ass="Advan cedSearchB ody"   308           cl ass="Advan cedSearchB ody"
309           st yle="displ ay: <?= $s earchShowA dvancedSet tings ? 'b lock' : 'n one' ?>;"   309           st yle="displ ay: <?= $s earchShowA dvancedSet tings ? 'b lock' : 'n one' ?>;"
310   >   310   >
311   <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 ">
312           <t r>   312           <t r>
313                    <td  colspan="2 " valign=" top">   313                    <td  colspan="2 " valign=" top">
314                             <table  border="0 " width="1 00%">   314                             <table  border="0 " width="1 00%">
315                                      <tr>   315                                      <tr>
316                                               <td valign ="top" col span="2" s tyle="heig ht: 20px">   316                                               <td valign ="top" col span="2" s tyle="heig ht: 20px">
317                                                       Se arch in:   317                                                       Se arch in:
318                                               </td>   318                                               </td>
319                                      </tr>   319                                      </tr>
320                                      <tr>   320                                      <tr>
321                                               <td width= "10"></td>   321                                               <td width= "10"></td>
322                                               <td valign ="top">   322                                               <td valign ="top">
323                                                       <i nput   323                                                       <i nput
324                                                                type ="checkbox "   324                                                                type ="checkbox "
325                                                                name ="keys"   325                                                                name ="keys"
326                                                                valu e="yes"   326                                                                valu e="yes"
327                                                                id=" ChboxSearc hInKeys"   327                                                                id=" ChboxSearc hInKeys"
328                                                                clas s="input_c hbox"   328                                                                clas s="input_c hbox"
329                                                                <?=  $searchInK eys ? 'che cked' : ''  ?>   329                                                                <?=  $searchInK eys ? 'che cked' : ''  ?>
330                                                       />   330                                                       />
331                                                       <l abel for=" ChboxSearc hInKeys">k ey strings  (case-sen sitive)</l abel>   331                                                       <l abel for=" ChboxSearc hInKeys">k ey strings  (case-sen sitive)</l abel>
332                                                       <b r />   332                                                       <b r />
333                                                       <i nput   333                                                       <i nput
334                                                                type ="checkbox "   334                                                                type ="checkbox "
335                                                                name ="strings"   335                                                                name ="strings"
336                                                                valu e="yes"   336                                                                valu e="yes"
337                                                                id=" ChboxSearc hInStrings "   337                                                                id=" ChboxSearc hInStrings "
338                                                                clas s="input_c hbox"   338                                                                clas s="input_c hbox"
339                                                                <?=  $searchInS trings ? ' checked' :  '' ?>   339                                                                <?=  $searchInS trings ? ' checked' :  '' ?>
340                                                       />   340                                                       />
341                                                       <l abel for=" ChboxSearc hInStrings ">language -specific  strings</l abel>   341                                                       <l abel for=" ChboxSearc hInStrings ">language -specific  strings</l abel>
342                                                       <b r />   342                                                       <b r />
343                                                       <i nput   343                                                       <i nput
344                                                                type ="checkbox "   344                                                                type ="checkbox "
345                                                                name ="params"   345                                                                name ="params"
346                                                                valu e="yes"   346                                                                valu e="yes"
347                                                                id=" ChboxSearc hInParams"   347                                                                id=" ChboxSearc hInParams"
348                                                                clas s="input_c hbox"   348                                                                clas s="input_c hbox"
349                                                                <?=  $searchInP arams ? 'c hecked' :  '' ?>   349                                                                <?=  $searchInP arams ? 'c hecked' :  '' ?>
350                                                       />   350                                                       />
351                                                       <l abel for=" ChboxSearc hInParams" >parameter  descripti ons</label ><br />   351                                                       <l abel for=" ChboxSearc hInParams" >parameter  descripti ons</label ><br />
352                                               </td>   352                                               </td>
353                                      </tr>   353                                      </tr>
354                             </tabl e>   354                             </tabl e>
355                    </td >   355                    </td >
356                    <td  colspan="2 " align="c enter">   356                    <td  colspan="2 " align="c enter">
357                             <table  border="0 " style="w idth: 100% ">   357                             <table  border="0 " style="w idth: 100% ">
358                                      <tr>   358                                      <tr>
359                                               <td align= "center">   359                                               <td align= "center">
360                                                       Sh ow strings  from cate gories:   360                                                       Sh ow strings  from cate gories:
361                                                       <b r />   361                                                       <b r />
362                                                       <s elect name ="sCats[]"  multiple  style="hei ght: 90px;  width: 17 0px">   362                                                       <s elect name ="sCats[]"  multiple  style="hei ght: 90px;  width: 17 0px">
363   <?   363   <?
364           $a rrCats = g etLocaliza tionCatego ries();   364           $a rrCats = g etLocaliza tionCatego ries();
365           $a rrCategori es[0] = '- --All Cate gories---' ;   365           $a rrCategori es[0] = '- --All Cate gories---' ;
366           fo reach($arr Cats as $k ey => $val )   366           fo reach($arr Cats as $k ey => $val )
367           {   367           {
368                    $arr Categories [$key] = $ val;   368                    $arr Categories [$key] = $ val;
369           }   369           }
370     370  
371           fo reach ($ar rCategorie s as $cate goryID =>  $categoryN ame)   371           fo reach ($ar rCategorie s as $cate goryID =>  $categoryN ame)
372           {   372           {
373   ?>   373   ?>
374                                                                <opt ion value= "<?= $cate goryID ?>"  <?= isset ($searchCa tegories[$ categoryID ]) ? 'sele cted' : ''  ?> ><?= $ categoryNa me ?></opt ion>   374                                                                <opt ion value= "<?= $cate goryID ?>"  <?= isset ($searchCa tegories[$ categoryID ]) ? 'sele cted' : ''  ?> ><?= $ categoryNa me ?></opt ion>
375   <?   375   <?
376           }   376           }
377   ?>   377   ?>
378                                                       </ select>   378                                                       </ select>
379                                               </td>   379                                               </td>
380                                               <td align= "center">   380                                               <td align= "center">
381                                                       Sh ow strings  from lang uages:   381                                                       Sh ow strings  from lang uages:
382                                                       <b r />   382                                                       <b r />
383                                                       <s elect name ="sLangs[] " multiple  style="he ight: 90px ;  width:  170px">   383                                                       <s elect name ="sLangs[] " multiple  style="he ight: 90px ;  width:  170px">
384   <?   384   <?
385           $a rrLangs =  getLangsAr r();   385           $a rrLangs =  getLangsAr r();
386           $a rrLanguage s[0] = '-- -All Langu ages---';   386           $a rrLanguage s[0] = '-- -All Langu ages---';
387     387  
388           fo reach($arr Langs as $ key => $va l)   388           fo reach($arr Langs as $ key => $va l)
389           {   389           {
390                    $id  = (int)db_ value( "SE LECT `ID`  FROM `Loca lizationLa nguages` W HERE `Name ` = '$key' " );   390                    $id  = (int)db_ value( "SE LECT `ID`  FROM `Loca lizationLa nguages` W HERE `Name ` = '$key' " );
391                    $arr Languages[ $id] = $va l;   391                    $arr Languages[ $id] = $va l;
392           }   392           }
393     393  
394           fo reach ($ar rLanguages  as $langI D => $lang Name)   394           fo reach ($ar rLanguages  as $langI D => $lang Name)
395           {   395           {
396   ?>   396   ?>
397                                                                <opt ion value= "<?= $lang ID ?>" <?=  isset($se archLangua ges[$langI D]) ? 'sel ected' : ' ' ?> ><?=  $langName  ?></option >   397                                                                <opt ion value= "<?= $lang ID ?>" <?=  isset($se archLangua ges[$langI D]) ? 'sel ected' : ' ' ?> ><?=  $langName  ?></option >
398   <?   398   <?
399           }   399           }
400   ?>   400   ?>
401                                                       </ select>   401                                                       </ select>
402                                               </td>   402                                               </td>
403                                      </tr>   403                                      </tr>
404                             </tabl e>   404                             </tabl e>
405                    </td >   405                    </td >
406           </ tr>   406           </ tr>
407   </table>   407   </table>
408   </div>   408   </div>
409   </form>   409   </form>
410   <?   410   <?
411     411  
412           re turn panel Section("S earch for  strings",  ob_get_cle an() );   412           re turn panel Section("S earch for  strings",  ob_get_cle an() );
413   }   413   }
414     414  
415   function a ddLangKeyF orm() {   415   function a ddLangKeyF orm() {
416     416  
417           fu nction add LangKey()   417           fu nction add LangKey()
418           {   418           {
419                    $new KeyName          = pr ocess_db_i nput($_POS T['NewKeyN ame']);   419                    $new KeyName          = pr ocess_db_i nput($_POS T['NewKeyN ame']);
420                    $new CategoryNa me    = pr ocess_db_i nput($_POS T['NewCate goryName'] );   420                    $new CategoryNa me    = pr ocess_db_i nput($_POS T['NewCate goryName'] );
421                    $cat egoryID          = (i nt)$_POST[ 'NewKeyCat egory'];   421                    $cat egoryID          = (i nt)$_POST[ 'NewKeyCat egory'];
422                    $new StringPara ms    = $_ POST['NewS tringParam eters'];   422                    $new StringPara ms    = $_ POST['NewS tringParam eters'];
423                    $lan gStrings         = $_ POST['Lang Strings'];   423                    $lan gStrings         = $_ POST['Lang Strings'];
424     424  
425                    if ( !is_array( $langStrin gs) || cou nt($langSt rings) < 1 ) return ' <font colo r="red">Er ror: wrong  form data .</font>';   425                    if ( !is_array( $langStrin gs) || cou nt($langSt rings) < 1 ) return ' <font colo r="red">Er ror: wrong  form data .</font>';
426     426  
427                    fore ach ($lang Strings as  $key => $ value)   427                    fore ach ($lang Strings as  $key => $ value)
428                             $langS trings[$ke y] = proce ss_db_inpu t($value);   428                             $langS trings[$ke y] = proce ss_db_inpu t($value);
429     429  
430                    if (  strlen($n ewKeyName)  <= 0 ) re turn '<fon t color="r ed">Error:  Key name  is not spe cified.</f ont>';   430                    if (  strlen($n ewKeyName)  <= 0 ) re turn '<fon t color="r ed">Error:  Key name  is not spe cified.</f ont>';
431     431  
432                    if (  strlen($n ewCategory Name) > 0  )   432                    if (  strlen($n ewCategory Name) > 0  )
433                    {   433                    {
434                             db_res ("INSERT I NTO `Local izationCat egories` ( `Name`) VA LUES ('$ne wCategoryN ame')");   434                             db_res ("INSERT I NTO `Local izationCat egories` ( `Name`) VA LUES ('$ne wCategoryN ame')");
435                             $categ oryID = my sql_insert _id($GLOBA LS['MySQL' ]->link);   435                             $categ oryID = my sql_insert _id($GLOBA LS['MySQL' ]->link);
436     436  
437                             if ( ! $categoryI D )   437                             if ( ! $categoryI D )
438                                      return ' <font colo r="red">Er ror: Could  not creat e a new ca tegory.</f ont>';   438                                      return ' <font colo r="red">Er ror: Could  not creat e a new ca tegory.</f ont>';
439                    }   439                    }
440                    else   440                    else
441                    {   441                    {
442                             $cnt =  db_res('S ELECT COUN T(*) FROM  `Localizat ionCategor ies` WHERE  `ID`='.$c ategoryID) ;   442                             $cnt =  db_res('S ELECT COUN T(*) FROM  `Localizat ionCategor ies` WHERE  `ID`='.$c ategoryID) ;
443                             $cnt =  mysql_fet ch_row($cn t);   443                             $cnt =  mysql_fet ch_row($cn t);
444     444  
445                             if ( $ cnt[0] <=  0 ) return  '<font co lor="red"> Error: Wro ng categor y specifie d.</font>' ;   445                             if ( $ cnt[0] <=  0 ) return  '<font co lor="red"> Error: Wro ng categor y specifie d.</font>' ;
446                    }   446                    }
447     447  
448                    db_r es("INSERT  INTO `Loc alizationK eys` (`IDC ategory`,  `Key`) VAL UES ($cate goryID, '$ newKeyName ')", 0);   448                    db_r es("INSERT  INTO `Loc alizationK eys` (`IDC ategory`,  `Key`) VAL UES ($cate goryID, '$ newKeyName ')", 0);
449     449  
450                    $new KeyID = my sql_insert _id($GLOBA LS['MySQL' ]->link);   450                    $new KeyID = my sql_insert _id($GLOBA LS['MySQL' ]->link);
451     451  
452                    if (  $newKeyID  <= 0 ) re turn '<fon t color="r ed">Error:  Could not  insert a  new langua ge key.</f ont>';   452                    if (  $newKeyID  <= 0 ) re turn '<fon t color="r ed">Error:  Could not  insert a  new langua ge key.</f ont>';
453     453  
454                    // p arse strin g params   454                    // p arse strin g params
455     455  
456                    $arr Params = a rray();   456                    $arr Params = a rray();
457     457  
458                    preg _match_all ('/([0-9]+ ) - (\S+[^ \\n\\r]*)/ ', $newStr ingParams,  $arrParam s);   458                    preg _match_all ('/([0-9]+ ) - (\S+[^ \\n\\r]*)/ ', $newStr ingParams,  $arrParam s);
459     459  
460                    fore ach ($arrP arams[1] a s $key =>  $paramID)   460                    fore ach ($arrP arams[1] a s $key =>  $paramID)
461                    {   461                    {
462                             $param ID = (int) $paramID;   462                             $param ID = (int) $paramID;
463                             $param Descriptio n = $arrPa rams[2][$k ey];   463                             $param Descriptio n = $arrPa rams[2][$k ey];
464     464  
465                             $param Descriptio n = proces s_db_input ($paramDes cription);   465                             $param Descriptio n = proces s_db_input ($paramDes cription);
466     466  
467                             db_res ("   467                             db_res ("
468                                      INSERT I NTO `Local izationStr ingParams`   468                                      INSERT I NTO `Local izationStr ingParams`
469                                      (`IDKey` , `IDParam `, `Descri ption`)   469                                      (`IDKey` , `IDParam `, `Descri ption`)
470                                      VALUES ( $newKeyID,  $paramID,  '$paramDe scription' )"   470                                      VALUES ( $newKeyID,  $paramID,  '$paramDe scription' )"
471                             );   471                             );
472     472  
473                             if( !m ysql_affec ted_rows($ GLOBALS['M ySQL']->li nk) )   473                             if( !m ysql_affec ted_rows($ GLOBALS['M ySQL']->li nk) )
474                                      return ' <font colo r="red">Co uld not in sert a str ing parame ter.</font >';   474                                      return ' <font colo r="red">Co uld not in sert a str ing parame ter.</font >';
475                    }   475                    }
476     476  
477                    fore ach( $lang Strings as  $langKey  => $langSt ring ) {   477                    fore ach( $lang Strings as  $langKey  => $langSt ring ) {
478                             //NOTE : This pie ce of code  can poten tially   478                             //NOTE : This pie ce of code  can poten tially
479                             //                insert lan guage stri ngs that d on't belon g   479                             //                insert lan guage stri ngs that d on't belon g
480                             //                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
481                             //                his POST d ata himsel f in an un usual way.   481                             //                his POST d ata himsel f in an un usual way.
482                             //                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
483                             //                security,  no checks  have been  added to p revent thi s.   483                             //                security,  no checks  have been  added to p revent thi s.
484     484  
485                             $langK ey = (int) $langKey;   485                             $langK ey = (int) $langKey;
486     486  
487                             db_res ("   487                             db_res ("
488                                      INSERT I NTO `Local izationStr ings`   488                                      INSERT I NTO `Local izationStr ings`
489                                      (`IDKey` , `IDLangu age`, `Str ing`)   489                                      (`IDKey` , `IDLangu age`, `Str ing`)
490                                      VALUES ( $newKeyID,  $langKey,  '$langStr ing')   490                                      VALUES ( $newKeyID,  $langKey,  '$langStr ing')
491                             ");   491                             ");
492     492  
493                             if (my sql_affect ed_rows($G LOBALS['My SQL']->lin k) <= 0) r eturn '<fo nt color=" red">Error : could no t add a la nguage str ing.</font >';   493                             if (my sql_affect ed_rows($G LOBALS['My SQL']->lin k) <= 0) r eturn '<fo nt color=" red">Error : could no t add a la nguage str ing.</font >';
494                    }   494                    }
495     495  
496                    if (  $_POST['R ecompileLa ngFiles']  == 'on' )   496                    if (  $_POST['R ecompileLa ngFiles']  == 'on' )
497                    {   497                    {
498                             if ( ! compileLan guage() )   498                             if ( ! compileLan guage() )
499                             {   499                             {
500                                      return ' <font colo r="red">Er ror: could  not recom pile langu age files. </font>';   500                                      return ' <font colo r="red">Er ror: could  not recom pile langu age files. </font>';
501                             }   501                             }
502                    }   502                    }
503     503  
504                    retu rn 'A new  language k ey has bee n successf ully creat ed.';   504                    retu rn 'A new  language k ey has bee n successf ully creat ed.';
505           }   505           }
506              506           
507              507           
508           ob _start();   508           ob _start();
509   ?>   509   ?>
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" >   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" >
511   <html>   511   <html>
512   <head>   512   <head>
513           <m eta http-e quiv="Cont ent-Type"  content="t ext/html;  charset=ut f-8" />   513           <m eta http-e quiv="Cont ent-Type"  content="t ext/html;  charset=ut f-8" />
514           <t itle>Add a  new langu age key</t itle>   514           <t itle>Add a  new langu age key</t itle>
515           <s tyle type= "text/css" >   515           <s tyle type= "text/css" >
516           ta ble.EditSt ringForm   516           ta ble.EditSt ringForm
517           {   517           {
518                    font -family: A rial;   518                    font -family: A rial;
519                    font -size: 12p x;   519                    font -size: 12p x;
520           }   520           }
521     521  
522           ta ble.EditSt ringForm t d   522           ta ble.EditSt ringForm t d
523           {   523           {
524                    back ground-col or: #e6e6e 6;   524                    back ground-col or: #e6e6e 6;
525                    padd ing: 3px;   525                    padd ing: 3px;
526           }   526           }
527              527           
528           se lect#NewKe yCategory   528           se lect#NewKe yCategory
529           {   529           {
530                    widt h:130px;   530                    widt h:130px;
531           }   531           }
532           </ style>   532           </ style>
533   </head>   533   </head>
534   <body>   534   <body>
535   <?   535   <?
536           if  ( isset($ _POST['Add LangKey'])  )   536           if  ( isset($ _POST['Add LangKey'])  )
537           {   537           {
538   ?>   538   ?>
539   <br /><br  /><br /><b r /><br /> <br /><br  /><br />   539   <br /><br  /><br /><b r /><br /> <br /><br  /><br />
540           <d iv align=" center" st yle="font- family: Ar ial; font- size: 12px ; height:  500px">   540           <d iv align=" center" st yle="font- family: Ar ial; font- size: 12px ; height:  500px">
541                    <?=  addLangKey () ?>   541                    <?=  addLangKey () ?>
542                    <br  />   542                    <br  />
543                    <br  />   543                    <br  />
544                    <a h ref="javas cript:void (0)" oncli ck="javasc ript: wind ow.close() ; return f alse;">Clo se</a>   544                    <a h ref="javas cript:void (0)" oncli ck="javasc ript: wind ow.close() ; return f alse;">Clo se</a>
545           </ div>   545           </ div>
546   </body>   546   </body>
547   </html>   547   </html>
548   <?   548   <?
549                    exit ();   549                    exit ();
550           }   550           }
551   ?>   551   ?>
552           <f orm action ="<?= $_SE RVER['PHP_ SELF'] ?>? view=addLa nguageKey"  method="p ost">   552           <f orm action ="<?= $_SE RVER['PHP_ SELF'] ?>? view=addLa nguageKey"  method="p ost">
553           <t able width ="100%" cl ass="EditS tringForm"  cellspaci ng="2">   553           <t able width ="100%" cl ass="EditS tringForm"  cellspaci ng="2">
554                    <tr>   554                    <tr>
555                             <td wi dth="140"> <b>New lan guage key  name:</b>< /td>   555                             <td wi dth="140"> <b>New lan guage key  name:</b>< /td>
556                             <td><i nput name= "NewKeyNam e" style=" width: 99% "/></td>   556                             <td><i nput name= "NewKeyNam e" style=" width: 99% "/></td>
557                    </tr >   557                    </tr >
558                    <tr>   558                    <tr>
559                             <td><b >Category: </b></td>   559                             <td><b >Category: </b></td>
560                             <td>   560                             <td>
561                                      Use exis ting:   561                                      Use exis ting:
562                                      <select  name="NewK eyCategory " id="NewK eyCategory ">   562                                      <select  name="NewK eyCategory " id="NewK eyCategory ">
563   <?   563   <?
564                                      $arrCate gories = g etLocaliza tionCatego ries();   564                                      $arrCate gories = g etLocaliza tionCatego ries();
565                                      foreach  ($arrCateg ories as $ catID => $ catName)   565                                      foreach  ($arrCateg ories as $ catID => $ catName)
566                                      {   566                                      {
567   ?>   567   ?>
568                                               <option va lue="<?= $ catID ?>"> <?= htmlsp ecialchars ($catName)  ?></optio n>   568                                               <option va lue="<?= $ catID ?>"> <?= htmlsp ecialchars ($catName)  ?></optio n>
569   <?   569   <?
570                                      }   570                                      }
571   ?>   571   ?>
572                                      </select >   572                                      </select >
573                                      or creat e a new on e:   573                                      or creat e a new on e:
574                                      <input n ame="NewCa tegoryName " type="te xt" style= "width: 10 0px"/>   574                                      <input n ame="NewCa tegoryName " type="te xt" style= "width: 10 0px"/>
575                             </td>   575                             </td>
576                    </tr >   576                    </tr >
577                    <tr>   577                    <tr>
578                             <td va lign="top" ><b>Langua ge string  parameters :</b></td>   578                             <td va lign="top" ><b>Langua ge string  parameters :</b></td>
579                             <td>   579                             <td>
580                             Descri be string  parameters , each on  a separate  line. Fol low the ex ample belo w:   580                             Descri be string  parameters , each on  a separate  line. Fol low the ex ample belo w:
581   <pre>   581   <pre>
582   0 - member 's nicknam e   582   0 - member 's nicknam e
583   1 - curren t membersh ip name   583   1 - curren t membersh ip name
584   </pre>   584   </pre>
585                             Note t hat, if yo u don't ex actly foll ow this fo rmat, para meters won 't be save d.   585                             Note t hat, if yo u don't ex actly foll ow this fo rmat, para meters won 't be save d.
586                             <br />   586                             <br />
587                             <texta rea name=" NewStringP arameters"  rows="5"  style="wid th: 99%">< /textarea>   587                             <texta rea name=" NewStringP arameters"  rows="5"  style="wid th: 99%">< /textarea>
588                             </td>   588                             </td>
589                    </tr >   589                    </tr >
590                    <tr>   590                    <tr>
591                             <td va lign="top" ><b>String  texts for  available  languages :</b></td>   591                             <td va lign="top" ><b>String  texts for  available  languages :</b></td>
592                             <td>   592                             <td>
593   <?   593   <?
594                                      $arrLang uages = ge tLangsArr( );   594                                      $arrLang uages = ge tLangsArr( );
595                                      foreach  ($arrLangu ages as $l angName =>  $langTitl e)   595                                      foreach  ($arrLangu ages as $l angName =>  $langTitl e)
596                                      {   596                                      {
597                                               $langID =  db_value(  "SELECT `I D` FROM `L ocalizatio nLanguages ` WHERE `N ame` = '$l angName'"  );   597                                               $langID =  db_value(  "SELECT `I D` FROM `L ocalizatio nLanguages ` WHERE `N ame` = '$l angName'"  );
598                                                 598                                              
599                                               echo '<b>' .htmlspeci alchars($l angTitle). ':</b>';   599                                               echo '<b>' .htmlspeci alchars($l angTitle). ':</b>';
600   ?>   600   ?>
601                                               <br />   601                                               <br />
602                                               <textarea  name="Lang Strings[<? = $langID  ?>]" style ="width: 9 9%"></text area>   602                                               <textarea  name="Lang Strings[<? = $langID  ?>]" style ="width: 9 9%"></text area>
603                                               <hr />   603                                               <hr />
604   <?   604   <?
605                                      }   605                                      }
606   ?>   606   ?>
607                             </td>   607                             </td>
608                    </tr >   608                    </tr >
609                    <tr>   609                    <tr>
610                             <td co lspan="2"  align="cen ter"><inpu t name="Re compileLan gFiles" ty pe="checkb ox" checke d /> Recom pile langu age files  to apply c hanges.</t d>   610                             <td co lspan="2"  align="cen ter"><inpu t name="Re compileLan gFiles" ty pe="checkb ox" checke d /> Recom pile langu age files  to apply c hanges.</t d>
611                    </tr >   611                    </tr >
612           </ table>   612           </ table>
613           <d iv align=" center"><b r /><input  type="sub mit" name= "AddLangKe y" value=" Save chang es" /></di v>   613           <d iv align=" center"><b r /><input  type="sub mit" name= "AddLangKe y" value=" Save chang es" /></di v>
614           </ form>   614           </ form>
615   </body>   615   </body>
616   </html>   616   </html>
617   <?   617   <?
618     618  
619           re turn ob_ge t_clean();   619           re turn ob_ge t_clean();
620   }   620   }
621     621  
622   function e ditStringF orm()   622   function e ditStringF orm()
623   {   623   {
624           fu nction upd ateLanguag eString()   624           fu nction upd ateLanguag eString()
625           {   625           {
626                    $key ID = (int) $_POST['Up dateString _KeyID'];   626                    $key ID = (int) $_POST['Up dateString _KeyID'];
627                    $lan gID = (int )$_POST['U pdateStrin g_LangID'] ;   627                    $lan gID = (int )$_POST['U pdateStrin g_LangID'] ;
628                    $str ing = proc ess_db_inp ut($_POST[ 'UpdateStr ing_String ']);   628                    $str ing = proc ess_db_inp ut($_POST[ 'UpdateStr ing_String ']);
629     629  
630                    db_r es("   630                    db_r es("
631                             UPDATE   `Localiz ationStrin gs`   631                             UPDATE   `Localiz ationStrin gs`
632                             SET               `String` =  '$string'   632                             SET               `String` =  '$string'
633                             WHERE    `IDKey`  = $keyID A ND   633                             WHERE    `IDKey`  = $keyID A ND
634                                               `IDLanguag e` = $lang ID");   634                                               `IDLanguag e` = $lang ID");
635     635  
636                    if ( mysql_affe cted_rows( $GLOBALS[' MySQL']->l ink) <= 0)   636                    if ( mysql_affe cted_rows( $GLOBALS[' MySQL']->l ink) <= 0)
637                    {   637                    {
638                             return  '<font co lor="red"> The string  has <b>NO T</b> been  updated.< /font>';   638                             return  '<font co lor="red"> The string  has <b>NO T</b> been  updated.< /font>';
639                    }   639                    }
640     640  
641                    if (  $_POST['R ecompileLa ngFile'] = = 'on' )   641                    if (  $_POST['R ecompileLa ngFile'] = = 'on' )
642                    {   642                    {
643                             if ( ! compileLan guage($lan gID) )   643                             if ( ! compileLan guage($lan gID) )
644                             {   644                             {
645                                      return ' <font colo r="red">Er ror: could  not recom pile langu age file.< /font>';   645                                      return ' <font colo r="red">Er ror: could  not recom pile langu age file.< /font>';
646                             }   646                             }
647                    }   647                    }
648     648  
649                    retu rn 'The st ring has b een succes sfully upd ated.';   649                    retu rn 'The st ring has b een succes sfully upd ated.';
650           }   650           }
651     651  
652           $I DKey = (in t)$_GET['e ditStringK eyID'];   652           $I DKey = (in t)$_GET['e ditStringK eyID'];
653           $I DLanguage  = (int)$_G ET['editSt ringLangID '];   653           $I DLanguage  = (int)$_G ET['editSt ringLangID '];
654     654  
655           ob _start();   655           ob _start();
656     656  
657           $s cript = "   657           $s cript = "
658           fu nction ins ertParam(s trTextArea ID, strSel ectParamsI D)   658           fu nction ins ertParam(s trTextArea ID, strSel ectParamsI D)
659           {   659           {
660                    text Area = doc ument.getE lementById (strTextAr eaID);   660                    text Area = doc ument.getE lementById (strTextAr eaID);
661                    sele ctParams =  document. getElement ById(strSe lectParams ID);   661                    sele ctParams =  document. getElement ById(strSe lectParams ID);
662                       662                    
663                    if(  !selectPar ams.option s.length | | selectPa rams.selec tedIndex = = -1 )   663                    if(  !selectPar ams.option s.length | | selectPa rams.selec tedIndex = = -1 )
664                             return  false;   664                             return  false;
665                       665                    
666                    sele ctedOption  = selectP arams.opti ons[select Params.sel ectedIndex ];   666                    sele ctedOption  = selectP arams.opti ons[select Params.sel ectedIndex ];
667     667  
668                    text Area.value  = '' + te xtArea.val ue + selec tedOption. value;   668                    text Area.value  = '' + te xtArea.val ue + selec tedOption. value;
669     669  
670                    text Area.focus ();   670                    text Area.focus ();
671           }   671           }
672           ";   672           ";
673     673  
674           if  ( isset($ _POST['Upd ateLangStr ing']) )   674           if  ( isset($ _POST['Upd ateLangStr ing']) )
675           {   675           {
676                    $bod y = messag eTemplate( updateLang uageString ().'<br /> <br /><a h ref="javas cript:void (0)" oncli ck="javasc ript: wind ow.close() ; return f alse;">Clo se</a>');   676                    $bod y = messag eTemplate( updateLang uageString ().'<br /> <br /><a h ref="javas cript:void (0)" oncli ck="javasc ript: wind ow.close() ; return f alse;">Clo se</a>');
677     677  
678                    retu rn PopupPa geTemplate ('Edit Lan guage Stri ng', $body , $script) ;   678                    retu rn PopupPa geTemplate ('Edit Lan guage Stri ng', $body , $script) ;
679           }   679           }
680     680  
681           $s ql = "   681           $s ql = "
682                    SELE CT  `Local izationStr ings`.`IDK ey`            AS `ID Key`,   682                    SELE CT  `Local izationStr ings`.`IDK ey`            AS `ID Key`,
683                                      `Localiz ationStrin gs`.`IDLan guage`       AS `IDLa nguage`,   683                                      `Localiz ationStrin gs`.`IDLan guage`       AS `IDLa nguage`,
684                                      `Localiz ationKeys` .`Key`                           AS `Key`,   684                                      `Localiz ationKeys` .`Key`                           AS `Key`,
685                                      `Localiz ationStrin gs`.`Strin g`           AS `Stri ng`,   685                                      `Localiz ationStrin gs`.`Strin g`           AS `Stri ng`,
686                                      `Localiz ationLangu ages`.`Tit le`          AS `Lang uage`,   686                                      `Localiz ationLangu ages`.`Tit le`          AS `Lang uage`,
687                                      `Localiz ationCateg ories`.`Na me`          AS `Cate gory`   687                                      `Localiz ationCateg ories`.`Na me`          AS `Cate gory`
688                    FROM  `Localiza tionString Params`   688                    FROM  `Localiza tionString Params`
689                    RIGH T JOIN `Lo calization Keys` ON   689                    RIGH T JOIN `Lo calization Keys` ON
690                             (`Loca lizationSt ringParams `.`IDKey`  = `Localiz ationKeys` .`ID`)   690                             (`Loca lizationSt ringParams `.`IDKey`  = `Localiz ationKeys` .`ID`)
691                    LEFT  JOIN `Loc alizationS trings` ON   691                    LEFT  JOIN `Loc alizationS trings` ON
692                             (`Loca lizationSt rings`.`ID Key` = `Lo calization Keys`.`ID` )   692                             (`Loca lizationSt rings`.`ID Key` = `Lo calization Keys`.`ID` )
693                    LEFT  JOIN `Loc alizationC ategories`  ON   693                    LEFT  JOIN `Loc alizationC ategories`  ON
694                             (`Loca lizationKe ys`.`IDCat egory` = ` Localizati onCategori es`.`ID`)   694                             (`Loca lizationKe ys`.`IDCat egory` = ` Localizati onCategori es`.`ID`)
695                    LEFT  JOIN `Loc alizationL anguages`  ON   695                    LEFT  JOIN `Loc alizationL anguages`  ON
696                             (`Loca lizationSt rings`.`ID Language`  = `Localiz ationLangu ages`.`ID` )   696                             (`Loca lizationSt rings`.`ID Language`  = `Localiz ationLangu ages`.`ID` )
697                    WHER E   697                    WHER E
698                             `Local izationStr ings`.`IDK ey` = $IDK ey AND   698                             `Local izationStr ings`.`IDK ey` = $IDK ey AND
699                             `Local izationStr ings`.`IDL anguage` =  $IDLangua ge   699                             `Local izationStr ings`.`IDL anguage` =  $IDLangua ge
700                    ";   700                    ";
701     701  
702           $r esLangStri ng = db_re s($sql);   702           $r esLangStri ng = db_re s($sql);
703     703  
704           if  ( !mysql_ num_rows($ resLangStr ing) )   704           if  ( !mysql_ num_rows($ resLangStr ing) )
705                    retu rn PopupPa geTemplate ('Edit Lan guage Stri ng', messa geTemplate ('Error: s pecified s tring not  found.'));   705                    retu rn PopupPa geTemplate ('Edit Lan guage Stri ng', messa geTemplate ('Error: s pecified s tring not  found.'));
706           el se {   706           el se {
707                    $arr LangString  = mysql_f etch_assoc ($resLangS tring);   707                    $arr LangString  = mysql_f etch_assoc ($resLangS tring);
708                    ob_s tart();   708                    ob_s tart();
709   ?>   709   ?>
710           <f orm action ="<?= $_SE RVER['PHP_ SELF'] ?>? view=editL angString"  method="p ost">   710           <f orm action ="<?= $_SE RVER['PHP_ SELF'] ?>? view=editL angString"  method="p ost">
711           <i nput name= "UpdateStr ing_KeyID"  type="hid den" value ="<?= $arr LangString ['IDKey']  ?>" />   711           <i nput name= "UpdateStr ing_KeyID"  type="hid den" value ="<?= $arr LangString ['IDKey']  ?>" />
712           <i nput name= "UpdateStr ing_LangID " type="hi dden" valu e="<?= $ar rLangStrin g['IDLangu age'] ?>"  />   712           <i nput name= "UpdateStr ing_LangID " type="hi dden" valu e="<?= $ar rLangStrin g['IDLangu age'] ?>"  />
713           <t able width ="100%" cl ass="EditS tringForm"  cellspaci ng="2">   713           <t able width ="100%" cl ass="EditS tringForm"  cellspaci ng="2">
714                    <tr>   714                    <tr>
715                             <td al ign="right " width="6 0"><b>Key: </b></td>   715                             <td al ign="right " width="6 0"><b>Key: </b></td>
716                             <td><? = htmlspec ialchars($ arrLangStr ing['Key'] ); ?></td>   716                             <td><? = htmlspec ialchars($ arrLangStr ing['Key'] ); ?></td>
717                    </tr >   717                    </tr >
718                    <tr>   718                    <tr>
719                             <td al ign="right "><b>Strin g:</b></td >   719                             <td al ign="right "><b>Strin g:</b></td >
720                             <td><t extarea na me="Update String_Str ing" id='S tringTextA rea' rows= "16" style ="width: 9 9%"><?= ht mlspecialc hars($arrL angString[ 'String']) ; ?></text area></td>   720                             <td><t extarea na me="Update String_Str ing" id='S tringTextA rea' rows= "16" style ="width: 9 9%"><?= ht mlspecialc hars($arrL angString[ 'String']) ; ?></text area></td>
721                    </tr >   721                    </tr >
722   <?   722   <?
723           $a rrParams =  getLocali zationStri ngParams($ arrLangStr ing['IDKey ']);   723           $a rrParams =  getLocali zationStri ngParams($ arrLangStr ing['IDKey ']);
724           if ( $arrPara ms  ) {   724           if ( $arrPara ms  ) {
725   ?>   725   ?>
726                    <tr>   726                    <tr>
727                             <td al ign="right "><b>Param eters:</b> </td>   727                             <td al ign="right "><b>Param eters:</b> </td>
728                             <td>   728                             <td>
729                             Availa ble string  parameter s (click o n a parame ter to ins ert it at  the end of  the strin g):   729                             Availa ble string  parameter s (click o n a parame ter to ins ert it at  the end of  the strin g):
730                             <br />   730                             <br />
731                             <selec t id='Sele ctParams'  multiple s tyle="widt h: 100%; h eight: 100 px" onclic k="insertP aram('Stri ngTextArea ', 'Select Params');" >   731                             <selec t id='Sele ctParams'  multiple s tyle="widt h: 100%; h eight: 100 px" onclic k="insertP aram('Stri ngTextArea ', 'Select Params');" >
732   <?   732   <?
733              733           
734                    $fir stSelected  = false;   734                    $fir stSelected  = false;
735                    fore ach ($arrP arams as $ paramID =>  $paramDes cription)  {   735                    fore ach ($arrP arams as $ paramID =>  $paramDes cription)  {
736                             if ( ! $firstSele cted ) {   736                             if ( ! $firstSele cted ) {
737                                      $firstSe lected = t rue;   737                                      $firstSe lected = t rue;
738                                      $selecte d = 'selec ted';   738                                      $selecte d = 'selec ted';
739                             } else   739                             } else
740                                      $selecte d = '';   740                                      $selecte d = '';
741   ?>   741   ?>
742                                      <option  value="{<? = $paramID  ?>}" <?=  $selected  ?>><?= '{' .$paramID. '} - '.htm lspecialch ars($param Descriptio n) ?></opt ion>   742                                      <option  value="{<? = $paramID  ?>}" <?=  $selected  ?>><?= '{' .$paramID. '} - '.htm lspecialch ars($param Descriptio n) ?></opt ion>
743   <?   743   <?
744                    }   744                    }
745   ?>   745   ?>
746                             </sele ct>   746                             </sele ct>
747                             </td>   747                             </td>
748                    </tr >   748                    </tr >
749   <?   749   <?
750           }   750           }
751   ?>   751   ?>
752                    <tr>   752                    <tr>
753                             <td al ign="right "><b>Categ ory:</b></ td>   753                             <td al ign="right "><b>Categ ory:</b></ td>
754                             <td><? = htmlspec ialchars($ arrLangStr ing['Categ ory']); ?> </td>   754                             <td><? = htmlspec ialchars($ arrLangStr ing['Categ ory']); ?> </td>
755                    </tr >   755                    </tr >
756                    <tr>   756                    <tr>
757                             <td al ign="right "><b>Langu age:</b></ td>   757                             <td al ign="right "><b>Langu age:</b></ td>
758                             <td><? = htmlspec ialchars($ arrLangStr ing['Langu age']); ?> </td>   758                             <td><? = htmlspec ialchars($ arrLangStr ing['Langu age']); ?> </td>
759                    </tr >   759                    </tr >
760                    <tr>   760                    <tr>
761                             <td co lspan="2"  align="cen ter">   761                             <td co lspan="2"  align="cen ter">
762                                      <input n ame="Recom pileLangFi le" type=" checkbox"  checked />   762                                      <input n ame="Recom pileLangFi le" type=" checkbox"  checked />
763                                      Recompil e correspo nding lang uage file  to apply c hanges.   763                                      Recompil e correspo nding lang uage file  to apply c hanges.
764                             </td>   764                             </td>
765                    </tr >   765                    </tr >
766           </ table>   766           </ table>
767           <d iv align=" center"><b r /><input  type="sub mit" name= "UpdateLan gString" v alue="Save  changes"  /></div>   767           <d iv align=" center"><b r /><input  type="sub mit" name= "UpdateLan gString" v alue="Save  changes"  /></div>
768           </ form>   768           </ form>
769   <?   769   <?
770                       770                    
771                    retu rn PopupPa geTemplate ('Edit Lan guage Stri ng', ob_ge t_clean(),  $script);   771                    retu rn PopupPa geTemplate ('Edit Lan guage Stri ng', ob_ge t_clean(),  $script);
772           }   772           }
773   }   773   }
774     774  
775   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)
776   {   776   {
777           fu nction htm lProcessed Prefix($st ring, $pre fixLen = 1 5)   777           fu nction htm lProcessed Prefix($st ring, $pre fixLen = 1 5)
778           {   778           {
779                    $str Len = strl en($string );   779                    $str Len = strl en($string );
780                    if(  $strLen <=  0) return  '&nbsp;';   780                    if(  $strLen <=  0) return  '&nbsp;';
781                    $pre fix = html specialcha rs(mb_subs tr($string , 0, $pref ixLen));   781                    $pre fix = html specialcha rs(mb_subs tr($string , 0, $pref ixLen));
782                    if (  $strLen >  $prefixLe n )   782                    if (  $strLen >  $prefixLe n )
783                             $prefi x .= '<fon t color="# ee0000">.. .</font>';   783                             $prefi x .= '<fon t color="# ee0000">.. .</font>';
784                    retu rn $prefix ;   784                    retu rn $prefix ;
785           }   785           }
786     786  
787           fu nction del eteLanguag eKey()   787           fu nction del eteLanguag eKey()
788           {   788           {
789                    $lan gKeyID = ( int)$_POST ['DeleteLa ngKey'];   789                    $lan gKeyID = ( int)$_POST ['DeleteLa ngKey'];
790                    $res Key = db_r es('SELECT  `Key` FRO M `Localiz ationKeys`  WHERE `ID ` = '.$lan gKeyID);   790                    $res Key = db_r es('SELECT  `Key` FRO M `Localiz ationKeys`  WHERE `ID ` = '.$lan gKeyID);
791                    if (  !mysql_nu m_rows($re sKey) )   791                    if (  !mysql_nu m_rows($re sKey) )
792                             return  '<font co lor="red"> Error: lan guage key  not found. </font>';   792                             return  '<font co lor="red"> Error: lan guage key  not found. </font>';
793                       793                    
794                    db_r es('DELETE  FROM `Loc alizationK eys` WHERE  `ID`='.$l angKeyID);   794                    db_r es('DELETE  FROM `Loc alizationK eys` WHERE  `ID`='.$l angKeyID);
795                    db_r es('DELETE  FROM `Loc alizationS trings` WH ERE `IDKey ` = '.$lan gKeyID);   795                    db_r es('DELETE  FROM `Loc alizationS trings` WH ERE `IDKey ` = '.$lan gKeyID);
796                    db_r es('DELETE  FROM `Loc alizationS tringParam s` WHERE ` IDKey` = ' .$langKeyI D);   796                    db_r es('DELETE  FROM `Loc alizationS tringParam s` WHERE ` IDKey` = ' .$langKeyI D);
797     797  
798                    if ( !compileLa nguage())   798                    if ( !compileLa nguage())
799                             return  '<font co lor="red"> Error: cou ld not rec ompile lan guage file s.</font>' ;   799                             return  '<font co lor="red"> Error: cou ld not rec ompile lan guage file s.</font>' ;
800     800  
801                    $arr Key = mysq l_fetch_as soc($resKe y);   801                    $arr Key = mysq l_fetch_as soc($resKe y);
802     802  
803                    retu rn '<font  color="gre en">The <b >'.htmlspe cialchars( $arrKey['K ey']).'</b > language  key has b een succes sfully rem oved.</fon t>';   803                    retu rn '<font  color="gre en">The <b >'.htmlspe cialchars( $arrKey['K ey']).'</b > language  key has b een succes sfully rem oved.</fon t>';
804           }   804           }
805     805  
806           if  ( isset($ _POST['Del eteLangKey ']) )   806           if  ( isset($ _POST['Del eteLangKey ']) )
807                    $res ultMsg = d eleteLangu ageKey();   807                    $res ultMsg = d eleteLangu ageKey();
808     808  
809           gl obal   809           gl obal
810                    $sea rchString,   810                    $sea rchString,
811                    $sea rchCombine WordsAs,   811                    $sea rchCombine WordsAs,
812                    $sea rchInKeys,   812                    $sea rchInKeys,
813                    $sea rchInStrin gs,   813                    $sea rchInStrin gs,
814                    $sea rchInParam s,   814                    $sea rchInParam s,
815                    $sea rchCategor ies,   815                    $sea rchCategor ies,
816                    $sea rchLanguag es;   816                    $sea rchLanguag es;
817     817  
818           $r es = findL angStrings (   818           $r es = findL angStrings (
819           $s earchStrin g,   819           $s earchStrin g,
820           $s earchCombi neWordsAs,   820           $s earchCombi neWordsAs,
821           $s earchInKey s,   821           $s earchInKey s,
822           $s earchInStr ings,   822           $s earchInStr ings,
823           $s earchInPar ams,   823           $s earchInPar ams,
824           $s earchCateg ories,   824           $s earchCateg ories,
825           $s earchLangu ages);   825           $s earchLangu ages);
826     826  
827           ob _start();   827           ob _start();
828   ?>   828   ?>
829           <a  href="jav ascript:vo id(0)" onc lick="popu pForm('<?=  $_SERVER[ 'PHP_SELF' ] ?>?view= addLanguag eKey', 200 , 100, 750 , 500, 'ye s'); retur n false;"> Add a new  language k ey</a><br  /><hr />   829           <a  href="jav ascript:vo id(0)" onc lick="popu pForm('<?=  $_SERVER[ 'PHP_SELF' ] ?>?view= addLanguag eKey', 200 , 100, 750 , 500, 'ye s'); retur n false;"> Add a new  language k ey</a><br  /><hr />
830   <?   830   <?
831     831  
832           ec ho $result Msg.'<br / >';   832           ec ho $result Msg.'<br / >';
833     833  
834           $n umRows = m ysql_num_r ows($res);   834           $n umRows = m ysql_num_r ows($res);
835     835  
836           if  ( $numRow s > $maxRo wsToShow & & !$showMo reThanMax)   836           if  ( $numRow s > $maxRo wsToShow & & !$showMo reThanMax)
837           {   837           {
838                    $get Query = $_ SERVER["QU ERY_STRING "];   838                    $get Query = $_ SERVER["QU ERY_STRING "];
839                    if(s trlen($get Query) > 0 ) $getQuer y .= '&';   839                    if(s trlen($get Query) > 0 ) $getQuer y .= '&';
840                    $get Query .= ' showMoreTh anMax=yes' ;   840                    $get Query .= ' showMoreTh anMax=yes' ;
841   ?>   841   ?>
842   <div align ="center"  style="pad ding: 20px ">   842   <div align ="center"  style="pad ding: 20px ">
843           Yo ur search  criteria r esult in < b><?= $num Rows ?></b > strings.   843           Yo ur search  criteria r esult in < b><?= $num Rows ?></b > strings.
844           <b r />   844           <b r />
845           Ar e you sure  you want  to show al l of them?   845           Ar e you sure  you want  to show al l of them?
846           <b r />   846           <b r />
847           <a  href="<?=  $_SERVER[ 'PHP_SELF' ].'?'.$get Query ?>"> Yes</a>   847           <a  href="<?=  $_SERVER[ 'PHP_SELF' ].'?'.$get Query ?>"> Yes</a>
848   </div>   848   </div>
849   <?   849   <?
850                    retu rn panelSe ction("Lan guage stri ngs", ob_g et_clean() );   850                    retu rn panelSe ction("Lan guage stri ngs", ob_g et_clean() );
851           }   851           }
852   ?>   852   ?>
853   <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">
854           <t r class="H eaderRow">   854           <t r class="H eaderRow">
855                    <td> Key</td>   855                    <td> Key</td>
856                    <td> String</td >   856                    <td> String</td >
857                    <td> Category</ td>   857                    <td> Category</ td>
858                    <td> Language</ td>   858                    <td> Language</ td>
859                    <td  colspan="2 ">&nbsp;</ td>   859                    <td  colspan="2 ">&nbsp;</ td>
860           </ tr>   860           </ tr>
861   <?   861   <?
862           if  ( !mysql_ num_rows($ res) ) {   862           if  ( !mysql_ num_rows($ res) ) {
863   ?>   863   ?>
864           <t r>   864           <t r>
865                    <td  colspan="5 " align="c enter" cla ss="Left"> No strings  found mat ching your  criteria. </td>   865                    <td  colspan="5 " align="c enter" cla ss="Left"> No strings  found mat ching your  criteria. </td>
866           </ tr>   866           </ tr>
867   <?   867   <?
868           }   868           }
869              869           
870           wh ile($arrSt ring = mys ql_fetch_a ssoc($res) ) {   870           wh ile($arrSt ring = mys ql_fetch_a ssoc($res) ) {
871   ?>   871   ?>
872           <t r>   872           <t r>
873           <t d class="L eft"><?= h tmlProcess edPrefix($ arrString[ 'Key'], 20 ) ?></td>   873           <t d class="L eft"><?= h tmlProcess edPrefix($ arrString[ 'Key'], 20 ) ?></td>
874           <t d><?= html ProcessedP refix($arr String['St ring'], 32 ) ?></td>   874           <t d><?= html ProcessedP refix($arr String['St ring'], 32 ) ?></td>
875           <t d><?= html ProcessedP refix($arr String['Ca tegory'],  25) ?></td >   875           <t d><?= html ProcessedP refix($arr String['Ca tegory'],  25) ?></td >
876           <t d><?= html ProcessedP refix($arr String['La nguage'],  20) ?></td >   876           <t d><?= html ProcessedP refix($arr String['La nguage'],  20) ?></td >
877           <t d width="2 0"><a   877           <t d width="2 0"><a
878                             href=" javascript : void(0)"   878                             href=" javascript : void(0)"
879                             onclic k="popupFo rm('<?=   879                             onclic k="popupFo rm('<?=
880                                      $_SERVER ['PHP_SELF '].   880                                      $_SERVER ['PHP_SELF '].
881                                      '?view=e ditLangStr ing&editSt ringKeyID= '.   881                                      '?view=e ditLangStr ing&editSt ringKeyID= '.
882                                      $arrStri ng['IDKey' ].   882                                      $arrStri ng['IDKey' ].
883                                      '&editSt ringLangID ='.   883                                      '&editSt ringLangID ='.
884                                      $arrStri ng['IDLang uage'] ?>' , 300, 100 , 600, 570 , 'no'); r eturn fals e;">Edit</ a>   884                                      $arrStri ng['IDLang uage'] ?>' , 300, 100 , 600, 570 , 'no'); r eturn fals e;">Edit</ a>
885           </ td>   885           </ td>
886           <t d width="3 0">   886           <t d width="3 0">
887                    <for m   887                    <for m
888                             id="De leteLangKe yForm_<?=  $arrString ['IDKey']  ?>"   888                             id="De leteLangKe yForm_<?=  $arrString ['IDKey']  ?>"
889                             style= "margin: 0 px; paddin g: 0px"   889                             style= "margin: 0 px; paddin g: 0px"
890                             action ="<?= html specialcha rs($_SERVE R['PHP_SEL F'].'?'.$_ SERVER['QU ERY_STRING ']) ?>"   890                             action ="<?= html specialcha rs($_SERVE R['PHP_SEL F'].'?'.$_ SERVER['QU ERY_STRING ']) ?>"
891                             method ="post"><i nput name= "DeleteLan gKey" valu e="<?= $ar rString['I DKey'] ?>"  type="hid den"/></fo rm><a   891                             method ="post"><i nput name= "DeleteLan gKey" valu e="<?= $ar rString['I DKey'] ?>"  type="hid den"/></fo rm><a
892                             href=" javascript :void(0)"   892                             href=" javascript :void(0)"
893                             onclic k="if(conf irm('This  operation  will delet e the lang uage key i tself and  all corres ponding la nguage str ings from  all langua ges. Are y ou sure yo u want to  continue?' )){ docume nt.getElem entById('D eleteLangK eyForm_<?=  $arrStrin g['IDKey']  ?>').subm it();} ret urn false; ">Delete</ a>   893                             onclic k="if(conf irm('This  operation  will delet e the lang uage key i tself and  all corres ponding la nguage str ings from  all langua ges. Are y ou sure yo u want to  continue?' )){ docume nt.getElem entById('D eleteLangK eyForm_<?=  $arrStrin g['IDKey']  ?>').subm it();} ret urn false; ">Delete</ a>
894           </ td>   894           </ td>
895           </ tr>   895           </ tr>
896   <?   896   <?
897           }   897           }
898   ?>   898   ?>
899   </table>   899   </table>
900   <br />   900   <br />
901   <?   901   <?
902              902           
903           re turn panel Section("L anguage st rings", ob _get_clean ());   903           re turn panel Section("L anguage st rings", ob _get_clean ());
904   }   904   }
905     905  
906   function e ditLanguag eForm()   906   function e ditLanguag eForm()
907   {   907   {
908           $l angID = (i nt)$_GET[' editLangua geID'];   908           $l angID = (i nt)$_GET[' editLangua geID'];
909           $r esLang = d b_res('SEL ECT `Name` , `Flag`,  `Title` FR OM `Locali zationLang uages` WHE RE `ID` =  '.$langID) ;   909           $r esLang = d b_res('SEL ECT `Name` , `Flag`,  `Title` FR OM `Locali zationLang uages` WHE RE `ID` =  '.$langID) ;
910     910  
911           if  ( !mysql_ num_rows($ resLang) )   911           if  ( !mysql_ num_rows($ resLang) )
912                    retu rn PopupPa geTemplate ('Edit Lan guage', me ssageTempl ate('<font  color="re d">Error:  language d oes not ex ist.</font >'));   912                    retu rn PopupPa geTemplate ('Edit Lan guage', me ssageTempl ate('<font  color="re d">Error:  language d oes not ex ist.</font >'));
913     913  
914           fu nction upd ateLanguag e($langID)  {   914           fu nction upd ateLanguag e($langID)  {
915                    $lan gID = (int )$langID;   915                    $lan gID = (int )$langID;
916     916  
917                    $new LanguageNa me  = proc ess_db_inp ut($_POST[ 'LanguageN ame']);   917                    $new LanguageNa me  = proc ess_db_inp ut($_POST[ 'LanguageN ame']);
918                    $sNe wFlag          = proc ess_db_inp ut($_POST[ 'Flag']);   918                    $sNe wFlag          = proc ess_db_inp ut($_POST[ 'Flag']);
919                    $new LanguageTi tle = proc ess_db_inp ut($_POST[ 'LanguageT itle']);   919                    $new LanguageTi tle = proc ess_db_inp ut($_POST[ 'LanguageT itle']);
920     920  
921                    if (  !strlen($ newLanguag eName) )   921                    if (  !strlen($ newLanguag eName) )
922                             return  '<font co lor="red"> Error: lan guage name  not speci fied.</fon t>';   922                             return  '<font co lor="red"> Error: lan guage name  not speci fied.</fon t>';
923     923  
924                    $sQu ery = "   924                    $sQu ery = "
925                             UPDATE  `Localiza tionLangua ges` SET   925                             UPDATE  `Localiza tionLangua ges` SET
926                                      `Name`=' $newLangua geName',   926                                      `Name`=' $newLangua geName',
927                                      `Title`= '$newLangu ageTitle',   927                                      `Title`= '$newLangu ageTitle',
928                                      `Flag` =  '$sNewFla g'   928                                      `Flag` =  '$sNewFla g'
929                             WHERE  `ID` = $la ngID";   929                             WHERE  `ID` = $la ngID";
930                       930                    
931                    db_r es( $sQuer y );   931                    db_r es( $sQuer y );
932     932  
933                    if (  mysql_aff ected_rows ($GLOBALS[ 'MySQL']-> link) )   933                    if (  mysql_aff ected_rows ($GLOBALS[ 'MySQL']-> link) )
934                             return  'Language  has been  successful ly updated .';   934                             return  'Language  has been  successful ly updated .';
935     935  
936                    retu rn '<font  color="red ">Error: l anguage co uld not be  updated.< /font>';   936                    retu rn '<font  color="red ">Error: l anguage co uld not be  updated.< /font>';
937           }   937           }
938     938  
939           if  ( isset($ _POST['Upd ateLanguag e']) )   939           if  ( isset($ _POST['Upd ateLanguag e']) )
940                    retu rn PopupPa geTemplate ('Edit Lan guage', me ssageTempl ate(update Language($ langID)));   940                    retu rn PopupPa geTemplate ('Edit Lan guage', me ssageTempl ate(update Language($ langID)));
941     941  
942           $a rrLang = m ysql_fetch _assoc($re sLang);   942           $a rrLang = m ysql_fetch _assoc($re sLang);
943     943  
944           ob _start();   944           ob _start();
945     945  
946           $i sLangDefau lt = getPa ram('lang_ default')  == $arrLan g['Name'];   946           $i sLangDefau lt = getPa ram('lang_ default')  == $arrLan g['Name'];
947   ?>   947   ?>
948   <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">
949   <table>   949   <table>
950           <t r>   950           <t r>
951                    <td> Language t itle:</td>   951                    <td> Language t itle:</td>
952                    <td>   952                    <td>
953                             <input  name="Lan guageTitle " type="te xt" value= "<?= htmls pecialchar s($arrLang ['Title'])  ?>" />   953                             <input  name="Lan guageTitle " type="te xt" value= "<?= htmls pecialchar s($arrLang ['Title'])  ?>" />
954                    </td >   954                    </td >
955           </ tr>   955           </ tr>
956           <t r>   956           <t r>
957                    <td>   957                    <td>
958                             Langua ge code   958                             Langua ge code
959                             <a hre f="http:// www.boonex .com/unity /txt/exten sion_requi rements#La nguageFile s" target= "_blank">? </a>:   959                             <a hre f="http:// www.boonex .com/unity /txt/exten sion_requi rements#La nguageFile s" target= "_blank">? </a>:
960                    </td >   960                    </td >
961                    <td>   961                    <td>
962                             <input  name="Lan guageName"  type="tex t" value=" <?= htmlsp ecialchars ($arrLang[ 'Name']) ? >"   962                             <input  name="Lan guageName"  type="tex t" value=" <?= htmlsp ecialchars ($arrLang[ 'Name']) ? >"
963                                <?=   getParam(' lang_defau lt')==$arr Lang['Name ']   ?   ' disabl e
d
'   :   ''   ?>   />
  963                                <?=   getParam(' lang_defau lt')==$arr Lang['Name ']   ?   ' r e a d only '   :   ''   ?>   />
964                    </td >   964                    </td >
965           </ tr>   965           </ tr>
966           <t r>   966           <t r>
967                    <td> Flag:</td>   967                    <td> Flag:</td>
968                    <td> <?= showLa ngIcons($a rrLang['Fl ag']); ?>< /td>   968                    <td> <?= showLa ngIcons($a rrLang['Fl ag']); ?>< /td>
969           </ tr>   969           </ tr>
970   </table>   970   </table>
971   <br />   971   <br />
972   <center><i nput type= "submit" n ame="Updat eLanguage"  value="Sa ve Changes " /></cent er>   972   <center><i nput type= "submit" n ame="Updat eLanguage"  value="Sa ve Changes " /></cent er>
973   </form>   973   </form>
974   <?   974   <?
975              975           
976           re turn Popup PageTempla te('Edit L anguage',  ob_get_cle an());   976           re turn Popup PageTempla te('Edit L anguage',  ob_get_cle an());
977   }   977   }
978     978  
979   function m anageLangu agesBlock( ) {   979   function m anageLangu agesBlock( ) {
980           gl obal $site ;   980           gl obal $site ;
981              981           
982           fu nction cop yLanguage( ) {   982           fu nction cop yLanguage( ) {
983                    $new LangTitle  = process_ db_input($ _POST['Cop yLanguage_ Title']);   983                    $new LangTitle  = process_ db_input($ _POST['Cop yLanguage_ Title']);
984                    $new LangName   = process_ db_input($ _POST['Cop yLanguage_ Name']);   984                    $new LangName   = process_ db_input($ _POST['Cop yLanguage_ Name']);
985     985  
986                    $sFl ag = htmls pecialchar s_adv($_PO ST['Flag'] );   986                    $sFl ag = htmls pecialchar s_adv($_PO ST['Flag'] );
987     987  
988                    $sou rceLangID  = (int)$_P OST['CopyL anguage_So urceLangID '];   988                    $sou rceLangID  = (int)$_P OST['CopyL anguage_So urceLangID '];
989     989  
990                    if(s trlen($new LangTitle)  <= 0) ret urn '<font  color="re d">Error:  please spe cify a tit le for the  new langu age.</font >';   990                    if(s trlen($new LangTitle)  <= 0) ret urn '<font  color="re d">Error:  please spe cify a tit le for the  new langu age.</font >';
991                    if(s trlen($new LangName)  <= 0)  ret urn '<font  color="re d">Error:  please spe cify a cod e for the  new langua ge.</font> ';   991                    if(s trlen($new LangName)  <= 0)  ret urn '<font  color="re d">Error:  please spe cify a cod e for the  new langua ge.</font> ';
992     992  
993                    db_r es("   993                    db_r es("
994                             INSERT  INTO `Loc alizationL anguages`   994                             INSERT  INTO `Loc alizationL anguages`
995                             (`Name `, `Flag`,  `Title`)  VALUES   995                             (`Name `, `Flag`,  `Title`)  VALUES
996                             ('{$ne wLangName} ', '{$sFla g}', '{$ne wLangTitle }')   996                             ('{$ne wLangName} ', '{$sFla g}', '{$ne wLangTitle }')
997                    ");   997                    ");
998     998  
999                    if(m ysql_affec ted_rows($ GLOBALS['M ySQL']->li nk) <= 0)  return '<f ont color= "red">Erro r: could n ot add a n ew languag e to the d atabase.</ font>';   999                    if(m ysql_affec ted_rows($ GLOBALS['M ySQL']->li nk) <= 0)  return '<f ont color= "red">Erro r: could n ot add a n ew languag e to the d atabase.</ font>';
1000     1000  
1001                    $new LangID = m ysql_inser t_id($GLOB ALS['MySQL ']->link);   1001                    $new LangID = m ysql_inser t_id($GLOB ALS['MySQL ']->link);
1002     1002  
1003                    $res SourceLang Strings =  db_res("   1003                    $res SourceLang Strings =  db_res("
1004                             SELECT   `IDKey`,  `String`   1004                             SELECT   `IDKey`,  `String`
1005                             FROM     `Localiz ationStrin gs`   1005                             FROM     `Localiz ationStrin gs`
1006                             WHERE    `IDLangu age` = $so urceLangID   1006                             WHERE    `IDLangu age` = $so urceLangID
1007                    ");   1007                    ");
1008     1008  
1009                    whil e($arr = m ysql_fetch _assoc($re sSourceLan gStrings))   1009                    whil e($arr = m ysql_fetch _assoc($re sSourceLan gStrings))
1010                    {   1010                    {
1011                             $arr[' String'] =  addslashe s($arr['St ring']);   1011                             $arr[' String'] =  addslashe s($arr['St ring']);
1012                             db_res ("   1012                             db_res ("
1013                                      INSERT I NTO `Local izationStr ings`   1013                                      INSERT I NTO `Local izationStr ings`
1014                                      (`IDKey` , `IDLangu age`, `Str ing`) VALU ES   1014                                      (`IDKey` , `IDLangu age`, `Str ing`) VALU ES
1015                                      ('{$arr[ 'IDKey']}' , $newLang ID, '{$arr ['String'] }')   1015                                      ('{$arr[ 'IDKey']}' , $newLang ID, '{$arr ['String'] }')
1016                                      ", 0);   1016                                      ", 0);
1017                                1017                             
1018                             if( !m ysql_affec ted_rows($ GLOBALS['M ySQL']->li nk) )   1018                             if( !m ysql_affec ted_rows($ GLOBALS['M ySQL']->li nk) )
1019                                      return ' <font colo r="red">Er ror: could  not add a  language  string to  the databa se.</font> ';   1019                                      return ' <font colo r="red">Er ror: could  not add a  language  string to  the databa se.</font> ';
1020                    }   1020                    }
1021     1021  
1022                    retu rn '<font  color="gre en"><b>'.h tmlspecial chars(stri pslashes($ newLangNam e)).'</b>  language h as been su ccessfully  created.< /font>';   1022                    retu rn '<font  color="gre en"><b>'.h tmlspecial chars(stri pslashes($ newLangNam e)).'</b>  language h as been su ccessfully  created.< /font>';
1023           }   1023           }
1024     1024  
1025           fu nction get LangName($ langID) {   1025           fu nction get LangName($ langID) {
1026                    $lan gName = db _res('SELE CT `Name`  FROM `Loca lizationLa nguages` W HERE `ID`  = '.(int)$ langID);   1026                    $lan gName = db _res('SELE CT `Name`  FROM `Loca lizationLa nguages` W HERE `ID`  = '.(int)$ langID);
1027                    $lan gName = my sql_fetch_ row($langN ame);   1027                    $lan gName = my sql_fetch_ row($langN ame);
1028                    retu rn $langNa me[0];   1028                    retu rn $langNa me[0];
1029           }   1029           }
1030     1030  
1031           if  ( $_POST[ 'CopyLangu age'] )   1031           if  ( $_POST[ 'CopyLangu age'] )
1032                    $res ultMsg = c opyLanguag e();   1032                    $res ultMsg = c opyLanguag e();
1033           el se if ( is set($_POST ['CompileL anguage'])  ) {   1033           el se if ( is set($_POST ['CompileL anguage'])  ) {
1034                    $lan gName = ge tLangName( $_POST['Co mpileLangu age']);   1034                    $lan gName = ge tLangName( $_POST['Co mpileLangu age']);
1035     1035  
1036                    if (  compileLa nguage((in t)$_POST[' CompileLan guage']) )   1036                    if (  compileLa nguage((in t)$_POST[' CompileLan guage']) )
1037                             $resul tMsg = '<f ont color= "green"><b >'.htmlspe cialchars( $langName) .'</b> lan guage has  been succe ssfully co mpiled.</f ont>';   1037                             $resul tMsg = '<f ont color= "green"><b >'.htmlspe cialchars( $langName) .'</b> lan guage has  been succe ssfully co mpiled.</f ont>';
1038                    else   1038                    else
1039                             $resul tMsg = '<f ont color= "red>Error : could no t compile  a language .</font>';   1039                             $resul tMsg = '<f ont color= "red>Error : could no t compile  a language .</font>';
1040           }  else if (  isset($_PO ST['Delete Language'] ) ) {   1040           }  else if (  isset($_PO ST['Delete Language'] ) ) {
1041                    $lan gName = ge tLangName( $_POST['De leteLangua ge']);   1041                    $lan gName = ge tLangName( $_POST['De leteLangua ge']);
1042     1042  
1043                    if (  $langName  == getPar am('lang_d efault'))   1043                    if (  $langName  == getPar am('lang_d efault'))
1044                             $resul tMsg = '<f ont color= "red">Cann ot delete  the defaul t language . You have  to set an other defa ult langua ge for the  site in < b>global s ettings ->  Change la nguage set tings</b>  to be able  to delete  this one. </font>';   1044                             $resul tMsg = '<f ont color= "red">Cann ot delete  the defaul t language . You have  to set an other defa ult langua ge for the  site in < b>global s ettings ->  Change la nguage set tings</b>  to be able  to delete  this one. </font>';
1045                    else   1045                    else
1046                    {   1046                    {
1047                             if ( d eleteLangu age((int)$ _POST['Del eteLanguag e']) )   1047                             if ( d eleteLangu age((int)$ _POST['Del eteLanguag e']) )
1048                                      $resultM sg = '<fon t color="g reen"><b>' .htmlspeci alchars($l angName).' </b> langu age has be en success fully remo ved.</font >';   1048                                      $resultM sg = '<fon t color="g reen"><b>' .htmlspeci alchars($l angName).' </b> langu age has be en success fully remo ved.</font >';
1049                             else   1049                             else
1050                                      $resultM sg = '<fon t color="r ed">Error:  could not  delete a  language.< /font>';   1050                                      $resultM sg = '<fon t color="r ed">Error:  could not  delete a  language.< /font>';
1051                    }   1051                    }
1052           }   1052           }
1053     1053  
1054              1054           
1055           ob _start();   1055           ob _start();
1056           di splayLangu ageSetting s();   1056           di splayLangu ageSetting s();
1057           $s Con1 = pan elSection( 'Language' , ob_get_c lean());   1057           $s Con1 = pan elSection( 'Language' , ob_get_c lean());
1058              1058           
1059           $a rrLangs =  getLangsAr r(false, t rue);   1059           $a rrLangs =  getLangsAr r(false, t rue);
1060     1060  
1061           ob _start();   1061           ob _start();
1062   ?>   1062   ?>
1063   <form acti on="<?= $_ SERVER['PH P_SELF'] ? >" method= "post" sty le="margin :0px">   1063   <form acti on="<?= $_ SERVER['PH P_SELF'] ? >" method= "post" sty le="margin :0px">
1064           Ne w language :   1064           Ne w language :
1065           <i nput type= "text" nam e="CopyLan guage_Titl e" style=" width: 100 px" />   1065           <i nput type= "text" nam e="CopyLan guage_Titl e" style=" width: 100 px" />
1066           <a  href="htt p://www.bo onex.com/u nity/txt/e xtension_r equirement s#Language Files" tar get="_blan k"   1066           <a  href="htt p://www.bo onex.com/u nity/txt/e xtension_r equirement s#Language Files" tar get="_blan k"
1067              onmouseove r="showFlo atDesc( 'I nternation al languag e code. Fo r details  please rea d about In ternationa l standard s (click t o this lin k).' );"   1067              onmouseove r="showFlo atDesc( 'I nternation al languag e code. Fo r details  please rea d about In ternationa l standard s (click t o this lin k).' );"
1068              onmousemov e="moveFlo atDesc( ev ent );"   1068              onmousemov e="moveFlo atDesc( ev ent );"
1069              onmouseout ="hideFloa tDesc();"   1069              onmouseout ="hideFloa tDesc();"
1070                    >Cod e</a>:   1070                    >Cod e</a>:
1071           <i nput type= "text" nam e="CopyLan guage_Name " style="w idth: 40px ;" maxleng th="5" />   1071           <i nput type= "text" nam e="CopyLan guage_Name " style="w idth: 40px ;" maxleng th="5" />
1072           Co py from:   1072           Co py from:
1073           <s elect name ="CopyLang uage_Sourc eLangID" s tyle="widt h: 100px">   1073           <s elect name ="CopyLang uage_Sourc eLangID" s tyle="widt h: 100px">
1074                    <? f oreach ($a rrLangs as  $langID = > $langNam e) { ?>   1074                    <? f oreach ($a rrLangs as  $langID = > $langNam e) { ?>
1075                    <opt ion value= "<?= $lang ID ?>"><?=  htmlspeci alchars($l angName) ? ></option>   1075                    <opt ion value= "<?= $lang ID ?>"><?=  htmlspeci alchars($l angName) ? ></option>
1076                    <? }  ?>   1076                    <? }  ?>
1077           </ select>   1077           </ select>
1078           Fl ag:    1078           Fl ag: 
1079   <?   1079   <?
1080           ec ho showLan gIcons();   1080           ec ho showLan gIcons();
1081   ?>   1081   ?>
1082           <b r />   1082           <b r />
1083           <b r />   1083           <b r />
1084           <c enter>   1084           <c enter>
1085           <i nput type= "submit" n ame="CopyL anguage" v alue="Crea te" />   1085           <i nput type= "submit" n ame="CopyL anguage" v alue="Crea te" />
1086           </ center>   1086           </ center>
1087   </form>   1087   </form>
1088   <br />   1088   <br />
1089   <?   1089   <?
1090           if  ( strlen( $resultMsg ) )   1090           if  ( strlen( $resultMsg ) )
1091                    echo  $resultMs g.'<br />< br />';   1091                    echo  $resultMs g.'<br />< br />';
1092   ?>   1092   ?>
1093   <table cla ss="Langua gesStrings " cellpadd ing="0" ce llspacing= "0">   1093   <table cla ss="Langua gesStrings " cellpadd ing="0" ce llspacing= "0">
1094           <t r class="H eaderRow">   1094           <t r class="H eaderRow">
1095                    <td  width="85% " align="l eft">Langu age</td>   1095                    <td  width="85% " align="l eft">Langu age</td>
1096                    <td  width="15% " align="l eft">Flag< /td>   1096                    <td  width="15% " align="l eft">Flag< /td>
1097                    <td  colspan="3 ">&nbsp;</ td>   1097                    <td  colspan="3 ">&nbsp;</ td>
1098           </ tr>   1098           </ tr>
1099   <?   1099   <?
1100           $r esLangs =  db_res('   1100           $r esLangs =  db_res('
1101                    SELE CT `ID`, ` Name`, `Fl ag`, `Titl e`   1101                    SELE CT `ID`, ` Name`, `Fl ag`, `Titl e`
1102                    FROM  `Localiza tionLangua ges`   1102                    FROM  `Localiza tionLangua ges`
1103                    ORDE R BY `Name `   1103                    ORDE R BY `Name `
1104           ') ;   1104           ') ;
1105     1105  
1106           $d efaultLang Name = get Param('lan g_default' );   1106           $d efaultLang Name = get Param('lan g_default' );
1107     1107  
1108           wh ile ($arrL ang = mysq l_fetch_as soc($resLa ngs))   1108           wh ile ($arrL ang = mysq l_fetch_as soc($resLa ngs))
1109           {   1109           {
1110   ?>   1110   ?>
1111           <t r>   1111           <t r>
1112                    <td  class="Lef t">   1112                    <td  class="Lef t">
1113                             <?= ht mlspecialc hars($arrL ang['Title ']) ?>   1113                             <?= ht mlspecialc hars($arrL ang['Title ']) ?>
1114                             [<?= $ arrLang['N ame'] ?>]   1114                             [<?= $ arrLang['N ame'] ?>]
1115                             <?= ($ arrLang['N ame'] == $ defaultLan gName ? '< font color ="red"> (d efault)</f ont>' : '' ) ?>   1115                             <?= ($ arrLang['N ame'] == $ defaultLan gName ? '< font color ="red"> (d efault)</f ont>' : '' ) ?>
1116                    </td >   1116                    </td >
1117                    <td> <img src=" <?= $site[ 'flags'].$ arrLang['F lag'].'.gi f'?>"></td >   1117                    <td> <img src=" <?= $site[ 'flags'].$ arrLang['F lag'].'.gi f'?>"></td >
1118                    <td> <a href="j avascript: void(0)" o nclick="po pupForm('< ?= $_SERVE R['PHP_SEL F'] ?>?vie w=editLang uage&editL anguageID= <?= $arrLa ng['ID'] ? >', 500, 3 00, 300, 2 00, 'no');  return fa lse;">Edit </a></td>   1118                    <td> <a href="j avascript: void(0)" o nclick="po pupForm('< ?= $_SERVE R['PHP_SEL F'] ?>?vie w=editLang uage&editL anguageID= <?= $arrLa ng['ID'] ? >', 500, 3 00, 300, 2 00, 'no');  return fa lse;">Edit </a></td>
1119                    <td>   1119                    <td>
1120                             <form  id="Compil eForm_<?=  $arrLang[' ID'] ?>" a ction="<?=  $_SERVER[ 'PHP_SELF' ] ?>" meth od="post"  style="pad ding: 0px;  margin: 0 px">   1120                             <form  id="Compil eForm_<?=  $arrLang[' ID'] ?>" a ction="<?=  $_SERVER[ 'PHP_SELF' ] ?>" meth od="post"  style="pad ding: 0px;  margin: 0 px">
1121                                      <input t ype="hidde n" name="C ompileLang uage" valu e="<?= $ar rLang['ID' ] ?>" />   1121                                      <input t ype="hidde n" name="C ompileLang uage" valu e="<?= $ar rLang['ID' ] ?>" />
1122                             </form >   1122                             </form >
1123                             <a hre f="javascr ipt:void(0 )" onclick ="document .getElemen tById('Com pileForm_< ?= $arrLan g['ID'] ?> ').submit( ); return  false;">Co mpile</a>   1123                             <a hre f="javascr ipt:void(0 )" onclick ="document .getElemen tById('Com pileForm_< ?= $arrLan g['ID'] ?> ').submit( ); return  false;">Co mpile</a>
1124                    </td >   1124                    </td >
1125                    <td>   1125                    <td>
1126                             <form  id="Delete Form_<?= $ arrLang['I D'] ?>" ac tion="<?=  $_SERVER[' PHP_SELF']  ?>" metho d="post" s tyle="padd ing: 0px;  margin: 0p x">   1126                             <form  id="Delete Form_<?= $ arrLang['I D'] ?>" ac tion="<?=  $_SERVER[' PHP_SELF']  ?>" metho d="post" s tyle="padd ing: 0px;  margin: 0p x">
1127                                      <input t ype="hidde n" name="D eleteLangu age" value ="<?= $arr Lang['ID']  ?>" />   1127                                      <input t ype="hidde n" name="D eleteLangu age" value ="<?= $arr Lang['ID']  ?>" />
1128                             </form >   1128                             </form >
1129                             <a hre f="javascr ipt:void(0 )"   1129                             <a hre f="javascr ipt:void(0 )"
1130                               oncl ick="if( c onfirm( 'A re you sur e want to  delete thi s language ?' ) ) doc ument.getE lementById ('DeleteFo rm_<?= $ar rLang['ID' ] ?>').sub mit(); ret urn false; "   1130                               oncl ick="if( c onfirm( 'A re you sur e want to  delete thi s language ?' ) ) doc ument.getE lementById ('DeleteFo rm_<?= $ar rLang['ID' ] ?>').sub mit(); ret urn false; "
1131                                      ><font c olor="red" >Delete</f ont></a>   1131                                      ><font c olor="red" >Delete</f ont></a>
1132                    </td >   1132                    </td >
1133           </ tr>   1133           </ tr>
1134   <?   1134   <?
1135           }   1135           }
1136   ?>   1136   ?>
1137   </table>   1137   </table>
1138   <?   1138   <?
1139              1139           
1140           $s Con2 = pan elSection( 'Language  Files', ob _get_clean ());   1140           $s Con2 = pan elSection( 'Language  Files', ob _get_clean ());
1141              1141           
1142           re turn $sCon 1.$sCon2;   1142           re turn $sCon 1.$sCon2;
1143   }   1143   }
1144     1144  
1145   function p anelSectio n($header,  $content,  $padding  = 10)   1145   function p anelSectio n($header,  $content,  $padding  = 10)
1146   {   1146   {
1147           ob _start();   1147           ob _start();
1148              1148           
1149           Co ntentBlock Head("$hea der");   1149           Co ntentBlock Head("$hea der");
1150           ec ho $conten t;   1150           ec ho $conten t;
1151           Co ntentBlock Foot();   1151           Co ntentBlock Foot();
1152     1152  
1153           re turn ob_ge t_clean();   1153           re turn ob_ge t_clean();
1154   }   1154   }
1155     1155  
1156   function s howLangIco ns($sCurLa ng = '')   1156   function s howLangIco ns($sCurLa ng = '')
1157   {   1157   {
1158           gl obal $site ;   1158           gl obal $site ;
1159              1159           
1160           $s Code = '';   1160           $s Code = '';
1161     1161  
1162           $s Query = "S ELECT `ISO 2`, `Count ry` FROM ` Countries`  ORDER BY  `Country`" ;   1162           $s Query = "S ELECT `ISO 2`, `Count ry` FROM ` Countries`  ORDER BY  `Country`" ;
1163           $r CountryLis t = db_res ($sQuery);   1163           $r CountryLis t = db_res ($sQuery);
1164              1164           
1165           $s OnChange =  "onChange =\"javascr ipt: flagI mage = doc ument.getE lementById ('flagImag eId'); fla gImage.src  = '{$site ['flags']} ' + this.v alue + '.g if';\"";   1165           $s OnChange =  "onChange =\"javascr ipt: flagI mage = doc ument.getE lementById ('flagImag eId'); fla gImage.src  = '{$site ['flags']} ' + this.v alue + '.g if';\"";
1166              1166           
1167           $s Code = '<s elect name ="Flag" id ="Flag" st yle="width :180px;" ' .$sOnChang e.'>';   1167           $s Code = '<s elect name ="Flag" id ="Flag" st yle="width :180px;" ' .$sOnChang e.'>';
1168           if  (strlen($ sCurLang))   1168           if  (strlen($ sCurLang))
1169                    $sDe fC = $sCur Lang;   1169                    $sDe fC = $sCur Lang;
1170           el se   1170           el se
1171                    $sDe fC = strto lower(getP aram( 'def ault_count ry' ));   1171                    $sDe fC = strto lower(getP aram( 'def ault_count ry' ));
1172              1172           
1173           wh ile($aList  = mysql_f etch_array ($rCountry List)) {   1173           wh ile($aList  = mysql_f etch_array ($rCountry List)) {
1174                    $sFl agCode = s trtolower( $aList['IS O2']);   1174                    $sFl agCode = s trtolower( $aList['IS O2']);
1175                    $sSe lect = $sD efC == $sF lagCode ?  'selected= "selected" ' : '' ;   1175                    $sSe lect = $sD efC == $sF lagCode ?  'selected= "selected" ' : '' ;
1176                    $sCo de .= '<op tion value ="'.$sFlag Code.'" '. $sSelect.' >'.$aList[ 'Country'] .'</option >';   1176                    $sCo de .= '<op tion value ="'.$sFlag Code.'" '. $sSelect.' >'.$aList[ 'Country'] .'</option >';
1177                    $sSe lect = '';   1177                    $sSe lect = '';
1178           }   1178           }
1179              1179           
1180           $s Code .= '< /select>';   1180           $s Code .= '< /select>';
1181           $s ImageCode  = '<img id ="flagImag eId" src=" '. ($site[ 'flags'])  .$sDefC.'. gif" alt=" flag" />';   1181           $s ImageCode  = '<img id ="flagImag eId" src=" '. ($site[ 'flags'])  .$sDefC.'. gif" alt=" flag" />';
1182           $s Code .= '& nbsp;'.$sI mageCode;   1182           $s Code .= '& nbsp;'.$sI mageCode;
1183     1183  
1184           re turn $sCod e;   1184           re turn $sCod e;
1185   }   1185   }
1186     1186  
1187   function d isplayLang uageSettin gs()   1187   function d isplayLang uageSettin gs()
1188   {   1188   {
1189       ?>   1189       ?>
1190       <cente r>   1190       <cente r>
1191       <form  method="po st" action ="<? echo  $_SERVER[P HP_SELF].' ?cat=ls';  ?>">   1191       <form  method="po st" action ="<? echo  $_SERVER[P HP_SELF].' ?cat=ls';  ?>">
1192       <input  type="hid den" name= "save_sett ings" valu e="yes">   1192       <input  type="hid den" name= "save_sett ings" valu e="yes">
1193       <table  width="10 0%" cellsp acing="2"  cellpaddin g="3" clas s="text">   1193       <table  width="10 0%" cellsp acing="2"  cellpaddin g="3" clas s="text">
1194           <t r class="t able">   1194           <t r class="t able">
1195                <td alig n="right"  width="50% "> <?php e cho getPar amDesc("la ng_default ") ?>: </t d>   1195                <td alig n="right"  width="50% "> <?php e cho getPar amDesc("la ng_default ") ?>: </t d>
1196                <td alig n="left">   1196                <td alig n="left">
1197                    <sel ect name=" lang_defau lt">   1197                    <sel ect name=" lang_defau lt">
1198                         <?php   1198                         <?php
1199                         $aLangs =  getLangsAr r();   1199                         $aLangs =  getLangsAr r();
1200                                               $sCurLang  = getParam ( 'lang_de fault' );   1200                                               $sCurLang  = getParam ( 'lang_de fault' );
1201                                                 1201                                              
1202                                               foreach( $ aLangs as  $sName =>  $sTitle )  {   1202                                               foreach( $ aLangs as  $sName =>  $sTitle )  {
1203                                                       $s Selected =  ( $sName  == $sCurLa ng ) ? 'se lected="se lected"' :  '';   1203                                                       $s Selected =  ( $sName  == $sCurLa ng ) ? 'se lected="se lected"' :  '';
1204                                                       ?>   1204                                                       ?>
1205                                                       <o ption valu e="<?= $sN ame ?>" <? = $sSelect ed ?>><?=  htmlspecia lchars_adv ( $sTitle  ) ?></opti on>   1205                                                       <o ption valu e="<?= $sN ame ?>" <? = $sSelect ed ?>><?=  htmlspecia lchars_adv ( $sTitle  ) ?></opti on>
1206                                                       <?   1206                                                       <?
1207                                               }   1207                                               }
1208                                               ?>   1208                                               ?>
1209                    </se lect>   1209                    </se lect>
1210                </td>   1210                </td>
1211           </ tr>   1211           </ tr>
1212       </tabl e>   1212       </tabl e>
1213       <br />   1213       <br />
1214       <input  class=no  type="subm it" value= "Save chan ges" name= "saveLangC hanges" cl ass=text>   1214       <input  class=no  type="subm it" value= "Save chan ges" name= "saveLangC hanges" cl ass=text>
1215       </form >   1215       </form >
1216       </cent er>   1216       </cent er>
1217       <?php   1217       <?php
1218              1218           
1219           re turn 'Lang uages';   1219           re turn 'Lang uages';
1220   }   1220   }
1221     1221  
1222   function s aveLanguag eSettings( )   1222   function s aveLanguag eSettings( )
1223   {   1223   {
1224       // sav e default  language.   1224       // sav e default  language.
1225       if ($_ POST['lang _default'] )   1225       if ($_ POST['lang _default'] )
1226                    setP aram('lang _default',  $_POST['l ang_defaul t']);   1226                    setP aram('lang _default',  $_POST['l ang_defaul t']);
1227   }   1227   }
1228     1228  
1229   function q uickHelp()   1229   function q uickHelp()
1230   {   1230   {
1231           ob _start();   1231           ob _start();
1232   ?>   1232   ?>
1233   <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>   1233   <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>
1234   <font size ="2" face= "Arial" co lor="black ">   1234   <font size ="2" face= "Arial" co lor="black ">
1235   The new <b >Dolphin</ b> languag e manageme nt system  is develop ed to ease  your work  with lang uage   1235   The new <b >Dolphin</ b> languag e manageme nt system  is develop ed to ease  your work  with lang uage
1236   strings by  managing  them via t his specia lly design ed web int erface rat her than e diting the m directly   1236   strings by  managing  them via t his specia lly design ed web int erface rat her than e diting the m directly
1237   in a langu age file,  unlike it  was in pre vious <b>D olphin</b>  versions.  Note that , in <b>Do lphin</b>,   1237   in a langu age file,  unlike it  was in pre vious <b>D olphin</b>  versions.  Note that , in <b>Do lphin</b>,
1238   you should  <b>NOT</b > edit lan guage file s manually  – they’re  now used  by   1238   you should  <b>NOT</b > edit lan guage file s manually  – they’re  now used  by
1239   the script  as tempor ary files  with parti al languag e informat ion only f or the sak e of perfo rmance.   1239   the script  as tempor ary files  with parti al languag e informat ion only f or the sak e of perfo rmance.
1240   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.   1240   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.
1241   <br /><br  />   1241   <br /><br  />
1242   You can se e an optio n of compi ling langu ages in th e top sect ion of the  language  management  interface .   1242   You can se e an optio n of compi ling langu ages in th e top sect ion of the  language  management  interface .
1243   <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   1243   <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
1244   in the <b> langs</b>  folder of  the script  with the  updated in formation  about lang uage strin gs and key s   1244   in the <b> langs</b>  folder of  the script  with the  updated in formation  about lang uage strin gs and key s
1245   stored in  the databa se. After  you change /add a lan guage stri ng or a la nguage key , a corres ponding la nguage   1245   stored in  the databa se. After  you change /add a lan guage stri ng or a la nguage key , a corres ponding la nguage
1246   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   1246   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
1247   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   1247   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
1248   specify wh ether to r ecompile c orrespondi ng languag e files au tomaticall y after th e changes  are saved.  These   1248   specify wh ether to r ecompile c orrespondi ng languag e files au tomaticall y after th e changes  are saved.  These
1249   checkboxes  are check ed by defa ult. You c an uncheck  them befo re submitt ing a form  not to re compile la nguage   1249   checkboxes  are check ed by defa ult. You c an uncheck  them befo re submitt ing a form  not to re compile la nguage
1250   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   1250   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
1251   because co mpiling a  language f ile is a r elatively  resource-i ntensive p rocess, so  you bette r recompil e   1251   because co mpiling a  language f ile is a r elatively  resource-i ntensive p rocess, so  you bette r recompil e
1252   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   1252   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
1253   recompilin g language  files aft er editing  each stri ng.</font>   1253   recompilin g language  files aft er editing  each stri ng.</font>
1254     1254  
1255   <?   1255   <?
1256           $c ontents =  ob_get_con tents();   1256           $c ontents =  ob_get_con tents();
1257           ob _end_clean ();   1257           ob _end_clean ();
1258     1258  
1259           re turn Popup PageTempla te('Langua ge Managem ent System  Notes', $ contents);   1259           re turn Popup PageTempla te('Langua ge Managem ent System  Notes', $ contents);
1260   }   1260   }
1261     1261  
1262   $logged['a dmin'] = m ember_auth ( 1, true,  true );   1262   $logged['a dmin'] = m ember_auth ( 1, true,  true );
1263     1263  
1264   $_page['he ader'] = ' Manage Lan guages'; / / Set page  title.   1264   $_page['he ader'] = ' Manage Lan guages'; / / Set page  title.
1265     1265  
1266   if ($_POST ['saveLang Changes'])   1266   if ($_POST ['saveLang Changes'])
1267           sa veLanguage Settings() ;   1267           sa veLanguage Settings() ;
1268     1268  
1269   // add/edi t a langua ge string   1269   // add/edi t a langua ge string
1270   if ( $_GET ['view'] = = 'addLang Key' ) {   1270   if ( $_GET ['view'] = = 'addLang Key' ) {
1271           ec ho addLang KeyForm();   1271           ec ho addLang KeyForm();
1272           ex it();   1272           ex it();
1273   } else if  ( $_GET['v iew'] == ' editLangSt ring') {   1273   } else if  ( $_GET['v iew'] == ' editLangSt ring') {
1274           ec ho editStr ingForm();   1274           ec ho editStr ingForm();
1275           ex it();   1275           ex it();
1276   } else if  ( $_GET['v iew'] == ' editLangua ge' ) {   1276   } else if  ( $_GET['v iew'] == ' editLangua ge' ) {
1277           ec ho editLan guageForm( );   1277           ec ho editLan guageForm( );
1278           ex it();   1278           ex it();
1279   } else if  ( $_GET['v iew'] == ' addLanguag eKey' ) {   1279   } else if  ( $_GET['v iew'] == ' addLanguag eKey' ) {
1280           ec ho addLang KeyForm();   1280           ec ho addLang KeyForm();
1281           ex it();   1281           ex it();
1282   } else if  ( $_GET['v iew'] == ' quickHelp'  ) {   1282   } else if  ( $_GET['v iew'] == ' quickHelp'  ) {
1283           ec ho quickHe lp();   1283           ec ho quickHe lp();
1284           ex it();   1284           ex it();
1285   }   1285   }
1286     1286  
1287   // INPUT V ALIDATION   1287   // INPUT V ALIDATION
1288     1288  
1289   $searchStr ing = $_GE T['find'];   1289   $searchStr ing = $_GE T['find'];
1290     1290  
1291   $searchCom bineWordsA s = $_GET[ 'words'];   1291   $searchCom bineWordsA s = $_GET[ 'words'];
1292     1292  
1293   if ($searc hCombineWo rdsAs != S EARCH_COMB INE_WORDS_ AS_AND &&  $searchCom bineWordsA s != SEARC H_COMBINE_ WORDS_AS_O R)   1293   if ($searc hCombineWo rdsAs != S EARCH_COMB INE_WORDS_ AS_AND &&  $searchCom bineWordsA s != SEARC H_COMBINE_ WORDS_AS_O R)
1294           $s earchCombi neWordsAs  = SEARCH_C OMBINE_WOR DS_AS_EXAC T;   1294           $s earchCombi neWordsAs  = SEARCH_C OMBINE_WOR DS_AS_EXAC T;
1295     1295  
1296   $searchSho wAdvancedS ettings =  $_GET['set tings'] ==  'yes' ? t rue : fals e;   1296   $searchSho wAdvancedS ettings =  $_GET['set tings'] ==  'yes' ? t rue : fals e;
1297     1297  
1298   $searchInK eys = $_GE T['keys']  == 'yes' ?  true : fa lse;   1298   $searchInK eys = $_GE T['keys']  == 'yes' ?  true : fa lse;
1299   $searchInS trings = $ _GET['stri ngs'] == ' yes' ? tru e : false;   1299   $searchInS trings = $ _GET['stri ngs'] == ' yes' ? tru e : false;
1300   $searchInP arams = $_ GET['param s'] == 'ye s' ? true  : false;   1300   $searchInP arams = $_ GET['param s'] == 'ye s' ? true  : false;
1301     1301  
1302   if (!$sear chInKeys & & !$search InStrings  && !$searc hInParams)   1302   if (!$sear chInKeys & & !$search InStrings  && !$searc hInParams)
1303           $s earchInKey s = $searc hInStrings  = $search InParams =  true;   1303           $s earchInKey s = $searc hInStrings  = $search InParams =  true;
1304     1304  
1305   $searchCat egories =  validateLi stArray($_ GET['sCats ']);   1305   $searchCat egories =  validateLi stArray($_ GET['sCats ']);
1306   $searchLan guages = v alidateLis tArray($_G ET['sLangs ']);   1306   $searchLan guages = v alidateLis tArray($_G ET['sLangs ']);
1307     1307  
1308   TopCodeAdm in();   1308   TopCodeAdm in();
1309     1309  
1310   ?>   1310   ?>
1311   <style typ e="text/cs s">   1311   <style typ e="text/cs s">
1312   table.Lang uagesStrin gs   1312   table.Lang uagesStrin gs
1313   {   1313   {
1314           wi dth: 100%;   1314           wi dth: 100%;
1315   }   1315   }
1316     1316  
1317   table.Lang uagesStrin gs td   1317   table.Lang uagesStrin gs td
1318   {   1318   {
1319           bo rder-right : 1px soli d silver;   1319           bo rder-right : 1px soli d silver;
1320           bo rder-botto m: 1px sol id silver;   1320           bo rder-botto m: 1px sol id silver;
1321           pa dding: 2px ;   1321           pa dding: 2px ;
1322           ba ckground-c olor: #f5f 5f5;   1322           ba ckground-c olor: #f5f 5f5;
1323   }   1323   }
1324     1324  
1325   table.Lang uagesStrin gs td.Left   1325   table.Lang uagesStrin gs td.Left
1326   {   1326   {
1327           bo rder-left:  1px solid  silver;   1327           bo rder-left:  1px solid  silver;
1328   }   1328   }
1329     1329  
1330   table.Lang uagesStrin gs tr.Head erRow td   1330   table.Lang uagesStrin gs tr.Head erRow td
1331   {   1331   {
1332           fo nt-weight:  bold;   1332           fo nt-weight:  bold;
1333           ba ckground-c olor: #ccc cde;   1333           ba ckground-c olor: #ccc cde;
1334           bo rder: 1px  solid silv er;   1334           bo rder: 1px  solid silv er;
1335   }   1335   }
1336   </style>   1336   </style>
1337     1337  
1338   <script ty pe="text/j avascript" >   1338   <script ty pe="text/j avascript" >
1339   function p opupForm(u rl, left,  top, width , height,  scrollbars )   1339   function p opupForm(u rl, left,  top, width , height,  scrollbars )
1340   {   1340   {
1341       var wi nSettings  = "width=" +width+   1341       var wi nSettings  = "width=" +width+
1342       ", hei ght="+heig ht+   1342       ", hei ght="+heig ht+
1343       ", lef t="+left+   1343       ", lef t="+left+
1344       ", top ="+top+   1344       ", top ="+top+
1345       ", scr ollbars="+ scrollbars +   1345       ", scr ollbars="+ scrollbars +
1346       ", cop yhistory=n o, directo ries=no, m enubar=no,  location= no, resiza ble=no";   1346       ", cop yhistory=n o, directo ries=no, m enubar=no,  location= no, resiza ble=no";
1347       window .open(url,  'editStri ng', winSe ttings);   1347       window .open(url,  'editStri ng', winSe ttings);
1348       return  false;   1348       return  false;
1349   }   1349   }
1350   </script>   1350   </script>
1351     1351  
1352     1352  
1353   <?   1353   <?
1354   ContentBlo ckHead("Pl ease Pay A ttention") ;   1354   ContentBlo ckHead("Pl ease Pay A ttention") ;
1355   ?>   1355   ?>
1356   <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>   1356   <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>
1357     1357  
1358   <?   1358   <?
1359   ContentBlo ckFoot();   1359   ContentBlo ckFoot();
1360   echo manag eLanguages Block();   1360   echo manag eLanguages Block();
1361     1361  
1362   echo searc hBlock();   1362   echo searc hBlock();
1363     1363  
1364   echo strin gTableBloc k($_GET['s howMoreTha nMax']=='y es' ? true  : false);   1364   echo strin gTableBloc k($_GET['s howMoreTha nMax']=='y es' ? true  : false);
1365     1365  
1366   BottomCode ();   1366   BottomCode ();