root/modules/branches/2.9/asterisk-cli/page.cli.php

Revision 11663, 1.9 kB (checked in by p_lindheimer, 2 years ago)

remove most ereg() re #4001

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 <?php
2 //This file is part of FreePBX.
3 //
4 //    FreePBX is free software: you can redistribute it and/or modify
5 //    it under the terms of the GNU General Public License as published by
6 //    the Free Software Foundation, either version 2 of the License, or
7 //    (at your option) any later version.
8 //
9 //    FreePBX is distributed in the hope that it will be useful,
10 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
11 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 //    GNU General Public License for more details.
13 //
14 //    You should have received a copy of the GNU General Public License
15 //    along with FreePBX.  If not, see <http://www.gnu.org/licenses/>.
16 //
17 //  Written by Diego Iastrubni <diego.iastrubni@xorcom.com>
18 //  Copyright (C) 2005, Xorcom
19 //
20 //  This code is derived from ASTLinux 0.3
21 //
22 //  The original author of AST linux is:
23 //  Kristian Kielhofner - KrisCompanies, LLC - http://astlinux.org/
24 //
25 $txtCommand = isset($_POST['txtCommand'])?$_POST['txtCommand']:'';
26
27 $tabindex = 0;
28 ?>
29
30 <h2><?php echo _("Asterisk CLI")?></h2>
31
32 <form action="config.php?type=tool&display=cli" method="POST" enctype="multipart/form-data" name="frmExecPlus">
33     <table>
34         <tr>
35             <td class="label" align="right"><?php echo _("Command:")?></td>
36             <td class="type"><input name="txtCommand" type="text" size="70" value="<?php htmlspecialchars($txtCommand);?>" tabindex="<?php echo ++$tabindex;?>"></td>
37         </tr>
38        
39         <tr>
40             <td valign="top">   </td>
41             <td valign="top" class="label">
42                 <input type="submit" class="button" value="<?php echo _("Execute:")?>" tabindex="<?php echo ++$tabindex;?>">
43             </td>
44         </tr>
45        
46         <tr>
47             <td height="8"></td>
48             <td></td>
49         </tr>
50     </table>
51 </form>
52
53 <p>
54 <?php if (isBlank($txtCommand)): ?>
55 </p>
56 <?php endif;
57
58 function isBlank( $arg ) { return (trim($arg) == ''); }
59
60 if (!isBlank($txtCommand))
61 {
62     $html_out = cli_runcommand($txtCommand);
63     echo $html_out;
64 }
65
66 ?>
67
68
Note: See TracBrowser for help on using the browser.