diff --git a/inc/functions.php b/inc/functions.php index 2103edf..a464681 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -69,3 +69,13 @@ } return $return; } + + function TwoDArrayToOneD($array, $key) { + $return = array(); + + foreach($array as $value) { + $return[] = $value[$key]; + } + + return $return; + } diff --git a/tpl/json/settings.html b/tpl/json/settings.html index 190cf0f..314e898 100644 --- a/tpl/json/settings.html +++ b/tpl/json/settings.html @@ -1,65 +1,6 @@ {if condition="!$show_settings"} -TODO *** -

Edit homepage notice

-{if condition="$error"}

{$error}

{/if} -
-

-
- -

-

Note : You can use HTML formatting in this form.

-

- - -

-
+{"notice":{function="json_encode($notice)"}} {else} -TODO *** -

Change settings of your Bouffe@Ulm installation

-{if condition="$error"}

{$error}

{/if} -
-
- Database -

Note : Use these settings carefully. Your database won't be updated by the script as it was during install and you'll have to manually update it.

-

- -

-

- Toggle visible
- Note : Leave the above field blank if you don't want to change your password. -

-

-
- Note : You must create this database first. -

-

-
- Note : Leave the field blank to not use any.

-
-
- General options -

-

-
- Note : This is the base URL from which you access this page. You must keep the trailing "/" in the above address. -

-

-

-
- For example : Europe/Paris. See the doc for more info. -

-

- - -

-
-

-
- +{"mysql_host":{function="json_encode($mysql_host)"}, "mysql_login":{function="json_encode($mysql_login)"}, "mysql_db":{function="json_encode($mysql_db)"}, "mysql_prefix":{function="json_encode($mysql_prefix)"}, "instance_title":{function="json_encode($instance_title)"}, "base_url":{function="json_encode($base_url)"}, "currency":{function="json_encode($currency)"}, "timezone":{function="json_encode($timezone)"}, "templates":{function="json_encode(TwoDArrayToOneD($templates, 'value'))"}, "current_template":{function="json_encode($current_template)"}", "email_webmaster":{function="json_encode($email_webmaster)"}} {/if}