Fix: Restore stable version for 3.0
This commit is contained in:
parent
c9e41e00f5
commit
2498426867
@ -84,8 +84,7 @@ $i = 0; // is a sequencer of modules found
|
||||
$j = 0; // j is module number. Automatically affeted if module number not defined.
|
||||
foreach ($conf->file->dol_document_root as $dirroot)
|
||||
{
|
||||
if (preg_match('/custom$/i',$dirroot)) $dir = $dirroot . "/modules/";
|
||||
else $dir = $dirroot . "/includes/modules/";
|
||||
$dir = $dirroot . "/includes/modules/";
|
||||
|
||||
// Load modules attributes in arrays (name, numero, orders) from dir directory
|
||||
//print $dir."\n<br>";
|
||||
|
||||
@ -1,41 +1,41 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/boutique/osc_master.inc.php
|
||||
\brief Fichier de preparation de l'environnement Dolibarr pour OSCommerce
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
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 '<div class="error">Failed to connect to oscommerce database. Check your module setup</div>';
|
||||
llxFooter();
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<?PHP
|
||||
/* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/boutique/osc_master.inc.php
|
||||
\brief Fichier de preparation de l'environnement Dolibarr pour OSCommerce
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
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 '<div class="error">Failed to connect to oscommerce database. Check your module setup</div>';
|
||||
llxFooter();
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -1,108 +1,108 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ro" lang="ro">
|
||||
|
||||
<head>
|
||||
<title>Bug</title>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="calendar-win2k-1.css" title="win2k-1" />
|
||||
|
||||
<!-- import the calendar script -->
|
||||
<script type="text/javascript" src="calendar.js"></script>
|
||||
|
||||
<!-- import the language module -->
|
||||
<script type="text/javascript" src="lang/calendar-en.js"></script>
|
||||
|
||||
<!-- helper script that uses the calendar -->
|
||||
<script type="text/javascript">
|
||||
// This function gets called when the end-user clicks on some date.
|
||||
function selected(cal, date) {
|
||||
cal.sel.value = date; // just update the date in the input field.
|
||||
if (cal.sel.id == "sel1" || cal.sel.id == "sel3")
|
||||
// if we add this call we close the calendar on single-click.
|
||||
// just to exemplify both cases, we are using this only for the 1st
|
||||
// and the 3rd field, while 2nd and 4th will still require double-click.
|
||||
cal.callCloseHandler();
|
||||
}
|
||||
|
||||
// And this gets called when the end-user clicks on the _selected_ date,
|
||||
// or clicks on the "Close" button. It just hides the calendar without
|
||||
// destroying it.
|
||||
function closeHandler(cal) {
|
||||
cal.hide(); // hide the calendar
|
||||
}
|
||||
|
||||
// This function shows the calendar under the element having the given id.
|
||||
// It takes care of catching "mousedown" signals on document and hiding the
|
||||
// calendar if the click was outside.
|
||||
function showCalendar(id, format) {
|
||||
var el = document.getElementById(id);
|
||||
if (calendar != null) {
|
||||
// we already have some calendar created
|
||||
calendar.hide(); // so we hide it first.
|
||||
} else {
|
||||
// first-time call, create the calendar.
|
||||
var cal = new Calendar(false, null, selected, closeHandler);
|
||||
// uncomment the following line to hide the week numbers
|
||||
// cal.weekNumbers = false;
|
||||
calendar = cal; // remember it in the global var
|
||||
cal.setRange(1900, 2070); // min/max year allowed.
|
||||
cal.create();
|
||||
}
|
||||
calendar.setDateFormat(format); // set the specified date format
|
||||
calendar.parseDate(el.value); // try to parse the text in field
|
||||
calendar.sel = el; // inform it what input field we use
|
||||
calendar.showAtElement(el); // show the calendar below it
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
var MINUTE = 60 * 1000;
|
||||
var HOUR = 60 * MINUTE;
|
||||
var DAY = 24 * HOUR;
|
||||
var WEEK = 7 * DAY;
|
||||
|
||||
// If this handler returns true then the "date" given as
|
||||
// parameter will be disabled. In this example we enable
|
||||
// only days within a range of 10 days from the current
|
||||
// date.
|
||||
// You can use the functions date.getFullYear() -- returns the year
|
||||
// as 4 digit number, date.getMonth() -- returns the month as 0..11,
|
||||
// and date.getDate() -- returns the date of the month as 1..31, to
|
||||
// make heavy calculations here. However, beware that this function
|
||||
// should be very fast, as it is called for each day in a month when
|
||||
// the calendar is (re)constructed.
|
||||
function isDisabled(date) {
|
||||
var today = new Date();
|
||||
return (Math.abs(date.getTime() - today.getTime()) / DAY) > 10;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form>
|
||||
<b>Date:</b>
|
||||
<br>
|
||||
<input type="text" name="date1" id="sel1" size="30">
|
||||
<input type="button" value="..." onclick="return showCalendar('sel1', 'y-m-d');">
|
||||
<p>
|
||||
<br>
|
||||
<br><b>Visible <select>, hides and unhides as expected</b>
|
||||
<br>
|
||||
<select name="foo" multiple>
|
||||
<option value="1">can use the functions date.getFullYear() -- returns</option>
|
||||
<option value="2">4 digit number, date.getMonth() -- returns the month</option>
|
||||
<option value="3">heavy calculations here. However, beware that this</option>
|
||||
</select>
|
||||
|
||||
<p>
|
||||
<br><b>Hidden <select>, it should stay hidden (but doesn't)</b>
|
||||
<br>
|
||||
<select name="foo2" multiple style="visibility: hidden">
|
||||
<option value="1">this should</option>
|
||||
<option value="2">remain hidden right?</option>
|
||||
</select>
|
||||
|
||||
<p>
|
||||
<br><b>Hidden textbox below, it stays hidden as expected</b>
|
||||
<br>
|
||||
<input type="text" name="foo3" value="this stays hidden just fine" style="visibility: hidden">
|
||||
</form>
|
||||
</body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ro" lang="ro">
|
||||
|
||||
<head>
|
||||
<title>Bug</title>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="calendar-win2k-1.css" title="win2k-1" />
|
||||
|
||||
<!-- import the calendar script -->
|
||||
<script type="text/javascript" src="calendar.js"></script>
|
||||
|
||||
<!-- import the language module -->
|
||||
<script type="text/javascript" src="lang/calendar-en.js"></script>
|
||||
|
||||
<!-- helper script that uses the calendar -->
|
||||
<script type="text/javascript">
|
||||
// This function gets called when the end-user clicks on some date.
|
||||
function selected(cal, date) {
|
||||
cal.sel.value = date; // just update the date in the input field.
|
||||
if (cal.sel.id == "sel1" || cal.sel.id == "sel3")
|
||||
// if we add this call we close the calendar on single-click.
|
||||
// just to exemplify both cases, we are using this only for the 1st
|
||||
// and the 3rd field, while 2nd and 4th will still require double-click.
|
||||
cal.callCloseHandler();
|
||||
}
|
||||
|
||||
// And this gets called when the end-user clicks on the _selected_ date,
|
||||
// or clicks on the "Close" button. It just hides the calendar without
|
||||
// destroying it.
|
||||
function closeHandler(cal) {
|
||||
cal.hide(); // hide the calendar
|
||||
}
|
||||
|
||||
// This function shows the calendar under the element having the given id.
|
||||
// It takes care of catching "mousedown" signals on document and hiding the
|
||||
// calendar if the click was outside.
|
||||
function showCalendar(id, format) {
|
||||
var el = document.getElementById(id);
|
||||
if (calendar != null) {
|
||||
// we already have some calendar created
|
||||
calendar.hide(); // so we hide it first.
|
||||
} else {
|
||||
// first-time call, create the calendar.
|
||||
var cal = new Calendar(false, null, selected, closeHandler);
|
||||
// uncomment the following line to hide the week numbers
|
||||
// cal.weekNumbers = false;
|
||||
calendar = cal; // remember it in the global var
|
||||
cal.setRange(1900, 2070); // min/max year allowed.
|
||||
cal.create();
|
||||
}
|
||||
calendar.setDateFormat(format); // set the specified date format
|
||||
calendar.parseDate(el.value); // try to parse the text in field
|
||||
calendar.sel = el; // inform it what input field we use
|
||||
calendar.showAtElement(el); // show the calendar below it
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
var MINUTE = 60 * 1000;
|
||||
var HOUR = 60 * MINUTE;
|
||||
var DAY = 24 * HOUR;
|
||||
var WEEK = 7 * DAY;
|
||||
|
||||
// If this handler returns true then the "date" given as
|
||||
// parameter will be disabled. In this example we enable
|
||||
// only days within a range of 10 days from the current
|
||||
// date.
|
||||
// You can use the functions date.getFullYear() -- returns the year
|
||||
// as 4 digit number, date.getMonth() -- returns the month as 0..11,
|
||||
// and date.getDate() -- returns the date of the month as 1..31, to
|
||||
// make heavy calculations here. However, beware that this function
|
||||
// should be very fast, as it is called for each day in a month when
|
||||
// the calendar is (re)constructed.
|
||||
function isDisabled(date) {
|
||||
var today = new Date();
|
||||
return (Math.abs(date.getTime() - today.getTime()) / DAY) > 10;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form>
|
||||
<b>Date:</b>
|
||||
<br>
|
||||
<input type="text" name="date1" id="sel1" size="30">
|
||||
<input type="button" value="..." onclick="return showCalendar('sel1', 'y-m-d');">
|
||||
<p>
|
||||
<br>
|
||||
<br><b>Visible <select>, hides and unhides as expected</b>
|
||||
<br>
|
||||
<select name="foo" multiple>
|
||||
<option value="1">can use the functions date.getFullYear() -- returns</option>
|
||||
<option value="2">4 digit number, date.getMonth() -- returns the month</option>
|
||||
<option value="3">heavy calculations here. However, beware that this</option>
|
||||
</select>
|
||||
|
||||
<p>
|
||||
<br><b>Hidden <select>, it should stay hidden (but doesn't)</b>
|
||||
<br>
|
||||
<select name="foo2" multiple style="visibility: hidden">
|
||||
<option value="1">this should</option>
|
||||
<option value="2">remain hidden right?</option>
|
||||
</select>
|
||||
|
||||
<p>
|
||||
<br><b>Hidden textbox below, it stays hidden as expected</b>
|
||||
<br>
|
||||
<input type="text" name="foo3" value="this stays hidden just fine" style="visibility: hidden">
|
||||
</form>
|
||||
</body></html>
|
||||
|
||||
@ -1,124 +1,124 @@
|
||||
// ** I18N
|
||||
|
||||
// Calendar BG language
|
||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
||||
// Translator: Valentin Sheiretsky, <valio@valio.eu.org>
|
||||
// Encoding: Windows-1251
|
||||
// Distributed under the same terms as the calendar itself.
|
||||
|
||||
// For translators: please use UTF-8 if possible. We strongly believe that
|
||||
// Unicode is the answer to a real internationalized world. Also please
|
||||
// include your contact information in the header, as can be seen above.
|
||||
|
||||
// full day names
|
||||
Calendar._DN = new Array
|
||||
("Íåäåëÿ",
|
||||
"Ïîíåäåëíèê",
|
||||
"Âòîðíèê",
|
||||
"Ñðÿäà",
|
||||
"×åòâúðòúê",
|
||||
"Ïåòúê",
|
||||
"Ñúáîòà",
|
||||
"Íåäåëÿ");
|
||||
|
||||
// Please note that the following array of short day names (and the same goes
|
||||
// for short month names, _SMN) isn't absolutely necessary. We give it here
|
||||
// for exemplification on how one can customize the short day names, but if
|
||||
// they are simply the first N letters of the full name you can simply say:
|
||||
//
|
||||
// Calendar._SDN_len = N; // short day name length
|
||||
// Calendar._SMN_len = N; // short month name length
|
||||
//
|
||||
// If N = 3 then this is not needed either since we assume a value of 3 if not
|
||||
// present, to be compatible with translation files that were written before
|
||||
// this feature.
|
||||
|
||||
// short day names
|
||||
Calendar._SDN = new Array
|
||||
("Íåä",
|
||||
"Ïîí",
|
||||
"Âòî",
|
||||
"Ñðÿ",
|
||||
"×åò",
|
||||
"Ïåò",
|
||||
"Ñúá",
|
||||
"Íåä");
|
||||
|
||||
// full month names
|
||||
Calendar._MN = new Array
|
||||
("ßíóàðè",
|
||||
"Ôåâðóàðè",
|
||||
"Ìàðò",
|
||||
"Àïðèë",
|
||||
"Ìàé",
|
||||
"Þíè",
|
||||
"Þëè",
|
||||
"Àâãóñò",
|
||||
"Ñåïòåìâðè",
|
||||
"Îêòîìâðè",
|
||||
"Íîåìâðè",
|
||||
"Äåêåìâðè");
|
||||
|
||||
// short month names
|
||||
Calendar._SMN = new Array
|
||||
("ßíó",
|
||||
"Ôåâ",
|
||||
"Ìàð",
|
||||
"Àïð",
|
||||
"Ìàé",
|
||||
"Þíè",
|
||||
"Þëè",
|
||||
"Àâã",
|
||||
"Ñåï",
|
||||
"Îêò",
|
||||
"Íîå",
|
||||
"Äåê");
|
||||
|
||||
// tooltips
|
||||
Calendar._TT = {};
|
||||
Calendar._TT["INFO"] = "Èíôîðìàöèÿ çà êàëåíäàðà";
|
||||
|
||||
Calendar._TT["ABOUT"] =
|
||||
"DHTML Date/Time Selector\n" +
|
||||
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
||||
"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
|
||||
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
|
||||
"\n\n" +
|
||||
"Date selection:\n" +
|
||||
"- Use the \xab, \xbb buttons to select year\n" +
|
||||
"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
|
||||
"- Hold mouse button on any of the above buttons for faster selection.";
|
||||
Calendar._TT["ABOUT_TIME"] = "\n\n" +
|
||||
"Time selection:\n" +
|
||||
"- Click on any of the time parts to increase it\n" +
|
||||
"- or Shift-click to decrease it\n" +
|
||||
"- or click and drag for faster selection.";
|
||||
|
||||
Calendar._TT["PREV_YEAR"] = "Ïðåäíà ãîäèíà (çàäðúæòå çà ìåíþ)";
|
||||
Calendar._TT["PREV_MONTH"] = "Ïðåäåí ìåñåö (çàäðúæòå çà ìåíþ)";
|
||||
Calendar._TT["GO_TODAY"] = "Èçáåðåòå äíåñ";
|
||||
Calendar._TT["NEXT_MONTH"] = "Ñëåäâàù ìåñåö (çàäðúæòå çà ìåíþ)";
|
||||
Calendar._TT["NEXT_YEAR"] = "Ñëåäâàùà ãîäèíà (çàäðúæòå çà ìåíþ)";
|
||||
Calendar._TT["SEL_DATE"] = "Èçáåðåòå äàòà";
|
||||
Calendar._TT["DRAG_TO_MOVE"] = "Ïðåìåñòâàíå";
|
||||
Calendar._TT["PART_TODAY"] = " (äíåñ)";
|
||||
|
||||
// the following is to inform that "%s" is to be the first day of week
|
||||
// %s will be replaced with the day name.
|
||||
Calendar._TT["DAY_FIRST"] = "%s êàòî ïúðâè äåí";
|
||||
|
||||
// This may be locale-dependent. It specifies the week-end days, as an array
|
||||
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
|
||||
// means Monday, etc.
|
||||
Calendar._TT["WEEKEND"] = "0,6";
|
||||
|
||||
Calendar._TT["CLOSE"] = "Çàòâîðåòå";
|
||||
Calendar._TT["TODAY"] = "Äíåñ";
|
||||
Calendar._TT["TIME_PART"] = "(Shift-)Click èëè drag çà äà ïðîìåíèòå ñòîéíîñòòà";
|
||||
|
||||
// date formats
|
||||
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
||||
Calendar._TT["TT_DATE_FORMAT"] = "%A - %e %B %Y";
|
||||
|
||||
Calendar._TT["WK"] = "Ñåäì";
|
||||
Calendar._TT["TIME"] = "×àñ:";
|
||||
// ** I18N
|
||||
|
||||
// Calendar BG language
|
||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
||||
// Translator: Valentin Sheiretsky, <valio@valio.eu.org>
|
||||
// Encoding: Windows-1251
|
||||
// Distributed under the same terms as the calendar itself.
|
||||
|
||||
// For translators: please use UTF-8 if possible. We strongly believe that
|
||||
// Unicode is the answer to a real internationalized world. Also please
|
||||
// include your contact information in the header, as can be seen above.
|
||||
|
||||
// full day names
|
||||
Calendar._DN = new Array
|
||||
("Íåäåëÿ",
|
||||
"Ïîíåäåëíèê",
|
||||
"Âòîðíèê",
|
||||
"Ñðÿäà",
|
||||
"×åòâúðòúê",
|
||||
"Ïåòúê",
|
||||
"Ñúáîòà",
|
||||
"Íåäåëÿ");
|
||||
|
||||
// Please note that the following array of short day names (and the same goes
|
||||
// for short month names, _SMN) isn't absolutely necessary. We give it here
|
||||
// for exemplification on how one can customize the short day names, but if
|
||||
// they are simply the first N letters of the full name you can simply say:
|
||||
//
|
||||
// Calendar._SDN_len = N; // short day name length
|
||||
// Calendar._SMN_len = N; // short month name length
|
||||
//
|
||||
// If N = 3 then this is not needed either since we assume a value of 3 if not
|
||||
// present, to be compatible with translation files that were written before
|
||||
// this feature.
|
||||
|
||||
// short day names
|
||||
Calendar._SDN = new Array
|
||||
("Íåä",
|
||||
"Ïîí",
|
||||
"Âòî",
|
||||
"Ñðÿ",
|
||||
"×åò",
|
||||
"Ïåò",
|
||||
"Ñúá",
|
||||
"Íåä");
|
||||
|
||||
// full month names
|
||||
Calendar._MN = new Array
|
||||
("ßíóàðè",
|
||||
"Ôåâðóàðè",
|
||||
"Ìàðò",
|
||||
"Àïðèë",
|
||||
"Ìàé",
|
||||
"Þíè",
|
||||
"Þëè",
|
||||
"Àâãóñò",
|
||||
"Ñåïòåìâðè",
|
||||
"Îêòîìâðè",
|
||||
"Íîåìâðè",
|
||||
"Äåêåìâðè");
|
||||
|
||||
// short month names
|
||||
Calendar._SMN = new Array
|
||||
("ßíó",
|
||||
"Ôåâ",
|
||||
"Ìàð",
|
||||
"Àïð",
|
||||
"Ìàé",
|
||||
"Þíè",
|
||||
"Þëè",
|
||||
"Àâã",
|
||||
"Ñåï",
|
||||
"Îêò",
|
||||
"Íîå",
|
||||
"Äåê");
|
||||
|
||||
// tooltips
|
||||
Calendar._TT = {};
|
||||
Calendar._TT["INFO"] = "Èíôîðìàöèÿ çà êàëåíäàðà";
|
||||
|
||||
Calendar._TT["ABOUT"] =
|
||||
"DHTML Date/Time Selector\n" +
|
||||
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
||||
"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
|
||||
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
|
||||
"\n\n" +
|
||||
"Date selection:\n" +
|
||||
"- Use the \xab, \xbb buttons to select year\n" +
|
||||
"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
|
||||
"- Hold mouse button on any of the above buttons for faster selection.";
|
||||
Calendar._TT["ABOUT_TIME"] = "\n\n" +
|
||||
"Time selection:\n" +
|
||||
"- Click on any of the time parts to increase it\n" +
|
||||
"- or Shift-click to decrease it\n" +
|
||||
"- or click and drag for faster selection.";
|
||||
|
||||
Calendar._TT["PREV_YEAR"] = "Ïðåäíà ãîäèíà (çàäðúæòå çà ìåíþ)";
|
||||
Calendar._TT["PREV_MONTH"] = "Ïðåäåí ìåñåö (çàäðúæòå çà ìåíþ)";
|
||||
Calendar._TT["GO_TODAY"] = "Èçáåðåòå äíåñ";
|
||||
Calendar._TT["NEXT_MONTH"] = "Ñëåäâàù ìåñåö (çàäðúæòå çà ìåíþ)";
|
||||
Calendar._TT["NEXT_YEAR"] = "Ñëåäâàùà ãîäèíà (çàäðúæòå çà ìåíþ)";
|
||||
Calendar._TT["SEL_DATE"] = "Èçáåðåòå äàòà";
|
||||
Calendar._TT["DRAG_TO_MOVE"] = "Ïðåìåñòâàíå";
|
||||
Calendar._TT["PART_TODAY"] = " (äíåñ)";
|
||||
|
||||
// the following is to inform that "%s" is to be the first day of week
|
||||
// %s will be replaced with the day name.
|
||||
Calendar._TT["DAY_FIRST"] = "%s êàòî ïúðâè äåí";
|
||||
|
||||
// This may be locale-dependent. It specifies the week-end days, as an array
|
||||
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
|
||||
// means Monday, etc.
|
||||
Calendar._TT["WEEKEND"] = "0,6";
|
||||
|
||||
Calendar._TT["CLOSE"] = "Çàòâîðåòå";
|
||||
Calendar._TT["TODAY"] = "Äíåñ";
|
||||
Calendar._TT["TIME_PART"] = "(Shift-)Click èëè drag çà äà ïðîìåíèòå ñòîéíîñòòà";
|
||||
|
||||
// date formats
|
||||
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
||||
Calendar._TT["TT_DATE_FORMAT"] = "%A - %e %B %Y";
|
||||
|
||||
Calendar._TT["WK"] = "Ñåäì";
|
||||
Calendar._TT["TIME"] = "×àñ:";
|
||||
|
||||
@ -1,89 +1,89 @@
|
||||
// ** I18N
|
||||
Calendar._DN = new Array
|
||||
("Κυριακή",
|
||||
"Δευτέρα",
|
||||
"Τρίτη",
|
||||
"Τετάρτη",
|
||||
"Πέμπτη",
|
||||
"Παρασκευή",
|
||||
"Σάββατο",
|
||||
"Κυριακή");
|
||||
|
||||
Calendar._SDN = new Array
|
||||
("Κυ",
|
||||
"Δε",
|
||||
"Tρ",
|
||||
"Τε",
|
||||
"Πε",
|
||||
"Πα",
|
||||
"Σα",
|
||||
"Κυ");
|
||||
|
||||
Calendar._MN = new Array
|
||||
("Ιανουάριος",
|
||||
"Φεβρουάριος",
|
||||
"Μάρτιος",
|
||||
"Απρίλιος",
|
||||
"Μάϊος",
|
||||
"Ιούνιος",
|
||||
"Ιούλιος",
|
||||
"Αύγουστος",
|
||||
"Σεπτέμβριος",
|
||||
"Οκτώβριος",
|
||||
"Νοέμβριος",
|
||||
"Δεκέμβριος");
|
||||
|
||||
Calendar._SMN = new Array
|
||||
("Ιαν",
|
||||
"Φεβ",
|
||||
"Μαρ",
|
||||
"Απρ",
|
||||
"Μαι",
|
||||
"Ιουν",
|
||||
"Ιουλ",
|
||||
"Αυγ",
|
||||
"Σεπ",
|
||||
"Οκτ",
|
||||
"Νοε",
|
||||
"Δεκ");
|
||||
|
||||
// tooltips
|
||||
Calendar._TT = {};
|
||||
Calendar._TT["INFO"] = "Για το ημερολόγιο";
|
||||
|
||||
Calendar._TT["ABOUT"] =
|
||||
"Επιλογέας ημερομηνίας/ώρας σε DHTML\n" +
|
||||
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
||||
"Για τελευταία έκδοση: http://www.dynarch.com/projects/calendar/\n" +
|
||||
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
|
||||
"\n\n" +
|
||||
"Επιλογή ημερομηνίας:\n" +
|
||||
"- Χρησιμοποιείστε τα κουμπιά \xab, \xbb για επιλογή έτους\n" +
|
||||
"- Χρησιμοποιείστε τα κουμπιά " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " για επιλογή μήνα\n" +
|
||||
"- Κρατήστε κουμπί ποντικού πατημένο στα παραπάνω κουμπιά για πιο γρήγορη επιλογή.";
|
||||
Calendar._TT["ABOUT_TIME"] = "\n\n" +
|
||||
"Επιλογή ώρας:\n" +
|
||||
"- Κάντε κλικ σε ένα από τα μέρη της ώρας για αύξηση\n" +
|
||||
"- ή Shift-κλικ για μείωση\n" +
|
||||
"- ή κλικ και μετακίνηση για πιο γρήγορη επιλογή.";
|
||||
Calendar._TT["TOGGLE"] = "Μπάρα πρώτης ημέρας της εβδομάδας";
|
||||
Calendar._TT["PREV_YEAR"] = "Προηγ. έτος (κρατήστε για το μενού)";
|
||||
Calendar._TT["PREV_MONTH"] = "Προηγ. μήνας (κρατήστε για το μενού)";
|
||||
Calendar._TT["GO_TODAY"] = "Σήμερα";
|
||||
Calendar._TT["NEXT_MONTH"] = "Επόμενος μήνας (κρατήστε για το μενού)";
|
||||
Calendar._TT["NEXT_YEAR"] = "Επόμενο έτος (κρατήστε για το μενού)";
|
||||
Calendar._TT["SEL_DATE"] = "Επιλέξτε ημερομηνία";
|
||||
Calendar._TT["DRAG_TO_MOVE"] = "Σύρτε για να μετακινήσετε";
|
||||
Calendar._TT["PART_TODAY"] = " (σήμερα)";
|
||||
Calendar._TT["MON_FIRST"] = "Εμφάνιση Δευτέρας πρώτα";
|
||||
Calendar._TT["SUN_FIRST"] = "Εμφάνιση Κυριακής πρώτα";
|
||||
Calendar._TT["CLOSE"] = "Κλείσιμο";
|
||||
Calendar._TT["TODAY"] = "Σήμερα";
|
||||
Calendar._TT["TIME_PART"] = "(Shift-)κλικ ή μετακίνηση για αλλαγή";
|
||||
|
||||
// date formats
|
||||
Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
|
||||
Calendar._TT["TT_DATE_FORMAT"] = "D, d M";
|
||||
|
||||
Calendar._TT["WK"] = "εβδ";
|
||||
|
||||
// ** I18N
|
||||
Calendar._DN = new Array
|
||||
("Κυριακή",
|
||||
"Δευτέρα",
|
||||
"Τρίτη",
|
||||
"Τετάρτη",
|
||||
"Πέμπτη",
|
||||
"Παρασκευή",
|
||||
"Σάββατο",
|
||||
"Κυριακή");
|
||||
|
||||
Calendar._SDN = new Array
|
||||
("Κυ",
|
||||
"Δε",
|
||||
"Tρ",
|
||||
"Τε",
|
||||
"Πε",
|
||||
"Πα",
|
||||
"Σα",
|
||||
"Κυ");
|
||||
|
||||
Calendar._MN = new Array
|
||||
("Ιανουάριος",
|
||||
"Φεβρουάριος",
|
||||
"Μάρτιος",
|
||||
"Απρίλιος",
|
||||
"Μάϊος",
|
||||
"Ιούνιος",
|
||||
"Ιούλιος",
|
||||
"Αύγουστος",
|
||||
"Σεπτέμβριος",
|
||||
"Οκτώβριος",
|
||||
"Νοέμβριος",
|
||||
"Δεκέμβριος");
|
||||
|
||||
Calendar._SMN = new Array
|
||||
("Ιαν",
|
||||
"Φεβ",
|
||||
"Μαρ",
|
||||
"Απρ",
|
||||
"Μαι",
|
||||
"Ιουν",
|
||||
"Ιουλ",
|
||||
"Αυγ",
|
||||
"Σεπ",
|
||||
"Οκτ",
|
||||
"Νοε",
|
||||
"Δεκ");
|
||||
|
||||
// tooltips
|
||||
Calendar._TT = {};
|
||||
Calendar._TT["INFO"] = "Για το ημερολόγιο";
|
||||
|
||||
Calendar._TT["ABOUT"] =
|
||||
"Επιλογέας ημερομηνίας/ώρας σε DHTML\n" +
|
||||
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
||||
"Για τελευταία έκδοση: http://www.dynarch.com/projects/calendar/\n" +
|
||||
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
|
||||
"\n\n" +
|
||||
"Επιλογή ημερομηνίας:\n" +
|
||||
"- Χρησιμοποιείστε τα κουμπιά \xab, \xbb για επιλογή έτους\n" +
|
||||
"- Χρησιμοποιείστε τα κουμπιά " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " για επιλογή μήνα\n" +
|
||||
"- Κρατήστε κουμπί ποντικού πατημένο στα παραπάνω κουμπιά για πιο γρήγορη επιλογή.";
|
||||
Calendar._TT["ABOUT_TIME"] = "\n\n" +
|
||||
"Επιλογή ώρας:\n" +
|
||||
"- Κάντε κλικ σε ένα από τα μέρη της ώρας για αύξηση\n" +
|
||||
"- ή Shift-κλικ για μείωση\n" +
|
||||
"- ή κλικ και μετακίνηση για πιο γρήγορη επιλογή.";
|
||||
Calendar._TT["TOGGLE"] = "Μπάρα πρώτης ημέρας της εβδομάδας";
|
||||
Calendar._TT["PREV_YEAR"] = "Προηγ. έτος (κρατήστε για το μενού)";
|
||||
Calendar._TT["PREV_MONTH"] = "Προηγ. μήνας (κρατήστε για το μενού)";
|
||||
Calendar._TT["GO_TODAY"] = "Σήμερα";
|
||||
Calendar._TT["NEXT_MONTH"] = "Επόμενος μήνας (κρατήστε για το μενού)";
|
||||
Calendar._TT["NEXT_YEAR"] = "Επόμενο έτος (κρατήστε για το μενού)";
|
||||
Calendar._TT["SEL_DATE"] = "Επιλέξτε ημερομηνία";
|
||||
Calendar._TT["DRAG_TO_MOVE"] = "Σύρτε για να μετακινήσετε";
|
||||
Calendar._TT["PART_TODAY"] = " (σήμερα)";
|
||||
Calendar._TT["MON_FIRST"] = "Εμφάνιση Δευτέρας πρώτα";
|
||||
Calendar._TT["SUN_FIRST"] = "Εμφάνιση Κυριακής πρώτα";
|
||||
Calendar._TT["CLOSE"] = "Κλείσιμο";
|
||||
Calendar._TT["TODAY"] = "Σήμερα";
|
||||
Calendar._TT["TIME_PART"] = "(Shift-)κλικ ή μετακίνηση για αλλαγή";
|
||||
|
||||
// date formats
|
||||
Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
|
||||
Calendar._TT["TT_DATE_FORMAT"] = "D, d M";
|
||||
|
||||
Calendar._TT["WK"] = "εβδ";
|
||||
|
||||
|
||||
@ -1,49 +1,49 @@
|
||||
/* Croatian language file for the DHTML Calendar version 0.9.2
|
||||
* Author Krunoslav Zubrinic <krunoslav.zubrinic@vip.hr>, June 2003.
|
||||
* Feel free to use this script under the terms of the GNU Lesser General
|
||||
* Public License, as long as you do not remove or alter this notice.
|
||||
*/
|
||||
Calendar._DN = new Array
|
||||
("Nedjelja",
|
||||
"Ponedjeljak",
|
||||
"Utorak",
|
||||
"Srijeda",
|
||||
"Četvrtak",
|
||||
"Petak",
|
||||
"Subota",
|
||||
"Nedjelja");
|
||||
Calendar._MN = new Array
|
||||
("Siječanj",
|
||||
"Veljača",
|
||||
"Ožujak",
|
||||
"Travanj",
|
||||
"Svibanj",
|
||||
"Lipanj",
|
||||
"Srpanj",
|
||||
"Kolovoz",
|
||||
"Rujan",
|
||||
"Listopad",
|
||||
"Studeni",
|
||||
"Prosinac");
|
||||
|
||||
// tooltips
|
||||
Calendar._TT = {};
|
||||
Calendar._TT["TOGGLE"] = "Promjeni dan s kojim počinje tjedan";
|
||||
Calendar._TT["PREV_YEAR"] = "Prethodna godina (dugi pritisak za meni)";
|
||||
Calendar._TT["PREV_MONTH"] = "Prethodni mjesec (dugi pritisak za meni)";
|
||||
Calendar._TT["GO_TODAY"] = "Idi na tekući dan";
|
||||
Calendar._TT["NEXT_MONTH"] = "Slijedeći mjesec (dugi pritisak za meni)";
|
||||
Calendar._TT["NEXT_YEAR"] = "Slijedeća godina (dugi pritisak za meni)";
|
||||
Calendar._TT["SEL_DATE"] = "Izaberite datum";
|
||||
Calendar._TT["DRAG_TO_MOVE"] = "Pritisni i povuci za promjenu pozicije";
|
||||
Calendar._TT["PART_TODAY"] = " (today)";
|
||||
Calendar._TT["MON_FIRST"] = "Prikaži ponedjeljak kao prvi dan";
|
||||
Calendar._TT["SUN_FIRST"] = "Prikaži nedjelju kao prvi dan";
|
||||
Calendar._TT["CLOSE"] = "Zatvori";
|
||||
Calendar._TT["TODAY"] = "Danas";
|
||||
|
||||
// date formats
|
||||
Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
|
||||
Calendar._TT["TT_DATE_FORMAT"] = "DD, dd.mm.y";
|
||||
|
||||
/* Croatian language file for the DHTML Calendar version 0.9.2
|
||||
* Author Krunoslav Zubrinic <krunoslav.zubrinic@vip.hr>, June 2003.
|
||||
* Feel free to use this script under the terms of the GNU Lesser General
|
||||
* Public License, as long as you do not remove or alter this notice.
|
||||
*/
|
||||
Calendar._DN = new Array
|
||||
("Nedjelja",
|
||||
"Ponedjeljak",
|
||||
"Utorak",
|
||||
"Srijeda",
|
||||
"Četvrtak",
|
||||
"Petak",
|
||||
"Subota",
|
||||
"Nedjelja");
|
||||
Calendar._MN = new Array
|
||||
("Siječanj",
|
||||
"Veljača",
|
||||
"Ožujak",
|
||||
"Travanj",
|
||||
"Svibanj",
|
||||
"Lipanj",
|
||||
"Srpanj",
|
||||
"Kolovoz",
|
||||
"Rujan",
|
||||
"Listopad",
|
||||
"Studeni",
|
||||
"Prosinac");
|
||||
|
||||
// tooltips
|
||||
Calendar._TT = {};
|
||||
Calendar._TT["TOGGLE"] = "Promjeni dan s kojim počinje tjedan";
|
||||
Calendar._TT["PREV_YEAR"] = "Prethodna godina (dugi pritisak za meni)";
|
||||
Calendar._TT["PREV_MONTH"] = "Prethodni mjesec (dugi pritisak za meni)";
|
||||
Calendar._TT["GO_TODAY"] = "Idi na tekući dan";
|
||||
Calendar._TT["NEXT_MONTH"] = "Slijedeći mjesec (dugi pritisak za meni)";
|
||||
Calendar._TT["NEXT_YEAR"] = "Slijedeća godina (dugi pritisak za meni)";
|
||||
Calendar._TT["SEL_DATE"] = "Izaberite datum";
|
||||
Calendar._TT["DRAG_TO_MOVE"] = "Pritisni i povuci za promjenu pozicije";
|
||||
Calendar._TT["PART_TODAY"] = " (today)";
|
||||
Calendar._TT["MON_FIRST"] = "Prikaži ponedjeljak kao prvi dan";
|
||||
Calendar._TT["SUN_FIRST"] = "Prikaži nedjelju kao prvi dan";
|
||||
Calendar._TT["CLOSE"] = "Zatvori";
|
||||
Calendar._TT["TODAY"] = "Danas";
|
||||
|
||||
// date formats
|
||||
Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
|
||||
Calendar._TT["TT_DATE_FORMAT"] = "DD, dd.mm.y";
|
||||
|
||||
Calendar._TT["WK"] = "Tje";
|
||||
@ -1,94 +1,94 @@
|
||||
/* Slovenian language file for the DHTML Calendar version 0.9.2
|
||||
* Author David Milost <mercy@volja.net>, January 2004.
|
||||
* Feel free to use this script under the terms of the GNU Lesser General
|
||||
* Public License, as long as you do not remove or alter this notice.
|
||||
*/
|
||||
// full day names
|
||||
Calendar._DN = new Array
|
||||
("Nedelja",
|
||||
"Ponedeljek",
|
||||
"Torek",
|
||||
"Sreda",
|
||||
"Četrtek",
|
||||
"Petek",
|
||||
"Sobota",
|
||||
"Nedelja");
|
||||
// short day names
|
||||
Calendar._SDN = new Array
|
||||
("Ned",
|
||||
"Pon",
|
||||
"Tor",
|
||||
"Sre",
|
||||
"Čet",
|
||||
"Pet",
|
||||
"Sob",
|
||||
"Ned");
|
||||
// short month names
|
||||
Calendar._SMN = new Array
|
||||
("Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"Maj",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Avg",
|
||||
"Sep",
|
||||
"Okt",
|
||||
"Nov",
|
||||
"Dec");
|
||||
// full month names
|
||||
Calendar._MN = new Array
|
||||
("Januar",
|
||||
"Februar",
|
||||
"Marec",
|
||||
"April",
|
||||
"Maj",
|
||||
"Junij",
|
||||
"Julij",
|
||||
"Avgust",
|
||||
"September",
|
||||
"Oktober",
|
||||
"November",
|
||||
"December");
|
||||
|
||||
// tooltips
|
||||
// tooltips
|
||||
Calendar._TT = {};
|
||||
Calendar._TT["INFO"] = "O koledarju";
|
||||
|
||||
Calendar._TT["ABOUT"] =
|
||||
"DHTML Date/Time Selector\n" +
|
||||
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
||||
"Za zadnjo verzijo pojdine na naslov: http://www.dynarch.com/projects/calendar/\n" +
|
||||
"Distribuirano pod GNU LGPL. Poglejte http://gnu.org/licenses/lgpl.html za podrobnosti." +
|
||||
"\n\n" +
|
||||
"Izbor datuma:\n" +
|
||||
"- Uporabite \xab, \xbb gumbe za izbor leta\n" +
|
||||
"- Uporabite " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gumbe za izbor meseca\n" +
|
||||
"- Zadržite klik na kateremkoli od zgornjih gumbov za hiter izbor.";
|
||||
Calendar._TT["ABOUT_TIME"] = "\n\n" +
|
||||
"Izbor ćasa:\n" +
|
||||
"- Kliknite na katerikoli del ćasa za poveć. le-tega\n" +
|
||||
"- ali Shift-click za zmanj. le-tega\n" +
|
||||
"- ali kliknite in povlecite za hiter izbor.";
|
||||
|
||||
Calendar._TT["TOGGLE"] = "Spremeni dan s katerim se prićne teden";
|
||||
Calendar._TT["PREV_YEAR"] = "Predhodnje leto (dolg klik za meni)";
|
||||
Calendar._TT["PREV_MONTH"] = "Predhodnji mesec (dolg klik za meni)";
|
||||
Calendar._TT["GO_TODAY"] = "Pojdi na tekoći dan";
|
||||
Calendar._TT["NEXT_MONTH"] = "Naslednji mesec (dolg klik za meni)";
|
||||
Calendar._TT["NEXT_YEAR"] = "Naslednje leto (dolg klik za meni)";
|
||||
Calendar._TT["SEL_DATE"] = "Izberite datum";
|
||||
Calendar._TT["DRAG_TO_MOVE"] = "Pritisni in povleci za spremembo pozicije";
|
||||
Calendar._TT["PART_TODAY"] = " (danes)";
|
||||
Calendar._TT["MON_FIRST"] = "Prikaži ponedeljek kot prvi dan";
|
||||
Calendar._TT["SUN_FIRST"] = "Prikaži nedeljo kot prvi dan";
|
||||
Calendar._TT["CLOSE"] = "Zapri";
|
||||
Calendar._TT["TODAY"] = "Danes";
|
||||
|
||||
// date formats
|
||||
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
||||
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
|
||||
|
||||
/* Slovenian language file for the DHTML Calendar version 0.9.2
|
||||
* Author David Milost <mercy@volja.net>, January 2004.
|
||||
* Feel free to use this script under the terms of the GNU Lesser General
|
||||
* Public License, as long as you do not remove or alter this notice.
|
||||
*/
|
||||
// full day names
|
||||
Calendar._DN = new Array
|
||||
("Nedelja",
|
||||
"Ponedeljek",
|
||||
"Torek",
|
||||
"Sreda",
|
||||
"Četrtek",
|
||||
"Petek",
|
||||
"Sobota",
|
||||
"Nedelja");
|
||||
// short day names
|
||||
Calendar._SDN = new Array
|
||||
("Ned",
|
||||
"Pon",
|
||||
"Tor",
|
||||
"Sre",
|
||||
"Čet",
|
||||
"Pet",
|
||||
"Sob",
|
||||
"Ned");
|
||||
// short month names
|
||||
Calendar._SMN = new Array
|
||||
("Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"Maj",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Avg",
|
||||
"Sep",
|
||||
"Okt",
|
||||
"Nov",
|
||||
"Dec");
|
||||
// full month names
|
||||
Calendar._MN = new Array
|
||||
("Januar",
|
||||
"Februar",
|
||||
"Marec",
|
||||
"April",
|
||||
"Maj",
|
||||
"Junij",
|
||||
"Julij",
|
||||
"Avgust",
|
||||
"September",
|
||||
"Oktober",
|
||||
"November",
|
||||
"December");
|
||||
|
||||
// tooltips
|
||||
// tooltips
|
||||
Calendar._TT = {};
|
||||
Calendar._TT["INFO"] = "O koledarju";
|
||||
|
||||
Calendar._TT["ABOUT"] =
|
||||
"DHTML Date/Time Selector\n" +
|
||||
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
||||
"Za zadnjo verzijo pojdine na naslov: http://www.dynarch.com/projects/calendar/\n" +
|
||||
"Distribuirano pod GNU LGPL. Poglejte http://gnu.org/licenses/lgpl.html za podrobnosti." +
|
||||
"\n\n" +
|
||||
"Izbor datuma:\n" +
|
||||
"- Uporabite \xab, \xbb gumbe za izbor leta\n" +
|
||||
"- Uporabite " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gumbe za izbor meseca\n" +
|
||||
"- Zadržite klik na kateremkoli od zgornjih gumbov za hiter izbor.";
|
||||
Calendar._TT["ABOUT_TIME"] = "\n\n" +
|
||||
"Izbor ćasa:\n" +
|
||||
"- Kliknite na katerikoli del ćasa za poveć. le-tega\n" +
|
||||
"- ali Shift-click za zmanj. le-tega\n" +
|
||||
"- ali kliknite in povlecite za hiter izbor.";
|
||||
|
||||
Calendar._TT["TOGGLE"] = "Spremeni dan s katerim se prićne teden";
|
||||
Calendar._TT["PREV_YEAR"] = "Predhodnje leto (dolg klik za meni)";
|
||||
Calendar._TT["PREV_MONTH"] = "Predhodnji mesec (dolg klik za meni)";
|
||||
Calendar._TT["GO_TODAY"] = "Pojdi na tekoći dan";
|
||||
Calendar._TT["NEXT_MONTH"] = "Naslednji mesec (dolg klik za meni)";
|
||||
Calendar._TT["NEXT_YEAR"] = "Naslednje leto (dolg klik za meni)";
|
||||
Calendar._TT["SEL_DATE"] = "Izberite datum";
|
||||
Calendar._TT["DRAG_TO_MOVE"] = "Pritisni in povleci za spremembo pozicije";
|
||||
Calendar._TT["PART_TODAY"] = " (danes)";
|
||||
Calendar._TT["MON_FIRST"] = "Prikaži ponedeljek kot prvi dan";
|
||||
Calendar._TT["SUN_FIRST"] = "Prikaži nedeljo kot prvi dan";
|
||||
Calendar._TT["CLOSE"] = "Zapri";
|
||||
Calendar._TT["TODAY"] = "Danes";
|
||||
|
||||
// date formats
|
||||
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
||||
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
|
||||
|
||||
Calendar._TT["WK"] = "Ted";
|
||||
@ -1,58 +1,58 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Turkish Translation by Nuri AKMAN
|
||||
// Location: Ankara/TURKEY
|
||||
// e-mail : nuriakman@hotmail.com
|
||||
// Date : April, 9 2003
|
||||
//
|
||||
// Note: if Turkish Characters does not shown on you screen
|
||||
// please include falowing line your html code:
|
||||
//
|
||||
// <meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ** I18N
|
||||
Calendar._DN = new Array
|
||||
("Pazar",
|
||||
"Pazartesi",
|
||||
"Salı",
|
||||
"Çarşamba",
|
||||
"Perşembe",
|
||||
"Cuma",
|
||||
"Cumartesi",
|
||||
"Pazar");
|
||||
Calendar._MN = new Array
|
||||
("Ocak",
|
||||
"Şubat",
|
||||
"Mart",
|
||||
"Nisan",
|
||||
"Mayıs",
|
||||
"Haziran",
|
||||
"Temmuz",
|
||||
"Ağustos",
|
||||
"Eylül",
|
||||
"Ekim",
|
||||
"Kasım",
|
||||
"Aralık");
|
||||
|
||||
// tooltips
|
||||
Calendar._TT = {};
|
||||
Calendar._TT["TOGGLE"] = "Haftanın ilk gününü kaydır";
|
||||
Calendar._TT["PREV_YEAR"] = "Önceki Yıl (Menü için basılı tutunuz)";
|
||||
Calendar._TT["PREV_MONTH"] = "Önceki Ay (Menü için basılı tutunuz)";
|
||||
Calendar._TT["GO_TODAY"] = "Bugün'e git";
|
||||
Calendar._TT["NEXT_MONTH"] = "Sonraki Ay (Menü için basılı tutunuz)";
|
||||
Calendar._TT["NEXT_YEAR"] = "Sonraki Yıl (Menü için basılı tutunuz)";
|
||||
Calendar._TT["SEL_DATE"] = "Tarih seçiniz";
|
||||
Calendar._TT["DRAG_TO_MOVE"] = "Taşımak için sürükleyiniz";
|
||||
Calendar._TT["PART_TODAY"] = " (bugün)";
|
||||
Calendar._TT["MON_FIRST"] = "Takvim Pazartesi gününden başlasın";
|
||||
Calendar._TT["SUN_FIRST"] = "Takvim Pazar gününden başlasın";
|
||||
Calendar._TT["CLOSE"] = "Kapat";
|
||||
Calendar._TT["TODAY"] = "Bugün";
|
||||
|
||||
// date formats
|
||||
Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
|
||||
Calendar._TT["TT_DATE_FORMAT"] = "d MM y, DD";
|
||||
|
||||
Calendar._TT["WK"] = "Hafta";
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Turkish Translation by Nuri AKMAN
|
||||
// Location: Ankara/TURKEY
|
||||
// e-mail : nuriakman@hotmail.com
|
||||
// Date : April, 9 2003
|
||||
//
|
||||
// Note: if Turkish Characters does not shown on you screen
|
||||
// please include falowing line your html code:
|
||||
//
|
||||
// <meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ** I18N
|
||||
Calendar._DN = new Array
|
||||
("Pazar",
|
||||
"Pazartesi",
|
||||
"Salı",
|
||||
"Çarşamba",
|
||||
"Perşembe",
|
||||
"Cuma",
|
||||
"Cumartesi",
|
||||
"Pazar");
|
||||
Calendar._MN = new Array
|
||||
("Ocak",
|
||||
"Şubat",
|
||||
"Mart",
|
||||
"Nisan",
|
||||
"Mayıs",
|
||||
"Haziran",
|
||||
"Temmuz",
|
||||
"Ağustos",
|
||||
"Eylül",
|
||||
"Ekim",
|
||||
"Kasım",
|
||||
"Aralık");
|
||||
|
||||
// tooltips
|
||||
Calendar._TT = {};
|
||||
Calendar._TT["TOGGLE"] = "Haftanın ilk gününü kaydır";
|
||||
Calendar._TT["PREV_YEAR"] = "Önceki Yıl (Menü için basılı tutunuz)";
|
||||
Calendar._TT["PREV_MONTH"] = "Önceki Ay (Menü için basılı tutunuz)";
|
||||
Calendar._TT["GO_TODAY"] = "Bugün'e git";
|
||||
Calendar._TT["NEXT_MONTH"] = "Sonraki Ay (Menü için basılı tutunuz)";
|
||||
Calendar._TT["NEXT_YEAR"] = "Sonraki Yıl (Menü için basılı tutunuz)";
|
||||
Calendar._TT["SEL_DATE"] = "Tarih seçiniz";
|
||||
Calendar._TT["DRAG_TO_MOVE"] = "Taşımak için sürükleyiniz";
|
||||
Calendar._TT["PART_TODAY"] = " (bugün)";
|
||||
Calendar._TT["MON_FIRST"] = "Takvim Pazartesi gününden başlasın";
|
||||
Calendar._TT["SUN_FIRST"] = "Takvim Pazar gününden başlasın";
|
||||
Calendar._TT["CLOSE"] = "Kapat";
|
||||
Calendar._TT["TODAY"] = "Bugün";
|
||||
|
||||
// date formats
|
||||
Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
|
||||
Calendar._TT["TT_DATE_FORMAT"] = "d MM y, DD";
|
||||
|
||||
Calendar._TT["WK"] = "Hafta";
|
||||
|
||||
@ -1,123 +1,123 @@
|
||||
// ** I18N
|
||||
|
||||
// Calendar EN language
|
||||
// Author: Mihai Bazon, <mishoo@infoiasi.ro>
|
||||
// Encoding: any
|
||||
// Translator : Niko <nikoused@gmail.com>
|
||||
// Distributed under the same terms as the calendar itself.
|
||||
|
||||
// For translators: please use UTF-8 if possible. We strongly believe that
|
||||
// Unicode is the answer to a real internationalized world. Also please
|
||||
// include your contact information in the header, as can be seen above.
|
||||
|
||||
// full day names
|
||||
Calendar._DN = new Array
|
||||
("\u5468\u65e5",//\u5468\u65e5
|
||||
"\u5468\u4e00",//\u5468\u4e00
|
||||
"\u5468\u4e8c",//\u5468\u4e8c
|
||||
"\u5468\u4e09",//\u5468\u4e09
|
||||
"\u5468\u56db",//\u5468\u56db
|
||||
"\u5468\u4e94",//\u5468\u4e94
|
||||
"\u5468\u516d",//\u5468\u516d
|
||||
"\u5468\u65e5");//\u5468\u65e5
|
||||
|
||||
// Please note that the following array of short day names (and the same goes
|
||||
// for short month names, _SMN) isn't absolutely necessary. We give it here
|
||||
// for exemplification on how one can customize the short day names, but if
|
||||
// they are simply the first N letters of the full name you can simply say:
|
||||
//
|
||||
// Calendar._SDN_len = N; // short day name length
|
||||
// Calendar._SMN_len = N; // short month name length
|
||||
//
|
||||
// If N = 3 then this is not needed either since we assume a value of 3 if not
|
||||
// present, to be compatible with translation files that were written before
|
||||
// this feature.
|
||||
|
||||
// short day names
|
||||
Calendar._SDN = new Array
|
||||
("\u5468\u65e5",
|
||||
"\u5468\u4e00",
|
||||
"\u5468\u4e8c",
|
||||
"\u5468\u4e09",
|
||||
"\u5468\u56db",
|
||||
"\u5468\u4e94",
|
||||
"\u5468\u516d",
|
||||
"\u5468\u65e5");
|
||||
|
||||
// full month names
|
||||
Calendar._MN = new Array
|
||||
("\u4e00\u6708",
|
||||
"\u4e8c\u6708",
|
||||
"\u4e09\u6708",
|
||||
"\u56db\u6708",
|
||||
"\u4e94\u6708",
|
||||
"\u516d\u6708",
|
||||
"\u4e03\u6708",
|
||||
"\u516b\u6708",
|
||||
"\u4e5d\u6708",
|
||||
"\u5341\u6708",
|
||||
"\u5341\u4e00\u6708",
|
||||
"\u5341\u4e8c\u6708");
|
||||
|
||||
// short month names
|
||||
Calendar._SMN = new Array
|
||||
("\u4e00\u6708",
|
||||
"\u4e8c\u6708",
|
||||
"\u4e09\u6708",
|
||||
"\u56db\u6708",
|
||||
"\u4e94\u6708",
|
||||
"\u516d\u6708",
|
||||
"\u4e03\u6708",
|
||||
"\u516b\u6708",
|
||||
"\u4e5d\u6708",
|
||||
"\u5341\u6708",
|
||||
"\u5341\u4e00\u6708",
|
||||
"\u5341\u4e8c\u6708");
|
||||
|
||||
// tooltips
|
||||
Calendar._TT = {};
|
||||
Calendar._TT["INFO"] = "\u5173\u4e8e";
|
||||
|
||||
Calendar._TT["ABOUT"] =
|
||||
" DHTML \u65e5\u8d77/\u65f6\u95f4\u9009\u62e9\u63a7\u4ef6\n" +
|
||||
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
||||
"For latest version visit: \u6700\u65b0\u7248\u672c\u8bf7\u767b\u9646http://www.dynarch.com/projects/calendar/\u5bdf\u770b\n" +
|
||||
"\u9075\u5faaGNU LGPL. \u7ec6\u8282\u53c2\u9605 http://gnu.org/licenses/lgpl.html" +
|
||||
"\n\n" +
|
||||
"\u65e5\u671f\u9009\u62e9:\n" +
|
||||
"- \u70b9\u51fb\xab(\xbb)\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e00\u5e74\u5ea6.\n" +
|
||||
"- \u70b9\u51fb" + String.fromCharCode(0x2039) + "(" + String.fromCharCode(0x203a) + ")\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e2a\u6708\u4efd.\n" +
|
||||
"- \u957f\u65f6\u95f4\u6309\u7740\u6309\u94ae\u5c06\u51fa\u73b0\u66f4\u591a\u9009\u62e9\u9879.";
|
||||
Calendar._TT["ABOUT_TIME"] = "\n\n" +
|
||||
"\u65f6\u95f4\u9009\u62e9:\n" +
|
||||
"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u589e\u52a0\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\n" +
|
||||
"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u6309\u4f4fShift\u952e\u540e\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u51cf\u5c11\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2).";
|
||||
|
||||
Calendar._TT["PREV_YEAR"] = "\u4e0a\u4e00\u5e74";
|
||||
Calendar._TT["PREV_MONTH"] = "\u4e0a\u4e2a\u6708";
|
||||
Calendar._TT["GO_TODAY"] = "\u5230\u4eca\u5929";
|
||||
Calendar._TT["NEXT_MONTH"] = "\u4e0b\u4e2a\u6708";
|
||||
Calendar._TT["NEXT_YEAR"] = "\u4e0b\u4e00\u5e74";
|
||||
Calendar._TT["SEL_DATE"] = "\u9009\u62e9\u65e5\u671f";
|
||||
Calendar._TT["DRAG_TO_MOVE"] = "\u62d6\u52a8";
|
||||
Calendar._TT["PART_TODAY"] = " (\u4eca\u5929)";
|
||||
|
||||
// the following is to inform that "%s" is to be the first day of week
|
||||
// %s will be replaced with the day name.
|
||||
Calendar._TT["DAY_FIRST"] = "%s\u4e3a\u8fd9\u5468\u7684\u7b2c\u4e00\u5929";
|
||||
|
||||
// This may be locale-dependent. It specifies the week-end days, as an array
|
||||
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
|
||||
// means Monday, etc.
|
||||
Calendar._TT["WEEKEND"] = "0,6";
|
||||
|
||||
Calendar._TT["CLOSE"] = "\u5173\u95ed";
|
||||
Calendar._TT["TODAY"] = "\u4eca\u5929";
|
||||
Calendar._TT["TIME_PART"] = "(\u6309\u7740Shift\u952e)\u5355\u51fb\u6216\u62d6\u52a8\u6539\u53d8\u503c";
|
||||
|
||||
// date formats
|
||||
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
||||
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e\u65e5";
|
||||
|
||||
Calendar._TT["WK"] = "\u5468";
|
||||
Calendar._TT["TIME"] = "\u65f6\u95f4:";
|
||||
// ** I18N
|
||||
|
||||
// Calendar EN language
|
||||
// Author: Mihai Bazon, <mishoo@infoiasi.ro>
|
||||
// Encoding: any
|
||||
// Translator : Niko <nikoused@gmail.com>
|
||||
// Distributed under the same terms as the calendar itself.
|
||||
|
||||
// For translators: please use UTF-8 if possible. We strongly believe that
|
||||
// Unicode is the answer to a real internationalized world. Also please
|
||||
// include your contact information in the header, as can be seen above.
|
||||
|
||||
// full day names
|
||||
Calendar._DN = new Array
|
||||
("\u5468\u65e5",//\u5468\u65e5
|
||||
"\u5468\u4e00",//\u5468\u4e00
|
||||
"\u5468\u4e8c",//\u5468\u4e8c
|
||||
"\u5468\u4e09",//\u5468\u4e09
|
||||
"\u5468\u56db",//\u5468\u56db
|
||||
"\u5468\u4e94",//\u5468\u4e94
|
||||
"\u5468\u516d",//\u5468\u516d
|
||||
"\u5468\u65e5");//\u5468\u65e5
|
||||
|
||||
// Please note that the following array of short day names (and the same goes
|
||||
// for short month names, _SMN) isn't absolutely necessary. We give it here
|
||||
// for exemplification on how one can customize the short day names, but if
|
||||
// they are simply the first N letters of the full name you can simply say:
|
||||
//
|
||||
// Calendar._SDN_len = N; // short day name length
|
||||
// Calendar._SMN_len = N; // short month name length
|
||||
//
|
||||
// If N = 3 then this is not needed either since we assume a value of 3 if not
|
||||
// present, to be compatible with translation files that were written before
|
||||
// this feature.
|
||||
|
||||
// short day names
|
||||
Calendar._SDN = new Array
|
||||
("\u5468\u65e5",
|
||||
"\u5468\u4e00",
|
||||
"\u5468\u4e8c",
|
||||
"\u5468\u4e09",
|
||||
"\u5468\u56db",
|
||||
"\u5468\u4e94",
|
||||
"\u5468\u516d",
|
||||
"\u5468\u65e5");
|
||||
|
||||
// full month names
|
||||
Calendar._MN = new Array
|
||||
("\u4e00\u6708",
|
||||
"\u4e8c\u6708",
|
||||
"\u4e09\u6708",
|
||||
"\u56db\u6708",
|
||||
"\u4e94\u6708",
|
||||
"\u516d\u6708",
|
||||
"\u4e03\u6708",
|
||||
"\u516b\u6708",
|
||||
"\u4e5d\u6708",
|
||||
"\u5341\u6708",
|
||||
"\u5341\u4e00\u6708",
|
||||
"\u5341\u4e8c\u6708");
|
||||
|
||||
// short month names
|
||||
Calendar._SMN = new Array
|
||||
("\u4e00\u6708",
|
||||
"\u4e8c\u6708",
|
||||
"\u4e09\u6708",
|
||||
"\u56db\u6708",
|
||||
"\u4e94\u6708",
|
||||
"\u516d\u6708",
|
||||
"\u4e03\u6708",
|
||||
"\u516b\u6708",
|
||||
"\u4e5d\u6708",
|
||||
"\u5341\u6708",
|
||||
"\u5341\u4e00\u6708",
|
||||
"\u5341\u4e8c\u6708");
|
||||
|
||||
// tooltips
|
||||
Calendar._TT = {};
|
||||
Calendar._TT["INFO"] = "\u5173\u4e8e";
|
||||
|
||||
Calendar._TT["ABOUT"] =
|
||||
" DHTML \u65e5\u8d77/\u65f6\u95f4\u9009\u62e9\u63a7\u4ef6\n" +
|
||||
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
||||
"For latest version visit: \u6700\u65b0\u7248\u672c\u8bf7\u767b\u9646http://www.dynarch.com/projects/calendar/\u5bdf\u770b\n" +
|
||||
"\u9075\u5faaGNU LGPL. \u7ec6\u8282\u53c2\u9605 http://gnu.org/licenses/lgpl.html" +
|
||||
"\n\n" +
|
||||
"\u65e5\u671f\u9009\u62e9:\n" +
|
||||
"- \u70b9\u51fb\xab(\xbb)\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e00\u5e74\u5ea6.\n" +
|
||||
"- \u70b9\u51fb" + String.fromCharCode(0x2039) + "(" + String.fromCharCode(0x203a) + ")\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e2a\u6708\u4efd.\n" +
|
||||
"- \u957f\u65f6\u95f4\u6309\u7740\u6309\u94ae\u5c06\u51fa\u73b0\u66f4\u591a\u9009\u62e9\u9879.";
|
||||
Calendar._TT["ABOUT_TIME"] = "\n\n" +
|
||||
"\u65f6\u95f4\u9009\u62e9:\n" +
|
||||
"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u589e\u52a0\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\n" +
|
||||
"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u6309\u4f4fShift\u952e\u540e\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u51cf\u5c11\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2).";
|
||||
|
||||
Calendar._TT["PREV_YEAR"] = "\u4e0a\u4e00\u5e74";
|
||||
Calendar._TT["PREV_MONTH"] = "\u4e0a\u4e2a\u6708";
|
||||
Calendar._TT["GO_TODAY"] = "\u5230\u4eca\u5929";
|
||||
Calendar._TT["NEXT_MONTH"] = "\u4e0b\u4e2a\u6708";
|
||||
Calendar._TT["NEXT_YEAR"] = "\u4e0b\u4e00\u5e74";
|
||||
Calendar._TT["SEL_DATE"] = "\u9009\u62e9\u65e5\u671f";
|
||||
Calendar._TT["DRAG_TO_MOVE"] = "\u62d6\u52a8";
|
||||
Calendar._TT["PART_TODAY"] = " (\u4eca\u5929)";
|
||||
|
||||
// the following is to inform that "%s" is to be the first day of week
|
||||
// %s will be replaced with the day name.
|
||||
Calendar._TT["DAY_FIRST"] = "%s\u4e3a\u8fd9\u5468\u7684\u7b2c\u4e00\u5929";
|
||||
|
||||
// This may be locale-dependent. It specifies the week-end days, as an array
|
||||
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
|
||||
// means Monday, etc.
|
||||
Calendar._TT["WEEKEND"] = "0,6";
|
||||
|
||||
Calendar._TT["CLOSE"] = "\u5173\u95ed";
|
||||
Calendar._TT["TODAY"] = "\u4eca\u5929";
|
||||
Calendar._TT["TIME_PART"] = "(\u6309\u7740Shift\u952e)\u5355\u51fb\u6216\u62d6\u52a8\u6539\u53d8\u503c";
|
||||
|
||||
// date formats
|
||||
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
||||
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e\u65e5";
|
||||
|
||||
Calendar._TT["WK"] = "\u5468";
|
||||
Calendar._TT["TIME"] = "\u65f6\u95f4:";
|
||||
|
||||
@ -569,7 +569,7 @@ if ($socid > 0)
|
||||
print '<td align="right" width="80">'.dol_print_date($db->jdate($objp->dc),'day')."</td>\n";
|
||||
print '<td width="20"> </td>';
|
||||
print '<td align="right" nowrap="nowrap">';
|
||||
$contrat->fetch_lines();
|
||||
$contrat->fetch_lignes();
|
||||
print $contrat->getLibStatut(4);
|
||||
print "</td>\n";
|
||||
print '</tr>';
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/comm/propal/class/actions_proposal.class.php
|
||||
* \file htdocs/comm/propal/actions_proposal.class.php
|
||||
* \ingroup proposal
|
||||
* \brief Fichier de la classe des actions des propales
|
||||
* \version $Id$
|
||||
@ -43,18 +43,6 @@ class ActionsProposal extends ActionsCommonObject
|
||||
{
|
||||
$this->db = $DB;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Load a proposal from database and its ligne array
|
||||
* \param rowid id of object to load
|
||||
* \param ref Ref of proposal
|
||||
* \return int >0 if OK, <0 if KO
|
||||
*/
|
||||
function fetch($rowid,$ref='')
|
||||
{
|
||||
$this->object = new Propal($this->db);
|
||||
return $this->object->fetch($rowid,$ref);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1066,8 +1066,7 @@ class Commande extends CommonObject
|
||||
$this->date_livraison = $this->db->jdate($obj->date_livraison);
|
||||
$this->fk_delivery_address = $obj->fk_adresse_livraison;
|
||||
$this->propale_id = $obj->fk_source;
|
||||
|
||||
$this->lines = array();
|
||||
$this->lignes = array();
|
||||
|
||||
if ($this->statut == 0) $this->brouillon = 1;
|
||||
|
||||
@ -1197,6 +1196,7 @@ class Commande extends CommonObject
|
||||
*/
|
||||
function fetch_lines($only_product=0)
|
||||
{
|
||||
$this->lignes=array(); // deprecated
|
||||
$this->lines=array();
|
||||
|
||||
$sql = 'SELECT l.rowid, l.fk_product, l.product_type, l.fk_commande, l.description, l.price, l.qty, l.tva_tx,';
|
||||
@ -1257,8 +1257,8 @@ class Commande extends CommonObject
|
||||
$line->date_start = $this->db->jdate($objp->date_start);
|
||||
$line->date_end = $this->db->jdate($objp->date_end);
|
||||
|
||||
$this->lignes[$i] = $line; // For backward compatibility
|
||||
$this->lines[$i] = $line;
|
||||
|
||||
$i++;
|
||||
}
|
||||
$this->db->free($result);
|
||||
@ -1281,9 +1281,9 @@ class Commande extends CommonObject
|
||||
function getNbOfProductsLines()
|
||||
{
|
||||
$nb=0;
|
||||
foreach($this->lines as $line)
|
||||
foreach($this->lines as $ligne)
|
||||
{
|
||||
if ($line->fk_product_type == 0) $nb++;
|
||||
if ($ligne->fk_product_type == 0) $nb++;
|
||||
}
|
||||
return $nb;
|
||||
}
|
||||
|
||||
@ -695,7 +695,10 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer)
|
||||
$result=$srcobject->fetch($object->origin_id);
|
||||
if ($result > 0)
|
||||
{
|
||||
$lines = $srcobject->lines;
|
||||
// TODO mutualiser
|
||||
$lines = $srcobject->lignes;
|
||||
if (sizeof($srcobject->lines)) $lines = $srcobject->lines;
|
||||
if (empty($lines) && method_exists($srcobject,'fetch_lignes')) $lines = $srcobject->fetch_lignes();
|
||||
if (empty($lines) && method_exists($srcobject,'fetch_lines')) $lines = $srcobject->fetch_lines();
|
||||
|
||||
for ($i = 0 ; $i < sizeof($lines) ; $i++)
|
||||
@ -729,11 +732,7 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer)
|
||||
$lines[$i]->fk_remise_except,
|
||||
'HT',
|
||||
0,
|
||||
$product_type,
|
||||
$lines[$i]->rang,
|
||||
$lines[$i]->special_code,
|
||||
$object->origin,
|
||||
$lines[$i]->rowid
|
||||
$product_type
|
||||
);
|
||||
|
||||
if ($result < 0)
|
||||
@ -1385,28 +1384,27 @@ if ($_GET['action'] == 'create')
|
||||
{
|
||||
$projectid=GETPOST('originid');
|
||||
}
|
||||
else
|
||||
else if (in_array($element,array('order','commande','propal','contrat','contract')))
|
||||
{
|
||||
// For compatibility
|
||||
if ($element == 'commande') { $subelement = 'customerorder'; }
|
||||
if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'proposal'; }
|
||||
if ($element == 'contrat') { $subelement = 'contract'; }
|
||||
if ($element == 'order') { $element = $subelement = 'commande'; }
|
||||
if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; }
|
||||
if ($element == 'contract') { $element = $subelement = 'contrat'; }
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT.'/'.$element.'/class/actions_'.$subelement.'.class.php');
|
||||
$classname = 'Actions'.ucfirst($subelement);
|
||||
require_once(DOL_DOCUMENT_ROOT.'/'.$element.'/class/'.$subelement.'.class.php');
|
||||
$classname = ucfirst($subelement);
|
||||
$objectsrc = new $classname($db);
|
||||
$objectsrc->fetch(GETPOST('originid'));
|
||||
if (empty($objectsrc->object->lines) && method_exists($objectsrc->object,'fetch_lines')) $objectsrc->object->fetch_lines();
|
||||
$objectsrc->object->fetch_thirdparty();
|
||||
|
||||
$projectid = (!empty($objectsrc->object->fk_project)?$object->fk_project:'');
|
||||
$ref_client = (!empty($objectsrc->object->ref_client)?$object->ref_client:'');
|
||||
$objectsrc->fetch_thirdparty();
|
||||
|
||||
$soc = $objectsrc->object->client;
|
||||
$cond_reglement_id = (!empty($objectsrc->object->cond_reglement_id)?$objectsrc->object->cond_reglement_id:(!empty($soc->cond_reglement_id)?$soc->cond_reglement_id:1));
|
||||
$mode_reglement_id = (!empty($objectsrc->object->mode_reglement_id)?$objectsrc->object->mode_reglement_id:(!empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0));
|
||||
$remise_percent = (!empty($objectsrc->object->remise_percent)?$objectsrc->object->remise_percent:(!empty($soc->remise_percent)?$soc->remise_percent:0));
|
||||
$remise_absolue = (!empty($objectsrc->object->remise_absolue)?$objectsrc->object->remise_absolue:(!empty($soc->remise_absolue)?$soc->remise_absolue:0));
|
||||
$projectid = (!empty($objectsrc->fk_project)?$object->fk_project:'');
|
||||
$ref_client = (!empty($objectsrc->ref_client)?$object->ref_client:'');
|
||||
|
||||
$soc = $objectsrc->client;
|
||||
$cond_reglement_id = (!empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(!empty($soc->cond_reglement_id)?$soc->cond_reglement_id:1));
|
||||
$mode_reglement_id = (!empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(!empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0));
|
||||
$remise_percent = (!empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(!empty($soc->remise_percent)?$soc->remise_percent:0));
|
||||
$remise_absolue = (!empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(!empty($soc->remise_absolue)?$soc->remise_absolue:0));
|
||||
$dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0;
|
||||
}
|
||||
}
|
||||
@ -1658,7 +1656,7 @@ if ($_GET['action'] == 'create')
|
||||
print '<textarea name="note_public" wrap="soft" cols="70" rows="'.ROWS_3.'">';
|
||||
if (is_object($objectsrc)) // Take value from source object
|
||||
{
|
||||
print $objectsrc->object->note_public;
|
||||
print $objectsrc->note_public;
|
||||
}
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
@ -1671,7 +1669,7 @@ if ($_GET['action'] == 'create')
|
||||
print '<textarea name="note" wrap="soft" cols="70" rows="'.ROWS_3.'">';
|
||||
if (is_object($objectsrc)) // Take value from source object
|
||||
{
|
||||
print $objectsrc->object->note;
|
||||
print $objectsrc->note;
|
||||
}
|
||||
print '</textarea></td></tr>';
|
||||
}
|
||||
@ -1682,35 +1680,35 @@ if ($_GET['action'] == 'create')
|
||||
if ($_GET['origin'] == 'contrat')
|
||||
{
|
||||
// Calcul contrat->price (HT), contrat->total (TTC), contrat->tva
|
||||
$objectsrc->object->remise_absolue=$remise_absolue;
|
||||
$objectsrc->object->remise_percent=$remise_percent;
|
||||
$objectsrc->object->update_price();
|
||||
$objectsrc->remise_absolue=$remise_absolue;
|
||||
$objectsrc->remise_percent=$remise_percent;
|
||||
$objectsrc->update_price();
|
||||
}
|
||||
|
||||
print "\n<!-- ".$classname." info -->";
|
||||
print "\n";
|
||||
print '<input type="hidden" name="amount" value="'.$objectsrc->object->total_ht.'">'."\n";
|
||||
print '<input type="hidden" name="total" value="'.$objectsrc->object->total_ttc.'">'."\n";
|
||||
print '<input type="hidden" name="tva" value="'.$objectsrc->object->total_tva.'">'."\n";
|
||||
print '<input type="hidden" name="origin" value="'.$objectsrc->object->element.'">';
|
||||
print '<input type="hidden" name="originid" value="'.$objectsrc->object->id.'">';
|
||||
print '<input type="hidden" name="amount" value="'.$objectsrc->total_ht.'">'."\n";
|
||||
print '<input type="hidden" name="total" value="'.$objectsrc->total_ttc.'">'."\n";
|
||||
print '<input type="hidden" name="tva" value="'.$objectsrc->total_tva.'">'."\n";
|
||||
print '<input type="hidden" name="origin" value="'.$objectsrc->element.'">';
|
||||
print '<input type="hidden" name="originid" value="'.$objectsrc->id.'">';
|
||||
|
||||
print '<tr><td>'.$langs->trans($classname).'</td><td colspan="2">'.$objectsrc->object->getNomUrl(1).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('TotalHT').'</td><td colspan="2">'.price($objectsrc->object->total_ht).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('TotalVAT').'</td><td colspan="2">'.price($objectsrc->object->total_tva)."</td></tr>";
|
||||
print '<tr><td>'.$langs->trans($classname).'</td><td colspan="2">'.$objectsrc->getNomUrl(1).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('TotalHT').'</td><td colspan="2">'.price($objectsrc->total_ht).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('TotalVAT').'</td><td colspan="2">'.price($objectsrc->total_tva)."</td></tr>";
|
||||
if ($mysoc->pays_code=='ES')
|
||||
{
|
||||
if ($mysoc->localtax1_assuj=="1") //Localtax1 RE
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->pays_code).'</td><td colspan="2">'.price($objectsrc->object->total_localtax1)."</td></tr>";
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->pays_code).'</td><td colspan="2">'.price($objectsrc->total_localtax1)."</td></tr>";
|
||||
}
|
||||
|
||||
if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->pays_code).'</td><td colspan="2">'.price($objectsrc->object->total_localtax2)."</td></tr>";
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->pays_code).'</td><td colspan="2">'.price($objectsrc->total_localtax2)."</td></tr>";
|
||||
}
|
||||
}
|
||||
print '<tr><td>'.$langs->trans('TotalTTC').'</td><td colspan="2">'.price($objectsrc->object->total_ttc)."</td></tr>";
|
||||
print '<tr><td>'.$langs->trans('TotalTTC').'</td><td colspan="2">'.price($objectsrc->total_ttc)."</td></tr>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1776,18 +1774,155 @@ if ($_GET['action'] == 'create')
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
// Try to read line from origin
|
||||
$sql='';
|
||||
|
||||
// View origin lines
|
||||
if (is_object($objectsrc))
|
||||
// TODO deplacer dans la classe
|
||||
if ($_GET['origin'] == 'propal')
|
||||
{
|
||||
//$objectsrc->printOriginLinesList();
|
||||
|
||||
$title=$langs->trans('ProductsAndServices');
|
||||
|
||||
$sql = 'SELECT pt.rowid, pt.description, pt.fk_remise_except,';
|
||||
$sql.= ' pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice, pt.product_type, pt.info_bits,';
|
||||
$sql.= ' p.label as product, p.ref, p.fk_product_type, p.rowid as prodid';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'propaldet as pt';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pt.fk_product = p.rowid';
|
||||
$sql.= ' WHERE pt.fk_propal = '.$objectsrc->id;
|
||||
$sql.= ' ORDER BY pt.rang ASC, pt.rowid';
|
||||
}
|
||||
// TODO deplacer dans la classe
|
||||
if ($_GET['origin'] == 'commande')
|
||||
{
|
||||
$title=$langs->trans('Products');
|
||||
|
||||
$sql = 'SELECT pt.rowid, pt.description, pt.fk_remise_except,';
|
||||
$sql.= ' pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice, pt.product_type, pt.info_bits,';
|
||||
$sql.= ' pt.date_start as date_debut_prevue, pt.date_end as date_fin_prevue,';
|
||||
$sql.= ' p.label as product, p.ref, p.fk_product_type, p.rowid as prodid';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'commandedet as pt';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pt.fk_product = p.rowid';
|
||||
$sql.= ' WHERE pt.fk_commande = '.$objectsrc->id;
|
||||
$sql.= ' ORDER BY pt.rowid ASC';
|
||||
}
|
||||
// TODO deplacer dans la classe
|
||||
if ($_GET['origin'] == 'contrat')
|
||||
{
|
||||
$title=$langs->trans('Services');
|
||||
|
||||
$sql = 'SELECT pt.rowid, pt.description,';
|
||||
$sql.= ' pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice, pt.info_bits,';
|
||||
$sql.= ' pt.date_ouverture_prevue as date_debut_prevue, pt.date_ouverture as date_debut_reel,';
|
||||
$sql.= ' pt.date_fin_validite as date_fin_prevue, pt.date_cloture as date_fin_reel,';
|
||||
$sql.= ' p.label as product, p.ref, p.fk_product_type, p.rowid as prodid';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'contratdet as pt';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pt.fk_product = p.rowid';
|
||||
$sql.= ' WHERE pt.fk_contrat = '.$objectsrc->id;
|
||||
$sql.= ' ORDER BY pt.rowid ASC';
|
||||
}
|
||||
|
||||
if ($sql)
|
||||
{
|
||||
print '<br>';
|
||||
print_titre($title);
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
$objectsrc->printOriginTitleList();
|
||||
$objectsrc->printOriginLinesList($object);
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans('Ref').'</td>';
|
||||
print '<td>'.$langs->trans('Description').'</td>';
|
||||
print '<td align="right">'.$langs->trans('VAT').'</td>';
|
||||
print '<td align="right">'.$langs->trans('PriceUHT').'</td>';
|
||||
print '<td align="right">'.$langs->trans('Qty').'</td>';
|
||||
print '<td align="right">'.$langs->trans('ReductionShort').'</td></tr>';
|
||||
|
||||
// Lignes
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
|
||||
$date_start=$objp->date_debut_prevue;
|
||||
if ($objp->date_debut_reel) $date_start=$objp->date_debut_reel;
|
||||
$date_end=$objp->date_fin_prevue;
|
||||
if ($objp->date_fin_reel) $date_end=$objp->date_fin_reel;
|
||||
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
if (($objp->info_bits & 2) == 2)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$propal->socid.'">';
|
||||
print img_object($langs->trans("ShowReduc"),'reduc').' '.$langs->trans("Discount");
|
||||
print '</a>';
|
||||
}
|
||||
else if ($objp->prodid)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->prodid.'">';
|
||||
print ($objp->fk_product_type == 1 ? img_object($langs->trans(''),'service') : img_object($langs->trans(''),'product'));
|
||||
print ' '.$objp->ref.'</a>';
|
||||
print $objp->product?' - '.$objp->product:'';
|
||||
// Dates
|
||||
if ($date_start || $date_end)
|
||||
{
|
||||
print_date_range($date_start,$date_end);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print ($objp->product_type == -1 ? ' ' : ($objp->product_type == 1 ? img_object($langs->trans(''),'service') : img_object($langs->trans(''),'product')));
|
||||
// Dates
|
||||
if ($date_start || $date_end)
|
||||
{
|
||||
print_date_range($date_start,$date_end);
|
||||
}
|
||||
}
|
||||
print "</td>\n";
|
||||
print '<td>';
|
||||
if ($objp->description)
|
||||
{
|
||||
if ($objp->description == '(CREDIT_NOTE)')
|
||||
{
|
||||
$discount=new DiscountAbsolute($db);
|
||||
$discount->fetch($objp->fk_remise_except);
|
||||
print $langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl(0));
|
||||
}
|
||||
elseif ($obj->description == '(DEPOSIT)')
|
||||
{
|
||||
$discount=new DiscountAbsolute($db);
|
||||
$discount->fetch($objp->fk_remise_except);
|
||||
print $langs->transnoentities("DiscountFromDeposit",$discount->getNomUrl(0));
|
||||
}
|
||||
else
|
||||
{
|
||||
print dol_trunc($objp->description,60);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print ' ';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td align="right">'.vatrate($objp->tva_tx).'%</td>';
|
||||
print '<td align="right">'.price($objp->subprice).'</td>';
|
||||
print '<td align="right">';
|
||||
print (($objp->info_bits & 2) != 2) ? $objp->qty : ' ';
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print (($objp->info_bits & 2) != 2) ? $objp->remise_percent.'%' : ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
@ -66,6 +66,7 @@ class FactureRec extends Facture
|
||||
var $rang;
|
||||
var $special_code;
|
||||
|
||||
var $lignes=array(); // TODO deprecated
|
||||
var $lines=array();
|
||||
|
||||
|
||||
@ -141,7 +142,7 @@ class FactureRec extends Facture
|
||||
/*
|
||||
* Lines
|
||||
*/
|
||||
for ($i = 0 ; $i < sizeof($facsrc->lines) ; $i++)
|
||||
for ($i = 0 ; $i < sizeof($facsrc->lignes) ; $i++)
|
||||
{
|
||||
$result_insert = $this->addline($this->id,
|
||||
$facsrc->lines[$i]->desc,
|
||||
@ -303,7 +304,7 @@ class FactureRec extends Facture
|
||||
|
||||
|
||||
/**
|
||||
* \brief Recupere les lignes de factures predefinies dans this->lines
|
||||
* \brief Recupere les lignes de factures predefinies dans this->lignes
|
||||
* \return int 1 if OK, < 0 if KO
|
||||
*/
|
||||
function fetch_lines()
|
||||
@ -358,6 +359,7 @@ class FactureRec extends Facture
|
||||
$line->price = $objp->price;
|
||||
$line->remise = $objp->remise;
|
||||
|
||||
$this->lignes[$i] = $line; // TODO deprecated
|
||||
$this->lines[$i] = $line;
|
||||
|
||||
$i++;
|
||||
|
||||
@ -98,6 +98,7 @@ class Facture extends CommonObject
|
||||
var $mode_reglement_code; // Code in llx_c_paiement
|
||||
var $modelpdf;
|
||||
var $products=array(); // TODO deprecated
|
||||
var $lignes=array(); // TODO deprecated
|
||||
var $lines=array();
|
||||
var $line;
|
||||
//! Pour board
|
||||
@ -707,6 +708,7 @@ class Facture extends CommonObject
|
||||
* Lines
|
||||
*/
|
||||
|
||||
$this->lignes = array(); // deprecated
|
||||
$this->lines = array();
|
||||
|
||||
$result=$this->fetch_lines();
|
||||
@ -735,7 +737,7 @@ class Facture extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* \brief Recupere les lignes de factures dans this->lines
|
||||
* \brief Recupere les lignes de factures dans this->lignes
|
||||
* \return int 1 if OK, < 0 if KO
|
||||
*/
|
||||
function fetch_lines()
|
||||
@ -796,6 +798,7 @@ class Facture extends CommonObject
|
||||
$line->price = $objp->price;
|
||||
$line->remise = $objp->remise;
|
||||
|
||||
$this->lignes[$i] = $line; // TODO deprecated
|
||||
$this->lines[$i] = $line;
|
||||
|
||||
$i++;
|
||||
@ -1499,14 +1502,14 @@ class Facture extends CommonObject
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php");
|
||||
|
||||
// Loop on each line
|
||||
for ($i = 0 ; $i < sizeof($this->lines) ; $i++)
|
||||
for ($i = 0 ; $i < sizeof($this->lignes) ; $i++)
|
||||
{
|
||||
if ($this->lines[$i]->fk_product > 0 && $this->lines[$i]->product_type == 0)
|
||||
if ($this->lignes[$i]->fk_product > 0 && $this->lignes[$i]->product_type == 0)
|
||||
{
|
||||
$mouvP = new MouvementStock($this->db);
|
||||
// We decrease stock for product
|
||||
$entrepot_id = "1"; // TODO ajouter possibilite de choisir l'entrepot
|
||||
$result=$mouvP->livraison($user, $this->lines[$i]->fk_product, $entrepot_id, $this->lines[$i]->qty, $this->lines[$i]->subprice);
|
||||
$result=$mouvP->livraison($user, $this->lignes[$i]->fk_product, $entrepot_id, $this->lignes[$i]->qty, $this->lignes[$i]->subprice);
|
||||
if ($result < 0) { $error++; }
|
||||
}
|
||||
}
|
||||
@ -1607,14 +1610,14 @@ class Facture extends CommonObject
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php");
|
||||
|
||||
for ($i = 0 ; $i < sizeof($this->lines) ; $i++)
|
||||
for ($i = 0 ; $i < sizeof($this->lignes) ; $i++)
|
||||
{
|
||||
if ($this->lines[$i]->fk_product && $this->lines[$i]->product_type == 0)
|
||||
if ($this->lignes[$i]->fk_product && $this->lignes[$i]->product_type == 0)
|
||||
{
|
||||
$mouvP = new MouvementStock($this->db);
|
||||
// We decrease stock for product
|
||||
$entrepot_id = "1"; // TODO ajouter possibilite de choisir l'entrepot
|
||||
$result=$mouvP->reception($user, $this->lines[$i]->fk_product, $entrepot_id, $this->lines[$i]->qty, $this->lines[$i]->subprice);
|
||||
$result=$mouvP->reception($user, $this->lignes[$i]->fk_product, $entrepot_id, $this->lignes[$i]->qty, $this->lignes[$i]->subprice);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1665,7 +1668,7 @@ class Facture extends CommonObject
|
||||
* par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,produit)
|
||||
* et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue)
|
||||
*/
|
||||
function addline($facid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $origin='', $origin_id=0)
|
||||
function addline($facid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=0, $rang=-1, $special_code=0)
|
||||
{
|
||||
dol_syslog("Facture::Addline facid=$facid,desc=$desc,pu_ht=$pu_ht,qty=$qty,txtva=$txtva, txlocaltax1=$txlocaltax1, txlocaltax2=$txlocaltax2, fk_product=$fk_product,remise_percent=$remise_percent,date_start=$date_start,date_end=$date_end,ventil=$ventil,info_bits=$info_bits,fk_remise_except=$fk_remise_except,price_base_type=$price_base_type,pu_ttc=$pu_ttc,type=$type", LOG_DEBUG);
|
||||
include_once(DOL_DOCUMENT_ROOT.'/lib/price.lib.php');
|
||||
@ -1763,8 +1766,6 @@ class Facture extends CommonObject
|
||||
$this->line->total_localtax2=($this->type==2?-1:1)*$total_localtax2;
|
||||
$this->line->total_ttc=($this->type==2?-1:1)*$total_ttc;
|
||||
$this->line->special_code=$special_code;
|
||||
$this->line->origin=$origin;
|
||||
$this->line->origin_id=$origin_id;
|
||||
|
||||
// \TODO Ne plus utiliser
|
||||
$this->line->price=($this->type==2?-1:1)*$price;
|
||||
@ -1791,7 +1792,7 @@ class Facture extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->line->error;
|
||||
$this->error=$ligne->error;
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
@ -2535,9 +2536,9 @@ class Facture extends CommonObject
|
||||
{
|
||||
// On verifie si les lignes de factures ont ete exportees en compta et/ou ventilees
|
||||
$ventilExportCompta = 0 ;
|
||||
for ($i = 0 ; $i < sizeof($this->lines) ; $i++)
|
||||
for ($i = 0 ; $i < sizeof($this->lignes) ; $i++)
|
||||
{
|
||||
if ($this->lines[$i]->export_compta <> 0 && $this->lines[$i]->code_ventilation <> 0)
|
||||
if ($this->lignes[$i]->export_compta <> 0 && $this->lignes[$i]->code_ventilation <> 0)
|
||||
{
|
||||
$ventilExportCompta++;
|
||||
}
|
||||
@ -3060,9 +3061,6 @@ class FactureLigne
|
||||
// 1: frais de port
|
||||
// 2: ecotaxe
|
||||
// 3: ??
|
||||
|
||||
var $origin;
|
||||
var $origin_id;
|
||||
|
||||
//! Total HT de la ligne toute quantite et incluant la remise ligne
|
||||
var $total_ht;
|
||||
|
||||
@ -411,7 +411,7 @@ else
|
||||
print '<td align="center">'.$langs->trans("ReductionShort").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Qty").'</td></tr>';
|
||||
|
||||
$num = sizeof($fac->lines);
|
||||
$num = sizeof($fac->lignes);
|
||||
$i = 0;
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
@ -421,7 +421,7 @@ else
|
||||
$product_static=new Product($db);
|
||||
|
||||
// Show product and description
|
||||
$type=$fac->lines[$i]->product_type?$fac->lines[$i]->product_type:$fac->lines[$i]->fk_product_type;
|
||||
$type=$fac->lignes[$i]->product_type?$fac->lignes[$i]->product_type:$fac->lignes[$i]->fk_product_type;
|
||||
// Try to enhance type detection using date_start and date_end for free lines when type
|
||||
// was not saved.
|
||||
if (! empty($objp->date_start)) $type=1;
|
||||
@ -429,26 +429,26 @@ else
|
||||
|
||||
// Show line
|
||||
print "<tr $bc[$var]>";
|
||||
if ($fac->lines[$i]->fk_product > 0)
|
||||
if ($fac->lignes[$i]->fk_product > 0)
|
||||
{
|
||||
print '<td>';
|
||||
print '<a name="'.$fac->lines[$i]->id.'"></a>'; // ancre pour retourner sur la ligne
|
||||
print '<a name="'.$fac->lignes[$i]->id.'"></a>'; // ancre pour retourner sur la ligne
|
||||
|
||||
// Show product and description
|
||||
$product_static->type=$fac->lines[$i]->fk_product_type;
|
||||
$product_static->id=$fac->lines[$i]->fk_product;
|
||||
$product_static->ref=$fac->lines[$i]->product_ref;
|
||||
$product_static->libelle=$fac->lines[$i]->libelle;
|
||||
$product_static->type=$fac->lignes[$i]->fk_product_type;
|
||||
$product_static->id=$fac->lignes[$i]->fk_product;
|
||||
$product_static->ref=$fac->lignes[$i]->product_ref;
|
||||
$product_static->libelle=$fac->lignes[$i]->libelle;
|
||||
$text=$product_static->getNomUrl(1);
|
||||
$text.= ' - '.$fac->lines[$i]->libelle;
|
||||
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($fac->lines[$i]->desc));
|
||||
$text.= ' - '.$fac->lignes[$i]->libelle;
|
||||
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($fac->lignes[$i]->desc));
|
||||
print $html->textwithtooltip($text,$description,3,'','',$i);
|
||||
|
||||
// Show range
|
||||
print_date_range($fac->lines[$i]->date_start,$fac->lines[$i]->date_end);
|
||||
print_date_range($fac->lignes[$i]->date_start,$fac->lignes[$i]->date_end);
|
||||
|
||||
// Add description in form
|
||||
if ($conf->global->PRODUIT_DESC_IN_FORM) print ($fac->lines[$i]->desc && $fac->lines[$i]->desc!=$fac->lines[$i]->libelle)?'<br>'.dol_htmlentitiesbr($fac->lines[$i]->desc):'';
|
||||
if ($conf->global->PRODUIT_DESC_IN_FORM) print ($fac->lignes[$i]->desc && $fac->lignes[$i]->desc!=$fac->lignes[$i]->libelle)?'<br>'.dol_htmlentitiesbr($fac->lignes[$i]->desc):'';
|
||||
|
||||
print '</td>';
|
||||
}
|
||||
@ -458,16 +458,16 @@ else
|
||||
|
||||
if ($type==1) $text = img_object($langs->trans('Service'),'service');
|
||||
else $text = img_object($langs->trans('Product'),'product');
|
||||
print $text.' '.nl2br($fac->lines[$i]->desc);
|
||||
print $text.' '.nl2br($fac->lignes[$i]->desc);
|
||||
|
||||
// Show range
|
||||
print_date_range($fac->lines[$i]->date_start,$fac->lines[$i]->date_end);
|
||||
print_date_range($fac->lignes[$i]->date_start,$fac->lignes[$i]->date_end);
|
||||
|
||||
print '</td>';
|
||||
}
|
||||
print "<td align=\"right\">".price($fac->lines[$i]->price)."</td>";
|
||||
print '<td align="center">'.$fac->lines[$i]->remise_percent.' %</td>';
|
||||
print "<td align=\"center\">".$fac->lines[$i]->qty."</td></tr>\n";
|
||||
print "<td align=\"right\">".price($fac->lignes[$i]->price)."</td>";
|
||||
print '<td align="center">'.$fac->lignes[$i]->remise_percent.' %</td>';
|
||||
print "<td align=\"center\">".$fac->lignes[$i]->qty."</td></tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
@ -96,20 +96,20 @@ class BonPrelevement extends CommonObject
|
||||
function AddFacture($facture_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number)
|
||||
{
|
||||
$result = 0;
|
||||
$line_id = 0;
|
||||
$ligne_id = 0;
|
||||
|
||||
$result = $this->AddLigne($line_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number);
|
||||
$result = $this->AddLigne($ligne_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number);
|
||||
|
||||
if ($result == 0)
|
||||
{
|
||||
if ($line_id > 0)
|
||||
if ($ligne_id > 0)
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_facture (";
|
||||
$sql.= "fk_facture";
|
||||
$sql.= ",fk_prelevement_lignes";
|
||||
$sql.= ") VALUES (";
|
||||
$sql.= $facture_id;
|
||||
$sql.= ", ".$line_id;
|
||||
$sql.= ", ".$ligne_id;
|
||||
$sql.= ")";
|
||||
|
||||
if ($this->db->query($sql))
|
||||
@ -149,7 +149,7 @@ class BonPrelevement extends CommonObject
|
||||
* @param number bank account number
|
||||
* @return int >0 if OK, <0 if KO
|
||||
*/
|
||||
function AddLigne(&$line_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number)
|
||||
function AddLigne(&$ligne_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number)
|
||||
{
|
||||
$result = -1;
|
||||
$concat = 0;
|
||||
@ -202,7 +202,7 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
$line_id = $this->db->last_insert_id(MAIN_DB_PREFIX."prelevement_lignes");
|
||||
$ligne_id = $this->db->last_insert_id(MAIN_DB_PREFIX."prelevement_lignes");
|
||||
$result = 0;
|
||||
}
|
||||
else
|
||||
|
||||
@ -70,7 +70,7 @@ class Contrat extends CommonObject
|
||||
|
||||
var $fk_projet;
|
||||
|
||||
var $lines=array();
|
||||
var $lignes=array();
|
||||
|
||||
|
||||
/**
|
||||
@ -192,10 +192,10 @@ class Contrat extends CommonObject
|
||||
$this->db->begin();
|
||||
|
||||
// Load lines
|
||||
$this->fetch_lines();
|
||||
$this->fetch_lignes();
|
||||
|
||||
$ok=true;
|
||||
foreach($this->lines as $contratline)
|
||||
foreach($this->lignes as $contratline)
|
||||
{
|
||||
// Close line not already closed
|
||||
if ($contratline->statut != 5)
|
||||
@ -335,10 +335,10 @@ class Contrat extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Load lignes array into this->lines
|
||||
* Load lignes array into this->lignes
|
||||
* @return Array Return array of contract lines
|
||||
*/
|
||||
function fetch_lines()
|
||||
function fetch_lignes()
|
||||
{
|
||||
$this->nbofserviceswait=0;
|
||||
$this->nbofservicesopened=0;
|
||||
@ -369,7 +369,7 @@ class Contrat extends CommonObject
|
||||
$sql.= " WHERE d.fk_contrat = ".$this->id ." AND d.fk_product = p.rowid";
|
||||
$sql.= " ORDER by d.rowid ASC";
|
||||
|
||||
dol_syslog("Contrat::fetch_lines sql=".$sql);
|
||||
dol_syslog("Contrat::fetch_lignes sql=".$sql);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
@ -378,60 +378,58 @@ class Contrat extends CommonObject
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $this->db->fetch_object($result);
|
||||
$objp = $this->db->fetch_object($result);
|
||||
|
||||
$line = new ContratLigne($this->db);
|
||||
$line->id = $objp->rowid;
|
||||
$line->ref = $objp->rowid;
|
||||
$line->fk_contrat = $objp->fk_contrat;
|
||||
$line->desc = $objp->description; // Description ligne
|
||||
$line->qty = $objp->qty;
|
||||
$line->tva_tx = $objp->tva_tx;
|
||||
$line->localtax1_tx = $objp->localtax1_tx;
|
||||
$line->localtax2_tx = $objp->localtax2_tx;
|
||||
$line->subprice = $objp->subprice;
|
||||
$line->statut = $objp->statut;
|
||||
$line->remise_percent = $objp->remise_percent;
|
||||
$line->price_ht = $objp->price_ht;
|
||||
$line->price = $objp->price; // For backward compatibility
|
||||
$line->total_ht = $objp->total_ht;
|
||||
$line->total_tva = $objp->total_tva;
|
||||
$line->total_localtax1 = $objp->total_localtax1;
|
||||
$line->total_localtax2 = $objp->total_localtax2;
|
||||
$line->total_ttc = $objp->total_ttc;
|
||||
$line->fk_product = $objp->fk_product;
|
||||
$line->info_bits = $objp->info_bits;
|
||||
$ligne = new ContratLigne($this->db);
|
||||
$ligne->id = $objp->rowid;
|
||||
$ligne->ref = $objp->rowid;
|
||||
$ligne->fk_contrat = $objp->fk_contrat;
|
||||
$ligne->desc = $objp->description; // Description ligne
|
||||
$ligne->qty = $objp->qty;
|
||||
$ligne->tva_tx = $objp->tva_tx;
|
||||
$ligne->localtax1_tx = $objp->localtax1_tx;
|
||||
$ligne->localtax2_tx = $objp->localtax2_tx;
|
||||
$ligne->subprice = $objp->subprice;
|
||||
$ligne->statut = $objp->statut;
|
||||
$ligne->remise_percent = $objp->remise_percent;
|
||||
$ligne->price_ht = $objp->price_ht;
|
||||
$ligne->price = $objp->price; // For backward compatibility
|
||||
$ligne->total_ht = $objp->total_ht;
|
||||
$ligne->total_tva = $objp->total_tva;
|
||||
$ligne->total_localtax1= $objp->total_localtax1;
|
||||
$ligne->total_localtax2= $objp->total_localtax2;
|
||||
$ligne->total_ttc = $objp->total_ttc;
|
||||
$ligne->fk_product = $objp->fk_product;
|
||||
$ligne->info_bits = $objp->info_bits;
|
||||
|
||||
$line->fk_user_author = $objp->fk_user_author;
|
||||
$line->fk_user_ouverture= $objp->fk_user_ouverture;
|
||||
$line->fk_user_cloture = $objp->fk_user_cloture;
|
||||
$ligne->fk_user_author = $objp->fk_user_author;
|
||||
$ligne->fk_user_ouverture= $objp->fk_user_ouverture;
|
||||
$ligne->fk_user_cloture = $objp->fk_user_cloture;
|
||||
|
||||
$line->ref = $objp->ref;
|
||||
$line->libelle = $objp->label; // Label produit
|
||||
$line->label = $objp->label; // For backward compatibility
|
||||
$line->product_desc = $objp->product_desc; // Description produit
|
||||
$ligne->ref = $objp->ref;
|
||||
$ligne->libelle = $objp->label; // Label produit
|
||||
$ligne->label = $objp->label; // For backward compatibility
|
||||
$ligne->product_desc = $objp->product_desc; // Description produit
|
||||
|
||||
$line->description = $objp->description;
|
||||
$ligne->description = $objp->description;
|
||||
|
||||
$line->date_ouverture_prevue = $this->db->jdate($objp->date_ouverture_prevue);
|
||||
$line->date_ouverture = $this->db->jdate($objp->date_ouverture);
|
||||
$line->date_fin_validite = $this->db->jdate($objp->date_fin_validite);
|
||||
$line->date_cloture = $this->db->jdate($objp->date_cloture);
|
||||
$ligne->date_ouverture_prevue = $this->db->jdate($objp->date_ouverture_prevue);
|
||||
$ligne->date_ouverture = $this->db->jdate($objp->date_ouverture);
|
||||
$ligne->date_fin_validite = $this->db->jdate($objp->date_fin_validite);
|
||||
$ligne->date_cloture = $this->db->jdate($objp->date_cloture);
|
||||
// For backward compatibility
|
||||
$line->date_debut_prevue = $this->db->jdate($objp->date_ouverture_prevue);
|
||||
$line->date_debut_reel = $this->db->jdate($objp->date_ouverture);
|
||||
$line->date_fin_prevue = $this->db->jdate($objp->date_fin_validite);
|
||||
$line->date_fin_reel = $this->db->jdate($objp->date_cloture);
|
||||
|
||||
$this->lines[] = $line;
|
||||
|
||||
//dol_syslog("1 ".$line->desc);
|
||||
//dol_syslog("2 ".$line->product_desc);
|
||||
$ligne->date_debut_prevue = $this->db->jdate($objp->date_ouverture_prevue);
|
||||
$ligne->date_debut_reel = $this->db->jdate($objp->date_ouverture);
|
||||
$ligne->date_fin_prevue = $this->db->jdate($objp->date_fin_validite);
|
||||
$ligne->date_fin_reel = $this->db->jdate($objp->date_cloture);
|
||||
$this->lignes[] = $ligne;
|
||||
//dol_syslog("1 ".$ligne->desc);
|
||||
//dol_syslog("2 ".$ligne->product_desc);
|
||||
|
||||
if ($line->statut == 0) $this->nbofserviceswait++;
|
||||
if ($line->statut == 4 && (empty($line->date_fin_prevue) || $line->date_fin_prevue >= $now)) $this->nbofservicesopened++;
|
||||
if ($line->statut == 4 && $line->date_fin_prevue < $now) $this->nbofservicesexpired++;
|
||||
if ($line->statut == 5) $this->nbofservicesclosed++;
|
||||
if ($ligne->statut == 0) $this->nbofserviceswait++;
|
||||
if ($ligne->statut == 4 && (empty($ligne->date_fin_prevue) || $ligne->date_fin_prevue >= $now)) $this->nbofservicesopened++;
|
||||
if ($ligne->statut == 4 && $ligne->date_fin_prevue < $now) $this->nbofservicesexpired++;
|
||||
if ($ligne->statut == 5) $this->nbofservicesclosed++;
|
||||
|
||||
$total_ttc+=$objp->total_ttc; // TODO Not saved into database
|
||||
$total_vat+=$objp->total_tva;
|
||||
@ -474,51 +472,51 @@ class Contrat extends CommonObject
|
||||
{
|
||||
$objp = $this->db->fetch_object($result);
|
||||
|
||||
$line = new ContratLigne($this->db);
|
||||
$line->id = $objp->rowid;
|
||||
$line->fk_contrat = $objp->fk_contrat;
|
||||
$line->libelle = $objp->description;
|
||||
$line->desc = $objp->description;
|
||||
$line->qty = $objp->qty;
|
||||
$line->statut = $objp->statut;
|
||||
$line->ref = $objp->ref;
|
||||
$line->tva_tx = $objp->tva_tx;
|
||||
$line->localtax1_tx = $objp->localtax1_tx;
|
||||
$line->localtax2_tx = $objp->localtax2_tx;
|
||||
$line->subprice = $objp->subprice;
|
||||
$line->remise_percent = $objp->remise_percent;
|
||||
$line->price_ht = $objp->price_ht;
|
||||
$line->price = $objp->price; // For backward compatibility
|
||||
$line->total_ht = $objp->total_ht;
|
||||
$line->total_tva = $objp->total_tva;
|
||||
$line->total_localtax1= $objp->total_localtax1;
|
||||
$line->total_localtax2= $objp->total_localtax2;
|
||||
$line->total_ttc = $objp->total_ttc;
|
||||
$line->fk_product = 0;
|
||||
$line->info_bits = $objp->info_bits;
|
||||
$ligne = new ContratLigne($this->db);
|
||||
$ligne->id = $objp->rowid;
|
||||
$ligne->fk_contrat = $objp->fk_contrat;
|
||||
$ligne->libelle = $objp->description;
|
||||
$ligne->desc = $objp->description;
|
||||
$ligne->qty = $objp->qty;
|
||||
$ligne->statut = $objp->statut;
|
||||
$ligne->ref = $objp->ref;
|
||||
$ligne->tva_tx = $objp->tva_tx;
|
||||
$ligne->localtax1_tx = $objp->localtax1_tx;
|
||||
$ligne->localtax2_tx = $objp->localtax2_tx;
|
||||
$ligne->subprice = $objp->subprice;
|
||||
$ligne->remise_percent = $objp->remise_percent;
|
||||
$ligne->price_ht = $objp->price_ht;
|
||||
$ligne->price = $objp->price; // For backward compatibility
|
||||
$ligne->total_ht = $objp->total_ht;
|
||||
$ligne->total_tva = $objp->total_tva;
|
||||
$ligne->total_localtax1= $objp->total_localtax1;
|
||||
$ligne->total_localtax2= $objp->total_localtax2;
|
||||
$ligne->total_ttc = $objp->total_ttc;
|
||||
$ligne->fk_product = 0;
|
||||
$ligne->info_bits = $objp->info_bits;
|
||||
|
||||
$line->fk_user_author = $objp->fk_user_author;
|
||||
$line->fk_user_ouverture= $objp->fk_user_ouverture;
|
||||
$line->fk_user_cloture = $objp->fk_user_cloture;
|
||||
$ligne->fk_user_author = $objp->fk_user_author;
|
||||
$ligne->fk_user_ouverture= $objp->fk_user_ouverture;
|
||||
$ligne->fk_user_cloture = $objp->fk_user_cloture;
|
||||
|
||||
$line->description = $objp->description;
|
||||
$ligne->description = $objp->description;
|
||||
|
||||
$line->date_ouverture_prevue = $this->db->jdate($objp->date_ouverture_prevue);
|
||||
$line->date_ouverture = $this->db->jdate($objp->date_ouverture);
|
||||
$line->date_fin_validite = $this->db->jdate($objp->date_fin_validite);
|
||||
$line->date_cloture = $this->db->jdate($objp->date_cloture);
|
||||
$ligne->date_ouverture_prevue = $this->db->jdate($objp->date_ouverture_prevue);
|
||||
$ligne->date_ouverture = $this->db->jdate($objp->date_ouverture);
|
||||
$ligne->date_fin_validite = $this->db->jdate($objp->date_fin_validite);
|
||||
$ligne->date_cloture = $this->db->jdate($objp->date_cloture);
|
||||
// For backward compatibility
|
||||
$line->date_debut_prevue = $this->db->jdate($objp->date_ouverture_prevue);
|
||||
$line->date_debut_reel = $this->db->jdate($objp->date_ouverture);
|
||||
$line->date_fin_prevue = $this->db->jdate($objp->date_fin_validite);
|
||||
$line->date_fin_reel = $this->db->jdate($objp->date_cloture);
|
||||
$ligne->date_debut_prevue = $this->db->jdate($objp->date_ouverture_prevue);
|
||||
$ligne->date_debut_reel = $this->db->jdate($objp->date_ouverture);
|
||||
$ligne->date_fin_prevue = $this->db->jdate($objp->date_fin_validite);
|
||||
$ligne->date_fin_reel = $this->db->jdate($objp->date_cloture);
|
||||
|
||||
if ($line->statut == 0) $this->nbofserviceswait++;
|
||||
if ($line->statut == 4 && (empty($line->date_fin_prevue) || $line->date_fin_prevue >= $now)) $this->nbofservicesopened++;
|
||||
if ($line->statut == 4 && $line->date_fin_prevue < $now) $this->nbofservicesexpired++;
|
||||
if ($line->statut == 5) $this->nbofservicesclosed++;
|
||||
if ($ligne->statut == 0) $this->nbofserviceswait++;
|
||||
if ($ligne->statut == 4 && (empty($ligne->date_fin_prevue) || $ligne->date_fin_prevue >= $now)) $this->nbofservicesopened++;
|
||||
if ($ligne->statut == 4 && $ligne->date_fin_prevue < $now) $this->nbofservicesexpired++;
|
||||
if ($ligne->statut == 5) $this->nbofservicesclosed++;
|
||||
|
||||
$this->lines[] = $line;
|
||||
$this->lignes[] = $ligne;
|
||||
|
||||
$total_ttc+=$objp->total_ttc;
|
||||
$total_vat+=$objp->total_tva;
|
||||
@ -536,12 +534,12 @@ class Contrat extends CommonObject
|
||||
return -2;
|
||||
}
|
||||
|
||||
$this->nbofservices=sizeof($this->lines);
|
||||
$this->nbofservices=sizeof($this->lignes);
|
||||
$this->total_ttc = price2num($total_ttc); // TODO For the moment value is false as value is not stored in database for line linked to products
|
||||
$this->total_vat = price2num($total_vat); // TODO For the moment value is false as value is not stored in database for line linked to products
|
||||
$this->total_ht = price2num($total_ht); // TODO For the moment value is false as value is not stored in database for line linked to products
|
||||
|
||||
return $this->lines;
|
||||
return $this->lignes;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1026,11 +1024,11 @@ class Contrat extends CommonObject
|
||||
// If draft, we keep it (should not happen)
|
||||
if ($this->statut == 0) return 1;
|
||||
|
||||
// Load $this->lines array
|
||||
// $this->fetch_lines();
|
||||
// Load $this->lignes array
|
||||
// $this->fetch_lignes();
|
||||
|
||||
$newstatut=1;
|
||||
foreach($this->lines as $key => $contractline)
|
||||
foreach($this->lignes as $key => $contractline)
|
||||
{
|
||||
// if ($contractline) // Loop on each service
|
||||
}
|
||||
@ -1420,19 +1418,19 @@ class Contrat extends CommonObject
|
||||
$xnbp = 0;
|
||||
while ($xnbp < $nbp)
|
||||
{
|
||||
$line=new ContratLigne($this->db);
|
||||
$line->desc=$langs->trans("Description")." ".$xnbp;
|
||||
$line->qty=1;
|
||||
$line->subprice=100;
|
||||
$line->price=100;
|
||||
$line->tva_tx=19.6;
|
||||
$line->remise_percent=10;
|
||||
$line->total_ht=90;
|
||||
$line->total_ttc=107.64; // 90 * 1.196
|
||||
$line->total_tva=17.64;
|
||||
$ligne=new ContratLigne($this->db);
|
||||
$ligne->desc=$langs->trans("Description")." ".$xnbp;
|
||||
$ligne->qty=1;
|
||||
$ligne->subprice=100;
|
||||
$ligne->price=100;
|
||||
$ligne->tva_tx=19.6;
|
||||
$ligne->remise_percent=10;
|
||||
$ligne->total_ht=90;
|
||||
$ligne->total_ttc=107.64; // 90 * 1.196
|
||||
$ligne->total_tva=17.64;
|
||||
$prodid = rand(1, $num_prods);
|
||||
$line->fk_product=$prodids[$prodid];
|
||||
$this->lines[$xnbp]=$line;
|
||||
$ligne->fk_product=$prodids[$prodid];
|
||||
$this->lignes[$xnbp]=$ligne;
|
||||
$xnbp++;
|
||||
}
|
||||
|
||||
|
||||
@ -645,7 +645,7 @@ else
|
||||
if ($result > 0)
|
||||
{
|
||||
$id = $contrat->id; // if $_GET['ref']
|
||||
$result=$contrat->fetch_lines();
|
||||
$result=$contrat->fetch_lignes();
|
||||
}
|
||||
if ($result < 0)
|
||||
{
|
||||
@ -655,7 +655,7 @@ else
|
||||
|
||||
if ($mesg) print $mesg;
|
||||
|
||||
$nbofservices=sizeof($contrat->lines);
|
||||
$nbofservices=sizeof($contrat->lignes);
|
||||
|
||||
$author = new User($db);
|
||||
$author->fetch($contrat->user_author_id);
|
||||
@ -805,7 +805,7 @@ else
|
||||
$sql.= " p.ref, p.label";
|
||||
$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 = ".$contrat->lines[$cursorline-1]->id;
|
||||
$sql.= " WHERE cd.rowid = ".$contrat->lignes[$cursorline-1]->id;
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
@ -982,7 +982,7 @@ else
|
||||
/*
|
||||
* Confirmation to delete service line of contract
|
||||
*/
|
||||
if ($_REQUEST["action"] == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $contrat->lines[$cursorline-1]->id == $_GET["rowid"])
|
||||
if ($_REQUEST["action"] == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $contrat->lignes[$cursorline-1]->id == $_GET["rowid"])
|
||||
{
|
||||
$ret=$html->form_confirm($_SERVER["PHP_SELF"]."?id=".$contrat->id."&lineid=".$_GET["rowid"],$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1);
|
||||
if ($ret == 'html') print '<table class="notopnoleftnoright" width="100%"><tr '.$bc[false].' height="6"><td></td></tr></table>';
|
||||
@ -991,7 +991,7 @@ else
|
||||
/*
|
||||
* Confirmation to move service toward another contract
|
||||
*/
|
||||
if ($_REQUEST["action"] == 'move' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $contrat->lines[$cursorline-1]->id == $_GET["rowid"])
|
||||
if ($_REQUEST["action"] == 'move' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $contrat->lignes[$cursorline-1]->id == $_GET["rowid"])
|
||||
{
|
||||
$arraycontractid=array();
|
||||
foreach($arrayothercontracts as $contractcursor)
|
||||
@ -1011,7 +1011,7 @@ else
|
||||
/*
|
||||
* Confirmation de la validation activation
|
||||
*/
|
||||
if ($_REQUEST["action"] == 'active' && ! $_REQUEST["cancel"] && $user->rights->contrat->activer && $contrat->lines[$cursorline-1]->id == $_GET["ligne"])
|
||||
if ($_REQUEST["action"] == 'active' && ! $_REQUEST["cancel"] && $user->rights->contrat->activer && $contrat->lignes[$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"]);
|
||||
@ -1023,7 +1023,7 @@ else
|
||||
/*
|
||||
* Confirmation de la validation fermeture
|
||||
*/
|
||||
if ($_REQUEST["action"] == 'closeline' && ! $_REQUEST["cancel"] && $user->rights->contrat->activer && $contrat->lines[$cursorline-1]->id == $_GET["ligne"])
|
||||
if ($_REQUEST["action"] == 'closeline' && ! $_REQUEST["cancel"] && $user->rights->contrat->activer && $contrat->lignes[$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"]);
|
||||
@ -1039,7 +1039,7 @@ else
|
||||
print '<table class="notopnoleft" width="100%">';
|
||||
|
||||
print '<tr '.$bc[false].'>';
|
||||
print '<td>'.$langs->trans("ServiceStatus").': '.$contrat->lines[$cursorline-1]->getLibStatut(4).'</td>';
|
||||
print '<td>'.$langs->trans("ServiceStatus").': '.$contrat->lignes[$cursorline-1]->getLibStatut(4).'</td>';
|
||||
print '<td width="30" align="right">';
|
||||
if ($user->societe_id == 0)
|
||||
{
|
||||
@ -1047,7 +1047,7 @@ else
|
||||
{
|
||||
$action='activateline';
|
||||
if ($objp->statut == 4) $action='unactivateline';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$contrat->id.'&ligne='.$contrat->lines[$cursorline-1]->id.'&action='.$action.'">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$contrat->id.'&ligne='.$contrat->lignes[$cursorline-1]->id.'&action='.$action.'">';
|
||||
print img_edit();
|
||||
print '</a>';
|
||||
}
|
||||
@ -1086,7 +1086,7 @@ else
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
if ($user->rights->contrat->activer && $_REQUEST["action"] == 'activateline' && $contrat->lines[$cursorline-1]->id == $_GET["ligne"])
|
||||
if ($user->rights->contrat->activer && $_REQUEST["action"] == 'activateline' && $contrat->lignes[$cursorline-1]->id == $_GET["ligne"])
|
||||
{
|
||||
/**
|
||||
* Activer la ligne de contrat
|
||||
@ -1136,12 +1136,12 @@ else
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
if ($user->rights->contrat->activer && $_REQUEST["action"] == 'unactivateline' && $contrat->lines[$cursorline-1]->id == $_GET["ligne"])
|
||||
if ($user->rights->contrat->activer && $_REQUEST["action"] == 'unactivateline' && $contrat->lignes[$cursorline-1]->id == $_GET["ligne"])
|
||||
{
|
||||
/**
|
||||
* Desactiver la ligne de contrat
|
||||
*/
|
||||
print '<form name="closeline" action="'.$_SERVER["PHP_SELF"].'?id='.$contrat->id.'&ligne='.$contrat->lines[$cursorline-1]->id.'&action=closeline" method="post">';
|
||||
print '<form name="closeline" action="'.$_SERVER["PHP_SELF"].'?id='.$contrat->id.'&ligne='.$contrat->lignes[$cursorline-1]->id.'&action=closeline" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
@ -38,7 +38,7 @@ $var=true;
|
||||
for ($i = 0 ; $i < $num ; $i++)
|
||||
{
|
||||
$linkedObjectBlock->fetch($objectid[$i]);
|
||||
$linkedObjectBlock->fetch_lines();
|
||||
$linkedObjectBlock->fetch_lignes();
|
||||
$var=!$var;
|
||||
?>
|
||||
<tr <?php echo $bc[$var]; ?> ><td>
|
||||
|
||||
@ -1,176 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/class/actions_commonobject.class.php
|
||||
* \ingroup core
|
||||
* \brief Fichier de la classe mere des classes metiers (facture, contrat, propal, commande, etc...)
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \class ActionsCommonObject
|
||||
* \brief Classe mere pour heritage des classes metiers
|
||||
*/
|
||||
|
||||
class ActionsCommonObject
|
||||
{
|
||||
var $db;
|
||||
|
||||
// Instantiate hook classe of thirdparty module
|
||||
var $hooks=array();
|
||||
|
||||
/**
|
||||
* Constructeur de la classe
|
||||
* @param DB Handler acces base de donnees
|
||||
*/
|
||||
function AnctionsCommonObject($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return HTML table with origin title list
|
||||
*/
|
||||
function printOriginTitleList()
|
||||
{
|
||||
global $langs;
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans('Ref').'</td>';
|
||||
print '<td>'.$langs->trans('Description').'</td>';
|
||||
print '<td align="right">'.$langs->trans('VAT').'</td>';
|
||||
print '<td align="right">'.$langs->trans('PriceUHT').'</td>';
|
||||
print '<td align="right">'.$langs->trans('Qty').'</td>';
|
||||
print '<td align="right">'.$langs->trans('ReductionShort').'</td></tr>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Return HTML with list of origin lines
|
||||
*/
|
||||
function printOriginLinesList($object)
|
||||
{
|
||||
$num = count($this->object->lines);
|
||||
$var = true;
|
||||
$i = 0;
|
||||
|
||||
foreach ($this->object->lines as $line)
|
||||
{
|
||||
$var=!$var;
|
||||
|
||||
if ($line->product_type == 9 && ! empty($line->special_code))
|
||||
{
|
||||
$object->hooks[$line->special_code]->printOriginObjectLine($line,$i);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->printOriginLine($line,$var);
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return HTML with origin line
|
||||
* @param element Element type
|
||||
* @param id Element id
|
||||
*/
|
||||
function printOriginLine($line,$var)
|
||||
{
|
||||
global $langs,$bc;
|
||||
|
||||
//var_dump($line);
|
||||
|
||||
$var=!$var;
|
||||
|
||||
$date_start=$line->date_debut_prevue;
|
||||
if ($line->date_debut_reel) $date_start=$line->date_debut_reel;
|
||||
$date_end=$line->date_fin_prevue;
|
||||
if ($line->date_fin_reel) $date_end=$line->date_fin_reel;
|
||||
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
if (($line->info_bits & 2) == 2)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$this->socid.'">';
|
||||
print img_object($langs->trans("ShowReduc"),'reduc').' '.$langs->trans("Discount");
|
||||
print '</a>';
|
||||
}
|
||||
else if ($line->fk_product)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$line->fk_product.'">';
|
||||
print ($line->fk_product_type == 1 ? img_object($langs->trans(''),'service') : img_object($langs->trans(''),'product'));
|
||||
print ' '.$line->ref.'</a>';
|
||||
print $line->label?' - '.$line->label:'';
|
||||
// Dates
|
||||
if ($date_start || $date_end)
|
||||
{
|
||||
print_date_range($date_start,$date_end);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print ($line->product_type == -1 ? ' ' : ($line->product_type == 1 ? img_object($langs->trans(''),'service') : img_object($langs->trans(''),'product')));
|
||||
print ($line->label ? ' '.$line->label : '');
|
||||
// Dates
|
||||
if ($date_start || $date_end)
|
||||
{
|
||||
print_date_range($date_start,$date_end);
|
||||
}
|
||||
}
|
||||
print "</td>\n";
|
||||
print '<td>';
|
||||
if ($line->desc)
|
||||
{
|
||||
if ($line->desc == '(CREDIT_NOTE)')
|
||||
{
|
||||
$discount=new DiscountAbsolute($db);
|
||||
$discount->fetch($line->fk_remise_except);
|
||||
print $langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl(0));
|
||||
}
|
||||
elseif ($line->desc == '(DEPOSIT)')
|
||||
{
|
||||
$discount=new DiscountAbsolute($db);
|
||||
$discount->fetch($line->fk_remise_except);
|
||||
print $langs->transnoentities("DiscountFromDeposit",$discount->getNomUrl(0));
|
||||
}
|
||||
else
|
||||
{
|
||||
print dol_trunc($line->desc,60);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print ' ';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td align="right">'.vatrate($line->tva_tx).'%</td>';
|
||||
print '<td align="right">'.price($line->subprice).'</td>';
|
||||
print '<td align="right">';
|
||||
print (($line->info_bits & 2) != 2) ? $line->qty : ' ';
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print (($line->info_bits & 2) != 2) ? $line->remise_percent.'%' : ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@ -229,11 +229,11 @@ class Translate {
|
||||
{
|
||||
if ($usecachekey) $tabtranslatedomain=array(); // To save lang content in cache
|
||||
|
||||
while ($line = fgets($fp,4096)) // Ex: Need 225ms for all fgets on all lang file for Third party page. Same speed than file_get_contents
|
||||
while ($ligne = fgets($fp,4096)) // Ex: Need 225ms for all fgets on all lang file for Third party page. Same speed than file_get_contents
|
||||
{
|
||||
if ($line[0] != "\n" && $line[0] != " " && $line[0] != "#")
|
||||
if ($ligne[0] != "\n" && $ligne[0] != " " && $ligne[0] != "#")
|
||||
{
|
||||
$tab=explode('=',$line,2);
|
||||
$tab=explode('=',$ligne,2);
|
||||
$key=trim($tab[0]);
|
||||
//print "Domain=$domain, found a string for $tab[0] with value $tab[1]<br>";
|
||||
if (empty($this->tab_translate[$key]) && isset($tab[1]))
|
||||
|
||||
@ -31,7 +31,7 @@ header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||
<head>
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<title><?php echo $langs->trans('Login'); ?></title>
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/js/jquery-latest.min.js"></script>
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/js/jquery-1.4.3.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo $conf_css; ?>">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
|
||||
@ -50,6 +50,7 @@ class Expedition extends CommonObject
|
||||
var $modelpdf;
|
||||
var $origin;
|
||||
var $origin_id;
|
||||
var $lignes=array(); // TODO deprecated
|
||||
var $lines=array();
|
||||
var $expedition_method_id;
|
||||
var $statut;
|
||||
@ -76,7 +77,7 @@ class Expedition extends CommonObject
|
||||
function Expedition($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->lines = array();
|
||||
$this->lignes = array();
|
||||
$this->products = array();
|
||||
|
||||
// List of long language codes for status
|
||||
@ -157,9 +158,9 @@ class Expedition extends CommonObject
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
// Insertion des lignes
|
||||
for ($i = 0 ; $i < sizeof($this->lines) ; $i++)
|
||||
for ($i = 0 ; $i < sizeof($this->lignes) ; $i++)
|
||||
{
|
||||
if (! $this->create_line($this->lines[$i]->entrepot_id, $this->lines[$i]->origin_line_id, $this->lines[$i]->qty) > 0)
|
||||
if (! $this->create_line($this->lignes[$i]->entrepot_id, $this->lignes[$i]->origin_line_id, $this->lignes[$i]->qty) > 0)
|
||||
{
|
||||
$error++;
|
||||
}
|
||||
@ -409,9 +410,9 @@ class Expedition extends CommonObject
|
||||
dol_syslog("Expedition::valid movement index ".$i);
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
if ($this->lines[$i]->fk_product > 0 && $this->lines[$i]->product_type == 0)
|
||||
if ($this->lignes[$i]->fk_product > 0 && $this->lignes[$i]->product_type == 0)
|
||||
{
|
||||
//var_dump($this->lines[$i]);
|
||||
//var_dump($this->lignes[$i]);
|
||||
$mouvS = new MouvementStock($this->db);
|
||||
// We decrement stock of product (and sub-products)
|
||||
// We use warehouse selected for each line
|
||||
@ -528,14 +529,14 @@ class Expedition extends CommonObject
|
||||
*/
|
||||
function addline( $entrepot_id, $id, $qty )
|
||||
{
|
||||
$num = sizeof($this->lines);
|
||||
$num = sizeof($this->lignes);
|
||||
$line = new ExpeditionLigne($this->db);
|
||||
|
||||
$line->entrepot_id = $entrepot_id;
|
||||
$line->origin_line_id = $id;
|
||||
$line->qty = $qty;
|
||||
|
||||
$this->lines[$num] = $line;
|
||||
$this->lignes[$num] = $line;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -782,6 +783,7 @@ class Expedition extends CommonObject
|
||||
$line->volume = $obj->volume;
|
||||
$line->volume_units = $obj->volume_units;
|
||||
|
||||
$this->lignes[$i] = $line; // TODO deprecated
|
||||
$this->lines[$i] = $line;
|
||||
|
||||
$i++;
|
||||
@ -918,15 +920,15 @@ class Expedition extends CommonObject
|
||||
$xnbp = 0;
|
||||
while ($xnbp < $nbp)
|
||||
{
|
||||
$line=new ExpeditionLigne($this->db);
|
||||
$line->desc=$langs->trans("Description")." ".$xnbp;
|
||||
$line->libelle=$langs->trans("Description")." ".$xnbp;
|
||||
$line->qty=10;
|
||||
$line->qty_asked=5;
|
||||
$line->qty_shipped=4;
|
||||
$line->fk_product=$this->commande->lines[$xnbp]->fk_product;
|
||||
$ligne=new ExpeditionLigne($this->db);
|
||||
$ligne->desc=$langs->trans("Description")." ".$xnbp;
|
||||
$ligne->libelle=$langs->trans("Description")." ".$xnbp;
|
||||
$ligne->qty=10;
|
||||
$ligne->qty_asked=5;
|
||||
$ligne->qty_shipped=4;
|
||||
$ligne->fk_product=$this->commande->lignes[$xnbp]->fk_product;
|
||||
|
||||
$this->lines[]=$line;
|
||||
$this->lignes[]=$ligne;
|
||||
$xnbp++;
|
||||
}
|
||||
|
||||
|
||||
@ -98,7 +98,7 @@ if ($_POST["action"] == 'add')
|
||||
$expedition->tracking_number = $_POST["tracking_number"];
|
||||
|
||||
//var_dump($_POST);exit;
|
||||
for ($i = 0 ; $i < sizeof($object->lines) ; $i++)
|
||||
for ($i = 0 ; $i < sizeof($object->lignes) ; $i++)
|
||||
{
|
||||
$qty = "qtyl".$i;
|
||||
if ($_POST[$qty] > 0)
|
||||
@ -447,8 +447,8 @@ if ($_GET["action"] == 'create')
|
||||
*/
|
||||
print '<br><table class="nobordernopadding" width="100%">';
|
||||
|
||||
//$lines = $object->fetch_lines(1);
|
||||
$numAsked = sizeof($object->lines);
|
||||
//$lignes = $object->fetch_lines(1);
|
||||
$numAsked = sizeof($object->lignes);
|
||||
|
||||
/* Lecture des expeditions deja effectuees */
|
||||
$object->loadExpeditions();
|
||||
@ -654,8 +654,8 @@ else
|
||||
dol_print_error($db,$expedition->error);
|
||||
exit -1;
|
||||
}
|
||||
$lines = $expedition->lines;
|
||||
$num_prod = sizeof($lines);
|
||||
$lignes = $expedition->lignes;
|
||||
$num_prod = sizeof($lignes);
|
||||
|
||||
if ($expedition->id > 0)
|
||||
{
|
||||
@ -723,30 +723,30 @@ else
|
||||
{
|
||||
$weightUnit=0;
|
||||
$volumeUnit=0;
|
||||
if (! empty($lines[$i]->weight_units)) $weightUnit = $lines[$i]->weight_units;
|
||||
if (! empty($lines[$i]->volume_units)) $volumeUnit = $lines[$i]->volume_units;
|
||||
if (! empty($lignes[$i]->weight_units)) $weightUnit = $lignes[$i]->weight_units;
|
||||
if (! empty($lignes[$i]->volume_units)) $volumeUnit = $lignes[$i]->volume_units;
|
||||
// TODO Use a function addvalueunits(val1,unit1,val2,unit2)=>(val,unit)
|
||||
if ($lines[$i]->weight_units < 50)
|
||||
if ($lignes[$i]->weight_units < 50)
|
||||
{
|
||||
$trueWeightUnit=pow(10,$weightUnit);
|
||||
$totalWeight += $lines[$i]->weight*$lines[$i]->qty_shipped*$trueWeightUnit;
|
||||
$totalWeight += $lignes[$i]->weight*$lignes[$i]->qty_shipped*$trueWeightUnit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$trueWeightUnit=$weightUnit;
|
||||
$totalWeight += $lines[$i]->weight*$lines[$i]->qty_shipped;
|
||||
$totalWeight += $lignes[$i]->weight*$lignes[$i]->qty_shipped;
|
||||
}
|
||||
if ($lines[$i]->volume_units < 50)
|
||||
if ($lignes[$i]->volume_units < 50)
|
||||
{
|
||||
//print $lines[$i]->volume."x".$lines[$i]->volume_units."x".($lines[$i]->volume_units < 50)."x".$volumeUnit;
|
||||
//print $lignes[$i]->volume."x".$lignes[$i]->volume_units."x".($lignes[$i]->volume_units < 50)."x".$volumeUnit;
|
||||
$trueVolumeUnit=pow(10,$volumeUnit);
|
||||
//print $lines[$i]->volume;
|
||||
$totalVolume += $lines[$i]->volume*$lines[$i]->qty_shipped*$trueVolumeUnit;
|
||||
//print $lignes[$i]->volume;
|
||||
$totalVolume += $lignes[$i]->volume*$lignes[$i]->qty_shipped*$trueVolumeUnit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$trueVolumeUnit=$volumeUnit;
|
||||
$totalVolume += $lines[$i]->volume*$lines[$i]->qty_shipped;
|
||||
$totalVolume += $lignes[$i]->volume*$lignes[$i]->qty_shipped;
|
||||
}
|
||||
}
|
||||
$totalVolume=$totalVolume;
|
||||
@ -966,64 +966,64 @@ else
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
// Predefined product or service
|
||||
if ($lines[$i]->fk_product > 0)
|
||||
if ($lignes[$i]->fk_product > 0)
|
||||
{
|
||||
print '<td>';
|
||||
|
||||
// Affiche ligne produit
|
||||
$text = '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$lines[$i]->fk_product.'">';
|
||||
if ($lines[$i]->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service');
|
||||
$text = '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$lignes[$i]->fk_product.'">';
|
||||
if ($lignes[$i]->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service');
|
||||
else $text.= img_object($langs->trans('ShowProduct'),'product');
|
||||
$text.= ' '.$lines[$i]->ref.'</a>';
|
||||
$text.= ' - '.$lines[$i]->label;
|
||||
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($lines[$i]->description));
|
||||
$text.= ' '.$lignes[$i]->ref.'</a>';
|
||||
$text.= ' - '.$lignes[$i]->label;
|
||||
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($lignes[$i]->description));
|
||||
//print $description;
|
||||
print $html->textwithtooltip($text,$description,3,'','',$i);
|
||||
print_date_range($lines[$i]->date_start,$lines[$i]->date_end);
|
||||
print_date_range($lignes[$i]->date_start,$lignes[$i]->date_end);
|
||||
if ($conf->global->PRODUIT_DESC_IN_FORM)
|
||||
{
|
||||
print ($lines[$i]->description && $lines[$i]->description!=$lines[$i]->product)?'<br>'.dol_htmlentitiesbr($lines[$i]->description):'';
|
||||
print ($lignes[$i]->description && $lignes[$i]->description!=$lignes[$i]->product)?'<br>'.dol_htmlentitiesbr($lignes[$i]->description):'';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td>";
|
||||
if ($lines[$i]->fk_product_type==1) $text = img_object($langs->trans('Service'),'service');
|
||||
if ($lignes[$i]->fk_product_type==1) $text = img_object($langs->trans('Service'),'service');
|
||||
else $text = img_object($langs->trans('Product'),'product');
|
||||
print $text.' '.nl2br($lines[$i]->description);
|
||||
print_date_range($lines[$i]->date_start,$lines[$i]->date_end);
|
||||
print $text.' '.nl2br($lignes[$i]->description);
|
||||
print_date_range($lignes[$i]->date_start,$lignes[$i]->date_end);
|
||||
print "</td>\n";
|
||||
}
|
||||
|
||||
// Qte commande
|
||||
print '<td align="center">'.$lines[$i]->qty_asked.'</td>';
|
||||
print '<td align="center">'.$lignes[$i]->qty_asked.'</td>';
|
||||
|
||||
// Qte a expedier ou expedier
|
||||
print '<td align="center">'.$lines[$i]->qty_shipped.'</td>';
|
||||
print '<td align="center">'.$lignes[$i]->qty_shipped.'</td>';
|
||||
|
||||
// Weight
|
||||
print '<td align="center">';
|
||||
if ($lines[$i]->fk_product_type == 0) print $lines[$i]->weight*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->weight_units,"weight");
|
||||
if ($lignes[$i]->fk_product_type == 0) print $lignes[$i]->weight*$lignes[$i]->qty_shipped.' '.measuring_units_string($lignes[$i]->weight_units,"weight");
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
|
||||
// Volume
|
||||
print '<td align="center">';
|
||||
if ($lines[$i]->fk_product_type == 0) print $lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units,"volume");
|
||||
if ($lignes[$i]->fk_product_type == 0) print $lignes[$i]->volume*$lignes[$i]->qty_shipped.' '.measuring_units_string($lignes[$i]->volume_units,"volume");
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
|
||||
// Size
|
||||
//print '<td align="center">'.$lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units,"volume").'</td>';
|
||||
//print '<td align="center">'.$lignes[$i]->volume*$lignes[$i]->qty_shipped.' '.measuring_units_string($lignes[$i]->volume_units,"volume").'</td>';
|
||||
|
||||
// Entrepot source
|
||||
if ($conf->stock->enabled)
|
||||
{
|
||||
print '<td align="left">';
|
||||
if ($lines[$i]->entrepot_id > 0)
|
||||
if ($lignes[$i]->entrepot_id > 0)
|
||||
{
|
||||
$entrepot = new Entrepot($db);
|
||||
$entrepot->fetch($lines[$i]->entrepot_id);
|
||||
$entrepot->fetch($lignes[$i]->entrepot_id);
|
||||
print $entrepot->getNomUrl(1);
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
@ -57,7 +57,7 @@ class Fichinter extends CommonObject
|
||||
var $fk_project;
|
||||
var $modelpdf;
|
||||
|
||||
var $lines = array();
|
||||
var $lignes = array();
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
@ -674,14 +674,14 @@ class Fichinter extends CommonObject
|
||||
$this->db->begin();
|
||||
|
||||
// Insertion ligne
|
||||
$line=new FichinterLigne($this->db);
|
||||
$ligne=new FichinterLigne($this->db);
|
||||
|
||||
$line->fk_fichinter = $fichinterid;
|
||||
$line->desc = $desc;
|
||||
$line->datei = $date_intervention;
|
||||
$line->duration = $duration;
|
||||
$ligne->fk_fichinter = $fichinterid;
|
||||
$ligne->desc = $desc;
|
||||
$ligne->datei = $date_intervention;
|
||||
$ligne->duration = $duration;
|
||||
|
||||
$result=$line->insert();
|
||||
$result=$ligne->insert();
|
||||
if ($result > 0)
|
||||
{
|
||||
$this->db->commit();
|
||||
@ -780,16 +780,18 @@ class Fichinter extends CommonObject
|
||||
{
|
||||
$objp = $this->db->fetch_object($result);
|
||||
|
||||
$line = new FichinterLigne($this->db);
|
||||
$line->id = $objp->rowid;
|
||||
$fichinterligne = new FichinterLigne($this->db);
|
||||
$fichinterligne->id = $objp->rowid;
|
||||
//...
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
$this->lines[$i] = $fichinterligne;
|
||||
|
||||
$i++;
|
||||
}
|
||||
$this->db->free($result);
|
||||
|
||||
$this->lignes=$this->lines; // For backward compatibility
|
||||
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
|
||||
@ -74,6 +74,7 @@ class CommandeFournisseur extends Commande
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->products = array();
|
||||
$this->lignes = array(); // TODO deprecated
|
||||
$this->lines = array();
|
||||
|
||||
// List of language codes for status
|
||||
@ -186,6 +187,7 @@ class CommandeFournisseur extends Commande
|
||||
$line->ref = $objp->ref; // Reference
|
||||
$line->ref_fourn = $objp->ref_fourn; // Reference supplier
|
||||
|
||||
$this->lignes[$i] = $line; // TODO deprecated
|
||||
$this->lines[$i] = $line;
|
||||
|
||||
$i++;
|
||||
@ -525,15 +527,15 @@ class CommandeFournisseur extends Commande
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php");
|
||||
|
||||
for ($i = 0 ; $i < sizeof($this->lines) ; $i++)
|
||||
for ($i = 0 ; $i < sizeof($this->lignes) ; $i++)
|
||||
{
|
||||
// Product with reference
|
||||
if (!empty($this->lines[$i]->fk_product))
|
||||
if (!empty($this->lignes[$i]->fk_product))
|
||||
{
|
||||
$mouvP = new MouvementStock($this->db);
|
||||
// We decrement stock of product (and sub-products)
|
||||
$entrepot_id = "1"; //Todo: ajouter possibilite de choisir l'entrepot
|
||||
$result=$mouvP->reception($user, $this->lines[$i]->fk_product, $entrepot_id, $this->lines[$i]->qty, $this->lines[$i]->subprice);
|
||||
$result=$mouvP->reception($user, $this->lignes[$i]->fk_product, $entrepot_id, $this->lignes[$i]->qty, $this->lignes[$i]->subprice);
|
||||
if ($result < 0) { $error++; }
|
||||
}
|
||||
}
|
||||
@ -1195,10 +1197,10 @@ class CommandeFournisseur extends Commande
|
||||
|
||||
$this->lines = array();
|
||||
|
||||
for ($i = 0 ; $i < sizeof($comclient->lines) ; $i++)
|
||||
for ($i = 0 ; $i < sizeof($comclient->lignes) ; $i++)
|
||||
{
|
||||
$prod = new Product($this->db, $comclient->lines[$i]->fk_product);
|
||||
if ($prod->fetch($comclient->lines[$i]->fk_product) > 0)
|
||||
$prod = new Product($this->db, $comclient->lignes[$i]->fk_product);
|
||||
if ($prod->fetch($comclient->lignes[$i]->fk_product) > 0)
|
||||
{
|
||||
$libelle = $prod->libelle;
|
||||
$ref = $prod->ref;
|
||||
@ -1206,10 +1208,10 @@ class CommandeFournisseur extends Commande
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseurdet";
|
||||
$sql .= " (fk_commande,label,description,fk_product, price, qty, tva_tx, remise_percent, subprice, remise, ref)";
|
||||
$sql .= " VALUES (".$idc.", '" . addslashes($libelle) . "','" . addslashes($comclient->lines[$i]->desc) . "'";
|
||||
$sql .= ",".$comclient->lines[$i]->fk_product.",'".price2num($comclient->lines[$i]->price)."'";
|
||||
$sql .= ", '".$comclient->lines[$i]->qty."', ".$comclient->lines[$i]->tva_tx.", ".$comclient->lines[$i]->remise_percent;
|
||||
$sql .= ", '".price2num($comclient->lines[$i]->subprice)."','0','".$ref."') ;";
|
||||
$sql .= " VALUES (".$idc.", '" . addslashes($libelle) . "','" . addslashes($comclient->lignes[$i]->desc) . "'";
|
||||
$sql .= ",".$comclient->lignes[$i]->fk_product.",'".price2num($comclient->lignes[$i]->price)."'";
|
||||
$sql .= ", '".$comclient->lignes[$i]->qty."', ".$comclient->lignes[$i]->tva_tx.", ".$comclient->lignes[$i]->remise_percent;
|
||||
$sql .= ", '".price2num($comclient->lignes[$i]->subprice)."','0','".$ref."') ;";
|
||||
if ( $this->db->query( $sql) )
|
||||
{
|
||||
$this->update_price();
|
||||
|
||||
@ -973,7 +973,7 @@ if ($id > 0 || ! empty($ref))
|
||||
*/
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
$num = sizeof($commande->lines);
|
||||
$num = sizeof($commande->lignes);
|
||||
$i = 0; $total = 0;
|
||||
|
||||
if ($num)
|
||||
@ -991,7 +991,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$var=true;
|
||||
while ($i < $num)
|
||||
{
|
||||
$commandline = $commande->lines[$i];
|
||||
$commandline = $commande->lignes[$i];
|
||||
$var=!$var;
|
||||
|
||||
// Show product and description
|
||||
|
||||
@ -238,7 +238,7 @@ if ($_POST['action'] == 'add' && $user->rights->fournisseur->facture->creer)
|
||||
if ($element == 'contract') { $element = $subelement = 'contrat'; }
|
||||
if ($element == 'order_supplier') { $element = 'fourn'; $subelement = 'fournisseur.commande'; }
|
||||
|
||||
$facfou->origin = $_POST['origin'];
|
||||
$facfou->origin = $_POST['origin'];
|
||||
$facfou->origin_id = $_POST['originid'];
|
||||
|
||||
$facid = $facfou->create($user);
|
||||
@ -254,7 +254,10 @@ if ($_POST['action'] == 'add' && $user->rights->fournisseur->facture->creer)
|
||||
$result=$srcobject->fetch($_POST['originid']);
|
||||
if ($result > 0)
|
||||
{
|
||||
$lines = $srcobject->lines;
|
||||
// TODO mutualiser
|
||||
$lines = $srcobject->lignes;
|
||||
if (sizeof($srcobject->lines)) $lines = $srcobject->lines;
|
||||
if (empty($lines) && method_exists($srcobject,'fetch_lignes')) $lines = $srcobject->fetch_lignes();
|
||||
if (empty($lines) && method_exists($srcobject,'fetch_lines')) $lines = $srcobject->fetch_lines();
|
||||
|
||||
for ($i = 0 ; $i < sizeof($lines) ; $i++)
|
||||
@ -841,8 +844,6 @@ if ($_GET['action'] == 'create')
|
||||
|
||||
if (GETPOST('origin') && GETPOST('originid'))
|
||||
{
|
||||
// TODO Not finished...
|
||||
|
||||
// Parse element/subelement (ex: project_task)
|
||||
$element = $subelement = GETPOST('origin');
|
||||
/*if (preg_match('/^([^_]+)_([^_]+)/i',$_GET['origin'],$regs))
|
||||
@ -1795,17 +1796,34 @@ else
|
||||
$genallowed=$user->rights->fournisseur->facture->creer;
|
||||
$delallowed=$user->rights->fournisseur->facture->supprimer;
|
||||
|
||||
$somethingshown=$formfile->show_documents('facture_fournisseur',$facfournref,$filedir,$urlsource,$genallowed,$delallowed,$facture->modelpdf);
|
||||
print '<br>';
|
||||
$somethingshown=$formfile->show_documents('facture_fournisseur',$facfournref,$filedir,$urlsource,$genallowed,$delallowed,$fac->modelpdf);
|
||||
|
||||
$object=$fac;
|
||||
|
||||
/*
|
||||
* Linked object block
|
||||
*/
|
||||
$object->load_object_linked($object->id,$object->element);
|
||||
|
||||
foreach($object->linked_object as $linked_object => $linked_objectid)
|
||||
{
|
||||
$tmpmodule=$linked_object;
|
||||
if ($linked_object == 'invoice_supplier') $tmpmodule='fournisseur';
|
||||
if ($linked_object == 'order_supplier') $tmpmodule='fournisseur';
|
||||
if($conf->$tmpmodule->enabled && $linked_object != $object->element)
|
||||
{
|
||||
$somethingshown=$object->showLinkedObjectBlock($linked_object,$linked_objectid,$somethingshown);
|
||||
}
|
||||
}
|
||||
|
||||
print '</td><td valign="top" width="50%">';
|
||||
print '<br>';
|
||||
|
||||
// List of actions on element
|
||||
/*
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php');
|
||||
$formactions=new FormActions($db);
|
||||
$somethingshown=$formactions->showactions($fac,'invoice_supplier',$socid);
|
||||
*/
|
||||
$somethingshown=$formactions->showactions($object,'invoice_supplier',$socid);
|
||||
|
||||
print '</td></tr></table>';
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,394 +1,394 @@
|
||||
<?php
|
||||
/*
|
||||
* This work is hereby released into the Public Domain.
|
||||
* To view a copy of the public domain dedication,
|
||||
* visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
|
||||
* Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
// Artichow configuration
|
||||
/* <php5> */
|
||||
if(is_file(dirname(__FILE__)."/Artichow.cfg.php")) { // For PHP 4+5 version
|
||||
require_once dirname(__FILE__)."/Artichow.cfg.php";
|
||||
}
|
||||
/* </php5> */
|
||||
|
||||
// Some useful files
|
||||
require_once ARTICHOW."/common.php";
|
||||
require_once ARTICHOW."/Component.class.php";
|
||||
require_once ARTICHOW."/Image.class.php";
|
||||
|
||||
require_once ARTICHOW."/inc/Grid.class.php";
|
||||
require_once ARTICHOW."/inc/Tools.class.php";
|
||||
require_once ARTICHOW."/inc/Drawer.class.php";
|
||||
require_once ARTICHOW."/inc/Math.class.php";
|
||||
require_once ARTICHOW."/inc/Tick.class.php";
|
||||
require_once ARTICHOW."/inc/Axis.class.php";
|
||||
require_once ARTICHOW."/inc/Legend.class.php";
|
||||
require_once ARTICHOW."/inc/Mark.class.php";
|
||||
require_once ARTICHOW."/inc/Label.class.php";
|
||||
require_once ARTICHOW."/inc/Text.class.php";
|
||||
require_once ARTICHOW."/inc/Color.class.php";
|
||||
require_once ARTICHOW."/inc/Font.class.php";
|
||||
require_once ARTICHOW."/inc/Gradient.class.php";
|
||||
|
||||
/**
|
||||
* A graph
|
||||
*
|
||||
* @package Artichow
|
||||
*/
|
||||
class awGraph extends awImage {
|
||||
|
||||
/**
|
||||
* Graph name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $name;
|
||||
|
||||
/**
|
||||
* Cache timeout
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $timeout = 0;
|
||||
|
||||
/**
|
||||
* Graph timing ?
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $timing;
|
||||
|
||||
/**
|
||||
* Components
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $components = array();
|
||||
|
||||
/**
|
||||
* Some labels to add to the component
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $labels = array();
|
||||
|
||||
/**
|
||||
* Graph title
|
||||
*
|
||||
* @var Label
|
||||
*/
|
||||
public $title;
|
||||
|
||||
/**
|
||||
* Construct a new graph
|
||||
*
|
||||
* @param int $width Graph width
|
||||
* @param int $height Graph height
|
||||
* @param string $name Graph name for the cache (must be unique). Let it null to not use the cache.
|
||||
* @param int $timeout Cache timeout (unix timestamp)
|
||||
*/
|
||||
public function __construct($width = NULL, $height = NULL, $name = NULL, $timeout = 0) {
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->setSize($width, $height);
|
||||
|
||||
if(ARTICHOW_CACHE) {
|
||||
|
||||
$this->name = $name;
|
||||
$this->timeout = $timeout;
|
||||
|
||||
// Clean sometimes all the cache
|
||||
if(mt_rand(0, 5000) === 0) {
|
||||
awGraph::cleanCache();
|
||||
}
|
||||
|
||||
if($this->name !== NULL) {
|
||||
|
||||
$file = ARTICHOW_CACHE_DIRECTORY."/".$this->name."-time";
|
||||
|
||||
if(is_file($file)) {
|
||||
|
||||
$type = awGraph::cleanGraphCache($file);
|
||||
|
||||
if($type === NULL) {
|
||||
awGraph::deleteFromCache($this->name);
|
||||
} else {
|
||||
header("Content-Type: image/".$type);
|
||||
readfile(ARTICHOW_CACHE_DIRECTORY."/".$this->name."");
|
||||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->title = new awLabel(
|
||||
NULL,
|
||||
new awTuffy(16),
|
||||
NULL,
|
||||
0
|
||||
);
|
||||
$this->title->setAlign(awLabel::CENTER, awLabel::BOTTOM);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a graph from the cache
|
||||
*
|
||||
* @param string $name Graph name
|
||||
* @return bool TRUE on success, FALSE on failure
|
||||
*/
|
||||
public static function deleteFromCache($name) {
|
||||
|
||||
if(ARTICHOW_CACHE) {
|
||||
|
||||
if(is_file(ARTICHOW_CACHE_DIRECTORY."/".$name."-time")) {
|
||||
unlink(ARTICHOW_CACHE_DIRECTORY."/".$name."");
|
||||
unlink(ARTICHOW_CACHE_DIRECTORY."/".$name."-time");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all graphs from the cache
|
||||
*/
|
||||
public static function deleteAllCache() {
|
||||
|
||||
if(ARTICHOW_CACHE) {
|
||||
|
||||
$dp = opendir(ARTICHOW_CACHE_DIRECTORY);
|
||||
|
||||
while($file = readdir($dp)) {
|
||||
if($file !== '.' and $file != '..') {
|
||||
unlink(ARTICHOW_CACHE_DIRECTORY."/".$file);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean cache
|
||||
*/
|
||||
public static function cleanCache() {
|
||||
|
||||
if(ARTICHOW_CACHE) {
|
||||
|
||||
$glob = glob(ARTICHOW_CACHE_DIRECTORY."/*-time");
|
||||
|
||||
foreach($glob as $file) {
|
||||
|
||||
$type = awGraph::cleanGraphCache($file);
|
||||
|
||||
if($type === NULL) {
|
||||
$name = preg_replace("/.*\/(.*)\-time/", "\\1", $file);
|
||||
awGraph::deleteFromCache($name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/Disable Graph timing
|
||||
*
|
||||
* @param bool $timing
|
||||
*/
|
||||
public function setTiming($timing) {
|
||||
$this->timing = (bool)$timing;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a component to the graph
|
||||
*
|
||||
* @param awComponent $component
|
||||
*/
|
||||
public function add(awComponent $component) {
|
||||
|
||||
$this->components[] = $component;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a label to the component
|
||||
*
|
||||
* @param awLabel $label
|
||||
* @param int $x Position on X axis of the center of the text
|
||||
* @param int $y Position on Y axis of the center of the text
|
||||
*/
|
||||
public function addLabel(awLabel $label, $x, $y) {
|
||||
|
||||
$this->labels[] = array(
|
||||
$label, $x, $y
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a label to the component with aboslute position
|
||||
*
|
||||
* @param awLabel $label
|
||||
* @param awPoint $point Text position
|
||||
*/
|
||||
public function addAbsLabel(awLabel $label, awPoint $point) {
|
||||
|
||||
$this->labels[] = array(
|
||||
$label, $point
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the graph and draw component on it
|
||||
* Image is sent to the user browser
|
||||
*
|
||||
* @param string $file Save the image in the specified file. Let it null to print image to screen.
|
||||
*/
|
||||
public function draw($file = NULL) {
|
||||
|
||||
if($this->timing) {
|
||||
$time = microtimeFloat();
|
||||
}
|
||||
|
||||
$this->create();
|
||||
|
||||
foreach($this->components as $component) {
|
||||
|
||||
$this->drawComponent($component);
|
||||
|
||||
}
|
||||
|
||||
$this->drawTitle();
|
||||
$this->drawShadow();
|
||||
$this->drawLabels();
|
||||
|
||||
if($this->timing) {
|
||||
$this->drawTiming(microtimeFloat() - $time);
|
||||
}
|
||||
|
||||
if(ARTICHOW_CACHE and $this->name !== NULL) {
|
||||
ob_start();
|
||||
}
|
||||
|
||||
$this->send($file);
|
||||
|
||||
if(ARTICHOW_CACHE and $this->name !== NULL) {
|
||||
|
||||
$data = ob_get_contents();
|
||||
|
||||
if(is_writable(ARTICHOW_CACHE_DIRECTORY) === FALSE) {
|
||||
trigger_error("Cache directory is not writable");
|
||||
}
|
||||
|
||||
$file = ARTICHOW_CACHE_DIRECTORY."/".$this->name."";
|
||||
file_put_contents($file, $data);
|
||||
|
||||
$file .= "-time";
|
||||
file_put_contents($file, $this->timeout."\n".$this->getFormat());
|
||||
|
||||
ob_clean();
|
||||
|
||||
echo $data;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function drawLabels() {
|
||||
|
||||
$drawer = $this->getDrawer();
|
||||
|
||||
foreach($this->labels as $array) {
|
||||
|
||||
if(count($array) === 3) {
|
||||
|
||||
// Text in relative position
|
||||
list($label, $x, $y) = $array;
|
||||
|
||||
$point = new awPoint(
|
||||
$x * $this->width,
|
||||
$y * $this->height
|
||||
);
|
||||
|
||||
} else {
|
||||
|
||||
// Text in absolute position
|
||||
list($label, $point) = $array;
|
||||
|
||||
}
|
||||
|
||||
$label->draw($drawer, $point);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function drawTitle() {
|
||||
|
||||
$drawer = $this->getDrawer();
|
||||
|
||||
$point = new awPoint(
|
||||
$this->width / 2,
|
||||
10
|
||||
);
|
||||
|
||||
$this->title->draw($drawer, $point);
|
||||
|
||||
}
|
||||
|
||||
private function drawTiming($time) {
|
||||
|
||||
$drawer = $this->getDrawer();
|
||||
|
||||
$label = new awLabel;
|
||||
$label->set("(".sprintf("%.3f", $time)." s)");
|
||||
$label->setAlign(awLabel::LEFT, awLabel::TOP);
|
||||
$label->border->show();
|
||||
$label->setPadding(1, 0, 0, 0);
|
||||
$label->setBackgroundColor(new awColor(230, 230, 230, 25));
|
||||
|
||||
$label->draw($drawer, new awPoint(5, $drawer->height - 5));
|
||||
|
||||
}
|
||||
|
||||
private static function cleanGraphCache($file) {
|
||||
|
||||
list(
|
||||
$time,
|
||||
$type
|
||||
) = explode("\n", file_get_contents($file));
|
||||
|
||||
$time = (int)$time;
|
||||
|
||||
if($time !== 0 and $time < time()) {
|
||||
return NULL;
|
||||
} else {
|
||||
return $type;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
registerClass('Graph');
|
||||
|
||||
/*
|
||||
* To preserve PHP 4 compatibility
|
||||
*/
|
||||
function microtimeFloat() {
|
||||
list($usec, $sec) = explode(" ", microtime());
|
||||
return (float)$usec + (float)$sec;
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/*
|
||||
* This work is hereby released into the Public Domain.
|
||||
* To view a copy of the public domain dedication,
|
||||
* visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
|
||||
* Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
// Artichow configuration
|
||||
/* <php5> */
|
||||
if(is_file(dirname(__FILE__)."/Artichow.cfg.php")) { // For PHP 4+5 version
|
||||
require_once dirname(__FILE__)."/Artichow.cfg.php";
|
||||
}
|
||||
/* </php5> */
|
||||
|
||||
// Some useful files
|
||||
require_once ARTICHOW."/common.php";
|
||||
require_once ARTICHOW."/Component.class.php";
|
||||
require_once ARTICHOW."/Image.class.php";
|
||||
|
||||
require_once ARTICHOW."/inc/Grid.class.php";
|
||||
require_once ARTICHOW."/inc/Tools.class.php";
|
||||
require_once ARTICHOW."/inc/Drawer.class.php";
|
||||
require_once ARTICHOW."/inc/Math.class.php";
|
||||
require_once ARTICHOW."/inc/Tick.class.php";
|
||||
require_once ARTICHOW."/inc/Axis.class.php";
|
||||
require_once ARTICHOW."/inc/Legend.class.php";
|
||||
require_once ARTICHOW."/inc/Mark.class.php";
|
||||
require_once ARTICHOW."/inc/Label.class.php";
|
||||
require_once ARTICHOW."/inc/Text.class.php";
|
||||
require_once ARTICHOW."/inc/Color.class.php";
|
||||
require_once ARTICHOW."/inc/Font.class.php";
|
||||
require_once ARTICHOW."/inc/Gradient.class.php";
|
||||
|
||||
/**
|
||||
* A graph
|
||||
*
|
||||
* @package Artichow
|
||||
*/
|
||||
class awGraph extends awImage {
|
||||
|
||||
/**
|
||||
* Graph name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $name;
|
||||
|
||||
/**
|
||||
* Cache timeout
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $timeout = 0;
|
||||
|
||||
/**
|
||||
* Graph timing ?
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $timing;
|
||||
|
||||
/**
|
||||
* Components
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $components = array();
|
||||
|
||||
/**
|
||||
* Some labels to add to the component
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $labels = array();
|
||||
|
||||
/**
|
||||
* Graph title
|
||||
*
|
||||
* @var Label
|
||||
*/
|
||||
public $title;
|
||||
|
||||
/**
|
||||
* Construct a new graph
|
||||
*
|
||||
* @param int $width Graph width
|
||||
* @param int $height Graph height
|
||||
* @param string $name Graph name for the cache (must be unique). Let it null to not use the cache.
|
||||
* @param int $timeout Cache timeout (unix timestamp)
|
||||
*/
|
||||
public function __construct($width = NULL, $height = NULL, $name = NULL, $timeout = 0) {
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->setSize($width, $height);
|
||||
|
||||
if(ARTICHOW_CACHE) {
|
||||
|
||||
$this->name = $name;
|
||||
$this->timeout = $timeout;
|
||||
|
||||
// Clean sometimes all the cache
|
||||
if(mt_rand(0, 5000) === 0) {
|
||||
awGraph::cleanCache();
|
||||
}
|
||||
|
||||
if($this->name !== NULL) {
|
||||
|
||||
$file = ARTICHOW_CACHE_DIRECTORY."/".$this->name."-time";
|
||||
|
||||
if(is_file($file)) {
|
||||
|
||||
$type = awGraph::cleanGraphCache($file);
|
||||
|
||||
if($type === NULL) {
|
||||
awGraph::deleteFromCache($this->name);
|
||||
} else {
|
||||
header("Content-Type: image/".$type);
|
||||
readfile(ARTICHOW_CACHE_DIRECTORY."/".$this->name."");
|
||||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->title = new awLabel(
|
||||
NULL,
|
||||
new awTuffy(16),
|
||||
NULL,
|
||||
0
|
||||
);
|
||||
$this->title->setAlign(awLabel::CENTER, awLabel::BOTTOM);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a graph from the cache
|
||||
*
|
||||
* @param string $name Graph name
|
||||
* @return bool TRUE on success, FALSE on failure
|
||||
*/
|
||||
public static function deleteFromCache($name) {
|
||||
|
||||
if(ARTICHOW_CACHE) {
|
||||
|
||||
if(is_file(ARTICHOW_CACHE_DIRECTORY."/".$name."-time")) {
|
||||
unlink(ARTICHOW_CACHE_DIRECTORY."/".$name."");
|
||||
unlink(ARTICHOW_CACHE_DIRECTORY."/".$name."-time");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all graphs from the cache
|
||||
*/
|
||||
public static function deleteAllCache() {
|
||||
|
||||
if(ARTICHOW_CACHE) {
|
||||
|
||||
$dp = opendir(ARTICHOW_CACHE_DIRECTORY);
|
||||
|
||||
while($file = readdir($dp)) {
|
||||
if($file !== '.' and $file != '..') {
|
||||
unlink(ARTICHOW_CACHE_DIRECTORY."/".$file);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean cache
|
||||
*/
|
||||
public static function cleanCache() {
|
||||
|
||||
if(ARTICHOW_CACHE) {
|
||||
|
||||
$glob = glob(ARTICHOW_CACHE_DIRECTORY."/*-time");
|
||||
|
||||
foreach($glob as $file) {
|
||||
|
||||
$type = awGraph::cleanGraphCache($file);
|
||||
|
||||
if($type === NULL) {
|
||||
$name = preg_replace("/.*\/(.*)\-time/", "\\1", $file);
|
||||
awGraph::deleteFromCache($name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/Disable Graph timing
|
||||
*
|
||||
* @param bool $timing
|
||||
*/
|
||||
public function setTiming($timing) {
|
||||
$this->timing = (bool)$timing;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a component to the graph
|
||||
*
|
||||
* @param awComponent $component
|
||||
*/
|
||||
public function add(awComponent $component) {
|
||||
|
||||
$this->components[] = $component;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a label to the component
|
||||
*
|
||||
* @param awLabel $label
|
||||
* @param int $x Position on X axis of the center of the text
|
||||
* @param int $y Position on Y axis of the center of the text
|
||||
*/
|
||||
public function addLabel(awLabel $label, $x, $y) {
|
||||
|
||||
$this->labels[] = array(
|
||||
$label, $x, $y
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a label to the component with aboslute position
|
||||
*
|
||||
* @param awLabel $label
|
||||
* @param awPoint $point Text position
|
||||
*/
|
||||
public function addAbsLabel(awLabel $label, awPoint $point) {
|
||||
|
||||
$this->labels[] = array(
|
||||
$label, $point
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the graph and draw component on it
|
||||
* Image is sent to the user browser
|
||||
*
|
||||
* @param string $file Save the image in the specified file. Let it null to print image to screen.
|
||||
*/
|
||||
public function draw($file = NULL) {
|
||||
|
||||
if($this->timing) {
|
||||
$time = microtimeFloat();
|
||||
}
|
||||
|
||||
$this->create();
|
||||
|
||||
foreach($this->components as $component) {
|
||||
|
||||
$this->drawComponent($component);
|
||||
|
||||
}
|
||||
|
||||
$this->drawTitle();
|
||||
$this->drawShadow();
|
||||
$this->drawLabels();
|
||||
|
||||
if($this->timing) {
|
||||
$this->drawTiming(microtimeFloat() - $time);
|
||||
}
|
||||
|
||||
if(ARTICHOW_CACHE and $this->name !== NULL) {
|
||||
ob_start();
|
||||
}
|
||||
|
||||
$this->send($file);
|
||||
|
||||
if(ARTICHOW_CACHE and $this->name !== NULL) {
|
||||
|
||||
$data = ob_get_contents();
|
||||
|
||||
if(is_writable(ARTICHOW_CACHE_DIRECTORY) === FALSE) {
|
||||
trigger_error("Cache directory is not writable");
|
||||
}
|
||||
|
||||
$file = ARTICHOW_CACHE_DIRECTORY."/".$this->name."";
|
||||
file_put_contents($file, $data);
|
||||
|
||||
$file .= "-time";
|
||||
file_put_contents($file, $this->timeout."\n".$this->getFormat());
|
||||
|
||||
ob_clean();
|
||||
|
||||
echo $data;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function drawLabels() {
|
||||
|
||||
$drawer = $this->getDrawer();
|
||||
|
||||
foreach($this->labels as $array) {
|
||||
|
||||
if(count($array) === 3) {
|
||||
|
||||
// Text in relative position
|
||||
list($label, $x, $y) = $array;
|
||||
|
||||
$point = new awPoint(
|
||||
$x * $this->width,
|
||||
$y * $this->height
|
||||
);
|
||||
|
||||
} else {
|
||||
|
||||
// Text in absolute position
|
||||
list($label, $point) = $array;
|
||||
|
||||
}
|
||||
|
||||
$label->draw($drawer, $point);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function drawTitle() {
|
||||
|
||||
$drawer = $this->getDrawer();
|
||||
|
||||
$point = new awPoint(
|
||||
$this->width / 2,
|
||||
10
|
||||
);
|
||||
|
||||
$this->title->draw($drawer, $point);
|
||||
|
||||
}
|
||||
|
||||
private function drawTiming($time) {
|
||||
|
||||
$drawer = $this->getDrawer();
|
||||
|
||||
$label = new awLabel;
|
||||
$label->set("(".sprintf("%.3f", $time)." s)");
|
||||
$label->setAlign(awLabel::LEFT, awLabel::TOP);
|
||||
$label->border->show();
|
||||
$label->setPadding(1, 0, 0, 0);
|
||||
$label->setBackgroundColor(new awColor(230, 230, 230, 25));
|
||||
|
||||
$label->draw($drawer, new awPoint(5, $drawer->height - 5));
|
||||
|
||||
}
|
||||
|
||||
private static function cleanGraphCache($file) {
|
||||
|
||||
list(
|
||||
$time,
|
||||
$type
|
||||
) = explode("\n", file_get_contents($file));
|
||||
|
||||
$time = (int)$time;
|
||||
|
||||
if($time !== 0 and $time < time()) {
|
||||
return NULL;
|
||||
} else {
|
||||
return $type;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
registerClass('Graph');
|
||||
|
||||
/*
|
||||
* To preserve PHP 4 compatibility
|
||||
*/
|
||||
function microtimeFloat() {
|
||||
list($usec, $sec) = explode(" ", microtime());
|
||||
return (float)$usec + (float)$sec;
|
||||
}
|
||||
?>
|
||||
|
||||
@ -98,7 +98,7 @@ class box_contracts extends ModeleBoxes {
|
||||
|
||||
$contractstatic->statut=$objp->fk_statut;
|
||||
$contractstatic->id=$objp->rowid;
|
||||
$result=$contractstatic->fetch_lines();
|
||||
$result=$contractstatic->fetch_lignes();
|
||||
|
||||
// fin_validite is no more on contract but on services
|
||||
// if ($objp->fk_statut == 1 && $dateterm < ($now - $conf->contrat->cloture->warning_delay)) { $late = img_warning($langs->trans("Late")); }
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
_samples
|
||||
_testcases
|
||||
_samples
|
||||
_testcases
|
||||
|
||||
@ -1 +1 @@
|
||||
_sources
|
||||
_sources
|
||||
|
||||
@ -1,148 +1,148 @@
|
||||
<cfsetting enablecfoutputonly="true">
|
||||
<!---
|
||||
This code uses a CF User Defined Function and should work in CF version 5.0
|
||||
and up without alteration.
|
||||
|
||||
Also if you are hosting your site at an ISP, you will have to check with them
|
||||
to see if the use of <CFEXECUTE> is allowed. In most cases ISP will not allow
|
||||
the use of that tag for security reasons. Clients would be able to access each
|
||||
others files in certain cases.
|
||||
--->
|
||||
|
||||
<!--- The following variables values must reflect your installation. --->
|
||||
<cfset aspell_dir = "C:\Program Files\Aspell\bin">
|
||||
<cfset lang = "en_US">
|
||||
<cfset aspell_opts = "-a --lang=#lang# --encoding=utf-8 -H --rem-sgml-check=alt">
|
||||
<cfset tempfile_in = GetTempFile(GetTempDirectory(), "spell_")>
|
||||
<cfset tempfile_out = GetTempFile(GetTempDirectory(), "spell_")>
|
||||
<cfset spellercss = "../spellerStyle.css">
|
||||
<cfset word_win_src = "../wordWindow.js">
|
||||
|
||||
<cfset form.checktext = form["textinputs[]"]>
|
||||
|
||||
<!--- make no difference between URL and FORM scopes --->
|
||||
<cfparam name="url.checktext" default="">
|
||||
<cfparam name="form.checktext" default="#url.checktext#">
|
||||
|
||||
<!--- Takes care of those pesky smart quotes from MS apps, replaces them with regular quotes --->
|
||||
<cfset submitted_text = ReplaceList(form.checktext,"%u201C,%u201D","%22,%22")>
|
||||
|
||||
<!--- submitted_text now is ready for processing --->
|
||||
|
||||
<!--- use carat on each line to escape possible aspell commands --->
|
||||
<cfset text = "">
|
||||
<cfset CRLF = Chr(13) & Chr(10)>
|
||||
|
||||
<cfloop list="#submitted_text#" index="field" delimiters=",">
|
||||
<cfset text = text & "%" & CRLF
|
||||
& "^A" & CRLF
|
||||
& "!" & CRLF>
|
||||
<!--- Strip all tags for the text. (by FredCK - #339 / #681) --->
|
||||
<cfset field = REReplace(URLDecode(field), "<[^>]+>", " ", "all")>
|
||||
<cfloop list="#field#" index="line" delimiters="#CRLF#">
|
||||
<cfset text = ListAppend(text, "^" & Trim(JSStringFormat(line)), CRLF)>
|
||||
</cfloop>
|
||||
</cfloop>
|
||||
|
||||
<!--- create temp file from the submitted text, this will be passed to aspell to be check for misspelled words --->
|
||||
<cffile action="write" file="#tempfile_in#" output="#text#" charset="utf-8">
|
||||
|
||||
<!--- execute aspell in an UTF-8 console and redirect output to a file. UTF-8 encoding is lost if done differently --->
|
||||
<cfexecute name="cmd.exe" arguments='/c type "#tempfile_in#" | "#aspell_dir#\aspell.exe" #aspell_opts# > "#tempfile_out#"' timeout="100"/>
|
||||
|
||||
<!--- read output file for further processing --->
|
||||
<cffile action="read" file="#tempfile_out#" variable="food" charset="utf-8">
|
||||
|
||||
<!--- remove temp files --->
|
||||
<cffile action="delete" file="#tempfile_in#">
|
||||
<cffile action="delete" file="#tempfile_out#">
|
||||
|
||||
<cfset texts = StructNew()>
|
||||
<cfset texts.textinputs = "">
|
||||
<cfset texts.words = "">
|
||||
<cfset texts.abort = "">
|
||||
|
||||
<!--- Generate Text Inputs --->
|
||||
<cfset i = 0>
|
||||
<cfloop list="#submitted_text#" index="textinput">
|
||||
<cfset texts.textinputs = ListAppend(texts.textinputs, 'textinputs[#i#] = decodeURIComponent("#textinput#");', CRLF)>
|
||||
<cfset i = i + 1>
|
||||
</cfloop>
|
||||
|
||||
<!--- Generate Words Lists --->
|
||||
<cfset word_cnt = 0>
|
||||
<cfset input_cnt = -1>
|
||||
<cfloop list="#food#" index="aspell_line" delimiters="#CRLF#">
|
||||
<cfset leftChar = Left(aspell_line, 1)>
|
||||
<cfif leftChar eq "*">
|
||||
<cfset input_cnt = input_cnt + 1>
|
||||
<cfset word_cnt = 0>
|
||||
<cfset texts.words = ListAppend(texts.words, "words[#input_cnt#] = [];", CRLF)>
|
||||
<cfset texts.words = ListAppend(texts.words, "suggs[#input_cnt#] = [];", CRLF)>
|
||||
<cfelse>
|
||||
<cfif leftChar eq "&" or leftChar eq "##">
|
||||
<!--- word that misspelled --->
|
||||
<cfset bad_word = Trim(ListGetAt(aspell_line, 2, " "))>
|
||||
<cfset bad_word = Replace(bad_word, "'", "\'", "ALL")>
|
||||
<!--- sugestions --->
|
||||
<cfset sug_list = Trim(ListRest(aspell_line, ":"))>
|
||||
<cfset sug_list = ListQualify(Replace(sug_list, "'", "\'", "ALL"), "'")>
|
||||
<!--- javascript --->
|
||||
<cfset texts.words = ListAppend(texts.words, "words[#input_cnt#][#word_cnt#] = '#bad_word#';", CRLF)>
|
||||
<cfset texts.words = ListAppend(texts.words, "suggs[#input_cnt#][#word_cnt#] = [#sug_list#];", CRLF)>
|
||||
<cfset word_cnt = word_cnt + 1>
|
||||
</cfif>
|
||||
</cfif>
|
||||
</cfloop>
|
||||
|
||||
<cfif texts.words eq "">
|
||||
<cfset texts.abort = "alert('Spell check complete.\n\nNo misspellings found.'); top.window.close();">
|
||||
</cfif>
|
||||
|
||||
<cfcontent type="text/html; charset=utf-8">
|
||||
|
||||
<cfoutput><html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" type="text/css" href="#spellercss#" />
|
||||
<script language="javascript" src="#word_win_src#"></script>
|
||||
<script language="javascript">
|
||||
var suggs = new Array();
|
||||
var words = new Array();
|
||||
var textinputs = new Array();
|
||||
var error;
|
||||
|
||||
#texts.textinputs##CRLF#
|
||||
#texts.words#
|
||||
#texts.abort#
|
||||
|
||||
var wordWindowObj = new wordWindow();
|
||||
wordWindowObj.originalSpellings = words;
|
||||
wordWindowObj.suggestions = suggs;
|
||||
wordWindowObj.textInputs = textinputs;
|
||||
|
||||
function init_spell() {
|
||||
// check if any error occured during server-side processing
|
||||
if( error ) {
|
||||
alert( error );
|
||||
} else {
|
||||
// call the init_spell() function in the parent frameset
|
||||
if (parent.frames.length) {
|
||||
parent.init_spell( wordWindowObj );
|
||||
} else {
|
||||
alert('This page was loaded outside of a frameset. It might not display properly');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onLoad="init_spell();">
|
||||
|
||||
<script type="text/javascript">
|
||||
wordWindowObj.writeBody();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html></cfoutput>
|
||||
<cfsetting enablecfoutputonly="false">
|
||||
<cfsetting enablecfoutputonly="true">
|
||||
<!---
|
||||
This code uses a CF User Defined Function and should work in CF version 5.0
|
||||
and up without alteration.
|
||||
|
||||
Also if you are hosting your site at an ISP, you will have to check with them
|
||||
to see if the use of <CFEXECUTE> is allowed. In most cases ISP will not allow
|
||||
the use of that tag for security reasons. Clients would be able to access each
|
||||
others files in certain cases.
|
||||
--->
|
||||
|
||||
<!--- The following variables values must reflect your installation. --->
|
||||
<cfset aspell_dir = "C:\Program Files\Aspell\bin">
|
||||
<cfset lang = "en_US">
|
||||
<cfset aspell_opts = "-a --lang=#lang# --encoding=utf-8 -H --rem-sgml-check=alt">
|
||||
<cfset tempfile_in = GetTempFile(GetTempDirectory(), "spell_")>
|
||||
<cfset tempfile_out = GetTempFile(GetTempDirectory(), "spell_")>
|
||||
<cfset spellercss = "../spellerStyle.css">
|
||||
<cfset word_win_src = "../wordWindow.js">
|
||||
|
||||
<cfset form.checktext = form["textinputs[]"]>
|
||||
|
||||
<!--- make no difference between URL and FORM scopes --->
|
||||
<cfparam name="url.checktext" default="">
|
||||
<cfparam name="form.checktext" default="#url.checktext#">
|
||||
|
||||
<!--- Takes care of those pesky smart quotes from MS apps, replaces them with regular quotes --->
|
||||
<cfset submitted_text = ReplaceList(form.checktext,"%u201C,%u201D","%22,%22")>
|
||||
|
||||
<!--- submitted_text now is ready for processing --->
|
||||
|
||||
<!--- use carat on each line to escape possible aspell commands --->
|
||||
<cfset text = "">
|
||||
<cfset CRLF = Chr(13) & Chr(10)>
|
||||
|
||||
<cfloop list="#submitted_text#" index="field" delimiters=",">
|
||||
<cfset text = text & "%" & CRLF
|
||||
& "^A" & CRLF
|
||||
& "!" & CRLF>
|
||||
<!--- Strip all tags for the text. (by FredCK - #339 / #681) --->
|
||||
<cfset field = REReplace(URLDecode(field), "<[^>]+>", " ", "all")>
|
||||
<cfloop list="#field#" index="line" delimiters="#CRLF#">
|
||||
<cfset text = ListAppend(text, "^" & Trim(JSStringFormat(line)), CRLF)>
|
||||
</cfloop>
|
||||
</cfloop>
|
||||
|
||||
<!--- create temp file from the submitted text, this will be passed to aspell to be check for misspelled words --->
|
||||
<cffile action="write" file="#tempfile_in#" output="#text#" charset="utf-8">
|
||||
|
||||
<!--- execute aspell in an UTF-8 console and redirect output to a file. UTF-8 encoding is lost if done differently --->
|
||||
<cfexecute name="cmd.exe" arguments='/c type "#tempfile_in#" | "#aspell_dir#\aspell.exe" #aspell_opts# > "#tempfile_out#"' timeout="100"/>
|
||||
|
||||
<!--- read output file for further processing --->
|
||||
<cffile action="read" file="#tempfile_out#" variable="food" charset="utf-8">
|
||||
|
||||
<!--- remove temp files --->
|
||||
<cffile action="delete" file="#tempfile_in#">
|
||||
<cffile action="delete" file="#tempfile_out#">
|
||||
|
||||
<cfset texts = StructNew()>
|
||||
<cfset texts.textinputs = "">
|
||||
<cfset texts.words = "">
|
||||
<cfset texts.abort = "">
|
||||
|
||||
<!--- Generate Text Inputs --->
|
||||
<cfset i = 0>
|
||||
<cfloop list="#submitted_text#" index="textinput">
|
||||
<cfset texts.textinputs = ListAppend(texts.textinputs, 'textinputs[#i#] = decodeURIComponent("#textinput#");', CRLF)>
|
||||
<cfset i = i + 1>
|
||||
</cfloop>
|
||||
|
||||
<!--- Generate Words Lists --->
|
||||
<cfset word_cnt = 0>
|
||||
<cfset input_cnt = -1>
|
||||
<cfloop list="#food#" index="aspell_line" delimiters="#CRLF#">
|
||||
<cfset leftChar = Left(aspell_line, 1)>
|
||||
<cfif leftChar eq "*">
|
||||
<cfset input_cnt = input_cnt + 1>
|
||||
<cfset word_cnt = 0>
|
||||
<cfset texts.words = ListAppend(texts.words, "words[#input_cnt#] = [];", CRLF)>
|
||||
<cfset texts.words = ListAppend(texts.words, "suggs[#input_cnt#] = [];", CRLF)>
|
||||
<cfelse>
|
||||
<cfif leftChar eq "&" or leftChar eq "##">
|
||||
<!--- word that misspelled --->
|
||||
<cfset bad_word = Trim(ListGetAt(aspell_line, 2, " "))>
|
||||
<cfset bad_word = Replace(bad_word, "'", "\'", "ALL")>
|
||||
<!--- sugestions --->
|
||||
<cfset sug_list = Trim(ListRest(aspell_line, ":"))>
|
||||
<cfset sug_list = ListQualify(Replace(sug_list, "'", "\'", "ALL"), "'")>
|
||||
<!--- javascript --->
|
||||
<cfset texts.words = ListAppend(texts.words, "words[#input_cnt#][#word_cnt#] = '#bad_word#';", CRLF)>
|
||||
<cfset texts.words = ListAppend(texts.words, "suggs[#input_cnt#][#word_cnt#] = [#sug_list#];", CRLF)>
|
||||
<cfset word_cnt = word_cnt + 1>
|
||||
</cfif>
|
||||
</cfif>
|
||||
</cfloop>
|
||||
|
||||
<cfif texts.words eq "">
|
||||
<cfset texts.abort = "alert('Spell check complete.\n\nNo misspellings found.'); top.window.close();">
|
||||
</cfif>
|
||||
|
||||
<cfcontent type="text/html; charset=utf-8">
|
||||
|
||||
<cfoutput><html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" type="text/css" href="#spellercss#" />
|
||||
<script language="javascript" src="#word_win_src#"></script>
|
||||
<script language="javascript">
|
||||
var suggs = new Array();
|
||||
var words = new Array();
|
||||
var textinputs = new Array();
|
||||
var error;
|
||||
|
||||
#texts.textinputs##CRLF#
|
||||
#texts.words#
|
||||
#texts.abort#
|
||||
|
||||
var wordWindowObj = new wordWindow();
|
||||
wordWindowObj.originalSpellings = words;
|
||||
wordWindowObj.suggestions = suggs;
|
||||
wordWindowObj.textInputs = textinputs;
|
||||
|
||||
function init_spell() {
|
||||
// check if any error occured during server-side processing
|
||||
if( error ) {
|
||||
alert( error );
|
||||
} else {
|
||||
// call the init_spell() function in the parent frameset
|
||||
if (parent.frames.length) {
|
||||
parent.init_spell( wordWindowObj );
|
||||
} else {
|
||||
alert('This page was loaded outside of a frameset. It might not display properly');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onLoad="init_spell();">
|
||||
|
||||
<script type="text/javascript">
|
||||
wordWindowObj.writeBody();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html></cfoutput>
|
||||
<cfsetting enablecfoutputonly="false">
|
||||
|
||||
@ -1,181 +1,181 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use CGI qw/ :standard /;
|
||||
use File::Temp qw/ tempfile tempdir /;
|
||||
|
||||
# my $spellercss = '/speller/spellerStyle.css'; # by FredCK
|
||||
my $spellercss = '../spellerStyle.css'; # by FredCK
|
||||
# my $wordWindowSrc = '/speller/wordWindow.js'; # by FredCK
|
||||
my $wordWindowSrc = '../wordWindow.js'; # by FredCK
|
||||
my @textinputs = param( 'textinputs[]' ); # array
|
||||
# my $aspell_cmd = 'aspell'; # by FredCK (for Linux)
|
||||
my $aspell_cmd = '"C:\Program Files\Aspell\bin\aspell.exe"'; # by FredCK (for Windows)
|
||||
my $lang = 'en_US';
|
||||
# my $aspell_opts = "-a --lang=$lang --encoding=utf-8"; # by FredCK
|
||||
my $aspell_opts = "-a --lang=$lang --encoding=utf-8 -H --rem-sgml-check=alt"; # by FredCK
|
||||
my $input_separator = "A";
|
||||
|
||||
# set the 'wordtext' JavaScript variable to the submitted text.
|
||||
sub printTextVar {
|
||||
for( my $i = 0; $i <= $#textinputs; $i++ ) {
|
||||
print "textinputs[$i] = decodeURIComponent('" . escapeQuote( $textinputs[$i] ) . "')\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub printTextIdxDecl {
|
||||
my $idx = shift;
|
||||
print "words[$idx] = [];\n";
|
||||
print "suggs[$idx] = [];\n";
|
||||
}
|
||||
|
||||
sub printWordsElem {
|
||||
my( $textIdx, $wordIdx, $word ) = @_;
|
||||
print "words[$textIdx][$wordIdx] = '" . escapeQuote( $word ) . "';\n";
|
||||
}
|
||||
|
||||
sub printSuggsElem {
|
||||
my( $textIdx, $wordIdx, @suggs ) = @_;
|
||||
print "suggs[$textIdx][$wordIdx] = [";
|
||||
for my $i ( 0..$#suggs ) {
|
||||
print "'" . escapeQuote( $suggs[$i] ) . "'";
|
||||
if( $i < $#suggs ) {
|
||||
print ", ";
|
||||
}
|
||||
}
|
||||
print "];\n";
|
||||
}
|
||||
|
||||
sub printCheckerResults {
|
||||
my $textInputIdx = -1;
|
||||
my $wordIdx = 0;
|
||||
my $unhandledText;
|
||||
# create temp file
|
||||
my $dir = tempdir( CLEANUP => 1 );
|
||||
my( $fh, $tmpfilename ) = tempfile( DIR => $dir );
|
||||
|
||||
# temp file was created properly?
|
||||
|
||||
# open temp file, add the submitted text.
|
||||
for( my $i = 0; $i <= $#textinputs; $i++ ) {
|
||||
$text = url_decode( $textinputs[$i] );
|
||||
# Strip all tags for the text. (by FredCK - #339 / #681)
|
||||
$text =~ s/<[^>]+>/ /g;
|
||||
@lines = split( /\n/, $text );
|
||||
print $fh "\%\n"; # exit terse mode
|
||||
print $fh "^$input_separator\n";
|
||||
print $fh "!\n"; # enter terse mode
|
||||
for my $line ( @lines ) {
|
||||
# use carat on each line to escape possible aspell commands
|
||||
print $fh "^$line\n";
|
||||
}
|
||||
|
||||
}
|
||||
# exec aspell command
|
||||
my $cmd = "$aspell_cmd $aspell_opts < $tmpfilename 2>&1";
|
||||
open ASPELL, "$cmd |" or handleError( "Could not execute `$cmd`\\n$!" ) and return;
|
||||
# parse each line of aspell return
|
||||
for my $ret ( <ASPELL> ) {
|
||||
chomp( $ret );
|
||||
# if '&', then not in dictionary but has suggestions
|
||||
# if '#', then not in dictionary and no suggestions
|
||||
# if '*', then it is a delimiter between text inputs
|
||||
if( $ret =~ /^\*/ ) {
|
||||
$textInputIdx++;
|
||||
printTextIdxDecl( $textInputIdx );
|
||||
$wordIdx = 0;
|
||||
|
||||
} elsif( $ret =~ /^(&|#)/ ) {
|
||||
my @tokens = split( " ", $ret, 5 );
|
||||
printWordsElem( $textInputIdx, $wordIdx, $tokens[1] );
|
||||
my @suggs = ();
|
||||
if( $tokens[4] ) {
|
||||
@suggs = split( ", ", $tokens[4] );
|
||||
}
|
||||
printSuggsElem( $textInputIdx, $wordIdx, @suggs );
|
||||
$wordIdx++;
|
||||
} else {
|
||||
$unhandledText .= $ret;
|
||||
}
|
||||
}
|
||||
close ASPELL or handleError( "Error executing `$cmd`\\n$unhandledText" ) and return;
|
||||
}
|
||||
|
||||
sub escapeQuote {
|
||||
my $str = shift;
|
||||
$str =~ s/'/\\'/g;
|
||||
return $str;
|
||||
}
|
||||
|
||||
sub handleError {
|
||||
my $err = shift;
|
||||
print "error = '" . escapeQuote( $err ) . "';\n";
|
||||
}
|
||||
|
||||
sub url_decode {
|
||||
local $_ = @_ ? shift : $_;
|
||||
defined or return;
|
||||
# change + signs to spaces
|
||||
tr/+/ /;
|
||||
# change hex escapes to the proper characters
|
||||
s/%([a-fA-F0-9]{2})/pack "H2", $1/eg;
|
||||
return $_;
|
||||
}
|
||||
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# Display HTML
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
|
||||
print <<EOF;
|
||||
Content-type: text/html; charset=utf-8
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" type="text/css" href="$spellercss"/>
|
||||
<script src="$wordWindowSrc"></script>
|
||||
<script type="text/javascript">
|
||||
var suggs = new Array();
|
||||
var words = new Array();
|
||||
var textinputs = new Array();
|
||||
var error;
|
||||
EOF
|
||||
|
||||
printTextVar();
|
||||
|
||||
printCheckerResults();
|
||||
|
||||
print <<EOF;
|
||||
var wordWindowObj = new wordWindow();
|
||||
wordWindowObj.originalSpellings = words;
|
||||
wordWindowObj.suggestions = suggs;
|
||||
wordWindowObj.textInputs = textinputs;
|
||||
|
||||
|
||||
function init_spell() {
|
||||
// check if any error occured during server-side processing
|
||||
if( error ) {
|
||||
alert( error );
|
||||
} else {
|
||||
// call the init_spell() function in the parent frameset
|
||||
if (parent.frames.length) {
|
||||
parent.init_spell( wordWindowObj );
|
||||
} else {
|
||||
error = "This page was loaded outside of a frameset. ";
|
||||
error += "It might not display properly";
|
||||
alert( error );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onLoad="init_spell();">
|
||||
|
||||
<script type="text/javascript">
|
||||
wordWindowObj.writeBody();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
#!/usr/bin/perl
|
||||
|
||||
use CGI qw/ :standard /;
|
||||
use File::Temp qw/ tempfile tempdir /;
|
||||
|
||||
# my $spellercss = '/speller/spellerStyle.css'; # by FredCK
|
||||
my $spellercss = '../spellerStyle.css'; # by FredCK
|
||||
# my $wordWindowSrc = '/speller/wordWindow.js'; # by FredCK
|
||||
my $wordWindowSrc = '../wordWindow.js'; # by FredCK
|
||||
my @textinputs = param( 'textinputs[]' ); # array
|
||||
# my $aspell_cmd = 'aspell'; # by FredCK (for Linux)
|
||||
my $aspell_cmd = '"C:\Program Files\Aspell\bin\aspell.exe"'; # by FredCK (for Windows)
|
||||
my $lang = 'en_US';
|
||||
# my $aspell_opts = "-a --lang=$lang --encoding=utf-8"; # by FredCK
|
||||
my $aspell_opts = "-a --lang=$lang --encoding=utf-8 -H --rem-sgml-check=alt"; # by FredCK
|
||||
my $input_separator = "A";
|
||||
|
||||
# set the 'wordtext' JavaScript variable to the submitted text.
|
||||
sub printTextVar {
|
||||
for( my $i = 0; $i <= $#textinputs; $i++ ) {
|
||||
print "textinputs[$i] = decodeURIComponent('" . escapeQuote( $textinputs[$i] ) . "')\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub printTextIdxDecl {
|
||||
my $idx = shift;
|
||||
print "words[$idx] = [];\n";
|
||||
print "suggs[$idx] = [];\n";
|
||||
}
|
||||
|
||||
sub printWordsElem {
|
||||
my( $textIdx, $wordIdx, $word ) = @_;
|
||||
print "words[$textIdx][$wordIdx] = '" . escapeQuote( $word ) . "';\n";
|
||||
}
|
||||
|
||||
sub printSuggsElem {
|
||||
my( $textIdx, $wordIdx, @suggs ) = @_;
|
||||
print "suggs[$textIdx][$wordIdx] = [";
|
||||
for my $i ( 0..$#suggs ) {
|
||||
print "'" . escapeQuote( $suggs[$i] ) . "'";
|
||||
if( $i < $#suggs ) {
|
||||
print ", ";
|
||||
}
|
||||
}
|
||||
print "];\n";
|
||||
}
|
||||
|
||||
sub printCheckerResults {
|
||||
my $textInputIdx = -1;
|
||||
my $wordIdx = 0;
|
||||
my $unhandledText;
|
||||
# create temp file
|
||||
my $dir = tempdir( CLEANUP => 1 );
|
||||
my( $fh, $tmpfilename ) = tempfile( DIR => $dir );
|
||||
|
||||
# temp file was created properly?
|
||||
|
||||
# open temp file, add the submitted text.
|
||||
for( my $i = 0; $i <= $#textinputs; $i++ ) {
|
||||
$text = url_decode( $textinputs[$i] );
|
||||
# Strip all tags for the text. (by FredCK - #339 / #681)
|
||||
$text =~ s/<[^>]+>/ /g;
|
||||
@lines = split( /\n/, $text );
|
||||
print $fh "\%\n"; # exit terse mode
|
||||
print $fh "^$input_separator\n";
|
||||
print $fh "!\n"; # enter terse mode
|
||||
for my $line ( @lines ) {
|
||||
# use carat on each line to escape possible aspell commands
|
||||
print $fh "^$line\n";
|
||||
}
|
||||
|
||||
}
|
||||
# exec aspell command
|
||||
my $cmd = "$aspell_cmd $aspell_opts < $tmpfilename 2>&1";
|
||||
open ASPELL, "$cmd |" or handleError( "Could not execute `$cmd`\\n$!" ) and return;
|
||||
# parse each line of aspell return
|
||||
for my $ret ( <ASPELL> ) {
|
||||
chomp( $ret );
|
||||
# if '&', then not in dictionary but has suggestions
|
||||
# if '#', then not in dictionary and no suggestions
|
||||
# if '*', then it is a delimiter between text inputs
|
||||
if( $ret =~ /^\*/ ) {
|
||||
$textInputIdx++;
|
||||
printTextIdxDecl( $textInputIdx );
|
||||
$wordIdx = 0;
|
||||
|
||||
} elsif( $ret =~ /^(&|#)/ ) {
|
||||
my @tokens = split( " ", $ret, 5 );
|
||||
printWordsElem( $textInputIdx, $wordIdx, $tokens[1] );
|
||||
my @suggs = ();
|
||||
if( $tokens[4] ) {
|
||||
@suggs = split( ", ", $tokens[4] );
|
||||
}
|
||||
printSuggsElem( $textInputIdx, $wordIdx, @suggs );
|
||||
$wordIdx++;
|
||||
} else {
|
||||
$unhandledText .= $ret;
|
||||
}
|
||||
}
|
||||
close ASPELL or handleError( "Error executing `$cmd`\\n$unhandledText" ) and return;
|
||||
}
|
||||
|
||||
sub escapeQuote {
|
||||
my $str = shift;
|
||||
$str =~ s/'/\\'/g;
|
||||
return $str;
|
||||
}
|
||||
|
||||
sub handleError {
|
||||
my $err = shift;
|
||||
print "error = '" . escapeQuote( $err ) . "';\n";
|
||||
}
|
||||
|
||||
sub url_decode {
|
||||
local $_ = @_ ? shift : $_;
|
||||
defined or return;
|
||||
# change + signs to spaces
|
||||
tr/+/ /;
|
||||
# change hex escapes to the proper characters
|
||||
s/%([a-fA-F0-9]{2})/pack "H2", $1/eg;
|
||||
return $_;
|
||||
}
|
||||
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# Display HTML
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
|
||||
print <<EOF;
|
||||
Content-type: text/html; charset=utf-8
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" type="text/css" href="$spellercss"/>
|
||||
<script src="$wordWindowSrc"></script>
|
||||
<script type="text/javascript">
|
||||
var suggs = new Array();
|
||||
var words = new Array();
|
||||
var textinputs = new Array();
|
||||
var error;
|
||||
EOF
|
||||
|
||||
printTextVar();
|
||||
|
||||
printCheckerResults();
|
||||
|
||||
print <<EOF;
|
||||
var wordWindowObj = new wordWindow();
|
||||
wordWindowObj.originalSpellings = words;
|
||||
wordWindowObj.suggestions = suggs;
|
||||
wordWindowObj.textInputs = textinputs;
|
||||
|
||||
|
||||
function init_spell() {
|
||||
// check if any error occured during server-side processing
|
||||
if( error ) {
|
||||
alert( error );
|
||||
} else {
|
||||
// call the init_spell() function in the parent frameset
|
||||
if (parent.frames.length) {
|
||||
parent.init_spell( wordWindowObj );
|
||||
} else {
|
||||
error = "This page was loaded outside of a frameset. ";
|
||||
error += "It might not display properly";
|
||||
alert( error );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onLoad="init_spell();">
|
||||
|
||||
<script type="text/javascript">
|
||||
wordWindowObj.writeBody();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
|
||||
@ -1,461 +1,461 @@
|
||||
////////////////////////////////////////////////////
|
||||
// spellChecker.js
|
||||
//
|
||||
// spellChecker object
|
||||
//
|
||||
// This file is sourced on web pages that have a textarea object to evaluate
|
||||
// for spelling. It includes the implementation for the spellCheckObject.
|
||||
//
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// constructor
|
||||
function spellChecker( textObject ) {
|
||||
|
||||
// public properties - configurable
|
||||
// this.popUpUrl = '/speller/spellchecker.html'; // by FredCK
|
||||
this.popUpUrl = 'fck_spellerpages/spellerpages/spellchecker.html'; // by FredCK
|
||||
this.popUpName = 'spellchecker';
|
||||
// this.popUpProps = "menu=no,width=440,height=350,top=70,left=120,resizable=yes,status=yes"; // by FredCK
|
||||
this.popUpProps = null ; // by FredCK
|
||||
// this.spellCheckScript = '/speller/server-scripts/spellchecker.php'; // by FredCK
|
||||
//this.spellCheckScript = '/cgi-bin/spellchecker.pl';
|
||||
|
||||
// values used to keep track of what happened to a word
|
||||
this.replWordFlag = "R"; // single replace
|
||||
this.ignrWordFlag = "I"; // single ignore
|
||||
this.replAllFlag = "RA"; // replace all occurances
|
||||
this.ignrAllFlag = "IA"; // ignore all occurances
|
||||
this.fromReplAll = "~RA"; // an occurance of a "replace all" word
|
||||
this.fromIgnrAll = "~IA"; // an occurance of a "ignore all" word
|
||||
// properties set at run time
|
||||
this.wordFlags = new Array();
|
||||
this.currentTextIndex = 0;
|
||||
this.currentWordIndex = 0;
|
||||
this.spellCheckerWin = null;
|
||||
this.controlWin = null;
|
||||
this.wordWin = null;
|
||||
this.textArea = textObject; // deprecated
|
||||
this.textInputs = arguments;
|
||||
|
||||
// private methods
|
||||
this._spellcheck = _spellcheck;
|
||||
this._getSuggestions = _getSuggestions;
|
||||
this._setAsIgnored = _setAsIgnored;
|
||||
this._getTotalReplaced = _getTotalReplaced;
|
||||
this._setWordText = _setWordText;
|
||||
this._getFormInputs = _getFormInputs;
|
||||
|
||||
// public methods
|
||||
this.openChecker = openChecker;
|
||||
this.startCheck = startCheck;
|
||||
this.checkTextBoxes = checkTextBoxes;
|
||||
this.checkTextAreas = checkTextAreas;
|
||||
this.spellCheckAll = spellCheckAll;
|
||||
this.ignoreWord = ignoreWord;
|
||||
this.ignoreAll = ignoreAll;
|
||||
this.replaceWord = replaceWord;
|
||||
this.replaceAll = replaceAll;
|
||||
this.terminateSpell = terminateSpell;
|
||||
this.undo = undo;
|
||||
|
||||
// set the current window's "speller" property to the instance of this class.
|
||||
// this object can now be referenced by child windows/frames.
|
||||
window.speller = this;
|
||||
}
|
||||
|
||||
// call this method to check all text boxes (and only text boxes) in the HTML document
|
||||
function checkTextBoxes() {
|
||||
this.textInputs = this._getFormInputs( "^text$" );
|
||||
this.openChecker();
|
||||
}
|
||||
|
||||
// call this method to check all textareas (and only textareas ) in the HTML document
|
||||
function checkTextAreas() {
|
||||
this.textInputs = this._getFormInputs( "^textarea$" );
|
||||
this.openChecker();
|
||||
}
|
||||
|
||||
// call this method to check all text boxes and textareas in the HTML document
|
||||
function spellCheckAll() {
|
||||
this.textInputs = this._getFormInputs( "^text(area)?$" );
|
||||
this.openChecker();
|
||||
}
|
||||
|
||||
// call this method to check text boxe(s) and/or textarea(s) that were passed in to the
|
||||
// object's constructor or to the textInputs property
|
||||
function openChecker() {
|
||||
this.spellCheckerWin = window.open( this.popUpUrl, this.popUpName, this.popUpProps );
|
||||
if( !this.spellCheckerWin.opener ) {
|
||||
this.spellCheckerWin.opener = window;
|
||||
}
|
||||
}
|
||||
|
||||
function startCheck( wordWindowObj, controlWindowObj ) {
|
||||
|
||||
// set properties from args
|
||||
this.wordWin = wordWindowObj;
|
||||
this.controlWin = controlWindowObj;
|
||||
|
||||
// reset properties
|
||||
this.wordWin.resetForm();
|
||||
this.controlWin.resetForm();
|
||||
this.currentTextIndex = 0;
|
||||
this.currentWordIndex = 0;
|
||||
// initialize the flags to an array - one element for each text input
|
||||
this.wordFlags = new Array( this.wordWin.textInputs.length );
|
||||
// each element will be an array that keeps track of each word in the text
|
||||
for( var i=0; i<this.wordFlags.length; i++ ) {
|
||||
this.wordFlags[i] = [];
|
||||
}
|
||||
|
||||
// start
|
||||
this._spellcheck();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function ignoreWord() {
|
||||
var wi = this.currentWordIndex;
|
||||
var ti = this.currentTextIndex;
|
||||
if( !this.wordWin ) {
|
||||
alert( 'Error: Word frame not available.' );
|
||||
return false;
|
||||
}
|
||||
if( !this.wordWin.getTextVal( ti, wi )) {
|
||||
alert( 'Error: "Not in dictionary" text is missing.' );
|
||||
return false;
|
||||
}
|
||||
// set as ignored
|
||||
if( this._setAsIgnored( ti, wi, this.ignrWordFlag )) {
|
||||
this.currentWordIndex++;
|
||||
this._spellcheck();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function ignoreAll() {
|
||||
var wi = this.currentWordIndex;
|
||||
var ti = this.currentTextIndex;
|
||||
if( !this.wordWin ) {
|
||||
alert( 'Error: Word frame not available.' );
|
||||
return false;
|
||||
}
|
||||
// get the word that is currently being evaluated.
|
||||
var s_word_to_repl = this.wordWin.getTextVal( ti, wi );
|
||||
if( !s_word_to_repl ) {
|
||||
alert( 'Error: "Not in dictionary" text is missing' );
|
||||
return false;
|
||||
}
|
||||
|
||||
// set this word as an "ignore all" word.
|
||||
this._setAsIgnored( ti, wi, this.ignrAllFlag );
|
||||
|
||||
// loop through all the words after this word
|
||||
for( var i = ti; i < this.wordWin.textInputs.length; i++ ) {
|
||||
for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) {
|
||||
if(( i == ti && j > wi ) || i > ti ) {
|
||||
// future word: set as "from ignore all" if
|
||||
// 1) do not already have a flag and
|
||||
// 2) have the same value as current word
|
||||
if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl )
|
||||
&& ( !this.wordFlags[i][j] )) {
|
||||
this._setAsIgnored( i, j, this.fromIgnrAll );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// finally, move on
|
||||
this.currentWordIndex++;
|
||||
this._spellcheck();
|
||||
return true;
|
||||
}
|
||||
|
||||
function replaceWord() {
|
||||
var wi = this.currentWordIndex;
|
||||
var ti = this.currentTextIndex;
|
||||
if( !this.wordWin ) {
|
||||
alert( 'Error: Word frame not available.' );
|
||||
return false;
|
||||
}
|
||||
if( !this.wordWin.getTextVal( ti, wi )) {
|
||||
alert( 'Error: "Not in dictionary" text is missing' );
|
||||
return false;
|
||||
}
|
||||
if( !this.controlWin.replacementText ) {
|
||||
return false ;
|
||||
}
|
||||
var txt = this.controlWin.replacementText;
|
||||
if( txt.value ) {
|
||||
var newspell = new String( txt.value );
|
||||
if( this._setWordText( ti, wi, newspell, this.replWordFlag )) {
|
||||
this.currentWordIndex++;
|
||||
this._spellcheck();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function replaceAll() {
|
||||
var ti = this.currentTextIndex;
|
||||
var wi = this.currentWordIndex;
|
||||
if( !this.wordWin ) {
|
||||
alert( 'Error: Word frame not available.' );
|
||||
return false;
|
||||
}
|
||||
var s_word_to_repl = this.wordWin.getTextVal( ti, wi );
|
||||
if( !s_word_to_repl ) {
|
||||
alert( 'Error: "Not in dictionary" text is missing' );
|
||||
return false;
|
||||
}
|
||||
var txt = this.controlWin.replacementText;
|
||||
if( !txt.value ) return false;
|
||||
var newspell = new String( txt.value );
|
||||
|
||||
// set this word as a "replace all" word.
|
||||
this._setWordText( ti, wi, newspell, this.replAllFlag );
|
||||
|
||||
// loop through all the words after this word
|
||||
for( var i = ti; i < this.wordWin.textInputs.length; i++ ) {
|
||||
for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) {
|
||||
if(( i == ti && j > wi ) || i > ti ) {
|
||||
// future word: set word text to s_word_to_repl if
|
||||
// 1) do not already have a flag and
|
||||
// 2) have the same value as s_word_to_repl
|
||||
if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl )
|
||||
&& ( !this.wordFlags[i][j] )) {
|
||||
this._setWordText( i, j, newspell, this.fromReplAll );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// finally, move on
|
||||
this.currentWordIndex++;
|
||||
this._spellcheck();
|
||||
return true;
|
||||
}
|
||||
|
||||
function terminateSpell() {
|
||||
// called when we have reached the end of the spell checking.
|
||||
var msg = ""; // by FredCK
|
||||
var numrepl = this._getTotalReplaced();
|
||||
if( numrepl == 0 ) {
|
||||
// see if there were no misspellings to begin with
|
||||
if( !this.wordWin ) {
|
||||
msg = "";
|
||||
} else {
|
||||
if( this.wordWin.totalMisspellings() ) {
|
||||
// msg += "No words changed."; // by FredCK
|
||||
msg += FCKLang.DlgSpellNoChanges ; // by FredCK
|
||||
} else {
|
||||
// msg += "No misspellings found."; // by FredCK
|
||||
msg += FCKLang.DlgSpellNoMispell ; // by FredCK
|
||||
}
|
||||
}
|
||||
} else if( numrepl == 1 ) {
|
||||
// msg += "One word changed."; // by FredCK
|
||||
msg += FCKLang.DlgSpellOneChange ; // by FredCK
|
||||
} else {
|
||||
// msg += numrepl + " words changed."; // by FredCK
|
||||
msg += FCKLang.DlgSpellManyChanges.replace( /%1/g, numrepl ) ;
|
||||
}
|
||||
if( msg ) {
|
||||
// msg += "\n"; // by FredCK
|
||||
alert( msg );
|
||||
}
|
||||
|
||||
if( numrepl > 0 ) {
|
||||
// update the text field(s) on the opener window
|
||||
for( var i = 0; i < this.textInputs.length; i++ ) {
|
||||
// this.textArea.value = this.wordWin.text;
|
||||
if( this.wordWin ) {
|
||||
if( this.wordWin.textInputs[i] ) {
|
||||
this.textInputs[i].value = this.wordWin.textInputs[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// return back to the calling window
|
||||
// this.spellCheckerWin.close(); // by FredCK
|
||||
if ( typeof( this.OnFinished ) == 'function' ) // by FredCK
|
||||
this.OnFinished(numrepl) ; // by FredCK
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function undo() {
|
||||
// skip if this is the first word!
|
||||
var ti = this.currentTextIndex;
|
||||
var wi = this.currentWordIndex;
|
||||
|
||||
if( this.wordWin.totalPreviousWords( ti, wi ) > 0 ) {
|
||||
this.wordWin.removeFocus( ti, wi );
|
||||
|
||||
// go back to the last word index that was acted upon
|
||||
do {
|
||||
// if the current word index is zero then reset the seed
|
||||
if( this.currentWordIndex == 0 && this.currentTextIndex > 0 ) {
|
||||
this.currentTextIndex--;
|
||||
this.currentWordIndex = this.wordWin.totalWords( this.currentTextIndex )-1;
|
||||
if( this.currentWordIndex < 0 ) this.currentWordIndex = 0;
|
||||
} else {
|
||||
if( this.currentWordIndex > 0 ) {
|
||||
this.currentWordIndex--;
|
||||
}
|
||||
}
|
||||
} while (
|
||||
this.wordWin.totalWords( this.currentTextIndex ) == 0
|
||||
|| this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromIgnrAll
|
||||
|| this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromReplAll
|
||||
);
|
||||
|
||||
var text_idx = this.currentTextIndex;
|
||||
var idx = this.currentWordIndex;
|
||||
var preReplSpell = this.wordWin.originalSpellings[text_idx][idx];
|
||||
|
||||
// if we got back to the first word then set the Undo button back to disabled
|
||||
if( this.wordWin.totalPreviousWords( text_idx, idx ) == 0 ) {
|
||||
this.controlWin.disableUndo();
|
||||
}
|
||||
|
||||
var i, j, origSpell ;
|
||||
// examine what happened to this current word.
|
||||
switch( this.wordFlags[text_idx][idx] ) {
|
||||
// replace all: go through this and all the future occurances of the word
|
||||
// and revert them all to the original spelling and clear their flags
|
||||
case this.replAllFlag :
|
||||
for( i = text_idx; i < this.wordWin.textInputs.length; i++ ) {
|
||||
for( j = 0; j < this.wordWin.totalWords( i ); j++ ) {
|
||||
if(( i == text_idx && j >= idx ) || i > text_idx ) {
|
||||
origSpell = this.wordWin.originalSpellings[i][j];
|
||||
if( origSpell == preReplSpell ) {
|
||||
this._setWordText ( i, j, origSpell, undefined );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// ignore all: go through all the future occurances of the word
|
||||
// and clear their flags
|
||||
case this.ignrAllFlag :
|
||||
for( i = text_idx; i < this.wordWin.textInputs.length; i++ ) {
|
||||
for( j = 0; j < this.wordWin.totalWords( i ); j++ ) {
|
||||
if(( i == text_idx && j >= idx ) || i > text_idx ) {
|
||||
origSpell = this.wordWin.originalSpellings[i][j];
|
||||
if( origSpell == preReplSpell ) {
|
||||
this.wordFlags[i][j] = undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// replace: revert the word to its original spelling
|
||||
case this.replWordFlag :
|
||||
this._setWordText ( text_idx, idx, preReplSpell, undefined );
|
||||
break;
|
||||
}
|
||||
|
||||
// For all four cases, clear the wordFlag of this word. re-start the process
|
||||
this.wordFlags[text_idx][idx] = undefined;
|
||||
this._spellcheck();
|
||||
}
|
||||
}
|
||||
|
||||
function _spellcheck() {
|
||||
var ww = this.wordWin;
|
||||
|
||||
// check if this is the last word in the current text element
|
||||
if( this.currentWordIndex == ww.totalWords( this.currentTextIndex) ) {
|
||||
this.currentTextIndex++;
|
||||
this.currentWordIndex = 0;
|
||||
// keep going if we're not yet past the last text element
|
||||
if( this.currentTextIndex < this.wordWin.textInputs.length ) {
|
||||
this._spellcheck();
|
||||
return;
|
||||
} else {
|
||||
this.terminateSpell();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// if this is after the first one make sure the Undo button is enabled
|
||||
if( this.currentWordIndex > 0 ) {
|
||||
this.controlWin.enableUndo();
|
||||
}
|
||||
|
||||
// skip the current word if it has already been worked on
|
||||
if( this.wordFlags[this.currentTextIndex][this.currentWordIndex] ) {
|
||||
// increment the global current word index and move on.
|
||||
this.currentWordIndex++;
|
||||
this._spellcheck();
|
||||
} else {
|
||||
var evalText = ww.getTextVal( this.currentTextIndex, this.currentWordIndex );
|
||||
if( evalText ) {
|
||||
this.controlWin.evaluatedText.value = evalText;
|
||||
ww.setFocus( this.currentTextIndex, this.currentWordIndex );
|
||||
this._getSuggestions( this.currentTextIndex, this.currentWordIndex );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _getSuggestions( text_num, word_num ) {
|
||||
this.controlWin.clearSuggestions();
|
||||
// add suggestion in list for each suggested word.
|
||||
// get the array of suggested words out of the
|
||||
// three-dimensional array containing all suggestions.
|
||||
var a_suggests = this.wordWin.suggestions[text_num][word_num];
|
||||
if( a_suggests ) {
|
||||
// got an array of suggestions.
|
||||
for( var ii = 0; ii < a_suggests.length; ii++ ) {
|
||||
this.controlWin.addSuggestion( a_suggests[ii] );
|
||||
}
|
||||
}
|
||||
this.controlWin.selectDefaultSuggestion();
|
||||
}
|
||||
|
||||
function _setAsIgnored( text_num, word_num, flag ) {
|
||||
// set the UI
|
||||
this.wordWin.removeFocus( text_num, word_num );
|
||||
// do the bookkeeping
|
||||
this.wordFlags[text_num][word_num] = flag;
|
||||
return true;
|
||||
}
|
||||
|
||||
function _getTotalReplaced() {
|
||||
var i_replaced = 0;
|
||||
for( var i = 0; i < this.wordFlags.length; i++ ) {
|
||||
for( var j = 0; j < this.wordFlags[i].length; j++ ) {
|
||||
if(( this.wordFlags[i][j] == this.replWordFlag )
|
||||
|| ( this.wordFlags[i][j] == this.replAllFlag )
|
||||
|| ( this.wordFlags[i][j] == this.fromReplAll )) {
|
||||
i_replaced++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return i_replaced;
|
||||
}
|
||||
|
||||
function _setWordText( text_num, word_num, newText, flag ) {
|
||||
// set the UI and form inputs
|
||||
this.wordWin.setText( text_num, word_num, newText );
|
||||
// keep track of what happened to this word:
|
||||
this.wordFlags[text_num][word_num] = flag;
|
||||
return true;
|
||||
}
|
||||
|
||||
function _getFormInputs( inputPattern ) {
|
||||
var inputs = new Array();
|
||||
for( var i = 0; i < document.forms.length; i++ ) {
|
||||
for( var j = 0; j < document.forms[i].elements.length; j++ ) {
|
||||
if( document.forms[i].elements[j].type.match( inputPattern )) {
|
||||
inputs[inputs.length] = document.forms[i].elements[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
return inputs;
|
||||
}
|
||||
////////////////////////////////////////////////////
|
||||
// spellChecker.js
|
||||
//
|
||||
// spellChecker object
|
||||
//
|
||||
// This file is sourced on web pages that have a textarea object to evaluate
|
||||
// for spelling. It includes the implementation for the spellCheckObject.
|
||||
//
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// constructor
|
||||
function spellChecker( textObject ) {
|
||||
|
||||
// public properties - configurable
|
||||
// this.popUpUrl = '/speller/spellchecker.html'; // by FredCK
|
||||
this.popUpUrl = 'fck_spellerpages/spellerpages/spellchecker.html'; // by FredCK
|
||||
this.popUpName = 'spellchecker';
|
||||
// this.popUpProps = "menu=no,width=440,height=350,top=70,left=120,resizable=yes,status=yes"; // by FredCK
|
||||
this.popUpProps = null ; // by FredCK
|
||||
// this.spellCheckScript = '/speller/server-scripts/spellchecker.php'; // by FredCK
|
||||
//this.spellCheckScript = '/cgi-bin/spellchecker.pl';
|
||||
|
||||
// values used to keep track of what happened to a word
|
||||
this.replWordFlag = "R"; // single replace
|
||||
this.ignrWordFlag = "I"; // single ignore
|
||||
this.replAllFlag = "RA"; // replace all occurances
|
||||
this.ignrAllFlag = "IA"; // ignore all occurances
|
||||
this.fromReplAll = "~RA"; // an occurance of a "replace all" word
|
||||
this.fromIgnrAll = "~IA"; // an occurance of a "ignore all" word
|
||||
// properties set at run time
|
||||
this.wordFlags = new Array();
|
||||
this.currentTextIndex = 0;
|
||||
this.currentWordIndex = 0;
|
||||
this.spellCheckerWin = null;
|
||||
this.controlWin = null;
|
||||
this.wordWin = null;
|
||||
this.textArea = textObject; // deprecated
|
||||
this.textInputs = arguments;
|
||||
|
||||
// private methods
|
||||
this._spellcheck = _spellcheck;
|
||||
this._getSuggestions = _getSuggestions;
|
||||
this._setAsIgnored = _setAsIgnored;
|
||||
this._getTotalReplaced = _getTotalReplaced;
|
||||
this._setWordText = _setWordText;
|
||||
this._getFormInputs = _getFormInputs;
|
||||
|
||||
// public methods
|
||||
this.openChecker = openChecker;
|
||||
this.startCheck = startCheck;
|
||||
this.checkTextBoxes = checkTextBoxes;
|
||||
this.checkTextAreas = checkTextAreas;
|
||||
this.spellCheckAll = spellCheckAll;
|
||||
this.ignoreWord = ignoreWord;
|
||||
this.ignoreAll = ignoreAll;
|
||||
this.replaceWord = replaceWord;
|
||||
this.replaceAll = replaceAll;
|
||||
this.terminateSpell = terminateSpell;
|
||||
this.undo = undo;
|
||||
|
||||
// set the current window's "speller" property to the instance of this class.
|
||||
// this object can now be referenced by child windows/frames.
|
||||
window.speller = this;
|
||||
}
|
||||
|
||||
// call this method to check all text boxes (and only text boxes) in the HTML document
|
||||
function checkTextBoxes() {
|
||||
this.textInputs = this._getFormInputs( "^text$" );
|
||||
this.openChecker();
|
||||
}
|
||||
|
||||
// call this method to check all textareas (and only textareas ) in the HTML document
|
||||
function checkTextAreas() {
|
||||
this.textInputs = this._getFormInputs( "^textarea$" );
|
||||
this.openChecker();
|
||||
}
|
||||
|
||||
// call this method to check all text boxes and textareas in the HTML document
|
||||
function spellCheckAll() {
|
||||
this.textInputs = this._getFormInputs( "^text(area)?$" );
|
||||
this.openChecker();
|
||||
}
|
||||
|
||||
// call this method to check text boxe(s) and/or textarea(s) that were passed in to the
|
||||
// object's constructor or to the textInputs property
|
||||
function openChecker() {
|
||||
this.spellCheckerWin = window.open( this.popUpUrl, this.popUpName, this.popUpProps );
|
||||
if( !this.spellCheckerWin.opener ) {
|
||||
this.spellCheckerWin.opener = window;
|
||||
}
|
||||
}
|
||||
|
||||
function startCheck( wordWindowObj, controlWindowObj ) {
|
||||
|
||||
// set properties from args
|
||||
this.wordWin = wordWindowObj;
|
||||
this.controlWin = controlWindowObj;
|
||||
|
||||
// reset properties
|
||||
this.wordWin.resetForm();
|
||||
this.controlWin.resetForm();
|
||||
this.currentTextIndex = 0;
|
||||
this.currentWordIndex = 0;
|
||||
// initialize the flags to an array - one element for each text input
|
||||
this.wordFlags = new Array( this.wordWin.textInputs.length );
|
||||
// each element will be an array that keeps track of each word in the text
|
||||
for( var i=0; i<this.wordFlags.length; i++ ) {
|
||||
this.wordFlags[i] = [];
|
||||
}
|
||||
|
||||
// start
|
||||
this._spellcheck();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function ignoreWord() {
|
||||
var wi = this.currentWordIndex;
|
||||
var ti = this.currentTextIndex;
|
||||
if( !this.wordWin ) {
|
||||
alert( 'Error: Word frame not available.' );
|
||||
return false;
|
||||
}
|
||||
if( !this.wordWin.getTextVal( ti, wi )) {
|
||||
alert( 'Error: "Not in dictionary" text is missing.' );
|
||||
return false;
|
||||
}
|
||||
// set as ignored
|
||||
if( this._setAsIgnored( ti, wi, this.ignrWordFlag )) {
|
||||
this.currentWordIndex++;
|
||||
this._spellcheck();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function ignoreAll() {
|
||||
var wi = this.currentWordIndex;
|
||||
var ti = this.currentTextIndex;
|
||||
if( !this.wordWin ) {
|
||||
alert( 'Error: Word frame not available.' );
|
||||
return false;
|
||||
}
|
||||
// get the word that is currently being evaluated.
|
||||
var s_word_to_repl = this.wordWin.getTextVal( ti, wi );
|
||||
if( !s_word_to_repl ) {
|
||||
alert( 'Error: "Not in dictionary" text is missing' );
|
||||
return false;
|
||||
}
|
||||
|
||||
// set this word as an "ignore all" word.
|
||||
this._setAsIgnored( ti, wi, this.ignrAllFlag );
|
||||
|
||||
// loop through all the words after this word
|
||||
for( var i = ti; i < this.wordWin.textInputs.length; i++ ) {
|
||||
for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) {
|
||||
if(( i == ti && j > wi ) || i > ti ) {
|
||||
// future word: set as "from ignore all" if
|
||||
// 1) do not already have a flag and
|
||||
// 2) have the same value as current word
|
||||
if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl )
|
||||
&& ( !this.wordFlags[i][j] )) {
|
||||
this._setAsIgnored( i, j, this.fromIgnrAll );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// finally, move on
|
||||
this.currentWordIndex++;
|
||||
this._spellcheck();
|
||||
return true;
|
||||
}
|
||||
|
||||
function replaceWord() {
|
||||
var wi = this.currentWordIndex;
|
||||
var ti = this.currentTextIndex;
|
||||
if( !this.wordWin ) {
|
||||
alert( 'Error: Word frame not available.' );
|
||||
return false;
|
||||
}
|
||||
if( !this.wordWin.getTextVal( ti, wi )) {
|
||||
alert( 'Error: "Not in dictionary" text is missing' );
|
||||
return false;
|
||||
}
|
||||
if( !this.controlWin.replacementText ) {
|
||||
return false ;
|
||||
}
|
||||
var txt = this.controlWin.replacementText;
|
||||
if( txt.value ) {
|
||||
var newspell = new String( txt.value );
|
||||
if( this._setWordText( ti, wi, newspell, this.replWordFlag )) {
|
||||
this.currentWordIndex++;
|
||||
this._spellcheck();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function replaceAll() {
|
||||
var ti = this.currentTextIndex;
|
||||
var wi = this.currentWordIndex;
|
||||
if( !this.wordWin ) {
|
||||
alert( 'Error: Word frame not available.' );
|
||||
return false;
|
||||
}
|
||||
var s_word_to_repl = this.wordWin.getTextVal( ti, wi );
|
||||
if( !s_word_to_repl ) {
|
||||
alert( 'Error: "Not in dictionary" text is missing' );
|
||||
return false;
|
||||
}
|
||||
var txt = this.controlWin.replacementText;
|
||||
if( !txt.value ) return false;
|
||||
var newspell = new String( txt.value );
|
||||
|
||||
// set this word as a "replace all" word.
|
||||
this._setWordText( ti, wi, newspell, this.replAllFlag );
|
||||
|
||||
// loop through all the words after this word
|
||||
for( var i = ti; i < this.wordWin.textInputs.length; i++ ) {
|
||||
for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) {
|
||||
if(( i == ti && j > wi ) || i > ti ) {
|
||||
// future word: set word text to s_word_to_repl if
|
||||
// 1) do not already have a flag and
|
||||
// 2) have the same value as s_word_to_repl
|
||||
if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl )
|
||||
&& ( !this.wordFlags[i][j] )) {
|
||||
this._setWordText( i, j, newspell, this.fromReplAll );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// finally, move on
|
||||
this.currentWordIndex++;
|
||||
this._spellcheck();
|
||||
return true;
|
||||
}
|
||||
|
||||
function terminateSpell() {
|
||||
// called when we have reached the end of the spell checking.
|
||||
var msg = ""; // by FredCK
|
||||
var numrepl = this._getTotalReplaced();
|
||||
if( numrepl == 0 ) {
|
||||
// see if there were no misspellings to begin with
|
||||
if( !this.wordWin ) {
|
||||
msg = "";
|
||||
} else {
|
||||
if( this.wordWin.totalMisspellings() ) {
|
||||
// msg += "No words changed."; // by FredCK
|
||||
msg += FCKLang.DlgSpellNoChanges ; // by FredCK
|
||||
} else {
|
||||
// msg += "No misspellings found."; // by FredCK
|
||||
msg += FCKLang.DlgSpellNoMispell ; // by FredCK
|
||||
}
|
||||
}
|
||||
} else if( numrepl == 1 ) {
|
||||
// msg += "One word changed."; // by FredCK
|
||||
msg += FCKLang.DlgSpellOneChange ; // by FredCK
|
||||
} else {
|
||||
// msg += numrepl + " words changed."; // by FredCK
|
||||
msg += FCKLang.DlgSpellManyChanges.replace( /%1/g, numrepl ) ;
|
||||
}
|
||||
if( msg ) {
|
||||
// msg += "\n"; // by FredCK
|
||||
alert( msg );
|
||||
}
|
||||
|
||||
if( numrepl > 0 ) {
|
||||
// update the text field(s) on the opener window
|
||||
for( var i = 0; i < this.textInputs.length; i++ ) {
|
||||
// this.textArea.value = this.wordWin.text;
|
||||
if( this.wordWin ) {
|
||||
if( this.wordWin.textInputs[i] ) {
|
||||
this.textInputs[i].value = this.wordWin.textInputs[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// return back to the calling window
|
||||
// this.spellCheckerWin.close(); // by FredCK
|
||||
if ( typeof( this.OnFinished ) == 'function' ) // by FredCK
|
||||
this.OnFinished(numrepl) ; // by FredCK
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function undo() {
|
||||
// skip if this is the first word!
|
||||
var ti = this.currentTextIndex;
|
||||
var wi = this.currentWordIndex;
|
||||
|
||||
if( this.wordWin.totalPreviousWords( ti, wi ) > 0 ) {
|
||||
this.wordWin.removeFocus( ti, wi );
|
||||
|
||||
// go back to the last word index that was acted upon
|
||||
do {
|
||||
// if the current word index is zero then reset the seed
|
||||
if( this.currentWordIndex == 0 && this.currentTextIndex > 0 ) {
|
||||
this.currentTextIndex--;
|
||||
this.currentWordIndex = this.wordWin.totalWords( this.currentTextIndex )-1;
|
||||
if( this.currentWordIndex < 0 ) this.currentWordIndex = 0;
|
||||
} else {
|
||||
if( this.currentWordIndex > 0 ) {
|
||||
this.currentWordIndex--;
|
||||
}
|
||||
}
|
||||
} while (
|
||||
this.wordWin.totalWords( this.currentTextIndex ) == 0
|
||||
|| this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromIgnrAll
|
||||
|| this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromReplAll
|
||||
);
|
||||
|
||||
var text_idx = this.currentTextIndex;
|
||||
var idx = this.currentWordIndex;
|
||||
var preReplSpell = this.wordWin.originalSpellings[text_idx][idx];
|
||||
|
||||
// if we got back to the first word then set the Undo button back to disabled
|
||||
if( this.wordWin.totalPreviousWords( text_idx, idx ) == 0 ) {
|
||||
this.controlWin.disableUndo();
|
||||
}
|
||||
|
||||
var i, j, origSpell ;
|
||||
// examine what happened to this current word.
|
||||
switch( this.wordFlags[text_idx][idx] ) {
|
||||
// replace all: go through this and all the future occurances of the word
|
||||
// and revert them all to the original spelling and clear their flags
|
||||
case this.replAllFlag :
|
||||
for( i = text_idx; i < this.wordWin.textInputs.length; i++ ) {
|
||||
for( j = 0; j < this.wordWin.totalWords( i ); j++ ) {
|
||||
if(( i == text_idx && j >= idx ) || i > text_idx ) {
|
||||
origSpell = this.wordWin.originalSpellings[i][j];
|
||||
if( origSpell == preReplSpell ) {
|
||||
this._setWordText ( i, j, origSpell, undefined );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// ignore all: go through all the future occurances of the word
|
||||
// and clear their flags
|
||||
case this.ignrAllFlag :
|
||||
for( i = text_idx; i < this.wordWin.textInputs.length; i++ ) {
|
||||
for( j = 0; j < this.wordWin.totalWords( i ); j++ ) {
|
||||
if(( i == text_idx && j >= idx ) || i > text_idx ) {
|
||||
origSpell = this.wordWin.originalSpellings[i][j];
|
||||
if( origSpell == preReplSpell ) {
|
||||
this.wordFlags[i][j] = undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// replace: revert the word to its original spelling
|
||||
case this.replWordFlag :
|
||||
this._setWordText ( text_idx, idx, preReplSpell, undefined );
|
||||
break;
|
||||
}
|
||||
|
||||
// For all four cases, clear the wordFlag of this word. re-start the process
|
||||
this.wordFlags[text_idx][idx] = undefined;
|
||||
this._spellcheck();
|
||||
}
|
||||
}
|
||||
|
||||
function _spellcheck() {
|
||||
var ww = this.wordWin;
|
||||
|
||||
// check if this is the last word in the current text element
|
||||
if( this.currentWordIndex == ww.totalWords( this.currentTextIndex) ) {
|
||||
this.currentTextIndex++;
|
||||
this.currentWordIndex = 0;
|
||||
// keep going if we're not yet past the last text element
|
||||
if( this.currentTextIndex < this.wordWin.textInputs.length ) {
|
||||
this._spellcheck();
|
||||
return;
|
||||
} else {
|
||||
this.terminateSpell();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// if this is after the first one make sure the Undo button is enabled
|
||||
if( this.currentWordIndex > 0 ) {
|
||||
this.controlWin.enableUndo();
|
||||
}
|
||||
|
||||
// skip the current word if it has already been worked on
|
||||
if( this.wordFlags[this.currentTextIndex][this.currentWordIndex] ) {
|
||||
// increment the global current word index and move on.
|
||||
this.currentWordIndex++;
|
||||
this._spellcheck();
|
||||
} else {
|
||||
var evalText = ww.getTextVal( this.currentTextIndex, this.currentWordIndex );
|
||||
if( evalText ) {
|
||||
this.controlWin.evaluatedText.value = evalText;
|
||||
ww.setFocus( this.currentTextIndex, this.currentWordIndex );
|
||||
this._getSuggestions( this.currentTextIndex, this.currentWordIndex );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _getSuggestions( text_num, word_num ) {
|
||||
this.controlWin.clearSuggestions();
|
||||
// add suggestion in list for each suggested word.
|
||||
// get the array of suggested words out of the
|
||||
// three-dimensional array containing all suggestions.
|
||||
var a_suggests = this.wordWin.suggestions[text_num][word_num];
|
||||
if( a_suggests ) {
|
||||
// got an array of suggestions.
|
||||
for( var ii = 0; ii < a_suggests.length; ii++ ) {
|
||||
this.controlWin.addSuggestion( a_suggests[ii] );
|
||||
}
|
||||
}
|
||||
this.controlWin.selectDefaultSuggestion();
|
||||
}
|
||||
|
||||
function _setAsIgnored( text_num, word_num, flag ) {
|
||||
// set the UI
|
||||
this.wordWin.removeFocus( text_num, word_num );
|
||||
// do the bookkeeping
|
||||
this.wordFlags[text_num][word_num] = flag;
|
||||
return true;
|
||||
}
|
||||
|
||||
function _getTotalReplaced() {
|
||||
var i_replaced = 0;
|
||||
for( var i = 0; i < this.wordFlags.length; i++ ) {
|
||||
for( var j = 0; j < this.wordFlags[i].length; j++ ) {
|
||||
if(( this.wordFlags[i][j] == this.replWordFlag )
|
||||
|| ( this.wordFlags[i][j] == this.replAllFlag )
|
||||
|| ( this.wordFlags[i][j] == this.fromReplAll )) {
|
||||
i_replaced++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return i_replaced;
|
||||
}
|
||||
|
||||
function _setWordText( text_num, word_num, newText, flag ) {
|
||||
// set the UI and form inputs
|
||||
this.wordWin.setText( text_num, word_num, newText );
|
||||
// keep track of what happened to this word:
|
||||
this.wordFlags[text_num][word_num] = flag;
|
||||
return true;
|
||||
}
|
||||
|
||||
function _getFormInputs( inputPattern ) {
|
||||
var inputs = new Array();
|
||||
for( var i = 0; i < document.forms.length; i++ ) {
|
||||
for( var j = 0; j < document.forms[i].elements.length; j++ ) {
|
||||
if( document.forms[i].elements[j].type.match( inputPattern )) {
|
||||
inputs[inputs.length] = document.forms[i].elements[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
return inputs;
|
||||
}
|
||||
|
||||
@ -1,49 +1,49 @@
|
||||
.blend {
|
||||
font-family: courier new;
|
||||
font-size: 10pt;
|
||||
border: 0;
|
||||
margin-bottom:-1;
|
||||
}
|
||||
.normalLabel {
|
||||
font-size:8pt;
|
||||
}
|
||||
.normalText {
|
||||
font-family:arial, helvetica, sans-serif;
|
||||
font-size:10pt;
|
||||
color:000000;
|
||||
background-color:FFFFFF;
|
||||
}
|
||||
.plainText {
|
||||
font-family: courier new, courier, monospace;
|
||||
font-size: 10pt;
|
||||
color:000000;
|
||||
background-color:FFFFFF;
|
||||
}
|
||||
.controlWindowBody {
|
||||
font-family:arial, helvetica, sans-serif;
|
||||
font-size:8pt;
|
||||
padding: 7px ; /* by FredCK */
|
||||
margin: 0px ; /* by FredCK */
|
||||
/* color:000000; by FredCK */
|
||||
/* background-color:DADADA; by FredCK */
|
||||
}
|
||||
.readonlyInput {
|
||||
background-color:DADADA;
|
||||
color:000000;
|
||||
font-size:8pt;
|
||||
width:392px;
|
||||
}
|
||||
.textDefault {
|
||||
font-size:8pt;
|
||||
width: 200px;
|
||||
}
|
||||
.buttonDefault {
|
||||
width:90px;
|
||||
height:22px;
|
||||
font-size:8pt;
|
||||
}
|
||||
.suggSlct {
|
||||
width:200px;
|
||||
margin-top:2;
|
||||
font-size:8pt;
|
||||
}
|
||||
.blend {
|
||||
font-family: courier new;
|
||||
font-size: 10pt;
|
||||
border: 0;
|
||||
margin-bottom:-1;
|
||||
}
|
||||
.normalLabel {
|
||||
font-size:8pt;
|
||||
}
|
||||
.normalText {
|
||||
font-family:arial, helvetica, sans-serif;
|
||||
font-size:10pt;
|
||||
color:000000;
|
||||
background-color:FFFFFF;
|
||||
}
|
||||
.plainText {
|
||||
font-family: courier new, courier, monospace;
|
||||
font-size: 10pt;
|
||||
color:000000;
|
||||
background-color:FFFFFF;
|
||||
}
|
||||
.controlWindowBody {
|
||||
font-family:arial, helvetica, sans-serif;
|
||||
font-size:8pt;
|
||||
padding: 7px ; /* by FredCK */
|
||||
margin: 0px ; /* by FredCK */
|
||||
/* color:000000; by FredCK */
|
||||
/* background-color:DADADA; by FredCK */
|
||||
}
|
||||
.readonlyInput {
|
||||
background-color:DADADA;
|
||||
color:000000;
|
||||
font-size:8pt;
|
||||
width:392px;
|
||||
}
|
||||
.textDefault {
|
||||
font-size:8pt;
|
||||
width: 200px;
|
||||
}
|
||||
.buttonDefault {
|
||||
width:90px;
|
||||
height:22px;
|
||||
font-size:8pt;
|
||||
}
|
||||
.suggSlct {
|
||||
width:200px;
|
||||
margin-top:2;
|
||||
font-size:8pt;
|
||||
}
|
||||
|
||||
@ -1,41 +1,41 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>DTD Test Page</title>
|
||||
<script type="text/javascript">
|
||||
|
||||
// Define an object for this test page, so the assignment to FCK.DTD works
|
||||
var FCK = {} ;
|
||||
</script>
|
||||
<script type="text/javascript" src="../_source/internals/fcktools.js"></script>
|
||||
<script type="text/javascript" src="fck_xhtml10transitional.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
DTD Contents
|
||||
</h1>
|
||||
<table border="1">
|
||||
<script type="text/javascript">
|
||||
|
||||
for ( var p in FCK.DTD )
|
||||
{
|
||||
document.write( '<tr><td><b>' + p + '</b></td><td>' ) ;
|
||||
|
||||
var isFirst = true ;
|
||||
|
||||
for ( var c in FCK.DTD[p] )
|
||||
{
|
||||
if ( !isFirst )
|
||||
document.write( ', ' ) ;
|
||||
isFirst = false ;
|
||||
|
||||
document.write( c ) ;
|
||||
}
|
||||
|
||||
|
||||
document.write( '</td></tr>' ) ;
|
||||
}
|
||||
</script>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>DTD Test Page</title>
|
||||
<script type="text/javascript">
|
||||
|
||||
// Define an object for this test page, so the assignment to FCK.DTD works
|
||||
var FCK = {} ;
|
||||
</script>
|
||||
<script type="text/javascript" src="../_source/internals/fcktools.js"></script>
|
||||
<script type="text/javascript" src="fck_xhtml10transitional.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
DTD Contents
|
||||
</h1>
|
||||
<table border="1">
|
||||
<script type="text/javascript">
|
||||
|
||||
for ( var p in FCK.DTD )
|
||||
{
|
||||
document.write( '<tr><td><b>' + p + '</b></td><td>' ) ;
|
||||
|
||||
var isFirst = true ;
|
||||
|
||||
for ( var c in FCK.DTD[p] )
|
||||
{
|
||||
if ( !isFirst )
|
||||
document.write( ', ' ) ;
|
||||
isFirst = false ;
|
||||
|
||||
document.write( c ) ;
|
||||
}
|
||||
|
||||
|
||||
document.write( '</td></tr>' ) ;
|
||||
}
|
||||
</script>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,170 +1,170 @@
|
||||
<?php
|
||||
/*
|
||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||
* Copyright (C) 2003-2009 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 ==
|
||||
*
|
||||
* Configuration file for the File Manager Connector for PHP.
|
||||
*/
|
||||
|
||||
global $Config ;
|
||||
|
||||
define('NOTOKENRENEWAL',1); // Disables token renewal
|
||||
|
||||
// We must include the main because this page is
|
||||
// a web page that require security controls and
|
||||
// is a security hole if anybody can access without
|
||||
// being an authenticated user.
|
||||
require_once("../../../../../../main.inc.php");
|
||||
$uri=preg_replace('/^http(s?):\/\//i','',$dolibarr_main_url_root);
|
||||
$pos = strstr ($uri, '/'); // $pos contient alors url sans nom domaine
|
||||
if ($pos == '/') $pos = ''; // si $pos vaut /, on le met a ''
|
||||
define('DOL_URL_ROOT', $pos);
|
||||
|
||||
/*
|
||||
$conf->syslog->enabled=1;
|
||||
define('SYSLOG_FILE','c:/log/dolibarr/dolibarr.log');
|
||||
require_once("../../../../../../lib/functions.lib.php");
|
||||
dol_syslog("eee".$conf->fckeditor->dir_output);
|
||||
*/
|
||||
|
||||
// SECURITY: You must explicitly enable this "connector". (Set it to "true").
|
||||
// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
|
||||
// authenticated users can access this file or use some kind of session checking.
|
||||
$Config['Enabled'] = true ;
|
||||
|
||||
|
||||
// Path to user files relative to the document root.
|
||||
$Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=fckeditor&file=' ;
|
||||
|
||||
// Fill the following value it you prefer to specify the absolute path for the
|
||||
// user files directory. Useful if you are using a virtual directory, symbolic
|
||||
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
|
||||
// Attention: The above 'UserFilesPath' must point to the same directory.
|
||||
$Config['UserFilesAbsolutePath'] = $dolibarr_main_data_root.'/fckeditor/';
|
||||
|
||||
// Due to security issues with Apache modules, it is recommended to leave the
|
||||
// following setting enabled.
|
||||
$Config['ForceSingleExtension'] = true ;
|
||||
|
||||
// Perform additional checks for image files.
|
||||
// If set to true, validate image size (using getimagesize).
|
||||
$Config['SecureImageUploads'] = true;
|
||||
|
||||
// What the user can do with this connector.
|
||||
$Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ;
|
||||
|
||||
// Allowed Resource Types.
|
||||
$Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ;
|
||||
|
||||
// For security, HTML is allowed in the first Kb of data for files having the
|
||||
// following extensions only.
|
||||
$Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ;
|
||||
|
||||
// After file is uploaded, sometimes it is required to change its permissions
|
||||
// so that it was possible to access it at the later time.
|
||||
// If possible, it is recommended to set more restrictive permissions, like 0755.
|
||||
// Set to 0 to disable this feature.
|
||||
// Note: not needed on Windows-based servers.
|
||||
$Config['ChmodOnUpload'] = 0775 ;
|
||||
|
||||
// See comments above.
|
||||
// Used when creating folders that does not exist.
|
||||
$Config['ChmodOnFolderCreate'] = 0775 ;
|
||||
|
||||
/*
|
||||
Configuration settings for each Resource Type
|
||||
|
||||
- AllowedExtensions: the possible extensions that can be allowed.
|
||||
If it is empty then any file type can be uploaded.
|
||||
- DeniedExtensions: The extensions that won't be allowed.
|
||||
If it is empty then no restrictions are done here.
|
||||
|
||||
For a file to be uploaded it has to fulfill both the AllowedExtensions
|
||||
and DeniedExtensions (that's it: not being denied) conditions.
|
||||
|
||||
- FileTypesPath: the virtual folder relative to the document root where
|
||||
these resources will be located.
|
||||
Attention: It must start and end with a slash: '/'
|
||||
|
||||
- FileTypesAbsolutePath: the physical path to the above folder. It must be
|
||||
an absolute path.
|
||||
If it's an empty string then it will be autocalculated.
|
||||
Useful if you are using a virtual directory, symbolic link or alias.
|
||||
Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
|
||||
Attention: The above 'FileTypesPath' must point to the same directory.
|
||||
Attention: It must end with a slash: '/'
|
||||
|
||||
- QuickUploadPath: the virtual folder relative to the document root where
|
||||
these resources will be uploaded using the Upload tab in the resources
|
||||
dialogs.
|
||||
Attention: It must start and end with a slash: '/'
|
||||
|
||||
- QuickUploadAbsolutePath: the physical path to the above folder. It must be
|
||||
an absolute path.
|
||||
If it's an empty string then it will be autocalculated.
|
||||
Useful if you are using a virtual directory, symbolic link or alias.
|
||||
Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
|
||||
Attention: The above 'QuickUploadPath' must point to the same directory.
|
||||
Attention: It must end with a slash: '/'
|
||||
|
||||
NOTE: by default, QuickUploadPath and QuickUploadAbsolutePath point to
|
||||
"userfiles" directory to maintain backwards compatibility with older versions of FCKeditor.
|
||||
This is fine, but you in some cases you will be not able to browse uploaded files using file browser.
|
||||
Example: if you click on "image button", select "Upload" tab and send image
|
||||
to the server, image will appear in FCKeditor correctly, but because it is placed
|
||||
directly in /userfiles/ directory, you'll be not able to see it in built-in file browser.
|
||||
The more expected behaviour would be to send images directly to "image" subfolder.
|
||||
To achieve that, simply change
|
||||
$Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ;
|
||||
$Config['QuickUploadAbsolutePath']['Image'] = $Config['UserFilesAbsolutePath'] ;
|
||||
into:
|
||||
$Config['QuickUploadPath']['Image'] = $Config['FileTypesPath']['Image'] ;
|
||||
$Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ;
|
||||
|
||||
*/
|
||||
|
||||
$Config['AllowedExtensions']['File'] = array('7z', 'aiff', 'asf', 'avi', 'bmp', 'csv', 'doc', 'fla', 'flv', 'gif', 'gz', 'gzip', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'ods', 'odt', 'pdf', 'png', 'ppt', 'pxd', 'qt', 'ram', 'rar', 'rm', 'rmi', 'rmvb', 'rtf', 'sdc', 'sitd', 'swf', 'sxc', 'sxw', 'tar', 'tgz', 'tif', 'tiff', 'txt', 'vsd', 'wav', 'wma', 'wmv', 'xls', 'xml', 'zip') ;
|
||||
$Config['DeniedExtensions']['File'] = array() ;
|
||||
$Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . 'file/' ;
|
||||
$Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ;
|
||||
$Config['QuickUploadPath']['File'] = $Config['UserFilesPath'] ;
|
||||
$Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ;
|
||||
|
||||
$Config['AllowedExtensions']['Image'] = array('bmp','gif','jpeg','jpg','png') ;
|
||||
$Config['DeniedExtensions']['Image'] = array() ;
|
||||
$Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . 'image/' ;
|
||||
$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ;
|
||||
$Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ;
|
||||
$Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] ;
|
||||
|
||||
$Config['AllowedExtensions']['Flash'] = array('swf','flv') ;
|
||||
$Config['DeniedExtensions']['Flash'] = array() ;
|
||||
$Config['FileTypesPath']['Flash'] = $Config['UserFilesPath'] . 'flash/' ;
|
||||
$Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/' ;
|
||||
$Config['QuickUploadPath']['Flash'] = $Config['UserFilesPath'] ;
|
||||
$Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] ;
|
||||
|
||||
$Config['AllowedExtensions']['Media'] = array('aiff', 'asf', 'avi', 'bmp', 'fla', 'flv', 'gif', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'png', 'qt', 'ram', 'rm', 'rmi', 'rmvb', 'swf', 'tif', 'tiff', 'wav', 'wma', 'wmv') ;
|
||||
$Config['DeniedExtensions']['Media'] = array() ;
|
||||
$Config['FileTypesPath']['Media'] = $Config['UserFilesPath'] . 'media/' ;
|
||||
$Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ;
|
||||
$Config['QuickUploadPath']['Media'] = $Config['UserFilesPath'] ;
|
||||
$Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] ;
|
||||
|
||||
?>
|
||||
<?php
|
||||
/*
|
||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||
* Copyright (C) 2003-2009 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 ==
|
||||
*
|
||||
* Configuration file for the File Manager Connector for PHP.
|
||||
*/
|
||||
|
||||
global $Config ;
|
||||
|
||||
define('NOTOKENRENEWAL',1); // Disables token renewal
|
||||
|
||||
// We must include the main because this page is
|
||||
// a web page that require security controls and
|
||||
// is a security hole if anybody can access without
|
||||
// being an authenticated user.
|
||||
require_once("../../../../../../main.inc.php");
|
||||
$uri=preg_replace('/^http(s?):\/\//i','',$dolibarr_main_url_root);
|
||||
$pos = strstr ($uri, '/'); // $pos contient alors url sans nom domaine
|
||||
if ($pos == '/') $pos = ''; // si $pos vaut /, on le met a ''
|
||||
define('DOL_URL_ROOT', $pos);
|
||||
|
||||
/*
|
||||
$conf->syslog->enabled=1;
|
||||
define('SYSLOG_FILE','c:/log/dolibarr/dolibarr.log');
|
||||
require_once("../../../../../../lib/functions.lib.php");
|
||||
dol_syslog("eee".$conf->fckeditor->dir_output);
|
||||
*/
|
||||
|
||||
// SECURITY: You must explicitly enable this "connector". (Set it to "true").
|
||||
// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
|
||||
// authenticated users can access this file or use some kind of session checking.
|
||||
$Config['Enabled'] = true ;
|
||||
|
||||
|
||||
// Path to user files relative to the document root.
|
||||
$Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=fckeditor&file=' ;
|
||||
|
||||
// Fill the following value it you prefer to specify the absolute path for the
|
||||
// user files directory. Useful if you are using a virtual directory, symbolic
|
||||
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
|
||||
// Attention: The above 'UserFilesPath' must point to the same directory.
|
||||
$Config['UserFilesAbsolutePath'] = $dolibarr_main_data_root.'/fckeditor/';
|
||||
|
||||
// Due to security issues with Apache modules, it is recommended to leave the
|
||||
// following setting enabled.
|
||||
$Config['ForceSingleExtension'] = true ;
|
||||
|
||||
// Perform additional checks for image files.
|
||||
// If set to true, validate image size (using getimagesize).
|
||||
$Config['SecureImageUploads'] = true;
|
||||
|
||||
// What the user can do with this connector.
|
||||
$Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ;
|
||||
|
||||
// Allowed Resource Types.
|
||||
$Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ;
|
||||
|
||||
// For security, HTML is allowed in the first Kb of data for files having the
|
||||
// following extensions only.
|
||||
$Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ;
|
||||
|
||||
// After file is uploaded, sometimes it is required to change its permissions
|
||||
// so that it was possible to access it at the later time.
|
||||
// If possible, it is recommended to set more restrictive permissions, like 0755.
|
||||
// Set to 0 to disable this feature.
|
||||
// Note: not needed on Windows-based servers.
|
||||
$Config['ChmodOnUpload'] = 0775 ;
|
||||
|
||||
// See comments above.
|
||||
// Used when creating folders that does not exist.
|
||||
$Config['ChmodOnFolderCreate'] = 0775 ;
|
||||
|
||||
/*
|
||||
Configuration settings for each Resource Type
|
||||
|
||||
- AllowedExtensions: the possible extensions that can be allowed.
|
||||
If it is empty then any file type can be uploaded.
|
||||
- DeniedExtensions: The extensions that won't be allowed.
|
||||
If it is empty then no restrictions are done here.
|
||||
|
||||
For a file to be uploaded it has to fulfill both the AllowedExtensions
|
||||
and DeniedExtensions (that's it: not being denied) conditions.
|
||||
|
||||
- FileTypesPath: the virtual folder relative to the document root where
|
||||
these resources will be located.
|
||||
Attention: It must start and end with a slash: '/'
|
||||
|
||||
- FileTypesAbsolutePath: the physical path to the above folder. It must be
|
||||
an absolute path.
|
||||
If it's an empty string then it will be autocalculated.
|
||||
Useful if you are using a virtual directory, symbolic link or alias.
|
||||
Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
|
||||
Attention: The above 'FileTypesPath' must point to the same directory.
|
||||
Attention: It must end with a slash: '/'
|
||||
|
||||
- QuickUploadPath: the virtual folder relative to the document root where
|
||||
these resources will be uploaded using the Upload tab in the resources
|
||||
dialogs.
|
||||
Attention: It must start and end with a slash: '/'
|
||||
|
||||
- QuickUploadAbsolutePath: the physical path to the above folder. It must be
|
||||
an absolute path.
|
||||
If it's an empty string then it will be autocalculated.
|
||||
Useful if you are using a virtual directory, symbolic link or alias.
|
||||
Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
|
||||
Attention: The above 'QuickUploadPath' must point to the same directory.
|
||||
Attention: It must end with a slash: '/'
|
||||
|
||||
NOTE: by default, QuickUploadPath and QuickUploadAbsolutePath point to
|
||||
"userfiles" directory to maintain backwards compatibility with older versions of FCKeditor.
|
||||
This is fine, but you in some cases you will be not able to browse uploaded files using file browser.
|
||||
Example: if you click on "image button", select "Upload" tab and send image
|
||||
to the server, image will appear in FCKeditor correctly, but because it is placed
|
||||
directly in /userfiles/ directory, you'll be not able to see it in built-in file browser.
|
||||
The more expected behaviour would be to send images directly to "image" subfolder.
|
||||
To achieve that, simply change
|
||||
$Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ;
|
||||
$Config['QuickUploadAbsolutePath']['Image'] = $Config['UserFilesAbsolutePath'] ;
|
||||
into:
|
||||
$Config['QuickUploadPath']['Image'] = $Config['FileTypesPath']['Image'] ;
|
||||
$Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ;
|
||||
|
||||
*/
|
||||
|
||||
$Config['AllowedExtensions']['File'] = array('7z', 'aiff', 'asf', 'avi', 'bmp', 'csv', 'doc', 'fla', 'flv', 'gif', 'gz', 'gzip', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'ods', 'odt', 'pdf', 'png', 'ppt', 'pxd', 'qt', 'ram', 'rar', 'rm', 'rmi', 'rmvb', 'rtf', 'sdc', 'sitd', 'swf', 'sxc', 'sxw', 'tar', 'tgz', 'tif', 'tiff', 'txt', 'vsd', 'wav', 'wma', 'wmv', 'xls', 'xml', 'zip') ;
|
||||
$Config['DeniedExtensions']['File'] = array() ;
|
||||
$Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . 'file/' ;
|
||||
$Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ;
|
||||
$Config['QuickUploadPath']['File'] = $Config['UserFilesPath'] ;
|
||||
$Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ;
|
||||
|
||||
$Config['AllowedExtensions']['Image'] = array('bmp','gif','jpeg','jpg','png') ;
|
||||
$Config['DeniedExtensions']['Image'] = array() ;
|
||||
$Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . 'image/' ;
|
||||
$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ;
|
||||
$Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ;
|
||||
$Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] ;
|
||||
|
||||
$Config['AllowedExtensions']['Flash'] = array('swf','flv') ;
|
||||
$Config['DeniedExtensions']['Flash'] = array() ;
|
||||
$Config['FileTypesPath']['Flash'] = $Config['UserFilesPath'] . 'flash/' ;
|
||||
$Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/' ;
|
||||
$Config['QuickUploadPath']['Flash'] = $Config['UserFilesPath'] ;
|
||||
$Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] ;
|
||||
|
||||
$Config['AllowedExtensions']['Media'] = array('aiff', 'asf', 'avi', 'bmp', 'fla', 'flv', 'gif', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'png', 'qt', 'ram', 'rm', 'rmi', 'rmvb', 'swf', 'tif', 'tiff', 'wav', 'wma', 'wmv') ;
|
||||
$Config['DeniedExtensions']['Media'] = array() ;
|
||||
$Config['FileTypesPath']['Media'] = $Config['UserFilesPath'] . 'media/' ;
|
||||
$Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ;
|
||||
$Config['QuickUploadPath']['Media'] = $Config['UserFilesPath'] ;
|
||||
$Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] ;
|
||||
|
||||
?>
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
<?php
|
||||
|
||||
if ( !isset( $_SERVER ) ) {
|
||||
$_SERVER = $HTTP_SERVER_VARS ;
|
||||
}
|
||||
if ( !isset( $_GET ) ) {
|
||||
$_GET = $HTTP_GET_VARS ;
|
||||
}
|
||||
if ( !isset( $_FILES ) ) {
|
||||
$_FILES = $HTTP_POST_FILES ;
|
||||
}
|
||||
|
||||
if ( !defined( 'DIRECTORY_SEPARATOR' ) ) {
|
||||
define( 'DIRECTORY_SEPARATOR',
|
||||
strtoupper(substr(PHP_OS, 0, 3) == 'WIN') ? '\\' : '/'
|
||||
) ;
|
||||
}
|
||||
<?php
|
||||
|
||||
if ( !isset( $_SERVER ) ) {
|
||||
$_SERVER = $HTTP_SERVER_VARS ;
|
||||
}
|
||||
if ( !isset( $_GET ) ) {
|
||||
$_GET = $HTTP_GET_VARS ;
|
||||
}
|
||||
if ( !isset( $_FILES ) ) {
|
||||
$_FILES = $HTTP_POST_FILES ;
|
||||
}
|
||||
|
||||
if ( !defined( 'DIRECTORY_SEPARATOR' ) ) {
|
||||
define( 'DIRECTORY_SEPARATOR',
|
||||
strtoupper(substr(PHP_OS, 0, 3) == 'WIN') ? '\\' : '/'
|
||||
) ;
|
||||
}
|
||||
|
||||
@ -1,23 +1,23 @@
|
||||
# replace the name of this file to .htaccess (if using apache),
|
||||
# and set the proper options and paths according your enviroment
|
||||
|
||||
Allow from all
|
||||
|
||||
# If using mod_python uncomment this:
|
||||
PythonPath "[r'C:\Archivos de programa\Apache Software Foundation\Apache2.2\htdocs\fckeditor\editor\filemanager\connectors\py'] + sys.path"
|
||||
|
||||
|
||||
# Recomended: WSGI application running with mod_python and modpython_gateway
|
||||
SetHandler python-program
|
||||
PythonHandler modpython_gateway::handler
|
||||
PythonOption wsgi.application wsgi::App
|
||||
|
||||
|
||||
# Emulated CGI with mod_python and cgihandler
|
||||
#AddHandler mod_python .py
|
||||
#PythonHandler mod_python.cgihandler
|
||||
|
||||
|
||||
# Plain old CGI
|
||||
#Options +ExecCGI
|
||||
#AddHandler cgi-script py
|
||||
# replace the name of this file to .htaccess (if using apache),
|
||||
# and set the proper options and paths according your enviroment
|
||||
|
||||
Allow from all
|
||||
|
||||
# If using mod_python uncomment this:
|
||||
PythonPath "[r'C:\Archivos de programa\Apache Software Foundation\Apache2.2\htdocs\fckeditor\editor\filemanager\connectors\py'] + sys.path"
|
||||
|
||||
|
||||
# Recomended: WSGI application running with mod_python and modpython_gateway
|
||||
SetHandler python-program
|
||||
PythonHandler modpython_gateway::handler
|
||||
PythonOption wsgi.application wsgi::App
|
||||
|
||||
|
||||
# Emulated CGI with mod_python and cgihandler
|
||||
#AddHandler mod_python .py
|
||||
#PythonHandler mod_python.cgihandler
|
||||
|
||||
|
||||
# Plain old CGI
|
||||
#Options +ExecCGI
|
||||
#AddHandler cgi-script py
|
||||
|
||||
@ -1,341 +1,341 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>FAQ</title>
|
||||
<link type="text/css" rel="stylesheet" href="fpdf.css">
|
||||
<style type="text/css">
|
||||
ul {list-style-type:none; margin:0; padding:0}
|
||||
ul#answers li {margin-top:1.8em}
|
||||
.question {font-weight:bold; color:#900000}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FAQ</h1>
|
||||
<ul>
|
||||
<li><b>1.</b> <a href='#q1'>What's exactly the license of FPDF? Are there any usage restrictions?</a></li>
|
||||
<li><b>2.</b> <a href='#q2'>When I try to create a PDF, a lot of weird characters show on the screen. Why?</a></li>
|
||||
<li><b>3.</b> <a href='#q3'>I try to generate a PDF and IE displays a blank page. What happens?</a></li>
|
||||
<li><b>4.</b> <a href='#q4'>I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.</a></li>
|
||||
<li><b>5.</b> <a href='#q5'>I try to display a variable in the Header method but nothing prints.</a></li>
|
||||
<li><b>6.</b> <a href='#q6'>I defined the Header and Footer methods in my PDF class but nothing appears.</a></li>
|
||||
<li><b>7.</b> <a href='#q7'>Accented characters are replaced by some strange characters like é.</a></li>
|
||||
<li><b>8.</b> <a href='#q8'>I try to display the Euro symbol but it doesn't work.</a></li>
|
||||
<li><b>9.</b> <a href='#q9'>I get the following error when I try to generate a PDF: Some data has already been output, can't send PDF file</a></li>
|
||||
<li><b>10.</b> <a href='#q10'>I draw a frame with very precise dimensions, but when printed I notice some differences.</a></li>
|
||||
<li><b>11.</b> <a href='#q11'>I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?</a></li>
|
||||
<li><b>12.</b> <a href='#q12'>How can I put a background in my PDF?</a></li>
|
||||
<li><b>13.</b> <a href='#q13'>How can I set a specific header or footer on the first page?</a></li>
|
||||
<li><b>14.</b> <a href='#q14'>I'd like to use extensions provided by different scripts. How can I combine them?</a></li>
|
||||
<li><b>15.</b> <a href='#q15'>How can I send the PDF by email?</a></li>
|
||||
<li><b>16.</b> <a href='#q16'>What's the limit of the file sizes I can generate with FPDF?</a></li>
|
||||
<li><b>17.</b> <a href='#q17'>Can I modify a PDF with FPDF?</a></li>
|
||||
<li><b>18.</b> <a href='#q18'>I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?</a></li>
|
||||
<li><b>19.</b> <a href='#q19'>Can I convert an HTML page to PDF with FPDF?</a></li>
|
||||
<li><b>20.</b> <a href='#q20'>Can I concatenate PDF files with FPDF?</a></li>
|
||||
</ul>
|
||||
|
||||
<ul id='answers'>
|
||||
<li id='q1'>
|
||||
<p><b>1.</b> <span class='question'>What's exactly the license of FPDF? Are there any usage restrictions?</span></p>
|
||||
FPDF is released under a permissive license: there is no usage restriction. You may embed it
|
||||
freely in your application (commercial or not), with or without modifications.
|
||||
</li>
|
||||
|
||||
<li id='q2'>
|
||||
<p><b>2.</b> <span class='question'>When I try to create a PDF, a lot of weird characters show on the screen. Why?</span></p>
|
||||
These "weird" characters are in fact the actual content of your PDF. This behavior is a bug of
|
||||
IE6. When it first receives an HTML page, then a PDF from the same URL, it displays it directly
|
||||
without launching Acrobat. This happens frequently during the development stage: on the least
|
||||
script error, an HTML page is sent, and after correction, the PDF arrives.
|
||||
<br>
|
||||
To solve the problem, simply quit and restart IE. You can also go to another URL and come
|
||||
back.
|
||||
<br>
|
||||
To avoid this kind of inconvenience during the development, you can generate the PDF directly
|
||||
to a file and open it through the explorer.
|
||||
</li>
|
||||
|
||||
<li id='q3'>
|
||||
<p><b>3.</b> <span class='question'>I try to generate a PDF and IE displays a blank page. What happens?</span></p>
|
||||
First of all, check that you send nothing to the browser after the PDF (not even a space or a
|
||||
carriage return). You can put an exit statement just after the call to the Output() method to
|
||||
be sure. If it still doesn't work, it means you're a victim of the "blank page syndrome". IE
|
||||
used in conjunction with the Acrobat plug-in suffers from many bugs. To avoid these problems
|
||||
in a reliable manner, two main techniques exist:
|
||||
<br>
|
||||
<br>
|
||||
- Disable the plug-in and use Acrobat as a helper application. To do this, launch Acrobat, go
|
||||
to the Edit menu, Preferences, Internet, and uncheck "Display PDF in browser". Then, the next
|
||||
time you load a PDF in IE, it displays the dialog box "Open it" or "Save it to disk". Uncheck
|
||||
the option "Always ask before opening this type of file" and choose Open. From now on, PDF files
|
||||
will open automatically in an external Acrobat window.
|
||||
<br>
|
||||
The drawback of the method is that you need to alter the client configuration, which you can do
|
||||
in an intranet environment but not for the Internet.
|
||||
<br>
|
||||
<br>
|
||||
- Use a redirection technique. It consists in generating the PDF in a temporary file on the server
|
||||
and redirect the client to it. For example, at the end of the script, you can put the following:
|
||||
<div class="doc-source">
|
||||
<pre><code>//Determine a temporary file name in the current directory
|
||||
$file = basename(tempnam('.', 'tmp'));
|
||||
rename($file, $file.'.pdf');
|
||||
$file .= '.pdf';
|
||||
//Save PDF to file
|
||||
$pdf->Output($file, 'F');
|
||||
//Redirect
|
||||
header('Location: '.$file);</code></pre>
|
||||
</div>
|
||||
This method turns the dynamic PDF into a static one and avoids all troubles. But you have to do
|
||||
some cleaning in order to delete the temporary files. For example:
|
||||
<div class="doc-source">
|
||||
<pre><code>function CleanFiles($dir)
|
||||
{
|
||||
//Delete temporary files
|
||||
$t = time();
|
||||
$h = opendir($dir);
|
||||
while($file=readdir($h))
|
||||
{
|
||||
if(substr($file,0,3)=='tmp' && substr($file,-4)=='.pdf')
|
||||
{
|
||||
$path = $dir.'/'.$file;
|
||||
if($t-filemtime($path)>3600)
|
||||
@unlink($path);
|
||||
}
|
||||
}
|
||||
closedir($h);
|
||||
}</code></pre>
|
||||
</div>
|
||||
This function deletes all files of the form tmp*.pdf older than an hour in the specified
|
||||
directory. You may call it where you want, for example in the script which generates the PDF.
|
||||
</li>
|
||||
|
||||
<li id='q4'>
|
||||
<p><b>4.</b> <span class='question'>I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.</span></p>
|
||||
You have to enclose your string with double quotes, not single ones.
|
||||
</li>
|
||||
|
||||
<li id='q5'>
|
||||
<p><b>5.</b> <span class='question'>I try to display a variable in the Header method but nothing prints.</span></p>
|
||||
You have to use the <code>global</code> keyword to access global variables, for example:
|
||||
<div class="doc-source">
|
||||
<pre><code>function Header()
|
||||
{
|
||||
global $title;
|
||||
|
||||
$this->SetFont('Arial', 'B', 15);
|
||||
$this->Cell(0, 10, $title, 1, 1, 'C');
|
||||
}
|
||||
|
||||
$title = 'My title';</code></pre>
|
||||
</div>
|
||||
Alternatively, you can use an object property:
|
||||
<div class="doc-source">
|
||||
<pre><code>function Header()
|
||||
{
|
||||
$this->SetFont('Arial', 'B', 15);
|
||||
$this->Cell(0, 10, $this->title, 1, 1, 'C');
|
||||
}
|
||||
|
||||
$pdf->title = 'My title';</code></pre>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id='q6'>
|
||||
<p><b>6.</b> <span class='question'>I defined the Header and Footer methods in my PDF class but nothing appears.</span></p>
|
||||
You have to create an object from the PDF class, not FPDF:
|
||||
<div class="doc-source">
|
||||
<pre><code>$pdf = new PDF();</code></pre>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id='q7'>
|
||||
<p><b>7.</b> <span class='question'>Accented characters are replaced by some strange characters like é.</span></p>
|
||||
Don't use UTF-8 encoding. Standard FPDF fonts use ISO-8859-1 or Windows-1252.
|
||||
It is possible to perform a conversion to ISO-8859-1 with utf8_decode():
|
||||
<div class="doc-source">
|
||||
<pre><code>$str = utf8_decode($str);</code></pre>
|
||||
</div>
|
||||
But some characters such as Euro won't be translated correctly. If the iconv extension is available, the
|
||||
right way to do it is the following:
|
||||
<div class="doc-source">
|
||||
<pre><code>$str = iconv('UTF-8', 'windows-1252', $str);</code></pre>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id='q8'>
|
||||
<p><b>8.</b> <span class='question'>I try to display the Euro symbol but it doesn't work.</span></p>
|
||||
The standard fonts have the Euro character at position 128. You can define a constant like this
|
||||
for convenience:
|
||||
<div class="doc-source">
|
||||
<pre><code>define('EURO', chr(128));</code></pre>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id='q9'>
|
||||
<p><b>9.</b> <span class='question'>I get the following error when I try to generate a PDF: Some data has already been output, can't send PDF file</span></p>
|
||||
You must send nothing to the browser except the PDF itself: no HTML, no space, no carriage return. A common
|
||||
case is having extra blank at the end of an included script file.<br>
|
||||
If you can't figure out where the problem comes from, this other message appearing just before can help you:<br>
|
||||
<br>
|
||||
<b>Warning:</b> Cannot modify header information - headers already sent by (output started at script.php:X)<br>
|
||||
<br>
|
||||
It means that script.php outputs something at line X. Go to this line and fix it.
|
||||
In case the message doesn't show, first check that you didn't disable warnings, then add this at the very
|
||||
beginning of your script:
|
||||
<div class="doc-source">
|
||||
<pre><code>ob_end_clean();</code></pre>
|
||||
</div>
|
||||
If you still don't see it, disable zlib.output_compression in your php.ini and it should appear.
|
||||
</li>
|
||||
|
||||
<li id='q10'>
|
||||
<p><b>10.</b> <span class='question'>I draw a frame with very precise dimensions, but when printed I notice some differences.</span></p>
|
||||
To respect dimensions, select "None" for the Page Scaling setting instead of "Shrink to Printable Area" in the print dialog box.
|
||||
</li>
|
||||
|
||||
<li id='q11'>
|
||||
<p><b>11.</b> <span class='question'>I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?</span></p>
|
||||
Printers have physical margins (different depending on the models); it is therefore impossible to remove
|
||||
them and print on the whole surface of the paper.
|
||||
</li>
|
||||
|
||||
<li id='q12'>
|
||||
<p><b>12.</b> <span class='question'>How can I put a background in my PDF?</span></p>
|
||||
For a picture, call Image() in the Header() method, before any other output. To set a background color, use Rect().
|
||||
</li>
|
||||
|
||||
<li id='q13'>
|
||||
<p><b>13.</b> <span class='question'>How can I set a specific header or footer on the first page?</span></p>
|
||||
Simply test the page number:
|
||||
<div class="doc-source">
|
||||
<pre><code>function Header()
|
||||
{
|
||||
if($this->PageNo()==1)
|
||||
{
|
||||
//First page
|
||||
...
|
||||
}
|
||||
else
|
||||
{
|
||||
//Other pages
|
||||
...
|
||||
}
|
||||
}</code></pre>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id='q14'>
|
||||
<p><b>14.</b> <span class='question'>I'd like to use extensions provided by different scripts. How can I combine them?</span></p>
|
||||
Use an inheritance chain. If you have two classes, say A in a.php:
|
||||
<div class="doc-source">
|
||||
<pre><code>require('fpdf.php');
|
||||
|
||||
class A extends FPDF
|
||||
{
|
||||
...
|
||||
}</code></pre>
|
||||
</div>
|
||||
and B in b.php:
|
||||
<div class="doc-source">
|
||||
<pre><code>require('fpdf.php');
|
||||
|
||||
class B extends FPDF
|
||||
{
|
||||
...
|
||||
}</code></pre>
|
||||
</div>
|
||||
then make B extend A:
|
||||
<div class="doc-source">
|
||||
<pre><code>require('a.php');
|
||||
|
||||
class B extends A
|
||||
{
|
||||
...
|
||||
}</code></pre>
|
||||
</div>
|
||||
and make your own class extend B:
|
||||
<div class="doc-source">
|
||||
<pre><code>require('b.php');
|
||||
|
||||
class PDF extends B
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
$pdf = new PDF();</code></pre>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id='q15'>
|
||||
<p><b>15.</b> <span class='question'>How can I send the PDF by email?</span></p>
|
||||
As any other file, but an easy way is to use <a href="http://phpmailer.codeworxtech.com">PHPMailer</a> and
|
||||
its in-memory attachment:
|
||||
<div class="doc-source">
|
||||
<pre><code>$mail = new PHPMailer();
|
||||
...
|
||||
$doc = $pdf->Output('', 'S');
|
||||
$mail->AddStringAttachment($doc, 'doc.pdf', 'base64', 'application/pdf');
|
||||
$mail->Send();</code></pre>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id='q16'>
|
||||
<p><b>16.</b> <span class='question'>What's the limit of the file sizes I can generate with FPDF?</span></p>
|
||||
There is no particular limit. There are some constraints, however:
|
||||
<br>
|
||||
<br>
|
||||
- The maximum memory size allocated to PHP scripts is usually 8MB. For very big documents,
|
||||
especially with images, this limit may be reached (the file being built into memory). The
|
||||
parameter is configured in the php.ini file.
|
||||
<br>
|
||||
<br>
|
||||
- The maximum execution time allocated defaults to 30 seconds. This limit can of course be easily
|
||||
reached. It is configured in php.ini and may be altered dynamically with set_time_limit().
|
||||
<br>
|
||||
<br>
|
||||
- Browsers generally have a 5 minute time-out. If you send the PDF directly to the browser and
|
||||
reach the limit, it will be lost. It is therefore advised for very big documents to
|
||||
generate them in a file, and to send some data to the browser from time to time (with a call
|
||||
to flush() to force the output). When the document is finished, you can send a redirection to
|
||||
it or create a link.
|
||||
<br>
|
||||
Remark: even if the browser times out, the script may continue to run on the server.
|
||||
</li>
|
||||
|
||||
<li id='q17'>
|
||||
<p><b>17.</b> <span class='question'>Can I modify a PDF with FPDF?</span></p>
|
||||
It is possible to import pages from an existing PDF document thanks to the FPDI extension:<br>
|
||||
<br>
|
||||
<a href="http://www.setasign.de/products/pdf-php-solutions/fpdi/" target="_blank">http://www.setasign.de/products/pdf-php-solutions/fpdi/</a><br>
|
||||
<br>
|
||||
You can then add some content to them.
|
||||
</li>
|
||||
|
||||
<li id='q18'>
|
||||
<p><b>18.</b> <span class='question'>I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?</span></p>
|
||||
No. But a GPL C utility does exist, pdftotext, which is able to extract the textual content from
|
||||
a PDF. It is provided with the Xpdf package:<br>
|
||||
<br>
|
||||
<a href="http://www.foolabs.com/xpdf/" target="_blank">http://www.foolabs.com/xpdf/</a>
|
||||
</li>
|
||||
|
||||
<li id='q19'>
|
||||
<p><b>19.</b> <span class='question'>Can I convert an HTML page to PDF with FPDF?</span></p>
|
||||
Not real-world pages. But a GPL C utility does exist, htmldoc, which allows to do it and gives good results:<br>
|
||||
<br>
|
||||
<a href="http://www.htmldoc.org" target="_blank">http://www.htmldoc.org</a>
|
||||
</li>
|
||||
|
||||
<li id='q20'>
|
||||
<p><b>20.</b> <span class='question'>Can I concatenate PDF files with FPDF?</span></p>
|
||||
Not directly, but it is possible to use <a href="http://www.setasign.de/products/pdf-php-solutions/fpdi/demos/concatenate-fake/" target="_blank">FPDI</a>
|
||||
to perform this task. Some free command-line tools also exist:<br>
|
||||
<br>
|
||||
<a href="http://thierry.schmit.free.fr/spip/spip.php?article15&lang=en" target="_blank">mbtPdfAsm</a><br>
|
||||
<a href="http://www.accesspdf.com/pdftk/" target="_blank">pdftk</a>
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>FAQ</title>
|
||||
<link type="text/css" rel="stylesheet" href="fpdf.css">
|
||||
<style type="text/css">
|
||||
ul {list-style-type:none; margin:0; padding:0}
|
||||
ul#answers li {margin-top:1.8em}
|
||||
.question {font-weight:bold; color:#900000}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FAQ</h1>
|
||||
<ul>
|
||||
<li><b>1.</b> <a href='#q1'>What's exactly the license of FPDF? Are there any usage restrictions?</a></li>
|
||||
<li><b>2.</b> <a href='#q2'>When I try to create a PDF, a lot of weird characters show on the screen. Why?</a></li>
|
||||
<li><b>3.</b> <a href='#q3'>I try to generate a PDF and IE displays a blank page. What happens?</a></li>
|
||||
<li><b>4.</b> <a href='#q4'>I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.</a></li>
|
||||
<li><b>5.</b> <a href='#q5'>I try to display a variable in the Header method but nothing prints.</a></li>
|
||||
<li><b>6.</b> <a href='#q6'>I defined the Header and Footer methods in my PDF class but nothing appears.</a></li>
|
||||
<li><b>7.</b> <a href='#q7'>Accented characters are replaced by some strange characters like é.</a></li>
|
||||
<li><b>8.</b> <a href='#q8'>I try to display the Euro symbol but it doesn't work.</a></li>
|
||||
<li><b>9.</b> <a href='#q9'>I get the following error when I try to generate a PDF: Some data has already been output, can't send PDF file</a></li>
|
||||
<li><b>10.</b> <a href='#q10'>I draw a frame with very precise dimensions, but when printed I notice some differences.</a></li>
|
||||
<li><b>11.</b> <a href='#q11'>I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?</a></li>
|
||||
<li><b>12.</b> <a href='#q12'>How can I put a background in my PDF?</a></li>
|
||||
<li><b>13.</b> <a href='#q13'>How can I set a specific header or footer on the first page?</a></li>
|
||||
<li><b>14.</b> <a href='#q14'>I'd like to use extensions provided by different scripts. How can I combine them?</a></li>
|
||||
<li><b>15.</b> <a href='#q15'>How can I send the PDF by email?</a></li>
|
||||
<li><b>16.</b> <a href='#q16'>What's the limit of the file sizes I can generate with FPDF?</a></li>
|
||||
<li><b>17.</b> <a href='#q17'>Can I modify a PDF with FPDF?</a></li>
|
||||
<li><b>18.</b> <a href='#q18'>I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?</a></li>
|
||||
<li><b>19.</b> <a href='#q19'>Can I convert an HTML page to PDF with FPDF?</a></li>
|
||||
<li><b>20.</b> <a href='#q20'>Can I concatenate PDF files with FPDF?</a></li>
|
||||
</ul>
|
||||
|
||||
<ul id='answers'>
|
||||
<li id='q1'>
|
||||
<p><b>1.</b> <span class='question'>What's exactly the license of FPDF? Are there any usage restrictions?</span></p>
|
||||
FPDF is released under a permissive license: there is no usage restriction. You may embed it
|
||||
freely in your application (commercial or not), with or without modifications.
|
||||
</li>
|
||||
|
||||
<li id='q2'>
|
||||
<p><b>2.</b> <span class='question'>When I try to create a PDF, a lot of weird characters show on the screen. Why?</span></p>
|
||||
These "weird" characters are in fact the actual content of your PDF. This behavior is a bug of
|
||||
IE6. When it first receives an HTML page, then a PDF from the same URL, it displays it directly
|
||||
without launching Acrobat. This happens frequently during the development stage: on the least
|
||||
script error, an HTML page is sent, and after correction, the PDF arrives.
|
||||
<br>
|
||||
To solve the problem, simply quit and restart IE. You can also go to another URL and come
|
||||
back.
|
||||
<br>
|
||||
To avoid this kind of inconvenience during the development, you can generate the PDF directly
|
||||
to a file and open it through the explorer.
|
||||
</li>
|
||||
|
||||
<li id='q3'>
|
||||
<p><b>3.</b> <span class='question'>I try to generate a PDF and IE displays a blank page. What happens?</span></p>
|
||||
First of all, check that you send nothing to the browser after the PDF (not even a space or a
|
||||
carriage return). You can put an exit statement just after the call to the Output() method to
|
||||
be sure. If it still doesn't work, it means you're a victim of the "blank page syndrome". IE
|
||||
used in conjunction with the Acrobat plug-in suffers from many bugs. To avoid these problems
|
||||
in a reliable manner, two main techniques exist:
|
||||
<br>
|
||||
<br>
|
||||
- Disable the plug-in and use Acrobat as a helper application. To do this, launch Acrobat, go
|
||||
to the Edit menu, Preferences, Internet, and uncheck "Display PDF in browser". Then, the next
|
||||
time you load a PDF in IE, it displays the dialog box "Open it" or "Save it to disk". Uncheck
|
||||
the option "Always ask before opening this type of file" and choose Open. From now on, PDF files
|
||||
will open automatically in an external Acrobat window.
|
||||
<br>
|
||||
The drawback of the method is that you need to alter the client configuration, which you can do
|
||||
in an intranet environment but not for the Internet.
|
||||
<br>
|
||||
<br>
|
||||
- Use a redirection technique. It consists in generating the PDF in a temporary file on the server
|
||||
and redirect the client to it. For example, at the end of the script, you can put the following:
|
||||
<div class="doc-source">
|
||||
<pre><code>//Determine a temporary file name in the current directory
|
||||
$file = basename(tempnam('.', 'tmp'));
|
||||
rename($file, $file.'.pdf');
|
||||
$file .= '.pdf';
|
||||
//Save PDF to file
|
||||
$pdf->Output($file, 'F');
|
||||
//Redirect
|
||||
header('Location: '.$file);</code></pre>
|
||||
</div>
|
||||
This method turns the dynamic PDF into a static one and avoids all troubles. But you have to do
|
||||
some cleaning in order to delete the temporary files. For example:
|
||||
<div class="doc-source">
|
||||
<pre><code>function CleanFiles($dir)
|
||||
{
|
||||
//Delete temporary files
|
||||
$t = time();
|
||||
$h = opendir($dir);
|
||||
while($file=readdir($h))
|
||||
{
|
||||
if(substr($file,0,3)=='tmp' && substr($file,-4)=='.pdf')
|
||||
{
|
||||
$path = $dir.'/'.$file;
|
||||
if($t-filemtime($path)>3600)
|
||||
@unlink($path);
|
||||
}
|
||||
}
|
||||
closedir($h);
|
||||
}</code></pre>
|
||||
</div>
|
||||
This function deletes all files of the form tmp*.pdf older than an hour in the specified
|
||||
directory. You may call it where you want, for example in the script which generates the PDF.
|
||||
</li>
|
||||
|
||||
<li id='q4'>
|
||||
<p><b>4.</b> <span class='question'>I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.</span></p>
|
||||
You have to enclose your string with double quotes, not single ones.
|
||||
</li>
|
||||
|
||||
<li id='q5'>
|
||||
<p><b>5.</b> <span class='question'>I try to display a variable in the Header method but nothing prints.</span></p>
|
||||
You have to use the <code>global</code> keyword to access global variables, for example:
|
||||
<div class="doc-source">
|
||||
<pre><code>function Header()
|
||||
{
|
||||
global $title;
|
||||
|
||||
$this->SetFont('Arial', 'B', 15);
|
||||
$this->Cell(0, 10, $title, 1, 1, 'C');
|
||||
}
|
||||
|
||||
$title = 'My title';</code></pre>
|
||||
</div>
|
||||
Alternatively, you can use an object property:
|
||||
<div class="doc-source">
|
||||
<pre><code>function Header()
|
||||
{
|
||||
$this->SetFont('Arial', 'B', 15);
|
||||
$this->Cell(0, 10, $this->title, 1, 1, 'C');
|
||||
}
|
||||
|
||||
$pdf->title = 'My title';</code></pre>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id='q6'>
|
||||
<p><b>6.</b> <span class='question'>I defined the Header and Footer methods in my PDF class but nothing appears.</span></p>
|
||||
You have to create an object from the PDF class, not FPDF:
|
||||
<div class="doc-source">
|
||||
<pre><code>$pdf = new PDF();</code></pre>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id='q7'>
|
||||
<p><b>7.</b> <span class='question'>Accented characters are replaced by some strange characters like é.</span></p>
|
||||
Don't use UTF-8 encoding. Standard FPDF fonts use ISO-8859-1 or Windows-1252.
|
||||
It is possible to perform a conversion to ISO-8859-1 with utf8_decode():
|
||||
<div class="doc-source">
|
||||
<pre><code>$str = utf8_decode($str);</code></pre>
|
||||
</div>
|
||||
But some characters such as Euro won't be translated correctly. If the iconv extension is available, the
|
||||
right way to do it is the following:
|
||||
<div class="doc-source">
|
||||
<pre><code>$str = iconv('UTF-8', 'windows-1252', $str);</code></pre>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id='q8'>
|
||||
<p><b>8.</b> <span class='question'>I try to display the Euro symbol but it doesn't work.</span></p>
|
||||
The standard fonts have the Euro character at position 128. You can define a constant like this
|
||||
for convenience:
|
||||
<div class="doc-source">
|
||||
<pre><code>define('EURO', chr(128));</code></pre>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id='q9'>
|
||||
<p><b>9.</b> <span class='question'>I get the following error when I try to generate a PDF: Some data has already been output, can't send PDF file</span></p>
|
||||
You must send nothing to the browser except the PDF itself: no HTML, no space, no carriage return. A common
|
||||
case is having extra blank at the end of an included script file.<br>
|
||||
If you can't figure out where the problem comes from, this other message appearing just before can help you:<br>
|
||||
<br>
|
||||
<b>Warning:</b> Cannot modify header information - headers already sent by (output started at script.php:X)<br>
|
||||
<br>
|
||||
It means that script.php outputs something at line X. Go to this line and fix it.
|
||||
In case the message doesn't show, first check that you didn't disable warnings, then add this at the very
|
||||
beginning of your script:
|
||||
<div class="doc-source">
|
||||
<pre><code>ob_end_clean();</code></pre>
|
||||
</div>
|
||||
If you still don't see it, disable zlib.output_compression in your php.ini and it should appear.
|
||||
</li>
|
||||
|
||||
<li id='q10'>
|
||||
<p><b>10.</b> <span class='question'>I draw a frame with very precise dimensions, but when printed I notice some differences.</span></p>
|
||||
To respect dimensions, select "None" for the Page Scaling setting instead of "Shrink to Printable Area" in the print dialog box.
|
||||
</li>
|
||||
|
||||
<li id='q11'>
|
||||
<p><b>11.</b> <span class='question'>I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?</span></p>
|
||||
Printers have physical margins (different depending on the models); it is therefore impossible to remove
|
||||
them and print on the whole surface of the paper.
|
||||
</li>
|
||||
|
||||
<li id='q12'>
|
||||
<p><b>12.</b> <span class='question'>How can I put a background in my PDF?</span></p>
|
||||
For a picture, call Image() in the Header() method, before any other output. To set a background color, use Rect().
|
||||
</li>
|
||||
|
||||
<li id='q13'>
|
||||
<p><b>13.</b> <span class='question'>How can I set a specific header or footer on the first page?</span></p>
|
||||
Simply test the page number:
|
||||
<div class="doc-source">
|
||||
<pre><code>function Header()
|
||||
{
|
||||
if($this->PageNo()==1)
|
||||
{
|
||||
//First page
|
||||
...
|
||||
}
|
||||
else
|
||||
{
|
||||
//Other pages
|
||||
...
|
||||
}
|
||||
}</code></pre>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id='q14'>
|
||||
<p><b>14.</b> <span class='question'>I'd like to use extensions provided by different scripts. How can I combine them?</span></p>
|
||||
Use an inheritance chain. If you have two classes, say A in a.php:
|
||||
<div class="doc-source">
|
||||
<pre><code>require('fpdf.php');
|
||||
|
||||
class A extends FPDF
|
||||
{
|
||||
...
|
||||
}</code></pre>
|
||||
</div>
|
||||
and B in b.php:
|
||||
<div class="doc-source">
|
||||
<pre><code>require('fpdf.php');
|
||||
|
||||
class B extends FPDF
|
||||
{
|
||||
...
|
||||
}</code></pre>
|
||||
</div>
|
||||
then make B extend A:
|
||||
<div class="doc-source">
|
||||
<pre><code>require('a.php');
|
||||
|
||||
class B extends A
|
||||
{
|
||||
...
|
||||
}</code></pre>
|
||||
</div>
|
||||
and make your own class extend B:
|
||||
<div class="doc-source">
|
||||
<pre><code>require('b.php');
|
||||
|
||||
class PDF extends B
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
$pdf = new PDF();</code></pre>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id='q15'>
|
||||
<p><b>15.</b> <span class='question'>How can I send the PDF by email?</span></p>
|
||||
As any other file, but an easy way is to use <a href="http://phpmailer.codeworxtech.com">PHPMailer</a> and
|
||||
its in-memory attachment:
|
||||
<div class="doc-source">
|
||||
<pre><code>$mail = new PHPMailer();
|
||||
...
|
||||
$doc = $pdf->Output('', 'S');
|
||||
$mail->AddStringAttachment($doc, 'doc.pdf', 'base64', 'application/pdf');
|
||||
$mail->Send();</code></pre>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id='q16'>
|
||||
<p><b>16.</b> <span class='question'>What's the limit of the file sizes I can generate with FPDF?</span></p>
|
||||
There is no particular limit. There are some constraints, however:
|
||||
<br>
|
||||
<br>
|
||||
- The maximum memory size allocated to PHP scripts is usually 8MB. For very big documents,
|
||||
especially with images, this limit may be reached (the file being built into memory). The
|
||||
parameter is configured in the php.ini file.
|
||||
<br>
|
||||
<br>
|
||||
- The maximum execution time allocated defaults to 30 seconds. This limit can of course be easily
|
||||
reached. It is configured in php.ini and may be altered dynamically with set_time_limit().
|
||||
<br>
|
||||
<br>
|
||||
- Browsers generally have a 5 minute time-out. If you send the PDF directly to the browser and
|
||||
reach the limit, it will be lost. It is therefore advised for very big documents to
|
||||
generate them in a file, and to send some data to the browser from time to time (with a call
|
||||
to flush() to force the output). When the document is finished, you can send a redirection to
|
||||
it or create a link.
|
||||
<br>
|
||||
Remark: even if the browser times out, the script may continue to run on the server.
|
||||
</li>
|
||||
|
||||
<li id='q17'>
|
||||
<p><b>17.</b> <span class='question'>Can I modify a PDF with FPDF?</span></p>
|
||||
It is possible to import pages from an existing PDF document thanks to the FPDI extension:<br>
|
||||
<br>
|
||||
<a href="http://www.setasign.de/products/pdf-php-solutions/fpdi/" target="_blank">http://www.setasign.de/products/pdf-php-solutions/fpdi/</a><br>
|
||||
<br>
|
||||
You can then add some content to them.
|
||||
</li>
|
||||
|
||||
<li id='q18'>
|
||||
<p><b>18.</b> <span class='question'>I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?</span></p>
|
||||
No. But a GPL C utility does exist, pdftotext, which is able to extract the textual content from
|
||||
a PDF. It is provided with the Xpdf package:<br>
|
||||
<br>
|
||||
<a href="http://www.foolabs.com/xpdf/" target="_blank">http://www.foolabs.com/xpdf/</a>
|
||||
</li>
|
||||
|
||||
<li id='q19'>
|
||||
<p><b>19.</b> <span class='question'>Can I convert an HTML page to PDF with FPDF?</span></p>
|
||||
Not real-world pages. But a GPL C utility does exist, htmldoc, which allows to do it and gives good results:<br>
|
||||
<br>
|
||||
<a href="http://www.htmldoc.org" target="_blank">http://www.htmldoc.org</a>
|
||||
</li>
|
||||
|
||||
<li id='q20'>
|
||||
<p><b>20.</b> <span class='question'>Can I concatenate PDF files with FPDF?</span></p>
|
||||
Not directly, but it is possible to use <a href="http://www.setasign.de/products/pdf-php-solutions/fpdi/demos/concatenate-fake/" target="_blank">FPDI</a>
|
||||
to perform this task. Some free command-line tools also exist:<br>
|
||||
<br>
|
||||
<a href="http://thierry.schmit.free.fr/spip/spip.php?article15&lang=en" target="_blank">mbtPdfAsm</a><br>
|
||||
<a href="http://www.accesspdf.com/pdftk/" target="_blank">pdftk</a>
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
for($i=0;$i<=255;$i++)
|
||||
$fpdf_charwidths['courier'][chr($i)]=600;
|
||||
$fpdf_charwidths['courierB']=$fpdf_charwidths['courier'];
|
||||
$fpdf_charwidths['courierI']=$fpdf_charwidths['courier'];
|
||||
$fpdf_charwidths['courierBI']=$fpdf_charwidths['courier'];
|
||||
?>
|
||||
<?php
|
||||
for($i=0;$i<=255;$i++)
|
||||
$fpdf_charwidths['courier'][chr($i)]=600;
|
||||
$fpdf_charwidths['courierB']=$fpdf_charwidths['courier'];
|
||||
$fpdf_charwidths['courierI']=$fpdf_charwidths['courier'];
|
||||
$fpdf_charwidths['courierBI']=$fpdf_charwidths['courier'];
|
||||
?>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
[ViewState]
|
||||
Mode=
|
||||
Vid=
|
||||
FolderType=NotSpecified
|
||||
[ViewState]
|
||||
Mode=
|
||||
Vid=
|
||||
FolderType=NotSpecified
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helvetica']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
|
||||
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
<?php
|
||||
$fpdf_charwidths['helvetica']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
|
||||
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaB']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
|
||||
?>
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaB']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
|
||||
?>
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaBI']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
|
||||
?>
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaBI']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
|
||||
?>
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaI']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
|
||||
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaI']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
|
||||
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
|
||||
@ -1,419 +1,419 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Utility to generate font definition files *
|
||||
* *
|
||||
* Version: 1.14 *
|
||||
* Date: 2008-08-03 *
|
||||
* Author: Olivier PLATHEY *
|
||||
*******************************************************************************/
|
||||
|
||||
function ReadMap($enc)
|
||||
{
|
||||
//Read a map file
|
||||
$file=dirname(__FILE__).'/'.strtolower($enc).'.map';
|
||||
$a=file($file);
|
||||
if(empty($a))
|
||||
die('<b>Error:</b> encoding not found: '.$enc);
|
||||
$cc2gn=array();
|
||||
foreach($a as $l)
|
||||
{
|
||||
if($l[0]=='!')
|
||||
{
|
||||
$e=preg_split('/[ \\t]+/',rtrim($l));
|
||||
$cc=hexdec(substr($e[0],1));
|
||||
$gn=$e[2];
|
||||
$cc2gn[$cc]=$gn;
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=255;$i++)
|
||||
{
|
||||
if(!isset($cc2gn[$i]))
|
||||
$cc2gn[$i]='.notdef';
|
||||
}
|
||||
return $cc2gn;
|
||||
}
|
||||
|
||||
function ReadAFM($file, &$map)
|
||||
{
|
||||
//Read a font metric file
|
||||
$a=file($file);
|
||||
if(empty($a))
|
||||
die('File not found');
|
||||
$widths=array();
|
||||
$fm=array();
|
||||
$fix=array('Edot'=>'Edotaccent','edot'=>'edotaccent','Idot'=>'Idotaccent','Zdot'=>'Zdotaccent','zdot'=>'zdotaccent',
|
||||
'Odblacute'=>'Ohungarumlaut','odblacute'=>'ohungarumlaut','Udblacute'=>'Uhungarumlaut','udblacute'=>'uhungarumlaut',
|
||||
'Gcedilla'=>'Gcommaaccent','gcedilla'=>'gcommaaccent','Kcedilla'=>'Kcommaaccent','kcedilla'=>'kcommaaccent',
|
||||
'Lcedilla'=>'Lcommaaccent','lcedilla'=>'lcommaaccent','Ncedilla'=>'Ncommaaccent','ncedilla'=>'ncommaaccent',
|
||||
'Rcedilla'=>'Rcommaaccent','rcedilla'=>'rcommaaccent','Scedilla'=>'Scommaaccent','scedilla'=>'scommaaccent',
|
||||
'Tcedilla'=>'Tcommaaccent','tcedilla'=>'tcommaaccent','Dslash'=>'Dcroat','dslash'=>'dcroat','Dmacron'=>'Dcroat','dmacron'=>'dcroat',
|
||||
'combininggraveaccent'=>'gravecomb','combininghookabove'=>'hookabovecomb','combiningtildeaccent'=>'tildecomb',
|
||||
'combiningacuteaccent'=>'acutecomb','combiningdotbelow'=>'dotbelowcomb','dongsign'=>'dong');
|
||||
foreach($a as $l)
|
||||
{
|
||||
$e=explode(' ',rtrim($l));
|
||||
if(count($e)<2)
|
||||
continue;
|
||||
$code=$e[0];
|
||||
$param=$e[1];
|
||||
if($code=='C')
|
||||
{
|
||||
//Character metrics
|
||||
$cc=(int)$e[1];
|
||||
$w=$e[4];
|
||||
$gn=$e[7];
|
||||
if(substr($gn,-4)=='20AC')
|
||||
$gn='Euro';
|
||||
if(isset($fix[$gn]))
|
||||
{
|
||||
//Fix incorrect glyph name
|
||||
foreach($map as $c=>$n)
|
||||
{
|
||||
if($n==$fix[$gn])
|
||||
$map[$c]=$gn;
|
||||
}
|
||||
}
|
||||
if(empty($map))
|
||||
{
|
||||
//Symbolic font: use built-in encoding
|
||||
$widths[$cc]=$w;
|
||||
}
|
||||
else
|
||||
{
|
||||
$widths[$gn]=$w;
|
||||
if($gn=='X')
|
||||
$fm['CapXHeight']=$e[13];
|
||||
}
|
||||
if($gn=='.notdef')
|
||||
$fm['MissingWidth']=$w;
|
||||
}
|
||||
elseif($code=='FontName')
|
||||
$fm['FontName']=$param;
|
||||
elseif($code=='Weight')
|
||||
$fm['Weight']=$param;
|
||||
elseif($code=='ItalicAngle')
|
||||
$fm['ItalicAngle']=(double)$param;
|
||||
elseif($code=='Ascender')
|
||||
$fm['Ascender']=(int)$param;
|
||||
elseif($code=='Descender')
|
||||
$fm['Descender']=(int)$param;
|
||||
elseif($code=='UnderlineThickness')
|
||||
$fm['UnderlineThickness']=(int)$param;
|
||||
elseif($code=='UnderlinePosition')
|
||||
$fm['UnderlinePosition']=(int)$param;
|
||||
elseif($code=='IsFixedPitch')
|
||||
$fm['IsFixedPitch']=($param=='true');
|
||||
elseif($code=='FontBBox')
|
||||
$fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]);
|
||||
elseif($code=='CapHeight')
|
||||
$fm['CapHeight']=(int)$param;
|
||||
elseif($code=='StdVW')
|
||||
$fm['StdVW']=(int)$param;
|
||||
}
|
||||
if(!isset($fm['FontName']))
|
||||
die('FontName not found');
|
||||
if(!empty($map))
|
||||
{
|
||||
if(!isset($widths['.notdef']))
|
||||
$widths['.notdef']=600;
|
||||
if(!isset($widths['Delta']) && isset($widths['increment']))
|
||||
$widths['Delta']=$widths['increment'];
|
||||
//Order widths according to map
|
||||
for($i=0;$i<=255;$i++)
|
||||
{
|
||||
if(!isset($widths[$map[$i]]))
|
||||
{
|
||||
echo '<b>Warning:</b> character '.$map[$i].' is missing<br>';
|
||||
$widths[$i]=$widths['.notdef'];
|
||||
}
|
||||
else
|
||||
$widths[$i]=$widths[$map[$i]];
|
||||
}
|
||||
}
|
||||
$fm['Widths']=$widths;
|
||||
return $fm;
|
||||
}
|
||||
|
||||
function MakeFontDescriptor($fm, $symbolic)
|
||||
{
|
||||
//Ascent
|
||||
$asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000);
|
||||
$fd="array('Ascent'=>".$asc;
|
||||
//Descent
|
||||
$desc=(isset($fm['Descender']) ? $fm['Descender'] : -200);
|
||||
$fd.=",'Descent'=>".$desc;
|
||||
//CapHeight
|
||||
if(isset($fm['CapHeight']))
|
||||
$ch=$fm['CapHeight'];
|
||||
elseif(isset($fm['CapXHeight']))
|
||||
$ch=$fm['CapXHeight'];
|
||||
else
|
||||
$ch=$asc;
|
||||
$fd.=",'CapHeight'=>".$ch;
|
||||
//Flags
|
||||
$flags=0;
|
||||
if(isset($fm['IsFixedPitch']) && $fm['IsFixedPitch'])
|
||||
$flags+=1<<0;
|
||||
if($symbolic)
|
||||
$flags+=1<<2;
|
||||
if(!$symbolic)
|
||||
$flags+=1<<5;
|
||||
if(isset($fm['ItalicAngle']) && $fm['ItalicAngle']!=0)
|
||||
$flags+=1<<6;
|
||||
$fd.=",'Flags'=>".$flags;
|
||||
//FontBBox
|
||||
if(isset($fm['FontBBox']))
|
||||
$fbb=$fm['FontBBox'];
|
||||
else
|
||||
$fbb=array(0,$desc-100,1000,$asc+100);
|
||||
$fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'";
|
||||
//ItalicAngle
|
||||
$ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0);
|
||||
$fd.=",'ItalicAngle'=>".$ia;
|
||||
//StemV
|
||||
if(isset($fm['StdVW']))
|
||||
$stemv=$fm['StdVW'];
|
||||
elseif(isset($fm['Weight']) && preg_match('/bold|black/i',$fm['Weight']))
|
||||
$stemv=120;
|
||||
else
|
||||
$stemv=70;
|
||||
$fd.=",'StemV'=>".$stemv;
|
||||
//MissingWidth
|
||||
if(isset($fm['MissingWidth']))
|
||||
$fd.=",'MissingWidth'=>".$fm['MissingWidth'];
|
||||
$fd.=')';
|
||||
return $fd;
|
||||
}
|
||||
|
||||
function MakeWidthArray($fm)
|
||||
{
|
||||
//Make character width array
|
||||
$s="array(\n\t";
|
||||
$cw=$fm['Widths'];
|
||||
for($i=0;$i<=255;$i++)
|
||||
{
|
||||
if(chr($i)=="'")
|
||||
$s.="'\\''";
|
||||
elseif(chr($i)=="\\")
|
||||
$s.="'\\\\'";
|
||||
elseif($i>=32 && $i<=126)
|
||||
$s.="'".chr($i)."'";
|
||||
else
|
||||
$s.="chr($i)";
|
||||
$s.='=>'.$fm['Widths'][$i];
|
||||
if($i<255)
|
||||
$s.=',';
|
||||
if(($i+1)%22==0)
|
||||
$s.="\n\t";
|
||||
}
|
||||
$s.=')';
|
||||
return $s;
|
||||
}
|
||||
|
||||
function MakeFontEncoding($map)
|
||||
{
|
||||
//Build differences from reference encoding
|
||||
$ref=ReadMap('cp1252');
|
||||
$s='';
|
||||
$last=0;
|
||||
for($i=32;$i<=255;$i++)
|
||||
{
|
||||
if($map[$i]!=$ref[$i])
|
||||
{
|
||||
if($i!=$last+1)
|
||||
$s.=$i.' ';
|
||||
$last=$i;
|
||||
$s.='/'.$map[$i].' ';
|
||||
}
|
||||
}
|
||||
return rtrim($s);
|
||||
}
|
||||
|
||||
function SaveToFile($file, $s, $mode)
|
||||
{
|
||||
$f=fopen($file,'w'.$mode);
|
||||
if(!$f)
|
||||
die('Can\'t write to file '.$file);
|
||||
fwrite($f,$s,strlen($s));
|
||||
fclose($f);
|
||||
}
|
||||
|
||||
function ReadShort($f)
|
||||
{
|
||||
$a=unpack('n1n',fread($f,2));
|
||||
return $a['n'];
|
||||
}
|
||||
|
||||
function ReadLong($f)
|
||||
{
|
||||
$a=unpack('N1N',fread($f,4));
|
||||
return $a['N'];
|
||||
}
|
||||
|
||||
function CheckTTF($file)
|
||||
{
|
||||
//Check if font license allows embedding
|
||||
$f=fopen($file,'rb');
|
||||
if(!$f)
|
||||
die('<b>Error:</b> Can\'t open '.$file);
|
||||
//Extract number of tables
|
||||
fseek($f,4,SEEK_CUR);
|
||||
$nb=ReadShort($f);
|
||||
fseek($f,6,SEEK_CUR);
|
||||
//Seek OS/2 table
|
||||
$found=false;
|
||||
for($i=0;$i<$nb;$i++)
|
||||
{
|
||||
if(fread($f,4)=='OS/2')
|
||||
{
|
||||
$found=true;
|
||||
break;
|
||||
}
|
||||
fseek($f,12,SEEK_CUR);
|
||||
}
|
||||
if(!$found)
|
||||
{
|
||||
fclose($f);
|
||||
return;
|
||||
}
|
||||
fseek($f,4,SEEK_CUR);
|
||||
$offset=ReadLong($f);
|
||||
fseek($f,$offset,SEEK_SET);
|
||||
//Extract fsType flags
|
||||
fseek($f,8,SEEK_CUR);
|
||||
$fsType=ReadShort($f);
|
||||
$rl=($fsType & 0x02)!=0;
|
||||
$pp=($fsType & 0x04)!=0;
|
||||
$e=($fsType & 0x08)!=0;
|
||||
fclose($f);
|
||||
if($rl && !$pp && !$e)
|
||||
echo '<b>Warning:</b> font license does not allow embedding';
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* fontfile: path to TTF file (or empty string if not to be embedded) *
|
||||
* afmfile: path to AFM file *
|
||||
* enc: font encoding (or empty string for symbolic fonts) *
|
||||
* patch: optional patch for encoding *
|
||||
* type: font type if fontfile is empty *
|
||||
*******************************************************************************/
|
||||
function MakeFont($fontfile, $afmfile, $enc='cp1252', $patch=array(), $type='TrueType')
|
||||
{
|
||||
//Generate a font definition file
|
||||
if(get_magic_quotes_runtime())
|
||||
@set_magic_quotes_runtime(0);
|
||||
ini_set('auto_detect_line_endings','1');
|
||||
if($enc)
|
||||
{
|
||||
$map=ReadMap($enc);
|
||||
foreach($patch as $cc=>$gn)
|
||||
$map[$cc]=$gn;
|
||||
}
|
||||
else
|
||||
$map=array();
|
||||
if(!file_exists($afmfile))
|
||||
die('<b>Error:</b> AFM file not found: '.$afmfile);
|
||||
$fm=ReadAFM($afmfile,$map);
|
||||
if($enc)
|
||||
$diff=MakeFontEncoding($map);
|
||||
else
|
||||
$diff='';
|
||||
$fd=MakeFontDescriptor($fm,empty($map));
|
||||
//Find font type
|
||||
if($fontfile)
|
||||
{
|
||||
$ext=strtolower(substr($fontfile,-3));
|
||||
if($ext=='ttf')
|
||||
$type='TrueType';
|
||||
elseif($ext=='pfb')
|
||||
$type='Type1';
|
||||
else
|
||||
die('<b>Error:</b> unrecognized font file extension: '.$ext);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($type!='TrueType' && $type!='Type1')
|
||||
die('<b>Error:</b> incorrect font type: '.$type);
|
||||
}
|
||||
//Start generation
|
||||
$s='<?php'."\n";
|
||||
$s.='$type=\''.$type."';\n";
|
||||
$s.='$name=\''.$fm['FontName']."';\n";
|
||||
$s.='$desc='.$fd.";\n";
|
||||
if(!isset($fm['UnderlinePosition']))
|
||||
$fm['UnderlinePosition']=-100;
|
||||
if(!isset($fm['UnderlineThickness']))
|
||||
$fm['UnderlineThickness']=50;
|
||||
$s.='$up='.$fm['UnderlinePosition'].";\n";
|
||||
$s.='$ut='.$fm['UnderlineThickness'].";\n";
|
||||
$w=MakeWidthArray($fm);
|
||||
$s.='$cw='.$w.";\n";
|
||||
$s.='$enc=\''.$enc."';\n";
|
||||
$s.='$diff=\''.$diff."';\n";
|
||||
$basename=substr(basename($afmfile),0,-4);
|
||||
if($fontfile)
|
||||
{
|
||||
//Embedded font
|
||||
if(!file_exists($fontfile))
|
||||
die('<b>Error:</b> font file not found: '.$fontfile);
|
||||
if($type=='TrueType')
|
||||
CheckTTF($fontfile);
|
||||
$f=fopen($fontfile,'rb');
|
||||
if(!$f)
|
||||
die('<b>Error:</b> Can\'t open '.$fontfile);
|
||||
$file=fread($f,filesize($fontfile));
|
||||
fclose($f);
|
||||
if($type=='Type1')
|
||||
{
|
||||
//Find first two sections and discard third one
|
||||
$header=(ord($file[0])==128);
|
||||
if($header)
|
||||
{
|
||||
//Strip first binary header
|
||||
$file=substr($file,6);
|
||||
}
|
||||
$pos=strpos($file,'eexec');
|
||||
if(!$pos)
|
||||
die('<b>Error:</b> font file does not seem to be valid Type1');
|
||||
$size1=$pos+6;
|
||||
if($header && ord($file[$size1])==128)
|
||||
{
|
||||
//Strip second binary header
|
||||
$file=substr($file,0,$size1).substr($file,$size1+6);
|
||||
}
|
||||
$pos=strpos($file,'00000000');
|
||||
if(!$pos)
|
||||
die('<b>Error:</b> font file does not seem to be valid Type1');
|
||||
$size2=$pos-$size1;
|
||||
$file=substr($file,0,$size1+$size2);
|
||||
}
|
||||
if(function_exists('gzcompress'))
|
||||
{
|
||||
$cmp=$basename.'.z';
|
||||
SaveToFile($cmp,gzcompress($file),'b');
|
||||
$s.='$file=\''.$cmp."';\n";
|
||||
echo 'Font file compressed ('.$cmp.')<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$s.='$file=\''.basename($fontfile)."';\n";
|
||||
echo '<b>Notice:</b> font file could not be compressed (zlib extension not available)<br>';
|
||||
}
|
||||
if($type=='Type1')
|
||||
{
|
||||
$s.='$size1='.$size1.";\n";
|
||||
$s.='$size2='.$size2.";\n";
|
||||
}
|
||||
else
|
||||
$s.='$originalsize='.filesize($fontfile).";\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
//Not embedded font
|
||||
$s.='$file='."'';\n";
|
||||
}
|
||||
$s.="?>\n";
|
||||
SaveToFile($basename.'.php',$s,'t');
|
||||
echo 'Font definition file generated ('.$basename.'.php'.')<br>';
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Utility to generate font definition files *
|
||||
* *
|
||||
* Version: 1.14 *
|
||||
* Date: 2008-08-03 *
|
||||
* Author: Olivier PLATHEY *
|
||||
*******************************************************************************/
|
||||
|
||||
function ReadMap($enc)
|
||||
{
|
||||
//Read a map file
|
||||
$file=dirname(__FILE__).'/'.strtolower($enc).'.map';
|
||||
$a=file($file);
|
||||
if(empty($a))
|
||||
die('<b>Error:</b> encoding not found: '.$enc);
|
||||
$cc2gn=array();
|
||||
foreach($a as $l)
|
||||
{
|
||||
if($l[0]=='!')
|
||||
{
|
||||
$e=preg_split('/[ \\t]+/',rtrim($l));
|
||||
$cc=hexdec(substr($e[0],1));
|
||||
$gn=$e[2];
|
||||
$cc2gn[$cc]=$gn;
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=255;$i++)
|
||||
{
|
||||
if(!isset($cc2gn[$i]))
|
||||
$cc2gn[$i]='.notdef';
|
||||
}
|
||||
return $cc2gn;
|
||||
}
|
||||
|
||||
function ReadAFM($file, &$map)
|
||||
{
|
||||
//Read a font metric file
|
||||
$a=file($file);
|
||||
if(empty($a))
|
||||
die('File not found');
|
||||
$widths=array();
|
||||
$fm=array();
|
||||
$fix=array('Edot'=>'Edotaccent','edot'=>'edotaccent','Idot'=>'Idotaccent','Zdot'=>'Zdotaccent','zdot'=>'zdotaccent',
|
||||
'Odblacute'=>'Ohungarumlaut','odblacute'=>'ohungarumlaut','Udblacute'=>'Uhungarumlaut','udblacute'=>'uhungarumlaut',
|
||||
'Gcedilla'=>'Gcommaaccent','gcedilla'=>'gcommaaccent','Kcedilla'=>'Kcommaaccent','kcedilla'=>'kcommaaccent',
|
||||
'Lcedilla'=>'Lcommaaccent','lcedilla'=>'lcommaaccent','Ncedilla'=>'Ncommaaccent','ncedilla'=>'ncommaaccent',
|
||||
'Rcedilla'=>'Rcommaaccent','rcedilla'=>'rcommaaccent','Scedilla'=>'Scommaaccent','scedilla'=>'scommaaccent',
|
||||
'Tcedilla'=>'Tcommaaccent','tcedilla'=>'tcommaaccent','Dslash'=>'Dcroat','dslash'=>'dcroat','Dmacron'=>'Dcroat','dmacron'=>'dcroat',
|
||||
'combininggraveaccent'=>'gravecomb','combininghookabove'=>'hookabovecomb','combiningtildeaccent'=>'tildecomb',
|
||||
'combiningacuteaccent'=>'acutecomb','combiningdotbelow'=>'dotbelowcomb','dongsign'=>'dong');
|
||||
foreach($a as $l)
|
||||
{
|
||||
$e=explode(' ',rtrim($l));
|
||||
if(count($e)<2)
|
||||
continue;
|
||||
$code=$e[0];
|
||||
$param=$e[1];
|
||||
if($code=='C')
|
||||
{
|
||||
//Character metrics
|
||||
$cc=(int)$e[1];
|
||||
$w=$e[4];
|
||||
$gn=$e[7];
|
||||
if(substr($gn,-4)=='20AC')
|
||||
$gn='Euro';
|
||||
if(isset($fix[$gn]))
|
||||
{
|
||||
//Fix incorrect glyph name
|
||||
foreach($map as $c=>$n)
|
||||
{
|
||||
if($n==$fix[$gn])
|
||||
$map[$c]=$gn;
|
||||
}
|
||||
}
|
||||
if(empty($map))
|
||||
{
|
||||
//Symbolic font: use built-in encoding
|
||||
$widths[$cc]=$w;
|
||||
}
|
||||
else
|
||||
{
|
||||
$widths[$gn]=$w;
|
||||
if($gn=='X')
|
||||
$fm['CapXHeight']=$e[13];
|
||||
}
|
||||
if($gn=='.notdef')
|
||||
$fm['MissingWidth']=$w;
|
||||
}
|
||||
elseif($code=='FontName')
|
||||
$fm['FontName']=$param;
|
||||
elseif($code=='Weight')
|
||||
$fm['Weight']=$param;
|
||||
elseif($code=='ItalicAngle')
|
||||
$fm['ItalicAngle']=(double)$param;
|
||||
elseif($code=='Ascender')
|
||||
$fm['Ascender']=(int)$param;
|
||||
elseif($code=='Descender')
|
||||
$fm['Descender']=(int)$param;
|
||||
elseif($code=='UnderlineThickness')
|
||||
$fm['UnderlineThickness']=(int)$param;
|
||||
elseif($code=='UnderlinePosition')
|
||||
$fm['UnderlinePosition']=(int)$param;
|
||||
elseif($code=='IsFixedPitch')
|
||||
$fm['IsFixedPitch']=($param=='true');
|
||||
elseif($code=='FontBBox')
|
||||
$fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]);
|
||||
elseif($code=='CapHeight')
|
||||
$fm['CapHeight']=(int)$param;
|
||||
elseif($code=='StdVW')
|
||||
$fm['StdVW']=(int)$param;
|
||||
}
|
||||
if(!isset($fm['FontName']))
|
||||
die('FontName not found');
|
||||
if(!empty($map))
|
||||
{
|
||||
if(!isset($widths['.notdef']))
|
||||
$widths['.notdef']=600;
|
||||
if(!isset($widths['Delta']) && isset($widths['increment']))
|
||||
$widths['Delta']=$widths['increment'];
|
||||
//Order widths according to map
|
||||
for($i=0;$i<=255;$i++)
|
||||
{
|
||||
if(!isset($widths[$map[$i]]))
|
||||
{
|
||||
echo '<b>Warning:</b> character '.$map[$i].' is missing<br>';
|
||||
$widths[$i]=$widths['.notdef'];
|
||||
}
|
||||
else
|
||||
$widths[$i]=$widths[$map[$i]];
|
||||
}
|
||||
}
|
||||
$fm['Widths']=$widths;
|
||||
return $fm;
|
||||
}
|
||||
|
||||
function MakeFontDescriptor($fm, $symbolic)
|
||||
{
|
||||
//Ascent
|
||||
$asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000);
|
||||
$fd="array('Ascent'=>".$asc;
|
||||
//Descent
|
||||
$desc=(isset($fm['Descender']) ? $fm['Descender'] : -200);
|
||||
$fd.=",'Descent'=>".$desc;
|
||||
//CapHeight
|
||||
if(isset($fm['CapHeight']))
|
||||
$ch=$fm['CapHeight'];
|
||||
elseif(isset($fm['CapXHeight']))
|
||||
$ch=$fm['CapXHeight'];
|
||||
else
|
||||
$ch=$asc;
|
||||
$fd.=",'CapHeight'=>".$ch;
|
||||
//Flags
|
||||
$flags=0;
|
||||
if(isset($fm['IsFixedPitch']) && $fm['IsFixedPitch'])
|
||||
$flags+=1<<0;
|
||||
if($symbolic)
|
||||
$flags+=1<<2;
|
||||
if(!$symbolic)
|
||||
$flags+=1<<5;
|
||||
if(isset($fm['ItalicAngle']) && $fm['ItalicAngle']!=0)
|
||||
$flags+=1<<6;
|
||||
$fd.=",'Flags'=>".$flags;
|
||||
//FontBBox
|
||||
if(isset($fm['FontBBox']))
|
||||
$fbb=$fm['FontBBox'];
|
||||
else
|
||||
$fbb=array(0,$desc-100,1000,$asc+100);
|
||||
$fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'";
|
||||
//ItalicAngle
|
||||
$ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0);
|
||||
$fd.=",'ItalicAngle'=>".$ia;
|
||||
//StemV
|
||||
if(isset($fm['StdVW']))
|
||||
$stemv=$fm['StdVW'];
|
||||
elseif(isset($fm['Weight']) && preg_match('/bold|black/i',$fm['Weight']))
|
||||
$stemv=120;
|
||||
else
|
||||
$stemv=70;
|
||||
$fd.=",'StemV'=>".$stemv;
|
||||
//MissingWidth
|
||||
if(isset($fm['MissingWidth']))
|
||||
$fd.=",'MissingWidth'=>".$fm['MissingWidth'];
|
||||
$fd.=')';
|
||||
return $fd;
|
||||
}
|
||||
|
||||
function MakeWidthArray($fm)
|
||||
{
|
||||
//Make character width array
|
||||
$s="array(\n\t";
|
||||
$cw=$fm['Widths'];
|
||||
for($i=0;$i<=255;$i++)
|
||||
{
|
||||
if(chr($i)=="'")
|
||||
$s.="'\\''";
|
||||
elseif(chr($i)=="\\")
|
||||
$s.="'\\\\'";
|
||||
elseif($i>=32 && $i<=126)
|
||||
$s.="'".chr($i)."'";
|
||||
else
|
||||
$s.="chr($i)";
|
||||
$s.='=>'.$fm['Widths'][$i];
|
||||
if($i<255)
|
||||
$s.=',';
|
||||
if(($i+1)%22==0)
|
||||
$s.="\n\t";
|
||||
}
|
||||
$s.=')';
|
||||
return $s;
|
||||
}
|
||||
|
||||
function MakeFontEncoding($map)
|
||||
{
|
||||
//Build differences from reference encoding
|
||||
$ref=ReadMap('cp1252');
|
||||
$s='';
|
||||
$last=0;
|
||||
for($i=32;$i<=255;$i++)
|
||||
{
|
||||
if($map[$i]!=$ref[$i])
|
||||
{
|
||||
if($i!=$last+1)
|
||||
$s.=$i.' ';
|
||||
$last=$i;
|
||||
$s.='/'.$map[$i].' ';
|
||||
}
|
||||
}
|
||||
return rtrim($s);
|
||||
}
|
||||
|
||||
function SaveToFile($file, $s, $mode)
|
||||
{
|
||||
$f=fopen($file,'w'.$mode);
|
||||
if(!$f)
|
||||
die('Can\'t write to file '.$file);
|
||||
fwrite($f,$s,strlen($s));
|
||||
fclose($f);
|
||||
}
|
||||
|
||||
function ReadShort($f)
|
||||
{
|
||||
$a=unpack('n1n',fread($f,2));
|
||||
return $a['n'];
|
||||
}
|
||||
|
||||
function ReadLong($f)
|
||||
{
|
||||
$a=unpack('N1N',fread($f,4));
|
||||
return $a['N'];
|
||||
}
|
||||
|
||||
function CheckTTF($file)
|
||||
{
|
||||
//Check if font license allows embedding
|
||||
$f=fopen($file,'rb');
|
||||
if(!$f)
|
||||
die('<b>Error:</b> Can\'t open '.$file);
|
||||
//Extract number of tables
|
||||
fseek($f,4,SEEK_CUR);
|
||||
$nb=ReadShort($f);
|
||||
fseek($f,6,SEEK_CUR);
|
||||
//Seek OS/2 table
|
||||
$found=false;
|
||||
for($i=0;$i<$nb;$i++)
|
||||
{
|
||||
if(fread($f,4)=='OS/2')
|
||||
{
|
||||
$found=true;
|
||||
break;
|
||||
}
|
||||
fseek($f,12,SEEK_CUR);
|
||||
}
|
||||
if(!$found)
|
||||
{
|
||||
fclose($f);
|
||||
return;
|
||||
}
|
||||
fseek($f,4,SEEK_CUR);
|
||||
$offset=ReadLong($f);
|
||||
fseek($f,$offset,SEEK_SET);
|
||||
//Extract fsType flags
|
||||
fseek($f,8,SEEK_CUR);
|
||||
$fsType=ReadShort($f);
|
||||
$rl=($fsType & 0x02)!=0;
|
||||
$pp=($fsType & 0x04)!=0;
|
||||
$e=($fsType & 0x08)!=0;
|
||||
fclose($f);
|
||||
if($rl && !$pp && !$e)
|
||||
echo '<b>Warning:</b> font license does not allow embedding';
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* fontfile: path to TTF file (or empty string if not to be embedded) *
|
||||
* afmfile: path to AFM file *
|
||||
* enc: font encoding (or empty string for symbolic fonts) *
|
||||
* patch: optional patch for encoding *
|
||||
* type: font type if fontfile is empty *
|
||||
*******************************************************************************/
|
||||
function MakeFont($fontfile, $afmfile, $enc='cp1252', $patch=array(), $type='TrueType')
|
||||
{
|
||||
//Generate a font definition file
|
||||
if(get_magic_quotes_runtime())
|
||||
@set_magic_quotes_runtime(0);
|
||||
ini_set('auto_detect_line_endings','1');
|
||||
if($enc)
|
||||
{
|
||||
$map=ReadMap($enc);
|
||||
foreach($patch as $cc=>$gn)
|
||||
$map[$cc]=$gn;
|
||||
}
|
||||
else
|
||||
$map=array();
|
||||
if(!file_exists($afmfile))
|
||||
die('<b>Error:</b> AFM file not found: '.$afmfile);
|
||||
$fm=ReadAFM($afmfile,$map);
|
||||
if($enc)
|
||||
$diff=MakeFontEncoding($map);
|
||||
else
|
||||
$diff='';
|
||||
$fd=MakeFontDescriptor($fm,empty($map));
|
||||
//Find font type
|
||||
if($fontfile)
|
||||
{
|
||||
$ext=strtolower(substr($fontfile,-3));
|
||||
if($ext=='ttf')
|
||||
$type='TrueType';
|
||||
elseif($ext=='pfb')
|
||||
$type='Type1';
|
||||
else
|
||||
die('<b>Error:</b> unrecognized font file extension: '.$ext);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($type!='TrueType' && $type!='Type1')
|
||||
die('<b>Error:</b> incorrect font type: '.$type);
|
||||
}
|
||||
//Start generation
|
||||
$s='<?php'."\n";
|
||||
$s.='$type=\''.$type."';\n";
|
||||
$s.='$name=\''.$fm['FontName']."';\n";
|
||||
$s.='$desc='.$fd.";\n";
|
||||
if(!isset($fm['UnderlinePosition']))
|
||||
$fm['UnderlinePosition']=-100;
|
||||
if(!isset($fm['UnderlineThickness']))
|
||||
$fm['UnderlineThickness']=50;
|
||||
$s.='$up='.$fm['UnderlinePosition'].";\n";
|
||||
$s.='$ut='.$fm['UnderlineThickness'].";\n";
|
||||
$w=MakeWidthArray($fm);
|
||||
$s.='$cw='.$w.";\n";
|
||||
$s.='$enc=\''.$enc."';\n";
|
||||
$s.='$diff=\''.$diff."';\n";
|
||||
$basename=substr(basename($afmfile),0,-4);
|
||||
if($fontfile)
|
||||
{
|
||||
//Embedded font
|
||||
if(!file_exists($fontfile))
|
||||
die('<b>Error:</b> font file not found: '.$fontfile);
|
||||
if($type=='TrueType')
|
||||
CheckTTF($fontfile);
|
||||
$f=fopen($fontfile,'rb');
|
||||
if(!$f)
|
||||
die('<b>Error:</b> Can\'t open '.$fontfile);
|
||||
$file=fread($f,filesize($fontfile));
|
||||
fclose($f);
|
||||
if($type=='Type1')
|
||||
{
|
||||
//Find first two sections and discard third one
|
||||
$header=(ord($file[0])==128);
|
||||
if($header)
|
||||
{
|
||||
//Strip first binary header
|
||||
$file=substr($file,6);
|
||||
}
|
||||
$pos=strpos($file,'eexec');
|
||||
if(!$pos)
|
||||
die('<b>Error:</b> font file does not seem to be valid Type1');
|
||||
$size1=$pos+6;
|
||||
if($header && ord($file[$size1])==128)
|
||||
{
|
||||
//Strip second binary header
|
||||
$file=substr($file,0,$size1).substr($file,$size1+6);
|
||||
}
|
||||
$pos=strpos($file,'00000000');
|
||||
if(!$pos)
|
||||
die('<b>Error:</b> font file does not seem to be valid Type1');
|
||||
$size2=$pos-$size1;
|
||||
$file=substr($file,0,$size1+$size2);
|
||||
}
|
||||
if(function_exists('gzcompress'))
|
||||
{
|
||||
$cmp=$basename.'.z';
|
||||
SaveToFile($cmp,gzcompress($file),'b');
|
||||
$s.='$file=\''.$cmp."';\n";
|
||||
echo 'Font file compressed ('.$cmp.')<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$s.='$file=\''.basename($fontfile)."';\n";
|
||||
echo '<b>Notice:</b> font file could not be compressed (zlib extension not available)<br>';
|
||||
}
|
||||
if($type=='Type1')
|
||||
{
|
||||
$s.='$size1='.$size1.";\n";
|
||||
$s.='$size2='.$size2.";\n";
|
||||
}
|
||||
else
|
||||
$s.='$originalsize='.filesize($fontfile).";\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
//Not embedded font
|
||||
$s.='$file='."'';\n";
|
||||
}
|
||||
$s.="?>\n";
|
||||
SaveToFile($basename.'.php',$s,'t');
|
||||
echo 'Font definition file generated ('.$basename.'.php'.')<br>';
|
||||
}
|
||||
?>
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['symbol']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549,
|
||||
','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722,
|
||||
'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768,
|
||||
'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576,
|
||||
'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0,
|
||||
chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603,
|
||||
chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768,
|
||||
chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042,
|
||||
chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329,
|
||||
chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0);
|
||||
?>
|
||||
<?php
|
||||
$fpdf_charwidths['symbol']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549,
|
||||
','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722,
|
||||
'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768,
|
||||
'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576,
|
||||
'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0,
|
||||
chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603,
|
||||
chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768,
|
||||
chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042,
|
||||
chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329,
|
||||
chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0);
|
||||
?>
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['times']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
|
||||
'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
|
||||
'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
|
||||
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500);
|
||||
?>
|
||||
<?php
|
||||
$fpdf_charwidths['times']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
|
||||
'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
|
||||
'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
|
||||
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500);
|
||||
?>
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['timesB']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
|
||||
'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
|
||||
'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
<?php
|
||||
$fpdf_charwidths['timesB']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
|
||||
'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
|
||||
'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['timesBI']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
|
||||
'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
|
||||
'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
|
||||
'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444);
|
||||
?>
|
||||
<?php
|
||||
$fpdf_charwidths['timesBI']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
|
||||
'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
|
||||
'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
|
||||
'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444);
|
||||
?>
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['timesI']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
|
||||
'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
|
||||
'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
|
||||
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
|
||||
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444);
|
||||
?>
|
||||
<?php
|
||||
$fpdf_charwidths['timesI']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
|
||||
'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
|
||||
'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
|
||||
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
|
||||
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444);
|
||||
?>
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['zapfdingbats']=array(
|
||||
chr(0)=>0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0,
|
||||
chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939,
|
||||
','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692,
|
||||
'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776,
|
||||
'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873,
|
||||
'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317,
|
||||
chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788,
|
||||
chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788,
|
||||
chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918,
|
||||
chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874,
|
||||
chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0);
|
||||
?>
|
||||
<?php
|
||||
$fpdf_charwidths['zapfdingbats']=array(
|
||||
chr(0)=>0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0,
|
||||
chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939,
|
||||
','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692,
|
||||
'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776,
|
||||
'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873,
|
||||
'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317,
|
||||
chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788,
|
||||
chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788,
|
||||
chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918,
|
||||
chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874,
|
||||
chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0);
|
||||
?>
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
body {font-family:"Times New Roman",serif}
|
||||
h1 {font:bold 135% Arial,sans-serif; color:#4000A0; margin-bottom:0.9em}
|
||||
h2 {font:bold 95% Arial,sans-serif; color:#900000; margin-top:1.5em; margin-bottom:1em}
|
||||
dl.param dt {text-decoration:underline}
|
||||
dl.param dd {margin-top:1em; margin-bottom:1em}
|
||||
dl.param ul {margin-top:1em; margin-bottom:1em}
|
||||
tt, code, kbd {font-family:"Courier New",Courier,monospace; font-size:82%}
|
||||
div.source {margin-top:1.4em; margin-bottom:1.3em}
|
||||
div.source pre {display:table; border:1px solid #24246A; width:100%; margin:0em; font-family:inherit; font-size:100%}
|
||||
div.source code {display:block; border:1px solid #C5C5EC; background-color:#F0F5FF; padding:6px; color:#000000}
|
||||
div.doc-source {margin-top:1.4em; margin-bottom:1.3em}
|
||||
div.doc-source pre {display:table; width:100%; margin:0em; font-family:inherit; font-size:100%}
|
||||
div.doc-source code {display:block; background-color:#E0E0E0; padding:4px}
|
||||
.kw {color:#000080; font-weight:bold}
|
||||
.str {color:#CC0000}
|
||||
.cmt {color:#008000}
|
||||
p.demo {text-align:center; margin-top:-0.9em}
|
||||
a.demo {text-decoration:none; font-weight:bold; color:#0000CC}
|
||||
a.demo:link {text-decoration:none; font-weight:bold; color:#0000CC}
|
||||
a.demo:hover {text-decoration:none; font-weight:bold; color:#0000FF}
|
||||
a.demo:active {text-decoration:none; font-weight:bold; color:#0000FF}
|
||||
body {font-family:"Times New Roman",serif}
|
||||
h1 {font:bold 135% Arial,sans-serif; color:#4000A0; margin-bottom:0.9em}
|
||||
h2 {font:bold 95% Arial,sans-serif; color:#900000; margin-top:1.5em; margin-bottom:1em}
|
||||
dl.param dt {text-decoration:underline}
|
||||
dl.param dd {margin-top:1em; margin-bottom:1em}
|
||||
dl.param ul {margin-top:1em; margin-bottom:1em}
|
||||
tt, code, kbd {font-family:"Courier New",Courier,monospace; font-size:82%}
|
||||
div.source {margin-top:1.4em; margin-bottom:1.3em}
|
||||
div.source pre {display:table; border:1px solid #24246A; width:100%; margin:0em; font-family:inherit; font-size:100%}
|
||||
div.source code {display:block; border:1px solid #C5C5EC; background-color:#F0F5FF; padding:6px; color:#000000}
|
||||
div.doc-source {margin-top:1.4em; margin-bottom:1.3em}
|
||||
div.doc-source pre {display:table; width:100%; margin:0em; font-family:inherit; font-size:100%}
|
||||
div.doc-source code {display:block; background-color:#E0E0E0; padding:4px}
|
||||
.kw {color:#000080; font-weight:bold}
|
||||
.str {color:#CC0000}
|
||||
.cmt {color:#008000}
|
||||
p.demo {text-align:center; margin-top:-0.9em}
|
||||
a.demo {text-decoration:none; font-weight:bold; color:#0000CC}
|
||||
a.demo:link {text-decoration:none; font-weight:bold; color:#0000CC}
|
||||
a.demo:hover {text-decoration:none; font-weight:bold; color:#0000FF}
|
||||
a.demo:active {text-decoration:none; font-weight:bold; color:#0000FF}
|
||||
|
||||
@ -1,128 +1,128 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>History</title>
|
||||
<link type="text/css" rel="stylesheet" href="fpdf.css">
|
||||
<style type="text/css">
|
||||
dd {margin-top:1em; margin-bottom:1em}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>History</h1>
|
||||
<dl>
|
||||
<dt><strong>v1.6</strong> (2008-08-03)</dt>
|
||||
<dd>
|
||||
- GIF image support.<br>
|
||||
- Images can now trigger page breaks.<br>
|
||||
- Possibility to have different page formats in a single document.<br>
|
||||
- Document properties (author, creator, keywords, subject and title) can now be specified in UTF-8.<br>
|
||||
- Fixed a bug: when a PNG was inserted through a URL, an error sometimes occurred.<br>
|
||||
- An automatic page break in Header() doesn't cause an infinite loop any more.<br>
|
||||
- Removed some warning messages appearing with recent PHP versions.<br>
|
||||
- Added HTTP headers to reduce problems with IE.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.53</strong> (2004-12-31)</dt>
|
||||
<dd>
|
||||
- When the font subdirectory is in the same directory as fpdf.php, it is no longer necessary to define the FPDF_FONTPATH constant.<br>
|
||||
- The array $HTTP_SERVER_VARS is no longer used. It could cause trouble on PHP5-based configurations with the register_long_arrays option disabled.<br>
|
||||
- Fixed a problem related to Type1 font embedding which caused trouble to some PDF processors.<br>
|
||||
- The file name sent to the browser could not contain a space character.<br>
|
||||
- The Cell() method could not print the number 0 (you had to pass the string '0').<br>
|
||||
</dd>
|
||||
<dt><strong>v1.52</strong> (2003-12-30)</dt>
|
||||
<dd>
|
||||
- Image() now displays the image at 72 dpi if no dimension is given.<br>
|
||||
- Output() takes a string as second parameter to indicate destination.<br>
|
||||
- Open() is now called automatically by AddPage().<br>
|
||||
- Inserting remote JPEG images doesn't generate an error any longer.<br>
|
||||
- Decimal separator is forced to dot in the constructor.<br>
|
||||
- Added several encodings (Turkish, Thai, Hebrew, Ukrainian and Vietnamese).<br>
|
||||
- The last line of a right-aligned MultiCell() was not correctly aligned if it was terminated by a carriage return.<br>
|
||||
- No more error message about already sent headers when outputting the PDF to the standard output from the command line.<br>
|
||||
- The underlining was going too far for text containing characters \, ( or ).<br>
|
||||
- $HTTP_ENV_VARS has been replaced by $HTTP_SERVER_VARS.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.51</strong> (2002-08-03)</dt>
|
||||
<dd>
|
||||
- Type1 font support.<br>
|
||||
- Added Baltic encoding.<br>
|
||||
- The class now works internally in points with the origin at the bottom in order to avoid two bugs occurring with Acrobat 5 :<br> * The line thickness was too large when printed under Windows 98 SE and ME.<br> * TrueType fonts didn't appear immediately inside the plug-in (a substitution font was used), one had to cause a window refresh to make them show up.<br>
|
||||
- It is no longer necessary to set the decimal separator as dot to produce valid documents.<br>
|
||||
- The clickable area in a cell was always on the left independently from the text alignment.<br>
|
||||
- JPEG images in CMYK mode appeared in inverted colors.<br>
|
||||
- Transparent PNG images in grayscale or true color mode were incorrectly handled.<br>
|
||||
- Adding new fonts now works correctly even with the magic_quotes_runtime option set to on.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.5</strong> (2002-05-28)</dt>
|
||||
<dd>
|
||||
- TrueType font (AddFont()) and encoding support (Western and Eastern Europe, Cyrillic and Greek).<br>
|
||||
- Added Write() method.<br>
|
||||
- Added underlined style.<br>
|
||||
- Internal and external link support (AddLink(), SetLink(), Link()).<br>
|
||||
- Added right margin management and methods SetRightMargin(), SetTopMargin().<br>
|
||||
- Modification of SetDisplayMode() to select page layout.<br>
|
||||
- The border parameter of MultiCell() now lets choose borders to draw as Cell().<br>
|
||||
- When a document contains no page, Close() now calls AddPage() instead of causing a fatal error.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.41</strong> (2002-03-13)</dt>
|
||||
<dd>
|
||||
- Fixed SetDisplayMode() which no longer worked (the PDF viewer used its default display).<br>
|
||||
</dd>
|
||||
<dt><strong>v1.4</strong> (2002-03-02)</dt>
|
||||
<dd>
|
||||
- PHP3 is no longer supported.<br>
|
||||
- Page compression (SetCompression()).<br>
|
||||
- Choice of page format and possibility to change orientation inside document.<br>
|
||||
- Added AcceptPageBreak() method.<br>
|
||||
- Ability to print the total number of pages (AliasNbPages()).<br>
|
||||
- Choice of cell borders to draw.<br>
|
||||
- New mode for Cell(): the current position can now move under the cell.<br>
|
||||
- Ability to include an image by specifying height only (width is calculated automatically).<br>
|
||||
- Fixed a bug: when a justified line triggered a page break, the footer inherited the corresponding word spacing.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.31</strong> (2002-01-12)</dt>
|
||||
<dd>
|
||||
- Fixed a bug in drawing frame with MultiCell(): the last line always started from the left margin.<br>
|
||||
- Removed Expires HTTP header (gives trouble in some situations).<br>
|
||||
- Added Content-disposition HTTP header (seems to help in some situations).<br>
|
||||
</dd>
|
||||
<dt><strong>v1.3</strong> (2001-12-03)</dt>
|
||||
<dd>
|
||||
- Line break and text justification support (MultiCell()).<br>
|
||||
- Color support (SetDrawColor(), SetFillColor(), SetTextColor()). Possibility to draw filled rectangles and paint cell background.<br>
|
||||
- A cell whose width is declared null extends up to the right margin of the page.<br>
|
||||
- Line width is now retained from page to page and defaults to 0.2 mm.<br>
|
||||
- Added SetXY() method.<br>
|
||||
- Fixed a passing by reference done in a deprecated manner for PHP4.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.2</strong> (2001-11-11)</dt>
|
||||
<dd>
|
||||
- Added font metric files and GetStringWidth() method.<br>
|
||||
- Centering and right-aligning text in cells.<br>
|
||||
- Display mode control (SetDisplayMode()).<br>
|
||||
- Added methods to set document properties (SetAuthor(), SetCreator(), SetKeywords(), SetSubject(), SetTitle()).<br>
|
||||
- Possibility to force PDF download by browser.<br>
|
||||
- Added SetX() and GetX() methods.<br>
|
||||
- During automatic page break, current abscissa is now retained.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.11</strong> (2001-10-20)</dt>
|
||||
<dd>
|
||||
- PNG support doesn't require PHP4/zlib any more. Data are now put directly into PDF without any decompression/recompression stage.<br>
|
||||
- Image insertion now works correctly even with magic_quotes_runtime option set to on.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.1</strong> (2001-10-07)</dt>
|
||||
<dd>
|
||||
- JPEG and PNG image support.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.01</strong> (2001-10-03)</dt>
|
||||
<dd>
|
||||
- Fixed a bug involving page break: in case when Header() doesn't specify a font, the one from previous page was not restored and produced an incorrect document.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.0</strong> (2001-09-17)</dt>
|
||||
<dd>
|
||||
- First version.<br>
|
||||
</dd>
|
||||
</dl>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>History</title>
|
||||
<link type="text/css" rel="stylesheet" href="fpdf.css">
|
||||
<style type="text/css">
|
||||
dd {margin-top:1em; margin-bottom:1em}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>History</h1>
|
||||
<dl>
|
||||
<dt><strong>v1.6</strong> (2008-08-03)</dt>
|
||||
<dd>
|
||||
- GIF image support.<br>
|
||||
- Images can now trigger page breaks.<br>
|
||||
- Possibility to have different page formats in a single document.<br>
|
||||
- Document properties (author, creator, keywords, subject and title) can now be specified in UTF-8.<br>
|
||||
- Fixed a bug: when a PNG was inserted through a URL, an error sometimes occurred.<br>
|
||||
- An automatic page break in Header() doesn't cause an infinite loop any more.<br>
|
||||
- Removed some warning messages appearing with recent PHP versions.<br>
|
||||
- Added HTTP headers to reduce problems with IE.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.53</strong> (2004-12-31)</dt>
|
||||
<dd>
|
||||
- When the font subdirectory is in the same directory as fpdf.php, it is no longer necessary to define the FPDF_FONTPATH constant.<br>
|
||||
- The array $HTTP_SERVER_VARS is no longer used. It could cause trouble on PHP5-based configurations with the register_long_arrays option disabled.<br>
|
||||
- Fixed a problem related to Type1 font embedding which caused trouble to some PDF processors.<br>
|
||||
- The file name sent to the browser could not contain a space character.<br>
|
||||
- The Cell() method could not print the number 0 (you had to pass the string '0').<br>
|
||||
</dd>
|
||||
<dt><strong>v1.52</strong> (2003-12-30)</dt>
|
||||
<dd>
|
||||
- Image() now displays the image at 72 dpi if no dimension is given.<br>
|
||||
- Output() takes a string as second parameter to indicate destination.<br>
|
||||
- Open() is now called automatically by AddPage().<br>
|
||||
- Inserting remote JPEG images doesn't generate an error any longer.<br>
|
||||
- Decimal separator is forced to dot in the constructor.<br>
|
||||
- Added several encodings (Turkish, Thai, Hebrew, Ukrainian and Vietnamese).<br>
|
||||
- The last line of a right-aligned MultiCell() was not correctly aligned if it was terminated by a carriage return.<br>
|
||||
- No more error message about already sent headers when outputting the PDF to the standard output from the command line.<br>
|
||||
- The underlining was going too far for text containing characters \, ( or ).<br>
|
||||
- $HTTP_ENV_VARS has been replaced by $HTTP_SERVER_VARS.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.51</strong> (2002-08-03)</dt>
|
||||
<dd>
|
||||
- Type1 font support.<br>
|
||||
- Added Baltic encoding.<br>
|
||||
- The class now works internally in points with the origin at the bottom in order to avoid two bugs occurring with Acrobat 5 :<br> * The line thickness was too large when printed under Windows 98 SE and ME.<br> * TrueType fonts didn't appear immediately inside the plug-in (a substitution font was used), one had to cause a window refresh to make them show up.<br>
|
||||
- It is no longer necessary to set the decimal separator as dot to produce valid documents.<br>
|
||||
- The clickable area in a cell was always on the left independently from the text alignment.<br>
|
||||
- JPEG images in CMYK mode appeared in inverted colors.<br>
|
||||
- Transparent PNG images in grayscale or true color mode were incorrectly handled.<br>
|
||||
- Adding new fonts now works correctly even with the magic_quotes_runtime option set to on.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.5</strong> (2002-05-28)</dt>
|
||||
<dd>
|
||||
- TrueType font (AddFont()) and encoding support (Western and Eastern Europe, Cyrillic and Greek).<br>
|
||||
- Added Write() method.<br>
|
||||
- Added underlined style.<br>
|
||||
- Internal and external link support (AddLink(), SetLink(), Link()).<br>
|
||||
- Added right margin management and methods SetRightMargin(), SetTopMargin().<br>
|
||||
- Modification of SetDisplayMode() to select page layout.<br>
|
||||
- The border parameter of MultiCell() now lets choose borders to draw as Cell().<br>
|
||||
- When a document contains no page, Close() now calls AddPage() instead of causing a fatal error.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.41</strong> (2002-03-13)</dt>
|
||||
<dd>
|
||||
- Fixed SetDisplayMode() which no longer worked (the PDF viewer used its default display).<br>
|
||||
</dd>
|
||||
<dt><strong>v1.4</strong> (2002-03-02)</dt>
|
||||
<dd>
|
||||
- PHP3 is no longer supported.<br>
|
||||
- Page compression (SetCompression()).<br>
|
||||
- Choice of page format and possibility to change orientation inside document.<br>
|
||||
- Added AcceptPageBreak() method.<br>
|
||||
- Ability to print the total number of pages (AliasNbPages()).<br>
|
||||
- Choice of cell borders to draw.<br>
|
||||
- New mode for Cell(): the current position can now move under the cell.<br>
|
||||
- Ability to include an image by specifying height only (width is calculated automatically).<br>
|
||||
- Fixed a bug: when a justified line triggered a page break, the footer inherited the corresponding word spacing.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.31</strong> (2002-01-12)</dt>
|
||||
<dd>
|
||||
- Fixed a bug in drawing frame with MultiCell(): the last line always started from the left margin.<br>
|
||||
- Removed Expires HTTP header (gives trouble in some situations).<br>
|
||||
- Added Content-disposition HTTP header (seems to help in some situations).<br>
|
||||
</dd>
|
||||
<dt><strong>v1.3</strong> (2001-12-03)</dt>
|
||||
<dd>
|
||||
- Line break and text justification support (MultiCell()).<br>
|
||||
- Color support (SetDrawColor(), SetFillColor(), SetTextColor()). Possibility to draw filled rectangles and paint cell background.<br>
|
||||
- A cell whose width is declared null extends up to the right margin of the page.<br>
|
||||
- Line width is now retained from page to page and defaults to 0.2 mm.<br>
|
||||
- Added SetXY() method.<br>
|
||||
- Fixed a passing by reference done in a deprecated manner for PHP4.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.2</strong> (2001-11-11)</dt>
|
||||
<dd>
|
||||
- Added font metric files and GetStringWidth() method.<br>
|
||||
- Centering and right-aligning text in cells.<br>
|
||||
- Display mode control (SetDisplayMode()).<br>
|
||||
- Added methods to set document properties (SetAuthor(), SetCreator(), SetKeywords(), SetSubject(), SetTitle()).<br>
|
||||
- Possibility to force PDF download by browser.<br>
|
||||
- Added SetX() and GetX() methods.<br>
|
||||
- During automatic page break, current abscissa is now retained.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.11</strong> (2001-10-20)</dt>
|
||||
<dd>
|
||||
- PNG support doesn't require PHP4/zlib any more. Data are now put directly into PDF without any decompression/recompression stage.<br>
|
||||
- Image insertion now works correctly even with magic_quotes_runtime option set to on.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.1</strong> (2001-10-07)</dt>
|
||||
<dd>
|
||||
- JPEG and PNG image support.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.01</strong> (2001-10-03)</dt>
|
||||
<dd>
|
||||
- Fixed a bug involving page break: in case when Header() doesn't specify a font, the one from previous page was not restored and produced an incorrect document.<br>
|
||||
</dd>
|
||||
<dt><strong>v1.0</strong> (2001-09-17)</dt>
|
||||
<dd>
|
||||
- First version.<br>
|
||||
</dd>
|
||||
</dl>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,26 +1,26 @@
|
||||
The FPDF library is made up of the following elements:
|
||||
|
||||
- the main file, fpdf.php, which contains the class
|
||||
- the font metric files (located in the font directory of this archive)
|
||||
|
||||
The metric files are necessary as soon as you want to output some text in a document.
|
||||
They can be accessed from three different locations:
|
||||
|
||||
- the directory defined by the FPDF_FONTPATH constant (if this constant is defined)
|
||||
- the font directory located in the directory containing fpdf.php (as it is the case in this archive)
|
||||
- the directories accessible through include()
|
||||
|
||||
Here is an example defining FPDF_FONTPATH (note the mandatory final slash):
|
||||
|
||||
define('FPDF_FONTPATH','/home/www/font/');
|
||||
require('fpdf.php');
|
||||
|
||||
If the files are not accessible, the SetFont() method will produce the following error:
|
||||
|
||||
FPDF error: Could not include font metric file
|
||||
|
||||
|
||||
Remarks:
|
||||
|
||||
- Only the files corresponding to the fonts actually used are necessary
|
||||
- The tutorials provided in this package are ready to be executed
|
||||
The FPDF library is made up of the following elements:
|
||||
|
||||
- the main file, fpdf.php, which contains the class
|
||||
- the font metric files (located in the font directory of this archive)
|
||||
|
||||
The metric files are necessary as soon as you want to output some text in a document.
|
||||
They can be accessed from three different locations:
|
||||
|
||||
- the directory defined by the FPDF_FONTPATH constant (if this constant is defined)
|
||||
- the font directory located in the directory containing fpdf.php (as it is the case in this archive)
|
||||
- the directories accessible through include()
|
||||
|
||||
Here is an example defining FPDF_FONTPATH (note the mandatory final slash):
|
||||
|
||||
define('FPDF_FONTPATH','/home/www/font/');
|
||||
require('fpdf.php');
|
||||
|
||||
If the files are not accessible, the SetFont() method will produce the following error:
|
||||
|
||||
FPDF error: Could not include font metric file
|
||||
|
||||
|
||||
Remarks:
|
||||
|
||||
- Only the files corresponding to the fonts actually used are necessary
|
||||
- The tutorials provided in this package are ready to be executed
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software to use, copy, modify, distribute, sublicense, and/or sell
|
||||
copies of the software, and to permit persons to whom the software is furnished
|
||||
to do so.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software to use, copy, modify, distribute, sublicense, and/or sell
|
||||
copies of the software, and to permit persons to whom the software is furnished
|
||||
to do so.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
|
||||
@ -1,5 +1,5 @@
|
||||
This directory contains all FPDFI librairies:
|
||||
- FPDI
|
||||
- FPDI_TPL
|
||||
- FPDI_Protection
|
||||
Found on http://www.setasign.de/products/pdf-php-solutions/fpdi/
|
||||
This directory contains all FPDFI librairies:
|
||||
- FPDI
|
||||
- FPDI_TPL
|
||||
- FPDI_Protection
|
||||
Found on http://www.setasign.de/products/pdf-php-solutions/fpdi/
|
||||
|
||||
@ -1,208 +1,208 @@
|
||||
<?php
|
||||
|
||||
/* geoipcity.inc
|
||||
*
|
||||
* Copyright (C) 2004 Maxmind LLC
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
* Changelog:
|
||||
*
|
||||
* 2005-01-13 Andrew Hill, Awarez Ltd. (http://www.awarez.net)
|
||||
* Formatted file according to PEAR library standards.
|
||||
* Changed inclusion of geoip.inc file to require_once, so that
|
||||
* this library can be used in the same script as geoip.inc.
|
||||
*/
|
||||
|
||||
define("FULL_RECORD_LENGTH",50);
|
||||
|
||||
require_once 'geoip.inc';
|
||||
require_once 'geoipregionvars.php';
|
||||
|
||||
class geoiprecord {
|
||||
var $country_code;
|
||||
var $country_code3;
|
||||
var $country_name;
|
||||
var $region;
|
||||
var $city;
|
||||
var $postal_code;
|
||||
var $latitude;
|
||||
var $longitude;
|
||||
var $area_code;
|
||||
var $dma_code; # metro and dma code are the same. use metro_code
|
||||
var $metro_code;
|
||||
}
|
||||
|
||||
class geoipdnsrecord {
|
||||
var $country_code;
|
||||
var $country_code3;
|
||||
var $country_name;
|
||||
var $region;
|
||||
var $regionname;
|
||||
var $city;
|
||||
var $postal_code;
|
||||
var $latitude;
|
||||
var $longitude;
|
||||
var $areacode;
|
||||
var $dmacode;
|
||||
var $isp;
|
||||
var $org;
|
||||
var $metrocode;
|
||||
}
|
||||
|
||||
function getrecordwithdnsservice($str){
|
||||
$record = new geoipdnsrecord;
|
||||
$keyvalue = explode(";",$str);
|
||||
foreach ($keyvalue as $keyvalue2){
|
||||
list($key,$value) = explode("=",$keyvalue2);
|
||||
if ($key == "co"){
|
||||
$record->country_code = $value;
|
||||
}
|
||||
if ($key == "ci"){
|
||||
$record->city = $value;
|
||||
}
|
||||
if ($key == "re"){
|
||||
$record->region = $value;
|
||||
}
|
||||
if ($key == "ac"){
|
||||
$record->areacode = $value;
|
||||
}
|
||||
if ($key == "dm" || $key == "me" ){
|
||||
$record->dmacode = $value;
|
||||
$record->metrocode = $value;
|
||||
}
|
||||
if ($key == "is"){
|
||||
$record->isp = $value;
|
||||
}
|
||||
if ($key == "or"){
|
||||
$record->org = $value;
|
||||
}
|
||||
if ($key == "zi"){
|
||||
$record->postal_code = $value;
|
||||
}
|
||||
if ($key == "la"){
|
||||
$record->latitude = $value;
|
||||
}
|
||||
if ($key == "lo"){
|
||||
$record->longitude = $value;
|
||||
}
|
||||
}
|
||||
$number = $GLOBALS['GEOIP_COUNTRY_CODE_TO_NUMBER'][$record->country_code];
|
||||
$record->country_code3 = $GLOBALS['GEOIP_COUNTRY_CODES3'][$number];
|
||||
$record->country_name = $GLOBALS['GEOIP_COUNTRY_NAMES'][$number];
|
||||
if ($record->region != "") {
|
||||
if (($record->country_code == "US") || ($record->country_code == "CA")){
|
||||
$record->regionname = $GLOBALS['ISO'][$record->country_code][$record->region];
|
||||
} else {
|
||||
$record->regionname = $GLOBALS['FIPS'][$record->country_code][$record->region];
|
||||
}
|
||||
}
|
||||
return $record;
|
||||
}
|
||||
|
||||
function _get_record($gi,$ipnum){
|
||||
$seek_country = _geoip_seek_country($gi,$ipnum);
|
||||
if ($seek_country == $gi->databaseSegments) {
|
||||
return NULL;
|
||||
}
|
||||
$record_pointer = $seek_country + (2 * $gi->record_length - 1) * $gi->databaseSegments;
|
||||
|
||||
if ($gi->flags & GEOIP_MEMORY_CACHE) {
|
||||
$record_buf = substr($gi->memory_buffer,$record_pointer,FULL_RECORD_LENGTH);
|
||||
} elseif ($gi->flags & GEOIP_SHARED_MEMORY){
|
||||
$record_buf = @shmop_read($gi->shmid,$record_pointer,FULL_RECORD_LENGTH);
|
||||
} else {
|
||||
fseek($gi->filehandle, $record_pointer, SEEK_SET);
|
||||
$record_buf = fread($gi->filehandle,FULL_RECORD_LENGTH);
|
||||
}
|
||||
$record = new geoiprecord;
|
||||
$record_buf_pos = 0;
|
||||
$char = ord(substr($record_buf,$record_buf_pos,1));
|
||||
$record->country_code = $gi->GEOIP_COUNTRY_CODES[$char];
|
||||
$record->country_code3 = $gi->GEOIP_COUNTRY_CODES3[$char];
|
||||
$record->country_name = $gi->GEOIP_COUNTRY_NAMES[$char];
|
||||
$record_buf_pos++;
|
||||
$str_length = 0;
|
||||
// Get region
|
||||
$char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
|
||||
while ($char != 0){
|
||||
$str_length++;
|
||||
$char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
|
||||
}
|
||||
if ($str_length > 0){
|
||||
$record->region = substr($record_buf,$record_buf_pos,$str_length);
|
||||
}
|
||||
$record_buf_pos += $str_length + 1;
|
||||
$str_length = 0;
|
||||
// Get city
|
||||
$char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
|
||||
while ($char != 0){
|
||||
$str_length++;
|
||||
$char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
|
||||
}
|
||||
if ($str_length > 0){
|
||||
$record->city = substr($record_buf,$record_buf_pos,$str_length);
|
||||
}
|
||||
$record_buf_pos += $str_length + 1;
|
||||
$str_length = 0;
|
||||
// Get postal code
|
||||
$char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
|
||||
while ($char != 0){
|
||||
$str_length++;
|
||||
$char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
|
||||
}
|
||||
if ($str_length > 0){
|
||||
$record->postal_code = substr($record_buf,$record_buf_pos,$str_length);
|
||||
}
|
||||
$record_buf_pos += $str_length + 1;
|
||||
$str_length = 0;
|
||||
// Get latitude and longitude
|
||||
$latitude = 0;
|
||||
$longitude = 0;
|
||||
for ($j = 0;$j < 3; ++$j){
|
||||
$char = ord(substr($record_buf,$record_buf_pos++,1));
|
||||
$latitude += ($char << ($j * 8));
|
||||
}
|
||||
$record->latitude = ($latitude/10000) - 180;
|
||||
for ($j = 0;$j < 3; ++$j){
|
||||
$char = ord(substr($record_buf,$record_buf_pos++,1));
|
||||
$longitude += ($char << ($j * 8));
|
||||
}
|
||||
$record->longitude = ($longitude/10000) - 180;
|
||||
if (GEOIP_CITY_EDITION_REV1 == $gi->databaseType){
|
||||
$metroarea_combo = 0;
|
||||
if ($record->country_code == "US"){
|
||||
for ($j = 0;$j < 3;++$j){
|
||||
$char = ord(substr($record_buf,$record_buf_pos++,1));
|
||||
$metroarea_combo += ($char << ($j * 8));
|
||||
}
|
||||
$record->metro_code = $record->dma_code = floor($metroarea_combo/1000);
|
||||
$record->area_code = $metroarea_combo%1000;
|
||||
}
|
||||
}
|
||||
return $record;
|
||||
}
|
||||
|
||||
function GeoIP_record_by_addr ($gi,$addr){
|
||||
if ($addr == NULL){
|
||||
return 0;
|
||||
}
|
||||
$ipnum = ip2long($addr);
|
||||
return _get_record($gi, $ipnum);
|
||||
}
|
||||
|
||||
?>
|
||||
<?php
|
||||
|
||||
/* geoipcity.inc
|
||||
*
|
||||
* Copyright (C) 2004 Maxmind LLC
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
* Changelog:
|
||||
*
|
||||
* 2005-01-13 Andrew Hill, Awarez Ltd. (http://www.awarez.net)
|
||||
* Formatted file according to PEAR library standards.
|
||||
* Changed inclusion of geoip.inc file to require_once, so that
|
||||
* this library can be used in the same script as geoip.inc.
|
||||
*/
|
||||
|
||||
define("FULL_RECORD_LENGTH",50);
|
||||
|
||||
require_once 'geoip.inc';
|
||||
require_once 'geoipregionvars.php';
|
||||
|
||||
class geoiprecord {
|
||||
var $country_code;
|
||||
var $country_code3;
|
||||
var $country_name;
|
||||
var $region;
|
||||
var $city;
|
||||
var $postal_code;
|
||||
var $latitude;
|
||||
var $longitude;
|
||||
var $area_code;
|
||||
var $dma_code; # metro and dma code are the same. use metro_code
|
||||
var $metro_code;
|
||||
}
|
||||
|
||||
class geoipdnsrecord {
|
||||
var $country_code;
|
||||
var $country_code3;
|
||||
var $country_name;
|
||||
var $region;
|
||||
var $regionname;
|
||||
var $city;
|
||||
var $postal_code;
|
||||
var $latitude;
|
||||
var $longitude;
|
||||
var $areacode;
|
||||
var $dmacode;
|
||||
var $isp;
|
||||
var $org;
|
||||
var $metrocode;
|
||||
}
|
||||
|
||||
function getrecordwithdnsservice($str){
|
||||
$record = new geoipdnsrecord;
|
||||
$keyvalue = explode(";",$str);
|
||||
foreach ($keyvalue as $keyvalue2){
|
||||
list($key,$value) = explode("=",$keyvalue2);
|
||||
if ($key == "co"){
|
||||
$record->country_code = $value;
|
||||
}
|
||||
if ($key == "ci"){
|
||||
$record->city = $value;
|
||||
}
|
||||
if ($key == "re"){
|
||||
$record->region = $value;
|
||||
}
|
||||
if ($key == "ac"){
|
||||
$record->areacode = $value;
|
||||
}
|
||||
if ($key == "dm" || $key == "me" ){
|
||||
$record->dmacode = $value;
|
||||
$record->metrocode = $value;
|
||||
}
|
||||
if ($key == "is"){
|
||||
$record->isp = $value;
|
||||
}
|
||||
if ($key == "or"){
|
||||
$record->org = $value;
|
||||
}
|
||||
if ($key == "zi"){
|
||||
$record->postal_code = $value;
|
||||
}
|
||||
if ($key == "la"){
|
||||
$record->latitude = $value;
|
||||
}
|
||||
if ($key == "lo"){
|
||||
$record->longitude = $value;
|
||||
}
|
||||
}
|
||||
$number = $GLOBALS['GEOIP_COUNTRY_CODE_TO_NUMBER'][$record->country_code];
|
||||
$record->country_code3 = $GLOBALS['GEOIP_COUNTRY_CODES3'][$number];
|
||||
$record->country_name = $GLOBALS['GEOIP_COUNTRY_NAMES'][$number];
|
||||
if ($record->region != "") {
|
||||
if (($record->country_code == "US") || ($record->country_code == "CA")){
|
||||
$record->regionname = $GLOBALS['ISO'][$record->country_code][$record->region];
|
||||
} else {
|
||||
$record->regionname = $GLOBALS['FIPS'][$record->country_code][$record->region];
|
||||
}
|
||||
}
|
||||
return $record;
|
||||
}
|
||||
|
||||
function _get_record($gi,$ipnum){
|
||||
$seek_country = _geoip_seek_country($gi,$ipnum);
|
||||
if ($seek_country == $gi->databaseSegments) {
|
||||
return NULL;
|
||||
}
|
||||
$record_pointer = $seek_country + (2 * $gi->record_length - 1) * $gi->databaseSegments;
|
||||
|
||||
if ($gi->flags & GEOIP_MEMORY_CACHE) {
|
||||
$record_buf = substr($gi->memory_buffer,$record_pointer,FULL_RECORD_LENGTH);
|
||||
} elseif ($gi->flags & GEOIP_SHARED_MEMORY){
|
||||
$record_buf = @shmop_read($gi->shmid,$record_pointer,FULL_RECORD_LENGTH);
|
||||
} else {
|
||||
fseek($gi->filehandle, $record_pointer, SEEK_SET);
|
||||
$record_buf = fread($gi->filehandle,FULL_RECORD_LENGTH);
|
||||
}
|
||||
$record = new geoiprecord;
|
||||
$record_buf_pos = 0;
|
||||
$char = ord(substr($record_buf,$record_buf_pos,1));
|
||||
$record->country_code = $gi->GEOIP_COUNTRY_CODES[$char];
|
||||
$record->country_code3 = $gi->GEOIP_COUNTRY_CODES3[$char];
|
||||
$record->country_name = $gi->GEOIP_COUNTRY_NAMES[$char];
|
||||
$record_buf_pos++;
|
||||
$str_length = 0;
|
||||
// Get region
|
||||
$char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
|
||||
while ($char != 0){
|
||||
$str_length++;
|
||||
$char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
|
||||
}
|
||||
if ($str_length > 0){
|
||||
$record->region = substr($record_buf,$record_buf_pos,$str_length);
|
||||
}
|
||||
$record_buf_pos += $str_length + 1;
|
||||
$str_length = 0;
|
||||
// Get city
|
||||
$char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
|
||||
while ($char != 0){
|
||||
$str_length++;
|
||||
$char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
|
||||
}
|
||||
if ($str_length > 0){
|
||||
$record->city = substr($record_buf,$record_buf_pos,$str_length);
|
||||
}
|
||||
$record_buf_pos += $str_length + 1;
|
||||
$str_length = 0;
|
||||
// Get postal code
|
||||
$char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
|
||||
while ($char != 0){
|
||||
$str_length++;
|
||||
$char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
|
||||
}
|
||||
if ($str_length > 0){
|
||||
$record->postal_code = substr($record_buf,$record_buf_pos,$str_length);
|
||||
}
|
||||
$record_buf_pos += $str_length + 1;
|
||||
$str_length = 0;
|
||||
// Get latitude and longitude
|
||||
$latitude = 0;
|
||||
$longitude = 0;
|
||||
for ($j = 0;$j < 3; ++$j){
|
||||
$char = ord(substr($record_buf,$record_buf_pos++,1));
|
||||
$latitude += ($char << ($j * 8));
|
||||
}
|
||||
$record->latitude = ($latitude/10000) - 180;
|
||||
for ($j = 0;$j < 3; ++$j){
|
||||
$char = ord(substr($record_buf,$record_buf_pos++,1));
|
||||
$longitude += ($char << ($j * 8));
|
||||
}
|
||||
$record->longitude = ($longitude/10000) - 180;
|
||||
if (GEOIP_CITY_EDITION_REV1 == $gi->databaseType){
|
||||
$metroarea_combo = 0;
|
||||
if ($record->country_code == "US"){
|
||||
for ($j = 0;$j < 3;++$j){
|
||||
$char = ord(substr($record_buf,$record_buf_pos++,1));
|
||||
$metroarea_combo += ($char << ($j * 8));
|
||||
}
|
||||
$record->metro_code = $record->dma_code = floor($metroarea_combo/1000);
|
||||
$record->area_code = $metroarea_combo%1000;
|
||||
}
|
||||
}
|
||||
return $record;
|
||||
}
|
||||
|
||||
function GeoIP_record_by_addr ($gi,$addr){
|
||||
if ($addr == NULL){
|
||||
return 0;
|
||||
}
|
||||
$ipnum = ip2long($addr);
|
||||
return _get_record($gi, $ipnum);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -1,26 +1,26 @@
|
||||
README (english)
|
||||
---------------------------------------------
|
||||
Decription of htdocs/includes/login directory
|
||||
---------------------------------------------
|
||||
|
||||
This directory contains files that handle way to validate passwords.
|
||||
|
||||
If you want to add a new password checker function, just add a file in
|
||||
this directory that follow example of already existing files.
|
||||
This file must be called for example :
|
||||
functions_mypasschecker.php
|
||||
|
||||
Edit function name to call it:
|
||||
check_user_mypasschecker
|
||||
|
||||
Change code of this function to return true if couple
|
||||
$usertotest / $passwordtotest is ok for you.
|
||||
|
||||
Then, you must edit you conf.php file to change the value of
|
||||
$dolibarr_main_authentication
|
||||
parameter to set it to :
|
||||
mypasschecker
|
||||
|
||||
Once this is done, when you log in to Dolibarr, the function
|
||||
check_user_mypasschecker in this file is called.
|
||||
If the function return true and login exists, login is accepted.
|
||||
README (english)
|
||||
---------------------------------------------
|
||||
Decription of htdocs/includes/login directory
|
||||
---------------------------------------------
|
||||
|
||||
This directory contains files that handle way to validate passwords.
|
||||
|
||||
If you want to add a new password checker function, just add a file in
|
||||
this directory that follow example of already existing files.
|
||||
This file must be called for example :
|
||||
functions_mypasschecker.php
|
||||
|
||||
Edit function name to call it:
|
||||
check_user_mypasschecker
|
||||
|
||||
Change code of this function to return true if couple
|
||||
$usertotest / $passwordtotest is ok for you.
|
||||
|
||||
Then, you must edit you conf.php file to change the value of
|
||||
$dolibarr_main_authentication
|
||||
parameter to set it to :
|
||||
mypasschecker
|
||||
|
||||
Once this is done, when you log in to Dolibarr, the function
|
||||
check_user_mypasschecker in this file is called.
|
||||
If the function return true and login exists, login is accepted.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -149,11 +149,11 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
$lines=$this->line_per_page; // There is no line in such PDF.
|
||||
$lignes=$this->line_per_page; // There is no line in such PDF.
|
||||
|
||||
$pages = intval($lines / $this->line_per_page);
|
||||
$pages = intval($lignes / $this->line_per_page);
|
||||
|
||||
if (($lines % $this->line_per_page)>0)
|
||||
if (($lignes % $this->line_per_page)>0)
|
||||
{
|
||||
$pages++;
|
||||
}
|
||||
@ -333,38 +333,38 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
$page_hauteur=$this->page_hauteur;
|
||||
|
||||
// Line of free text
|
||||
$line=(! empty($conf->global->$paramfreetext))?$outputlangs->convToOutputCharset($conf->global->$paramfreetext):"";
|
||||
$ligne=(! empty($conf->global->$paramfreetext))?$outputlangs->convToOutputCharset($conf->global->$paramfreetext):"";
|
||||
|
||||
$pdf->SetFont('','',7);
|
||||
$pdf->SetDrawColor(224,224,224);
|
||||
|
||||
// On positionne le debut du bas de page selon nbre de lignes de ce bas de page
|
||||
$nbofline=dol_nboflines_bis($line,0,$outputlangs->charset_output);
|
||||
//print 'e'.$line.'t'.dol_nboflines($line);exit;
|
||||
$posy=$marge_basse + ($nbofline*3) + ($line1?3:0) + ($line2?3:0);
|
||||
$nbofligne=dol_nboflines_bis($ligne,0,$outputlangs->charset_output);
|
||||
//print 'e'.$ligne.'t'.dol_nboflines($ligne);exit;
|
||||
$posy=$marge_basse + ($nbofligne*3) + ($ligne1?3:0) + ($ligne2?3:0);
|
||||
|
||||
if ($line) // Free text
|
||||
if ($ligne) // Free text
|
||||
{
|
||||
$pdf->SetXY($marge_gauche,-$posy);
|
||||
$pdf->MultiCell(20000, 3, $line, 0, 'L', 0); // Use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.
|
||||
$posy-=($nbofline*3); // 6 of ligne + 3 of MultiCell
|
||||
$pdf->MultiCell(20000, 3, $ligne, 0, 'L', 0); // Use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.
|
||||
$posy-=($nbofligne*3); // 6 of ligne + 3 of MultiCell
|
||||
}
|
||||
|
||||
$pdf->SetY(-$posy);
|
||||
$pdf->line($marge_gauche, $page_hauteur-$posy, 200, $page_hauteur-$posy);
|
||||
$posy--;
|
||||
|
||||
if ($line1)
|
||||
if ($ligne1)
|
||||
{
|
||||
$pdf->SetXY($marge_gauche,-$posy);
|
||||
$pdf->MultiCell(200, 2, $line1, 0, 'C', 0);
|
||||
$pdf->MultiCell(200, 2, $ligne1, 0, 'C', 0);
|
||||
}
|
||||
|
||||
if ($line2)
|
||||
if ($ligne2)
|
||||
{
|
||||
$posy-=3;
|
||||
$pdf->SetXY($marge_gauche,-$posy);
|
||||
$pdf->MultiCell(200, 2, $line2, 0, 'C', 0);
|
||||
$pdf->MultiCell(200, 2, $ligne2, 0, 'C', 0);
|
||||
}
|
||||
|
||||
$pdf->SetXY(-20,-$posy);
|
||||
|
||||
@ -219,7 +219,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
|
||||
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs);
|
||||
$pdf->SetXY (156, $curY);
|
||||
$pdf->MultiCell(20, 3, $up_excl_tax, 0, 'R', 0);
|
||||
$pdf->MultiCell(18, 3, $up_excl_tax, 0, 'R', 0);
|
||||
|
||||
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs);
|
||||
$pdf->SetXY (174, $curY);
|
||||
|
||||
@ -783,7 +783,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxup-1, $tab_top+2);
|
||||
$pdf->MultiCell(20,2, $outputlangs->transnoentities("PriceUHT"),'','C');
|
||||
$pdf->MultiCell(18,2, $outputlangs->transnoentities("PriceUHT"),'','C');
|
||||
|
||||
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxqty-1, $tab_top+2);
|
||||
|
||||
@ -78,6 +78,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
global $user,$conf,$langs,$mysoc;
|
||||
|
||||
$object->fetch_thirdparty();
|
||||
if (empty($object->lines)) $object->lines=$object->lignes;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
@ -352,7 +353,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
$tab4_top = 60;
|
||||
$tab4_hl = 6;
|
||||
$tab4_sl = 4;
|
||||
$line = 2;
|
||||
$ligne = 2;
|
||||
|
||||
//*********************LOGO****************************
|
||||
$pdf->SetXY(11,7);
|
||||
|
||||
@ -220,6 +220,8 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
||||
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
if (empty($object->lines)) $object->lines=$object->lignes;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (!class_exists('TCPDF')) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
@ -98,7 +98,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||
{
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
$nblines = sizeof($object->lines);
|
||||
$nblignes = sizeof($object->lignes);
|
||||
|
||||
$objectref = dol_sanitizeFileName($object->ref);
|
||||
$dir = $conf->expedition->dir_output."/receipt";
|
||||
@ -180,7 +180,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||
$curY = $tab_top + 7;
|
||||
$nexY = $tab_top + 7;
|
||||
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
|
||||
@ -196,22 +196,22 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||
|
||||
$pdf->SetXY (10, $curY );
|
||||
|
||||
$pdf->MultiCell(20, 3, $outputlangs->convToOutputCharset($object->lines[$i]->ref), 0, 'C');
|
||||
$pdf->MultiCell(20, 3, $outputlangs->convToOutputCharset($object->lignes[$i]->ref), 0, 'C');
|
||||
|
||||
// \TODO Field not yet saved in database
|
||||
//$pdf->SetXY (133, $curY );
|
||||
//$pdf->MultiCell(10, 5, $object->lines[$i]->tva_tx, 0, 'C');
|
||||
//$pdf->MultiCell(10, 5, $object->lignes[$i]->tva_tx, 0, 'C');
|
||||
|
||||
$pdf->SetXY (145, $curY );
|
||||
$pdf->MultiCell(10, 3, $object->lines[$i]->qty_shipped, 0, 'C');
|
||||
$pdf->MultiCell(10, 3, $object->lignes[$i]->qty_shipped, 0, 'C');
|
||||
|
||||
// \TODO Field not yet saved in database
|
||||
//$pdf->SetXY (156, $curY );
|
||||
//$pdf->MultiCell(20, 3, price($object->lines[$i]->price), 0, 'R', 0);
|
||||
//$pdf->MultiCell(20, 3, price($object->lignes[$i]->price), 0, 'R', 0);
|
||||
|
||||
// \TODO Field not yet saved in database
|
||||
//$pdf->SetXY (174, $curY );
|
||||
//$total = price($object->lines[$i]->price * $object->lines[$i]->qty_shipped);
|
||||
//$total = price($object->lignes[$i]->price * $object->lignes[$i]->qty_shipped);
|
||||
//$pdf->MultiCell(26, 3, $total, 0, 'R', 0);
|
||||
|
||||
$pdf->line(10, $curY-1, 200, $curY-1);
|
||||
@ -220,10 +220,10 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||
$nexY+=2; // Passe espace entre les lignes
|
||||
|
||||
// Cherche nombre de lignes a venir pour savoir si place suffisante
|
||||
if ($i < ($nblines - 1)) // If it's not last line
|
||||
if ($i < ($nblignes - 1)) // If it's not last line
|
||||
{
|
||||
//on recupere la description du produit suivant
|
||||
$follow_descproduitservice = $object->lines[$i+1]->desc;
|
||||
$follow_descproduitservice = $object->lignes[$i+1]->desc;
|
||||
//on compte le nombre de ligne afin de verifier la place disponible (largeur de ligne 52 caracteres)
|
||||
$nblineFollowDesc = (dol_nboflines_bis($follow_descproduitservice,52,$outputlangs->charset_output)*4);
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
{
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
$nblines = sizeof($object->lines);
|
||||
$nblignes = sizeof($object->lignes);
|
||||
|
||||
$objectref = dol_sanitizeFileName($object->ref);
|
||||
$dir = $conf->expedition->dir_output."/receipt";
|
||||
@ -190,7 +190,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
// Positionne $this->atleastonediscount si on a au moins une remise
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
{
|
||||
if ($object->lines[$i]->remise_percent)
|
||||
if ($object->lignes[$i]->remise_percent)
|
||||
{
|
||||
$this->atleastonediscount++;
|
||||
}
|
||||
@ -238,7 +238,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$nexY = $tab_top + 7;
|
||||
|
||||
// Boucle sur les lignes
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
|
||||
@ -255,41 +255,41 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
/*
|
||||
// TVA
|
||||
$pdf->SetXY ($this->posxtva, $curY);
|
||||
$pdf->MultiCell(10, 4, ($object->lines[$i]->tva_tx < 0 ? '*':'').abs($object->lines[$i]->tva_tx), 0, 'R');
|
||||
$pdf->MultiCell(10, 4, ($object->lignes[$i]->tva_tx < 0 ? '*':'').abs($object->lignes[$i]->tva_tx), 0, 'R');
|
||||
|
||||
// Prix unitaire HT avant remise
|
||||
$pdf->SetXY ($this->posxup, $curY);
|
||||
$pdf->MultiCell(20, 4, price($object->lines[$i]->subprice), 0, 'R', 0);
|
||||
$pdf->MultiCell(20, 4, price($object->lignes[$i]->subprice), 0, 'R', 0);
|
||||
*/
|
||||
// Quantity
|
||||
$pdf->SetXY ($this->posxqty, $curY);
|
||||
$pdf->MultiCell(30, 3, $object->lines[$i]->qty_shipped, 0, 'R');
|
||||
$pdf->MultiCell(30, 3, $object->lignes[$i]->qty_shipped, 0, 'R');
|
||||
/*
|
||||
// Remise sur ligne
|
||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||
if ($object->lines[$i]->remise_percent)
|
||||
if ($object->lignes[$i]->remise_percent)
|
||||
{
|
||||
$pdf->MultiCell(14, 3, $object->lines[$i]->remise_percent."%", 0, 'R');
|
||||
$pdf->MultiCell(14, 3, $object->lignes[$i]->remise_percent."%", 0, 'R');
|
||||
}
|
||||
|
||||
// Total HT ligne
|
||||
$pdf->SetXY ($this->postotalht, $curY);
|
||||
$total = price($object->lines[$i]->price * $object->lines[$i]->qty);
|
||||
$total = price($object->lignes[$i]->price * $object->lignes[$i]->qty);
|
||||
$pdf->MultiCell(23, 3, $total, 0, 'R', 0);
|
||||
|
||||
// Collecte des totaux par valeur de tva
|
||||
// dans le tableau tva["taux"]=total_tva
|
||||
$tvaligne=$object->lines[$i]->price * $object->lines[$i]->qty;
|
||||
$tvaligne=$object->lignes[$i]->price * $object->lignes[$i]->qty;
|
||||
if ($object->remise_percent) $tvaligne-=($tvaligne*$object->remise_percent)/100;
|
||||
$this->tva[ (string)$object->lines[$i]->tva_tx ] += $tvaligne;
|
||||
$this->tva[ (string)$object->lignes[$i]->tva_tx ] += $tvaligne;
|
||||
*/
|
||||
$nexY+=2; // Passe espace entre les lignes
|
||||
|
||||
// Cherche nombre de lignes a venir pour savoir si place suffisante
|
||||
if ($i < ($nblines - 1)) // If it's not last line
|
||||
if ($i < ($nblignes - 1)) // If it's not last line
|
||||
{
|
||||
//on recupere la description du produit suivant
|
||||
$follow_descproduitservice = $object->lines[$i+1]->desc;
|
||||
$follow_descproduitservice = $object->lignes[$i+1]->desc;
|
||||
//on compte le nombre de ligne afin de verifier la place disponible (largeur de ligne 52 caracteres)
|
||||
$nblineFollowDesc = (dol_nboflines_bis($follow_descproduitservice,52,$outputlangs->charset_output)*4);
|
||||
}
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
mailinglist_chatsderace.modules.php
|
||||
mailinglist_chiensderace.modules.php
|
||||
mailinglist_chatsderace.modules.php
|
||||
mailinglist_chiensderace.modules.php
|
||||
|
||||
@ -1,131 +1,131 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* \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] = 510;
|
||||
$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] = 511;
|
||||
$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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* \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] = 510;
|
||||
$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] = 511;
|
||||
$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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -1,150 +1,150 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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 domain Module domain
|
||||
* \brief Module to manage a list of DNS names
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/includes/modules/modDomain.class.php
|
||||
* \ingroup domain
|
||||
* \brief Fichier de description et activation du module domain
|
||||
*/
|
||||
|
||||
include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php");
|
||||
|
||||
|
||||
/**
|
||||
* \class modDomain
|
||||
* \brief Classe de description et activation du module Domain
|
||||
*/
|
||||
class modDomain extends DolibarrModules
|
||||
{
|
||||
|
||||
/**
|
||||
* \brief Constructeur. Definit les noms, constantes et boites
|
||||
* \param DB handler d'acces base
|
||||
*/
|
||||
function modDomain($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->numero = 1300 ;
|
||||
|
||||
$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 d'une base de noms de domaines";
|
||||
$this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
|
||||
$this->special = 3;
|
||||
$this->picto='generic';
|
||||
|
||||
// Dir
|
||||
//----
|
||||
$this->dirs = array();
|
||||
|
||||
// Config pages
|
||||
//-------------
|
||||
$this->config_page_url = array();
|
||||
|
||||
// Dependancies
|
||||
//-------------
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->langfiles = array("domains");
|
||||
|
||||
// Constantes
|
||||
//-----------
|
||||
$this->const = array();
|
||||
|
||||
// Boites
|
||||
//-------
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
//------------
|
||||
$this->rights = array();
|
||||
$this->rights_class = 'domain';
|
||||
$r=0;
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 1301;
|
||||
$this->rights[$r][1] = 'Read domain names';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'read';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 1302;
|
||||
$this->rights[$r][1] = 'Create/modify domain names';
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'create';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 1303;
|
||||
$this->rights[$r][1] = 'Delete domain names';
|
||||
$this->rights[$r][2] = 'd';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'delete';
|
||||
|
||||
// Exports
|
||||
//--------
|
||||
$r=0;
|
||||
|
||||
// $this->export_code[$r] Code unique identifiant l'export (tous modules confondus)
|
||||
// $this->export_label[$r] Libelle par defaut si traduction de cle "ExportXXX" non trouvee (XXX = Code)
|
||||
// $this->export_permission[$r] Liste des codes permissions requis pour faire l'export
|
||||
// $this->export_fields_sql[$r] Liste des champs exportables en codif sql
|
||||
// $this->export_fields_name[$r] Liste des champs exportables en codif traduction
|
||||
// $this->export_sql[$r] Requete sql qui offre les donnees a l'export
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \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);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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 domain Module domain
|
||||
* \brief Module to manage a list of DNS names
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/includes/modules/modDomain.class.php
|
||||
* \ingroup domain
|
||||
* \brief Fichier de description et activation du module domain
|
||||
*/
|
||||
|
||||
include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php");
|
||||
|
||||
|
||||
/**
|
||||
* \class modDomain
|
||||
* \brief Classe de description et activation du module Domain
|
||||
*/
|
||||
class modDomain extends DolibarrModules
|
||||
{
|
||||
|
||||
/**
|
||||
* \brief Constructeur. Definit les noms, constantes et boites
|
||||
* \param DB handler d'acces base
|
||||
*/
|
||||
function modDomain($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->numero = 1300 ;
|
||||
|
||||
$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 d'une base de noms de domaines";
|
||||
$this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
|
||||
$this->special = 3;
|
||||
$this->picto='generic';
|
||||
|
||||
// Dir
|
||||
//----
|
||||
$this->dirs = array();
|
||||
|
||||
// Config pages
|
||||
//-------------
|
||||
$this->config_page_url = array();
|
||||
|
||||
// Dependancies
|
||||
//-------------
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->langfiles = array("domains");
|
||||
|
||||
// Constantes
|
||||
//-----------
|
||||
$this->const = array();
|
||||
|
||||
// Boites
|
||||
//-------
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
//------------
|
||||
$this->rights = array();
|
||||
$this->rights_class = 'domain';
|
||||
$r=0;
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 1301;
|
||||
$this->rights[$r][1] = 'Read domain names';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'read';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 1302;
|
||||
$this->rights[$r][1] = 'Create/modify domain names';
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'create';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 1303;
|
||||
$this->rights[$r][1] = 'Delete domain names';
|
||||
$this->rights[$r][2] = 'd';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'delete';
|
||||
|
||||
// Exports
|
||||
//--------
|
||||
$r=0;
|
||||
|
||||
// $this->export_code[$r] Code unique identifiant l'export (tous modules confondus)
|
||||
// $this->export_label[$r] Libelle par defaut si traduction de cle "ExportXXX" non trouvee (XXX = Code)
|
||||
// $this->export_permission[$r] Liste des codes permissions requis pour faire l'export
|
||||
// $this->export_fields_sql[$r] Liste des champs exportables en codif sql
|
||||
// $this->export_fields_name[$r] Liste des champs exportables en codif traduction
|
||||
// $this->export_sql[$r] Requete sql qui offre les donnees a l'export
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \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);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@ -1,180 +1,180 @@
|
||||
<?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>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* \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';
|
||||
|
||||
//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_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.ville'=>'soc_ville','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','s.code_compta'=>'soc_customer_accountancy','s.code_compta_fournisseur'=>'soc_supplier_accountancy','f.rowid'=>"interid",'f.ref'=>"ref",'f.datec'=>"datecreation",'f.duree'=>"duration",'f.fk_statut'=>'status','f.description'=>"note",'fd.rowid'=>'lineid','fd.date'=>"linedate",'fd.duree'=>'lineduration','fd.description'=>"linedescription");
|
||||
|
||||
$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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?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>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* \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';
|
||||
|
||||
//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_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.ville'=>'soc_ville','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','s.code_compta'=>'soc_customer_accountancy','s.code_compta_fournisseur'=>'soc_supplier_accountancy','f.rowid'=>"interid",'f.ref'=>"ref",'f.datec'=>"datecreation",'f.duree'=>"duration",'f.fk_statut'=>'status','f.description'=>"note",'fd.rowid'=>'lineid','fd.date'=>"linedate",'fd.duree'=>'lineduration','fd.description'=>"linedescription");
|
||||
|
||||
$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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -1,124 +1,124 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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 label Module labels
|
||||
* \version $Id$
|
||||
* \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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/* Copyright (C) 2007-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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 label Module labels
|
||||
* \version $Id$
|
||||
* \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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -1,132 +1,132 @@
|
||||
<?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>
|
||||
*
|
||||
* 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 mailing Module emailing
|
||||
* \brief Module to manage EMailings
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* \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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?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>
|
||||
*
|
||||
* 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 mailing Module emailing
|
||||
* \brief Module to manage EMailings
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* \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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -1,169 +1,169 @@
|
||||
<?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>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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 tax Module taxes
|
||||
\brief Module pour inclure des fonctions de saisies des taxes (tva) et charges sociales
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/includes/modules/modTax.class.php
|
||||
* \ingroup tax
|
||||
* \brief Fichier de description et activation du module Taxe
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php");
|
||||
|
||||
|
||||
/**
|
||||
\class modTax
|
||||
\brief Classe de description et activation du module Tax
|
||||
*/
|
||||
class modTax extends DolibarrModules
|
||||
{
|
||||
|
||||
/**
|
||||
* \brief Constructeur. Definit les noms, constantes et boites
|
||||
* \param DB handler d'acces base
|
||||
*/
|
||||
function modTax($DB)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$this->db = $DB ;
|
||||
$this->numero = 500 ;
|
||||
|
||||
$this->family = "financial";
|
||||
// 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));
|
||||
// Module description used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->description = "Gestion des taxes, charges sociales et dividendes";
|
||||
|
||||
// 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='bill';
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array("/tax/temp");
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("taxes.php");
|
||||
|
||||
// Dependances
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->conflictwith = array();
|
||||
$this->langfiles = array("compta","bills");
|
||||
|
||||
// Constantes
|
||||
$this->const = array();
|
||||
|
||||
// Boites
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
$this->rights_class = 'tax';
|
||||
$r=0;
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 91;
|
||||
$this->rights[$r][1] = 'Lire les charges';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'charges';
|
||||
$this->rights[$r][5] = 'lire';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 92;
|
||||
$this->rights[$r][1] = 'Creer/modifier les charges';
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'charges';
|
||||
$this->rights[$r][5] = 'creer';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 93;
|
||||
$this->rights[$r][1] = 'Supprimer les charges';
|
||||
$this->rights[$r][2] = 'd';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'charges';
|
||||
$this->rights[$r][5] = 'supprimer';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 94;
|
||||
$this->rights[$r][1] = 'Exporter les charges';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'charges';
|
||||
$this->rights[$r][5] = 'export';
|
||||
|
||||
|
||||
// Exports
|
||||
//--------
|
||||
$r=0;
|
||||
|
||||
$r++;
|
||||
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||
$this->export_label[$r]='Taxes et charges sociales, et leurs reglements';
|
||||
$this->export_permission[$r]=array(array("tax","charges","export"));
|
||||
$this->export_fields_array[$r]=array('cc.libelle'=>"Type",'c.rowid'=>"IdSocialContribution",'c.libelle'=>"Label",'c.date_ech'=>'DateDue','c.periode'=>'Period','c.amount'=>"AmountExpected","c.paye"=>"Status",'p.rowid'=>'PaymentId','p.datep'=>'DatePayment','p.amount'=>'AmountPayment','p.num_paiement'=>'Numero');
|
||||
$this->export_entities_array[$r]=array('cc.libelle'=>"tax_type",'c.rowid'=>"tax",'c.libelle'=>'tax','c.date_ech'=>'tax','c.periode'=>'tax','c.amount'=>"tax","c.paye"=>"tax",'p.rowid'=>'payment','p.datep'=>'payment','p.amount'=>'payment','p.num_paiement'=>'payment');
|
||||
$this->export_alias_array[$r]=array('cc.libelle'=>"type",'c.rowid'=>"idsocialcontrib",'c.libelle'=>'label','c.date_ech'=>'datedue','c.periode'=>'period','c.amount'=>"amount_clamed","c.paye"=>"status",'p.rowid'=>'paymentid','p.datep'=>'date_payment','p.amount'=>'amount_payment','p.num_paiement'=>'num_payment');
|
||||
|
||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'c_chargesociales as cc, '.MAIN_DB_PREFIX.'chargesociales as c';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiementcharge as p ON p.fk_charge = c.rowid';
|
||||
$this->export_sql_end[$r] .=' WHERE c.fk_type = cc.id';
|
||||
$this->export_sql_end[$r] .=' AND c.entity = '.$conf->entity;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \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;
|
||||
|
||||
// Nettoyage avant activation
|
||||
$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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?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>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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 tax Module taxes
|
||||
\brief Module pour inclure des fonctions de saisies des taxes (tva) et charges sociales
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/includes/modules/modTax.class.php
|
||||
* \ingroup tax
|
||||
* \brief Fichier de description et activation du module Taxe
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php");
|
||||
|
||||
|
||||
/**
|
||||
\class modTax
|
||||
\brief Classe de description et activation du module Tax
|
||||
*/
|
||||
class modTax extends DolibarrModules
|
||||
{
|
||||
|
||||
/**
|
||||
* \brief Constructeur. Definit les noms, constantes et boites
|
||||
* \param DB handler d'acces base
|
||||
*/
|
||||
function modTax($DB)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$this->db = $DB ;
|
||||
$this->numero = 500 ;
|
||||
|
||||
$this->family = "financial";
|
||||
// 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));
|
||||
// Module description used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->description = "Gestion des taxes, charges sociales et dividendes";
|
||||
|
||||
// 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='bill';
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array("/tax/temp");
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("taxes.php");
|
||||
|
||||
// Dependances
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->conflictwith = array();
|
||||
$this->langfiles = array("compta","bills");
|
||||
|
||||
// Constantes
|
||||
$this->const = array();
|
||||
|
||||
// Boites
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
$this->rights_class = 'tax';
|
||||
$r=0;
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 91;
|
||||
$this->rights[$r][1] = 'Lire les charges';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'charges';
|
||||
$this->rights[$r][5] = 'lire';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 92;
|
||||
$this->rights[$r][1] = 'Creer/modifier les charges';
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'charges';
|
||||
$this->rights[$r][5] = 'creer';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 93;
|
||||
$this->rights[$r][1] = 'Supprimer les charges';
|
||||
$this->rights[$r][2] = 'd';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'charges';
|
||||
$this->rights[$r][5] = 'supprimer';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 94;
|
||||
$this->rights[$r][1] = 'Exporter les charges';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'charges';
|
||||
$this->rights[$r][5] = 'export';
|
||||
|
||||
|
||||
// Exports
|
||||
//--------
|
||||
$r=0;
|
||||
|
||||
$r++;
|
||||
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||
$this->export_label[$r]='Taxes et charges sociales, et leurs reglements';
|
||||
$this->export_permission[$r]=array(array("tax","charges","export"));
|
||||
$this->export_fields_array[$r]=array('cc.libelle'=>"Type",'c.rowid'=>"IdSocialContribution",'c.libelle'=>"Label",'c.date_ech'=>'DateDue','c.periode'=>'Period','c.amount'=>"AmountExpected","c.paye"=>"Status",'p.rowid'=>'PaymentId','p.datep'=>'DatePayment','p.amount'=>'AmountPayment','p.num_paiement'=>'Numero');
|
||||
$this->export_entities_array[$r]=array('cc.libelle'=>"tax_type",'c.rowid'=>"tax",'c.libelle'=>'tax','c.date_ech'=>'tax','c.periode'=>'tax','c.amount'=>"tax","c.paye"=>"tax",'p.rowid'=>'payment','p.datep'=>'payment','p.amount'=>'payment','p.num_paiement'=>'payment');
|
||||
$this->export_alias_array[$r]=array('cc.libelle'=>"type",'c.rowid'=>"idsocialcontrib",'c.libelle'=>'label','c.date_ech'=>'datedue','c.periode'=>'period','c.amount'=>"amount_clamed","c.paye"=>"status",'p.rowid'=>'paymentid','p.datep'=>'date_payment','p.amount'=>'amount_payment','p.num_paiement'=>'num_payment');
|
||||
|
||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'c_chargesociales as cc, '.MAIN_DB_PREFIX.'chargesociales as c';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiementcharge as p ON p.fk_charge = c.rowid';
|
||||
$this->export_sql_end[$r] .=' WHERE c.fk_type = cc.id';
|
||||
$this->export_sql_end[$r] .=' AND c.entity = '.$conf->entity;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \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;
|
||||
|
||||
// Nettoyage avant activation
|
||||
$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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -141,11 +141,11 @@ class pdf_paiement
|
||||
$result = $this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$lines = $this->db->num_rows($result);
|
||||
$lignes = $this->db->num_rows($result);
|
||||
$i = 0;
|
||||
$var=True;
|
||||
|
||||
while ($i < $lines)
|
||||
while ($i < $lignes)
|
||||
{
|
||||
$objp = $this->db->fetch_object($result);
|
||||
$var=!$var;
|
||||
@ -167,9 +167,9 @@ class pdf_paiement
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
$pages = intval($lines / $this->line_per_page);
|
||||
$pages = intval($lignes / $this->line_per_page);
|
||||
|
||||
if (($lines % $this->line_per_page)>0)
|
||||
if (($lignes % $this->line_per_page)>0)
|
||||
{
|
||||
$pages++;
|
||||
}
|
||||
|
||||
@ -239,7 +239,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
|
||||
// Unit price before discount
|
||||
$pdf->SetXY ($this->posxup, $curY);
|
||||
$pdf->MultiCell(20, 3, price($object->lines[$i]->pu_ht), 0, 'R', 0);
|
||||
$pdf->MultiCell(18, 3, price($object->lines[$i]->pu_ht), 0, 'R', 0);
|
||||
|
||||
// Quantity
|
||||
$pdf->SetXY ($this->posxqty, $curY);
|
||||
@ -529,7 +529,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
|
||||
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxup-1, $tab_top+2);
|
||||
$pdf->MultiCell(20,2, $outputlangs->transnoentities("PriceUHT"),'','C');
|
||||
$pdf->MultiCell(18,2, $outputlangs->transnoentities("PriceUHT"),'','C');
|
||||
|
||||
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxqty-1, $tab_top+2);
|
||||
|
||||
@ -249,7 +249,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
|
||||
// Unit price before discount
|
||||
$pdf->SetXY ($this->posxup, $curY);
|
||||
$pdf->MultiCell(20, 3, price($object->lines[$i]->subprice), 0, 'R', 0);
|
||||
$pdf->MultiCell(18, 3, price($object->lines[$i]->subprice), 0, 'R', 0);
|
||||
|
||||
// Quantity
|
||||
$pdf->SetXY ($this->posxqty, $curY);
|
||||
@ -540,7 +540,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
|
||||
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxup-1, $tab_top+2);
|
||||
$pdf->MultiCell(20,2, $outputlangs->transnoentities("PriceUHT"),'','C');
|
||||
$pdf->MultiCell(18,2, $outputlangs->transnoentities("PriceUHT"),'','C');
|
||||
|
||||
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxqty-1, $tab_top+2);
|
||||
|
||||
@ -1,221 +1,221 @@
|
||||
<?php
|
||||
/**
|
||||
* Smarty plugin
|
||||
* @package Smarty
|
||||
* @subpackage plugins
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Smarty {fetch} plugin
|
||||
*
|
||||
* Type: function<br>
|
||||
* Name: fetch<br>
|
||||
* Purpose: fetch file, web or ftp data and display results
|
||||
* @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch}
|
||||
* (Smarty online manual)
|
||||
* @author Monte Ohrt <monte at ohrt dot com>
|
||||
* @param array
|
||||
* @param Smarty
|
||||
* @return string|null if the assign parameter is passed, Smarty assigns the
|
||||
* result to a template variable
|
||||
*/
|
||||
function smarty_function_fetch($params, &$smarty)
|
||||
{
|
||||
if (empty($params['file'])) {
|
||||
$smarty->_trigger_fatal_error("[plugin] parameter 'file' cannot be empty");
|
||||
return;
|
||||
}
|
||||
|
||||
$content = '';
|
||||
if ($smarty->security && !preg_match('!^(http|ftp)://!i', $params['file'])) {
|
||||
$_params = array('resource_type' => 'file', 'resource_name' => $params['file']);
|
||||
require_once(SMARTY_CORE_DIR . 'core.is_secure.php');
|
||||
if(!smarty_core_is_secure($_params, $smarty)) {
|
||||
$smarty->_trigger_fatal_error('[plugin] (secure mode) fetch \'' . $params['file'] . '\' is not allowed');
|
||||
return;
|
||||
}
|
||||
|
||||
// fetch the file
|
||||
if($fp = @fopen($params['file'],'r')) {
|
||||
while(!feof($fp)) {
|
||||
$content .= fgets ($fp,4096);
|
||||
}
|
||||
fclose($fp);
|
||||
} else {
|
||||
$smarty->_trigger_fatal_error('[plugin] fetch cannot read file \'' . $params['file'] . '\'');
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// not a local file
|
||||
if(preg_match('!^http://!i',$params['file'])) {
|
||||
// http fetch
|
||||
if($uri_parts = parse_url($params['file'])) {
|
||||
// set defaults
|
||||
$host = $server_name = $uri_parts['host'];
|
||||
$timeout = 30;
|
||||
$accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
|
||||
$agent = "Smarty Template Engine ".$smarty->_version;
|
||||
$referer = "";
|
||||
$uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/';
|
||||
$uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : '';
|
||||
$_is_proxy = false;
|
||||
if(empty($uri_parts['port'])) {
|
||||
$port = 80;
|
||||
} else {
|
||||
$port = $uri_parts['port'];
|
||||
}
|
||||
if(!empty($uri_parts['user'])) {
|
||||
$user = $uri_parts['user'];
|
||||
}
|
||||
if(!empty($uri_parts['pass'])) {
|
||||
$pass = $uri_parts['pass'];
|
||||
}
|
||||
// loop through parameters, setup headers
|
||||
foreach($params as $param_key => $param_value) {
|
||||
switch($param_key) {
|
||||
case "file":
|
||||
case "assign":
|
||||
case "assign_headers":
|
||||
break;
|
||||
case "user":
|
||||
if(!empty($param_value)) {
|
||||
$user = $param_value;
|
||||
}
|
||||
break;
|
||||
case "pass":
|
||||
if(!empty($param_value)) {
|
||||
$pass = $param_value;
|
||||
}
|
||||
break;
|
||||
case "accept":
|
||||
if(!empty($param_value)) {
|
||||
$accept = $param_value;
|
||||
}
|
||||
break;
|
||||
case "header":
|
||||
if(!empty($param_value)) {
|
||||
if(!preg_match('![\w\d-]+: .+!',$param_value)) {
|
||||
$smarty->_trigger_fatal_error("[plugin] invalid header format '".$param_value."'");
|
||||
return;
|
||||
} else {
|
||||
$extra_headers[] = $param_value;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "proxy_host":
|
||||
if(!empty($param_value)) {
|
||||
$proxy_host = $param_value;
|
||||
}
|
||||
break;
|
||||
case "proxy_port":
|
||||
if(!preg_match('!\D!', $param_value)) {
|
||||
$proxy_port = (int) $param_value;
|
||||
} else {
|
||||
$smarty->_trigger_fatal_error("[plugin] invalid value for attribute '".$param_key."'");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "agent":
|
||||
if(!empty($param_value)) {
|
||||
$agent = $param_value;
|
||||
}
|
||||
break;
|
||||
case "referer":
|
||||
if(!empty($param_value)) {
|
||||
$referer = $param_value;
|
||||
}
|
||||
break;
|
||||
case "timeout":
|
||||
if(!preg_match('!\D!', $param_value)) {
|
||||
$timeout = (int) $param_value;
|
||||
} else {
|
||||
$smarty->_trigger_fatal_error("[plugin] invalid value for attribute '".$param_key."'");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$smarty->_trigger_fatal_error("[plugin] unrecognized attribute '".$param_key."'");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(!empty($proxy_host) && !empty($proxy_port)) {
|
||||
$_is_proxy = true;
|
||||
$fp = fsockopen($proxy_host,$proxy_port,$errno,$errstr,$timeout);
|
||||
} else {
|
||||
$fp = fsockopen($server_name,$port,$errno,$errstr,$timeout);
|
||||
}
|
||||
|
||||
if(!$fp) {
|
||||
$smarty->_trigger_fatal_error("[plugin] unable to fetch: $errstr ($errno)");
|
||||
return;
|
||||
} else {
|
||||
if($_is_proxy) {
|
||||
fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n");
|
||||
} else {
|
||||
fputs($fp, "GET $uri HTTP/1.0\r\n");
|
||||
}
|
||||
if(!empty($host)) {
|
||||
fputs($fp, "Host: $host\r\n");
|
||||
}
|
||||
if(!empty($accept)) {
|
||||
fputs($fp, "Accept: $accept\r\n");
|
||||
}
|
||||
if(!empty($agent)) {
|
||||
fputs($fp, "User-Agent: $agent\r\n");
|
||||
}
|
||||
if(!empty($referer)) {
|
||||
fputs($fp, "Referer: $referer\r\n");
|
||||
}
|
||||
if(isset($extra_headers) && is_array($extra_headers)) {
|
||||
foreach($extra_headers as $curr_header) {
|
||||
fputs($fp, $curr_header."\r\n");
|
||||
}
|
||||
}
|
||||
if(!empty($user) && !empty($pass)) {
|
||||
fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n");
|
||||
}
|
||||
|
||||
fputs($fp, "\r\n");
|
||||
while(!feof($fp)) {
|
||||
$content .= fgets($fp,4096);
|
||||
}
|
||||
fclose($fp);
|
||||
$csplit = explode("\r\n\r\n",$content,2);
|
||||
|
||||
$content = $csplit[1];
|
||||
|
||||
if(!empty($params['assign_headers'])) {
|
||||
$smarty->assign($params['assign_headers'],split("\r\n",$csplit[0]));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$smarty->_trigger_fatal_error("[plugin] unable to parse URL, check syntax");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// ftp fetch
|
||||
if($fp = @fopen($params['file'],'r')) {
|
||||
while(!feof($fp)) {
|
||||
$content .= fgets ($fp,4096);
|
||||
}
|
||||
fclose($fp);
|
||||
} else {
|
||||
$smarty->_trigger_fatal_error('[plugin] fetch cannot read file \'' . $params['file'] .'\'');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!empty($params['assign'])) {
|
||||
$smarty->assign($params['assign'],$content);
|
||||
} else {
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
|
||||
/* vim: set expandtab: */
|
||||
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* Smarty plugin
|
||||
* @package Smarty
|
||||
* @subpackage plugins
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Smarty {fetch} plugin
|
||||
*
|
||||
* Type: function<br>
|
||||
* Name: fetch<br>
|
||||
* Purpose: fetch file, web or ftp data and display results
|
||||
* @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch}
|
||||
* (Smarty online manual)
|
||||
* @author Monte Ohrt <monte at ohrt dot com>
|
||||
* @param array
|
||||
* @param Smarty
|
||||
* @return string|null if the assign parameter is passed, Smarty assigns the
|
||||
* result to a template variable
|
||||
*/
|
||||
function smarty_function_fetch($params, &$smarty)
|
||||
{
|
||||
if (empty($params['file'])) {
|
||||
$smarty->_trigger_fatal_error("[plugin] parameter 'file' cannot be empty");
|
||||
return;
|
||||
}
|
||||
|
||||
$content = '';
|
||||
if ($smarty->security && !preg_match('!^(http|ftp)://!i', $params['file'])) {
|
||||
$_params = array('resource_type' => 'file', 'resource_name' => $params['file']);
|
||||
require_once(SMARTY_CORE_DIR . 'core.is_secure.php');
|
||||
if(!smarty_core_is_secure($_params, $smarty)) {
|
||||
$smarty->_trigger_fatal_error('[plugin] (secure mode) fetch \'' . $params['file'] . '\' is not allowed');
|
||||
return;
|
||||
}
|
||||
|
||||
// fetch the file
|
||||
if($fp = @fopen($params['file'],'r')) {
|
||||
while(!feof($fp)) {
|
||||
$content .= fgets ($fp,4096);
|
||||
}
|
||||
fclose($fp);
|
||||
} else {
|
||||
$smarty->_trigger_fatal_error('[plugin] fetch cannot read file \'' . $params['file'] . '\'');
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// not a local file
|
||||
if(preg_match('!^http://!i',$params['file'])) {
|
||||
// http fetch
|
||||
if($uri_parts = parse_url($params['file'])) {
|
||||
// set defaults
|
||||
$host = $server_name = $uri_parts['host'];
|
||||
$timeout = 30;
|
||||
$accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
|
||||
$agent = "Smarty Template Engine ".$smarty->_version;
|
||||
$referer = "";
|
||||
$uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/';
|
||||
$uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : '';
|
||||
$_is_proxy = false;
|
||||
if(empty($uri_parts['port'])) {
|
||||
$port = 80;
|
||||
} else {
|
||||
$port = $uri_parts['port'];
|
||||
}
|
||||
if(!empty($uri_parts['user'])) {
|
||||
$user = $uri_parts['user'];
|
||||
}
|
||||
if(!empty($uri_parts['pass'])) {
|
||||
$pass = $uri_parts['pass'];
|
||||
}
|
||||
// loop through parameters, setup headers
|
||||
foreach($params as $param_key => $param_value) {
|
||||
switch($param_key) {
|
||||
case "file":
|
||||
case "assign":
|
||||
case "assign_headers":
|
||||
break;
|
||||
case "user":
|
||||
if(!empty($param_value)) {
|
||||
$user = $param_value;
|
||||
}
|
||||
break;
|
||||
case "pass":
|
||||
if(!empty($param_value)) {
|
||||
$pass = $param_value;
|
||||
}
|
||||
break;
|
||||
case "accept":
|
||||
if(!empty($param_value)) {
|
||||
$accept = $param_value;
|
||||
}
|
||||
break;
|
||||
case "header":
|
||||
if(!empty($param_value)) {
|
||||
if(!preg_match('![\w\d-]+: .+!',$param_value)) {
|
||||
$smarty->_trigger_fatal_error("[plugin] invalid header format '".$param_value."'");
|
||||
return;
|
||||
} else {
|
||||
$extra_headers[] = $param_value;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "proxy_host":
|
||||
if(!empty($param_value)) {
|
||||
$proxy_host = $param_value;
|
||||
}
|
||||
break;
|
||||
case "proxy_port":
|
||||
if(!preg_match('!\D!', $param_value)) {
|
||||
$proxy_port = (int) $param_value;
|
||||
} else {
|
||||
$smarty->_trigger_fatal_error("[plugin] invalid value for attribute '".$param_key."'");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "agent":
|
||||
if(!empty($param_value)) {
|
||||
$agent = $param_value;
|
||||
}
|
||||
break;
|
||||
case "referer":
|
||||
if(!empty($param_value)) {
|
||||
$referer = $param_value;
|
||||
}
|
||||
break;
|
||||
case "timeout":
|
||||
if(!preg_match('!\D!', $param_value)) {
|
||||
$timeout = (int) $param_value;
|
||||
} else {
|
||||
$smarty->_trigger_fatal_error("[plugin] invalid value for attribute '".$param_key."'");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$smarty->_trigger_fatal_error("[plugin] unrecognized attribute '".$param_key."'");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(!empty($proxy_host) && !empty($proxy_port)) {
|
||||
$_is_proxy = true;
|
||||
$fp = fsockopen($proxy_host,$proxy_port,$errno,$errstr,$timeout);
|
||||
} else {
|
||||
$fp = fsockopen($server_name,$port,$errno,$errstr,$timeout);
|
||||
}
|
||||
|
||||
if(!$fp) {
|
||||
$smarty->_trigger_fatal_error("[plugin] unable to fetch: $errstr ($errno)");
|
||||
return;
|
||||
} else {
|
||||
if($_is_proxy) {
|
||||
fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n");
|
||||
} else {
|
||||
fputs($fp, "GET $uri HTTP/1.0\r\n");
|
||||
}
|
||||
if(!empty($host)) {
|
||||
fputs($fp, "Host: $host\r\n");
|
||||
}
|
||||
if(!empty($accept)) {
|
||||
fputs($fp, "Accept: $accept\r\n");
|
||||
}
|
||||
if(!empty($agent)) {
|
||||
fputs($fp, "User-Agent: $agent\r\n");
|
||||
}
|
||||
if(!empty($referer)) {
|
||||
fputs($fp, "Referer: $referer\r\n");
|
||||
}
|
||||
if(isset($extra_headers) && is_array($extra_headers)) {
|
||||
foreach($extra_headers as $curr_header) {
|
||||
fputs($fp, $curr_header."\r\n");
|
||||
}
|
||||
}
|
||||
if(!empty($user) && !empty($pass)) {
|
||||
fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n");
|
||||
}
|
||||
|
||||
fputs($fp, "\r\n");
|
||||
while(!feof($fp)) {
|
||||
$content .= fgets($fp,4096);
|
||||
}
|
||||
fclose($fp);
|
||||
$csplit = explode("\r\n\r\n",$content,2);
|
||||
|
||||
$content = $csplit[1];
|
||||
|
||||
if(!empty($params['assign_headers'])) {
|
||||
$smarty->assign($params['assign_headers'],split("\r\n",$csplit[0]));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$smarty->_trigger_fatal_error("[plugin] unable to parse URL, check syntax");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// ftp fetch
|
||||
if($fp = @fopen($params['file'],'r')) {
|
||||
while(!feof($fp)) {
|
||||
$content .= fgets ($fp,4096);
|
||||
}
|
||||
fclose($fp);
|
||||
} else {
|
||||
$smarty->_trigger_fatal_error('[plugin] fetch cannot read file \'' . $params['file'] .'\'');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!empty($params['assign'])) {
|
||||
$smarty->assign($params['assign'],$content);
|
||||
} else {
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
|
||||
/* vim: set expandtab: */
|
||||
|
||||
?>
|
||||
|
||||
@ -25,12 +25,8 @@ create table llx_user
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
datec datetime,
|
||||
tms timestamp,
|
||||
|
||||
login varchar(30) NOT NULL, -- user reference number
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
|
||||
ref_ext varchar(30), -- reference into an external system (not used by dolibarr)
|
||||
|
||||
login varchar(24) NOT NULL,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
pass varchar(32),
|
||||
pass_crypted varchar(128),
|
||||
pass_temp varchar(32), -- temporary password when asked for forget password
|
||||
|
||||
@ -1 +1 @@
|
||||
htmlMimeMail
|
||||
htmlMimeMail
|
||||
|
||||
@ -372,7 +372,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
||||
global $conf,$user;
|
||||
|
||||
$outputlangs->load("dict");
|
||||
$line='';
|
||||
$ligne='';
|
||||
|
||||
// Line of free text
|
||||
if (! empty($conf->global->$paramfreetext))
|
||||
@ -387,92 +387,92 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
||||
);
|
||||
|
||||
$newfreetext=make_substitutions($conf->global->$paramfreetext,$substitutionarray,$outputlangs,$object);
|
||||
$line.=$outputlangs->convToOutputCharset($newfreetext);
|
||||
$ligne.=$outputlangs->convToOutputCharset($newfreetext);
|
||||
}
|
||||
|
||||
// First line of company infos
|
||||
|
||||
// Juridical status
|
||||
$line1="";
|
||||
$ligne1="";
|
||||
if ($fromcompany->forme_juridique_code)
|
||||
{
|
||||
$line1.=($line1?" - ":"").$outputlangs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code));
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code));
|
||||
}
|
||||
// Capital
|
||||
if ($fromcompany->capital)
|
||||
{
|
||||
$line1.=($line1?" - ":"").$outputlangs->transnoentities("CapitalOf",$fromcompany->capital)." ".$outputlangs->transnoentities("Currency".$conf->monnaie);
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transnoentities("CapitalOf",$fromcompany->capital)." ".$outputlangs->transnoentities("Currency".$conf->monnaie);
|
||||
}
|
||||
// Prof Id 1
|
||||
if ($fromcompany->idprof1 && ($fromcompany->pays_code != 'FR' || ! $fromcompany->idprof2))
|
||||
{
|
||||
$field=$outputlangs->transcountrynoentities("ProfId1",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line1.=($line1?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof1);
|
||||
$ligne1.=($ligne1?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof1);
|
||||
}
|
||||
// Prof Id 2
|
||||
if ($fromcompany->idprof2)
|
||||
{
|
||||
$field=$outputlangs->transcountrynoentities("ProfId2",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line1.=($line1?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof2);
|
||||
$ligne1.=($ligne1?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof2);
|
||||
}
|
||||
|
||||
// Second line of company infos
|
||||
$line2="";
|
||||
$ligne2="";
|
||||
// Prof Id 3
|
||||
if ($fromcompany->idprof3)
|
||||
{
|
||||
$field=$outputlangs->transcountrynoentities("ProfId3",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line2.=($line2?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof3);
|
||||
$ligne2.=($ligne2?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof3);
|
||||
}
|
||||
// Prof Id 4
|
||||
if ($fromcompany->idprof4)
|
||||
{
|
||||
$field=$outputlangs->transcountrynoentities("ProfId4",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line2.=($line2?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof4);
|
||||
$ligne2.=($ligne2?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof4);
|
||||
}
|
||||
// IntraCommunautary VAT
|
||||
if ($fromcompany->tva_intra != '')
|
||||
{
|
||||
$line2.=($line2?" - ":"").$outputlangs->transnoentities("VATIntraShort").": ".$outputlangs->convToOutputCharset($fromcompany->tva_intra);
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transnoentities("VATIntraShort").": ".$outputlangs->convToOutputCharset($fromcompany->tva_intra);
|
||||
}
|
||||
|
||||
$pdf->SetFont('','',7);
|
||||
$pdf->SetDrawColor(224,224,224);
|
||||
|
||||
// On positionne le debut du bas de page selon nbre de lignes de ce bas de page
|
||||
$nbofline=dol_nboflines_bis($line,0,$outputlangs->charset_output);
|
||||
//print 'nbofline='.$nbofline; exit;
|
||||
//print 'e'.$line.'t'.dol_nboflines($line);exit;
|
||||
$posy=$marge_basse + ($nbofline*3) + ($line1?3:0) + ($line2?3:0);
|
||||
$nbofligne=dol_nboflines_bis($ligne,0,$outputlangs->charset_output);
|
||||
//print 'nbofligne='.$nbofligne; exit;
|
||||
//print 'e'.$ligne.'t'.dol_nboflines($ligne);exit;
|
||||
$posy=$marge_basse + ($nbofligne*3) + ($ligne1?3:0) + ($ligne2?3:0);
|
||||
|
||||
if ($line) // Free text
|
||||
if ($ligne) // Free text
|
||||
{
|
||||
$pdf->SetXY($marge_gauche,-$posy);
|
||||
$width=20000; $align='L'; // By default, ask a manual break: We use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.
|
||||
if ($conf->global->MAIN_USE_AUTOWRAP_ON_FREETEXT) { $width=200; $align='C'; }
|
||||
$pdf->MultiCell($width, 3, $line, 0, $align, 0);
|
||||
$posy-=($nbofline*3); // 6 of ligne + 3 of MultiCell
|
||||
$pdf->MultiCell($width, 3, $ligne, 0, $align, 0);
|
||||
$posy-=($nbofligne*3); // 6 of ligne + 3 of MultiCell
|
||||
}
|
||||
|
||||
$pdf->SetY(-$posy);
|
||||
$pdf->line($marge_gauche, $page_hauteur-$posy, 200, $page_hauteur-$posy);
|
||||
$posy--;
|
||||
|
||||
if ($line1)
|
||||
if ($ligne1)
|
||||
{
|
||||
$pdf->SetXY($marge_gauche,-$posy);
|
||||
$pdf->MultiCell(200, 2, $line1, 0, 'C', 0);
|
||||
$pdf->MultiCell(200, 2, $ligne1, 0, 'C', 0);
|
||||
}
|
||||
|
||||
if ($line2)
|
||||
if ($ligne2)
|
||||
{
|
||||
$posy-=3;
|
||||
$pdf->SetXY($marge_gauche,-$posy);
|
||||
$pdf->MultiCell(200, 2, $line2, 0, 'C', 0);
|
||||
$pdf->MultiCell(200, 2, $ligne2, 0, 'C', 0);
|
||||
}
|
||||
|
||||
// Show page nb only on iso languages
|
||||
|
||||
@ -53,13 +53,13 @@ function viewCsvFileContent($file_to_include='',$max_rows=0)
|
||||
$count = 0;
|
||||
|
||||
print '<table border="1">';
|
||||
for ($line = fgetcsv($fic, 1024); (!feof($fic) && (($max_rows > 0)?($count<=$max_rows):1==1)); $line = fgetcsv($fic, 1024))
|
||||
for ($ligne = fgetcsv($fic, 1024); (!feof($fic) && (($max_rows > 0)?($count<=$max_rows):1==1)); $ligne = fgetcsv($fic, 1024))
|
||||
{
|
||||
print '<tr>';
|
||||
$j = sizeof($line);
|
||||
$j = sizeof($ligne);
|
||||
for ($i = 0; $i < $j; $i++)
|
||||
{
|
||||
print '<td>'.$line[$i].'</td>';
|
||||
print '<td>'.$ligne[$i].'</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
$count++;
|
||||
|
||||
@ -65,6 +65,7 @@ class Livraison extends CommonObject
|
||||
function Livraison($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->lignes = array(); // TODO deprecated
|
||||
$this->lines = array();
|
||||
$this->products = array();
|
||||
|
||||
@ -136,19 +137,19 @@ class Livraison extends CommonObject
|
||||
{
|
||||
$commande = new Commande($this->db);
|
||||
$commande->id = $this->commande_id;
|
||||
$this->lines = $commande->fetch_lines();
|
||||
$this->lignes = $commande->fetch_lines();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Insertion des produits dans la base
|
||||
*/
|
||||
for ($i = 0 ; $i < sizeof($this->lines) ; $i++)
|
||||
for ($i = 0 ; $i < sizeof($this->lignes) ; $i++)
|
||||
{
|
||||
$origin_id=$this->lines[$i]->origin_line_id;
|
||||
if (! $origin_id) $origin_id=$this->lines[$i]->commande_ligne_id; // For backward compatibility
|
||||
$origin_id=$this->lignes[$i]->origin_line_id;
|
||||
if (! $origin_id) $origin_id=$this->lignes[$i]->commande_ligne_id; // For backward compatibility
|
||||
|
||||
if (! $this->create_line(0, $origin_id, $this->lines[$i]->qty, $this->lines[$i]->fk_product, $this->lines[$i]->description))
|
||||
if (! $this->create_line(0, $origin_id, $this->lignes[$i]->qty, $this->lignes[$i]->fk_product, $this->lignes[$i]->description))
|
||||
{
|
||||
$error++;
|
||||
}
|
||||
@ -285,7 +286,7 @@ class Livraison extends CommonObject
|
||||
/*
|
||||
* Lignes
|
||||
*/
|
||||
$result=$this->fetch_lines();
|
||||
$result=$this->fetch_lignes();
|
||||
if ($result < 0)
|
||||
{
|
||||
return -3;
|
||||
@ -490,19 +491,18 @@ class Livraison extends CommonObject
|
||||
$expedition = new Expedition($this->db);
|
||||
$result=$expedition->fetch($sending_id);
|
||||
|
||||
$this->lines = array();
|
||||
$this->lignes = array();
|
||||
|
||||
for ($i = 0 ; $i < sizeof($expedition->lines) ; $i++)
|
||||
for ($i = 0 ; $i < sizeof($expedition->lignes) ; $i++)
|
||||
{
|
||||
$line = new LivraisonLigne($this->db);
|
||||
$line->origin_line_id = $expedition->lines[$i]->origin_line_id;
|
||||
$line->libelle = $expedition->lines[$i]->libelle;
|
||||
$line->description = $expedition->lines[$i]->description;
|
||||
$line->qty = $expedition->lines[$i]->qty_shipped;
|
||||
$line->fk_product = $expedition->lines[$i]->fk_product;
|
||||
$line->ref = $expedition->lines[$i]->ref;
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
$LivraisonLigne = new LivraisonLigne($this->db);
|
||||
$LivraisonLigne->origin_line_id = $expedition->lignes[$i]->origin_line_id;
|
||||
$LivraisonLigne->libelle = $expedition->lignes[$i]->libelle;
|
||||
$LivraisonLigne->description = $expedition->lignes[$i]->description;
|
||||
$LivraisonLigne->qty = $expedition->lignes[$i]->qty_shipped;
|
||||
$LivraisonLigne->fk_product = $expedition->lignes[$i]->fk_product;
|
||||
$LivraisonLigne->ref = $expedition->lignes[$i]->ref;
|
||||
$this->lignes[$i] = $LivraisonLigne;
|
||||
}
|
||||
|
||||
$this->origin = $expedition->element;
|
||||
@ -524,13 +524,13 @@ class Livraison extends CommonObject
|
||||
*/
|
||||
function addline( $id, $qty )
|
||||
{
|
||||
$num = sizeof($this->lines);
|
||||
$line = new LivraisonLigne($this->db);
|
||||
$num = sizeof($this->lignes);
|
||||
$ligne = new LivraisonLigne($this->db);
|
||||
|
||||
$line->commande_ligne_id = $id;
|
||||
$line->qty = $qty;
|
||||
$ligne->commande_ligne_id = $id;
|
||||
$ligne->qty = $qty;
|
||||
|
||||
$this->lines[$num] = $line;
|
||||
$this->lignes[$num] = $ligne;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -657,9 +657,9 @@ class Livraison extends CommonObject
|
||||
*
|
||||
*
|
||||
*/
|
||||
function fetch_lines()
|
||||
function fetch_lignes()
|
||||
{
|
||||
$this->lines = array();
|
||||
$this->lignes = array();
|
||||
|
||||
$sql = "SELECT ld.rowid, ld.fk_product, ld.description, ld.subprice, ld.total_ht, ld.qty as qty_shipped,";
|
||||
$sql.= " cd.qty as qty_asked,";
|
||||
@ -669,7 +669,7 @@ class Livraison extends CommonObject
|
||||
$sql.= " WHERE ld.fk_origin_line = cd.rowid";
|
||||
$sql.= " AND ld.fk_livraison = ".$this->id;
|
||||
|
||||
dol_syslog("Livraison::fetch_lines sql=".$sql);
|
||||
dol_syslog("Livraison::fetch_lignes sql=".$sql);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -695,6 +695,7 @@ class Livraison extends CommonObject
|
||||
$line->price = $obj->price;
|
||||
$line->total_ht = $obj->total_ht;
|
||||
|
||||
$this->lignes[$i] = $line; // TODO deprecated
|
||||
$this->lines[$i] = $line;
|
||||
|
||||
$i++;
|
||||
@ -702,7 +703,7 @@ class Livraison extends CommonObject
|
||||
$this->db->free($resql);
|
||||
}
|
||||
|
||||
return $this->lines;
|
||||
return $this->lignes;
|
||||
}
|
||||
|
||||
|
||||
@ -781,17 +782,16 @@ class Livraison extends CommonObject
|
||||
$this->note_public='SPECIMEN';
|
||||
|
||||
$i=0;
|
||||
$line=new LivraisonLigne($this->db);
|
||||
$line->fk_product = $prodids[0];
|
||||
$line->qty_asked = 10;
|
||||
$line->qty_shipped = 9;
|
||||
$line->ref = 'REFPROD';
|
||||
$line->label = 'Specimen';
|
||||
$line->description = 'Description';
|
||||
$line->price = 100;
|
||||
$line->total_ht = 100;
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
$ligne=new LivraisonLigne($this->db);
|
||||
$ligne->fk_product = $prodids[0];
|
||||
$ligne->qty_asked = 10;
|
||||
$ligne->qty_shipped = 9;
|
||||
$ligne->ref = 'REFPROD';
|
||||
$ligne->label = 'Specimen';
|
||||
$ligne->description = 'Description';
|
||||
$ligne->price = 100;
|
||||
$ligne->total_ht = 100;
|
||||
$this->lignes[$i] = $ligne;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -268,12 +268,12 @@ if ($_GET["action"] == 'create')
|
||||
*/
|
||||
print '<br><table class="noborder" width="100%">';
|
||||
|
||||
$lines = $commande->fetch_lines(1);
|
||||
$lignes = $commande->fetch_lines(1);
|
||||
|
||||
// Lecture des livraisons deja effectuees
|
||||
$commande->livraison_array();
|
||||
|
||||
$num = sizeof($commande->lines);
|
||||
$num = sizeof($commande->lignes);
|
||||
$i = 0;
|
||||
|
||||
if ($num)
|
||||
@ -294,34 +294,34 @@ if ($_GET["action"] == 'create')
|
||||
{
|
||||
$product = new Product($db);
|
||||
|
||||
$line = $commande->lines[$i];
|
||||
$ligne = $commande->lignes[$i];
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>\n";
|
||||
if ($line->fk_product > 0)
|
||||
if ($ligne->fk_product > 0)
|
||||
{
|
||||
$product->fetch($line->fk_product);
|
||||
$product->fetch($ligne->fk_product);
|
||||
$product->load_stock();
|
||||
|
||||
print '<td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$line->fk_product.'">'.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.'</a> - '.$product->libelle;
|
||||
if ($line->description) print nl2br($line->description);
|
||||
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$ligne->fk_product.'">'.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.'</a> - '.$product->libelle;
|
||||
if ($ligne->description) print nl2br($ligne->description);
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td>".nl2br($line->description)."</td>\n";
|
||||
print "<td>".nl2br($ligne->description)."</td>\n";
|
||||
}
|
||||
|
||||
print '<td align="center">'.$line->qty.'</td>';
|
||||
print '<td align="center">'.$ligne->qty.'</td>';
|
||||
/*
|
||||
*
|
||||
*/
|
||||
print '<td align="center">';
|
||||
$quantite_livree = $commande->livraisons[$line->id];
|
||||
$quantite_livree = $commande->livraisons[$ligne->id];
|
||||
print $quantite_livree;;
|
||||
print '</td>';
|
||||
|
||||
$quantite_commandee = $line->qty;
|
||||
$quantite_commandee = $ligne->qty;
|
||||
$quantite_a_livrer = $quantite_commandee - $quantite_livree;
|
||||
|
||||
if ($conf->stock->enabled)
|
||||
@ -331,7 +331,7 @@ if ($_GET["action"] == 'create')
|
||||
|
||||
// Quantite a livrer
|
||||
print '<td align="center">';
|
||||
print '<input name="idl'.$i.'" type="hidden" value="'.$line->id.'">';
|
||||
print '<input name="idl'.$i.'" type="hidden" value="'.$ligne->id.'">';
|
||||
print '<input name="qtyl'.$i.'" type="text" size="6" value="'.min($quantite_a_livrer, $stock).'">';
|
||||
print '</td>';
|
||||
|
||||
@ -349,7 +349,7 @@ if ($_GET["action"] == 'create')
|
||||
{
|
||||
// Quantite a livrer
|
||||
print '<td align="center">';
|
||||
print '<input name="idl'.$i.'" type="hidden" value="'.$line->id.'">';
|
||||
print '<input name="idl'.$i.'" type="hidden" value="'.$ligne->id.'">';
|
||||
print '<input name="qtyl'.$i.'" type="text" size="6" value="'.$quantite_a_livrer.'">';
|
||||
print '</td>';
|
||||
}
|
||||
@ -498,7 +498,7 @@ else
|
||||
* Lignes produits
|
||||
*/
|
||||
|
||||
$num_prod = sizeof($delivery->lines);
|
||||
$num_prod = sizeof($delivery->lignes);
|
||||
$i = 0; $total = 0;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
@ -519,40 +519,40 @@ else
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
if ($delivery->lines[$i]->fk_product > 0)
|
||||
if ($delivery->lignes[$i]->fk_product > 0)
|
||||
{
|
||||
$product = new Product($db);
|
||||
$product->fetch($delivery->lines[$i]->fk_product);
|
||||
$product->fetch($delivery->lignes[$i]->fk_product);
|
||||
|
||||
print '<td>';
|
||||
|
||||
// Affiche ligne produit
|
||||
$text = '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$delivery->lines[$i]->fk_product.'">';
|
||||
if ($delivery->lines[$i]->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service');
|
||||
$text = '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$delivery->lignes[$i]->fk_product.'">';
|
||||
if ($delivery->lignes[$i]->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service');
|
||||
else $text.= img_object($langs->trans('ShowProduct'),'product');
|
||||
$text.= ' '.$delivery->lines[$i]->ref.'</a>';
|
||||
$text.= ' - '.$delivery->lines[$i]->label;
|
||||
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($delivery->lines[$i]->description));
|
||||
$text.= ' '.$delivery->lignes[$i]->ref.'</a>';
|
||||
$text.= ' - '.$delivery->lignes[$i]->label;
|
||||
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($delivery->lignes[$i]->description));
|
||||
//print $description;
|
||||
print $html->textwithtooltip($text,$description,3,'','',$i);
|
||||
print_date_range($delivery->lines[$i]->date_start,$delivery->lines[$i]->date_end);
|
||||
print_date_range($delivery->lignes[$i]->date_start,$delivery->lignes[$i]->date_end);
|
||||
if ($conf->global->PRODUIT_DESC_IN_FORM)
|
||||
{
|
||||
print ($delivery->lines[$i]->description && $delivery->lines[$i]->description!=$delivery->lines[$i]->label)?'<br>'.dol_htmlentitiesbr($delivery->lines[$i]->description):'';
|
||||
print ($delivery->lignes[$i]->description && $delivery->lignes[$i]->description!=$delivery->lignes[$i]->label)?'<br>'.dol_htmlentitiesbr($delivery->lignes[$i]->description):'';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td>";
|
||||
if ($delivery->lines[$i]->fk_product_type==1) $text = img_object($langs->trans('Service'),'service');
|
||||
if ($delivery->lignes[$i]->fk_product_type==1) $text = img_object($langs->trans('Service'),'service');
|
||||
else $text = img_object($langs->trans('Product'),'product');
|
||||
print $text.' '.nl2br($delivery->lines[$i]->description);
|
||||
print $text.' '.nl2br($delivery->lignes[$i]->description);
|
||||
print_date_range($objp->date_start,$objp->date_end);
|
||||
print "</td>\n";
|
||||
}
|
||||
|
||||
print '<td align="center">'.$delivery->lines[$i]->qty_asked.'</td>';
|
||||
print '<td align="center">'.$delivery->lines[$i]->qty_shipped.'</td>';
|
||||
print '<td align="center">'.$delivery->lignes[$i]->qty_asked.'</td>';
|
||||
print '<td align="center">'.$delivery->lignes[$i]->qty_shipped.'</td>';
|
||||
|
||||
print "</tr>";
|
||||
|
||||
|
||||
@ -116,16 +116,16 @@ function analyse_sql_and_script(&$var,$get)
|
||||
analyse_sql_and_script($_GET,1);
|
||||
analyse_sql_and_script($_POST,0);
|
||||
|
||||
// This is to make Dolibarr working with Plesk. Does not work with IIS.
|
||||
set_include_path((isset($_SERVER["DOCUMENT_ROOT"])?$_SERVER["DOCUMENT_ROOT"]:'.').'/htdocs');
|
||||
// This is to make Dolibarr working with Plesk
|
||||
set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
|
||||
|
||||
// Add real path in session name
|
||||
$realpath='';
|
||||
if ( preg_match('/^([^.]+)\/htdocs\//i', realpath($_SERVER["SCRIPT_FILENAME"]), $regs)) $realpath = isset($regs[1])?$regs[1]:'';
|
||||
|
||||
// Init session. Name of session is specific to Dolibarr instance.
|
||||
$sessionname='DOLSESSID_'.md5($_SERVER["SERVER_NAME"].(isset($_SERVER["DOCUMENT_ROOT"])?$_SERVER["DOCUMENT_ROOT"]:'').$realpath);
|
||||
$sessiontimeout='DOLSESSTIMEOUT_'.md5($_SERVER["SERVER_NAME"].(isset($_SERVER["DOCUMENT_ROOT"])?$_SERVER["DOCUMENT_ROOT"]:'').$realpath);
|
||||
$sessionname='DOLSESSID_'.md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].$realpath);
|
||||
$sessiontimeout='DOLSESSTIMEOUT_'.md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].$realpath);
|
||||
if (! empty($_COOKIE[$sessiontimeout])) ini_set('session.gc_maxlifetime',$_COOKIE[$sessiontimeout]);
|
||||
session_name($sessionname);
|
||||
session_start();
|
||||
|
||||
@ -101,10 +101,9 @@ if (empty($dolibarr_main_data_root))
|
||||
}
|
||||
|
||||
// Define some constants
|
||||
define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root); // Filesystem core php (htdocs)
|
||||
define('DOL_DATA_ROOT', $dolibarr_main_data_root); // Filesystem data (documents)
|
||||
define('DOL_CLASS_PATH', 'class/'); // Filesystem path to class dir
|
||||
define('DOL_CUSTOM_PATH', $dolibarr_main_document_root.'/custom'); // Filesystem path to custom dir
|
||||
define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root); // Filesystem pages php (htdocs)
|
||||
define('DOL_DATA_ROOT', $dolibarr_main_data_root); // Filesystem donnes (documents)
|
||||
define('DOL_CLASS_PATH', 'class/'); // Filsystem path to class dir
|
||||
// If dolibarr_main_url_root = auto (Hidden feature for developers only), we try to forge it.
|
||||
if ($dolibarr_main_url_root == 'auto' && ! empty($_SERVER["SCRIPT_URL"]) && ! empty($_SERVER["SCRIPT_URI"]))
|
||||
{
|
||||
@ -188,7 +187,7 @@ $conf->file->character_set_client=strtoupper($force_charset_do_notuse);
|
||||
$conf->file->cookie_cryptkey = empty($dolibarr_main_cookie_cryptkey)?'':$dolibarr_main_cookie_cryptkey;
|
||||
|
||||
// Define array of document root directories
|
||||
$conf->file->dol_document_root=array(DOL_DOCUMENT_ROOT, DOL_CUSTOM_PATH);
|
||||
$conf->file->dol_document_root=array(DOL_DOCUMENT_ROOT);
|
||||
if (! empty($dolibarr_main_document_root_alt))
|
||||
{
|
||||
// dolibarr_main_document_root_alt contains several directories
|
||||
|
||||
@ -242,58 +242,58 @@ function html_print_paybox_footer($fromcompany,$langs)
|
||||
global $conf;
|
||||
|
||||
// Juridical status
|
||||
$line1="";
|
||||
$ligne1="";
|
||||
if ($fromcompany->forme_juridique_code)
|
||||
{
|
||||
$line1.=($line1?" - ":"").$langs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code));
|
||||
$ligne1.=($ligne1?" - ":"").$langs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code));
|
||||
}
|
||||
// Capital
|
||||
if ($fromcompany->capital)
|
||||
{
|
||||
$line1.=($line1?" - ":"").$langs->transnoentities("CapitalOf",$fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->monnaie);
|
||||
$ligne1.=($ligne1?" - ":"").$langs->transnoentities("CapitalOf",$fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->monnaie);
|
||||
}
|
||||
// Prof Id 1
|
||||
if ($fromcompany->idprof1 && ($fromcompany->pays_code != 'FR' || ! $fromcompany->idprof2))
|
||||
{
|
||||
$field=$langs->transcountrynoentities("ProfId1",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line1.=($line1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof1);
|
||||
$ligne1.=($ligne1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof1);
|
||||
}
|
||||
// Prof Id 2
|
||||
if ($fromcompany->idprof2)
|
||||
{
|
||||
$field=$langs->transcountrynoentities("ProfId2",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line1.=($line1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof2);
|
||||
$ligne1.=($ligne1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof2);
|
||||
}
|
||||
|
||||
// Second line of company infos
|
||||
$line2="";
|
||||
$ligne2="";
|
||||
// Prof Id 3
|
||||
if ($fromcompany->idprof3)
|
||||
{
|
||||
$field=$langs->transcountrynoentities("ProfId3",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line2.=($line2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof3);
|
||||
$ligne2.=($ligne2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof3);
|
||||
}
|
||||
// Prof Id 4
|
||||
if ($fromcompany->idprof4)
|
||||
{
|
||||
$field=$langs->transcountrynoentities("ProfId4",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line2.=($line2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof4);
|
||||
$ligne2.=($ligne2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof4);
|
||||
}
|
||||
// IntraCommunautary VAT
|
||||
if ($fromcompany->tva_intra != '')
|
||||
{
|
||||
$line2.=($line2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$langs->convToOutputCharset($fromcompany->tva_intra);
|
||||
$ligne2.=($ligne2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$langs->convToOutputCharset($fromcompany->tva_intra);
|
||||
}
|
||||
|
||||
print '<br><br><hr>'."\n";
|
||||
print '<center><font style="font-size: 10px;">'."\n";
|
||||
print $fromcompany->nom.'<br>';
|
||||
print $line1.'<br>';
|
||||
print $line2;
|
||||
print $ligne1.'<br>';
|
||||
print $ligne2;
|
||||
print '</font></center>'."\n";
|
||||
}
|
||||
|
||||
|
||||
@ -72,58 +72,58 @@ function html_print_paypal_footer($fromcompany,$langs)
|
||||
global $conf;
|
||||
|
||||
// Juridical status
|
||||
$line1="";
|
||||
$ligne1="";
|
||||
if ($fromcompany->forme_juridique_code)
|
||||
{
|
||||
$line1.=($line1?" - ":"").$langs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code));
|
||||
$ligne1.=($ligne1?" - ":"").$langs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code));
|
||||
}
|
||||
// Capital
|
||||
if ($fromcompany->capital)
|
||||
{
|
||||
$line1.=($line1?" - ":"").$langs->transnoentities("CapitalOf",$fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->monnaie);
|
||||
$ligne1.=($ligne1?" - ":"").$langs->transnoentities("CapitalOf",$fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->monnaie);
|
||||
}
|
||||
// Prof Id 1
|
||||
if ($fromcompany->idprof1 && ($fromcompany->pays_code != 'FR' || ! $fromcompany->idprof2))
|
||||
{
|
||||
$field=$langs->transcountrynoentities("ProfId1",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line1.=($line1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof1);
|
||||
$ligne1.=($ligne1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof1);
|
||||
}
|
||||
// Prof Id 2
|
||||
if ($fromcompany->idprof2)
|
||||
{
|
||||
$field=$langs->transcountrynoentities("ProfId2",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line1.=($line1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof2);
|
||||
$ligne1.=($ligne1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof2);
|
||||
}
|
||||
|
||||
// Second line of company infos
|
||||
$line2="";
|
||||
$ligne2="";
|
||||
// Prof Id 3
|
||||
if ($fromcompany->idprof3)
|
||||
{
|
||||
$field=$langs->transcountrynoentities("ProfId3",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line2.=($line2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof3);
|
||||
$ligne2.=($ligne2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof3);
|
||||
}
|
||||
// Prof Id 4
|
||||
if ($fromcompany->idprof4)
|
||||
{
|
||||
$field=$langs->transcountrynoentities("ProfId4",$fromcompany->pays_code);
|
||||
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
|
||||
$line2.=($line2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof4);
|
||||
$ligne2.=($ligne2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof4);
|
||||
}
|
||||
// IntraCommunautary VAT
|
||||
if ($fromcompany->tva_intra != '')
|
||||
{
|
||||
$line2.=($line2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$langs->convToOutputCharset($fromcompany->tva_intra);
|
||||
$ligne2.=($ligne2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$langs->convToOutputCharset($fromcompany->tva_intra);
|
||||
}
|
||||
|
||||
print '<br><br><hr>'."\n";
|
||||
print '<center><font style="font-size: 10px;">'."\n";
|
||||
print $fromcompany->nom.'<br>';
|
||||
print $line1.'<br>';
|
||||
print $line2;
|
||||
print $ligne1.'<br>';
|
||||
print $ligne2;
|
||||
print '</font></center>'."\n";
|
||||
}
|
||||
|
||||
|
||||
@ -344,8 +344,8 @@ function llxHeaderVierge($title, $head = "")
|
||||
print "<title>".$title."</title>\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/eldy/style.css.php?lang='.$langs->defaultlang.'">'."\n";
|
||||
print '<!-- Includes for JQuery -->'."\n";
|
||||
print '<script type="text/javascript" src="/includes/jquery/js/jquery-latest.min.js"></script>'."\n";
|
||||
print '<script type="text/javascript" src="/includes/jquery/js/jquery-ui-latest.custom.min.js"></script>'."\n";
|
||||
print '<script type="text/javascript" src="/includes/jquery/js/jquery-1.4.3.min.js"></script>'."\n";
|
||||
print '<script type="text/javascript" src="/includes/jquery/js/jquery-ui-1.8.5.custom.min.js"></script>'."\n";
|
||||
print '<script type="text/javascript" src="/includes/jquery/js/jquery.tablednd_0_5.js"></script>'."\n";
|
||||
if ($head) print $head."\n";
|
||||
print '<style type="text/css">';
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
Sorry. You are not allowed to access this resource.
|
||||
|
||||
<br>
|
||||
<?php print isset($_SERVER["HTTP_REFERER"])?'You come from '.$_SERVER["HTTP_REFERER"].'.':''; ?>
|
||||
<?php print isset($_SERVER["HTTP_REFERER"])?'You come from '.$_SERVER["HTTP_REFERER"].'.':''; ?>
|
||||
|
||||
<hr>
|
||||
</body>
|
||||
|
||||
@ -1796,66 +1796,6 @@ class Societe extends CommonObject
|
||||
|
||||
if (dol_strlen($chaine) != 14) return -1;
|
||||
}
|
||||
|
||||
//Verify CIF/NIF/NIE if pays ES
|
||||
//Returns: 1 if NIF ok, 2 if CIF ok, 3 if NIE ok, -1 if NIF bad, -2 if CIF bad, -3 if NIE bad, 0 if unexpected bad
|
||||
if ($idprof == 1 && $soc->pays_code == 'ES')
|
||||
{
|
||||
$string=trim($this->siren);
|
||||
$string=preg_replace('/(\s)/','',$string);
|
||||
$string = strtoupper($string);
|
||||
|
||||
for ($i = 0; $i < 9; $i ++)
|
||||
$num[$i] = substr($string, $i, 1);
|
||||
|
||||
//Check format
|
||||
if (!preg_match('/((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)/', $string))
|
||||
return 0;
|
||||
|
||||
//Check NIF
|
||||
if (preg_match('/(^[0-9]{8}[A-Z]{1}$)/', $string))
|
||||
if ($num[8] == substr('TRWAGMYFPDXBNJZSQVHLCKE', substr($string, 0, 8) % 23, 1))
|
||||
return 1;
|
||||
else
|
||||
return -1;
|
||||
|
||||
//algorithm checking type code CIF
|
||||
$sum = $num[2] + $num[4] + $num[6];
|
||||
for ($i = 1; $i < 8; $i += 2)
|
||||
$sum += substr((2 * $num[$i]),0,1) + substr((2 * $num[$i]),1,1);
|
||||
$n = 10 - substr($sum, strlen($sum) - 1, 1);
|
||||
|
||||
//Chek special NIF
|
||||
if (preg_match('/^[KLM]{1}/', $string))
|
||||
if ($num[8] == chr(64 + $n) || $num[8] == substr('TRWAGMYFPDXBNJZSQVHLCKE', substr($string, 1, 8) % 23, 1))
|
||||
return 1;
|
||||
else
|
||||
return -1;
|
||||
|
||||
//Check CIF
|
||||
if (preg_match('/^[ABCDEFGHJNPQRSUVW]{1}/', $string))
|
||||
if ($num[8] == chr(64 + $n) || $num[8] == substr($n, strlen($n) - 1, 1))
|
||||
return 2;
|
||||
else
|
||||
return -2;
|
||||
|
||||
//Check NIE T
|
||||
if (preg_match('/^[T]{1}/', $string))
|
||||
if ($num[8] == preg_match('/^[T]{1}[A-Z0-9]{8}$/', $string))
|
||||
return 3;
|
||||
else
|
||||
return -3;
|
||||
|
||||
//Check NIE XYZ
|
||||
if (preg_match('/^[XYZ]{1}/', $string))
|
||||
if ($num[8] == substr('TRWAGMYFPDXBNJZSQVHLCKE', substr(str_replace(array('X','Y','Z'), array('0','1','2'), $string), 0, 8) % 23, 1))
|
||||
return 3;
|
||||
else
|
||||
return -3;
|
||||
|
||||
//Can not be verified
|
||||
return -4;
|
||||
}
|
||||
|
||||
return $ok;
|
||||
}
|
||||
@ -1874,7 +1814,7 @@ class Societe extends CommonObject
|
||||
$url='';
|
||||
if ($idprof == 1 && $soc->pays_code == 'FR') $url='http://www.societe.com/cgi-bin/recherche?rncs='.$soc->siren;
|
||||
if ($idprof == 1 && $soc->pays_code == 'GB') $url='http://www.companieshouse.gov.uk/WebCHeck/findinfolink/';
|
||||
if ($idprof == 1 && $soc->pays_code == 'ES') $url='http://www.e-informa.es/servlet/app/portal/ENTP/screen/SProducto/prod/ETIQUETA_EMPRESA/nif/'.$soc->siren;
|
||||
|
||||
if ($url) return '<a target="_blank" href="'.$url.'">['.$langs->trans("Check").']</a>';
|
||||
return '';
|
||||
}
|
||||
@ -2126,14 +2066,6 @@ class Societe extends CommonObject
|
||||
if ($idprof==3) $formlength=5; // 4 chiffres et 1 lettre depuis janvier
|
||||
if ($idprof==4) $formlength=32; // No maximum as we need to include a town name in this id
|
||||
}
|
||||
|
||||
if ($this->pays_code == 'ES')
|
||||
{
|
||||
if ($idprof==1) $formlength=9; //CIF/NIF/NIE 9 digits
|
||||
if ($idprof==2) $formlength=12; //NASS 12 digits without /
|
||||
if ($idprof==3) $formlength=5; //CNAE 5 digits
|
||||
if ($idprof==4) $formlength=32; //depend of college
|
||||
}
|
||||
$selected=$preselected;
|
||||
if (! $selected && $idprof==1) $selected=$this->siren;
|
||||
if (! $selected && $idprof==2) $selected=$this->siret;
|
||||
|
||||
@ -130,7 +130,7 @@ if ($socid > 0)
|
||||
|
||||
|
||||
// Construit liste des fichiers
|
||||
$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
|
||||
$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),3);
|
||||
$totalsize=0;
|
||||
foreach($filearray as $key => $file)
|
||||
{
|
||||
|
||||
@ -1 +1 @@
|
||||
*.db
|
||||
*.db
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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 ) ;
|
||||
|
||||
})() ;
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user