2
0
forked from Wavyzz/dolibarr

cvsimport

This commit is contained in:
Laurent Destailleur
2011-09-21 23:41:42 +00:00
21 changed files with 799 additions and 1229 deletions

View File

@@ -38,6 +38,7 @@ google_ad_height = 60;
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center>
<!-- End google adsense -->
<br>
</body>
</html>

View File

@@ -35,8 +35,7 @@ $langs->load("other");
$langs->load("admin");
$langs->load("companies");
if (!$user->admin)
accessforbidden();
if (!$user->admin) accessforbidden();
$acts[0] = "activate";
$acts[1] = "disable";
@@ -123,7 +122,7 @@ $tabsql[7] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.d
$tabsql[8] = "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_typent";
//$tabsql[9] = "SELECT code, code_iso, label as libelle, symbole, active FROM ".MAIN_DB_PREFIX."c_currencies";
$tabsql[9] = "SELECT code, code_iso, label as libelle, active FROM ".MAIN_DB_PREFIX."c_currencies";
$tabsql[10]= "SELECT t.rowid, t.taux, t.localtax1, t.localtax2, p.libelle as pays, p.code as pays_code, t.fk_pays as pays_id, t.recuperableonly, t.note, t.active,t.accountancy_code FROM ".MAIN_DB_PREFIX."c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid";
$tabsql[10]= "SELECT t.rowid, t.taux, t.localtax1, t.localtax2, p.libelle as pays, p.code as pays_code, t.fk_pays as pays_id, t.recuperableonly, t.note, t.active, t.accountancy_code FROM ".MAIN_DB_PREFIX."c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid";
$tabsql[11]= "SELECT t.rowid as rowid, element, source, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_contact AS t";
$tabsql[12]= "SELECT c.rowid as rowid, code, sortorder, c.libelle, c.libelle_facture, nbjour, fdm, decalage, active FROM ".MAIN_DB_PREFIX.'c_payment_term AS c';
$tabsql[13]= "SELECT id as rowid, code, c.libelle, type, active FROM ".MAIN_DB_PREFIX."c_paiement AS c";
@@ -639,7 +638,7 @@ if ($_GET["id"])
if ($fieldlist[$field]=='height') { $valuetoshow=$langs->trans("Height"); }
if ($fieldlist[$field]=='unit') { $valuetoshow=$langs->trans("MeasuringUnit"); }
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='pays_id') { $valuetoshow=''; }
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
if ($valuetoshow != '')
{
print '<td>';
@@ -725,7 +724,7 @@ if ($_GET["id"])
if ($fieldlist[$field]=='height') { $valuetoshow=$langs->trans("Height"); }
if ($fieldlist[$field]=='unit') { $valuetoshow=$langs->trans("MeasuringUnit"); }
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='pays_id') { $showfield=0; }
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
// Affiche nom du champ
if ($showfield)
{
@@ -904,7 +903,7 @@ llxFooter();
*
* @param array $fieldlist Array of fields
* @param Object $obj If we show a particular record, obj is filled with record fields
* @return void
* @return void
*/
function fieldList($fieldlist,$obj='')
{

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
* Copyright (C) 2009-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
* Copyright (C) 2009-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
*
* 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
@@ -42,12 +42,11 @@ $conf_fkaccount_cb = (! empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]))?$_SESSIO
//var_dump($_SESSION);
// Parametres d'affichage
// View parameters
$conf_taille_listes = (empty($conf->global->PRODUIT_LIMIT_SIZE)?500:$conf->global->PRODUIT_LIMIT_SIZE); // Nombre max de lignes a afficher dans les listes
$conf_nbr_car_listes = 60; // Nombre max de caracteres par ligne dans les listes
// Aurélien Imhof: Force decremente stock sur validation facture, quelque soit mode configuré
if(!isset($conf->global->STOCK_CALCULATE_ON_BILL))
$conf->global->STOCK_CALCULATE_ON_BILL = 1 ;
// Add hidden option to force decrease of stock whatever is user setup
if (! empty($conf->global->CASHDESK_FORCE_STOCK_ON_BILL)) $conf->global->STOCK_CALCULATE_ON_BILL=1;
?>

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
*
@@ -91,9 +91,10 @@ class ActionComm extends CommonObject
/**
* Add an action/event into database
* @param user Object user making action
* @param notrigger 1 = disable triggers, 0 = enable triggers
* @return int Id of created event, < 0 if KO
*
* @param User $user Object user making action
* @param int $notrigger 1 = disable triggers, 0 = enable triggers
* @return int Id of created event, < 0 if KO
*/
function add($user,$notrigger=0)
{
@@ -144,7 +145,7 @@ class ActionComm extends CommonObject
}
$this->db->begin("ActionComm::add");
$this->db->begin();
$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm";
$sql.= "(datec,";
@@ -188,7 +189,7 @@ class ActionComm extends CommonObject
$sql.= $conf->entity;
$sql.= ")";
dol_syslog("ActionComm::add sql=".$sql);
dol_syslog(get_class($this)."::add sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -204,13 +205,13 @@ class ActionComm extends CommonObject
// Fin appel triggers
}
$this->db->commit("ActionComm::add");
$this->db->commit();
return $this->id;
}
else
{
$this->error=$this->db->lasterror().' sql='.$sql;
$this->db->rollback("ActionComm::add");
$this->db->rollback();
return -1;
}
@@ -218,7 +219,9 @@ class ActionComm extends CommonObject
/**
* Charge l'objet action depuis la base
* @param id id de l'action a recuperer
*
* @param int $id id de l'action a recuperer
* @return int <0 if KO, >0 if OK
*/
function fetch($id)
{
@@ -246,7 +249,7 @@ class ActionComm extends CommonObject
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc";
$sql.= " WHERE a.id=".$id." AND a.fk_action=c.id";
dol_syslog("ActionComm::fetch sql=".$sql);
dol_syslog(get_class($this)."::fetch sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -304,14 +307,15 @@ class ActionComm extends CommonObject
/**
* Supprime l'action de la base
* @return int <0 si ko, >0 si ok
*
* @return int <0 if KO, >0 if OK
*/
function delete()
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm";
$sql.= " WHERE id=".$this->id;
dol_syslog("ActionComm::delete sql=".$sql, LOG_DEBUG);
dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG);
if ($this->db->query($sql))
{
return 1;
@@ -326,7 +330,8 @@ class ActionComm extends CommonObject
/**
* Met a jour l'action en base.
* Si percentage = 100, on met a jour date 100%
* @return int <0 si ko, >0 si ok
*
* @return int <0 if KO, >0 if OK
*/
function update($user)
{
@@ -371,7 +376,7 @@ class ActionComm extends CommonObject
$sql.= ", fk_user_done=".($this->userdone->id > 0 ? "'".$this->userdone->id."'":"null");
$sql.= " WHERE id=".$this->id;
dol_syslog("ActionComm::update sql=".$sql);
dol_syslog(get_class($this)."::update sql=".$sql);
if ($this->db->query($sql))
{
return 1;
@@ -379,7 +384,7 @@ class ActionComm extends CommonObject
else
{
$this->error=$this->db->error();
dol_syslog("ActionComm::update ".$this->error,LOG_ERR);
dol_syslog(get_class($this)."::update ".$this->error,LOG_ERR);
return -1;
}
}
@@ -406,7 +411,7 @@ class ActionComm extends CommonObject
}
if (! empty($filter)) $sql.= $filter;
dol_syslog("ActionComm::getActions sql=".$sql);
dol_syslog(get_class($this)."::getActions sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -475,7 +480,9 @@ class ActionComm extends CommonObject
/**
* Charge les informations d'ordre info dans l'objet facture
* @param id Id de la facture a charger
*
* @param int $id Id de la facture a charger
* @return void
*/
function info($id)
{
@@ -488,7 +495,7 @@ class ActionComm extends CommonObject
$sql.= ' FROM '.MAIN_DB_PREFIX.'actioncomm as a';
$sql.= ' WHERE a.id = '.$id;
dol_syslog("ActionComm::info sql=".$sql);
dol_syslog(get_class($this)."::info sql=".$sql);
$result=$this->db->query($sql);
if ($result)
{
@@ -523,6 +530,7 @@ class ActionComm extends CommonObject
/**
* Return label of status
*
* @param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @param hidenastatus 1=Show nothing if status is "Not applicable"
* @return string String with status
@@ -534,6 +542,7 @@ class ActionComm extends CommonObject
/**
* Return label of action status
*
* @param percent Percent
* @param mode 0=Long label, 1=Short label, 2=Picto+Short label, 3=Picto, 4=Picto+Short label, 5=Short label+Picto, 6=Very short label+Picto
* @param hidenastatus 1=Show nothing if status is "Not applicable"
@@ -644,6 +653,7 @@ class ActionComm extends CommonObject
/**
* Export events from database into a cal file.
*
* @param format 'vcal', 'ical/ics', 'rss'
* @param type 'event' or 'journal'
* @param cachedelay Do not rebuild file if date older than cachedelay seconds
@@ -658,7 +668,7 @@ class ActionComm extends CommonObject
require_once (DOL_DOCUMENT_ROOT ."/lib/xcal.lib.php");
require_once (DOL_DOCUMENT_ROOT ."/lib/date.lib.php");
dol_syslog("ActionComm::build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".count($filters), LOG_DEBUG);
dol_syslog(get_class($this)."::build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".count($filters), LOG_DEBUG);
// Check parameters
if (empty($format)) return -1;
@@ -688,7 +698,7 @@ class ActionComm extends CommonObject
include_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php');
if (dol_filemtime($outputfile) > ($nowgmt - $cachedelay))
{
dol_syslog("ActionComm::build_exportfile file ".$outputfile." is not older than now - cachedelay (".$nowgmt." - ".$cachedelay."). Build is canceled");
dol_syslog(get_class($this)."::build_exportfile file ".$outputfile." is not older than now - cachedelay (".$nowgmt." - ".$cachedelay."). Build is canceled");
$buildfile = false;
}
}
@@ -762,7 +772,7 @@ class ActionComm extends CommonObject
$sql.= " ORDER by datep";
//print $sql;exit;
dol_syslog("ActionComm::build_exportfile select events sql=".$sql);
dol_syslog(get_class($this)."::build_exportfile select events sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -808,7 +818,7 @@ class ActionComm extends CommonObject
else
{
$this->error=$this->db->lasterror();
dol_syslog("ActionComm::build_exportfile ".$this->db->lasterror(), LOG_ERR);
dol_syslog(get_class($this)."::build_exportfile ".$this->db->lasterror(), LOG_ERR);
return -1;
}
@@ -847,14 +857,14 @@ class ActionComm extends CommonObject
if (rename($outputfiletmp,$outputfile)) $result=1;
else
{
dol_syslog("ActionComm::build_exportfile failed to rename ".$outputfiletmp." to ".$outputfile, LOG_ERR);
dol_syslog(get_class($this)."::build_exportfile failed to rename ".$outputfiletmp." to ".$outputfile, LOG_ERR);
dol_delete_file($outputfiletmp,0,1);
$result=-1;
}
}
else
{
dol_syslog("ActionComm::build_exportfile build_xxxfile function fails to for format=".$format." outputfiletmp=".$outputfile, LOG_ERR);
dol_syslog(get_class($this)."::build_exportfile build_xxxfile function fails to for format=".$format." outputfiletmp=".$outputfile, LOG_ERR);
dol_delete_file($outputfiletmp,0,1);
$langs->load("errors");
$this->error=$langs->trans("ErrorFailToCreateFile",$outputfile);

View File

@@ -53,19 +53,19 @@ class CActionComm
}
/**
* Charge l'objet type d'action depuis la base
* Load action type from database
*
* @param id id ou code du type d'action a recuperer
* @return int 1=ok, 0=aucune action, -1=erreur
* @param int $id id or code of action type to read
* @return int 1=ok, 0=not found, -1=error
*/
function fetch($id)
{
$sql = "SELECT id, code, type, libelle, active";
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm";
if (is_numeric($id)) $sql.= " WHERE id=".$id;
else $sql.= " WHERE code='".$id."'";
dol_syslog(get_class($this)."::fetch sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -98,7 +98,7 @@ class CActionComm
/**
* Return list of event types
*
* @param int $active 1 or 0 to filter on event state active or not ('' bu default = no filter)
* @param int $active 1 or 0 to filter on event state active or not ('' by default = no filter)
* @param string $idorcode 'id' or 'code'
* @return array Array of all event types if OK, <0 if KO
*/
@@ -118,7 +118,7 @@ class CActionComm
}
$sql.= " ORDER BY module, position";
dol_syslog("CActionComm::liste_array sql=".$sql);
dol_syslog(get_class($this)."::liste_array sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -160,10 +160,10 @@ class CActionComm
/**
* Renvoie le nom sous forme d'un libelle traduit d'un type d'action
* Return name of action type as a label translated
*
* @param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
* @return string Libelle du type d'action
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Picto only
* @return string Label of action type
*/
function getNomUrl($withpicto=0)
{

View File

@@ -1,4 +1,4 @@
<?php
<?php
/* Copyright (C) 2011 Auguria <anthony.poiret@auguria.net>
*
* This program is free software; you can redistribute it and/or modify

View File

@@ -1,4 +1,4 @@
<?php
<?php
/* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*

View File

@@ -1,4 +1,4 @@
<?php
<?php
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>

View File

@@ -1,4 +1,4 @@
<?php
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>

View File

@@ -1,4 +1,4 @@
<?php
<?php
/* Copyright (C) 2007-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
*

View File

@@ -1,4 +1,4 @@
<?php
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>

View File

@@ -31,11 +31,11 @@
*/
function versiontostring($versionarray)
{
$string='?';
if (isset($versionarray[0])) $string=$versionarray[0];
if (isset($versionarray[1])) $string.='.'.$versionarray[1];
if (isset($versionarray[2])) $string.='.'.$versionarray[2];
return $string;
$string='?';
if (isset($versionarray[0])) $string=$versionarray[0];
if (isset($versionarray[1])) $string.='.'.$versionarray[1];
if (isset($versionarray[2])) $string.='.'.$versionarray[2];
return $string;
}
/**
@@ -49,28 +49,28 @@ function versiontostring($versionarray)
*/
function versioncompare($versionarray1,$versionarray2)
{
$ret=0;
$level=0;
$count1=count($versionarray1);
$count2=count($versionarray2);
$maxcount=max($count1,$count2);
while ($level < $maxcount)
{
$operande1=isset($versionarray1[$level])?$versionarray1[$level]:0;
$operande2=isset($versionarray2[$level])?$versionarray2[$level]:0;
if (preg_match('/alpha|dev/i',$operande1)) $operande1=-3;
if (preg_match('/alpha|dev/i',$operande2)) $operande2=-3;
if (preg_match('/beta/i',$operande1)) $operande1=-2;
if (preg_match('/beta/i',$operande2)) $operande2=-2;
if (preg_match('/rc/i',$operande1)) $operande1=-1;
if (preg_match('/rc/i',$operande2)) $operande2=-1;
$level++;
//print 'level '.$level.' '.$operande1.'-'.$operande2.'<br>';
if ($operande1 < $operande2) { $ret = -$level; break; }
if ($operande1 > $operande2) { $ret = $level; break; }
}
//print join('.',$versionarray1).'('.count($versionarray1).') / '.join('.',$versionarray2).'('.count($versionarray2).') => '.$ret;
return $ret;
$ret=0;
$level=0;
$count1=count($versionarray1);
$count2=count($versionarray2);
$maxcount=max($count1,$count2);
while ($level < $maxcount)
{
$operande1=isset($versionarray1[$level])?$versionarray1[$level]:0;
$operande2=isset($versionarray2[$level])?$versionarray2[$level]:0;
if (preg_match('/alpha|dev/i',$operande1)) $operande1=-3;
if (preg_match('/alpha|dev/i',$operande2)) $operande2=-3;
if (preg_match('/beta/i',$operande1)) $operande1=-2;
if (preg_match('/beta/i',$operande2)) $operande2=-2;
if (preg_match('/rc/i',$operande1)) $operande1=-1;
if (preg_match('/rc/i',$operande2)) $operande2=-1;
$level++;
//print 'level '.$level.' '.$operande1.'-'.$operande2.'<br>';
if ($operande1 < $operande2) { $ret = -$level; break; }
if ($operande1 > $operande2) { $ret = $level; break; }
}
//print join('.',$versionarray1).'('.count($versionarray1).') / '.join('.',$versionarray2).'('.count($versionarray2).') => '.$ret;
return $ret;
}
@@ -81,7 +81,7 @@ function versioncompare($versionarray1,$versionarray2)
*/
function versionphparray()
{
return explode('.',PHP_VERSION);
return explode('.',PHP_VERSION);
}
/**
@@ -91,7 +91,7 @@ function versionphparray()
*/
function versiondolibarrarray()
{
return explode('.',DOL_VERSION);
return explode('.',DOL_VERSION);
}
@@ -112,189 +112,189 @@ function versiondolibarrarray()
*/
function run_sql($sqlfile,$silent=1,$entity='',$usesavepoint=1,$handler='')
{
global $db, $conf, $langs, $user;
global $db, $conf, $langs, $user;
dol_syslog("Admin.lib::run_sql run sql file ".$sqlfile, LOG_DEBUG);
dol_syslog("Admin.lib::run_sql run sql file ".$sqlfile, LOG_DEBUG);
$ok=0;
$error=0;
$i=0;
$buffer = '';
$arraysql = Array();
$ok=0;
$error=0;
$i=0;
$buffer = '';
$arraysql = Array();
// Get version of database
$versionarray=$db->getVersionArray();
// Get version of database
$versionarray=$db->getVersionArray();
$fp = fopen($sqlfile,"r");
if ($fp)
{
while (! feof($fp))
{
$buf = fgets($fp, 4096);
$fp = fopen($sqlfile,"r");
if ($fp)
{
while (! feof($fp))
{
$buf = fgets($fp, 4096);
// Cas special de lignes autorisees pour certaines versions uniquement
if (preg_match('/^--\sV([0-9\.]+)/i',$buf,$reg))
{
$versioncommande=explode('.',$reg[1]);
//print var_dump($versioncommande);
//print var_dump($versionarray);
if (count($versioncommande) && count($versionarray)
&& versioncompare($versioncommande,$versionarray) <= 0)
{
// Version qualified, delete SQL comments
$buf=preg_replace('/^--\sV([0-9\.]+)/i','',$buf);
//print "Ligne $i qualifi?e par version: ".$buf.'<br>';
}
}
// Cas special de lignes autorisees pour certaines versions uniquement
if (preg_match('/^--\sV([0-9\.]+)/i',$buf,$reg))
{
$versioncommande=explode('.',$reg[1]);
//print var_dump($versioncommande);
//print var_dump($versionarray);
if (count($versioncommande) && count($versionarray)
&& versioncompare($versioncommande,$versionarray) <= 0)
{
// Version qualified, delete SQL comments
$buf=preg_replace('/^--\sV([0-9\.]+)/i','',$buf);
//print "Ligne $i qualifi?e par version: ".$buf.'<br>';
}
}
// Add line buf to buffer if not a comment
if (! preg_match('/^--/',$buf))
{
// Add line buf to buffer if not a comment
if (! preg_match('/^--/',$buf))
{
$buf=preg_replace('/--.*$/','',$buf); //remove comment from a line that not start with -- before add it to the buffer
$buffer .= trim($buf);
}
$buffer .= trim($buf);
}
// print $buf.'<br>';
// print $buf.'<br>';
if (preg_match('/;/',$buffer)) // If string contains ';', it's end of a request string, we save it in arraysql.
{
// Found new request
if ($buffer) $arraysql[$i]=$buffer;
$i++;
$buffer='';
}
}
if (preg_match('/;/',$buffer)) // If string contains ';', it's end of a request string, we save it in arraysql.
{
// Found new request
if ($buffer) $arraysql[$i]=$buffer;
$i++;
$buffer='';
}
}
if ($buffer) $arraysql[$i]=$buffer;
fclose($fp);
}
else
{
dol_syslog("Admin.lib::run_sql failed to open file ".$sqlfile, LOG_ERR);
}
if ($buffer) $arraysql[$i]=$buffer;
fclose($fp);
}
else
{
dol_syslog("Admin.lib::run_sql failed to open file ".$sqlfile, LOG_ERR);
}
// Loop on each request to see if there is a __+MAX_table__ key
$listofmaxrowid=array(); // This is a cache table
foreach($arraysql as $i => $sql)
{
$newsql=$sql;
// Loop on each request to see if there is a __+MAX_table__ key
$listofmaxrowid=array(); // This is a cache table
foreach($arraysql as $i => $sql)
{
$newsql=$sql;
// Replace __+MAX_table__ with max of table
while (preg_match('/__\+MAX_([A-Za-z_]+)__/i',$newsql,$reg))
{
$table=$reg[1];
if (! isset($listofmaxrowid[$table]))
{
//var_dump($db);
$sqlgetrowid='SELECT MAX(rowid) as max from '.$table;
$resql=$db->query($sqlgetrowid);
if ($resql)
{
$obj=$db->fetch_object($resql);
$listofmaxrowid[$table]=$obj->max;
if (empty($listofmaxrowid[$table])) $listofmaxrowid[$table]=0;
}
else
{
dol_syslog('Admin.lib::run_sql Failed to get max rowid for '.$table.' '.$db->lasterror().' sql='.$sqlgetrowid, LOG_ERR);
if (! $silent) print '<tr><td valign="top" colspan="2">';
if (! $silent) print '<div class="error">'.$langs->trans("Failed to get max rowid for ".$table)."</div></td>";
if (! $silent) print '</tr>';
$error++;
break;
}
}
$from='__+MAX_'.$table.'__';
$to='+'.$listofmaxrowid[$table];
$newsql=str_replace($from,$to,$newsql);
dol_syslog('Admin.lib::run_sql New Request '.($i+1).' (replacing '.$from.' to '.$to.') sql='.$newsql, LOG_DEBUG);
// Replace __+MAX_table__ with max of table
while (preg_match('/__\+MAX_([A-Za-z_]+)__/i',$newsql,$reg))
{
$table=$reg[1];
if (! isset($listofmaxrowid[$table]))
{
//var_dump($db);
$sqlgetrowid='SELECT MAX(rowid) as max from '.$table;
$resql=$db->query($sqlgetrowid);
if ($resql)
{
$obj=$db->fetch_object($resql);
$listofmaxrowid[$table]=$obj->max;
if (empty($listofmaxrowid[$table])) $listofmaxrowid[$table]=0;
}
else
{
dol_syslog('Admin.lib::run_sql Failed to get max rowid for '.$table.' '.$db->lasterror().' sql='.$sqlgetrowid, LOG_ERR);
if (! $silent) print '<tr><td valign="top" colspan="2">';
if (! $silent) print '<div class="error">'.$langs->trans("Failed to get max rowid for ".$table)."</div></td>";
if (! $silent) print '</tr>';
$error++;
break;
}
}
$from='__+MAX_'.$table.'__';
$to='+'.$listofmaxrowid[$table];
$newsql=str_replace($from,$to,$newsql);
dol_syslog('Admin.lib::run_sql New Request '.($i+1).' (replacing '.$from.' to '.$to.') sql='.$newsql, LOG_DEBUG);
$arraysql[$i]=$newsql;
}
}
$arraysql[$i]=$newsql;
}
}
// Loop on each request to execute request
$cursorinsert=0;
$listofinsertedrowid=array();
foreach($arraysql as $i => $sql)
{
if ($sql)
{
if (!empty($handler)) $sql=preg_replace('/__HANDLER__/i',"'".$handler."'",$sql);
// Loop on each request to execute request
$cursorinsert=0;
$listofinsertedrowid=array();
foreach($arraysql as $i => $sql)
{
if ($sql)
{
if (!empty($handler)) $sql=preg_replace('/__HANDLER__/i',"'".$handler."'",$sql);
$newsql=preg_replace('/__ENTITY__/i',(!empty($entity)?$entity:$conf->entity),$sql);
$newsql=preg_replace('/__ENTITY__/i',(!empty($entity)?$entity:$conf->entity),$sql);
// Ajout trace sur requete (eventuellement a commenter si beaucoup de requetes)
if (! $silent) print '<tr><td valign="top">'.$langs->trans("Request").' '.($i+1)." sql='".$newsql."'</td></tr>\n";
dol_syslog('Admin.lib::run_sql Request '.($i+1).' sql='.$newsql, LOG_DEBUG);
// Ajout trace sur requete (eventuellement a commenter si beaucoup de requetes)
if (! $silent) print '<tr><td valign="top">'.$langs->trans("Request").' '.($i+1)." sql='".$newsql."'</td></tr>\n";
dol_syslog('Admin.lib::run_sql Request '.($i+1).' sql='.$newsql, LOG_DEBUG);
// Replace for encrypt data
if (preg_match_all('/__ENCRYPT\(\'([^\,]+)\'\)__/i',$newsql,$reg))
{
$num=count($reg[0]);
// Replace for encrypt data
if (preg_match_all('/__ENCRYPT\(\'([^\,]+)\'\)__/i',$newsql,$reg))
{
$num=count($reg[0]);
for($i=0;$i<$num;$i++)
{
$from = $reg[0][$i];
$to = $db->encrypt($reg[1][$i],1);
$newsql = str_replace($from,$to,$newsql);
}
}
for($i=0;$i<$num;$i++)
{
$from = $reg[0][$i];
$to = $db->encrypt($reg[1][$i],1);
$newsql = str_replace($from,$to,$newsql);
}
}
// Replace for decrypt data
if (preg_match_all('/__DECRYPT\(\'([^\,]+)\'\)__/i',$newsql,$reg))
{
$num=count($reg[0]);
// Replace for decrypt data
if (preg_match_all('/__DECRYPT\(\'([^\,]+)\'\)__/i',$newsql,$reg))
{
$num=count($reg[0]);
for($i=0;$i<$num;$i++)
{
$from = $reg[0][$i];
$to = $db->decrypt($reg[1][$i]);
$newsql = str_replace($from,$to,$newsql);
}
}
for($i=0;$i<$num;$i++)
{
$from = $reg[0][$i];
$to = $db->decrypt($reg[1][$i]);
$newsql = str_replace($from,$to,$newsql);
}
}
// Replace __x__ with rowid of insert nb x
while (preg_match('/__([0-9]+)__/',$newsql,$reg))
{
$cursor=$reg[1];
if (empty($listofinsertedrowid[$cursor]))
{
if (! $silent) print '<tr><td valign="top" colspan="2">';
if (! $silent) print '<div class="error">'.$langs->trans("FileIsNotCorrect")."</div></td>";
if (! $silent) print '</tr>';
$error++;
break;
}
$from='__'.$cursor.'__';
$to=$listofinsertedrowid[$cursor];
$newsql=str_replace($from,$to,$newsql);
dol_syslog('Admin.lib::run_sql New Request '.($i+1).' (replacing '.$from.' to '.$to.') sql='.$newsql, LOG_DEBUG);
}
// Replace __x__ with rowid of insert nb x
while (preg_match('/__([0-9]+)__/',$newsql,$reg))
{
$cursor=$reg[1];
if (empty($listofinsertedrowid[$cursor]))
{
if (! $silent) print '<tr><td valign="top" colspan="2">';
if (! $silent) print '<div class="error">'.$langs->trans("FileIsNotCorrect")."</div></td>";
if (! $silent) print '</tr>';
$error++;
break;
}
$from='__'.$cursor.'__';
$to=$listofinsertedrowid[$cursor];
$newsql=str_replace($from,$to,$newsql);
dol_syslog('Admin.lib::run_sql New Request '.($i+1).' (replacing '.$from.' to '.$to.') sql='.$newsql, LOG_DEBUG);
}
$result=$db->query($newsql,$usesavepoint);
if ($result)
{
if (! $silent) print '<!-- Result = OK -->'."\n";
$result=$db->query($newsql,$usesavepoint);
if ($result)
{
if (! $silent) print '<!-- Result = OK -->'."\n";
if (preg_replace('/insert into ([^\s]+)/i',$newsql,$reg))
{
$cursorinsert++;
if (preg_replace('/insert into ([^\s]+)/i',$newsql,$reg))
{
$cursorinsert++;
// It's an insert
$table=preg_replace('/([^a-zA-Z_]+)/i','',$reg[1]);
$insertedrowid=$db->last_insert_id($table);
$listofinsertedrowid[$cursorinsert]=$insertedrowid;
dol_syslog('Admin.lib::run_sql Insert nb '.$cursorinsert.', done in table '.$table.', rowid is '.$listofinsertedrowid[$cursorinsert], LOG_DEBUG);
}
// print '<td align="right">OK</td>';
}
else
{
$errno=$db->errno();
if (! $silent) print '<!-- Result = '.$errno.' -->'."\n";
// It's an insert
$table=preg_replace('/([^a-zA-Z_]+)/i','',$reg[1]);
$insertedrowid=$db->last_insert_id($table);
$listofinsertedrowid[$cursorinsert]=$insertedrowid;
dol_syslog('Admin.lib::run_sql Insert nb '.$cursorinsert.', done in table '.$table.', rowid is '.$listofinsertedrowid[$cursorinsert], LOG_DEBUG);
}
// print '<td align="right">OK</td>';
}
else
{
$errno=$db->errno();
if (! $silent) print '<!-- Result = '.$errno.' -->'."\n";
$okerror=array( 'DB_ERROR_TABLE_ALREADY_EXISTS',
$okerror=array( 'DB_ERROR_TABLE_ALREADY_EXISTS',
'DB_ERROR_COLUMN_ALREADY_EXISTS',
'DB_ERROR_KEY_NAME_ALREADY_EXISTS',
'DB_ERROR_TABLE_OR_KEY_ALREADY_EXISTS', // PgSql use same code for table and key already exist
@@ -309,36 +309,36 @@ function run_sql($sqlfile,$silent=1,$entity='',$usesavepoint=1,$handler='')
);
if (in_array($errno,$okerror))
{
//if (! $silent) print $langs->trans("OK");
//if (! $silent) print $langs->trans("OK");
}
else
{
if (! $silent) print '<tr><td valign="top" colspan="2">';
if (! $silent) print '<div class="error">'.$langs->trans("Error")." ".$db->errno().": ".$newsql."<br>".$db->error()."</div></td>";
if (! $silent) print '</tr>'."\n";
dol_syslog('Admin.lib::run_sql Request '.($i+1)." Error ".$db->errno()." ".$newsql."<br>".$db->error(), LOG_ERR);
$error++;
if (! $silent) print '<tr><td valign="top" colspan="2">';
if (! $silent) print '<div class="error">'.$langs->trans("Error")." ".$db->errno().": ".$newsql."<br>".$db->error()."</div></td>";
if (! $silent) print '</tr>'."\n";
dol_syslog('Admin.lib::run_sql Request '.($i+1)." Error ".$db->errno()." ".$newsql."<br>".$db->error(), LOG_ERR);
$error++;
}
}
}
if (! $silent) print '</tr>'."\n";
}
}
if (! $silent) print '</tr>'."\n";
}
}
if ($error == 0)
{
if (! $silent) print '<tr><td>'.$langs->trans("ProcessMigrateScript").'</td>';
if (! $silent) print '<td align="right">'.$langs->trans("OK").'</td></tr>'."\n";
$ok = 1;
}
else
{
if (! $silent) print '<tr><td>'.$langs->trans("ProcessMigrateScript").'</td>';
if (! $silent) print '<td align="right"><font class="error">'.$langs->trans("KO").'</font></td></tr>'."\n";
$ok = 0;
}
if ($error == 0)
{
if (! $silent) print '<tr><td>'.$langs->trans("ProcessMigrateScript").'</td>';
if (! $silent) print '<td align="right">'.$langs->trans("OK").'</td></tr>'."\n";
$ok = 1;
}
else
{
if (! $silent) print '<tr><td>'.$langs->trans("ProcessMigrateScript").'</td>';
if (! $silent) print '<td align="right"><font class="error">'.$langs->trans("KO").'</font></td></tr>'."\n";
$ok = 0;
}
return $ok;
return $ok;
}
@@ -354,26 +354,26 @@ function run_sql($sqlfile,$silent=1,$entity='',$usesavepoint=1,$handler='')
*/
function dolibarr_del_const($db, $name, $entity=1)
{
global $conf;
global $conf;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE (".$db->decrypt('name')." = '".$db->escape($name)."'";
if (is_numeric($name)) $sql.= " OR rowid = '".$db->escape($name)."'";
$sql.= ")";
if ($entity >= 0) $sql.= " AND entity = ".$entity;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE (".$db->decrypt('name')." = '".$db->escape($name)."'";
if (is_numeric($name)) $sql.= " OR rowid = '".$db->escape($name)."'";
$sql.= ")";
if ($entity >= 0) $sql.= " AND entity = ".$entity;
dol_syslog("admin.lib::dolibarr_del_const sql=".$sql);
$resql=$db->query($sql);
if ($resql)
{
$conf->global->$name='';
return 1;
}
else
{
dol_print_error($db);
return -1;
}
dol_syslog("admin.lib::dolibarr_del_const sql=".$sql);
$resql=$db->query($sql);
if ($resql)
{
$conf->global->$name='';
return 1;
}
else
{
dol_print_error($db);
return -1;
}
}
/**
@@ -388,22 +388,22 @@ function dolibarr_del_const($db, $name, $entity=1)
*/
function dolibarr_get_const($db, $name, $entity=1)
{
global $conf;
$value='';
global $conf;
$value='';
$sql = "SELECT ".$db->decrypt('value')." as value";
$sql.= " FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE name = ".$db->encrypt($name,1);
$sql.= " AND entity = ".$entity;
$sql = "SELECT ".$db->decrypt('value')." as value";
$sql.= " FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE name = ".$db->encrypt($name,1);
$sql.= " AND entity = ".$entity;
dol_syslog("admin.lib::dolibarr_get_const sql=".$sql);
$resql=$db->query($sql);
if ($resql)
{
$obj=$db->fetch_object($resql);
if ($obj) $value=$obj->value;
}
return $value;
dol_syslog("admin.lib::dolibarr_get_const sql=".$sql);
$resql=$db->query($sql);
if ($resql)
{
$obj=$db->fetch_object($resql);
if ($obj) $value=$obj->value;
}
return $value;
}
@@ -423,57 +423,57 @@ function dolibarr_get_const($db, $name, $entity=1)
*/
function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
{
global $conf;
global $conf;
// Clean parameters
$name=trim($name);
// Clean parameters
$name=trim($name);
// Check parameters
if (empty($name))
{
dol_print_error($db,"Error: Call to function dolibarr_set_const with wrong parameters", LOG_ERR);
exit;
}
// Check parameters
if (empty($name))
{
dol_print_error($db,"Error: Call to function dolibarr_set_const with wrong parameters", LOG_ERR);
exit;
}
//dol_syslog("dolibarr_set_const name=$name, value=$value type=$type, visible=$visible, note=$note entity=$entity");
//dol_syslog("dolibarr_set_const name=$name, value=$value type=$type, visible=$visible, note=$note entity=$entity");
$db->begin();
$db->begin();
$sql = "DELETE FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE name = ".$db->encrypt($name,1);
if ($entity > 0) $sql.= " AND entity = ".$entity;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE name = ".$db->encrypt($name,1);
if ($entity > 0) $sql.= " AND entity = ".$entity;
dol_syslog("admin.lib::dolibarr_set_const sql=".$sql, LOG_DEBUG);
$resql=$db->query($sql);
dol_syslog("admin.lib::dolibarr_set_const sql=".$sql, LOG_DEBUG);
$resql=$db->query($sql);
if (strcmp($value,'')) // true if different. Must work for $value='0' or $value=0
{
$sql = "INSERT INTO llx_const(name,value,type,visible,note,entity)";
$sql.= " VALUES (";
$sql.= $db->encrypt($name,1);
$sql.= ", ".$db->encrypt($value,1);
$sql.= ",'".$type."',".$visible.",'".$db->escape($note)."',".$entity.")";
if (strcmp($value,'')) // true if different. Must work for $value='0' or $value=0
{
$sql = "INSERT INTO llx_const(name,value,type,visible,note,entity)";
$sql.= " VALUES (";
$sql.= $db->encrypt($name,1);
$sql.= ", ".$db->encrypt($value,1);
$sql.= ",'".$type."',".$visible.",'".$db->escape($note)."',".$entity.")";
//print "sql".$value."-".pg_escape_string($value)."-".$sql;exit;
//print "sql".$value."-".pg_escape_string($value)."-".$sql;exit;
//print "xx".$db->escape($value);
//print $sql;exit;
dol_syslog("admin.lib::dolibarr_set_const sql=".$sql, LOG_DEBUG);
$resql=$db->query($sql);
}
dol_syslog("admin.lib::dolibarr_set_const sql=".$sql, LOG_DEBUG);
$resql=$db->query($sql);
}
if ($resql)
{
$db->commit();
$conf->global->$name=$value;
return 1;
}
else
{
$error=$db->lasterror();
dol_syslog("admin.lib::dolibarr_set_const ".$error, LOG_ERR);
$db->rollback();
return -1;
}
if ($resql)
{
$db->commit();
$conf->global->$name=$value;
return 1;
}
else
{
$error=$db->lasterror();
dol_syslog("admin.lib::dolibarr_set_const ".$error, LOG_ERR);
$db->rollback();
return -1;
}
}
@@ -484,31 +484,31 @@ function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $not
*/
function security_prepare_head()
{
global $langs, $conf, $user;
$h = 0;
$head = array();
global $langs, $conf, $user;
$h = 0;
$head = array();
$head[$h][0] = DOL_URL_ROOT."/admin/proxy.php";
$head[$h][1] = $langs->trans("ExternalAccess");
$head[$h][2] = 'proxy';
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/security_other.php";
$head[$h][1] = $langs->trans("Miscellanous");
$head[$h][2] = 'misc';
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/security_other.php";
$head[$h][1] = $langs->trans("Miscellanous");
$head[$h][2] = 'misc';
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/security.php";
$head[$h][1] = $langs->trans("Passwords");
$head[$h][2] = 'passwords';
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/events.php";
$head[$h][1] = $langs->trans("Audit");
$head[$h][2] = 'audit';
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/events.php";
$head[$h][1] = $langs->trans("Audit");
$head[$h][2] = 'audit';
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/perms.php";
$head[$h][0] = DOL_URL_ROOT."/admin/perms.php";
$head[$h][1] = $langs->trans("DefaultRights");
$head[$h][2] = 'default';
$h++;
@@ -524,44 +524,44 @@ function security_prepare_head()
*/
function listOfSessions()
{
global $conf;
global $conf;
$arrayofSessions = array();
$sessPath = ini_get("session.save_path").'/';
dol_syslog('admin.lib:listOfSessions sessPath='.$sessPath);
$arrayofSessions = array();
$sessPath = ini_get("session.save_path").'/';
dol_syslog('admin.lib:listOfSessions sessPath='.$sessPath);
$dh = @opendir($sessPath);
if ($dh)
{
while(($file = @readdir($dh)) !== false)
{
if (preg_match('/^sess_/i',$file) && $file != "." && $file != "..")
{
$fullpath = $sessPath.$file;
if(! @is_dir($fullpath) && is_readable($fullpath))
{
$sessValues = file_get_contents($fullpath); // get raw session data
$dh = @opendir(dol_osencode($sessPath));
if ($dh)
{
while(($file = @readdir($dh)) !== false)
{
if (preg_match('/^sess_/i',$file) && $file != "." && $file != "..")
{
$fullpath = $sessPath.$file;
if(! @is_dir($fullpath) && is_readable($fullpath))
{
$sessValues = file_get_contents($fullpath); // get raw session data
if (preg_match('/dol_login/i',$sessValues) && // limit to dolibarr session
preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i',$sessValues) && // limit to current entity
preg_match('/dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"/i',$sessValues)) // limit to company name
{
$tmp=explode('_', $file);
$idsess=$tmp[1];
$login = preg_match('/dol_login\|s:[0-9]+:"([A-Za-z0-9]+)"/i',$sessValues,$regs);
$arrayofSessions[$idsess]["login"] = $regs[1];
$arrayofSessions[$idsess]["age"] = time()-filectime($fullpath);
$arrayofSessions[$idsess]["creation"] = filectime($fullpath);
$arrayofSessions[$idsess]["modification"] = filemtime($fullpath);
$arrayofSessions[$idsess]["raw"] = $sessValues;
}
}
}
}
@closedir($dh);
}
if (preg_match('/dol_login/i',$sessValues) && // limit to dolibarr session
preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i',$sessValues) && // limit to current entity
preg_match('/dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"/i',$sessValues)) // limit to company name
{
$tmp=explode('_', $file);
$idsess=$tmp[1];
$login = preg_match('/dol_login\|s:[0-9]+:"([A-Za-z0-9]+)"/i',$sessValues,$regs);
$arrayofSessions[$idsess]["login"] = $regs[1];
$arrayofSessions[$idsess]["age"] = time()-filectime($fullpath);
$arrayofSessions[$idsess]["creation"] = filectime($fullpath);
$arrayofSessions[$idsess]["modification"] = filemtime($fullpath);
$arrayofSessions[$idsess]["raw"] = $sessValues;
}
}
}
}
@closedir($dh);
}
return $arrayofSessions;
return $arrayofSessions;
}
/**
@@ -572,43 +572,43 @@ function listOfSessions()
*/
function purgeSessions($mysessionid)
{
global $conf;
global $conf;
$arrayofSessions = array();
$sessPath = ini_get("session.save_path")."/";
dol_syslog('admin.lib:purgeSessions mysessionid='.$mysessionid.' sessPath='.$sessPath);
$arrayofSessions = array();
$sessPath = ini_get("session.save_path")."/";
dol_syslog('admin.lib:purgeSessions mysessionid='.$mysessionid.' sessPath='.$sessPath);
$error=0;
$dh = @opendir($sessPath);
while(($file = @readdir($dh)) !== false)
{
if ($file != "." && $file != "..")
{
$fullpath = $sessPath.$file;
if(! @is_dir($fullpath))
{
$sessValues = file_get_contents($fullpath); // get raw session data
$error=0;
$dh = @opendir(dol_osencode($sessPath));
while(($file = @readdir($dh)) !== false)
{
if ($file != "." && $file != "..")
{
$fullpath = $sessPath.$file;
if(! @is_dir($fullpath))
{
$sessValues = file_get_contents($fullpath); // get raw session data
if (preg_match('/dol_login/i',$sessValues) && // limit to dolibarr session
preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i',$sessValues) && // limit to current entity
preg_match('/dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"/i',$sessValues)) // limit to company name
{
$tmp=explode('_', $file);
$idsess=$tmp[1];
// We remove session if it's not ourself
if ($idsess != $mysessionid)
{
$res=@unlink($fullpath);
if (! $res) $error++;
}
}
}
}
}
@closedir($dh);
if (preg_match('/dol_login/i',$sessValues) && // limit to dolibarr session
preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i',$sessValues) && // limit to current entity
preg_match('/dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"/i',$sessValues)) // limit to company name
{
$tmp=explode('_', $file);
$idsess=$tmp[1];
// We remove session if it's not ourself
if ($idsess != $mysessionid)
{
$res=@unlink($fullpath);
if (! $res) $error++;
}
}
}
}
}
@closedir($dh);
if (! $error) return 1;
else return -$error;
if (! $error) return 1;
else return -$error;
}
@@ -634,37 +634,37 @@ function Activate($value,$withdeps=1)
// Loop on each directory
$found=false;
foreach ($conf->file->dol_document_root as $type => $dirroot)
foreach ($conf->file->dol_document_root as $type => $dirroot)
{
$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);
}
}
{
$handle=@opendir(dol_osencode($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)
{
if (file_exists($dir.$modFile))
{
$found=@include_once($dir.$modFile);
if ($found) break;
}
if (file_exists($dir.$modFile))
{
$found=@include_once($dir.$modFile);
if ($found) break;
}
}
$objMod = new $modName($db);
@@ -748,38 +748,38 @@ function UnActivate($value, $requiredby=1)
$modulesdir=array();
// Loop on each directory
$found=false;
$found=false;
foreach ($conf->file->dol_document_root as $type => $dirroot)
{
$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);
}
}
{
$handle=@opendir(dol_osencode($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)
{
if (file_exists($dir.$modFile))
{
$found=@include_once($dir.$modFile);
if ($found) break;
}
if (file_exists($dir.$modFile))
{
$found=@include_once($dir.$modFile);
if ($found) break;
}
}
if ($found)
@@ -846,9 +846,10 @@ function complete_dictionnary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsq
// Load modules attributes in arrays (name, numero, orders) from dir directory
//print $dir."\n<br>";
dol_syslog("Scan directory ".$dir." for modules");
$handle=@opendir($dir);
$handle=@opendir(dol_osencode($dir));
if (is_resource($handle))
{
while (($file = readdir($handle))!==false)
{
//print "$i ".$file."\n<br>";

View File

@@ -1,82 +1,82 @@
/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here.
// http://docs.cksource.com/CKEditor_3.x/Developers_Guide
// http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html
config.enterMode = CKEDITOR.ENTER_BR;
config.resize_enabled = false;
//config.resize_maxHeight = 3000;
//config.resize_maxWidth = 3000;
//config.height = '300px';
//config.resize_dir = 'vertical'; // horizontal, vertical, both
config.removePlugins = 'elementspath,save'; // config.removePlugins = 'elementspath,save,font';
config.removeDialogTabs = 'flash:advanced'; // config.removeDialogTabs = 'flash:advanced;image:Link';
config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // Prevent PHP Code to be formatted
//config.menu_groups = 'clipboard,table,anchor,link,image'; // for context menu 'clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea'
//config.language = 'de';
//config.defaultLanguage = 'en';
//config.contentsLanguage = 'fr';
config.fullPage = false; // Not a full html page string, just part of it
config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
//config.contentsCss = '/css/mysitestyles.css';
config.image_previewText=' ';
config.toolbar_Full =
[
['Source','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
'/',
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['BidiLtr', 'BidiRtl'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
'/',
['Styles','Format','Font','FontSize'],
['TextColor','BGColor'],
['Maximize', 'ShowBlocks','-','About']
];
config.toolbar_dolibarr_mailings =
[
['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Anchor','Image','Table','SpecialChar']
];
config.toolbar_dolibarr_notes =
[
['Source'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Image','Table','SpecialChar']
];
config.toolbar_dolibarr_details =
[
['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['SpecialChar']
];
};
/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here.
// http://docs.cksource.com/CKEditor_3.x/Developers_Guide
// http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html
config.enterMode = CKEDITOR.ENTER_BR;
config.resize_enabled = false;
//config.resize_maxHeight = 3000;
//config.resize_maxWidth = 3000;
//config.height = '300px';
//config.resize_dir = 'vertical'; // horizontal, vertical, both
config.removePlugins = 'elementspath,save'; // config.removePlugins = 'elementspath,save,font';
config.removeDialogTabs = 'flash:advanced'; // config.removeDialogTabs = 'flash:advanced;image:Link';
config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // Prevent PHP Code to be formatted
//config.menu_groups = 'clipboard,table,anchor,link,image'; // for context menu 'clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea'
//config.language = 'de';
//config.defaultLanguage = 'en';
//config.contentsLanguage = 'fr';
config.fullPage = false; // Not a full html page string, just part of it
config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
//config.contentsCss = '/css/mysitestyles.css';
config.image_previewText=' ';
config.toolbar_Full =
[
['Source','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
'/',
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['BidiLtr', 'BidiRtl'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
'/',
['Styles','Format','Font','FontSize'],
['TextColor','BGColor'],
['Maximize', 'ShowBlocks','-','About']
];
config.toolbar_dolibarr_mailings =
[
['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Anchor','Image','Table','SpecialChar']
];
config.toolbar_dolibarr_notes =
[
['Source'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Image','Table','SpecialChar']
];
config.toolbar_dolibarr_details =
[
['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['SpecialChar']
];
};

View File

@@ -1,110 +0,0 @@
/*
* 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);
})() ;

View File

@@ -1,82 +1,82 @@
/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here.
// http://docs.cksource.com/CKEditor_3.x/Developers_Guide
// http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html
config.enterMode = CKEDITOR.ENTER_BR;
config.resize_enabled = false;
//config.resize_maxHeight = 3000;
//config.resize_maxWidth = 3000;
//config.height = '300px';
//config.resize_dir = 'vertical'; // horizontal, vertical, both
config.removePlugins = 'elementspath,save'; // config.removePlugins = 'elementspath,save,font';
config.removeDialogTabs = 'flash:advanced'; // config.removeDialogTabs = 'flash:advanced;image:Link';
config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // Prevent PHP Code to be formatted
//config.menu_groups = 'clipboard,table,anchor,link,image'; // for context menu 'clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea'
//config.language = 'de';
//config.defaultLanguage = 'en';
//config.contentsLanguage = 'fr';
config.fullPage = false; // Not a full html page string, just part of it
config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
//config.contentsCss = '/css/mysitestyles.css';
config.image_previewText=' ';
config.toolbar_Full =
[
['Source','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
'/',
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['BidiLtr', 'BidiRtl'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
'/',
['Styles','Format','Font','FontSize'],
['TextColor','BGColor'],
['Maximize', 'ShowBlocks','-','About']
];
config.toolbar_dolibarr_mailings =
[
['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Anchor','Image','Table','SpecialChar']
];
config.toolbar_dolibarr_notes =
[
['Source'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Image','Table','SpecialChar']
];
config.toolbar_dolibarr_details =
[
['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['SpecialChar']
];
};
/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here.
// http://docs.cksource.com/CKEditor_3.x/Developers_Guide
// http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html
config.enterMode = CKEDITOR.ENTER_BR;
config.resize_enabled = false;
//config.resize_maxHeight = 3000;
//config.resize_maxWidth = 3000;
//config.height = '300px';
//config.resize_dir = 'vertical'; // horizontal, vertical, both
config.removePlugins = 'elementspath,save'; // config.removePlugins = 'elementspath,save,font';
config.removeDialogTabs = 'flash:advanced'; // config.removeDialogTabs = 'flash:advanced;image:Link';
config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // Prevent PHP Code to be formatted
//config.menu_groups = 'clipboard,table,anchor,link,image'; // for context menu 'clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea'
//config.language = 'de';
//config.defaultLanguage = 'en';
//config.contentsLanguage = 'fr';
config.fullPage = false; // Not a full html page string, just part of it
config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
//config.contentsCss = '/css/mysitestyles.css';
config.image_previewText=' ';
config.toolbar_Full =
[
['Source','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
'/',
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['BidiLtr', 'BidiRtl'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
'/',
['Styles','Format','Font','FontSize'],
['TextColor','BGColor'],
['Maximize', 'ShowBlocks','-','About']
];
config.toolbar_dolibarr_mailings =
[
['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Anchor','Image','Table','SpecialChar']
];
config.toolbar_dolibarr_notes =
[
['Source'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Image','Table','SpecialChar']
];
config.toolbar_dolibarr_details =
[
['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['SpecialChar']
];
};

View File

@@ -1,110 +0,0 @@
/*
* 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);
})() ;

View File

@@ -1,82 +1,82 @@
/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here.
// http://docs.cksource.com/CKEditor_3.x/Developers_Guide
// http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html
config.enterMode = CKEDITOR.ENTER_BR;
config.resize_enabled = false;
//config.resize_maxHeight = 3000;
//config.resize_maxWidth = 3000;
//config.height = '300px';
//config.resize_dir = 'vertical'; // horizontal, vertical, both
config.removePlugins = 'elementspath,save'; // config.removePlugins = 'elementspath,save,font';
config.removeDialogTabs = 'flash:advanced'; // config.removeDialogTabs = 'flash:advanced;image:Link';
config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // Prevent PHP Code to be formatted
//config.menu_groups = 'clipboard,table,anchor,link,image'; // for context menu 'clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea'
//config.language = 'de';
//config.defaultLanguage = 'en';
//config.contentsLanguage = 'fr';
config.fullPage = false; // Not a full html page string, just part of it
config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
//config.contentsCss = '/css/mysitestyles.css';
config.image_previewText=' '; // Must no be empty
config.toolbar_Full =
[
['Source','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
'/',
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['BidiLtr', 'BidiRtl'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
'/',
['Styles','Format','Font','FontSize'],
['TextColor','BGColor'],
['Maximize', 'ShowBlocks','-','About']
];
config.toolbar_dolibarr_mailings =
[
['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Anchor','Image','Table','SpecialChar']
];
config.toolbar_dolibarr_notes =
[
['Source'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Image','Table','SpecialChar']
];
config.toolbar_dolibarr_details =
[
['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['SpecialChar']
];
};
/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here.
// http://docs.cksource.com/CKEditor_3.x/Developers_Guide
// http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html
config.enterMode = CKEDITOR.ENTER_BR;
config.resize_enabled = false;
//config.resize_maxHeight = 3000;
//config.resize_maxWidth = 3000;
//config.height = '300px';
//config.resize_dir = 'vertical'; // horizontal, vertical, both
config.removePlugins = 'elementspath,save'; // config.removePlugins = 'elementspath,save,font';
config.removeDialogTabs = 'flash:advanced'; // config.removeDialogTabs = 'flash:advanced;image:Link';
config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // Prevent PHP Code to be formatted
//config.menu_groups = 'clipboard,table,anchor,link,image'; // for context menu 'clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea'
//config.language = 'de';
//config.defaultLanguage = 'en';
//config.contentsLanguage = 'fr';
config.fullPage = false; // Not a full html page string, just part of it
config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
//config.contentsCss = '/css/mysitestyles.css';
config.image_previewText=' '; // Must no be empty
config.toolbar_Full =
[
['Source','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
'/',
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['BidiLtr', 'BidiRtl'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
'/',
['Styles','Format','Font','FontSize'],
['TextColor','BGColor'],
['Maximize', 'ShowBlocks','-','About']
];
config.toolbar_dolibarr_mailings =
[
['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Anchor','Image','Table','SpecialChar']
];
config.toolbar_dolibarr_notes =
[
['Source'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Image','Table','SpecialChar']
];
config.toolbar_dolibarr_details =
[
['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['SpecialChar']
];
};

View File

@@ -1,110 +0,0 @@
/*
* 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);
})() ;

View File

@@ -1,82 +1,82 @@
/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here.
// http://docs.cksource.com/CKEditor_3.x/Developers_Guide
// http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html
config.enterMode = CKEDITOR.ENTER_BR;
config.resize_enabled = false;
//config.resize_maxHeight = 3000;
//config.resize_maxWidth = 3000;
//config.height = '300px';
//config.resize_dir = 'vertical'; // horizontal, vertical, both
config.removePlugins = 'elementspath,save'; // config.removePlugins = 'elementspath,save,font';
config.removeDialogTabs = 'flash:advanced'; // config.removeDialogTabs = 'flash:advanced;image:Link';
config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // Prevent PHP Code to be formatted
//config.menu_groups = 'clipboard,table,anchor,link,image'; // for context menu 'clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea'
//config.language = 'de';
//config.defaultLanguage = 'en';
//config.contentsLanguage = 'fr';
config.fullPage = false; // Not a full html page string, just part of it
config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
//config.contentsCss = '/css/mysitestyles.css';
config.image_previewText=' '; // Must no be empty
config.toolbar_Full =
[
['Source','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
'/',
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['BidiLtr', 'BidiRtl'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
'/',
['Styles','Format','Font','FontSize'],
['TextColor','BGColor'],
['Maximize', 'ShowBlocks','-','About']
];
config.toolbar_dolibarr_mailings =
[
['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Anchor','Image','Table','SpecialChar']
];
config.toolbar_dolibarr_notes =
[
['Source'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Image','Table','SpecialChar']
];
config.toolbar_dolibarr_details =
[
['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['SpecialChar']
];
};
/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here.
// http://docs.cksource.com/CKEditor_3.x/Developers_Guide
// http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html
config.enterMode = CKEDITOR.ENTER_BR;
config.resize_enabled = false;
//config.resize_maxHeight = 3000;
//config.resize_maxWidth = 3000;
//config.height = '300px';
//config.resize_dir = 'vertical'; // horizontal, vertical, both
config.removePlugins = 'elementspath,save'; // config.removePlugins = 'elementspath,save,font';
config.removeDialogTabs = 'flash:advanced'; // config.removeDialogTabs = 'flash:advanced;image:Link';
config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // Prevent PHP Code to be formatted
//config.menu_groups = 'clipboard,table,anchor,link,image'; // for context menu 'clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea'
//config.language = 'de';
//config.defaultLanguage = 'en';
//config.contentsLanguage = 'fr';
config.fullPage = false; // Not a full html page string, just part of it
config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
//config.contentsCss = '/css/mysitestyles.css';
config.image_previewText=' '; // Must no be empty
config.toolbar_Full =
[
['Source','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
'/',
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['BidiLtr', 'BidiRtl'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
'/',
['Styles','Format','Font','FontSize'],
['TextColor','BGColor'],
['Maximize', 'ShowBlocks','-','About']
];
config.toolbar_dolibarr_mailings =
[
['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Anchor','Image','Table','SpecialChar']
];
config.toolbar_dolibarr_notes =
[
['Source'],
['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Image','Table','SpecialChar']
];
config.toolbar_dolibarr_details =
[
['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'],
['Font','FontSize'],
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
['NumberedList','BulletedList','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['SpecialChar']
];
};

View File

@@ -1,110 +0,0 @@
/*
* 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);
})() ;

View File

@@ -1,4 +1,4 @@
<?php
<?php
/* Copyright (C) 2009-2010 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify