示例#1
0
$entitytoicon = array('invoice' => 'bill', 'invoice_line' => 'bill', 'order' => 'order', 'order_line' => 'order', 'intervention' => 'intervention', 'inter_line' => 'intervention', 'member' => 'user', 'member_type' => 'group', 'subscription' => 'payment', 'tax' => 'generic', 'tax_type' => 'generic', 'account' => 'account', 'payment' => 'payment', 'product' => 'product', 'stock' => 'generic', 'warehouse' => 'stock', 'category' => 'generic', 'other' => 'generic');
$entitytolang = array('user' => 'User', 'company' => 'Company', 'contact' => 'Contact', 'invoice' => 'Bill', 'invoice_line' => 'InvoiceLine', 'order' => 'Order', 'order_line' => 'OrderLine', 'intervention' => 'Intervention', 'inter_line' => 'InterLine', 'member' => 'Member', 'member_type' => 'MemberType', 'subscription' => 'Subscription', 'tax' => 'SocialContribution', 'tax_type' => 'DictionnarySocialContributions', 'account' => 'BankTransactions', 'payment' => 'Payment', 'product' => 'Product', 'stock' => 'Stock', 'warehouse' => 'Warehouse', 'category' => 'Category', 'other' => 'Other');
$datatoimport = GETPOST('datatoimport');
$format = GETPOST('format');
$filetoimport = GETPOST('filetoimport');
$action = GETPOST('action');
$step = GETPOST('step') ? GETPOST('step') : 1;
$import_name = GETPOST('import_name');
$hexa = GETPOST('hexa');
$importmodelid = GETPOST('importmodelid');
$excludefirstline = GETPOST('excludefirstline') ? GETPOST('excludefirstline') : 0;
$objimport = new Import($db);
$objimport->load_arrays($user, $step == 1 ? '' : $datatoimport);
$objmodelimport = new ModeleImports();
$form = new Form($db);
$htmlother = new FormOther($db);
$formfile = new FormFile($db);
// Init $array_match_file_to_database from _SESSION
$serialized_array_match_file_to_database = isset($_SESSION["dol_array_match_file_to_database"]) ? $_SESSION["dol_array_match_file_to_database"] : '';
$array_match_file_to_database = array();
$fieldsarray = explode(',', $serialized_array_match_file_to_database);
foreach ($fieldsarray as $elem) {
    $tabelem = explode('=', $elem, 2);
    $key = $tabelem[0];
    $val = $tabelem[1];
    if ($key && $val) {
        $array_match_file_to_database[$key] = $val;
    }
}
/*
 * Actions
示例#2
0
    $result = $object->add_type($newobject, $elementtype);
    if ($result >= 0) {
        setEventMessages($langs->trans("WasAddedSuccessfully", $newobject->ref), null, 'mesgs');
    } else {
        if ($cat->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
            setEventMessages($langs->trans("ObjectAlreadyLinkedToCategory"), null, 'warnings');
        } else {
            setEventMessages($object->error, $object->errors, 'errors');
        }
    }
}
/*
 * View
 */
$form = new Form($db);
$formother = new FormOther($db);
llxHeader("", "", $langs->trans("Categories"));
if ($type == Categorie::TYPE_PRODUCT) {
    $title = $langs->trans("ProductsCategoryShort");
} elseif ($type == Categorie::TYPE_SUPPLIER) {
    $title = $langs->trans("SuppliersCategoryShort");
} elseif ($type == Categorie::TYPE_CUSTOMER) {
    $title = $langs->trans("CustomersCategoryShort");
} elseif ($type == Categorie::TYPE_MEMBER) {
    $title = $langs->trans("MembersCategoryShort");
} elseif ($type == Categorie::TYPE_CONTACT) {
    $title = $langs->trans("ContactCategoriesShort");
} else {
    $title = $langs->trans("Category");
}
$head = categories_prepare_head($object, $type);
示例#3
0
$tableparams['search_categ'] = $selected_cat;
$tableparams['subcat'] = $subcat === true ? 'yes' : '';
// Adding common parameters
$allparams = array_merge($commonparams, $headerparams, $tableparams);
$headerparams = array_merge($commonparams, $headerparams);
$tableparams = array_merge($commonparams, $tableparams);
foreach ($allparams as $key => $value) {
    $paramslink .= '&' . $key . '=' . $value;
}
/*
 * View
 */
llxHeader();
$form = new Form($db);
$thirdparty_static = new Societe($db);
$formother = new FormOther($db);
// Show report header
if ($modecompta == "CREANCES-DETTES") {
    $nom = $langs->trans("SalesTurnover") . ', ' . $langs->trans("ByThirdParties");
    $calcmode = $langs->trans("CalcModeDebt");
    $calcmode .= '<br>(' . $langs->trans("SeeReportInInputOutputMode", '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . $year . '&modecompta=RECETTES-DEPENSES">', '</a>') . ')';
    $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
    //$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
    $description = $langs->trans("RulesCADue");
    if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
        $description .= $langs->trans("DepositsAreNotIncluded");
    } else {
        $description .= $langs->trans("DepositsAreIncluded");
    }
    $builddate = time();
    //$exportlink=$langs->trans("NotYetAvailable");
示例#4
0
	$object->fetch($_GET["id"]);
	$object->setProject($_POST['projectid']);
}



/*
 * View
 */

$now=gmmktime();

llxHeader();

$html = new Form($db);
$htmlother = new FormOther($db);
$formfile = new FormFile($db);
$societestatic=new Societe($db);
$propalstatic=new Propal($db);

$now=gmmktime();

$id = $_GET["id"];
$ref= $_GET["ref"];
if ($id > 0 || ! empty($ref))
{
	if ($mesg) print "$mesg<br>";

	$product_static=new Product($db);

	$object->fetch($_GET["id"],$_GET["ref"]);
示例#5
0
文件: ihm.php 项目: Samara94/dolibarr
    // This one is not always defined
    if (isset($_POST["MAIN_USE_PREVIEW_TABS"])) {
        dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["MAIN_USE_PREVIEW_TABS"], 'chaine', 0, '', $conf->entity);
    }
    $_SESSION["mainmenu"] = "";
    // Le gestionnaire de menu a pu changer
    header("Location: " . $_SERVER["PHP_SELF"] . "?mainmenu=home&leftmenu=setup");
    exit;
}
/*
 * View
 */
$wikihelp = 'EN:First_setup|FR:Premiers_param&eacute;trages|ES:Primeras_configuraciones';
llxHeader('', $langs->trans("Setup"), $wikihelp);
$form = new Form($db);
$formother = new FormOther($db);
$formadmin = new FormAdmin($db);
print load_fiche_titre($langs->trans("GUISetup"), '', 'title_setup');
print $langs->trans("DisplayDesc") . "<br>\n";
print "<br>\n";
if ($action == 'edit') {
    //WYSIWYG Editor
    require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
    print '<form method="post" action="' . $_SERVER["PHP_SELF"] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="update">';
    clearstatcache();
    $var = true;
    print load_fiche_titre($langs->trans("Language"), '', '');
    print '<br>';
    print '<table summary="edit" class="noborder" width="100%">';
示例#6
0
	$_REQUEST["search_categ"]="";
	$sall="";
}

// Load categ filters
$search_categ = isset($_GET["search_categ"])?$_GET["search_categ"]:$_POST["search_categ"];


/*
 * View
 */

llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_Miembros');

$form=new Form($db);
$htmlother=new FormOther($db);

$now=dol_now();

$membertypestatic=new AdherentType($db);

$sql = "SELECT d.rowid, d.login, d.prenom, d.nom, d.societe, ";
$sql.= " d.datefin,";
$sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
$sql.= " t.libelle as type, t.cotisation";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_member as cf";
$sql.= " WHERE d.fk_adherent_type = t.rowid ";
if ($search_categ) $sql.= " AND d.rowid = cf.fk_member";	// Join for the needed table to filter by categ
$sql.= " AND d.entity = ".$conf->entity;
if ($sall)
            header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id);
            exit;
        }
    } else {
        $action = '';
    }
}
/*
 * View
 */
$productstatic = new Product($db);
$warehousestatic = new Entrepot($db);
$movement = new MouvementStock($db);
$userstatic = new User($db);
$form = new Form($db);
$formother = new FormOther($db);
$formproduct = new FormProduct($db);
$sql = "SELECT p.rowid, p.ref as product_ref, p.label as produit, p.fk_product_type as type,";
$sql .= " e.label as stock, e.rowid as entrepot_id,";
$sql .= " m.rowid as mid, m.value, m.datem, m.fk_user_author, m.label, m.fk_origin, m.origintype,";
$sql .= " u.login";
$sql .= " FROM (" . MAIN_DB_PREFIX . "entrepot as e,";
$sql .= " " . MAIN_DB_PREFIX . "product as p,";
$sql .= " " . MAIN_DB_PREFIX . "stock_mouvement as m)";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "user as u ON m.fk_user_author = u.rowid";
$sql .= " WHERE m.fk_product = p.rowid";
$sql .= " AND m.fk_entrepot = e.rowid";
$sql .= " AND e.entity = " . $conf->entity;
if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
    $sql .= " AND p.fk_product_type = 0";
}
示例#8
0
    if (!$error) {
        $db->commit();
        setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
    } else {
        $db->rollback();
        if (empty($errorsaved)) {
            setEventMessages($langs->trans("Error"), null, 'errors');
        }
    }
}
/*
 * View
 */
$form = new Form($db);
$formadmin = new FormAdmin($db);
$formother = new FormOther($db);
$arrayofjs = array();
$arrayofcss = array();
llxHeader('', $langs->trans("AgendaSetup"), '', '', 0, 0, $arrayofjs, $arrayofcss);
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup');
print '<br>';
print '<form name="extsitesconfig" action="' . $_SERVER["PHP_SELF"] . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="save">';
$head = agenda_prepare_head();
dol_fiche_head($head, 'extsites', $langs->trans("Agenda"), 0, 'action');
print $langs->trans("AgendaExtSitesDesc") . "<br>\n";
print "<br>\n";
$selectedvalue = $conf->global->AGENDA_DISABLE_EXT;
if ($selectedvalue == 1) {
/**
 * 	Show list of themes. Show all thumbs of themes
 *
 * 	@param	User|null	$fuser				User concerned or null for global theme
 * 	@param	int			$edit				1 to add edit form
 * 	@param	boolean		$foruserprofile		Show for user profile view
 * 	@return	void
 */
function show_theme($fuser, $edit = 0, $foruserprofile = false)
{
    global $conf, $langs, $db;
    global $bc;
    require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
    $formother = new FormOther($db);
    //$dirthemes=array(empty($conf->global->MAIN_FORCETHEMEDIR)?'/theme':$conf->global->MAIN_FORCETHEMEDIR.'/theme');
    $dirthemes = array('/theme');
    if (!empty($conf->modules_parts['theme'])) {
        foreach ($conf->modules_parts['theme'] as $reldir) {
            $dirthemes = array_merge($dirthemes, (array) ($reldir . 'theme'));
        }
    }
    $dirthemes = array_unique($dirthemes);
    // Now dir_themes=array('/themes') or dir_themes=array('/theme','/mymodule/theme')
    $selected_theme = '';
    if (empty($foruserprofile)) {
        $selected_theme = $conf->global->MAIN_THEME;
    } else {
        $selected_theme = is_object($fuser) && !empty($fuser->conf->MAIN_THEME) ? $fuser->conf->MAIN_THEME : '';
    }
    $hoverdisabled = '';
    if (empty($foruserprofile)) {
        $hoverdisabled = isset($conf->global->THEME_ELDY_USE_HOVER) && $conf->global->THEME_ELDY_USE_HOVER == '0';
    } else {
        $hoverdisabled = is_object($fuser) ? empty($fuser->conf->THEME_ELDY_USE_HOVER) || $fuser->conf->THEME_ELDY_USE_HOVER == '0' : '';
    }
    $colspan = 2;
    if ($foruserprofile) {
        $colspan = 4;
    }
    $thumbsbyrow = 6;
    print '<table class="noborder" width="100%">';
    $var = false;
    // Title
    if ($foruserprofile) {
        print '<tr class="liste_titre"><th width="25%">' . $langs->trans("Parameter") . '</th><th width="25%">' . $langs->trans("DefaultValue") . '</th>';
        print '<th colspan="2">&nbsp;</th>';
        print '</tr>';
        print '<tr ' . $bc[$var] . '>';
        print '<td>' . $langs->trans("DefaultSkin") . '</td>';
        print '<td>' . $conf->global->MAIN_THEME . '</td>';
        print '<td align="left" class="nowrap" width="20%"><input ' . $bc[$var] . ' id="check_MAIN_THEME" name="check_MAIN_THEME"' . ($edit ? '' : ' disabled') . ' type="checkbox" ' . ($selected_theme ? " checked" : "") . '> ' . $langs->trans("UsePersonalValue") . '</td>';
        print '<td>&nbsp;</td>';
        print '</tr>';
    } else {
        print '<tr class="liste_titre"><th width="35%">' . $langs->trans("DefaultSkin") . '</th>';
        print '<th align="right">';
        $url = 'https://www.dolistore.com/lang-en/4-skins';
        if (preg_match('/fr/i', $langs->defaultlang)) {
            $url = 'https://www.dolistore.com/fr/4-themes';
        }
        //if (preg_match('/es/i',$langs->defaultlang)) $url='http://www.dolistore.com/lang-es/4-themes';
        print '<a href="' . $url . '" target="_blank">';
        print $langs->trans('DownloadMoreSkins');
        print '</a>';
        print '</th></tr>';
        print '<tr ' . $bc[$var] . '>';
        print '<td>' . $langs->trans("ThemeDir") . '</td>';
        print '<td>';
        foreach ($dirthemes as $dirtheme) {
            echo '"' . $dirtheme . '" ';
        }
        print '</td>';
        print '</tr>';
    }
    //$var=!$var;
    print '<tr ' . $bc[$var] . '><td colspan="' . $colspan . '">';
    print '<table class="nobordernopadding" width="100%"><tr><td><div align="center">';
    $i = 0;
    foreach ($dirthemes as $dir) {
        //print $dirroot.$dir;exit;
        $dirtheme = dol_buildpath($dir, 0);
        // This include loop on $conf->file->dol_document_root
        $urltheme = dol_buildpath($dir, 1);
        if (is_dir($dirtheme)) {
            $handle = opendir($dirtheme);
            if (is_resource($handle)) {
                while (($subdir = readdir($handle)) !== false) {
                    if (is_dir($dirtheme . "/" . $subdir) && substr($subdir, 0, 1) != '.' && substr($subdir, 0, 3) != 'CVS' && !preg_match('/common|phones/i', $subdir)) {
                        // Disable not stable themes (dir ends with _exp or _dev)
                        if ($conf->global->MAIN_FEATURES_LEVEL < 2 && preg_match('/_dev$/i', $subdir)) {
                            continue;
                        }
                        if ($conf->global->MAIN_FEATURES_LEVEL < 1 && preg_match('/_exp$/i', $subdir)) {
                            continue;
                        }
                        print '<div class="inline-block" style="margin-top: 10px; margin-bottom: 10px; margin-right: 20px; margin-left: 20px;">';
                        $file = $dirtheme . "/" . $subdir . "/thumb.png";
                        $url = $urltheme . "/" . $subdir . "/thumb.png";
                        if (!file_exists($file)) {
                            $url = DOL_URL_ROOT . '/public/theme/common/nophoto.png';
                        }
                        print '<a href="' . $_SERVER["PHP_SELF"] . ($edit ? '?action=edit&theme=' : '?theme=') . $subdir . (GETPOST("optioncss") ? '&optioncss=' . GETPOST("optioncss", 'alpha', 1) : '') . ($fuser ? '&id=' . $fuser->id : '') . '" style="font-weight: normal;" alt="' . $langs->trans("Preview") . '">';
                        if ($subdir == $conf->global->MAIN_THEME) {
                            $title = $langs->trans("ThemeCurrentlyActive");
                        } else {
                            $title = $langs->trans("ShowPreview");
                        }
                        print '<img src="' . $url . '" border="0" width="80" height="60" alt="' . $title . '" title="' . $title . '" style="margin-bottom: 5px;">';
                        print '</a><br>';
                        if ($subdir == $selected_theme) {
                            print '<input ' . ($edit ? '' : 'disabled') . ' type="radio" class="' . ($var ? 'imp' : '') . 'pair themethumbs" style="border: 0px;" checked name="main_theme" value="' . $subdir . '"> <b>' . $subdir . '</b>';
                        } else {
                            print '<input ' . ($edit ? '' : 'disabled') . ' type="radio" class="' . ($var ? 'imp' : '') . 'pair themethumbs" style="border: 0px;" name="main_theme" value="' . $subdir . '"> ' . $subdir;
                        }
                        print '</div>';
                        $i++;
                    }
                }
            }
        }
    }
    print '</div></td></tr></table>';
    print '</td></tr>';
    // BackgroundColor
    if ($foruserprofile) {
        /*$var=!$var;
            print '<tr '.$bc[$var].'>';
            print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
               print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).'</td>';
               print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_THEME_ELDY_TOPMENU_BACK1" id="check_THEME_ELDY_TOPMENU_BACK1" type="checkbox" '.(! empty($object->conf->THEME_ELDY_TOPMENU_BACK1)?" checked":"");
               print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"';	// Disabled for demo
               print '> '.$langs->trans("UsePersonalValue").'</td>';
               print '<td>';
            if ($edit)
            {
        		print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','formcolor',1).' ';
            }
           	else
           	{
           		$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),'');
        		if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
        		else print '';
           	}
           	if ($edit) print '<br>('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
            print '</td>';*/
    } else {
        $var = !$var;
        print '<tr ' . $bc[$var] . '>';
        print '<td>' . $langs->trans("BackgroundColor") . '</td>';
        print '<td colspan="' . ($colspan - 1) . '">';
        //var_dump($conf->global->THEME_ELDY_BACKBODY);
        if ($edit) {
            print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY, array()), ''), 'THEME_ELDY_BACKBODY', 'formcolor', 1) . ' ';
        } else {
            $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY, array()), '');
            if ($color) {
                print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #' . $color . '" value="' . $color . '">';
            } else {
                print $langs->trans("Default");
            }
        }
        print ' &nbsp; (' . $langs->trans("Default") . ': <strong>ffffff</strong>, ' . $langs->trans("NotSupportedByAllThemes") . ', ' . $langs->trans("PressF5AfterChangingThis") . ')';
        print '</td>';
    }
    // TopMenuBackgroundColor
    if ($foruserprofile) {
        /*$var=!$var;
            print '<tr '.$bc[$var].'>';
            print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
               print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).'</td>';
               print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_THEME_ELDY_TOPMENU_BACK1" id="check_THEME_ELDY_TOPMENU_BACK1" type="checkbox" '.(! empty($object->conf->THEME_ELDY_TOPMENU_BACK1)?" checked":"");
               print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"';	// Disabled for demo
               print '> '.$langs->trans("UsePersonalValue").'</td>';
               print '<td>';
            if ($edit)
            {
        		print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','formcolor',1).' ';
            }
           	else
           	{
           		$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),'');
        		if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
        		else print '';
           	}
           	if ($edit) print '<br>('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
            print '</td>';*/
    } else {
        $var = !$var;
        print '<tr ' . $bc[$var] . '>';
        print '<td>' . $langs->trans("TopMenuBackgroundColor") . '</td>';
        print '<td colspan="' . ($colspan - 1) . '">';
        if ($edit) {
            print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()), ''), 'THEME_ELDY_TOPMENU_BACK1', 'formcolor', 1) . ' ';
        } else {
            $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()), '');
            if ($color) {
                print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #' . $color . '" value="' . $color . '">';
            } else {
                print $langs->trans("Default");
            }
        }
        print ' &nbsp; (' . $langs->trans("Default") . ': <strong>7882aa</strong>, ' . $langs->trans("NotSupportedByAllThemes") . ', ' . $langs->trans("PressF5AfterChangingThis") . ')';
        print '</td>';
    }
    // BackgroundTableTitleColor
    if ($foruserprofile) {
    } else {
        $var = !$var;
        print '<tr ' . $bc[$var] . '>';
        print '<td>' . $langs->trans("BackgroundTableTitleColor") . '</td>';
        print '<td colspan="' . ($colspan - 1) . '">';
        if ($edit) {
            print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKTITLE1, array()), ''), 'THEME_ELDY_BACKTITLE1', 'formcolor', 1) . ' ';
        } else {
            print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans("Default"));
        }
        print ' &nbsp; (' . $langs->trans("Default") . ': <strong>e6e6e6</strong>, ' . $langs->trans("NotSupportedByAllThemes") . ', ' . $langs->trans("PressF5AfterChangingThis") . ')';
        print '</td>';
        print '</tr>';
    }
    // TextTitleColor
    if ($foruserprofile) {
    } else {
        $var = !$var;
        print '<tr ' . $bc[$var] . '>';
        print '<td>' . $langs->trans("TextTitleColor") . '</td>';
        print '<td colspan="' . ($colspan - 1) . '">';
        if ($edit) {
            print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLENOTAB, array()), ''), 'THEME_ELDY_TEXTTITLENOTAB', 'formcolor', 1) . ' ';
        } else {
            print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans("Default"));
        }
        print ' &nbsp; (' . $langs->trans("Default") . ': <strong>3c3c14</strong>, ' . $langs->trans("NotSupportedByAllThemes") . ', ' . $langs->trans("PressF5AfterChangingThis") . ')';
        print '</td>';
        print '</tr>';
    }
    // Use Hover
    $var = !$var;
    if ($foruserprofile) {
        /* Must first change option to choose color of highlight instead of yes or no.
           print '<tr '.$bc[$var].'>';
           print '<td>'.$langs->trans("HighlightLinesOnMouseHover").'</td>';
           print '<td><input '.$bc[$var].' name="check_THEME_ELDY_USE_HOVER" disabled="disabled" type="checkbox" '.($conf->global->THEME_ELDY_USE_HOVER?" checked":"").'></td>';
           print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($selected_theme?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
           print '<td><input '.$bc[$var].' name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled="disabled"').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
           print ' &nbsp; ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
           print '</td>';
           print '</tr>';
           */
    } else {
        print '<tr ' . $bc[$var] . '>';
        print '<td>' . $langs->trans("HighlightLinesColor") . '</td>';
        print '<td colspan="' . ($colspan - 1) . '">';
        //print '<input '.$bc[$var].' name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
        //print ' &nbsp; ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
        if ($edit) {
            if ($conf->global->THEME_ELDY_USE_HOVER == '1') {
                $color = 'edf4fb';
            } else {
                $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER, array()), '');
            }
            print $formother->selectColor($color, 'THEME_ELDY_USE_HOVER', 'formcolor', 1) . ' ';
        } else {
            if ($conf->global->THEME_ELDY_USE_HOVER == '1') {
                $color = 'edf4fb';
            } else {
                $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER, array()), '');
            }
            if ($color) {
                if ($color != 'edf4fb') {
                    print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #' . $color . '" value="' . $color . '">';
                } else {
                    print $langs->trans("Default");
                }
            } else {
                print $langs->trans("None");
            }
        }
        print ' &nbsp; (' . $langs->trans("Default") . ': <strong>edf4fb</strong>, ' . $langs->trans("NotSupportedByAllThemes") . ', ' . $langs->trans("PressF5AfterChangingThis") . ')';
        print '</td>';
        print '</tr>';
    }
    // TopMenuBackgroundColor
    if ($foruserprofile) {
        /*$var=!$var;
            print '<tr '.$bc[$var].'>';
            print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
               print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).'</td>';
               print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_THEME_ELDY_TOPMENU_BACK1" id="check_THEME_ELDY_TOPMENU_BACK1" type="checkbox" '.(! empty($object->conf->THEME_ELDY_TOPMENU_BACK1)?" checked":"");
               print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"';	// Disabled for demo
               print '> '.$langs->trans("UsePersonalValue").'</td>';
               print '<td>';
            if ($edit)
            {
        		print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','formcolor',1).' ';
            }
           	else
           	{
           		$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),'');
        		if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
        		else print '';
           	}
           	if ($edit) print '<br>('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
            print '</td>';*/
    } else {
        $var = !$var;
        print '<tr ' . $bc[$var] . '>';
        print '<td>' . $langs->trans("LinkColor") . '</td>';
        print '<td colspan="' . ($colspan - 1) . '">';
        if ($edit) {
            print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK, array()), ''), 'THEME_ELDY_TEXTLINK', 'formcolor', 1) . ' ';
        } else {
            $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK, array()), '');
            if ($color) {
                print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #' . $color . '" value="' . $color . '">';
            } else {
                print $langs->trans("Default");
            }
        }
        print ' &nbsp; (' . $langs->trans("Default") . ': <strong>000078</strong>, ' . $langs->trans("NotSupportedByAllThemes") . ', ' . $langs->trans("PressF5AfterChangingThis") . ')';
        print '</td>';
    }
    print '</table>';
}
示例#10
0
文件: list.php 项目: ADDAdev/Dolibarr
    $search_sale = '';
    $search_ref = '';
    $search_refcustomer = '';
    $search_societe = '';
    $search_montant_ht = '';
    $search_montant_ttc = '';
    $search_status = '';
    $year = '';
    $month = '';
}
/*
 * View
 */
llxHeader('', $langs->trans('Bill'), 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes');
$form = new Form($db);
$formother = new FormOther($db);
$formfile = new FormFile($db);
$bankaccountstatic = new Account($db);
$facturestatic = new Facture($db);
if (!$sall) {
    $sql = 'SELECT';
} else {
    $sql = 'SELECT DISTINCT';
}
$sql .= ' f.rowid as facid, f.facnumber, f.ref_client, f.type, f.note_private, f.increment, f.total as total_ht, f.tva as total_tva, f.total_ttc,';
$sql .= ' f.datef as df, f.date_lim_reglement as datelimite,';
$sql .= ' f.paye as paye, f.fk_statut,';
$sql .= ' s.nom as name, s.rowid as socid, s.code_client, s.client ';
if (!$sall) {
    $sql .= ', SUM(pf.amount) as am';
}
    if ($object->delete($object->id)) {
        $url = !empty($urlfrom) ? $urlfrom : 'liste.php';
        header("Location: " . $url);
        exit;
    }
}
if (!empty($_POST["cancel"])) {
    $action = '';
}
/*
 * View
 */
$help_url = 'EN:Module_EMailing|FR:Module_Mailing|ES:M&oacute;dulo_Mailing';
llxHeader('', $langs->trans("Mailing"), $help_url);
$form = new Form($db);
$htmlother = new FormOther($db);
if ($action == 'create') {
    // EMailing in creation mode
    print '<form name="new_mailing" action="' . $_SERVER['PHP_SELF'] . '" method="POST">' . "\n";
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="add">';
    print_fiche_titre($langs->trans("NewMailing"));
    dol_htmloutput_mesg($mesg);
    print '<table class="border" width="100%">';
    print '<tr><td width="25%" class="fieldrequired">' . $langs->trans("MailTitle") . '</td><td><input class="flat" name="titre" size="40" value="' . $_POST['titre'] . '"></td></tr>';
    print '<tr><td width="25%" class="fieldrequired">' . $langs->trans("MailFrom") . '</td><td><input class="flat" name="from" size="40" value="' . $conf->global->MAILING_EMAIL_FROM . '"></td></tr>';
    print '<tr><td width="25%">' . $langs->trans("MailErrorsTo") . '</td><td><input class="flat" name="errorsto" size="40" value="' . (!empty($conf->global->MAILING_EMAIL_ERRORSTO) ? $conf->global->MAILING_EMAIL_ERRORSTO : $conf->global->MAIN_MAIL_ERRORS_TO) . '"></td></tr>';
    // Other attributes
    $parameters = array();
    $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);
    // Note that $action and $object may have been modified by hook
示例#12
0
    {
        Header ('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
        exit;
    }
}



/*
 * View
 */

llxHeader('',$langs->trans('Bill'),'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes');

$html = new Form($db);
$htmlother = new FormOther($db);
$formfile = new FormFile($db);
$now=dol_now();


/*********************************************************************
 *
 * Mode creation
 *
 **********************************************************************/
if ($action == 'create')
{
    $facturestatic=new Facture($db);

    print_fiche_titre($langs->trans('NewBill'));
示例#13
0
$tableparams['search_categ'] = $selected_cat;
$tableparams['subcat'] = $subcat === true ? 'yes' : '';
// Adding common parameters
$allparams = array_merge($commonparams, $headerparams, $tableparams);
$headerparams = array_merge($commonparams, $headerparams);
$tableparams = array_merge($commonparams, $tableparams);
foreach ($allparams as $key => $value) {
    $paramslink .= '&' . $key . '=' . $value;
}
/*
 * View
 */
llxHeader();
$form = new Form($db);
$thirdparty_static = new Societe($db);
$formother = new FormOther($db);
// Show report header
if ($modecompta == "CREANCES-DETTES") {
    $nom = $langs->trans("SalesTurnover") . ', ' . $langs->trans("ByThirdParties");
    $calcmode = $langs->trans("CalcModeDebt");
    $calcmode .= '<br>(' . $langs->trans("SeeReportInInputOutputMode", '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . $year . '&modecompta=RECETTES-DEPENSES">', '</a>') . ')';
    $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
    //$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
    $description = $langs->trans("RulesCADue");
    if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
        $description .= $langs->trans("DepositsAreNotIncluded");
    } else {
        $description .= $langs->trans("DepositsAreIncluded");
    }
    $builddate = time();
    //$exportlink=$langs->trans("NotYetAvailable");
示例#14
0
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) {
    $search_name = "";
    $search_contract = "";
    $search_ref_supplier = "";
    $search_sale = "";
    $sall = "";
    $search_status = "";
}
if ($search_status == '') {
    $search_status = 1;
}
/*
 * View
 */
$now = dol_now();
$formother = new FormOther($db);
$socstatic = new Societe($db);
llxHeader();
$sql = 'SELECT';
$sql .= " c.rowid as cid, c.ref, c.datec, c.date_contrat, c.statut, c.ref_supplier,";
$sql .= " s.nom as name, s.rowid as socid,";
$sql .= ' SUM(' . $db->ifsql("cd.statut=0", 1, 0) . ') as nb_initial,';
$sql .= ' SUM(' . $db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NULL OR cd.date_fin_validite >= '" . $db->idate($now) . "')", 1, 0) . ') as nb_running,';
$sql .= ' SUM(' . $db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AND cd.date_fin_validite < '" . $db->idate($now) . "')", 1, 0) . ') as nb_expired,';
$sql .= ' SUM(' . $db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AND cd.date_fin_validite < '" . $db->idate($now - $conf->contrat->services->expires->warning_delay) . "')", 1, 0) . ') as nb_late,';
$sql .= ' SUM(' . $db->ifsql("cd.statut=5", 1, 0) . ') as nb_closed';
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
if ($search_sale > 0 || !$user->rights->societe->client->voir && !$socid) {
    $sql .= ", " . MAIN_DB_PREFIX . "societe_commerciaux as sc";
}
$sql .= ", " . MAIN_DB_PREFIX . "contrat as c";
示例#15
0
                $object->fetch($id);
                $result = $object->setDeliveryAddress($_POST['fk_address']);
                if ($result < 0) {
                    dol_print_error($db, $object->error);
                }
            }
        }
    }
}
/*
 * View
 */
llxHeader('', $langs->trans("Proposal"), "Propal");
$form = new Form($db);
$formcompany = new FormCompany($db);
$formother = new FormOther($db);
/* *************************************************************************** */
/*                                                                             */
/* Mode vue et edition                                                         */
/*                                                                             */
/* *************************************************************************** */
dol_htmloutput_mesg($mesg);
if ($id > 0 || !empty($ref)) {
    if ($object->fetch($id, $ref) > 0) {
        $soc = new Societe($db);
        $soc->fetch($object->socid);
        $head = propal_prepare_head($object);
        dol_fiche_head($head, 'contact', $langs->trans("Proposal"), 0, 'propal');
        /*
         * Propal synthese pour rappel
         */
示例#16
0
    $catid = "";
    $search_company = "";
    $search_zipcode = "";
    $search_town = "";
    $search_code = '';
    $search_compta = '';
    $search_status = '';
}
if ($search_status == '') {
    $search_status = 1;
}
// always display activ customer first
/*
 * view
 */
$formother = new FormOther($db);
$form = new Form($db);
$thirdpartystatic = new Societe($db);
$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
llxHeader('', $langs->trans("ThirdParty"), $help_url);
$sql = "SELECT s.rowid, s.nom as name, s.name_alias, s.client, s.zip, s.town, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,";
$sql .= " s.datec, s.canvas";
if (!$user->rights->societe->client->voir && !$socid || $search_sale > 0) {
    $sql .= ", sc.fk_soc, sc.fk_user";
}
// We need these fields in order to filter by sale (including the case where the user can only see his prospects)
// Add fields for extrafields
foreach ($extrafields->attribute_list as $key => $val) {
    $sql .= ",ef." . $key . ' as options_' . $key;
}
// Add fields from hooks
示例#17
0
            header("Location: " . $backtopage);
            exit;
        } else {
            if (empty($id)) {
                // We go back on task list
                header("Location: " . DOL_URL_ROOT . '/projet/tasks/index.php' . (empty($mode) ? '' : '?mode=' . $mode));
                exit;
            }
        }
    }
}
/*
 * View
 */
$form = new Form($db);
$formother = new FormOther($db);
$taskstatic = new Task($db);
$userstatic = new User($db);
$help_url = "EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos";
llxHeader("", $langs->trans("Tasks"), $help_url);
if ($id > 0 || !empty($ref)) {
    $object->fetch($id, $ref);
    $object->fetch_thirdparty();
    $res = $object->fetch_optionals($object->id, $extralabels_projet);
    // To verify role of users
    //$userAccess = $object->restrictedProjectArea($user,'read');
    $userWrite = $object->restrictedProjectArea($user, 'write');
    //$userDelete = $object->restrictedProjectArea($user,'delete');
    //print "userAccess=".$userAccess." userWrite=".$userWrite." userDelete=".$userDelete;
    $tab = GETPOST('tab') ? GETPOST('tab') : 'tasks';
    $head = project_prepare_head($object);
示例#18
0
}
/*
 * Actions
 */
$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);
// Note that $action and $object may have been modified by some hook
if ($reshook < 0) {
    setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
}
/*
 * View
 */
$now = dol_now();
$form = new Form($db);
$formother = new FormOther($db);
$formfile = new FormFile($db);
$companystatic = new Societe($db);
$help_url = "EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes";
llxHeader('', $langs->trans("Orders"), $help_url);
$sql = 'SELECT';
if ($sall || $search_product_category > 0) {
    $sql = 'SELECT DISTINCT';
}
$sql .= ' s.nom as name, s.rowid as socid, s.client, s.code_client, c.rowid, c.ref, c.total_ht, c.tva as total_tva, c.total_ttc, c.ref_client,';
$sql .= ' c.date_valid, c.date_commande, c.note_private, c.date_livraison as date_delivery, c.fk_statut, c.facture as billed';
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'societe as s';
$sql .= ', ' . MAIN_DB_PREFIX . 'commande as c';
if ($sall || $search_product_category > 0) {
    $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'commandedet as pd ON c.rowid=pd.fk_commande';
}
示例#19
0
文件: task.php 项目: ADDAdev/Dolibarr
        $upload_dir = $conf->projet->dir_output;
        $file = $upload_dir . '/' . GETPOST('file');
        $ret = dol_delete_file($file);
        if ($ret) {
            setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
        } else {
            setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
        }
    }
}
/*
 * View
*/
llxHeader('', $langs->trans("Task"));
$form = new Form($db);
$formother = new FormOther($db);
$formfile = new FormFile($db);
if ($id > 0 || !empty($ref)) {
    if ($object->fetch($id, $ref) > 0) {
        $res = $object->fetch_optionals($object->id, $extralabels);
        $result = $projectstatic->fetch($object->fk_project);
        if (!empty($projectstatic->socid)) {
            $projectstatic->fetch_thirdparty();
        }
        $object->project = dol_clone($projectstatic);
        $userWrite = $projectstatic->restrictedProjectArea($user, 'write');
        if (!empty($withproject)) {
            // Tabs for project
            $tab = 'tasks';
            $head = project_prepare_head($projectstatic);
            dol_fiche_head($head, $tab, $langs->trans("Project"), 0, $projectstatic->public ? 'projectpub' : 'project');
示例#20
0
文件: list.php 项目: Albertopf/prueba
    $type = "";
    $search_email = "";
    $search_categ = "";
    $catid = "";
    $sall = "";
}
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('memberlist'));
$extrafields = new ExtraFields($db);
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array('d.rowid' => 'Ref', 'd.lastname' => 'Lastname', 'd.firstname' => 'Firstname', 'd.societe' => "Company", 'd.email' => 'EMail', 'd.address' => 'Address', 'd.zip' => 'Zip', 'd.town' => 'Town', 'd.note_public' => 'NotePublic', 'd.note_private' => 'NotePrivate');
/*
 * View
 */
$form = new Form($db);
$formother = new FormOther($db);
$membertypestatic = new AdherentType($db);
$memberstatic = new Adherent($db);
llxHeader('', $langs->trans("Member"), 'EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_Miembros');
$now = dol_now();
$sql = "SELECT d.rowid, d.login, d.lastname, d.firstname, d.societe as company, d.fk_soc,";
$sql .= " d.datefin,";
$sql .= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
$sql .= " t.libelle as type, t.cotisation";
// Add fields for extrafields
foreach ($extrafields->attribute_list as $key => $val) {
    $sql .= ",ef." . $key . ' as options_' . $key;
}
// Add fields from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters);
} else {
    $holiday_payes = $holiday->fetchAll($order, $filter);
}
// Si erreur SQL
if ($holiday_payes == '-1') {
    print_fiche_titre($langs->trans('CPTitreMenu'));
    dol_print_error($db, $langs->trans('Error') . ' ' . $holiday->error);
    exit;
}
/*************************************
 * Affichage du tableau des congés payés
*************************************/
$var = true;
$num = count($holiday->holiday);
$form = new Form($db);
$formother = new FormOther($db);
if ($id > 0) {
    $head = user_prepare_head($fuser);
    $title = $langs->trans("User");
    dol_fiche_head($head, 'paidholidays', $title, 0, 'user');
    print '<table class="border" width="100%">';
    // Ref
    print '<tr><td width="25%" valign="top">' . $langs->trans("Ref") . '</td>';
    print '<td colspan="2">';
    print $form->showrefnav($fuser, 'id', '', $user->rights->user->user->lire || $user->admin);
    print '</td>';
    print '</tr>';
    // LastName
    print '<tr><td width="25%" valign="top">' . $langs->trans("LastName") . '</td>';
    print '<td colspan="2">' . $fuser->lastname . '</td>';
    print "</tr>\n";
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/holiday/common.inc.php';
// Protection if external user
if ($user->societe_id > 0) {
    accessforbidden();
}
// Si l'utilisateur n'a pas le droit de lire cette page
if (!$user->rights->holiday->month_report) {
    accessforbidden();
}
/*
 * View
 */
$html = new Form($db);
$htmlother = new FormOther($db);
$holidaystatic = new Holiday($db);
llxHeader(array(), $langs->trans('CPTitreMenu'));
$cp = new Holiday($db);
$month = GETPOST('month_start');
$year = GETPOST('year_start');
if (empty($month)) {
    $month = date('n');
}
if (empty($year)) {
    $year = date('Y');
}
$sql = "SELECT cp.rowid, cp.fk_user, cp.date_debut, cp.date_fin, cp.halfday";
$sql .= " FROM " . MAIN_DB_PREFIX . "holiday cp";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "user u ON cp.fk_user = u.rowid";
$sql .= " WHERE cp.statut = 3";
示例#23
0
    $page = 0;
}
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
$limit = $conf->liste_limit;
if (!$sortorder) {
    $sortorder = "DESC";
}
if (!$sortfield) {
    $sortfield = "dp";
}
$year = GETPOST("year");
$month = GETPOST("month");
$form = new Form($db);
$formother = new FormOther($db);
$checkdepositstatic = new RemiseCheque($db);
$accountstatic = new Account($db);
// If click on purge search criteria ?
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) {
    $search_ref = '';
    $search_amount = '';
    $search_account = '';
    $year = '';
    $month = '';
}
/*
 * View
 */
llxHeader('', $langs->trans("ChequesReceipts"));
$sql = "SELECT bc.rowid, bc.number as ref, bc.date_bordereau as dp,";
示例#24
0
$entitytolang = array('user' => 'User', 'company' => 'Company', 'contact' => 'Contact', 'invoice' => 'Bill', 'invoice_line' => 'InvoiceLine', 'order' => 'Order', 'order_line' => 'OrderLine', 'propal' => 'Proposal', 'propal_line' => 'ProposalLine', 'intervention' => 'Intervention', 'inter_line' => 'InterLine', 'member' => 'Member', 'member_type' => 'MemberType', 'subscription' => 'Subscription', 'tax' => 'SocialContribution', 'tax_type' => 'DictionarySocialContributions', 'account' => 'BankTransactions', 'payment' => 'Payment', 'product' => 'Product', 'service' => 'Service', 'stock' => 'Stock', 'batch' => 'Batch', 'warehouse' => 'Warehouse', 'category' => 'Category', 'other' => 'Other', 'trip' => 'TripsAndExpenses', 'shipment' => 'Shipments', 'shipment_line' => 'ShipmentLine', 'project' => 'Projects', 'projecttask' => 'Tasks', 'task_time' => 'TaskTimeSpent', 'action' => 'Event', 'expensereport' => 'ExpenseReport', 'expensereport_line' => 'ExpenseReportLine', 'contract' => 'Contract', 'contract_line' => 'ContractLine');
$array_selected = isset($_SESSION["export_selected_fields"]) ? $_SESSION["export_selected_fields"] : array();
$array_filtervalue = isset($_SESSION["export_filtered_fields"]) ? $_SESSION["export_filtered_fields"] : array();
$datatoexport = GETPOST("datatoexport");
$action = GETPOST('action', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$step = GETPOST("step") ? GETPOST("step") : 1;
$export_name = GETPOST("export_name");
$hexa = GETPOST("hexa");
$exportmodelid = GETPOST("exportmodelid");
$field = GETPOST("field");
$objexport = new Export($db);
$objexport->load_arrays($user, $datatoexport);
$objmodelexport = new ModeleExports($db);
$form = new Form($db);
$htmlother = new FormOther($db);
$formfile = new FormFile($db);
$sqlusedforexport = '';
$upload_dir = $conf->export->dir_temp . '/' . $user->id;
//$usefilters=($conf->global->MAIN_FEATURES_LEVEL > 1);
$usefilters = 1;
/*
 * Actions
 */
if ($action == 'selectfield') {
    $fieldsarray = $objexport->array_export_fields[0];
    $fieldsentitiesarray = $objexport->array_export_entities[0];
    $fieldsdependenciesarray = $objexport->array_export_dependencies[0];
    if ($field == 'all') {
        foreach ($fieldsarray as $key => $val) {
            if (!empty($array_selected[$key])) {
示例#25
0
                header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
                exit;
            } else {
                dol_print_error($db);
            }
        }
        if ($error) {
            $action = 'edit_extras';
        }
    }
}
/*
 * View
 */
$form = new Form($db);
$formother = new FormOther($db);
$formfile = new FormFile($db);
$formmargin = new FormMargin($db);
$bankaccountstatic = new Account($db);
if (!empty($conf->projet->enabled)) {
    $formproject = new FormProjets($db);
}
$now = dol_now();
llxHeader('', $langs->trans('Bill'), 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes');
/**
 * *******************************************************************
 *
 * Mode creation
 *
 * ********************************************************************
 */
示例#26
0
文件: list.php 项目: ADDAdev/Dolibarr
    $search = "";
    $search_ref = "";
    $search_lastname = "";
    $search_firstname = "";
    $search_login = "";
    $type = "";
    $search_email = "";
    $search_categ = "";
    $catid = "";
    $sall = "";
}
/*
 * View
 */
$form = new Form($db);
$formother = new FormOther($db);
$membertypestatic = new AdherentType($db);
$memberstatic = new Adherent($db);
llxHeader('', $langs->trans("Member"), 'EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_Miembros');
$now = dol_now();
$sql = "SELECT d.rowid, d.login, d.lastname, d.firstname, d.societe as company, d.fk_soc,";
$sql .= " d.datefin,";
$sql .= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
$sql .= " t.libelle as type, t.cotisation";
$sql .= " FROM " . MAIN_DB_PREFIX . "adherent as d";
if (!empty($search_categ) || !empty($catid)) {
    $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . "categorie_member as cm ON d.rowid = cm.fk_member";
}
// We need this table joined to the select in order to filter by categ
$sql .= ", " . MAIN_DB_PREFIX . "adherent_type as t";
$sql .= " WHERE d.fk_adherent_type = t.rowid ";
示例#27
0
$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;
if (!$sortfield) {
    $sortfield = 'p.datep';
示例#28
0
    if (!$error) {
        $db->commit();
        setEventMessage($langs->trans("SetupSaved"));
    } else {
        $db->rollback();
        if (empty($errorsaved)) {
            setEventMessage($langs->trans("Error"), 'errors');
        }
    }
}
/*
 * View
 */
$form = new Form($db);
$formadmin = new FormAdmin($db);
$formother = new FormOther($db);
$arrayofjs = array();
$arrayofcss = array();
llxHeader('', $langs->trans("UserSetup"), '', '', 0, 0, $arrayofjs, $arrayofcss);
print '<form name="extsitesconfig" action="' . $_SERVER["PHP_SELF"] . '" method="post">';
print '<input type="hidden" name="id" value="' . $id . '">';
$head = user_prepare_head($fuser);
dol_fiche_head($head, 'extsites', $langs->trans("User"), 0, 'user');
print $langs->trans("AgendaExtSitesDesc") . "<br>\n";
print "<br>\n";
$selectedvalue = $conf->global->AGENDA_DISABLE_EXT;
if ($selectedvalue == 1) {
    $selectedvalue = 0;
} else {
    $selectedvalue = 1;
}
示例#29
0
文件: list.php 项目: Albertopf/prueba
    $sall = "";
    $sref = "";
    $snom = "";
    $sbarcode = "";
    $search_categ = 0;
    $tosell = "";
    $tobuy = "";
    $search_tobatch = '';
    $search_accountancy_code_sell = '';
    $search_accountancy_code_buy = '';
    $search_array_options = array();
}
/*
 * View
 */
$htmlother = new FormOther($db);
$form = new Form($db);
if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
    $objcanvas->assign_values($action);
    // This must contains code to load data (must call LoadListDatas($limit, $offset, $sortfield, $sortorder))
    $objcanvas->display_canvas($action);
    // This is code to show template
} else {
    $title = $langs->trans("ProductsAndServices");
    if (isset($type)) {
        if ($type == 1) {
            $texte = $langs->trans("Services");
        } else {
            $texte = $langs->trans("Products");
        }
    } else {
示例#30
0
            }
        } 
        else 
        {
            setEventMessages($ldap->error, $ldap->errors, 'errors');
        }
    }
}


/*
 * View
 */

$form = new Form($db);
$formother=new FormOther($db);
$formcompany = new FormCompany($db);

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

if (($action == 'create') || ($action == 'adduserldap'))
{
    /* ************************************************************************** */
    /*                                                                            */
    /* Affichage fiche en mode creation                                           */
    /*                                                                            */
    /* ************************************************************************** */

    print load_fiche_titre($langs->trans("NewUser"));

    print $langs->trans("CreateInternalUserDesc")."<br>\n";