Exemplo n.º 1
0
 function name()
 {
     set_include_path(get_include_path() . PATH_SEPARATOR . BASEPATH . 'libraries/inc');
     $aql = new aql();
     $aql->set('basedir', '/etc/asterisk/');
     $db = $aql->query("insert into t9.conf set callerid=\"'99' <99>\",section='555'");
     echo $aql->errstr;
     print_r($db);
     return 'name';
 }
Exemplo n.º 2
0
<?php

/*
 * This is Test demo script for AQL
*/
error_reporting(E_ALL);
require "../inc/aql.php";
$a = new aql();
$setok = $a->set('basedir', './');
if (!$setok) {
    echo __LINE__ . ' ' . $a->get_error();
}
$result = $a->query("insert into t15.conf set callerid=\"\\\"99\\\" <99>\",section='" . time() . "'");
if ($result == false) {
    echo $a->get_error();
} else {
    echo 'affected_rows :' . $a->get_affected_rows() . "\n";
}
Exemplo n.º 3
0
<?
/*
 * this is demo command line interface of aql library
 */
ini_set ('memory_limit', '128M');
require(dirname(__FILE__)."/inc/aql.php");

$base_dir = $_SERVER['argv'][1];

if (!is_dir($base_dir)) {
    echo "AQLCLI : sorry can't find basedir\n";
    exit;
}

$aql = new aql();
if (!$aql->set('basedir',$base_dir)) {
    echo "AQLCLI : ".$aql->get_error()."\n";
    exit;
}

echo "Welcome to the AQL command line interface.  Commands end pass Enter key\n";
echo "Your AQL Library version : ".$aql->get_version()." ,   AQL_Confparser Version : ".aql_confparser::get_version()."\n\n";
echo "type 'help' for help.\n\n";

while(1) {
    echo "AQLcli>";
    $input = fgets(STDIN);
    $input = trim($input);
    if ($input == 'help') {
        echo "List of all Interface commands : \n\n";
        echo "help      Display this help.\n";