clip_options.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 <[email protected]>
  16. Portions created by the Initial Developer are Copyright (C) 2008-2023
  17. the Initial Developer. All Rights Reserved.
  18. Contributor(s):
  19. Mark J Crane <[email protected]>
  20. James Rose <[email protected]>
  21. */
  22. //includes files
  23. require_once dirname(__DIR__, 2) . "/resources/require.php";
  24. require_once "resources/check_auth.php";
  25. //check permissions
  26. if (permission_exists('clip_edit')) {
  27. //access granted
  28. }
  29. else {
  30. echo "access denied";
  31. exit;
  32. }
  33. //add multi-lingual support
  34. $language = new text;
  35. $text = $language->get();
  36. //prepare the header
  37. $title = $text['title-manage-clips'];
  38. require_once "header.php";
  39. //show the content
  40. echo "<table cellpadding='0' cellspacing='0' border='0' style='height: 100%; width: 100%;'>\n";
  41. echo "<form method='post' name='frm' action=''>";
  42. echo "<tr><td colspan='2' style='padding-bottom: 3px;'><div id='selectedclip'>".$text['label-selected-clip']." <input type='text' name='clip_name' id='clip_name' value=''><input type='hidden' name='clip_uuid' id='clip_uuid' value=''></div></td></tr>\n";
  43. echo "</form>";
  44. echo "<tr>\n";
  45. echo "<td valign='top' width='200' nowrap>";
  46. echo " <iframe src='clip_options_list.php' style='border: solid 1px #ccc; height: calc(100% - 3px); width: calc(100% - 4px);'></iframe>";
  47. echo "</td>\n";
  48. echo "<td valign='top' style='height: 100%; padding: 0;'>";
  49. echo "<table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%'>";
  50. echo " <tr><td><input type='button' class='btn' onclick=\"window.location='clip_add.php'\" value='".$text['button-add-clip']."'></td></tr>\n";
  51. echo " <tr><td><input type='button' class='btn' onclick=\"window.location='clip_update.php?id='+document.getElementById('clip_uuid').value;\" value='".$text['button-edit-clip']."'></td></tr>\n";
  52. echo " <tr><td><input type='button' class='btn' onclick=\"if (confirm('".$text['message-delete-clip']."')){ window.location='clip_delete.php?id='+document.getElementById('clip_uuid').value; }\" value='".$text['button-delete']."'></td></tr>\n";
  53. echo " <tr><td height='100%'>&nbsp;</td></tr>\n";
  54. echo " <tr><td><input type='button' class='btn' onclick='opener.location.reload(); self.close();' value='".$text['button-close']."'></td></tr>\n";
  55. echo "</table>";
  56. echo "</td>\n";
  57. echo "</tr>\n";
  58. echo "</table>";
  59. //include footer
  60. require_once "footer.php";