30 if (!$res && !empty($_SERVER[
"CONTEXT_DOCUMENT_ROOT"])) {
31 $res = @include $_SERVER[
"CONTEXT_DOCUMENT_ROOT"].
"/main.inc.php";
34 $tmp = empty($_SERVER[
'SCRIPT_FILENAME']) ?
'' : $_SERVER[
'SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
35 while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) {
39 if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1)).
"/main.inc.php")) {
40 $res = @include substr($tmp, 0, ($i + 1)).
"/main.inc.php";
42 if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1))).
"/main.inc.php")) {
43 $res = @include dirname(substr($tmp, 0, ($i + 1))).
"/main.inc.php";
46 if (!$res && file_exists(
"../main.inc.php")) {
47 $res = @include
"../main.inc.php";
49 if (!$res && file_exists(
"../../main.inc.php")) {
50 $res = @include
"../../main.inc.php";
52 if (!$res && file_exists(
"../../../main.inc.php")) {
53 $res = @include
"../../../main.inc.php";
56 die(
"Include of main fails");
59 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
62 $langs->loadLangs(array(
"mymodule@mymodule"));
64 $action =
GETPOST(
'action',
'aZ09');
70 $socid =
GETPOST(
'socid',
'int');
71 if (isset($user->socid) && $user->socid > 0) {
73 $socid = $user->socid;
102 $form =
new Form($db);
105 llxHeader(
"", $langs->trans(
"MyModuleArea"),
'',
'', 0, 0,
'',
'',
'',
'mod-mymodule page-index');
107 print
load_fiche_titre($langs->trans(
"MyModuleArea"),
'',
'mymodule.png@mymodule');
109 print
'<div class="fichecenter"><div class="fichethirdleft">';
184 print
'</div><div class="fichetwothirdright">';
239 print
'</div></div>';
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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.