32if (!$res && !empty($_SERVER[
"CONTEXT_DOCUMENT_ROOT"])) {
33 $res = @include $_SERVER[
"CONTEXT_DOCUMENT_ROOT"].
"/main.inc.php";
36$tmp = empty($_SERVER[
'SCRIPT_FILENAME']) ?
'' : $_SERVER[
'SCRIPT_FILENAME'];
37$tmp2 = realpath(__FILE__);
39$j = strlen($tmp2) - 1;
40while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) {
44if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1)).
"/main.inc.php")) {
45 $res = @include substr($tmp, 0, ($i + 1)).
"/main.inc.php";
47if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1))).
"/main.inc.php")) {
48 $res = @include dirname(substr($tmp, 0, ($i + 1))).
"/main.inc.php";
51if (!$res && file_exists(
"../main.inc.php")) {
52 $res = @include
"../main.inc.php";
54if (!$res && file_exists(
"../../main.inc.php")) {
55 $res = @include
"../../main.inc.php";
57if (!$res && file_exists(
"../../../main.inc.php")) {
58 $res = @include
"../../../main.inc.php";
61 die(
"Include of main fails");
64require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
75$langs->loadLangs(array(
"mymodule@mymodule"));
77$action =
GETPOST(
'action',
'aZ09');
84if (!empty($user->socid) && $user->socid > 0) {
86 $socid = $user->socid;
118$form =
new Form($db);
121llxHeader(
"", $langs->trans(
"MyModuleArea"),
'',
'', 0, 0,
'',
'',
'',
'mod-mymodule page-index');
123print
load_fiche_titre($langs->trans(
"MyModuleArea"),
'',
'mymodule.png@mymodule');
125print
'<div class="fichecenter"><div class="fichethirdleft">';
200print
'</div><div class="fichetwothirdright">';
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.