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]) {
38 if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1)).
"/main.inc.php")) {
39 $res = @include substr($tmp, 0, ($i + 1)).
"/main.inc.php";
41 if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1))).
"/main.inc.php")) {
42 $res = @include dirname(substr($tmp, 0, ($i + 1))).
"/main.inc.php";
45 if (!$res && file_exists(
"../main.inc.php")) {
46 $res = @include
"../main.inc.php";
48 if (!$res && file_exists(
"../../main.inc.php")) {
49 $res = @include
"../../main.inc.php";
51 if (!$res && file_exists(
"../../../main.inc.php")) {
52 $res = @include
"../../../main.inc.php";
55 die(
"Include of main fails");
58 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
61 $langs->loadLangs(array(
"mymodule@mymodule"));
63 $action =
GETPOST(
'action',
'aZ09');
69 $socid =
GETPOST(
'socid',
'int');
70 if (isset($user->socid) && $user->socid > 0) {
72 $socid = $user->socid;
104 llxHeader(
"", $langs->trans(
"MyModuleArea"));
106 print
load_fiche_titre($langs->trans(
"MyModuleArea"),
'',
'mymodule.png@mymodule');
108 print
'<div class="fichecenter"><div class="fichethirdleft">';
186 print
'</div><div class="fichetwothirdright">';
189 $NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
190 $max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
247 print
'</div></div>';
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_now($mode='auto')
Return date for now.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.