noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
ajax_misc.php
Go to the documentation of this file.
00001 <?php
00002 
00003 /*
00004  *   This file is part of NOALYSS.
00005  *
00006  *   NOALYSS is free software; you can redistribute it and/or modify
00007  *   it under the terms of the GNU General Public License as published by
00008  *   the Free Software Foundation; either version 2 of the License, or
00009  *   (at your option) any later version.
00010  *
00011  *   NOALYSS is distributed in the hope that it will be useful,
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *   GNU General Public License for more details.
00015  *
00016  *   You should have received a copy of the GNU General Public License
00017  *   along with NOALYSS; if not, write to the Free Software
00018  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 // Copyright Author Dany De Bontridder danydb@aevalys.eu
00022 
00023 /**\file
00024  * \brief this file respond to an ajax request
00025  * The parameters are
00026  * - gDossier
00027  * - $op operation the file has to execute
00028  * Part 1
00029  * dsp_tva fill a ipopup with a choice of possible VAT
00030  *     - if code is set then fill the field code
00031  *     - if compute is set then add event to call clean_tva and compute_ledger
00032   @see Acc_Ledger_Sold::input
00033  * Part 2
00034  * dl : display form to modify, add and delete lettering for a given operation
00035  *
00036  */
00037 define ('ALLOWED',1);
00038 require_once '../include/constant.php';
00039 require_once('class_database.php');
00040 require_once ('class_fiche.php');
00041 require_once('class_iradio.php');
00042 require_once('function_javascript.php');
00043 require_once('ac_common.php');
00044 require_once ('class_user.php');
00045 mb_internal_encoding("UTF-8");
00046 
00047 $var = array('gDossier', 'op');
00048 $cont = 0;
00049 /*  check if mandatory parameters are given */
00050 foreach ($var as $v)
00051 {
00052         if (!isset($_REQUEST [$v]))
00053         {
00054                 echo "$v is not set ";
00055                 $cont = 1;
00056         }
00057 }
00058 if ($cont != 0)
00059         exit();
00060 extract($_REQUEST);
00061 set_language();
00062 global $g_user, $cn, $g_parameter;
00063 $cn = new Database($gDossier);
00064 $g_user = new User($cn);
00065 $g_user->check(true);
00066 $g_user->check_dossier($gDossier, true);
00067 if ($gDossier<>0) {
00068     $g_parameter=new Own($cn);
00069 }
00070 $html = var_export($_REQUEST, true);
00071 
00072 switch ($op)
00073 {
00074         case "remove_anc":
00075                 if ($g_user->check_module('ANCODS') == 0)
00076                         exit();
00077                 $cn->exec_sql("delete from operation_analytique where oa_group=$1", array($_GET['oa']));
00078                 break;
00079         case "rm_stock":
00080                 if ($g_user->check_module('STOCK') == 0)
00081                         exit();
00082                 require_once('constant.security.php');
00083                 $cn->exec_sql('delete from stock_goods where sg_id=$1', array($s_id));
00084                 $html = escape_xml($s_id);
00085                 header('Content-type: text/xml; charset=UTF-8');
00086                 printf('{"d_id":"%s"}', $s_id);
00087                 exit();
00088                 break;
00089         //--------------------------------------------------
00090         // get the last date of a ledger
00091         case 'lastdate':
00092                 require_once('class_acc_ledger_fin.php');
00093                 $ledger = new Acc_Ledger_Fin($cn, $_GET['p_jrn']);
00094                 $html = $ledger->get_last_date();
00095                 $html = escape_xml($html);
00096                 header('Content-type: text/xml; charset=UTF-8');
00097                 echo <<<EOF
00098 <?xml version="1.0" encoding="UTF-8"?>
00099 <data>
00100 <code>e_date</code>
00101 <value>$html</value>
00102 </data>
00103 EOF;
00104 
00105                 break;
00106         case 'bkname':
00107                 require_once('class_acc_ledger_fin.php');
00108                 $ledger = new Acc_Ledger_Fin($cn, $_GET['p_jrn']);
00109                 $html = $ledger->get_bank_name();
00110                 $html = escape_xml($html);
00111                 header('Content-type: text/xml; charset=UTF-8');
00112                 echo <<<EOF
00113 <?xml version="1.0" encoding="UTF-8"?>
00114 <data>
00115 <code>bkname</code>
00116 <value>$html</value>
00117 </data>
00118 EOF;
00119                 break;
00120         // display new calendar
00121         case 'cal':
00122                 require_once('class_calendar.php');
00123                 /* others report */
00124                 $cal = new Calendar();
00125                 $cal->set_periode($per);
00126 
00127                 $html = "";
00128                 $html = $cal->display($_GET['t']);
00129                 $html = escape_xml($html);
00130                 header('Content-type: text/xml; charset=UTF-8');
00131                 echo <<<EOF
00132 <?xml version="1.0" encoding="UTF-8"?>
00133 <data>
00134 <code>$html</code>
00135 </data>
00136 EOF;
00137                 break;
00138         /* rem a cat of document */
00139         case 'rem_cat_doc':
00140                 require_once('class_document_type.php');
00141                 // if user can not return error message
00142                 if ($g_user->check_action(PARCATDOC) == 0)
00143                 {
00144                         $html = "nok";
00145                         header('Content-type: text/xml; charset=UTF-8');
00146                         echo <<<EOF
00147 <?xml version="1.0" encoding="UTF-8"?>
00148 <data>
00149 <dtid>$html</dtid>
00150 </data>
00151 EOF;
00152                         return;
00153                 }
00154                 // remove the cat if no action
00155                 $count_md = $cn->get_value('select count(*) from document_modele where md_type=$1', array($dt_id));
00156                 $count_a = $cn->get_value('select count(*) from action_gestion where ag_type=$1', array($dt_id));
00157 
00158                 if ($count_md != 0 || $count_a != 0)
00159                 {
00160                         $html = "nok";
00161                         header('Content-type: text/xml; charset=UTF-8');
00162                         echo <<<EOF
00163 <?xml version="1.0" encoding="UTF-8"?>
00164 <data>
00165 <dtid>$html</dtid>
00166 </data>
00167 EOF;
00168                         exit;
00169                 }
00170                 $cn->exec_sql('delete from document_type where dt_id=$1', array($dt_id));
00171                 $html = $dt_id;
00172                 header('Content-type: text/xml; charset=UTF-8');
00173                 echo <<<EOF
00174 <?xml version="1.0" encoding="UTF-8"?>
00175                                  <data>
00176                                  <dtid>$html</dtid>
00177                                  </data>
00178 EOF;
00179                 return;
00180                 break;
00181         case 'mod_cat_doc':
00182                 require_once 'template/document_mod_change.php';
00183                 break;
00184         case 'dsp_tva':
00185                 $cn = new Database($gDossier);
00186                 $Res = $cn->exec_sql("select * from tva_rate order by tva_rate desc");
00187                 $Max = Database::num_row($Res);
00188                 $r = "";
00189                 $r = HtmlInput::anchor_close('tva_select');
00190                 $r.=h2(_('Choississez la TVA '),'class="title"');
00191                 $r.='<div >';
00192                 $r.= '<TABLE style="width:100%">';
00193                 $r.=th('');
00194                 $r.=th(_('code'));
00195                 $r.=th(_('Taux'));
00196                 $r.=th(_('Symbole'));
00197                 $r.=th(_('Explication'));
00198 
00199                 for ($i = 0; $i < $Max; $i++)
00200                 {
00201                         $row = Database::fetch_array($Res, $i);
00202                         if (!isset($compute))
00203                         {
00204                                 if (!isset($code))
00205                                 {
00206                                         $script = "onclick=\"$('$ctl').value='" . $row['tva_id'] . "';removeDiv('tva_select');\"";
00207                                 }
00208                                 else
00209                                 {
00210                                         $script = "onclick=\"$('$ctl').value='" . $row['tva_id'] . "';set_value('$code','" . $row['tva_label'] . "');removeDiv('tva_select');\"";
00211                                 }
00212                         }
00213                         else
00214                         {
00215                                 if (!isset($code))
00216                                 {
00217                                         $script = "onclick=\"$('$ctl').value='" . $row['tva_id'] . "';removeDiv('tva_select');clean_tva('$compute');compute_ledger('$compute');\"";
00218                                 }
00219                                 else
00220                                 {
00221                                         $script = "onclick=\"$('$ctl').value='" . $row['tva_id'] . "';set_value('$code','" . $row['tva_label'] . "');removeDiv('tva_select');clean_tva('$compute');compute_ledger('$compute');\"";
00222                                 }
00223                         }
00224                         $set = '<INPUT TYPE="BUTTON" class="button" Value="select" ' . $script . '>';
00225                         $class=($i%2 == 0)?' class="odd" ':' class="even" ';
00226                         $r.='<tr'.$class. '>';
00227                         $r.=td($set);
00228                         $r.=td($row['tva_id']);
00229                         $r.=td($row['tva_rate']);
00230                         $r.=td($row['tva_label']);
00231                         $r.=td($row['tva_comment']);
00232                         $r.='</tr>';
00233                 }
00234                 $r.='</TABLE>';
00235                 $r.='</div>';
00236                 $html = escape_xml($r);
00237 
00238                 header('Content-type: text/xml; charset=UTF-8');
00239                 echo <<<EOF
00240 <?xml version="1.0" encoding="UTF-8"?>
00241 <data>
00242 <code>$html</code>
00243 <popup>$popup</popup>
00244 </data>
00245 EOF;
00246                 break;
00247         case 'label_tva':
00248                 $cn = new Database($gDossier);
00249                 if (isNumber($id) == 0)
00250                         $value = _('tva inconnue');
00251                 else
00252                 {
00253                         $Res = $cn->get_array("select * from tva_rate where tva_id = $1", array($id));
00254                         if (count($Res) == 0)
00255                                 $value = _('tva inconnue');
00256                         else
00257                                 $value = $Res[0]['tva_label'];
00258                 }
00259                 header('Content-type: text/xml; charset=UTF-8');
00260                 echo <<<EOF
00261 <?xml version="1.0" encoding="UTF-8"?>
00262 <data>
00263 <code>$code</code>
00264 <value>$value</value>
00265 </data>
00266 EOF;
00267 
00268                 break;
00269         /**
00270          * display the lettering
00271          */
00272         case 'dl':
00273                 require_once('class_lettering.php');
00274                 $exercice = $g_user->get_exercice();
00275                 if ($g_user->check_module("LETCARD") == 0 && $g_user->check_module("LETACC") == 0)
00276                         exit();
00277                 $periode = new Periode($cn);
00278                 list($first_per, $last_per) = $periode->get_limit($exercice);
00279 
00280                 $ret = new IButton('return');
00281                 $ret->label = _('Retour');
00282                 $ret->javascript = "$('detail').hide();$('list').show();$('search').show();";
00283 
00284                 // retrieve info for the given j_id (date, amount,side and comment)
00285                 $sql = "select j_date,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,J_POSTE,j_qcode,jr_id,
00286          jr_comment,j_montant, j_debit,jr_internal from jrnx join jrn on (j_grpt=jr_grpt_id)
00287          where j_id=$1";
00288                 $arow = $cn->get_array($sql, array($j_id));
00289                 $row = $arow[0];
00290                 $r = '';
00291                 $r.='<fieldset><legend>' . _('Lettrage') . '</legend>';
00292                 $r.=_('Poste')." " . $row['j_poste'] . '  ' . $row['j_qcode'] . '<br>';
00293 
00294                 $detail = "<A class=\"detail\" style=\"display:inline\" HREF=\"javascript:modifyOperation('" . $row['jr_id'] . "'," . $gDossier . ")\" > " . $row['jr_internal'] . "</A>";
00295 
00296                 $r.=_('Date').' : ' . $row['j_date_fmt'] . ' ref :' . $detail . ' <br>  ';
00297                 $r.=h($row['jr_comment']) ." ". _("montant")." : " . ($row['j_montant']) . " " . (($row['j_debit'] == 't') ? 'D' : 'C');
00298                 $r.='</fieldset>';
00299                 $r.='<div id="filtre" style="float:left;display:block">';
00300                 $r.='<form method="get" id="search_form" onsubmit="search_letter(this);return false">';
00301                 $r.='<div style="float:left;">';
00302                 // needed hidden var
00303                 $r.=dossier::hidden();
00304                 if (isset($_REQUEST['ac']))
00305                         $r.=HtmlInput::hidden('ac', $_REQUEST['ac']);
00306                 if (isset($_REQUEST['sa']))
00307                         $r.=HtmlInput::hidden('sa', $_REQUEST['sa']);
00308                 if (isset($_REQUEST['acc']))
00309                         $r.=HtmlInput::hidden('acc', $_REQUEST['acc']);
00310                 $r.=HtmlInput::hidden('j_id', $j_id);
00311                 $r.=HtmlInput::hidden('op', $op);
00312                 $r.=HtmlInput::hidden('ot', $ot);
00313 
00314                 $r.='<table>';
00315                 //min amount
00316                 $line = td(_('Montant min. '));
00317                 $min = new INum('min_amount');
00318                 $min->value = (isset($min_amount)) ? $min_amount : $row['j_montant'];
00319                 $min_amount = (isset($min_amount)) ? $min_amount : $row['j_montant'];
00320 
00321                 $line.=td($min->input());
00322                 // max amount
00323                 $line.=td(_('Montant max. '));
00324                 $max = new INum('max_amount');
00325                 $max->value = (isset($max_amount)) ? $max_amount : $row['j_montant'];
00326                 $max_amount = (isset($max_amount)) ? $max_amount : $row['j_montant'];
00327                 $line.=td($max->input());
00328                 $r.=tr($line);
00329 
00330                 $date_error="";
00331                 // start date
00332                 $start = new IDate('search_start');
00333 
00334                 /*  check if date are valid */
00335                 if (isset($search_start) && isDate($search_start) == null)
00336                 {
00337                         ob_start();
00338                         alert(_('Date malformée'));
00339                         $date_error = ob_get_contents();
00340                         ob_end_clean();
00341                         $search_start=$first_per->first_day();
00342                 }
00343                 $start->value = (isset($search_start)) ? $search_start : $first_per->first_day();
00344 
00345                 $line = td('Date Debut') . td($start->input());
00346                 // end date
00347                 $end = new IDate('search_end');
00348                                                 /*  check if date are valid */
00349                 if (isset($search_end) && isDate($search_end) == null)
00350                 {
00351                         ob_start();
00352                         alert(_('Date malformée'));
00353                         $date_error = ob_get_contents();
00354                         ob_end_clean();
00355                         $search_end=$last_per->last_day();
00356                 }
00357                 $end->value = (isset($search_end)) ? $search_end : $last_per->last_day();
00358                 $line.=td(_('Date Fin')) . td($end->input());
00359                 $r.=tr($line);
00360                 // Side
00361                 $line = td(_('Debit / Credit'));
00362                 $iside = new ISelect('side');
00363                 $iside->value = array(
00364                         array('label' => _('Debit'), 'value' => 0),
00365                         array('label' => _('Credit'), 'value' => 1),
00366                         array('label' => _('Les 2'), 'value' => 3)
00367                 );
00368                 /**
00369                  *
00370                  * if $side is not then
00371                  * - if jl_id exist and is > 0 show by default all the operation (=3)
00372                  * - if jl_id does not exist or is < 0 then show by default the opposite
00373                  *  side
00374                  */
00375                 if (!isset($side))
00376                 {
00377                         // find the jl_id of the j_id
00378                         $jl_id = $cn->get_value('select comptaproc.get_letter_jnt($1)', array($j_id));
00379                         if ($jl_id == null)
00380                         {
00381                                 // get the other side
00382                                 $iside->selected = (isset($side)) ? $side : (($row['j_debit'] == 't') ? 1 : 0);
00383                                 $side = (isset($side)) ? $side : (($row['j_debit'] == 't') ? 1 : 0);
00384                         }
00385                         else
00386                         {
00387                                 // show everything
00388                                 $iside->selected = 3;
00389                                 $side = 3;
00390                         }
00391                 }
00392                 else
00393                 {
00394                         $iside->selected = $side;
00395                 }
00396 
00397                 $r.=tr($line . td($iside->input()));
00398                 $r.='</table>';
00399                 $r.='</div>';
00400                 $r.='<div style="float:left;padding-left:100">';
00401                 $r.=HtmlInput::submit('search', 'Rechercher');
00402                 $r.='</div>';
00403                 $r.='</form>';
00404                 $r.='</div>';
00405 
00406                 $form = '<div id="result" style="float:top;clear:both">';
00407 
00408                 $form.='<FORM id="letter_form" METHOD="post">';
00409                 $form.=dossier::hidden();
00410                 if (isset($_REQUEST['p_action']))
00411                         $form.=HtmlInput::hidden('p_action', $_REQUEST['p_action']);
00412                 if (isset($_REQUEST['sa']))
00413                         $form.=HtmlInput::hidden('sa', $_REQUEST['sa']);
00414                 if (isset($_REQUEST['acc']))
00415                         $form.=HtmlInput::hidden('acc', $_REQUEST['acc']);
00416                 if (isset($_REQUEST['sc']))
00417                         $form.=HtmlInput::hidden('sc', $_REQUEST['sc']);
00418                 if (isset($_REQUEST['sb']))
00419                         $form.=HtmlInput::hidden('sb', $_REQUEST['sb']);
00420                 if (isset($_REQUEST['f_id']))
00421                         $form.=HtmlInput::hidden('f_id', $_REQUEST['f_id']);
00422 
00423 
00424                 // display a list of operation from the other side + box button
00425                 if ($ot == 'account')
00426                 {
00427                         $obj = new Lettering_Account($cn, $row['j_poste']);
00428                         if (isset($search_start))
00429                                 $obj->start = $search_start;
00430                         if (isset($search_end))
00431                                 $obj->end = $search_end;
00432                         if (isset($max_amount))
00433                                 $obj->fil_amount_max = $max_amount;
00434                         if (isset($min_amount))
00435                                 $obj->fil_amount_min = $min_amount;
00436                         if (isset($side))
00437                                 $obj->fil_deb = $side;
00438 
00439                         $form.=$obj->show_letter($j_id);
00440                 }
00441                 else if ($ot == 'card')
00442                 {
00443                         $obj = new Lettering_Card($cn, $row['j_qcode']);
00444                         if (isset($search_start))
00445                                 $obj->start = $search_start;
00446                         if (isset($search_end))
00447                                 $obj->end = $search_end;
00448                         if (isset($max_amount))
00449                                 $obj->fil_amount_max = $max_amount;
00450                         if (isset($min_amount))
00451                                 $obj->fil_amount_min = $min_amount;
00452                         if (isset($side))
00453                                 $obj->fil_deb = $side;
00454                         $form.=$obj->show_letter($j_id);
00455                 }
00456                 else
00457                 {
00458                         $form.=_('Mauvais type objet');
00459                 }
00460 
00461                 $form.=HtmlInput::submit('record', _('Sauver')) . $ret->input();
00462                 $form.='</FORM>';
00463                 $form.='</div>';
00464 
00465                 $html = $r . $form;
00466                 $html.=$date_error;
00467                 //       echo $html;exit;
00468                 $html = escape_xml($html);
00469 
00470                 header('Content-type: text/xml; charset=UTF-8');
00471                 echo <<<EOF
00472 <?xml version="1.0" encoding="UTF-8"?>
00473 <data>
00474 <code>detail</code>
00475 <value>$html</value>
00476 </data>
00477 EOF;
00478                 break;
00479         case 'mod_doc':
00480                 require_once('ajax_mod_document.php');
00481                 break;
00482         case 'input_per':
00483                 require_once('ajax_mod_periode.php');
00484                 break;
00485         case 'save_per':
00486                 require_once('ajax_mod_periode.php');
00487                 break;
00488         case 'mod_predf':
00489                 require_once('ajax_mod_predf_op.php');
00490                 break;
00491         case 'save_predf':
00492                 require_once('ajax_save_predf_op.php');
00493                 break;
00494         case 'search_op':
00495                 require_once 'search.inc.php';
00496                 break;
00497         case 'search_action':
00498                 require_once 'ajax_search_action.php';
00499                 break;
00500         case 'display_profile':
00501                 require_once("ajax_get_profile.php");
00502                 break;
00503         case 'det_menu':
00504                 require_once("ajax_get_menu_detail.php");
00505                 break;
00506         case 'add_menu':
00507                 require_once 'ajax_add_menu.php';
00508                 break;
00509         case 'cardsearch':
00510                 require_once 'ajax_boxcard_search.php';
00511                 break;
00512         case 'add_plugin':
00513                 $me_code = new IText('me_code');
00514                 $me_file = new IText('me_file');
00515                 $me_menu = new IText('me_menu');
00516                 $me_description = new IText("me_description");
00517                 $me_parameter = new IText("me_parameter");
00518                 $new = true;
00519                 require_once 'ajax_plugin_detail.php';
00520                 break;
00521         case 'mod_plugin':
00522                 $m = $cn->get_array("select me_code,me_file,me_menu,me_description,me_parameter
00523                         from menu_ref where me_code=$1", array($me_code));
00524                 if (empty($m))
00525                 {
00526                         echo HtmlInput::title_box("Ce plugin n'existe pas ", $ctl);
00527                         echo "<p>Il y a une erreur, ce plugin n'existe pas";
00528                         exit;
00529                 }
00530                 $me_code = new IText('me_code', $m[0] ['me_code']);
00531                 $me_file = new IText('me_file', $m[0] ['me_file']);
00532                 $me_menu = new IText('me_menu', $m[0] ['me_menu']);
00533                 $me_description = new IText("me_description", $m[0] ['me_description']);
00534                 $me_parameter = new IText("me_parameter", $m[0] ['me_parameter']);
00535                 $new = false;
00536                 require_once 'ajax_plugin_detail.php';
00537                 break;
00538         case 'saldo':
00539                 require_once 'ajax_bank_saldo.php';
00540                 break;
00541         case 'up_predef':
00542                 require_once 'ajax_update_predef.php';
00543                 break;
00544         case 'upd_receipt':
00545                 require_once 'ajax_get_receipt.php';
00546                 break;
00547         case 'up_pay_method':
00548                 require_once 'ajax_update_payment.php';
00549                 break;
00550         case 'openancsearch':
00551         case 'resultancsearch':
00552                 require_once('ajax_anc_search.php');
00553                 break;
00554         case 'autoanc':
00555                 require_once 'ajax_auto_anc_card.php';
00556                 break;
00557         case 'create_menu';
00558                 require_once 'ajax_create_menu.php';
00559                 break;
00560         case 'modify_menu';
00561                 require_once 'ajax_mod_menu.php';
00562                 break;
00563         case 'mod_stock_repo':
00564                 require_once 'ajax_mod_stock_repo.php';
00565                 break;
00566         case 'view_mod_stock':
00567                 require_once 'ajax_view_mod_stock.php';
00568                 break;
00569         case 'fddetail':
00570                 require_once 'ajax_fiche_def_detail.php';
00571                 break;
00572         case 'vw_action':
00573                 require_once 'ajax_view_action.php';
00574                 break;
00575         case 'minrow':
00576                 require_once 'ajax_min_row.php';
00577                 break;
00578         case 'navigator':
00579                 require_once 'ajax_navigator.php';
00580                 break;
00581         case 'preference':
00582                 require_once 'ajax_preference.php';
00583                 break;
00584         case 'bookmark':
00585             require_once 'ajax_bookmark.php';
00586             break;
00587         case 'tag_detail':
00588             require_once 'ajax_tag_detail.php';
00589             break;
00590         case 'tag_save':
00591             require_once 'ajax_tag_save.php';
00592             break;
00593         case 'tag_list':
00594             require_once 'ajax_tag_list.php';
00595             break;
00596         case 'tag_add':
00597             require_once 'ajax_tag_add_action.php';
00598             break;
00599         case 'tag_remove':
00600             require_once 'ajax_tag_remove_action.php';
00601             break;
00602         case 'tag_choose':
00603             require_once 'ajax_tag_choose.php';
00604             break;
00605         case 'tag_choose':
00606             require_once 'ajax_tag_choose.php';
00607             break;
00608        case 'search_display_tag':
00609             require_once 'ajax_search_display_tag.php';
00610             break;
00611         case 'search_add_tag':
00612             require_once 'ajax_search_add_tag.php';
00613             break;
00614         case 'search_clear_tag':
00615             require_once 'ajax_search_clear_tag.php';
00616             break;
00617         case 'calendar_zoom':
00618             require_once 'ajax_calendar_zoom.php';
00619             break;
00620         case 'ledger_show':
00621             require_once 'ajax_ledger_show.php';
00622         case 'ledger_description':
00623             $ajrn=$cn->get_array('select jrn_def_name,jrn_def_description from jrn_def where jrn_def_id=$1',array($l));
00624             if ( count($ajrn)==1)
00625             {
00626                 echo '<div>';
00627                 echo '<h2 id="info">'.$ajrn[0]['jrn_def_name'].'</h2>';
00628                 if ( trim($ajrn[0]['jrn_def_description']) != "") {
00629                     echo '<p style="border:1px solid;margin-top:0px">'.$ajrn[0]['jrn_def_description'].'</p>';
00630                 }
00631                 echo '</div>';
00632             }
00633             exit();
00634             break;
00635         default:
00636                 var_dump($_GET);
00637 }
 All Data Structures Namespaces Files Functions Variables Enumerations