function _printHeader(&$langs, &$user)
{
    llxHeader('', $langs->trans('PaymentImport'), '', '');
    if (!$user->rights->facture->paiement) {
        accessforbidden();
    }
}
function _liste()
{
    global $langs, $db, $user, $conf;
    $langs->load('asset@asset');
    llxHeader('', $langs->trans('ListControl'), '', '');
    getStandartJS();
    if (isset($_SESSION['AssetMsg'])) {
        print_r('<div class="info">' . $langs->trans($_SESSION['AssetMsg']) . '</div>');
        unset($_SESSION['AssetMsg']);
    }
    $form = new TFormCore();
    $assetControl = new TAssetControl();
    $r = new TSSRenderControler($assetControl);
    $sql = 'SELECT rowid as id, libelle, type, question, "" as action FROM ' . MAIN_DB_PREFIX . 'asset_control';
    $THide = array('id');
    $form = new TFormCore($_SERVER['PHP_SELF'], 'form', 'GET');
    $ATMdb = new TPDOdb();
    $r->liste($ATMdb, $sql, array('limit' => array('nbLine' => '30'), 'subQuery' => array(), 'link' => array('libelle' => '<a href="' . DOL_URL_ROOT . '/custom/asset/control.php?id=@id@">' . img_picto('', 'object_generic.png', '', 0) . '@val@</a>', 'question' => '<a href="' . DOL_URL_ROOT . '/custom/asset/control.php?id=@id@">@val@</a>', 'action' => '<a title="Modifier" href="control.php?id=@id@&action=edit">' . img_picto('', 'edit.png', '', 0) . '</a>&nbsp;&nbsp;&nbsp;<a title="Supprimer" onclick="if (!window.confirm(\'Confirmez-vous la suppression ?\')) return false;" href="control.php?id=@id@&action=delete">' . img_picto('', 'delete.png', '', 0) . "</a>"), 'search' => array('libelle' => array('recherche' => true, 'table' => '')), 'translate' => array(), 'hide' => $THide, 'liste' => array('titre' => $langs->trans('ListControl'), 'image' => img_picto('', 'title.png', '', 0), 'picto_precedent' => img_picto('', 'back.png', '', 0), 'picto_suivant' => img_picto('', 'next.png', '', 0), 'noheader' => 0, 'messageNothing' => $langs->trans('AssetEmptyControl'), 'picto_search' => img_picto('', 'search.png', '', 0)), 'title' => array('libelle' => 'Libelle', 'type' => 'Type', 'nb_value' => 'Nombre de valeurs associés', 'question' => 'Question', 'action' => 'Action'), 'eval' => array('type' => 'TAssetControl::$TType["@val@"]')));
    $form->end();
    echo '<div class="tabsAction">';
    echo '<a class="butAction" href="control.php?action=new">' . $langs->trans('AssetCreateControl') . '</a>';
    echo '</div>';
    $ATMdb->close();
    llxFooter('');
}
예제 #3
0
function _list(&$PDOdb)
{
    global $langs, $conf, $user, $db;
    llxHeader();
    dol_fiche_head(array(), 'menu', 'Menu');
    $l = new TListviewTBS('lMenu');
    $sql = "SELECT rowid,title, type_menu, tab_object, mainmenu,leftmenu,date_cre \n\tFROM " . MAIN_DB_PREFIX . "query_menu \n\tWHERE entity IN (0," . $conf->entity . ")";
    $menu_static = new TQueryMenu();
    echo $l->render($PDOdb, $sql, array('title' => array('title' => $langs->trans('Title'), 'leftmenu' => $langs->trans('LeftMenu'), 'mainmenu' => $langs->trans('MainMenu'), 'date_cre' => $langs->trans('Date'), 'tab_object' => $langs->trans('TabsObject'), 'type_menu' => $langs->trans('TypeMenu')), 'translate' => array('tab_object' => $menu_static->TTabObject, 'type_menu' => $menu_static->TTypeMenu), 'link' => array('title' => '<a href="?id=@rowid@&action=edit">@val@</a>'), 'hide' => array('rowid'), 'type' => array('date_cre' => 'date')));
    /*$kiwi = new TKiwi;
    	$kiwi->fk_soc = $object->id;
    	$kiwi->fk_product = 1;
    	$kiwi->save($PDOdb);
    	*/
    // pied de page
    dol_fiche_end();
    llxFooter();
}
예제 #4
0
function _list(&$PDOdb)
{
    global $langs, $conf, $user, $db;
    llxHeader();
    $url = 'lib/adminer/?';
    //TODO genrate read profile
    /*
    $url.='&server='.$dolibarr_main_db_host;
    $url.='&db='.$dolibarr_main_db_name;
    $url.='&username='******'&password='******'&driver='.$dolibarr_main_db_type;
    */
    ?>
	
	<a href="<?php 
    echo $url;
    ?>
" class="butAction" target="_blank">Accès à la base de données</a>
	
<?php 
    if (!empty($user->rights->query->bdd->use_other_db)) {
        dol_fiche_head(array(), 'bdd', 'BDD');
        $l = new TListviewTBS('lMenu');
        $sql = "SELECT rowid, host, db_name,login,port,charset, '' as 'alive'\n\tFROM " . MAIN_DB_PREFIX . "query_bdd_connector \n\tWHERE entity IN (0," . $conf->entity . ")";
        echo $l->render($PDOdb, $sql, array('title' => array('host' => $langs->trans('Host'), 'db_name' => $langs->trans('DBName'), 'port' => $langs->trans('Port'), 'charset' => $langs->trans('Charset'), 'login' => $langs->trans('Login'), 'alive' => $langs->trans('Alive')), 'link' => array('host' => '<a href="?id=@rowid@&action=edit">@val@</a>'), 'hide' => array('rowid'), 'type' => array('date_cre' => 'date'), 'eval' => array('alive' => '_test_alive(@rowid@)')));
        /*$kiwi = new TKiwi;
        	$kiwi->fk_soc = $object->id;
        	$kiwi->fk_product = 1;
        	$kiwi->save($PDOdb);
        	*/
        // pied de page
        dol_fiche_end();
    }
    llxFooter();
}
예제 #5
0
파일: note.php 프로젝트: Samara94/dolibarr
$object = new Loan($db);
if ($id > 0) {
    $object->fetch($id);
}
$permissionnote = $user->rights->loan->write;
// Used by the include of actions_setnotes.inc.php
/*
 *  Actions
 */
include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php';
// Must be include, not include_once
/*
 *  View
 */
$form = new Form($db);
llxHeader('', $langs->trans("LoanArea") . ' - ' . $langs->trans("Notes"), '');
if ($id > 0) {
    /*
     * Affichage onglets
     */
    $head = loan_prepare_head($object);
    dol_fiche_head($head, 'note', $langs->trans("Loan"), 0, 'loan');
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<table class="border" width="100%">';
    // Ref
    print '<tr><td width="25%">' . $langs->trans('Ref') . '</td>';
    print '<td colspan="3">';
    print $form->showrefnav($object, 'id', '', '', 'rowid', 'ref');
    print '</td></tr>';
    // Name
예제 #6
0
    } else {
        $action = 'edit';
        $mesg = '<div class="error">' . $object->error . '</div>';
    }
}
if ($_POST["cancel"] == $langs->trans("Cancel")) {
    $action = '';
}
/*
 * View
 */
$productstatic = new Product($db);
$form = new Form($db);
$formcompany = new FormCompany($db);
$help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:M&oacute;dulo_Stocks';
llxHeader("", $langs->trans("WarehouseCard"), $help_url);
if ($action == 'create') {
    print_fiche_titre($langs->trans("NewWarehouse"));
    print "<form action=\"fiche.php\" method=\"post\">\n";
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="add">';
    print '<input type="hidden" name="type" value="' . $type . '">' . "\n";
    dol_htmloutput_mesg($mesg);
    print '<table class="border" width="100%">';
    // Ref
    print '<tr><td width="25%" class="fieldrequired">' . $langs->trans("Ref") . '</td><td colspan="3"><input name="libelle" size="20" value=""></td></tr>';
    print '<tr><td >' . $langs->trans("LocationSummary") . '</td><td colspan="3"><input name="lieu" size="40" value="' . $object->lieu . '"></td></tr>';
    // Description
    print '<tr><td valign="top">' . $langs->trans("Description") . '</td><td colspan="3">';
    // Editeur wysiwyg
    require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
예제 #7
0
	}

	$result=delivery_order_pdf_create($db, $delivery,$_REQUEST['model'],$outputlangs);
	if ($result <= 0)
	{
		dol_print_error($db,$result);
		exit;
	}
}


/*
 *	View
 */

llxHeader('',$langs->trans('Delivery'),'Livraison');

$html = new Form($db);
$formfile = new FormFile($db);

/*********************************************************************
 *
 * Mode creation
 *
 *********************************************************************/
if ($_GET["action"] == 'create')
{

	print_fiche_titre($langs->trans("CreateADeliveryOrder"));

	if ($mesg)
예제 #8
0
$socid = GETPOST('socid', 'int');
if ($user->societe_id) {
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'tax', '', '', 'charges');
/*
 * View
 */
$morequerystring = '';
$listofparams = array('date_startmonth', 'date_startyear', 'date_startday', 'date_endmonth', 'date_endyear', 'date_endday');
foreach ($listofparams as $param) {
    if (GETPOST($param) != '') {
        $morequerystring .= ($morequerystring ? '&' : '') . $param . '=' . GETPOST($param);
    }
}
llxHeader('', '', '', '', 0, 0, '', '', $morequerystring);
$form = new Form($db);
$company_static = new Societe($db);
$invoice_customer = new Facture($db);
$invoice_supplier = new FactureFournisseur($db);
$product_static = new Product($db);
$payment_static = new Paiement($db);
$paymentfourn_static = new PaiementFourn($db);
//print load_fiche_titre($langs->trans("VAT"),"");
//$fsearch.='<br>';
$fsearch .= '  <input type="hidden" name="year" value="' . $year . '">';
$fsearch .= '  <input type="hidden" name="modetax" value="' . $modetax . '">';
//$fsearch.='  '.$langs->trans("SalesTurnoverMinimum").': ';
//$fsearch.='  <input type="text" name="min" value="'.$min.'">';
// Affiche en-tete du rapport
if ($modetax == 1) {
예제 #9
0
if ($id > 0) {
    $object->fetch($id);
}
$permissionnote = $user->rights->societe->creer;
// Used by the include of actions_setnotes.inc.php
/*
 * Actions
 */
include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php';
// Must be include, not includ_once
/*
 *	View
 */
$form = new Form($db);
$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
llxHeader('', $langs->trans("ThirdParty") . ' - ' . $langs->trans("Notes"), $help_url);
if ($id > 0) {
    /*
     * Affichage onglets
     */
    if (!empty($conf->notification->enabled)) {
        $langs->load("mails");
    }
    $head = societe_prepare_head($object);
    dol_fiche_head($head, 'note', $langs->trans("ThirdParty"), 0, 'company');
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<table class="border" width="100%">';
    print '<tr><td width="25%">' . $langs->trans('ThirdPartyName') . '</td>';
    print '<td colspan="3">';
    print $form->showrefnav($object, 'socid', '', $user->societe_id ? 0 : 1, 'rowid', 'nom');
     $product->fetch($idproduct);
 }
 if ($id > 0) {
     $entrepot = new Entrepot($db);
     $result = $entrepot->fetch($id);
     if ($result < 0) {
         dol_print_error($db);
     }
 }
 $i = 0;
 $help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:M&oacute;dulo_Stocks';
 $texte = $langs->trans("ListOfStockMovements");
 if ($id) {
     $texte .= ' (' . $langs->trans("ForThisWarehouse") . ')';
 }
 llxHeader("", $texte, $help_url);
 /*
  * Show tab only if we ask a particular warehouse
  */
 if ($id) {
     $head = stock_prepare_head($entrepot);
     dol_fiche_head($head, 'movements', $langs->trans("Warehouse"), 0, 'stock');
     print '<table class="border" width="100%">';
     $linkback = '<a href="' . DOL_URL_ROOT . '/adherents/liste.php">' . $langs->trans("BackToList") . '</a>';
     // Ref
     print '<tr><td width="25%">' . $langs->trans("Ref") . '</td><td colspan="3">';
     print $form->showrefnav($entrepot, 'id', $linkback, 1, 'rowid', 'libelle');
     print '</td>';
     print '<tr><td>' . $langs->trans("LocationSummary") . '</td><td colspan="3">' . $entrepot->lieu . '</td></tr>';
     // Description
     print '<tr><td valign="top">' . $langs->trans("Description") . '</td><td colspan="3">' . dol_htmlentitiesbr($entrepot->description) . '</td></tr>';
예제 #11
0
// Security check
if ($user->societe_id > 0)
{
	$action = '';
	$socid = $user->societe_id;
}


/*
 * View
 */

$now=gmmktime();

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

$facturestatic=new FactureFournisseur($db);
$companystatic=new Societe($db);


/***************************************************************************
*                                                                         *
*                      Mode Liste                                         *
*                                                                         *
***************************************************************************/

$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0; }
예제 #12
0
파일: perms.php 프로젝트: Samara94/dolibarr
    if ($result > 0) {
        $editgroup->addrights($rights, $module);
    }
}
if ($action == 'delrights' && $caneditperms) {
    $editgroup = new Usergroup($db);
    $result = $editgroup->fetch($id);
    if ($result > 0) {
        $editgroup->delrights($rights, $module);
    }
}
/**
 * View
 */
$form = new Form($db);
llxHeader('', $langs->trans("Permissions"));
if ($id) {
    $fgroup = new Usergroup($db);
    $fgroup->fetch($id);
    $fgroup->getrights();
    /*
     * Affichage onglets
     */
    $head = group_prepare_head($fgroup);
    $title = $langs->trans("Group");
    dol_fiche_head($head, 'rights', $title, 0, 'group');
    // Charge les modules soumis a permissions
    $modules = array();
    $modulesdir = dolGetModulesDirs();
    $db->begin();
    foreach ($modulesdir as $dir) {
예제 #13
0
            header("Location: " . $backtourl);
            exit;
        } else {
            header("Location: " . DOL_URL_ROOT . "/product/document.php?id=" . $id . '&file=' . urldecode($_POST["file"]));
            exit;
        }
    } else {
        setEventMessages($result, null, 'errors');
        $_GET['file'] = $_POST["file"];
        $action = '';
    }
}
/*
 * View
 */
llxHeader($head, $langs->trans("Image"), '', '', 0, 0, array('/includes/jquery/plugins/jcrop/js/jquery.Jcrop.min.js', '/core/js/lib_photosresize.js'), array('/includes/jquery/plugins/jcrop/css/jquery.Jcrop.css'));
print load_fiche_titre($langs->trans("ImageEditor"));
$infoarray = dol_getImageSize($dir . "/" . urldecode($_GET["file"]));
$height = $infoarray['height'];
$width = $infoarray['width'];
print $langs->trans("CurrentInformationOnImage") . ': ';
print $langs->trans("Width") . ': <strong>' . $width . '</strong> x ' . $langs->trans("Height") . ': <strong>' . $height . '</strong><br>';
print '<br>' . "\n";
/*
 * Resize image
 */
print '<!-- Form to resize -->' . "\n";
print '<form name="redim_file" action="' . $_SERVER["PHP_SELF"] . '?id=' . $id . '" method="POST">';
print '<fieldset id="redim_file">';
print '<legend>' . $langs->trans("Resize") . '</legend>';
print $langs->trans("ResizeDesc") . '<br>';
예제 #14
0
파일: index.php 프로젝트: Samara94/dolibarr
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php';
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
// Security check
$orderid = GETPOST('orderid');
if ($user->societe_id) {
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande');
$langs->load("suppliers");
$langs->load("orders");
/*
 * 	View
 */
llxHeader('', $langs->trans("SuppliersOrdersArea"));
$commandestatic = new CommandeFournisseur($db);
$userstatic = new User($db);
$formfile = new FormFile($db);
print load_fiche_titre($langs->trans("SuppliersOrdersArea"));
print '<table class="notopnoleftnoright" width="100%">';
print '<tr valign="top"><td class="notopnoleft" width="30%">';
/*
 * Search form
 */
$var = false;
print '<form method="post" action="list.php">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre"><td colspan="3">' . $langs->trans("Search") . '</td></tr>';
print '<tr ' . $bc[$var] . '><td>';
    // From "custom" directory
}
// Libraries
require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php";
require_once '../lib/lcr.lib.php';
// Translations
$langs->load("lcr@lcr");
// Access control
if (!$user->admin) {
    accessforbidden();
}
/*
 * View
 */
$page_name = "lcrAbout";
llxHeader('', $langs->trans($page_name));
// Subheader
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print_fiche_titre($langs->trans($page_name), $linkback);
// Configuration header
$head = lcrAdminPrepareHead();
dol_fiche_head($head, 'about', $langs->trans("Module104940Name"), 0, 'lcr@lcr');
// About page goes here
print '<div style="float: left;"><img src="../img/Dolibarr_Preferred_Partner_logo.png" /></div>';
print '<div>' . $langs->trans('ATMAbout') . '</div>';
dol_fiche_end();
print '<br><center>';
print '<a href="http://www.atm-consulting.fr" target="_blank"><img src="../img/ATM_logo.jpg" /></a>';
print '</center>';
llxFooter();
$db->close();
예제 #16
0
파일: index.php 프로젝트: Samara94/dolibarr
$socid = GETPOST('socid', 'int');
if (isset($user->societe_id) && $user->societe_id > 0) {
    $action = '';
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'supplier_proposal');
/*
 * View
 */
$now = dol_now();
$supplier_proposalstatic = new SupplierProposal($db);
$companystatic = new Societe($db);
$form = new Form($db);
$formfile = new FormFile($db);
$help_url = "EN:Module_Ask_Price_Supplier|FR:Module_Demande_de_prix_fournisseur";
llxHeader("", $langs->trans("SupplierProposalArea"), $help_url);
print load_fiche_titre($langs->trans("SupplierProposalArea"));
print '<div class="fichecenter"><div class="fichethirdleft">';
/*
 * Search form
 */
$var = false;
print '<form method="post" action="' . DOL_URL_ROOT . '/supplier_proposal/list.php">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre"><td colspan="3">' . $langs->trans("SearchRequest") . '</td></tr>';
print '<tr ' . $bc[$var] . '><td>';
print $langs->trans("Ref") . ':</td><td><input type="text" class="flat" name="sref" size=18></td><td rowspan="2"><input type="submit" value="' . $langs->trans("Search") . '" class="button"></td></tr>';
print '<tr ' . $bc[$var] . '><td class="nowrap">' . $langs->trans("Other") . ':</td><td><input type="text" class="flat" name="sall" size="18"></td>';
print '</tr>';
print "</table></form><br>\n";
$attrname = GETPOST('attrname', 'alpha');
$elementtype = 'categories';
//Must be the $element of the class that manage extrafield
if (!$user->admin) {
    accessforbidden();
}
/*
 * Actions
 */
require DOL_DOCUMENT_ROOT . '/core/actions_extrafields.inc.php';
/*
 * View
 */
$textobject = $langs->transnoentitiesnoconv("Categories");
$help_url = 'EN:Module Categories|FR:Module Catégories|ES:Módulo Categorías';
llxHeader('', $langs->trans("Categories"), $help_url);
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print_fiche_titre($langs->trans("CategoriesSetup"), $linkback, 'title_setup');
$head = categoriesadmin_prepare_head();
dol_fiche_head($head, 'attributes_categories', $langs->trans("Categories"), 0, 'category');
require DOL_DOCUMENT_ROOT . '/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
// Buttons
if ($action != 'create' && $action != 'edit') {
    print '<div class="tabsAction">';
    print "<a class=\"butAction\" href=\"" . $_SERVER["PHP_SELF"] . "?action=create\">" . $langs->trans("NewAttribute") . "</a>";
    print "</div>";
}
/* ************************************************************************** */
/*                                                                            */
/* Creation d'un champ optionnel
예제 #18
0
    }
}
/*
 *	View
 */
// Define height of file area (depends on $_SESSION["dol_screenheight"])
//print $_SESSION["dol_screenheight"];
$maxheightwin = isset($_SESSION["dol_screenheight"]) && $_SESSION["dol_screenheight"] > 466 ? $_SESSION["dol_screenheight"] - 186 : 660;
// Also into index.php file
$morejs = array();
if (empty($conf->global->MAIN_ECM_DISABLE_JS)) {
    $morejs = array("/includes/jquery/plugins/jqueryFileTree/jqueryFileTree.js");
}
$moreheadcss = "\n<!-- dol_screenheight=" . $_SESSION["dol_screenheight"] . " -->\n<style type=\"text/css\">\n    #containerlayout {\n        height:     " . $maxheightwin . "px;\n        margin:     0 auto;\n        width:      100%;\n        min-width:  700px;\n        _width:     700px; /* min-width for IE6 */\n    }\n</style>";
$moreheadjs = empty($conf->use_javascript_ajax) ? "" : "\n<script type=\"text/javascript\">\n    jQuery(document).ready(function () {\n        jQuery('#containerlayout').layout({\n        \tname: \"ecmlayout\"\n        ,   paneClass:    \"ecm-layout-pane\"\n        ,   resizerClass: \"ecm-layout-resizer\"\n        ,   togglerClass: \"ecm-layout-toggler\"\n        ,   center__paneSelector:   \"#ecm-layout-center\"\n        ,   north__paneSelector:    \"#ecm-layout-north\"\n        ,   west__paneSelector:     \"#ecm-layout-west\"\n        ,   resizable: true\n        ,   north__size:        32\n        ,   north__resizable:   false\n        ,   north__closable:    false\n        ,   west__size:         340\n        ,   west__minSize:      280\n        ,   west__slidable:     true\n        ,   west__resizable:    true\n        ,   west__togglerLength_closed: '100%'\n        ,   useStateCookie:     true\n            });\n\n        jQuery('#ecm-layout-center').layout({\n            center__paneSelector:   \".ecm-in-layout-center\"\n        ,   resizable: false\n            });\n    });\n</script>";
llxHeader($moreheadcss . $moreheadjs, $langs->trans("ECMArea"), '', '', '', '', $morejs, '', 0, 0);
// Add sections to manage
$rowspan = 0;
$sectionauto = array();
if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
    if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
        $langs->load("products");
        $rowspan++;
        $sectionauto[] = array('level' => 1, 'module' => 'product', 'test' => !empty($conf->product->enabled) || !empty($conf->service->enabled), 'label' => $langs->trans("ProductsAndServices"), 'desc' => $langs->trans("ECMDocsByProducts"));
    }
    if (!empty($conf->societe->enabled)) {
        $rowspan++;
        $sectionauto[] = array('level' => 1, 'module' => 'company', 'test' => $conf->societe->enabled, 'label' => $langs->trans("ThirdParties"), 'desc' => $langs->trans("ECMDocsByThirdParties"));
    }
    if (!empty($conf->propal->enabled)) {
        $rowspan++;
                                // La constante qui a ete lue en avant du nouveau set
                                // on passe donc par une variable pour avoir un affichage coherent
                                $conf->global->COMMANDE_ADDON_PDF_ODT_PATH = GETPOST('value1');
                            }
                        }
                    }
                }
            }
        }
    }
}
/*
 * View
 */
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
llxHeader("", $langs->trans("OrdersSetup"));
$form = new Form($db);
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print_fiche_titre($langs->trans("OrdersSetup"), $linkback, 'setup');
print '<br>';
$head = order_admin_prepare_head(null);
dol_fiche_head($head, 'general', $langs->trans("Orders"), 0, 'order');
/*
 * Orders Numbering model
 */
print_titre($langs->trans("OrdersNumberingModules"));
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Name") . '</td>';
print '<td>' . $langs->trans("Description") . '</td>';
print '<td class="nowrap">' . $langs->trans("Example") . '</td>';
예제 #20
0
}
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('propallist'));
/*
 * Actions
 */
$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);
// Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
    setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
}
/*
 * View
 */
llxHeader('', $langs->trans('Proposal'), 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos');
$form = new Form($db);
$formother = new FormOther($db);
$formfile = new FormFile($db);
$formpropal = new FormPropal($db);
$companystatic = new Societe($db);
$now = dol_now();
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOST("page", 'int');
if ($page == -1) {
    $page = 0;
}
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
예제 #21
0
파일: index.php 프로젝트: Samara94/dolibarr
if ($type == Categorie::TYPE_PRODUCT) {
    $title = $langs->trans("ProductsCategoriesArea");
} elseif ($type == Categorie::TYPE_SUPPLIER) {
    $title = $langs->trans("SuppliersCategoriesArea");
} elseif ($type == Categorie::TYPE_CUSTOMER) {
    $title = $langs->trans("CustomersCategoriesArea");
} elseif ($type == Categorie::TYPE_MEMBER) {
    $title = $langs->trans("MembersCategoriesArea");
} elseif ($type == Categorie::TYPE_CONTACT) {
    $title = $langs->trans("ContactsCategoriesArea");
} else {
    $title = $langs->trans("CategoriesArea");
}
$arrayofjs = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
$arrayofcss = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
llxHeader('', $title, '', '', 0, 0, $arrayofjs, $arrayofcss);
print load_fiche_titre($title);
//print '<table border="0" width="100%" class="notopnoleftnoright">';
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
print '<div class="fichecenter"><div class="fichethirdleft">';
/*
 * Zone recherche produit/service
 */
print '<form method="post" action="index.php?type=' . $type . '">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="type" value="' . $type . '">';
print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="3">' . $langs->trans("Search") . '</td>';
print '</tr>';
print '<tr ' . $bc[0] . '><td>';
예제 #22
0
 */
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/contact.lib.php';
$langs->load("companies");
// Security check
$id = GETPOST('id', 'int');
if ($user->societe_id) {
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
/*
 *	View
 */
$title = !empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses");
llxHeader('', $title, 'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas');
$form = new Form($db);
$contact = new Contact($db);
$contact->fetch($id, $user);
$head = contact_prepare_head($contact);
dol_fiche_head($head, 'exportimport', $title, 0, 'contact');
/*
 * Fiche en mode visu
 */
print '<table class="border" width="100%">';
$linkback = '<a href="' . DOL_URL_ROOT . '/contact/list.php">' . $langs->trans("BackToList") . '</a>';
// Ref
print '<tr><td>' . $langs->trans("Ref") . '</td><td colspan="3">';
print $form->showrefnav($contact, 'id', $linkback);
print '</td></tr>';
// Name
예제 #23
0
파일: index.php 프로젝트: Samara94/dolibarr
 *
 * 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		htdocs/accountancy/journal/index.php
 * \ingroup		Accounting Expert
 * \brief		Index
 */
require '../../main.inc.php';
// Langs
$langs->load("compta");
$langs->load("bills");
$langs->load("other");
$langs->load("main");
$langs->load("accountancy");
// Security check
if ($user->societe_id > 0) {
    accessforbidden();
}
llxHeader('', 'Journaux', '');
$form = new Form($db);
// End of page
llxFooter();
$db->close();
예제 #24
0
    if ($object->id) {
        $result = $object->add_photo($dir, $_FILES['userfile']);
    }
}
if ($action == 'confirm_delete' && $_GET["file"] && $confirm == 'yes' && ($user->rights->produit->creer || $user->rights->service->creer)) {
    $object->delete_photo($dir . "/" . $_GET["file"]);
}
if ($action == 'addthumb' && $_GET["file"]) {
    $object->add_thumb($dir . "/" . $_GET["file"]);
}
/*
 *	View
 */
$form = new Form($db);
if ($object->id) {
    llxHeader("", "", $langs->trans("CardProduct" . $object->type));
    /*
     *  En mode visu
     */
    $head = product_prepare_head($object, $user);
    $titre = $langs->trans("CardProduct" . $object->type);
    $picto = $object->type == 1 ? 'service' : 'product';
    dol_fiche_head($head, 'photos', $titre, 0, $picto);
    /*
     * Confirmation de la suppression de photo
     */
    if ($action == 'delete') {
        print $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&file=' . $_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
    }
    print $mesg;
    print '<table class="border" width="100%">';
예제 #25
0
파일: index.php 프로젝트: ADDAdev/Dolibarr
}
if (!$user->rights->projet->lire) {
    accessforbidden();
}
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
/*
 * View
 */
$socstatic = new Societe($db);
$projectstatic = new Project($db);
$userstatic = new User($db);
$tasktmp = new Task($db);
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, $mine ? $mine : (empty($user->rights->projet->all->lire) ? 0 : 2), 1);
//var_dump($projectsListId);
llxHeader("", $langs->trans("Projects"), "EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos");
$text = $langs->trans("Projects");
if ($mine) {
    $text = $langs->trans("MyProjects");
}
print_fiche_titre($text);
// Show description of content
if ($mine) {
    print $langs->trans("MyProjectsDesc") . '<br><br>';
} else {
    if (!empty($user->rights->projet->all->lire) && !$socid) {
        print $langs->trans("ProjectsDesc") . '<br><br>';
    } else {
        print $langs->trans("ProjectsPublicDesc") . '<br><br>';
    }
}
예제 #26
0
파일: index.php 프로젝트: Samara94/dolibarr
/**
 *  \file       htdocs/product/stock/index.php
 *  \ingroup    stock
 *  \brief      Home page of stock area
 */
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php';
$langs->load("stocks");
$langs->load("productbatch");
// Security check
$result = restrictedArea($user, 'stock');
/*
 * View
 */
$help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:M&oacute;dulo_Stocks';
llxHeader("", $langs->trans("Stocks"), $help_url);
print load_fiche_titre($langs->trans("StocksArea"));
//print '<table border="0" width="100%" class="notopnoleftnoright">';
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
print '<div class="fichecenter"><div class="fichethirdleft">';
/*
 * Zone recherche entrepot
 */
print '<form method="post" action="' . DOL_URL_ROOT . '/product/stock/list.php">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<table class="noborder nohover" width="100%">';
print "<tr class=\"liste_titre\">";
print '<td colspan="3">' . $langs->trans("Search") . '</td></tr>';
print "<tr " . $bc[false] . "><td>";
print $langs->trans("Ref") . ':</td><td><input class="flat" type="text" size="18" name="sref"></td><td rowspan="2"><input type="submit" value="' . $langs->trans("Search") . '" class="button"></td></tr>';
print "<tr " . $bc[false] . "><td>" . $langs->trans("Other") . ':</td><td><input type="text" name="sall" class="flat" size="18"></td>';
예제 #27
0
$langs->load("banks");
$langs->load("categories");
$langs->load("widthdrawals");
// Security check
$socid = GETPOST('socid', 'int');
if ($user->societe_id) {
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
// Get supervariables
$page = GETPOST('page', 'int');
$sortorder = GETPOST('sortorder', 'alpha') == "" ? "DESC" : GETPOST('sortorder', 'alpha');
$sortfield = GETPOST('sortfield', 'alpha') == "" ? "p.datec" : GETPOST('sortfield', 'alpha');
$statut = GETPOST('statut', 'int');
$search_line = GETPOST('search_ligne', 'int');
llxHeader('', $langs->trans("WithdrawalsReceipts"));
$bon = new BonPrelevement($db, "");
if ($page == -1) {
    $page = 0;
}
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
/*
 * Mode Liste
 *
 */
$sql = "SELECT p.rowid, p.ref, p.amount, p.statut";
$sql .= ", p.datec";
$sql .= " FROM " . MAIN_DB_PREFIX . "prelevement_bons as p";
$sql .= " WHERE p.entity = " . $conf->entity;
예제 #28
0
파일: list.php 프로젝트: Albertopf/prueba
 if ($num == 1 && ($sall || $snom || $sref || $sbarcode) && $action != 'list') {
     $objp = $db->fetch_object($resql);
     header("Location: card.php?id=" . $objp->rowid);
     exit;
 }
 $helpurl = '';
 if (isset($type)) {
     if ($type == 0) {
         $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos';
     } else {
         if ($type == 1) {
             $helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios';
         }
     }
 }
 llxHeader('', $title, $helpurl, '');
 // Displays product removal confirmation
 if (GETPOST('delprod')) {
     setEventMessages($langs->trans("ProductDeleted", GETPOST('delprod')), null, 'mesgs');
 }
 if ($search_categ > 0) {
     $param .= "&amp;search_categ=" . $search_categ;
 }
 if ($sref) {
     $param = "&amp;sref=" . $sref;
 }
 if ($search_ref_supplier) {
     $param = "&amp;search_ref_supplier=" . $search_ref_supplier;
 }
 if ($sbarcode) {
     $param .= $sbarcode ? "&amp;sbarcode=" . $sbarcode : "";
예제 #29
0
            // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
            $ret = dol_delete_file($file, 0, 0, 0, $object);
            if ($ret) {
                setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
            } else {
                setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
            }
            Header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id);
            exit;
        }
    }
}
/*
 * View
 */
llxHeader();
$form = new Form($db);
if ($id > 0 || !empty($ref)) {
    if ($object->fetch($id, $ref)) {
        $upload_dir = $conf->bank->dir_output . '/' . $object->ref;
        // Onglets
        $head = bank_prepare_head($object);
        dol_fiche_head($head, 'document', $langs->trans("FinancialAccount"), 0, 'account');
        // Construit liste des fichiers
        $filearray = dol_dir_list($upload_dir, "files", 0, '', '\\.meta$', $sortfield, strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC, 1);
        $totalsize = 0;
        foreach ($filearray as $key => $file) {
            $totalsize += $file['size'];
        }
        print '<table class="border"width="100%">';
        // Ref
예제 #30
0
파일: index.php 프로젝트: nrjacker4/crm-php
 * 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       htdocs/adherents/index.php
 *       \ingroup    member
 *       \brief      Page accueil module adherents
 */
require "../main.inc.php";
require_once DOL_DOCUMENT_ROOT . "/adherent/class/adherent.class.php";
$langs->load("companies");
$langs->load("members");
/*
 * View
 */
llxHeader('', $langs->trans("Members"), 'EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_Miembros');
$staticmember = new Adherent($db);
print_fiche_titre($langs->trans("MembersArea"));
print '<table border="0" width="100%" class="notopnoleftnoright">';
$var = True;
$Adherents = array();
$AdherentsAValider = array();
$MemberUpToDate = array();
$AdherentsResilies = array();
$AdherentType = array();
$result = $staticmember->getView('tag', array("group" => true));
if (count($result->rows)) {
    foreach ($result->rows as $aRow) {
        $AdherentType[$aRow->key] = $aRow->value;
    }
}