diff --git a/_css/default.css b/_css/default.css index b9b8ab0..1e887c2 100644 --- a/_css/default.css +++ b/_css/default.css @@ -69,6 +69,10 @@ main #loading { font-weight: bold; } +.right { + text-align: right; +} + .danger { background-color: #ffdddd; border-left: 6px solid #002E4C; diff --git a/_include/include_settings.php b/_include/include_settings.php index 28b9a75..0926082 100644 --- a/_include/include_settings.php +++ b/_include/include_settings.php @@ -5,9 +5,20 @@ if ($this->is_id()) { # ADOTT BEÁLLÍTÁS + //először ellenőrizzük, hogy létezik-e hozzá setting_value, ha nem, akkor létrehozzuk + if (!$sql->num_of_rows('SELECT * FROM setting_value WHERE setv_setting_set_id = ' . $this->get_id())) { + $new_set = new setting(); + $new_set->set_setting_data_by_id($this->get_id()); + $new_setting_value_id = $sql->insert_into('setting_value', array( + 'setv_set_date' => date('Y-m-d H:i:s'), + 'setv_setting_set_id' => $this->get_id() + )); + } $new_setting = new setting_value(); $new_setting->set_setting_value_data_by_id($this->get_id()); + + $smarty->assign("setting", $new_setting); $smarty->display("setting_data_edit.tpl"); diff --git a/template/templates/information.tpl b/template/templates/information.tpl index 6b9fd7e..d8f9ae2 100644 --- a/template/templates/information.tpl +++ b/template/templates/information.tpl @@ -1,3 +1,3 @@
-{nl2br($setting->get_setv_text())} +{$setting->get_setv_text()}
\ No newline at end of file diff --git a/template/templates/setting_data_edit.tpl b/template/templates/setting_data_edit.tpl index 2d918df..e9a6a0e 100644 --- a/template/templates/setting_data_edit.tpl +++ b/template/templates/setting_data_edit.tpl @@ -1,4 +1,4 @@ -