[asterisk-users] asterisk config file online editor
    Anton Krall 
    akrall at intruder.com.mx
       
    Tue Feb 19 19:50:01 CST 2008
    
    
  
This is a good start, thx Moj
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mojo with
Horan & Company, LLC
Sent: martes, 19 de febrero de 2008 01:35 p.m.
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] asterisk config file online editor
Like 15 lines of php and html?
<?php
    $fn = "/etc/asterisk/extensions.conf";
    if ($_REQUEST['action'] == "write" && $_REQUEST['contents'] != "")
    {
        rename($fn, $fn.".".date("U"));
        $fp = fopen($fn, "wt");
        fwrite($fp, $_REQUEST['contents']);
        fclose($fp);
    }
?>
<form>
<h1><?=$fn?></h1>
<textarea name=contents><?php include $fn ?></textarea>
<input type=hidden name=action value=write>
<input type=submit value="Save File"> <input type=reset value="Reset">
</form>
Security holes galore!  clean it up a bit :)  And check on permissions 
issues, that your httpd can write to the file.
Moj
Anton Krall wrote:
> Guys, Im looking for a good text file editor for asterisk config files
> that can be embedded on a web page for online editing (on an
interface),
> any recommendations?
>
>
> ________________________________________________________________
> Anton Krall
> Direccion General
>
> Intruder Consulting
> A Division of IntruderEnterprises S.A. de C.V.
> www.Intruder.com.mx
> www.IntruderStore.com.mx
>  
> Tel. 3872-2200 ext. 201
> Tel. 01-800-INTRUDER (01-800-468-7833)
> Email: akrall at intruder.com.mx
>
> Como lo estoy haciendo? Contacte a mi Director:
>
>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>   
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
    
    
More information about the asterisk-users
mailing list