Use an i18n tool
This commit is contained in:
parent
e487438606
commit
16dec853f9
12 changed files with 662 additions and 97 deletions
22
save.php
22
save.php
|
@ -1,19 +1,16 @@
|
|||
<?php
|
||||
|
||||
include('db.php');
|
||||
$db = new DataBase();
|
||||
if (!$db->isInit()) {
|
||||
echo 'Error db init';
|
||||
return;
|
||||
}
|
||||
include('init.php');
|
||||
|
||||
if (empty($_POST)) {
|
||||
header('Location: index.php');
|
||||
die();
|
||||
}
|
||||
include 'templates/header.php';
|
||||
|
||||
$id = null;
|
||||
$cpt = 0;
|
||||
foreach ($_POST as $name => $value) {
|
||||
$cpt;
|
||||
if ($name == 'fid') {
|
||||
$id = $value;
|
||||
continue;
|
||||
|
@ -22,11 +19,10 @@ foreach ($_POST as $name => $value) {
|
|||
$value = trim(strtolower($value));
|
||||
$db->addWord($id, $value);
|
||||
}
|
||||
if ($cpt > 9) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
echo sprintf('<h3>%s</h3>', L::save_success);
|
||||
|
||||
if (empty($id)) {
|
||||
header('Location: index.php');
|
||||
die();
|
||||
}
|
||||
header('Location: index.php');
|
||||
die();
|
||||
include 'templates/footer.php';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue