Heray-Was-Here
Server : Apache
System : Linux mail.lomejor.cr 6.8.0-1059-azure #65~22.04.1-Ubuntu SMP Thu May 28 16:59:19 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.2.31
Disable Function : NONE
Directory :  /var/www/dev/htdocs/custom/customizeforms/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/dev/htdocs/custom/customizeforms/list.php
<?php
/*  Copyright (C) 2019 Customizeforms Paulo Ricardo Carvalho de Oliveira	<paulorcdo@gmail.com>
 
 * This program 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 3 of the License, or
 * (at your option) any later version.
 *
 * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
 */

/**
 *       \file       custom/customizeforms/list.php
 *       \brief      List Forms
 */
$res=@include("../main.inc.php");// For root directory
$custom=0;

if (! $res)
{
$res=@include("../../main.inc.php");
$custom=1;
}// For "custom" directory

  
 $result=restrictedArea($user,'customizeforms');

 
$extrafields = new ExtraFields($db);

 
$search_array_options=$extrafields->getOptionalsFromPost($object->table_element,'','search_');
 


/*
 * View
 */

llxHeader('',$langs->trans("Customize Forms"));

$form = new Form($db);
 
 
	$sql = "SELECT m.rowid, m.modulo, m.submodulo, m.pagina, m.acao, m.campo_nome,m.campo_tipo,m.campo_texto,m.form_nome,m.campo_pos,m.situacao,count(m.rowid) as num";
	$sql.= " FROM llx_customizeforms as m";
	$sql.= " group by m.form_nome order by m.rowid ASC ";
 
 
 $soma=0;
	
 //print $sql;
$result = $db->query($sql);
if ($result)
{
	$num = $db->num_rows($result);

	$title=$langs->trans("Customize Forms");
  

	$i = 0;
    
if(!function_exists('loadLangs'))
			{
                
$langs->load("customizeforms@customizeforms");$langs->load("errors");$langs->load("admin");$langs->load("members");$langs->load("install");$langs->load("exports");$langs->load("banks");$langs->load("users");$langs->load("withdrawals");$langs->load("agenda");$langs->load("boxes");$langs->load("supplier_proposal");$langs->load("suppliers");$langs->load("compta");$langs->load("salaries");$langs->load("commercial");$langs->load("companies");$langs->load("donations");$langs->load("mails");$langs->load("resource");$langs->load("holiday");$langs->load("accountancy");$langs->load("hrm");$langs->load("orders");$langs->load("contracts");$langs->load("projects");$langs->load("propal");$langs->load("bills");$langs->load("interventions");$langs->load("sendings");$langs->load("deliveries");$langs->load("products");$langs->load("stocks");$langs->load("productbatch");
         }
			else
			{
           $langs->loadLangs(array("errors","admin","main","members","salaries","install","exports","banks","users","withdrawals","agenda","boxes","loan","trips","supplier_proposal","printing","sendings","ecm","dict","suppliers","compta","salaries","commercial","companies","donations", "mails","resource","holiday","accountancy","hrm","orders","contracts","projects","propal","bills","interventions","sendings","deliveries","products","other","customizeforms@customizeforms","stocks","productbatch"));
			}
  
	print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
	if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
	print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
	print '<input type="hidden" name="action" value="list">';
	print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
	print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
	print '<input type="hidden" name="page" value="'.$page.'">';

	print_barre_liste($title, $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '',$num, '', 'title_generic.png', 0,'');

	$moreforfilter = '';

    print '<div class="div-table-responsive">';
    print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
 
	print '<tr class="liste_titre">';
	
    print '<th align="left">'.$langs->trans("Name").'</th>';
    print '<th align="center">'.$langs->trans("Qty").'</th>';
	print '<th align="center">'.$langs->trans("ClickToEdit").'</th>';	 
	print "</tr>\n";

 

	while ($i < $num)
	{
		$obj = $db->fetch_object($result);
        
        $soma+=$obj->num;
$qnome=explode("-",$obj->form_nome);

 $url = DOL_URL_ROOT.($custom==1?'/custom':'').'/customizeforms/card.php?form='.$obj->form_nome.'&action=create&id=1';
 
 $nomeform=$langs->trans($qnome[0]).($qnome[1]!=''?' - '.$langs->trans($qnome[1]):'');
 
		print "<tr>";

		print '<td align="left"><a href='.$url.'>'.$nomeform.'</a></td>';
		// Date creation

		print '<td align="center">';
		print $obj->num;
		print '</td>';

	 
		print '<td align="center">';
		print '<a href='.$url.'>'.img_edit().'</a>';
		print '</td>';

 

		print "</tr>\n";
		$i++;
	}
    
    
    print '<td  align="left">'.$langs->trans("Total").'</td>';
    print '<td align="center">'.$soma.'</td>';
	print '<td align="center">-</td>';	 
 
    
	print '</table>';
	print '</div>';
	print '</form>';
	$db->free($result);
}
else
{
	dol_print_error($db);
}

// End of page
llxFooter();
$db->close();

Hry