3 // converts the language registry to phrases
7 require_once('./global.php');
10 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
11 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
12 <html xmlns
="http://www.w3.org/1999/xhtml" xml
:lang
="en" lang
="en">
14 <meta http
-equiv
="content-type" content
="text/html; charset=iso-8859-1" />
15 <title
>Phrase Registry Converter
</title
>
19 <h2
>Phrase Registry Converter
</h2
>
21 Pick a phrase from the phrase registry
and enter in a varname
and a
comment (optional
). The converter will remove it from the phrase registry
and add it to the language system
. It will also fill in the md5 field
and comment field in the language system
.
28 if ($bugsys->in
['do'] == 'convert')
30 foreach ($bugsys->in
['phrases'] AS $md5 => $phrase)
32 if ($phrase['varname'] AND $phrase['phrasetext'])
36 (varname, phrasetext, md5, comment)
38 ('" . $phrase['varname'] . "',
39 '" . $phrase['phrasetext'] . "',
41 '" . $phrase['comment'] . "'
45 $db->query("DELETE FROM phraseregistry WHERE md5 = '" . $md5 . "'");
49 echo 'Converted phrase registry items. <a href="lang_registry_converter.php">Continue...</a>';
55 <form action
="lang_registry_converter.php" method
="post" name
="converter">
56 <input name
="do" type
="hidden" value
="convert" />
58 <table border
="1" cellspacing
="2" cellpadding
="4" width
="100%">
60 <tr style
="background-color: #EFEFEF">
69 $registry = $db->query("SELECT * FROM phraseregistry");
70 while ($phrase = $db->fetch_array($registry))
72 $phrase['text_clean'] = htmlspecialchars($phrase['phrasetext']);
76 <td
><input name
="phrases[$phrase[md5]][phrasetext]" type
="text" value
="$phrase[text_clean]" style
="width: 100%" /></td
>
77 <td
><input name
="phrases[$phrase[md5]][varname]" type
="text" style
="width: 100%" /></td
>
78 <td
><input name
="phrases[$phrase[md5]][comment]" type
="text" style
="width: 100%" /></td
>
85 <tr style
="background-color: #696969; text-align: center">
86 <td colspan
="3"><input name
="submit" type
="submit" value
=" Convert Registry Items " /></td
>