noalyss Version-9
test_currency_mtable.php
<?php
/*
* This file is part of NOALYSS.
*
* PhpCompta is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* PhpCompta is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PhpCompta; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Copyright (2018) Author Dany De Bontridder <dany@alchimerys.be>
if (!defined('ALLOWED'))
die('Appel direct ne sont pas permis');
/**
* @file
* @brief
* @param type $name Descriptionara
*/
//@description:Test the class Currency_MTable , ajax and javascript
$_REQUEST=array_merge($_GET, $_POST);
require_once NOALYSS_INCLUDE."/class/currency_mtable.class.php";
require_once NOALYSS_INCLUDE."/lib/manage_table_sql.class.php";
require_once NOALYSS_INCLUDE.'/database/v_currency_last_value_sql.class.php';
$is_ajax=$http->request("TestAjaxFile", "string", "-");
if ($is_ajax!="-")
{
$p_id=$http->request('p_id', "number");
$currency->set_pk_value($p_id);
$currency->load();
}
$currency_table->set_callback("ajax_test.php");
$currency_table->add_json_param("TestAjaxFile", __FILE__);
if ($is_ajax!="-")
{
$table=$http->request('table');
$action=$http->request('action');
$p_id=$http->request('p_id', "number");
$ctl_id=$http->request('ctl');
/*
* we're in ajax part
*/
if ($action=="input")
{
$currency_table->set_object_name($ctl_id);
header('Content-type: text/xml; charset=UTF-8');
echo $currency_table->ajax_input()->saveXML();
return;
}
elseif ($action=="save")
{
$currency_table->set_object_name($ctl_id);
header('Content-type: text/xml; charset=UTF-8');
echo $currency_table->ajax_save()->saveXML();
return;
}
elseif ($action=="delete")
{
$currency_table->set_object_name($ctl_id);
header('Content-type: text/xml; charset=UTF-8');
echo $currency_table->ajax_delete()->saveXML();
}
return;
}
$currency_table->create_js_script();
$currency_table->display_table();
$action
$_REQUEST['ac']
if($gDossier==-1) $gDossierLogInput
Definition: ajax_test.php:47
$_GET['qcode']
Manage the configuration of currency , add currency, rate, remove and update Concerned tables are v_c...
class_currency_history_sql.php
$_POST['ac']
Definition: do.php:310
if( $delta< 0) elseif( $delta==0)
$table
Definition: menu.inc.php:103