From d0060968b77c39bdf8abffb071c971c166b59edb Mon Sep 17 00:00:00 2001 From: Nicolas BERNSTEIN Date: Sat, 17 Sep 2011 16:48:29 +0200 Subject: First commit. --- tpl/general/bottom.php | 4 ++++ tpl/general/choice.php | 6 ++++++ tpl/general/empty.php | 3 +++ tpl/general/form.php | 6 ++++++ tpl/general/inc_form.php | 26 ++++++++++++++++++++++++++ tpl/general/inc_tree.php | 18 ++++++++++++++++++ tpl/general/sqlerror.php | 13 +++++++++++++ tpl/general/top.php | 43 +++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 119 insertions(+) create mode 100644 tpl/general/bottom.php create mode 100644 tpl/general/choice.php create mode 100644 tpl/general/empty.php create mode 100644 tpl/general/form.php create mode 100644 tpl/general/inc_form.php create mode 100644 tpl/general/inc_tree.php create mode 100644 tpl/general/sqlerror.php create mode 100644 tpl/general/top.php (limited to 'tpl/general') diff --git a/tpl/general/bottom.php b/tpl/general/bottom.php new file mode 100644 index 0000000..b506bf0 --- /dev/null +++ b/tpl/general/bottom.php @@ -0,0 +1,4 @@ + + + + diff --git a/tpl/general/choice.php b/tpl/general/choice.php new file mode 100644 index 0000000..3d54dce --- /dev/null +++ b/tpl/general/choice.php @@ -0,0 +1,6 @@ + $u) { + echo ''; +} +require("bottom.php"); diff --git a/tpl/general/empty.php b/tpl/general/empty.php new file mode 100644 index 0000000..48b662b --- /dev/null +++ b/tpl/general/empty.php @@ -0,0 +1,3 @@ +'; +if (isset($form_message)) echo '' . $form_message . "

\n"; + +foreach($fields as $f) { + if (isset($f['type']) && $f['type'] == 'textarea') { + echo '
'; + echo '
'; + } else { +?> + + id="ff_"/>
 '; diff --git a/tpl/general/inc_tree.php b/tpl/general/inc_tree.php new file mode 100644 index 0000000..9b13d5a --- /dev/null +++ b/tpl/general/inc_tree.php @@ -0,0 +1,18 @@ +'.$func($branch).'

'; + if (isset($tree[$branch['id']])) { + echo '
'; + tree_branch($tree, $branch['id'], $func); + echo '
'; + } + } +} + +function tree($tree, $func) { + echo '
'; + tree_branch($tree, 0, $func); + echo '
'; +} diff --git a/tpl/general/sqlerror.php b/tpl/general/sqlerror.php new file mode 100644 index 0000000..59f0806 --- /dev/null +++ b/tpl/general/sqlerror.php @@ -0,0 +1,13 @@ += $sql_min_priv_for_debug) { + echo '
An error happenned with the following SQL query :
'; + echo '' . $request . '
'; + echo 'Mysql answered : ' . $sql_error . '
'; +} else { + echo '
An internal error occurred, sorry.
'; +} + +require("bottom.php"); diff --git a/tpl/general/top.php b/tpl/general/top.php new file mode 100644 index 0000000..e87e466 --- /dev/null +++ b/tpl/general/top.php @@ -0,0 +1,43 @@ + + + + + + <?php echo $title; ?> + + + + + + +
+ +

+ +' . $message . "
\n"; +if (isset($error)) echo '
' . $error . "
\n"; + -- cgit v1.2.3