30 if (!$res && !empty(
$_SERVER[
"CONTEXT_DOCUMENT_ROOT"])) $res = @include
$_SERVER[
"CONTEXT_DOCUMENT_ROOT"].
"/main.inc.php";
32 $tmp = empty(
$_SERVER[
'SCRIPT_FILENAME']) ?
'' :
$_SERVER[
'SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
33 while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; }
34 if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1)).
"/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1)).
"/main.inc.php";
35 if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1))).
"/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1))).
"/main.inc.php";
37 if (!$res && file_exists(
"../main.inc.php")) $res = @include
"../main.inc.php";
38 if (!$res && file_exists(
"../../main.inc.php")) $res = @include
"../../main.inc.php";
39 if (!$res && file_exists(
"../../../main.inc.php")) $res = @include
"../../../main.inc.php";
40 if (!$res) die(
"Include of main fails");
42 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
45 $langs->loadLangs(array(
"mymodule@mymodule"));
47 $action =
GETPOST(
'action',
'aZ09');
52 $socid =
GETPOST(
'socid',
'int');
53 if (isset($user->socid) && $user->socid > 0)
56 $socid = $user->socid;
74 $form =
new Form($db);
77 llxHeader(
"", $langs->trans(
"MyModuleArea"));
81 print '<div class="fichecenter"><div class="fichethirdleft">';
159 print
'</div><div class="fichetwothirdright"><div class="ficheaddleft">';
162 $NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
163 $max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
220 print
'</div></div></div>';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_now($mode= 'auto')
Return date for now.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
print $_SERVER["PHP_SELF"]
Edit parameters.
print
Draft customers invoices.