00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00031
00032
00033 if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {
00034
00035
00036 if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
00037 if(isset($_SERVER['SCRIPT_FILENAME'])) {
00038 $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
00039 } elseif(isset($_SERVER['PATH_TRANSLATED'])) {
00040 $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
00041 } else {
00042
00043 $_SERVER['DOCUMENT_ROOT'] = '/var/www';
00044 }
00045 }
00046
00047
00048 $k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config'))));
00049 if (substr($k_path_main, -1) != '/') {
00050 $k_path_main .= '/';
00051 }
00052
00057 define ('K_PATH_MAIN', $k_path_main);
00058
00059
00060 if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
00061 if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
00062 $k_path_url = 'https://';
00063 } else {
00064 $k_path_url = 'http://';
00065 }
00066 $k_path_url .= $_SERVER['HTTP_HOST'];
00067 $k_path_url .= str_replace( '\\', '/', substr($_SERVER['PHP_SELF'], 0, -24));
00068 }
00069
00074 define ('K_PATH_URL', $k_path_url);
00075
00080 define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
00081
00085 define ('K_PATH_CACHE', K_PATH_MAIN.'cache/');
00086
00090 define ('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
00091
00095 define ('K_PATH_IMAGES', K_PATH_MAIN.'images/');
00096
00100 define ('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
00101
00105 define ('PDF_PAGE_FORMAT', 'A4');
00106
00110 define ('PDF_PAGE_ORIENTATION', 'P');
00111
00115 define ('PDF_CREATOR', 'TCPDF');
00116
00120 define ('PDF_AUTHOR', 'TCPDF');
00121
00125 define ('PDF_HEADER_TITLE', 'TCPDF Example');
00126
00130 define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
00131
00135 define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');
00136
00140 define ('PDF_HEADER_LOGO_WIDTH', 30);
00141
00145 define ('PDF_UNIT', 'mm');
00146
00150 define ('PDF_MARGIN_HEADER', 5);
00151
00155 define ('PDF_MARGIN_FOOTER', 10);
00156
00160 define ('PDF_MARGIN_TOP', 27);
00161
00165 define ('PDF_MARGIN_BOTTOM', 25);
00166
00170 define ('PDF_MARGIN_LEFT', 15);
00171
00175 define ('PDF_MARGIN_RIGHT', 15);
00176
00180 define ('PDF_FONT_NAME_MAIN', 'helvetica');
00181
00185 define ('PDF_FONT_SIZE_MAIN', 10);
00186
00190 define ('PDF_FONT_NAME_DATA', 'helvetica');
00191
00195 define ('PDF_FONT_SIZE_DATA', 8);
00196
00200 define ('PDF_FONT_MONOSPACED', 'courier');
00201
00205 define ('PDF_IMAGE_SCALE_RATIO', 1);
00206
00210 define('HEAD_MAGNIFICATION', 1.1);
00211
00215 define('K_CELL_HEIGHT_RATIO', 1.25);
00216
00220 define('K_TITLE_MAGNIFICATION', 1.3);
00221
00225 define('K_SMALL_RATIO', 2/3);
00226 }
00227
00228
00229
00230
00231 ?>