diff --git a/build/doxygen/hudson-doxygen.doxyfile b/build/doxygen/hudson-doxygen.doxyfile index 1a868d74ad0..0adf26b0c71 100644 --- a/build/doxygen/hudson-doxygen.doxyfile +++ b/build/doxygen/hudson-doxygen.doxyfile @@ -105,7 +105,7 @@ INLINE_INHERITED_MEMB = NO # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. -FULL_PATH_NAMES = YES +FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is @@ -114,7 +114,7 @@ FULL_PATH_NAMES = YES # If left blank the directory from which doxygen is run is used as the # path to strip. -STRIP_FROM_PATH = "/var/lib/hudson/jobs/dolibarr-develop/workspace" +STRIP_FROM_PATH = "" # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 22498881a48..b42448ca39a 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -40,7 +40,7 @@ accessforbidden(); $typeconst=array('yesno','texte','chaine'); -$action = getpost("action"); +$action = GETPOST("action"); // Action mise a jour ou ajout d'une constante @@ -48,7 +48,7 @@ if ($action == 'update' || $action == 'add') { $const=GETPOST("constname"); $value=GETPOST("constvalue"); - + if (($const=='ADHERENT_CARD_TYPE' || $const=='ADHERENT_ETIQUETTE_TYPE') && $value == -1) $value=''; if ($const=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice @@ -62,7 +62,7 @@ if ($action == 'update' || $action == 'add') $type=$_POST["consttype"]; $constnote=GETPOST("constnote"); $res=dolibarr_set_const($db,$const,$value,$typeconst[$type],0,$constnote,$conf->entity); - + if (! $res > 0) $error++; if (! $error) diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index 0d54b3af304..909a7978024 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -28,24 +28,24 @@ require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); $langs->load("admin"); -if (!$user->admin) - accessforbidden(); +if (!$user->admin) accessforbidden(); + +$action = GETPOST("action"); -$action = getpost("action"); /* * Actions */ if ($action == 'setvalue' && $user->admin) { - $result=dolibarr_set_const($db, "CLICKTODIAL_URL",GETPOST("url"),'chaine',0,'',$conf->entity); - if ($result >= 0) - { - $mesg = "".$langs->trans("SetupSaved").""; - } - else - { - $mesg = "".$langs->trans("Error").""; + $result=dolibarr_set_const($db, "CLICKTODIAL_URL",GETPOST("url"),'chaine',0,'',$conf->entity); + if ($result >= 0) + { + $mesg = "".$langs->trans("SetupSaved").""; + } + else + { + $mesg = "".$langs->trans("Error").""; } } @@ -87,11 +87,11 @@ print '
trans("Test"); + // Add a phone number to test + } + */ dol_htmloutput_mesg($mesg); diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index c8aa6b60388..4d23e5bb371 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -28,8 +28,7 @@ require_once(DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'); $langs->load("admin"); $langs->load("errors"); -if (!$user->admin) -accessforbidden(); +if (!$user->admin) accessforbidden(); $action = GETPOST("action"); $value = GETPOST("value"); @@ -46,13 +45,13 @@ if (empty($conf->global->CONTRACT_ADDON)) if ($action == 'updateMask') { - $maskconst=$_POST['maskconstcontract']; - $maskvalue=$_POST['maskcontract']; - if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity); - - if (! $res > 0) $error++; + $maskconst=$_POST['maskconstcontract']; + $maskvalue=$_POST['maskcontract']; + if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity); - if (! $error) + if (! $res > 0) $error++; + + if (! $error) { $mesg = "".$langs->trans("SetupSaved").""; } @@ -64,16 +63,16 @@ if ($action == 'updateMask') if ($action == 'setmod') { - dolibarr_set_const($db, "CONTRACT_ADDON",$value,'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "CONTRACT_ADDON",$value,'chaine',0,'',$conf->entity); } /* -// constants of magre model -if ($action == 'updateMatrice') dolibarr_set_const($db, "CONTRACT_NUM_MATRICE",$_POST["matrice"],'chaine',0,'',$conf->entity); -if ($action == 'updatePrefix') dolibarr_set_const($db, "CONTRACT_NUM_PREFIX",$_POST["prefix"],'chaine',0,'',$conf->entity); -if ($action == 'setOffset') dolibarr_set_const($db, "CONTRACT_NUM_DELTA",$_POST["offset"],'chaine',0,'',$conf->entity); -if ($action == 'setNumRestart') dolibarr_set_const($db, "CONTRACT_NUM_RESTART_BEGIN_YEAR",$_POST["numrestart"],'chaine',0,'',$conf->entity); -*/ + // constants of magre model + if ($action == 'updateMatrice') dolibarr_set_const($db, "CONTRACT_NUM_MATRICE",$_POST["matrice"],'chaine',0,'',$conf->entity); + if ($action == 'updatePrefix') dolibarr_set_const($db, "CONTRACT_NUM_PREFIX",$_POST["prefix"],'chaine',0,'',$conf->entity); + if ($action == 'setOffset') dolibarr_set_const($db, "CONTRACT_NUM_DELTA",$_POST["offset"],'chaine',0,'',$conf->entity); + if ($action == 'setNumRestart') dolibarr_set_const($db, "CONTRACT_NUM_RESTART_BEGIN_YEAR",$_POST["numrestart"],'chaine',0,'',$conf->entity); + */ /* * View @@ -106,29 +105,29 @@ $dir = "../includes/modules/contract/"; $handle = opendir($dir); if (is_resource($handle)) { - $var=true; + $var=true; - while (($file = readdir($handle))!==false) - { - if (substr($file, 0, 13) == 'mod_contract_' && substr($file, dol_strlen($file)-3, 3) == 'php') - { - $file = substr($file, 0, dol_strlen($file)-4); + while (($file = readdir($handle))!==false) + { + if (substr($file, 0, 13) == 'mod_contract_' && substr($file, dol_strlen($file)-3, 3) == 'php') + { + $file = substr($file, 0, dol_strlen($file)-4); - require_once(DOL_DOCUMENT_ROOT ."/includes/modules/contract/".$file.".php"); + require_once(DOL_DOCUMENT_ROOT ."/includes/modules/contract/".$file.".php"); - $module = new $file; + $module = new $file; - // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + // Show modules according to features level + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; - if ($module->isEnabled()) - { - $var=!$var; - print ''.$module->nom."\n"; - print ''; - print $module->info(); - print ''; + if ($module->isEnabled()) + { + $var=!$var; + print ''.$module->nom."\n"; + print ''; + print $module->info(); + print ''; // Show example of numbering module print ''; @@ -137,49 +136,49 @@ if (is_resource($handle)) else print $tmp; print ''."\n"; - print ''; - if ($conf->global->CONTRACT_ADDON == "$file") - { - print img_picto($langs->trans("Activated"),'switch_on'); - } - else - { - print 'scandir.'&label='.urlencode($module->name).'">'; - print img_picto($langs->trans("Disabled"),'switch_off'); - print ''; - } - print ''; + print ''; + if ($conf->global->CONTRACT_ADDON == "$file") + { + print img_picto($langs->trans("Activated"),'switch_on'); + } + else + { + print 'scandir.'&label='.urlencode($module->name).'">'; + print img_picto($langs->trans("Disabled"),'switch_off'); + print ''; + } + print ''; - $contract=new Contrat($db); - $contract->initAsSpecimen(); + $contract=new Contrat($db); + $contract->initAsSpecimen(); - // Info - $htmltooltip=''; - $htmltooltip.=''.$langs->trans("Version").': '.$module->getVersion().'
'; - $facture->type=0; - $nextval=$module->getNextValue($mysoc,$contract); - if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval - { - $htmltooltip.=''.$langs->trans("NextValue").': '; - if ($nextval) - { - $htmltooltip.=$nextval.'
'; - } - else - { - $htmltooltip.=$langs->trans($module->error).'
'; - } - } + // Info + $htmltooltip=''; + $htmltooltip.=''.$langs->trans("Version").': '.$module->getVersion().'
'; + $facture->type=0; + $nextval=$module->getNextValue($mysoc,$contract); + if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval + { + $htmltooltip.=''.$langs->trans("NextValue").': '; + if ($nextval) + { + $htmltooltip.=$nextval.'
'; + } + else + { + $htmltooltip.=$langs->trans($module->error).'
'; + } + } - print ''; - print $html->textwithpicto('',$htmltooltip,1,0); - print ''; + print ''; + print $html->textwithpicto('',$htmltooltip,1,0); + print ''; - print ''; - } - } - } - closedir($handle); + print ''; + } + } + } + closedir($handle); } print '
'; diff --git a/htdocs/admin/dons.php b/htdocs/admin/dons.php index 51326c51072..8daeb4cb2c2 100644 --- a/htdocs/admin/dons.php +++ b/htdocs/admin/dons.php @@ -27,53 +27,53 @@ require_once(DOL_DOCUMENT_ROOT."/compta/dons/class/don.class.php"); $langs->load("admin"); $langs->load("donations"); -if (!$user->admin) - accessforbidden(); - +if (!$user->admin) accessforbidden(); $typeconst=array('yesno','texte','chaine'); + /* * Action */ + if ($_GET["action"] == 'specimen') { - $modele=$_GET["module"]; + $modele=$_GET["module"]; - $don = new Don($db); - $don->initAsSpecimen(); + $don = new Don($db); + $don->initAsSpecimen(); - // Charge le modele - $dir = DOL_DOCUMENT_ROOT . "/includes/modules/dons/"; - $file = $modele.".modules.php"; - if (file_exists($dir.$file)) - { - $classname = $modele; - require_once($dir.$file); + // Charge le modele + $dir = DOL_DOCUMENT_ROOT . "/includes/modules/dons/"; + $file = $modele.".modules.php"; + if (file_exists($dir.$file)) + { + $classname = $modele; + require_once($dir.$file); - $obj = new $classname($db); + $obj = new $classname($db); - if ($obj->write_file($don,$langs) > 0) - { - header("Location: ".DOL_URL_ROOT."/document.php?modulepart=donation&file=SPECIMEN.html"); - return; - } - else - { - $mesg='
'.$obj->error.'
'; - dol_syslog($obj->error, LOG_ERR); - } - } - else - { - $mesg='
'.$langs->trans("ErrorModuleNotFound").'
'; - dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); - } + if ($obj->write_file($don,$langs) > 0) + { + header("Location: ".DOL_URL_ROOT."/document.php?modulepart=donation&file=SPECIMEN.html"); + return; + } + else + { + $mesg='
'.$obj->error.'
'; + dol_syslog($obj->error, LOG_ERR); + } + } + else + { + $mesg='
'.$langs->trans("ErrorModuleNotFound").'
'; + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + } } if ($_GET["action"] == 'setdoc') { - $db->begin(); + $db->begin(); if (dolibarr_set_const($db, "DON_ADDON_MODEL",$_GET["value"],'chaine',0,'',$conf->entity)) { @@ -94,17 +94,17 @@ if ($_GET["action"] == 'setdoc') $result2=$db->query($sql); if ($result1 && $result2) { - $db->commit(); + $db->commit(); } else { - $db->rollback(); + $db->rollback(); } } if ($_GET["action"] == 'set') { - $type='donation'; + $type='donation'; $sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)"; $sql.= " VALUES ('".$db->escape($_GET["value"])."','".$type."',".$conf->entity.", "; $sql.= ($_GET["label"]?"'".$db->escape($_GET["label"])."'":'null').", "; @@ -148,18 +148,18 @@ $sql.= " WHERE type = '".$type."'"; $resql=$db->query($sql); if ($resql) { - $i = 0; - $num_rows=$db->num_rows($resql); - while ($i < $num_rows) - { - $array = $db->fetch_array($resql); - array_push($def, $array[0]); - $i++; - } + $i = 0; + $num_rows=$db->num_rows($resql); + while ($i < $num_rows) + { + $array = $db->fetch_array($resql); + array_push($def, $array[0]); + $i++; + } } else { - dol_print_error($db); + dol_print_error($db); } print ''; @@ -186,74 +186,74 @@ if (is_resource($handle)) $name = substr($file, 0, dol_strlen($file) -12); $classname = substr($file, 0, dol_strlen($file) -12); - require_once($dir.'/'.$file); - $module=new $classname($db); + require_once($dir.'/'.$file); + $module=new $classname($db); - // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + // Show modules according to features level + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; - if ($module->isEnabled()) - { - print ''; - print ''; + if ($module->isEnabled()) + { + print ''; + print ''; - // Active - if (in_array($name, $def)) - { - print "'; - } - else - { - print ""; - } + // Active + if (in_array($name, $def)) + { + print "'; + } + else + { + print ""; + } - // Defaut - print "'; + // Defaut + print "'; - // Info - $htmltooltip = ''.$langs->trans("Name").': '.$module->name; - $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); + // Info + $htmltooltip = ''.$langs->trans("Name").': '.$module->name; + $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); if ($module->type == 'pdf') { $htmltooltip.='
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; } - $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; - $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); - $htmltooltip.='
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1); - $text=''.img_object($langs->trans("Preview"),'generic').''; - print ''; + $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; + $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); + $htmltooltip.='
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1); + $text=''.img_object($langs->trans("Preview"),'generic').''; + print ''; - print "\n"; - } + print "\n"; + } } } closedir($handle); diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index 0b9e6fca54d..48aff03a4c3 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -30,8 +30,7 @@ require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); $langs->load("admin"); $langs->load("fckeditor"); -if (!$user->admin) - accessforbidden(); +if (!$user->admin) accessforbidden(); // Constante et traduction de la description du module $modules = array( @@ -67,26 +66,25 @@ $picto = array( * Actions */ - foreach($modules as $const => $desc) { - if ($_GET["action"] == 'activate_'.strtolower($const)) - { - dolibarr_set_const($db, "FCKEDITOR_ENABLE_".$const, "1",'chaine',0,'',$conf->entity); - // Si fckeditor est active dans la description produit/service, on l'active dans les formulaires - if ($const == 'PRODUCTDESC' && $conf->global->PRODUIT_DESC_IN_FORM) - { - dolibarr_set_const($db, "FCKEDITOR_ENABLE_DETAILS", "1",'chaine',0,'',$conf->entity); - } - Header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } - if ($_GET["action"] == 'disable_'.strtolower($const)) - { - dolibarr_del_const($db, "FCKEDITOR_ENABLE_".$const,$conf->entity); - Header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } + if ($_GET["action"] == 'activate_'.strtolower($const)) + { + dolibarr_set_const($db, "FCKEDITOR_ENABLE_".$const, "1",'chaine',0,'',$conf->entity); + // Si fckeditor est active dans la description produit/service, on l'active dans les formulaires + if ($const == 'PRODUCTDESC' && $conf->global->PRODUIT_DESC_IN_FORM) + { + dolibarr_set_const($db, "FCKEDITOR_ENABLE_DETAILS", "1",'chaine',0,'',$conf->entity); + } + Header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } + if ($_GET["action"] == 'disable_'.strtolower($const)) + { + dolibarr_del_const($db, "FCKEDITOR_ENABLE_".$const,$conf->entity); + Header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } } if ($_POST["save"]) @@ -118,34 +116,34 @@ print "\n"; // Modules foreach($modules as $const => $desc) { - // Si condition non remplie, on ne propose pas l'option - if (! $conditions[$const]) continue; + // Si condition non remplie, on ne propose pas l'option + if (! $conditions[$const]) continue; - $var=!$var; - print ""; - print ''; - print ''; - print '"; + print ''; + print ''; + print ''; - print ''; + print '"; - print ''; + print ""; + print ''; } print '
'; - echo $module->name; - print ''; - print $module->description; - print '
'; + echo $module->name; + print ''; + print $module->description; + print '\n"; - if ($conf->global->DON_ADDON_MODEL == $name) - { - print img_picto($langs->trans("Enabled"),'on'); - } - else - { - print ' '; - print ''; - print ''.img_picto($langs->trans("Enabled"),'on').''; - } - print '\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'off').''; - print "\n"; + if ($conf->global->DON_ADDON_MODEL == $name) + { + print img_picto($langs->trans("Enabled"),'on'); + } + else + { + print ' '; + print ''; + print ''.img_picto($langs->trans("Enabled"),'on').''; + } + print '\n"; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'off').''; + print ""; - if ($conf->global->DON_ADDON_MODEL == "$name") - { - print img_picto($langs->trans("Default"),'on'); - } - else - { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; - } - print '"; + if ($conf->global->DON_ADDON_MODEL == "$name") + { + print img_picto($langs->trans("Default"),'on'); + } + else + { + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; + } + print ''; - print $html->textwithpicto('   '.$text,$htmltooltip,-1,0); - print ''; + print $html->textwithpicto('   '.$text,$htmltooltip,-1,0); + print '
'.img_object("",$picto[$const]).''.$langs->trans($desc).''; + $var=!$var; + print "
'.img_object("",$picto[$const]).''.$langs->trans($desc).''; - $constante = 'FCKEDITOR_ENABLE_'.$const; - $value = $conf->global->$constante; + $constante = 'FCKEDITOR_ENABLE_'.$const; + $value = $conf->global->$constante; - print $value == 1 ? img_picto($langs->trans("Active"),'tick') : ' '; + print $value == 1 ? img_picto($langs->trans("Active"),'tick') : ' '; - print ''; + print ''; - if($value == 0) - { - print ''.$langs->trans("Activate").''; - } - else if($value == 1) - { - print ''.$langs->trans("Disable").''; - } + if($value == 0) + { + print ''.$langs->trans("Activate").''; + } + else if($value == 1) + { + print ''.$langs->trans("Disable").''; + } - print "
'."\n"; @@ -162,11 +160,11 @@ print '

'; -print $_POST["formtestfield"]; -print ''; -print $conf->global->FCKEDITOR_TEST; -*/ + print ''; + print $_POST["formtestfield"]; + print ''; + print $conf->global->FCKEDITOR_TEST; + */ $db->close(); diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 105328889bc..fad66ceae73 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -48,7 +48,7 @@ $value = GETPOST("value"); if ($action == 'updateMask') { $maskconst=GETPOST("maskconst"); - $maskvalue=getpost("maskvalue"); + $maskvalue=GETPOST("maskvalue"); if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; diff --git a/htdocs/admin/geoipmaxmind.php b/htdocs/admin/geoipmaxmind.php index 9f74670571f..4c36de52c91 100644 --- a/htdocs/admin/geoipmaxmind.php +++ b/htdocs/admin/geoipmaxmind.php @@ -1,7 +1,7 @@ * Copyright (C) 2011 Juanjo Menent - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -41,20 +41,20 @@ $action = GETPOST("action"); if ($action == 'set') { $error=0; - - $gimcdf= getpost("GEOIPMAXMIND_COUNTRY_DATAFILE"); - + + $gimcdf= GETPOST("GEOIPMAXMIND_COUNTRY_DATAFILE"); + if (! $gimcdf && ! file_exists($gimcdf)) { $mesg='
'.$langs->trans("ErrorFileNotFound",$gimcdf).'
'; $error++; } - + if (! $error) { $res = dolibarr_set_const($db,"GEOIPMAXMIND_COUNTRY_DATAFILE",$gimcdf,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; - + if (! $error) { $mesg = "".$langs->trans("SetupSaved").""; diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index a15a70797e4..91a8f7e44cc 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -30,10 +30,13 @@ $langs->load("admin"); $langs->load("users"); $langs->load("other"); -if (!$user->admin) - accessforbidden(); +if (!$user->admin) accessforbidden(); +/* + * Actions + */ + if ($_GET["action"] == 'add') { $sql = "UPDATE ".MAIN_DB_PREFIX."rights_def SET bydefault=1"; @@ -79,56 +82,56 @@ $modulesdir = array(); foreach ($conf->file->dol_document_root as $type => $dirroot) { - $modulesdir[] = $dirroot . "/includes/modules/"; + $modulesdir[] = $dirroot . "/includes/modules/"; - if ($type == 'alt') - { - $handle=@opendir($dirroot); - if (is_resource($handle)) - { - while (($file = readdir($handle))!==false) - { - if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes') - { - if (is_dir($dirroot . '/' . $file . '/includes/modules/')) - { - $modulesdir[] = $dirroot . '/' . $file . '/includes/modules/'; - } - } - } - closedir($handle); - } - } + if ($type == 'alt') + { + $handle=@opendir($dirroot); + if (is_resource($handle)) + { + while (($file = readdir($handle))!==false) + { + if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes') + { + if (is_dir($dirroot . '/' . $file . '/includes/modules/')) + { + $modulesdir[] = $dirroot . '/' . $file . '/includes/modules/'; + } + } + } + closedir($handle); + } + } } foreach ($modulesdir as $dir) { - // Load modules attributes in arrays (name, numero, orders) from dir directory - //print $dir."\n
"; - $handle=@opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle))!==false) - { - if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') - { - $modName = substr($file, 0, dol_strlen($file) - 10); + // Load modules attributes in arrays (name, numero, orders) from dir directory + //print $dir."\n
"; + $handle=@opendir($dir); + if (is_resource($handle)) + { + while (($file = readdir($handle))!==false) + { + if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') + { + $modName = substr($file, 0, dol_strlen($file) - 10); - if ($modName) - { - include_once($dir."/".$file); - $objMod = new $modName($db); - if ($objMod->rights_class) { + if ($modName) + { + include_once($dir."/".$file); + $objMod = new $modName($db); + if ($objMod->rights_class) { - $ret=$objMod->insert_permissions(0); + $ret=$objMod->insert_permissions(0); - $modules[$objMod->rights_class]=$objMod; - //print "modules[".$objMod->rights_class."]=$objMod;"; - } - } - } - } - } + $modules[$objMod->rights_class]=$objMod; + //print "modules[".$objMod->rights_class."]=$objMod;"; + } + } + } + } + } } $db->commit(); diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 85b5ee9b08e..5ef95680a74 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -33,74 +33,79 @@ $langs->load("admin"); $langs->load("withdrawals"); // Security check -if (!$user->admin) -accessforbidden(); +if (!$user->admin) accessforbidden(); $action = GETPOST("action"); + +/* + * Actions + */ + if ($action == "set") { - $db->begin(); - for ($i = 0 ; $i < 2 ; $i++) - { - $res = dolibarr_set_const($db, $_POST["nom$i"], $_POST["value$i"],'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; - } - - $id=$_POST["PRELEVEMENT_ID_BANKACCOUNT"]; - $account = new Account($db, $id); - - if($account->fetch($id)>0) - { - $res = dolibarr_set_const($db, "PRELEVEMENT_ID_BANKACCOUNT", $id,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; - $res = dolibarr_set_const($db, "PRELEVEMENT_CODE_BANQUE", $account->code_banque,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; - $res = dolibarr_set_const($db, "PRELEVEMENT_CODE_GUICHET", $account->code_guichet,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; - $res = dolibarr_set_const($db, "PRELEVEMENT_NUMERO_COMPTE", $account->number,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; - $res = dolibarr_set_const($db, "PRELEVEMENT_NUMBER_KEY", $account->cle_rib,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; - $res = dolibarr_set_const($db, "PRELEVEMENT_IBAN", $account->iban,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; - $res = dolibarr_set_const($db, "PRELEVEMENT_BIC", $account->bic,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; - $res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; - } - else $error++; - - if (! $error) + $db->begin(); + for ($i = 0 ; $i < 2 ; $i++) { - $db->commit(); + $res = dolibarr_set_const($db, $_POST["nom$i"], $_POST["value$i"],'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + } + + $id=$_POST["PRELEVEMENT_ID_BANKACCOUNT"]; + $account = new Account($db, $id); + + if($account->fetch($id)>0) + { + $res = dolibarr_set_const($db, "PRELEVEMENT_ID_BANKACCOUNT", $id,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + $res = dolibarr_set_const($db, "PRELEVEMENT_CODE_BANQUE", $account->code_banque,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + $res = dolibarr_set_const($db, "PRELEVEMENT_CODE_GUICHET", $account->code_guichet,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + $res = dolibarr_set_const($db, "PRELEVEMENT_NUMERO_COMPTE", $account->number,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + $res = dolibarr_set_const($db, "PRELEVEMENT_NUMBER_KEY", $account->cle_rib,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + $res = dolibarr_set_const($db, "PRELEVEMENT_IBAN", $account->iban,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + $res = dolibarr_set_const($db, "PRELEVEMENT_BIC", $account->bic,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + $res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + } + else $error++; + + if (! $error) + { + $db->commit(); $mesg = "".$langs->trans("SetupSaved").""; } else { - $db->rollback(); + $db->rollback(); $mesg = "".$langs->trans("Error").""; } } if ($action == "addnotif") { - $bon = new BonPrelevement($db); - $bon->AddNotification($db,$_POST["user"],$_POST["action"]); + $bon = new BonPrelevement($db); + $bon->AddNotification($db,$_POST["user"],$_POST["action"]); - Header("Location: prelevement.php"); - exit; + Header("Location: prelevement.php"); + exit; } if ($action == "deletenotif") { - $bon = new BonPrelevement($db); - $bon->DeleteNotificationById($_GET["notif"]); + $bon = new BonPrelevement($db); + $bon->DeleteNotificationById($_GET["notif"]); - Header("Location: prelevement.php"); - exit; + Header("Location: prelevement.php"); + exit; } + /* * View */ @@ -157,39 +162,39 @@ print '
'; if ($conf->global->MAIN_MODULE_NOTIFICATION) { - $langs->load("mails"); - print_titre($langs->trans("Notifications")); - - $sql = "SELECT rowid, name, firstname, fk_societe, email"; - $sql.= " FROM ".MAIN_DB_PREFIX."user"; - $sql.= " WHERE entity IN (0,".$conf->entity.")"; - - $resql=$db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $var = true; - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - $var=!$var; - if (!$obj->fk_societe) - { - $username= $obj->firstname.' '.$obj->name; - $internalusers[$obj->rowid] = $username; - } - - $i++; - } - $db->free($resql); - } - - $sql = "SELECT rowid, code, label"; + $langs->load("mails"); + print_titre($langs->trans("Notifications")); + + $sql = "SELECT rowid, name, firstname, fk_societe, email"; + $sql.= " FROM ".MAIN_DB_PREFIX."user"; + $sql.= " WHERE entity IN (0,".$conf->entity.")"; + + $resql=$db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $var = true; + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + $var=!$var; + if (!$obj->fk_societe) + { + $username= $obj->firstname.' '.$obj->name; + $internalusers[$obj->rowid] = $username; + } + + $i++; + } + $db->free($resql); + } + + $sql = "SELECT rowid, code, label"; $sql.= " FROM ".MAIN_DB_PREFIX."c_action_trigger"; $sql.= " WHERE elementtype = 'withdraw'"; $sql.= " ORDER BY rang ASC"; - + $resql = $db->query($sql); if ($resql) { @@ -205,26 +210,26 @@ if ($conf->global->MAIN_MODULE_NOTIFICATION) } $db->free($resql); } - - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; - - print ''; print '"; @@ -226,11 +226,11 @@ print ''; print '"; @@ -296,14 +296,14 @@ print ''; print '"; diff --git a/htdocs/admin/societe.php b/htdocs/admin/societe.php index 1333ae4003e..59e6b70bb68 100644 --- a/htdocs/admin/societe.php +++ b/htdocs/admin/societe.php @@ -31,11 +31,10 @@ require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); $langs->load("admin"); -if (!$user->admin) -accessforbidden(); +if (!$user->admin) accessforbidden(); $action=GETPOST("action"); -$value = GETPOST("value"); +$value=GETPOST("value"); /* @@ -123,7 +122,7 @@ if ($action == 'set') $sql.= ($label?"'".$db->escape($label)."'":'null').", "; $sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null"); $sql.= ")"; - + $resql=$db->query($sql); if (! $resql) dol_print_error($db); } diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 93ed3b25099..079937d980d 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -29,10 +29,9 @@ $langs->load("admin"); $langs->load("stocks"); // Securit check -if (!$user->admin) -accessforbidden(); +if (!$user->admin) accessforbidden(); -$action = getpost("action"); +$action = GETPOST("action"); /* diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index bedb7321d67..dc41e048ba6 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -26,8 +26,7 @@ require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); -if (!$user->admin) -accessforbidden(); +if (!$user->admin) accessforbidden(); $langs->load("admin"); $langs->load("other"); @@ -37,12 +36,13 @@ $action = GETPOST("action"); /* * Actions */ + if ($action== 'setlevel') { $level = GETPOST("level"); $res = dolibarr_set_const($db,"SYSLOG_LEVEL",$level,'chaine',0,'',0); dol_syslog("admin/syslog: level ".$level); - + if (! $res > 0) $error++; if (! $error) { @@ -56,7 +56,7 @@ if ($action== 'setlevel') if ($action == 'set') { - $optionlogoutput=GETPOST("optionlogoutput"); + $optionlogoutput=GETPOST("optionlogoutput"); $facility=GETPOST("facility"); if ($optionlogoutput == "syslog") { diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php index 27c362d580d..995186ce6a7 100644 --- a/htdocs/admin/taxes.php +++ b/htdocs/admin/taxes.php @@ -29,8 +29,7 @@ require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); $langs->load('admin'); -if (!$user->admin) - accessforbidden(); +if (!$user->admin) accessforbidden(); $action = GETPOST("action"); @@ -54,63 +53,63 @@ $tax_mode = empty($conf->global->TAX_MODE)?0:$conf->global->TAX_MODE; if ($action == 'settaxmode') { - $tax_mode = GETPOST("tax_mode"); - - $db->begin(); - - $res = dolibarr_set_const($db, 'TAX_MODE', $tax_mode,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; - - switch ($tax_mode) - { - case 0: - $value = 'payment'; - break; - case 1: - $value = 'invoice'; - break; - } - - $res = dolibarr_set_const($db, 'TAX_MODE_SELL_PRODUCT', 'invoice','chaine',0,'',$conf->entity); - if (! $res > 0) $error++; - $res = dolibarr_set_const($db, 'TAX_MODE_BUY_PRODUCT', 'invoice','chaine',0,'',$conf->entity); - if (! $res > 0) $error++; - $res = dolibarr_set_const($db, 'TAX_MODE_SELL_SERVICE', $value,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; - $res = dolibarr_set_const($db, 'TAX_MODE_BUY_SERVICE', $value,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; - - if (! $error) + $tax_mode = GETPOST("tax_mode"); + + $db->begin(); + + $res = dolibarr_set_const($db, 'TAX_MODE', $tax_mode,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + + switch ($tax_mode) { - $db->commit(); + case 0: + $value = 'payment'; + break; + case 1: + $value = 'invoice'; + break; + } + + $res = dolibarr_set_const($db, 'TAX_MODE_SELL_PRODUCT', 'invoice','chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + $res = dolibarr_set_const($db, 'TAX_MODE_BUY_PRODUCT', 'invoice','chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + $res = dolibarr_set_const($db, 'TAX_MODE_SELL_SERVICE', $value,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + $res = dolibarr_set_const($db, 'TAX_MODE_BUY_SERVICE', $value,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + + if (! $error) + { + $db->commit(); $mesg = "".$langs->trans("SetupSaved").""; } else { - $db->rollback(); + $db->rollback(); $mesg = "".$langs->trans("Error").""; } - + } /* -if ($_POST['action'] == 'update' || $_POST['action'] == 'add') -{ - if (! dolibarr_set_const($db, $_POST['constname'], $_POST['constvalue'], $typeconst[$_POST['consttype']], 0, isset($_POST['constnote']) ? $_POST['constnote'] : '',$conf->entity)); - { - print $db->error(); - } -} + if ($_POST['action'] == 'update' || $_POST['action'] == 'add') + { + if (! dolibarr_set_const($db, $_POST['constname'], $_POST['constvalue'], $typeconst[$_POST['consttype']], 0, isset($_POST['constnote']) ? $_POST['constnote'] : '',$conf->entity)); + { + print $db->error(); + } + } -if ($_GET['action'] == 'delete') -{ - if (! dolibarr_del_const($db, $_GET['constname'],$conf->entity)); - { - print $db->error(); - } -} -*/ + if ($_GET['action'] == 'delete') + { + if (! dolibarr_del_const($db, $_GET['constname'],$conf->entity)); + { + print $db->error(); + } + } + */ /* @@ -127,50 +126,50 @@ print_fiche_titre($langs->trans('TaxSetup'),$linkback,'setup'); print '
'; if (empty($mysoc->tva_assuj)) { - print $langs->trans("YourCompanyDoesNotUseVAT").'
'; + print $langs->trans("YourCompanyDoesNotUseVAT").'
'; } else { - print '
'.$langs->trans("User").''.$langs->trans("Value").''.$langs->trans("Action").'
'; + + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + + print ''; - - print ''; - - print ''; + + print ''; + + print ''; } // List of current notifications for objet_type='withdraw' $sql = "SELECT u.name, u.firstname"; @@ -239,23 +244,23 @@ $sql.= " AND u.entity IN (0,".$conf->entity.")"; $resql = $db->query($sql); if ($resql) { - $num = $db->num_rows($resql); - $i = 0; - $var = false; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - $var=!$var; + $num = $db->num_rows($resql); + $i = 0; + $var = false; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + $var=!$var; - print ""; - print ''; - $label=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->label); - print ''; - print ''; - print ''; - $i++; - } - $db->free($resql); + print ""; + print ''; + $label=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->label); + print ''; + print ''; + print ''; + $i++; + } + $db->free($resql); } print '
'.$langs->trans("User").''.$langs->trans("Value").''.$langs->trans("Action").'
'; print $html->selectarray('user',$internalusers);// select_users(0,'user',0); print ''; - print $html->selectarray('action',$actions);// select_users(0,'user',0); - print '
'; + print $html->selectarray('action',$actions);// select_users(0,'user',0); + print '
'.$obj->firstname." ".$obj->name.''.$label.'rowid.'">'.img_delete().'
'.$obj->firstname." ".$obj->name.''.$label.'rowid.'">'.img_delete().'
'; diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 8e2b35a9e68..f79af4b7e06 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -41,96 +41,96 @@ $upload_dir=$conf->admin->dir_temp; if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) { - require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php"); + require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php"); - $result=create_exdir($upload_dir); // Create dir if not exists + $result=create_exdir($upload_dir); // Create dir if not exists if ($result >= 0) { - $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],1,0,$_FILES['userfile']['error']); + $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],1,0,$_FILES['userfile']['error']); - if (is_numeric($resupload) && $resupload > 0) - { - $mesg = '
'.$langs->trans("FileTransferComplete").'
'; + if (is_numeric($resupload) && $resupload > 0) + { + $mesg = '
'.$langs->trans("FileTransferComplete").'
'; - include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'); - $formmail = new FormMail($db); - $formmail->add_attached_files($upload_dir . "/" . $_FILES['addedfile']['name'],$_FILES['addedfile']['name'],$_FILES['addedfile']['type']); - } - else - { - $langs->load("errors"); - if ($resupload < 0) // Unknown error - { - $mesg = '
'.$langs->trans("ErrorFileNotUploaded").'
'; - } - else if (preg_match('/ErrorFileIsInfectedWithAVirus.(.*)/',$resupload,$reg)) // Files infected by a virus - { - $mesg = '
'.$langs->trans("ErrorFileIsInfectedWithAVirus"); - $mesg.= '
'.$langs->trans("Information").': '.$langs->trans($reg[1]); - $mesg.= '
'; - } - else // Known error - { - $mesg = '
'.$langs->trans($resupload).'
'; - } - } + include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'); + $formmail = new FormMail($db); + $formmail->add_attached_files($upload_dir . "/" . $_FILES['addedfile']['name'],$_FILES['addedfile']['name'],$_FILES['addedfile']['type']); + } + else + { + $langs->load("errors"); + if ($resupload < 0) // Unknown error + { + $mesg = '
'.$langs->trans("ErrorFileNotUploaded").'
'; + } + else if (preg_match('/ErrorFileIsInfectedWithAVirus.(.*)/',$resupload,$reg)) // Files infected by a virus + { + $mesg = '
'.$langs->trans("ErrorFileIsInfectedWithAVirus"); + $mesg.= '
'.$langs->trans("Information").': '.$langs->trans($reg[1]); + $mesg.= '
'; + } + else // Known error + { + $mesg = '
'.$langs->trans($resupload).'
'; + } + } } } if ($_GET["action"] == 'activate_captcha') { - dolibarr_set_const($db, "MAIN_SECURITY_ENABLECAPTCHA", '1','chaine',0,'',$conf->entity); - Header("Location: security_other.php"); - exit; + dolibarr_set_const($db, "MAIN_SECURITY_ENABLECAPTCHA", '1','chaine',0,'',$conf->entity); + Header("Location: security_other.php"); + exit; } else if ($_GET["action"] == 'disable_captcha') { - dolibarr_del_const($db, "MAIN_SECURITY_ENABLECAPTCHA",$conf->entity); - Header("Location: security_other.php"); - exit; + dolibarr_del_const($db, "MAIN_SECURITY_ENABLECAPTCHA",$conf->entity); + Header("Location: security_other.php"); + exit; } if ($_GET["action"] == 'activate_advancedperms') { - dolibarr_set_const($db, "MAIN_USE_ADVANCED_PERMS", '1','chaine',0,'',$conf->entity); - Header("Location: security_other.php"); - exit; + dolibarr_set_const($db, "MAIN_USE_ADVANCED_PERMS", '1','chaine',0,'',$conf->entity); + Header("Location: security_other.php"); + exit; } else if ($_GET["action"] == 'disable_advancedperms') { - dolibarr_del_const($db, "MAIN_USE_ADVANCED_PERMS",$conf->entity); - Header("Location: security_other.php"); - exit; + dolibarr_del_const($db, "MAIN_USE_ADVANCED_PERMS",$conf->entity); + Header("Location: security_other.php"); + exit; } if ($_GET["action"] == 'MAIN_SESSION_TIMEOUT') { - if (! dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity)) dol_print_error($db); - else $mesg=$langs->trans("RecordModifiedSuccessfully"); + if (! dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity)) dol_print_error($db); + else $mesg=$langs->trans("RecordModifiedSuccessfully"); } if ($_GET["action"] == 'MAIN_UPLOAD_DOC') { - if (! dolibarr_set_const($db, 'MAIN_UPLOAD_DOC',$_POST["MAIN_UPLOAD_DOC"],'chaine',0,'',$conf->entity)) dol_print_error($db); - else $mesg=$langs->trans("RecordModifiedSuccessfully"); + if (! dolibarr_set_const($db, 'MAIN_UPLOAD_DOC',$_POST["MAIN_UPLOAD_DOC"],'chaine',0,'',$conf->entity)) dol_print_error($db); + else $mesg=$langs->trans("RecordModifiedSuccessfully"); } if ($_GET["action"] == 'MAIN_UMASK') { - if (! dolibarr_set_const($db, "MAIN_UMASK", $_POST["MAIN_UMASK"],'chaine',0,'',$conf->entity)) dol_print_error($db); - else $mesg=$langs->trans("RecordModifiedSuccessfully"); + if (! dolibarr_set_const($db, "MAIN_UMASK", $_POST["MAIN_UMASK"],'chaine',0,'',$conf->entity)) dol_print_error($db); + else $mesg=$langs->trans("RecordModifiedSuccessfully"); } if ($_GET["action"] == 'MAIN_ANTIVIRUS_COMMAND') { - if (! dolibarr_set_const($db, "MAIN_ANTIVIRUS_COMMAND", $_POST["MAIN_ANTIVIRUS_COMMAND"],'chaine',0,'',$conf->entity)) dol_print_error($db); - else $mesg=$langs->trans("RecordModifiedSuccessfully"); + if (! dolibarr_set_const($db, "MAIN_ANTIVIRUS_COMMAND", $_POST["MAIN_ANTIVIRUS_COMMAND"],'chaine',0,'',$conf->entity)) dol_print_error($db); + else $mesg=$langs->trans("RecordModifiedSuccessfully"); } if ($_GET["action"] == 'MAIN_ANTIVIRUS_PARAM') { - if (! dolibarr_set_const($db, "MAIN_ANTIVIRUS_PARAM", $_POST["MAIN_ANTIVIRUS_PARAM"],'chaine',0,'',$conf->entity)) dol_print_error($db); - else $mesg=$langs->trans("RecordModifiedSuccessfully"); + if (! dolibarr_set_const($db, "MAIN_ANTIVIRUS_PARAM", $_POST["MAIN_ANTIVIRUS_PARAM"],'chaine',0,'',$conf->entity)) dol_print_error($db); + else $mesg=$langs->trans("RecordModifiedSuccessfully"); } @@ -199,20 +199,20 @@ print '
'.$langs->trans("UseCaptchaCode").''; if (function_exists("imagecreatefrompng")) { - if ($conf->global->MAIN_SECURITY_ENABLECAPTCHA == 0) - { - print ''.img_picto($langs->trans("Disabled"),'switch_off').''; - } - if($conf->global->MAIN_SECURITY_ENABLECAPTCHA == 1) - { - print ''.img_picto($langs->trans("Enabled"),'switch_on').''; - } + if ($conf->global->MAIN_SECURITY_ENABLECAPTCHA == 0) + { + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + } + if($conf->global->MAIN_SECURITY_ENABLECAPTCHA == 1) + { + print ''.img_picto($langs->trans("Enabled"),'switch_on').''; + } } else { - $html = new Form($db); - $desc = $html->textwithpicto('',$langs->transnoentities("EnableGDLibraryDesc"),1,'warning'); - print $desc; + $html = new Form($db); + $desc = $html->textwithpicto('',$langs->transnoentities("EnableGDLibraryDesc"),1,'warning'); + print $desc; } print "'.$langs->trans("UseAdvancedPerms").''; if ($conf->global->MAIN_USE_ADVANCED_PERMS == 0) { - print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; } if($conf->global->MAIN_USE_ADVANCED_PERMS == 1) { - print ''.img_picto($langs->trans("Enabled"),'switch_on').''; + print ''.img_picto($langs->trans("Enabled"),'switch_on').''; } print "'; if (ini_get('safe_mode') && ! empty($conf->global->MAIN_ANTIVIRUS_COMMAND)) { - $langs->load("errors"); - $basedir=preg_replace('/"/','',dirname($conf->global->MAIN_ANTIVIRUS_COMMAND)); - $listdir=explode(';',ini_get('safe_mode_exec_dir')); - if (! in_array($basedir,$listdir)) - { - print img_warning($langs->trans('WarningSafeModeOnCheckExecDir')); - dol_syslog("safe_mode is on, basedir is ".$basedir.", safe_mode_exec_dir is ".ini_get('safe_mode_exec_dir'), LOG_WARNING); - } + $langs->load("errors"); + $basedir=preg_replace('/"/','',dirname($conf->global->MAIN_ANTIVIRUS_COMMAND)); + $listdir=explode(';',ini_get('safe_mode_exec_dir')); + if (! in_array($basedir,$listdir)) + { + print img_warning($langs->trans('WarningSafeModeOnCheckExecDir')); + dol_syslog("safe_mode is on, basedir is ".$basedir.", safe_mode_exec_dir is ".ini_get('safe_mode_exec_dir'), LOG_WARNING); + } } print ''; print "
'; + print '
'; - // Cas des parametres TAX_MODE_SELL/BUY_SERVICE/PRODUCT - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; - print ''; - print '\n"; - print ''; - print '\n"; - print ''; + // Cas des parametres TAX_MODE_SELL/BUY_SERVICE/PRODUCT + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + print ''; + print '\n"; + print ''; + print '\n"; + print ''; - print "
'.$langs->trans('OptionVatMode').''.$langs->trans('Description').'
'.$langs->trans('OptionVATDefault').''.nl2br($langs->trans('OptionVatDefaultDesc')); - print "
'.$langs->trans('OptionVATDebitOption').''.nl2br($langs->trans('OptionVatDebitOptionDesc'))."
'.$langs->trans('OptionVatMode').''.$langs->trans('Description').'
'.$langs->trans('OptionVATDefault').''.nl2br($langs->trans('OptionVatDefaultDesc')); + print "
'.$langs->trans('OptionVATDebitOption').''.nl2br($langs->trans('OptionVatDebitOptionDesc'))."
\n"; + print "\n"; - print '

'; - print_fiche_titre($langs->trans("SummaryOfVatExigibilityUsedByDefault"),'',''); - //print ' ('.$langs->trans("CanBeChangedWhenMakingInvoice").')'; + print '

'; + print_fiche_titre($langs->trans("SummaryOfVatExigibilityUsedByDefault"),'',''); + //print ' ('.$langs->trans("CanBeChangedWhenMakingInvoice").')'; - print ''; - print ''; + print '
 '.$langs->trans("Buy").''.$langs->trans("Sell").'
'; + print ''; - // Products - print ''; - print ''; - print ''; + // Products + print ''; + print ''; + print ''; - // Services - print ''; - print ''; + print ''; - print ''; + print ''; + print ''; - print '
 '.$langs->trans("Buy").''.$langs->trans("Sell").'
'.$langs->trans("Product").''; - print $langs->trans("OnDelivery"); - print ' ('.$langs->trans("SupposedToBeInvoiceDate").')'; - print ''; - print $langs->trans("OnDelivery"); - print ' ('.$langs->trans("SupposedToBeInvoiceDate").')'; - print '
'.$langs->trans("Product").''; + print $langs->trans("OnDelivery"); + print ' ('.$langs->trans("SupposedToBeInvoiceDate").')'; + print ''; + print $langs->trans("OnDelivery"); + print ' ('.$langs->trans("SupposedToBeInvoiceDate").')'; + print '
'.$langs->trans("Services").''; + // Services + print '
'.$langs->trans("Services").''; if ($tax_mode == 0) { print $langs->trans("OnPayment"); @@ -181,21 +180,21 @@ else print $langs->trans("OnInvoice"); print ' ('.$langs->trans("InvoiceDateUsed").')'; } - print ''; - if ($tax_mode == 0) - { - print $langs->trans("OnPayment"); - print ' ('.$langs->trans("SupposedToBePaymentDate").')'; - } - if ($tax_mode == 1) - { - print $langs->trans("OnInvoice"); - print ' ('.$langs->trans("InvoiceDateUsed").')'; - } - print '
'; + if ($tax_mode == 0) + { + print $langs->trans("OnPayment"); + print ' ('.$langs->trans("SupposedToBePaymentDate").')'; + } + if ($tax_mode == 1) + { + print $langs->trans("OnInvoice"); + print ' ('.$langs->trans("InvoiceDateUsed").')'; + } + print '
'; + print ''; } dol_htmloutput_mesg($mesg); diff --git a/htdocs/boutique/osc_master.inc.php b/htdocs/boutique/osc_master.inc.php index 4546feff7c4..a63749c7fe8 100644 --- a/htdocs/boutique/osc_master.inc.php +++ b/htdocs/boutique/osc_master.inc.php @@ -1,39 +1,39 @@ - - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \file htdocs/boutique/osc_master.inc.php - * \brief Fichier de preparation de l'environnement Dolibarr pour OSCommerce - */ - -require_once(DOL_DOCUMENT_ROOT ."/lib/databases/".$conf->db->type.".lib.php"); - -/* - * Creation objet $dbosc - */ -$dbosc = new DoliDb($conf->db->type,$conf->global->OSC_DB_HOST,$conf->global->OSC_DB_USER,$conf->global->OSC_DB_PASS,$conf->global->OSC_DB_NAME,$conf->global->OSC_DB_PORT); -if (! $dbosc->connected) -{ - dol_syslog($dbosc,"host=".$conf->global->OSC_DB_HOST.", user=".$conf->global->OSC_DB_USER.", databasename=".$conf->global->OSC_DB_NAME.", ".$db->error,LOG_ERR); - - llxHeader("",$langs->trans("OSCommerceShop"),""); - print '
Failed to connect to oscommerce database. Check your module setup
'; - llxFooter(); - exit; -} - -?> + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/boutique/osc_master.inc.php + * \brief Fichier de preparation de l'environnement Dolibarr pour OSCommerce + */ + +require_once(DOL_DOCUMENT_ROOT ."/lib/databases/".$conf->db->type.".lib.php"); + +/* + * Creation objet $dbosc + */ +$dbosc = new DoliDb($conf->db->type,$conf->global->OSC_DB_HOST,$conf->global->OSC_DB_USER,$conf->global->OSC_DB_PASS,$conf->global->OSC_DB_NAME,$conf->global->OSC_DB_PORT); +if (! $dbosc->connected) +{ + dol_syslog($dbosc,"host=".$conf->global->OSC_DB_HOST.", user=".$conf->global->OSC_DB_USER.", databasename=".$conf->global->OSC_DB_NAME.", ".$db->error,LOG_ERR); + + llxHeader("",$langs->trans("OSCommerceShop"),""); + print '
Failed to connect to oscommerce database. Check your module setup
'; + llxFooter(); + exit; +} + +?> diff --git a/htdocs/compta/ajaxpayment.php b/htdocs/compta/ajaxpayment.php index 96de90124f9..c4fb53b1b00 100644 --- a/htdocs/compta/ajaxpayment.php +++ b/htdocs/compta/ajaxpayment.php @@ -1,107 +1,107 @@ - - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \file htdocs/compta/ajaxpayment.php - * \brief File to return Ajax response on payment breakdown process - * \version ajaxpayment.php,v 1.0 - */ - -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); -if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); -if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no menu to show -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session) - -require('../main.inc.php'); - -$langs->Load('compta'); - -//init var -$amountPayment = $_POST['amountPayment']; -$amounts = $_POST['amounts']; // from text inputs : invoice amount payment (check required) -$remains = $_POST['remains']; // from dolibarr's object (no need to check) -$currentInvId = $_POST['imgClicked']; // from DOM elements : imgId (equals invoice id) - - -// Getting the posted keys=>values, sanitize the ones who are from text inputs -// from text inputs : total amount -$amountPayment = $amountPayment!='' ? ( is_numeric(price2num($amountPayment)) ? price2num($amountPayment) - : '' - ) - : ''; // keep void if not a valid entry -// Checkamounts -foreach ($amounts as $key => $value) -{ - $value = price2num($value); - if (!is_numeric($value)) unset($amounts[$key]); -} - -// Treatment -$result = $amountPayment != '' ? $amountPayment - array_sum($amounts) : $amountPayment + array_sum($amounts); // Remaining amountPayment -$toJsonArray = array(); -$totalRemaining = price2num(array_sum($remains)); -$toJsonArray['label'] = $amountPayment == '' ? $langs->transnoentities('AmountToBeCharged') : $langs->transnoentities('RemainingAmountPayment'); -if($currentInvId) // Here to breakdown -{ - // Get the current amount (from form) and the corresponding remainToPay (from invoice) - $currentAmount = $amounts['amount_'.$currentInvId]; - $currentRemain = $remains['remain_'.$currentInvId]; - - // If amountPayment isn't filled, breakdown invoice amount, else breakdown from amountPayment - if($amountPayment == '') - { - // Check if current amount exists in amounts - $amountExists = array_key_exists('amount_'.$currentInvId,$amounts); - if($amountExists) - { - $remainAmount = $currentRemain - $currentAmount; // To keep value between curRemain and curAmount - $result += $remainAmount; // result must be deduced by - $currentAmount += $remainAmount; // curAmount put to curRemain - }else - { - $currentAmount = $currentRemain; - $result += $currentRemain; - } - }else - { - // Reset the substraction for this amount - $result += price2num($currentAmount); - $currentAmount = 0; - - if($result >= 0) // then we need to calculate the amount to breakdown - { - $amountToBreakdown = ($result - $currentRemain >= 0 ? - $currentRemain : // Remain can be fully paid - $currentRemain + ($result - $currentRemain)); // Remain can only partially be paid - $currentAmount = $amountToBreakdown; // In both cases, amount will take breakdown value - $result -= $amountToBreakdown; // And canceled substraction has been replaced by breakdown - } // else there's no need to calc anything, just reset the field (result is still < 0) - } - $toJsonArray['amount_'.$currentInvId] = price2num($currentAmount).""; // Param will exist only if an img has been clicked -} -// Encode to JSON to return -$toJsonArray['makeRed'] = $totalRemaining < price2num($result) || price2num($result) < 0 ? true : false; -$toJsonArray['result'] = price2num($result); -echo json_encode($toJsonArray); // Printing the call's result - + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/compta/ajaxpayment.php + * \brief File to return Ajax response on payment breakdown process + * \version ajaxpayment.php,v 1.0 + */ + +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); +if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); +if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); +if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); +if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no menu to show +if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php +//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); +//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session) + +require('../main.inc.php'); + +$langs->Load('compta'); + +//init var +$amountPayment = $_POST['amountPayment']; +$amounts = $_POST['amounts']; // from text inputs : invoice amount payment (check required) +$remains = $_POST['remains']; // from dolibarr's object (no need to check) +$currentInvId = $_POST['imgClicked']; // from DOM elements : imgId (equals invoice id) + + +// Getting the posted keys=>values, sanitize the ones who are from text inputs +// from text inputs : total amount +$amountPayment = $amountPayment!='' ? ( is_numeric(price2num($amountPayment)) ? price2num($amountPayment) + : '' + ) + : ''; // keep void if not a valid entry +// Checkamounts +foreach ($amounts as $key => $value) +{ + $value = price2num($value); + if (!is_numeric($value)) unset($amounts[$key]); +} + +// Treatment +$result = $amountPayment != '' ? $amountPayment - array_sum($amounts) : $amountPayment + array_sum($amounts); // Remaining amountPayment +$toJsonArray = array(); +$totalRemaining = price2num(array_sum($remains)); +$toJsonArray['label'] = $amountPayment == '' ? $langs->transnoentities('AmountToBeCharged') : $langs->transnoentities('RemainingAmountPayment'); +if($currentInvId) // Here to breakdown +{ + // Get the current amount (from form) and the corresponding remainToPay (from invoice) + $currentAmount = $amounts['amount_'.$currentInvId]; + $currentRemain = $remains['remain_'.$currentInvId]; + + // If amountPayment isn't filled, breakdown invoice amount, else breakdown from amountPayment + if($amountPayment == '') + { + // Check if current amount exists in amounts + $amountExists = array_key_exists('amount_'.$currentInvId,$amounts); + if($amountExists) + { + $remainAmount = $currentRemain - $currentAmount; // To keep value between curRemain and curAmount + $result += $remainAmount; // result must be deduced by + $currentAmount += $remainAmount; // curAmount put to curRemain + }else + { + $currentAmount = $currentRemain; + $result += $currentRemain; + } + }else + { + // Reset the substraction for this amount + $result += price2num($currentAmount); + $currentAmount = 0; + + if($result >= 0) // then we need to calculate the amount to breakdown + { + $amountToBreakdown = ($result - $currentRemain >= 0 ? + $currentRemain : // Remain can be fully paid + $currentRemain + ($result - $currentRemain)); // Remain can only partially be paid + $currentAmount = $amountToBreakdown; // In both cases, amount will take breakdown value + $result -= $amountToBreakdown; // And canceled substraction has been replaced by breakdown + } // else there's no need to calc anything, just reset the field (result is still < 0) + } + $toJsonArray['amount_'.$currentInvId] = price2num($currentAmount).""; // Param will exist only if an img has been clicked +} +// Encode to JSON to return +$toJsonArray['makeRed'] = $totalRemaining < price2num($result) || price2num($result) < 0 ? true : false; +$toJsonArray['result'] = price2num($result); +echo json_encode($toJsonArray); // Printing the call's result + ?> \ No newline at end of file diff --git a/htdocs/compta/dons/class/don.class.php b/htdocs/compta/dons/class/don.class.php index 71ead3c64d1..c8e088cc128 100644 --- a/htdocs/compta/dons/class/don.class.php +++ b/htdocs/compta/dons/class/don.class.php @@ -28,7 +28,7 @@ require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php"); /** * \class Don - * \brief Classe permettant la gestion des dons + * \brief Class to manage donations */ class Don extends CommonObject { @@ -56,8 +56,9 @@ class Don extends CommonObject var $projet; /** - * \brief Constructeur - * \param DB Handler d'acces base + * Constructor + * + * @param DoliDB $DB Database handler */ function Don($DB) { @@ -79,9 +80,10 @@ class Don extends CommonObject /** - * \brief Retourne le libelle du statut d'un don (brouillon, validee, abandonnee, payee) - * \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long - * \return string Libelle + * Retourne le libelle du statut d'un don (brouillon, validee, abandonnee, payee) + * + * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long + * @return string Libelle */ function getLibStatut($mode=0) { @@ -89,10 +91,11 @@ class Don extends CommonObject } /** - * \brief Renvoi le libelle d'un statut donne - * \param statut Id statut - * \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto - * \return string Libelle du statut + * Renvoi le libelle d'un statut donne + * + * @param int $statut Id statut + * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto + * @return string Libelle du statut */ function LibStatut($statut,$mode=0) { @@ -195,8 +198,10 @@ class Don extends CommonObject /** + * Check params * - * + * @param int $minimum Minimum + * @return int 0 if KO, >0 if OK */ function check($minimum=0) { @@ -238,7 +243,8 @@ class Don extends CommonObject $this->amount = trim($this->amount); $map = range(0,9); - for ($i = 0; $i < dol_strlen($this->amount); $i++) + $len=dol_strlen($this->amount); + for ($i = 0; $i < $len; $i++) { if (!isset($map[substr($this->amount, $i, 1)] )) { @@ -279,10 +285,11 @@ class Don extends CommonObject } /** - * Create donation record into database - * @param user Objet utilisateur qui cree le don - * @return int Id don cree si ok, <0 si ko - * TODO add numbering module for Ref + * Create donation record into database + * + * @param User $user Objet utilisateur qui cree le don + * @return int Id don cree si ok, <0 si ko + * TODO add numbering module for Ref */ function create($user) { @@ -348,9 +355,10 @@ class Don extends CommonObject } /** - * Update a donation record - * @param user Objet utilisateur qui met a jour le don - * @return int >0 if OK, <0 if KO + * Update a donation record + * + * @param User $user Objet utilisateur qui met a jour le don + * @return int >0 if OK, <0 if KO */ function update($user) { @@ -390,7 +398,8 @@ class Don extends CommonObject /** * Delete a donation - * @param rowid Id of donation to delete + * + * @param int $rowid Id of donation to delete */ function delete($rowid) { @@ -418,9 +427,10 @@ class Don extends CommonObject /** * Load donation from database - * @param rowid Id of donation to load - * @param ref Ref of donation to load - * @return int <0 if KO, >0 if OK + * + * @param int $rowid Id of donation to load + * @param string $ref Ref of donation to load + * @return int <0 if KO, >0 if OK */ function fetch($rowid,$ref='') { @@ -481,9 +491,10 @@ class Don extends CommonObject /** * Valide une promesse de don - * @param rowid id du don a modifier - * @param userid utilisateur qui valide la promesse - * @return int <0 if KO, >0 if OK + * + * @param int $rowid id du don a modifier + * @param int $userid utilisateur qui valide la promesse + * @return int <0 if KO, >0 if OK */ function valid_promesse($rowid, $userid) { @@ -512,9 +523,10 @@ class Don extends CommonObject /** * Classe le don comme paye, le don a ete recu - * @param rowid id du don a modifier - * @param modepaiementd mode de paiement - * @return int <0 if KO, >0 if OK + * + * @param int $rowid id du don a modifier + * @param int $modepaiementd mode de paiement + * @return int <0 if KO, >0 if OK */ function set_paye($rowid, $modepaiement='') { @@ -548,8 +560,9 @@ class Don extends CommonObject /** * Classe le don comme encaisse - * @param rowid id du don a modifier - * @return int <0 if KO, >0 if OK + * + * @param int $rowid id du don a modifier + * @return int <0 if KO, >0 if OK */ function set_encaisse($rowid) { @@ -578,8 +591,9 @@ class Don extends CommonObject /** * Set donation sto status canceled - * @param rowid id du don a modifier - * @return int <0 if KO, >0 if OK + * + * @param int $rowid id du don a modifier + * @return int <0 if KO, >0 if OK */ function set_cancel($rowid) { @@ -606,8 +620,10 @@ class Don extends CommonObject } /** - * \brief Somme des dons - * \param param 1=promesses de dons validees , 2=xxx, 3=encaisses + * Somme des dons + * + * @param string $param 1=promesses de dons validees , 2=xxx, 3=encaisses + * @return int Summ of donations */ function sum_donations($param) { @@ -632,9 +648,10 @@ class Don extends CommonObject /** - * \brief Return clicable name (with picto eventually) - * \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul - * \return string Chaine avec URL + * Return clicable name (with picto eventually) + * + * @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul + * @return string Chaine avec URL */ function getNomUrl($withpicto=0) { @@ -657,10 +674,11 @@ class Don extends CommonObject /** * Return full name (civility+' '+name+' '+lastname) - * @param langs Language object for translation of civility - * @param option 0=No option, 1=Add civility - * @param nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname - * @return string String with full name + * + * @param Translate $langs Language object for translation of civility + * @param int $option 0=No option, 1=Add civility + * @param int $nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname + * @return string String with full name */ function getFullName($langs,$option=0,$nameorder=-1) { diff --git a/htdocs/compta/prelevement/class/bon-prelevement.class.php b/htdocs/compta/prelevement/class/bon-prelevement.class.php index 4dc57382854..56959f7a096 100644 --- a/htdocs/compta/prelevement/class/bon-prelevement.class.php +++ b/htdocs/compta/prelevement/class/bon-prelevement.class.php @@ -95,17 +95,17 @@ class BonPrelevement extends CommonObject } /** - * Add facture to withdrawal + * Add facture to withdrawal * - * @param int $facture_id id invoice to add - * @param int $client_id id invoice customer - * @param string $client_nom name of cliente - * @param int $amount amount of invoice - * @param string $code_banque code of bank withdrawal - * @param string $code_guichet code of bank's office - * @param string $number bank account number - * @param string $number_key number key of account number - * @return int >0 if OK, <0 if KO + * @param int $facture_id id invoice to add + * @param int $client_id id invoice customer + * @param string $client_nom name of cliente + * @param int $amount amount of invoice + * @param string $code_banque code of bank withdrawal + * @param string $code_guichet code of bank's office + * @param string $number bank account number + * @param string $number_key number key of account number + * @return int >0 if OK, <0 if KO */ function AddFacture($facture_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number, $number_key) { @@ -305,8 +305,7 @@ class BonPrelevement extends CommonObject } else { - dol_syslog("BonPrelevement::Fetch Erreur "); - dol_syslog($sql); + dol_syslog("BonPrelevement::Fetch Erreur sql=".$sql, LOG_ERR); return -2; } } @@ -966,11 +965,8 @@ class BonPrelevement extends CommonObject $sql.= " WHERE rowid = ".$fac[1]; dol_syslog("Bon-Prelevement::Create sql=".$sql, LOG_DEBUG); - if ($this->db->query($sql)) - { - - } - else + $resql=$this->db->query($sql); + if (! $resql) { $error++; dol_syslog("Erreur mise a jour des demandes"); @@ -1212,14 +1208,14 @@ class BonPrelevement extends CommonObject $obj = $this->db->fetch_object($resql); $esaeb19->agregaRecibo( - $idOrdenante, + $idOrdenante, "idcliente".$i+1, - $obj->client_nom, - $obj->code_banque, - $obj->code_guichet, - $obj->cle_rib, - $obj->number, - $obj->amount, + $obj->client_nom, + $obj->code_banque, + $obj->code_guichet, + $obj->cle_rib, + $obj->number, + $obj->amount, "Fra.".$obj->facnumber." ".$obj->amount ); @@ -1307,14 +1303,14 @@ class BonPrelevement extends CommonObject $row = $this->db->fetch_row($resql); $this->EnregDestinataire( - $row[0], - $row[1], - $row[2], - $row[3], - $row[4], - $row[5], - $row[6], - $row[7] + $row[0], + $row[1], + $row[2], + $row[3], + $row[4], + $row[5], + $row[6], + $row[7] ); $this->total = $this->total + $row[5]; diff --git a/htdocs/compta/stats/comp.php b/htdocs/compta/stats/comp.php deleted file mode 100644 index 1da98b25ee2..00000000000 --- a/htdocs/compta/stats/comp.php +++ /dev/null @@ -1,353 +0,0 @@ - - * Copyright (C) 2004-2010 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \file htdocs/compta/stats/comp.php - * \ingroup commercial - * TODO Remove or add page in menus - */ - -require('../../main.inc.php'); -require_once(DOL_DOCUMENT_ROOT."/lib/accountancy.lib.php"); - -// Security check -if ($user->societe_id > 0) -{ - $socid = $user->societe_id; -} - - - -function propals ($db, $year, $month) -{ - global $bc,$langs,$conf; - - $sql = "SELECT s.nom, s.rowid as socid, p.rowid as propalid, p.price, p.ref, p.datep as dp, p.fk_statut as statutid, c.label as statut"; - $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; - $sql.= ", ".MAIN_DB_PREFIX."propal as p"; - $sql.= ", ".MAIN_DB_PREFIX."c_propalst as c"; - $sql.= " WHERE p.fk_soc = s.rowid AND p.fk_statut = c.id"; - $sql.= " AND p.entity = ".$conf->entity; - $sql.= " AND p.fk_statut in (1,2,4)"; - // TODO Use between instead of date_format - $sql.= " AND date_format(p.datep, '%Y') = '".$year."'"; - $sql.= " AND round(date_format(p.datep, '%m')) = '".$month."'"; - $sql.= " ORDER BY p.fk_statut"; - - $result = $db->query($sql); - $num = $db->num_rows($result); - $i = 0; - print ""; - print ""; - - $oldstatut = -1; - $subtotal = 0; - while ($i < $num) { - $objp = $db->fetch_object($result); - - if ($objp->statut <> $oldstatut ) { - $oldstatut = $objp->statut; - - if ($i > 0) { - print "\n"; - print "\n"; - } - $subtotal = 0; - - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print "\n"; - $var=True; - } - - $var=!$var; - print ""; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - print "\n"; - print "\n"; - - $total = $total + $objp->price; - $subtotal = $subtotal + $objp->price; - - $i++; - } - print "\n"; - print "\n"; - print ""; - print ""; - print ""; - print "
Propal
".$langs->trans("Total").": ".price($subtotal)."".$langs->trans("Currency".$conf->monnaie)."
Societe".$langs->trans("Ref")."".$langs->trans("Date")."".$langs->trans("Price")."".$langs->trans("Status")."
socid."\">".$objp->nom."propalid."\">".$objp->ref."".dol_print_date($db->jdate($objp->dp))."".price($objp->price)."".$objp->statut."
".$langs->trans("Total").": ".price($subtotal)."".$langs->trans("Currency".$conf->monnaie)."
".$langs->trans("Total").": ".price($total)."".$langs->trans("Currency".$conf->monnaie)."
"; - $db->free(); - -} - - -function factures ($db, $year, $month, $paye) -{ - global $bc,$conf; - - $sql = "SELECT s.nom, s.rowid as socid, f.facnumber, f.total, f.datef as df, f.paye, f.rowid as facid "; - $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; - $sql.= ",".MAIN_DB_PREFIX."facture as f"; - $sql.= " WHERE f.fk_statut = 1"; - $sql.= " AND f.entity = ".$conf->entity; - if ($conf->compta->mode != 'CREANCES-DETTES') $sql.= " AND f.paye = ".$paye; - $sql.= " AND f.fk_soc = s.rowid"; - $sql.= " AND date_format(f.datef, '%Y') = '".$year."'"; - $sql.= " AND round(date_format(f.datef, '%m')) = ".$month; - $sql.= " ORDER BY f.datef DESC "; - - $result = $db->query($sql); - if ($result) - { - $num = $db->num_rows($result); - if ($num > 0) - { - $i = 0; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print "\n"; - $var=True; - while ($i < $num) - { - $objp = $db->fetch_object($result); - $var=!$var; - print ""; - print "\n"; - print "\n"; - if ($objp->df > 0 ) - { - print "\n"; - } - else - { - print "\n"; - } - - print "\n"; - - $payes[1] = "oui"; - $payes[0] = "non"; - - print "\n"; - print "\n"; - - $total = $total + $objp->total; - - $i++; - } - print ""; - print "
Factures
SocieteNumDateMontantPay�
socid."\">".$objp->nom."facid."\">".$objp->facnumber."".dol_print_date($db->jdate($objp->df))."!!!".price($objp->total)."".$payes[$objp->paye]."
"; - print "Total : ".price($total)."
"; - $db->free(); - } - } - else - { - print $db->error(); - } -} - - -function pt ($db, $sql, $year) -{ - global $bc, $langs; - - $result = $db->query($sql); - if ($result) { - $num = $db->num_rows($result); - $i = 0; $total = 0 ; - print ''; - print ""; - print ''; - print "\n"; - $var=True; - $month = 1 ; - - while ($i < $num) { - $obj = $db->fetch_object($result); - $var=!$var; - - if ($obj->dm > $month ) { - for ($b = $month ; $b < $obj->dm ; $b++) { - print ""; - print "\n"; - print "\n"; - print "\n"; - $var=!$var; - $ca[$b] = 0; - } - } - - if ($obj->sum > 0) { - print ""; - print "\n"; - print "\n"; - - print "\n"; - $month = $obj->dm + 1; - $ca[$obj->dm] = $obj->sum; - $total = $total + $obj->sum; - } - $i++; - } - - if ($num) { - $beg = $obj->dm; - } else { - $beg = 0 ; - } - - if ($beg <= 12 ) { - for ($b = $beg + 1 ; $b < 13 ; $b++) { - $var=!$var; - print ""; - print "\n"; - print "\n"; - print "\n"; - $ca[$b] = 0; - } - } - - print ""; - print "
'.$langs->trans("Month").'Montant
".dol_print_date(dol_mktime(12,0,0,$b, 1, $year),"%b")."0
dm\">"; - print dol_print_date(dol_mktime(12,0,0,$obj->dm, 1, $year),"%b")."".price($obj->sum)."
".dol_print_date(dol_mktime(12,0,0,$b, 1, $year),"%b")."0
Total :".price($total)."
"; - - $db->free(); - return $ca; - } else { - print $db->error(); - } -} - -function ppt ($db, $year, $socid) -{ - global $bc,$conf,$langs; - print ""; - - print '"; - print ""; - - print '
'; - print "CA Previsionnel base sur les propal $year"; - - print "CA Realise $yearDelta $year
'; - - $sql = "SELECT sum(p.price) as sum, round(date_format(p.datep,'%m')) as dm"; - $sql.= " FROM ".MAIN_DB_PREFIX."propal as p"; - $sql.= " WHERE p.fk_statut in (1,2,4)"; - $sql.= " AND p.entity = ".$conf->entity; - $sql.= " AND date_format(p.datep,'%Y') = '".$year."'"; - if ($socid) $sql.= " AND p.fk_soc = ".$socid; - $sql.= " GROUP BY dm"; - - $prev = pt($db, $sql, $year); - - print ""; - - $sql = "SELECT sum(f.total) as sum, round(date_format(f.datef, '%m')) as dm"; - $sql.= " FROM ".MAIN_DB_PREFIX."facture as f"; - $sql.= " WHERE f.fk_statut in (1,2)"; - $sql.= " AND f.entity = ".$conf->entity; - if ($conf->compta->mode != 'CREANCES-DETTES') $sql.= " AND f.paye = 1"; - $sql.= " AND date_format(f.datef,'%Y') = '".$year."'"; - if ($socid) $sql.= " AND f.fk_soc = ".$socid; - $sql.= " GROUP BY dm"; - - $ca = pt($db, $sql, $year); - - print ""; - - print ''; - print ""; - print ''; - print ''; - print "\n"; - - $var = 1 ; - for ($b = 1 ; $b <= 12 ; $b++) - { - $var=!$var; - - $delta = $ca[$b] - $prev[$b]; - $deltat = $deltat + $delta ; - print ""; - print "\n"; - print "\n"; - print "\n"; - } - - $ayear = $year - 1; - $acat = get_ca($db, $ayear, $socid) - get_ca_propal($db, $ayear, $socid); - - - print ""; - print ""; - print ""; - - print "
'.$langs->trans("Month").''.$langs->trans("Amount").'
".dol_print_date(dol_mktime(12,0,0,$b, 1, $year),"%b")."".price($delta)."
Total :".price($deltat)."
Rappel $ayear :".price($acat)."
Soit :".price($acat+$deltat)."
"; - print "
"; - -} - - -/* - * View - */ - -llxHeader(); - - -$cyear = isset($_GET["year"])?$_GET["year"]:0; -if (! $cyear) { $cyear = strftime ("%Y", time()); } - -print_fiche_titre("Chiffre d'Affaire transform� (pr�vu-r�alis�)",($cyear?"".img_previous()." Ann�e $cyear ".img_next()."":"")); - -ppt($db, $cyear, $socid); - -if ($details == 1) -{ - print "
"; - factures ($db, $year, $month, 1); - print ""; - propals ($db, $year, $month); - print "
"; -} -$db->close(); - - -llxFooter(); -?> diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 15e409863f7..a8029264aa7 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -41,10 +41,10 @@ $langs->load("bills"); $langs->load("products"); $action=GETPOST('action'); - -// Security check $socid = GETPOST("socid"); $contratid = GETPOST("id"); + +// Security check if ($user->societe_id) $socid=$user->societe_id; $result=restrictedArea($user,'contrat',$contratid,'contrat'); @@ -90,31 +90,31 @@ if ($action == 'confirm_closeline' && $_REQUEST["confirm"] == 'yes' && $user->ri // Si ajout champ produit predefini if ($_POST["mode"]=='predefined') { - $date_start=''; - $date_end=''; - if ($_POST["date_startmonth"] && $_POST["date_startday"] && $_POST["date_startyear"]) - { - $date_start=dol_mktime($_POST["date_starthour"], $_POST["date_startmin"], 0, $_POST["date_startmonth"], $_POST["date_startday"], $_POST["date_startyear"]); - } - if ($_POST["date_endmonth"] && $_POST["date_endday"] && $_POST["date_endyear"]) - { - $date_end=dol_mktime($_POST["date_endhour"], $_POST["date_endmin"], 0, $_POST["date_endmonth"], $_POST["date_endday"], $_POST["date_endyear"]); - } + $date_start=''; + $date_end=''; + if ($_POST["date_startmonth"] && $_POST["date_startday"] && $_POST["date_startyear"]) + { + $date_start=dol_mktime($_POST["date_starthour"], $_POST["date_startmin"], 0, $_POST["date_startmonth"], $_POST["date_startday"], $_POST["date_startyear"]); + } + if ($_POST["date_endmonth"] && $_POST["date_endday"] && $_POST["date_endyear"]) + { + $date_end=dol_mktime($_POST["date_endhour"], $_POST["date_endmin"], 0, $_POST["date_endmonth"], $_POST["date_endday"], $_POST["date_endyear"]); + } } // Si ajout champ produit libre if ($_POST["mode"]=='libre') { - $date_start_sl=''; - $date_end_sl=''; - if ($_POST["date_start_slmonth"] && $_POST["date_start_slday"] && $_POST["date_start_slyear"]) - { - $date_start_sl=dol_mktime($_POST["date_start_slhour"], $_POST["date_start_slmin"], 0, $_POST["date_start_slmonth"], $_POST["date_start_slday"], $_POST["date_start_slyear"]); - } - if ($_POST["date_end_slmonth"] && $_POST["date_end_slday"] && $_POST["date_end_slyear"]) - { - $date_end_sl=dol_mktime($_POST["date_end_slhour"], $_POST["date_end_slmin"], 0, $_POST["date_end_slmonth"], $_POST["date_end_slday"], $_POST["date_end_slyear"]); - } + $date_start_sl=''; + $date_end_sl=''; + if ($_POST["date_start_slmonth"] && $_POST["date_start_slday"] && $_POST["date_start_slyear"]) + { + $date_start_sl=dol_mktime($_POST["date_start_slhour"], $_POST["date_start_slmin"], 0, $_POST["date_start_slmonth"], $_POST["date_start_slday"], $_POST["date_start_slyear"]); + } + if ($_POST["date_end_slmonth"] && $_POST["date_end_slday"] && $_POST["date_end_slyear"]) + { + $date_end_sl=dol_mktime($_POST["date_end_slhour"], $_POST["date_end_slmin"], 0, $_POST["date_end_slmonth"], $_POST["date_end_slday"], $_POST["date_end_slyear"]); + } } // Param dates @@ -141,7 +141,7 @@ if ($_POST["date_end_real_updatemonth"] && $_POST["date_end_real_updateday"] && } if ($_POST["remonth"] && $_POST["reday"] && $_POST["reyear"]) { - $datecontrat = dol_mktime($_POST["rehour"], $_POST["remin"], 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + $datecontrat = dol_mktime($_POST["rehour"], $_POST["remin"], 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); } if ($action == 'add') @@ -194,43 +194,43 @@ if ($action == 'addline' && $user->rights->contrat->creer) { $ret=$object->fetch($_GET["id"]); if ($ret < 0) - { - dol_print_error($db,$commande->error); - exit; - } - $ret=$object->fetch_thirdparty(); + { + dol_print_error($db,$commande->error); + exit; + } + $ret=$object->fetch_thirdparty(); - $date_start=''; - $date_end=''; - // Si ajout champ produit libre - if ($_POST['mode'] == 'libre') - { - if ($_POST["date_start_slmonth"] && $_POST["date_start_slday"] && $_POST["date_start_slyear"]) - { - $date_start=dol_mktime($_POST["date_start_slhour"], $_POST["date_start_slmin"], 0, $_POST["date_start_slmonth"], $_POST["date_start_slday"], $_POST["date_start_slyear"]); - } - if ($_POST["date_end_slmonth"] && $_POST["date_end_slday"] && $_POST["date_end_slyear"]) - { - $date_end=dol_mktime($_POST["date_end_slhour"], $_POST["date_end_slmin"], 0, $_POST["date_end_slmonth"], $_POST["date_end_slday"], $_POST["date_end_slyear"]); - } - } - // Si ajout champ produit predefini - if ($_POST['mode'] == 'predefined') - { - if ($_POST["date_startmonth"] && $_POST["date_startday"] && $_POST["date_startyear"]) - { - $date_start=dol_mktime($_POST["date_starthour"], $_POST["date_startmin"], 0, $_POST["date_startmonth"], $_POST["date_startday"], $_POST["date_startyear"]); - } - if ($_POST["date_endmonth"] && $_POST["date_endday"] && $_POST["date_endyear"]) - { - $date_end=dol_mktime($_POST["date_endhour"], $_POST["date_endmin"], 0, $_POST["date_endmonth"], $_POST["date_endday"], $_POST["date_endyear"]); - } - } + $date_start=''; + $date_end=''; + // Si ajout champ produit libre + if ($_POST['mode'] == 'libre') + { + if ($_POST["date_start_slmonth"] && $_POST["date_start_slday"] && $_POST["date_start_slyear"]) + { + $date_start=dol_mktime($_POST["date_start_slhour"], $_POST["date_start_slmin"], 0, $_POST["date_start_slmonth"], $_POST["date_start_slday"], $_POST["date_start_slyear"]); + } + if ($_POST["date_end_slmonth"] && $_POST["date_end_slday"] && $_POST["date_end_slyear"]) + { + $date_end=dol_mktime($_POST["date_end_slhour"], $_POST["date_end_slmin"], 0, $_POST["date_end_slmonth"], $_POST["date_end_slday"], $_POST["date_end_slyear"]); + } + } + // Si ajout champ produit predefini + if ($_POST['mode'] == 'predefined') + { + if ($_POST["date_startmonth"] && $_POST["date_startday"] && $_POST["date_startyear"]) + { + $date_start=dol_mktime($_POST["date_starthour"], $_POST["date_startmin"], 0, $_POST["date_startmonth"], $_POST["date_startday"], $_POST["date_startyear"]); + } + if ($_POST["date_endmonth"] && $_POST["date_endday"] && $_POST["date_endyear"]) + { + $date_end=dol_mktime($_POST["date_endhour"], $_POST["date_endmin"], 0, $_POST["date_endmonth"], $_POST["date_endday"], $_POST["date_endyear"]); + } + } - // Ecrase $pu par celui du produit - // Ecrase $desc par celui du produit - // Ecrase $txtva par celui du produit - // Ecrase $base_price_type par celui du produit + // Ecrase $pu par celui du produit + // Ecrase $desc par celui du produit + // Ecrase $txtva par celui du produit + // Ecrase $base_price_type par celui du produit if ($_POST['idprod']) { $prod = new Product($db); @@ -242,97 +242,97 @@ if ($action == 'addline' && $user->rights->contrat->creer) // On defini prix unitaire if ($conf->global->PRODUIT_MULTIPRICES && $object->client->price_level) { - $pu_ht = $prod->multiprices[$object->client->price_level]; - $pu_ttc = $prod->multiprices_ttc[$object->client->price_level]; - $price_min = $prod->multiprices_min[$object->client->price_level]; - $price_base_type = $prod->multiprices_base_type[$object->client->price_level]; + $pu_ht = $prod->multiprices[$object->client->price_level]; + $pu_ttc = $prod->multiprices_ttc[$object->client->price_level]; + $price_min = $prod->multiprices_min[$object->client->price_level]; + $price_base_type = $prod->multiprices_base_type[$object->client->price_level]; } else { - $pu_ht = $prod->price; - $pu_ttc = $prod->price_ttc; - $price_min = $prod->price_min; - $price_base_type = $prod->price_base_type; + $pu_ht = $prod->price; + $pu_ttc = $prod->price_ttc; + $price_min = $prod->price_min; + $price_base_type = $prod->price_base_type; } - // On reevalue prix selon taux tva car taux tva transaction peut etre different - // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). - if ($tva_tx != $prod->tva_tx) - { - if ($price_base_type != 'HT') - { - $pu_ht = price2num($pu_ttc / (1 + ($tva_tx/100)), 'MU'); - } - else - { - $pu_ttc = price2num($pu_ht * (1 + ($tva_tx/100)), 'MU'); - } - } + // On reevalue prix selon taux tva car taux tva transaction peut etre different + // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). + if ($tva_tx != $prod->tva_tx) + { + if ($price_base_type != 'HT') + { + $pu_ht = price2num($pu_ttc / (1 + ($tva_tx/100)), 'MU'); + } + else + { + $pu_ttc = price2num($pu_ht * (1 + ($tva_tx/100)), 'MU'); + } + } $desc = $prod->description; - $desc.= $prod->description && $_POST['desc'] ? "\n" : ""; + $desc.= $prod->description && $_POST['desc'] ? "\n" : ""; $desc.= $_POST['desc']; } else { - $pu_ht=$_POST['pu']; - $price_base_type = 'HT'; - $tva_tx=str_replace('*','',$_POST['tva_tx']); - $tva_npr=preg_match('/\*/',$_POST['tva_tx'])?1:0; - $desc=$_POST['desc']; + $pu_ht=$_POST['pu']; + $price_base_type = 'HT'; + $tva_tx=str_replace('*','',$_POST['tva_tx']); + $tva_npr=preg_match('/\*/',$_POST['tva_tx'])?1:0; + $desc=$_POST['desc']; } $localtax1_tx=get_localtax($tva_tx,1,$object->client); $localtax2_tx=get_localtax($tva_tx,2,$object->client); - $info_bits=0; - if ($tva_npr) $info_bits |= 0x01; + $info_bits=0; + if ($tva_npr) $info_bits |= 0x01; - if($price_min && (price2num($pu_ht)*(1-price2num($_POST['remise_percent'])/100) < price2num($price_min))) - { - $object->error = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)); - $result = -1 ; - } - else - { - // Insert line - $result = $object->addline( - $desc, - $pu_ht, - $_POST["pqty"], - $tva_tx, - $localtax1_tx, - $localtax2_tx, - $_POST["idprod"], - $_POST["premise"], - $date_start, - $date_end, - $price_base_type, - $pu_ttc, - $info_bits - ); - } + if($price_min && (price2num($pu_ht)*(1-price2num($_POST['remise_percent'])/100) < price2num($price_min))) + { + $object->error = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)); + $result = -1 ; + } + else + { + // Insert line + $result = $object->addline( + $desc, + $pu_ht, + $_POST["pqty"], + $tva_tx, + $localtax1_tx, + $localtax2_tx, + $_POST["idprod"], + $_POST["premise"], + $date_start, + $date_end, + $price_base_type, + $pu_ttc, + $info_bits + ); + } - if ($result > 0) - { - /* - // Define output language - $outputlangs = $langs; - $newlang=''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang; - if (! empty($newlang)) - { - $outputlangs = new Translate("",$conf); - $outputlangs->setDefaultLang($newlang); - } - contrat_pdf_create($db, $object->id, $object->modelpdf, $outputlangs); - */ - } - else - { + if ($result > 0) + { + /* + // Define output language + $outputlangs = $langs; + $newlang=''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang; + if (! empty($newlang)) + { + $outputlangs = new Translate("",$conf); + $outputlangs->setDefaultLang($newlang); + } + contrat_pdf_create($db, $object->id, $object->modelpdf, $outputlangs); + */ + } + else + { $mesg='
'.$object->error.'
'; - } + } } } @@ -341,31 +341,31 @@ if ($action == 'updateligne' && $user->rights->contrat->creer && ! $_POST["cance $objectline = new ContratLigne($db); if ($objectline->fetch($_POST["elrowid"])) { - $db->begin(); + $db->begin(); - if ($date_start_real_update == '') $date_start_real_update=$objectline->date_ouverture; - if ($date_end_real_update == '') $date_end_real_update=$objectline->date_cloture; + if ($date_start_real_update == '') $date_start_real_update=$objectline->date_ouverture; + if ($date_end_real_update == '') $date_end_real_update=$objectline->date_cloture; - $localtax1_tx=get_localtax($_POST["eltva_tx"],1,$object->client); + $localtax1_tx=get_localtax($_POST["eltva_tx"],1,$object->client); $localtax2_tx=get_localtax($_POST["eltva_tx"],2,$object->client); - $objectline->description=$_POST["eldesc"]; - $objectline->price_ht=$_POST["elprice"]; - $objectline->subprice=$_POST["elprice"]; + $objectline->description=$_POST["eldesc"]; + $objectline->price_ht=$_POST["elprice"]; + $objectline->subprice=$_POST["elprice"]; $objectline->qty=$_POST["elqty"]; $objectline->remise_percent=$_POST["elremise_percent"]; - $objectline->tva_tx=$_POST["eltva_tx"]; - $objectline->localtax1_tx=$localtax1_tx; - $objectline->localtax2_tx=$localtax2_tx; - $objectline->date_ouverture_prevue=$date_start_update; - $objectline->date_ouverture=$date_start_real_update; - $objectline->date_fin_validite=$date_end_update; + $objectline->tva_tx=$_POST["eltva_tx"]; + $objectline->localtax1_tx=$localtax1_tx; + $objectline->localtax2_tx=$localtax2_tx; + $objectline->date_ouverture_prevue=$date_start_update; + $objectline->date_ouverture=$date_start_real_update; + $objectline->date_fin_validite=$date_end_update; $objectline->date_cloture=$date_end_real_update; - $objectline->fk_user_cloture=$user->id; + $objectline->fk_user_cloture=$user->id; - // TODO verifier price_min si fk_product et multiprix + // TODO verifier price_min si fk_product et multiprix - $result=$objectline->update($user); + $result=$objectline->update($user); if ($result > 0) { $db->commit(); @@ -392,10 +392,10 @@ if ($action == 'confirm_deleteline' && $_REQUEST["confirm"] == 'yes' && $user->r Header("Location: fiche.php?id=".$object->id); exit; } - else - { - $mesg=$object->error; - } + else + { + $mesg=$object->error; + } } if ($action == 'confirm_valid' && $_REQUEST["confirm"] == 'yes' && $user->rights->contrat->creer) @@ -418,14 +418,14 @@ if ($action == 'confirm_delete' && $_REQUEST["confirm"] == 'yes') $object->id = $_GET["id"]; $result=$object->delete($user,$langs,$conf); if ($result >= 0) - { - Header("Location: index.php"); - return; - } - else - { - $mesg='
'.$object->error.'
'; - } + { + Header("Location: index.php"); + return; + } + else + { + $mesg='
'.$object->error.'
'; + } } } @@ -433,26 +433,26 @@ if ($action == 'confirm_move' && $_REQUEST["confirm"] == 'yes') { if ($user->rights->contrat->creer) { - if ($_POST['newcid'] > 0) - { - $contractline = new ContratLigne($db); - $result=$contractline->fetch($_GET["lineid"]); - $contractline->fk_contrat = $_POST["newcid"]; - $result=$contractline->update($user,1); - if ($result >= 0) - { - Header("Location: ".$_SERVER['PHP_SELF'].'?id='.$_GET['id']); - return; - } - else - { - $mesg='
'.$object->error.'
'; - } - } - else - { - $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("RefNewContract")).'
'; - } + if ($_POST['newcid'] > 0) + { + $contractline = new ContratLigne($db); + $result=$contractline->fetch($_GET["lineid"]); + $contractline->fk_contrat = $_POST["newcid"]; + $result=$contractline->update($user,1); + if ($result >= 0) + { + Header("Location: ".$_SERVER['PHP_SELF'].'?id='.$_GET['id']); + return; + } + else + { + $mesg='
'.$object->error.'
'; + } + } + else + { + $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("RefNewContract")).'
'; + } } } @@ -483,10 +483,10 @@ if ($action == 'create') $soc = new Societe($db); $soc->fetch($socid); - $object->date_contrat = dol_now(); - if ($contratid) $result=$object->fetch($contratid); + $object->date_contrat = dol_now(); + if ($contratid) $result=$object->fetch($contratid); - $numct = $object->getNextNumRef($soc); + $numct = $object->getNextNumRef($soc); print '
'; print ''; @@ -531,9 +531,9 @@ if ($action == 'create') if ($conf->projet->enabled) { - print ''.$langs->trans("Project").''; - select_projects($soc->id,GETPOST("projectid"),"projectid"); - print ""; + print ''.$langs->trans("Project").''; + select_projects($soc->id,GETPOST("projectid"),"projectid"); + print ""; } print ''.$langs->trans("NotePublic").''; @@ -543,10 +543,10 @@ if ($action == 'create') if (! $user->societe_id) { - print ''.$langs->trans("NotePrivate").''; - print ''; + print ''.$langs->trans("NotePrivate").''; + print ''; } print "\n"; @@ -564,17 +564,17 @@ else /* */ /* *************************************************************************** */ { - $now=dol_now(); + $now=dol_now(); $id = $_GET["id"]; - $ref= $_GET['ref']; - if ($id > 0 || ! empty($ref)) + $ref= $_GET['ref']; + if ($id > 0 || ! empty($ref)) { $result=$object->fetch($_GET['id'],$_GET['ref']); if ($result > 0) { - $id = $object->id; // if $_GET['ref'] - $result=$object->fetch_lines(); + $id = $object->id; // if $_GET['ref'] + $result=$object->fetch_lines(); } if ($result < 0) { @@ -584,7 +584,7 @@ else dol_htmloutput_errors($mesg,''); - $nbofservices=count($object->lines); + $nbofservices=count($object->lines); $author = new User($db); $author->fetch($object->user_author_id); @@ -595,7 +595,7 @@ else $commercial_suivi = new User($db); $commercial_suivi->fetch($object->commercial_suivi_id); - $head = contract_prepare_head($object); + $head = contract_prepare_head($object); $hselected = 0; @@ -608,7 +608,7 @@ else if ($action == 'delete') { $ret=$form->form_confirm("fiche.php?id=$id",$langs->trans("DeleteAContract"),$langs->trans("ConfirmDeleteAContract"),"confirm_delete",'',0,1); - if ($ret == 'html') print '
'; + if ($ret == 'html') print '
'; } /* @@ -618,7 +618,7 @@ else { //$numfa = contrat_get_num($soc); $ret=$form->form_confirm("fiche.php?id=$id",$langs->trans("ValidateAContract"),$langs->trans("ConfirmValidateContract"),"confirm_valid",'',0,1); - if ($ret == 'html') print '
'; + if ($ret == 'html') print '
'; } /* @@ -627,7 +627,7 @@ else if ($action == 'close') { $ret=$form->form_confirm("fiche.php?id=$id",$langs->trans("CloseAContract"),$langs->trans("ConfirmCloseContract"),"confirm_close",'',0,1); - if ($ret == 'html') print '
'; + if ($ret == 'html') print '
'; } /* @@ -644,28 +644,28 @@ else // Ref du contrat print ''.$langs->trans("Ref").''; - print $html->showrefnav($object,'ref','',1,'ref','ref',''); + print $html->showrefnav($object,'ref','',1,'ref','ref',''); print ""; // Customer print "".$langs->trans("Customer").""; print ''.$object->societe->getNomUrl(1).''; - // Ligne info remises tiers + // Ligne info remises tiers print ''.$langs->trans('Discount').''; - if ($object->societe->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$object->societe->remise_client); - else print $langs->trans("CompanyHasNoRelativeDiscount"); - $absolute_discount=$object->societe->getAvailableDiscounts(); - print '. '; - if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->trans("Currency".$conf->monnaie)); - else print $langs->trans("CompanyHasNoAbsoluteDiscount"); - print '.'; - print ''; + if ($object->societe->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$object->societe->remise_client); + else print $langs->trans("CompanyHasNoRelativeDiscount"); + $absolute_discount=$object->societe->getAvailableDiscounts(); + print '. '; + if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->trans("Currency".$conf->monnaie)); + else print $langs->trans("CompanyHasNoAbsoluteDiscount"); + print '.'; + print ''; // Statut contrat print ''.$langs->trans("Status").''; if ($object->statut==0) print $object->getLibStatut(2); - else print $object->getLibStatut(4); + else print $object->getLibStatut(4); print ""; // Date @@ -701,528 +701,528 @@ else print '
'; } - echo '
'; + echo '
'; - $servicepos=(isset($_REQUEST["servicepos"])?$_REQUEST["servicepos"]:1); - $colorb='666666'; + $servicepos=(isset($_REQUEST["servicepos"])?$_REQUEST["servicepos"]:1); + $colorb='666666'; - $arrayothercontracts=$object->getListOfContracts('others'); + $arrayothercontracts=$object->getListOfContracts('others'); - /* + /* * Lines of contracts */ $productstatic=new Product($db); - // Title line for service - print ''; // Array with (n*2)+1 lines - $cursorline=1; - while ($cursorline <= $nbofservices) - { - print ''; - print ''; + // Title line for service + print '
'; - print $langs->trans("ServiceNb",$cursorline).'
'; // Array with (n*2)+1 lines + $cursorline=1; + while ($cursorline <= $nbofservices) + { + print ''; + print ''; - print '
'; + print $langs->trans("ServiceNb",$cursorline).''; + print ''; - // Area with common detail of line - print ''; + // Area with common detail of line + print '
'; - $sql = "SELECT cd.rowid, cd.statut, cd.label as label_det, cd.fk_product, cd.description, cd.price_ht, cd.qty,"; - $sql.= " cd.tva_tx, cd.remise_percent, cd.info_bits, cd.subprice,"; - $sql.= " cd.date_ouverture_prevue as date_debut, cd.date_ouverture as date_debut_reelle,"; - $sql.= " cd.date_fin_validite as date_fin, cd.date_cloture as date_fin_reelle,"; - $sql.= " cd.commentaire as comment,"; - $sql.= " p.rowid as pid, p.ref as pref, p.label as label, p.fk_product_type as ptype"; - $sql.= " FROM ".MAIN_DB_PREFIX."contratdet as cd"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid"; - $sql.= " WHERE cd.rowid = ".$object->lines[$cursorline-1]->id; + $sql = "SELECT cd.rowid, cd.statut, cd.label as label_det, cd.fk_product, cd.description, cd.price_ht, cd.qty,"; + $sql.= " cd.tva_tx, cd.remise_percent, cd.info_bits, cd.subprice,"; + $sql.= " cd.date_ouverture_prevue as date_debut, cd.date_ouverture as date_debut_reelle,"; + $sql.= " cd.date_fin_validite as date_fin, cd.date_cloture as date_fin_reelle,"; + $sql.= " cd.commentaire as comment,"; + $sql.= " p.rowid as pid, p.ref as pref, p.label as label, p.fk_product_type as ptype"; + $sql.= " FROM ".MAIN_DB_PREFIX."contratdet as cd"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid"; + $sql.= " WHERE cd.rowid = ".$object->lines[$cursorline-1]->id; - $result = $db->query($sql); - if ($result) - { - $total = 0; + $result = $db->query($sql); + if ($result) + { + $total = 0; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; - $var=true; + $var=true; - $objp = $db->fetch_object($result); + $objp = $db->fetch_object($result); - $var=!$var; + $var=!$var; - if ($_REQUEST["action"] != 'editline' || $_GET["rowid"] != $objp->rowid) - { - print ''; - // Libelle - if ($objp->fk_product > 0) - { - print ''; + // Libelle + if ($objp->fk_product > 0) + { + print ''; - } - else - { - print "\n"; - } - // TVA - print ''; - // Prix - print '\n"; - // Quantite - print ''; - // Remise - if ($objp->remise_percent > 0) - { - print '\n"; - } - else - { - print ''; - } - // Icon move, update et delete (statut contrat 0=brouillon,1=valide,2=ferme) - print ''; + if ($objp->description) print '
'.dol_nl2br($objp->description); + print ''; + } + else + { + print "\n"; + } + // TVA + print ''; + // Prix + print '\n"; + // Quantite + print ''; + // Remise + if ($objp->remise_percent > 0) + { + print '\n"; + } + else + { + print ''; + } + // Icon move, update et delete (statut contrat 0=brouillon,1=valide,2=ferme) + print ''; - print "\n"; + print "\n"; - // Dates de en service prevues et effectives - if ($objp->subprice >= 0) - { - print ''; - print ''; + print ''; - print ''; - } - } - // Ligne en mode update - else - { - print ""; - print ''; - print ''; - print ''; - // Ligne carac - print ""; - print ''; + print ''; + } + } + // Ligne en mode update + else + { + print ""; + print ''; + print ''; + print ''; + // Ligne carac + print ""; + print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - // Ligne dates prevues - print ""; - print ''; - print ''; + print '
'; + } + else + { + print $objp->label?$objp->label.'
':''; + } + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + // Ligne dates prevues + print ""; + print ''; + print ''; - print "\n"; - } + print "\n"; + } - $db->free($result); - } - else - { - dol_print_error($db); - } + $db->free($result); + } + else + { + dol_print_error($db); + } - if ($object->statut > 0) - { - print ''; - print ''; - print "\n"; - } + if ($object->statut > 0) + { + print ''; + print ''; + print "\n"; + } - print "
'.$langs->trans("Service").''.$langs->trans("VAT").''.$langs->trans("PriceUHT").''.$langs->trans("Qty").''.$langs->trans("ReductionShort").' 
'.$langs->trans("Service").''.$langs->trans("VAT").''.$langs->trans("PriceUHT").''.$langs->trans("Qty").''.$langs->trans("ReductionShort").' 
'; + if ($_REQUEST["action"] != 'editline' || $_GET["rowid"] != $objp->rowid) + { + print '
'; $productstatic->id=$objp->fk_product; $productstatic->type=$objp->ptype; $productstatic->ref=$objp->pref; print $productstatic->getNomUrl(1,'',20); print $objp->label?' - '.dol_trunc($objp->label,16):''; - if ($objp->description) print '
'.dol_nl2br($objp->description); - print '
".nl2br($objp->description)."'.vatrate($objp->tva_tx,'%',$objp->info_bits).''.price($objp->subprice)."'.$objp->qty.''.$objp->remise_percent."% '; - if ($user->rights->contrat->creer && count($arrayothercontracts) && ($object->statut >= 0)) - { - print ''; - print img_picto($langs->trans("MoveToAnotherContract"),'uparrow'); - print ''; - } - else { - print ' '; - } - if ($user->rights->contrat->creer && ($object->statut >= 0)) - { - print ''; - print img_edit(); - print ''; - } - else { - print ' '; - } - if ( $user->rights->contrat->creer && ($object->statut >= 0)) - { - print ' '; - print ''; - print img_delete(); - print ''; - } - print '".nl2br($objp->description)."'.vatrate($objp->tva_tx,'%',$objp->info_bits).''.price($objp->subprice)."'.$objp->qty.''.$objp->remise_percent."% '; + if ($user->rights->contrat->creer && count($arrayothercontracts) && ($object->statut >= 0)) + { + print ''; + print img_picto($langs->trans("MoveToAnotherContract"),'uparrow'); + print ''; + } + else { + print ' '; + } + if ($user->rights->contrat->creer && ($object->statut >= 0)) + { + print ''; + print img_edit(); + print ''; + } + else { + print ' '; + } + if ( $user->rights->contrat->creer && ($object->statut >= 0)) + { + print ' '; + print ''; + print img_delete(); + print ''; + } + print '
'; + // Dates de en service prevues et effectives + if ($objp->subprice >= 0) + { + print '
'; - // Date planned - print $langs->trans("DateStartPlanned").': '; - if ($objp->date_debut) - { - print dol_print_date($db->jdate($objp->date_debut)); - // Warning si date prevu passee et pas en service - if ($objp->statut == 0 && $db->jdate($objp->date_debut) < ($now - $conf->contrat->services->inactifs->warning_delay)) { print " ".img_warning($langs->trans("Late")); } - } - else print $langs->trans("Unknown"); - print '  -  '; - print $langs->trans("DateEndPlanned").': '; - if ($objp->date_fin) - { - print dol_print_date($db->jdate($objp->date_fin)); - if ($objp->statut == 4 && $db->jdate($objp->date_fin) < ($now - $conf->contrat->services->expires->warning_delay)) { print " ".img_warning($langs->trans("Late")); } - } - else print $langs->trans("Unknown"); + // Date planned + print $langs->trans("DateStartPlanned").': '; + if ($objp->date_debut) + { + print dol_print_date($db->jdate($objp->date_debut)); + // Warning si date prevu passee et pas en service + if ($objp->statut == 0 && $db->jdate($objp->date_debut) < ($now - $conf->contrat->services->inactifs->warning_delay)) { print " ".img_warning($langs->trans("Late")); } + } + else print $langs->trans("Unknown"); + print '  -  '; + print $langs->trans("DateEndPlanned").': '; + if ($objp->date_fin) + { + print dol_print_date($db->jdate($objp->date_fin)); + if ($objp->statut == 4 && $db->jdate($objp->date_fin) < ($now - $conf->contrat->services->expires->warning_delay)) { print " ".img_warning($langs->trans("Late")); } + } + else print $langs->trans("Unknown"); - print '
'; - if ($objp->fk_product) - { + print '
'; + if ($objp->fk_product) + { $productstatic->id=$objp->fk_product; $productstatic->type=$objp->ptype; $productstatic->ref=$objp->pref; print $productstatic->getNomUrl(1,'',20); print $objp->label?' - '.dol_trunc($objp->label,16):''; - print '
'; - } - else - { - print $objp->label?$objp->label.'
':''; - } - print '
'; - print $form->load_tva("eltva_tx",$objp->tva_tx,$mysoc,$object->societe); - print '%'; - print '
'; - print '
'; - print $langs->trans("DateStartPlanned").' '; - $form->select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update"); - print '
'.$langs->trans("DateEndPlanned").' '; - $form->select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update"); - print '
'; + print $form->load_tva("eltva_tx",$objp->tva_tx,$mysoc,$object->societe); + print '%'; + print '
'; + print '
'; + print $langs->trans("DateStartPlanned").' '; + $form->select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update"); + print '
'.$langs->trans("DateEndPlanned").' '; + $form->select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update"); + print '


"; + print "
"; - /* - * Confirmation to delete service line of contract - */ - if ($_REQUEST["action"] == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline-1]->id == $_GET["rowid"]) - { - $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".$_GET["rowid"],$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1); - if ($ret == 'html') print '
'; - } + /* + * Confirmation to delete service line of contract + */ + if ($_REQUEST["action"] == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline-1]->id == $_GET["rowid"]) + { + $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".$_GET["rowid"],$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1); + if ($ret == 'html') print '
'; + } - /* - * Confirmation to move service toward another contract - */ - if ($_REQUEST["action"] == 'move' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline-1]->id == $_GET["rowid"]) - { - $arraycontractid=array(); - foreach($arrayothercontracts as $contractcursor) - { - $arraycontractid[$contractcursor->id]=$contractcursor->ref; - } - //var_dump($arraycontractid); - // Cree un tableau formulaire - $formquestion=array( + /* + * Confirmation to move service toward another contract + */ + if ($_REQUEST["action"] == 'move' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline-1]->id == $_GET["rowid"]) + { + $arraycontractid=array(); + foreach($arrayothercontracts as $contractcursor) + { + $arraycontractid[$contractcursor->id]=$contractcursor->ref; + } + //var_dump($arraycontractid); + // Cree un tableau formulaire + $formquestion=array( 'text' => $langs->trans("ConfirmMoveToAnotherContractQuestion"), - array('type' => 'select', 'name' => 'newcid', 'values' => $arraycontractid)); + array('type' => 'select', 'name' => 'newcid', 'values' => $arraycontractid)); - $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".$_GET["rowid"],$langs->trans("MoveToAnotherContract"),$langs->trans("ConfirmMoveToAnotherContract"),"confirm_move",$formquestion); - print '
'; - } + $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".$_GET["rowid"],$langs->trans("MoveToAnotherContract"),$langs->trans("ConfirmMoveToAnotherContract"),"confirm_move",$formquestion); + print '
'; + } - /* - * Confirmation de la validation activation - */ - if ($_REQUEST["action"] == 'active' && ! $_REQUEST["cancel"] && $user->rights->contrat->activer && $object->lines[$cursorline-1]->id == $_GET["ligne"]) - { - $dateactstart = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); - $dateactend = dol_mktime(12, 0, 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); - $comment = $_POST["comment"]; - $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1); - print '
'; - } + /* + * Confirmation de la validation activation + */ + if ($_REQUEST["action"] == 'active' && ! $_REQUEST["cancel"] && $user->rights->contrat->activer && $object->lines[$cursorline-1]->id == $_GET["ligne"]) + { + $dateactstart = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + $dateactend = dol_mktime(12, 0, 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); + $comment = $_POST["comment"]; + $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1); + print '
'; + } - /* - * Confirmation de la validation fermeture - */ - if ($_REQUEST["action"] == 'closeline' && ! $_REQUEST["cancel"] && $user->rights->contrat->activer && $object->lines[$cursorline-1]->id == $_GET["ligne"]) - { - $dateactstart = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); - $dateactend = dol_mktime(12, 0, 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); - $comment = $_POST["comment"]; - $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1); - print '
'; - } + /* + * Confirmation de la validation fermeture + */ + if ($_REQUEST["action"] == 'closeline' && ! $_REQUEST["cancel"] && $user->rights->contrat->activer && $object->lines[$cursorline-1]->id == $_GET["ligne"]) + { + $dateactstart = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + $dateactend = dol_mktime(12, 0, 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); + $comment = $_POST["comment"]; + $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1); + print '
'; + } - // Area with status and activation info of line - if ($object->statut > 0) - { - print ''; + // Area with status and activation info of line + if ($object->statut > 0) + { + print '
'; - print ''; - print ''; - print ''; - print "\n"; + print ''; + print ''; + print ''; + print "\n"; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; - print '
'.$langs->trans("ServiceStatus").': '.$object->lines[$cursorline-1]->getLibStatut(4).''; - if ($user->societe_id == 0) - { - if ($object->statut > 0 && $_REQUEST["action"] != 'activateline' && $_REQUEST["action"] != 'unactivateline') - { - $action='activateline'; - if ($objp->statut == 4) $action='unactivateline'; - print ''; - print img_edit(); - print ''; - } - } - print '
'.$langs->trans("ServiceStatus").': '.$object->lines[$cursorline-1]->getLibStatut(4).''; + if ($user->societe_id == 0) + { + if ($object->statut > 0 && $_REQUEST["action"] != 'activateline' && $_REQUEST["action"] != 'unactivateline') + { + $action='activateline'; + if ($objp->statut == 4) $action='unactivateline'; + print ''; + print img_edit(); + print ''; + } + } + print '
'; - // Si pas encore active - if (! $objp->date_debut_reelle) { - print $langs->trans("DateStartReal").': '; - if ($objp->date_debut_reelle) print dol_print_date($objp->date_debut_reelle); - else print $langs->trans("ContractStatusNotRunning"); - } - // Si active et en cours - if ($objp->date_debut_reelle && ! $objp->date_fin_reelle) { - print $langs->trans("DateStartReal").': '; - print dol_print_date($objp->date_debut_reelle); - } - // Si desactive - if ($objp->date_debut_reelle && $objp->date_fin_reelle) { - print $langs->trans("DateStartReal").': '; - print dol_print_date($objp->date_debut_reelle); - print '  -  '; - print $langs->trans("DateEndReal").': '; - print dol_print_date($objp->date_fin_reelle); - } - if (! empty($objp->comment)) print "
".$objp->comment; - print '
'; + // Si pas encore active + if (! $objp->date_debut_reelle) { + print $langs->trans("DateStartReal").': '; + if ($objp->date_debut_reelle) print dol_print_date($objp->date_debut_reelle); + else print $langs->trans("ContractStatusNotRunning"); + } + // Si active et en cours + if ($objp->date_debut_reelle && ! $objp->date_fin_reelle) { + print $langs->trans("DateStartReal").': '; + print dol_print_date($objp->date_debut_reelle); + } + // Si desactive + if ($objp->date_debut_reelle && $objp->date_fin_reelle) { + print $langs->trans("DateStartReal").': '; + print dol_print_date($objp->date_debut_reelle); + print '  -  '; + print $langs->trans("DateEndReal").': '; + print dol_print_date($objp->date_fin_reelle); + } + if (! empty($objp->comment)) print "
".$objp->comment; + print '
  
'; - } + print ''; + print ''; + } - if ($user->rights->contrat->activer && $_REQUEST["action"] == 'activateline' && $object->lines[$cursorline-1]->id == $_GET["ligne"]) - { - /** - * Activer la ligne de contrat - */ - print '
'; - print ''; + if ($user->rights->contrat->activer && $_REQUEST["action"] == 'activateline' && $object->lines[$cursorline-1]->id == $_GET["ligne"]) + { + /** + * Activer la ligne de contrat + */ + print ''; + print ''; - print ''; - //print ''; + print '
'.$langs->trans("Status").'
'; + //print ''; - // Definie date debut et fin par defaut - $dateactstart = $objp->date_debut; - if ($_POST["remonth"]) $dateactstart = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); - elseif (! $dateactstart) $dateactstart = time(); + // Definie date debut et fin par defaut + $dateactstart = $objp->date_debut; + if ($_POST["remonth"]) $dateactstart = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + elseif (! $dateactstart) $dateactstart = time(); - $dateactend = $objp->date_fin; - if ($_POST["endmonth"]) $dateactend = dol_mktime(12, 0, 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); - elseif (! $dateactend) - { - if ($objp->fk_product > 0) - { - $product=new Product($db); - $product->fetch($objp->fk_product); - $dateactend = dol_time_plus_duree (time(), $product->duration_value, $product->duration_unit); - } - } + $dateactend = $objp->date_fin; + if ($_POST["endmonth"]) $dateactend = dol_mktime(12, 0, 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); + elseif (! $dateactend) + { + if ($objp->fk_product > 0) + { + $product=new Product($db); + $product->fetch($objp->fk_product); + $dateactend = dol_time_plus_duree (time(), $product->duration_value, $product->duration_unit); + } + } - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print '
'.$langs->trans("Status").'
'.$langs->trans("DateServiceActivate").''; - print $html->select_date($dateactstart,'',$usehm,$usehm,'',"active"); - print '
'.$langs->trans("DateServiceActivate").''; + print $html->select_date($dateactstart,'',$usehm,$usehm,'',"active"); + print ''.$langs->trans("DateEndPlanned").''; - print $html->select_date($dateactend,"end",$usehm,$usehm,'',"active"); - print ''.$langs->trans("DateEndPlanned").''; + print $html->select_date($dateactend,"end",$usehm,$usehm,'',"active"); + print ''; - print '
'; - print ''; - print '
'; + print '
'; + print ''; + print '
'.$langs->trans("Comment").'
'.$langs->trans("Comment").'
'; + print ''; - print '
'; - } + print ''; + } - if ($user->rights->contrat->activer && $_REQUEST["action"] == 'unactivateline' && $object->lines[$cursorline-1]->id == $_GET["ligne"]) - { - /** - * Desactiver la ligne de contrat - */ - print '
'; - print ''; + if ($user->rights->contrat->activer && $_REQUEST["action"] == 'unactivateline' && $object->lines[$cursorline-1]->id == $_GET["ligne"]) + { + /** + * Desactiver la ligne de contrat + */ + print ''; + print ''; - print ''; + print '
'; - // Definie date debut et fin par defaut - $dateactstart = $objp->date_debut_reelle; - if ($_POST["remonth"]) $dateactstart = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); - elseif (! $dateactstart) $dateactstart = time(); + // Definie date debut et fin par defaut + $dateactstart = $objp->date_debut_reelle; + if ($_POST["remonth"]) $dateactstart = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + elseif (! $dateactstart) $dateactstart = time(); - $dateactend = $objp->date_fin_reelle; - if ($_POST["endmonth"]) $dateactend = dol_mktime(12, 0, 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); - elseif (! $dateactend) - { - if ($objp->fk_product > 0) - { - $product=new Product($db); - $product->fetch($objp->fk_product); - $dateactend = dol_time_plus_duree (time(), $product->duration_value, $product->duration_unit); - } - } - $now=mktime(); - if ($dateactend > $now) $dateactend=$now; + $dateactend = $objp->date_fin_reelle; + if ($_POST["endmonth"]) $dateactend = dol_mktime(12, 0, 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); + elseif (! $dateactend) + { + if ($objp->fk_product > 0) + { + $product=new Product($db); + $product->fetch($objp->fk_product); + $dateactend = dol_time_plus_duree (time(), $product->duration_value, $product->duration_unit); + } + } + $now=mktime(); + if ($dateactend > $now) $dateactend=$now; - print ''; + print ''; - print ''; + print ''; - print ''; - print '
'; - if ($objp->statut >= 4) - { - if ($objp->statut == 4) - { - print $langs->trans("DateEndReal").' '; - $form->select_date($dateactend,"end",$usehm,$usehm,($objp->date_fin_reelle>0?0:1),"closeline"); - } - } - print '
'; + if ($objp->statut >= 4) + { + if ($objp->statut == 4) + { + print $langs->trans("DateEndReal").' '; + $form->select_date($dateactend,"end",$usehm,$usehm,($objp->date_fin_reelle>0?0:1),"closeline"); + } + } + print '
'; - print ''; - print '

'; + print ''; + print '
'.$langs->trans("Comment").'
'; + print ''.$langs->trans("Comment").''; + print ''; - print '
'; - } + print ''; + } - print ''; // End td if line is 1 + print ''; // End td if line is 1 - print ''; - print ' '; - $cursorline++; - } - print ''; + print ''; + print ' '; + $cursorline++; + } + print ''; - /* - * Ajouter une ligne produit/service - */ - if ($user->rights->contrat->creer && ($object->statut >= 0)) - { - print '
'; - print ''; // Array with (n*2)+1 lines + /* + * Ajouter une ligne produit/service + */ + if ($user->rights->contrat->creer && ($object->statut >= 0)) + { + print '
'; + print '
'; // Array with (n*2)+1 lines - print ""; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; + print ""; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; - $var=false; + $var=false; - // Service sur produit predefini - print ''; - print ''; - print ''; - print ''; - print ''; + // Service sur produit predefini + print ''; + print ''; + print ''; + print ''; + print ''; - print ""; - print ''; + print ""; + print ''; - print ''; - print ''; - print ''; - print ''."\n"; + print ''; + print ''; + print ''; + print ''."\n"; - print ""; - print ''; - print ''; + print ""; + print ''; + print ''; - print ''; + print ''; - $var=!$var; + $var=!$var; - // Service libre - print ''; - print ''; - print ''; - print ''; - print ''; + // Service libre + print ''; + print ''; + print ''; + print ''; + print ''; - print ""; - print ''; + print ""; + print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; - print ''."\n"; + print ''."\n"; - print ""; - print ''; - print ''; + print ""; + print ''; + print ''; - print ''; + print ''; - print '
'.$langs->trans("Service").''.$langs->trans("VAT").''.$langs->trans("PriceUHT").''.$langs->trans("Qty").''.$langs->trans("ReductionShort").'  
'.$langs->trans("Service").''.$langs->trans("VAT").''.$langs->trans("PriceUHT").''.$langs->trans("Qty").''.$langs->trans("ReductionShort").'  
'; - // multiprix - if($conf->global->PRODUIT_MULTIPRICES) - $form->select_produits('','idprod',1,$conf->product->limit_size,$object->societe->price_level); - else - $form->select_produits('','idprod',1,$conf->product->limit_size); - if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '
'; - print ''; - print '
'; + // multiprix + if($conf->global->PRODUIT_MULTIPRICES) + $form->select_produits('','idprod',1,$conf->product->limit_size,$object->societe->price_level); + else + $form->select_produits('','idprod',1,$conf->product->limit_size); + if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '
'; + print ''; + print '
%
%
'; - print $langs->trans("DateStartPlanned").' '; - $form->select_date('',"date_start",$usehm,$usehm,1,"addline"); - print '   '.$langs->trans("DateEndPlanned").' '; - $form->select_date('',"date_end",$usehm,$usehm,1,"addline"); - print '
'; + print $langs->trans("DateStartPlanned").' '; + $form->select_date('',"date_start",$usehm,$usehm,1,"addline"); + print '   '.$langs->trans("DateEndPlanned").' '; + $form->select_date('',"date_end",$usehm,$usehm,1,"addline"); + print '
'; - print $form->load_tva("tva_tx",-1,$mysoc,$object->societe); - print '%'; + print $form->load_tva("tva_tx",-1,$mysoc,$object->societe); + print '%
'; - print $langs->trans("DateStartPlanned").' '; - $form->select_date('',"date_start_sl",$usehm,$usehm,1,"addline_sl"); - print '   '.$langs->trans("DateEndPlanned").' '; - $form->select_date('',"date_end_sl",$usehm,$usehm,1,"addline_sl"); - print '
'; + print $langs->trans("DateStartPlanned").' '; + $form->select_date('',"date_start_sl",$usehm,$usehm,1,"addline_sl"); + print '   '.$langs->trans("DateEndPlanned").' '; + $form->select_date('',"date_end_sl",$usehm,$usehm,1,"addline_sl"); + print '
'; - } + print ''; + } - //print ''; + //print ''; - //print ''; + //print ''; print ''; @@ -1238,45 +1238,45 @@ else if ($object->statut == 0 && $nbofservices) { if ($user->rights->contrat->creer) print ''.$langs->trans("Validate").''; - else print ''.$langs->trans("Validate").''; + else print ''.$langs->trans("Validate").''; } if ($conf->facture->enabled && $object->statut > 0) { $langs->load("bills"); - if ($user->rights->facture->creer) print ''.$langs->trans("CreateBill").''; - else print ''.$langs->trans("CreateBill").''; + if ($user->rights->facture->creer) print ''.$langs->trans("CreateBill").''; + else print ''.$langs->trans("CreateBill").''; } - if ($object->nbofservicesclosed < $nbofservices) + if ($object->nbofservicesclosed < $nbofservices) { - //if (! $numactive) - //{ - print ''.$langs->trans("CloseAllContracts").''; - //} - //else - //{ - // print ''.$langs->trans("Close").''; - //} + //if (! $numactive) + //{ + print ''.$langs->trans("CloseAllContracts").''; + //} + //else + //{ + // print ''.$langs->trans("Close").''; + //} } // On peut supprimer entite si - // - Droit de creer + mode brouillon (erreur creation) - // - Droit de supprimer - if (($user->rights->contrat->creer && $object->statut == 0) || $user->rights->contrat->supprimer) + // - Droit de creer + mode brouillon (erreur creation) + // - Droit de supprimer + if (($user->rights->contrat->creer && $object->statut == 0) || $user->rights->contrat->supprimer) { print ''.$langs->trans("Delete").''; } print ""; - print '
'; + print '
'; } print '
'; - /* - * Linked object block - */ + /* + * Linked object block + */ $somethingshown=$object->showLinkedObjectBlock(); print ''; diff --git a/htdocs/core/class/cookie.class.php b/htdocs/core/class/cookie.class.php index f4864c2635e..b612f8bcacc 100644 --- a/htdocs/core/class/cookie.class.php +++ b/htdocs/core/class/cookie.class.php @@ -54,14 +54,17 @@ class DolCookie /** - * Encrypt en create the cookie + * Encrypt en create the cookie + * + * @return void */ function cryptCookie() { if (!empty($this->myKey)) { $valuecrypt = base64_encode($this->myValue); - for ($f=0 ; $f<=dol_strlen($valuecrypt)-1; $f++) + $max=dol_strlen($valuecrypt)-1; + for ($f=0 ; $f <= $max; $f++) { $this->cookie .= intval(ord($valuecrypt[$f]))*$this->myKey."|"; } @@ -75,7 +78,9 @@ class DolCookie } /** - * Decrypt the cookie + * Decrypt the cookie + * + * @return void */ function decryptCookie() { @@ -98,14 +103,15 @@ class DolCookie } /** - * Set and create the cookie + * Set and create the cookie * - * @param string $cookie Cookie name - * @param string $value Cookie value - * @param string $expire Expiration - * @param string $path Path of cookie - * @param string $domaine Domain name - * @param int $secure 0 or 1 + * @param string $cookie Cookie name + * @param string $value Cookie value + * @param string $expire Expiration + * @param string $path Path of cookie + * @param string $domaine Domain name + * @param int $secure 0 or 1 + * @return void */ function _setCookie($cookie, $value, $expire=0, $path="/", $domain="", $secure=0) { diff --git a/htdocs/core/class/vcard.class.php b/htdocs/core/class/vcard.class.php index 433be9ace59..d54bf45643b 100755 --- a/htdocs/core/class/vcard.class.php +++ b/htdocs/core/class/vcard.class.php @@ -30,7 +30,8 @@ /** * Encode a string for vCard * - * @param string String to encode + * @param string $string String to encode + * @return string String encoded */ function encode($string) { @@ -42,10 +43,11 @@ function encode($string) * Taken from php documentation comments * No more used * - * @param input String - * @param line_max Max length of lines + * @param string $input String + * @param int $line_max Max length of lines + * @return string Encoded string */ -function dol_quoted_printable_encode($input, $line_max = 76) +function dol_quoted_printable_encode($input, $line_max=76) { $hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'); $lines = preg_split("/(\?:\r\n|\r|\n)/", $input); @@ -53,7 +55,7 @@ function dol_quoted_printable_encode($input, $line_max = 76) $linebreak = "=0D=0A"; $escape = "="; $output = ""; - + $num = count($lines); for ($j = 0; $j < $num; $j++) { @@ -98,10 +100,12 @@ class vCard /** * mise en forme du numero de telephone * - * @param number numero de telephone - * @param type + * @param int $number numero de telephone + * @param string $type Type + * @return void */ - function setPhoneNumber($number, $type="") { + function setPhoneNumber($number, $type="") + { // type may be PREF | WORK | HOME | VOICE | FAX | MSG | CELL | PAGER | BBS | CAR | MODEM | ISDN | VIDEO or any senseful combination, e.g. "PREF;WORK;VOICE" $key = "TEL"; if ($type!="") $key .= ";".$type; @@ -113,32 +117,38 @@ class vCard * mise en forme de la photo * warning NON TESTE ! * - * @param type - * @param photo - */ - function setPhoto($type, $photo) { // $type = "GIF" | "JPEG" + * @param string $type Type + * @param string $photo Photo + * @return void + */ + function setPhoto($type, $photo) + { // $type = "GIF" | "JPEG" $this->properties["PHOTO;TYPE=$type;ENCODING=BASE64"] = base64_encode($photo); } /** * mise en forme du nom formate * - * @param name + * @param string $name Name + * @return void */ - function setFormattedName($name) { + function setFormattedName($name) + { $this->properties["FN;CHARSET=".$this->encoding] = encode($name); } /** * mise en forme du nom complet * - * @param family - * @param first - * @param additional - * @param prefix - * @param suffix + * @param string $family Family + * @param string $first First + * @param string $additional Additionnal + * @param string $prefix Prefix + * @param string $suffix Suffix + * @return void */ - function setName($family="", $first="", $additional="", $prefix="", $suffix="") { + function setName($family="", $first="", $additional="", $prefix="", $suffix="") + { $this->properties["N;CHARSET=".$this->encoding] = encode($family).";".encode($first).";".encode($additional).";".encode($prefix).";".encode($suffix); $this->filename = "$first%20$family.vcf"; if ($this->properties["FN"]=="") $this->setFormattedName(trim("$prefix $first $additional $family $suffix")); @@ -147,32 +157,37 @@ class vCard /** * mise en forme de l'anniversaire * - * @param date + * @param timestamp $date Date + * @return void */ - function setBirthday($date) { // $date format is YYYY-MM-DD + function setBirthday($date) + { // $date format is YYYY-MM-DD $this->properties["BDAY"] = $date; } /** * mise en forme de l'adresse * - * @param postoffice - * @param extended - * @param street - * @param city - * @param region - * @param zip - * @param country - * @param type + * @param string $postoffice Postoffice + * @param string $extended Extended + * @param string $street Street + * @param string $city City + * @param string $region Region + * @param string $zip Zip + * @param string $country Country + * @param string $type Type + * @return void */ - function setAddress($postoffice="", $extended="", $street="", $city="", $region="", $zip="", $country="", $type="HOME;POSTAL") { + function setAddress($postoffice="", $extended="", $street="", $city="", $region="", $zip="", $country="", $type="HOME;POSTAL") + { // $type may be DOM | INTL | POSTAL | PARCEL | HOME | WORK or any combination of these: e.g. "WORK;PARCEL;POSTAL" $key = "ADR"; if ($type!="") $key.= ";$type"; $key.= ";CHARSET=".$this->encoding; $this->properties[$key] = encode($name).";".encode($extended).";".encode($street).";".encode($city).";".encode($region).";".encode($zip).";".encode($country); - if ($this->properties["LABEL;$type;CHARSET=".$this->encoding] == "") { + if ($this->properties["LABEL;$type;CHARSET=".$this->encoding] == "") + { //$this->setLabel($postoffice, $extended, $street, $city, $region, $zip, $country, $type); } } @@ -180,14 +195,15 @@ class vCard /** * mise en forme du label * - * @param postoffice - * @param extended - * @param street - * @param city - * @param region - * @param zip - * @param country - * @param type + * @param string $postoffice Postoffice + * @param string $extended Extended + * @param string $street Street + * @param string $city City + * @param string $region Region + * @param string $zip Zip + * @param string $country Country + * @param string $type Type + * @return void */ function setLabel($postoffice="", $extended="", $street="", $city="", $region="", $zip="", $country="", $type="HOME;POSTAL") { $label = ""; @@ -205,28 +221,34 @@ class vCard /** * mise en forme de l'email * - * @param address EMail - * @param type Vcard type + * @param string $address EMail + * @param string $type Vcard type + * @return void */ - function setEmail($address,$type="internet,pref") { + function setEmail($address,$type="internet,pref") + { $this->properties["EMAIL;TYPE=".$type] = $address; } /** * mise en forme de la note * - * @param note + * @param string $note Note + * @return void */ - function setNote($note) { + function setNote($note) + { $this->properties["NOTE;CHARSET=".$this->encoding] = encode($note); } /** * mise en forme de la fonction * - * @param title + * @param string $title Title + * @return void */ - function setTitle($title) { + function setTitle($title) + { $this->properties["TITLE;CHARSET=".$this->encoding] = encode($title); } @@ -234,9 +256,11 @@ class vCard /** * mise en forme de la societe * - * @param org + * @param string $org Org + * @return void */ - function setOrg($org) { + function setOrg($org) + { $this->properties["ORG;CHARSET=".$this->encoding] = encode($org); } @@ -244,9 +268,11 @@ class vCard /** * mise en forme du logiciel generateur * - * @param prodid + * @param string $prodid Prodid + * @return void */ - function setProdId($prodid) { + function setProdId($prodid) + { $this->properties["PRODID;CHARSET=".$this->encoding] = encode($prodid); } @@ -254,9 +280,11 @@ class vCard /** * mise en forme du logiciel generateur * - * @param uid + * @param string $uid Uid + * @return void */ - function setUID($uid) { + function setUID($uid) + { $this->properties["UID;CHARSET=".$this->encoding] = encode($uid); } @@ -264,10 +292,12 @@ class vCard /** * mise en forme de l'url * - * @param url - * @param type + * @param string $url URL + * @param string $type Type + * @return void */ - function setURL($url, $type="") { + function setURL($url, $type="") + { // $type may be WORK | HOME $key = "URL"; if ($type!="") $key.= ";$type"; @@ -276,12 +306,16 @@ class vCard /** * permet d'obtenir une vcard + * + * @return void */ - function getVCard() { + function getVCard() + { $text = "BEGIN:VCARD\r\n"; //$text.= "VERSION:3.0\r\n"; $text.= "VERSION:2.1\r\n"; - foreach($this->properties as $key => $value) { + foreach($this->properties as $key => $value) + { $text.= "$key:$value\r\n"; } $text.= "REV:".date("Y-m-d")."T".date("H:i:s")."Z\r\n"; @@ -292,9 +326,13 @@ class vCard /** * permet d'obtenir le nom de fichier + * + * @return string Filename */ - function getFileName() { + function getFileName() + { return $this->filename; } + } ?> diff --git a/htdocs/includes/modules/modDocument.class.php b/htdocs/includes/modules/modDocument.class.php index 2b7511aa561..86167b35cfd 100644 --- a/htdocs/includes/modules/modDocument.class.php +++ b/htdocs/includes/modules/modDocument.class.php @@ -1,127 +1,127 @@ - - * Copyright (C) 2005-2009 Regis Houssin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** - * \defgroup document Module mass mailings - * \brief Module pour gerer des generations de documents - * \file htdocs/includes/modules/modDocument.class.php - * \ingroup document - * \brief Fichier de description et activation du module Generation document - */ - -include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); - - -/** - * \class modDocument - * \brief Classe de description et activation du module Document - */ - -class modDocument extends DolibarrModules -{ - - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modDocument($DB) - { - $this->db = $DB ; - $this->numero = 51 ; - - $this->family = "technic"; - // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) - $this->name = preg_replace('/^mod/i','',get_class($this)); - $this->description = "Generation de courriers/publipostages papiers"; - // Possible values for version are: 'development', 'experimental', 'dolibarr' or version - $this->version = 'development'; - - $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); - $this->special = 0; - $this->picto='email'; - - // Data directories to create when module is enabled - $this->dirs = array("/document/temp"); - - // Config pages - //$this->config_page_url = array("document.php"); - - // Dependencies - $this->depends = array(); - $this->requiredby = array(); - $this->conflictwith = array(); - $this->langfiles = array("orders","bills","companies"); - - // Constantes - - $this->const = array(); - - // Boites - $this->boxes = array(); - - // Permissions - $this->rights = array(); - $this->rights_class = 'document'; - - $r=0; - - $this->rights[$r][0] = 511; - $this->rights[$r][1] = 'Lire les documents'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'lire'; - - $r++; - $this->rights[$r][0] = 512; - $this->rights[$r][1] = 'Supprimer les documents clients'; - $this->rights[$r][2] = 'd'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'supprimer'; - } - - - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - global $conf; - - // Permissions - $this->remove(); - - $sql = array(); - - return $this->_init($sql); - } - - - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } -} -?> + + * Copyright (C) 2005-2009 Regis Houssin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * \defgroup document Module mass mailings + * \brief Module pour gerer des generations de documents + * \file htdocs/includes/modules/modDocument.class.php + * \ingroup document + * \brief Fichier de description et activation du module Generation document + */ + +include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); + + +/** + * \class modDocument + * \brief Classe de description et activation du module Document + */ + +class modDocument extends DolibarrModules +{ + + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modDocument($DB) + { + $this->db = $DB ; + $this->numero = 51 ; + + $this->family = "technic"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = preg_replace('/^mod/i','',get_class($this)); + $this->description = "Generation de courriers/publipostages papiers"; + // Possible values for version are: 'development', 'experimental', 'dolibarr' or version + $this->version = 'development'; + + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); + $this->special = 0; + $this->picto='email'; + + // Data directories to create when module is enabled + $this->dirs = array("/document/temp"); + + // Config pages + //$this->config_page_url = array("document.php"); + + // Dependencies + $this->depends = array(); + $this->requiredby = array(); + $this->conflictwith = array(); + $this->langfiles = array("orders","bills","companies"); + + // Constantes + + $this->const = array(); + + // Boites + $this->boxes = array(); + + // Permissions + $this->rights = array(); + $this->rights_class = 'document'; + + $r=0; + + $this->rights[$r][0] = 511; + $this->rights[$r][1] = 'Lire les documents'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'lire'; + + $r++; + $this->rights[$r][0] = 512; + $this->rights[$r][1] = 'Supprimer les documents clients'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'supprimer'; + } + + + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + global $conf; + + // Permissions + $this->remove(); + + $sql = array(); + + return $this->_init($sql); + } + + + /** + * \brief Fonction appelee lors de la desactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } +} +?> diff --git a/htdocs/includes/modules/modExpedition.class.php b/htdocs/includes/modules/modExpedition.class.php index aa5e08d5dfe..a312d24e2b8 100644 --- a/htdocs/includes/modules/modExpedition.class.php +++ b/htdocs/includes/modules/modExpedition.class.php @@ -1,227 +1,227 @@ - - * Copyright (C) 2004-2010 Laurent Destailleur - * Copyright (C) 2005-2011 Regis Houssin - * Copyright (C) 2011 Juanjo Menent - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \defgroup expedition Module shipping - * \brief Module pour gerer les expeditions de produits - * \file htdocs/includes/modules/modExpedition.class.php - * \ingroup expedition - * \brief Fichier de description et activation du module Expedition - */ - -include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); - - -/** - * \class modExpedition - * \brief Classe de description et activation du module Expedition - */ -class modExpedition extends DolibarrModules -{ - - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modExpedition($DB) - { - $this->db = $DB ; - $this->numero = 80 ; - - $this->family = "crm"; - // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) - $this->name = preg_replace('/^mod/i','',get_class($this)); - $this->description = "Gestion des expeditions"; - - // Possible values for version are: 'development', 'experimental', 'dolibarr' or version - $this->version = 'dolibarr'; - - $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); - $this->special = 0; - $this->picto = "sending"; - - // Data directories to create when module is enabled - $this->dirs = array("/expedition/temp", - "/expedition/sending", - "/expedition/sending/temp", - "/expedition/receipt", - "/expedition/receipt/temp" - ); - - // Config pages - $this->config_page_url = array("confexped.php"); - - // Dependances - $this->depends = array("modCommande"); - $this->requiredby = array(); - - // Constantes - $this->const = array(); - $r=0; - - $this->const[$r][0] = "EXPEDITION_ADDON_PDF"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "rouget"; - $this->const[$r][3] = 'Nom du gestionnaire de generation des bons expeditions en PDF'; - $this->const[$r][4] = 0; - $r++; - - $this->const[$r][0] = "EXPEDITION_ADDON"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "elevement"; - $this->const[$r][3] = 'Nom du gestionnaire du type d\'expedition'; - $this->const[$r][4] = 0; - $r++; - - $this->const[$r][0] = "LIVRAISON_ADDON_PDF"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "typhon"; - $this->const[$r][3] = 'Nom du gestionnaire de generation des bons de reception en PDF'; - $this->const[$r][4] = 0; - $r++; - - $this->const[$r][0] = "LIVRAISON_ADDON"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "mod_livraison_jade"; - $this->const[$r][3] = 'Nom du gestionnaire de numerotation des bons de reception'; - $this->const[$r][4] = 0; - $r++; - - $this->const[$r][0] = "EXPEDITION_ADDON_NUMBER"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "mod_expedition_safor"; - $this->const[$r][3] = 'Nom du gestionnaire de numerotation des expeditions'; - $this->const[$r][4] = 0; - $r++; - - // Boxes - $this->boxes = array(); - - // Permissions - $this->rights = array(); - $this->rights_class = 'expedition'; - $r=0; - - $r++; - $this->rights[$r][0] = 101; - $this->rights[$r][1] = 'Lire les expeditions'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'lire'; - - $r++; - $this->rights[$r][0] = 102; - $this->rights[$r][1] = 'Creer modifier les expeditions'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'creer'; - - $r++; - $this->rights[$r][0] = 104; - $this->rights[$r][1] = 'Valider les expeditions'; - $this->rights[$r][2] = 'd'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'valider'; - - $r++; - $this->rights[$r][0] = 105; // id de la permission - $this->rights[$r][1] = 'Envoyer les expeditions aux clients'; // libelle de la permission - $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour) - $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut - $this->rights[$r][4] = 'shipping_advance'; - $this->rights[$r][5] = 'send'; - - $r++; - $this->rights[$r][0] = 109; - $this->rights[$r][1] = 'Supprimer les expeditions'; - $this->rights[$r][2] = 'd'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'supprimer'; - - $r++; - $this->rights[$r][0] = 1101; - $this->rights[$r][1] = 'Lire les bons de livraison'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'livraison'; - $this->rights[$r][5] = 'lire'; - - $r++; - $this->rights[$r][0] = 1102; - $this->rights[$r][1] = 'Creer modifier les bons de livraison'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'livraison'; - $this->rights[$r][5] = 'creer'; - - $r++; - $this->rights[$r][0] = 1104; - $this->rights[$r][1] = 'Valider les bons de livraison'; - $this->rights[$r][2] = 'd'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'livraison'; - $this->rights[$r][5] = 'valider'; - - $r++; - $this->rights[$r][0] = 1109; - $this->rights[$r][1] = 'Supprimer les bons de livraison'; - $this->rights[$r][2] = 'd'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'livraison'; - $this->rights[$r][5] = 'supprimer'; - - } - - - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - global $conf; - - // Permissions - $this->remove(); - - $sql = array(); - - $sql = array( - "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity, - "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][2]."','shipping',".$conf->entity.")", - "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[1][2]."' AND entity = ".$conf->entity, - "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[1][2]."','delivery',".$conf->entity.")", - ); - - return $this->_init($sql); - } - - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } -} -?> + + * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2011 Juanjo Menent + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \defgroup expedition Module shipping + * \brief Module pour gerer les expeditions de produits + * \file htdocs/includes/modules/modExpedition.class.php + * \ingroup expedition + * \brief Fichier de description et activation du module Expedition + */ + +include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); + + +/** + * \class modExpedition + * \brief Classe de description et activation du module Expedition + */ +class modExpedition extends DolibarrModules +{ + + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modExpedition($DB) + { + $this->db = $DB ; + $this->numero = 80 ; + + $this->family = "crm"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = preg_replace('/^mod/i','',get_class($this)); + $this->description = "Gestion des expeditions"; + + // Possible values for version are: 'development', 'experimental', 'dolibarr' or version + $this->version = 'dolibarr'; + + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); + $this->special = 0; + $this->picto = "sending"; + + // Data directories to create when module is enabled + $this->dirs = array("/expedition/temp", + "/expedition/sending", + "/expedition/sending/temp", + "/expedition/receipt", + "/expedition/receipt/temp" + ); + + // Config pages + $this->config_page_url = array("confexped.php"); + + // Dependances + $this->depends = array("modCommande"); + $this->requiredby = array(); + + // Constantes + $this->const = array(); + $r=0; + + $this->const[$r][0] = "EXPEDITION_ADDON_PDF"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "rouget"; + $this->const[$r][3] = 'Nom du gestionnaire de generation des bons expeditions en PDF'; + $this->const[$r][4] = 0; + $r++; + + $this->const[$r][0] = "EXPEDITION_ADDON"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "elevement"; + $this->const[$r][3] = 'Nom du gestionnaire du type d\'expedition'; + $this->const[$r][4] = 0; + $r++; + + $this->const[$r][0] = "LIVRAISON_ADDON_PDF"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "typhon"; + $this->const[$r][3] = 'Nom du gestionnaire de generation des bons de reception en PDF'; + $this->const[$r][4] = 0; + $r++; + + $this->const[$r][0] = "LIVRAISON_ADDON"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "mod_livraison_jade"; + $this->const[$r][3] = 'Nom du gestionnaire de numerotation des bons de reception'; + $this->const[$r][4] = 0; + $r++; + + $this->const[$r][0] = "EXPEDITION_ADDON_NUMBER"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "mod_expedition_safor"; + $this->const[$r][3] = 'Nom du gestionnaire de numerotation des expeditions'; + $this->const[$r][4] = 0; + $r++; + + // Boxes + $this->boxes = array(); + + // Permissions + $this->rights = array(); + $this->rights_class = 'expedition'; + $r=0; + + $r++; + $this->rights[$r][0] = 101; + $this->rights[$r][1] = 'Lire les expeditions'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'lire'; + + $r++; + $this->rights[$r][0] = 102; + $this->rights[$r][1] = 'Creer modifier les expeditions'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'creer'; + + $r++; + $this->rights[$r][0] = 104; + $this->rights[$r][1] = 'Valider les expeditions'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'valider'; + + $r++; + $this->rights[$r][0] = 105; // id de la permission + $this->rights[$r][1] = 'Envoyer les expeditions aux clients'; // libelle de la permission + $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour) + $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut + $this->rights[$r][4] = 'shipping_advance'; + $this->rights[$r][5] = 'send'; + + $r++; + $this->rights[$r][0] = 109; + $this->rights[$r][1] = 'Supprimer les expeditions'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'supprimer'; + + $r++; + $this->rights[$r][0] = 1101; + $this->rights[$r][1] = 'Lire les bons de livraison'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'livraison'; + $this->rights[$r][5] = 'lire'; + + $r++; + $this->rights[$r][0] = 1102; + $this->rights[$r][1] = 'Creer modifier les bons de livraison'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'livraison'; + $this->rights[$r][5] = 'creer'; + + $r++; + $this->rights[$r][0] = 1104; + $this->rights[$r][1] = 'Valider les bons de livraison'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'livraison'; + $this->rights[$r][5] = 'valider'; + + $r++; + $this->rights[$r][0] = 1109; + $this->rights[$r][1] = 'Supprimer les bons de livraison'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'livraison'; + $this->rights[$r][5] = 'supprimer'; + + } + + + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + global $conf; + + // Permissions + $this->remove(); + + $sql = array(); + + $sql = array( + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity, + "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][2]."','shipping',".$conf->entity.")", + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[1][2]."' AND entity = ".$conf->entity, + "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[1][2]."','delivery',".$conf->entity.")", + ); + + return $this->_init($sql); + } + + /** + * \brief Fonction appelee lors de la desactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } +} +?> diff --git a/htdocs/includes/modules/modFicheinter.class.php b/htdocs/includes/modules/modFicheinter.class.php index eb9afc6bebf..87652809052 100644 --- a/htdocs/includes/modules/modFicheinter.class.php +++ b/htdocs/includes/modules/modFicheinter.class.php @@ -1,183 +1,183 @@ - - * Copyright (C) 2004-2009 Laurent Destailleur - * Copyright (C) 2004 Sebastien Di Cintio - * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2009 Regis Houssin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** - * \defgroup ficheinter Module intervention cards - * \brief Module to manage intervention cards - * \file htdocs/includes/modules/modFicheinter.class.php - * \ingroup ficheinter - * \brief Fichier de description et activation du module Ficheinter - */ - -include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); - - -/** - * \class modFicheinter - * \brief Classe de description et activation du module Ficheinter - */ -class modFicheinter extends DolibarrModules -{ - - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB Database access handler - */ - function modFicheinter($DB) - { - global $conf; - - $this->db = $DB ; - $this->numero = 70 ; - - $this->family = "crm"; - // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) - $this->name = preg_replace('/^mod/i','',get_class($this)); - $this->description = "Gestion des fiches d'intervention"; - - // Possible values for version are: 'development', 'experimental', 'dolibarr' or version - $this->version = 'dolibarr'; - - $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); - $this->special = 0; - $this->picto = "intervention"; - - // Data directories to create when module is enabled - $this->dirs = array("/ficheinter/temp"); - - // Dependencies - $this->depends = array("modSociete"); - $this->requiredby = array(); - $this->conflictwith = array(); - $this->langfiles = array("bills","companies","interventions"); - - // Config pages - $this->config_page_url = array("fichinter.php"); - - // Constantes - $this->const = array(); - $r=0; - - $this->const[$r][0] = "FICHEINTER_ADDON_PDF"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "soleil"; - $r++; - - $this->const[$r][0] = "FICHEINTER_ADDON"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "pacific"; - $r++; - - // Boites - $this->boxes = array(); - - // Permissions - $this->rights = array(); - $this->rights_class = 'ficheinter'; - $r=0; - - $r++; - $this->rights[$r][0] = 61; - $this->rights[$r][1] = 'Lire les fiches d\'intervention'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'lire'; - - $r++; - $this->rights[$r][0] = 62; - $this->rights[$r][1] = 'Creer/modifier les fiches d\'intervention'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'creer'; - - $r++; - $this->rights[$r][0] = 64; - $this->rights[$r][1] = 'Supprimer les fiches d\'intervention'; - $this->rights[$r][2] = 'd'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'supprimer'; - - $r++; - $this->rights[$r][0] = 67; - $this->rights[$r][1] = 'Exporter les fiches interventions'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'export'; - - $r++; - $this->rights[$r][0] = 68; - $this->rights[$r][1] = 'Envoyer les fiches d\'intervention par courriel'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'ficheinter_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on - $this->rights[$r][5] = 'send'; - - //Exports - //-------- - $r=1; - - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='InterventionCardsAndInterventionLines'; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_permission[$r]=array(array("ficheinter","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InterId",'f.ref'=>"InterRef",'f.datec'=>"InterDateCreation",'f.duree'=>"InterDuration",'f.fk_statut'=>'InterStatus','f.description'=>"InterNote",'fd.rowid'=>'InterLineId','fd.date'=>"InterLineDate",'fd.duree'=>"InterLineDuration",'fd.description'=>"InterLineDesc"); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"intervention",'f.ref'=>"intervention",'f.datec'=>"intervention",'f.duree'=>"intervention",'f.fk_statut'=>"intervention",'f.description'=>"intervention",'fd.rowid'=>"inter_line",'fd.date'=>"inter_line",'fd.duree'=>'inter_line','fd.description'=>'inter_line'); - - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'fichinter as f, '.MAIN_DB_PREFIX.'fichinterdet as fd, '.MAIN_DB_PREFIX.'societe as s)'; - $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_fichinter'; - $this->export_sql_end[$r] .=' AND f.entity = '.$conf->entity; - $r++; - - } - - - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - global $conf; - - // Permissions - $this->remove(); - - $sql = array( - "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity, - "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][2]."','ficheinter',".$conf->entity.")", - ); - - return $this->_init($sql); - } - - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } -} -?> + + * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004 Sebastien Di Cintio + * Copyright (C) 2004 Benoit Mortier + * Copyright (C) 2005-2009 Regis Houssin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * \defgroup ficheinter Module intervention cards + * \brief Module to manage intervention cards + * \file htdocs/includes/modules/modFicheinter.class.php + * \ingroup ficheinter + * \brief Fichier de description et activation du module Ficheinter + */ + +include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); + + +/** + * \class modFicheinter + * \brief Classe de description et activation du module Ficheinter + */ +class modFicheinter extends DolibarrModules +{ + + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB Database access handler + */ + function modFicheinter($DB) + { + global $conf; + + $this->db = $DB ; + $this->numero = 70 ; + + $this->family = "crm"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = preg_replace('/^mod/i','',get_class($this)); + $this->description = "Gestion des fiches d'intervention"; + + // Possible values for version are: 'development', 'experimental', 'dolibarr' or version + $this->version = 'dolibarr'; + + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); + $this->special = 0; + $this->picto = "intervention"; + + // Data directories to create when module is enabled + $this->dirs = array("/ficheinter/temp"); + + // Dependencies + $this->depends = array("modSociete"); + $this->requiredby = array(); + $this->conflictwith = array(); + $this->langfiles = array("bills","companies","interventions"); + + // Config pages + $this->config_page_url = array("fichinter.php"); + + // Constantes + $this->const = array(); + $r=0; + + $this->const[$r][0] = "FICHEINTER_ADDON_PDF"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "soleil"; + $r++; + + $this->const[$r][0] = "FICHEINTER_ADDON"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "pacific"; + $r++; + + // Boites + $this->boxes = array(); + + // Permissions + $this->rights = array(); + $this->rights_class = 'ficheinter'; + $r=0; + + $r++; + $this->rights[$r][0] = 61; + $this->rights[$r][1] = 'Lire les fiches d\'intervention'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'lire'; + + $r++; + $this->rights[$r][0] = 62; + $this->rights[$r][1] = 'Creer/modifier les fiches d\'intervention'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'creer'; + + $r++; + $this->rights[$r][0] = 64; + $this->rights[$r][1] = 'Supprimer les fiches d\'intervention'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'supprimer'; + + $r++; + $this->rights[$r][0] = 67; + $this->rights[$r][1] = 'Exporter les fiches interventions'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'export'; + + $r++; + $this->rights[$r][0] = 68; + $this->rights[$r][1] = 'Envoyer les fiches d\'intervention par courriel'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'ficheinter_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on + $this->rights[$r][5] = 'send'; + + //Exports + //-------- + $r=1; + + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='InterventionCardsAndInterventionLines'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r]=array(array("ficheinter","export")); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InterId",'f.ref'=>"InterRef",'f.datec'=>"InterDateCreation",'f.duree'=>"InterDuration",'f.fk_statut'=>'InterStatus','f.description'=>"InterNote",'fd.rowid'=>'InterLineId','fd.date'=>"InterLineDate",'fd.duree'=>"InterLineDuration",'fd.description'=>"InterLineDesc"); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"intervention",'f.ref'=>"intervention",'f.datec'=>"intervention",'f.duree'=>"intervention",'f.fk_statut'=>"intervention",'f.description'=>"intervention",'fd.rowid'=>"inter_line",'fd.date'=>"inter_line",'fd.duree'=>'inter_line','fd.description'=>'inter_line'); + + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'fichinter as f, '.MAIN_DB_PREFIX.'fichinterdet as fd, '.MAIN_DB_PREFIX.'societe as s)'; + $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_fichinter'; + $this->export_sql_end[$r] .=' AND f.entity = '.$conf->entity; + $r++; + + } + + + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + global $conf; + + // Permissions + $this->remove(); + + $sql = array( + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity, + "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][2]."','ficheinter',".$conf->entity.")", + ); + + return $this->_init($sql); + } + + /** + * \brief Fonction appelee lors de la desactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } +} +?> diff --git a/htdocs/includes/modules/modLabel.class.php b/htdocs/includes/modules/modLabel.class.php index bcc063bfd43..b00b88ae3b2 100644 --- a/htdocs/includes/modules/modLabel.class.php +++ b/htdocs/includes/modules/modLabel.class.php @@ -1,119 +1,119 @@ - - * Copyright (C) 2008 Laurent Destailleur - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \defgroup label Module labels - * \brief Module pour gerer les formats d'impression des etiquettes - * \file htdocs/includes/modules/modLabel.class.php - * \ingroup other - * \brief Fichier de description et activation du module Label - */ - -include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); - - -/** - * \class modLabel - * \brief Classe de description et activation du module Label - */ - -class modLabel extends DolibarrModules -{ - - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modLabel($DB) - { - $this->db = $DB ; - $this->numero = 60 ; - - $this->family = "other"; - // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) - $this->name = preg_replace('/^mod/i','',get_class($this)); - $this->description = "Gestion des etiquettes"; - $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); - $this->special = 2; - $this->picto='label'; - - // Data directories to create when module is enabled - $this->dirs = array("/label/temp"); - - // Dependancies - $this->depends = array(); - $this->requiredby = array(); - - // Config pages - $this->config_page_url = array("label.php"); - - // Constants - $this->const = array(); - - // Boxes - $this->boxes = array(); - - // Permissions - $this->rights = array(); - $this->rights_class = 'label'; - - $this->rights[1][0] = 601; // id de la permission - $this->rights[1][1] = 'Lire les etiquettes'; // libelle de la permission - $this->rights[1][3] = 1; // La permission est-elle une permission par defaut - $this->rights[1][4] = 'lire'; - - $this->rights[2][0] = 602; // id de la permission - $this->rights[2][1] = 'Creer/modifier les etiquettes'; // libelle de la permission - $this->rights[2][3] = 0; // La permission est-elle une permission par defaut - $this->rights[2][4] = 'creer'; - - $this->rights[4][0] = 609; // id de la permission - $this->rights[4][1] = 'Supprimer les etiquettes'; // libelle de la permission - $this->rights[4][3] = 0; // La permission est-elle une permission par defaut - $this->rights[4][4] = 'supprimer'; - - } - - - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - // Permissions - $this->remove(); - - $sql = array(); - - return $this->_init($sql); - } - - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } -} -?> + + * Copyright (C) 2008 Laurent Destailleur + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \defgroup label Module labels + * \brief Module pour gerer les formats d'impression des etiquettes + * \file htdocs/includes/modules/modLabel.class.php + * \ingroup other + * \brief Fichier de description et activation du module Label + */ + +include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); + + +/** + * \class modLabel + * \brief Classe de description et activation du module Label + */ + +class modLabel extends DolibarrModules +{ + + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modLabel($DB) + { + $this->db = $DB ; + $this->numero = 60 ; + + $this->family = "other"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = preg_replace('/^mod/i','',get_class($this)); + $this->description = "Gestion des etiquettes"; + $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); + $this->special = 2; + $this->picto='label'; + + // Data directories to create when module is enabled + $this->dirs = array("/label/temp"); + + // Dependancies + $this->depends = array(); + $this->requiredby = array(); + + // Config pages + $this->config_page_url = array("label.php"); + + // Constants + $this->const = array(); + + // Boxes + $this->boxes = array(); + + // Permissions + $this->rights = array(); + $this->rights_class = 'label'; + + $this->rights[1][0] = 601; // id de la permission + $this->rights[1][1] = 'Lire les etiquettes'; // libelle de la permission + $this->rights[1][3] = 1; // La permission est-elle une permission par defaut + $this->rights[1][4] = 'lire'; + + $this->rights[2][0] = 602; // id de la permission + $this->rights[2][1] = 'Creer/modifier les etiquettes'; // libelle de la permission + $this->rights[2][3] = 0; // La permission est-elle une permission par defaut + $this->rights[2][4] = 'creer'; + + $this->rights[4][0] = 609; // id de la permission + $this->rights[4][1] = 'Supprimer les etiquettes'; // libelle de la permission + $this->rights[4][3] = 0; // La permission est-elle une permission par defaut + $this->rights[4][4] = 'supprimer'; + + } + + + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + // Permissions + $this->remove(); + + $sql = array(); + + return $this->_init($sql); + } + + /** + * \brief Fonction appelee lors de la desactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } +} +?> diff --git a/htdocs/includes/modules/modMailing.class.php b/htdocs/includes/modules/modMailing.class.php index 5d9d88cdcf2..5f21e1354e0 100644 --- a/htdocs/includes/modules/modMailing.class.php +++ b/htdocs/includes/modules/modMailing.class.php @@ -1,127 +1,127 @@ - - * Copyright (C) 2005-2008 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \defgroup mailing Module emailing - * \brief Module to manage EMailings - * \file htdocs/includes/modules/modMailing.class.php - * \ingroup mailing - * \brief Fichier de description et activation du module Mailing - */ - -include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); - - -/** - * \class modMailing - * \brief Classe de description et activation du module Mailing - */ -class modMailing extends DolibarrModules -{ - - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modMailing($DB) - { - $this->db = $DB ; - $this->numero = 22 ; - - $this->family = "technic"; - // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) - $this->name = preg_replace('/^mod/i','',get_class($this)); - $this->description = "Gestion des EMailings"; - $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); - $this->special = 0; - $this->picto='email'; - - // Data directories to create when module is enabled - $this->dirs = array("/mailing/temp"); - - // Dependances - $this->depends = array(); - $this->requiredby = array(); - $this->langfiles = array("mails"); - - // Config pages - $this->config_page_url = array("mailing.php"); - - // Constantes - $this->const = array(); - - // Boites - $this->boxes = array(); - - // Permissions - $this->rights = array(); - $this->rights_class = 'mailing'; - - $this->rights[1][0] = 221; // id de la permission - $this->rights[1][1] = 'Consulter les mailings'; // libelle de la permission - $this->rights[1][2] = 'r'; // type de la permission (deprecie a ce jour) - $this->rights[1][3] = 1; // La permission est-elle une permission par defaut - $this->rights[1][4] = 'lire'; - - $this->rights[2][0] = 222; - $this->rights[2][1] = 'Creer/modifier les mailings (sujet, destinataires...)'; - $this->rights[2][2] = 'w'; - $this->rights[2][3] = 0; - $this->rights[2][4] = 'creer'; - - $this->rights[3][0] = 223; - $this->rights[3][1] = 'Valider les mailings (permet leur envoi)'; - $this->rights[3][2] = 'w'; - $this->rights[3][3] = 0; - $this->rights[3][4] = 'valider'; - - $this->rights[4][0] = 229; - $this->rights[4][1] = 'Supprimer les mailings)'; - $this->rights[4][2] = 'd'; - $this->rights[4][3] = 0; - $this->rights[4][4] = 'supprimer'; - - } - - - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - // Permissions - $this->remove(); - - return $this->_init($sql); - } - - /** - \brief Fonction appelee lors de la desactivation d'un module. - Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } -} -?> + + * Copyright (C) 2005-2008 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \defgroup mailing Module emailing + * \brief Module to manage EMailings + * \file htdocs/includes/modules/modMailing.class.php + * \ingroup mailing + * \brief Fichier de description et activation du module Mailing + */ + +include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); + + +/** + * \class modMailing + * \brief Classe de description et activation du module Mailing + */ +class modMailing extends DolibarrModules +{ + + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modMailing($DB) + { + $this->db = $DB ; + $this->numero = 22 ; + + $this->family = "technic"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = preg_replace('/^mod/i','',get_class($this)); + $this->description = "Gestion des EMailings"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); + $this->special = 0; + $this->picto='email'; + + // Data directories to create when module is enabled + $this->dirs = array("/mailing/temp"); + + // Dependances + $this->depends = array(); + $this->requiredby = array(); + $this->langfiles = array("mails"); + + // Config pages + $this->config_page_url = array("mailing.php"); + + // Constantes + $this->const = array(); + + // Boites + $this->boxes = array(); + + // Permissions + $this->rights = array(); + $this->rights_class = 'mailing'; + + $this->rights[1][0] = 221; // id de la permission + $this->rights[1][1] = 'Consulter les mailings'; // libelle de la permission + $this->rights[1][2] = 'r'; // type de la permission (deprecie a ce jour) + $this->rights[1][3] = 1; // La permission est-elle une permission par defaut + $this->rights[1][4] = 'lire'; + + $this->rights[2][0] = 222; + $this->rights[2][1] = 'Creer/modifier les mailings (sujet, destinataires...)'; + $this->rights[2][2] = 'w'; + $this->rights[2][3] = 0; + $this->rights[2][4] = 'creer'; + + $this->rights[3][0] = 223; + $this->rights[3][1] = 'Valider les mailings (permet leur envoi)'; + $this->rights[3][2] = 'w'; + $this->rights[3][3] = 0; + $this->rights[3][4] = 'valider'; + + $this->rights[4][0] = 229; + $this->rights[4][1] = 'Supprimer les mailings)'; + $this->rights[4][2] = 'd'; + $this->rights[4][3] = 0; + $this->rights[4][4] = 'supprimer'; + + } + + + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + // Permissions + $this->remove(); + + return $this->_init($sql); + } + + /** + \brief Fonction appelee lors de la desactivation d'un module. + Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } +} +?> diff --git a/htdocs/lib/ws.lib.php b/htdocs/lib/ws.lib.php index 511b08f0725..468ed4c2bcd 100755 --- a/htdocs/lib/ws.lib.php +++ b/htdocs/lib/ws.lib.php @@ -40,23 +40,35 @@ function check_authentication($authentication,&$error,&$errorcode,&$errorlabel) $error++; $errorcode='BAD_VALUE_FOR_SECURITY_KEY'; $errorlabel='Value provided into dolibarrkey entry field does not match security key defined in Webservice module setup'; } + + if (! $error && ! empty($authentication['entity']) && ! is_numeric($authentication['entity'])) + { + $error++; + $errorcode='BAD_PARAMETERS'; $errorlabel="Parameter entity must be empty (or filled with numeric id of instance if multicompany module is used)."; + } + if (! $error) { $result=$fuser->fetch('',$authentication['login'],'',0); if ($result <= 0) $error++; - // TODO Check password + // Validation of login with a third party login module method + if (! $error) + { + $test=true; + if (is_array($conf->login_method_modules) && !empty($conf->login_method_modules)) + { + $login = getLoginMethod($authentication['login'],$authentication['password'],$authentication['entity']); + if ($login) $test=false; + } + if ($test) $error++; + } if ($error) { $errorcode='BAD_CREDENTIALS'; $errorlabel='Bad value for login or password'; } } - if (! $error && ! empty($authentication['entity']) && ! is_numeric($authentication['entity'])) - { - $error++; - $errorcode='BAD_PARAMETERS'; $errorlabel="Parameter entity must be empty (or a numeric with id of instance if multicompany module is used)."; - } return $fuser; } diff --git a/htdocs/paypal/lib/paypalfunctions.lib.php b/htdocs/paypal/lib/paypalfunctions.lib.php index 062084c7882..8073d664e31 100755 --- a/htdocs/paypal/lib/paypalfunctions.lib.php +++ b/htdocs/paypal/lib/paypalfunctions.lib.php @@ -1,70 +1,70 @@ - - * Copyright (C) 2011 Regis Houssin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \file htdocs/paypal/lib/paypalfunctions.lib.php - * \ingroup paypal - * \brief Page with Paypal init var. - */ - -if (session_id() == "") session_start(); - - -// ================================== -// PayPal Express Checkout Module -// ================================== - -$API_version="56"; - -/* - ' Define the PayPal Redirect URLs. - ' This is the URL that the buyer is first sent to do authorize payment with their paypal account - ' change the URL depending if you are testing on the sandbox or the live PayPal site - ' - ' For the sandbox, the URL is https://www.sandbox.paypal.com/webscr&cmd=_express-checkout&token= - ' For the live site, the URL is https://www.paypal.com/webscr&cmd=_express-checkout&token= - */ -if ($conf->global->PAYPAL_API_SANDBOX) -{ - $API_Endpoint = "https://api-3t.sandbox.paypal.com/nvp"; - $API_Url = "https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token="; -} -else -{ - $API_Endpoint = "https://api-3t.paypal.com/nvp"; - $API_Url = "https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token="; -} - -// Clean parameters -$PAYPAL_API_USER=""; -if ($conf->global->PAYPAL_API_USER) $PAYPAL_API_USER=$conf->global->PAYPAL_API_USER; -$PAYPAL_API_PASSWORD=""; -if ($conf->global->PAYPAL_API_PASSWORD) $PAYPAL_API_PASSWORD=$conf->global->PAYPAL_API_PASSWORD; -$PAYPAL_API_SIGNATURE=""; -if ($conf->global->PAYPAL_API_SIGNATURE) $PAYPAL_API_SIGNATURE=$conf->global->PAYPAL_API_SIGNATURE; -$PAYPAL_API_SANDBOX=""; -if ($conf->global->PAYPAL_API_SANDBOX) $PAYPAL_API_SANDBOX=$conf->global->PAYPAL_API_SANDBOX; - -// Proxy -$PROXY_HOST = $conf->global->MAIN_PROXY_HOST; -$PROXY_PORT = $conf->global->MAIN_PROXY_PORT; -$PROXY_USER = $conf->global->MAIN_PROXY_USER; -$PROXY_PASS = $conf->global->MAIN_PROXY_PASS; -$USE_PROXY = empty($conf->global->MAIN_PROXY_USE)?false:true; - + + * Copyright (C) 2011 Regis Houssin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/paypal/lib/paypalfunctions.lib.php + * \ingroup paypal + * \brief Page with Paypal init var. + */ + +if (session_id() == "") session_start(); + + +// ================================== +// PayPal Express Checkout Module +// ================================== + +$API_version="56"; + +/* + ' Define the PayPal Redirect URLs. + ' This is the URL that the buyer is first sent to do authorize payment with their paypal account + ' change the URL depending if you are testing on the sandbox or the live PayPal site + ' + ' For the sandbox, the URL is https://www.sandbox.paypal.com/webscr&cmd=_express-checkout&token= + ' For the live site, the URL is https://www.paypal.com/webscr&cmd=_express-checkout&token= + */ +if ($conf->global->PAYPAL_API_SANDBOX) +{ + $API_Endpoint = "https://api-3t.sandbox.paypal.com/nvp"; + $API_Url = "https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token="; +} +else +{ + $API_Endpoint = "https://api-3t.paypal.com/nvp"; + $API_Url = "https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token="; +} + +// Clean parameters +$PAYPAL_API_USER=""; +if ($conf->global->PAYPAL_API_USER) $PAYPAL_API_USER=$conf->global->PAYPAL_API_USER; +$PAYPAL_API_PASSWORD=""; +if ($conf->global->PAYPAL_API_PASSWORD) $PAYPAL_API_PASSWORD=$conf->global->PAYPAL_API_PASSWORD; +$PAYPAL_API_SIGNATURE=""; +if ($conf->global->PAYPAL_API_SIGNATURE) $PAYPAL_API_SIGNATURE=$conf->global->PAYPAL_API_SIGNATURE; +$PAYPAL_API_SANDBOX=""; +if ($conf->global->PAYPAL_API_SANDBOX) $PAYPAL_API_SANDBOX=$conf->global->PAYPAL_API_SANDBOX; + +// Proxy +$PROXY_HOST = $conf->global->MAIN_PROXY_HOST; +$PROXY_PORT = $conf->global->MAIN_PROXY_PORT; +$PROXY_USER = $conf->global->MAIN_PROXY_USER; +$PROXY_PASS = $conf->global->MAIN_PROXY_PASS; +$USE_PROXY = empty($conf->global->MAIN_PROXY_USE)?false:true; + ?> \ No newline at end of file diff --git a/htdocs/societe/canvas/company/actions_card_company.class.php b/htdocs/societe/canvas/company/actions_card_company.class.php index 881c86fb449..678625ba3cb 100644 --- a/htdocs/societe/canvas/company/actions_card_company.class.php +++ b/htdocs/societe/canvas/company/actions_card_company.class.php @@ -51,6 +51,9 @@ class ActionsCardCompany extends ActionsCardCommon /** * Return the title of card + * + * @param string $action Action code + * @return string Title */ private function getTitle($action) { @@ -70,6 +73,7 @@ class ActionsCardCompany extends ActionsCardCommon * Execute actions * * @param int $socid Id of object (may be empty for creation) + * @return int <0 if KO, >0 if OK */ function doActions($socid) { @@ -82,6 +86,7 @@ class ActionsCardCompany extends ActionsCardCommon * Assign custom values for canvas (for example into this->tpl to be used by templates) * * @param string $action Type of action + * @return void */ function assign_values($action) { @@ -208,14 +213,15 @@ class ActionsCardCompany extends ActionsCardCommon /** * Check permissions of a user to show a page and an object. Check read permission * If $_REQUEST['action'] defined, we also check write permission. - * @param user User to check - * @param features Features to check (in most cases, it's module name) - * @param objectid Object ID if we want to check permission on a particular record (optionnal) - * @param dbtablename Table name where object is stored. Not used if objectid is null (optionnal) - * @param feature2 Feature to check (second level of permission) - * @param dbt_keyfield Field name for socid foreign key if not fk_soc. (optionnal) - * @param dbt_select Field name for select if not rowid. (optionnal) - * @return int 1 + * + * @param User $user User to check + * @param string $features Features to check (in most cases, it's module name) + * @param int $objectid Object ID if we want to check permission on a particular record (optionnal) + * @param string $dbtablename Table name where object is stored. Not used if objectid is null (optionnal) + * @param string $feature2 Feature to check (second level of permission) + * @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. (optionnal) + * @param string $dbt_select Field name for select if not rowid. (optionnal) + * @return int 1 */ function restrictedArea($user, $features='societe', $objectid=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') { diff --git a/htdocs/societe/canvas/individual/actions_card_individual.class.php b/htdocs/societe/canvas/individual/actions_card_individual.class.php index 52e8f33f247..51dfe098b1b 100644 --- a/htdocs/societe/canvas/individual/actions_card_individual.class.php +++ b/htdocs/societe/canvas/individual/actions_card_individual.class.php @@ -51,6 +51,9 @@ class ActionsCardIndividual extends ActionsCardCommon /** * Return the title of card + * + * @param string $action Action code + * @return string Title */ private function getTitle($action) { @@ -67,9 +70,10 @@ class ActionsCardIndividual extends ActionsCardCommon /** - * Execute actions + * Execute actions * - * @param int $socid Id of object (may be empty for creation) + * @param int $socid Id of object (may be empty for creation) + * @return int <0 if KO, >0 if OK */ function doActions($socid) { @@ -79,9 +83,10 @@ class ActionsCardIndividual extends ActionsCardCommon } /** - * Assign custom values for canvas (for example into this->tpl to be used by templates) + * Assign custom values for canvas (for example into this->tpl to be used by templates) * - * @param string $action Type of action + * @param string $action Type of action + * @return void */ function assign_values($action) { @@ -107,14 +112,15 @@ class ActionsCardIndividual extends ActionsCardCommon /** * Check permissions of a user to show a page and an object. Check read permission * If $_REQUEST['action'] defined, we also check write permission. - * @param user User to check - * @param features Features to check (in most cases, it's module name) - * @param objectid Object ID if we want to check permission on a particular record (optionnal) - * @param dbtablename Table name where object is stored. Not used if objectid is null (optionnal) - * @param feature2 Feature to check (second level of permission) - * @param dbt_keyfield Field name for socid foreign key if not fk_soc. (optionnal) - * @param dbt_select Field name for select if not rowid. (optionnal) - * @return int 1 + * + * @param User $user User to check + * @param string $features Features to check (in most cases, it's module name) + * @param int $objectid Object ID if we want to check permission on a particular record (optionnal) + * @param string $dbtablename Table name where object is stored. Not used if objectid is null (optionnal) + * @param string $feature2 Feature to check (second level of permission) + * @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. (optionnal) + * @param string $dbt_select Field name for select if not rowid. (optionnal) + * @return int 1 */ function restrictedArea($user, $features='societe', $objectid=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') { diff --git a/htdocs/theme/auguria/fckeditor/fck_dialog.css b/htdocs/theme/auguria/fckeditor/fck_dialog.css index 53f16ef8d3c..35d0fc0b180 100644 --- a/htdocs/theme/auguria/fckeditor/fck_dialog.css +++ b/htdocs/theme/auguria/fckeditor/fck_dialog.css @@ -1,402 +1,402 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Styles used by the dialog boxes. - */ - -html, body -{ - background-color: transparent; - margin: 0px; - padding: 0px; -} - -body -{ - padding: 10px; -} - -body, td, input, select, textarea -{ - font-size: 11px; - font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; -} - -body, .BackColor -{ - background-color: #f7f7f7; -} - -.PopupBody -{ - height: 100%; - width: 100%; - overflow: hidden; - background-color: transparent; - padding: 0px; -} - -#header -{ - cursor: move; -} - -.PopupTitle -{ - font-weight: bold; - font-size: 14pt; - color: #504845; - background-color: #dedede; - padding: 3px 10px 3px 10px; -} - -.PopupButtons -{ - position: absolute; - right: 0px; - left: 0px; - bottom: 0px; - border-top: #cec6b5 1px solid; - background-color: #DEDEDE; - padding: 7px 10px 7px 10px; -} - -.Button -{ - border: #7a7261 1px solid; - color: #504845; - background-color: #cec6b5; -} - -#btnOk -{ - width: 100px; -} - -.DarkBackground -{ - background-color: #f2f2f2; -} - -.LightBackground -{ - background-color: #ffffbe; -} - -.PopupTitleBorder -{ - border-bottom: #cec6b5 1px solid; -} - -.PopupTabArea -{ - color: #504845; - background-color: #DEDEDE; -} - -.PopupTabEmptyArea -{ - padding-left: 10px ; - border-bottom: #cec6b5 1px solid; -} - -.PopupTab, .PopupTabSelected -{ - border-right: #cec6b5 1px solid; - border-top: #cec6b5 1px solid; - border-left: #cec6b5 1px solid; - padding: 3px 5px 3px 5px; - color: #504845; -} - -.PopupTab -{ - margin-top: 1px; - border-bottom: #cec6b5 1px solid; - cursor: pointer; - cursor: hand; -} - -.PopupTabSelected -{ - font-weight:bold; - cursor: default; - padding-top: 4px; - border-bottom: #f1f1e3 1px solid; - background-color: #f7f7f7; -} - -.PopupSelectionBox -{ - border: #a9a9a9 1px solid !important; - background-color: #dcdcdc !important; - cursor: pointer; - cursor: hand; -} - -#tdBrowse -{ - vertical-align: bottom; -} - -/** - * Dialog frame related styles. - */ - -.contents -{ - position: absolute; - top: 2px; - left: 16px; - right: 16px; - bottom: 20px; - background-color: #f7f7f7; - overflow: hidden; - z-index: 1; -} - -.tl, .tr, .tc, .bl, .br, .bc -{ - position: absolute; - background-image: url(images/sprites.png); - background-repeat: no-repeat; -} - -* html .tl, * html .tr, * html .tc, * html .bl, * html .br, * html .bc -{ - background-image: url(images/sprites.gif); -} - -.ml, .mr -{ - position: absolute; - background-image: url(images/dialog.sides.png); - background-repeat: repeat-y; -} - -* html .ml, * html .mr -{ - background-image: url(images/dialog.sides.gif); -} - -.rtl .ml, .rtl .mr -{ - position: absolute; - background-image: url(images/dialog.sides.rtl.png); - background-repeat: repeat-y; -} - -* html .rtl .ml, * html .rtl .mr -{ - background-image: url(images/dialog.sides.gif); -} - -.tl -{ - top: 0px; - left: 0px; - width: 16px; - height: 16px; - background-position: -16px -16px; -} - -.rtl .tl -{ - background-position: -16px -397px; -} - -.tr -{ - top: 0px; - right: 0px; - width: 16px; - height: 16px; - background-position: -16px -76px; -} - -.rtl .tr -{ - background-position: -16px -457px; -} - -.tc -{ - top: 0px; - right: 16px; - left: 16px; - height: 16px; - background-position: 0px -136px; - background-repeat: repeat-x; -} - -.ml -{ - top: 16px; - left: 0px; - width: 16px; - bottom: 51px; - background-position: 0px 0px; -} - -.mr -{ - top: 16px; - right: 0px; - width: 16px; - bottom: 51px; - background-position: -16px 0px; -} - -.bl -{ - bottom: 0px; - left: 0px; - width: 30px; - height: 51px; - background-position: -16px -196px; -} - -.rtl .bl -{ - background-position: -16px -517px; -} - -.br -{ - bottom: 0px; - right: 0px; - width: 30px; - height: 51px; - background-position: -16px -263px; -} - -.rtl .br -{ - background-position: -16px -584px; -} - -.bc -{ - bottom: 0px; - right: 30px; - left: 30px; - height: 51px; - background-position: 0px -330px; - background-repeat: repeat-x; -} - -/* For IE6. Do not change it. */ -* html .blocker -{ - position: absolute; - width: 100%; - height: 100%; - z-index: 12; - filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); -} - -/* The layer used to cover the dialog when opening a child dialog. */ -.cover -{ - position: absolute; - top: 0px; - left: 14px; - right: 14px; - bottom: 18px; - z-index: 11; -} - -#closeButton -{ - position: absolute; - right: 0px; - top: 0px; - margin-top: 5px; - margin-right: 10px; - width: 20px; - height: 20px; - cursor: pointer; - background-image: url(images/sprites.png); - background-repeat: no-repeat; - background-position: -16px -651px; -} - -* html #closeButton -{ - cursor: hand; - background-image: url(images/sprites.gif); -} - -.rtl #closeButton -{ - right: auto; - left: 10px; - margin-right: 0px; -} - -#closeButton:hover -{ - background-position: -16px -687px; -} - -#throbberBlock -{ - z-index: 10; -} - -#throbberBlock div -{ - float: left; - width: 8px; - height: 9px; - margin-left: 2px; - margin-right: 2px; - font-size: 1px; /* IE6 */ -} - -/* - Color Gradient Generator: - http://www.herethere.net/~samson/php/color_gradient/?cbegin=504845&cend=DEDEDE&steps=4 -*/ - -.throbber_1 -{ - background-color: #504845; -} - -.throbber_2 -{ - background-color: #736D6B; -} - -.throbber_3 -{ - background-color: #979391; -} - -.throbber_4 -{ - background-color: #BAB8B7; -} - -.throbber_5 -{ - background-color: #DEDEDE; -} +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * Styles used by the dialog boxes. + */ + +html, body +{ + background-color: transparent; + margin: 0px; + padding: 0px; +} + +body +{ + padding: 10px; +} + +body, td, input, select, textarea +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; +} + +body, .BackColor +{ + background-color: #f7f7f7; +} + +.PopupBody +{ + height: 100%; + width: 100%; + overflow: hidden; + background-color: transparent; + padding: 0px; +} + +#header +{ + cursor: move; +} + +.PopupTitle +{ + font-weight: bold; + font-size: 14pt; + color: #504845; + background-color: #dedede; + padding: 3px 10px 3px 10px; +} + +.PopupButtons +{ + position: absolute; + right: 0px; + left: 0px; + bottom: 0px; + border-top: #cec6b5 1px solid; + background-color: #DEDEDE; + padding: 7px 10px 7px 10px; +} + +.Button +{ + border: #7a7261 1px solid; + color: #504845; + background-color: #cec6b5; +} + +#btnOk +{ + width: 100px; +} + +.DarkBackground +{ + background-color: #f2f2f2; +} + +.LightBackground +{ + background-color: #ffffbe; +} + +.PopupTitleBorder +{ + border-bottom: #cec6b5 1px solid; +} + +.PopupTabArea +{ + color: #504845; + background-color: #DEDEDE; +} + +.PopupTabEmptyArea +{ + padding-left: 10px ; + border-bottom: #cec6b5 1px solid; +} + +.PopupTab, .PopupTabSelected +{ + border-right: #cec6b5 1px solid; + border-top: #cec6b5 1px solid; + border-left: #cec6b5 1px solid; + padding: 3px 5px 3px 5px; + color: #504845; +} + +.PopupTab +{ + margin-top: 1px; + border-bottom: #cec6b5 1px solid; + cursor: pointer; + cursor: hand; +} + +.PopupTabSelected +{ + font-weight:bold; + cursor: default; + padding-top: 4px; + border-bottom: #f1f1e3 1px solid; + background-color: #f7f7f7; +} + +.PopupSelectionBox +{ + border: #a9a9a9 1px solid !important; + background-color: #dcdcdc !important; + cursor: pointer; + cursor: hand; +} + +#tdBrowse +{ + vertical-align: bottom; +} + +/** + * Dialog frame related styles. + */ + +.contents +{ + position: absolute; + top: 2px; + left: 16px; + right: 16px; + bottom: 20px; + background-color: #f7f7f7; + overflow: hidden; + z-index: 1; +} + +.tl, .tr, .tc, .bl, .br, .bc +{ + position: absolute; + background-image: url(images/sprites.png); + background-repeat: no-repeat; +} + +* html .tl, * html .tr, * html .tc, * html .bl, * html .br, * html .bc +{ + background-image: url(images/sprites.gif); +} + +.ml, .mr +{ + position: absolute; + background-image: url(images/dialog.sides.png); + background-repeat: repeat-y; +} + +* html .ml, * html .mr +{ + background-image: url(images/dialog.sides.gif); +} + +.rtl .ml, .rtl .mr +{ + position: absolute; + background-image: url(images/dialog.sides.rtl.png); + background-repeat: repeat-y; +} + +* html .rtl .ml, * html .rtl .mr +{ + background-image: url(images/dialog.sides.gif); +} + +.tl +{ + top: 0px; + left: 0px; + width: 16px; + height: 16px; + background-position: -16px -16px; +} + +.rtl .tl +{ + background-position: -16px -397px; +} + +.tr +{ + top: 0px; + right: 0px; + width: 16px; + height: 16px; + background-position: -16px -76px; +} + +.rtl .tr +{ + background-position: -16px -457px; +} + +.tc +{ + top: 0px; + right: 16px; + left: 16px; + height: 16px; + background-position: 0px -136px; + background-repeat: repeat-x; +} + +.ml +{ + top: 16px; + left: 0px; + width: 16px; + bottom: 51px; + background-position: 0px 0px; +} + +.mr +{ + top: 16px; + right: 0px; + width: 16px; + bottom: 51px; + background-position: -16px 0px; +} + +.bl +{ + bottom: 0px; + left: 0px; + width: 30px; + height: 51px; + background-position: -16px -196px; +} + +.rtl .bl +{ + background-position: -16px -517px; +} + +.br +{ + bottom: 0px; + right: 0px; + width: 30px; + height: 51px; + background-position: -16px -263px; +} + +.rtl .br +{ + background-position: -16px -584px; +} + +.bc +{ + bottom: 0px; + right: 30px; + left: 30px; + height: 51px; + background-position: 0px -330px; + background-repeat: repeat-x; +} + +/* For IE6. Do not change it. */ +* html .blocker +{ + position: absolute; + width: 100%; + height: 100%; + z-index: 12; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); +} + +/* The layer used to cover the dialog when opening a child dialog. */ +.cover +{ + position: absolute; + top: 0px; + left: 14px; + right: 14px; + bottom: 18px; + z-index: 11; +} + +#closeButton +{ + position: absolute; + right: 0px; + top: 0px; + margin-top: 5px; + margin-right: 10px; + width: 20px; + height: 20px; + cursor: pointer; + background-image: url(images/sprites.png); + background-repeat: no-repeat; + background-position: -16px -651px; +} + +* html #closeButton +{ + cursor: hand; + background-image: url(images/sprites.gif); +} + +.rtl #closeButton +{ + right: auto; + left: 10px; + margin-right: 0px; +} + +#closeButton:hover +{ + background-position: -16px -687px; +} + +#throbberBlock +{ + z-index: 10; +} + +#throbberBlock div +{ + float: left; + width: 8px; + height: 9px; + margin-left: 2px; + margin-right: 2px; + font-size: 1px; /* IE6 */ +} + +/* + Color Gradient Generator: + http://www.herethere.net/~samson/php/color_gradient/?cbegin=504845&cend=DEDEDE&steps=4 +*/ + +.throbber_1 +{ + background-color: #504845; +} + +.throbber_2 +{ + background-color: #736D6B; +} + +.throbber_3 +{ + background-color: #979391; +} + +.throbber_4 +{ + background-color: #BAB8B7; +} + +.throbber_5 +{ + background-color: #DEDEDE; +} diff --git a/htdocs/theme/auguria/fckeditor/fck_dialog_ie6.js b/htdocs/theme/auguria/fckeditor/fck_dialog_ie6.js index 4fc9ba66f52..804cc8d24de 100644 --- a/htdocs/theme/auguria/fckeditor/fck_dialog_ie6.js +++ b/htdocs/theme/auguria/fckeditor/fck_dialog_ie6.js @@ -1,110 +1,110 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - */ - -(function() -{ - // IE6 doens't handle absolute positioning properly (it is always in quirks - // mode). This function fixes the sizes and positions of many elements that - // compose the skin (this is skin specific). - var fixSizes = window.DoResizeFixes = function() - { - var fckDlg = window.document.body ; - - for ( var i = 0 ; i < fckDlg.childNodes.length ; i++ ) - { - var child = fckDlg.childNodes[i] ; - switch ( child.className ) - { - case 'contents' : - child.style.width = Math.max(0, fckDlg.offsetWidth - 16 - 16); // -left -right - child.style.height = Math.max(0, fckDlg.clientHeight - 20 - 2); // -bottom -top - break ; - - case 'blocker' : - case 'cover' : - child.style.width = Math.max(0, fckDlg.offsetWidth - 16 - 16 + 4); // -left -right + 4 - child.style.height = Math.max(0, fckDlg.clientHeight - 20 - 2 + 4); // -bottom -top + 4 - break ; - - case 'tr' : - child.style.left = Math.max(0, fckDlg.clientWidth - 16); - break ; - - case 'tc' : - child.style.width = Math.max(0, fckDlg.clientWidth - 16 - 16); - break ; - - case 'ml' : - child.style.height = Math.max(0, fckDlg.clientHeight - 16 - 51); - break ; - - case 'mr' : - child.style.left = Math.max(0, fckDlg.clientWidth - 16); - child.style.height = Math.max(0, fckDlg.clientHeight - 16 - 51); - break ; - - case 'bl' : - child.style.top = Math.max(0, fckDlg.clientHeight - 51); - break ; - - case 'br' : - child.style.left = Math.max(0, fckDlg.clientWidth - 30); - child.style.top = Math.max(0, fckDlg.clientHeight - 51); - break ; - - case 'bc' : - child.style.width = Math.max(0, fckDlg.clientWidth - 30 - 30); - child.style.top = Math.max(0, fckDlg.clientHeight - 51); - break ; - } - } - } - - var closeButtonOver = function() - { - this.style.backgroundPosition = '-16px -687px' ; - } ; - - var closeButtonOut = function() - { - this.style.backgroundPosition = '-16px -651px' ; - } ; - - var fixCloseButton = function() - { - var closeButton = document.getElementById ('closeButton'); - - closeButton.onmouseover = closeButtonOver ; - closeButton.onmouseout = closeButtonOut ; - } - - var onLoad = function() - { - fixSizes() ; - fixCloseButton() ; - - window.attachEvent('onresize', fixSizes); - window.detachEvent('onload', onLoad); - } - - window.attachEvent('onload', onLoad); - -})() ; +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + */ + +(function() +{ + // IE6 doens't handle absolute positioning properly (it is always in quirks + // mode). This function fixes the sizes and positions of many elements that + // compose the skin (this is skin specific). + var fixSizes = window.DoResizeFixes = function() + { + var fckDlg = window.document.body ; + + for ( var i = 0 ; i < fckDlg.childNodes.length ; i++ ) + { + var child = fckDlg.childNodes[i] ; + switch ( child.className ) + { + case 'contents' : + child.style.width = Math.max(0, fckDlg.offsetWidth - 16 - 16); // -left -right + child.style.height = Math.max(0, fckDlg.clientHeight - 20 - 2); // -bottom -top + break ; + + case 'blocker' : + case 'cover' : + child.style.width = Math.max(0, fckDlg.offsetWidth - 16 - 16 + 4); // -left -right + 4 + child.style.height = Math.max(0, fckDlg.clientHeight - 20 - 2 + 4); // -bottom -top + 4 + break ; + + case 'tr' : + child.style.left = Math.max(0, fckDlg.clientWidth - 16); + break ; + + case 'tc' : + child.style.width = Math.max(0, fckDlg.clientWidth - 16 - 16); + break ; + + case 'ml' : + child.style.height = Math.max(0, fckDlg.clientHeight - 16 - 51); + break ; + + case 'mr' : + child.style.left = Math.max(0, fckDlg.clientWidth - 16); + child.style.height = Math.max(0, fckDlg.clientHeight - 16 - 51); + break ; + + case 'bl' : + child.style.top = Math.max(0, fckDlg.clientHeight - 51); + break ; + + case 'br' : + child.style.left = Math.max(0, fckDlg.clientWidth - 30); + child.style.top = Math.max(0, fckDlg.clientHeight - 51); + break ; + + case 'bc' : + child.style.width = Math.max(0, fckDlg.clientWidth - 30 - 30); + child.style.top = Math.max(0, fckDlg.clientHeight - 51); + break ; + } + } + } + + var closeButtonOver = function() + { + this.style.backgroundPosition = '-16px -687px' ; + } ; + + var closeButtonOut = function() + { + this.style.backgroundPosition = '-16px -651px' ; + } ; + + var fixCloseButton = function() + { + var closeButton = document.getElementById ('closeButton'); + + closeButton.onmouseover = closeButtonOver ; + closeButton.onmouseout = closeButtonOut ; + } + + var onLoad = function() + { + fixSizes() ; + fixCloseButton() ; + + window.attachEvent('onresize', fixSizes); + window.detachEvent('onload', onLoad); + } + + window.attachEvent('onload', onLoad); + +})() ; diff --git a/htdocs/theme/auguria/fckeditor/fck_editor.css b/htdocs/theme/auguria/fckeditor/fck_editor.css index 0862d375fe6..8ba21189397 100644 --- a/htdocs/theme/auguria/fckeditor/fck_editor.css +++ b/htdocs/theme/auguria/fckeditor/fck_editor.css @@ -1,465 +1,465 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Styles used by the editor IFRAME and Toolbar. - */ - -/* - ### Basic Editor IFRAME Styles. -*/ - -body -{ - padding: 1px; - margin: 0; - background-color: #ffffff; -} - -#xEditingArea -{ - border: #696969 1px solid; -} - -.SourceField -{ - padding: 5px; - margin: 0px; - font-family: Monospace; -} - -/* - Toolbar -*/ - -.TB_ToolbarSet, .TB_Expand, .TB_Collapse -{ - cursor: default; - background-color: #f7f7f7; -} - -.TB_ToolbarSet -{ - border-top: #f7f7f7 1px outset; - border-bottom: #f7f7f7 1px outset; -} - -.TB_ToolbarSet TD -{ - font-size: 11px; - font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; -} - -.TB_Toolbar -{ - height: 24px; - display: inline-table; /* inline = Opera jumping buttons bug */ -} - -.TB_Separator -{ - width: 1px; - height: 16px; - margin: 2px; - background-color: #999966; -} - -.TB_Start -{ - background-image: url(images/toolbar.start.gif); - margin: 2px; - width: 3px; - background-repeat: no-repeat; - height: 16px; -} - -.TB_End -{ - display: none; -} - -.TB_ExpandImg -{ - background-image: url(images/toolbar.expand.gif); - background-repeat: no-repeat; -} - -.TB_CollapseImg -{ - background-image: url(images/toolbar.collapse.gif); - background-repeat: no-repeat; -} - -.TB_SideBorder -{ - background-color: #696969; -} - -.TB_Expand, .TB_Collapse -{ - padding: 2px 2px 2px 2px; - border: #f7f7f7 1px outset; -} - -.TB_Collapse -{ - width: 5px; -} - -.TB_Break -{ - height: 24px; /* IE needs the height to be set, otherwise no break */ -} - -/* - Toolbar Button -*/ - -.TB_Button_On, .TB_Button_Off, .TB_Button_On_Over, .TB_Button_Off_Over, .TB_Button_Disabled -{ - border: #f7f7f7 1px solid; /* This is the default border */ - height: 22px; /* The height is necessary, otherwise IE will not apply the alpha */ -} - -.TB_Button_On -{ - border: #316ac5 1px solid; - background-color: #c1d2ee; -} - -.TB_Button_On_Over, .TB_Button_Off_Over -{ - border: #316ac5 1px solid; - background-color: #dff1ff; -} - -.TB_Button_Off -{ - filter: alpha(opacity=70); /* IE */ - opacity: 0.70; /* Safari, Opera and Mozilla */ -} - -.TB_Button_Disabled -{ - filter: gray() alpha(opacity=30); /* IE */ - opacity: 0.30; /* Safari, Opera and Mozilla */ -} - -.TB_Button_Padding -{ - visibility: hidden; - width: 3px; - height: 22px; -} - -.TB_Button_Image -{ - overflow: hidden; - width: 16px; - height: 16px; - margin: 3px; - background-repeat: no-repeat; -} - -.TB_Button_Image img -{ - position: relative; -} - -.TB_Button_Off .TB_Button_Text -{ - background-color: #f7f7f7; /* Needed because of a bug on Clear Type */ -} - -.TB_ConnectionLine -{ - background-color: #ffffff; - height: 1px; - margin-left: 1px; /* ltr */ - margin-right: 1px; /* rtl */ -} - -.TB_Text -{ - height: 22px; -} - -.TB_Button_Off .TB_Text -{ - background-color: #f7f7f7 ; /* Needed because of a bug on ClearType */ -} - -.TB_Button_On_Over .TB_Text -{ - background-color: #dff1ff ; /* Needed because of a bug on ClearType */ -} - -/* - Menu -*/ - -.MN_Menu -{ - border: 1px solid #8f8f73; - padding: 2px; - background-color: #ffffff; - cursor: default; -} - -.MN_Menu, .MN_Menu .MN_Label -{ - font-size: 11px; - font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; -} - -.MN_Item_Padding -{ - visibility: hidden; - width: 3px; - height: 20px; -} - -.MN_Icon -{ - background-color: #dedede; - text-align: center; - height: 20px; -} - -.MN_Label -{ - padding-left: 3px; - padding-right: 3px; -} - -.MN_Separator -{ - height: 3px; -} - -.MN_Separator_Line -{ - border-top: #b9b99d 1px solid; -} - -.MN_Item .MN_Icon IMG -{ - filter: alpha(opacity=70); - opacity: 0.70; -} - -.MN_Item_Over -{ - color: #ffffff; - background-color: #8a857d; -} - -.MN_Item_Over .MN_Icon -{ - background-color: #6c6761; -} - -.MN_Item_Disabled IMG -{ - filter: gray() alpha(opacity=30); /* IE */ - opacity: 0.30; /* Safari, Opera and Mozilla */ -} - -.MN_Item_Disabled .MN_Label -{ - color: #b7b7b7; -} - -.MN_Arrow -{ - padding-right: 3px; - padding-left: 3px; -} - -.MN_ConnectionLine -{ - background-color: #ffffff; -} - -.Menu .TB_Button_On, .Menu .TB_Button_On_Over -{ - border: #8f8f73 1px solid; - background-color: #ffffff; -} - -/* - ### Panel Styles -*/ - -.FCK_Panel -{ - border: #8f8f73 1px solid; - padding: 2px; - background-color: #ffffff; -} - -.FCK_Panel, .FCK_Panel TD -{ - font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; - font-size: 11px; -} - -/* - ### Special Combos -*/ - -.SC_Panel -{ - overflow: auto; - white-space: nowrap; - cursor: default; - border: 1px solid #8f8f73; - padding-left: 2px; +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * Styles used by the editor IFRAME and Toolbar. + */ + +/* + ### Basic Editor IFRAME Styles. +*/ + +body +{ + padding: 1px; + margin: 0; + background-color: #ffffff; +} + +#xEditingArea +{ + border: #696969 1px solid; +} + +.SourceField +{ + padding: 5px; + margin: 0px; + font-family: Monospace; +} + +/* + Toolbar +*/ + +.TB_ToolbarSet, .TB_Expand, .TB_Collapse +{ + cursor: default; + background-color: #f7f7f7; +} + +.TB_ToolbarSet +{ + border-top: #f7f7f7 1px outset; + border-bottom: #f7f7f7 1px outset; +} + +.TB_ToolbarSet TD +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; +} + +.TB_Toolbar +{ + height: 24px; + display: inline-table; /* inline = Opera jumping buttons bug */ +} + +.TB_Separator +{ + width: 1px; + height: 16px; + margin: 2px; + background-color: #999966; +} + +.TB_Start +{ + background-image: url(images/toolbar.start.gif); + margin: 2px; + width: 3px; + background-repeat: no-repeat; + height: 16px; +} + +.TB_End +{ + display: none; +} + +.TB_ExpandImg +{ + background-image: url(images/toolbar.expand.gif); + background-repeat: no-repeat; +} + +.TB_CollapseImg +{ + background-image: url(images/toolbar.collapse.gif); + background-repeat: no-repeat; +} + +.TB_SideBorder +{ + background-color: #696969; +} + +.TB_Expand, .TB_Collapse +{ + padding: 2px 2px 2px 2px; + border: #f7f7f7 1px outset; +} + +.TB_Collapse +{ + width: 5px; +} + +.TB_Break +{ + height: 24px; /* IE needs the height to be set, otherwise no break */ +} + +/* + Toolbar Button +*/ + +.TB_Button_On, .TB_Button_Off, .TB_Button_On_Over, .TB_Button_Off_Over, .TB_Button_Disabled +{ + border: #f7f7f7 1px solid; /* This is the default border */ + height: 22px; /* The height is necessary, otherwise IE will not apply the alpha */ +} + +.TB_Button_On +{ + border: #316ac5 1px solid; + background-color: #c1d2ee; +} + +.TB_Button_On_Over, .TB_Button_Off_Over +{ + border: #316ac5 1px solid; + background-color: #dff1ff; +} + +.TB_Button_Off +{ + filter: alpha(opacity=70); /* IE */ + opacity: 0.70; /* Safari, Opera and Mozilla */ +} + +.TB_Button_Disabled +{ + filter: gray() alpha(opacity=30); /* IE */ + opacity: 0.30; /* Safari, Opera and Mozilla */ +} + +.TB_Button_Padding +{ + visibility: hidden; + width: 3px; + height: 22px; +} + +.TB_Button_Image +{ + overflow: hidden; + width: 16px; + height: 16px; + margin: 3px; + background-repeat: no-repeat; +} + +.TB_Button_Image img +{ + position: relative; +} + +.TB_Button_Off .TB_Button_Text +{ + background-color: #f7f7f7; /* Needed because of a bug on Clear Type */ +} + +.TB_ConnectionLine +{ + background-color: #ffffff; + height: 1px; + margin-left: 1px; /* ltr */ + margin-right: 1px; /* rtl */ +} + +.TB_Text +{ + height: 22px; +} + +.TB_Button_Off .TB_Text +{ + background-color: #f7f7f7 ; /* Needed because of a bug on ClearType */ +} + +.TB_Button_On_Over .TB_Text +{ + background-color: #dff1ff ; /* Needed because of a bug on ClearType */ +} + +/* + Menu +*/ + +.MN_Menu +{ + border: 1px solid #8f8f73; + padding: 2px; + background-color: #ffffff; + cursor: default; +} + +.MN_Menu, .MN_Menu .MN_Label +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; +} + +.MN_Item_Padding +{ + visibility: hidden; + width: 3px; + height: 20px; +} + +.MN_Icon +{ + background-color: #dedede; + text-align: center; + height: 20px; +} + +.MN_Label +{ + padding-left: 3px; + padding-right: 3px; +} + +.MN_Separator +{ + height: 3px; +} + +.MN_Separator_Line +{ + border-top: #b9b99d 1px solid; +} + +.MN_Item .MN_Icon IMG +{ + filter: alpha(opacity=70); + opacity: 0.70; +} + +.MN_Item_Over +{ + color: #ffffff; + background-color: #8a857d; +} + +.MN_Item_Over .MN_Icon +{ + background-color: #6c6761; +} + +.MN_Item_Disabled IMG +{ + filter: gray() alpha(opacity=30); /* IE */ + opacity: 0.30; /* Safari, Opera and Mozilla */ +} + +.MN_Item_Disabled .MN_Label +{ + color: #b7b7b7; +} + +.MN_Arrow +{ + padding-right: 3px; + padding-left: 3px; +} + +.MN_ConnectionLine +{ + background-color: #ffffff; +} + +.Menu .TB_Button_On, .Menu .TB_Button_On_Over +{ + border: #8f8f73 1px solid; + background-color: #ffffff; +} + +/* + ### Panel Styles +*/ + +.FCK_Panel +{ + border: #8f8f73 1px solid; + padding: 2px; + background-color: #ffffff; +} + +.FCK_Panel, .FCK_Panel TD +{ + font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; + font-size: 11px; +} + +/* + ### Special Combos +*/ + +.SC_Panel +{ + overflow: auto; + white-space: nowrap; + cursor: default; + border: 1px solid #8f8f73; + padding-left: 2px; padding-right: 2px; - background-color: #ffffff; -} - -.SC_Panel, .SC_Panel TD -{ - font-size: 11px; - font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; -} - -.SC_Item, .SC_ItemSelected -{ - margin-top: 2px; - margin-bottom: 2px; - background-position: left center; - padding-left: 11px; - padding-right: 3px; - padding-top: 2px; - padding-bottom: 2px; - text-overflow: ellipsis; - overflow: hidden; - background-repeat: no-repeat; - border: #dddddd 1px solid; -} - -.SC_Item *, .SC_ItemSelected * -{ - margin-top: 0px; - margin-bottom: 0px; -} - -.SC_ItemSelected -{ - border: #9a9afb 1px solid; - background-image: url(images/toolbar.arrowright.gif); -} - -.SC_ItemOver -{ - border: #404040 1px solid; -} - -.SC_Field -{ - border: #b7b7a6 1px solid; - cursor: default; -} - -.SC_FieldCaption -{ - overflow: visible; - padding-right: 5px; - padding-left: 5px; - opacity: 0.75; /* Safari, Opera and Mozilla */ - filter: alpha(opacity=70); /* IE */ /* -moz-opacity: 0.75; Mozilla (Old) */ - height: 23px; - background-color: #f7f7f7; -} - -.SC_FieldLabel -{ - white-space: nowrap; - padding: 2px; - width: 100%; - cursor: default; - background-color: #ffffff; - text-overflow: ellipsis; - overflow: hidden; -} - -.SC_FieldButton -{ - background-position: center center; - background-image: url(images/toolbar.buttonarrow.gif); - border-left: #b7b7a6 1px solid; - width: 14px; - background-repeat: no-repeat; -} - -.SC_FieldDisabled .SC_FieldButton, .SC_FieldDisabled .SC_FieldCaption, .SC_FieldDisabled .TB_ButtonType_Text -{ - opacity: 0.30; /* Safari, Opera and Mozilla */ - filter: gray() alpha(opacity=30); /* IE */ /* -moz-opacity: 0.30; Mozilla (Old) */ -} - -.SC_FieldOver -{ - border: #316ac5 1px solid; -} - -.SC_FieldOver .SC_FieldButton -{ - border-left: #316ac5 1px solid; -} - -/* - ### Color Selector Panel -*/ - -.ColorBoxBorder -{ - border: #808080 1px solid; - position: static; -} - -.ColorBox -{ - font-size: 1px; - width: 10px; - position: static; - height: 10px; -} - -.ColorDeselected, .ColorSelected -{ - cursor: default; -} - -.ColorDeselected -{ - border: #ffffff 1px solid; - padding: 2px; - float: left; -} - -.ColorSelected -{ - border: #316ac5 1px solid; - padding: 2px; - float: left; - background-color: #c1d2ee; -} + background-color: #ffffff; +} + +.SC_Panel, .SC_Panel TD +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; +} + +.SC_Item, .SC_ItemSelected +{ + margin-top: 2px; + margin-bottom: 2px; + background-position: left center; + padding-left: 11px; + padding-right: 3px; + padding-top: 2px; + padding-bottom: 2px; + text-overflow: ellipsis; + overflow: hidden; + background-repeat: no-repeat; + border: #dddddd 1px solid; +} + +.SC_Item *, .SC_ItemSelected * +{ + margin-top: 0px; + margin-bottom: 0px; +} + +.SC_ItemSelected +{ + border: #9a9afb 1px solid; + background-image: url(images/toolbar.arrowright.gif); +} + +.SC_ItemOver +{ + border: #404040 1px solid; +} + +.SC_Field +{ + border: #b7b7a6 1px solid; + cursor: default; +} + +.SC_FieldCaption +{ + overflow: visible; + padding-right: 5px; + padding-left: 5px; + opacity: 0.75; /* Safari, Opera and Mozilla */ + filter: alpha(opacity=70); /* IE */ /* -moz-opacity: 0.75; Mozilla (Old) */ + height: 23px; + background-color: #f7f7f7; +} + +.SC_FieldLabel +{ + white-space: nowrap; + padding: 2px; + width: 100%; + cursor: default; + background-color: #ffffff; + text-overflow: ellipsis; + overflow: hidden; +} + +.SC_FieldButton +{ + background-position: center center; + background-image: url(images/toolbar.buttonarrow.gif); + border-left: #b7b7a6 1px solid; + width: 14px; + background-repeat: no-repeat; +} + +.SC_FieldDisabled .SC_FieldButton, .SC_FieldDisabled .SC_FieldCaption, .SC_FieldDisabled .TB_ButtonType_Text +{ + opacity: 0.30; /* Safari, Opera and Mozilla */ + filter: gray() alpha(opacity=30); /* IE */ /* -moz-opacity: 0.30; Mozilla (Old) */ +} + +.SC_FieldOver +{ + border: #316ac5 1px solid; +} + +.SC_FieldOver .SC_FieldButton +{ + border-left: #316ac5 1px solid; +} + +/* + ### Color Selector Panel +*/ + +.ColorBoxBorder +{ + border: #808080 1px solid; + position: static; +} + +.ColorBox +{ + font-size: 1px; + width: 10px; + position: static; + height: 10px; +} + +.ColorDeselected, .ColorSelected +{ + cursor: default; +} + +.ColorDeselected +{ + border: #ffffff 1px solid; + padding: 2px; + float: left; +} + +.ColorSelected +{ + border: #316ac5 1px solid; + padding: 2px; + float: left; + background-color: #c1d2ee; +} diff --git a/htdocs/theme/bureau2crea/fckeditor/fck_dialog.css b/htdocs/theme/bureau2crea/fckeditor/fck_dialog.css index 4582b89bf81..35d0fc0b180 100644 --- a/htdocs/theme/bureau2crea/fckeditor/fck_dialog.css +++ b/htdocs/theme/bureau2crea/fckeditor/fck_dialog.css @@ -1,4 +1,4 @@ -/* +/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2008 Frederico Caldeira Knabben * diff --git a/htdocs/theme/bureau2crea/fckeditor/fck_editor.css b/htdocs/theme/bureau2crea/fckeditor/fck_editor.css index 3452f3aef39..8ba21189397 100644 --- a/htdocs/theme/bureau2crea/fckeditor/fck_editor.css +++ b/htdocs/theme/bureau2crea/fckeditor/fck_editor.css @@ -1,4 +1,4 @@ -/* +/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2008 Frederico Caldeira Knabben * diff --git a/htdocs/theme/cameleo/fckeditor/fck_dialog.css b/htdocs/theme/cameleo/fckeditor/fck_dialog.css index 53f16ef8d3c..35d0fc0b180 100644 --- a/htdocs/theme/cameleo/fckeditor/fck_dialog.css +++ b/htdocs/theme/cameleo/fckeditor/fck_dialog.css @@ -1,402 +1,402 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Styles used by the dialog boxes. - */ - -html, body -{ - background-color: transparent; - margin: 0px; - padding: 0px; -} - -body -{ - padding: 10px; -} - -body, td, input, select, textarea -{ - font-size: 11px; - font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; -} - -body, .BackColor -{ - background-color: #f7f7f7; -} - -.PopupBody -{ - height: 100%; - width: 100%; - overflow: hidden; - background-color: transparent; - padding: 0px; -} - -#header -{ - cursor: move; -} - -.PopupTitle -{ - font-weight: bold; - font-size: 14pt; - color: #504845; - background-color: #dedede; - padding: 3px 10px 3px 10px; -} - -.PopupButtons -{ - position: absolute; - right: 0px; - left: 0px; - bottom: 0px; - border-top: #cec6b5 1px solid; - background-color: #DEDEDE; - padding: 7px 10px 7px 10px; -} - -.Button -{ - border: #7a7261 1px solid; - color: #504845; - background-color: #cec6b5; -} - -#btnOk -{ - width: 100px; -} - -.DarkBackground -{ - background-color: #f2f2f2; -} - -.LightBackground -{ - background-color: #ffffbe; -} - -.PopupTitleBorder -{ - border-bottom: #cec6b5 1px solid; -} - -.PopupTabArea -{ - color: #504845; - background-color: #DEDEDE; -} - -.PopupTabEmptyArea -{ - padding-left: 10px ; - border-bottom: #cec6b5 1px solid; -} - -.PopupTab, .PopupTabSelected -{ - border-right: #cec6b5 1px solid; - border-top: #cec6b5 1px solid; - border-left: #cec6b5 1px solid; - padding: 3px 5px 3px 5px; - color: #504845; -} - -.PopupTab -{ - margin-top: 1px; - border-bottom: #cec6b5 1px solid; - cursor: pointer; - cursor: hand; -} - -.PopupTabSelected -{ - font-weight:bold; - cursor: default; - padding-top: 4px; - border-bottom: #f1f1e3 1px solid; - background-color: #f7f7f7; -} - -.PopupSelectionBox -{ - border: #a9a9a9 1px solid !important; - background-color: #dcdcdc !important; - cursor: pointer; - cursor: hand; -} - -#tdBrowse -{ - vertical-align: bottom; -} - -/** - * Dialog frame related styles. - */ - -.contents -{ - position: absolute; - top: 2px; - left: 16px; - right: 16px; - bottom: 20px; - background-color: #f7f7f7; - overflow: hidden; - z-index: 1; -} - -.tl, .tr, .tc, .bl, .br, .bc -{ - position: absolute; - background-image: url(images/sprites.png); - background-repeat: no-repeat; -} - -* html .tl, * html .tr, * html .tc, * html .bl, * html .br, * html .bc -{ - background-image: url(images/sprites.gif); -} - -.ml, .mr -{ - position: absolute; - background-image: url(images/dialog.sides.png); - background-repeat: repeat-y; -} - -* html .ml, * html .mr -{ - background-image: url(images/dialog.sides.gif); -} - -.rtl .ml, .rtl .mr -{ - position: absolute; - background-image: url(images/dialog.sides.rtl.png); - background-repeat: repeat-y; -} - -* html .rtl .ml, * html .rtl .mr -{ - background-image: url(images/dialog.sides.gif); -} - -.tl -{ - top: 0px; - left: 0px; - width: 16px; - height: 16px; - background-position: -16px -16px; -} - -.rtl .tl -{ - background-position: -16px -397px; -} - -.tr -{ - top: 0px; - right: 0px; - width: 16px; - height: 16px; - background-position: -16px -76px; -} - -.rtl .tr -{ - background-position: -16px -457px; -} - -.tc -{ - top: 0px; - right: 16px; - left: 16px; - height: 16px; - background-position: 0px -136px; - background-repeat: repeat-x; -} - -.ml -{ - top: 16px; - left: 0px; - width: 16px; - bottom: 51px; - background-position: 0px 0px; -} - -.mr -{ - top: 16px; - right: 0px; - width: 16px; - bottom: 51px; - background-position: -16px 0px; -} - -.bl -{ - bottom: 0px; - left: 0px; - width: 30px; - height: 51px; - background-position: -16px -196px; -} - -.rtl .bl -{ - background-position: -16px -517px; -} - -.br -{ - bottom: 0px; - right: 0px; - width: 30px; - height: 51px; - background-position: -16px -263px; -} - -.rtl .br -{ - background-position: -16px -584px; -} - -.bc -{ - bottom: 0px; - right: 30px; - left: 30px; - height: 51px; - background-position: 0px -330px; - background-repeat: repeat-x; -} - -/* For IE6. Do not change it. */ -* html .blocker -{ - position: absolute; - width: 100%; - height: 100%; - z-index: 12; - filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); -} - -/* The layer used to cover the dialog when opening a child dialog. */ -.cover -{ - position: absolute; - top: 0px; - left: 14px; - right: 14px; - bottom: 18px; - z-index: 11; -} - -#closeButton -{ - position: absolute; - right: 0px; - top: 0px; - margin-top: 5px; - margin-right: 10px; - width: 20px; - height: 20px; - cursor: pointer; - background-image: url(images/sprites.png); - background-repeat: no-repeat; - background-position: -16px -651px; -} - -* html #closeButton -{ - cursor: hand; - background-image: url(images/sprites.gif); -} - -.rtl #closeButton -{ - right: auto; - left: 10px; - margin-right: 0px; -} - -#closeButton:hover -{ - background-position: -16px -687px; -} - -#throbberBlock -{ - z-index: 10; -} - -#throbberBlock div -{ - float: left; - width: 8px; - height: 9px; - margin-left: 2px; - margin-right: 2px; - font-size: 1px; /* IE6 */ -} - -/* - Color Gradient Generator: - http://www.herethere.net/~samson/php/color_gradient/?cbegin=504845&cend=DEDEDE&steps=4 -*/ - -.throbber_1 -{ - background-color: #504845; -} - -.throbber_2 -{ - background-color: #736D6B; -} - -.throbber_3 -{ - background-color: #979391; -} - -.throbber_4 -{ - background-color: #BAB8B7; -} - -.throbber_5 -{ - background-color: #DEDEDE; -} +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * Styles used by the dialog boxes. + */ + +html, body +{ + background-color: transparent; + margin: 0px; + padding: 0px; +} + +body +{ + padding: 10px; +} + +body, td, input, select, textarea +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; +} + +body, .BackColor +{ + background-color: #f7f7f7; +} + +.PopupBody +{ + height: 100%; + width: 100%; + overflow: hidden; + background-color: transparent; + padding: 0px; +} + +#header +{ + cursor: move; +} + +.PopupTitle +{ + font-weight: bold; + font-size: 14pt; + color: #504845; + background-color: #dedede; + padding: 3px 10px 3px 10px; +} + +.PopupButtons +{ + position: absolute; + right: 0px; + left: 0px; + bottom: 0px; + border-top: #cec6b5 1px solid; + background-color: #DEDEDE; + padding: 7px 10px 7px 10px; +} + +.Button +{ + border: #7a7261 1px solid; + color: #504845; + background-color: #cec6b5; +} + +#btnOk +{ + width: 100px; +} + +.DarkBackground +{ + background-color: #f2f2f2; +} + +.LightBackground +{ + background-color: #ffffbe; +} + +.PopupTitleBorder +{ + border-bottom: #cec6b5 1px solid; +} + +.PopupTabArea +{ + color: #504845; + background-color: #DEDEDE; +} + +.PopupTabEmptyArea +{ + padding-left: 10px ; + border-bottom: #cec6b5 1px solid; +} + +.PopupTab, .PopupTabSelected +{ + border-right: #cec6b5 1px solid; + border-top: #cec6b5 1px solid; + border-left: #cec6b5 1px solid; + padding: 3px 5px 3px 5px; + color: #504845; +} + +.PopupTab +{ + margin-top: 1px; + border-bottom: #cec6b5 1px solid; + cursor: pointer; + cursor: hand; +} + +.PopupTabSelected +{ + font-weight:bold; + cursor: default; + padding-top: 4px; + border-bottom: #f1f1e3 1px solid; + background-color: #f7f7f7; +} + +.PopupSelectionBox +{ + border: #a9a9a9 1px solid !important; + background-color: #dcdcdc !important; + cursor: pointer; + cursor: hand; +} + +#tdBrowse +{ + vertical-align: bottom; +} + +/** + * Dialog frame related styles. + */ + +.contents +{ + position: absolute; + top: 2px; + left: 16px; + right: 16px; + bottom: 20px; + background-color: #f7f7f7; + overflow: hidden; + z-index: 1; +} + +.tl, .tr, .tc, .bl, .br, .bc +{ + position: absolute; + background-image: url(images/sprites.png); + background-repeat: no-repeat; +} + +* html .tl, * html .tr, * html .tc, * html .bl, * html .br, * html .bc +{ + background-image: url(images/sprites.gif); +} + +.ml, .mr +{ + position: absolute; + background-image: url(images/dialog.sides.png); + background-repeat: repeat-y; +} + +* html .ml, * html .mr +{ + background-image: url(images/dialog.sides.gif); +} + +.rtl .ml, .rtl .mr +{ + position: absolute; + background-image: url(images/dialog.sides.rtl.png); + background-repeat: repeat-y; +} + +* html .rtl .ml, * html .rtl .mr +{ + background-image: url(images/dialog.sides.gif); +} + +.tl +{ + top: 0px; + left: 0px; + width: 16px; + height: 16px; + background-position: -16px -16px; +} + +.rtl .tl +{ + background-position: -16px -397px; +} + +.tr +{ + top: 0px; + right: 0px; + width: 16px; + height: 16px; + background-position: -16px -76px; +} + +.rtl .tr +{ + background-position: -16px -457px; +} + +.tc +{ + top: 0px; + right: 16px; + left: 16px; + height: 16px; + background-position: 0px -136px; + background-repeat: repeat-x; +} + +.ml +{ + top: 16px; + left: 0px; + width: 16px; + bottom: 51px; + background-position: 0px 0px; +} + +.mr +{ + top: 16px; + right: 0px; + width: 16px; + bottom: 51px; + background-position: -16px 0px; +} + +.bl +{ + bottom: 0px; + left: 0px; + width: 30px; + height: 51px; + background-position: -16px -196px; +} + +.rtl .bl +{ + background-position: -16px -517px; +} + +.br +{ + bottom: 0px; + right: 0px; + width: 30px; + height: 51px; + background-position: -16px -263px; +} + +.rtl .br +{ + background-position: -16px -584px; +} + +.bc +{ + bottom: 0px; + right: 30px; + left: 30px; + height: 51px; + background-position: 0px -330px; + background-repeat: repeat-x; +} + +/* For IE6. Do not change it. */ +* html .blocker +{ + position: absolute; + width: 100%; + height: 100%; + z-index: 12; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); +} + +/* The layer used to cover the dialog when opening a child dialog. */ +.cover +{ + position: absolute; + top: 0px; + left: 14px; + right: 14px; + bottom: 18px; + z-index: 11; +} + +#closeButton +{ + position: absolute; + right: 0px; + top: 0px; + margin-top: 5px; + margin-right: 10px; + width: 20px; + height: 20px; + cursor: pointer; + background-image: url(images/sprites.png); + background-repeat: no-repeat; + background-position: -16px -651px; +} + +* html #closeButton +{ + cursor: hand; + background-image: url(images/sprites.gif); +} + +.rtl #closeButton +{ + right: auto; + left: 10px; + margin-right: 0px; +} + +#closeButton:hover +{ + background-position: -16px -687px; +} + +#throbberBlock +{ + z-index: 10; +} + +#throbberBlock div +{ + float: left; + width: 8px; + height: 9px; + margin-left: 2px; + margin-right: 2px; + font-size: 1px; /* IE6 */ +} + +/* + Color Gradient Generator: + http://www.herethere.net/~samson/php/color_gradient/?cbegin=504845&cend=DEDEDE&steps=4 +*/ + +.throbber_1 +{ + background-color: #504845; +} + +.throbber_2 +{ + background-color: #736D6B; +} + +.throbber_3 +{ + background-color: #979391; +} + +.throbber_4 +{ + background-color: #BAB8B7; +} + +.throbber_5 +{ + background-color: #DEDEDE; +} diff --git a/htdocs/theme/cameleo/fckeditor/fck_dialog_ie6.js b/htdocs/theme/cameleo/fckeditor/fck_dialog_ie6.js index 4fc9ba66f52..804cc8d24de 100644 --- a/htdocs/theme/cameleo/fckeditor/fck_dialog_ie6.js +++ b/htdocs/theme/cameleo/fckeditor/fck_dialog_ie6.js @@ -1,110 +1,110 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - */ - -(function() -{ - // IE6 doens't handle absolute positioning properly (it is always in quirks - // mode). This function fixes the sizes and positions of many elements that - // compose the skin (this is skin specific). - var fixSizes = window.DoResizeFixes = function() - { - var fckDlg = window.document.body ; - - for ( var i = 0 ; i < fckDlg.childNodes.length ; i++ ) - { - var child = fckDlg.childNodes[i] ; - switch ( child.className ) - { - case 'contents' : - child.style.width = Math.max(0, fckDlg.offsetWidth - 16 - 16); // -left -right - child.style.height = Math.max(0, fckDlg.clientHeight - 20 - 2); // -bottom -top - break ; - - case 'blocker' : - case 'cover' : - child.style.width = Math.max(0, fckDlg.offsetWidth - 16 - 16 + 4); // -left -right + 4 - child.style.height = Math.max(0, fckDlg.clientHeight - 20 - 2 + 4); // -bottom -top + 4 - break ; - - case 'tr' : - child.style.left = Math.max(0, fckDlg.clientWidth - 16); - break ; - - case 'tc' : - child.style.width = Math.max(0, fckDlg.clientWidth - 16 - 16); - break ; - - case 'ml' : - child.style.height = Math.max(0, fckDlg.clientHeight - 16 - 51); - break ; - - case 'mr' : - child.style.left = Math.max(0, fckDlg.clientWidth - 16); - child.style.height = Math.max(0, fckDlg.clientHeight - 16 - 51); - break ; - - case 'bl' : - child.style.top = Math.max(0, fckDlg.clientHeight - 51); - break ; - - case 'br' : - child.style.left = Math.max(0, fckDlg.clientWidth - 30); - child.style.top = Math.max(0, fckDlg.clientHeight - 51); - break ; - - case 'bc' : - child.style.width = Math.max(0, fckDlg.clientWidth - 30 - 30); - child.style.top = Math.max(0, fckDlg.clientHeight - 51); - break ; - } - } - } - - var closeButtonOver = function() - { - this.style.backgroundPosition = '-16px -687px' ; - } ; - - var closeButtonOut = function() - { - this.style.backgroundPosition = '-16px -651px' ; - } ; - - var fixCloseButton = function() - { - var closeButton = document.getElementById ('closeButton'); - - closeButton.onmouseover = closeButtonOver ; - closeButton.onmouseout = closeButtonOut ; - } - - var onLoad = function() - { - fixSizes() ; - fixCloseButton() ; - - window.attachEvent('onresize', fixSizes); - window.detachEvent('onload', onLoad); - } - - window.attachEvent('onload', onLoad); - -})() ; +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + */ + +(function() +{ + // IE6 doens't handle absolute positioning properly (it is always in quirks + // mode). This function fixes the sizes and positions of many elements that + // compose the skin (this is skin specific). + var fixSizes = window.DoResizeFixes = function() + { + var fckDlg = window.document.body ; + + for ( var i = 0 ; i < fckDlg.childNodes.length ; i++ ) + { + var child = fckDlg.childNodes[i] ; + switch ( child.className ) + { + case 'contents' : + child.style.width = Math.max(0, fckDlg.offsetWidth - 16 - 16); // -left -right + child.style.height = Math.max(0, fckDlg.clientHeight - 20 - 2); // -bottom -top + break ; + + case 'blocker' : + case 'cover' : + child.style.width = Math.max(0, fckDlg.offsetWidth - 16 - 16 + 4); // -left -right + 4 + child.style.height = Math.max(0, fckDlg.clientHeight - 20 - 2 + 4); // -bottom -top + 4 + break ; + + case 'tr' : + child.style.left = Math.max(0, fckDlg.clientWidth - 16); + break ; + + case 'tc' : + child.style.width = Math.max(0, fckDlg.clientWidth - 16 - 16); + break ; + + case 'ml' : + child.style.height = Math.max(0, fckDlg.clientHeight - 16 - 51); + break ; + + case 'mr' : + child.style.left = Math.max(0, fckDlg.clientWidth - 16); + child.style.height = Math.max(0, fckDlg.clientHeight - 16 - 51); + break ; + + case 'bl' : + child.style.top = Math.max(0, fckDlg.clientHeight - 51); + break ; + + case 'br' : + child.style.left = Math.max(0, fckDlg.clientWidth - 30); + child.style.top = Math.max(0, fckDlg.clientHeight - 51); + break ; + + case 'bc' : + child.style.width = Math.max(0, fckDlg.clientWidth - 30 - 30); + child.style.top = Math.max(0, fckDlg.clientHeight - 51); + break ; + } + } + } + + var closeButtonOver = function() + { + this.style.backgroundPosition = '-16px -687px' ; + } ; + + var closeButtonOut = function() + { + this.style.backgroundPosition = '-16px -651px' ; + } ; + + var fixCloseButton = function() + { + var closeButton = document.getElementById ('closeButton'); + + closeButton.onmouseover = closeButtonOver ; + closeButton.onmouseout = closeButtonOut ; + } + + var onLoad = function() + { + fixSizes() ; + fixCloseButton() ; + + window.attachEvent('onresize', fixSizes); + window.detachEvent('onload', onLoad); + } + + window.attachEvent('onload', onLoad); + +})() ; diff --git a/htdocs/theme/cameleo/fckeditor/fck_editor.css b/htdocs/theme/cameleo/fckeditor/fck_editor.css index 0862d375fe6..8ba21189397 100644 --- a/htdocs/theme/cameleo/fckeditor/fck_editor.css +++ b/htdocs/theme/cameleo/fckeditor/fck_editor.css @@ -1,465 +1,465 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Styles used by the editor IFRAME and Toolbar. - */ - -/* - ### Basic Editor IFRAME Styles. -*/ - -body -{ - padding: 1px; - margin: 0; - background-color: #ffffff; -} - -#xEditingArea -{ - border: #696969 1px solid; -} - -.SourceField -{ - padding: 5px; - margin: 0px; - font-family: Monospace; -} - -/* - Toolbar -*/ - -.TB_ToolbarSet, .TB_Expand, .TB_Collapse -{ - cursor: default; - background-color: #f7f7f7; -} - -.TB_ToolbarSet -{ - border-top: #f7f7f7 1px outset; - border-bottom: #f7f7f7 1px outset; -} - -.TB_ToolbarSet TD -{ - font-size: 11px; - font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; -} - -.TB_Toolbar -{ - height: 24px; - display: inline-table; /* inline = Opera jumping buttons bug */ -} - -.TB_Separator -{ - width: 1px; - height: 16px; - margin: 2px; - background-color: #999966; -} - -.TB_Start -{ - background-image: url(images/toolbar.start.gif); - margin: 2px; - width: 3px; - background-repeat: no-repeat; - height: 16px; -} - -.TB_End -{ - display: none; -} - -.TB_ExpandImg -{ - background-image: url(images/toolbar.expand.gif); - background-repeat: no-repeat; -} - -.TB_CollapseImg -{ - background-image: url(images/toolbar.collapse.gif); - background-repeat: no-repeat; -} - -.TB_SideBorder -{ - background-color: #696969; -} - -.TB_Expand, .TB_Collapse -{ - padding: 2px 2px 2px 2px; - border: #f7f7f7 1px outset; -} - -.TB_Collapse -{ - width: 5px; -} - -.TB_Break -{ - height: 24px; /* IE needs the height to be set, otherwise no break */ -} - -/* - Toolbar Button -*/ - -.TB_Button_On, .TB_Button_Off, .TB_Button_On_Over, .TB_Button_Off_Over, .TB_Button_Disabled -{ - border: #f7f7f7 1px solid; /* This is the default border */ - height: 22px; /* The height is necessary, otherwise IE will not apply the alpha */ -} - -.TB_Button_On -{ - border: #316ac5 1px solid; - background-color: #c1d2ee; -} - -.TB_Button_On_Over, .TB_Button_Off_Over -{ - border: #316ac5 1px solid; - background-color: #dff1ff; -} - -.TB_Button_Off -{ - filter: alpha(opacity=70); /* IE */ - opacity: 0.70; /* Safari, Opera and Mozilla */ -} - -.TB_Button_Disabled -{ - filter: gray() alpha(opacity=30); /* IE */ - opacity: 0.30; /* Safari, Opera and Mozilla */ -} - -.TB_Button_Padding -{ - visibility: hidden; - width: 3px; - height: 22px; -} - -.TB_Button_Image -{ - overflow: hidden; - width: 16px; - height: 16px; - margin: 3px; - background-repeat: no-repeat; -} - -.TB_Button_Image img -{ - position: relative; -} - -.TB_Button_Off .TB_Button_Text -{ - background-color: #f7f7f7; /* Needed because of a bug on Clear Type */ -} - -.TB_ConnectionLine -{ - background-color: #ffffff; - height: 1px; - margin-left: 1px; /* ltr */ - margin-right: 1px; /* rtl */ -} - -.TB_Text -{ - height: 22px; -} - -.TB_Button_Off .TB_Text -{ - background-color: #f7f7f7 ; /* Needed because of a bug on ClearType */ -} - -.TB_Button_On_Over .TB_Text -{ - background-color: #dff1ff ; /* Needed because of a bug on ClearType */ -} - -/* - Menu -*/ - -.MN_Menu -{ - border: 1px solid #8f8f73; - padding: 2px; - background-color: #ffffff; - cursor: default; -} - -.MN_Menu, .MN_Menu .MN_Label -{ - font-size: 11px; - font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; -} - -.MN_Item_Padding -{ - visibility: hidden; - width: 3px; - height: 20px; -} - -.MN_Icon -{ - background-color: #dedede; - text-align: center; - height: 20px; -} - -.MN_Label -{ - padding-left: 3px; - padding-right: 3px; -} - -.MN_Separator -{ - height: 3px; -} - -.MN_Separator_Line -{ - border-top: #b9b99d 1px solid; -} - -.MN_Item .MN_Icon IMG -{ - filter: alpha(opacity=70); - opacity: 0.70; -} - -.MN_Item_Over -{ - color: #ffffff; - background-color: #8a857d; -} - -.MN_Item_Over .MN_Icon -{ - background-color: #6c6761; -} - -.MN_Item_Disabled IMG -{ - filter: gray() alpha(opacity=30); /* IE */ - opacity: 0.30; /* Safari, Opera and Mozilla */ -} - -.MN_Item_Disabled .MN_Label -{ - color: #b7b7b7; -} - -.MN_Arrow -{ - padding-right: 3px; - padding-left: 3px; -} - -.MN_ConnectionLine -{ - background-color: #ffffff; -} - -.Menu .TB_Button_On, .Menu .TB_Button_On_Over -{ - border: #8f8f73 1px solid; - background-color: #ffffff; -} - -/* - ### Panel Styles -*/ - -.FCK_Panel -{ - border: #8f8f73 1px solid; - padding: 2px; - background-color: #ffffff; -} - -.FCK_Panel, .FCK_Panel TD -{ - font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; - font-size: 11px; -} - -/* - ### Special Combos -*/ - -.SC_Panel -{ - overflow: auto; - white-space: nowrap; - cursor: default; - border: 1px solid #8f8f73; - padding-left: 2px; +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * Styles used by the editor IFRAME and Toolbar. + */ + +/* + ### Basic Editor IFRAME Styles. +*/ + +body +{ + padding: 1px; + margin: 0; + background-color: #ffffff; +} + +#xEditingArea +{ + border: #696969 1px solid; +} + +.SourceField +{ + padding: 5px; + margin: 0px; + font-family: Monospace; +} + +/* + Toolbar +*/ + +.TB_ToolbarSet, .TB_Expand, .TB_Collapse +{ + cursor: default; + background-color: #f7f7f7; +} + +.TB_ToolbarSet +{ + border-top: #f7f7f7 1px outset; + border-bottom: #f7f7f7 1px outset; +} + +.TB_ToolbarSet TD +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; +} + +.TB_Toolbar +{ + height: 24px; + display: inline-table; /* inline = Opera jumping buttons bug */ +} + +.TB_Separator +{ + width: 1px; + height: 16px; + margin: 2px; + background-color: #999966; +} + +.TB_Start +{ + background-image: url(images/toolbar.start.gif); + margin: 2px; + width: 3px; + background-repeat: no-repeat; + height: 16px; +} + +.TB_End +{ + display: none; +} + +.TB_ExpandImg +{ + background-image: url(images/toolbar.expand.gif); + background-repeat: no-repeat; +} + +.TB_CollapseImg +{ + background-image: url(images/toolbar.collapse.gif); + background-repeat: no-repeat; +} + +.TB_SideBorder +{ + background-color: #696969; +} + +.TB_Expand, .TB_Collapse +{ + padding: 2px 2px 2px 2px; + border: #f7f7f7 1px outset; +} + +.TB_Collapse +{ + width: 5px; +} + +.TB_Break +{ + height: 24px; /* IE needs the height to be set, otherwise no break */ +} + +/* + Toolbar Button +*/ + +.TB_Button_On, .TB_Button_Off, .TB_Button_On_Over, .TB_Button_Off_Over, .TB_Button_Disabled +{ + border: #f7f7f7 1px solid; /* This is the default border */ + height: 22px; /* The height is necessary, otherwise IE will not apply the alpha */ +} + +.TB_Button_On +{ + border: #316ac5 1px solid; + background-color: #c1d2ee; +} + +.TB_Button_On_Over, .TB_Button_Off_Over +{ + border: #316ac5 1px solid; + background-color: #dff1ff; +} + +.TB_Button_Off +{ + filter: alpha(opacity=70); /* IE */ + opacity: 0.70; /* Safari, Opera and Mozilla */ +} + +.TB_Button_Disabled +{ + filter: gray() alpha(opacity=30); /* IE */ + opacity: 0.30; /* Safari, Opera and Mozilla */ +} + +.TB_Button_Padding +{ + visibility: hidden; + width: 3px; + height: 22px; +} + +.TB_Button_Image +{ + overflow: hidden; + width: 16px; + height: 16px; + margin: 3px; + background-repeat: no-repeat; +} + +.TB_Button_Image img +{ + position: relative; +} + +.TB_Button_Off .TB_Button_Text +{ + background-color: #f7f7f7; /* Needed because of a bug on Clear Type */ +} + +.TB_ConnectionLine +{ + background-color: #ffffff; + height: 1px; + margin-left: 1px; /* ltr */ + margin-right: 1px; /* rtl */ +} + +.TB_Text +{ + height: 22px; +} + +.TB_Button_Off .TB_Text +{ + background-color: #f7f7f7 ; /* Needed because of a bug on ClearType */ +} + +.TB_Button_On_Over .TB_Text +{ + background-color: #dff1ff ; /* Needed because of a bug on ClearType */ +} + +/* + Menu +*/ + +.MN_Menu +{ + border: 1px solid #8f8f73; + padding: 2px; + background-color: #ffffff; + cursor: default; +} + +.MN_Menu, .MN_Menu .MN_Label +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; +} + +.MN_Item_Padding +{ + visibility: hidden; + width: 3px; + height: 20px; +} + +.MN_Icon +{ + background-color: #dedede; + text-align: center; + height: 20px; +} + +.MN_Label +{ + padding-left: 3px; + padding-right: 3px; +} + +.MN_Separator +{ + height: 3px; +} + +.MN_Separator_Line +{ + border-top: #b9b99d 1px solid; +} + +.MN_Item .MN_Icon IMG +{ + filter: alpha(opacity=70); + opacity: 0.70; +} + +.MN_Item_Over +{ + color: #ffffff; + background-color: #8a857d; +} + +.MN_Item_Over .MN_Icon +{ + background-color: #6c6761; +} + +.MN_Item_Disabled IMG +{ + filter: gray() alpha(opacity=30); /* IE */ + opacity: 0.30; /* Safari, Opera and Mozilla */ +} + +.MN_Item_Disabled .MN_Label +{ + color: #b7b7b7; +} + +.MN_Arrow +{ + padding-right: 3px; + padding-left: 3px; +} + +.MN_ConnectionLine +{ + background-color: #ffffff; +} + +.Menu .TB_Button_On, .Menu .TB_Button_On_Over +{ + border: #8f8f73 1px solid; + background-color: #ffffff; +} + +/* + ### Panel Styles +*/ + +.FCK_Panel +{ + border: #8f8f73 1px solid; + padding: 2px; + background-color: #ffffff; +} + +.FCK_Panel, .FCK_Panel TD +{ + font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; + font-size: 11px; +} + +/* + ### Special Combos +*/ + +.SC_Panel +{ + overflow: auto; + white-space: nowrap; + cursor: default; + border: 1px solid #8f8f73; + padding-left: 2px; padding-right: 2px; - background-color: #ffffff; -} - -.SC_Panel, .SC_Panel TD -{ - font-size: 11px; - font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; -} - -.SC_Item, .SC_ItemSelected -{ - margin-top: 2px; - margin-bottom: 2px; - background-position: left center; - padding-left: 11px; - padding-right: 3px; - padding-top: 2px; - padding-bottom: 2px; - text-overflow: ellipsis; - overflow: hidden; - background-repeat: no-repeat; - border: #dddddd 1px solid; -} - -.SC_Item *, .SC_ItemSelected * -{ - margin-top: 0px; - margin-bottom: 0px; -} - -.SC_ItemSelected -{ - border: #9a9afb 1px solid; - background-image: url(images/toolbar.arrowright.gif); -} - -.SC_ItemOver -{ - border: #404040 1px solid; -} - -.SC_Field -{ - border: #b7b7a6 1px solid; - cursor: default; -} - -.SC_FieldCaption -{ - overflow: visible; - padding-right: 5px; - padding-left: 5px; - opacity: 0.75; /* Safari, Opera and Mozilla */ - filter: alpha(opacity=70); /* IE */ /* -moz-opacity: 0.75; Mozilla (Old) */ - height: 23px; - background-color: #f7f7f7; -} - -.SC_FieldLabel -{ - white-space: nowrap; - padding: 2px; - width: 100%; - cursor: default; - background-color: #ffffff; - text-overflow: ellipsis; - overflow: hidden; -} - -.SC_FieldButton -{ - background-position: center center; - background-image: url(images/toolbar.buttonarrow.gif); - border-left: #b7b7a6 1px solid; - width: 14px; - background-repeat: no-repeat; -} - -.SC_FieldDisabled .SC_FieldButton, .SC_FieldDisabled .SC_FieldCaption, .SC_FieldDisabled .TB_ButtonType_Text -{ - opacity: 0.30; /* Safari, Opera and Mozilla */ - filter: gray() alpha(opacity=30); /* IE */ /* -moz-opacity: 0.30; Mozilla (Old) */ -} - -.SC_FieldOver -{ - border: #316ac5 1px solid; -} - -.SC_FieldOver .SC_FieldButton -{ - border-left: #316ac5 1px solid; -} - -/* - ### Color Selector Panel -*/ - -.ColorBoxBorder -{ - border: #808080 1px solid; - position: static; -} - -.ColorBox -{ - font-size: 1px; - width: 10px; - position: static; - height: 10px; -} - -.ColorDeselected, .ColorSelected -{ - cursor: default; -} - -.ColorDeselected -{ - border: #ffffff 1px solid; - padding: 2px; - float: left; -} - -.ColorSelected -{ - border: #316ac5 1px solid; - padding: 2px; - float: left; - background-color: #c1d2ee; -} + background-color: #ffffff; +} + +.SC_Panel, .SC_Panel TD +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; +} + +.SC_Item, .SC_ItemSelected +{ + margin-top: 2px; + margin-bottom: 2px; + background-position: left center; + padding-left: 11px; + padding-right: 3px; + padding-top: 2px; + padding-bottom: 2px; + text-overflow: ellipsis; + overflow: hidden; + background-repeat: no-repeat; + border: #dddddd 1px solid; +} + +.SC_Item *, .SC_ItemSelected * +{ + margin-top: 0px; + margin-bottom: 0px; +} + +.SC_ItemSelected +{ + border: #9a9afb 1px solid; + background-image: url(images/toolbar.arrowright.gif); +} + +.SC_ItemOver +{ + border: #404040 1px solid; +} + +.SC_Field +{ + border: #b7b7a6 1px solid; + cursor: default; +} + +.SC_FieldCaption +{ + overflow: visible; + padding-right: 5px; + padding-left: 5px; + opacity: 0.75; /* Safari, Opera and Mozilla */ + filter: alpha(opacity=70); /* IE */ /* -moz-opacity: 0.75; Mozilla (Old) */ + height: 23px; + background-color: #f7f7f7; +} + +.SC_FieldLabel +{ + white-space: nowrap; + padding: 2px; + width: 100%; + cursor: default; + background-color: #ffffff; + text-overflow: ellipsis; + overflow: hidden; +} + +.SC_FieldButton +{ + background-position: center center; + background-image: url(images/toolbar.buttonarrow.gif); + border-left: #b7b7a6 1px solid; + width: 14px; + background-repeat: no-repeat; +} + +.SC_FieldDisabled .SC_FieldButton, .SC_FieldDisabled .SC_FieldCaption, .SC_FieldDisabled .TB_ButtonType_Text +{ + opacity: 0.30; /* Safari, Opera and Mozilla */ + filter: gray() alpha(opacity=30); /* IE */ /* -moz-opacity: 0.30; Mozilla (Old) */ +} + +.SC_FieldOver +{ + border: #316ac5 1px solid; +} + +.SC_FieldOver .SC_FieldButton +{ + border-left: #316ac5 1px solid; +} + +/* + ### Color Selector Panel +*/ + +.ColorBoxBorder +{ + border: #808080 1px solid; + position: static; +} + +.ColorBox +{ + font-size: 1px; + width: 10px; + position: static; + height: 10px; +} + +.ColorDeselected, .ColorSelected +{ + cursor: default; +} + +.ColorDeselected +{ + border: #ffffff 1px solid; + padding: 2px; + float: left; +} + +.ColorSelected +{ + border: #316ac5 1px solid; + padding: 2px; + float: left; + background-color: #c1d2ee; +} diff --git a/htdocs/theme/eldy/fckeditor/fck_dialog.css b/htdocs/theme/eldy/fckeditor/fck_dialog.css index 53f16ef8d3c..35d0fc0b180 100644 --- a/htdocs/theme/eldy/fckeditor/fck_dialog.css +++ b/htdocs/theme/eldy/fckeditor/fck_dialog.css @@ -1,402 +1,402 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Styles used by the dialog boxes. - */ - -html, body -{ - background-color: transparent; - margin: 0px; - padding: 0px; -} - -body -{ - padding: 10px; -} - -body, td, input, select, textarea -{ - font-size: 11px; - font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; -} - -body, .BackColor -{ - background-color: #f7f7f7; -} - -.PopupBody -{ - height: 100%; - width: 100%; - overflow: hidden; - background-color: transparent; - padding: 0px; -} - -#header -{ - cursor: move; -} - -.PopupTitle -{ - font-weight: bold; - font-size: 14pt; - color: #504845; - background-color: #dedede; - padding: 3px 10px 3px 10px; -} - -.PopupButtons -{ - position: absolute; - right: 0px; - left: 0px; - bottom: 0px; - border-top: #cec6b5 1px solid; - background-color: #DEDEDE; - padding: 7px 10px 7px 10px; -} - -.Button -{ - border: #7a7261 1px solid; - color: #504845; - background-color: #cec6b5; -} - -#btnOk -{ - width: 100px; -} - -.DarkBackground -{ - background-color: #f2f2f2; -} - -.LightBackground -{ - background-color: #ffffbe; -} - -.PopupTitleBorder -{ - border-bottom: #cec6b5 1px solid; -} - -.PopupTabArea -{ - color: #504845; - background-color: #DEDEDE; -} - -.PopupTabEmptyArea -{ - padding-left: 10px ; - border-bottom: #cec6b5 1px solid; -} - -.PopupTab, .PopupTabSelected -{ - border-right: #cec6b5 1px solid; - border-top: #cec6b5 1px solid; - border-left: #cec6b5 1px solid; - padding: 3px 5px 3px 5px; - color: #504845; -} - -.PopupTab -{ - margin-top: 1px; - border-bottom: #cec6b5 1px solid; - cursor: pointer; - cursor: hand; -} - -.PopupTabSelected -{ - font-weight:bold; - cursor: default; - padding-top: 4px; - border-bottom: #f1f1e3 1px solid; - background-color: #f7f7f7; -} - -.PopupSelectionBox -{ - border: #a9a9a9 1px solid !important; - background-color: #dcdcdc !important; - cursor: pointer; - cursor: hand; -} - -#tdBrowse -{ - vertical-align: bottom; -} - -/** - * Dialog frame related styles. - */ - -.contents -{ - position: absolute; - top: 2px; - left: 16px; - right: 16px; - bottom: 20px; - background-color: #f7f7f7; - overflow: hidden; - z-index: 1; -} - -.tl, .tr, .tc, .bl, .br, .bc -{ - position: absolute; - background-image: url(images/sprites.png); - background-repeat: no-repeat; -} - -* html .tl, * html .tr, * html .tc, * html .bl, * html .br, * html .bc -{ - background-image: url(images/sprites.gif); -} - -.ml, .mr -{ - position: absolute; - background-image: url(images/dialog.sides.png); - background-repeat: repeat-y; -} - -* html .ml, * html .mr -{ - background-image: url(images/dialog.sides.gif); -} - -.rtl .ml, .rtl .mr -{ - position: absolute; - background-image: url(images/dialog.sides.rtl.png); - background-repeat: repeat-y; -} - -* html .rtl .ml, * html .rtl .mr -{ - background-image: url(images/dialog.sides.gif); -} - -.tl -{ - top: 0px; - left: 0px; - width: 16px; - height: 16px; - background-position: -16px -16px; -} - -.rtl .tl -{ - background-position: -16px -397px; -} - -.tr -{ - top: 0px; - right: 0px; - width: 16px; - height: 16px; - background-position: -16px -76px; -} - -.rtl .tr -{ - background-position: -16px -457px; -} - -.tc -{ - top: 0px; - right: 16px; - left: 16px; - height: 16px; - background-position: 0px -136px; - background-repeat: repeat-x; -} - -.ml -{ - top: 16px; - left: 0px; - width: 16px; - bottom: 51px; - background-position: 0px 0px; -} - -.mr -{ - top: 16px; - right: 0px; - width: 16px; - bottom: 51px; - background-position: -16px 0px; -} - -.bl -{ - bottom: 0px; - left: 0px; - width: 30px; - height: 51px; - background-position: -16px -196px; -} - -.rtl .bl -{ - background-position: -16px -517px; -} - -.br -{ - bottom: 0px; - right: 0px; - width: 30px; - height: 51px; - background-position: -16px -263px; -} - -.rtl .br -{ - background-position: -16px -584px; -} - -.bc -{ - bottom: 0px; - right: 30px; - left: 30px; - height: 51px; - background-position: 0px -330px; - background-repeat: repeat-x; -} - -/* For IE6. Do not change it. */ -* html .blocker -{ - position: absolute; - width: 100%; - height: 100%; - z-index: 12; - filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); -} - -/* The layer used to cover the dialog when opening a child dialog. */ -.cover -{ - position: absolute; - top: 0px; - left: 14px; - right: 14px; - bottom: 18px; - z-index: 11; -} - -#closeButton -{ - position: absolute; - right: 0px; - top: 0px; - margin-top: 5px; - margin-right: 10px; - width: 20px; - height: 20px; - cursor: pointer; - background-image: url(images/sprites.png); - background-repeat: no-repeat; - background-position: -16px -651px; -} - -* html #closeButton -{ - cursor: hand; - background-image: url(images/sprites.gif); -} - -.rtl #closeButton -{ - right: auto; - left: 10px; - margin-right: 0px; -} - -#closeButton:hover -{ - background-position: -16px -687px; -} - -#throbberBlock -{ - z-index: 10; -} - -#throbberBlock div -{ - float: left; - width: 8px; - height: 9px; - margin-left: 2px; - margin-right: 2px; - font-size: 1px; /* IE6 */ -} - -/* - Color Gradient Generator: - http://www.herethere.net/~samson/php/color_gradient/?cbegin=504845&cend=DEDEDE&steps=4 -*/ - -.throbber_1 -{ - background-color: #504845; -} - -.throbber_2 -{ - background-color: #736D6B; -} - -.throbber_3 -{ - background-color: #979391; -} - -.throbber_4 -{ - background-color: #BAB8B7; -} - -.throbber_5 -{ - background-color: #DEDEDE; -} +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * Styles used by the dialog boxes. + */ + +html, body +{ + background-color: transparent; + margin: 0px; + padding: 0px; +} + +body +{ + padding: 10px; +} + +body, td, input, select, textarea +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; +} + +body, .BackColor +{ + background-color: #f7f7f7; +} + +.PopupBody +{ + height: 100%; + width: 100%; + overflow: hidden; + background-color: transparent; + padding: 0px; +} + +#header +{ + cursor: move; +} + +.PopupTitle +{ + font-weight: bold; + font-size: 14pt; + color: #504845; + background-color: #dedede; + padding: 3px 10px 3px 10px; +} + +.PopupButtons +{ + position: absolute; + right: 0px; + left: 0px; + bottom: 0px; + border-top: #cec6b5 1px solid; + background-color: #DEDEDE; + padding: 7px 10px 7px 10px; +} + +.Button +{ + border: #7a7261 1px solid; + color: #504845; + background-color: #cec6b5; +} + +#btnOk +{ + width: 100px; +} + +.DarkBackground +{ + background-color: #f2f2f2; +} + +.LightBackground +{ + background-color: #ffffbe; +} + +.PopupTitleBorder +{ + border-bottom: #cec6b5 1px solid; +} + +.PopupTabArea +{ + color: #504845; + background-color: #DEDEDE; +} + +.PopupTabEmptyArea +{ + padding-left: 10px ; + border-bottom: #cec6b5 1px solid; +} + +.PopupTab, .PopupTabSelected +{ + border-right: #cec6b5 1px solid; + border-top: #cec6b5 1px solid; + border-left: #cec6b5 1px solid; + padding: 3px 5px 3px 5px; + color: #504845; +} + +.PopupTab +{ + margin-top: 1px; + border-bottom: #cec6b5 1px solid; + cursor: pointer; + cursor: hand; +} + +.PopupTabSelected +{ + font-weight:bold; + cursor: default; + padding-top: 4px; + border-bottom: #f1f1e3 1px solid; + background-color: #f7f7f7; +} + +.PopupSelectionBox +{ + border: #a9a9a9 1px solid !important; + background-color: #dcdcdc !important; + cursor: pointer; + cursor: hand; +} + +#tdBrowse +{ + vertical-align: bottom; +} + +/** + * Dialog frame related styles. + */ + +.contents +{ + position: absolute; + top: 2px; + left: 16px; + right: 16px; + bottom: 20px; + background-color: #f7f7f7; + overflow: hidden; + z-index: 1; +} + +.tl, .tr, .tc, .bl, .br, .bc +{ + position: absolute; + background-image: url(images/sprites.png); + background-repeat: no-repeat; +} + +* html .tl, * html .tr, * html .tc, * html .bl, * html .br, * html .bc +{ + background-image: url(images/sprites.gif); +} + +.ml, .mr +{ + position: absolute; + background-image: url(images/dialog.sides.png); + background-repeat: repeat-y; +} + +* html .ml, * html .mr +{ + background-image: url(images/dialog.sides.gif); +} + +.rtl .ml, .rtl .mr +{ + position: absolute; + background-image: url(images/dialog.sides.rtl.png); + background-repeat: repeat-y; +} + +* html .rtl .ml, * html .rtl .mr +{ + background-image: url(images/dialog.sides.gif); +} + +.tl +{ + top: 0px; + left: 0px; + width: 16px; + height: 16px; + background-position: -16px -16px; +} + +.rtl .tl +{ + background-position: -16px -397px; +} + +.tr +{ + top: 0px; + right: 0px; + width: 16px; + height: 16px; + background-position: -16px -76px; +} + +.rtl .tr +{ + background-position: -16px -457px; +} + +.tc +{ + top: 0px; + right: 16px; + left: 16px; + height: 16px; + background-position: 0px -136px; + background-repeat: repeat-x; +} + +.ml +{ + top: 16px; + left: 0px; + width: 16px; + bottom: 51px; + background-position: 0px 0px; +} + +.mr +{ + top: 16px; + right: 0px; + width: 16px; + bottom: 51px; + background-position: -16px 0px; +} + +.bl +{ + bottom: 0px; + left: 0px; + width: 30px; + height: 51px; + background-position: -16px -196px; +} + +.rtl .bl +{ + background-position: -16px -517px; +} + +.br +{ + bottom: 0px; + right: 0px; + width: 30px; + height: 51px; + background-position: -16px -263px; +} + +.rtl .br +{ + background-position: -16px -584px; +} + +.bc +{ + bottom: 0px; + right: 30px; + left: 30px; + height: 51px; + background-position: 0px -330px; + background-repeat: repeat-x; +} + +/* For IE6. Do not change it. */ +* html .blocker +{ + position: absolute; + width: 100%; + height: 100%; + z-index: 12; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); +} + +/* The layer used to cover the dialog when opening a child dialog. */ +.cover +{ + position: absolute; + top: 0px; + left: 14px; + right: 14px; + bottom: 18px; + z-index: 11; +} + +#closeButton +{ + position: absolute; + right: 0px; + top: 0px; + margin-top: 5px; + margin-right: 10px; + width: 20px; + height: 20px; + cursor: pointer; + background-image: url(images/sprites.png); + background-repeat: no-repeat; + background-position: -16px -651px; +} + +* html #closeButton +{ + cursor: hand; + background-image: url(images/sprites.gif); +} + +.rtl #closeButton +{ + right: auto; + left: 10px; + margin-right: 0px; +} + +#closeButton:hover +{ + background-position: -16px -687px; +} + +#throbberBlock +{ + z-index: 10; +} + +#throbberBlock div +{ + float: left; + width: 8px; + height: 9px; + margin-left: 2px; + margin-right: 2px; + font-size: 1px; /* IE6 */ +} + +/* + Color Gradient Generator: + http://www.herethere.net/~samson/php/color_gradient/?cbegin=504845&cend=DEDEDE&steps=4 +*/ + +.throbber_1 +{ + background-color: #504845; +} + +.throbber_2 +{ + background-color: #736D6B; +} + +.throbber_3 +{ + background-color: #979391; +} + +.throbber_4 +{ + background-color: #BAB8B7; +} + +.throbber_5 +{ + background-color: #DEDEDE; +} diff --git a/htdocs/theme/eldy/fckeditor/fck_dialog_ie6.js b/htdocs/theme/eldy/fckeditor/fck_dialog_ie6.js index 4fc9ba66f52..804cc8d24de 100644 --- a/htdocs/theme/eldy/fckeditor/fck_dialog_ie6.js +++ b/htdocs/theme/eldy/fckeditor/fck_dialog_ie6.js @@ -1,110 +1,110 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - */ - -(function() -{ - // IE6 doens't handle absolute positioning properly (it is always in quirks - // mode). This function fixes the sizes and positions of many elements that - // compose the skin (this is skin specific). - var fixSizes = window.DoResizeFixes = function() - { - var fckDlg = window.document.body ; - - for ( var i = 0 ; i < fckDlg.childNodes.length ; i++ ) - { - var child = fckDlg.childNodes[i] ; - switch ( child.className ) - { - case 'contents' : - child.style.width = Math.max(0, fckDlg.offsetWidth - 16 - 16); // -left -right - child.style.height = Math.max(0, fckDlg.clientHeight - 20 - 2); // -bottom -top - break ; - - case 'blocker' : - case 'cover' : - child.style.width = Math.max(0, fckDlg.offsetWidth - 16 - 16 + 4); // -left -right + 4 - child.style.height = Math.max(0, fckDlg.clientHeight - 20 - 2 + 4); // -bottom -top + 4 - break ; - - case 'tr' : - child.style.left = Math.max(0, fckDlg.clientWidth - 16); - break ; - - case 'tc' : - child.style.width = Math.max(0, fckDlg.clientWidth - 16 - 16); - break ; - - case 'ml' : - child.style.height = Math.max(0, fckDlg.clientHeight - 16 - 51); - break ; - - case 'mr' : - child.style.left = Math.max(0, fckDlg.clientWidth - 16); - child.style.height = Math.max(0, fckDlg.clientHeight - 16 - 51); - break ; - - case 'bl' : - child.style.top = Math.max(0, fckDlg.clientHeight - 51); - break ; - - case 'br' : - child.style.left = Math.max(0, fckDlg.clientWidth - 30); - child.style.top = Math.max(0, fckDlg.clientHeight - 51); - break ; - - case 'bc' : - child.style.width = Math.max(0, fckDlg.clientWidth - 30 - 30); - child.style.top = Math.max(0, fckDlg.clientHeight - 51); - break ; - } - } - } - - var closeButtonOver = function() - { - this.style.backgroundPosition = '-16px -687px' ; - } ; - - var closeButtonOut = function() - { - this.style.backgroundPosition = '-16px -651px' ; - } ; - - var fixCloseButton = function() - { - var closeButton = document.getElementById ('closeButton'); - - closeButton.onmouseover = closeButtonOver ; - closeButton.onmouseout = closeButtonOut ; - } - - var onLoad = function() - { - fixSizes() ; - fixCloseButton() ; - - window.attachEvent('onresize', fixSizes); - window.detachEvent('onload', onLoad); - } - - window.attachEvent('onload', onLoad); - -})() ; +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + */ + +(function() +{ + // IE6 doens't handle absolute positioning properly (it is always in quirks + // mode). This function fixes the sizes and positions of many elements that + // compose the skin (this is skin specific). + var fixSizes = window.DoResizeFixes = function() + { + var fckDlg = window.document.body ; + + for ( var i = 0 ; i < fckDlg.childNodes.length ; i++ ) + { + var child = fckDlg.childNodes[i] ; + switch ( child.className ) + { + case 'contents' : + child.style.width = Math.max(0, fckDlg.offsetWidth - 16 - 16); // -left -right + child.style.height = Math.max(0, fckDlg.clientHeight - 20 - 2); // -bottom -top + break ; + + case 'blocker' : + case 'cover' : + child.style.width = Math.max(0, fckDlg.offsetWidth - 16 - 16 + 4); // -left -right + 4 + child.style.height = Math.max(0, fckDlg.clientHeight - 20 - 2 + 4); // -bottom -top + 4 + break ; + + case 'tr' : + child.style.left = Math.max(0, fckDlg.clientWidth - 16); + break ; + + case 'tc' : + child.style.width = Math.max(0, fckDlg.clientWidth - 16 - 16); + break ; + + case 'ml' : + child.style.height = Math.max(0, fckDlg.clientHeight - 16 - 51); + break ; + + case 'mr' : + child.style.left = Math.max(0, fckDlg.clientWidth - 16); + child.style.height = Math.max(0, fckDlg.clientHeight - 16 - 51); + break ; + + case 'bl' : + child.style.top = Math.max(0, fckDlg.clientHeight - 51); + break ; + + case 'br' : + child.style.left = Math.max(0, fckDlg.clientWidth - 30); + child.style.top = Math.max(0, fckDlg.clientHeight - 51); + break ; + + case 'bc' : + child.style.width = Math.max(0, fckDlg.clientWidth - 30 - 30); + child.style.top = Math.max(0, fckDlg.clientHeight - 51); + break ; + } + } + } + + var closeButtonOver = function() + { + this.style.backgroundPosition = '-16px -687px' ; + } ; + + var closeButtonOut = function() + { + this.style.backgroundPosition = '-16px -651px' ; + } ; + + var fixCloseButton = function() + { + var closeButton = document.getElementById ('closeButton'); + + closeButton.onmouseover = closeButtonOver ; + closeButton.onmouseout = closeButtonOut ; + } + + var onLoad = function() + { + fixSizes() ; + fixCloseButton() ; + + window.attachEvent('onresize', fixSizes); + window.detachEvent('onload', onLoad); + } + + window.attachEvent('onload', onLoad); + +})() ; diff --git a/htdocs/theme/eldy/fckeditor/fck_editor.css b/htdocs/theme/eldy/fckeditor/fck_editor.css index 0862d375fe6..8ba21189397 100644 --- a/htdocs/theme/eldy/fckeditor/fck_editor.css +++ b/htdocs/theme/eldy/fckeditor/fck_editor.css @@ -1,465 +1,465 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Styles used by the editor IFRAME and Toolbar. - */ - -/* - ### Basic Editor IFRAME Styles. -*/ - -body -{ - padding: 1px; - margin: 0; - background-color: #ffffff; -} - -#xEditingArea -{ - border: #696969 1px solid; -} - -.SourceField -{ - padding: 5px; - margin: 0px; - font-family: Monospace; -} - -/* - Toolbar -*/ - -.TB_ToolbarSet, .TB_Expand, .TB_Collapse -{ - cursor: default; - background-color: #f7f7f7; -} - -.TB_ToolbarSet -{ - border-top: #f7f7f7 1px outset; - border-bottom: #f7f7f7 1px outset; -} - -.TB_ToolbarSet TD -{ - font-size: 11px; - font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; -} - -.TB_Toolbar -{ - height: 24px; - display: inline-table; /* inline = Opera jumping buttons bug */ -} - -.TB_Separator -{ - width: 1px; - height: 16px; - margin: 2px; - background-color: #999966; -} - -.TB_Start -{ - background-image: url(images/toolbar.start.gif); - margin: 2px; - width: 3px; - background-repeat: no-repeat; - height: 16px; -} - -.TB_End -{ - display: none; -} - -.TB_ExpandImg -{ - background-image: url(images/toolbar.expand.gif); - background-repeat: no-repeat; -} - -.TB_CollapseImg -{ - background-image: url(images/toolbar.collapse.gif); - background-repeat: no-repeat; -} - -.TB_SideBorder -{ - background-color: #696969; -} - -.TB_Expand, .TB_Collapse -{ - padding: 2px 2px 2px 2px; - border: #f7f7f7 1px outset; -} - -.TB_Collapse -{ - width: 5px; -} - -.TB_Break -{ - height: 24px; /* IE needs the height to be set, otherwise no break */ -} - -/* - Toolbar Button -*/ - -.TB_Button_On, .TB_Button_Off, .TB_Button_On_Over, .TB_Button_Off_Over, .TB_Button_Disabled -{ - border: #f7f7f7 1px solid; /* This is the default border */ - height: 22px; /* The height is necessary, otherwise IE will not apply the alpha */ -} - -.TB_Button_On -{ - border: #316ac5 1px solid; - background-color: #c1d2ee; -} - -.TB_Button_On_Over, .TB_Button_Off_Over -{ - border: #316ac5 1px solid; - background-color: #dff1ff; -} - -.TB_Button_Off -{ - filter: alpha(opacity=70); /* IE */ - opacity: 0.70; /* Safari, Opera and Mozilla */ -} - -.TB_Button_Disabled -{ - filter: gray() alpha(opacity=30); /* IE */ - opacity: 0.30; /* Safari, Opera and Mozilla */ -} - -.TB_Button_Padding -{ - visibility: hidden; - width: 3px; - height: 22px; -} - -.TB_Button_Image -{ - overflow: hidden; - width: 16px; - height: 16px; - margin: 3px; - background-repeat: no-repeat; -} - -.TB_Button_Image img -{ - position: relative; -} - -.TB_Button_Off .TB_Button_Text -{ - background-color: #f7f7f7; /* Needed because of a bug on Clear Type */ -} - -.TB_ConnectionLine -{ - background-color: #ffffff; - height: 1px; - margin-left: 1px; /* ltr */ - margin-right: 1px; /* rtl */ -} - -.TB_Text -{ - height: 22px; -} - -.TB_Button_Off .TB_Text -{ - background-color: #f7f7f7 ; /* Needed because of a bug on ClearType */ -} - -.TB_Button_On_Over .TB_Text -{ - background-color: #dff1ff ; /* Needed because of a bug on ClearType */ -} - -/* - Menu -*/ - -.MN_Menu -{ - border: 1px solid #8f8f73; - padding: 2px; - background-color: #ffffff; - cursor: default; -} - -.MN_Menu, .MN_Menu .MN_Label -{ - font-size: 11px; - font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; -} - -.MN_Item_Padding -{ - visibility: hidden; - width: 3px; - height: 20px; -} - -.MN_Icon -{ - background-color: #dedede; - text-align: center; - height: 20px; -} - -.MN_Label -{ - padding-left: 3px; - padding-right: 3px; -} - -.MN_Separator -{ - height: 3px; -} - -.MN_Separator_Line -{ - border-top: #b9b99d 1px solid; -} - -.MN_Item .MN_Icon IMG -{ - filter: alpha(opacity=70); - opacity: 0.70; -} - -.MN_Item_Over -{ - color: #ffffff; - background-color: #8a857d; -} - -.MN_Item_Over .MN_Icon -{ - background-color: #6c6761; -} - -.MN_Item_Disabled IMG -{ - filter: gray() alpha(opacity=30); /* IE */ - opacity: 0.30; /* Safari, Opera and Mozilla */ -} - -.MN_Item_Disabled .MN_Label -{ - color: #b7b7b7; -} - -.MN_Arrow -{ - padding-right: 3px; - padding-left: 3px; -} - -.MN_ConnectionLine -{ - background-color: #ffffff; -} - -.Menu .TB_Button_On, .Menu .TB_Button_On_Over -{ - border: #8f8f73 1px solid; - background-color: #ffffff; -} - -/* - ### Panel Styles -*/ - -.FCK_Panel -{ - border: #8f8f73 1px solid; - padding: 2px; - background-color: #ffffff; -} - -.FCK_Panel, .FCK_Panel TD -{ - font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; - font-size: 11px; -} - -/* - ### Special Combos -*/ - -.SC_Panel -{ - overflow: auto; - white-space: nowrap; - cursor: default; - border: 1px solid #8f8f73; - padding-left: 2px; +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * Styles used by the editor IFRAME and Toolbar. + */ + +/* + ### Basic Editor IFRAME Styles. +*/ + +body +{ + padding: 1px; + margin: 0; + background-color: #ffffff; +} + +#xEditingArea +{ + border: #696969 1px solid; +} + +.SourceField +{ + padding: 5px; + margin: 0px; + font-family: Monospace; +} + +/* + Toolbar +*/ + +.TB_ToolbarSet, .TB_Expand, .TB_Collapse +{ + cursor: default; + background-color: #f7f7f7; +} + +.TB_ToolbarSet +{ + border-top: #f7f7f7 1px outset; + border-bottom: #f7f7f7 1px outset; +} + +.TB_ToolbarSet TD +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; +} + +.TB_Toolbar +{ + height: 24px; + display: inline-table; /* inline = Opera jumping buttons bug */ +} + +.TB_Separator +{ + width: 1px; + height: 16px; + margin: 2px; + background-color: #999966; +} + +.TB_Start +{ + background-image: url(images/toolbar.start.gif); + margin: 2px; + width: 3px; + background-repeat: no-repeat; + height: 16px; +} + +.TB_End +{ + display: none; +} + +.TB_ExpandImg +{ + background-image: url(images/toolbar.expand.gif); + background-repeat: no-repeat; +} + +.TB_CollapseImg +{ + background-image: url(images/toolbar.collapse.gif); + background-repeat: no-repeat; +} + +.TB_SideBorder +{ + background-color: #696969; +} + +.TB_Expand, .TB_Collapse +{ + padding: 2px 2px 2px 2px; + border: #f7f7f7 1px outset; +} + +.TB_Collapse +{ + width: 5px; +} + +.TB_Break +{ + height: 24px; /* IE needs the height to be set, otherwise no break */ +} + +/* + Toolbar Button +*/ + +.TB_Button_On, .TB_Button_Off, .TB_Button_On_Over, .TB_Button_Off_Over, .TB_Button_Disabled +{ + border: #f7f7f7 1px solid; /* This is the default border */ + height: 22px; /* The height is necessary, otherwise IE will not apply the alpha */ +} + +.TB_Button_On +{ + border: #316ac5 1px solid; + background-color: #c1d2ee; +} + +.TB_Button_On_Over, .TB_Button_Off_Over +{ + border: #316ac5 1px solid; + background-color: #dff1ff; +} + +.TB_Button_Off +{ + filter: alpha(opacity=70); /* IE */ + opacity: 0.70; /* Safari, Opera and Mozilla */ +} + +.TB_Button_Disabled +{ + filter: gray() alpha(opacity=30); /* IE */ + opacity: 0.30; /* Safari, Opera and Mozilla */ +} + +.TB_Button_Padding +{ + visibility: hidden; + width: 3px; + height: 22px; +} + +.TB_Button_Image +{ + overflow: hidden; + width: 16px; + height: 16px; + margin: 3px; + background-repeat: no-repeat; +} + +.TB_Button_Image img +{ + position: relative; +} + +.TB_Button_Off .TB_Button_Text +{ + background-color: #f7f7f7; /* Needed because of a bug on Clear Type */ +} + +.TB_ConnectionLine +{ + background-color: #ffffff; + height: 1px; + margin-left: 1px; /* ltr */ + margin-right: 1px; /* rtl */ +} + +.TB_Text +{ + height: 22px; +} + +.TB_Button_Off .TB_Text +{ + background-color: #f7f7f7 ; /* Needed because of a bug on ClearType */ +} + +.TB_Button_On_Over .TB_Text +{ + background-color: #dff1ff ; /* Needed because of a bug on ClearType */ +} + +/* + Menu +*/ + +.MN_Menu +{ + border: 1px solid #8f8f73; + padding: 2px; + background-color: #ffffff; + cursor: default; +} + +.MN_Menu, .MN_Menu .MN_Label +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; +} + +.MN_Item_Padding +{ + visibility: hidden; + width: 3px; + height: 20px; +} + +.MN_Icon +{ + background-color: #dedede; + text-align: center; + height: 20px; +} + +.MN_Label +{ + padding-left: 3px; + padding-right: 3px; +} + +.MN_Separator +{ + height: 3px; +} + +.MN_Separator_Line +{ + border-top: #b9b99d 1px solid; +} + +.MN_Item .MN_Icon IMG +{ + filter: alpha(opacity=70); + opacity: 0.70; +} + +.MN_Item_Over +{ + color: #ffffff; + background-color: #8a857d; +} + +.MN_Item_Over .MN_Icon +{ + background-color: #6c6761; +} + +.MN_Item_Disabled IMG +{ + filter: gray() alpha(opacity=30); /* IE */ + opacity: 0.30; /* Safari, Opera and Mozilla */ +} + +.MN_Item_Disabled .MN_Label +{ + color: #b7b7b7; +} + +.MN_Arrow +{ + padding-right: 3px; + padding-left: 3px; +} + +.MN_ConnectionLine +{ + background-color: #ffffff; +} + +.Menu .TB_Button_On, .Menu .TB_Button_On_Over +{ + border: #8f8f73 1px solid; + background-color: #ffffff; +} + +/* + ### Panel Styles +*/ + +.FCK_Panel +{ + border: #8f8f73 1px solid; + padding: 2px; + background-color: #ffffff; +} + +.FCK_Panel, .FCK_Panel TD +{ + font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; + font-size: 11px; +} + +/* + ### Special Combos +*/ + +.SC_Panel +{ + overflow: auto; + white-space: nowrap; + cursor: default; + border: 1px solid #8f8f73; + padding-left: 2px; padding-right: 2px; - background-color: #ffffff; -} - -.SC_Panel, .SC_Panel TD -{ - font-size: 11px; - font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; -} - -.SC_Item, .SC_ItemSelected -{ - margin-top: 2px; - margin-bottom: 2px; - background-position: left center; - padding-left: 11px; - padding-right: 3px; - padding-top: 2px; - padding-bottom: 2px; - text-overflow: ellipsis; - overflow: hidden; - background-repeat: no-repeat; - border: #dddddd 1px solid; -} - -.SC_Item *, .SC_ItemSelected * -{ - margin-top: 0px; - margin-bottom: 0px; -} - -.SC_ItemSelected -{ - border: #9a9afb 1px solid; - background-image: url(images/toolbar.arrowright.gif); -} - -.SC_ItemOver -{ - border: #404040 1px solid; -} - -.SC_Field -{ - border: #b7b7a6 1px solid; - cursor: default; -} - -.SC_FieldCaption -{ - overflow: visible; - padding-right: 5px; - padding-left: 5px; - opacity: 0.75; /* Safari, Opera and Mozilla */ - filter: alpha(opacity=70); /* IE */ /* -moz-opacity: 0.75; Mozilla (Old) */ - height: 23px; - background-color: #f7f7f7; -} - -.SC_FieldLabel -{ - white-space: nowrap; - padding: 2px; - width: 100%; - cursor: default; - background-color: #ffffff; - text-overflow: ellipsis; - overflow: hidden; -} - -.SC_FieldButton -{ - background-position: center center; - background-image: url(images/toolbar.buttonarrow.gif); - border-left: #b7b7a6 1px solid; - width: 14px; - background-repeat: no-repeat; -} - -.SC_FieldDisabled .SC_FieldButton, .SC_FieldDisabled .SC_FieldCaption, .SC_FieldDisabled .TB_ButtonType_Text -{ - opacity: 0.30; /* Safari, Opera and Mozilla */ - filter: gray() alpha(opacity=30); /* IE */ /* -moz-opacity: 0.30; Mozilla (Old) */ -} - -.SC_FieldOver -{ - border: #316ac5 1px solid; -} - -.SC_FieldOver .SC_FieldButton -{ - border-left: #316ac5 1px solid; -} - -/* - ### Color Selector Panel -*/ - -.ColorBoxBorder -{ - border: #808080 1px solid; - position: static; -} - -.ColorBox -{ - font-size: 1px; - width: 10px; - position: static; - height: 10px; -} - -.ColorDeselected, .ColorSelected -{ - cursor: default; -} - -.ColorDeselected -{ - border: #ffffff 1px solid; - padding: 2px; - float: left; -} - -.ColorSelected -{ - border: #316ac5 1px solid; - padding: 2px; - float: left; - background-color: #c1d2ee; -} + background-color: #ffffff; +} + +.SC_Panel, .SC_Panel TD +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; +} + +.SC_Item, .SC_ItemSelected +{ + margin-top: 2px; + margin-bottom: 2px; + background-position: left center; + padding-left: 11px; + padding-right: 3px; + padding-top: 2px; + padding-bottom: 2px; + text-overflow: ellipsis; + overflow: hidden; + background-repeat: no-repeat; + border: #dddddd 1px solid; +} + +.SC_Item *, .SC_ItemSelected * +{ + margin-top: 0px; + margin-bottom: 0px; +} + +.SC_ItemSelected +{ + border: #9a9afb 1px solid; + background-image: url(images/toolbar.arrowright.gif); +} + +.SC_ItemOver +{ + border: #404040 1px solid; +} + +.SC_Field +{ + border: #b7b7a6 1px solid; + cursor: default; +} + +.SC_FieldCaption +{ + overflow: visible; + padding-right: 5px; + padding-left: 5px; + opacity: 0.75; /* Safari, Opera and Mozilla */ + filter: alpha(opacity=70); /* IE */ /* -moz-opacity: 0.75; Mozilla (Old) */ + height: 23px; + background-color: #f7f7f7; +} + +.SC_FieldLabel +{ + white-space: nowrap; + padding: 2px; + width: 100%; + cursor: default; + background-color: #ffffff; + text-overflow: ellipsis; + overflow: hidden; +} + +.SC_FieldButton +{ + background-position: center center; + background-image: url(images/toolbar.buttonarrow.gif); + border-left: #b7b7a6 1px solid; + width: 14px; + background-repeat: no-repeat; +} + +.SC_FieldDisabled .SC_FieldButton, .SC_FieldDisabled .SC_FieldCaption, .SC_FieldDisabled .TB_ButtonType_Text +{ + opacity: 0.30; /* Safari, Opera and Mozilla */ + filter: gray() alpha(opacity=30); /* IE */ /* -moz-opacity: 0.30; Mozilla (Old) */ +} + +.SC_FieldOver +{ + border: #316ac5 1px solid; +} + +.SC_FieldOver .SC_FieldButton +{ + border-left: #316ac5 1px solid; +} + +/* + ### Color Selector Panel +*/ + +.ColorBoxBorder +{ + border: #808080 1px solid; + position: static; +} + +.ColorBox +{ + font-size: 1px; + width: 10px; + position: static; + height: 10px; +} + +.ColorDeselected, .ColorSelected +{ + cursor: default; +} + +.ColorDeselected +{ + border: #ffffff 1px solid; + padding: 2px; + float: left; +} + +.ColorSelected +{ + border: #316ac5 1px solid; + padding: 2px; + float: left; + background-color: #c1d2ee; +} diff --git a/htdocs/theme/phones/smartphone/theme/default/default.css.php b/htdocs/theme/phones/smartphone/theme/default/default.css.php index 39b0076938d..0eb93af0b86 100644 --- a/htdocs/theme/phones/smartphone/theme/default/default.css.php +++ b/htdocs/theme/phones/smartphone/theme/default/default.css.php @@ -1,532 +1,532 @@ - - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \file htdocs/theme/phones/smartphone/theme/default/default.css.php - * \brief Fichier de style CSS du theme Smartphone default - */ - -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url. -if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled cause need to do translations -if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK',1); -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); -if (! defined('NOLOGIN')) define('NOLOGIN',1); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); -if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); - -session_cache_limiter(FALSE); - -require_once("../../../../../main.inc.php"); -require_once(DOL_DOCUMENT_ROOT."/lib/functions.lib.php"); - -// Define css type -header('Content-type: text/css'); -// Important: Avoid page request by browser and dynamic build at -// each Dolibarr page access. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); -else header('Cache-Control: no-cache'); - -// On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1. -if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); } - -if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL -if (GETPOST('theme')) $conf->theme=GETPOST('theme'); // If theme was forced on URL -$langs->load("main",0,1); -$right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); -$left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); - -?> -.ui-mobile-viewport { -/*width:600px; -height:600px; -min-height: 200px; -min-width: 600px; -overflow:scroll; */ -} - -.landscape, .landscape .ui-page { -} - -#dol-homeheader { height: 40px; font-size: 16px; } - -.ui-mobile-viewport { - margin: 0; -} - -.ui-header { height: 40px; font-size: 16px; } - -.ui-content { -padding-top: 1px; -padding-right: 0; -padding-bottom: 0px; -padding-left: 1px; -} - -.ui-content .ui-listview { - margin-top: 0px; /* Use here negative value of ui-content top padding */ - margin-right: 0px; - margin-bottom: 0px; - margin-left: 0px; - /* overflow: scroll; */ -} - -.ui-mobile #dol-homeheader { padding: 10px 5px 0; text-align: center } -.ui-mobile #dol-homeheader h1 { margin: 0 0 10px; } -.ui-mobile #dol-homeheader p { margin: 0; } - -.ui-li-icon { - left:5px; - top:0.3em; -} - -.ui-li .ui-btn-inner { - padding: 0.4em 5px 0.4em 5px; -} - -input.ui-input-text, textarea.ui-input-text { - padding: 0.2em; -} - -.ui-body-b { - background: #FFFFFF; -} - -.ui-body-c { - background: #FFFFFF; - text-shadow: none; -} - -.loginform { - margin-left: 10px; - margin-right: 10px; - padding: 5px; -} - - - - -/* ============================================================================== */ -/* Styles de positionnement des zones */ -/* ============================================================================== */ - -div.fiche { - margin-: browser->phone)?'10':'2'); ?>px; - margin-: browser->phone)?'6':''); ?>px; -} - -div.fichecenter { - width: 100%; - clear: both; /* This is to have div fichecenter that are true rectangles */ -} -div.fichethirdleft { - browser->phone)) { print "float: ".$left.";\n"; } ?> - browser->phone)) { print "width: 35%;\n"; } ?> -} -div.fichetwothirdright { - browser->phone)) { print "float: ".$left.";\n"; } ?> - browser->phone)) { print "width: 65%;\n"; } ?> -} -div.fichehalfleft { - browser->phone)) { print "float: ".$left.";\n"; } ?> - browser->phone)) { print "width: 50%;\n"; } ?> -} -div.fichehalfright { - browser->phone)) { print "float: ".$left.";\n"; } ?> - browser->phone)) { print "width: 50%;\n"; } ?> -} -div.ficheaddleft { - browser->phone)) { print "padding-left: 6px;\n"; } ?> -} - - -/* ============================================================================== */ -/* Boutons actions */ -/* ============================================================================== */ - -.butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { - overflow: hidden; - padding: 0.6em 25px; - position: relative; - white-space: nowrap; - - font-family: ; - background: white; - border: 1px solid #8CACBB; - color: #436976; - padding: 0em 0.7em; - margin: 0em 0.5em; - text-decoration: none; - white-space: nowrap; -} - -.butAction:hover { - background: #dee7ec; -} - -.butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { - border: 1px solid #997777; -} - -.butActionDelete:hover { - background: #FFe7ec; -} - -.butActionRefused { - font-family: !important; - font-weight: bold !important; - background: white !important; - border: 1px solid #AAAAAA !important; - color: #AAAAAA !important; - padding: 0em 0.7em !important; - margin: 0em 0.5em !important; - text-decoration: none !important; - white-space: nowrap !important; - cursor: not-allowed; -} - -span.butAction, span.butActionDelete { - cursor: pointer; -} - - -/* ============================================================================== */ -/* Tables */ -/* ============================================================================== */ - -/* -#undertopmenu { -background-image: url(""); -background-repeat: repeat-x; -} -*/ - - -.nocellnopadd { -list-style-type:none; -margin: 0px; -padding: 0px; -} - -.notopnoleft { -border-collapse: collapse; -border: 0px; -padding-top: 0px; -padding-: 0px; -padding-: 4px; -padding-bottom: 4px; -margin: 0px 0px; -} -.notopnoleftnoright { -border-collapse: collapse; -border: 0px; -padding-top: 0px; -padding-left: 0px; -padding-right: 0px; -padding-bottom: 4px; -margin: 0px 0px 0px 0px; -} - - -table.border { -border: 1px solid #9CACBB; -border-collapse: collapse; -} - -table.border td { -padding: 1px 2px; -border: 1px solid #9CACBB; -border-collapse: collapse; -} - -td.border { -border-top: 1px solid #000000; -border-right: 1px solid #000000; -border-bottom: 1px solid #000000; -border-left: 1px solid #000000; -} - - -/* Main boxes */ - -table.noborder { -border-collapse: collapse; -border-top-color: #FEFEFE; - -border-right-width: 1px; -border-right-color: #BBBBBB; -border-right-style: solid; - -border-left-width: 1px; -border-left-color: #BBBBBB; -border-left-style: solid; - -border-bottom-width: 1px; -border-bottom-color: #BBBBBB; -border-bottom-style: solid; - -margin: 0px 0px 2px 0px; -} - -table.noborder tr { -border-top-color: #FEFEFE; - -border-right-width: 1px; -border-right-color: #BBBBBB; -border-right-style: solid; - -border-left-width: 1px; -border-left-color: #BBBBBB; -border-left-style: solid; -height: 16px; -} - -table.noborder td { -padding: 1px 2px 0px 1px; /* t r b l */ -} - -table.nobordernopadding { -border-collapse: collapse; -border: 0px; -} -table.nobordernopadding tr { -border: 0px; -padding: 0px 0px; -} -table.nobordernopadding td { -border: 0px; -padding: 0px 0px; -} - - - -tr.liste_titre -{ - height: 24px; - background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0; - border: 1px solid #456F9A; - color: #FFFFFF; - font-family: ; - /* border-bottom: 1px solid #FDFFFF; */ - white-space: nowrap; -} -th.liste_titre, td.liste_titre -{ - background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0; - border: 1px solid #456F9A; - color: #FFFFFF; - font-family: ; - font-weight: normal; - /* border-bottom: 1px solid #FDFFFF; */ - white-space: nowrap; - text-align: ; -} -th.liste_titre_sel, td.liste_titre_sel -{ - background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0; - color: #FFFFFF; - font-family: ; - font-weight: normal; - /* text-decoration: underline; */ - /* border-bottom: 1px solid #FDFFFF; */ - white-space: nowrap; - text-align: ; -} -input.liste_titre { -background: transparent; -background-repeat: repeat-x; -border: 0px; -} - -tr.liste_total td { -border-top: 1px solid #DDDDDD; -background: #F0F0F0; -background-repeat: repeat-x; -color: #332266; -font-weight: normal; -white-space: nowrap; -} - - -.impair { -/* background: #d0d4d7; */ -background: #eaeaea; -font-family: ; -border: 0px; -} -/* -.impair:hover { -background: #c0c4c7; -border: 0px; -} -*/ - -.pair { -/* background: #e6ebed; */ -background: #f4f4f4; -font-family: ; -border: 0px; -} -/* -.pair:hover { -background: #c0c4c7; -border: 0px; -} -*/ - - - -div.titre { - padding-top: 10px; - font-family: ; - font-weight: normal; - color: #336666; - text-decoration: none; -} - - - -/* ============================================================================== */ -/* Onglets */ -/* ============================================================================== */ - -div.tabs { - top: 20px; - margin: 1px 0px 0px 0px; - padding: 0px 6px 0px 0px; - text-align: ; -} - -div.tabBar { - color: #234046; - padding-top: 10px; - padding-left: 8px; - padding-right: 8px; - padding-bottom: 8px; - margin: 0px 0px 10px 0px; - -moz-border-radius-topleft:6px; - -moz-border-radius-topright:6px; - -moz-border-radius-bottomleft:6px; - -moz-border-radius-bottomright:6px; - border-right: 1px solid #555555; - border-bottom: 1px solid #555555; - border-left: 1px solid #D0D0D0; - border-top: 1px solid #D8D8D8; - background: #dee7ec url() repeat-x; -} - -div.tabsAction { - margin: 20px 0em 1px 0em; - padding: 0em 0em; - text-align: right; -} - - -a.tabTitle { - display: none; -} - -a.tab:link { - background: #dee7ec; - color: #436976; - font-family: ; - padding: 0px 6px; - margin: 0em 0.2em; - text-decoration: none; - white-space: nowrap; - -moz-border-radius-topleft:6px; - -moz-border-radius-topright:6px; - - border-: 1px solid #555555; - border-: 1px solid #D8D8D8; - border-top: 1px solid #D8D8D8; -} -a.tab:visited { - background: #dee7ec; - color: #436976; - font-family: ; - padding: 0px 6px; - margin: 0em 0.2em; - text-decoration: none; - white-space: nowrap; - -moz-border-radius-topleft:6px; - -moz-border-radius-topright:6px; - - border-: 1px solid #555555; - border-: 1px solid #D8D8D8; - border-top: 1px solid #D8D8D8; -} -a.tab#active { - background: white; - border-bottom: #dee7ec 1px solid; - font-family: ; - color: #436976; - padding: 0px 6px; - margin: 0em 0.2em; - text-decoration: none; - -moz-border-radius-topleft:6px; - -moz-border-radius-topright:6px; - - border-: 1px solid #555555; - border-: 1px solid #D8D8D8; - border-top: 1px solid #D8D8D8; - border-bottom: 1px solid white; -} -a.tab:hover { - background: white; - color: #436976; - font-family: ; - padding: 0px 6px; - margin: 0em 0.2em; - text-decoration: none; - -moz-border-radius-topleft:6px; - -moz-border-radius-topright:6px; - - border-: 1px solid #555555; - border-: 1px solid #D8D8D8; - border-top: 1px solid #D8D8D8; -} - -a.tabimage { - color: #436976; - font-family: ; - text-decoration: none; - white-space: nowrap; -} - -td.tab { - background: #dee7ec; -} - -span.tabspan { - background: #dee7ec; - color: #436976; - font-family: ; - padding: 0px 6px; - margin: 0em 0.2em; - text-decoration: none; - white-space: nowrap; - -moz-border-radius-topleft:6px; - -moz-border-radius-topright:6px; - - border-: 1px solid #555555; - border-: 1px solid #D8D8D8; - border-top: 1px solid #D8D8D8; -} - + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/theme/phones/smartphone/theme/default/default.css.php + * \brief Fichier de style CSS du theme Smartphone default + */ + +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url. +if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled cause need to do translations +if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK',1); +if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); +if (! defined('NOLOGIN')) define('NOLOGIN',1); +if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); +if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); +if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); + +session_cache_limiter(FALSE); + +require_once("../../../../../main.inc.php"); +require_once(DOL_DOCUMENT_ROOT."/lib/functions.lib.php"); + +// Define css type +header('Content-type: text/css'); +// Important: Avoid page request by browser and dynamic build at +// each Dolibarr page access. +if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); +else header('Cache-Control: no-cache'); + +// On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1. +if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); } + +if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL +if (GETPOST('theme')) $conf->theme=GETPOST('theme'); // If theme was forced on URL +$langs->load("main",0,1); +$right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); +$left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); + +?> +.ui-mobile-viewport { +/*width:600px; +height:600px; +min-height: 200px; +min-width: 600px; +overflow:scroll; */ +} + +.landscape, .landscape .ui-page { +} + +#dol-homeheader { height: 40px; font-size: 16px; } + +.ui-mobile-viewport { + margin: 0; +} + +.ui-header { height: 40px; font-size: 16px; } + +.ui-content { +padding-top: 1px; +padding-right: 0; +padding-bottom: 0px; +padding-left: 1px; +} + +.ui-content .ui-listview { + margin-top: 0px; /* Use here negative value of ui-content top padding */ + margin-right: 0px; + margin-bottom: 0px; + margin-left: 0px; + /* overflow: scroll; */ +} + +.ui-mobile #dol-homeheader { padding: 10px 5px 0; text-align: center } +.ui-mobile #dol-homeheader h1 { margin: 0 0 10px; } +.ui-mobile #dol-homeheader p { margin: 0; } + +.ui-li-icon { + left:5px; + top:0.3em; +} + +.ui-li .ui-btn-inner { + padding: 0.4em 5px 0.4em 5px; +} + +input.ui-input-text, textarea.ui-input-text { + padding: 0.2em; +} + +.ui-body-b { + background: #FFFFFF; +} + +.ui-body-c { + background: #FFFFFF; + text-shadow: none; +} + +.loginform { + margin-left: 10px; + margin-right: 10px; + padding: 5px; +} + + + + +/* ============================================================================== */ +/* Styles de positionnement des zones */ +/* ============================================================================== */ + +div.fiche { + margin-: browser->phone)?'10':'2'); ?>px; + margin-: browser->phone)?'6':''); ?>px; +} + +div.fichecenter { + width: 100%; + clear: both; /* This is to have div fichecenter that are true rectangles */ +} +div.fichethirdleft { + browser->phone)) { print "float: ".$left.";\n"; } ?> + browser->phone)) { print "width: 35%;\n"; } ?> +} +div.fichetwothirdright { + browser->phone)) { print "float: ".$left.";\n"; } ?> + browser->phone)) { print "width: 65%;\n"; } ?> +} +div.fichehalfleft { + browser->phone)) { print "float: ".$left.";\n"; } ?> + browser->phone)) { print "width: 50%;\n"; } ?> +} +div.fichehalfright { + browser->phone)) { print "float: ".$left.";\n"; } ?> + browser->phone)) { print "width: 50%;\n"; } ?> +} +div.ficheaddleft { + browser->phone)) { print "padding-left: 6px;\n"; } ?> +} + + +/* ============================================================================== */ +/* Boutons actions */ +/* ============================================================================== */ + +.butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { + overflow: hidden; + padding: 0.6em 25px; + position: relative; + white-space: nowrap; + + font-family: ; + background: white; + border: 1px solid #8CACBB; + color: #436976; + padding: 0em 0.7em; + margin: 0em 0.5em; + text-decoration: none; + white-space: nowrap; +} + +.butAction:hover { + background: #dee7ec; +} + +.butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { + border: 1px solid #997777; +} + +.butActionDelete:hover { + background: #FFe7ec; +} + +.butActionRefused { + font-family: !important; + font-weight: bold !important; + background: white !important; + border: 1px solid #AAAAAA !important; + color: #AAAAAA !important; + padding: 0em 0.7em !important; + margin: 0em 0.5em !important; + text-decoration: none !important; + white-space: nowrap !important; + cursor: not-allowed; +} + +span.butAction, span.butActionDelete { + cursor: pointer; +} + + +/* ============================================================================== */ +/* Tables */ +/* ============================================================================== */ + +/* +#undertopmenu { +background-image: url(""); +background-repeat: repeat-x; +} +*/ + + +.nocellnopadd { +list-style-type:none; +margin: 0px; +padding: 0px; +} + +.notopnoleft { +border-collapse: collapse; +border: 0px; +padding-top: 0px; +padding-: 0px; +padding-: 4px; +padding-bottom: 4px; +margin: 0px 0px; +} +.notopnoleftnoright { +border-collapse: collapse; +border: 0px; +padding-top: 0px; +padding-left: 0px; +padding-right: 0px; +padding-bottom: 4px; +margin: 0px 0px 0px 0px; +} + + +table.border { +border: 1px solid #9CACBB; +border-collapse: collapse; +} + +table.border td { +padding: 1px 2px; +border: 1px solid #9CACBB; +border-collapse: collapse; +} + +td.border { +border-top: 1px solid #000000; +border-right: 1px solid #000000; +border-bottom: 1px solid #000000; +border-left: 1px solid #000000; +} + + +/* Main boxes */ + +table.noborder { +border-collapse: collapse; +border-top-color: #FEFEFE; + +border-right-width: 1px; +border-right-color: #BBBBBB; +border-right-style: solid; + +border-left-width: 1px; +border-left-color: #BBBBBB; +border-left-style: solid; + +border-bottom-width: 1px; +border-bottom-color: #BBBBBB; +border-bottom-style: solid; + +margin: 0px 0px 2px 0px; +} + +table.noborder tr { +border-top-color: #FEFEFE; + +border-right-width: 1px; +border-right-color: #BBBBBB; +border-right-style: solid; + +border-left-width: 1px; +border-left-color: #BBBBBB; +border-left-style: solid; +height: 16px; +} + +table.noborder td { +padding: 1px 2px 0px 1px; /* t r b l */ +} + +table.nobordernopadding { +border-collapse: collapse; +border: 0px; +} +table.nobordernopadding tr { +border: 0px; +padding: 0px 0px; +} +table.nobordernopadding td { +border: 0px; +padding: 0px 0px; +} + + + +tr.liste_titre +{ + height: 24px; + background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0; + border: 1px solid #456F9A; + color: #FFFFFF; + font-family: ; + /* border-bottom: 1px solid #FDFFFF; */ + white-space: nowrap; +} +th.liste_titre, td.liste_titre +{ + background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0; + border: 1px solid #456F9A; + color: #FFFFFF; + font-family: ; + font-weight: normal; + /* border-bottom: 1px solid #FDFFFF; */ + white-space: nowrap; + text-align: ; +} +th.liste_titre_sel, td.liste_titre_sel +{ + background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0; + color: #FFFFFF; + font-family: ; + font-weight: normal; + /* text-decoration: underline; */ + /* border-bottom: 1px solid #FDFFFF; */ + white-space: nowrap; + text-align: ; +} +input.liste_titre { +background: transparent; +background-repeat: repeat-x; +border: 0px; +} + +tr.liste_total td { +border-top: 1px solid #DDDDDD; +background: #F0F0F0; +background-repeat: repeat-x; +color: #332266; +font-weight: normal; +white-space: nowrap; +} + + +.impair { +/* background: #d0d4d7; */ +background: #eaeaea; +font-family: ; +border: 0px; +} +/* +.impair:hover { +background: #c0c4c7; +border: 0px; +} +*/ + +.pair { +/* background: #e6ebed; */ +background: #f4f4f4; +font-family: ; +border: 0px; +} +/* +.pair:hover { +background: #c0c4c7; +border: 0px; +} +*/ + + + +div.titre { + padding-top: 10px; + font-family: ; + font-weight: normal; + color: #336666; + text-decoration: none; +} + + + +/* ============================================================================== */ +/* Onglets */ +/* ============================================================================== */ + +div.tabs { + top: 20px; + margin: 1px 0px 0px 0px; + padding: 0px 6px 0px 0px; + text-align: ; +} + +div.tabBar { + color: #234046; + padding-top: 10px; + padding-left: 8px; + padding-right: 8px; + padding-bottom: 8px; + margin: 0px 0px 10px 0px; + -moz-border-radius-topleft:6px; + -moz-border-radius-topright:6px; + -moz-border-radius-bottomleft:6px; + -moz-border-radius-bottomright:6px; + border-right: 1px solid #555555; + border-bottom: 1px solid #555555; + border-left: 1px solid #D0D0D0; + border-top: 1px solid #D8D8D8; + background: #dee7ec url() repeat-x; +} + +div.tabsAction { + margin: 20px 0em 1px 0em; + padding: 0em 0em; + text-align: right; +} + + +a.tabTitle { + display: none; +} + +a.tab:link { + background: #dee7ec; + color: #436976; + font-family: ; + padding: 0px 6px; + margin: 0em 0.2em; + text-decoration: none; + white-space: nowrap; + -moz-border-radius-topleft:6px; + -moz-border-radius-topright:6px; + + border-: 1px solid #555555; + border-: 1px solid #D8D8D8; + border-top: 1px solid #D8D8D8; +} +a.tab:visited { + background: #dee7ec; + color: #436976; + font-family: ; + padding: 0px 6px; + margin: 0em 0.2em; + text-decoration: none; + white-space: nowrap; + -moz-border-radius-topleft:6px; + -moz-border-radius-topright:6px; + + border-: 1px solid #555555; + border-: 1px solid #D8D8D8; + border-top: 1px solid #D8D8D8; +} +a.tab#active { + background: white; + border-bottom: #dee7ec 1px solid; + font-family: ; + color: #436976; + padding: 0px 6px; + margin: 0em 0.2em; + text-decoration: none; + -moz-border-radius-topleft:6px; + -moz-border-radius-topright:6px; + + border-: 1px solid #555555; + border-: 1px solid #D8D8D8; + border-top: 1px solid #D8D8D8; + border-bottom: 1px solid white; +} +a.tab:hover { + background: white; + color: #436976; + font-family: ; + padding: 0px 6px; + margin: 0em 0.2em; + text-decoration: none; + -moz-border-radius-topleft:6px; + -moz-border-radius-topright:6px; + + border-: 1px solid #555555; + border-: 1px solid #D8D8D8; + border-top: 1px solid #D8D8D8; +} + +a.tabimage { + color: #436976; + font-family: ; + text-decoration: none; + white-space: nowrap; +} + +td.tab { + background: #dee7ec; +} + +span.tabspan { + background: #dee7ec; + color: #436976; + font-family: ; + padding: 0px 6px; + margin: 0em 0.2em; + text-decoration: none; + white-space: nowrap; + -moz-border-radius-topleft:6px; + -moz-border-radius-topright:6px; + + border-: 1px solid #555555; + border-: 1px solid #D8D8D8; + border-top: 1px solid #D8D8D8; +} + diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 4a203ae5b4f..c42ff64e79a 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -422,7 +422,7 @@ else // Open and return file $original_file_osencoded=dol_osencode($original_file); // This test if file exists should be useless. We keep it to find bug more easily - if (! dol_is_file($original_file_osencoded)) + if (! dol_is_file($original_file_osencoded)) { $error='Error: File '.$_GET["file"].' does not exists or filesystems permissions are not allowed'; dol_print_error(0,$error);