1
|
<?php
|
2
|
|
3
|
require_once("../classes/db.php");
|
4
|
$spojeni = new DB_Sql();
|
5
|
$LANG = "cz";
|
6
|
$pattern = "~lang\\('(.*)'\\)~U";
|
7
|
printf("neco pred<br />\n");
|
8
|
foreach (glob("*.php") as $filename) {
|
9
|
printf("<br />\n<br />\n<b>%s</b>\n", $filename);
|
10
|
preg_match_all($pattern, file_get_contents($filename), $matches);
|
11
|
foreach ($matches[1] as $val) {
|
12
|
printf("%s<br />\n", $val);
|
13
|
$dotaz = "INSERT INTO translation (idf, language, translation) VALUES ($val, '$LANG', $val)";
|
14
|
$spojeni->query($dotaz);
|
15
|
}
|
16
|
}
|
17
|
?>
|