diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2004-05-09 10:32:51 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2004-05-09 10:32:51 +0000 |
| commit | b5b74d89f942b5e2f7861ee3fe2ec1cc1ed65ed6 (patch) | |
| tree | ed7f05a774de72d4c2d99a8c3174c2f746b4d4cf /frontends/php/include/forms.inc.php | |
| parent | b83c0b90c424eed96b2f9739f5b550112fa0f6d1 (diff) | |
| download | zabbix-b5b74d89f942b5e2f7861ee3fe2ec1cc1ed65ed6.tar.gz zabbix-b5b74d89f942b5e2f7861ee3fe2ec1cc1ed65ed6.tar.xz zabbix-b5b74d89f942b5e2f7861ee3fe2ec1cc1ed65ed6.zip | |
- added support for configurable after-login screen (Alexei)
- added column users.url (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1335 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/forms.inc.php')
| -rw-r--r-- | frontends/php/include/forms.inc.php | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php new file mode 100644 index 00000000..f47daa4f --- /dev/null +++ b/frontends/php/include/forms.inc.php @@ -0,0 +1,96 @@ +<?php +/* +** Zabbix +** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** +** 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 +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +**/ +?> +<?php + include_once "include/defines.inc.php"; + include_once "include/db.inc.php"; + + # Insert form for User + function insert_user_form($userid) + { + if(isset($userid)) + { + $result=DBselect("select u.alias,u.name,u.surname,u.passwd,u.url from users u where u.userid=$userid"); + + $alias=DBget_field($result,0,0); + $name=DBget_field($result,0,1); + $surname=DBget_field($result,0,2); +# $password=DBget_field($result,0,3); + $password=""; + $url=DBget_field($result,0,4); + } + else + { + $alias=""; + $name=""; + $surname=""; + $password=""; + $url=""; + } + + show_table2_header_begin(); + echo "User"; + + show_table2_v_delimiter(); + echo "<form method=\"get\" action=\"users.php\">"; + if(isset($userid)) + { + echo "<input class=\"biginput\" name=\"userid\" type=\"hidden\" value=\"$userid\" size=8>"; + } + echo "Alias"; + show_table2_h_delimiter(); + echo "<input class=\"biginput\" name=\"alias\" value=\"$alias\" size=20>"; + + show_table2_v_delimiter(); + echo "Name"; + show_table2_h_delimiter(); + echo "<input class=\"biginput\" name=\"name\" value=\"$name\" size=20>"; + + show_table2_v_delimiter(); + echo "Surname"; + show_table2_h_delimiter(); + echo "<input class=\"biginput\" name=\"surname\" value=\"$surname\" size=20>"; + + show_table2_v_delimiter(); + echo "Password"; + show_table2_h_delimiter(); + echo "<input class=\"biginput\" type=\"password\" name=\"password1\" value=\"$password\" size=20>"; + + show_table2_v_delimiter(); + echo nbsp("Password (once again)"); + show_table2_h_delimiter(); + echo "<input class=\"biginput\" type=\"password\" name=\"password2\" value=\"$password\" size=20>"; + + show_table2_v_delimiter(); + echo "URL (after login)"; + show_table2_h_delimiter(); + echo "<input class=\"biginput\" name=\"url\" value=\"$url\" size=50>"; + + show_table2_v_delimiter2(); + echo "<input class=\"button\" type=\"submit\" name=\"register\" value=\"add\">"; + if(isset($userid)) + { + echo "<input class=\"button\" type=\"submit\" name=\"register\" value=\"update\">"; + echo "<input class=\"button\" type=\"submit\" name=\"register\" value=\"delete\" onClick=\"return Confirm('Delete selected user?');\">"; + } + + show_table2_header_end(); + } +?> |
