Fork of FusionPBX but with LDAP kinda working
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.5 KiB

2 years ago
  1. <?php
  2. /*
  3. FusionPBX
  4. Version: MPL 1.1
  5. The contents of this file are subject to the Mozilla Public License Version
  6. 1.1 (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.mozilla.org/MPL/
  9. Software distributed under the License is distributed on an "AS IS" basis,
  10. WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11. for the specific language governing rights and limitations under the
  12. License.
  13. The Original Code is FusionPBX
  14. The Initial Developer of the Original Code is
  15. Mark J Crane <markjcrane@fusionpbx.com>
  16. Portions created by the Initial Developer are Copyright (C) 2008-2018
  17. the Initial Developer. All Rights Reserved.
  18. Contributor(s):
  19. Mark J Crane <markjcrane@fusionpbx.com>
  20. */
  21. function persistform($form_array) {
  22. // Remember Form Input Values
  23. if (is_array($form_array)) {
  24. $content .= "<form method='post' action='".escape($_SERVER["HTTP_REFERER"])."' target='_self'>\n";
  25. foreach ($form_array as $key => $val) {
  26. if ($key == "XID" || $key == "ACT" || $key == "RET") continue;
  27. if ($key != "persistform") { //clears the persistform value
  28. $content .= "<input type='hidden' name='".escape($key)."' value='".escape($val)."' />\n";
  29. }
  30. }
  31. $content .= " <input type='hidden' name='persistform' value='1' />\n"; //sets persistform to yes
  32. $content .= " <input class='btn' type='submit' value='Back' />\n";
  33. $content .= "</form>\n";
  34. }
  35. return $content;
  36. }
  37. //persistform($_POST);
  38. //persistform($_GET);
  39. ?>