From b000c792cb4f4955eca93643ccf07bac06b33845 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 10 Feb 2003 17:43:29 +0000 Subject: [PATCH] Gestion des modifications --- htdocs/admin/const.php | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index 2b4785eceda..841d1e42e5f 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2003 Rodolphe Quiedeville * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +28,15 @@ print ''; $db = new Db(); -$sql = "SELECT name, value FROM llx_const"; +if ($HTTP_POST_VARS["action"] == 'update') +{ + + $sql = "UPDATE llx_const set value = '".$HTTP_POST_VARS["constvalue"]."' where rowid=".$HTTP_POST_VARS["rowid"].";"; + + $result = $db->query($sql); +} + +$sql = "SELECT rowid, name, value FROM llx_const"; $result = $db->query($sql); if ($result) { @@ -39,7 +47,24 @@ if ($result) { $obj = $db->fetch_object( $i); - print ''; + print ''; $i++; } }
'.$obj->name.'' . $obj->value . '
'.$obj->name.'' . $obj->value . ''; + + if ($rowid == $obj->rowid && $action == 'edit') + { + print '
'; + print ''; + print ''; + + print ''; + print ''; + print '
'; + } + else + { + print 'edit'; + } + + print '