From 5ea463a3088dbfd0aa98e938f0e89254f2c10e51 Mon Sep 17 00:00:00 2001 From: Christian Steinle Date: Tue, 5 Jul 2016 20:38:34 +0000 Subject: [PATCH] Datenstand V1.0 --- ckeditor/.htaccess | 24 + ckeditor/CHANGES.html | 923 +++++ ckeditor/INSTALL.html | 92 + ckeditor/LICENSE.html | 1334 ++++++++ ckeditor/_samples/ajax.html | 87 + ckeditor/_samples/api.html | 152 + ckeditor/_samples/api_dialog.html | 188 + ckeditor/_samples/api_dialog/my_dialog.js | 28 + ckeditor/_samples/asp/advanced.asp | 105 + ckeditor/_samples/asp/events.asp | 136 + ckeditor/_samples/asp/index.html | 103 + ckeditor/_samples/asp/replace.asp | 72 + ckeditor/_samples/asp/replaceall.asp | 77 + ckeditor/_samples/asp/sample_posteddata.asp | 46 + ckeditor/_samples/asp/standalone.asp | 72 + ckeditor/_samples/assets/output_xhtml.css | 204 ++ ckeditor/_samples/autogrow.html | 75 + ckeditor/_samples/divreplace.html | 137 + ckeditor/_samples/enterkey.html | 88 + ckeditor/_samples/fullpage.html | 62 + ckeditor/_samples/index.html | 56 + ckeditor/_samples/jqueryadapter.html | 73 + ckeditor/_samples/output_html.html | 259 ++ ckeditor/_samples/output_xhtml.html | 159 + ckeditor/_samples/php/advanced.php | 93 + ckeditor/_samples/php/events.php | 130 + ckeditor/_samples/php/replace.php | 63 + ckeditor/_samples/php/replaceall.php | 68 + ckeditor/_samples/php/standalone.php | 64 + ckeditor/_samples/replacebyclass.html | 49 + ckeditor/_samples/replacebycode.html | 80 + ckeditor/_samples/sample.css | 81 + ckeditor/_samples/sample.js | 65 + ckeditor/_samples/sample_posteddata.php | 59 + ckeditor/_samples/sharedspaces.html | 131 + ckeditor/_samples/skins.html | 83 + ckeditor/_samples/ui_color.html | 87 + ckeditor/_samples/ui_languages.html | 103 + ckeditor/_source/adapters/jquery.js | 297 ++ ckeditor/_source/core/_bootstrap.js | 91 + ckeditor/_source/core/ajax.js | 143 + ckeditor/_source/core/ckeditor.js | 113 + ckeditor/_source/core/ckeditor_base.js | 193 ++ ckeditor/_source/core/ckeditor_basic.js | 242 ++ ckeditor/_source/core/command.js | 73 + ckeditor/_source/core/commanddefinition.js | 102 + ckeditor/_source/core/config.js | 405 +++ ckeditor/_source/core/dataprocessor.js | 66 + ckeditor/_source/core/dom.js | 21 + ckeditor/_source/core/dom/comment.js | 32 + ckeditor/_source/core/dom/document.js | 224 ++ ckeditor/_source/core/dom/documentfragment.js | 49 + ckeditor/_source/core/dom/domobject.js | 251 ++ ckeditor/_source/core/dom/element.js | 1556 +++++++++ ckeditor/_source/core/dom/elementpath.js | 116 + ckeditor/_source/core/dom/event.js | 142 + ckeditor/_source/core/dom/node.js | 683 ++++ ckeditor/_source/core/dom/nodelist.js | 23 + ckeditor/_source/core/dom/range.js | 1880 ++++++++++ ckeditor/_source/core/dom/rangelist.js | 163 + ckeditor/_source/core/dom/text.js | 123 + ckeditor/_source/core/dom/walker.js | 445 +++ ckeditor/_source/core/dom/window.js | 96 + ckeditor/_source/core/dtd.js | 233 ++ ckeditor/_source/core/editor.js | 759 +++++ ckeditor/_source/core/editor_basic.js | 182 + ckeditor/_source/core/env.js | 229 ++ ckeditor/_source/core/event.js | 336 ++ ckeditor/_source/core/eventInfo.js | 120 + ckeditor/_source/core/focusmanager.js | 137 + ckeditor/_source/core/htmlparser.js | 218 ++ .../_source/core/htmlparser/basicwriter.js | 145 + ckeditor/_source/core/htmlparser/cdata.js | 43 + ckeditor/_source/core/htmlparser/comment.js | 60 + ckeditor/_source/core/htmlparser/element.js | 240 ++ ckeditor/_source/core/htmlparser/filter.js | 288 ++ ckeditor/_source/core/htmlparser/fragment.js | 497 +++ ckeditor/_source/core/htmlparser/text.js | 55 + ckeditor/_source/core/imagecacher.js | 59 + ckeditor/_source/core/lang.js | 152 + ckeditor/_source/core/loader.js | 243 ++ ckeditor/_source/core/plugindefinition.js | 66 + ckeditor/_source/core/plugins.js | 85 + ckeditor/_source/core/resourcemanager.js | 238 ++ ckeditor/_source/core/scriptloader.js | 198 ++ ckeditor/_source/core/skins.js | 204 ++ ckeditor/_source/core/themes.js | 19 + ckeditor/_source/core/tools.js | 747 ++++ ckeditor/_source/core/ui.js | 116 + ckeditor/_source/core/xml.js | 165 + ckeditor/_source/lang/_languages.js | 83 + ckeditor/_source/lang/_translationstatus.txt | 60 + ckeditor/_source/lang/af.js | 758 +++++ ckeditor/_source/lang/ar.js | 758 +++++ ckeditor/_source/lang/bg.js | 758 +++++ ckeditor/_source/lang/bn.js | 758 +++++ ckeditor/_source/lang/bs.js | 758 +++++ ckeditor/_source/lang/ca.js | 758 +++++ ckeditor/_source/lang/cs.js | 758 +++++ ckeditor/_source/lang/cy.js | 758 +++++ ckeditor/_source/lang/da.js | 758 +++++ ckeditor/_source/lang/de.js | 758 +++++ ckeditor/_source/lang/el.js | 758 +++++ ckeditor/_source/lang/en-au.js | 758 +++++ ckeditor/_source/lang/en-ca.js | 758 +++++ ckeditor/_source/lang/en-gb.js | 758 +++++ ckeditor/_source/lang/en.js | 758 +++++ ckeditor/_source/lang/eo.js | 758 +++++ ckeditor/_source/lang/es.js | 758 +++++ ckeditor/_source/lang/et.js | 758 +++++ ckeditor/_source/lang/eu.js | 758 +++++ ckeditor/_source/lang/fa.js | 758 +++++ ckeditor/_source/lang/fi.js | 758 +++++ ckeditor/_source/lang/fo.js | 758 +++++ ckeditor/_source/lang/fr-ca.js | 758 +++++ ckeditor/_source/lang/fr.js | 758 +++++ ckeditor/_source/lang/gl.js | 758 +++++ ckeditor/_source/lang/gu.js | 758 +++++ ckeditor/_source/lang/he.js | 758 +++++ ckeditor/_source/lang/hi.js | 758 +++++ ckeditor/_source/lang/hr.js | 758 +++++ ckeditor/_source/lang/hu.js | 758 +++++ ckeditor/_source/lang/is.js | 758 +++++ ckeditor/_source/lang/it.js | 758 +++++ ckeditor/_source/lang/ja.js | 758 +++++ ckeditor/_source/lang/km.js | 758 +++++ ckeditor/_source/lang/ko.js | 758 +++++ ckeditor/_source/lang/lt.js | 758 +++++ ckeditor/_source/lang/lv.js | 758 +++++ ckeditor/_source/lang/mn.js | 758 +++++ ckeditor/_source/lang/ms.js | 758 +++++ ckeditor/_source/lang/nb.js | 758 +++++ ckeditor/_source/lang/nl.js | 758 +++++ ckeditor/_source/lang/no.js | 758 +++++ ckeditor/_source/lang/pl.js | 758 +++++ ckeditor/_source/lang/pt-br.js | 757 +++++ ckeditor/_source/lang/pt.js | 758 +++++ ckeditor/_source/lang/ro.js | 758 +++++ ckeditor/_source/lang/ru.js | 758 +++++ ckeditor/_source/lang/sk.js | 758 +++++ ckeditor/_source/lang/sl.js | 758 +++++ ckeditor/_source/lang/sr-latn.js | 758 +++++ ckeditor/_source/lang/sr.js | 758 +++++ ckeditor/_source/lang/sv.js | 758 +++++ ckeditor/_source/lang/th.js | 758 +++++ ckeditor/_source/lang/tr.js | 757 +++++ ckeditor/_source/lang/uk.js | 758 +++++ ckeditor/_source/lang/vi.js | 758 +++++ ckeditor/_source/lang/zh-cn.js | 758 +++++ ckeditor/_source/lang/zh.js | 758 +++++ .../plugins/a11yhelp/dialogs/a11yhelp.js | 211 ++ ckeditor/_source/plugins/a11yhelp/lang/en.js | 108 + ckeditor/_source/plugins/a11yhelp/lang/he.js | 216 ++ ckeditor/_source/plugins/a11yhelp/plugin.js | 46 + .../_source/plugins/about/dialogs/about.js | 73 + .../plugins/about/dialogs/logo_ckeditor.png | Bin 0 -> 2759 bytes ckeditor/_source/plugins/about/plugin.js | 23 + ckeditor/_source/plugins/autogrow/plugin.js | 79 + .../_source/plugins/basicstyles/plugin.js | 101 + ckeditor/_source/plugins/bidi/plugin.js | 247 ++ ckeditor/_source/plugins/blockquote/plugin.js | 301 ++ ckeditor/_source/plugins/button/plugin.js | 277 ++ .../plugins/clipboard/dialogs/paste.js | 205 ++ ckeditor/_source/plugins/clipboard/plugin.js | 412 +++ .../_source/plugins/colorbutton/plugin.js | 251 ++ .../colordialog/dialogs/colordialog.js | 340 ++ .../_source/plugins/colordialog/plugin.js | 13 + .../_source/plugins/contextmenu/plugin.js | 276 ++ .../plugins/dialog/dialogDefinition.js | 315 ++ ckeditor/_source/plugins/dialog/plugin.js | 3016 +++++++++++++++++ .../_source/plugins/dialogadvtab/plugin.js | 207 ++ ckeditor/_source/plugins/dialogui/plugin.js | 1522 +++++++++ ckeditor/_source/plugins/div/dialogs/div.js | 535 +++ ckeditor/_source/plugins/div/plugin.js | 121 + .../_source/plugins/domiterator/plugin.js | 350 ++ .../_source/plugins/editingblock/plugin.js | 230 ++ .../_source/plugins/elementspath/plugin.js | 206 ++ ckeditor/_source/plugins/enterkey/plugin.js | 363 ++ ckeditor/_source/plugins/entities/plugin.js | 227 ++ .../_source/plugins/fakeobjects/plugin.js | 122 + .../_source/plugins/filebrowser/plugin.js | 491 +++ ckeditor/_source/plugins/find/dialogs/find.js | 885 +++++ ckeditor/_source/plugins/find/plugin.js | 46 + .../_source/plugins/flash/dialogs/flash.js | 698 ++++ .../plugins/flash/images/placeholder.png | Bin 0 -> 256 bytes ckeditor/_source/plugins/flash/plugin.js | 174 + ckeditor/_source/plugins/floatpanel/plugin.js | 398 +++ ckeditor/_source/plugins/font/plugin.js | 234 ++ ckeditor/_source/plugins/format/plugin.js | 194 ++ .../_source/plugins/forms/dialogs/button.js | 135 + .../_source/plugins/forms/dialogs/checkbox.js | 155 + .../_source/plugins/forms/dialogs/form.js | 177 + .../plugins/forms/dialogs/hiddenfield.js | 98 + .../_source/plugins/forms/dialogs/radio.js | 135 + .../_source/plugins/forms/dialogs/select.js | 556 +++ .../_source/plugins/forms/dialogs/textarea.js | 114 + .../plugins/forms/dialogs/textfield.js | 199 ++ .../plugins/forms/images/hiddenfield.gif | Bin 0 -> 105 bytes ckeditor/_source/plugins/forms/plugin.js | 281 ++ .../_source/plugins/horizontalrule/plugin.js | 36 + .../plugins/htmldataprocessor/plugin.js | 494 +++ ckeditor/_source/plugins/htmlwriter/plugin.js | 314 ++ .../_source/plugins/iframedialog/plugin.js | 136 + .../_source/plugins/image/dialogs/image.js | 1396 ++++++++ ckeditor/_source/plugins/image/plugin.js | 81 + ckeditor/_source/plugins/indent/plugin.js | 447 +++ ckeditor/_source/plugins/justify/plugin.js | 190 ++ ckeditor/_source/plugins/keystrokes/plugin.js | 229 ++ .../_source/plugins/link/dialogs/anchor.js | 99 + ckeditor/_source/plugins/link/dialogs/link.js | 1420 ++++++++ .../_source/plugins/link/images/anchor.gif | Bin 0 -> 184 bytes ckeditor/_source/plugins/link/plugin.js | 238 ++ ckeditor/_source/plugins/list/plugin.js | 683 ++++ ckeditor/_source/plugins/listblock/plugin.js | 257 ++ .../plugins/liststyle/dialogs/liststyle.js | 203 ++ ckeditor/_source/plugins/liststyle/plugin.js | 66 + ckeditor/_source/plugins/maximize/plugin.js | 343 ++ ckeditor/_source/plugins/menu/plugin.js | 409 +++ ckeditor/_source/plugins/menubutton/plugin.js | 94 + ckeditor/_source/plugins/newpage/plugin.js | 54 + .../plugins/pagebreak/images/pagebreak.gif | Bin 0 -> 54 bytes ckeditor/_source/plugins/pagebreak/plugin.js | 121 + ckeditor/_source/plugins/panel/plugin.js | 398 +++ .../_source/plugins/panelbutton/plugin.js | 147 + .../plugins/pastefromword/filter/default.js | 1170 +++++++ .../_source/plugins/pastefromword/plugin.js | 122 + .../plugins/pastetext/dialogs/pastetext.js | 70 + ckeditor/_source/plugins/pastetext/plugin.js | 145 + ckeditor/_source/plugins/popup/plugin.js | 64 + ckeditor/_source/plugins/preview/plugin.js | 108 + ckeditor/_source/plugins/print/plugin.js | 41 + .../_source/plugins/removeformat/plugin.js | 184 + ckeditor/_source/plugins/resize/plugin.js | 157 + ckeditor/_source/plugins/richcombo/plugin.js | 370 ++ ckeditor/_source/plugins/save/plugin.js | 55 + .../_source/plugins/scayt/dialogs/options.js | 533 +++ .../_source/plugins/scayt/dialogs/toolbar.css | 71 + ckeditor/_source/plugins/scayt/plugin.js | 943 ++++++ ckeditor/_source/plugins/selection/plugin.js | 1367 ++++++++ .../showblocks/images/block_address.png | Bin 0 -> 171 bytes .../showblocks/images/block_blockquote.png | Bin 0 -> 181 bytes .../plugins/showblocks/images/block_div.png | Bin 0 -> 136 bytes .../plugins/showblocks/images/block_h1.png | Bin 0 -> 127 bytes .../plugins/showblocks/images/block_h2.png | Bin 0 -> 134 bytes .../plugins/showblocks/images/block_h3.png | Bin 0 -> 131 bytes .../plugins/showblocks/images/block_h4.png | Bin 0 -> 133 bytes .../plugins/showblocks/images/block_h5.png | Bin 0 -> 133 bytes .../plugins/showblocks/images/block_h6.png | Bin 0 -> 129 bytes .../plugins/showblocks/images/block_p.png | Bin 0 -> 119 bytes .../plugins/showblocks/images/block_pre.png | Bin 0 -> 136 bytes ckeditor/_source/plugins/showblocks/plugin.js | 156 + .../_source/plugins/showborders/plugin.js | 201 ++ .../_source/plugins/smiley/dialogs/smiley.js | 216 ++ .../plugins/smiley/images/angel_smile.gif | Bin 0 -> 465 bytes .../plugins/smiley/images/angry_smile.gif | Bin 0 -> 443 bytes .../plugins/smiley/images/broken_heart.gif | Bin 0 -> 192 bytes .../plugins/smiley/images/confused_smile.gif | Bin 0 -> 464 bytes .../plugins/smiley/images/cry_smile.gif | Bin 0 -> 468 bytes .../plugins/smiley/images/devil_smile.gif | Bin 0 -> 436 bytes .../smiley/images/embaressed_smile.gif | Bin 0 -> 442 bytes .../plugins/smiley/images/envelope.gif | Bin 0 -> 426 bytes .../_source/plugins/smiley/images/heart.gif | Bin 0 -> 183 bytes .../_source/plugins/smiley/images/kiss.gif | Bin 0 -> 241 bytes .../plugins/smiley/images/lightbulb.gif | Bin 0 -> 368 bytes .../plugins/smiley/images/omg_smile.gif | Bin 0 -> 451 bytes .../plugins/smiley/images/regular_smile.gif | Bin 0 -> 450 bytes .../plugins/smiley/images/sad_smile.gif | Bin 0 -> 460 bytes .../plugins/smiley/images/shades_smile.gif | Bin 0 -> 449 bytes .../plugins/smiley/images/teeth_smile.gif | Bin 0 -> 442 bytes .../plugins/smiley/images/thumbs_down.gif | Bin 0 -> 408 bytes .../plugins/smiley/images/thumbs_up.gif | Bin 0 -> 396 bytes .../plugins/smiley/images/tounge_smile.gif | Bin 0 -> 446 bytes .../images/whatchutalkingabout_smile.gif | Bin 0 -> 452 bytes .../plugins/smiley/images/wink_smile.gif | Bin 0 -> 458 bytes ckeditor/_source/plugins/smiley/plugin.js | 94 + ckeditor/_source/plugins/sourcearea/plugin.js | 207 ++ .../specialchar/dialogs/specialchar.js | 409 +++ .../_source/plugins/specialchar/plugin.js | 29 + ckeditor/_source/plugins/styles/plugin.js | 1445 ++++++++ .../_source/plugins/styles/styles/default.js | 88 + .../_source/plugins/stylescombo/plugin.js | 207 ++ ckeditor/_source/plugins/tab/plugin.js | 367 ++ .../_source/plugins/table/dialogs/table.js | 673 ++++ ckeditor/_source/plugins/table/plugin.js | 78 + .../_source/plugins/tableresize/plugin.js | 450 +++ .../plugins/tabletools/dialogs/tableCell.js | 533 +++ ckeditor/_source/plugins/tabletools/plugin.js | 1120 ++++++ .../plugins/templates/dialogs/templates.js | 231 ++ ckeditor/_source/plugins/templates/plugin.js | 100 + .../plugins/templates/templates/default.js | 94 + .../templates/templates/images/template1.gif | Bin 0 -> 375 bytes .../templates/templates/images/template2.gif | Bin 0 -> 333 bytes .../templates/templates/images/template3.gif | Bin 0 -> 422 bytes ckeditor/_source/plugins/toolbar/plugin.js | 481 +++ .../plugins/uicolor/dialogs/uicolor.js | 205 ++ ckeditor/_source/plugins/uicolor/lang/en.js | 15 + ckeditor/_source/plugins/uicolor/plugin.js | 37 + ckeditor/_source/plugins/uicolor/uicolor.gif | Bin 0 -> 1108 bytes .../plugins/uicolor/yui/assets/hue_bg.png | Bin 0 -> 1120 bytes .../plugins/uicolor/yui/assets/hue_thumb.png | Bin 0 -> 195 bytes .../uicolor/yui/assets/picker_mask.png | Bin 0 -> 12174 bytes .../uicolor/yui/assets/picker_thumb.png | Bin 0 -> 192 bytes .../plugins/uicolor/yui/assets/yui.css | 15 + ckeditor/_source/plugins/uicolor/yui/yui.js | 71 + ckeditor/_source/plugins/undo/plugin.js | 555 +++ .../_source/plugins/wsc/dialogs/ciframe.html | 49 + .../plugins/wsc/dialogs/tmpFrameset.html | 52 + ckeditor/_source/plugins/wsc/dialogs/wsc.css | 82 + ckeditor/_source/plugins/wsc/dialogs/wsc.js | 176 + ckeditor/_source/plugins/wsc/plugin.js | 33 + .../_source/plugins/wysiwygarea/plugin.js | 1126 ++++++ ckeditor/_source/skins/kama/dialog.css | 856 +++++ ckeditor/_source/skins/kama/editor.css | 25 + ckeditor/_source/skins/kama/elementspath.css | 73 + ckeditor/_source/skins/kama/icons.css | 357 ++ ckeditor/_source/skins/kama/icons.png | Bin 0 -> 4918 bytes ckeditor/_source/skins/kama/icons_rtl.png | Bin 0 -> 4935 bytes .../skins/kama/images/dialog_sides.gif | Bin 0 -> 48 bytes .../skins/kama/images/dialog_sides.png | Bin 0 -> 178 bytes .../skins/kama/images/dialog_sides_rtl.png | Bin 0 -> 181 bytes ckeditor/_source/skins/kama/images/mini.gif | Bin 0 -> 183 bytes .../_source/skins/kama/images/noimage.png | Bin 0 -> 2115 bytes .../_source/skins/kama/images/sprites.png | Bin 0 -> 7086 bytes .../_source/skins/kama/images/sprites_ie6.png | Bin 0 -> 2724 bytes .../skins/kama/images/toolbar_start.gif | Bin 0 -> 105 bytes ckeditor/_source/skins/kama/mainui.css | 195 ++ ckeditor/_source/skins/kama/menu.css | 202 ++ ckeditor/_source/skins/kama/panel.css | 217 ++ ckeditor/_source/skins/kama/presets.css | 49 + ckeditor/_source/skins/kama/reset.css | 84 + ckeditor/_source/skins/kama/richcombo.css | 277 ++ ckeditor/_source/skins/kama/skin.js | 268 ++ ckeditor/_source/skins/kama/templates.css | 88 + ckeditor/_source/skins/kama/toolbar.css | 409 +++ ckeditor/_source/skins/office2003/dialog.css | 765 +++++ ckeditor/_source/skins/office2003/editor.css | 25 + .../_source/skins/office2003/elementspath.css | 74 + ckeditor/_source/skins/office2003/icons.css | 354 ++ ckeditor/_source/skins/office2003/icons.png | Bin 0 -> 4918 bytes .../_source/skins/office2003/icons_rtl.png | Bin 0 -> 4935 bytes .../skins/office2003/images/dialog_sides.gif | Bin 0 -> 48 bytes .../skins/office2003/images/dialog_sides.png | Bin 0 -> 178 bytes .../office2003/images/dialog_sides_rtl.png | Bin 0 -> 181 bytes .../_source/skins/office2003/images/mini.gif | Bin 0 -> 183 bytes .../skins/office2003/images/noimage.png | Bin 0 -> 2115 bytes .../skins/office2003/images/sprites.png | Bin 0 -> 6119 bytes .../skins/office2003/images/sprites_ie6.png | Bin 0 -> 2715 bytes ckeditor/_source/skins/office2003/mainui.css | 145 + ckeditor/_source/skins/office2003/menu.css | 199 ++ ckeditor/_source/skins/office2003/panel.css | 212 ++ ckeditor/_source/skins/office2003/presets.css | 49 + ckeditor/_source/skins/office2003/reset.css | 84 + .../_source/skins/office2003/richcombo.css | 297 ++ ckeditor/_source/skins/office2003/skin.js | 81 + .../_source/skins/office2003/templates.css | 87 + ckeditor/_source/skins/office2003/toolbar.css | 470 +++ ckeditor/_source/skins/v2/dialog.css | 780 +++++ ckeditor/_source/skins/v2/editor.css | 25 + ckeditor/_source/skins/v2/elementspath.css | 74 + ckeditor/_source/skins/v2/icons.css | 354 ++ ckeditor/_source/skins/v2/icons.png | Bin 0 -> 4918 bytes ckeditor/_source/skins/v2/icons_rtl.png | Bin 0 -> 4935 bytes .../_source/skins/v2/images/dialog_sides.gif | Bin 0 -> 48 bytes .../_source/skins/v2/images/dialog_sides.png | Bin 0 -> 178 bytes .../skins/v2/images/dialog_sides_rtl.png | Bin 0 -> 181 bytes ckeditor/_source/skins/v2/images/mini.gif | Bin 0 -> 183 bytes ckeditor/_source/skins/v2/images/noimage.png | Bin 0 -> 2115 bytes ckeditor/_source/skins/v2/images/sprites.png | Bin 0 -> 5389 bytes .../_source/skins/v2/images/sprites_ie6.png | Bin 0 -> 492 bytes .../_source/skins/v2/images/toolbar_start.gif | Bin 0 -> 105 bytes ckeditor/_source/skins/v2/mainui.css | 154 + ckeditor/_source/skins/v2/menu.css | 201 ++ ckeditor/_source/skins/v2/panel.css | 212 ++ ckeditor/_source/skins/v2/presets.css | 50 + ckeditor/_source/skins/v2/reset.css | 84 + ckeditor/_source/skins/v2/richcombo.css | 297 ++ ckeditor/_source/skins/v2/skin.js | 77 + ckeditor/_source/skins/v2/templates.css | 87 + ckeditor/_source/skins/v2/toolbar.css | 423 +++ ckeditor/_source/themes/default/theme.js | 356 ++ ckeditor/adapters/jquery.js | 6 + ckeditor/ckeditor.asp | 955 ++++++ ckeditor/ckeditor.js | 135 + ckeditor/ckeditor.pack | 211 ++ ckeditor/ckeditor.php | 29 + ckeditor/ckeditor_basic.js | 8 + ckeditor/ckeditor_basic_source.js | 20 + ckeditor/ckeditor_php4.php | 593 ++++ ckeditor/ckeditor_php5.php | 583 ++++ ckeditor/ckeditor_source.js | 25 + ckeditor/config.js | 33 + ckeditor/contents.css | 35 + ckeditor/images/spacer.gif | Bin 0 -> 43 bytes ckeditor/lang/_languages.js | 6 + ckeditor/lang/_translationstatus.txt | 60 + ckeditor/lang/af.js | 6 + ckeditor/lang/ar.js | 6 + ckeditor/lang/bg.js | 6 + ckeditor/lang/bn.js | 6 + ckeditor/lang/bs.js | 6 + ckeditor/lang/ca.js | 6 + ckeditor/lang/cs.js | 6 + ckeditor/lang/cy.js | 6 + ckeditor/lang/da.js | 6 + ckeditor/lang/de.js | 6 + ckeditor/lang/el.js | 6 + ckeditor/lang/en-au.js | 6 + ckeditor/lang/en-ca.js | 6 + ckeditor/lang/en-gb.js | 6 + ckeditor/lang/en.js | 6 + ckeditor/lang/eo.js | 6 + ckeditor/lang/es.js | 6 + ckeditor/lang/et.js | 6 + ckeditor/lang/eu.js | 6 + ckeditor/lang/fa.js | 6 + ckeditor/lang/fi.js | 6 + ckeditor/lang/fo.js | 6 + ckeditor/lang/fr-ca.js | 6 + ckeditor/lang/fr.js | 6 + ckeditor/lang/gl.js | 6 + ckeditor/lang/gu.js | 6 + ckeditor/lang/he.js | 6 + ckeditor/lang/hi.js | 6 + ckeditor/lang/hr.js | 6 + ckeditor/lang/hu.js | 6 + ckeditor/lang/is.js | 6 + ckeditor/lang/it.js | 6 + ckeditor/lang/ja.js | 6 + ckeditor/lang/km.js | 6 + ckeditor/lang/ko.js | 6 + ckeditor/lang/lt.js | 6 + ckeditor/lang/lv.js | 6 + ckeditor/lang/mn.js | 6 + ckeditor/lang/ms.js | 6 + ckeditor/lang/nb.js | 6 + ckeditor/lang/nl.js | 6 + ckeditor/lang/no.js | 6 + ckeditor/lang/pl.js | 6 + ckeditor/lang/pt-br.js | 6 + ckeditor/lang/pt.js | 6 + ckeditor/lang/ro.js | 6 + ckeditor/lang/ru.js | 6 + ckeditor/lang/sk.js | 6 + ckeditor/lang/sl.js | 6 + ckeditor/lang/sr-latn.js | 6 + ckeditor/lang/sr.js | 6 + ckeditor/lang/sv.js | 6 + ckeditor/lang/th.js | 6 + ckeditor/lang/tr.js | 6 + ckeditor/lang/uk.js | 6 + ckeditor/lang/vi.js | 6 + ckeditor/lang/zh-cn.js | 6 + ckeditor/lang/zh.js | 6 + ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js | 7 + ckeditor/plugins/a11yhelp/lang/en.js | 6 + ckeditor/plugins/a11yhelp/lang/he.js | 6 + ckeditor/plugins/about/dialogs/about.js | 6 + .../plugins/about/dialogs/logo_ckeditor.png | Bin 0 -> 2759 bytes ckeditor/plugins/autogrow/plugin.js | 6 + ckeditor/plugins/clipboard/dialogs/paste.js | 7 + .../colordialog/dialogs/colordialog.js | 7 + ckeditor/plugins/dialog/dialogDefinition.js | 4 + ckeditor/plugins/div/dialogs/div.js | 8 + ckeditor/plugins/find/dialogs/find.js | 9 + ckeditor/plugins/flash/dialogs/flash.js | 9 + ckeditor/plugins/flash/images/placeholder.png | Bin 0 -> 256 bytes ckeditor/plugins/forms/dialogs/button.js | 6 + ckeditor/plugins/forms/dialogs/checkbox.js | 6 + ckeditor/plugins/forms/dialogs/form.js | 6 + ckeditor/plugins/forms/dialogs/hiddenfield.js | 6 + ckeditor/plugins/forms/dialogs/radio.js | 6 + ckeditor/plugins/forms/dialogs/select.js | 9 + ckeditor/plugins/forms/dialogs/textarea.js | 6 + ckeditor/plugins/forms/dialogs/textfield.js | 7 + ckeditor/plugins/forms/images/hiddenfield.gif | Bin 0 -> 105 bytes ckeditor/plugins/iframedialog/plugin.js | 6 + ckeditor/plugins/image/dialogs/image.js | 13 + ckeditor/plugins/link/dialogs/anchor.js | 6 + ckeditor/plugins/link/dialogs/link.js | 11 + ckeditor/plugins/link/images/anchor.gif | Bin 0 -> 184 bytes .../plugins/liststyle/dialogs/liststyle.js | 7 + .../plugins/pagebreak/images/pagebreak.gif | Bin 0 -> 54 bytes .../plugins/pastefromword/filter/default.js | 10 + .../plugins/pastetext/dialogs/pastetext.js | 6 + ckeditor/plugins/scayt/dialogs/options.js | 8 + ckeditor/plugins/scayt/dialogs/toolbar.css | 6 + .../showblocks/images/block_address.png | Bin 0 -> 171 bytes .../showblocks/images/block_blockquote.png | Bin 0 -> 181 bytes .../plugins/showblocks/images/block_div.png | Bin 0 -> 136 bytes .../plugins/showblocks/images/block_h1.png | Bin 0 -> 127 bytes .../plugins/showblocks/images/block_h2.png | Bin 0 -> 134 bytes .../plugins/showblocks/images/block_h3.png | Bin 0 -> 131 bytes .../plugins/showblocks/images/block_h4.png | Bin 0 -> 133 bytes .../plugins/showblocks/images/block_h5.png | Bin 0 -> 133 bytes .../plugins/showblocks/images/block_h6.png | Bin 0 -> 129 bytes .../plugins/showblocks/images/block_p.png | Bin 0 -> 119 bytes .../plugins/showblocks/images/block_pre.png | Bin 0 -> 136 bytes ckeditor/plugins/smiley/dialogs/smiley.js | 7 + .../plugins/smiley/images/angel_smile.gif | Bin 0 -> 465 bytes .../plugins/smiley/images/angry_smile.gif | Bin 0 -> 443 bytes .../plugins/smiley/images/broken_heart.gif | Bin 0 -> 192 bytes .../plugins/smiley/images/confused_smile.gif | Bin 0 -> 464 bytes ckeditor/plugins/smiley/images/cry_smile.gif | Bin 0 -> 468 bytes .../plugins/smiley/images/devil_smile.gif | Bin 0 -> 436 bytes .../smiley/images/embaressed_smile.gif | Bin 0 -> 442 bytes ckeditor/plugins/smiley/images/envelope.gif | Bin 0 -> 426 bytes ckeditor/plugins/smiley/images/heart.gif | Bin 0 -> 183 bytes ckeditor/plugins/smiley/images/kiss.gif | Bin 0 -> 241 bytes ckeditor/plugins/smiley/images/lightbulb.gif | Bin 0 -> 368 bytes ckeditor/plugins/smiley/images/omg_smile.gif | Bin 0 -> 451 bytes .../plugins/smiley/images/regular_smile.gif | Bin 0 -> 450 bytes ckeditor/plugins/smiley/images/sad_smile.gif | Bin 0 -> 460 bytes .../plugins/smiley/images/shades_smile.gif | Bin 0 -> 449 bytes .../plugins/smiley/images/teeth_smile.gif | Bin 0 -> 442 bytes .../plugins/smiley/images/thumbs_down.gif | Bin 0 -> 408 bytes ckeditor/plugins/smiley/images/thumbs_up.gif | Bin 0 -> 396 bytes .../plugins/smiley/images/tounge_smile.gif | Bin 0 -> 446 bytes .../images/whatchutalkingabout_smile.gif | Bin 0 -> 452 bytes ckeditor/plugins/smiley/images/wink_smile.gif | Bin 0 -> 458 bytes .../specialchar/dialogs/specialchar.js | 7 + ckeditor/plugins/styles/styles/default.js | 6 + ckeditor/plugins/table/dialogs/table.js | 9 + ckeditor/plugins/tableresize/plugin.js | 7 + .../plugins/tabletools/dialogs/tableCell.js | 8 + .../plugins/templates/dialogs/templates.js | 7 + .../plugins/templates/templates/default.js | 6 + .../templates/templates/images/template1.gif | Bin 0 -> 375 bytes .../templates/templates/images/template2.gif | Bin 0 -> 333 bytes .../templates/templates/images/template3.gif | Bin 0 -> 422 bytes ckeditor/plugins/tokens_angebot/plugin.js | 86 + ckeditor/plugins/tokens_bestaet/plugin.js | 85 + ckeditor/plugins/tokens_gut_mr/plugin.js | 93 + ckeditor/plugins/tokens_gut_or/plugin.js | 84 + ckeditor/plugins/tokens_kontakt/plugin.js | 52 + ckeditor/plugins/tokens_liefer/plugin.js | 84 + ckeditor/plugins/tokens_lv/plugin.js | 83 + ckeditor/plugins/tokens_mahn1/plugin.js | 88 + ckeditor/plugins/tokens_mahn2/plugin.js | 91 + ckeditor/plugins/tokens_rechnung/plugin.js | 95 + ckeditor/plugins/tokens_rechnung_oa/plugin.js | 86 + ckeditor/plugins/tokens_schrift/plugin.js | 75 + ckeditor/plugins/tokens_skonto/plugin.js | 50 + ckeditor/plugins/tokens_stamm/plugin.js | 64 + ckeditor/plugins/uicolor/dialogs/uicolor.js | 7 + ckeditor/plugins/uicolor/lang/en.js | 6 + ckeditor/plugins/uicolor/plugin.js | 6 + ckeditor/plugins/uicolor/uicolor.gif | Bin 0 -> 1108 bytes .../plugins/uicolor/yui/assets/hue_bg.png | Bin 0 -> 1120 bytes .../plugins/uicolor/yui/assets/hue_thumb.png | Bin 0 -> 195 bytes .../uicolor/yui/assets/picker_mask.png | Bin 0 -> 12174 bytes .../uicolor/yui/assets/picker_thumb.png | Bin 0 -> 192 bytes ckeditor/plugins/uicolor/yui/assets/yui.css | 6 + ckeditor/plugins/uicolor/yui/yui.js | 76 + ckeditor/plugins/wsc/dialogs/ciframe.html | 49 + ckeditor/plugins/wsc/dialogs/tmpFrameset.html | 52 + ckeditor/plugins/wsc/dialogs/wsc.css | 6 + ckeditor/plugins/wsc/dialogs/wsc.js | 7 + ckeditor/skins/kama/dialog.css | 9 + ckeditor/skins/kama/editor.css | 12 + ckeditor/skins/kama/icons.png | Bin 0 -> 4918 bytes ckeditor/skins/kama/icons_rtl.png | Bin 0 -> 4935 bytes ckeditor/skins/kama/images/dialog_sides.gif | Bin 0 -> 48 bytes ckeditor/skins/kama/images/dialog_sides.png | Bin 0 -> 178 bytes .../skins/kama/images/dialog_sides_rtl.png | Bin 0 -> 181 bytes ckeditor/skins/kama/images/mini.gif | Bin 0 -> 183 bytes ckeditor/skins/kama/images/noimage.png | Bin 0 -> 2115 bytes ckeditor/skins/kama/images/sprites.png | Bin 0 -> 7086 bytes ckeditor/skins/kama/images/sprites_ie6.png | Bin 0 -> 2724 bytes ckeditor/skins/kama/images/toolbar_start.gif | Bin 0 -> 105 bytes ckeditor/skins/kama/skin.js | 7 + ckeditor/skins/kama/templates.css | 6 + ckeditor/skins/office2003/dialog.css | 9 + ckeditor/skins/office2003/editor.css | 13 + ckeditor/skins/office2003/icons.png | Bin 0 -> 4918 bytes ckeditor/skins/office2003/icons_rtl.png | Bin 0 -> 4935 bytes .../skins/office2003/images/dialog_sides.gif | Bin 0 -> 48 bytes .../skins/office2003/images/dialog_sides.png | Bin 0 -> 178 bytes .../office2003/images/dialog_sides_rtl.png | Bin 0 -> 181 bytes ckeditor/skins/office2003/images/mini.gif | Bin 0 -> 183 bytes ckeditor/skins/office2003/images/noimage.png | Bin 0 -> 2115 bytes ckeditor/skins/office2003/images/sprites.png | Bin 0 -> 6119 bytes .../skins/office2003/images/sprites_ie6.png | Bin 0 -> 2715 bytes ckeditor/skins/office2003/skin.js | 6 + ckeditor/skins/office2003/templates.css | 6 + ckeditor/skins/v2/dialog.css | 8 + ckeditor/skins/v2/editor.css | 12 + ckeditor/skins/v2/icons.png | Bin 0 -> 4918 bytes ckeditor/skins/v2/icons_rtl.png | Bin 0 -> 4935 bytes ckeditor/skins/v2/images/dialog_sides.gif | Bin 0 -> 48 bytes ckeditor/skins/v2/images/dialog_sides.png | Bin 0 -> 178 bytes ckeditor/skins/v2/images/dialog_sides_rtl.png | Bin 0 -> 181 bytes ckeditor/skins/v2/images/mini.gif | Bin 0 -> 183 bytes ckeditor/skins/v2/images/noimage.png | Bin 0 -> 2115 bytes ckeditor/skins/v2/images/sprites.png | Bin 0 -> 5389 bytes ckeditor/skins/v2/images/sprites_ie6.png | Bin 0 -> 492 bytes ckeditor/skins/v2/images/toolbar_start.gif | Bin 0 -> 105 bytes ckeditor/skins/v2/skin.js | 6 + ckeditor/skins/v2/templates.css | 6 + ckeditor/themes/default/theme.js | 8 + config/content_de.php | 24 + css/best_page.css | 150 + css/ie6.css | 24 + css/page.css | 780 +++++ img/1000_logo.gif | Bin 0 -> 2366 bytes img/1001_logo.gif | Bin 0 -> 14161 bytes img/1002_logo.gif | Bin 0 -> 7971 bytes img/1003_logo.gif | Bin 0 -> 6326 bytes img/1004_logo.gif | Bin 0 -> 9906 bytes img/1005_logo.gif | Bin 0 -> 8335 bytes img/1006_logo.gif | Bin 0 -> 22018 bytes img/1007_logo.gif | Bin 0 -> 14161 bytes img/Basket.png | Bin 0 -> 3821 bytes img/Startup-Datenschutz_12-2010.pdf | Bin 0 -> 237284 bytes img/Startup-Vertrag_12-2010.pdf | Bin 0 -> 336885 bytes img/add.png | Bin 0 -> 4350 bytes img/ang.png | Bin 0 -> 6153 bytes img/angebot_orig.png | Bin 0 -> 13572 bytes img/art_exp.png | Bin 0 -> 2798 bytes img/art_imp.png | Bin 0 -> 2781 bytes img/back.png | Bin 0 -> 1595 bytes img/best.png | Bin 0 -> 4598 bytes img/best/Unbenannt-1.psd | Bin 0 -> 88982 bytes img/best/footer_b.png | Bin 0 -> 301 bytes img/best/menuitem.png | Bin 0 -> 1177 bytes img/best/next.png | Bin 0 -> 4867 bytes img/best/prev.png | Bin 0 -> 4258 bytes img/best/start_00.png | Bin 0 -> 8907 bytes img/best/startup_logo.png | Bin 0 -> 12958 bytes img/best_orig.png | Bin 0 -> 13351 bytes img/comp.png | Bin 0 -> 10618 bytes img/cont_exp.png | Bin 0 -> 7571 bytes img/cont_imp.png | Bin 0 -> 7956 bytes img/copy.png | Bin 0 -> 2811 bytes img/del.png | Bin 0 -> 9568 bytes img/drawer.png | Bin 0 -> 19326 bytes img/edit.png | Bin 0 -> 7740 bytes img/email.png | Bin 0 -> 5799 bytes img/g_add.png | Bin 0 -> 5217 bytes img/gut.png | Bin 0 -> 4286 bytes img/gut_orig.png | Bin 0 -> 9249 bytes img/home.gif | Bin 0 -> 1310 bytes img/imp_exp_orig.png | Bin 0 -> 13472 bytes img/ist.png | Bin 0 -> 7284 bytes img/kfz.png | Bin 0 -> 6861 bytes img/kfz_logo.png | Bin 0 -> 13967 bytes img/liefer.png | Bin 0 -> 4846 bytes img/liefer_orig.png | Bin 0 -> 11097 bytes img/logo.png | Bin 0 -> 9468 bytes img/logout.png | Bin 0 -> 6490 bytes img/lv_orig.png | Bin 0 -> 9482 bytes img/mahn.png | Bin 0 -> 5462 bytes img/navi.png | Bin 0 -> 450 bytes img/navi_act.png | Bin 0 -> 523 bytes img/navi_home.png | Bin 0 -> 350 bytes img/navi_home_act.png | Bin 0 -> 403 bytes img/no.jpg | Bin 0 -> 1073 bytes img/off.png | Bin 0 -> 4630 bytes img/ok.png | Bin 0 -> 4457 bytes img/over.png | Bin 0 -> 6714 bytes img/parcelle.png | Bin 0 -> 20384 bytes img/pdf.png | Bin 0 -> 5278 bytes img/pdfist.png | Bin 0 -> 5602 bytes img/pdfsoll.png | Bin 0 -> 5742 bytes img/r_add.png | Bin 0 -> 5570 bytes img/r_add.psd | Bin 0 -> 43681 bytes img/rech.png | Bin 0 -> 4786 bytes img/rechn_orig.png | Bin 0 -> 13507 bytes img/recycled.png | Bin 0 -> 7960 bytes img/rist_logo.gif | Bin 0 -> 4799 bytes img/rist_logo.png | Bin 0 -> 12958 bytes img/run.png | Bin 0 -> 10885 bytes img/save.png | Bin 0 -> 2888 bytes img/search.png | Bin 0 -> 5751 bytes img/security.png | Bin 0 -> 4042 bytes img/small_ang.png | Bin 0 -> 1646 bytes img/small_art.png | Bin 0 -> 1991 bytes img/small_best.png | Bin 0 -> 1358 bytes img/small_comp.png | Bin 0 -> 1848 bytes img/small_cont.png | Bin 0 -> 1929 bytes img/small_del.png | Bin 0 -> 1981 bytes img/small_doku.png | Bin 0 -> 1792 bytes img/small_edit.png | Bin 0 -> 1598 bytes img/small_email.png | Bin 0 -> 1783 bytes img/small_eur.png | Bin 0 -> 2118 bytes img/small_exp.png | Bin 0 -> 1028 bytes img/small_gut.png | Bin 0 -> 1304 bytes img/small_help.png | Bin 0 -> 2152 bytes img/small_ie.png | Bin 0 -> 1530 bytes img/small_imp.png | Bin 0 -> 1290 bytes img/small_info.png | Bin 0 -> 1937 bytes img/small_kfz.png | Bin 0 -> 1609 bytes img/small_liefer.png | Bin 0 -> 1727 bytes img/small_logo.png | Bin 0 -> 2117 bytes img/small_logout.png | Bin 0 -> 1945 bytes img/small_lv.png | Bin 0 -> 1347 bytes img/small_mahn.png | Bin 0 -> 1909 bytes img/small_next.png | Bin 0 -> 1001 bytes img/small_ok.png | Bin 0 -> 1119 bytes img/small_prev.png | Bin 0 -> 1012 bytes img/small_rech.png | Bin 0 -> 1639 bytes img/small_recycled.png | Bin 0 -> 4165 bytes img/small_redo.png | Bin 0 -> 4232 bytes img/small_run.png | Bin 0 -> 4759 bytes img/small_save.png | Bin 0 -> 1081 bytes img/small_schrift.png | Bin 0 -> 1535 bytes img/small_search.png | Bin 0 -> 1485 bytes img/small_stamm.png | Bin 0 -> 1863 bytes img/small_stop.png | Bin 0 -> 1434 bytes img/small_sub.gif | Bin 0 -> 183 bytes img/small_sub.png | Bin 0 -> 952 bytes img/small_sv.png | Bin 0 -> 1647 bytes img/small_users.png | Bin 0 -> 1663 bytes img/small_vt.png | Bin 0 -> 1400 bytes img/soll.png | Bin 0 -> 7675 bytes img/startup_logo.gif | Bin 0 -> 324 bytes img/startup_logo.png | Bin 0 -> 2458 bytes img/stop.png | Bin 0 -> 5121 bytes img/type-string.png | Bin 0 -> 11129 bytes img/upload.png | Bin 0 -> 6707 bytes img/view.png | Bin 0 -> 7636 bytes img/weiter.png | Bin 0 -> 4867 bytes inc/config.php | 8 + inc/fpdf.php | 1732 ++++++++++ inc/funktionen.php | 5 + inc/konstanten.php | 8 + inc/konstanten_domaincs.php | 8 + inc/konstanten_domainrist.php | 8 + inc/konstanten_ristvserver.php | 8 + inc/variablen.php | 35 + inhalte/10er_kfz.php | 150 + inhalte/add.php | 67 + inhalte/aktivierung.php | 21 + inhalte/angebot.php | 30 + inhalte/angebot_add.php | 22 + inhalte/angebot_copy.php | 41 + inhalte/angebot_create.php | 151 + inhalte/angebot_del.php | 52 + inhalte/angebot_edit.php | 69 + inhalte/angebot_over.php | 6 + inhalte/angebot_save.php | 3 + inhalte/arech.php | 8 + inhalte/arech_add.php | 44 + inhalte/arech_over.php | 15 + inhalte/arech_save.php | 66 + inhalte/art_pos_save.php | 43 + inhalte/art_save.php | 15 + inhalte/art_take.php | 75 + inhalte/artikel.php | 15 + inhalte/artikel_add.php | 44 + inhalte/artikel_del.php | 35 + inhalte/artikel_edit.php | 47 + inhalte/artikel_over.php | 5 + inhalte/artikel_save.php | 68 + inhalte/artikel_view.php | 58 + inhalte/best_foot.php | 6 + inhalte/best_head.php | 42 + inhalte/bestaet.php | 30 + inhalte/bestaet_add.php | 22 + inhalte/bestaet_del.php | 65 + inhalte/bestaet_edit.php | 124 + inhalte/bestaet_lcreate.php | 60 + inhalte/bestaet_over.php | 5 + inhalte/bestaet_rcreate.php | 87 + inhalte/bestaet_save.php | 3 + inhalte/datens.php | 19 + inhalte/dropbox_ie.php | 7 + inhalte/dropbox_st.php | 10 + inhalte/dropbox_sv.php | 18 + inhalte/dropbox_vt.php | 10 + inhalte/email.php | 48 + inhalte/eur.php | 12 + inhalte/eur_ai_search.php | 4 + inhalte/eur_as_search.php | 4 + inhalte/eur_asearch.php | 59 + inhalte/eur_aus_ist.php | 231 ++ inhalte/eur_aus_soll.php | 155 + inhalte/eur_e_del.php | 34 + inhalte/eur_e_edit.php | 106 + inhalte/eur_ei_search.php | 4 + inhalte/eur_ein_ist.php | 146 + inhalte/eur_ein_soll.php | 144 + inhalte/eur_es_search.php | 4 + inhalte/eur_esearch.php | 59 + inhalte/eur_gadd.php | 45 + inhalte/eur_gsave.php | 59 + inhalte/eur_over.php | 82 + inhalte/eur_radd.php | 74 + inhalte/footer.php | 11 + inhalte/gut.php | 30 + inhalte/gut_add.php | 22 + inhalte/gut_del.php | 51 + inhalte/gut_edit.php | 96 + inhalte/gut_over.php | 5 + inhalte/gut_save.php | 3 + inhalte/header.php | 21 + inhalte/header2.php | 9 + inhalte/home.php | 111 + inhalte/ie.php | 7 + inhalte/ie_art_exp.php | 24 + inhalte/ie_art_imp.php | 272 ++ inhalte/ie_art_save.php | 111 + inhalte/ie_cont_exp.php | 24 + inhalte/ie_cont_imp.php | 371 ++ inhalte/ie_cont_save.php | 122 + inhalte/ie_export.php | 7 + inhalte/ie_import.php | 10 + inhalte/ie_over.php | 25 + inhalte/ie_rsicher.php | 9 + inhalte/ie_rupload.php | 19 + inhalte/ie_upload.php | 16 + inhalte/iframe.php | 230 ++ inhalte/inhalt.php | 11 + inhalte/kfz.php | 18 + inhalte/kfz_add.php | 413 +++ inhalte/kfz_del.php | 35 + inhalte/kfz_edit.php | 588 ++++ inhalte/kfz_foto.php | 9 + inhalte/kfz_over.php | 5 + inhalte/kfz_save.php | 123 + inhalte/kfz_show.php | 328 ++ inhalte/kontakt.php | 18 + inhalte/kontakt_add.php | 84 + inhalte/kontakt_del.php | 35 + inhalte/kontakt_edit.php | 111 + inhalte/kontakt_over.php | 5 + inhalte/kontakt_save.php | 76 + inhalte/kontakt_show.php | 332 ++ inhalte/left.php | 34 + inhalte/liefer.php | 30 + inhalte/liefer_add.php | 22 + inhalte/liefer_create.php | 71 + inhalte/liefer_del.php | 52 + inhalte/liefer_edit.php | 66 + inhalte/liefer_over.php | 6 + inhalte/liefer_save.php | 3 + inhalte/login.php | 77 + inhalte/logout.php | 36 + inhalte/lv.php | 37 + inhalte/lv_add.php | 22 + inhalte/lv_copy.php | 41 + inhalte/lv_create.php | 170 + inhalte/lv_del.php | 52 + inhalte/lv_edit.php | 66 + inhalte/lv_over.php | 5 + inhalte/lv_save.php | 3 + inhalte/mahn_over.php | 47 + inhalte/mail.php | 55 + inhalte/navi2.php | 124 + inhalte/neue_firma.php | 3 + inhalte/neue_firma_add.php | 15 + inhalte/neue_firma_admin.php | 19 + inhalte/neue_firma_check.php | 95 + inhalte/neue_firma_create.php | 700 ++++ inhalte/neue_firma_firma.php | 56 + inhalte/neue_firma_mail.php | 49 + inhalte/neue_firma_path.php | 38 + inhalte/neue_firma_reminder.php | 127 + inhalte/neue_firma_step1.php | 108 + inhalte/neue_firma_step2.php | 59 + inhalte/neue_firma_step3.php | 69 + inhalte/neue_firma_step4.php | 52 + inhalte/neue_firma_step5.php | 105 + inhalte/neue_firma_step6.php | 0 inhalte/news.php | 10 + inhalte/oposten.php | 12 + inhalte/oposten_del.php | 47 + inhalte/oposten_edit.php | 64 + inhalte/oposten_mahn.php | 99 + inhalte/oposten_mahn2.php | 84 + inhalte/oposten_mahn_save.php | 26 + inhalte/oposten_over.php | 93 + inhalte/oposten_overview.php | 87 + inhalte/oposten_save.php | 73 + inhalte/oposten_teil.php | 48 + inhalte/pdf_show.php | 9 + inhalte/phpinfo.php | 3 + inhalte/pos_change.php | 39 + inhalte/pos_delete.php | 10 + inhalte/pos_save.php | 41 + inhalte/positions.php | 130 + inhalte/rech_az.php | 112 + inhalte/rech_oa.php | 110 + inhalte/rech_sr.php | 170 + inhalte/rech_vk.php | 107 + inhalte/rechnung.php | 30 + inhalte/rechnung_add.php | 22 + inhalte/rechnung_del.php | 51 + inhalte/rechnung_edit.php | 19 + inhalte/rechnung_gcreate.php | 163 + inhalte/rechnung_lcreate.php | 74 + inhalte/rechnung_over.php | 5 + inhalte/rechnung_save.php | 3 + inhalte/save_all.php | 1119 ++++++ inhalte/schrift.php | 28 + inhalte/schrift_add.php | 25 + inhalte/schrift_copy.php | 28 + inhalte/schrift_del.php | 46 + inhalte/schrift_edit.php | 54 + inhalte/schrift_over.php | 5 + inhalte/schrift_save.php | 25 + inhalte/search.php | 98 + inhalte/settings.php | 174 + inhalte/stamm.php | 7 + inhalte/stamm_fd_edit.php | 497 +++ inhalte/stamm_fd_save.php | 93 + inhalte/stamm_logo_edit.php | 50 + inhalte/stamm_over.php | 9 + inhalte/start_prod.php | 12 + inhalte/sv.php | 160 + inhalte/sv_overview.php | 64 + inhalte/sv_save.php | 33 + inhalte/sv_saved.php | 89 + inhalte/texte.php | 7 + inhalte/texte_edit.php | 77 + inhalte/texte_over.php | 21 + inhalte/texte_save.php | 16 + inhalte/tracking.php | 13 + inhalte/tracking_over.php | 13 + inhalte/tracking_overview.php | 172 + inhalte/turnus.php | 21 + inhalte/turnus_add.php | 22 + inhalte/turnus_create.php | 88 + inhalte/turnus_del.php | 47 + inhalte/turnus_edit.php | 129 + inhalte/turnus_over.php | 5 + inhalte/turnus_save.php | 3 + inhalte/user.php | 7 + inhalte/user_add.php | 31 + inhalte/user_del.php | 34 + inhalte/user_edit.php | 42 + inhalte/user_over.php | 24 + inhalte/user_save.php | 48 + inhalte/vertrag.php | 105 + inhalte/vt.php | 78 + inhalte/vt_overview.php | 53 + inhalte/warnings.php | 18 + inhalte/web.php | 3 + pdf/ang_pdf.php | 101 + pdf/ausist_pdf.php | 232 ++ pdf/aussoll_pdf.php | 151 + pdf/berechnung.php | 59 + pdf/best_pdf.php | 117 + pdf/einist_pdf.php | 142 + pdf/einsoll_pdf.php | 140 + pdf/font/calibri.php | 24 + pdf/font/calibrib.php | 24 + pdf/font/courier.php | 7 + pdf/font/helvetica.php | 15 + pdf/font/helveticab.php | 15 + pdf/font/helveticabi.php | 15 + pdf/font/helveticai.php | 15 + pdf/font/makefont/cp1250.map | 251 ++ pdf/font/makefont/cp1251.map | 255 ++ pdf/font/makefont/cp1252.map | 251 ++ pdf/font/makefont/cp1253.map | 239 ++ pdf/font/makefont/cp1254.map | 249 ++ pdf/font/makefont/cp1255.map | 233 ++ pdf/font/makefont/cp1257.map | 244 ++ pdf/font/makefont/cp1258.map | 247 ++ pdf/font/makefont/cp874.map | 225 ++ pdf/font/makefont/iso-8859-1.map | 256 ++ pdf/font/makefont/iso-8859-11.map | 248 ++ pdf/font/makefont/iso-8859-15.map | 256 ++ pdf/font/makefont/iso-8859-16.map | 256 ++ pdf/font/makefont/iso-8859-2.map | 256 ++ pdf/font/makefont/iso-8859-4.map | 256 ++ pdf/font/makefont/iso-8859-5.map | 256 ++ pdf/font/makefont/iso-8859-7.map | 250 ++ pdf/font/makefont/iso-8859-9.map | 256 ++ pdf/font/makefont/koi8-r.map | 256 ++ pdf/font/makefont/koi8-u.map | 256 ++ pdf/font/makefont/makefont.php | 419 +++ pdf/font/new_font.php | 5 + pdf/font/symbol.php | 15 + pdf/font/times.php | 15 + pdf/font/timesb.php | 15 + pdf/font/timesbi.php | 15 + pdf/font/timesi.php | 15 + pdf/font/zapfdingbats.php | 15 + pdf/footer.php | 31 + pdf/footer_best.php | 27 + pdf/gut_pdf.php | 119 + pdf/header.gif | Bin 0 -> 4859 bytes pdf/header.jpg | Bin 0 -> 58015 bytes pdf/header.php | 29 + pdf/header.png | Bin 0 -> 7860 bytes pdf/header0.php | 47 + pdf/header0_best.php | 43 + pdf/header1.php | 51 + pdf/header2.php | 59 + pdf/header3.php | 21 + pdf/header_best.php | 18 + pdf/kfz_header.php | 20 + pdf/kontakt_pdf.php | 125 + pdf/liefer_pdf.php | 101 + pdf/lv_pdf.php | 115 + pdf/mahn1_pdf.php | 92 + pdf/mahn2_pdf.php | 97 + pdf/neue_firma_pdf.php | 99 + pdf/opost_pdf.php | 119 + pdf/position_full.php | 71 + pdf/position_liefer.php | 43 + pdf/position_lv.php | 42 + pdf/position_mahn2.php | 38 + pdf/rech_pdf.php | 168 + pdf/replace_angebot.php | 7 + pdf/replace_bestaet.php | 4 + pdf/replace_bi.php | 87 + pdf/replace_gruss.php | 23 + pdf/replace_gut.php | 6 + pdf/replace_liefer.php | 4 + pdf/replace_lv.php | 5 + pdf/replace_mahn1.php | 8 + pdf/replace_mahn2.php | 11 + pdf/replace_rechnung.php | 9 + pdf/replace_skonto.php | 16 + pdf/replace_token.php | 33 + pdf/schrift_pdf.php | 81 + pdf/track_pdf.php | 235 ++ template/frame_1col.htm | 5 + template/frame_2col_left.htm | 9 + template/frame_2col_right.htm | 1 + template/frame_3col.htm | 13 + template/frame_middle_1col.htm | 1 + template/frame_middle_2col.htm | 1 + template/page.css | 27 + template/template_v1.htm | 41 + 1027 files changed, 141480 insertions(+) create mode 100644 ckeditor/.htaccess create mode 100644 ckeditor/CHANGES.html create mode 100644 ckeditor/INSTALL.html create mode 100644 ckeditor/LICENSE.html create mode 100644 ckeditor/_samples/ajax.html create mode 100644 ckeditor/_samples/api.html create mode 100644 ckeditor/_samples/api_dialog.html create mode 100644 ckeditor/_samples/api_dialog/my_dialog.js create mode 100644 ckeditor/_samples/asp/advanced.asp create mode 100644 ckeditor/_samples/asp/events.asp create mode 100644 ckeditor/_samples/asp/index.html create mode 100644 ckeditor/_samples/asp/replace.asp create mode 100644 ckeditor/_samples/asp/replaceall.asp create mode 100644 ckeditor/_samples/asp/sample_posteddata.asp create mode 100644 ckeditor/_samples/asp/standalone.asp create mode 100644 ckeditor/_samples/assets/output_xhtml.css create mode 100644 ckeditor/_samples/autogrow.html create mode 100644 ckeditor/_samples/divreplace.html create mode 100644 ckeditor/_samples/enterkey.html create mode 100644 ckeditor/_samples/fullpage.html create mode 100644 ckeditor/_samples/index.html create mode 100644 ckeditor/_samples/jqueryadapter.html create mode 100644 ckeditor/_samples/output_html.html create mode 100644 ckeditor/_samples/output_xhtml.html create mode 100644 ckeditor/_samples/php/advanced.php create mode 100644 ckeditor/_samples/php/events.php create mode 100644 ckeditor/_samples/php/replace.php create mode 100644 ckeditor/_samples/php/replaceall.php create mode 100644 ckeditor/_samples/php/standalone.php create mode 100644 ckeditor/_samples/replacebyclass.html create mode 100644 ckeditor/_samples/replacebycode.html create mode 100644 ckeditor/_samples/sample.css create mode 100644 ckeditor/_samples/sample.js create mode 100644 ckeditor/_samples/sample_posteddata.php create mode 100644 ckeditor/_samples/sharedspaces.html create mode 100644 ckeditor/_samples/skins.html create mode 100644 ckeditor/_samples/ui_color.html create mode 100644 ckeditor/_samples/ui_languages.html create mode 100644 ckeditor/_source/adapters/jquery.js create mode 100644 ckeditor/_source/core/_bootstrap.js create mode 100644 ckeditor/_source/core/ajax.js create mode 100644 ckeditor/_source/core/ckeditor.js create mode 100644 ckeditor/_source/core/ckeditor_base.js create mode 100644 ckeditor/_source/core/ckeditor_basic.js create mode 100644 ckeditor/_source/core/command.js create mode 100644 ckeditor/_source/core/commanddefinition.js create mode 100644 ckeditor/_source/core/config.js create mode 100644 ckeditor/_source/core/dataprocessor.js create mode 100644 ckeditor/_source/core/dom.js create mode 100644 ckeditor/_source/core/dom/comment.js create mode 100644 ckeditor/_source/core/dom/document.js create mode 100644 ckeditor/_source/core/dom/documentfragment.js create mode 100644 ckeditor/_source/core/dom/domobject.js create mode 100644 ckeditor/_source/core/dom/element.js create mode 100644 ckeditor/_source/core/dom/elementpath.js create mode 100644 ckeditor/_source/core/dom/event.js create mode 100644 ckeditor/_source/core/dom/node.js create mode 100644 ckeditor/_source/core/dom/nodelist.js create mode 100644 ckeditor/_source/core/dom/range.js create mode 100644 ckeditor/_source/core/dom/rangelist.js create mode 100644 ckeditor/_source/core/dom/text.js create mode 100644 ckeditor/_source/core/dom/walker.js create mode 100644 ckeditor/_source/core/dom/window.js create mode 100644 ckeditor/_source/core/dtd.js create mode 100644 ckeditor/_source/core/editor.js create mode 100644 ckeditor/_source/core/editor_basic.js create mode 100644 ckeditor/_source/core/env.js create mode 100644 ckeditor/_source/core/event.js create mode 100644 ckeditor/_source/core/eventInfo.js create mode 100644 ckeditor/_source/core/focusmanager.js create mode 100644 ckeditor/_source/core/htmlparser.js create mode 100644 ckeditor/_source/core/htmlparser/basicwriter.js create mode 100644 ckeditor/_source/core/htmlparser/cdata.js create mode 100644 ckeditor/_source/core/htmlparser/comment.js create mode 100644 ckeditor/_source/core/htmlparser/element.js create mode 100644 ckeditor/_source/core/htmlparser/filter.js create mode 100644 ckeditor/_source/core/htmlparser/fragment.js create mode 100644 ckeditor/_source/core/htmlparser/text.js create mode 100644 ckeditor/_source/core/imagecacher.js create mode 100644 ckeditor/_source/core/lang.js create mode 100644 ckeditor/_source/core/loader.js create mode 100644 ckeditor/_source/core/plugindefinition.js create mode 100644 ckeditor/_source/core/plugins.js create mode 100644 ckeditor/_source/core/resourcemanager.js create mode 100644 ckeditor/_source/core/scriptloader.js create mode 100644 ckeditor/_source/core/skins.js create mode 100644 ckeditor/_source/core/themes.js create mode 100644 ckeditor/_source/core/tools.js create mode 100644 ckeditor/_source/core/ui.js create mode 100644 ckeditor/_source/core/xml.js create mode 100644 ckeditor/_source/lang/_languages.js create mode 100644 ckeditor/_source/lang/_translationstatus.txt create mode 100644 ckeditor/_source/lang/af.js create mode 100644 ckeditor/_source/lang/ar.js create mode 100644 ckeditor/_source/lang/bg.js create mode 100644 ckeditor/_source/lang/bn.js create mode 100644 ckeditor/_source/lang/bs.js create mode 100644 ckeditor/_source/lang/ca.js create mode 100644 ckeditor/_source/lang/cs.js create mode 100644 ckeditor/_source/lang/cy.js create mode 100644 ckeditor/_source/lang/da.js create mode 100644 ckeditor/_source/lang/de.js create mode 100644 ckeditor/_source/lang/el.js create mode 100644 ckeditor/_source/lang/en-au.js create mode 100644 ckeditor/_source/lang/en-ca.js create mode 100644 ckeditor/_source/lang/en-gb.js create mode 100644 ckeditor/_source/lang/en.js create mode 100644 ckeditor/_source/lang/eo.js create mode 100644 ckeditor/_source/lang/es.js create mode 100644 ckeditor/_source/lang/et.js create mode 100644 ckeditor/_source/lang/eu.js create mode 100644 ckeditor/_source/lang/fa.js create mode 100644 ckeditor/_source/lang/fi.js create mode 100644 ckeditor/_source/lang/fo.js create mode 100644 ckeditor/_source/lang/fr-ca.js create mode 100644 ckeditor/_source/lang/fr.js create mode 100644 ckeditor/_source/lang/gl.js create mode 100644 ckeditor/_source/lang/gu.js create mode 100644 ckeditor/_source/lang/he.js create mode 100644 ckeditor/_source/lang/hi.js create mode 100644 ckeditor/_source/lang/hr.js create mode 100644 ckeditor/_source/lang/hu.js create mode 100644 ckeditor/_source/lang/is.js create mode 100644 ckeditor/_source/lang/it.js create mode 100644 ckeditor/_source/lang/ja.js create mode 100644 ckeditor/_source/lang/km.js create mode 100644 ckeditor/_source/lang/ko.js create mode 100644 ckeditor/_source/lang/lt.js create mode 100644 ckeditor/_source/lang/lv.js create mode 100644 ckeditor/_source/lang/mn.js create mode 100644 ckeditor/_source/lang/ms.js create mode 100644 ckeditor/_source/lang/nb.js create mode 100644 ckeditor/_source/lang/nl.js create mode 100644 ckeditor/_source/lang/no.js create mode 100644 ckeditor/_source/lang/pl.js create mode 100644 ckeditor/_source/lang/pt-br.js create mode 100644 ckeditor/_source/lang/pt.js create mode 100644 ckeditor/_source/lang/ro.js create mode 100644 ckeditor/_source/lang/ru.js create mode 100644 ckeditor/_source/lang/sk.js create mode 100644 ckeditor/_source/lang/sl.js create mode 100644 ckeditor/_source/lang/sr-latn.js create mode 100644 ckeditor/_source/lang/sr.js create mode 100644 ckeditor/_source/lang/sv.js create mode 100644 ckeditor/_source/lang/th.js create mode 100644 ckeditor/_source/lang/tr.js create mode 100644 ckeditor/_source/lang/uk.js create mode 100644 ckeditor/_source/lang/vi.js create mode 100644 ckeditor/_source/lang/zh-cn.js create mode 100644 ckeditor/_source/lang/zh.js create mode 100644 ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js create mode 100644 ckeditor/_source/plugins/a11yhelp/lang/en.js create mode 100644 ckeditor/_source/plugins/a11yhelp/lang/he.js create mode 100644 ckeditor/_source/plugins/a11yhelp/plugin.js create mode 100644 ckeditor/_source/plugins/about/dialogs/about.js create mode 100644 ckeditor/_source/plugins/about/dialogs/logo_ckeditor.png create mode 100644 ckeditor/_source/plugins/about/plugin.js create mode 100644 ckeditor/_source/plugins/autogrow/plugin.js create mode 100644 ckeditor/_source/plugins/basicstyles/plugin.js create mode 100644 ckeditor/_source/plugins/bidi/plugin.js create mode 100644 ckeditor/_source/plugins/blockquote/plugin.js create mode 100644 ckeditor/_source/plugins/button/plugin.js create mode 100644 ckeditor/_source/plugins/clipboard/dialogs/paste.js create mode 100644 ckeditor/_source/plugins/clipboard/plugin.js create mode 100644 ckeditor/_source/plugins/colorbutton/plugin.js create mode 100644 ckeditor/_source/plugins/colordialog/dialogs/colordialog.js create mode 100644 ckeditor/_source/plugins/colordialog/plugin.js create mode 100644 ckeditor/_source/plugins/contextmenu/plugin.js create mode 100644 ckeditor/_source/plugins/dialog/dialogDefinition.js create mode 100644 ckeditor/_source/plugins/dialog/plugin.js create mode 100644 ckeditor/_source/plugins/dialogadvtab/plugin.js create mode 100644 ckeditor/_source/plugins/dialogui/plugin.js create mode 100644 ckeditor/_source/plugins/div/dialogs/div.js create mode 100644 ckeditor/_source/plugins/div/plugin.js create mode 100644 ckeditor/_source/plugins/domiterator/plugin.js create mode 100644 ckeditor/_source/plugins/editingblock/plugin.js create mode 100644 ckeditor/_source/plugins/elementspath/plugin.js create mode 100644 ckeditor/_source/plugins/enterkey/plugin.js create mode 100644 ckeditor/_source/plugins/entities/plugin.js create mode 100644 ckeditor/_source/plugins/fakeobjects/plugin.js create mode 100644 ckeditor/_source/plugins/filebrowser/plugin.js create mode 100644 ckeditor/_source/plugins/find/dialogs/find.js create mode 100644 ckeditor/_source/plugins/find/plugin.js create mode 100644 ckeditor/_source/plugins/flash/dialogs/flash.js create mode 100644 ckeditor/_source/plugins/flash/images/placeholder.png create mode 100644 ckeditor/_source/plugins/flash/plugin.js create mode 100644 ckeditor/_source/plugins/floatpanel/plugin.js create mode 100644 ckeditor/_source/plugins/font/plugin.js create mode 100644 ckeditor/_source/plugins/format/plugin.js create mode 100644 ckeditor/_source/plugins/forms/dialogs/button.js create mode 100644 ckeditor/_source/plugins/forms/dialogs/checkbox.js create mode 100644 ckeditor/_source/plugins/forms/dialogs/form.js create mode 100644 ckeditor/_source/plugins/forms/dialogs/hiddenfield.js create mode 100644 ckeditor/_source/plugins/forms/dialogs/radio.js create mode 100644 ckeditor/_source/plugins/forms/dialogs/select.js create mode 100644 ckeditor/_source/plugins/forms/dialogs/textarea.js create mode 100644 ckeditor/_source/plugins/forms/dialogs/textfield.js create mode 100644 ckeditor/_source/plugins/forms/images/hiddenfield.gif create mode 100644 ckeditor/_source/plugins/forms/plugin.js create mode 100644 ckeditor/_source/plugins/horizontalrule/plugin.js create mode 100644 ckeditor/_source/plugins/htmldataprocessor/plugin.js create mode 100644 ckeditor/_source/plugins/htmlwriter/plugin.js create mode 100644 ckeditor/_source/plugins/iframedialog/plugin.js create mode 100644 ckeditor/_source/plugins/image/dialogs/image.js create mode 100644 ckeditor/_source/plugins/image/plugin.js create mode 100644 ckeditor/_source/plugins/indent/plugin.js create mode 100644 ckeditor/_source/plugins/justify/plugin.js create mode 100644 ckeditor/_source/plugins/keystrokes/plugin.js create mode 100644 ckeditor/_source/plugins/link/dialogs/anchor.js create mode 100644 ckeditor/_source/plugins/link/dialogs/link.js create mode 100644 ckeditor/_source/plugins/link/images/anchor.gif create mode 100644 ckeditor/_source/plugins/link/plugin.js create mode 100644 ckeditor/_source/plugins/list/plugin.js create mode 100644 ckeditor/_source/plugins/listblock/plugin.js create mode 100644 ckeditor/_source/plugins/liststyle/dialogs/liststyle.js create mode 100644 ckeditor/_source/plugins/liststyle/plugin.js create mode 100644 ckeditor/_source/plugins/maximize/plugin.js create mode 100644 ckeditor/_source/plugins/menu/plugin.js create mode 100644 ckeditor/_source/plugins/menubutton/plugin.js create mode 100644 ckeditor/_source/plugins/newpage/plugin.js create mode 100644 ckeditor/_source/plugins/pagebreak/images/pagebreak.gif create mode 100644 ckeditor/_source/plugins/pagebreak/plugin.js create mode 100644 ckeditor/_source/plugins/panel/plugin.js create mode 100644 ckeditor/_source/plugins/panelbutton/plugin.js create mode 100644 ckeditor/_source/plugins/pastefromword/filter/default.js create mode 100644 ckeditor/_source/plugins/pastefromword/plugin.js create mode 100644 ckeditor/_source/plugins/pastetext/dialogs/pastetext.js create mode 100644 ckeditor/_source/plugins/pastetext/plugin.js create mode 100644 ckeditor/_source/plugins/popup/plugin.js create mode 100644 ckeditor/_source/plugins/preview/plugin.js create mode 100644 ckeditor/_source/plugins/print/plugin.js create mode 100644 ckeditor/_source/plugins/removeformat/plugin.js create mode 100644 ckeditor/_source/plugins/resize/plugin.js create mode 100644 ckeditor/_source/plugins/richcombo/plugin.js create mode 100644 ckeditor/_source/plugins/save/plugin.js create mode 100644 ckeditor/_source/plugins/scayt/dialogs/options.js create mode 100644 ckeditor/_source/plugins/scayt/dialogs/toolbar.css create mode 100644 ckeditor/_source/plugins/scayt/plugin.js create mode 100644 ckeditor/_source/plugins/selection/plugin.js create mode 100644 ckeditor/_source/plugins/showblocks/images/block_address.png create mode 100644 ckeditor/_source/plugins/showblocks/images/block_blockquote.png create mode 100644 ckeditor/_source/plugins/showblocks/images/block_div.png create mode 100644 ckeditor/_source/plugins/showblocks/images/block_h1.png create mode 100644 ckeditor/_source/plugins/showblocks/images/block_h2.png create mode 100644 ckeditor/_source/plugins/showblocks/images/block_h3.png create mode 100644 ckeditor/_source/plugins/showblocks/images/block_h4.png create mode 100644 ckeditor/_source/plugins/showblocks/images/block_h5.png create mode 100644 ckeditor/_source/plugins/showblocks/images/block_h6.png create mode 100644 ckeditor/_source/plugins/showblocks/images/block_p.png create mode 100644 ckeditor/_source/plugins/showblocks/images/block_pre.png create mode 100644 ckeditor/_source/plugins/showblocks/plugin.js create mode 100644 ckeditor/_source/plugins/showborders/plugin.js create mode 100644 ckeditor/_source/plugins/smiley/dialogs/smiley.js create mode 100644 ckeditor/_source/plugins/smiley/images/angel_smile.gif create mode 100644 ckeditor/_source/plugins/smiley/images/angry_smile.gif create mode 100644 ckeditor/_source/plugins/smiley/images/broken_heart.gif create mode 100644 ckeditor/_source/plugins/smiley/images/confused_smile.gif create mode 100644 ckeditor/_source/plugins/smiley/images/cry_smile.gif create mode 100644 ckeditor/_source/plugins/smiley/images/devil_smile.gif create mode 100644 ckeditor/_source/plugins/smiley/images/embaressed_smile.gif create mode 100644 ckeditor/_source/plugins/smiley/images/envelope.gif create mode 100644 ckeditor/_source/plugins/smiley/images/heart.gif create mode 100644 ckeditor/_source/plugins/smiley/images/kiss.gif create mode 100644 ckeditor/_source/plugins/smiley/images/lightbulb.gif create mode 100644 ckeditor/_source/plugins/smiley/images/omg_smile.gif create mode 100644 ckeditor/_source/plugins/smiley/images/regular_smile.gif create mode 100644 ckeditor/_source/plugins/smiley/images/sad_smile.gif create mode 100644 ckeditor/_source/plugins/smiley/images/shades_smile.gif create mode 100644 ckeditor/_source/plugins/smiley/images/teeth_smile.gif create mode 100644 ckeditor/_source/plugins/smiley/images/thumbs_down.gif create mode 100644 ckeditor/_source/plugins/smiley/images/thumbs_up.gif create mode 100644 ckeditor/_source/plugins/smiley/images/tounge_smile.gif create mode 100644 ckeditor/_source/plugins/smiley/images/whatchutalkingabout_smile.gif create mode 100644 ckeditor/_source/plugins/smiley/images/wink_smile.gif create mode 100644 ckeditor/_source/plugins/smiley/plugin.js create mode 100644 ckeditor/_source/plugins/sourcearea/plugin.js create mode 100644 ckeditor/_source/plugins/specialchar/dialogs/specialchar.js create mode 100644 ckeditor/_source/plugins/specialchar/plugin.js create mode 100644 ckeditor/_source/plugins/styles/plugin.js create mode 100644 ckeditor/_source/plugins/styles/styles/default.js create mode 100644 ckeditor/_source/plugins/stylescombo/plugin.js create mode 100644 ckeditor/_source/plugins/tab/plugin.js create mode 100644 ckeditor/_source/plugins/table/dialogs/table.js create mode 100644 ckeditor/_source/plugins/table/plugin.js create mode 100644 ckeditor/_source/plugins/tableresize/plugin.js create mode 100644 ckeditor/_source/plugins/tabletools/dialogs/tableCell.js create mode 100644 ckeditor/_source/plugins/tabletools/plugin.js create mode 100644 ckeditor/_source/plugins/templates/dialogs/templates.js create mode 100644 ckeditor/_source/plugins/templates/plugin.js create mode 100644 ckeditor/_source/plugins/templates/templates/default.js create mode 100644 ckeditor/_source/plugins/templates/templates/images/template1.gif create mode 100644 ckeditor/_source/plugins/templates/templates/images/template2.gif create mode 100644 ckeditor/_source/plugins/templates/templates/images/template3.gif create mode 100644 ckeditor/_source/plugins/toolbar/plugin.js create mode 100644 ckeditor/_source/plugins/uicolor/dialogs/uicolor.js create mode 100644 ckeditor/_source/plugins/uicolor/lang/en.js create mode 100644 ckeditor/_source/plugins/uicolor/plugin.js create mode 100644 ckeditor/_source/plugins/uicolor/uicolor.gif create mode 100644 ckeditor/_source/plugins/uicolor/yui/assets/hue_bg.png create mode 100644 ckeditor/_source/plugins/uicolor/yui/assets/hue_thumb.png create mode 100644 ckeditor/_source/plugins/uicolor/yui/assets/picker_mask.png create mode 100644 ckeditor/_source/plugins/uicolor/yui/assets/picker_thumb.png create mode 100644 ckeditor/_source/plugins/uicolor/yui/assets/yui.css create mode 100644 ckeditor/_source/plugins/uicolor/yui/yui.js create mode 100644 ckeditor/_source/plugins/undo/plugin.js create mode 100644 ckeditor/_source/plugins/wsc/dialogs/ciframe.html create mode 100644 ckeditor/_source/plugins/wsc/dialogs/tmpFrameset.html create mode 100644 ckeditor/_source/plugins/wsc/dialogs/wsc.css create mode 100644 ckeditor/_source/plugins/wsc/dialogs/wsc.js create mode 100644 ckeditor/_source/plugins/wsc/plugin.js create mode 100644 ckeditor/_source/plugins/wysiwygarea/plugin.js create mode 100644 ckeditor/_source/skins/kama/dialog.css create mode 100644 ckeditor/_source/skins/kama/editor.css create mode 100644 ckeditor/_source/skins/kama/elementspath.css create mode 100644 ckeditor/_source/skins/kama/icons.css create mode 100644 ckeditor/_source/skins/kama/icons.png create mode 100644 ckeditor/_source/skins/kama/icons_rtl.png create mode 100644 ckeditor/_source/skins/kama/images/dialog_sides.gif create mode 100644 ckeditor/_source/skins/kama/images/dialog_sides.png create mode 100644 ckeditor/_source/skins/kama/images/dialog_sides_rtl.png create mode 100644 ckeditor/_source/skins/kama/images/mini.gif create mode 100644 ckeditor/_source/skins/kama/images/noimage.png create mode 100644 ckeditor/_source/skins/kama/images/sprites.png create mode 100644 ckeditor/_source/skins/kama/images/sprites_ie6.png create mode 100644 ckeditor/_source/skins/kama/images/toolbar_start.gif create mode 100644 ckeditor/_source/skins/kama/mainui.css create mode 100644 ckeditor/_source/skins/kama/menu.css create mode 100644 ckeditor/_source/skins/kama/panel.css create mode 100644 ckeditor/_source/skins/kama/presets.css create mode 100644 ckeditor/_source/skins/kama/reset.css create mode 100644 ckeditor/_source/skins/kama/richcombo.css create mode 100644 ckeditor/_source/skins/kama/skin.js create mode 100644 ckeditor/_source/skins/kama/templates.css create mode 100644 ckeditor/_source/skins/kama/toolbar.css create mode 100644 ckeditor/_source/skins/office2003/dialog.css create mode 100644 ckeditor/_source/skins/office2003/editor.css create mode 100644 ckeditor/_source/skins/office2003/elementspath.css create mode 100644 ckeditor/_source/skins/office2003/icons.css create mode 100644 ckeditor/_source/skins/office2003/icons.png create mode 100644 ckeditor/_source/skins/office2003/icons_rtl.png create mode 100644 ckeditor/_source/skins/office2003/images/dialog_sides.gif create mode 100644 ckeditor/_source/skins/office2003/images/dialog_sides.png create mode 100644 ckeditor/_source/skins/office2003/images/dialog_sides_rtl.png create mode 100644 ckeditor/_source/skins/office2003/images/mini.gif create mode 100644 ckeditor/_source/skins/office2003/images/noimage.png create mode 100644 ckeditor/_source/skins/office2003/images/sprites.png create mode 100644 ckeditor/_source/skins/office2003/images/sprites_ie6.png create mode 100644 ckeditor/_source/skins/office2003/mainui.css create mode 100644 ckeditor/_source/skins/office2003/menu.css create mode 100644 ckeditor/_source/skins/office2003/panel.css create mode 100644 ckeditor/_source/skins/office2003/presets.css create mode 100644 ckeditor/_source/skins/office2003/reset.css create mode 100644 ckeditor/_source/skins/office2003/richcombo.css create mode 100644 ckeditor/_source/skins/office2003/skin.js create mode 100644 ckeditor/_source/skins/office2003/templates.css create mode 100644 ckeditor/_source/skins/office2003/toolbar.css create mode 100644 ckeditor/_source/skins/v2/dialog.css create mode 100644 ckeditor/_source/skins/v2/editor.css create mode 100644 ckeditor/_source/skins/v2/elementspath.css create mode 100644 ckeditor/_source/skins/v2/icons.css create mode 100644 ckeditor/_source/skins/v2/icons.png create mode 100644 ckeditor/_source/skins/v2/icons_rtl.png create mode 100644 ckeditor/_source/skins/v2/images/dialog_sides.gif create mode 100644 ckeditor/_source/skins/v2/images/dialog_sides.png create mode 100644 ckeditor/_source/skins/v2/images/dialog_sides_rtl.png create mode 100644 ckeditor/_source/skins/v2/images/mini.gif create mode 100644 ckeditor/_source/skins/v2/images/noimage.png create mode 100644 ckeditor/_source/skins/v2/images/sprites.png create mode 100644 ckeditor/_source/skins/v2/images/sprites_ie6.png create mode 100644 ckeditor/_source/skins/v2/images/toolbar_start.gif create mode 100644 ckeditor/_source/skins/v2/mainui.css create mode 100644 ckeditor/_source/skins/v2/menu.css create mode 100644 ckeditor/_source/skins/v2/panel.css create mode 100644 ckeditor/_source/skins/v2/presets.css create mode 100644 ckeditor/_source/skins/v2/reset.css create mode 100644 ckeditor/_source/skins/v2/richcombo.css create mode 100644 ckeditor/_source/skins/v2/skin.js create mode 100644 ckeditor/_source/skins/v2/templates.css create mode 100644 ckeditor/_source/skins/v2/toolbar.css create mode 100644 ckeditor/_source/themes/default/theme.js create mode 100644 ckeditor/adapters/jquery.js create mode 100644 ckeditor/ckeditor.asp create mode 100644 ckeditor/ckeditor.js create mode 100644 ckeditor/ckeditor.pack create mode 100644 ckeditor/ckeditor.php create mode 100644 ckeditor/ckeditor_basic.js create mode 100644 ckeditor/ckeditor_basic_source.js create mode 100644 ckeditor/ckeditor_php4.php create mode 100644 ckeditor/ckeditor_php5.php create mode 100644 ckeditor/ckeditor_source.js create mode 100644 ckeditor/config.js create mode 100644 ckeditor/contents.css create mode 100644 ckeditor/images/spacer.gif create mode 100644 ckeditor/lang/_languages.js create mode 100644 ckeditor/lang/_translationstatus.txt create mode 100644 ckeditor/lang/af.js create mode 100644 ckeditor/lang/ar.js create mode 100644 ckeditor/lang/bg.js create mode 100644 ckeditor/lang/bn.js create mode 100644 ckeditor/lang/bs.js create mode 100644 ckeditor/lang/ca.js create mode 100644 ckeditor/lang/cs.js create mode 100644 ckeditor/lang/cy.js create mode 100644 ckeditor/lang/da.js create mode 100644 ckeditor/lang/de.js create mode 100644 ckeditor/lang/el.js create mode 100644 ckeditor/lang/en-au.js create mode 100644 ckeditor/lang/en-ca.js create mode 100644 ckeditor/lang/en-gb.js create mode 100644 ckeditor/lang/en.js create mode 100644 ckeditor/lang/eo.js create mode 100644 ckeditor/lang/es.js create mode 100644 ckeditor/lang/et.js create mode 100644 ckeditor/lang/eu.js create mode 100644 ckeditor/lang/fa.js create mode 100644 ckeditor/lang/fi.js create mode 100644 ckeditor/lang/fo.js create mode 100644 ckeditor/lang/fr-ca.js create mode 100644 ckeditor/lang/fr.js create mode 100644 ckeditor/lang/gl.js create mode 100644 ckeditor/lang/gu.js create mode 100644 ckeditor/lang/he.js create mode 100644 ckeditor/lang/hi.js create mode 100644 ckeditor/lang/hr.js create mode 100644 ckeditor/lang/hu.js create mode 100644 ckeditor/lang/is.js create mode 100644 ckeditor/lang/it.js create mode 100644 ckeditor/lang/ja.js create mode 100644 ckeditor/lang/km.js create mode 100644 ckeditor/lang/ko.js create mode 100644 ckeditor/lang/lt.js create mode 100644 ckeditor/lang/lv.js create mode 100644 ckeditor/lang/mn.js create mode 100644 ckeditor/lang/ms.js create mode 100644 ckeditor/lang/nb.js create mode 100644 ckeditor/lang/nl.js create mode 100644 ckeditor/lang/no.js create mode 100644 ckeditor/lang/pl.js create mode 100644 ckeditor/lang/pt-br.js create mode 100644 ckeditor/lang/pt.js create mode 100644 ckeditor/lang/ro.js create mode 100644 ckeditor/lang/ru.js create mode 100644 ckeditor/lang/sk.js create mode 100644 ckeditor/lang/sl.js create mode 100644 ckeditor/lang/sr-latn.js create mode 100644 ckeditor/lang/sr.js create mode 100644 ckeditor/lang/sv.js create mode 100644 ckeditor/lang/th.js create mode 100644 ckeditor/lang/tr.js create mode 100644 ckeditor/lang/uk.js create mode 100644 ckeditor/lang/vi.js create mode 100644 ckeditor/lang/zh-cn.js create mode 100644 ckeditor/lang/zh.js create mode 100644 ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js create mode 100644 ckeditor/plugins/a11yhelp/lang/en.js create mode 100644 ckeditor/plugins/a11yhelp/lang/he.js create mode 100644 ckeditor/plugins/about/dialogs/about.js create mode 100644 ckeditor/plugins/about/dialogs/logo_ckeditor.png create mode 100644 ckeditor/plugins/autogrow/plugin.js create mode 100644 ckeditor/plugins/clipboard/dialogs/paste.js create mode 100644 ckeditor/plugins/colordialog/dialogs/colordialog.js create mode 100644 ckeditor/plugins/dialog/dialogDefinition.js create mode 100644 ckeditor/plugins/div/dialogs/div.js create mode 100644 ckeditor/plugins/find/dialogs/find.js create mode 100644 ckeditor/plugins/flash/dialogs/flash.js create mode 100644 ckeditor/plugins/flash/images/placeholder.png create mode 100644 ckeditor/plugins/forms/dialogs/button.js create mode 100644 ckeditor/plugins/forms/dialogs/checkbox.js create mode 100644 ckeditor/plugins/forms/dialogs/form.js create mode 100644 ckeditor/plugins/forms/dialogs/hiddenfield.js create mode 100644 ckeditor/plugins/forms/dialogs/radio.js create mode 100644 ckeditor/plugins/forms/dialogs/select.js create mode 100644 ckeditor/plugins/forms/dialogs/textarea.js create mode 100644 ckeditor/plugins/forms/dialogs/textfield.js create mode 100644 ckeditor/plugins/forms/images/hiddenfield.gif create mode 100644 ckeditor/plugins/iframedialog/plugin.js create mode 100644 ckeditor/plugins/image/dialogs/image.js create mode 100644 ckeditor/plugins/link/dialogs/anchor.js create mode 100644 ckeditor/plugins/link/dialogs/link.js create mode 100644 ckeditor/plugins/link/images/anchor.gif create mode 100644 ckeditor/plugins/liststyle/dialogs/liststyle.js create mode 100644 ckeditor/plugins/pagebreak/images/pagebreak.gif create mode 100644 ckeditor/plugins/pastefromword/filter/default.js create mode 100644 ckeditor/plugins/pastetext/dialogs/pastetext.js create mode 100644 ckeditor/plugins/scayt/dialogs/options.js create mode 100644 ckeditor/plugins/scayt/dialogs/toolbar.css create mode 100644 ckeditor/plugins/showblocks/images/block_address.png create mode 100644 ckeditor/plugins/showblocks/images/block_blockquote.png create mode 100644 ckeditor/plugins/showblocks/images/block_div.png create mode 100644 ckeditor/plugins/showblocks/images/block_h1.png create mode 100644 ckeditor/plugins/showblocks/images/block_h2.png create mode 100644 ckeditor/plugins/showblocks/images/block_h3.png create mode 100644 ckeditor/plugins/showblocks/images/block_h4.png create mode 100644 ckeditor/plugins/showblocks/images/block_h5.png create mode 100644 ckeditor/plugins/showblocks/images/block_h6.png create mode 100644 ckeditor/plugins/showblocks/images/block_p.png create mode 100644 ckeditor/plugins/showblocks/images/block_pre.png create mode 100644 ckeditor/plugins/smiley/dialogs/smiley.js create mode 100644 ckeditor/plugins/smiley/images/angel_smile.gif create mode 100644 ckeditor/plugins/smiley/images/angry_smile.gif create mode 100644 ckeditor/plugins/smiley/images/broken_heart.gif create mode 100644 ckeditor/plugins/smiley/images/confused_smile.gif create mode 100644 ckeditor/plugins/smiley/images/cry_smile.gif create mode 100644 ckeditor/plugins/smiley/images/devil_smile.gif create mode 100644 ckeditor/plugins/smiley/images/embaressed_smile.gif create mode 100644 ckeditor/plugins/smiley/images/envelope.gif create mode 100644 ckeditor/plugins/smiley/images/heart.gif create mode 100644 ckeditor/plugins/smiley/images/kiss.gif create mode 100644 ckeditor/plugins/smiley/images/lightbulb.gif create mode 100644 ckeditor/plugins/smiley/images/omg_smile.gif create mode 100644 ckeditor/plugins/smiley/images/regular_smile.gif create mode 100644 ckeditor/plugins/smiley/images/sad_smile.gif create mode 100644 ckeditor/plugins/smiley/images/shades_smile.gif create mode 100644 ckeditor/plugins/smiley/images/teeth_smile.gif create mode 100644 ckeditor/plugins/smiley/images/thumbs_down.gif create mode 100644 ckeditor/plugins/smiley/images/thumbs_up.gif create mode 100644 ckeditor/plugins/smiley/images/tounge_smile.gif create mode 100644 ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif create mode 100644 ckeditor/plugins/smiley/images/wink_smile.gif create mode 100644 ckeditor/plugins/specialchar/dialogs/specialchar.js create mode 100644 ckeditor/plugins/styles/styles/default.js create mode 100644 ckeditor/plugins/table/dialogs/table.js create mode 100644 ckeditor/plugins/tableresize/plugin.js create mode 100644 ckeditor/plugins/tabletools/dialogs/tableCell.js create mode 100644 ckeditor/plugins/templates/dialogs/templates.js create mode 100644 ckeditor/plugins/templates/templates/default.js create mode 100644 ckeditor/plugins/templates/templates/images/template1.gif create mode 100644 ckeditor/plugins/templates/templates/images/template2.gif create mode 100644 ckeditor/plugins/templates/templates/images/template3.gif create mode 100644 ckeditor/plugins/tokens_angebot/plugin.js create mode 100644 ckeditor/plugins/tokens_bestaet/plugin.js create mode 100644 ckeditor/plugins/tokens_gut_mr/plugin.js create mode 100644 ckeditor/plugins/tokens_gut_or/plugin.js create mode 100644 ckeditor/plugins/tokens_kontakt/plugin.js create mode 100644 ckeditor/plugins/tokens_liefer/plugin.js create mode 100644 ckeditor/plugins/tokens_lv/plugin.js create mode 100644 ckeditor/plugins/tokens_mahn1/plugin.js create mode 100644 ckeditor/plugins/tokens_mahn2/plugin.js create mode 100644 ckeditor/plugins/tokens_rechnung/plugin.js create mode 100644 ckeditor/plugins/tokens_rechnung_oa/plugin.js create mode 100644 ckeditor/plugins/tokens_schrift/plugin.js create mode 100644 ckeditor/plugins/tokens_skonto/plugin.js create mode 100644 ckeditor/plugins/tokens_stamm/plugin.js create mode 100644 ckeditor/plugins/uicolor/dialogs/uicolor.js create mode 100644 ckeditor/plugins/uicolor/lang/en.js create mode 100644 ckeditor/plugins/uicolor/plugin.js create mode 100644 ckeditor/plugins/uicolor/uicolor.gif create mode 100644 ckeditor/plugins/uicolor/yui/assets/hue_bg.png create mode 100644 ckeditor/plugins/uicolor/yui/assets/hue_thumb.png create mode 100644 ckeditor/plugins/uicolor/yui/assets/picker_mask.png create mode 100644 ckeditor/plugins/uicolor/yui/assets/picker_thumb.png create mode 100644 ckeditor/plugins/uicolor/yui/assets/yui.css create mode 100644 ckeditor/plugins/uicolor/yui/yui.js create mode 100644 ckeditor/plugins/wsc/dialogs/ciframe.html create mode 100644 ckeditor/plugins/wsc/dialogs/tmpFrameset.html create mode 100644 ckeditor/plugins/wsc/dialogs/wsc.css create mode 100644 ckeditor/plugins/wsc/dialogs/wsc.js create mode 100644 ckeditor/skins/kama/dialog.css create mode 100644 ckeditor/skins/kama/editor.css create mode 100644 ckeditor/skins/kama/icons.png create mode 100644 ckeditor/skins/kama/icons_rtl.png create mode 100644 ckeditor/skins/kama/images/dialog_sides.gif create mode 100644 ckeditor/skins/kama/images/dialog_sides.png create mode 100644 ckeditor/skins/kama/images/dialog_sides_rtl.png create mode 100644 ckeditor/skins/kama/images/mini.gif create mode 100644 ckeditor/skins/kama/images/noimage.png create mode 100644 ckeditor/skins/kama/images/sprites.png create mode 100644 ckeditor/skins/kama/images/sprites_ie6.png create mode 100644 ckeditor/skins/kama/images/toolbar_start.gif create mode 100644 ckeditor/skins/kama/skin.js create mode 100644 ckeditor/skins/kama/templates.css create mode 100644 ckeditor/skins/office2003/dialog.css create mode 100644 ckeditor/skins/office2003/editor.css create mode 100644 ckeditor/skins/office2003/icons.png create mode 100644 ckeditor/skins/office2003/icons_rtl.png create mode 100644 ckeditor/skins/office2003/images/dialog_sides.gif create mode 100644 ckeditor/skins/office2003/images/dialog_sides.png create mode 100644 ckeditor/skins/office2003/images/dialog_sides_rtl.png create mode 100644 ckeditor/skins/office2003/images/mini.gif create mode 100644 ckeditor/skins/office2003/images/noimage.png create mode 100644 ckeditor/skins/office2003/images/sprites.png create mode 100644 ckeditor/skins/office2003/images/sprites_ie6.png create mode 100644 ckeditor/skins/office2003/skin.js create mode 100644 ckeditor/skins/office2003/templates.css create mode 100644 ckeditor/skins/v2/dialog.css create mode 100644 ckeditor/skins/v2/editor.css create mode 100644 ckeditor/skins/v2/icons.png create mode 100644 ckeditor/skins/v2/icons_rtl.png create mode 100644 ckeditor/skins/v2/images/dialog_sides.gif create mode 100644 ckeditor/skins/v2/images/dialog_sides.png create mode 100644 ckeditor/skins/v2/images/dialog_sides_rtl.png create mode 100644 ckeditor/skins/v2/images/mini.gif create mode 100644 ckeditor/skins/v2/images/noimage.png create mode 100644 ckeditor/skins/v2/images/sprites.png create mode 100644 ckeditor/skins/v2/images/sprites_ie6.png create mode 100644 ckeditor/skins/v2/images/toolbar_start.gif create mode 100644 ckeditor/skins/v2/skin.js create mode 100644 ckeditor/skins/v2/templates.css create mode 100644 ckeditor/themes/default/theme.js create mode 100644 config/content_de.php create mode 100644 css/best_page.css create mode 100644 css/ie6.css create mode 100644 css/page.css create mode 100644 img/1000_logo.gif create mode 100644 img/1001_logo.gif create mode 100644 img/1002_logo.gif create mode 100644 img/1003_logo.gif create mode 100644 img/1004_logo.gif create mode 100644 img/1005_logo.gif create mode 100644 img/1006_logo.gif create mode 100644 img/1007_logo.gif create mode 100644 img/Basket.png create mode 100644 img/Startup-Datenschutz_12-2010.pdf create mode 100644 img/Startup-Vertrag_12-2010.pdf create mode 100644 img/add.png create mode 100644 img/ang.png create mode 100644 img/angebot_orig.png create mode 100644 img/art_exp.png create mode 100644 img/art_imp.png create mode 100644 img/back.png create mode 100644 img/best.png create mode 100644 img/best/Unbenannt-1.psd create mode 100644 img/best/footer_b.png create mode 100644 img/best/menuitem.png create mode 100644 img/best/next.png create mode 100644 img/best/prev.png create mode 100644 img/best/start_00.png create mode 100644 img/best/startup_logo.png create mode 100644 img/best_orig.png create mode 100644 img/comp.png create mode 100644 img/cont_exp.png create mode 100644 img/cont_imp.png create mode 100644 img/copy.png create mode 100644 img/del.png create mode 100644 img/drawer.png create mode 100644 img/edit.png create mode 100644 img/email.png create mode 100644 img/g_add.png create mode 100644 img/gut.png create mode 100644 img/gut_orig.png create mode 100644 img/home.gif create mode 100644 img/imp_exp_orig.png create mode 100644 img/ist.png create mode 100644 img/kfz.png create mode 100644 img/kfz_logo.png create mode 100644 img/liefer.png create mode 100644 img/liefer_orig.png create mode 100644 img/logo.png create mode 100644 img/logout.png create mode 100644 img/lv_orig.png create mode 100644 img/mahn.png create mode 100644 img/navi.png create mode 100644 img/navi_act.png create mode 100644 img/navi_home.png create mode 100644 img/navi_home_act.png create mode 100644 img/no.jpg create mode 100644 img/off.png create mode 100644 img/ok.png create mode 100644 img/over.png create mode 100644 img/parcelle.png create mode 100644 img/pdf.png create mode 100644 img/pdfist.png create mode 100644 img/pdfsoll.png create mode 100644 img/r_add.png create mode 100644 img/r_add.psd create mode 100644 img/rech.png create mode 100644 img/rechn_orig.png create mode 100644 img/recycled.png create mode 100644 img/rist_logo.gif create mode 100644 img/rist_logo.png create mode 100644 img/run.png create mode 100644 img/save.png create mode 100644 img/search.png create mode 100644 img/security.png create mode 100644 img/small_ang.png create mode 100644 img/small_art.png create mode 100644 img/small_best.png create mode 100644 img/small_comp.png create mode 100644 img/small_cont.png create mode 100644 img/small_del.png create mode 100644 img/small_doku.png create mode 100644 img/small_edit.png create mode 100644 img/small_email.png create mode 100644 img/small_eur.png create mode 100644 img/small_exp.png create mode 100644 img/small_gut.png create mode 100644 img/small_help.png create mode 100644 img/small_ie.png create mode 100644 img/small_imp.png create mode 100644 img/small_info.png create mode 100644 img/small_kfz.png create mode 100644 img/small_liefer.png create mode 100644 img/small_logo.png create mode 100644 img/small_logout.png create mode 100644 img/small_lv.png create mode 100644 img/small_mahn.png create mode 100644 img/small_next.png create mode 100644 img/small_ok.png create mode 100644 img/small_prev.png create mode 100644 img/small_rech.png create mode 100644 img/small_recycled.png create mode 100644 img/small_redo.png create mode 100644 img/small_run.png create mode 100644 img/small_save.png create mode 100644 img/small_schrift.png create mode 100644 img/small_search.png create mode 100644 img/small_stamm.png create mode 100644 img/small_stop.png create mode 100644 img/small_sub.gif create mode 100644 img/small_sub.png create mode 100644 img/small_sv.png create mode 100644 img/small_users.png create mode 100644 img/small_vt.png create mode 100644 img/soll.png create mode 100644 img/startup_logo.gif create mode 100644 img/startup_logo.png create mode 100644 img/stop.png create mode 100644 img/type-string.png create mode 100644 img/upload.png create mode 100644 img/view.png create mode 100644 img/weiter.png create mode 100644 inc/config.php create mode 100644 inc/fpdf.php create mode 100644 inc/funktionen.php create mode 100644 inc/konstanten.php create mode 100644 inc/konstanten_domaincs.php create mode 100644 inc/konstanten_domainrist.php create mode 100644 inc/konstanten_ristvserver.php create mode 100644 inc/variablen.php create mode 100644 inhalte/10er_kfz.php create mode 100644 inhalte/add.php create mode 100644 inhalte/aktivierung.php create mode 100644 inhalte/angebot.php create mode 100644 inhalte/angebot_add.php create mode 100644 inhalte/angebot_copy.php create mode 100644 inhalte/angebot_create.php create mode 100644 inhalte/angebot_del.php create mode 100644 inhalte/angebot_edit.php create mode 100644 inhalte/angebot_over.php create mode 100644 inhalte/angebot_save.php create mode 100644 inhalte/arech.php create mode 100644 inhalte/arech_add.php create mode 100644 inhalte/arech_over.php create mode 100644 inhalte/arech_save.php create mode 100644 inhalte/art_pos_save.php create mode 100644 inhalte/art_save.php create mode 100644 inhalte/art_take.php create mode 100644 inhalte/artikel.php create mode 100644 inhalte/artikel_add.php create mode 100644 inhalte/artikel_del.php create mode 100644 inhalte/artikel_edit.php create mode 100644 inhalte/artikel_over.php create mode 100644 inhalte/artikel_save.php create mode 100644 inhalte/artikel_view.php create mode 100644 inhalte/best_foot.php create mode 100644 inhalte/best_head.php create mode 100644 inhalte/bestaet.php create mode 100644 inhalte/bestaet_add.php create mode 100644 inhalte/bestaet_del.php create mode 100644 inhalte/bestaet_edit.php create mode 100644 inhalte/bestaet_lcreate.php create mode 100644 inhalte/bestaet_over.php create mode 100644 inhalte/bestaet_rcreate.php create mode 100644 inhalte/bestaet_save.php create mode 100644 inhalte/datens.php create mode 100644 inhalte/dropbox_ie.php create mode 100644 inhalte/dropbox_st.php create mode 100644 inhalte/dropbox_sv.php create mode 100644 inhalte/dropbox_vt.php create mode 100644 inhalte/email.php create mode 100644 inhalte/eur.php create mode 100644 inhalte/eur_ai_search.php create mode 100644 inhalte/eur_as_search.php create mode 100644 inhalte/eur_asearch.php create mode 100644 inhalte/eur_aus_ist.php create mode 100644 inhalte/eur_aus_soll.php create mode 100644 inhalte/eur_e_del.php create mode 100644 inhalte/eur_e_edit.php create mode 100644 inhalte/eur_ei_search.php create mode 100644 inhalte/eur_ein_ist.php create mode 100644 inhalte/eur_ein_soll.php create mode 100644 inhalte/eur_es_search.php create mode 100644 inhalte/eur_esearch.php create mode 100644 inhalte/eur_gadd.php create mode 100644 inhalte/eur_gsave.php create mode 100644 inhalte/eur_over.php create mode 100644 inhalte/eur_radd.php create mode 100644 inhalte/footer.php create mode 100644 inhalte/gut.php create mode 100644 inhalte/gut_add.php create mode 100644 inhalte/gut_del.php create mode 100644 inhalte/gut_edit.php create mode 100644 inhalte/gut_over.php create mode 100644 inhalte/gut_save.php create mode 100644 inhalte/header.php create mode 100644 inhalte/header2.php create mode 100644 inhalte/home.php create mode 100644 inhalte/ie.php create mode 100644 inhalte/ie_art_exp.php create mode 100644 inhalte/ie_art_imp.php create mode 100644 inhalte/ie_art_save.php create mode 100644 inhalte/ie_cont_exp.php create mode 100644 inhalte/ie_cont_imp.php create mode 100644 inhalte/ie_cont_save.php create mode 100644 inhalte/ie_export.php create mode 100644 inhalte/ie_import.php create mode 100644 inhalte/ie_over.php create mode 100644 inhalte/ie_rsicher.php create mode 100644 inhalte/ie_rupload.php create mode 100644 inhalte/ie_upload.php create mode 100644 inhalte/iframe.php create mode 100644 inhalte/inhalt.php create mode 100644 inhalte/kfz.php create mode 100644 inhalte/kfz_add.php create mode 100644 inhalte/kfz_del.php create mode 100644 inhalte/kfz_edit.php create mode 100644 inhalte/kfz_foto.php create mode 100644 inhalte/kfz_over.php create mode 100644 inhalte/kfz_save.php create mode 100644 inhalte/kfz_show.php create mode 100644 inhalte/kontakt.php create mode 100644 inhalte/kontakt_add.php create mode 100644 inhalte/kontakt_del.php create mode 100644 inhalte/kontakt_edit.php create mode 100644 inhalte/kontakt_over.php create mode 100644 inhalte/kontakt_save.php create mode 100644 inhalte/kontakt_show.php create mode 100644 inhalte/left.php create mode 100644 inhalte/liefer.php create mode 100644 inhalte/liefer_add.php create mode 100644 inhalte/liefer_create.php create mode 100644 inhalte/liefer_del.php create mode 100644 inhalte/liefer_edit.php create mode 100644 inhalte/liefer_over.php create mode 100644 inhalte/liefer_save.php create mode 100644 inhalte/login.php create mode 100644 inhalte/logout.php create mode 100644 inhalte/lv.php create mode 100644 inhalte/lv_add.php create mode 100644 inhalte/lv_copy.php create mode 100644 inhalte/lv_create.php create mode 100644 inhalte/lv_del.php create mode 100644 inhalte/lv_edit.php create mode 100644 inhalte/lv_over.php create mode 100644 inhalte/lv_save.php create mode 100644 inhalte/mahn_over.php create mode 100644 inhalte/mail.php create mode 100644 inhalte/navi2.php create mode 100644 inhalte/neue_firma.php create mode 100644 inhalte/neue_firma_add.php create mode 100644 inhalte/neue_firma_admin.php create mode 100644 inhalte/neue_firma_check.php create mode 100644 inhalte/neue_firma_create.php create mode 100644 inhalte/neue_firma_firma.php create mode 100644 inhalte/neue_firma_mail.php create mode 100644 inhalte/neue_firma_path.php create mode 100644 inhalte/neue_firma_reminder.php create mode 100644 inhalte/neue_firma_step1.php create mode 100644 inhalte/neue_firma_step2.php create mode 100644 inhalte/neue_firma_step3.php create mode 100644 inhalte/neue_firma_step4.php create mode 100644 inhalte/neue_firma_step5.php create mode 100644 inhalte/neue_firma_step6.php create mode 100644 inhalte/news.php create mode 100644 inhalte/oposten.php create mode 100644 inhalte/oposten_del.php create mode 100644 inhalte/oposten_edit.php create mode 100644 inhalte/oposten_mahn.php create mode 100644 inhalte/oposten_mahn2.php create mode 100644 inhalte/oposten_mahn_save.php create mode 100644 inhalte/oposten_over.php create mode 100644 inhalte/oposten_overview.php create mode 100644 inhalte/oposten_save.php create mode 100644 inhalte/oposten_teil.php create mode 100644 inhalte/pdf_show.php create mode 100644 inhalte/phpinfo.php create mode 100644 inhalte/pos_change.php create mode 100644 inhalte/pos_delete.php create mode 100644 inhalte/pos_save.php create mode 100644 inhalte/positions.php create mode 100644 inhalte/rech_az.php create mode 100644 inhalte/rech_oa.php create mode 100644 inhalte/rech_sr.php create mode 100644 inhalte/rech_vk.php create mode 100644 inhalte/rechnung.php create mode 100644 inhalte/rechnung_add.php create mode 100644 inhalte/rechnung_del.php create mode 100644 inhalte/rechnung_edit.php create mode 100644 inhalte/rechnung_gcreate.php create mode 100644 inhalte/rechnung_lcreate.php create mode 100644 inhalte/rechnung_over.php create mode 100644 inhalte/rechnung_save.php create mode 100644 inhalte/save_all.php create mode 100644 inhalte/schrift.php create mode 100644 inhalte/schrift_add.php create mode 100644 inhalte/schrift_copy.php create mode 100644 inhalte/schrift_del.php create mode 100644 inhalte/schrift_edit.php create mode 100644 inhalte/schrift_over.php create mode 100644 inhalte/schrift_save.php create mode 100644 inhalte/search.php create mode 100644 inhalte/settings.php create mode 100644 inhalte/stamm.php create mode 100644 inhalte/stamm_fd_edit.php create mode 100644 inhalte/stamm_fd_save.php create mode 100644 inhalte/stamm_logo_edit.php create mode 100644 inhalte/stamm_over.php create mode 100644 inhalte/start_prod.php create mode 100644 inhalte/sv.php create mode 100644 inhalte/sv_overview.php create mode 100644 inhalte/sv_save.php create mode 100644 inhalte/sv_saved.php create mode 100644 inhalte/texte.php create mode 100644 inhalte/texte_edit.php create mode 100644 inhalte/texte_over.php create mode 100644 inhalte/texte_save.php create mode 100644 inhalte/tracking.php create mode 100644 inhalte/tracking_over.php create mode 100644 inhalte/tracking_overview.php create mode 100644 inhalte/turnus.php create mode 100644 inhalte/turnus_add.php create mode 100644 inhalte/turnus_create.php create mode 100644 inhalte/turnus_del.php create mode 100644 inhalte/turnus_edit.php create mode 100644 inhalte/turnus_over.php create mode 100644 inhalte/turnus_save.php create mode 100644 inhalte/user.php create mode 100644 inhalte/user_add.php create mode 100644 inhalte/user_del.php create mode 100644 inhalte/user_edit.php create mode 100644 inhalte/user_over.php create mode 100644 inhalte/user_save.php create mode 100644 inhalte/vertrag.php create mode 100644 inhalte/vt.php create mode 100644 inhalte/vt_overview.php create mode 100644 inhalte/warnings.php create mode 100644 inhalte/web.php create mode 100644 pdf/ang_pdf.php create mode 100644 pdf/ausist_pdf.php create mode 100644 pdf/aussoll_pdf.php create mode 100644 pdf/berechnung.php create mode 100644 pdf/best_pdf.php create mode 100644 pdf/einist_pdf.php create mode 100644 pdf/einsoll_pdf.php create mode 100644 pdf/font/calibri.php create mode 100644 pdf/font/calibrib.php create mode 100644 pdf/font/courier.php create mode 100644 pdf/font/helvetica.php create mode 100644 pdf/font/helveticab.php create mode 100644 pdf/font/helveticabi.php create mode 100644 pdf/font/helveticai.php create mode 100644 pdf/font/makefont/cp1250.map create mode 100644 pdf/font/makefont/cp1251.map create mode 100644 pdf/font/makefont/cp1252.map create mode 100644 pdf/font/makefont/cp1253.map create mode 100644 pdf/font/makefont/cp1254.map create mode 100644 pdf/font/makefont/cp1255.map create mode 100644 pdf/font/makefont/cp1257.map create mode 100644 pdf/font/makefont/cp1258.map create mode 100644 pdf/font/makefont/cp874.map create mode 100644 pdf/font/makefont/iso-8859-1.map create mode 100644 pdf/font/makefont/iso-8859-11.map create mode 100644 pdf/font/makefont/iso-8859-15.map create mode 100644 pdf/font/makefont/iso-8859-16.map create mode 100644 pdf/font/makefont/iso-8859-2.map create mode 100644 pdf/font/makefont/iso-8859-4.map create mode 100644 pdf/font/makefont/iso-8859-5.map create mode 100644 pdf/font/makefont/iso-8859-7.map create mode 100644 pdf/font/makefont/iso-8859-9.map create mode 100644 pdf/font/makefont/koi8-r.map create mode 100644 pdf/font/makefont/koi8-u.map create mode 100644 pdf/font/makefont/makefont.php create mode 100644 pdf/font/new_font.php create mode 100644 pdf/font/symbol.php create mode 100644 pdf/font/times.php create mode 100644 pdf/font/timesb.php create mode 100644 pdf/font/timesbi.php create mode 100644 pdf/font/timesi.php create mode 100644 pdf/font/zapfdingbats.php create mode 100644 pdf/footer.php create mode 100644 pdf/footer_best.php create mode 100644 pdf/gut_pdf.php create mode 100644 pdf/header.gif create mode 100644 pdf/header.jpg create mode 100644 pdf/header.php create mode 100644 pdf/header.png create mode 100644 pdf/header0.php create mode 100644 pdf/header0_best.php create mode 100644 pdf/header1.php create mode 100644 pdf/header2.php create mode 100644 pdf/header3.php create mode 100644 pdf/header_best.php create mode 100644 pdf/kfz_header.php create mode 100644 pdf/kontakt_pdf.php create mode 100644 pdf/liefer_pdf.php create mode 100644 pdf/lv_pdf.php create mode 100644 pdf/mahn1_pdf.php create mode 100644 pdf/mahn2_pdf.php create mode 100644 pdf/neue_firma_pdf.php create mode 100644 pdf/opost_pdf.php create mode 100644 pdf/position_full.php create mode 100644 pdf/position_liefer.php create mode 100644 pdf/position_lv.php create mode 100644 pdf/position_mahn2.php create mode 100644 pdf/rech_pdf.php create mode 100644 pdf/replace_angebot.php create mode 100644 pdf/replace_bestaet.php create mode 100644 pdf/replace_bi.php create mode 100644 pdf/replace_gruss.php create mode 100644 pdf/replace_gut.php create mode 100644 pdf/replace_liefer.php create mode 100644 pdf/replace_lv.php create mode 100644 pdf/replace_mahn1.php create mode 100644 pdf/replace_mahn2.php create mode 100644 pdf/replace_rechnung.php create mode 100644 pdf/replace_skonto.php create mode 100644 pdf/replace_token.php create mode 100644 pdf/schrift_pdf.php create mode 100644 pdf/track_pdf.php create mode 100644 template/frame_1col.htm create mode 100644 template/frame_2col_left.htm create mode 100644 template/frame_2col_right.htm create mode 100644 template/frame_3col.htm create mode 100644 template/frame_middle_1col.htm create mode 100644 template/frame_middle_2col.htm create mode 100644 template/page.css create mode 100644 template/template_v1.htm diff --git a/ckeditor/.htaccess b/ckeditor/.htaccess new file mode 100644 index 0000000..ed1d794 --- /dev/null +++ b/ckeditor/.htaccess @@ -0,0 +1,24 @@ +# +# Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +# For licensing, see LICENSE.html or http://ckeditor.com/license +# + +# +# On some specific Linux installations you could face problems with Firefox. +# It could give you errors when loading the editor saying that some illegal +# characters were found (three strange chars in the beginning of the file). +# This could happen if you map the .js or .css files to PHP, for example. +# +# Those characters are the Byte Order Mask (BOM) of the Unicode encoded files. +# All FCKeditor files are Unicode encoded. +# + +AddType application/x-javascript .js +AddType text/css .css + +# +# If PHP is mapped to handle XML files, you could have some issues. The +# following will disable it. +# + +AddType text/xml .xml diff --git a/ckeditor/CHANGES.html b/ckeditor/CHANGES.html new file mode 100644 index 0000000..cb79908 --- /dev/null +++ b/ckeditor/CHANGES.html @@ -0,0 +1,923 @@ + + + + + Changelog - CKEditor + + + + +

+ CKEditor Changelog +

+

+ CKEditor 3.4.1

+

+ New features:

+ +

+ Fixed issues:

+ +

+ CKEditor 3.4

+

+ Fixed issues:

+ +

+ CKEditor 3.4 Beta

+

+ New features:

+ +

+ Fixed issues:

+ +

+ CKEditor 3.3.2

+

+ New features:

+ +

+ Fixed issues:

+ +

+ CKEditor 3.3.1

+

+ Fixed issues:

+ +

+ CKEditor 3.3

+

+ New features:

+ +

+ CKEditor 3.2.2

+

+ New features:

+ +

+ Fixed issues:

+ +

+ CKEditor 3.2.1

+

+ New features:

+ +

+ Fixed issues:

+ +

+ CKEditor 3.2

+

+ New features:

+ +

+ Fixed issues:

+ +

+ CKEditor 3.1.1

+

+ New features:

+ +

+ Fixed issues:

+ +

+ CKEditor 3.1

+

+ New features:

+ +

+ Fixed issues:

+ +

+ CKEditor 3.0.2

+

+ New features:

+ +

+ Fixed issues:

+ +

+ CKEditor 3.0.1

+

+ New features:

+ +

+ Fixed issues:

+ +

+ CKEditor 3.0

+

+ New features:

+ +

+ Fixed issues:

+ +

+ CKEditor 3.0 RC

+

+ Changelog starts at this release.

+ + + diff --git a/ckeditor/INSTALL.html b/ckeditor/INSTALL.html new file mode 100644 index 0000000..8cf37f9 --- /dev/null +++ b/ckeditor/INSTALL.html @@ -0,0 +1,92 @@ + + + + + Installation Guide - CKEditor + + + + +

+ CKEditor Installation Guide

+

+ What's CKEditor?

+

+ CKEditor is a text editor to be used inside web pages. It's not a replacement + for desktop text editors like Word or OpenOffice, but a component to be used as + part of web applications and web sites.

+

+ Installation

+

+ Installing CKEditor is an easy task. Just follow these simple steps:

+
    +
  1. Download the latest version of the editor from our web site: http://ckeditor.com. You should have already completed + this step, but be sure you have the very latest version.
  2. +
  3. Extract (decompress) the downloaded file into the root of your + web site.
  4. +
+

+ Note: CKEditor is by default installed in the "ckeditor" + folder. You can place the files in whichever you want though.

+

+ Checking Your Installation +

+

+ The editor comes with a few sample pages that can be used to verify that installation + proceeded properly. Take a look at the _samples directory.

+

+ To test your installation, just call the following page at your web site:

+
+http://<your site>/<CKEditor installation path>/_samples/index.html
+
+For example:
+http://www.example.com/ckeditor/_samples/index.html
+

+ Documentation

+

+ The full editor documentation is available online at the following address:
+ http://docs.cksource.com/ckeditor

+ + + diff --git a/ckeditor/LICENSE.html b/ckeditor/LICENSE.html new file mode 100644 index 0000000..ecbe06e --- /dev/null +++ b/ckeditor/LICENSE.html @@ -0,0 +1,1334 @@ + + + + + License - CKEditor + + +

+ Software License Agreement +

+

+ CKEditor™ - The text editor for Internet™ - + http://ckeditor.com
+ Copyright © 2003-2010, CKSource - Frederico Knabben. All rights reserved. +

+

+ Licensed under the terms of any of the following licenses at your choice: +

+ +

+ You are not required to, but if you want to explicitly declare the license you have + chosen to be bound to when using, reproducing, modifying and distributing this software, + just include a text file titled "LEGAL" in your version of this software, indicating + your license choice. In any case, your choice will not restrict any recipient of + your version of this software to use, reproduce, modify and distribute this software + under any of the above licenses. +

+

+ Sources of Intellectual Property Included in CKEditor +

+

+ Where not otherwise indicated, all CKEditor content is authored by CKSource engineers + and consists of CKSource-owned intellectual property. In some specific instances, + CKEditor will incorporate work done by developers outside of CKSource with their + express permission. +

+

+ YUI Test: At _source/tests/yuitest.js + can be found part of the source code of YUI, which is licensed under the terms of + the BSD License. YUI is + Copyright © 2008, Yahoo! Inc. +

+

+ Trademarks +

+

+ CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product + names are trademarks, registered trademarks or service marks of their respective + holders. +

+ + diff --git a/ckeditor/_samples/ajax.html b/ckeditor/_samples/ajax.html new file mode 100644 index 0000000..153e546 --- /dev/null +++ b/ckeditor/_samples/ajax.html @@ -0,0 +1,87 @@ + + + + + Ajax - CKEditor Sample + + + + + + + +

+ CKEditor Sample +

+ +
+ +
+

+ + +

+ +
+
+ + + + diff --git a/ckeditor/_samples/api.html b/ckeditor/_samples/api.html new file mode 100644 index 0000000..f853350 --- /dev/null +++ b/ckeditor/_samples/api.html @@ -0,0 +1,152 @@ + + + + + API usage - CKEditor Sample + + + + + + + + +

+ CKEditor Sample +

+ +
+ +
+
+

+ This sample shows how to use the CKeditor JavaScript API to interact with the editor + at runtime.

+ + + + +
+
+ +
+ + + diff --git a/ckeditor/_samples/api_dialog.html b/ckeditor/_samples/api_dialog.html new file mode 100644 index 0000000..1ccc542 --- /dev/null +++ b/ckeditor/_samples/api_dialog.html @@ -0,0 +1,188 @@ + + + + + Using API to customize dialogs - CKEditor Sample + + + + + + + + + +

+ CKEditor Sample +

+ +
+ +
+ +

+ This sample shows how to use the dialog API to customize dialogs whithout changing + the original editor code. The following customizations are being done::

+
    +
  1. Add dialog pages ("My Tab" in the Link dialog).
  2. +
  3. Remove a dialog tab ("Target" tab from the Link dialog).
  4. +
  5. Add dialog fields ("My Custom Field" into the Link dialog).
  6. +
  7. Remove dialog fields ("Link Type" and "Browser Server" the Link + dialog).
  8. +
  9. Set default values for dialog fields (for the "URL" field in the + Link dialog).
  10. +
  11. Create a custom dialog ("My Dialog" button).
  12. +
+ + + + + diff --git a/ckeditor/_samples/api_dialog/my_dialog.js b/ckeditor/_samples/api_dialog/my_dialog.js new file mode 100644 index 0000000..02f412f --- /dev/null +++ b/ckeditor/_samples/api_dialog/my_dialog.js @@ -0,0 +1,28 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +CKEDITOR.dialog.add( 'myDialog', function( editor ) +{ + return { + title : 'My Dialog', + minWidth : 400, + minHeight : 200, + contents : [ + { + id : 'tab1', + label : 'First Tab', + title : 'First Tab', + elements : + [ + { + id : 'input1', + type : 'text', + label : 'Input 1' + } + ] + } + ] + }; +} ); diff --git a/ckeditor/_samples/asp/advanced.asp b/ckeditor/_samples/asp/advanced.asp new file mode 100644 index 0000000..dfb94d5 --- /dev/null +++ b/ckeditor/_samples/asp/advanced.asp @@ -0,0 +1,105 @@ +<%@ codepage="65001" language="VBScript" %> +<% Option Explicit %> + +<% + + ' You must set "Enable Parent Paths" on your web site + ' in order for the above relative include to work. + ' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp" + +%> + + + + + Sample - CKEditor + + + + +

+ CKEditor Sample +

+ +
+ +
+ +
+ Output +
+

+
+

+<% + ' Create class instance. + dim editor, initialValue, code, textareaAttributes + set editor = New CKEditor + + ' Do not print the code directly to the browser, return it instead + editor.returnOutput = true + + ' Path to CKEditor directory, ideally instead of relative dir, use an absolute path: + ' editor.basePath = "/ckeditor/" + ' If not set, CKEditor will default to /ckeditor/ + editor.basePath = "../../" + + ' Set global configuration (will be used by all instances of CKEditor). + editor.config("width") = 600 + + ' Change default textarea attributes + set textareaAttributes = CreateObject("Scripting.Dictionary") + textareaAttributes.Add "rows", 10 + textareaAttributes.Add "cols", 80 + Set editor.textareaAttributes = textareaAttributes + + ' The initial value to be displayed in the editor. + initialValue = "

This is some sample text. You are using CKEditor.

" + + ' Create first instance. + code = editor.editor("editor1", initialValue) + + response.write code +%> +

+
+

+<% +' Configuration that will be used only by the second editor. + +editor.instanceConfig("toolbar") = Array( _ + Array( "Source", "-", "Bold", "Italic", "Underline", "Strike" ), _ + Array( "Image", "Link", "Unlink", "Anchor" ) _ + ) + +editor.instanceConfig("skin") = "v2" + +' Create second instance. +response.write editor.editor("editor2", initialValue) +%> +

+ +

+
+
+ + + diff --git a/ckeditor/_samples/asp/events.asp b/ckeditor/_samples/asp/events.asp new file mode 100644 index 0000000..5391cef --- /dev/null +++ b/ckeditor/_samples/asp/events.asp @@ -0,0 +1,136 @@ +<%@ codepage="65001" language="VBScript" %> +<% Option Explicit %> + +<% + + ' You must set "Enable Parent Paths" on your web site + ' in order for the above relative include to work. + ' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp" + +%> + + + + + Sample - CKEditor + + + + +

+ CKEditor Sample +

+ +
+ +
+ +
+ Output +
+

+
+

+<% + +'' + ' Adds global event, will hide "Target" tab in Link dialog in all instances. + ' +function CKEditorHideLinkTargetTab(editor) + dim functionCode + functionCode = "function (ev) {" & vbcrlf & _ + "// Take the dialog name and its definition from the event data" & vbcrlf & _ + "var dialogName = ev.data.name;" & vbcrlf & _ + "var dialogDefinition = ev.data.definition;" & vbcrlf & _ + "" & vbcrlf & _ + "// Check if the definition is from the Link dialog." & vbcrlf & _ + "if ( dialogName == 'link' )" & vbcrlf & _ + " dialogDefinition.removeContents('target')" & vbcrlf & _ + "}" & vbcrlf + + editor.addGlobalEventHandler "dialogDefinition", functionCode +end function + +'' + ' Adds global event, will notify about opened dialog. + ' +function CKEditorNotifyAboutOpenedDialog(editor) + dim functionCode + functionCode = "function (evt) {" & vbcrlf & _ + "alert('Loading dialog: ' + evt.data.name);" & vbcrlf & _ + "}" + + editor.addGlobalEventHandler "dialogDefinition", functionCode +end function + + +dim editor, initialValue + +' Create class instance. +set editor = new CKEditor + +' Set configuration option for all editors. +editor.config("width") = 750 + +' Path to CKEditor directory, ideally instead of relative dir, use an absolute path: +' editor.basePath = "/ckeditor/" +' If not set, CKEditor will default to /ckeditor/ +editor.basePath = "../../" + +' The initial value to be displayed in the editor. +initialValue = "

This is some sample text. You are using CKEditor.

" + +' Event that will be handled only by the first editor. +editor.addEventHandler "instanceReady", "function (evt) { alert('Loaded editor: ' + evt.editor.name );}" + +' Create first instance. +editor.editor "editor1", initialValue + +' Clear event handlers, instances that will be created later will not have +' the 'instanceReady' listener defined a couple of lines above. +editor.clearEventHandlers empty +%> +

+
+

+<% +' Configuration that will be used only by the second editor. +editor.instanceConfig("width") = 600 +editor.instanceConfig("toolbar") = "Basic" + +' Add some global event handlers (for all editors). +CKEditorHideLinkTargetTab(editor) +CKEditorNotifyAboutOpenedDialog(editor) + +' Event that will be handled only by the second editor. +editor.addInstanceEventHandler "instanceReady", "function (evt) { alert('Loaded second editor: ' + evt.editor.name );}" + +' Create second instance. +editor.editor "editor2", initialValue +%> +

+ +

+
+
+ + + diff --git a/ckeditor/_samples/asp/index.html b/ckeditor/_samples/asp/index.html new file mode 100644 index 0000000..e40ec45 --- /dev/null +++ b/ckeditor/_samples/asp/index.html @@ -0,0 +1,103 @@ + + + + + ASP integration Samples List - CKEditor + + + +

+ CKEditor Samples List for ASP +

+

+ Overview +

+

The ckeditor.asp file provides a wrapper to ease the work of creating CKEditor instances from classic Asp.

+

To use it, you must first include it into your page: + + <!-- #INCLUDE file="../../ckeditor.asp" --> + + Of course, you should adjust the path to make it point to the correct location, and maybe use a full path (with virtual="" instead of file="") +

+

After that script is included, you can use it in different ways, based on the following pattern:

+ +
    +
  1. + Create an instance of the CKEditor class: +
    dim editor
    +set editor = New CKEditor
    +
  2. +
  3. + Set the path to the folder where CKEditor has been installed, by default it will use /ckeditor/ +
    editor.basePath = "../../"
    +
  4. +
  5. + Now use one of the three main methods to create the CKEditor instances: +
      +
    • + Replace textarea with id (or name) "editor1". +
      editor.replaceInstance "editor1"
      +
    • +
    • + Replace all textareas with CKEditor. +
      editor.replaceAll empty
      +
    • +
    • + Create a textarea element and attach CKEditor to it. +
      editor.editor "editor1", initialValue
      +
    • +
    +
  6. +
+

Before step 3 you can use a number of methods and properties to adjust the behavior of this class and the CKEditor instances +that will be created:

+ + +

+ Basic Samples +

+ +

+ Advanced Samples +

+ + + + diff --git a/ckeditor/_samples/asp/replace.asp b/ckeditor/_samples/asp/replace.asp new file mode 100644 index 0000000..d89e0bf --- /dev/null +++ b/ckeditor/_samples/asp/replace.asp @@ -0,0 +1,72 @@ +<%@ codepage="65001" language="VBScript" %> +<% Option Explicit %> + +<% + + ' You must set "Enable Parent Paths" on your web site + ' in order for the above relative include to work. + ' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp" + +%> + + + + + Sample - CKEditor + + + + +

+ CKEditor Sample +

+ +
+ +
+ +
+ Output +
+

+
+ +

+

+ +

+
+
+ + <% + ' Create class instance. + dim editor + set editor = New CKEditor + ' Path to CKEditor directory, ideally instead of relative dir, use an absolute path: + ' editor.basePath = "/ckeditor/" + ' If not set, CKEditor will default to /ckeditor/ + editor.basePath = "../../" + ' Replace textarea with id (or name) "editor1". + editor.replaceInstance "editor1" + %> + + diff --git a/ckeditor/_samples/asp/replaceall.asp b/ckeditor/_samples/asp/replaceall.asp new file mode 100644 index 0000000..d1187ed --- /dev/null +++ b/ckeditor/_samples/asp/replaceall.asp @@ -0,0 +1,77 @@ +<%@ codepage="65001" language="VBScript" %> +<% Option Explicit %> + +<% + + ' You must set "Enable Parent Paths" on your web site + ' in order for the above relative include to work. + ' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp" + +%> + + + + + Sample - CKEditor + + + + +

+ CKEditor Sample +

+ +
+ +
+ +
+ Output +
+

+
+ +

+

+
+ +

+

+ +

+
+
+ + <% + ' Create class instance. + dim editor + set editor = New CKEditor + ' Path to CKEditor directory, ideally instead of relative dir, use an absolute path: + ' editor.basePath = "/ckeditor/" + ' If not set, CKEditor will default to /ckeditor/ + editor.basePath = "../../" + ' Replace all textareas with CKEditor. + editor.replaceAll empty + %> + + diff --git a/ckeditor/_samples/asp/sample_posteddata.asp b/ckeditor/_samples/asp/sample_posteddata.asp new file mode 100644 index 0000000..3b45181 --- /dev/null +++ b/ckeditor/_samples/asp/sample_posteddata.asp @@ -0,0 +1,46 @@ +<%@ codepage="65001" language="VBScript" %> +<% Option Explicit %> + + + + + Sample - CKEditor + + + + +

+ CKEditor - Posted Data +

+ + + + + + + + + <% + Dim sForm + For Each sForm in Request.Form + %> + + + + + <% Next %> +
Field NameValue
<%=Server.HTMLEncode( sForm )%>
<%=Server.HTMLEncode( Request.Form(sForm) )%>
+ + + diff --git a/ckeditor/_samples/asp/standalone.asp b/ckeditor/_samples/asp/standalone.asp new file mode 100644 index 0000000..02cda38 --- /dev/null +++ b/ckeditor/_samples/asp/standalone.asp @@ -0,0 +1,72 @@ +<%@ codepage="65001" language="VBScript" %> +<% Option Explicit %> + +<% + + ' You must set "Enable Parent Paths" on your web site + ' in order for the above relative include to work. + ' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp" + +%> + + + + + Sample - CKEditor + + + + +

+ CKEditor Sample +

+ +
+ +
+ +
+ Output +
+

+ Editor 1: +

+

+ <% + dim initialValue, editor + ' The initial value to be displayed in the editor. + initialValue = "

This is some sample text.

" + ' Create class instance. + set editor = New CKEditor + ' Path to CKEditor directory, ideally instead of relative dir, use an absolute path: + ' editor.basePath = "/ckeditor/" + ' If not set, CKEditor will default to /ckeditor/ + editor.basePath = "../../" + ' Create textarea element and attach CKEditor to it. + editor.editor "editor1", initialValue + %> + +

+
+
+ + + diff --git a/ckeditor/_samples/assets/output_xhtml.css b/ckeditor/_samples/assets/output_xhtml.css new file mode 100644 index 0000000..620ac64 --- /dev/null +++ b/ckeditor/_samples/assets/output_xhtml.css @@ -0,0 +1,204 @@ +/* + * Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.html or http://ckeditor.com/license + * + * Styles used by the XHTML 1.1 sample page (xhtml.html). + */ + +/** + * Basic definitions for the editing area. + */ +body +{ + font-family: Arial, Verdana, sans-serif; + font-size: 80%; + color: #000000; + background-color: #ffffff; + padding: 5px; + margin: 0px; +} + +/** + * Core styles. + */ + +.Bold +{ + font-weight: bold; +} + +.Italic +{ + font-style: italic; +} + +.Underline +{ + text-decoration: underline; +} + +.StrikeThrough +{ + text-decoration: line-through; +} + +.Subscript +{ + vertical-align: sub; + font-size: smaller; +} + +.Superscript +{ + vertical-align: super; + font-size: smaller; +} + +/** + * Font faces. + */ + +.FontComic +{ + font-family: 'Comic Sans MS'; +} + +.FontCourier +{ + font-family: 'Courier New'; +} + +.FontTimes +{ + font-family: 'Times New Roman'; +} + +/** + * Font sizes. + */ + +.FontSmaller +{ + font-size: smaller; +} + +.FontLarger +{ + font-size: larger; +} + +.FontSmall +{ + font-size: 8pt; +} + +.FontBig +{ + font-size: 14pt; +} + +.FontDouble +{ + font-size: 200%; +} + +/** + * Font colors. + */ +.FontColor1 +{ + color: #ff9900; +} + +.FontColor2 +{ + color: #0066cc; +} + +.FontColor3 +{ + color: #ff0000; +} + +.FontColor1BG +{ + background-color: #ff9900; +} + +.FontColor2BG +{ + background-color: #0066cc; +} + +.FontColor3BG +{ + background-color: #ff0000; +} + +/** + * Indentation. + */ + +.Indent1 +{ + margin-left: 40px; +} + +.Indent2 +{ + margin-left: 80px; +} + +.Indent3 +{ + margin-left: 120px; +} + +/** + * Alignment. + */ + +.JustifyLeft +{ + text-align: left; +} + +.JustifyRight +{ + text-align: right; +} + +.JustifyCenter +{ + text-align: center; +} + +.JustifyFull +{ + text-align: justify; +} + +/** + * Other. + */ + +code +{ + font-family: courier, monospace; + background-color: #eeeeee; + padding-left: 1px; + padding-right: 1px; + border: #c0c0c0 1px solid; +} + +kbd +{ + padding: 0px 1px 0px 1px; + border-width: 1px 2px 2px 1px; + border-style: solid; +} + +blockquote +{ + color: #808080; +} diff --git a/ckeditor/_samples/autogrow.html b/ckeditor/_samples/autogrow.html new file mode 100644 index 0000000..ccc08b6 --- /dev/null +++ b/ckeditor/_samples/autogrow.html @@ -0,0 +1,75 @@ + + + + + AutoGrow Plugin - CKEditor Sample + + + + + + +

+ CKEditor Sample +

+ +
+ +
+
+

+ In this sample the AutoGrow plugin is available. It makes the editor grow to fit the size of the content.

+

+
+ + +

+

+
+ + +

+

+ +

+
+ + + diff --git a/ckeditor/_samples/divreplace.html b/ckeditor/_samples/divreplace.html new file mode 100644 index 0000000..bee6797 --- /dev/null +++ b/ckeditor/_samples/divreplace.html @@ -0,0 +1,137 @@ + + + + + Replace DIV - CKEditor Sample + + + + + + + + + +

+ CKEditor Sample +

+ +
+ +
+

+ Double-click on any of the following DIVs to transform them into editor instances.

+
+

+ Part 1

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi + semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna + rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla + nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce + eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus. +

+
+
+

+ Part 2

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi + semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna + rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla + nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce + eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus. +

+

+ Donec velit. Mauris massa. Vestibulum non nulla. Nam suscipit arcu nec elit. Phasellus + sollicitudin iaculis ante. Ut non mauris et sapien tincidunt adipiscing. Vestibulum + vitae leo. Suspendisse nec mi tristique nulla laoreet vulputate. +

+
+
+

+ Part 3

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi + semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna + rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla + nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce + eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus. +

+
+ + + diff --git a/ckeditor/_samples/enterkey.html b/ckeditor/_samples/enterkey.html new file mode 100644 index 0000000..def67ae --- /dev/null +++ b/ckeditor/_samples/enterkey.html @@ -0,0 +1,88 @@ + + + + + ENTER Key Configuration - CKEditor Sample + + + + + + + +

+ CKEditor Sample +

+ +
+ +
+
+ When ENTER is pressed:
+ +
+
+ When SHIFT + ENTER is pressed:
+ +
+
+
+

+
+ +

+

+ +

+
+ + + diff --git a/ckeditor/_samples/fullpage.html b/ckeditor/_samples/fullpage.html new file mode 100644 index 0000000..bdd301e --- /dev/null +++ b/ckeditor/_samples/fullpage.html @@ -0,0 +1,62 @@ + + + + + Full Page Editing - CKEditor Sample + + + + + + +

+ CKEditor Sample +

+ +
+ +
+
+

+ In this sample the editor is configured to edit entire HTML pages, from the <html> + tag to </html>.

+

+
+ + +

+

+ +

+
+ + + diff --git a/ckeditor/_samples/index.html b/ckeditor/_samples/index.html new file mode 100644 index 0000000..679914b --- /dev/null +++ b/ckeditor/_samples/index.html @@ -0,0 +1,56 @@ + + + + + Samples List - CKEditor + + + +

+ CKEditor Samples List +

+

+ Basic Samples +

+ +

+ Basic Customization +

+ +

+ Advanced Samples +

+ + + + diff --git a/ckeditor/_samples/jqueryadapter.html b/ckeditor/_samples/jqueryadapter.html new file mode 100644 index 0000000..86113c5 --- /dev/null +++ b/ckeditor/_samples/jqueryadapter.html @@ -0,0 +1,73 @@ + + + + + jQuery adapter - CKEditor Sample + + + + + + + + + +

+ CKEditor Sample +

+ +
+ +
+ +
+

+
+ +

+

+ +

+
+ + + diff --git a/ckeditor/_samples/output_html.html b/ckeditor/_samples/output_html.html new file mode 100644 index 0000000..6712d7c --- /dev/null +++ b/ckeditor/_samples/output_html.html @@ -0,0 +1,259 @@ + + + + + HTML compliant output - CKEditor Sample + + + + + + +

+ CKEditor Sample +

+ +
+ +
+
+

+ This sample shows CKEditor configured to produce a legacy HTML4 document. Traditional + HTML elements like <b>, <i>, and <font> are used in place of + <strong>, <em> and CSS styles.

+

+
+ + +

+

+ +

+
+ + + diff --git a/ckeditor/_samples/output_xhtml.html b/ckeditor/_samples/output_xhtml.html new file mode 100644 index 0000000..c84ca0e --- /dev/null +++ b/ckeditor/_samples/output_xhtml.html @@ -0,0 +1,159 @@ + + + + + XHTML compliant output - CKEditor Sample + + + + + + +

+ CKEditor Sample +

+ +
+ +
+
+

+ This sample shows CKEditor configured to produce XHTML 1.1 compliant + HTML. Deprecated elements or attributes, like the <font> and <u> elements + or the "style" attribute, are avoided.

+

+
+ + +

+

+ +

+
+ + + diff --git a/ckeditor/_samples/php/advanced.php b/ckeditor/_samples/php/advanced.php new file mode 100644 index 0000000..771cb0c --- /dev/null +++ b/ckeditor/_samples/php/advanced.php @@ -0,0 +1,93 @@ + + + + + Sample - CKEditor + + + + +

+ CKEditor Sample +

+ +
+ +
+ +
+ Output +
+

+
+

+returnOutput = true; + +// Path to CKEditor directory, ideally instead of relative dir, use an absolute path: +// $CKEditor->basePath = '/ckeditor/' +// If not set, CKEditor will try to detect the correct path. +$CKEditor->basePath = '../../'; + +// Set global configuration (will be used by all instances of CKEditor). +$CKEditor->config['width'] = 600; + +// Change default textarea attributes +$CKEditor->textareaAttributes = array("cols" => 80, "rows" => 10); + +// The initial value to be displayed in the editor. +$initialValue = '

This is some sample text. You are using CKEditor.

'; + +// Create first instance. +$code = $CKEditor->editor("editor1", $initialValue); + +echo $code; +?> +

+
+

+editor("editor2", $initialValue, $config); +?> +

+ +

+
+
+ + + diff --git a/ckeditor/_samples/php/events.php b/ckeditor/_samples/php/events.php new file mode 100644 index 0000000..36f2be2 --- /dev/null +++ b/ckeditor/_samples/php/events.php @@ -0,0 +1,130 @@ + + + + + Sample - CKEditor + + + + +

+ CKEditor Sample +

+ +
+ +
+ +
+ Output +
+

+
+

+addGlobalEventHandler('dialogDefinition', $function); +} + +/** + * Adds global event, will notify about opened dialog. + */ +function CKEditorNotifyAboutOpenedDialog(&$CKEditor) { + $function = 'function (evt) { + alert("Loading dialog: " + evt.data.name); + }'; + + $CKEditor->addGlobalEventHandler('dialogDefinition', $function); +} + +// Include CKEditor class. +include("../../ckeditor.php"); + +// Create class instance. +$CKEditor = new CKEditor(); + +// Set configuration option for all editors. +$CKEditor->config['width'] = 750; + +// Path to CKEditor directory, ideally instead of relative dir, use an absolute path: +// $CKEditor->basePath = '/ckeditor/' +// If not set, CKEditor will try to detect the correct path. +$CKEditor->basePath = '../../'; + +// The initial value to be displayed in the editor. +$initialValue = '

This is some sample text. You are using CKEditor.

'; + +// Event that will be handled only by the first editor. +$CKEditor->addEventHandler('instanceReady', 'function (evt) { + alert("Loaded editor: " + evt.editor.name); +}'); + +// Create first instance. +$CKEditor->editor("editor1", $initialValue); + +// Clear event handlers, instances that will be created later will not have +// the 'instanceReady' listener defined a couple of lines above. +$CKEditor->clearEventHandlers(); +?> +

+
+

+editor("editor2", $initialValue, $config, $events); +?> +

+ +

+
+
+ + + diff --git a/ckeditor/_samples/php/replace.php b/ckeditor/_samples/php/replace.php new file mode 100644 index 0000000..80d813b --- /dev/null +++ b/ckeditor/_samples/php/replace.php @@ -0,0 +1,63 @@ + + + + + Sample - CKEditor + + + + +

+ CKEditor Sample +

+ +
+ +
+ +
+ Output +
+

+
+ +

+

+ +

+
+
+ + basePath = '/ckeditor/' + // If not set, CKEditor will try to detect the correct path. + $CKEditor->basePath = '../../'; + // Replace textarea with id (or name) "editor1". + $CKEditor->replace("editor1"); + ?> + + diff --git a/ckeditor/_samples/php/replaceall.php b/ckeditor/_samples/php/replaceall.php new file mode 100644 index 0000000..38efc80 --- /dev/null +++ b/ckeditor/_samples/php/replaceall.php @@ -0,0 +1,68 @@ + + + + + Sample - CKEditor + + + + +

+ CKEditor Sample +

+ +
+ +
+ +
+ Output +
+

+
+ +

+

+
+ +

+

+ +

+
+
+ + basePath = '/ckeditor/' + // If not set, CKEditor will try to detect the correct path. + $CKEditor->basePath = '../../'; + // Replace all textareas with CKEditor. + $CKEditor->replaceAll(); + ?> + + diff --git a/ckeditor/_samples/php/standalone.php b/ckeditor/_samples/php/standalone.php new file mode 100644 index 0000000..2a39ca1 --- /dev/null +++ b/ckeditor/_samples/php/standalone.php @@ -0,0 +1,64 @@ + + + + + Sample - CKEditor + + + + +

+ CKEditor Sample +

+ +
+ +
+ +
+ Output +
+

+
+

+

+ This is some sample text.

'; + // Create class instance. + $CKEditor = new CKEditor(); + // Path to CKEditor directory, ideally instead of relative dir, use an absolute path: + // $CKEditor->basePath = '/ckeditor/' + // If not set, CKEditor will try to detect the correct path. + $CKEditor->basePath = '../../'; + // Create textarea element and attach CKEditor to it. + $CKEditor->editor("editor1", $initialValue); + ?> + +

+
+
+ + + diff --git a/ckeditor/_samples/replacebyclass.html b/ckeditor/_samples/replacebyclass.html new file mode 100644 index 0000000..fd31e7d --- /dev/null +++ b/ckeditor/_samples/replacebyclass.html @@ -0,0 +1,49 @@ + + + + + Replace Textareas by Class Name - CKEditor Sample + + + + + + +

+ CKEditor Sample +

+ +
+ +
+
+

+
+ +

+

+ +

+
+ + + diff --git a/ckeditor/_samples/replacebycode.html b/ckeditor/_samples/replacebycode.html new file mode 100644 index 0000000..bd3f54d --- /dev/null +++ b/ckeditor/_samples/replacebycode.html @@ -0,0 +1,80 @@ + + + + + Replace Textarea by Code - CKEditor Sample + + + + + + +

+ CKEditor Sample +

+ +
+ +
+
+

+
+ + +

+

+
+ + +

+

+ +

+
+ + + diff --git a/ckeditor/_samples/sample.css b/ckeditor/_samples/sample.css new file mode 100644 index 0000000..cee85e8 --- /dev/null +++ b/ckeditor/_samples/sample.css @@ -0,0 +1,81 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +fieldset +{ + margin: 0; + padding: 10px; +} + +form +{ + margin: 0; + padding: 0; +} + +pre +{ + background-color: #F7F7F7; + border: 1px solid #D7D7D7; + overflow: auto; + margin: 0; + padding: 0.25em; +} + +#alerts +{ + color: Red; +} + +#footer hr +{ + margin: 10px 0 15px 0; + height: 1px; + border: solid 1px gray; + border-bottom: none; +} + +#footer p +{ + margin: 0 10px 10px 10px; + float: left; +} + +#footer #copy +{ + float: right; +} + +#outputSample +{ + width: 100%; + table-layout: fixed; +} + +#outputSample thead th +{ + color: #dddddd; + background-color: #999999; + padding: 4px; + white-space: nowrap; +} + +#outputSample tbody th +{ + vertical-align: top; + text-align: left; +} + +#outputSample pre +{ + margin: 0; + padding: 0; + white-space: pre; /* CSS2 */ + white-space: -moz-pre-wrap; /* Mozilla*/ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS 2.1 */ + white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */ + word-wrap: break-word; /* IE */ +} diff --git a/ckeditor/_samples/sample.js b/ckeditor/_samples/sample.js new file mode 100644 index 0000000..f7c023c --- /dev/null +++ b/ckeditor/_samples/sample.js @@ -0,0 +1,65 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +// This file is not required by CKEditor and may be safely ignored. +// It is just a helper file that displays a red message about browser compatibility +// at the top of the samples (if incompatible browser is detected). + +if ( window.CKEDITOR ) +{ + (function() + { + var showCompatibilityMsg = function() + { + var env = CKEDITOR.env; + + var html = '

Your browser is not compatible with CKEditor.'; + + var browsers = + { + gecko : 'Firefox 2.0', + ie : 'Internet Explorer 6.0', + opera : 'Opera 9.5', + webkit : 'Safari 3.0' + }; + + var alsoBrowsers = ''; + + for ( var key in env ) + { + if ( browsers[ key ] ) + { + if ( env[key] ) + html += ' CKEditor is compatible with ' + browsers[ key ] + ' or higher.'; + else + alsoBrowsers += browsers[ key ] + '+, '; + } + } + + alsoBrowsers = alsoBrowsers.replace( /\+,([^,]+), $/, '+ and $1' ); + + html += ' It is also compatible with ' + alsoBrowsers + '.'; + + html += '

With non compatible browsers, you should still be able to see and edit the contents (HTML) in a plain text field.

'; + + var alertsEl = document.getElementById( 'alerts' ); + alertsEl && ( alertsEl.innerHTML = html ); + }; + + var onload = function() + { + // Show a friendly compatibility message as soon as the page is loaded, + // for those browsers that are not compatible with CKEditor. + if ( !CKEDITOR.env.isCompatible ) + showCompatibilityMsg(); + }; + + // Register the onload listener. + if ( window.addEventListener ) + window.addEventListener( 'load', onload, false ); + else if ( window.attachEvent ) + window.attachEvent( 'onload', onload ); + })(); +} diff --git a/ckeditor/_samples/sample_posteddata.php b/ckeditor/_samples/sample_posteddata.php new file mode 100644 index 0000000..af20e89 --- /dev/null +++ b/ckeditor/_samples/sample_posteddata.php @@ -0,0 +1,59 @@ + + + + + Sample - CKEditor + + + + +

+ CKEditor - Posted Data +

+ + + + + + + + + $value ) +{ + if ( get_magic_quotes_gpc() ) + $postedValue = htmlspecialchars( stripslashes( $value ) ) ; + else + $postedValue = htmlspecialchars( $value ) ; + +?> + + + + + +
Field NameValue
+ + + diff --git a/ckeditor/_samples/sharedspaces.html b/ckeditor/_samples/sharedspaces.html new file mode 100644 index 0000000..7b32b9f --- /dev/null +++ b/ckeditor/_samples/sharedspaces.html @@ -0,0 +1,131 @@ + + + + + Shared toolbars - CKEditor Sample + + + + + + + +

+ CKEditor Sample +

+ +
+ +
+
+
+
+

+
+ +

+

+
+ +

+

+
+ +

+

+
+ +

+

+ +

+
+
+
+ + + + diff --git a/ckeditor/_samples/skins.html b/ckeditor/_samples/skins.html new file mode 100644 index 0000000..7f8ea83 --- /dev/null +++ b/ckeditor/_samples/skins.html @@ -0,0 +1,83 @@ + + + + + Skins - CKEditor Sample + + + + + + +

+ CKEditor Sample +

+ +
+ +
+
+

+ "Kama" skin:
+ + +

+

+ "Office 2003" skin:
+ + +

+

+ "V2" skin:
+ + +

+
+ + + diff --git a/ckeditor/_samples/ui_color.html b/ckeditor/_samples/ui_color.html new file mode 100644 index 0000000..8ba1acf --- /dev/null +++ b/ckeditor/_samples/ui_color.html @@ -0,0 +1,87 @@ + + + + + UI Color Setting Tool - CKEditor Sample + + + + + + +

+ CKEditor Sample +

+ +
+ +
+

+ Click the UI Color Picker button to test your color preferences at runtime.

+
+

+ + +

+

+ + +

+

+ +

+
+ + + diff --git a/ckeditor/_samples/ui_languages.html b/ckeditor/_samples/ui_languages.html new file mode 100644 index 0000000..e7c2e15 --- /dev/null +++ b/ckeditor/_samples/ui_languages.html @@ -0,0 +1,103 @@ + + + + + User Interface Globalization - CKEditor Sample + + + + + + + +

+ CKEditor Sample +

+ +
+ +
+
+

+ Available languages ( languages!):
+ +
+ (You may see strange characters if your system doesn't + support the selected language) +

+

+ + +

+
+ + + diff --git a/ckeditor/_source/adapters/jquery.js b/ckeditor/_source/adapters/jquery.js new file mode 100644 index 0000000..e633758 --- /dev/null +++ b/ckeditor/_source/adapters/jquery.js @@ -0,0 +1,297 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview jQuery adapter provides easy use of basic CKEditor functions + * and access to internal API. It also integrates some aspects of CKEditor with + * jQuery framework. + * + * Every TEXTAREA, DIV and P elements can be converted to working editor. + * + * Plugin exposes some of editor's event to jQuery event system. All of those are namespaces inside + * ".ckeditor" namespace and can be binded/listened on supported textarea, div and p nodes. + * + * Available jQuery events: + * - instanceReady.ckeditor( editor, rootNode ) + * Triggered when new instance is ready. + * - destroy.ckeditor( editor ) + * Triggered when instance is destroyed. + * - getData.ckeditor( editor, eventData ) + * Triggered when getData event is fired inside editor. It can change returned data using eventData reference. + * - setData.ckeditor( editor ) + * Triggered when getData event is fired inside editor. + * + * @example + * + * + * + */ + +(function() +{ + /** + * Allow CKEditor to override jQuery.fn.val(). This results in ability to use val() + * function on textareas as usual and having those calls synchronized with CKEditor + * Rich Text Editor component. + * + * This config option is global and executed during plugin load. + * Can't be customized across editor instances. + * + * @type Boolean + * @example + * $( 'textarea' ).ckeditor(); + * // ... + * $( 'textarea' ).val( 'New content' ); + */ + CKEDITOR.config.jqueryOverrideVal = typeof CKEDITOR.config.jqueryOverrideVal == 'undefined' + ? true : CKEDITOR.config.jqueryOverrideVal; + + var jQuery = window.jQuery; + + if ( typeof jQuery == 'undefined' ) + return; + + // jQuery object methods. + jQuery.extend( jQuery.fn, + /** @lends jQuery.fn */ + { + /** + * Return existing CKEditor instance for first matched element. + * Allows to easily use internal API. Doesn't return jQuery object. + * + * Raised exception if editor doesn't exist or isn't ready yet. + * + * @name jQuery.ckeditorGet + * @return CKEDITOR.editor + * @see CKEDITOR.editor + */ + ckeditorGet: function() + { + var instance = this.eq( 0 ).data( 'ckeditorInstance' ); + if ( !instance ) + throw "CKEditor not yet initialized, use ckeditor() with callback."; + return instance; + }, + /** + * Triggers creation of CKEditor in all matched elements (reduced to DIV, P and TEXTAREAs). + * Binds callback to instanceReady event of all instances. If editor is already created, than + * callback is fired right away. + * + * Mixed parameter order allowed. + * + * @param callback Function to be run on editor instance. Passed parameters: [ textarea ]. + * Callback is fiered in "this" scope being ckeditor instance and having source textarea as first param. + * + * @param config Configuration options for new instance(s) if not already created. + * See URL + * + * @example + * $( 'textarea' ).ckeditor( function( textarea ) { + * $( textarea ).val( this.getData() ) + * } ); + * + * @name jQuery.fn.ckeditor + * @return jQuery.fn + */ + ckeditor: function( callback, config ) + { + if ( !jQuery.isFunction( callback )) + { + var tmp = config; + config = callback; + callback = tmp; + } + config = config || {}; + + this.filter( 'textarea, div, p' ).each( function() + { + var $element = jQuery( this ), + editor = $element.data( 'ckeditorInstance' ), + instanceLock = $element.data( '_ckeditorInstanceLock' ), + element = this; + + if ( editor && !instanceLock ) + { + if ( callback ) + callback.apply( editor, [ this ] ); + } + else if ( !instanceLock ) + { + // CREATE NEW INSTANCE + + // Handle config.autoUpdateElement inside this plugin if desired. + if ( config.autoUpdateElement + || ( typeof config.autoUpdateElement == 'undefined' && CKEDITOR.config.autoUpdateElement ) ) + { + config.autoUpdateElementJquery = true; + } + + // Always disable config.autoUpdateElement. + config.autoUpdateElement = false; + $element.data( '_ckeditorInstanceLock', true ); + + // Set instance reference in element's data. + editor = CKEDITOR.replace( element, config ); + $element.data( 'ckeditorInstance', editor ); + + // Register callback. + editor.on( 'instanceReady', function( event ) + { + var editor = event.editor; + setTimeout( function() + { + // Delay bit more if editor is still not ready. + if ( !editor.element ) + { + setTimeout( arguments.callee, 100 ); + return; + } + + // Remove this listener. + event.removeListener( 'instanceReady', this.callee ); + + // Forward setData on dataReady. + editor.on( 'dataReady', function() + { + $element.trigger( 'setData' + '.ckeditor', [ editor ] ); + }); + + // Forward getData. + editor.on( 'getData', function( event ) { + $element.trigger( 'getData' + '.ckeditor', [ editor, event.data ] ); + }, 999 ); + + // Forward destroy event. + editor.on( 'destroy', function() + { + $element.trigger( 'destroy.ckeditor', [ editor ] ); + }); + + // Integrate with form submit. + if ( editor.config.autoUpdateElementJquery && $element.is( 'textarea' ) && $element.parents( 'form' ).length ) + { + var onSubmit = function() + { + $element.ckeditor( function() + { + editor.updateElement(); + }); + }; + + // Bind to submit event. + $element.parents( 'form' ).submit( onSubmit ); + + // Bind to form-pre-serialize from jQuery Forms plugin. + $element.parents( 'form' ).bind( 'form-pre-serialize', onSubmit ); + + // Unbind when editor destroyed. + $element.bind( 'destroy.ckeditor', function() + { + $element.parents( 'form' ).unbind( 'submit', onSubmit ); + $element.parents( 'form' ).unbind( 'form-pre-serialize', onSubmit ); + }); + } + + // Garbage collect on destroy. + editor.on( 'destroy', function() + { + $element.data( 'ckeditorInstance', null ); + }); + + // Remove lock. + $element.data( '_ckeditorInstanceLock', null ); + + // Fire instanceReady event. + $element.trigger( 'instanceReady.ckeditor', [ editor ] ); + + // Run given (first) code. + if ( callback ) + callback.apply( editor, [ element ] ); + }, 0 ); + }, null, null, 9999); + } + else + { + // Editor is already during creation process, bind our code to the event. + CKEDITOR.on( 'instanceReady', function( event ) + { + var editor = event.editor; + setTimeout( function() + { + // Delay bit more if editor is still not ready. + if ( !editor.element ) + { + setTimeout( arguments.callee, 100 ); + return; + } + + if ( editor.element.$ == element ) + { + // Run given code. + if ( callback ) + callback.apply( editor, [ element ] ); + } + }, 0 ); + }, null, null, 9999); + } + }); + return this; + } + }); + + // New val() method for objects. + if ( CKEDITOR.config.jqueryOverrideVal ) + { + jQuery.fn.val = CKEDITOR.tools.override( jQuery.fn.val, function( oldValMethod ) + { + /** + * CKEditor-aware val() method. + * + * Acts same as original jQuery val(), but for textareas which have CKEditor instances binded to them, method + * returns editor's content. It also works for settings values. + * + * @param oldValMethod + * @name jQuery.fn.val + */ + return function( newValue, forceNative ) + { + var isSetter = typeof newValue != 'undefined', + result; + + this.each( function() + { + var $this = jQuery( this ), + editor = $this.data( 'ckeditorInstance' ); + + if ( !forceNative && $this.is( 'textarea' ) && editor ) + { + if ( isSetter ) + editor.setData( newValue ); + else + { + result = editor.getData(); + // break; + return null; + } + } + else + { + if ( isSetter ) + oldValMethod.call( $this, newValue ); + else + { + result = oldValMethod.call( $this ); + // break; + return null; + } + } + + return true; + }); + return isSetter ? this : result; + }; + }); + } +})(); diff --git a/ckeditor/_source/core/_bootstrap.js b/ckeditor/_source/core/_bootstrap.js new file mode 100644 index 0000000..f351ce6 --- /dev/null +++ b/ckeditor/_source/core/_bootstrap.js @@ -0,0 +1,91 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview API initialization code. + */ + +(function() +{ + // Disable HC detaction in WebKit. (#5429) + if ( CKEDITOR.env.webkit ) + { + CKEDITOR.env.hc = false; + return; + } + + // Check is High Contrast is active by creating a temporary element with a + // background image. + + var useSpacer = CKEDITOR.env.ie && CKEDITOR.env.version < 7, + useBlank = CKEDITOR.env.ie && CKEDITOR.env.version == 7; + + var backgroundImageUrl = useSpacer ? ( CKEDITOR.basePath + 'images/spacer.gif' ) : + useBlank ? 'about:blank' : 'data:image/png;base64,'; + + var hcDetect = CKEDITOR.dom.element.createFromHtml( + '
', CKEDITOR.document ); + + hcDetect.appendTo( CKEDITOR.document.getHead() ); + + // Update CKEDITOR.env. + // Catch exception needed sometimes for FF. (#4230) + try + { + CKEDITOR.env.hc = ( hcDetect.getComputedStyle( 'background-image' ) == 'none' ); + } + catch (e) + { + CKEDITOR.env.hc = false; + } + + if ( CKEDITOR.env.hc ) + CKEDITOR.env.cssClass += ' cke_hc'; + + hcDetect.remove(); +})(); + +// Load core plugins. +CKEDITOR.plugins.load( CKEDITOR.config.corePlugins.split( ',' ), function() + { + CKEDITOR.status = 'loaded'; + CKEDITOR.fire( 'loaded' ); + + // Process all instances created by the "basic" implementation. + var pending = CKEDITOR._.pending; + if ( pending ) + { + delete CKEDITOR._.pending; + + for ( var i = 0 ; i < pending.length ; i++ ) + CKEDITOR.add( pending[ i ] ); + } + }); + +/* +TODO: Enable the following and check if effective. + +if ( CKEDITOR.env.ie ) +{ + // Remove IE mouse flickering on IE6 because of background images. + try + { + document.execCommand( 'BackgroundImageCache', false, true ); + } + catch (e) + { + // We have been reported about loading problems caused by the above + // line. For safety, let's just ignore errors. + } +} +*/ + +/** + * Fired when a CKEDITOR core object is fully loaded and ready for interaction. + * @name CKEDITOR#loaded + * @event + */ diff --git a/ckeditor/_source/core/ajax.js b/ckeditor/_source/core/ajax.js new file mode 100644 index 0000000..078c15a --- /dev/null +++ b/ckeditor/_source/core/ajax.js @@ -0,0 +1,143 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview Defines the {@link CKEDITOR.ajax} object, which holds ajax methods for + * data loading. + */ + +/** + * Ajax methods for data loading. + * @namespace + * @example + */ +CKEDITOR.ajax = (function() +{ + var createXMLHttpRequest = function() + { + // In IE, using the native XMLHttpRequest for local files may throw + // "Access is Denied" errors. + if ( !CKEDITOR.env.ie || location.protocol != 'file:' ) + try { return new XMLHttpRequest(); } catch(e) {} + + try { return new ActiveXObject( 'Msxml2.XMLHTTP' ); } catch (e) {} + try { return new ActiveXObject( 'Microsoft.XMLHTTP' ); } catch (e) {} + + return null; + }; + + var checkStatus = function( xhr ) + { + // HTTP Status Codes: + // 2xx : Success + // 304 : Not Modified + // 0 : Returned when running locally (file://) + // 1223 : IE may change 204 to 1223 (see http://dev.jquery.com/ticket/1450) + + return ( xhr.readyState == 4 && + ( ( xhr.status >= 200 && xhr.status < 300 ) || + xhr.status == 304 || + xhr.status === 0 || + xhr.status == 1223 ) ); + }; + + var getResponseText = function( xhr ) + { + if ( checkStatus( xhr ) ) + return xhr.responseText; + return null; + }; + + var getResponseXml = function( xhr ) + { + if ( checkStatus( xhr ) ) + { + var xml = xhr.responseXML; + return new CKEDITOR.xml( xml && xml.firstChild ? xml : xhr.responseText ); + } + return null; + }; + + var load = function( url, callback, getResponseFn ) + { + var async = !!callback; + + var xhr = createXMLHttpRequest(); + + if ( !xhr ) + return null; + + xhr.open( 'GET', url, async ); + + if ( async ) + { + // TODO: perform leak checks on this closure. + /** @ignore */ + xhr.onreadystatechange = function() + { + if ( xhr.readyState == 4 ) + { + callback( getResponseFn( xhr ) ); + xhr = null; + } + }; + } + + xhr.send(null); + + return async ? '' : getResponseFn( xhr ); + }; + + return /** @lends CKEDITOR.ajax */ { + + /** + * Loads data from an URL as plain text. + * @param {String} url The URL from which load data. + * @param {Function} [callback] A callback function to be called on + * data load. If not provided, the data will be loaded + * asynchronously, passing the data value the function on load. + * @returns {String} The loaded data. For asynchronous requests, an + * empty string. For invalid requests, null. + * @example + * // Load data synchronously. + * var data = CKEDITOR.ajax.load( 'somedata.txt' ); + * alert( data ); + * @example + * // Load data asynchronously. + * var data = CKEDITOR.ajax.load( 'somedata.txt', function( data ) + * { + * alert( data ); + * } ); + */ + load : function( url, callback ) + { + return load( url, callback, getResponseText ); + }, + + /** + * Loads data from an URL as XML. + * @param {String} url The URL from which load data. + * @param {Function} [callback] A callback function to be called on + * data load. If not provided, the data will be loaded + * asynchronously, passing the data value the function on load. + * @returns {CKEDITOR.xml} An XML object holding the loaded data. For asynchronous requests, an + * empty string. For invalid requests, null. + * @example + * // Load XML synchronously. + * var xml = CKEDITOR.ajax.loadXml( 'somedata.xml' ); + * alert( xml.getInnerXml( '//' ) ); + * @example + * // Load XML asynchronously. + * var data = CKEDITOR.ajax.loadXml( 'somedata.xml', function( xml ) + * { + * alert( xml.getInnerXml( '//' ) ); + * } ); + */ + loadXml : function( url, callback ) + { + return load( url, callback, getResponseXml ); + } + }; +})(); diff --git a/ckeditor/_source/core/ckeditor.js b/ckeditor/_source/core/ckeditor.js new file mode 100644 index 0000000..068da31 --- /dev/null +++ b/ckeditor/_source/core/ckeditor.js @@ -0,0 +1,113 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview Contains the third and last part of the {@link CKEDITOR} object + * definition. + */ + +// Remove the CKEDITOR.loadFullCore reference defined on ckeditor_basic. +delete CKEDITOR.loadFullCore; + +/** + * Holds references to all editor instances created. The name of the properties + * in this object correspond to instance names, and their values contains the + * {@link CKEDITOR.editor} object representing them. + * @type {Object} + * @example + * alert( CKEDITOR.instances.editor1.name ); // "editor1" + */ +CKEDITOR.instances = {}; + +/** + * The document of the window holding the CKEDITOR object. + * @type {CKEDITOR.dom.document} + * @example + * alert( CKEDITOR.document.getBody().getName() ); // "body" + */ +CKEDITOR.document = new CKEDITOR.dom.document( document ); + +/** + * Adds an editor instance to the global {@link CKEDITOR} object. This function + * is available for internal use mainly. + * @param {CKEDITOR.editor} editor The editor instance to be added. + * @example + */ +CKEDITOR.add = function( editor ) +{ + CKEDITOR.instances[ editor.name ] = editor; + + editor.on( 'focus', function() + { + if ( CKEDITOR.currentInstance != editor ) + { + CKEDITOR.currentInstance = editor; + CKEDITOR.fire( 'currentInstance' ); + } + }); + + editor.on( 'blur', function() + { + if ( CKEDITOR.currentInstance == editor ) + { + CKEDITOR.currentInstance = null; + CKEDITOR.fire( 'currentInstance' ); + } + }); +}; + +/** + * Removes and editor instance from the global {@link CKEDITOR} object. his function + * is available for internal use mainly. + * @param {CKEDITOR.editor} editor The editor instance to be added. + * @example + */ +CKEDITOR.remove = function( editor ) +{ + delete CKEDITOR.instances[ editor.name ]; +}; + +/** + * Perform global clean up to free as much memory as possible + * when there are no instances left + */ +CKEDITOR.on( 'instanceDestroyed', function () + { + if ( CKEDITOR.tools.isEmpty( this.instances ) ) + CKEDITOR.fire( 'reset' ); + }); + +// Load the bootstrap script. +CKEDITOR.loader.load( 'core/_bootstrap' ); // @Packager.RemoveLine + +// Tri-state constants. + +/** + * Used to indicate the ON or ACTIVE state. + * @constant + * @example + */ +CKEDITOR.TRISTATE_ON = 1; + +/** + * Used to indicate the OFF or NON ACTIVE state. + * @constant + * @example + */ +CKEDITOR.TRISTATE_OFF = 2; + +/** + * Used to indicate DISABLED state. + * @constant + * @example + */ +CKEDITOR.TRISTATE_DISABLED = 0; + +/** + * Fired when the CKEDITOR.currentInstance object reference changes. This may + * happen when setting the focus on different editor instances in the page. + * @name CKEDITOR#currentInstance + * @event + */ diff --git a/ckeditor/_source/core/ckeditor_base.js b/ckeditor/_source/core/ckeditor_base.js new file mode 100644 index 0000000..75d2d0e --- /dev/null +++ b/ckeditor/_source/core/ckeditor_base.js @@ -0,0 +1,193 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview Contains the first and essential part of the {@link CKEDITOR} + * object definition. + */ + +// #### Compressed Code +// Must be updated on changes in the script, as well as updated in the +// ckeditor_source.js and ckeditor_basic_source.js files. + +// if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',version:'3.4.1',rev:'5892',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f=0?'&':'?')+('t=')+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})(); + +// #### Raw code +// ATTENTION: read the above "Compressed Code" notes when changing this code. + +if ( !window.CKEDITOR ) +{ + /** + * This is the API entry point. The entire CKEditor code runs under this object. + * @name CKEDITOR + * @namespace + * @example + */ + window.CKEDITOR = (function() + { + var CKEDITOR = + /** @lends CKEDITOR */ + { + + /** + * A constant string unique for each release of CKEditor. Its value + * is used, by default, to build the URL for all resources loaded + * by the editor code, guaranteing clean cache results when + * upgrading. + * @type String + * @example + * alert( CKEDITOR.timestamp ); // e.g. '87dm' + */ + // The production implementation contains a fixed timestamp, unique + // for each release, generated by the releaser. + // (Base 36 value of each component of YYMMDDHH - 4 chars total - e.g. 87bm == 08071122) + timestamp : 'A8LE4JO', + + /** + * Contains the CKEditor version number. + * @type String + * @example + * alert( CKEDITOR.version ); // e.g. 'CKEditor 3.0 Beta' + */ + version : '3.4.1', + + /** + * Contains the CKEditor revision number. + * Revision number is incremented automatically after each modification of CKEditor source code. + * @type String + * @example + * alert( CKEDITOR.revision ); // e.g. '3975' + */ + revision : '5892', + + /** + * Private object used to hold core stuff. It should not be used out of + * the API code as properties defined here may change at any time + * without notice. + * @private + */ + _ : {}, + + /** + * Indicates the API loading status. The following status are available: + * + * @type String + * @example + * if ( CKEDITOR.status == 'ready' ) + * { + * // The API can now be fully used. + * } + */ + status : 'unloaded', + + /** + * Contains the full URL for the CKEditor installation directory. + * It's possible to manually provide the base path by setting a + * global variable named CKEDITOR_BASEPATH. This global variable + * must be set "before" the editor script loading. + * @type String + * @example + * alert( CKEDITOR.basePath ); // "http://www.example.com/ckeditor/" (e.g.) + */ + basePath : (function() + { + // ATTENTION: fixes on this code must be ported to + // var basePath in "core/loader.js". + + // Find out the editor directory path, based on its ")' ); + } + } + + return $ && new CKEDITOR.dom.document( $.contentWindow.document ); + }, + + /** + * Copy all the attributes from one node to the other, kinda like a clone + * skipAttributes is an object with the attributes that must NOT be copied. + * @param {CKEDITOR.dom.element} dest The destination element. + * @param {Object} skipAttributes A dictionary of attributes to skip. + * @example + */ + copyAttributes : function( dest, skipAttributes ) + { + var attributes = this.$.attributes; + skipAttributes = skipAttributes || {}; + + for ( var n = 0 ; n < attributes.length ; n++ ) + { + var attribute = attributes[n]; + + // Lowercase attribute name hard rule is broken for + // some attribute on IE, e.g. CHECKED. + var attrName = attribute.nodeName.toLowerCase(), + attrValue; + + // We can set the type only once, so do it with the proper value, not copying it. + if ( attrName in skipAttributes ) + continue; + + if ( attrName == 'checked' && ( attrValue = this.getAttribute( attrName ) ) ) + dest.setAttribute( attrName, attrValue ); + // IE BUG: value attribute is never specified even if it exists. + else if ( attribute.specified || + ( CKEDITOR.env.ie && attribute.nodeValue && attrName == 'value' ) ) + { + attrValue = this.getAttribute( attrName ); + if ( attrValue === null ) + attrValue = attribute.nodeValue; + + dest.setAttribute( attrName, attrValue ); + } + } + + // The style: + if ( this.$.style.cssText !== '' ) + dest.$.style.cssText = this.$.style.cssText; + }, + + /** + * Changes the tag name of the current element. + * @param {String} newTag The new tag for the element. + */ + renameNode : function( newTag ) + { + // If it's already correct exit here. + if ( this.getName() == newTag ) + return; + + var doc = this.getDocument(); + + // Create the new node. + var newNode = new CKEDITOR.dom.element( newTag, doc ); + + // Copy all attributes. + this.copyAttributes( newNode ); + + // Move children to the new node. + this.moveChildren( newNode ); + + // Replace the node. + this.getParent() && this.$.parentNode.replaceChild( newNode.$, this.$ ); + newNode.$._cke_expando = this.$._cke_expando; + this.$ = newNode.$; + }, + + /** + * Gets a DOM tree descendant under the current node. + * @param {Array|Number} indices The child index or array of child indices under the node. + * @returns {CKEDITOR.dom.node} The specified DOM child under the current node. Null if child does not exist. + * @example + * var strong = p.getChild(0); + */ + getChild : function( indices ) + { + var rawNode = this.$; + + if ( !indices.slice ) + rawNode = rawNode.childNodes[ indices ]; + else + { + while ( indices.length > 0 && rawNode ) + rawNode = rawNode.childNodes[ indices.shift() ]; + } + + return rawNode ? new CKEDITOR.dom.node( rawNode ) : null; + }, + + getChildCount : function() + { + return this.$.childNodes.length; + }, + + disableContextMenu : function() + { + this.on( 'contextmenu', function( event ) + { + // Cancel the browser context menu. + if ( !event.data.getTarget().hasClass( 'cke_enable_context_menu' ) ) + event.data.preventDefault(); + } ); + }, + + /** + * Update the element's size with box model awareness. + * @name CKEDITOR.dom.element.setSize + * @param {String} type [width|height] + * @param {Number} size The length unit in px. + * @param isBorderBox Apply the {@param width} and {@param height} based on border box model. + */ + setSize : ( function() + { + var sides = { + width : [ "border-left-width", "border-right-width","padding-left", "padding-right" ], + height : [ "border-top-width", "border-bottom-width", "padding-top", "padding-bottom" ] + }; + + return function( type, size, isBorderBox ) + { + if ( typeof size == 'number' ) + { + if ( isBorderBox && !( CKEDITOR.env.ie && CKEDITOR.env.quirks ) ) + { + var adjustment = 0; + for ( var i = 0, len = sides [ type ].length; i < len; i++ ) + adjustment += parseInt( this.getComputedStyle( sides [ type ][ i ] ) || 0, 10 ); + size -= adjustment; + } + this.setStyle( type, size + 'px' ); + } + }; + })() + }); diff --git a/ckeditor/_source/core/dom/elementpath.js b/ckeditor/_source/core/dom/elementpath.js new file mode 100644 index 0000000..3c74a92 --- /dev/null +++ b/ckeditor/_source/core/dom/elementpath.js @@ -0,0 +1,116 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +(function() +{ + // Elements that may be considered the "Block boundary" in an element path. + var pathBlockElements = { address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1 }; + + // Elements that may be considered the "Block limit" in an element path. + var pathBlockLimitElements = { body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1 }; + + // Check if an element contains any block element. + var checkHasBlock = function( element ) + { + var childNodes = element.getChildren(); + + for ( var i = 0, count = childNodes.count() ; i < count ; i++ ) + { + var child = childNodes.getItem( i ); + + if ( child.type == CKEDITOR.NODE_ELEMENT && CKEDITOR.dtd.$block[ child.getName() ] ) + return true; + } + + return false; + }; + + CKEDITOR.dom.elementPath = function( lastNode ) + { + var block = null; + var blockLimit = null; + var elements = []; + + var e = lastNode; + + while ( e ) + { + if ( e.type == CKEDITOR.NODE_ELEMENT ) + { + if ( !this.lastElement ) + this.lastElement = e; + + var elementName = e.getName(); + if ( CKEDITOR.env.ie && e.$.scopeName != 'HTML' ) + elementName = e.$.scopeName.toLowerCase() + ':' + elementName; + + if ( !blockLimit ) + { + if ( !block && pathBlockElements[ elementName ] ) + block = e; + + if ( pathBlockLimitElements[ elementName ] ) + { + // DIV is considered the Block, if no block is available (#525) + // and if it doesn't contain other blocks. + if ( !block && elementName == 'div' && !checkHasBlock( e ) ) + block = e; + else + blockLimit = e; + } + } + + elements.push( e ); + + if ( elementName == 'body' ) + break; + } + e = e.getParent(); + } + + this.block = block; + this.blockLimit = blockLimit; + this.elements = elements; + }; +})(); + +CKEDITOR.dom.elementPath.prototype = +{ + /** + * Compares this element path with another one. + * @param {CKEDITOR.dom.elementPath} otherPath The elementPath object to be + * compared with this one. + * @returns {Boolean} "true" if the paths are equal, containing the same + * number of elements and the same elements in the same order. + */ + compare : function( otherPath ) + { + var thisElements = this.elements; + var otherElements = otherPath && otherPath.elements; + + if ( !otherElements || thisElements.length != otherElements.length ) + return false; + + for ( var i = 0 ; i < thisElements.length ; i++ ) + { + if ( !thisElements[ i ].equals( otherElements[ i ] ) ) + return false; + } + + return true; + }, + + contains : function( tagNames ) + { + var elements = this.elements; + for ( var i = 0 ; i < elements.length ; i++ ) + { + if ( elements[ i ].getName() in tagNames ) + return elements[ i ]; + } + + return null; + } +}; diff --git a/ckeditor/_source/core/dom/event.js b/ckeditor/_source/core/dom/event.js new file mode 100644 index 0000000..cf7d66c --- /dev/null +++ b/ckeditor/_source/core/dom/event.js @@ -0,0 +1,142 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview Defines the {@link CKEDITOR.dom.event} class, which + * represents the a native DOM event object. + */ + +/** + * Represents a native DOM event object. + * @constructor + * @param {Object} domEvent A native DOM event object. + * @example + */ +CKEDITOR.dom.event = function( domEvent ) +{ + /** + * The native DOM event object represented by this class instance. + * @type Object + * @example + */ + this.$ = domEvent; +}; + +CKEDITOR.dom.event.prototype = +{ + /** + * Gets the key code associated to the event. + * @returns {Number} The key code. + * @example + * alert( event.getKey() ); "65" is "a" has been pressed + */ + getKey : function() + { + return this.$.keyCode || this.$.which; + }, + + /** + * Gets a number represeting the combination of the keys pressed during the + * event. It is the sum with the current key code and the {@link CKEDITOR.CTRL}, + * {@link CKEDITOR.SHIFT} and {@link CKEDITOR.ALT} constants. + * @returns {Number} The number representing the keys combination. + * @example + * alert( event.getKeystroke() == 65 ); // "a" key + * alert( event.getKeystroke() == CKEDITOR.CTRL + 65 ); // CTRL + "a" key + * alert( event.getKeystroke() == CKEDITOR.CTRL + CKEDITOR.SHIFT + 65 ); // CTRL + SHIFT + "a" key + */ + getKeystroke : function() + { + var keystroke = this.getKey(); + + if ( this.$.ctrlKey || this.$.metaKey ) + keystroke += CKEDITOR.CTRL; + + if ( this.$.shiftKey ) + keystroke += CKEDITOR.SHIFT; + + if ( this.$.altKey ) + keystroke += CKEDITOR.ALT; + + return keystroke; + }, + + /** + * Prevents the original behavior of the event to happen. It can optionally + * stop propagating the event in the event chain. + * @param {Boolean} [stopPropagation] Stop propagating this event in the + * event chain. + * @example + * var element = CKEDITOR.document.getById( 'myElement' ); + * element.on( 'click', function( ev ) + * { + * // The DOM event object is passed by the "data" property. + * var domEvent = ev.data; + * // Prevent the click to chave any effect in the element. + * domEvent.preventDefault(); + * }); + */ + preventDefault : function( stopPropagation ) + { + var $ = this.$; + if ( $.preventDefault ) + $.preventDefault(); + else + $.returnValue = false; + + if ( stopPropagation ) + this.stopPropagation(); + }, + + stopPropagation : function() + { + var $ = this.$; + if ( $.stopPropagation ) + $.stopPropagation(); + else + $.cancelBubble = true; + }, + + /** + * Returns the DOM node where the event was targeted to. + * @returns {CKEDITOR.dom.node} The target DOM node. + * @example + * var element = CKEDITOR.document.getById( 'myElement' ); + * element.on( 'click', function( ev ) + * { + * // The DOM event object is passed by the "data" property. + * var domEvent = ev.data; + * // Add a CSS class to the event target. + * domEvent.getTarget().addClass( 'clicked' ); + * }); + */ + + getTarget : function() + { + var rawNode = this.$.target || this.$.srcElement; + return rawNode ? new CKEDITOR.dom.node( rawNode ) : null; + } +}; + +/** + * CTRL key (1000). + * @constant + * @example + */ +CKEDITOR.CTRL = 1000; + +/** + * SHIFT key (2000). + * @constant + * @example + */ +CKEDITOR.SHIFT = 2000; + +/** + * ALT key (4000). + * @constant + * @example + */ +CKEDITOR.ALT = 4000; diff --git a/ckeditor/_source/core/dom/node.js b/ckeditor/_source/core/dom/node.js new file mode 100644 index 0000000..02a726c --- /dev/null +++ b/ckeditor/_source/core/dom/node.js @@ -0,0 +1,683 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview Defines the {@link CKEDITOR.dom.node} class, which is the base + * class for classes that represent DOM nodes. + */ + +/** + * Base class for classes representing DOM nodes. This constructor may return + * and instance of classes that inherits this class, like + * {@link CKEDITOR.dom.element} or {@link CKEDITOR.dom.text}. + * @augments CKEDITOR.dom.domObject + * @param {Object} domNode A native DOM node. + * @constructor + * @see CKEDITOR.dom.element + * @see CKEDITOR.dom.text + * @example + */ +CKEDITOR.dom.node = function( domNode ) +{ + if ( domNode ) + { + switch ( domNode.nodeType ) + { + // Safari don't consider document as element node type. (#3389) + case CKEDITOR.NODE_DOCUMENT : + return new CKEDITOR.dom.document( domNode ); + + case CKEDITOR.NODE_ELEMENT : + return new CKEDITOR.dom.element( domNode ); + + case CKEDITOR.NODE_TEXT : + return new CKEDITOR.dom.text( domNode ); + } + + // Call the base constructor. + CKEDITOR.dom.domObject.call( this, domNode ); + } + + return this; +}; + +CKEDITOR.dom.node.prototype = new CKEDITOR.dom.domObject(); + +/** + * Element node type. + * @constant + * @example + */ +CKEDITOR.NODE_ELEMENT = 1; + +/** + * Document node type. + * @constant + * @example + */ +CKEDITOR.NODE_DOCUMENT = 9; + +/** + * Text node type. + * @constant + * @example + */ +CKEDITOR.NODE_TEXT = 3; + +/** + * Comment node type. + * @constant + * @example + */ +CKEDITOR.NODE_COMMENT = 8; + +CKEDITOR.NODE_DOCUMENT_FRAGMENT = 11; + +CKEDITOR.POSITION_IDENTICAL = 0; +CKEDITOR.POSITION_DISCONNECTED = 1; +CKEDITOR.POSITION_FOLLOWING = 2; +CKEDITOR.POSITION_PRECEDING = 4; +CKEDITOR.POSITION_IS_CONTAINED = 8; +CKEDITOR.POSITION_CONTAINS = 16; + +CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, + /** @lends CKEDITOR.dom.node.prototype */ + { + /** + * Makes this node child of another element. + * @param {CKEDITOR.dom.element} element The target element to which append + * this node. + * @returns {CKEDITOR.dom.element} The target element. + * @example + * var p = new CKEDITOR.dom.element( 'p' ); + * var strong = new CKEDITOR.dom.element( 'strong' ); + * strong.appendTo( p ); + * + * // result: "<p><strong></strong></p>" + */ + appendTo : function( element, toStart ) + { + element.append( this, toStart ); + return element; + }, + + clone : function( includeChildren, cloneId ) + { + var $clone = this.$.cloneNode( includeChildren ); + + if ( !cloneId ) + { + var removeIds = function( node ) + { + if ( node.nodeType != CKEDITOR.NODE_ELEMENT ) + return; + + node.removeAttribute( 'id', false ) ; + node.removeAttribute( '_cke_expando', false ) ; + + var childs = node.childNodes; + for ( var i=0 ; i < childs.length ; i++ ) + removeIds( childs[ i ] ); + }; + + // The "id" attribute should never be cloned to avoid duplication. + removeIds( $clone ); + } + + return new CKEDITOR.dom.node( $clone ); + }, + + hasPrevious : function() + { + return !!this.$.previousSibling; + }, + + hasNext : function() + { + return !!this.$.nextSibling; + }, + + /** + * Inserts this element after a node. + * @param {CKEDITOR.dom.node} node The that will preceed this element. + * @returns {CKEDITOR.dom.node} The node preceeding this one after + * insertion. + * @example + * var em = new CKEDITOR.dom.element( 'em' ); + * var strong = new CKEDITOR.dom.element( 'strong' ); + * strong.insertAfter( em ); + * + * // result: "<em></em><strong></strong>" + */ + insertAfter : function( node ) + { + node.$.parentNode.insertBefore( this.$, node.$.nextSibling ); + return node; + }, + + /** + * Inserts this element before a node. + * @param {CKEDITOR.dom.node} node The that will be after this element. + * @returns {CKEDITOR.dom.node} The node being inserted. + * @example + * var em = new CKEDITOR.dom.element( 'em' ); + * var strong = new CKEDITOR.dom.element( 'strong' ); + * strong.insertBefore( em ); + * + * // result: "<strong></strong><em></em>" + */ + insertBefore : function( node ) + { + node.$.parentNode.insertBefore( this.$, node.$ ); + return node; + }, + + insertBeforeMe : function( node ) + { + this.$.parentNode.insertBefore( node.$, this.$ ); + return node; + }, + + /** + * Retrieves a uniquely identifiable tree address for this node. + * The tree address returns is an array of integers, with each integer + * indicating a child index of a DOM node, starting from + * document.documentElement. + * + * For example, assuming is the second child from ( + * being the first), and we'd like to address the third child under the + * fourth child of body, the tree address returned would be: + * [1, 3, 2] + * + * The tree address cannot be used for finding back the DOM tree node once + * the DOM tree structure has been modified. + */ + getAddress : function( normalized ) + { + var address = []; + var $documentElement = this.getDocument().$.documentElement; + var node = this.$; + + while ( node && node != $documentElement ) + { + var parentNode = node.parentNode; + var currentIndex = -1; + + if ( parentNode ) + { + for ( var i = 0 ; i < parentNode.childNodes.length ; i++ ) + { + var candidate = parentNode.childNodes[i]; + + if ( normalized && + candidate.nodeType == 3 && + candidate.previousSibling && + candidate.previousSibling.nodeType == 3 ) + { + continue; + } + + currentIndex++; + + if ( candidate == node ) + break; + } + + address.unshift( currentIndex ); + } + + node = parentNode; + } + + return address; + }, + + /** + * Gets the document containing this element. + * @returns {CKEDITOR.dom.document} The document. + * @example + * var element = CKEDITOR.document.getById( 'example' ); + * alert( element.getDocument().equals( CKEDITOR.document ) ); // "true" + */ + getDocument : function() + { + var document = new CKEDITOR.dom.document( this.$.ownerDocument || this.$.parentNode.ownerDocument ); + + return ( + this.getDocument = function() + { + return document; + })(); + }, + + getIndex : function() + { + var $ = this.$; + + var currentNode = $.parentNode && $.parentNode.firstChild; + var currentIndex = -1; + + while ( currentNode ) + { + currentIndex++; + + if ( currentNode == $ ) + return currentIndex; + + currentNode = currentNode.nextSibling; + } + + return -1; + }, + + getNextSourceNode : function( startFromSibling, nodeType, guard ) + { + // If "guard" is a node, transform it in a function. + if ( guard && !guard.call ) + { + var guardNode = guard; + guard = function( node ) + { + return !node.equals( guardNode ); + }; + } + + var node = ( !startFromSibling && this.getFirst && this.getFirst() ), + parent; + + // Guarding when we're skipping the current element( no children or 'startFromSibling' ). + // send the 'moving out' signal even we don't actually dive into. + if ( !node ) + { + if ( this.type == CKEDITOR.NODE_ELEMENT && guard && guard( this, true ) === false ) + return null; + node = this.getNext(); + } + + while ( !node && ( parent = ( parent || this ).getParent() ) ) + { + // The guard check sends the "true" paramenter to indicate that + // we are moving "out" of the element. + if ( guard && guard( parent, true ) === false ) + return null; + + node = parent.getNext(); + } + + if ( !node ) + return null; + + if ( guard && guard( node ) === false ) + return null; + + if ( nodeType && nodeType != node.type ) + return node.getNextSourceNode( false, nodeType, guard ); + + return node; + }, + + getPreviousSourceNode : function( startFromSibling, nodeType, guard ) + { + if ( guard && !guard.call ) + { + var guardNode = guard; + guard = function( node ) + { + return !node.equals( guardNode ); + }; + } + + var node = ( !startFromSibling && this.getLast && this.getLast() ), + parent; + + // Guarding when we're skipping the current element( no children or 'startFromSibling' ). + // send the 'moving out' signal even we don't actually dive into. + if ( !node ) + { + if ( this.type == CKEDITOR.NODE_ELEMENT && guard && guard( this, true ) === false ) + return null; + node = this.getPrevious(); + } + + while ( !node && ( parent = ( parent || this ).getParent() ) ) + { + // The guard check sends the "true" paramenter to indicate that + // we are moving "out" of the element. + if ( guard && guard( parent, true ) === false ) + return null; + + node = parent.getPrevious(); + } + + if ( !node ) + return null; + + if ( guard && guard( node ) === false ) + return null; + + if ( nodeType && node.type != nodeType ) + return node.getPreviousSourceNode( false, nodeType, guard ); + + return node; + }, + + getPrevious : function( evaluator ) + { + var previous = this.$, retval; + do + { + previous = previous.previousSibling; + retval = previous && new CKEDITOR.dom.node( previous ); + } + while ( retval && evaluator && !evaluator( retval ) ) + return retval; + }, + + /** + * Gets the node that follows this element in its parent's child list. + * @param {Function} evaluator Filtering the result node. + * @returns {CKEDITOR.dom.node} The next node or null if not available. + * @example + * var element = CKEDITOR.dom.element.createFromHtml( '<div><b>Example</b> <i>next</i></div>' ); + * var first = element.getFirst().getNext(); + * alert( first.getName() ); // "i" + */ + getNext : function( evaluator ) + { + var next = this.$, retval; + do + { + next = next.nextSibling; + retval = next && new CKEDITOR.dom.node( next ); + } + while ( retval && evaluator && !evaluator( retval ) ) + return retval; + }, + + /** + * Gets the parent element for this node. + * @returns {CKEDITOR.dom.element} The parent element. + * @example + * var node = editor.document.getBody().getFirst(); + * var parent = node.getParent(); + * alert( node.getName() ); // "body" + */ + getParent : function() + { + var parent = this.$.parentNode; + return ( parent && parent.nodeType == 1 ) ? new CKEDITOR.dom.node( parent ) : null; + }, + + getParents : function( closerFirst ) + { + var node = this; + var parents = []; + + do + { + parents[ closerFirst ? 'push' : 'unshift' ]( node ); + } + while ( ( node = node.getParent() ) ) + + return parents; + }, + + getCommonAncestor : function( node ) + { + if ( node.equals( this ) ) + return this; + + if ( node.contains && node.contains( this ) ) + return node; + + var start = this.contains ? this : this.getParent(); + + do + { + if ( start.contains( node ) ) + return start; + } + while ( ( start = start.getParent() ) ); + + return null; + }, + + getPosition : function( otherNode ) + { + var $ = this.$; + var $other = otherNode.$; + + if ( $.compareDocumentPosition ) + return $.compareDocumentPosition( $other ); + + // IE and Safari have no support for compareDocumentPosition. + + if ( $ == $other ) + return CKEDITOR.POSITION_IDENTICAL; + + // Only element nodes support contains and sourceIndex. + if ( this.type == CKEDITOR.NODE_ELEMENT && otherNode.type == CKEDITOR.NODE_ELEMENT ) + { + if ( $.contains ) + { + if ( $.contains( $other ) ) + return CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_PRECEDING; + + if ( $other.contains( $ ) ) + return CKEDITOR.POSITION_IS_CONTAINED + CKEDITOR.POSITION_FOLLOWING; + } + + if ( 'sourceIndex' in $ ) + { + return ( $.sourceIndex < 0 || $other.sourceIndex < 0 ) ? CKEDITOR.POSITION_DISCONNECTED : + ( $.sourceIndex < $other.sourceIndex ) ? CKEDITOR.POSITION_PRECEDING : + CKEDITOR.POSITION_FOLLOWING; + } + } + + // For nodes that don't support compareDocumentPosition, contains + // or sourceIndex, their "address" is compared. + + var addressOfThis = this.getAddress(), + addressOfOther = otherNode.getAddress(), + minLevel = Math.min( addressOfThis.length, addressOfOther.length ); + + // Determinate preceed/follow relationship. + for ( var i = 0 ; i <= minLevel - 1 ; i++ ) + { + if ( addressOfThis[ i ] != addressOfOther[ i ] ) + { + if ( i < minLevel ) + { + return addressOfThis[ i ] < addressOfOther[ i ] ? + CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_FOLLOWING; + } + break; + } + } + + // Determinate contains/contained relationship. + return ( addressOfThis.length < addressOfOther.length ) ? + CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_PRECEDING : + CKEDITOR.POSITION_IS_CONTAINED + CKEDITOR.POSITION_FOLLOWING; + }, + + /** + * Gets the closes ancestor node of a specified node name. + * @param {String} name Node name of ancestor node. + * @param {Boolean} includeSelf (Optional) Whether to include the current + * node in the calculation or not. + * @returns {CKEDITOR.dom.node} Ancestor node. + */ + getAscendant : function( name, includeSelf ) + { + var $ = this.$; + + if ( !includeSelf ) + $ = $.parentNode; + + while ( $ ) + { + if ( $.nodeName && $.nodeName.toLowerCase() == name ) + return new CKEDITOR.dom.node( $ ); + + $ = $.parentNode; + } + return null; + }, + + hasAscendant : function( name, includeSelf ) + { + var $ = this.$; + + if ( !includeSelf ) + $ = $.parentNode; + + while ( $ ) + { + if ( $.nodeName && $.nodeName.toLowerCase() == name ) + return true; + + $ = $.parentNode; + } + return false; + }, + + move : function( target, toStart ) + { + target.append( this.remove(), toStart ); + }, + + /** + * Removes this node from the document DOM. + * @param {Boolean} [preserveChildren] Indicates that the children + * elements must remain in the document, removing only the outer + * tags. + * @example + * var element = CKEDITOR.dom.element.getById( 'MyElement' ); + * element.remove(); + */ + remove : function( preserveChildren ) + { + var $ = this.$; + var parent = $.parentNode; + + if ( parent ) + { + if ( preserveChildren ) + { + // Move all children before the node. + for ( var child ; ( child = $.firstChild ) ; ) + { + parent.insertBefore( $.removeChild( child ), $ ); + } + } + + parent.removeChild( $ ); + } + + return this; + }, + + replace : function( nodeToReplace ) + { + this.insertBefore( nodeToReplace ); + nodeToReplace.remove(); + }, + + trim : function() + { + this.ltrim(); + this.rtrim(); + }, + + ltrim : function() + { + var child; + while ( this.getFirst && ( child = this.getFirst() ) ) + { + if ( child.type == CKEDITOR.NODE_TEXT ) + { + var trimmed = CKEDITOR.tools.ltrim( child.getText() ), + originalLength = child.getLength(); + + if ( !trimmed ) + { + child.remove(); + continue; + } + else if ( trimmed.length < originalLength ) + { + child.split( originalLength - trimmed.length ); + + // IE BUG: child.remove() may raise JavaScript errors here. (#81) + this.$.removeChild( this.$.firstChild ); + } + } + break; + } + }, + + rtrim : function() + { + var child; + while ( this.getLast && ( child = this.getLast() ) ) + { + if ( child.type == CKEDITOR.NODE_TEXT ) + { + var trimmed = CKEDITOR.tools.rtrim( child.getText() ), + originalLength = child.getLength(); + + if ( !trimmed ) + { + child.remove(); + continue; + } + else if ( trimmed.length < originalLength ) + { + child.split( trimmed.length ); + + // IE BUG: child.getNext().remove() may raise JavaScript errors here. + // (#81) + this.$.lastChild.parentNode.removeChild( this.$.lastChild ); + } + } + break; + } + + if ( !CKEDITOR.env.ie && !CKEDITOR.env.opera ) + { + child = this.$.lastChild; + + if ( child && child.type == 1 && child.nodeName.toLowerCase() == 'br' ) + { + // Use "eChildNode.parentNode" instead of "node" to avoid IE bug (#324). + child.parentNode.removeChild( child ) ; + } + } + }, + + isReadOnly : function() + { + var current = this; + while( current ) + { + if ( current.type == CKEDITOR.NODE_ELEMENT ) + { + if ( current.is( 'body' ) || current.getCustomData( '_cke_notReadOnly' ) ) + break; + + if ( current.getAttribute( 'contentEditable' ) == 'false' ) + return current; + else if ( current.getAttribute( 'contentEditable' ) == 'true' ) + break; + } + current = current.getParent(); + } + + return false; + } + } +); diff --git a/ckeditor/_source/core/dom/nodelist.js b/ckeditor/_source/core/dom/nodelist.js new file mode 100644 index 0000000..7e82ba1 --- /dev/null +++ b/ckeditor/_source/core/dom/nodelist.js @@ -0,0 +1,23 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +CKEDITOR.dom.nodeList = function( nativeList ) +{ + this.$ = nativeList; +}; + +CKEDITOR.dom.nodeList.prototype = +{ + count : function() + { + return this.$.length; + }, + + getItem : function( index ) + { + var $node = this.$[ index ]; + return $node ? new CKEDITOR.dom.node( $node ) : null; + } +}; diff --git a/ckeditor/_source/core/dom/range.js b/ckeditor/_source/core/dom/range.js new file mode 100644 index 0000000..5846484 --- /dev/null +++ b/ckeditor/_source/core/dom/range.js @@ -0,0 +1,1880 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +CKEDITOR.dom.range = function( document ) +{ + this.startContainer = null; + this.startOffset = null; + this.endContainer = null; + this.endOffset = null; + this.collapsed = true; + + this.document = document; +}; + +(function() +{ + // Updates the "collapsed" property for the given range object. + var updateCollapsed = function( range ) + { + range.collapsed = ( + range.startContainer && + range.endContainer && + range.startContainer.equals( range.endContainer ) && + range.startOffset == range.endOffset ); + }; + + // This is a shared function used to delete, extract and clone the range + // contents. + // V2 + var execContentsAction = function( range, action, docFrag ) + { + range.optimizeBookmark(); + + var startNode = range.startContainer; + var endNode = range.endContainer; + + var startOffset = range.startOffset; + var endOffset = range.endOffset; + + var removeStartNode; + var removeEndNode; + + // For text containers, we must simply split the node and point to the + // second part. The removal will be handled by the rest of the code . + if ( endNode.type == CKEDITOR.NODE_TEXT ) + endNode = endNode.split( endOffset ); + else + { + // If the end container has children and the offset is pointing + // to a child, then we should start from it. + if ( endNode.getChildCount() > 0 ) + { + // If the offset points after the last node. + if ( endOffset >= endNode.getChildCount() ) + { + // Let's create a temporary node and mark it for removal. + endNode = endNode.append( range.document.createText( '' ) ); + removeEndNode = true; + } + else + endNode = endNode.getChild( endOffset ); + } + } + + // For text containers, we must simply split the node. The removal will + // be handled by the rest of the code . + if ( startNode.type == CKEDITOR.NODE_TEXT ) + { + startNode.split( startOffset ); + + // In cases the end node is the same as the start node, the above + // splitting will also split the end, so me must move the end to + // the second part of the split. + if ( startNode.equals( endNode ) ) + endNode = startNode.getNext(); + } + else + { + // If the start container has children and the offset is pointing + // to a child, then we should start from its previous sibling. + + // If the offset points to the first node, we don't have a + // sibling, so let's use the first one, but mark it for removal. + if ( !startOffset ) + { + // Let's create a temporary node and mark it for removal. + startNode = startNode.getFirst().insertBeforeMe( range.document.createText( '' ) ); + removeStartNode = true; + } + else if ( startOffset >= startNode.getChildCount() ) + { + // Let's create a temporary node and mark it for removal. + startNode = startNode.append( range.document.createText( '' ) ); + removeStartNode = true; + } + else + startNode = startNode.getChild( startOffset ).getPrevious(); + } + + // Get the parent nodes tree for the start and end boundaries. + var startParents = startNode.getParents(); + var endParents = endNode.getParents(); + + // Compare them, to find the top most siblings. + var i, topStart, topEnd; + + for ( i = 0 ; i < startParents.length ; i++ ) + { + topStart = startParents[ i ]; + topEnd = endParents[ i ]; + + // The compared nodes will match until we find the top most + // siblings (different nodes that have the same parent). + // "i" will hold the index in the parents array for the top + // most element. + if ( !topStart.equals( topEnd ) ) + break; + } + + var clone = docFrag, levelStartNode, levelClone, currentNode, currentSibling; + + // Remove all successive sibling nodes for every node in the + // startParents tree. + for ( var j = i ; j < startParents.length ; j++ ) + { + levelStartNode = startParents[j]; + + // For Extract and Clone, we must clone this level. + if ( clone && !levelStartNode.equals( startNode ) ) // action = 0 = Delete + levelClone = clone.append( levelStartNode.clone() ); + + currentNode = levelStartNode.getNext(); + + while ( currentNode ) + { + // Stop processing when the current node matches a node in the + // endParents tree or if it is the endNode. + if ( currentNode.equals( endParents[ j ] ) || currentNode.equals( endNode ) ) + break; + + // Cache the next sibling. + currentSibling = currentNode.getNext(); + + // If cloning, just clone it. + if ( action == 2 ) // 2 = Clone + clone.append( currentNode.clone( true ) ); + else + { + // Both Delete and Extract will remove the node. + currentNode.remove(); + + // When Extracting, move the removed node to the docFrag. + if ( action == 1 ) // 1 = Extract + clone.append( currentNode ); + } + + currentNode = currentSibling; + } + + if ( clone ) + clone = levelClone; + } + + clone = docFrag; + + // Remove all previous sibling nodes for every node in the + // endParents tree. + for ( var k = i ; k < endParents.length ; k++ ) + { + levelStartNode = endParents[ k ]; + + // For Extract and Clone, we must clone this level. + if ( action > 0 && !levelStartNode.equals( endNode ) ) // action = 0 = Delete + levelClone = clone.append( levelStartNode.clone() ); + + // The processing of siblings may have already been done by the parent. + if ( !startParents[ k ] || levelStartNode.$.parentNode != startParents[ k ].$.parentNode ) + { + currentNode = levelStartNode.getPrevious(); + + while ( currentNode ) + { + // Stop processing when the current node matches a node in the + // startParents tree or if it is the startNode. + if ( currentNode.equals( startParents[ k ] ) || currentNode.equals( startNode ) ) + break; + + // Cache the next sibling. + currentSibling = currentNode.getPrevious(); + + // If cloning, just clone it. + if ( action == 2 ) // 2 = Clone + clone.$.insertBefore( currentNode.$.cloneNode( true ), clone.$.firstChild ) ; + else + { + // Both Delete and Extract will remove the node. + currentNode.remove(); + + // When Extracting, mode the removed node to the docFrag. + if ( action == 1 ) // 1 = Extract + clone.$.insertBefore( currentNode.$, clone.$.firstChild ); + } + + currentNode = currentSibling; + } + } + + if ( clone ) + clone = levelClone; + } + + if ( action == 2 ) // 2 = Clone. + { + // No changes in the DOM should be done, so fix the split text (if any). + + var startTextNode = range.startContainer; + if ( startTextNode.type == CKEDITOR.NODE_TEXT ) + { + startTextNode.$.data += startTextNode.$.nextSibling.data; + startTextNode.$.parentNode.removeChild( startTextNode.$.nextSibling ); + } + + var endTextNode = range.endContainer; + if ( endTextNode.type == CKEDITOR.NODE_TEXT && endTextNode.$.nextSibling ) + { + endTextNode.$.data += endTextNode.$.nextSibling.data; + endTextNode.$.parentNode.removeChild( endTextNode.$.nextSibling ); + } + } + else + { + // Collapse the range. + + // If a node has been partially selected, collapse the range between + // topStart and topEnd. Otherwise, simply collapse it to the start. (W3C specs). + if ( topStart && topEnd && ( startNode.$.parentNode != topStart.$.parentNode || endNode.$.parentNode != topEnd.$.parentNode ) ) + { + var endIndex = topEnd.getIndex(); + + // If the start node is to be removed, we must correct the + // index to reflect the removal. + if ( removeStartNode && topEnd.$.parentNode == startNode.$.parentNode ) + endIndex--; + + range.setStart( topEnd.getParent(), endIndex ); + } + + // Collapse it to the start. + range.collapse( true ); + } + + // Cleanup any marked node. + if ( removeStartNode ) + startNode.remove(); + + if ( removeEndNode && endNode.$.parentNode ) + endNode.remove(); + }; + + var inlineChildReqElements = { abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 }; + + // Creates the appropriate node evaluator for the dom walker used inside + // check(Start|End)OfBlock. + function getCheckStartEndBlockEvalFunction( isStart ) + { + var hadBr = false, bookmarkEvaluator = CKEDITOR.dom.walker.bookmark( true ); + return function( node ) + { + // First ignore bookmark nodes. + if ( bookmarkEvaluator( node ) ) + return true; + + if ( node.type == CKEDITOR.NODE_TEXT ) + { + // If there's any visible text, then we're not at the start. + if ( CKEDITOR.tools.trim( node.getText() ).length ) + return false; + } + else if ( node.type == CKEDITOR.NODE_ELEMENT ) + { + // If there are non-empty inline elements (e.g. ), then we're not + // at the start. + if ( !inlineChildReqElements[ node.getName() ] ) + { + // If we're working at the end-of-block, forgive the first
in non-IE + // browsers. + if ( !isStart && !CKEDITOR.env.ie && node.getName() == 'br' && !hadBr ) + hadBr = true; + else + return false; + } + } + return true; + }; + } + + // Evaluator for CKEDITOR.dom.element::checkBoundaryOfElement, reject any + // text node and non-empty elements unless it's being bookmark text. + function elementBoundaryEval( node ) + { + // Reject any text node unless it's being bookmark + // OR it's spaces. (#3883) + return node.type != CKEDITOR.NODE_TEXT + && node.getName() in CKEDITOR.dtd.$removeEmpty + || !CKEDITOR.tools.trim( node.getText() ) + || node.getParent().hasAttribute( '_cke_bookmark' ); + } + + var whitespaceEval = new CKEDITOR.dom.walker.whitespaces(), + bookmarkEval = new CKEDITOR.dom.walker.bookmark(); + + function nonWhitespaceOrBookmarkEval( node ) + { + // Whitespaces and bookmark nodes are to be ignored. + return !whitespaceEval( node ) && !bookmarkEval( node ); + } + + CKEDITOR.dom.range.prototype = + { + clone : function() + { + var clone = new CKEDITOR.dom.range( this.document ); + + clone.startContainer = this.startContainer; + clone.startOffset = this.startOffset; + clone.endContainer = this.endContainer; + clone.endOffset = this.endOffset; + clone.collapsed = this.collapsed; + + return clone; + }, + + collapse : function( toStart ) + { + if ( toStart ) + { + this.endContainer = this.startContainer; + this.endOffset = this.startOffset; + } + else + { + this.startContainer = this.endContainer; + this.startOffset = this.endOffset; + } + + this.collapsed = true; + }, + + // The selection may be lost when cloning (due to the splitText() call). + cloneContents : function() + { + var docFrag = new CKEDITOR.dom.documentFragment( this.document ); + + if ( !this.collapsed ) + execContentsAction( this, 2, docFrag ); + + return docFrag; + }, + + deleteContents : function() + { + if ( this.collapsed ) + return; + + execContentsAction( this, 0 ); + }, + + extractContents : function() + { + var docFrag = new CKEDITOR.dom.documentFragment( this.document ); + + if ( !this.collapsed ) + execContentsAction( this, 1, docFrag ); + + return docFrag; + }, + + /** + * Creates a bookmark object, which can be later used to restore the + * range by using the moveToBookmark function. + * This is an "intrusive" way to create a bookmark. It includes tags + * in the range boundaries. The advantage of it is that it is possible to + * handle DOM mutations when moving back to the bookmark. + * Attention: the inclusion of nodes in the DOM is a design choice and + * should not be changed as there are other points in the code that may be + * using those nodes to perform operations. See GetBookmarkNode. + * @param {Boolean} [serializable] Indicates that the bookmark nodes + * must contain ids, which can be used to restore the range even + * when these nodes suffer mutations (like a clonation or innerHTML + * change). + * @returns {Object} And object representing a bookmark. + */ + createBookmark : function( serializable ) + { + var startNode, endNode; + var baseId; + var clone; + var collapsed = this.collapsed; + + startNode = this.document.createElement( 'span' ); + startNode.setAttribute( '_cke_bookmark', 1 ); + startNode.setStyle( 'display', 'none' ); + + // For IE, it must have something inside, otherwise it may be + // removed during DOM operations. + startNode.setHtml( ' ' ); + + if ( serializable ) + { + baseId = 'cke_bm_' + CKEDITOR.tools.getNextNumber(); + startNode.setAttribute( 'id', baseId + 'S' ); + } + + // If collapsed, the endNode will not be created. + if ( !collapsed ) + { + endNode = startNode.clone(); + endNode.setHtml( ' ' ); + + if ( serializable ) + endNode.setAttribute( 'id', baseId + 'E' ); + + clone = this.clone(); + clone.collapse(); + clone.insertNode( endNode ); + } + + clone = this.clone(); + clone.collapse( true ); + clone.insertNode( startNode ); + + // Update the range position. + if ( endNode ) + { + this.setStartAfter( startNode ); + this.setEndBefore( endNode ); + } + else + this.moveToPosition( startNode, CKEDITOR.POSITION_AFTER_END ); + + return { + startNode : serializable ? baseId + 'S' : startNode, + endNode : serializable ? baseId + 'E' : endNode, + serializable : serializable, + collapsed : collapsed + }; + }, + + /** + * Creates a "non intrusive" and "mutation sensible" bookmark. This + * kind of bookmark should be used only when the DOM is supposed to + * remain stable after its creation. + * @param {Boolean} [normalized] Indicates that the bookmark must + * normalized. When normalized, the successive text nodes are + * considered a single node. To sucessful load a normalized + * bookmark, the DOM tree must be also normalized before calling + * moveToBookmark. + * @returns {Object} An object representing the bookmark. + */ + createBookmark2 : function( normalized ) + { + var startContainer = this.startContainer, + endContainer = this.endContainer; + + var startOffset = this.startOffset, + endOffset = this.endOffset; + + var collapsed = this.collapsed; + + var child, previous; + + // If there is no range then get out of here. + // It happens on initial load in Safari #962 and if the editor it's + // hidden also in Firefox + if ( !startContainer || !endContainer ) + return { start : 0, end : 0 }; + + if ( normalized ) + { + // Find out if the start is pointing to a text node that will + // be normalized. + if ( startContainer.type == CKEDITOR.NODE_ELEMENT ) + { + child = startContainer.getChild( startOffset ); + + // In this case, move the start information to that text + // node. + if ( child && child.type == CKEDITOR.NODE_TEXT + && startOffset > 0 && child.getPrevious().type == CKEDITOR.NODE_TEXT ) + { + startContainer = child; + startOffset = 0; + } + } + + // Normalize the start. + while ( startContainer.type == CKEDITOR.NODE_TEXT + && ( previous = startContainer.getPrevious() ) + && previous.type == CKEDITOR.NODE_TEXT ) + { + startContainer = previous; + startOffset += previous.getLength(); + } + + // Process the end only if not normalized. + if ( !collapsed ) + { + // Find out if the start is pointing to a text node that + // will be normalized. + if ( endContainer.type == CKEDITOR.NODE_ELEMENT ) + { + child = endContainer.getChild( endOffset ); + + // In this case, move the start information to that + // text node. + if ( child && child.type == CKEDITOR.NODE_TEXT + && endOffset > 0 && child.getPrevious().type == CKEDITOR.NODE_TEXT ) + { + endContainer = child; + endOffset = 0; + } + } + + // Normalize the end. + while ( endContainer.type == CKEDITOR.NODE_TEXT + && ( previous = endContainer.getPrevious() ) + && previous.type == CKEDITOR.NODE_TEXT ) + { + endContainer = previous; + endOffset += previous.getLength(); + } + } + } + + return { + start : startContainer.getAddress( normalized ), + end : collapsed ? null : endContainer.getAddress( normalized ), + startOffset : startOffset, + endOffset : endOffset, + normalized : normalized, + collapsed : collapsed, + is2 : true // It's a createBookmark2 bookmark. + }; + }, + + moveToBookmark : function( bookmark ) + { + if ( bookmark.is2 ) // Created with createBookmark2(). + { + // Get the start information. + var startContainer = this.document.getByAddress( bookmark.start, bookmark.normalized ), + startOffset = bookmark.startOffset; + + // Get the end information. + var endContainer = bookmark.end && this.document.getByAddress( bookmark.end, bookmark.normalized ), + endOffset = bookmark.endOffset; + + // Set the start boundary. + this.setStart( startContainer, startOffset ); + + // Set the end boundary. If not available, collapse it. + if ( endContainer ) + this.setEnd( endContainer, endOffset ); + else + this.collapse( true ); + } + else // Created with createBookmark(). + { + var serializable = bookmark.serializable, + startNode = serializable ? this.document.getById( bookmark.startNode ) : bookmark.startNode, + endNode = serializable ? this.document.getById( bookmark.endNode ) : bookmark.endNode; + + // Set the range start at the bookmark start node position. + this.setStartBefore( startNode ); + + // Remove it, because it may interfere in the setEndBefore call. + startNode.remove(); + + // Set the range end at the bookmark end node position, or simply + // collapse it if it is not available. + if ( endNode ) + { + this.setEndBefore( endNode ); + endNode.remove(); + } + else + this.collapse( true ); + } + }, + + getBoundaryNodes : function() + { + var startNode = this.startContainer, + endNode = this.endContainer, + startOffset = this.startOffset, + endOffset = this.endOffset, + childCount; + + if ( startNode.type == CKEDITOR.NODE_ELEMENT ) + { + childCount = startNode.getChildCount(); + if ( childCount > startOffset ) + startNode = startNode.getChild( startOffset ); + else if ( childCount < 1 ) + startNode = startNode.getPreviousSourceNode(); + else // startOffset > childCount but childCount is not 0 + { + // Try to take the node just after the current position. + startNode = startNode.$; + while ( startNode.lastChild ) + startNode = startNode.lastChild; + startNode = new CKEDITOR.dom.node( startNode ); + + // Normally we should take the next node in DFS order. But it + // is also possible that we've already reached the end of + // document. + startNode = startNode.getNextSourceNode() || startNode; + } + } + if ( endNode.type == CKEDITOR.NODE_ELEMENT ) + { + childCount = endNode.getChildCount(); + if ( childCount > endOffset ) + endNode = endNode.getChild( endOffset ).getPreviousSourceNode( true ); + else if ( childCount < 1 ) + endNode = endNode.getPreviousSourceNode(); + else // endOffset > childCount but childCount is not 0 + { + // Try to take the node just before the current position. + endNode = endNode.$; + while ( endNode.lastChild ) + endNode = endNode.lastChild; + endNode = new CKEDITOR.dom.node( endNode ); + } + } + + // Sometimes the endNode will come right before startNode for collapsed + // ranges. Fix it. (#3780) + if ( startNode.getPosition( endNode ) & CKEDITOR.POSITION_FOLLOWING ) + startNode = endNode; + + return { startNode : startNode, endNode : endNode }; + }, + + /** + * Find the node which fully contains the range. + * @param includeSelf + * @param {Boolean} ignoreTextNode Whether ignore CKEDITOR.NODE_TEXT type. + */ + getCommonAncestor : function( includeSelf , ignoreTextNode ) + { + var start = this.startContainer, + end = this.endContainer, + ancestor; + + if ( start.equals( end ) ) + { + if ( includeSelf + && start.type == CKEDITOR.NODE_ELEMENT + && this.startOffset == this.endOffset - 1 ) + ancestor = start.getChild( this.startOffset ); + else + ancestor = start; + } + else + ancestor = start.getCommonAncestor( end ); + + return ignoreTextNode && !ancestor.is ? ancestor.getParent() : ancestor; + }, + + /** + * Transforms the startContainer and endContainer properties from text + * nodes to element nodes, whenever possible. This is actually possible + * if either of the boundary containers point to a text node, and its + * offset is set to zero, or after the last char in the node. + */ + optimize : function() + { + var container = this.startContainer; + var offset = this.startOffset; + + if ( container.type != CKEDITOR.NODE_ELEMENT ) + { + if ( !offset ) + this.setStartBefore( container ); + else if ( offset >= container.getLength() ) + this.setStartAfter( container ); + } + + container = this.endContainer; + offset = this.endOffset; + + if ( container.type != CKEDITOR.NODE_ELEMENT ) + { + if ( !offset ) + this.setEndBefore( container ); + else if ( offset >= container.getLength() ) + this.setEndAfter( container ); + } + }, + + /** + * Move the range out of bookmark nodes if they'd been the container. + */ + optimizeBookmark: function() + { + var startNode = this.startContainer, + endNode = this.endContainer; + + if ( startNode.is && startNode.is( 'span' ) + && startNode.hasAttribute( '_cke_bookmark' ) ) + this.setStartAt( startNode, CKEDITOR.POSITION_BEFORE_START ); + if ( endNode && endNode.is && endNode.is( 'span' ) + && endNode.hasAttribute( '_cke_bookmark' ) ) + this.setEndAt( endNode, CKEDITOR.POSITION_AFTER_END ); + }, + + trim : function( ignoreStart, ignoreEnd ) + { + var startContainer = this.startContainer, + startOffset = this.startOffset, + collapsed = this.collapsed; + if ( ( !ignoreStart || collapsed ) + && startContainer && startContainer.type == CKEDITOR.NODE_TEXT ) + { + // If the offset is zero, we just insert the new node before + // the start. + if ( !startOffset ) + { + startOffset = startContainer.getIndex(); + startContainer = startContainer.getParent(); + } + // If the offset is at the end, we'll insert it after the text + // node. + else if ( startOffset >= startContainer.getLength() ) + { + startOffset = startContainer.getIndex() + 1; + startContainer = startContainer.getParent(); + } + // In other case, we split the text node and insert the new + // node at the split point. + else + { + var nextText = startContainer.split( startOffset ); + + startOffset = startContainer.getIndex() + 1; + startContainer = startContainer.getParent(); + + // Check all necessity of updating the end boundary. + if ( this.startContainer.equals( this.endContainer ) ) + this.setEnd( nextText, this.endOffset - this.startOffset ); + else if ( startContainer.equals( this.endContainer ) ) + this.endOffset += 1; + } + + this.setStart( startContainer, startOffset ); + + if ( collapsed ) + { + this.collapse( true ); + return; + } + } + + var endContainer = this.endContainer; + var endOffset = this.endOffset; + + if ( !( ignoreEnd || collapsed ) + && endContainer && endContainer.type == CKEDITOR.NODE_TEXT ) + { + // If the offset is zero, we just insert the new node before + // the start. + if ( !endOffset ) + { + endOffset = endContainer.getIndex(); + endContainer = endContainer.getParent(); + } + // If the offset is at the end, we'll insert it after the text + // node. + else if ( endOffset >= endContainer.getLength() ) + { + endOffset = endContainer.getIndex() + 1; + endContainer = endContainer.getParent(); + } + // In other case, we split the text node and insert the new + // node at the split point. + else + { + endContainer.split( endOffset ); + + endOffset = endContainer.getIndex() + 1; + endContainer = endContainer.getParent(); + } + + this.setEnd( endContainer, endOffset ); + } + }, + + enlarge : function( unit ) + { + switch ( unit ) + { + case CKEDITOR.ENLARGE_ELEMENT : + + if ( this.collapsed ) + return; + + // Get the common ancestor. + var commonAncestor = this.getCommonAncestor(); + + var body = this.document.getBody(); + + // For each boundary + // a. Depending on its position, find out the first node to be checked (a sibling) or, if not available, to be enlarge. + // b. Go ahead checking siblings and enlarging the boundary as much as possible until the common ancestor is not reached. After reaching the common ancestor, just save the enlargeable node to be used later. + + var startTop, endTop; + + var enlargeable, sibling, commonReached; + + // Indicates that the node can be added only if whitespace + // is available before it. + var needsWhiteSpace = false; + var isWhiteSpace; + var siblingText; + + // Process the start boundary. + + var container = this.startContainer; + var offset = this.startOffset; + + if ( container.type == CKEDITOR.NODE_TEXT ) + { + if ( offset ) + { + // Check if there is any non-space text before the + // offset. Otherwise, container is null. + container = !CKEDITOR.tools.trim( container.substring( 0, offset ) ).length && container; + + // If we found only whitespace in the node, it + // means that we'll need more whitespace to be able + // to expand. For example, can be expanded in + // "A [B]", but not in "A [B]". + needsWhiteSpace = !!container; + } + + if ( container ) + { + if ( !( sibling = container.getPrevious() ) ) + enlargeable = container.getParent(); + } + } + else + { + // If we have offset, get the node preceeding it as the + // first sibling to be checked. + if ( offset ) + sibling = container.getChild( offset - 1 ) || container.getLast(); + + // If there is no sibling, mark the container to be + // enlarged. + if ( !sibling ) + enlargeable = container; + } + + while ( enlargeable || sibling ) + { + if ( enlargeable && !sibling ) + { + // If we reached the common ancestor, mark the flag + // for it. + if ( !commonReached && enlargeable.equals( commonAncestor ) ) + commonReached = true; + + if ( !body.contains( enlargeable ) ) + break; + + // If we don't need space or this element breaks + // the line, then enlarge it. + if ( !needsWhiteSpace || enlargeable.getComputedStyle( 'display' ) != 'inline' ) + { + needsWhiteSpace = false; + + // If the common ancestor has been reached, + // we'll not enlarge it immediately, but just + // mark it to be enlarged later if the end + // boundary also enlarges it. + if ( commonReached ) + startTop = enlargeable; + else + this.setStartBefore( enlargeable ); + } + + sibling = enlargeable.getPrevious(); + } + + // Check all sibling nodes preceeding the enlargeable + // node. The node wil lbe enlarged only if none of them + // blocks it. + while ( sibling ) + { + // This flag indicates that this node has + // whitespaces at the end. + isWhiteSpace = false; + + if ( sibling.type == CKEDITOR.NODE_TEXT ) + { + siblingText = sibling.getText(); + + if ( /[^\s\ufeff]/.test( siblingText ) ) + sibling = null; + + isWhiteSpace = /[\s\ufeff]$/.test( siblingText ); + } + else + { + // If this is a visible element. + // We need to check for the bookmark attribute because IE insists on + // rendering the display:none nodes we use for bookmarks. (#3363) + if ( sibling.$.offsetWidth > 0 && !sibling.getAttribute( '_cke_bookmark' ) ) + { + // We'll accept it only if we need + // whitespace, and this is an inline + // element with whitespace only. + if ( needsWhiteSpace && CKEDITOR.dtd.$removeEmpty[ sibling.getName() ] ) + { + // It must contains spaces and inline elements only. + + siblingText = sibling.getText(); + + if ( (/[^\s\ufeff]/).test( siblingText ) ) // Spaces + Zero Width No-Break Space (U+FEFF) + sibling = null; + else + { + var allChildren = sibling.$.all || sibling.$.getElementsByTagName( '*' ); + for ( var i = 0, child ; child = allChildren[ i++ ] ; ) + { + if ( !CKEDITOR.dtd.$removeEmpty[ child.nodeName.toLowerCase() ] ) + { + sibling = null; + break; + } + } + } + + if ( sibling ) + isWhiteSpace = !!siblingText.length; + } + else + sibling = null; + } + } + + // A node with whitespaces has been found. + if ( isWhiteSpace ) + { + // Enlarge the last enlargeable node, if we + // were waiting for spaces. + if ( needsWhiteSpace ) + { + if ( commonReached ) + startTop = enlargeable; + else if ( enlargeable ) + this.setStartBefore( enlargeable ); + } + else + needsWhiteSpace = true; + } + + if ( sibling ) + { + var next = sibling.getPrevious(); + + if ( !enlargeable && !next ) + { + // Set the sibling as enlargeable, so it's + // parent will be get later outside this while. + enlargeable = sibling; + sibling = null; + break; + } + + sibling = next; + } + else + { + // If sibling has been set to null, then we + // need to stop enlarging. + enlargeable = null; + } + } + + if ( enlargeable ) + enlargeable = enlargeable.getParent(); + } + + // Process the end boundary. This is basically the same + // code used for the start boundary, with small changes to + // make it work in the oposite side (to the right). This + // makes it difficult to reuse the code here. So, fixes to + // the above code are likely to be replicated here. + + container = this.endContainer; + offset = this.endOffset; + + // Reset the common variables. + enlargeable = sibling = null; + commonReached = needsWhiteSpace = false; + + if ( container.type == CKEDITOR.NODE_TEXT ) + { + // Check if there is any non-space text after the + // offset. Otherwise, container is null. + container = !CKEDITOR.tools.trim( container.substring( offset ) ).length && container; + + // If we found only whitespace in the node, it + // means that we'll need more whitespace to be able + // to expand. For example, can be expanded in + // "A [B]", but not in "A [B]". + needsWhiteSpace = !( container && container.getLength() ); + + if ( container ) + { + if ( !( sibling = container.getNext() ) ) + enlargeable = container.getParent(); + } + } + else + { + // Get the node right after the boudary to be checked + // first. + sibling = container.getChild( offset ); + + if ( !sibling ) + enlargeable = container; + } + + while ( enlargeable || sibling ) + { + if ( enlargeable && !sibling ) + { + if ( !commonReached && enlargeable.equals( commonAncestor ) ) + commonReached = true; + + if ( !body.contains( enlargeable ) ) + break; + + if ( !needsWhiteSpace || enlargeable.getComputedStyle( 'display' ) != 'inline' ) + { + needsWhiteSpace = false; + + if ( commonReached ) + endTop = enlargeable; + else if ( enlargeable ) + this.setEndAfter( enlargeable ); + } + + sibling = enlargeable.getNext(); + } + + while ( sibling ) + { + isWhiteSpace = false; + + if ( sibling.type == CKEDITOR.NODE_TEXT ) + { + siblingText = sibling.getText(); + + if ( /[^\s\ufeff]/.test( siblingText ) ) + sibling = null; + + isWhiteSpace = /^[\s\ufeff]/.test( siblingText ); + } + else + { + // If this is a visible element. + // We need to check for the bookmark attribute because IE insists on + // rendering the display:none nodes we use for bookmarks. (#3363) + if ( sibling.$.offsetWidth > 0 && !sibling.getAttribute( '_cke_bookmark' ) ) + { + // We'll accept it only if we need + // whitespace, and this is an inline + // element with whitespace only. + if ( needsWhiteSpace && CKEDITOR.dtd.$removeEmpty[ sibling.getName() ] ) + { + // It must contains spaces and inline elements only. + + siblingText = sibling.getText(); + + if ( (/[^\s\ufeff]/).test( siblingText ) ) + sibling = null; + else + { + allChildren = sibling.$.all || sibling.$.getElementsByTagName( '*' ); + for ( i = 0 ; child = allChildren[ i++ ] ; ) + { + if ( !CKEDITOR.dtd.$removeEmpty[ child.nodeName.toLowerCase() ] ) + { + sibling = null; + break; + } + } + } + + if ( sibling ) + isWhiteSpace = !!siblingText.length; + } + else + sibling = null; + } + } + + if ( isWhiteSpace ) + { + if ( needsWhiteSpace ) + { + if ( commonReached ) + endTop = enlargeable; + else + this.setEndAfter( enlargeable ); + } + } + + if ( sibling ) + { + next = sibling.getNext(); + + if ( !enlargeable && !next ) + { + enlargeable = sibling; + sibling = null; + break; + } + + sibling = next; + } + else + { + // If sibling has been set to null, then we + // need to stop enlarging. + enlargeable = null; + } + } + + if ( enlargeable ) + enlargeable = enlargeable.getParent(); + } + + // If the common ancestor can be enlarged by both boundaries, then include it also. + if ( startTop && endTop ) + { + commonAncestor = startTop.contains( endTop ) ? endTop : startTop; + + this.setStartBefore( commonAncestor ); + this.setEndAfter( commonAncestor ); + } + break; + + case CKEDITOR.ENLARGE_BLOCK_CONTENTS: + case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS: + + // Enlarging the start boundary. + var walkerRange = new CKEDITOR.dom.range( this.document ); + + body = this.document.getBody(); + + walkerRange.setStartAt( body, CKEDITOR.POSITION_AFTER_START ); + walkerRange.setEnd( this.startContainer, this.startOffset ); + + var walker = new CKEDITOR.dom.walker( walkerRange ), + blockBoundary, // The node on which the enlarging should stop. + tailBr, // In case BR as block boundary. + notBlockBoundary = CKEDITOR.dom.walker.blockBoundary( + ( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) ? { br : 1 } : null ), + // Record the encountered 'blockBoundary' for later use. + boundaryGuard = function( node ) + { + var retval = notBlockBoundary( node ); + if ( !retval ) + blockBoundary = node; + return retval; + }, + // Record the encounted 'tailBr' for later use. + tailBrGuard = function( node ) + { + var retval = boundaryGuard( node ); + if ( !retval && node.is && node.is( 'br' ) ) + tailBr = node; + return retval; + }; + + walker.guard = boundaryGuard; + + enlargeable = walker.lastBackward(); + + // It's the body which stop the enlarging if no block boundary found. + blockBoundary = blockBoundary || body; + + // Start the range either after the end of found block (

...

[text) + // or at the start of block (

[text...), by comparing the document position + // with 'enlargeable' node. + this.setStartAt( + blockBoundary, + !blockBoundary.is( 'br' ) && + ( !enlargeable && this.checkStartOfBlock() + || enlargeable && blockBoundary.contains( enlargeable ) ) ? + CKEDITOR.POSITION_AFTER_START : + CKEDITOR.POSITION_AFTER_END ); + + // Enlarging the end boundary. + walkerRange = this.clone(); + walkerRange.collapse(); + walkerRange.setEndAt( body, CKEDITOR.POSITION_BEFORE_END ); + walker = new CKEDITOR.dom.walker( walkerRange ); + + // tailBrGuard only used for on range end. + walker.guard = ( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) ? + tailBrGuard : boundaryGuard; + blockBoundary = null; + // End the range right before the block boundary node. + + enlargeable = walker.lastForward(); + + // It's the body which stop the enlarging if no block boundary found. + blockBoundary = blockBoundary || body; + + // Close the range either before the found block start (text]

...

) or at the block end (...text]

) + // by comparing the document position with 'enlargeable' node. + this.setEndAt( + blockBoundary, + ( !enlargeable && this.checkEndOfBlock() + || enlargeable && blockBoundary.contains( enlargeable ) ) ? + CKEDITOR.POSITION_BEFORE_END : + CKEDITOR.POSITION_BEFORE_START ); + // We must include the
at the end of range if there's + // one and we're expanding list item contents + if ( tailBr ) + this.setEndAfter( tailBr ); + } + }, + + /** + * Descrease the range to make sure that boundaries + * always anchor beside text nodes or innermost element. + * @param {Number} mode ( CKEDITOR.SHRINK_ELEMENT | CKEDITOR.SHRINK_TEXT ) The shrinking mode. + *
+ *
CKEDITOR.SHRINK_ELEMENT
+ *
Shrink the range boundaries to the edge of the innermost element.
+ *
CKEDITOR.SHRINK_TEXT
+ *
Shrink the range boudaries to anchor by the side of enclosed text node, range remains if there's no text nodes on boundaries at all.
+ *
+ * @param {Boolean} selectContents Whether result range anchors at the inner OR outer boundary of the node. + */ + shrink : function( mode, selectContents ) + { + // Unable to shrink a collapsed range. + if ( !this.collapsed ) + { + mode = mode || CKEDITOR.SHRINK_TEXT; + + var walkerRange = this.clone(); + + var startContainer = this.startContainer, + endContainer = this.endContainer, + startOffset = this.startOffset, + endOffset = this.endOffset, + collapsed = this.collapsed; + + // Whether the start/end boundary is moveable. + var moveStart = 1, + moveEnd = 1; + + if ( startContainer && startContainer.type == CKEDITOR.NODE_TEXT ) + { + if ( !startOffset ) + walkerRange.setStartBefore( startContainer ); + else if ( startOffset >= startContainer.getLength( ) ) + walkerRange.setStartAfter( startContainer ); + else + { + // Enlarge the range properly to avoid walker making + // DOM changes caused by triming the text nodes later. + walkerRange.setStartBefore( startContainer ); + moveStart = 0; + } + } + + if ( endContainer && endContainer.type == CKEDITOR.NODE_TEXT ) + { + if ( !endOffset ) + walkerRange.setEndBefore( endContainer ); + else if ( endOffset >= endContainer.getLength( ) ) + walkerRange.setEndAfter( endContainer ); + else + { + walkerRange.setEndAfter( endContainer ); + moveEnd = 0; + } + } + + var walker = new CKEDITOR.dom.walker( walkerRange ); + + walker.evaluator = function( node ) + { + return node.type == ( mode == CKEDITOR.SHRINK_ELEMENT ? + CKEDITOR.NODE_ELEMENT : CKEDITOR.NODE_TEXT ); + }; + + var currentElement; + walker.guard = function( node, movingOut ) + { + // Stop when we're shrink in element mode while encountering a text node. + if ( mode == CKEDITOR.SHRINK_ELEMENT && node.type == CKEDITOR.NODE_TEXT ) + return false; + + // Stop when we've already walked "through" an element. + if ( movingOut && node.equals( currentElement ) ) + return false; + + if ( !movingOut && node.type == CKEDITOR.NODE_ELEMENT ) + currentElement = node; + + return true; + }; + + if ( moveStart ) + { + var textStart = walker[ mode == CKEDITOR.SHRINK_ELEMENT ? 'lastForward' : 'next'](); + textStart && this.setStartAt( textStart, selectContents ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_START ); + } + + if ( moveEnd ) + { + walker.reset(); + var textEnd = walker[ mode == CKEDITOR.SHRINK_ELEMENT ? 'lastBackward' : 'previous'](); + textEnd && this.setEndAt( textEnd, selectContents ? CKEDITOR.POSITION_BEFORE_END : CKEDITOR.POSITION_AFTER_END ); + } + + return !!( moveStart || moveEnd ); + } + }, + + /** + * Inserts a node at the start of the range. The range will be expanded + * the contain the node. + */ + insertNode : function( node ) + { + this.optimizeBookmark(); + this.trim( false, true ); + + var startContainer = this.startContainer; + var startOffset = this.startOffset; + + var nextNode = startContainer.getChild( startOffset ); + + if ( nextNode ) + node.insertBefore( nextNode ); + else + startContainer.append( node ); + + // Check if we need to update the end boundary. + if ( node.getParent().equals( this.endContainer ) ) + this.endOffset++; + + // Expand the range to embrace the new node. + this.setStartBefore( node ); + }, + + moveToPosition : function( node, position ) + { + this.setStartAt( node, position ); + this.collapse( true ); + }, + + selectNodeContents : function( node ) + { + this.setStart( node, 0 ); + this.setEnd( node, node.type == CKEDITOR.NODE_TEXT ? node.getLength() : node.getChildCount() ); + }, + + /** + * Sets the start position of a Range. + * @param {CKEDITOR.dom.node} startNode The node to start the range. + * @param {Number} startOffset An integer greater than or equal to zero + * representing the offset for the start of the range from the start + * of startNode. + */ + setStart : function( startNode, startOffset ) + { + // W3C requires a check for the new position. If it is after the end + // boundary, the range should be collapsed to the new start. It seams + // we will not need this check for our use of this class so we can + // ignore it for now. + + // Fixing invalid range start inside dtd empty elements. + if( startNode.type == CKEDITOR.NODE_ELEMENT + && CKEDITOR.dtd.$empty[ startNode.getName() ] ) + startNode = startNode.getParent(), startOffset = startNode.getIndex(); + + this.startContainer = startNode; + this.startOffset = startOffset; + + if ( !this.endContainer ) + { + this.endContainer = startNode; + this.endOffset = startOffset; + } + + updateCollapsed( this ); + }, + + /** + * Sets the end position of a Range. + * @param {CKEDITOR.dom.node} endNode The node to end the range. + * @param {Number} endOffset An integer greater than or equal to zero + * representing the offset for the end of the range from the start + * of endNode. + */ + setEnd : function( endNode, endOffset ) + { + // W3C requires a check for the new position. If it is before the start + // boundary, the range should be collapsed to the new end. It seams we + // will not need this check for our use of this class so we can ignore + // it for now. + + // Fixing invalid range end inside dtd empty elements. + if( endNode.type == CKEDITOR.NODE_ELEMENT + && CKEDITOR.dtd.$empty[ endNode.getName() ] ) + endNode = endNode.getParent(), endOffset = endNode.getIndex() + 1; + + this.endContainer = endNode; + this.endOffset = endOffset; + + if ( !this.startContainer ) + { + this.startContainer = endNode; + this.startOffset = endOffset; + } + + updateCollapsed( this ); + }, + + setStartAfter : function( node ) + { + this.setStart( node.getParent(), node.getIndex() + 1 ); + }, + + setStartBefore : function( node ) + { + this.setStart( node.getParent(), node.getIndex() ); + }, + + setEndAfter : function( node ) + { + this.setEnd( node.getParent(), node.getIndex() + 1 ); + }, + + setEndBefore : function( node ) + { + this.setEnd( node.getParent(), node.getIndex() ); + }, + + setStartAt : function( node, position ) + { + switch( position ) + { + case CKEDITOR.POSITION_AFTER_START : + this.setStart( node, 0 ); + break; + + case CKEDITOR.POSITION_BEFORE_END : + if ( node.type == CKEDITOR.NODE_TEXT ) + this.setStart( node, node.getLength() ); + else + this.setStart( node, node.getChildCount() ); + break; + + case CKEDITOR.POSITION_BEFORE_START : + this.setStartBefore( node ); + break; + + case CKEDITOR.POSITION_AFTER_END : + this.setStartAfter( node ); + } + + updateCollapsed( this ); + }, + + setEndAt : function( node, position ) + { + switch( position ) + { + case CKEDITOR.POSITION_AFTER_START : + this.setEnd( node, 0 ); + break; + + case CKEDITOR.POSITION_BEFORE_END : + if ( node.type == CKEDITOR.NODE_TEXT ) + this.setEnd( node, node.getLength() ); + else + this.setEnd( node, node.getChildCount() ); + break; + + case CKEDITOR.POSITION_BEFORE_START : + this.setEndBefore( node ); + break; + + case CKEDITOR.POSITION_AFTER_END : + this.setEndAfter( node ); + } + + updateCollapsed( this ); + }, + + fixBlock : function( isStart, blockTag ) + { + var bookmark = this.createBookmark(), + fixedBlock = this.document.createElement( blockTag ); + + this.collapse( isStart ); + + this.enlarge( CKEDITOR.ENLARGE_BLOCK_CONTENTS ); + + this.extractContents().appendTo( fixedBlock ); + fixedBlock.trim(); + + if ( !CKEDITOR.env.ie ) + fixedBlock.appendBogus(); + + this.insertNode( fixedBlock ); + + this.moveToBookmark( bookmark ); + + return fixedBlock; + }, + + splitBlock : function( blockTag ) + { + var startPath = new CKEDITOR.dom.elementPath( this.startContainer ), + endPath = new CKEDITOR.dom.elementPath( this.endContainer ); + + var startBlockLimit = startPath.blockLimit, + endBlockLimit = endPath.blockLimit; + + var startBlock = startPath.block, + endBlock = endPath.block; + + var elementPath = null; + // Do nothing if the boundaries are in different block limits. + if ( !startBlockLimit.equals( endBlockLimit ) ) + return null; + + // Get or fix current blocks. + if ( blockTag != 'br' ) + { + if ( !startBlock ) + { + startBlock = this.fixBlock( true, blockTag ); + endBlock = new CKEDITOR.dom.elementPath( this.endContainer ).block; + } + + if ( !endBlock ) + endBlock = this.fixBlock( false, blockTag ); + } + + // Get the range position. + var isStartOfBlock = startBlock && this.checkStartOfBlock(), + isEndOfBlock = endBlock && this.checkEndOfBlock(); + + // Delete the current contents. + // TODO: Why is 2.x doing CheckIsEmpty()? + this.deleteContents(); + + if ( startBlock && startBlock.equals( endBlock ) ) + { + if ( isEndOfBlock ) + { + elementPath = new CKEDITOR.dom.elementPath( this.startContainer ); + this.moveToPosition( endBlock, CKEDITOR.POSITION_AFTER_END ); + endBlock = null; + } + else if ( isStartOfBlock ) + { + elementPath = new CKEDITOR.dom.elementPath( this.startContainer ); + this.moveToPosition( startBlock, CKEDITOR.POSITION_BEFORE_START ); + startBlock = null; + } + else + { + endBlock = this.splitElement( startBlock ); + + // In Gecko, the last child node must be a bogus
. + // Note: bogus
added under
    or
      would cause + // lists to be incorrectly rendered. + if ( !CKEDITOR.env.ie && !startBlock.is( 'ul', 'ol') ) + startBlock.appendBogus() ; + } + } + + return { + previousBlock : startBlock, + nextBlock : endBlock, + wasStartOfBlock : isStartOfBlock, + wasEndOfBlock : isEndOfBlock, + elementPath : elementPath + }; + }, + + /** + * Branch the specified element from the collapsed range position and + * place the caret between the two result branches. + * Note: The range must be collapsed and been enclosed by this element. + * @param {CKEDITOR.dom.element} element + * @return {CKEDITOR.dom.element} Root element of the new branch after the split. + */ + splitElement : function( toSplit ) + { + if ( !this.collapsed ) + return null; + + // Extract the contents of the block from the selection point to the end + // of its contents. + this.setEndAt( toSplit, CKEDITOR.POSITION_BEFORE_END ); + var documentFragment = this.extractContents(); + + // Duplicate the element after it. + var clone = toSplit.clone( false ); + + // Place the extracted contents into the duplicated element. + documentFragment.appendTo( clone ); + clone.insertAfter( toSplit ); + this.moveToPosition( toSplit, CKEDITOR.POSITION_AFTER_END ); + return clone; + }, + + /** + * Check whether a range boundary is at the inner boundary of a given + * element. + * @param {CKEDITOR.dom.element} element The target element to check. + * @param {Number} checkType The boundary to check for both the range + * and the element. It can be CKEDITOR.START or CKEDITOR.END. + * @returns {Boolean} "true" if the range boundary is at the inner + * boundary of the element. + */ + checkBoundaryOfElement : function( element, checkType ) + { + var checkStart = ( checkType == CKEDITOR.START ); + + // Create a copy of this range, so we can manipulate it for our checks. + var walkerRange = this.clone(); + + // Collapse the range at the proper size. + walkerRange.collapse( checkStart ); + + // Expand the range to element boundary. + walkerRange[ checkStart ? 'setStartAt' : 'setEndAt' ] + ( element, checkStart ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_END ); + + // Create the walker, which will check if we have anything useful + // in the range. + var walker = new CKEDITOR.dom.walker( walkerRange ); + walker.evaluator = elementBoundaryEval; + + return walker[ checkStart ? 'checkBackward' : 'checkForward' ](); + }, + + // Calls to this function may produce changes to the DOM. The range may + // be updated to reflect such changes. + checkStartOfBlock : function() + { + var startContainer = this.startContainer, + startOffset = this.startOffset; + + // If the starting node is a text node, and non-empty before the offset, + // then we're surely not at the start of block. + if ( startOffset && startContainer.type == CKEDITOR.NODE_TEXT ) + { + var textBefore = CKEDITOR.tools.ltrim( startContainer.substring( 0, startOffset ) ); + if ( textBefore.length ) + return false; + } + + // Antecipate the trim() call here, so the walker will not make + // changes to the DOM, which would not get reflected into this + // range otherwise. + this.trim(); + + // We need to grab the block element holding the start boundary, so + // let's use an element path for it. + var path = new CKEDITOR.dom.elementPath( this.startContainer ); + + // Creates a range starting at the block start until the range start. + var walkerRange = this.clone(); + walkerRange.collapse( true ); + walkerRange.setStartAt( path.block || path.blockLimit, CKEDITOR.POSITION_AFTER_START ); + + var walker = new CKEDITOR.dom.walker( walkerRange ); + walker.evaluator = getCheckStartEndBlockEvalFunction( true ); + + return walker.checkBackward(); + }, + + checkEndOfBlock : function() + { + var endContainer = this.endContainer, + endOffset = this.endOffset; + + // If the ending node is a text node, and non-empty after the offset, + // then we're surely not at the end of block. + if ( endContainer.type == CKEDITOR.NODE_TEXT ) + { + var textAfter = CKEDITOR.tools.rtrim( endContainer.substring( endOffset ) ); + if ( textAfter.length ) + return false; + } + + // Antecipate the trim() call here, so the walker will not make + // changes to the DOM, which would not get reflected into this + // range otherwise. + this.trim(); + + // We need to grab the block element holding the start boundary, so + // let's use an element path for it. + var path = new CKEDITOR.dom.elementPath( this.endContainer ); + + // Creates a range starting at the block start until the range start. + var walkerRange = this.clone(); + walkerRange.collapse( false ); + walkerRange.setEndAt( path.block || path.blockLimit, CKEDITOR.POSITION_BEFORE_END ); + + var walker = new CKEDITOR.dom.walker( walkerRange ); + walker.evaluator = getCheckStartEndBlockEvalFunction( false ); + + return walker.checkForward(); + }, + + /** + * Moves the range boundaries to the first/end editing point inside an + * element. For example, in an element tree like + * "<p><b><i></i></b> Text</p>", the start editing point is + * "<p><b><i>^</i></b> Text</p>" (inside <i>). + * @param {CKEDITOR.dom.element} el The element into which look for the + * editing spot. + * @param {Boolean} isMoveToEnd Whether move to the end editable position. + */ + moveToElementEditablePosition : function( el, isMoveToEnd ) + { + var isEditable; + + // Empty elements are rejected. + if ( CKEDITOR.dtd.$empty[ el.getName() ] ) + return false; + + while ( el && el.type == CKEDITOR.NODE_ELEMENT ) + { + isEditable = el.isEditable(); + + // If an editable element is found, move inside it. + if ( isEditable ) + this.moveToPosition( el, isMoveToEnd ? + CKEDITOR.POSITION_BEFORE_END : + CKEDITOR.POSITION_AFTER_START ); + // Stop immediately if we've found a non editable inline element (e.g ). + else if ( CKEDITOR.dtd.$inline[ el.getName() ] ) + { + this.moveToPosition( el, isMoveToEnd ? + CKEDITOR.POSITION_AFTER_END : + CKEDITOR.POSITION_BEFORE_START ); + return true; + } + + // Non-editable non-inline elements are to be bypassed, getting the next one. + if ( CKEDITOR.dtd.$empty[ el.getName() ] ) + el = el[ isMoveToEnd ? 'getPrevious' : 'getNext' ]( nonWhitespaceOrBookmarkEval ); + else + el = el[ isMoveToEnd ? 'getLast' : 'getFirst' ]( nonWhitespaceOrBookmarkEval ); + + // Stop immediately if we've found a text node. + if ( el && el.type == CKEDITOR.NODE_TEXT ) + { + this.moveToPosition( el, isMoveToEnd ? + CKEDITOR.POSITION_AFTER_END : + CKEDITOR.POSITION_BEFORE_START ); + return true; + } + } + + return isEditable; + }, + + /** + *@see {CKEDITOR.dom.range.moveToElementEditablePosition} + */ + moveToElementEditStart : function( target ) + { + return this.moveToElementEditablePosition( target ); + }, + + /** + *@see {CKEDITOR.dom.range.moveToElementEditablePosition} + */ + moveToElementEditEnd : function( target ) + { + return this.moveToElementEditablePosition( target, true ); + }, + + /** + * Get the single node enclosed within the range if there's one. + */ + getEnclosedNode : function() + { + var walkerRange = this.clone(); + + // Optimize and analyze the range to avoid DOM destructive nature of walker. (#5780) + walkerRange.optimize(); + if ( walkerRange.startContainer.type != CKEDITOR.NODE_ELEMENT + || walkerRange.endContainer.type != CKEDITOR.NODE_ELEMENT ) + return null; + + var walker = new CKEDITOR.dom.walker( walkerRange ), + isNotBookmarks = CKEDITOR.dom.walker.bookmark( true ), + isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( true ), + evaluator = function( node ) + { + return isNotWhitespaces( node ) && isNotBookmarks( node ); + }; + walkerRange.evaluator = evaluator; + var node = walker.next(); + walker.reset(); + return node && node.equals( walker.previous() ) ? node : null; + }, + + getTouchedStartNode : function() + { + var container = this.startContainer ; + + if ( this.collapsed || container.type != CKEDITOR.NODE_ELEMENT ) + return container ; + + return container.getChild( this.startOffset ) || container ; + }, + + getTouchedEndNode : function() + { + var container = this.endContainer ; + + if ( this.collapsed || container.type != CKEDITOR.NODE_ELEMENT ) + return container ; + + return container.getChild( this.endOffset - 1 ) || container ; + } + }; +})(); + +CKEDITOR.POSITION_AFTER_START = 1; // ^contents "^text" +CKEDITOR.POSITION_BEFORE_END = 2; // contents^ "text^" +CKEDITOR.POSITION_BEFORE_START = 3; // ^contents ^"text" +CKEDITOR.POSITION_AFTER_END = 4; // contents^ "text" + +CKEDITOR.ENLARGE_ELEMENT = 1; +CKEDITOR.ENLARGE_BLOCK_CONTENTS = 2; +CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS = 3; + +/** + * Check boundary types. + * @see CKEDITOR.dom.range.prototype.checkBoundaryOfElement + */ +CKEDITOR.START = 1; +CKEDITOR.END = 2; +CKEDITOR.STARTEND = 3; + +/** + * Shrink range types. + * @see CKEDITOR.dom.range.prototype.shrink + */ +CKEDITOR.SHRINK_ELEMENT = 1; +CKEDITOR.SHRINK_TEXT = 2; diff --git a/ckeditor/_source/core/dom/rangelist.js b/ckeditor/_source/core/dom/rangelist.js new file mode 100644 index 0000000..9c12e48 --- /dev/null +++ b/ckeditor/_source/core/dom/rangelist.js @@ -0,0 +1,163 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +(function() +{ + /** + * Represents a list os CKEDITOR.dom.range objects, which can be easily + * iterated sequentially. + * @constructor + * @param {CKEDITOR.dom.range|Array} [ranges] The ranges contained on this list. + * Note that, if an array of ranges is specified, the range sequence + * should match its DOM order. This class will not help to sort them. + */ + CKEDITOR.dom.rangeList = function( ranges ) + { + if ( ranges instanceof CKEDITOR.dom.rangeList ) + return ranges; + + if ( !ranges ) + ranges = []; + else if ( ranges instanceof CKEDITOR.dom.range ) + ranges = [ ranges ]; + + return CKEDITOR.tools.extend( ranges, mixins ); + }; + + var mixins = + /** @lends CKEDITOR.dom.rangeList.prototype */ + { + /** + * Creates an instance of the rangeList iterator, it should be used + * only when the ranges processing could be DOM intrusive, which + * means it may pollute and break other ranges in this list. + * Otherwise, it's enough to just iterate over this array in a for loop. + * @returns {CKEDITOR.dom.rangeListIterator} + */ + createIterator : function() + { + var rangeList = this, + bookmarks = [], + current; + + /** + * @lends CKEDITOR.dom.rangeListIterator.prototype + */ + return { + + /** + * Retrieves the next range in the list. + */ + getNextRange : function() + { + current = current == undefined ? 0 : current + 1; + + var range = rangeList[ current ]; + + // Multiple ranges might be mangled by each other. + if ( range && rangeList.length > 1 ) + { + // Bookmarking all other ranges on the first iteration, + // the range correctness after it doesn't matter since we'll + // restore them before the next iteration. + if ( !current ) + { + // Make sure bookmark correctness by reverse processing. + for ( var i = rangeList.length - 1; i > 0; i-- ) + bookmarks.unshift( rangeList[ i ].createBookmark( true ) ); + } + else + range.moveToBookmark( bookmarks.shift() ); + } + + return range; + } + }; + }, + + createBookmarks : function( serializable ) + { + var retval = [], bookmark; + for ( var i = 0; i < this.length ; i++ ) + { + retval.push( bookmark = this[ i ].createBookmark( serializable, true) ); + + // Updating the container & offset values for ranges + // that have been touched. + for ( var j = i + 1; j < this.length; j++ ) + { + this[ j ] = updateDirtyRange( bookmark, this[ j ] ); + this[ j ] = updateDirtyRange( bookmark, this[ j ], true ); + } + } + return retval; + }, + + createBookmarks2 : function( normalized ) + { + var bookmarks = []; + + for ( var i = 0 ; i < this.length ; i++ ) + bookmarks.push( this[ i ].createBookmark2( normalized ) ); + + return bookmarks; + }, + + /** + * Move each range in the list to the position specified by a list of bookmarks. + * @param {Array} bookmarks The list of bookmarks, each one matching a range in the list. + */ + moveToBookmarks : function( bookmarks ) + { + for ( var i = 0 ; i < this.length ; i++ ) + this[ i ].moveToBookmark( bookmarks[ i ] ); + } + }; + + // Update the specified range which has been mangled by previous insertion of + // range bookmark nodes.(#3256) + function updateDirtyRange( bookmark, dirtyRange, checkEnd ) + { + var serializable = bookmark.serializable, + container = dirtyRange[ checkEnd ? 'endContainer' : 'startContainer' ], + offset = checkEnd ? 'endOffset' : 'startOffset'; + + var bookmarkStart = serializable ? + dirtyRange.document.getById( bookmark.startNode ) + : bookmark.startNode; + + var bookmarkEnd = serializable ? + dirtyRange.document.getById( bookmark.endNode ) + : bookmark.endNode; + + if ( container.equals( bookmarkStart.getPrevious() ) ) + { + dirtyRange.startOffset = dirtyRange.startOffset + - container.getLength() + - bookmarkEnd.getPrevious().getLength(); + container = bookmarkEnd.getNext(); + } + else if ( container.equals( bookmarkEnd.getPrevious() ) ) + { + dirtyRange.startOffset = dirtyRange.startOffset - container.getLength(); + container = bookmarkEnd.getNext(); + } + + container.equals( bookmarkStart.getParent() ) && dirtyRange[ offset ]++; + container.equals( bookmarkEnd.getParent() ) && dirtyRange[ offset ]++; + + // Update and return this range. + dirtyRange[ checkEnd ? 'endContainer' : 'startContainer' ] = container; + return dirtyRange; + } +})(); + +/** + * (Virtual Class) Do not call this constructor. This class is not really part + * of the API. It just describes the return type of {@link CKEDITOR.dom.rangeList#createIterator}. + * @name CKEDITOR.dom.rangeListIterator + * @constructor + * @example + */ diff --git a/ckeditor/_source/core/dom/text.js b/ckeditor/_source/core/dom/text.js new file mode 100644 index 0000000..a1eb690 --- /dev/null +++ b/ckeditor/_source/core/dom/text.js @@ -0,0 +1,123 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview Defines the {@link CKEDITOR.dom.text} class, which represents + * a DOM text node. + */ + +/** + * Represents a DOM text node. + * @constructor + * @augments CKEDITOR.dom.node + * @param {Object|String} text A native DOM text node or a string containing + * the text to use to create a new text node. + * @param {CKEDITOR.dom.document} [ownerDocument] The document that will contain + * the node in case of new node creation. Defaults to the current document. + * @example + * var nativeNode = document.createTextNode( 'Example' ); + * var text = CKEDITOR.dom.text( nativeNode ); + * @example + * var text = CKEDITOR.dom.text( 'Example' ); + */ +CKEDITOR.dom.text = function( text, ownerDocument ) +{ + if ( typeof text == 'string' ) + text = ( ownerDocument ? ownerDocument.$ : document ).createTextNode( text ); + + // Theoretically, we should call the base constructor here + // (not CKEDITOR.dom.node though). But, IE doesn't support expando + // properties on text node, so the features provided by domObject will not + // work for text nodes (which is not a big issue for us). + // + // CKEDITOR.dom.domObject.call( this, element ); + + /** + * The native DOM text node represented by this class instance. + * @type Object + * @example + * var element = new CKEDITOR.dom.text( 'Example' ); + * alert( element.$.nodeType ); // "3" + */ + this.$ = text; +}; + +CKEDITOR.dom.text.prototype = new CKEDITOR.dom.node(); + +CKEDITOR.tools.extend( CKEDITOR.dom.text.prototype, + /** @lends CKEDITOR.dom.text.prototype */ + { + /** + * The node type. This is a constant value set to + * {@link CKEDITOR.NODE_TEXT}. + * @type Number + * @example + */ + type : CKEDITOR.NODE_TEXT, + + getLength : function() + { + return this.$.nodeValue.length; + }, + + getText : function() + { + return this.$.nodeValue; + }, + + /** + * Breaks this text node into two nodes at the specified offset, + * keeping both in the tree as siblings. This node then only contains + * all the content up to the offset point. A new text node, which is + * inserted as the next sibling of this node, contains all the content + * at and after the offset point. When the offset is equal to the + * length of this node, the new node has no data. + * @param {Number} The position at which to split, starting from zero. + * @returns {CKEDITOR.dom.text} The new text node. + */ + split : function( offset ) + { + // If the offset is after the last char, IE creates the text node + // on split, but don't include it into the DOM. So, we have to do + // that manually here. + if ( CKEDITOR.env.ie && offset == this.getLength() ) + { + var next = this.getDocument().createText( '' ); + next.insertAfter( this ); + return next; + } + + var doc = this.getDocument(); + var retval = new CKEDITOR.dom.text( this.$.splitText( offset ), doc ); + + // IE BUG: IE8 does not update the childNodes array in DOM after splitText(), + // we need to make some DOM changes to make it update. (#3436) + if ( CKEDITOR.env.ie8 ) + { + var workaround = new CKEDITOR.dom.text( '', doc ); + workaround.insertAfter( retval ); + workaround.remove(); + } + + return retval; + }, + + /** + * Extracts characters from indexA up to but not including indexB. + * @param {Number} indexA An integer between 0 and one less than the + * length of the text. + * @param {Number} [indexB] An integer between 0 and the length of the + * string. If omitted, extracts characters to the end of the text. + */ + substring : function( indexA, indexB ) + { + // We need the following check due to a Firefox bug + // https://bugzilla.mozilla.org/show_bug.cgi?id=458886 + if ( typeof indexB != 'number' ) + return this.$.nodeValue.substr( indexA ); + else + return this.$.nodeValue.substring( indexA, indexB ); + } + }); diff --git a/ckeditor/_source/core/dom/walker.js b/ckeditor/_source/core/dom/walker.js new file mode 100644 index 0000000..1bf0eab --- /dev/null +++ b/ckeditor/_source/core/dom/walker.js @@ -0,0 +1,445 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +(function() +{ + // This function is to be called under a "walker" instance scope. + function iterate( rtl, breakOnFalse ) + { + // Return null if we have reached the end. + if ( this._.end ) + return null; + + var node, + range = this.range, + guard, + userGuard = this.guard, + type = this.type, + getSourceNodeFn = ( rtl ? 'getPreviousSourceNode' : 'getNextSourceNode' ); + + // This is the first call. Initialize it. + if ( !this._.start ) + { + this._.start = 1; + + // Trim text nodes and optmize the range boundaries. DOM changes + // may happen at this point. + range.trim(); + + // A collapsed range must return null at first call. + if ( range.collapsed ) + { + this.end(); + return null; + } + } + + // Create the LTR guard function, if necessary. + if ( !rtl && !this._.guardLTR ) + { + // Gets the node that stops the walker when going LTR. + var limitLTR = range.endContainer, + blockerLTR = limitLTR.getChild( range.endOffset ); + + this._.guardLTR = function( node, movingOut ) + { + return ( ( !movingOut || !limitLTR.equals( node ) ) + && ( !blockerLTR || !node.equals( blockerLTR ) ) + && ( node.type != CKEDITOR.NODE_ELEMENT || !movingOut || node.getName() != 'body' ) ); + }; + } + + // Create the RTL guard function, if necessary. + if ( rtl && !this._.guardRTL ) + { + // Gets the node that stops the walker when going LTR. + var limitRTL = range.startContainer, + blockerRTL = ( range.startOffset > 0 ) && limitRTL.getChild( range.startOffset - 1 ); + + this._.guardRTL = function( node, movingOut ) + { + return ( ( !movingOut || !limitRTL.equals( node ) ) + && ( !blockerRTL || !node.equals( blockerRTL ) ) + && ( node.type != CKEDITOR.NODE_ELEMENT || !movingOut || node.getName() != 'body' ) ); + }; + } + + // Define which guard function to use. + var stopGuard = rtl ? this._.guardRTL : this._.guardLTR; + + // Make the user defined guard function participate in the process, + // otherwise simply use the boundary guard. + if ( userGuard ) + { + guard = function( node, movingOut ) + { + if ( stopGuard( node, movingOut ) === false ) + return false; + + return userGuard( node, movingOut ); + }; + } + else + guard = stopGuard; + + if ( this.current ) + node = this.current[ getSourceNodeFn ]( false, type, guard ); + else + { + // Get the first node to be returned. + + if ( rtl ) + { + node = range.endContainer; + + if ( range.endOffset > 0 ) + { + node = node.getChild( range.endOffset - 1 ); + if ( guard( node ) === false ) + node = null; + } + else + node = ( guard ( node, true ) === false ) ? + null : node.getPreviousSourceNode( true, type, guard ); + } + else + { + node = range.startContainer; + node = node.getChild( range.startOffset ); + + if ( node ) + { + if ( guard( node ) === false ) + node = null; + } + else + node = ( guard ( range.startContainer, true ) === false ) ? + null : range.startContainer.getNextSourceNode( true, type, guard ) ; + } + } + + while ( node && !this._.end ) + { + this.current = node; + + if ( !this.evaluator || this.evaluator( node ) !== false ) + { + if ( !breakOnFalse ) + return node; + } + else if ( breakOnFalse && this.evaluator ) + return false; + + node = node[ getSourceNodeFn ]( false, type, guard ); + } + + this.end(); + return this.current = null; + } + + function iterateToLast( rtl ) + { + var node, last = null; + + while ( ( node = iterate.call( this, rtl ) ) ) + last = node; + + return last; + } + + CKEDITOR.dom.walker = CKEDITOR.tools.createClass( + { + /** + * Utility class to "walk" the DOM inside a range boundaries. If + * necessary, partially included nodes (text nodes) are broken to + * reflect the boundaries limits, so DOM and range changes may happen. + * Outside changes to the range may break the walker. + * + * The walker may return nodes that are not totaly included into the + * range boundaires. Let's take the following range representation, + * where the square brackets indicate the boundaries: + * + * [<p>Some <b>sample] text</b> + * + * While walking forward into the above range, the following nodes are + * returned: <p>, "Some ", <b> and "sample". Going + * backwards instead we have: "sample" and "Some ". So note that the + * walker always returns nodes when "entering" them, but not when + * "leaving" them. The guard function is instead called both when + * entering and leaving nodes. + * + * @constructor + * @param {CKEDITOR.dom.range} range The range within which walk. + */ + $ : function( range ) + { + this.range = range; + + /** + * A function executed for every matched node, to check whether + * it's to be considered into the walk or not. If not provided, all + * matched nodes are considered good. + * If the function returns "false" the node is ignored. + * @name CKEDITOR.dom.walker.prototype.evaluator + * @property + * @type Function + */ + // this.evaluator = null; + + /** + * A function executed for every node the walk pass by to check + * whether the walk is to be finished. It's called when both + * entering and exiting nodes, as well as for the matched nodes. + * If this function returns "false", the walking ends and no more + * nodes are evaluated. + * @name CKEDITOR.dom.walker.prototype.guard + * @property + * @type Function + */ + // this.guard = null; + + /** @private */ + this._ = {}; + }, + +// statics : +// { +// /* Creates a CKEDITOR.dom.walker instance to walk inside DOM boundaries set by nodes. +// * @param {CKEDITOR.dom.node} startNode The node from wich the walk +// * will start. +// * @param {CKEDITOR.dom.node} [endNode] The last node to be considered +// * in the walk. No more nodes are retrieved after touching or +// * passing it. If not provided, the walker stops at the +// * <body> closing boundary. +// * @returns {CKEDITOR.dom.walker} A DOM walker for the nodes between the +// * provided nodes. +// */ +// createOnNodes : function( startNode, endNode, startInclusive, endInclusive ) +// { +// var range = new CKEDITOR.dom.range(); +// if ( startNode ) +// range.setStartAt( startNode, startInclusive ? CKEDITOR.POSITION_BEFORE_START : CKEDITOR.POSITION_AFTER_END ) ; +// else +// range.setStartAt( startNode.getDocument().getBody(), CKEDITOR.POSITION_AFTER_START ) ; +// +// if ( endNode ) +// range.setEndAt( endNode, endInclusive ? CKEDITOR.POSITION_AFTER_END : CKEDITOR.POSITION_BEFORE_START ) ; +// else +// range.setEndAt( startNode.getDocument().getBody(), CKEDITOR.POSITION_BEFORE_END ) ; +// +// return new CKEDITOR.dom.walker( range ); +// } +// }, +// + proto : + { + /** + * Stop walking. No more nodes are retrieved if this function gets + * called. + */ + end : function() + { + this._.end = 1; + }, + + /** + * Retrieves the next node (at right). + * @returns {CKEDITOR.dom.node} The next node or null if no more + * nodes are available. + */ + next : function() + { + return iterate.call( this ); + }, + + /** + * Retrieves the previous node (at left). + * @returns {CKEDITOR.dom.node} The previous node or null if no more + * nodes are available. + */ + previous : function() + { + return iterate.call( this, true ); + }, + + /** + * Check all nodes at right, executing the evaluation fuction. + * @returns {Boolean} "false" if the evaluator function returned + * "false" for any of the matched nodes. Otherwise "true". + */ + checkForward : function() + { + return iterate.call( this, false, true ) !== false; + }, + + /** + * Check all nodes at left, executing the evaluation fuction. + * @returns {Boolean} "false" if the evaluator function returned + * "false" for any of the matched nodes. Otherwise "true". + */ + checkBackward : function() + { + return iterate.call( this, true, true ) !== false; + }, + + /** + * Executes a full walk forward (to the right), until no more nodes + * are available, returning the last valid node. + * @returns {CKEDITOR.dom.node} The last node at the right or null + * if no valid nodes are available. + */ + lastForward : function() + { + return iterateToLast.call( this ); + }, + + /** + * Executes a full walk backwards (to the left), until no more nodes + * are available, returning the last valid node. + * @returns {CKEDITOR.dom.node} The last node at the left or null + * if no valid nodes are available. + */ + lastBackward : function() + { + return iterateToLast.call( this, true ); + }, + + reset : function() + { + delete this.current; + this._ = {}; + } + + } + }); + + /* + * Anything whose display computed style is block, list-item, table, + * table-row-group, table-header-group, table-footer-group, table-row, + * table-column-group, table-column, table-cell, table-caption, or whose node + * name is hr, br (when enterMode is br only) is a block boundary. + */ + var blockBoundaryDisplayMatch = + { + block : 1, + 'list-item' : 1, + table : 1, + 'table-row-group' : 1, + 'table-header-group' : 1, + 'table-footer-group' : 1, + 'table-row' : 1, + 'table-column-group' : 1, + 'table-column' : 1, + 'table-cell' : 1, + 'table-caption' : 1 + }, + blockBoundaryNodeNameMatch = { hr : 1 }; + + CKEDITOR.dom.element.prototype.isBlockBoundary = function( customNodeNames ) + { + var nodeNameMatches = CKEDITOR.tools.extend( {}, + blockBoundaryNodeNameMatch, customNodeNames || {} ); + + return blockBoundaryDisplayMatch[ this.getComputedStyle( 'display' ) ] || + nodeNameMatches[ this.getName() ]; + }; + + CKEDITOR.dom.walker.blockBoundary = function( customNodeNames ) + { + return function( node , type ) + { + return ! ( node.type == CKEDITOR.NODE_ELEMENT + && node.isBlockBoundary( customNodeNames ) ); + }; + }; + + CKEDITOR.dom.walker.listItemBoundary = function() + { + return this.blockBoundary( { br : 1 } ); + }; + + /** + * Whether the to-be-evaluated node is a bookmark node OR bookmark node + * inner contents. + * @param {Boolean} contentOnly Whether only test againt the text content of + * bookmark node instead of the element itself(default). + * @param {Boolean} isReject Whether should return 'false' for the bookmark + * node instead of 'true'(default). + */ + CKEDITOR.dom.walker.bookmark = function( contentOnly, isReject ) + { + function isBookmarkNode( node ) + { + return ( node && node.getName + && node.getName() == 'span' + && node.hasAttribute('_cke_bookmark') ); + } + + return function( node ) + { + var isBookmark, parent; + // Is bookmark inner text node? + isBookmark = ( node && !node.getName && ( parent = node.getParent() ) + && isBookmarkNode( parent ) ); + // Is bookmark node? + isBookmark = contentOnly ? isBookmark : isBookmark || isBookmarkNode( node ); + return isReject ^ isBookmark; + }; + }; + + /** + * Whether the node is a text node containing only whitespaces characters. + * @param isReject + */ + CKEDITOR.dom.walker.whitespaces = function( isReject ) + { + return function( node ) + { + var isWhitespace = node && ( node.type == CKEDITOR.NODE_TEXT ) + && !CKEDITOR.tools.trim( node.getText() ); + return isReject ^ isWhitespace; + }; + }; + + /** + * Whether the node is invisible in wysiwyg mode. + * @param isReject + */ + CKEDITOR.dom.walker.invisible = function( isReject ) + { + var whitespace = CKEDITOR.dom.walker.whitespaces(); + return function( node ) + { + // Nodes that take no spaces in wysiwyg: + // 1. White-spaces but not including NBSP; + // 2. Empty inline elements, e.g. we're checking here + // 'offsetHeight' instead of 'offsetWidth' for properly excluding + // all sorts of empty paragraph, e.g.
      . + var isInvisible = whitespace( node ) || node.is && !node.$.offsetHeight; + return isReject ^ isInvisible; + }; + }; + + var tailNbspRegex = /^[\t\r\n ]*(?: |\xa0)$/, + isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( true ), + isNotBookmark = CKEDITOR.dom.walker.bookmark( false, true ), + fillerEvaluator = function( element ) + { + return isNotBookmark( element ) && isNotWhitespaces( element ); + }; + + // Check if there's a filler node at the end of an element, and return it. + CKEDITOR.dom.element.prototype.getBogus = function () + { + var tail = this.getLast( fillerEvaluator ); + if ( tail && ( !CKEDITOR.env.ie ? tail.is && tail.is( 'br' ) + : tail.getText && tailNbspRegex.test( tail.getText() ) ) ) + { + return tail; + } + return false; + }; + +})(); diff --git a/ckeditor/_source/core/dom/window.js b/ckeditor/_source/core/dom/window.js new file mode 100644 index 0000000..01e2d58 --- /dev/null +++ b/ckeditor/_source/core/dom/window.js @@ -0,0 +1,96 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview Defines the {@link CKEDITOR.dom.document} class, which + * represents a DOM document. + */ + +/** + * Represents a DOM window. + * @constructor + * @augments CKEDITOR.dom.domObject + * @param {Object} domWindow A native DOM window. + * @example + * var document = new CKEDITOR.dom.window( window ); + */ +CKEDITOR.dom.window = function( domWindow ) +{ + CKEDITOR.dom.domObject.call( this, domWindow ); +}; + +CKEDITOR.dom.window.prototype = new CKEDITOR.dom.domObject(); + +CKEDITOR.tools.extend( CKEDITOR.dom.window.prototype, + /** @lends CKEDITOR.dom.window.prototype */ + { + /** + * Moves the selection focus to this window. + * @function + * @example + * var win = new CKEDITOR.dom.window( window ); + * win.focus(); + */ + focus : function() + { + // Webkit is sometimes failed to focus iframe, blur it first(#3835). + if ( CKEDITOR.env.webkit && this.$.parent ) + this.$.parent.focus(); + this.$.focus(); + }, + + /** + * Gets the width and height of this window's viewable area. + * @function + * @returns {Object} An object with the "width" and "height" + * properties containing the size. + * @example + * var win = new CKEDITOR.dom.window( window ); + * var size = win.getViewPaneSize(); + * alert( size.width ); + * alert( size.height ); + */ + getViewPaneSize : function() + { + var doc = this.$.document, + stdMode = doc.compatMode == 'CSS1Compat'; + return { + width : ( stdMode ? doc.documentElement.clientWidth : doc.body.clientWidth ) || 0, + height : ( stdMode ? doc.documentElement.clientHeight : doc.body.clientHeight ) || 0 + }; + }, + + /** + * Gets the current position of the window's scroll. + * @function + * @returns {Object} An object with the "x" and "y" properties + * containing the scroll position. + * @example + * var win = new CKEDITOR.dom.window( window ); + * var pos = win.getScrollPosition(); + * alert( pos.x ); + * alert( pos.y ); + */ + getScrollPosition : function() + { + var $ = this.$; + + if ( 'pageXOffset' in $ ) + { + return { + x : $.pageXOffset || 0, + y : $.pageYOffset || 0 + }; + } + else + { + var doc = $.document; + return { + x : doc.documentElement.scrollLeft || doc.body.scrollLeft || 0, + y : doc.documentElement.scrollTop || doc.body.scrollTop || 0 + }; + } + } + }); diff --git a/ckeditor/_source/core/dtd.js b/ckeditor/_source/core/dtd.js new file mode 100644 index 0000000..d5af5bf --- /dev/null +++ b/ckeditor/_source/core/dtd.js @@ -0,0 +1,233 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview Defines the {@link CKEDITOR.dtd} object, which holds the DTD + * mapping for XHTML 1.0 Transitional. This file was automatically + * generated from the file: xhtml1-transitional.dtd. + */ + +/** + * Holds and object representation of the HTML DTD to be used by the editor in + * its internal operations. + * + * Each element in the DTD is represented by a + * property in this object. Each property contains the list of elements that + * can be contained by the element. Text is represented by the "#" property. + * + * Several special grouping properties are also available. Their names start + * with the "$" character. + * @namespace + * @example + * // Check if "div" can be contained in a "p" element. + * alert( !!CKEDITOR.dtd[ 'p' ][ 'div' ] ); "false" + * @example + * // Check if "p" can be contained in a "div" element. + * alert( !!CKEDITOR.dtd[ 'div' ][ 'p' ] ); "true" + * @example + * // Check if "p" is a block element. + * alert( !!CKEDITOR.dtd.$block[ 'p' ] ); "true" + */ +CKEDITOR.dtd = (function() +{ + var X = CKEDITOR.tools.extend, + + A = {isindex:1,fieldset:1}, + B = {input:1,button:1,select:1,textarea:1,label:1}, + C = X({a:1},B), + D = X({iframe:1},C), + E = {hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1}, + F = {ins:1,del:1,script:1,style:1}, + G = X({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1},F), + H = X({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1},G), + I = X({p:1},H), + J = X({iframe:1},H,B), + K = {img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1}, + + L = X({a:1},J), + M = {tr:1}, + N = {'#':1}, + O = X({param:1},K), + P = X({form:1},A,D,E,I), + Q = {li:1}, + R = {style:1,script:1}, + S = {base:1,link:1,meta:1,title:1}, + T = X(S,R), + U = {head:1,body:1}, + V = {html:1}; + + var block = {address:1,blockquote:1,center:1,dir:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,menu:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1}; + + return /** @lends CKEDITOR.dtd */ { + + // The "$" items have been added manually. + + // List of elements living outside body. + $nonBodyContent: X(V,U,S), + + /** + * List of block elements, like "p" or "div". + * @type Object + * @example + */ + $block : block, + + /** + * List of block limit elements. + * @type Object + * @example + */ + $blockLimit : { body:1,div:1,td:1,th:1,caption:1,form:1 }, + + $inline : L, // Just like span. + + $body : X({script:1,style:1}, block), + + $cdata : {script:1,style:1}, + + /** + * List of empty (self-closing) elements, like "br" or "img". + * @type Object + * @example + */ + $empty : {area:1,base:1,br:1,col:1,hr:1,img:1,input:1,link:1,meta:1,param:1}, + + /** + * List of list item elements, like "li" or "dd". + * @type Object + * @example + */ + $listItem : {dd:1,dt:1,li:1}, + + /** + * List of list root elements. + * @type Object + * @example + */ + $list: { ul:1,ol:1,dl:1}, + + /** + * Elements that accept text nodes, but are not possible to edit into + * the browser. + * @type Object + * @example + */ + $nonEditable : {applet:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,script:1,textarea:1,param:1}, + + /** + * List of elements that can be ignored if empty, like "b" or "span". + * @type Object + * @example + */ + $removeEmpty : {abbr:1,acronym:1,address:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1}, + + /** + * List of elements that have tabindex set to zero by default. + * @type Object + * @example + */ + $tabIndex : {a:1,area:1,button:1,input:1,object:1,select:1,textarea:1}, + + /** + * List of elements used inside the "table" element, like "tbody" or "td". + * @type Object + * @example + */ + $tableContent : {caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}, + + html: U, + head: T, + style: N, + script: N, + body: P, + base: {}, + link: {}, + meta: {}, + title: N, + col : {}, + tr : {td:1,th:1}, + img : {}, + colgroup : {col:1}, + noscript : P, + td : P, + br : {}, + th : P, + center : P, + kbd : L, + button : X(I,E), + basefont : {}, + h5 : L, + h4 : L, + samp : L, + h6 : L, + ol : Q, + h1 : L, + h3 : L, + option : N, + h2 : L, + form : X(A,D,E,I), + select : {optgroup:1,option:1}, + font : L, + ins : L, + menu : Q, + abbr : L, + label : L, + table : {thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1}, + code : L, + script : N, + tfoot : M, + cite : L, + li : P, + input : {}, + iframe : P, + strong : L, + textarea : N, + noframes : P, + big : L, + small : L, + span : L, + hr : {}, + dt : L, + sub : L, + optgroup : {option:1}, + param : {}, + bdo : L, + 'var' : L, + div : P, + object : O, + sup : L, + dd : P, + strike : L, + area : {}, + dir : Q, + map : X({area:1,form:1,p:1},A,F,E), + applet : O, + dl : {dt:1,dd:1}, + del : L, + isindex : {}, + fieldset : X({legend:1},K), + thead : M, + ul : Q, + acronym : L, + b : L, + a : J, + blockquote : P, + caption : L, + i : L, + u : L, + tbody : M, + s : L, + address : X(D,I), + tt : L, + legend : L, + q : L, + pre : X(G,C), + p : L, + em : L, + dfn : L + }; +})(); + +// PACKAGER_RENAME( CKEDITOR.dtd ) diff --git a/ckeditor/_source/core/editor.js b/ckeditor/_source/core/editor.js new file mode 100644 index 0000000..0b373f7 --- /dev/null +++ b/ckeditor/_source/core/editor.js @@ -0,0 +1,759 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview Defines the {@link CKEDITOR.editor} class, which represents an + * editor instance. + */ + +(function() +{ + // The counter for automatic instance names. + var nameCounter = 0; + + var getNewName = function() + { + var name = 'editor' + ( ++nameCounter ); + return ( CKEDITOR.instances && CKEDITOR.instances[ name ] ) ? getNewName() : name; + }; + + // ##### START: Config Privates + + // These function loads custom configuration files and cache the + // CKEDITOR.editorConfig functions defined on them, so there is no need to + // download them more than once for several instances. + var loadConfigLoaded = {}; + var loadConfig = function( editor ) + { + var customConfig = editor.config.customConfig; + + // Check if there is a custom config to load. + if ( !customConfig ) + return false; + + customConfig = CKEDITOR.getUrl( customConfig ); + + var loadedConfig = loadConfigLoaded[ customConfig ] || ( loadConfigLoaded[ customConfig ] = {} ); + + // If the custom config has already been downloaded, reuse it. + if ( loadedConfig.fn ) + { + // Call the cached CKEDITOR.editorConfig defined in the custom + // config file for the editor instance depending on it. + loadedConfig.fn.call( editor, editor.config ); + + // If there is no other customConfig in the chain, fire the + // "configLoaded" event. + if ( CKEDITOR.getUrl( editor.config.customConfig ) == customConfig || !loadConfig( editor ) ) + editor.fireOnce( 'customConfigLoaded' ); + } + else + { + // Load the custom configuration file. + CKEDITOR.scriptLoader.load( customConfig, function() + { + // If the CKEDITOR.editorConfig function has been properly + // defined in the custom configuration file, cache it. + if ( CKEDITOR.editorConfig ) + loadedConfig.fn = CKEDITOR.editorConfig; + else + loadedConfig.fn = function(){}; + + // Call the load config again. This time the custom + // config is already cached and so it will get loaded. + loadConfig( editor ); + }); + } + + return true; + }; + + var initConfig = function( editor, instanceConfig ) + { + // Setup the lister for the "customConfigLoaded" event. + editor.on( 'customConfigLoaded', function() + { + if ( instanceConfig ) + { + // Register the events that may have been set at the instance + // configuration object. + if ( instanceConfig.on ) + { + for ( var eventName in instanceConfig.on ) + { + editor.on( eventName, instanceConfig.on[ eventName ] ); + } + } + + // Overwrite the settings from the in-page config. + CKEDITOR.tools.extend( editor.config, instanceConfig, true ); + + delete editor.config.on; + } + + onConfigLoaded( editor ); + }); + + // The instance config may override the customConfig setting to avoid + // loading the default ~/config.js file. + if ( instanceConfig && instanceConfig.customConfig != undefined ) + editor.config.customConfig = instanceConfig.customConfig; + + // Load configs from the custom configuration files. + if ( !loadConfig( editor ) ) + editor.fireOnce( 'customConfigLoaded' ); + }; + + // ##### END: Config Privates + + var onConfigLoaded = function( editor ) + { + // Set config related properties. + + var skin = editor.config.skin.split( ',' ), + skinName = skin[ 0 ], + skinPath = CKEDITOR.getUrl( skin[ 1 ] || ( + '_source/' + // @Packager.RemoveLine + 'skins/' + skinName + '/' ) ); + + editor.skinName = skinName; + editor.skinPath = skinPath; + editor.skinClass = 'cke_skin_' + skinName; + + editor.tabIndex = editor.config.tabIndex || editor.element.getAttribute( 'tabindex' ) || 0; + + // Fire the "configLoaded" event. + editor.fireOnce( 'configLoaded' ); + + // Load language file. + loadSkin( editor ); + }; + + var loadLang = function( editor ) + { + CKEDITOR.lang.load( editor.config.language, editor.config.defaultLanguage, function( languageCode, lang ) + { + editor.langCode = languageCode; + + // As we'll be adding plugin specific entries that could come + // from different language code files, we need a copy of lang, + // not a direct reference to it. + editor.lang = CKEDITOR.tools.prototypedCopy( lang ); + + // We're not able to support RTL in Firefox 2 at this time. + if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 && editor.lang.dir == 'rtl' ) + editor.lang.dir = 'ltr'; + + var config = editor.config; + config.contentsLangDirection == 'ui' && ( config.contentsLangDirection = editor.lang.dir ); + + loadPlugins( editor ); + }); + }; + + var loadPlugins = function( editor ) + { + var config = editor.config, + plugins = config.plugins, + extraPlugins = config.extraPlugins, + removePlugins = config.removePlugins; + + if ( extraPlugins ) + { + // Remove them first to avoid duplications. + var removeRegex = new RegExp( '(?:^|,)(?:' + extraPlugins.replace( /\s*,\s*/g, '|' ) + ')(?=,|$)' , 'g' ); + plugins = plugins.replace( removeRegex, '' ); + + plugins += ',' + extraPlugins; + } + + if ( removePlugins ) + { + removeRegex = new RegExp( '(?:^|,)(?:' + removePlugins.replace( /\s*,\s*/g, '|' ) + ')(?=,|$)' , 'g' ); + plugins = plugins.replace( removeRegex, '' ); + } + + // Load all plugins defined in the "plugins" setting. + CKEDITOR.plugins.load( plugins.split( ',' ), function( plugins ) + { + // The list of plugins. + var pluginsArray = []; + + // The language code to get loaded for each plugin. Null + // entries will be appended for plugins with no language files. + var languageCodes = []; + + // The list of URLs to language files. + var languageFiles = []; + + // Cache the loaded plugin names. + editor.plugins = plugins; + + // Loop through all plugins, to build the list of language + // files to get loaded. + for ( var pluginName in plugins ) + { + var plugin = plugins[ pluginName ], + pluginLangs = plugin.lang, + pluginPath = CKEDITOR.plugins.getPath( pluginName ), + lang = null; + + // Set the plugin path in the plugin. + plugin.path = pluginPath; + + // If the plugin has "lang". + if ( pluginLangs ) + { + // Resolve the plugin language. If the current language + // is not available, get the first one (default one). + lang = ( CKEDITOR.tools.indexOf( pluginLangs, editor.langCode ) >= 0 ? editor.langCode : pluginLangs[ 0 ] ); + + if ( !plugin.lang[ lang ] ) + { + // Put the language file URL into the list of files to + // get downloaded. + languageFiles.push( CKEDITOR.getUrl( pluginPath + 'lang/' + lang + '.js' ) ); + } + else + { + CKEDITOR.tools.extend( editor.lang, plugin.lang[ lang ] ); + lang = null; + } + } + + // Save the language code, so we know later which + // language has been resolved to this plugin. + languageCodes.push( lang ); + + pluginsArray.push( plugin ); + } + + // Load all plugin specific language files in a row. + CKEDITOR.scriptLoader.load( languageFiles, function() + { + // Initialize all plugins that have the "beforeInit" and "init" methods defined. + var methods = [ 'beforeInit', 'init', 'afterInit' ]; + for ( var m = 0 ; m < methods.length ; m++ ) + { + for ( var i = 0 ; i < pluginsArray.length ; i++ ) + { + var plugin = pluginsArray[ i ]; + + // Uses the first loop to update the language entries also. + if ( m === 0 && languageCodes[ i ] && plugin.lang ) + CKEDITOR.tools.extend( editor.lang, plugin.lang[ languageCodes[ i ] ] ); + + // Call the plugin method (beforeInit and init). + if ( plugin[ methods[ m ] ] ) + plugin[ methods[ m ] ]( editor ); + } + } + + // Load the editor skin. + editor.fire( 'pluginsLoaded' ); + loadTheme( editor ); + }); + }); + }; + + var loadSkin = function( editor ) + { + CKEDITOR.skins.load( editor, 'editor', function() + { + loadLang( editor ); + }); + }; + + var loadTheme = function( editor ) + { + var theme = editor.config.theme; + CKEDITOR.themes.load( theme, function() + { + var editorTheme = editor.theme = CKEDITOR.themes.get( theme ); + editorTheme.path = CKEDITOR.themes.getPath( theme ); + editorTheme.build( editor ); + + if ( editor.config.autoUpdateElement ) + attachToForm( editor ); + }); + }; + + var attachToForm = function( editor ) + { + var element = editor.element; + + // If are replacing a textarea, we must + if ( editor.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE && element.is( 'textarea' ) ) + { + var form = element.$.form && new CKEDITOR.dom.element( element.$.form ); + if ( form ) + { + function onSubmit() + { + editor.updateElement(); + } + form.on( 'submit',onSubmit ); + + // Setup the submit function because it doesn't fire the + // "submit" event. + if ( !form.$.submit.nodeName ) + { + form.$.submit = CKEDITOR.tools.override( form.$.submit, function( originalSubmit ) + { + return function() + { + editor.updateElement(); + + // For IE, the DOM submit function is not a + // function, so we need thid check. + if ( originalSubmit.apply ) + originalSubmit.apply( this, arguments ); + else + originalSubmit(); + }; + }); + } + + // Remove 'submit' events registered on form element before destroying.(#3988) + editor.on( 'destroy', function() + { + form.removeListener( 'submit', onSubmit ); + } ); + } + } + }; + + function updateCommandsMode() + { + var command, + commands = this._.commands, + mode = this.mode; + + for ( var name in commands ) + { + command = commands[ name ]; + command[ command.startDisabled ? 'disable' : command.modes[ mode ] ? 'enable' : 'disable' ](); + } + } + + /** + * Initializes the editor instance. This function is called by the editor + * contructor (editor_basic.js). + * @private + */ + CKEDITOR.editor.prototype._init = function() + { + // Get the properties that have been saved in the editor_base + // implementation. + var element = CKEDITOR.dom.element.get( this._.element ), + instanceConfig = this._.instanceConfig; + delete this._.element; + delete this._.instanceConfig; + + this._.commands = {}; + this._.styles = []; + + /** + * The DOM element that has been replaced by this editor instance. This + * element holds the editor data on load and post. + * @name CKEDITOR.editor.prototype.element + * @type CKEDITOR.dom.element + * @example + * var editor = CKEDITOR.instances.editor1; + * alert( editor.element.getName() ); "textarea" + */ + this.element = element; + + /** + * The editor instance name. It hay be the replaced element id, name or + * a default name using a progressive counter (editor1, editor2, ...). + * @name CKEDITOR.editor.prototype.name + * @type String + * @example + * var editor = CKEDITOR.instances.editor1; + * alert( editor.name ); "editor1" + */ + this.name = ( element && ( this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) + && ( element.getId() || element.getNameAtt() ) ) + || getNewName(); + + if ( this.name in CKEDITOR.instances ) + throw '[CKEDITOR.editor] The instance "' + this.name + '" already exists.'; + + /** + * The configurations for this editor instance. It inherits all + * settings defined in (@link CKEDITOR.config}, combined with settings + * loaded from custom configuration files and those defined inline in + * the page when creating the editor. + * @name CKEDITOR.editor.prototype.config + * @type Object + * @example + * var editor = CKEDITOR.instances.editor1; + * alert( editor.config.theme ); "default" e.g. + */ + this.config = CKEDITOR.tools.prototypedCopy( CKEDITOR.config ); + + /** + * Namespace containing UI features related to this editor instance. + * @name CKEDITOR.editor.prototype.ui + * @type CKEDITOR.ui + * @example + */ + this.ui = new CKEDITOR.ui( this ); + + /** + * Controls the focus state of this editor instance. This property + * is rarely used for normal API operations. It is mainly + * destinated to developer adding UI elements to the editor interface. + * @name CKEDITOR.editor.prototype.focusManager + * @type CKEDITOR.focusManager + * @example + */ + this.focusManager = new CKEDITOR.focusManager( this ); + + CKEDITOR.fire( 'instanceCreated', null, this ); + + this.on( 'mode', updateCommandsMode, null, null, 1 ); + + initConfig( this, instanceConfig ); + }; +})(); + +CKEDITOR.tools.extend( CKEDITOR.editor.prototype, + /** @lends CKEDITOR.editor.prototype */ + { + /** + * Adds a command definition to the editor instance. Commands added with + * this function can be later executed with {@link #execCommand}. + * @param {String} commandName The indentifier name of the command. + * @param {CKEDITOR.commandDefinition} commandDefinition The command definition. + * @example + * editorInstance.addCommand( 'sample', + * { + * exec : function( editor ) + * { + * alert( 'Executing a command for the editor name "' + editor.name + '"!' ); + * } + * }); + */ + addCommand : function( commandName, commandDefinition ) + { + return this._.commands[ commandName ] = new CKEDITOR.command( this, commandDefinition ); + }, + + /** + * Add a trunk of css text to the editor which will be applied to the wysiwyg editing document. + * Note: This function should be called before editor is loaded to take effect. + * @param css {String} CSS text. + * @example + * editorInstance.addCss( 'body { background-color: grey; }' ); + */ + addCss : function( css ) + { + this._.styles.push( css ); + }, + + /** + * Destroys the editor instance, releasing all resources used by it. + * If the editor replaced an element, the element will be recovered. + * @param {Boolean} [noUpdate] If the instance is replacing a DOM + * element, this parameter indicates whether or not to update the + * element with the instance contents. + * @example + * alert( CKEDITOR.instances.editor1 ); e.g "object" + * CKEDITOR.instances.editor1.destroy(); + * alert( CKEDITOR.instances.editor1 ); "undefined" + */ + destroy : function( noUpdate ) + { + if ( !noUpdate ) + this.updateElement(); + + if ( this.mode ) + { + // -> currentMode.unload( holderElement ); + this._.modes[ this.mode ].unload( this.getThemeSpace( 'contents' ) ); + } + + this.theme.destroy( this ); + + var toolbars, + index = 0, + j, + items, + instance; + + if ( this.toolbox ) + { + toolbars = this.toolbox.toolbars; + for ( ; index < toolbars.length ; index++ ) + { + items = toolbars[ index ].items; + for ( j = 0 ; j < items.length ; j++ ) + { + instance = items[ j ]; + if ( instance.clickFn ) CKEDITOR.tools.removeFunction( instance.clickFn ); + if ( instance.keyDownFn ) CKEDITOR.tools.removeFunction( instance.keyDownFn ); + + if ( instance.index ) CKEDITOR.ui.button._.instances[ instance.index ] = null; + } + } + } + + if ( this.contextMenu ) + CKEDITOR.tools.removeFunction( this.contextMenu._.functionId ); + + if ( this._.filebrowserFn ) + CKEDITOR.tools.removeFunction( this._.filebrowserFn ); + + this.fire( 'destroy' ); + CKEDITOR.remove( this ); + CKEDITOR.fire( 'instanceDestroyed', null, this ); + }, + + /** + * Executes a command. + * @param {String} commandName The indentifier name of the command. + * @param {Object} [data] Data to be passed to the command + * @returns {Boolean} "true" if the command has been successfuly + * executed, otherwise "false". + * @example + * editorInstance.execCommand( 'Bold' ); + */ + execCommand : function( commandName, data ) + { + var command = this.getCommand( commandName ); + + var eventData = + { + name: commandName, + commandData: data, + command: command + }; + + if ( command && command.state != CKEDITOR.TRISTATE_DISABLED ) + { + if ( this.fire( 'beforeCommandExec', eventData ) !== true ) + { + eventData.returnValue = command.exec( eventData.commandData ); + + // Fire the 'afterCommandExec' immediately if command is synchronous. + if ( !command.async && this.fire( 'afterCommandExec', eventData ) !== true ) + return eventData.returnValue; + } + } + + // throw 'Unknown command name "' + commandName + '"'; + return false; + }, + + /** + * Gets one of the registered commands. Note that, after registering a + * command definition with addCommand, it is transformed internally + * into an instance of {@link CKEDITOR.command}, which will be then + * returned by this function. + * @param {String} commandName The name of the command to be returned. + * This is the same used to register the command with addCommand. + * @returns {CKEDITOR.command} The command object identified by the + * provided name. + */ + getCommand : function( commandName ) + { + return this._.commands[ commandName ]; + }, + + /** + * Gets the editor data. The data will be in raw format. It is the same + * data that is posted by the editor. + * @type String + * @returns (String) The editor data. + * @example + * if ( CKEDITOR.instances.editor1.getData() == '' ) + * alert( 'There is no data available' ); + */ + getData : function() + { + this.fire( 'beforeGetData' ); + + var eventData = this._.data; + + if ( typeof eventData != 'string' ) + { + var element = this.element; + if ( element && this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) + eventData = element.is( 'textarea' ) ? element.getValue() : element.getHtml(); + else + eventData = ''; + } + + eventData = { dataValue : eventData }; + + // Fire "getData" so data manipulation may happen. + this.fire( 'getData', eventData ); + + return eventData.dataValue; + }, + + getSnapshot : function() + { + var data = this.fire( 'getSnapshot' ); + + if ( typeof data != 'string' ) + { + var element = this.element; + if ( element && this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) + data = element.is( 'textarea' ) ? element.getValue() : element.getHtml(); + } + + return data; + }, + + loadSnapshot : function( snapshot ) + { + this.fire( 'loadSnapshot', snapshot ); + }, + + /** + * Sets the editor data. The data must be provided in raw format (HTML).
      + *
      + * Note that this menthod is asynchronous. The "callback" parameter must + * be used if interaction with the editor is needed after setting the data. + * @param {String} data HTML code to replace the curent content in the + * editor. + * @param {Function} callback Function to be called after the setData + * is completed. + * @example + * CKEDITOR.instances.editor1.setData( '<p>This is the editor data.</p>' ); + * @example + * CKEDITOR.instances.editor1.setData( '<p>Some other editor data.</p>', function() + * { + * this.checkDirty(); // true + * }); + */ + setData : function( data , callback ) + { + if( callback ) + { + this.on( 'dataReady', function( evt ) + { + evt.removeListener(); + callback.call( evt.editor ); + } ); + } + + // Fire "setData" so data manipulation may happen. + var eventData = { dataValue : data }; + this.fire( 'setData', eventData ); + + this._.data = eventData.dataValue; + + this.fire( 'afterSetData', eventData ); + }, + + /** + * Inserts HTML into the currently selected position in the editor. + * @param {String} data HTML code to be inserted into the editor. + * @example + * CKEDITOR.instances.editor1.insertHtml( '<p>This is a new paragraph.</p>' ); + */ + insertHtml : function( data ) + { + this.fire( 'insertHtml', data ); + }, + + /** + * Inserts an element into the currently selected position in the + * editor. + * @param {CKEDITOR.dom.element} element The element to be inserted + * into the editor. + * @example + * var element = CKEDITOR.dom.element.createFromHtml( '<img src="hello.png" border="0" title="Hello" />' ); + * CKEDITOR.instances.editor1.insertElement( element ); + */ + insertElement : function( element ) + { + this.fire( 'insertElement', element ); + }, + + checkDirty : function() + { + return ( this.mayBeDirty && this._.previousValue !== this.getSnapshot() ); + }, + + resetDirty : function() + { + if ( this.mayBeDirty ) + this._.previousValue = this.getSnapshot(); + }, + + /** + * Updates the <textarea> element that has been replaced by the editor with + * the current data available in the editor. + * @example + * CKEDITOR.instances.editor1.updateElement(); + * alert( document.getElementById( 'editor1' ).value ); // The current editor data. + */ + updateElement : function() + { + var element = this.element; + if ( element && this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) + { + var data = this.getData(); + + if ( this.config.htmlEncodeOutput ) + data = CKEDITOR.tools.htmlEncode( data ); + + if ( element.is( 'textarea' ) ) + element.setValue( data ); + else + element.setHtml( data ); + } + } + }); + +CKEDITOR.on( 'loaded', function() + { + // Run the full initialization for pending editors. + var pending = CKEDITOR.editor._pending; + if ( pending ) + { + delete CKEDITOR.editor._pending; + + for ( var i = 0 ; i < pending.length ; i++ ) + pending[ i ]._init(); + } + }); + +/** + * Whether escape HTML when editor update original input element. + * @name CKEDITOR.config.htmlEncodeOutput + * @since 3.1 + * @type Boolean + * @default false + * @example + * config.htmlEncodeOutput = true; + */ + +/** + * Fired when a CKEDITOR instance is created, but still before initializing it. + * To interact with a fully initialized instance, use the + * {@link CKEDITOR#instanceReady} event instead. + * @name CKEDITOR#instanceCreated + * @event + * @param {CKEDITOR.editor} editor The editor instance that has been created. + */ + +/** + * Fired when a CKEDITOR instance is destroyed. + * @name CKEDITOR#instanceDestroyed + * @event + * @param {CKEDITOR.editor} editor The editor instance that has been destroyed. + */ + +/** + * Fired when all plugins are loaded and initialized into the editor instance. + * @name CKEDITOR#pluginsLoaded + * @event + */ diff --git a/ckeditor/_source/core/editor_basic.js b/ckeditor/_source/core/editor_basic.js new file mode 100644 index 0000000..ec90bf7 --- /dev/null +++ b/ckeditor/_source/core/editor_basic.js @@ -0,0 +1,182 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +if ( !CKEDITOR.editor ) +{ + /** + * No element is linked to the editor instance. + * @constant + * @example + */ + CKEDITOR.ELEMENT_MODE_NONE = 0; + + /** + * The element is to be replaced by the editor instance. + * @constant + * @example + */ + CKEDITOR.ELEMENT_MODE_REPLACE = 1; + + /** + * The editor is to be created inside the element. + * @constant + * @example + */ + CKEDITOR.ELEMENT_MODE_APPENDTO = 2; + + /** + * Represents an editor instance. This constructor should be rarely used, + * being the {@link CKEDITOR} methods preferible. + * @constructor + * @param {Object} instanceConfig Configuration values for this specific + * instance. + * @param {CKEDITOR.dom.element} [element] The element linked to this + * instance. + * @param {Number} [mode] The mode in which the element is linked to this + * instance. + * @param {String} [data] Since 3.3. Initial value for the instance. + * @augments CKEDITOR.event + * @example + */ + CKEDITOR.editor = function( instanceConfig, element, mode, data ) + { + this._ = + { + // Save the config to be processed later by the full core code. + instanceConfig : instanceConfig, + element : element, + data : data + }; + + /** + * The mode in which the {@link #element} is linked to this editor + * instance. It can be any of the following values: + *
        + *
      • CKEDITOR.ELEMENT_MODE_NONE: No element is linked to the + * editor instance.
      • + *
      • CKEDITOR.ELEMENT_MODE_REPLACE: The element is to be + * replaced by the editor instance.
      • + *
      • CKEDITOR.ELEMENT_MODE_APPENDTO: The editor is to be + * created inside the element.
      • + *
      + * @name CKEDITOR.editor.prototype.elementMode + * @type Number + * @example + * var editor = CKEDITOR.replace( 'editor1' ); + * alert( editor.elementMode ); "1" + */ + this.elementMode = mode || CKEDITOR.ELEMENT_MODE_NONE; + + // Call the CKEDITOR.event constructor to initialize this instance. + CKEDITOR.event.call( this ); + + this._init(); + }; + + /** + * Replaces a <textarea> or a DOM element (DIV) with a CKEditor + * instance. For textareas, the initial value in the editor will be the + * textarea value. For DOM elements, their innerHTML will be used + * instead. We recommend using TEXTAREA and DIV elements only. Do not use + * this function directly. Use {@link CKEDITOR.replace} instead. + * @param {Object|String} elementOrIdOrName The DOM element (textarea), its + * ID or name. + * @param {Object} [config] The specific configurations to apply to this + * editor instance. Configurations set here will override global CKEditor + * settings. + * @returns {CKEDITOR.editor} The editor instance created. + * @example + */ + CKEDITOR.editor.replace = function( elementOrIdOrName, config ) + { + var element = elementOrIdOrName; + + if ( typeof element != 'object' ) + { + // Look for the element by id. We accept any kind of element here. + element = document.getElementById( elementOrIdOrName ); + + // If not found, look for elements by name. In this case we accept only + // textareas. + if ( !element ) + { + var i = 0, + textareasByName = document.getElementsByName( elementOrIdOrName ); + + while ( ( element = textareasByName[ i++ ] ) && element.tagName.toLowerCase() != 'textarea' ) + { /*jsl:pass*/ } + } + + if ( !element ) + throw '[CKEDITOR.editor.replace] The element with id or name "' + elementOrIdOrName + '" was not found.'; + } + + // Do not replace the textarea right now, just hide it. The effective + // replacement will be done by the _init function. + element.style.visibility = 'hidden'; + + // Create the editor instance. + return new CKEDITOR.editor( config, element, CKEDITOR.ELEMENT_MODE_REPLACE ); + }; + + /** + * Creates a new editor instance inside a specific DOM element. Do not use + * this function directly. Use {@link CKEDITOR.appendTo} instead. + * @param {Object|String} elementOrId The DOM element or its ID. + * @param {Object} [config] The specific configurations to apply to this + * editor instance. Configurations set here will override global CKEditor + * settings. + * @param {String} [data] Since 3.3. Initial value for the instance. + * @returns {CKEDITOR.editor} The editor instance created. + * @example + */ + CKEDITOR.editor.appendTo = function( elementOrId, config, data ) + { + var element = elementOrId; + if ( typeof element != 'object' ) + { + element = document.getElementById( elementOrId ); + + if ( !element ) + throw '[CKEDITOR.editor.appendTo] The element with id "' + elementOrId + '" was not found.'; + } + + // Create the editor instance. + return new CKEDITOR.editor( config, element, CKEDITOR.ELEMENT_MODE_APPENDTO, data ); + }; + + CKEDITOR.editor.prototype = + { + /** + * Initializes the editor instance. This function will be overriden by the + * full CKEDITOR.editor implementation (editor.js). + * @private + */ + _init : function() + { + var pending = CKEDITOR.editor._pending || ( CKEDITOR.editor._pending = [] ); + pending.push( this ); + }, + + // Both fire and fireOnce will always pass this editor instance as the + // "editor" param in CKEDITOR.event.fire. So, we override it to do that + // automaticaly. + + /** @ignore */ + fire : function( eventName, data ) + { + return CKEDITOR.event.prototype.fire.call( this, eventName, data, this ); + }, + + /** @ignore */ + fireOnce : function( eventName, data ) + { + return CKEDITOR.event.prototype.fireOnce.call( this, eventName, data, this ); + } + }; + + // "Inherit" (copy actually) from CKEDITOR.event. + CKEDITOR.event.implementOn( CKEDITOR.editor.prototype, true ); +} diff --git a/ckeditor/_source/core/env.js b/ckeditor/_source/core/env.js new file mode 100644 index 0000000..a0ae465 --- /dev/null +++ b/ckeditor/_source/core/env.js @@ -0,0 +1,229 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview Defines the {@link CKEDITOR.env} object, which constains + * environment and browser information. + */ + +if ( !CKEDITOR.env ) +{ + /** + * Environment and browser information. + * @namespace + * @example + */ + CKEDITOR.env = (function() + { + var agent = navigator.userAgent.toLowerCase(); + var opera = window.opera; + + var env = + /** @lends CKEDITOR.env */ + { + /** + * Indicates that CKEditor is running on Internet Explorer. + * @type Boolean + * @example + * if ( CKEDITOR.env.ie ) + * alert( "I'm on IE!" ); + */ + ie : /*@cc_on!@*/false, + + /** + * Indicates that CKEditor is running on Opera. + * @type Boolean + * @example + * if ( CKEDITOR.env.opera ) + * alert( "I'm on Opera!" ); + */ + opera : ( !!opera && opera.version ), + + /** + * Indicates that CKEditor is running on a WebKit based browser, like + * Safari. + * @type Boolean + * @example + * if ( CKEDITOR.env.webkit ) + * alert( "I'm on WebKit!" ); + */ + webkit : ( agent.indexOf( ' applewebkit/' ) > -1 ), + + /** + * Indicates that CKEditor is running on Adobe AIR. + * @type Boolean + * @example + * if ( CKEDITOR.env.air ) + * alert( "I'm on AIR!" ); + */ + air : ( agent.indexOf( ' adobeair/' ) > -1 ), + + /** + * Indicates that CKEditor is running on Macintosh. + * @type Boolean + * @example + * if ( CKEDITOR.env.mac ) + * alert( "I love apples!" ); + */ + mac : ( agent.indexOf( 'macintosh' ) > -1 ), + + quirks : ( document.compatMode == 'BackCompat' ), + + mobile : ( agent.indexOf( 'mobile' ) > -1 ), + + isCustomDomain : function() + { + if ( !this.ie ) + return false; + + var domain = document.domain, + hostname = window.location.hostname; + + return domain != hostname && + domain != ( '[' + hostname + ']' ); // IPv6 IP support (#5434) + } + }; + + /** + * Indicates that CKEditor is running on a Gecko based browser, like + * Firefox. + * @name CKEDITOR.env.gecko + * @type Boolean + * @example + * if ( CKEDITOR.env.gecko ) + * alert( "I'm riding a gecko!" ); + */ + env.gecko = ( navigator.product == 'Gecko' && !env.webkit && !env.opera ); + + var version = 0; + + // Internet Explorer 6.0+ + if ( env.ie ) + { + version = parseFloat( agent.match( /msie (\d+)/ )[1] ); + + /** + * Indicate IE8 browser. + */ + env.ie8 = !!document.documentMode; + + /** + * Indicte IE8 document mode. + */ + env.ie8Compat = document.documentMode == 8; + + /** + * Indicates that CKEditor is running on an IE7-like environment, which + * includes IE7 itself and IE8's IE7 document mode. + * @type Boolean + */ + env.ie7Compat = ( ( version == 7 && !document.documentMode ) + || document.documentMode == 7 ); + + /** + * Indicates that CKEditor is running on an IE6-like environment, which + * includes IE6 itself and IE7 and IE8 quirks mode. + * @type Boolean + * @example + * if ( CKEDITOR.env.ie6Compat ) + * alert( "I'm on IE6 or quirks mode!" ); + */ + env.ie6Compat = ( version < 7 || env.quirks ); + + } + + // Gecko. + if ( env.gecko ) + { + var geckoRelease = agent.match( /rv:([\d\.]+)/ ); + if ( geckoRelease ) + { + geckoRelease = geckoRelease[1].split( '.' ); + version = geckoRelease[0] * 10000 + ( geckoRelease[1] || 0 ) * 100 + ( geckoRelease[2] || 0 ) * 1; + } + } + + // Opera 9.50+ + if ( env.opera ) + version = parseFloat( opera.version() ); + + // Adobe AIR 1.0+ + // Checked before Safari because AIR have the WebKit rich text editor + // features from Safari 3.0.4, but the version reported is 420. + if ( env.air ) + version = parseFloat( agent.match( / adobeair\/(\d+)/ )[1] ); + + // WebKit 522+ (Safari 3+) + if ( env.webkit ) + version = parseFloat( agent.match( / applewebkit\/(\d+)/ )[1] ); + + /** + * Contains the browser version. + * + * For gecko based browsers (like Firefox) it contains the revision + * number with first three parts concatenated with a padding zero + * (e.g. for revision 1.9.0.2 we have 10900). + * + * For webkit based browser (like Safari and Chrome) it contains the + * WebKit build version (e.g. 522). + * @name CKEDITOR.env.version + * @type Boolean + * @example + * if ( CKEDITOR.env.ie && CKEDITOR.env.version <= 6 ) + * alert( "Ouch!" ); + */ + env.version = version; + + /** + * Indicates that CKEditor is running on a compatible browser. + * @name CKEDITOR.env.isCompatible + * @type Boolean + * @example + * if ( CKEDITOR.env.isCompatible ) + * alert( "Your browser is pretty cool!" ); + */ + env.isCompatible = + !env.mobile && ( + ( env.ie && version >= 6 ) || + ( env.gecko && version >= 10801 ) || + ( env.opera && version >= 9.5 ) || + ( env.air && version >= 1 ) || + ( env.webkit && version >= 522 ) || + false ); + + // The CSS class to be appended on the main UI containers, making it + // easy to apply browser specific styles to it. + env.cssClass = + 'cke_browser_' + ( + env.ie ? 'ie' : + env.gecko ? 'gecko' : + env.opera ? 'opera' : + env.air ? 'air' : + env.webkit ? 'webkit' : + 'unknown' ); + + if ( env.quirks ) + env.cssClass += ' cke_browser_quirks'; + + if ( env.ie ) + { + env.cssClass += ' cke_browser_ie' + ( + env.version < 7 ? '6' : + env.version >= 8 ? '8' : + '7' ); + + if ( env.quirks ) + env.cssClass += ' cke_browser_iequirks'; + } + + if ( env.gecko && version < 10900 ) + env.cssClass += ' cke_browser_gecko18'; + + return env; + })(); +} + +// PACKAGER_RENAME( CKEDITOR.env ) +// PACKAGER_RENAME( CKEDITOR.env.ie ) diff --git a/ckeditor/_source/core/event.js b/ckeditor/_source/core/event.js new file mode 100644 index 0000000..8668a3d --- /dev/null +++ b/ckeditor/_source/core/event.js @@ -0,0 +1,336 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview Defines the {@link CKEDITOR.event} class, which serves as the + * base for classes and objects that require event handling features. + */ + +if ( !CKEDITOR.event ) +{ + /** + * This is a base class for classes and objects that require event handling + * features. + * @constructor + * @example + */ + CKEDITOR.event = function() + {}; + + /** + * Implements the {@link CKEDITOR.event} features in an object. + * @param {Object} targetObject The object in which implement the features. + * @example + * var myObject = { message : 'Example' }; + * CKEDITOR.event.implementOn( myObject }; + * myObject.on( 'testEvent', function() + * { + * alert( this.message ); // "Example" + * }); + * myObject.fire( 'testEvent' ); + */ + CKEDITOR.event.implementOn = function( targetObject, isTargetPrototype ) + { + var eventProto = CKEDITOR.event.prototype; + + for ( var prop in eventProto ) + { + if ( targetObject[ prop ] == undefined ) + targetObject[ prop ] = eventProto[ prop ]; + } + }; + + CKEDITOR.event.prototype = (function() + { + // Returns the private events object for a given object. + var getPrivate = function( obj ) + { + var _ = ( obj.getPrivate && obj.getPrivate() ) || obj._ || ( obj._ = {} ); + return _.events || ( _.events = {} ); + }; + + var eventEntry = function( eventName ) + { + this.name = eventName; + this.listeners = []; + }; + + eventEntry.prototype = + { + // Get the listener index for a specified function. + // Returns -1 if not found. + getListenerIndex : function( listenerFunction ) + { + for ( var i = 0, listeners = this.listeners ; i < listeners.length ; i++ ) + { + if ( listeners[i].fn == listenerFunction ) + return i; + } + return -1; + } + }; + + return /** @lends CKEDITOR.event.prototype */ { + /** + * Registers a listener to a specific event in the current object. + * @param {String} eventName The event name to which listen. + * @param {Function} listenerFunction The function listening to the + * event. A single {@link CKEDITOR.eventInfo} object instanced + * is passed to this function containing all the event data. + * @param {Object} [scopeObj] The object used to scope the listener + * call (the this object. If omitted, the current object is used. + * @param {Object} [listenerData] Data to be sent as the + * {@link CKEDITOR.eventInfo#listenerData} when calling the + * listener. + * @param {Number} [priority] The listener priority. Lower priority + * listeners are called first. Listeners with the same priority + * value are called in registration order. Defaults to 10. + * @example + * someObject.on( 'someEvent', function() + * { + * alert( this == someObject ); // "true" + * }); + * @example + * someObject.on( 'someEvent', function() + * { + * alert( this == anotherObject ); // "true" + * } + * , anotherObject ); + * @example + * someObject.on( 'someEvent', function( event ) + * { + * alert( event.listenerData ); // "Example" + * } + * , null, 'Example' ); + * @example + * someObject.on( 'someEvent', function() { ... } ); // 2nd called + * someObject.on( 'someEvent', function() { ... }, null, null, 100 ); // 3rd called + * someObject.on( 'someEvent', function() { ... }, null, null, 1 ); // 1st called + */ + on : function( eventName, listenerFunction, scopeObj, listenerData, priority ) + { + // Get the event entry (create it if needed). + var events = getPrivate( this ), + event = events[ eventName ] || ( events[ eventName ] = new eventEntry( eventName ) ); + + if ( event.getListenerIndex( listenerFunction ) < 0 ) + { + // Get the listeners. + var listeners = event.listeners; + + // Fill the scope. + if ( !scopeObj ) + scopeObj = this; + + // Default the priority, if needed. + if ( isNaN( priority ) ) + priority = 10; + + var me = this; + + // Create the function to be fired for this listener. + var listenerFirer = function( editor, publisherData, stopFn, cancelFn ) + { + var ev = + { + name : eventName, + sender : this, + editor : editor, + data : publisherData, + listenerData : listenerData, + stop : stopFn, + cancel : cancelFn, + removeListener : function() + { + me.removeListener( eventName, listenerFunction ); + } + }; + + listenerFunction.call( scopeObj, ev ); + + return ev.data; + }; + listenerFirer.fn = listenerFunction; + listenerFirer.priority = priority; + + // Search for the right position for this new listener, based on its + // priority. + for ( var i = listeners.length - 1 ; i >= 0 ; i-- ) + { + // Find the item which should be before the new one. + if ( listeners[ i ].priority <= priority ) + { + // Insert the listener in the array. + listeners.splice( i + 1, 0, listenerFirer ); + return; + } + } + + // If no position has been found (or zero length), put it in + // the front of list. + listeners.unshift( listenerFirer ); + } + }, + + /** + * Fires an specific event in the object. All registered listeners are + * called at this point. + * @function + * @param {String} eventName The event name to fire. + * @param {Object} [data] Data to be sent as the + * {@link CKEDITOR.eventInfo#data} when calling the + * listeners. + * @param {CKEDITOR.editor} [editor] The editor instance to send as the + * {@link CKEDITOR.eventInfo#editor} when calling the + * listener. + * @returns {Boolean|Object} A booloan indicating that the event is to be + * canceled, or data returned by one of the listeners. + * @example + * someObject.on( 'someEvent', function() { ... } ); + * someObject.on( 'someEvent', function() { ... } ); + * someObject.fire( 'someEvent' ); // both listeners are called + * @example + * someObject.on( 'someEvent', function( event ) + * { + * alert( event.data ); // "Example" + * }); + * someObject.fire( 'someEvent', 'Example' ); + */ + fire : (function() + { + // Create the function that marks the event as stopped. + var stopped = false; + var stopEvent = function() + { + stopped = true; + }; + + // Create the function that marks the event as canceled. + var canceled = false; + var cancelEvent = function() + { + canceled = true; + }; + + return function( eventName, data, editor ) + { + // Get the event entry. + var event = getPrivate( this )[ eventName ]; + + // Save the previous stopped and cancelled states. We may + // be nesting fire() calls. + var previousStopped = stopped, + previousCancelled = canceled; + + // Reset the stopped and canceled flags. + stopped = canceled = false; + + if ( event ) + { + var listeners = event.listeners; + + if ( listeners.length ) + { + // As some listeners may remove themselves from the + // event, the original array length is dinamic. So, + // let's make a copy of all listeners, so we are + // sure we'll call all of them. + listeners = listeners.slice( 0 ); + + // Loop through all listeners. + for ( var i = 0 ; i < listeners.length ; i++ ) + { + // Call the listener, passing the event data. + var retData = listeners[i].call( this, editor, data, stopEvent, cancelEvent ); + + if ( typeof retData != 'undefined' ) + data = retData; + + // No further calls is stopped or canceled. + if ( stopped || canceled ) + break; + } + } + } + + var ret = canceled || ( typeof data == 'undefined' ? false : data ); + + // Restore the previous stopped and canceled states. + stopped = previousStopped; + canceled = previousCancelled; + + return ret; + }; + })(), + + /** + * Fires an specific event in the object, releasing all listeners + * registered to that event. The same listeners are not called again on + * successive calls of it or of {@link #fire}. + * @param {String} eventName The event name to fire. + * @param {Object} [data] Data to be sent as the + * {@link CKEDITOR.eventInfo#data} when calling the + * listeners. + * @param {CKEDITOR.editor} [editor] The editor instance to send as the + * {@link CKEDITOR.eventInfo#editor} when calling the + * listener. + * @returns {Boolean|Object} A booloan indicating that the event is to be + * canceled, or data returned by one of the listeners. + * @example + * someObject.on( 'someEvent', function() { ... } ); + * someObject.fire( 'someEvent' ); // above listener called + * someObject.fireOnce( 'someEvent' ); // above listener called + * someObject.fire( 'someEvent' ); // no listeners called + */ + fireOnce : function( eventName, data, editor ) + { + var ret = this.fire( eventName, data, editor ); + delete getPrivate( this )[ eventName ]; + return ret; + }, + + /** + * Unregisters a listener function from being called at the specified + * event. No errors are thrown if the listener has not been + * registered previously. + * @param {String} eventName The event name. + * @param {Function} listenerFunction The listener function to unregister. + * @example + * var myListener = function() { ... }; + * someObject.on( 'someEvent', myListener ); + * someObject.fire( 'someEvent' ); // myListener called + * someObject.removeListener( 'someEvent', myListener ); + * someObject.fire( 'someEvent' ); // myListener not called + */ + removeListener : function( eventName, listenerFunction ) + { + // Get the event entry. + var event = getPrivate( this )[ eventName ]; + + if ( event ) + { + var index = event.getListenerIndex( listenerFunction ); + if ( index >= 0 ) + event.listeners.splice( index, 1 ); + } + }, + + /** + * Checks if there is any listener registered to a given event. + * @param {String} eventName The event name. + * @example + * var myListener = function() { ... }; + * someObject.on( 'someEvent', myListener ); + * alert( someObject.hasListeners( 'someEvent' ) ); // "true" + * alert( someObject.hasListeners( 'noEvent' ) ); // "false" + */ + hasListeners : function( eventName ) + { + var event = getPrivate( this )[ eventName ]; + return ( event && event.listeners.length > 0 ) ; + } + }; + })(); +} diff --git a/ckeditor/_source/core/eventInfo.js b/ckeditor/_source/core/eventInfo.js new file mode 100644 index 0000000..dbeca5c --- /dev/null +++ b/ckeditor/_source/core/eventInfo.js @@ -0,0 +1,120 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview Defines the "virtual" {@link CKEDITOR.eventInfo} class, which + * contains the defintions of the event object passed to event listeners. + * This file is for documentation purposes only. + */ + +/** + * This class is not really part of the API. It just illustrates the features + * of the event object passed to event listeners by a {@link CKEDITOR.event} + * based object. + * @name CKEDITOR.eventInfo + * @constructor + * @example + * // Do not do this. + * var myEvent = new CKEDITOR.eventInfo(); // Error: CKEDITOR.eventInfo is undefined + */ + +/** + * The event name. + * @name CKEDITOR.eventInfo.prototype.name + * @field + * @type String + * @example + * someObject.on( 'someEvent', function( event ) + * { + * alert( event.name ); // "someEvent" + * }); + * someObject.fire( 'someEvent' ); + */ + +/** + * The object that publishes (sends) the event. + * @name CKEDITOR.eventInfo.prototype.sender + * @field + * @type Object + * @example + * someObject.on( 'someEvent', function( event ) + * { + * alert( event.sender == someObject ); // "true" + * }); + * someObject.fire( 'someEvent' ); + */ + +/** + * The editor instance that holds the sender. May be the same as sender. May be + * null if the sender is not part of an editor instance, like a component + * running in standalone mode. + * @name CKEDITOR.eventInfo.prototype.editor + * @field + * @type CKEDITOR.editor + * @example + * myButton.on( 'someEvent', function( event ) + * { + * alert( event.editor == myEditor ); // "true" + * }); + * myButton.fire( 'someEvent', null, myEditor ); + */ + +/** + * Any kind of additional data. Its format and usage is event dependent. + * @name CKEDITOR.eventInfo.prototype.data + * @field + * @type Object + * @example + * someObject.on( 'someEvent', function( event ) + * { + * alert( event.data ); // "Example" + * }); + * someObject.fire( 'someEvent', 'Example' ); + */ + +/** + * Any extra data appended during the listener registration. + * @name CKEDITOR.eventInfo.prototype.listenerData + * @field + * @type Object + * @example + * someObject.on( 'someEvent', function( event ) + * { + * alert( event.listenerData ); // "Example" + * } + * , null, 'Example' ); + */ + +/** + * Indicates that no further listeners are to be called. + * @name CKEDITOR.eventInfo.prototype.stop + * @function + * @example + * someObject.on( 'someEvent', function( event ) + * { + * event.stop(); + * }); + * someObject.on( 'someEvent', function( event ) + * { + * // This one will not be called. + * }); + * alert( someObject.fire( 'someEvent' ) ); // "false" + */ + +/** + * Indicates that the event is to be cancelled (if cancelable). + * @name CKEDITOR.eventInfo.prototype.cancel + * @function + * @example + * someObject.on( 'someEvent', function( event ) + * { + * event.cancel(); + * }); + * someObject.on( 'someEvent', function( event ) + * { + * // This one will not be called. + * }); + * alert( someObject.fire( 'someEvent' ) ); // "true" + */ diff --git a/ckeditor/_source/core/focusmanager.js b/ckeditor/_source/core/focusmanager.js new file mode 100644 index 0000000..933c3cf --- /dev/null +++ b/ckeditor/_source/core/focusmanager.js @@ -0,0 +1,137 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview Defines the {@link CKEDITOR.focusManager} class, which is used + * to handle the focus on editor instances.. + */ + +/** + * Manages the focus activity in an editor instance. This class is to be used + * mainly by UI elements coders when adding interface elements to CKEditor. + * @constructor + * @param {CKEDITOR.editor} editor The editor instance. + * @example + */ +CKEDITOR.focusManager = function( editor ) +{ + if ( editor.focusManager ) + return editor.focusManager; + + /** + * Indicates that the editor instance has focus. + * @type Boolean + * @example + * alert( CKEDITOR.instances.editor1.focusManager.hasFocus ); // e.g "true" + */ + this.hasFocus = false; + + /** + * Object used to hold private stuff. + * @private + */ + this._ = + { + editor : editor + }; + + return this; +}; + +CKEDITOR.focusManager.prototype = +{ + /** + * Indicates that the editor instance has the focus. + * + * This function is not used to set the focus in the editor. Use + * {@link CKEDITOR.editor#focus} for it instead. + * @example + * var editor = CKEDITOR.instances.editor1; + * editor.focusManager.focus(); + */ + focus : function() + { + if ( this._.timer ) + clearTimeout( this._.timer ); + + if ( !this.hasFocus ) + { + // If another editor has the current focus, we first "blur" it. In + // this way the events happen in a more logical sequence, like: + // "focus 1" > "blur 1" > "focus 2" + // ... instead of: + // "focus 1" > "focus 2" > "blur 1" + if ( CKEDITOR.currentInstance ) + CKEDITOR.currentInstance.focusManager.forceBlur(); + + var editor = this._.editor; + + editor.container.getChild( 1 ).addClass( 'cke_focus' ); + + this.hasFocus = true; + editor.fire( 'focus' ); + } + }, + + /** + * Indicates that the editor instance has lost the focus. Note that this + * functions acts asynchronously with a delay of 100ms to avoid subsequent + * blur/focus effects. If you want the "blur" to happen immediately, use + * the {@link #forceBlur} function instead. + * @example + * var editor = CKEDITOR.instances.editor1; + * editor.focusManager.blur(); + */ + blur : function() + { + var focusManager = this; + + if ( focusManager._.timer ) + clearTimeout( focusManager._.timer ); + + focusManager._.timer = setTimeout( + function() + { + delete focusManager._.timer; + focusManager.forceBlur(); + } + , 100 ); + }, + + /** + * Indicates that the editor instance has lost the focus. Unlike + * {@link #blur}, this function is synchronous, marking the instance as + * "blured" immediately. + * @example + * var editor = CKEDITOR.instances.editor1; + * editor.focusManager.forceBlur(); + */ + forceBlur : function() + { + if ( this.hasFocus ) + { + var editor = this._.editor; + + editor.container.getChild( 1 ).removeClass( 'cke_focus' ); + + this.hasFocus = false; + editor.fire( 'blur' ); + } + } +}; + +/** + * Fired when the editor instance receives the input focus. + * @name CKEDITOR.editor#focus + * @event + * @param {CKEDITOR.editor} editor The editor instance. + */ + +/** + * Fired when the editor instance loses the input focus. + * @name CKEDITOR.editor#blur + * @event + * @param {CKEDITOR.editor} editor The editor instance. + */ diff --git a/ckeditor/_source/core/htmlparser.js b/ckeditor/_source/core/htmlparser.js new file mode 100644 index 0000000..acd5ef5 --- /dev/null +++ b/ckeditor/_source/core/htmlparser.js @@ -0,0 +1,218 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * HTML text parser. + * @constructor + * @example + */ +CKEDITOR.htmlParser = function() +{ + this._ = + { + htmlPartsRegex : new RegExp( '<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:[^"\'>]+)|(?:"[^"]*")|(?:\'[^\']*\'))*)\\/?>))', 'g' ) + }; +}; + +(function() +{ + var attribsRegex = /([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g, + emptyAttribs = {checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1}; + + CKEDITOR.htmlParser.prototype = + { + /** + * Function to be fired when a tag opener is found. This function + * should be overriden when using this class. + * @param {String} tagName The tag name. The name is guarantted to be + * lowercased. + * @param {Object} attributes An object containing all tag attributes. Each + * property in this object represent and attribute name and its + * value is the attribute value. + * @param {Boolean} selfClosing true if the tag closes itself, false if the + * tag doesn't. + * @example + * var parser = new CKEDITOR.htmlParser(); + * parser.onTagOpen = function( tagName, attributes, selfClosing ) + * { + * alert( tagName ); // e.g. "b" + * }); + * parser.parse( "<!-- Example --><b>Hello</b>" ); + */ + onTagOpen : function() {}, + + /** + * Function to be fired when a tag closer is found. This function + * should be overriden when using this class. + * @param {String} tagName The tag name. The name is guarantted to be + * lowercased. + * @example + * var parser = new CKEDITOR.htmlParser(); + * parser.onTagClose = function( tagName ) + * { + * alert( tagName ); // e.g. "b" + * }); + * parser.parse( "<!-- Example --><b>Hello</b>" ); + */ + onTagClose : function() {}, + + /** + * Function to be fired when text is found. This function + * should be overriden when using this class. + * @param {String} text The text found. + * @example + * var parser = new CKEDITOR.htmlParser(); + * parser.onText = function( text ) + * { + * alert( text ); // e.g. "Hello" + * }); + * parser.parse( "<!-- Example --><b>Hello</b>" ); + */ + onText : function() {}, + + /** + * Function to be fired when CDATA section is found. This function + * should be overriden when using this class. + * @param {String} cdata The CDATA been found. + * @example + * var parser = new CKEDITOR.htmlParser(); + * parser.onCDATA = function( cdata ) + * { + * alert( cdata ); // e.g. "var hello;" + * }); + * parser.parse( "<script>var hello;</script>" ); + */ + onCDATA : function() {}, + + /** + * Function to be fired when a commend is found. This function + * should be overriden when using this class. + * @param {String} comment The comment text. + * @example + * var parser = new CKEDITOR.htmlParser(); + * parser.onText = function( comment ) + * { + * alert( comment ); // e.g. " Example " + * }); + * parser.parse( "<!-- Example --><b>Hello</b>" ); + */ + onComment : function() {}, + + /** + * Parses text, looking for HTML tokens, like tag openers or closers, + * or comments. This function fires the onTagOpen, onTagClose, onText + * and onComment function during its execution. + * @param {String} html The HTML to be parsed. + * @example + * var parser = new CKEDITOR.htmlParser(); + * // The onTagOpen, onTagClose, onText and onComment should be overriden + * // at this point. + * parser.parse( "<!-- Example --><b>Hello</b>" ); + */ + parse : function( html ) + { + var parts, + tagName, + nextIndex = 0, + cdata; // The collected data inside a CDATA section. + + while ( ( parts = this._.htmlPartsRegex.exec( html ) ) ) + { + var tagIndex = parts.index; + if ( tagIndex > nextIndex ) + { + var text = html.substring( nextIndex, tagIndex ); + + if ( cdata ) + cdata.push( text ); + else + this.onText( text ); + } + + nextIndex = this._.htmlPartsRegex.lastIndex; + + /* + "parts" is an array with the following items: + 0 : The entire match for opening/closing tags and comments. + 1 : Group filled with the tag name for closing tags. + 2 : Group filled with the comment text. + 3 : Group filled with the tag name for opening tags. + 4 : Group filled with the attributes part of opening tags. + */ + + // Closing tag + if ( ( tagName = parts[ 1 ] ) ) + { + tagName = tagName.toLowerCase(); + + if ( cdata && CKEDITOR.dtd.$cdata[ tagName ] ) + { + // Send the CDATA data. + this.onCDATA( cdata.join('') ); + cdata = null; + } + + if ( !cdata ) + { + this.onTagClose( tagName ); + continue; + } + } + + // If CDATA is enabled, just save the raw match. + if ( cdata ) + { + cdata.push( parts[ 0 ] ); + continue; + } + + // Opening tag + if ( ( tagName = parts[ 3 ] ) ) + { + tagName = tagName.toLowerCase(); + + // There are some tag names that can break things, so let's + // simply ignore them when parsing. (#5224) + if ( /="/.test( tagName ) ) + continue; + + var attribs = {}, + attribMatch, + attribsPart = parts[ 4 ], + selfClosing = !!( attribsPart && attribsPart.charAt( attribsPart.length - 1 ) == '/' ); + + if ( attribsPart ) + { + while ( ( attribMatch = attribsRegex.exec( attribsPart ) ) ) + { + var attName = attribMatch[1].toLowerCase(), + attValue = attribMatch[2] || attribMatch[3] || attribMatch[4] || ''; + + if ( !attValue && emptyAttribs[ attName ] ) + attribs[ attName ] = attName; + else + attribs[ attName ] = attValue; + } + } + + this.onTagOpen( tagName, attribs, selfClosing ); + + // Open CDATA mode when finding the appropriate tags. + if ( !cdata && CKEDITOR.dtd.$cdata[ tagName ] ) + cdata = []; + + continue; + } + + // Comment + if ( ( tagName = parts[ 2 ] ) ) + this.onComment( tagName ); + } + + if ( html.length > nextIndex ) + this.onText( html.substring( nextIndex, html.length ) ); + } + }; +})(); diff --git a/ckeditor/_source/core/htmlparser/basicwriter.js b/ckeditor/_source/core/htmlparser/basicwriter.js new file mode 100644 index 0000000..3a0231c --- /dev/null +++ b/ckeditor/_source/core/htmlparser/basicwriter.js @@ -0,0 +1,145 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +CKEDITOR.htmlParser.basicWriter = CKEDITOR.tools.createClass( +{ + $ : function() + { + this._ = + { + output : [] + }; + }, + + proto : + { + /** + * Writes the tag opening part for a opener tag. + * @param {String} tagName The element name for this tag. + * @param {Object} attributes The attributes defined for this tag. The + * attributes could be used to inspect the tag. + * @example + * // Writes "<p". + * writer.openTag( 'p', { class : 'MyClass', id : 'MyId' } ); + */ + openTag : function( tagName, attributes ) + { + this._.output.push( '<', tagName ); + }, + + /** + * Writes the tag closing part for a opener tag. + * @param {String} tagName The element name for this tag. + * @param {Boolean} isSelfClose Indicates that this is a self-closing tag, + * like "br" or "img". + * @example + * // Writes ">". + * writer.openTagClose( 'p', false ); + * @example + * // Writes " />". + * writer.openTagClose( 'br', true ); + */ + openTagClose : function( tagName, isSelfClose ) + { + if ( isSelfClose ) + this._.output.push( ' />' ); + else + this._.output.push( '>' ); + }, + + /** + * Writes an attribute. This function should be called after opening the + * tag with {@link #openTagClose}. + * @param {String} attName The attribute name. + * @param {String} attValue The attribute value. + * @example + * // Writes ' class="MyClass"'. + * writer.attribute( 'class', 'MyClass' ); + */ + attribute : function( attName, attValue ) + { + // Browsers don't always escape special character in attribute values. (#4683, #4719). + if ( typeof attValue == 'string' ) + attValue = CKEDITOR.tools.htmlEncodeAttr( attValue ); + + this._.output.push( ' ', attName, '="', attValue, '"' ); + }, + + /** + * Writes a closer tag. + * @param {String} tagName The element name for this tag. + * @example + * // Writes "</p>". + * writer.closeTag( 'p' ); + */ + closeTag : function( tagName ) + { + this._.output.push( '' ); + }, + + /** + * Writes text. + * @param {String} text The text value + * @example + * // Writes "Hello Word". + * writer.text( 'Hello Word' ); + */ + text : function( text ) + { + this._.output.push( text ); + }, + + /** + * Writes a comment. + * @param {String} comment The comment text. + * @example + * // Writes "<!-- My comment -->". + * writer.comment( ' My comment ' ); + */ + comment : function( comment ) + { + this._.output.push( '' ); + }, + + /** + * Writes any kind of data to the ouput. + * @example + * writer.write( 'This is an <b>example</b>.' ); + */ + write : function( data ) + { + this._.output.push( data ); + }, + + /** + * Empties the current output buffer. + * @example + * writer.reset(); + */ + reset : function() + { + this._.output = []; + this._.indent = false; + }, + + /** + * Empties the current output buffer. + * @param {Boolean} reset Indicates that the {@link reset} function is to + * be automatically called after retrieving the HTML. + * @returns {String} The HTML written to the writer so far. + * @example + * var html = writer.getHtml(); + */ + getHtml : function( reset ) + { + var html = this._.output.join( '' ); + + if ( reset ) + this.reset(); + + return html; + } + } +}); diff --git a/ckeditor/_source/core/htmlparser/cdata.js b/ckeditor/_source/core/htmlparser/cdata.js new file mode 100644 index 0000000..ff2f227 --- /dev/null +++ b/ckeditor/_source/core/htmlparser/cdata.js @@ -0,0 +1,43 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +(function() +{ + + /** + * A lightweight representation of HTML text. + * @constructor + * @example + */ + CKEDITOR.htmlParser.cdata = function( value ) + { + /** + * The CDATA value. + * @type String + * @example + */ + this.value = value; + }; + + CKEDITOR.htmlParser.cdata.prototype = + { + /** + * CDATA has the same type as {@link CKEDITOR.htmlParser.text} This is + * a constant value set to {@link CKEDITOR.NODE_TEXT}. + * @type Number + * @example + */ + type : CKEDITOR.NODE_TEXT, + + /** + * Writes write the CDATA with no special manipulations. + * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML. + */ + writeHtml : function( writer ) + { + writer.write( this.value ); + } + }; +})(); diff --git a/ckeditor/_source/core/htmlparser/comment.js b/ckeditor/_source/core/htmlparser/comment.js new file mode 100644 index 0000000..67830d9 --- /dev/null +++ b/ckeditor/_source/core/htmlparser/comment.js @@ -0,0 +1,60 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * A lightweight representation of an HTML comment. + * @constructor + * @example + */ +CKEDITOR.htmlParser.comment = function( value ) +{ + /** + * The comment text. + * @type String + * @example + */ + this.value = value; + + /** @private */ + this._ = + { + isBlockLike : false + }; +}; + +CKEDITOR.htmlParser.comment.prototype = +{ + /** + * The node type. This is a constant value set to {@link CKEDITOR.NODE_COMMENT}. + * @type Number + * @example + */ + type : CKEDITOR.NODE_COMMENT, + + /** + * Writes the HTML representation of this comment to a CKEDITOR.htmlWriter. + * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML. + * @example + */ + writeHtml : function( writer, filter ) + { + var comment = this.value; + + if ( filter ) + { + if ( !( comment = filter.onComment( comment, this ) ) ) + return; + + if ( typeof comment != 'string' ) + { + comment.parent = this.parent; + comment.writeHtml( writer, filter ); + return; + } + } + + writer.comment( comment ); + } +}; diff --git a/ckeditor/_source/core/htmlparser/element.js b/ckeditor/_source/core/htmlparser/element.js new file mode 100644 index 0000000..69bacda --- /dev/null +++ b/ckeditor/_source/core/htmlparser/element.js @@ -0,0 +1,240 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * A lightweight representation of an HTML element. + * @param {String} name The element name. + * @param {Object} attributes And object holding all attributes defined for + * this element. + * @constructor + * @example + */ +CKEDITOR.htmlParser.element = function( name, attributes ) +{ + /** + * The element name. + * @type String + * @example + */ + this.name = name; + + /** + * Holds the attributes defined for this element. + * @type Object + * @example + */ + this.attributes = attributes || ( attributes = {} ); + + /** + * The nodes that are direct children of this element. + * @type Array + * @example + */ + this.children = []; + + var tagName = attributes._cke_real_element_type || name; + + var dtd = CKEDITOR.dtd, + isBlockLike = !!( dtd.$nonBodyContent[ tagName ] || dtd.$block[ tagName ] || dtd.$listItem[ tagName ] || dtd.$tableContent[ tagName ] || dtd.$nonEditable[ tagName ] || tagName == 'br' ), + isEmpty = !!dtd.$empty[ name ]; + + this.isEmpty = isEmpty; + this.isUnknown = !dtd[ name ]; + + /** @private */ + this._ = + { + isBlockLike : isBlockLike, + hasInlineStarted : isEmpty || !isBlockLike + }; +}; + +(function() +{ + // Used to sort attribute entries in an array, where the first element of + // each object is the attribute name. + var sortAttribs = function( a, b ) + { + a = a[0]; + b = b[0]; + return a < b ? -1 : a > b ? 1 : 0; + }; + + CKEDITOR.htmlParser.element.prototype = + { + /** + * The node type. This is a constant value set to {@link CKEDITOR.NODE_ELEMENT}. + * @type Number + * @example + */ + type : CKEDITOR.NODE_ELEMENT, + + /** + * Adds a node to the element children list. + * @param {Object} node The node to be added. It can be any of of the + * following types: {@link CKEDITOR.htmlParser.element}, + * {@link CKEDITOR.htmlParser.text} and + * {@link CKEDITOR.htmlParser.comment}. + * @function + * @example + */ + add : CKEDITOR.htmlParser.fragment.prototype.add, + + /** + * Clone this element. + * @returns {CKEDITOR.htmlParser.element} The element clone. + * @example + */ + clone : function() + { + return new CKEDITOR.htmlParser.element( this.name, this.attributes ); + }, + + /** + * Writes the element HTML to a CKEDITOR.htmlWriter. + * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML. + * @example + */ + writeHtml : function( writer, filter ) + { + var attributes = this.attributes; + + // Ignore cke: prefixes when writing HTML. + var element = this, + writeName = element.name, + a, newAttrName, value; + + var isChildrenFiltered; + + /** + * Providing an option for bottom-up filtering order ( element + * children to be pre-filtered before the element itself ). + */ + element.filterChildren = function() + { + if ( !isChildrenFiltered ) + { + var writer = new CKEDITOR.htmlParser.basicWriter(); + CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.call( element, writer, filter ); + element.children = new CKEDITOR.htmlParser.fragment.fromHtml( writer.getHtml() ).children; + isChildrenFiltered = 1; + } + }; + + if ( filter ) + { + while ( true ) + { + if ( !( writeName = filter.onElementName( writeName ) ) ) + return; + + element.name = writeName; + + if ( !( element = filter.onElement( element ) ) ) + return; + + element.parent = this.parent; + + if ( element.name == writeName ) + break; + + // If the element has been replaced with something of a + // different type, then make the replacement write itself. + if ( element.type != CKEDITOR.NODE_ELEMENT ) + { + element.writeHtml( writer, filter ); + return; + } + + writeName = element.name; + + // This indicate that the element has been dropped by + // filter but not the children. + if ( !writeName ) + { + this.writeChildrenHtml.call( element, writer, isChildrenFiltered ? null : filter ); + return; + } + } + + // The element may have been changed, so update the local + // references. + attributes = element.attributes; + } + + // Open element tag. + writer.openTag( writeName, attributes ); + + // Copy all attributes to an array. + var attribsArray = []; + // Iterate over the attributes twice since filters may alter + // other attributes. + for ( var i = 0 ; i < 2; i++ ) + { + for ( a in attributes ) + { + newAttrName = a; + value = attributes[ a ]; + if ( i == 1 ) + attribsArray.push( [ a, value ] ); + else if ( filter ) + { + while ( true ) + { + if ( !( newAttrName = filter.onAttributeName( a ) ) ) + { + delete attributes[ a ]; + break; + } + else if ( newAttrName != a ) + { + delete attributes[ a ]; + a = newAttrName; + continue; + } + else + break; + } + if ( newAttrName ) + { + if ( ( value = filter.onAttribute( element, newAttrName, value ) ) === false ) + delete attributes[ newAttrName ]; + else + attributes [ newAttrName ] = value; + } + } + } + } + // Sort the attributes by name. + if ( writer.sortAttributes ) + attribsArray.sort( sortAttribs ); + + // Send the attributes. + var len = attribsArray.length; + for ( i = 0 ; i < len ; i++ ) + { + var attrib = attribsArray[ i ]; + writer.attribute( attrib[0], attrib[1] ); + } + + // Close the tag. + writer.openTagClose( writeName, element.isEmpty ); + + if ( !element.isEmpty ) + { + this.writeChildrenHtml.call( element, writer, isChildrenFiltered ? null : filter ); + // Close the element. + writer.closeTag( writeName ); + } + }, + + writeChildrenHtml : function( writer, filter ) + { + // Send children. + CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.apply( this, arguments ); + + } + }; +})(); diff --git a/ckeditor/_source/core/htmlparser/filter.js b/ckeditor/_source/core/htmlparser/filter.js new file mode 100644 index 0000000..5d16292 --- /dev/null +++ b/ckeditor/_source/core/htmlparser/filter.js @@ -0,0 +1,288 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +(function() +{ + CKEDITOR.htmlParser.filter = CKEDITOR.tools.createClass( + { + $ : function( rules ) + { + this._ = + { + elementNames : [], + attributeNames : [], + elements : { $length : 0 }, + attributes : { $length : 0 } + }; + + if ( rules ) + this.addRules( rules, 10 ); + }, + + proto : + { + addRules : function( rules, priority ) + { + if ( typeof priority != 'number' ) + priority = 10; + + // Add the elementNames. + addItemsToList( this._.elementNames, rules.elementNames, priority ); + + // Add the attributeNames. + addItemsToList( this._.attributeNames, rules.attributeNames, priority ); + + // Add the elements. + addNamedItems( this._.elements, rules.elements, priority ); + + // Add the attributes. + addNamedItems( this._.attributes, rules.attributes, priority ); + + // Add the text. + this._.text = transformNamedItem( this._.text, rules.text, priority ) || this._.text; + + // Add the comment. + this._.comment = transformNamedItem( this._.comment, rules.comment, priority ) || this._.comment; + + // Add root fragment. + this._.root = transformNamedItem( this._.root, rules.root, priority ) || this._.root; + }, + + onElementName : function( name ) + { + return filterName( name, this._.elementNames ); + }, + + onAttributeName : function( name ) + { + return filterName( name, this._.attributeNames ); + }, + + onText : function( text ) + { + var textFilter = this._.text; + return textFilter ? textFilter.filter( text ) : text; + }, + + onComment : function( commentText, comment ) + { + var textFilter = this._.comment; + return textFilter ? textFilter.filter( commentText, comment ) : commentText; + }, + + onFragment : function( element ) + { + var rootFilter = this._.root; + return rootFilter ? rootFilter.filter( element ) : element; + }, + + onElement : function( element ) + { + // We must apply filters set to the specific element name as + // well as those set to the generic $ name. So, add both to an + // array and process them in a small loop. + var filters = [ this._.elements[ '^' ], this._.elements[ element.name ], this._.elements.$ ], + filter, ret; + + for ( var i = 0 ; i < 3 ; i++ ) + { + filter = filters[ i ]; + if ( filter ) + { + ret = filter.filter( element, this ); + + if ( ret === false ) + return null; + + if ( ret && ret != element ) + return this.onNode( ret ); + + // The non-root element has been dismissed by one of the filters. + if ( element.parent && !element.name ) + break; + } + } + + return element; + }, + + onNode : function( node ) + { + var type = node.type; + + return type == CKEDITOR.NODE_ELEMENT ? this.onElement( node ) : + type == CKEDITOR.NODE_TEXT ? new CKEDITOR.htmlParser.text( this.onText( node.value ) ) : + type == CKEDITOR.NODE_COMMENT ? new CKEDITOR.htmlParser.comment( this.onComment( node.value ) ): + null; + }, + + onAttribute : function( element, name, value ) + { + var filter = this._.attributes[ name ]; + + if ( filter ) + { + var ret = filter.filter( value, element, this ); + + if ( ret === false ) + return false; + + if ( typeof ret != 'undefined' ) + return ret; + } + + return value; + } + } + }); + + function filterName( name, filters ) + { + for ( var i = 0 ; name && i < filters.length ; i++ ) + { + var filter = filters[ i ]; + name = name.replace( filter[ 0 ], filter[ 1 ] ); + } + return name; + } + + function addItemsToList( list, items, priority ) + { + if ( typeof items == 'function' ) + items = [ items ]; + + var i, j, + listLength = list.length, + itemsLength = items && items.length; + + if ( itemsLength ) + { + // Find the index to insert the items at. + for ( i = 0 ; i < listLength && list[ i ].pri < priority ; i++ ) + { /*jsl:pass*/ } + + // Add all new items to the list at the specific index. + for ( j = itemsLength - 1 ; j >= 0 ; j-- ) + { + var item = items[ j ]; + if ( item ) + { + item.pri = priority; + list.splice( i, 0, item ); + } + } + } + } + + function addNamedItems( hashTable, items, priority ) + { + if ( items ) + { + for ( var name in items ) + { + var current = hashTable[ name ]; + + hashTable[ name ] = + transformNamedItem( + current, + items[ name ], + priority ); + + if ( !current ) + hashTable.$length++; + } + } + } + + function transformNamedItem( current, item, priority ) + { + if ( item ) + { + item.pri = priority; + + if ( current ) + { + // If the current item is not an Array, transform it. + if ( !current.splice ) + { + if ( current.pri > priority ) + current = [ item, current ]; + else + current = [ current, item ]; + + current.filter = callItems; + } + else + addItemsToList( current, item, priority ); + + return current; + } + else + { + item.filter = item; + return item; + } + } + } + + // Invoke filters sequentially on the array, break the iteration + // when it doesn't make sense to continue anymore. + function callItems( currentEntry ) + { + var isNode = currentEntry.type + || currentEntry instanceof CKEDITOR.htmlParser.fragment; + + for ( var i = 0 ; i < this.length ; i++ ) + { + // Backup the node info before filtering. + if ( isNode ) + { + var orgType = currentEntry.type, + orgName = currentEntry.name; + } + + var item = this[ i ], + ret = item.apply( window, arguments ); + + if ( ret === false ) + return ret; + + // We're filtering node (element/fragment). + if ( isNode ) + { + // No further filtering if it's not anymore + // fitable for the subsequent filters. + if ( ret && ( ret.name != orgName + || ret.type != orgType ) ) + { + return ret; + } + } + // Filtering value (nodeName/textValue/attrValue). + else + { + // No further filtering if it's not + // any more values. + if ( typeof ret != 'string' ) + return ret; + } + + ret != undefined && ( currentEntry = ret ); + } + + return currentEntry; + } +})(); + +// "entities" plugin +/* +{ + text : function( text ) + { + // TODO : Process entities. + return text.toUpperCase(); + } +}; +*/ diff --git a/ckeditor/_source/core/htmlparser/fragment.js b/ckeditor/_source/core/htmlparser/fragment.js new file mode 100644 index 0000000..d31b050 --- /dev/null +++ b/ckeditor/_source/core/htmlparser/fragment.js @@ -0,0 +1,497 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * A lightweight representation of an HTML DOM structure. + * @constructor + * @example + */ +CKEDITOR.htmlParser.fragment = function() +{ + /** + * The nodes contained in the root of this fragment. + * @type Array + * @example + * var fragment = CKEDITOR.htmlParser.fragment.fromHtml( 'Sample Text' ); + * alert( fragment.children.length ); "2" + */ + this.children = []; + + /** + * Get the fragment parent. Should always be null. + * @type Object + * @default null + * @example + */ + this.parent = null; + + /** @private */ + this._ = + { + isBlockLike : true, + hasInlineStarted : false + }; +}; + +(function() +{ + // Elements which the end tag is marked as optional in the HTML 4.01 DTD + // (expect empty elements). + var optionalClose = {colgroup:1,dd:1,dt:1,li:1,option:1,p:1,td:1,tfoot:1,th:1,thead:1,tr:1}; + + // Block-level elements whose internal structure should be respected during + // parser fixing. + var nonBreakingBlocks = CKEDITOR.tools.extend( + {table:1,ul:1,ol:1,dl:1}, + CKEDITOR.dtd.table, CKEDITOR.dtd.ul, CKEDITOR.dtd.ol, CKEDITOR.dtd.dl ), + listBlocks = CKEDITOR.dtd.$list, listItems = CKEDITOR.dtd.$listItem; + + /** + * Creates a {@link CKEDITOR.htmlParser.fragment} from an HTML string. + * @param {String} fragmentHtml The HTML to be parsed, filling the fragment. + * @param {Number} [fixForBody=false] Wrap body with specified element if needed. + * @returns CKEDITOR.htmlParser.fragment The fragment created. + * @example + * var fragment = CKEDITOR.htmlParser.fragment.fromHtml( 'Sample Text' ); + * alert( fragment.children[0].name ); "b" + * alert( fragment.children[1].value ); " Text" + */ + CKEDITOR.htmlParser.fragment.fromHtml = function( fragmentHtml, fixForBody ) + { + var parser = new CKEDITOR.htmlParser(), + html = [], + fragment = new CKEDITOR.htmlParser.fragment(), + pendingInline = [], + pendingBRs = [], + currentNode = fragment, + // Indicate we're inside a
       element, spaces should be touched differently.
      +			inPre = false,
      +			returnPoint;
      +
      +		function checkPending( newTagName )
      +		{
      +			var pendingBRsSent;
      +
      +			if ( pendingInline.length > 0 )
      +			{
      +				for ( var i = 0 ; i < pendingInline.length ; i++ )
      +				{
      +					var pendingElement = pendingInline[ i ],
      +						pendingName = pendingElement.name,
      +						pendingDtd = CKEDITOR.dtd[ pendingName ],
      +						currentDtd = currentNode.name && CKEDITOR.dtd[ currentNode.name ];
      +
      +					if ( ( !currentDtd || currentDtd[ pendingName ] ) && ( !newTagName || !pendingDtd || pendingDtd[ newTagName ] || !CKEDITOR.dtd[ newTagName ] ) )
      +					{
      +						if ( !pendingBRsSent )
      +						{
      +							sendPendingBRs();
      +							pendingBRsSent = 1;
      +						}
      +
      +						// Get a clone for the pending element.
      +						pendingElement = pendingElement.clone();
      +
      +						// Add it to the current node and make it the current,
      +						// so the new element will be added inside of it.
      +						pendingElement.parent = currentNode;
      +						currentNode = pendingElement;
      +
      +						// Remove the pending element (back the index by one
      +						// to properly process the next entry).
      +						pendingInline.splice( i, 1 );
      +						i--;
      +					}
      +				}
      +			}
      +		}
      +
      +		function sendPendingBRs( brsToIgnore )
      +		{
      +			while ( pendingBRs.length - ( brsToIgnore || 0 ) > 0 )
      +				currentNode.add( pendingBRs.shift() );
      +		}
      +
      +		function addElement( element, target, enforceCurrent )
      +		{
      +			target = target || currentNode || fragment;
      +
      +			// If the target is the fragment and this element can't go inside
      +			// body (if fixForBody).
      +			if ( fixForBody && !target.type )
      +			{
      +				var elementName, realElementName;
      +				if ( element.attributes
      +					 && ( realElementName =
      +						  element.attributes[ '_cke_real_element_type' ] ) )
      +					elementName = realElementName;
      +				else
      +					elementName =  element.name;
      +				if ( elementName
      +						&& !( elementName in CKEDITOR.dtd.$body )
      +						&& !( elementName in CKEDITOR.dtd.$nonBodyContent )  )
      +				{
      +					var savedCurrent = currentNode;
      +
      +					// Create a 

      in the fragment. + currentNode = target; + parser.onTagOpen( fixForBody, {} ); + + // The new target now is the

      . + target = currentNode; + + if ( enforceCurrent ) + currentNode = savedCurrent; + } + } + + // Rtrim empty spaces on block end boundary. (#3585) + if ( element._.isBlockLike + && element.name != 'pre' ) + { + + var length = element.children.length, + lastChild = element.children[ length - 1 ], + text; + if ( lastChild && lastChild.type == CKEDITOR.NODE_TEXT ) + { + if ( !( text = CKEDITOR.tools.rtrim( lastChild.value ) ) ) + element.children.length = length -1; + else + lastChild.value = text; + } + } + + target.add( element ); + + if ( element.returnPoint ) + { + currentNode = element.returnPoint; + delete element.returnPoint; + } + } + + parser.onTagOpen = function( tagName, attributes, selfClosing ) + { + var element = new CKEDITOR.htmlParser.element( tagName, attributes ); + + // "isEmpty" will be always "false" for unknown elements, so we + // must force it if the parser has identified it as a selfClosing tag. + if ( element.isUnknown && selfClosing ) + element.isEmpty = true; + + // This is a tag to be removed if empty, so do not add it immediately. + if ( CKEDITOR.dtd.$removeEmpty[ tagName ] ) + { + pendingInline.push( element ); + return; + } + else if ( tagName == 'pre' ) + inPre = true; + else if ( tagName == 'br' && inPre ) + { + currentNode.add( new CKEDITOR.htmlParser.text( '\n' ) ); + return; + } + + if ( tagName == 'br' ) + { + pendingBRs.push( element ); + return; + } + + var currentName = currentNode.name; + + var currentDtd = currentName + && ( CKEDITOR.dtd[ currentName ] + || ( currentNode._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span ) ); + + // If the element cannot be child of the current element. + if ( currentDtd // Fragment could receive any elements. + && !element.isUnknown && !currentNode.isUnknown && !currentDtd[ tagName ] ) + { + + var reApply = false, + addPoint; // New position to start adding nodes. + + // Fixing malformed nested lists by moving it into a previous list item. (#3828) + if ( tagName in listBlocks + && currentName in listBlocks ) + { + var children = currentNode.children, + lastChild = children[ children.length - 1 ]; + + // Establish the list item if it's not existed. + if ( !( lastChild && lastChild.name in listItems ) ) + addElement( ( lastChild = new CKEDITOR.htmlParser.element( 'li' ) ), currentNode ); + + returnPoint = currentNode, addPoint = lastChild; + } + // If the element name is the same as the current element name, + // then just close the current one and append the new one to the + // parent. This situation usually happens with

      ,

    1. ,
      and + //
      , specially in IE. Do not enter in this if block in this case. + else if ( tagName == currentName ) + { + addElement( currentNode, currentNode.parent ); + } + else + { + if ( nonBreakingBlocks[ currentName ] ) + { + if ( !returnPoint ) + returnPoint = currentNode; + } + else + { + addElement( currentNode, currentNode.parent, true ); + + if ( !optionalClose[ currentName ] ) + { + // The current element is an inline element, which + // cannot hold the new one. Put it in the pending list, + // and try adding the new one after it. + pendingInline.unshift( currentNode ); + } + } + + reApply = true; + } + + if ( addPoint ) + currentNode = addPoint; + // Try adding it to the return point, or the parent element. + else + currentNode = currentNode.returnPoint || currentNode.parent; + + if ( reApply ) + { + parser.onTagOpen.apply( this, arguments ); + return; + } + } + + checkPending( tagName ); + sendPendingBRs(); + + element.parent = currentNode; + element.returnPoint = returnPoint; + returnPoint = 0; + + if ( element.isEmpty ) + addElement( element ); + else + currentNode = element; + }; + + parser.onTagClose = function( tagName ) + { + // Check if there is any pending tag to be closed. + for ( var i = pendingInline.length - 1 ; i >= 0 ; i-- ) + { + // If found, just remove it from the list. + if ( tagName == pendingInline[ i ].name ) + { + pendingInline.splice( i, 1 ); + return; + } + } + + var pendingAdd = [], + newPendingInline = [], + candidate = currentNode; + + while ( candidate.type && candidate.name != tagName ) + { + // If this is an inline element, add it to the pending list, if we're + // really closing one of the parents element later, they will continue + // after it. + if ( !candidate._.isBlockLike ) + newPendingInline.unshift( candidate ); + + // This node should be added to it's parent at this point. But, + // it should happen only if the closing tag is really closing + // one of the nodes. So, for now, we just cache it. + pendingAdd.push( candidate ); + + candidate = candidate.parent; + } + + if ( candidate.type ) + { + // Add all elements that have been found in the above loop. + for ( i = 0 ; i < pendingAdd.length ; i++ ) + { + var node = pendingAdd[ i ]; + addElement( node, node.parent ); + } + + currentNode = candidate; + + if ( currentNode.name == 'pre' ) + inPre = false; + + if ( candidate._.isBlockLike ) + sendPendingBRs(); + + addElement( candidate, candidate.parent ); + + // The parent should start receiving new nodes now, except if + // addElement changed the currentNode. + if ( candidate == currentNode ) + currentNode = currentNode.parent; + + pendingInline = pendingInline.concat( newPendingInline ); + } + + if ( tagName == 'body' ) + fixForBody = false; + }; + + parser.onText = function( text ) + { + // Trim empty spaces at beginning of element contents except
      .
      +			if ( !currentNode._.hasInlineStarted && !inPre )
      +			{
      +				text = CKEDITOR.tools.ltrim( text );
      +
      +				if ( text.length === 0 )
      +					return;
      +			}
      +
      +			sendPendingBRs();
      +			checkPending();
      +
      +			if ( fixForBody
      +				 && ( !currentNode.type || currentNode.name == 'body' )
      +				 && CKEDITOR.tools.trim( text ) )
      +			{
      +				this.onTagOpen( fixForBody, {} );
      +			}
      +
      +			// Shrinking consequential spaces into one single for all elements
      +			// text contents.
      +			if ( !inPre )
      +				text = text.replace( /[\t\r\n ]{2,}|[\t\r\n]/g, ' ' );
      +
      +			currentNode.add( new CKEDITOR.htmlParser.text( text ) );
      +		};
      +
      +		parser.onCDATA = function( cdata )
      +		{
      +			currentNode.add( new CKEDITOR.htmlParser.cdata( cdata ) );
      +		};
      +
      +		parser.onComment = function( comment )
      +		{
      +			currentNode.add( new CKEDITOR.htmlParser.comment( comment ) );
      +		};
      +
      +		// Parse it.
      +		parser.parse( fragmentHtml );
      +
      +		// Send all pending BRs except one, which we consider a unwanted bogus. (#5293)
      +		sendPendingBRs( !CKEDITOR.env.ie && 1 );
      +
      +		// Close all pending nodes.
      +		while ( currentNode.type )
      +		{
      +			var parent = currentNode.parent,
      +				node = currentNode;
      +
      +			if ( fixForBody
      +				 && ( !parent.type || parent.name == 'body' )
      +				 && !CKEDITOR.dtd.$body[ node.name ] )
      +			{
      +				currentNode = parent;
      +				parser.onTagOpen( fixForBody, {} );
      +				parent = currentNode;
      +			}
      +
      +			parent.add( node );
      +			currentNode = parent;
      +		}
      +
      +		return fragment;
      +	};
      +
      +	CKEDITOR.htmlParser.fragment.prototype =
      +	{
      +		/**
      +		 * Adds a node to this fragment.
      +		 * @param {Object} node The node to be added. It can be any of of the
      +		 *		following types: {@link CKEDITOR.htmlParser.element},
      +		 *		{@link CKEDITOR.htmlParser.text} and
      +		 *		{@link CKEDITOR.htmlParser.comment}.
      +		 * @example
      +		 */
      +		add : function( node )
      +		{
      +			var len = this.children.length,
      +				previous = len > 0 && this.children[ len - 1 ] || null;
      +
      +			if ( previous )
      +			{
      +				// If the block to be appended is following text, trim spaces at
      +				// the right of it.
      +				if ( node._.isBlockLike && previous.type == CKEDITOR.NODE_TEXT )
      +				{
      +					previous.value = CKEDITOR.tools.rtrim( previous.value );
      +
      +					// If we have completely cleared the previous node.
      +					if ( previous.value.length === 0 )
      +					{
      +						// Remove it from the list and add the node again.
      +						this.children.pop();
      +						this.add( node );
      +						return;
      +					}
      +				}
      +
      +				previous.next = node;
      +			}
      +
      +			node.previous = previous;
      +			node.parent = this;
      +
      +			this.children.push( node );
      +
      +			this._.hasInlineStarted = node.type == CKEDITOR.NODE_TEXT || ( node.type == CKEDITOR.NODE_ELEMENT && !node._.isBlockLike );
      +		},
      +
      +		/**
      +		 * Writes the fragment HTML to a CKEDITOR.htmlWriter.
      +		 * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML.
      +		 * @example
      +		 * var writer = new CKEDITOR.htmlWriter();
      +		 * var fragment = CKEDITOR.htmlParser.fragment.fromHtml( '<P><B>Example' );
      +		 * fragment.writeHtml( writer )
      +		 * alert( writer.getHtml() );  "<p><b>Example</b></p>"
      +		 */
      +		writeHtml : function( writer, filter )
      +		{
      +			var isChildrenFiltered;
      +			this.filterChildren = function()
      +			{
      +				var writer = new CKEDITOR.htmlParser.basicWriter();
      +				this.writeChildrenHtml.call( this, writer, filter, true );
      +				var html = writer.getHtml();
      +				this.children = new CKEDITOR.htmlParser.fragment.fromHtml( html ).children;
      +				isChildrenFiltered = 1;
      +			};
      +
      +			// Filtering the root fragment before anything else.
      +			!this.name && filter && filter.onFragment( this );
      +
      +			this.writeChildrenHtml( writer, isChildrenFiltered ? null : filter );
      +		},
      +
      +		writeChildrenHtml : function( writer, filter )
      +		{
      +			for ( var i = 0 ; i < this.children.length ; i++ )
      +				this.children[i].writeHtml( writer, filter );
      +		}
      +	};
      +})();
      diff --git a/ckeditor/_source/core/htmlparser/text.js b/ckeditor/_source/core/htmlparser/text.js
      new file mode 100644
      index 0000000..0d63ac9
      --- /dev/null
      +++ b/ckeditor/_source/core/htmlparser/text.js
      @@ -0,0 +1,55 @@
      +/*
      +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
      +For licensing, see LICENSE.html or http://ckeditor.com/license
      +*/
      +
      +(function()
      +{
      +	var spacesRegex = /[\t\r\n ]{2,}|[\t\r\n]/g;
      +
      +	/**
      +	 * A lightweight representation of HTML text.
      +	 * @constructor
      +	 * @example
      +	 */
      + 	CKEDITOR.htmlParser.text = function( value )
      +	{
      +		/**
      +		 * The text value.
      +		 * @type String
      +		 * @example
      +		 */
      +		this.value = value;
      +
      +		/** @private */
      +		this._ =
      +		{
      +			isBlockLike : false
      +		};
      +	};
      +
      +	CKEDITOR.htmlParser.text.prototype =
      +	{
      +		/**
      +		 * The node type. This is a constant value set to {@link CKEDITOR.NODE_TEXT}.
      +		 * @type Number
      +		 * @example
      +		 */
      +		type : CKEDITOR.NODE_TEXT,
      +
      +		/**
      +		 * Writes the HTML representation of this text to a CKEDITOR.htmlWriter.
      +		 * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML.
      +		 * @example
      +		 */
      +		writeHtml : function( writer, filter )
      +		{
      +			var text = this.value;
      +
      +			if ( filter && !( text = filter.onText( text, this ) ) )
      +				return;
      +
      +			writer.text( text );
      +		}
      +	};
      +})();
      diff --git a/ckeditor/_source/core/imagecacher.js b/ckeditor/_source/core/imagecacher.js
      new file mode 100644
      index 0000000..0704556
      --- /dev/null
      +++ b/ckeditor/_source/core/imagecacher.js
      @@ -0,0 +1,59 @@
      +/*
      +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
      +For licensing, see LICENSE.html or http://ckeditor.com/license
      +*/
      +
      +(function()
      +{
      +	var loaded = {};
      +
      +	var loadImage = function( image, callback )
      +	{
      +		var doCallback = function()
      +			{
      +				img.removeAllListeners();
      +				loaded[ image ] = 1;
      +				callback();
      +			};
      +
      +		var img = new CKEDITOR.dom.element( 'img' );
      +		img.on( 'load', doCallback );
      +		img.on( 'error', doCallback );
      +		img.setAttribute( 'src', image );
      +	};
      +
      +	/**
      +	 * Load images into the browser cache.
      +	 * @namespace
      +	 * @example
      +	 */
      + 	CKEDITOR.imageCacher =
      +	{
      +		/**
      +		 * Loads one or more images.
      +		 * @param {Array} images The URLs for the images to be loaded.
      +		 * @param {Function} callback The function to be called once all images
      +		 *		are loaded.
      +		 */
      +		load : function( images, callback )
      +		{
      +			var pendingCount = images.length;
      +
      +			var checkPending = function()
      +			{
      +				if ( --pendingCount === 0 )
      +					callback();
      +			};
      +
      +			for ( var i = 0 ; i < images.length ; i++ )
      +			{
      +				var image = images[ i ];
      +
      +				if ( loaded[ image ] )
      +					checkPending();
      +				else
      +					loadImage( image, checkPending );
      +			}
      +		}
      +	};
      +})();
      diff --git a/ckeditor/_source/core/lang.js b/ckeditor/_source/core/lang.js
      new file mode 100644
      index 0000000..add9982
      --- /dev/null
      +++ b/ckeditor/_source/core/lang.js
      @@ -0,0 +1,152 @@
      +/*
      +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
      +For licensing, see LICENSE.html or http://ckeditor.com/license
      +*/
      +
      +(function()
      +{
      +	var loadedLangs = {};
      +
      +	CKEDITOR.lang =
      +	{
      +		/**
      +		 * The list of languages available in the editor core.
      +		 * @type Object
      +		 * @example
      +		 * alert( CKEDITOR.lang.en );  // "true"
      +		 */
      +		languages :
      +		{
      +			'af'	: 1,
      +			'ar'	: 1,
      +			'bg'	: 1,
      +			'bn'	: 1,
      +			'bs'	: 1,
      +			'ca'	: 1,
      +			'cs'	: 1,
      +			'cy'	: 1,
      +			'da'	: 1,
      +			'de'	: 1,
      +			'el'	: 1,
      +			'en-au'	: 1,
      +			'en-ca'	: 1,
      +			'en-gb'	: 1,
      +			'en'	: 1,
      +			'eo'	: 1,
      +			'es'	: 1,
      +			'et'	: 1,
      +			'eu'	: 1,
      +			'fa'	: 1,
      +			'fi'	: 1,
      +			'fo'	: 1,
      +			'fr-ca'	: 1,
      +			'fr'	: 1,
      +			'gl'	: 1,
      +			'gu'	: 1,
      +			'he'	: 1,
      +			'hi'	: 1,
      +			'hr'	: 1,
      +			'hu'	: 1,
      +			'is'	: 1,
      +			'it'	: 1,
      +			'ja'	: 1,
      +			'km'	: 1,
      +			'ko'	: 1,
      +			'lt'	: 1,
      +			'lv'	: 1,
      +			'mn'	: 1,
      +			'ms'	: 1,
      +			'nb'	: 1,
      +			'nl'	: 1,
      +			'no'	: 1,
      +			'pl'	: 1,
      +			'pt-br'	: 1,
      +			'pt'	: 1,
      +			'ro'	: 1,
      +			'ru'	: 1,
      +			'sk'	: 1,
      +			'sl'	: 1,
      +			'sr-latn'	: 1,
      +			'sr'	: 1,
      +			'sv'	: 1,
      +			'th'	: 1,
      +			'tr'	: 1,
      +			'uk'	: 1,
      +			'vi'	: 1,
      +			'zh-cn'	: 1,
      +			'zh'	: 1
      +		},
      +
      +		/**
      +		 * Loads a specific language file, or auto detect it. A callback is
      +		 * then called when the file gets loaded.
      +		 * @param {String} languageCode The code of the language file to be
      +		 *		loaded. If "autoDetect" is set to true, this language will be
      +		 *		used as the default one, if the detect language is not
      +		 *		available in the core.
      +		 * @param {Boolean} autoDetect Indicates that the function must try to
      +		 *		detect the user language and load it instead.
      +		 * @param {Function} callback The function to be called once the
      +		 *		language file is loaded. Two parameters are passed to this
      +		 *		function: the language code and the loaded language entries.
      +		 * @example
      +		 */
      +		load : function( languageCode, defaultLanguage, callback )
      +		{
      +			// If no languageCode - fallback to browser or default.
      +			// If languageCode - fallback to no-localized version or default.
      +			if ( !languageCode || !CKEDITOR.lang.languages[ languageCode ] )
      +				languageCode = this.detect( defaultLanguage, languageCode );
      +
      +			if ( !this[ languageCode ] )
      +			{
      +				CKEDITOR.scriptLoader.load( CKEDITOR.getUrl(
      +					'_source/' +	// @Packager.RemoveLine
      +					'lang/' + languageCode + '.js' ),
      +					function()
      +						{
      +							callback( languageCode, this[ languageCode ] );
      +						}
      +						, this );
      +			}
      +			else
      +				callback( languageCode, this[ languageCode ] );
      +		},
      +
      +		/**
      +		 * Returns the language that best fit the user language. For example,
      +		 * suppose that the user language is "pt-br". If this language is
      +		 * supported by the editor, it is returned. Otherwise, if only "pt" is
      +		 * supported, it is returned instead. If none of the previous are
      +		 * supported, a default language is then returned.
      +		 * @param {String} defaultLanguage The default language to be returned
      +		 *		if the user language is not supported.
      +		 * @returns {String} The detected language code.
      +		 * @example
      +		 * alert( CKEDITOR.lang.detect( 'en' ) );  // e.g., in a German browser: "de"
      +		 */
      +		detect : function( defaultLanguage, probeLanguage )
      +		{
      +			var languages = this.languages;
      +			probeLanguage = probeLanguage || navigator.userLanguage || navigator.language;
      +
      +			var parts = probeLanguage
      +					.toLowerCase()
      +					.match( /([a-z]+)(?:-([a-z]+))?/ ),
      +				lang = parts[1],
      +				locale = parts[2];
      +
      +			if ( languages[ lang + '-' + locale ] )
      +				lang = lang + '-' + locale;
      +			else if ( !languages[ lang ] )
      +				lang = null;
      +
      +			CKEDITOR.lang.detect = lang ?
      +				function() { return lang; } :
      +				function( defaultLanguage ) { return defaultLanguage; };
      +
      +			return lang || defaultLanguage;
      +		}
      +	};
      +
      +})();
      diff --git a/ckeditor/_source/core/loader.js b/ckeditor/_source/core/loader.js
      new file mode 100644
      index 0000000..abeda48
      --- /dev/null
      +++ b/ckeditor/_source/core/loader.js
      @@ -0,0 +1,243 @@
      +/*
      +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
      +For licensing, see LICENSE.html or http://ckeditor.com/license
      +*/
      +
      +/**
      + * @fileOverview Defines the {@link CKEDITOR.loader} objects, which is used to
      + *		load core scripts and their dependencies from _source.
      + */
      +
      +if ( typeof CKEDITOR == 'undefined' )
      +	CKEDITOR = {};
      +
      +if ( !CKEDITOR.loader )
      +{
      +	/**
      +	 * Load core scripts and their dependencies from _source.
      +	 * @namespace
      +	 * @example
      +	 */
      +	CKEDITOR.loader = (function()
      +	{
      +		// Table of script names and their dependencies.
      +		var scripts =
      +		{
      +			'core/_bootstrap'		: [ 'core/config', 'core/ckeditor', 'core/plugins', 'core/scriptloader', 'core/tools', /* The following are entries that we want to force loading at the end to avoid dependence recursion */ 'core/dom/comment', 'core/dom/elementpath', 'core/dom/text', 'core/dom/rangelist' ],
      +			'core/ajax'				: [ 'core/xml' ],
      +			'core/ckeditor'			: [ 'core/ckeditor_basic', 'core/dom', 'core/dtd', 'core/dom/document', 'core/dom/element', 'core/editor', 'core/event', 'core/htmlparser', 'core/htmlparser/element', 'core/htmlparser/fragment', 'core/htmlparser/filter', 'core/htmlparser/basicwriter', 'core/tools' ],
      +			'core/ckeditor_base'	: [],
      +			'core/ckeditor_basic'	: [ 'core/editor_basic', 'core/env', 'core/event' ],
      +			'core/command'			: [],
      +			'core/config'			: [ 'core/ckeditor_base' ],
      +			'core/dom'				: [],
      +			'core/dom/comment'		: [ 'core/dom/node' ],
      +			'core/dom/document'		: [ 'core/dom', 'core/dom/domobject', 'core/dom/window' ],
      +			'core/dom/documentfragment'	: [ 'core/dom/element' ],
      +			'core/dom/element'		: [ 'core/dom', 'core/dom/document', 'core/dom/domobject', 'core/dom/node', 'core/dom/nodelist', 'core/tools' ],
      +			'core/dom/elementpath'	: [ 'core/dom/element' ],
      +			'core/dom/event'		: [],
      +			'core/dom/node'			: [ 'core/dom/domobject', 'core/tools' ],
      +			'core/dom/nodelist'		: [ 'core/dom/node' ],
      +			'core/dom/domobject'	: [ 'core/dom/event' ],
      +			'core/dom/range'		: [ 'core/dom/document', 'core/dom/documentfragment', 'core/dom/element', 'core/dom/walker' ],
      +			'core/dom/rangelist'    : [ 'core/dom/range' ],
      +			'core/dom/text'			: [ 'core/dom/node', 'core/dom/domobject' ],
      +			'core/dom/walker'		: [ 'core/dom/node' ],
      +			'core/dom/window'		: [ 'core/dom/domobject' ],
      +			'core/dtd'				: [ 'core/tools' ],
      +			'core/editor'			: [ 'core/command', 'core/config', 'core/editor_basic', 'core/focusmanager', 'core/lang', 'core/plugins', 'core/skins', 'core/themes', 'core/tools', 'core/ui' ],
      +			'core/editor_basic'		: [ 'core/event' ],
      +			'core/env'				: [],
      +			'core/event'			: [],
      +			'core/focusmanager'		: [],
      +			'core/htmlparser'		: [],
      +			'core/htmlparser/comment'	: [ 'core/htmlparser' ],
      +			'core/htmlparser/element'	: [ 'core/htmlparser', 'core/htmlparser/fragment' ],
      +			'core/htmlparser/fragment'	: [ 'core/htmlparser', 'core/htmlparser/comment', 'core/htmlparser/text', 'core/htmlparser/cdata' ],
      +			'core/htmlparser/text'		: [ 'core/htmlparser' ],
      +			'core/htmlparser/cdata'		: [ 'core/htmlparser' ],
      +			'core/htmlparser/filter'	: [ 'core/htmlparser' ],
      +			'core/htmlparser/basicwriter': [ 'core/htmlparser' ],
      +			'core/imagecacher'		: [ 'core/dom/element' ],
      +			'core/lang'				: [],
      +			'core/plugins'			: [ 'core/resourcemanager' ],
      +			'core/resourcemanager'	: [ 'core/scriptloader', 'core/tools' ],
      +			'core/scriptloader'		: [ 'core/dom/element', 'core/env' ],
      +			'core/skins'			: [ 'core/imagecacher', 'core/scriptloader' ],
      +			'core/themes'			: [ 'core/resourcemanager' ],
      +			'core/tools'			: [ 'core/env' ],
      +			'core/ui'				: [],
      +			'core/xml'				: [ 'core/env' ]
      +		};
      +
      +		var basePath = (function()
      +		{
      +			// This is a copy of CKEDITOR.basePath, but requires the script having
      +			// "_source/core/loader.js".
      +			if ( CKEDITOR && CKEDITOR.basePath )
      +				return CKEDITOR.basePath;
      +
      +			// Find out the editor directory path, based on its ' +
      +				'';
      +
      +			var iframe = CKEDITOR.dom.element.createFromHtml(
      +						'' );
      +
      +			iframe.on( 'load', function( e )
      +			{
      +				e.removeListener();
      +				var doc = iframe.getFrameDocument().$;
      +				// Custom domain handling is needed after each document.open().
      +				doc.open();
      +				if ( isCustomDomain )
      +					doc.domain = document.domain;
      +				doc.write( htmlToLoad );
      +				doc.close();
      +			}, this );
      +
      +			iframe.setCustomData( 'dialog', this );
      +
      +			var field = this.getContentElement( 'general', 'editing_area' ),
      +				container = field.getElement();
      +			container.setHtml( '' );
      +			container.append( iframe );
      +
      +			// IE need a redirect on focus to make
      +			// the cursor blinking inside iframe. (#5461)
      +			if ( CKEDITOR.env.ie )
      +			{
      +				var focusGrabber = CKEDITOR.dom.element.createFromHtml( '' );
      +				focusGrabber.on( 'focus', function()
      +				{
      +					iframe.$.contentWindow.focus();
      +				});
      +				container.append( focusGrabber );
      +
      +				// Override focus handler on field.
      +				field.focus = function()
      +				{
      +					focusGrabber.focus();
      +					this.fire( 'focus' );
      +				};
      +			}
      +
      +			field.getInputElement = function(){ return iframe; };
      +
      +			// Force container to scale in IE.
      +			if ( CKEDITOR.env.ie )
      +			{
      +				container.setStyle( 'display', 'block' );
      +				container.setStyle( 'height', ( iframe.$.offsetHeight + 2 ) + 'px' );
      +			}
      +		},
      +
      +		onHide : function()
      +		{
      +			if ( CKEDITOR.env.ie )
      +				this.getParentEditor().document.getBody().$.contentEditable = 'true';
      +		},
      +
      +		onLoad : function()
      +		{
      +			if ( ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) && editor.lang.dir == 'rtl' )
      +				this.parts.contents.setStyle( 'overflow', 'hidden' );
      +		},
      +
      +		onOk : function()
      +		{
      +			var container = this.getContentElement( 'general', 'editing_area' ).getElement(),
      +				iframe = container.getElementsByTag( 'iframe' ).getItem( 0 ),
      +				editor = this.getParentEditor(),
      +				html = iframe.$.contentWindow.document.body.innerHTML;
      +
      +			setTimeout( function(){
      +				editor.fire( 'paste', { 'html' : html } );
      +			}, 0 );
      +
      +		},
      +
      +		contents : [
      +			{
      +				id : 'general',
      +				label : editor.lang.common.generalTab,
      +				elements : [
      +					{
      +						type : 'html',
      +						id : 'securityMsg',
      +						html : '
      ' + lang.securityMsg + '
      ' + }, + { + type : 'html', + id : 'pasteMsg', + html : '
      '+lang.pasteMsg +'
      ' + }, + { + type : 'html', + id : 'editing_area', + style : 'width: 100%; height: 100%;', + html : '', + focus : function() + { + var win = this.getInputElement().$.contentWindow; + + // #3291 : JAWS needs the 500ms delay to detect that the editor iframe + // iframe is no longer editable. So that it will put the focus into the + // Paste from Word dialog's editable area instead. + setTimeout( function() + { + win.focus(); + }, 500 ); + } + } + ] + } + ] + }; +}); diff --git a/ckeditor/_source/plugins/clipboard/plugin.js b/ckeditor/_source/plugins/clipboard/plugin.js new file mode 100644 index 0000000..9dc230e --- /dev/null +++ b/ckeditor/_source/plugins/clipboard/plugin.js @@ -0,0 +1,412 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @file Clipboard support + */ + +(function() +{ + // Tries to execute any of the paste, cut or copy commands in IE. Returns a + // boolean indicating that the operation succeeded. + var execIECommand = function( editor, command ) + { + var doc = editor.document, + body = doc.getBody(); + + var enabled = false; + var onExec = function() + { + enabled = true; + }; + + // The following seems to be the only reliable way to detect that + // clipboard commands are enabled in IE. It will fire the + // onpaste/oncut/oncopy events only if the security settings allowed + // the command to execute. + body.on( command, onExec ); + + // IE6/7: document.execCommand has problem to paste into positioned element. + ( CKEDITOR.env.version > 7 ? doc.$ : doc.$.selection.createRange() ) [ 'execCommand' ]( command ); + + body.removeListener( command, onExec ); + + return enabled; + }; + + // Attempts to execute the Cut and Copy operations. + var tryToCutCopy = + CKEDITOR.env.ie ? + function( editor, type ) + { + return execIECommand( editor, type ); + } + : // !IE. + function( editor, type ) + { + try + { + // Other browsers throw an error if the command is disabled. + return editor.document.$.execCommand( type ); + } + catch( e ) + { + return false; + } + }; + + // A class that represents one of the cut or copy commands. + var cutCopyCmd = function( type ) + { + this.type = type; + this.canUndo = ( this.type == 'cut' ); // We can't undo copy to clipboard. + }; + + cutCopyCmd.prototype = + { + exec : function( editor, data ) + { + this.type == 'cut' && fixCut( editor ); + + var success = tryToCutCopy( editor, this.type ); + + if ( !success ) + alert( editor.lang.clipboard[ this.type + 'Error' ] ); // Show cutError or copyError. + + return success; + } + }; + + // Paste command. + var pasteCmd = + { + canUndo : false, + + exec : + CKEDITOR.env.ie ? + function( editor ) + { + // Prevent IE from pasting at the begining of the document. + editor.focus(); + + if ( !editor.document.getBody().fire( 'beforepaste' ) + && !execIECommand( editor, 'paste' ) ) + { + editor.fire( 'pasteDialog' ); + return false; + } + } + : + function( editor ) + { + try + { + if ( !editor.document.getBody().fire( 'beforepaste' ) + && !editor.document.$.execCommand( 'Paste', false, null ) ) + { + throw 0; + } + } + catch ( e ) + { + setTimeout( function() + { + editor.fire( 'pasteDialog' ); + }, 0 ); + return false; + } + } + }; + + // Listens for some clipboard related keystrokes, so they get customized. + var onKey = function( event ) + { + if ( this.mode != 'wysiwyg' ) + return; + + switch ( event.data.keyCode ) + { + // Paste + case CKEDITOR.CTRL + 86 : // CTRL+V + case CKEDITOR.SHIFT + 45 : // SHIFT+INS + + var body = this.document.getBody(); + + // Simulate 'beforepaste' event for all none-IEs. + if ( !CKEDITOR.env.ie && body.fire( 'beforepaste' ) ) + event.cancel(); + // Simulate 'paste' event for Opera/Firefox2. + else if ( CKEDITOR.env.opera + || CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 ) + body.fire( 'paste' ); + return; + + // Cut + case CKEDITOR.CTRL + 88 : // CTRL+X + case CKEDITOR.SHIFT + 46 : // SHIFT+DEL + + // Save Undo snapshot. + var editor = this; + this.fire( 'saveSnapshot' ); // Save before paste + setTimeout( function() + { + editor.fire( 'saveSnapshot' ); // Save after paste + }, 0 ); + } + }; + + // Allow to peek clipboard content by redirecting the + // pasting content into a temporary bin and grab the content of it. + function getClipboardData( evt, mode, callback ) + { + var doc = this.document; + + // Avoid recursions on 'paste' event for IE. + if ( CKEDITOR.env.ie && doc.getById( 'cke_pastebin' ) ) + return; + + // If the browser supports it, get the data directly + if (mode == 'text' && evt.data && evt.data.$.clipboardData) + { + // evt.data.$.clipboardData.types contains all the flavours in Mac's Safari, but not on windows. + var plain = evt.data.$.clipboardData.getData( 'text/plain' ); + if (plain) + { + evt.data.preventDefault(); + callback( plain ); + return; + } + } + + var sel = this.getSelection(), + range = new CKEDITOR.dom.range( doc ); + + // Create container to paste into + var pastebin = new CKEDITOR.dom.element( mode == 'text' ? 'textarea' : CKEDITOR.env.webkit ? 'body' : 'div', doc ); + pastebin.setAttribute( 'id', 'cke_pastebin' ); + // Safari requires a filler node inside the div to have the content pasted into it. (#4882) + CKEDITOR.env.webkit && pastebin.append( doc.createText( '\xa0' ) ); + doc.getBody().append( pastebin ); + + pastebin.setStyles( + { + position : 'absolute', + // Position the bin exactly at the position of the selected element + // to avoid any subsequent document scroll. + top : sel.getStartElement().getDocumentPosition().y + 'px', + width : '1px', + height : '1px', + overflow : 'hidden' + }); + + // It's definitely a better user experience if we make the paste-bin pretty unnoticed + // by pulling it off the screen. + pastebin.setStyle( this.config.contentsLangDirection == 'ltr' ? 'left' : 'right', '-1000px' ); + + var bms = sel.createBookmarks(); + + // Turn off design mode temporarily before give focus to the paste bin. + if ( mode == 'text' ) + { + if ( CKEDITOR.env.ie ) + { + var ieRange = doc.getBody().$.createTextRange(); + ieRange.moveToElementText( pastebin.$ ); + ieRange.execCommand( 'Paste' ); + evt.data.preventDefault(); + } + else + { + doc.$.designMode = 'off'; + pastebin.$.focus(); + } + } + else + { + range.setStartAt( pastebin, CKEDITOR.POSITION_AFTER_START ); + range.setEndAt( pastebin, CKEDITOR.POSITION_BEFORE_END ); + range.select( true ); + } + + // Wait a while and grab the pasted contents + window.setTimeout( function() + { + mode == 'text' && !CKEDITOR.env.ie && ( doc.$.designMode = 'on' ); + pastebin.remove(); + + // Grab the HTML contents. + // We need to look for a apple style wrapper on webkit it also adds + // a div wrapper if you copy/paste the body of the editor. + // Remove hidden div and restore selection. + var bogusSpan; + pastebin = ( CKEDITOR.env.webkit + && ( bogusSpan = pastebin.getFirst() ) + && ( bogusSpan.is && bogusSpan.hasClass( 'Apple-style-span' ) ) ? + bogusSpan : pastebin ); + + sel.selectBookmarks( bms ); + callback( pastebin[ 'get' + ( mode == 'text' ? 'Value' : 'Html' ) ]() ); + }, 0 ); + } + + // Cutting off control type element in IE standards breaks the selection entirely. (#4881) + function fixCut( editor ) + { + if ( !CKEDITOR.env.ie || editor.document.$.compatMode == 'BackCompat' ) + return; + + var sel = editor.getSelection(); + var control; + if( ( sel.getType() == CKEDITOR.SELECTION_ELEMENT ) && ( control = sel.getSelectedElement() ) ) + { + var range = sel.getRanges()[ 0 ]; + var dummy = editor.document.createText( '' ); + dummy.insertBefore( control ); + range.setStartBefore( dummy ); + range.setEndAfter( control ); + sel.selectRanges( [ range ] ); + + // Clear up the fix if the paste wasn't succeeded. + setTimeout( function() + { + // Element still online? + if ( control.getParent() ) + { + dummy.remove(); + sel.selectElement( control ); + } + }, 0 ); + } + } + + // Register the plugin. + CKEDITOR.plugins.add( 'clipboard', + { + requires : [ 'dialog', 'htmldataprocessor' ], + init : function( editor ) + { + // Inserts processed data into the editor at the end of the + // events chain. + editor.on( 'paste', function( evt ) + { + var data = evt.data; + if ( data[ 'html' ] ) + editor.insertHtml( data[ 'html' ] ); + else if ( data[ 'text' ] ) + editor.insertText( data[ 'text' ] ); + + }, null, null, 1000 ); + + editor.on( 'pasteDialog', function( evt ) + { + setTimeout( function() + { + // Open default paste dialog. + editor.openDialog( 'paste' ); + }, 0 ); + }); + + function addButtonCommand( buttonName, commandName, command, ctxMenuOrder ) + { + var lang = editor.lang[ commandName ]; + + editor.addCommand( commandName, command ); + editor.ui.addButton( buttonName, + { + label : lang, + command : commandName + }); + + // If the "menu" plugin is loaded, register the menu item. + if ( editor.addMenuItems ) + { + editor.addMenuItem( commandName, + { + label : lang, + command : commandName, + group : 'clipboard', + order : ctxMenuOrder + }); + } + } + + addButtonCommand( 'Cut', 'cut', new cutCopyCmd( 'cut' ), 1 ); + addButtonCommand( 'Copy', 'copy', new cutCopyCmd( 'copy' ), 4 ); + addButtonCommand( 'Paste', 'paste', pasteCmd, 8 ); + + CKEDITOR.dialog.add( 'paste', CKEDITOR.getUrl( this.path + 'dialogs/paste.js' ) ); + + editor.on( 'key', onKey, editor ); + + var mode = editor.config.forcePasteAsPlainText ? 'text' : 'html'; + + // We'll be catching all pasted content in one line, regardless of whether the + // it's introduced by a document command execution (e.g. toolbar buttons) or + // user paste behaviors. (e.g. Ctrl-V) + editor.on( 'contentDom', function() + { + var body = editor.document.getBody(); + body.on( ( (mode == 'text' && CKEDITOR.env.ie) || CKEDITOR.env.webkit ) ? 'paste' : 'beforepaste', + function( evt ) + { + if ( depressBeforeEvent ) + return; + + getClipboardData.call( editor, evt, mode, function ( data ) + { + // The very last guard to make sure the + // paste has successfully happened. + if ( !data ) + return; + + var dataTransfer = {}; + dataTransfer[ mode ] = data; + editor.fire( 'paste', dataTransfer ); + } ); + }); + + body.on( 'beforecut', function() { !depressBeforeEvent && fixCut( editor ); } ); + }); + + // If the "contextmenu" plugin is loaded, register the listeners. + if ( editor.contextMenu ) + { + var depressBeforeEvent; + function stateFromNamedCommand( command ) + { + // IE Bug: queryCommandEnabled('paste') fires also 'beforepaste(copy/cut)', + // guard to distinguish from the ordinary sources( either + // keyboard paste or execCommand ) (#4874). + CKEDITOR.env.ie && ( depressBeforeEvent = 1 ); + + var retval = editor.document.$.queryCommandEnabled( command ) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED; + depressBeforeEvent = 0; + return retval; + } + + editor.contextMenu.addListener( function( element, selection ) + { + var readOnly = selection.getCommonAncestor().isReadOnly(); + return { + cut : !readOnly && stateFromNamedCommand( 'Cut' ), + copy : stateFromNamedCommand( 'Copy' ), + paste : !readOnly && ( CKEDITOR.env.webkit ? CKEDITOR.TRISTATE_OFF : stateFromNamedCommand( 'Paste' ) ) + }; + }); + } + } + }); +})(); + +/** + * Fired when a clipboard operation is about to be taken into the editor. + * Listeners can manipulate the data to be pasted before having it effectively + * inserted into the document. + * @name CKEDITOR.editor#paste + * @since 3.1 + * @event + * @param {String} [data.html] The HTML data to be pasted. If not available, e.data.text will be defined. + * @param {String} [data.text] The plain text data to be pasted, available when plain text operations are to used. If not available, e.data.html will be defined. + */ diff --git a/ckeditor/_source/plugins/colorbutton/plugin.js b/ckeditor/_source/plugins/colorbutton/plugin.js new file mode 100644 index 0000000..305c44d --- /dev/null +++ b/ckeditor/_source/plugins/colorbutton/plugin.js @@ -0,0 +1,251 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +CKEDITOR.plugins.add( 'colorbutton', +{ + requires : [ 'panelbutton', 'floatpanel', 'styles' ], + + init : function( editor ) + { + var config = editor.config, + lang = editor.lang.colorButton; + + var clickFn; + + if ( !CKEDITOR.env.hc ) + { + addButton( 'TextColor', 'fore', lang.textColorTitle ); + addButton( 'BGColor', 'back', lang.bgColorTitle ); + } + + function addButton( name, type, title ) + { + editor.ui.add( name, CKEDITOR.UI_PANELBUTTON, + { + label : title, + title : title, + className : 'cke_button_' + name.toLowerCase(), + modes : { wysiwyg : 1 }, + + panel : + { + css : editor.skin.editor.css, + attributes : { role : 'listbox', 'aria-label' : lang.panelTitle } + }, + + onBlock : function( panel, block ) + { + block.autoSize = true; + block.element.addClass( 'cke_colorblock' ); + block.element.setHtml( renderColors( panel, type ) ); + // The block should not have scrollbars (#5933, #6056) + block.element.getDocument().getBody().setStyle( 'overflow', 'hidden' ); + + var keys = block.keys; + var rtl = editor.lang.dir == 'rtl'; + keys[ rtl ? 37 : 39 ] = 'next'; // ARROW-RIGHT + keys[ 40 ] = 'next'; // ARROW-DOWN + keys[ 9 ] = 'next'; // TAB + keys[ rtl ? 39 : 37 ] = 'prev'; // ARROW-LEFT + keys[ 38 ] = 'prev'; // ARROW-UP + keys[ CKEDITOR.SHIFT + 9 ] = 'prev'; // SHIFT + TAB + keys[ 32 ] = 'click'; // SPACE + } + }); + } + + + function renderColors( panel, type ) + { + var output = [], + colors = config.colorButton_colors.split( ',' ), + total = colors.length + ( config.colorButton_enableMore ? 2 : 1 ); + + var clickFn = CKEDITOR.tools.addFunction( function( color, type ) + { + if ( color == '?' ) + { + var applyColorStyle = arguments.callee; + function onColorDialogClose( evt ) + { + this.removeListener( 'ok', onColorDialogClose ); + this.removeListener( 'cancel', onColorDialogClose ); + + evt.name == 'ok' && applyColorStyle( this.getContentElement( 'picker', 'selectedColor' ).getValue(), type ); + } + + editor.openDialog( 'colordialog', function() + { + this.on( 'ok', onColorDialogClose ); + this.on( 'cancel', onColorDialogClose ); + } ); + + return; + } + + editor.focus(); + + panel.hide(); + + + editor.fire( 'saveSnapshot' ); + + // Clean up any conflicting style within the range. + new CKEDITOR.style( config['colorButton_' + type + 'Style'], { color : 'inherit' } ).remove( editor.document ); + + if ( color ) + { + var colorStyle = config['colorButton_' + type + 'Style']; + + colorStyle.childRule = type == 'back' ? + // It's better to apply background color as the innermost style. (#3599) + function(){ return false; } : + // Fore color style must be applied inside links instead of around it. + function( element ){ return element.getName() != 'a'; }; + + new CKEDITOR.style( colorStyle, { color : color } ).apply( editor.document ); + } + + editor.fire( 'saveSnapshot' ); + }); + + // Render the "Automatic" button. + output.push( + '' + + '' + + '' + + '' + + '' + + '' + + '
      ' + + '' + + '', + lang.auto, + '
      ' + + '
      ' + + '' ); + + // Render the color boxes. + for ( var i = 0 ; i < colors.length ; i++ ) + { + if ( ( i % 8 ) === 0 ) + output.push( '' ); + + var parts = colors[ i ].split( '/' ), + colorName = parts[ 0 ], + colorCode = parts[ 1 ] || colorName; + + // The data can be only a color code (without #) or colorName + color code + // If only a color code is provided, then the colorName is the color with the hash + // Convert the color from RGB to RRGGBB for better compatibility with IE and . See #5676 + if (!parts[1]) + colorName = '#' + colorName.replace( /^(.)(.)(.)$/, '$1$1$2$2$3$3' ); + + var colorLabel = editor.lang.colors[ colorCode ] || colorCode; + output.push( + '' ); + } + + // Render the "More Colors" button. + if ( config.colorButton_enableMore ) + { + output.push( + '' + + '' + + '' ); // It is later in the code. + } + + output.push( '
      ' + + '' + + '' + + '' + + '
      ' + + '', + lang.more, + '' + + '
      ' ); + + return output.join( '' ); + } + } +}); + +/** + * Whether to enable the "More Colors..." button in the color selectors. + * @default false + * @type Boolean + * @example + * config.colorButton_enableMore = false; + */ +CKEDITOR.config.colorButton_enableMore = true; + +/** + * Defines the colors to be displayed in the color selectors. It's a string + * containing the hexadecimal notation for HTML colors, without the "#" prefix. + * + * Since 3.3: A name may be optionally defined by prefixing the entries with the + * name and the slash character. For example, "FontColor1/FF9900" will be + * displayed as the color #FF9900 in the selector, but will be outputted as "FontColor1". + * @type String + * @default '000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF' + * @example + * // Brazil colors only. + * config.colorButton_colors = '00923E,F8C100,28166F'; + * @example + * config.colorButton_colors = 'FontColor1/FF9900,FontColor2/0066CC,FontColor3/F00' + */ +CKEDITOR.config.colorButton_colors = + '000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,' + + 'B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,' + + 'F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,' + + 'FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,' + + 'FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF'; + +/** + * Holds the style definition to be used to apply the text foreground color. + * @type Object + * @example + * // This is basically the default setting value. + * config.colorButton_foreStyle = + * { + * element : 'span', + * styles : { 'color' : '#(color)' } + * }; + */ +CKEDITOR.config.colorButton_foreStyle = + { + element : 'span', + styles : { 'color' : '#(color)' }, + overrides : [ { element : 'font', attributes : { 'color' : null } } ] + }; + +/** + * Holds the style definition to be used to apply the text background color. + * @type Object + * @example + * // This is basically the default setting value. + * config.colorButton_backStyle = + * { + * element : 'span', + * styles : { 'background-color' : '#(color)' } + * }; + */ +CKEDITOR.config.colorButton_backStyle = + { + element : 'span', + styles : { 'background-color' : '#(color)' } + }; diff --git a/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js b/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js new file mode 100644 index 0000000..4454d19 --- /dev/null +++ b/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js @@ -0,0 +1,340 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +CKEDITOR.dialog.add( 'colordialog', function( editor ) + { + // Define some shorthands. + var $el = CKEDITOR.dom.element, + $doc = CKEDITOR.document, + $tools = CKEDITOR.tools, + lang = editor.lang.colordialog; + + // Reference the dialog. + var dialog; + + function spacer() + { + return { + type : 'html', + html : ' ' + }; + } + + function clearSelected() + { + $doc.getById( selHiColorId ).removeStyle( 'background-color' ); + dialog.getContentElement( 'picker', 'selectedColor' ).setValue( '' ); + } + + function updateSelected( evt ) + { + if ( ! (evt instanceof CKEDITOR.dom.event ) ) + evt = new CKEDITOR.dom.event( evt ); + + var target = evt.getTarget(), + color; + + if ( target.getName() == 'a' && ( color = target.getChild( 0 ).getHtml() ) ) + dialog.getContentElement( 'picker', 'selectedColor' ).setValue( color ); + } + + function updateHighlight( event ) + { + if ( ! (event instanceof CKEDITOR.dom.event ) ) + event = event.data; + + var target = event.getTarget(), + color; + + if ( target.getName() == 'a' && ( color = target.getChild( 0 ).getHtml() ) ) + { + $doc.getById( hicolorId ).setStyle( 'background-color', color ); + $doc.getById( hicolorTextId ).setHtml( color ); + } + } + + function clearHighlight() + { + $doc.getById( hicolorId ).removeStyle( 'background-color' ); + $doc.getById( hicolorTextId ).setHtml( ' ' ); + } + + var onMouseout = $tools.addFunction( clearHighlight ); + + var onClick = updateSelected, + onClickHandler = CKEDITOR.tools.addFunction( onClick ); + + var onFocus = updateHighlight, + onBlur = clearHighlight; + + var onKeydownHandler = CKEDITOR.tools.addFunction( function( ev ) + { + ev = new CKEDITOR.dom.event( ev ); + var element = ev.getTarget(); + var relative, nodeToMove; + var keystroke = ev.getKeystroke(); + var rtl = editor.lang.dir == 'rtl'; + + switch ( keystroke ) + { + // UP-ARROW + case 38 : + // relative is TR + if ( ( relative = element.getParent().getParent().getPrevious() ) ) + { + nodeToMove = relative.getChild( [element.getParent().getIndex(), 0] ); + nodeToMove.focus(); + onBlur( ev, element ); + onFocus( ev, nodeToMove ); + } + ev.preventDefault(); + break; + // DOWN-ARROW + case 40 : + // relative is TR + if ( ( relative = element.getParent().getParent().getNext() ) ) + { + nodeToMove = relative.getChild( [ element.getParent().getIndex(), 0 ] ); + if ( nodeToMove && nodeToMove.type == 1 ) + { + nodeToMove.focus(); + onBlur( ev, element ); + onFocus( ev, nodeToMove ); + } + } + ev.preventDefault(); + break; + // SPACE + // ENTER is already handled as onClick + case 32 : + onClick( ev ); + ev.preventDefault(); + break; + + // RIGHT-ARROW + case rtl ? 37 : 39 : + // relative is TD + if ( ( relative = element.getParent().getNext() ) ) + { + nodeToMove = relative.getChild( 0 ); + if ( nodeToMove.type == 1 ) + { + nodeToMove.focus(); + onBlur( ev, element ); + onFocus( ev, nodeToMove ); + ev.preventDefault( true ); + } + else + onBlur( null, element ); + } + // relative is TR + else if ( ( relative = element.getParent().getParent().getNext() ) ) + { + nodeToMove = relative.getChild( [ 0, 0 ] ); + if ( nodeToMove && nodeToMove.type == 1 ) + { + nodeToMove.focus(); + onBlur( ev, element ); + onFocus( ev, nodeToMove ); + ev.preventDefault( true ); + } + else + onBlur( null, element ); + } + break; + + // LEFT-ARROW + case rtl ? 39 : 37 : + // relative is TD + if ( ( relative = element.getParent().getPrevious() ) ) + { + nodeToMove = relative.getChild( 0 ); + nodeToMove.focus(); + onBlur( ev, element ); + onFocus( ev, nodeToMove ); + ev.preventDefault( true ); + } + // relative is TR + else if ( ( relative = element.getParent().getParent().getPrevious() ) ) + { + nodeToMove = relative.getLast().getChild( 0 ); + nodeToMove.focus(); + onBlur( ev, element ); + onFocus( ev, nodeToMove ); + ev.preventDefault( true ); + } + else + onBlur( null, element ); + break; + default : + // Do not stop not handled events. + return; + } + }); + + function createColorTable() + { + // Create the base colors array. + var aColors = ['00','33','66','99','cc','ff']; + + // This function combines two ranges of three values from the color array into a row. + function appendColorRow( rangeA, rangeB ) + { + for ( var i = rangeA ; i < rangeA + 3 ; i++ ) + { + var row = table.$.insertRow(-1); + + for ( var j = rangeB ; j < rangeB + 3 ; j++ ) + { + for ( var n = 0 ; n < 6 ; n++ ) + { + appendColorCell( row, '#' + aColors[j] + aColors[n] + aColors[i] ); + } + } + } + } + + // This function create a single color cell in the color table. + function appendColorCell( targetRow, color ) + { + var cell = new $el( targetRow.insertCell( -1 ) ); + cell.setAttribute( 'class', 'ColorCell' ); + cell.setStyle( 'background-color', color ); + + cell.setStyle( 'width', '15px' ); + cell.setStyle( 'height', '15px' ); + + var index = cell.$.cellIndex + 1 + 18 * targetRow.rowIndex; + cell.append( CKEDITOR.dom.element.createFromHtml( + '' + color + ' ', CKEDITOR.document ) ); + } + + appendColorRow( 0, 0 ); + appendColorRow( 3, 0 ); + appendColorRow( 0, 3 ); + appendColorRow( 3, 3 ); + + // Create the last row. + var oRow = table.$.insertRow(-1) ; + + // Create the gray scale colors cells. + for ( var n = 0 ; n < 6 ; n++ ) + { + appendColorCell( oRow, '#' + aColors[n] + aColors[n] + aColors[n] ) ; + } + + // Fill the row with black cells. + for ( var i = 0 ; i < 12 ; i++ ) + { + appendColorCell( oRow, '#000000' ) ; + } + } + + var table = new $el( 'table' ); + createColorTable(); + + var numbering = function( id ) + { + return CKEDITOR.tools.getNextId() + '_' + id; + }, + hicolorId = numbering( 'hicolor' ), + hicolorTextId = numbering( 'hicolortext' ), + selHiColorId = numbering( 'selhicolor' ), + tableLabelId = numbering( 'color_table_label' ); + + return { + title : lang.title, + minWidth : 360, + minHeight : 220, + onLoad : function() + { + // Update reference. + dialog = this; + }, + contents : [ + { + id : 'picker', + label : lang.title, + accessKey : 'I', + elements : + [ + { + type : 'hbox', + padding : 0, + widths : [ '70%', '10%', '30%' ], + children : + [ + { + type : 'html', + html : '' + table.getHtml() + '
      ' + + '' + lang.options +'', + onLoad : function() + { + var table = CKEDITOR.document.getById( this.domId ); + table.on( 'mouseover', updateHighlight ); + }, + focus: function() + { + var firstColor = this.getElement().getElementsByTag( 'a' ).getItem( 0 ); + firstColor.focus(); + } + }, + spacer(), + { + type : 'vbox', + padding : 0, + widths : [ '70%', '5%', '25%' ], + children : + [ + { + type : 'html', + html : '' + lang.highlight +'\ +
      \ +
       
      ' + lang.selected + '\ +
      ' + }, + { + type : 'text', + label : lang.selected, + labelStyle: 'display:none', + id : 'selectedColor', + style : 'width: 74px', + onChange : function() + { + // Try to update color preview with new value. If fails, then set it no none. + try + { + $doc.getById( selHiColorId ).setStyle( 'background-color', this.getValue() ); + } + catch ( e ) + { + clearSelected(); + } + } + }, + spacer(), + { + type : 'button', + id : 'clear', + style : 'margin-top: 5px', + label : lang.clear, + onClick : clearSelected + } + ] + } + ] + } + ] + } + ] + }; + } + ); diff --git a/ckeditor/_source/plugins/colordialog/plugin.js b/ckeditor/_source/plugins/colordialog/plugin.js new file mode 100644 index 0000000..7006d68 --- /dev/null +++ b/ckeditor/_source/plugins/colordialog/plugin.js @@ -0,0 +1,13 @@ +( function() +{ + CKEDITOR.plugins.colordialog = + { + init : function( editor ) + { + editor.addCommand( 'colordialog', new CKEDITOR.dialogCommand( 'colordialog' ) ); + CKEDITOR.dialog.add( 'colordialog', this.path + 'dialogs/colordialog.js' ); + } + }; + + CKEDITOR.plugins.add( 'colordialog', CKEDITOR.plugins.colordialog ); +} )(); diff --git a/ckeditor/_source/plugins/contextmenu/plugin.js b/ckeditor/_source/plugins/contextmenu/plugin.js new file mode 100644 index 0000000..b009dee --- /dev/null +++ b/ckeditor/_source/plugins/contextmenu/plugin.js @@ -0,0 +1,276 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +CKEDITOR.plugins.add( 'contextmenu', +{ + requires : [ 'menu' ], + + beforeInit : function( editor ) + { + editor.contextMenu = new CKEDITOR.plugins.contextMenu( editor ); + + editor.addCommand( 'contextMenu', + { + exec : function() + { + editor.contextMenu.show( editor.document.getBody() ); + } + }); + } +}); + +CKEDITOR.plugins.contextMenu = CKEDITOR.tools.createClass( +{ + $ : function( editor ) + { + this.id = 'cke_' + CKEDITOR.tools.getNextNumber(); + this.editor = editor; + this._.listeners = []; + this._.functionId = CKEDITOR.tools.addFunction( function( commandName ) + { + this._.panel.hide(); + editor.focus(); + editor.execCommand( commandName ); + }, + this); + + this.definition = + { + panel: + { + className : editor.skinClass + ' cke_contextmenu', + attributes : + { + 'aria-label' : editor.lang.contextmenu.options + } + } + }; + }, + + _ : + { + onMenu : function( offsetParent, corner, offsetX, offsetY ) + { + var menu = this._.menu, + editor = this.editor; + + if ( menu ) + { + menu.hide(); + menu.removeAll(); + } + else + { + menu = this._.menu = new CKEDITOR.menu( editor, this.definition ); + menu.onClick = CKEDITOR.tools.bind( function( item ) + { + menu.hide(); + + if ( item.onClick ) + item.onClick(); + else if ( item.command ) + editor.execCommand( item.command ); + + }, this ); + + menu.onEscape = function( keystroke ) + { + var parent = this.parent; + // 1. If it's sub-menu, restore the last focused item + // of upper level menu. + // 2. In case of a top-menu, close it. + if ( parent ) + { + parent._.panel.hideChild(); + // Restore parent block item focus. + var parentBlock = parent._.panel._.panel._.currentBlock, + parentFocusIndex = parentBlock._.focusIndex; + parentBlock._.markItem( parentFocusIndex ); + } + else if ( keystroke == 27 ) + { + this.hide(); + editor.focus(); + } + return false; + }; + } + + var listeners = this._.listeners, + includedItems = []; + + var selection = this.editor.getSelection(), + element = selection && selection.getStartElement(); + + menu.onHide = CKEDITOR.tools.bind( function() + { + menu.onHide = null; + + if ( CKEDITOR.env.ie ) + { + var selection = editor.getSelection(); + selection && selection.unlock(); + } + + this.onHide && this.onHide(); + }, + this ); + + // Call all listeners, filling the list of items to be displayed. + for ( var i = 0 ; i < listeners.length ; i++ ) + { + var listenerItems = listeners[ i ]( element, selection ); + + if ( listenerItems ) + { + for ( var itemName in listenerItems ) + { + var item = this.editor.getMenuItem( itemName ); + + if ( item ) + { + item.state = listenerItems[ itemName ]; + menu.add( item ); + } + } + } + } + + // Don't show context menu with zero items. + menu.items.length && menu.show( offsetParent, corner || ( editor.lang.dir == 'rtl' ? 2 : 1 ), offsetX, offsetY ); + } + }, + + proto : + { + addTarget : function( element, nativeContextMenuOnCtrl ) + { + // Opera doesn't support 'contextmenu' event, we have duo approaches employed here: + // 1. Inherit the 'button override' hack we introduced in v2 (#4530), while this require the Opera browser + // option 'Allow script to detect context menu/right click events' to be always turned on. + // 2. Considering the fact that ctrl/meta key is not been occupied + // for multiple range selecting (like Gecko), we use this key + // combination as a fallback for triggering context-menu. (#4530) + if ( CKEDITOR.env.opera ) + { + var contextMenuOverrideButton; + element.on( 'mousedown', function( evt ) + { + evt = evt.data; + if ( evt.$.button != 2 ) + { + if ( evt.getKeystroke() == CKEDITOR.CTRL + 1 ) + element.fire( 'contextmenu', evt ); + return; + } + + if ( nativeContextMenuOnCtrl + && ( CKEDITOR.env.mac ? evt.$.metaKey : evt.$.ctrlKey ) ) + return; + + var target = evt.getTarget(); + + if ( !contextMenuOverrideButton ) + { + var ownerDoc = target.getDocument(); + contextMenuOverrideButton = ownerDoc.createElement( 'input' ) ; + contextMenuOverrideButton.$.type = 'button' ; + ownerDoc.getBody().append( contextMenuOverrideButton ) ; + } + + contextMenuOverrideButton.setAttribute( 'style', 'position:absolute;top:' + ( evt.$.clientY - 2 ) + + 'px;left:' + ( evt.$.clientX - 2 ) + + 'px;width:5px;height:5px;opacity:0.01' ); + + } ); + + element.on( 'mouseup', function ( evt ) + { + if ( contextMenuOverrideButton ) + { + contextMenuOverrideButton.remove(); + contextMenuOverrideButton = undefined; + // Simulate 'contextmenu' event. + element.fire( 'contextmenu', evt.data ); + } + } ); + } + + element.on( 'contextmenu', function( event ) + { + var domEvent = event.data; + + if ( nativeContextMenuOnCtrl && + // Safari on Windows always show 'ctrlKey' as true in 'contextmenu' event, + // which make this property unreliable. (#4826) + ( CKEDITOR.env.webkit ? holdCtrlKey : ( CKEDITOR.env.mac ? domEvent.$.metaKey : domEvent.$.ctrlKey ) ) ) + return; + + + // Cancel the browser context menu. + domEvent.preventDefault(); + + var offsetParent = domEvent.getTarget().getDocument().getDocumentElement(), + offsetX = domEvent.$.clientX, + offsetY = domEvent.$.clientY; + + CKEDITOR.tools.setTimeout( function() + { + this.show( offsetParent, null, offsetX, offsetY ); + }, + 0, this ); + }, + this ); + + if ( CKEDITOR.env.webkit ) + { + var holdCtrlKey, + onKeyDown = function( event ) + { + holdCtrlKey = CKEDITOR.env.mac ? event.data.$.metaKey : event.data.$.ctrlKey ; + }, + resetOnKeyUp = function() + { + holdCtrlKey = 0; + }; + + element.on( 'keydown', onKeyDown ); + element.on( 'keyup', resetOnKeyUp ); + element.on( 'contextmenu', resetOnKeyUp ); + } + }, + + addListener : function( listenerFn ) + { + this._.listeners.push( listenerFn ); + }, + + show : function( offsetParent, corner, offsetX, offsetY ) + { + this.editor.focus(); + + // Selection will be unavailable after context menu shows up + // in IE, lock it now. + if ( CKEDITOR.env.ie ) + { + var selection = this.editor.getSelection(); + selection && selection.lock(); + } + + this._.onMenu( offsetParent || CKEDITOR.document.getDocumentElement(), corner, offsetX || 0, offsetY || 0 ); + } + } +}); + +/** + * Whether to show the browser native context menu when the CTRL or the + * META (Mac) key is pressed while opening the context menu. + * @name CKEDITOR.config.browserContextMenuOnCtrl + * @since 3.0.2 + * @type Boolean + * @default true + * @example + * config.browserContextMenuOnCtrl = false; + */ diff --git a/ckeditor/_source/plugins/dialog/dialogDefinition.js b/ckeditor/_source/plugins/dialog/dialogDefinition.js new file mode 100644 index 0000000..a3094f6 --- /dev/null +++ b/ckeditor/_source/plugins/dialog/dialogDefinition.js @@ -0,0 +1,315 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview Defines the "virtual" dialog, dialog content and dialog button + * definition classes. + */ + +/** + * This class is not really part of the API. It just illustrates the properties + * that developers can use to define and create dialogs. + * @name CKEDITOR.dialog.dialogDefinition + * @constructor + * @example + * // There is no constructor for this class, the user just has to define an + * // object with the appropriate properties. + * + * CKEDITOR.dialog.add( 'testOnly', function( editor ) + * { + * return { + * title : 'Test Dialog', + * resizable : CKEDITOR.DIALOG_RESIZE_BOTH, + * minWidth : 500, + * minHeight : 400, + * contents : [ + * { + * id : 'tab1', + * label : 'First Tab', + * title : 'First Tab Title', + * accessKey : 'Q', + * elements : [ + * { + * type : 'text', + * label : 'Test Text 1', + * id : 'testText1', + * 'default' : 'hello world!' + * } + * ] + * } + * ] + * }; + * }); + */ + +/** + * The dialog title, displayed in the dialog's header. Required. + * @name CKEDITOR.dialog.dialogDefinition.prototype.title + * @field + * @type String + * @example + */ + +/** + * How the dialog can be resized, must be one of the four contents defined below. + *

      + * CKEDITOR.DIALOG_RESIZE_NONE
      + * CKEDITOR.DIALOG_RESIZE_WIDTH
      + * CKEDITOR.DIALOG_RESIZE_HEIGHT
      + * CKEDITOR.DIALOG_RESIZE_BOTH
      + * @name CKEDITOR.dialog.dialogDefinition.prototype.resizable + * @field + * @type Number + * @default CKEDITOR.DIALOG_RESIZE_NONE + * @example + */ + +/** + * The minimum width of the dialog, in pixels. + * @name CKEDITOR.dialog.dialogDefinition.prototype.minWidth + * @field + * @type Number + * @default 600 + * @example + */ + +/** + * The minimum height of the dialog, in pixels. + * @name CKEDITOR.dialog.dialogDefinition.prototype.minHeight + * @field + * @type Number + * @default 400 + * @example + */ + +/** + * The buttons in the dialog, defined as an array of + * {@link CKEDITOR.dialog.buttonDefinition} objects. + * @name CKEDITOR.dialog.dialogDefinition.prototype.buttons + * @field + * @type Array + * @default [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ] + * @example + */ + +/** + * The contents in the dialog, defined as an array of + * {@link CKEDITOR.dialog.contentDefinition} objects. Required. + * @name CKEDITOR.dialog.dialogDefinition.prototype.contents + * @field + * @type Array + * @example + */ + +/** + * The function to execute when OK is pressed. + * @name CKEDITOR.dialog.dialogDefinition.prototype.onOk + * @field + * @type Function + * @example + */ + +/** + * The function to execute when Cancel is pressed. + * @name CKEDITOR.dialog.dialogDefinition.prototype.onCancel + * @field + * @type Function + * @example + */ + +/** + * The function to execute when the dialog is displayed for the first time. + * @name CKEDITOR.dialog.dialogDefinition.prototype.onLoad + * @field + * @type Function + * @example + */ + +/** + * This class is not really part of the API. It just illustrates the properties + * that developers can use to define and create dialog content pages. + * @name CKEDITOR.dialog.contentDefinition + * @constructor + * @example + * // There is no constructor for this class, the user just has to define an + * // object with the appropriate properties. + */ + +/** + * The id of the content page. + * @name CKEDITOR.dialog.contentDefinition.prototype.id + * @field + * @type String + * @example + */ + +/** + * The tab label of the content page. + * @name CKEDITOR.dialog.contentDefinition.prototype.label + * @field + * @type String + * @example + */ + +/** + * The popup message of the tab label. + * @name CKEDITOR.dialog.contentDefinition.prototype.title + * @field + * @type String + * @example + */ + +/** + * The CTRL hotkey for switching to the tab. + * @name CKEDITOR.dialog.contentDefinition.prototype.accessKey + * @field + * @type String + * @example + * contentDefinition.accessKey = 'Q'; // Switch to this page when CTRL-Q is pressed. + */ + +/** + * The UI elements contained in this content page, defined as an array of + * {@link CKEDITOR.dialog.uiElementDefinition} objects. + * @name CKEDITOR.dialog.contentDefinition.prototype.elements + * @field + * @type Array + * @example + */ + +/** + * This class is not really part of the API. It just illustrates the properties + * that developers can use to define and create dialog buttons. + * @name CKEDITOR.dialog.buttonDefinition + * @constructor + * @example + * // There is no constructor for this class, the user just has to define an + * // object with the appropriate properties. + */ + +/** + * The id of the dialog button. Required. + * @name CKEDITOR.dialog.buttonDefinition.prototype.id + * @type String + * @field + * @example + */ + +/** + * The label of the dialog button. Required. + * @name CKEDITOR.dialog.buttonDefinition.prototype.label + * @type String + * @field + * @example + */ + +/** + * The popup message of the dialog button. + * @name CKEDITOR.dialog.buttonDefinition.prototype.title + * @type String + * @field + * @example + */ + +/** + * The CTRL hotkey for the button. + * @name CKEDITOR.dialog.buttonDefinition.prototype.accessKey + * @type String + * @field + * @example + * exitButton.accessKey = 'X'; // Button will be pressed when user presses CTRL-X + */ + +/** + * Whether the button is disabled. + * @name CKEDITOR.dialog.buttonDefinition.prototype.disabled + * @type Boolean + * @field + * @default false + * @example + */ + +/** + * The function to execute when the button is clicked. + * @name CKEDITOR.dialog.buttonDefinition.prototype.onClick + * @type Function + * @field + * @example + */ + +/** + * This class is not really part of the API. It just illustrates the properties + * that developers can use to define and create dialog UI elements. + * @name CKEDITOR.dialog.uiElementDefinition + * @constructor + * @see CKEDITOR.ui.dialog.uiElement + * @example + * // There is no constructor for this class, the user just has to define an + * // object with the appropriate properties. + */ + +/** + * The id of the UI element. + * @name CKEDITOR.dialog.uiElementDefinition.prototype.id + * @field + * @type String + * @example + */ + +/** + * The type of the UI element. Required. + * @name CKEDITOR.dialog.uiElementDefinition.prototype.type + * @field + * @type String + * @example + */ + +/** + * The popup label of the UI element. + * @name CKEDITOR.dialog.uiElementDefinition.prototype.title + * @field + * @type String + * @example + */ + +/** + * CSS class names to append to the UI element. + * @name CKEDITOR.dialog.uiElementDefinition.prototype.className + * @field + * @type String + * @example + */ + +/** + * Inline CSS classes to append to the UI element. + * @name CKEDITOR.dialog.uiElementDefinition.prototype.style + * @field + * @type String + * @example + */ + +/** + * Function to execute the first time the UI element is displayed. + * @name CKEDITOR.dialog.uiElementDefinition.prototype.onLoad + * @field + * @type Function + * @example + */ + +/** + * Function to execute whenever the UI element's parent dialog is displayed. + * @name CKEDITOR.dialog.uiElementDefinition.prototype.onShow + * @field + * @type Function + * @example + */ + +/** + * Function to execute whenever the UI element's parent dialog is closed. + * @name CKEDITOR.dialog.uiElementDefinition.prototype.onHide + * @field + * @type Function + * @example + */ diff --git a/ckeditor/_source/plugins/dialog/plugin.js b/ckeditor/_source/plugins/dialog/plugin.js new file mode 100644 index 0000000..d708616 --- /dev/null +++ b/ckeditor/_source/plugins/dialog/plugin.js @@ -0,0 +1,3016 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview The floating dialog plugin. + */ + +/** + * No resize for this dialog. + * @constant + */ +CKEDITOR.DIALOG_RESIZE_NONE = 0; + +/** + * Only allow horizontal resizing for this dialog, disable vertical resizing. + * @constant + */ +CKEDITOR.DIALOG_RESIZE_WIDTH = 1; + +/** + * Only allow vertical resizing for this dialog, disable horizontal resizing. + * @constant + */ +CKEDITOR.DIALOG_RESIZE_HEIGHT = 2; + +/* + * Allow the dialog to be resized in both directions. + * @constant + */ +CKEDITOR.DIALOG_RESIZE_BOTH = 3; + +(function() +{ + function isTabVisible( tabId ) + { + return !!this._.tabs[ tabId ][ 0 ].$.offsetHeight; + } + + function getPreviousVisibleTab() + { + var tabId = this._.currentTabId, + length = this._.tabIdList.length, + tabIndex = CKEDITOR.tools.indexOf( this._.tabIdList, tabId ) + length; + + for ( var i = tabIndex - 1 ; i > tabIndex - length ; i-- ) + { + if ( isTabVisible.call( this, this._.tabIdList[ i % length ] ) ) + return this._.tabIdList[ i % length ]; + } + + return null; + } + + function getNextVisibleTab() + { + var tabId = this._.currentTabId, + length = this._.tabIdList.length, + tabIndex = CKEDITOR.tools.indexOf( this._.tabIdList, tabId ); + + for ( var i = tabIndex + 1 ; i < tabIndex + length ; i++ ) + { + if ( isTabVisible.call( this, this._.tabIdList[ i % length ] ) ) + return this._.tabIdList[ i % length ]; + } + + return null; + } + + + function clearOrRecoverTextInputValue( container, isRecover ) + { + var inputs = container.$.getElementsByTagName( 'input' ); + for ( var i = 0, length = inputs.length; i < length ; i++ ) + { + var item = new CKEDITOR.dom.element( inputs[ i ] ); + + if ( item.getAttribute( 'type' ).toLowerCase() == 'text' ) + { + if ( isRecover ) + { + item.setAttribute( 'value', item.getCustomData( 'fake_value' ) || '' ); + item.removeCustomData( 'fake_value' ); + } + else + { + item.setCustomData( 'fake_value', item.getAttribute( 'value' ) ); + item.setAttribute( 'value', '' ); + } + } + } + } + + /** + * This is the base class for runtime dialog objects. An instance of this + * class represents a single named dialog for a single editor instance. + * @param {Object} editor The editor which created the dialog. + * @param {String} dialogName The dialog's registered name. + * @constructor + * @example + * var dialogObj = new CKEDITOR.dialog( editor, 'smiley' ); + */ + CKEDITOR.dialog = function( editor, dialogName ) + { + // Load the dialog definition. + var definition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ]; + + // Completes the definition with the default values. + definition = CKEDITOR.tools.extend( definition( editor ), defaultDialogDefinition ); + + // Clone a functionally independent copy for this dialog. + definition = CKEDITOR.tools.clone( definition ); + + // Create a complex definition object, extending it with the API + // functions. + definition = new definitionObject( this, definition ); + + + var doc = CKEDITOR.document; + + var themeBuilt = editor.theme.buildDialog( editor ); + + // Initialize some basic parameters. + this._ = + { + editor : editor, + element : themeBuilt.element, + name : dialogName, + contentSize : { width : 0, height : 0 }, + size : { width : 0, height : 0 }, + updateSize : false, + contents : {}, + buttons : {}, + accessKeyMap : {}, + + // Initialize the tab and page map. + tabs : {}, + tabIdList : [], + currentTabId : null, + currentTabIndex : null, + pageCount : 0, + lastTab : null, + tabBarMode : false, + + // Initialize the tab order array for input widgets. + focusList : [], + currentFocusIndex : 0, + hasFocus : false + }; + + this.parts = themeBuilt.parts; + + CKEDITOR.tools.setTimeout( function() + { + editor.fire( 'ariaWidget', this.parts.contents ); + }, + 0, this ); + + // Set the startup styles for the dialog, avoiding it enlarging the + // page size on the dialog creation. + this.parts.dialog.setStyles( + { + position : CKEDITOR.env.ie6Compat ? 'absolute' : 'fixed', + top : 0, + left: 0, + visibility : 'hidden' + }); + + // Call the CKEDITOR.event constructor to initialize this instance. + CKEDITOR.event.call( this ); + + // Fire the "dialogDefinition" event, making it possible to customize + // the dialog definition. + this.definition = definition = CKEDITOR.fire( 'dialogDefinition', + { + name : dialogName, + definition : definition + } + , editor ).definition; + // Initialize load, show, hide, ok and cancel events. + if ( definition.onLoad ) + this.on( 'load', definition.onLoad ); + + if ( definition.onShow ) + this.on( 'show', definition.onShow ); + + if ( definition.onHide ) + this.on( 'hide', definition.onHide ); + + if ( definition.onOk ) + { + this.on( 'ok', function( evt ) + { + // Dialog confirm might probably introduce content changes (#5415). + editor.fire( 'saveSnapshot' ); + setTimeout( function () { editor.fire( 'saveSnapshot' ); }, 0 ); + if ( definition.onOk.call( this, evt ) === false ) + evt.data.hide = false; + }); + } + + if ( definition.onCancel ) + { + this.on( 'cancel', function( evt ) + { + if ( definition.onCancel.call( this, evt ) === false ) + evt.data.hide = false; + }); + } + + var me = this; + + // Iterates over all items inside all content in the dialog, calling a + // function for each of them. + var iterContents = function( func ) + { + var contents = me._.contents, + stop = false; + + for ( var i in contents ) + { + for ( var j in contents[i] ) + { + stop = func.call( this, contents[i][j] ); + if ( stop ) + return; + } + } + }; + + this.on( 'ok', function( evt ) + { + iterContents( function( item ) + { + if ( item.validate ) + { + var isValid = item.validate( this ); + + if ( typeof isValid == 'string' ) + { + alert( isValid ); + isValid = false; + } + + if ( isValid === false ) + { + if ( item.select ) + item.select(); + else + item.focus(); + + evt.data.hide = false; + evt.stop(); + return true; + } + } + }); + }, this, null, 0 ); + + this.on( 'cancel', function( evt ) + { + iterContents( function( item ) + { + if ( item.isChanged() ) + { + if ( !confirm( editor.lang.common.confirmCancel ) ) + evt.data.hide = false; + return true; + } + }); + }, this, null, 0 ); + + this.parts.close.on( 'click', function( evt ) + { + if ( this.fire( 'cancel', { hide : true } ).hide !== false ) + this.hide(); + evt.data.preventDefault(); + }, this ); + + // Sort focus list according to tab order definitions. + function setupFocus() + { + var focusList = me._.focusList; + focusList.sort( function( a, b ) + { + // Mimics browser tab order logics; + if ( a.tabIndex != b.tabIndex ) + return b.tabIndex - a.tabIndex; + // Sort is not stable in some browsers, + // fall-back the comparator to 'focusIndex'; + else + return a.focusIndex - b.focusIndex; + }); + + var size = focusList.length; + for ( var i = 0; i < size; i++ ) + focusList[ i ].focusIndex = i; + } + + function changeFocus( forward ) + { + var focusList = me._.focusList, + offset = forward ? 1 : -1; + if ( focusList.length < 1 ) + return; + + var current = me._.currentFocusIndex; + + // Trigger the 'blur' event of any input element before anything, + // since certain UI updates may depend on it. + try + { + focusList[ current ].getInputElement().$.blur(); + } + catch( e ){} + + var startIndex = ( current + offset + focusList.length ) % focusList.length, + currentIndex = startIndex; + while ( !focusList[ currentIndex ].isFocusable() ) + { + currentIndex = ( currentIndex + offset + focusList.length ) % focusList.length; + if ( currentIndex == startIndex ) + break; + } + focusList[ currentIndex ].focus(); + + // Select whole field content. + if ( focusList[ currentIndex ].type == 'text' ) + focusList[ currentIndex ].select(); + } + + this.changeFocus = changeFocus; + + var processed; + + function focusKeydownHandler( evt ) + { + // If I'm not the top dialog, ignore. + if ( me != CKEDITOR.dialog._.currentTop ) + return; + + var keystroke = evt.data.getKeystroke(), + rtl = editor.lang.dir == 'rtl'; + + processed = 0; + if ( keystroke == 9 || keystroke == CKEDITOR.SHIFT + 9 ) + { + var shiftPressed = ( keystroke == CKEDITOR.SHIFT + 9 ); + + // Handling Tab and Shift-Tab. + if ( me._.tabBarMode ) + { + // Change tabs. + var nextId = shiftPressed ? getPreviousVisibleTab.call( me ) : getNextVisibleTab.call( me ); + me.selectPage( nextId ); + me._.tabs[ nextId ][ 0 ].focus(); + } + else + { + // Change the focus of inputs. + changeFocus( !shiftPressed ); + } + + processed = 1; + } + else if ( keystroke == CKEDITOR.ALT + 121 && !me._.tabBarMode && me.getPageCount() > 1 ) + { + // Alt-F10 puts focus into the current tab item in the tab bar. + me._.tabBarMode = true; + me._.tabs[ me._.currentTabId ][ 0 ].focus(); + processed = 1; + } + else if ( ( keystroke == 37 || keystroke == 39 ) && me._.tabBarMode ) + { + // Arrow keys - used for changing tabs. + nextId = ( keystroke == ( rtl ? 39 : 37 ) ? getPreviousVisibleTab.call( me ) : getNextVisibleTab.call( me ) ); + me.selectPage( nextId ); + me._.tabs[ nextId ][ 0 ].focus(); + processed = 1; + } + else if ( ( keystroke == 13 || keystroke == 32 ) && me._.tabBarMode ) + { + this.selectPage( this._.currentTabId ); + this._.tabBarMode = false; + this._.currentFocusIndex = -1; + changeFocus( true ); + processed = 1; + } + + if ( processed ) + { + evt.stop(); + evt.data.preventDefault(); + } + } + + function focusKeyPressHandler( evt ) + { + processed && evt.data.preventDefault(); + } + + var dialogElement = this._.element; + // Add the dialog keyboard handlers. + this.on( 'show', function() + { + dialogElement.on( 'keydown', focusKeydownHandler, this, null, 0 ); + // Some browsers instead, don't cancel key events in the keydown, but in the + // keypress. So we must do a longer trip in those cases. (#4531) + if ( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.mac ) ) + dialogElement.on( 'keypress', focusKeyPressHandler, this ); + + } ); + this.on( 'hide', function() + { + dialogElement.removeListener( 'keydown', focusKeydownHandler ); + if ( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.mac ) ) + dialogElement.removeListener( 'keypress', focusKeyPressHandler ); + } ); + this.on( 'iframeAdded', function( evt ) + { + var doc = new CKEDITOR.dom.document( evt.data.iframe.$.contentWindow.document ); + doc.on( 'keydown', focusKeydownHandler, this, null, 0 ); + } ); + + // Auto-focus logic in dialog. + this.on( 'show', function() + { + // Setup tabIndex on showing the dialog instead of on loading + // to allow dynamic tab order happen in dialog definition. + setupFocus(); + + if ( editor.config.dialog_startupFocusTab + && me._.pageCount > 1 ) + { + me._.tabBarMode = true; + me._.tabs[ me._.currentTabId ][ 0 ].focus(); + } + else if ( !this._.hasFocus ) + { + this._.currentFocusIndex = -1; + + // Decide where to put the initial focus. + if ( definition.onFocus ) + { + var initialFocus = definition.onFocus.call( this ); + // Focus the field that the user specified. + initialFocus && initialFocus.focus(); + } + // Focus the first field in layout order. + else + changeFocus( true ); + + /* + * IE BUG: If the initial focus went into a non-text element (e.g. button), + * then IE would still leave the caret inside the editing area. + */ + if ( this._.editor.mode == 'wysiwyg' && CKEDITOR.env.ie ) + { + var $selection = editor.document.$.selection, + $range = $selection.createRange(); + + if ( $range ) + { + if ( $range.parentElement && $range.parentElement().ownerDocument == editor.document.$ + || $range.item && $range.item( 0 ).ownerDocument == editor.document.$ ) + { + var $myRange = document.body.createTextRange(); + $myRange.moveToElementText( this.getElement().getFirst().$ ); + $myRange.collapse( true ); + $myRange.select(); + } + } + } + } + }, this, null, 0xffffffff ); + + // IE6 BUG: Text fields and text areas are only half-rendered the first time the dialog appears in IE6 (#2661). + // This is still needed after [2708] and [2709] because text fields in hidden TR tags are still broken. + if ( CKEDITOR.env.ie6Compat ) + { + this.on( 'load', function( evt ) + { + var outer = this.getElement(), + inner = outer.getFirst(); + inner.remove(); + inner.appendTo( outer ); + }, this ); + } + + initDragAndDrop( this ); + initResizeHandles( this ); + + // Insert the title. + ( new CKEDITOR.dom.text( definition.title, CKEDITOR.document ) ).appendTo( this.parts.title ); + + // Insert the tabs and contents. + for ( var i = 0 ; i < definition.contents.length ; i++ ) + { + var page = definition.contents[i]; + page && this.addPage( page ); + } + + this.parts['tabs'].on( 'click', function( evt ) + { + var target = evt.data.getTarget(); + // If we aren't inside a tab, bail out. + if ( target.hasClass( 'cke_dialog_tab' ) ) + { + // Get the ID of the tab, without the 'cke_' prefix and the unique number suffix. + var id = target.$.id; + this.selectPage( id.substring( 4, id.lastIndexOf( '_' ) ) ); + + if ( this._.tabBarMode ) + { + this._.tabBarMode = false; + this._.currentFocusIndex = -1; + changeFocus( true ); + } + evt.data.preventDefault(); + } + }, this ); + + // Insert buttons. + var buttonsHtml = [], + buttons = CKEDITOR.dialog._.uiElementBuilders.hbox.build( this, + { + type : 'hbox', + className : 'cke_dialog_footer_buttons', + widths : [], + children : definition.buttons + }, buttonsHtml ).getChild(); + this.parts.footer.setHtml( buttonsHtml.join( '' ) ); + + for ( i = 0 ; i < buttons.length ; i++ ) + this._.buttons[ buttons[i].id ] = buttons[i]; + }; + + // Focusable interface. Use it via dialog.addFocusable. + function Focusable( dialog, element, index ) + { + this.element = element; + this.focusIndex = index; + // TODO: support tabIndex for focusables. + this.tabIndex = 0; + this.isFocusable = function() + { + return !element.getAttribute( 'disabled' ) && element.isVisible(); + }; + this.focus = function() + { + dialog._.currentFocusIndex = this.focusIndex; + this.element.focus(); + }; + // Bind events + element.on( 'keydown', function( e ) + { + if ( e.data.getKeystroke() in { 32:1, 13:1 } ) + this.fire( 'click' ); + } ); + element.on( 'focus', function() + { + this.fire( 'mouseover' ); + } ); + element.on( 'blur', function() + { + this.fire( 'mouseout' ); + } ); + } + + CKEDITOR.dialog.prototype = + { + destroy : function() + { + this.hide(); + this._.element.remove(); + }, + + /** + * Resizes the dialog. + * @param {Number} width The width of the dialog in pixels. + * @param {Number} height The height of the dialog in pixels. + * @function + * @example + * dialogObj.resize( 800, 640 ); + */ + resize : (function() + { + return function( width, height ) + { + if ( this._.contentSize && this._.contentSize.width == width && this._.contentSize.height == height ) + return; + + CKEDITOR.dialog.fire( 'resize', + { + dialog : this, + skin : this._.editor.skinName, + width : width, + height : height + }, this._.editor ); + + this._.contentSize = { width : width, height : height }; + this._.updateSize = true; + }; + })(), + + /** + * Gets the current size of the dialog in pixels. + * @returns {Object} An object with "width" and "height" properties. + * @example + * var width = dialogObj.getSize().width; + */ + getSize : function() + { + if ( !this._.updateSize ) + return this._.size; + var element = this._.element.getFirst(); + var size = this._.size = { width : element.$.offsetWidth || 0, height : element.$.offsetHeight || 0}; + + // If either the offsetWidth or offsetHeight is 0, the element isn't visible. + this._.updateSize = !size.width || !size.height; + + return size; + }, + + /** + * Moves the dialog to an (x, y) coordinate relative to the window. + * @function + * @param {Number} x The target x-coordinate. + * @param {Number} y The target y-coordinate. + * @example + * dialogObj.move( 10, 40 ); + */ + move : (function() + { + var isFixed; + return function( x, y ) + { + // The dialog may be fixed positioned or absolute positioned. Ask the + // browser what is the current situation first. + var element = this._.element.getFirst(); + if ( isFixed === undefined ) + isFixed = element.getComputedStyle( 'position' ) == 'fixed'; + + if ( isFixed && this._.position && this._.position.x == x && this._.position.y == y ) + return; + + // Save the current position. + this._.position = { x : x, y : y }; + + // If not fixed positioned, add scroll position to the coordinates. + if ( !isFixed ) + { + var scrollPosition = CKEDITOR.document.getWindow().getScrollPosition(); + x += scrollPosition.x; + y += scrollPosition.y; + } + + element.setStyles( + { + 'left' : ( x > 0 ? x : 0 ) + 'px', + 'top' : ( y > 0 ? y : 0 ) + 'px' + }); + }; + })(), + + /** + * Gets the dialog's position in the window. + * @returns {Object} An object with "x" and "y" properties. + * @example + * var dialogX = dialogObj.getPosition().x; + */ + getPosition : function(){ return CKEDITOR.tools.extend( {}, this._.position ); }, + + /** + * Shows the dialog box. + * @example + * dialogObj.show(); + */ + show : function() + { + var editor = this._.editor; + if ( editor.mode == 'wysiwyg' && CKEDITOR.env.ie ) + { + var selection = editor.getSelection(); + selection && selection.lock(); + } + + // Insert the dialog's element to the root document. + var element = this._.element; + var definition = this.definition; + if ( !( element.getParent() && element.getParent().equals( CKEDITOR.document.getBody() ) ) ) + element.appendTo( CKEDITOR.document.getBody() ); + else + element.setStyle( 'display', 'block' ); + + // FIREFOX BUG: Fix vanishing caret for Firefox 2 or Gecko 1.8. + if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 ) + { + var dialogElement = this.parts.dialog; + dialogElement.setStyle( 'position', 'absolute' ); + setTimeout( function() + { + dialogElement.setStyle( 'position', 'fixed' ); + }, 0 ); + } + + + // First, set the dialog to an appropriate size. + this.resize( definition.minWidth, definition.minHeight ); + + // Reset all inputs back to their default value. + this.reset(); + + // Select the first tab by default. + this.selectPage( this.definition.contents[0].id ); + + // Set z-index. + if ( CKEDITOR.dialog._.currentZIndex === null ) + CKEDITOR.dialog._.currentZIndex = this._.editor.config.baseFloatZIndex; + this._.element.getFirst().setStyle( 'z-index', CKEDITOR.dialog._.currentZIndex += 10 ); + + // Maintain the dialog ordering and dialog cover. + // Also register key handlers if first dialog. + if ( CKEDITOR.dialog._.currentTop === null ) + { + CKEDITOR.dialog._.currentTop = this; + this._.parentDialog = null; + showCover( this._.editor ); + + element.on( 'keydown', accessKeyDownHandler ); + element.on( CKEDITOR.env.opera ? 'keypress' : 'keyup', accessKeyUpHandler ); + + // Prevent some keys from bubbling up. (#4269) + for ( var event in { keyup :1, keydown :1, keypress :1 } ) + element.on( event, preventKeyBubbling ); + } + else + { + this._.parentDialog = CKEDITOR.dialog._.currentTop; + var parentElement = this._.parentDialog.getElement().getFirst(); + parentElement.$.style.zIndex -= Math.floor( this._.editor.config.baseFloatZIndex / 2 ); + CKEDITOR.dialog._.currentTop = this; + } + + // Register the Esc hotkeys. + registerAccessKey( this, this, '\x1b', null, function() + { + this.getButton( 'cancel' ) && this.getButton( 'cancel' ).click(); + } ); + + // Reset the hasFocus state. + this._.hasFocus = false; + + // Rearrange the dialog to the middle of the window. + CKEDITOR.tools.setTimeout( function() + { + var viewSize = CKEDITOR.document.getWindow().getViewPaneSize(); + var dialogSize = this.getSize(); + + // We're using definition size for initial position because of + // offten corrupted data in offsetWidth at this point. (#4084) + this.move( ( viewSize.width - definition.minWidth ) / 2, ( viewSize.height - dialogSize.height ) / 2 ); + + this.parts.dialog.setStyle( 'visibility', '' ); + + // Execute onLoad for the first show. + this.fireOnce( 'load', {} ); + this.fire( 'show', {} ); + this._.editor.fire( 'dialogShow', this ); + + // Save the initial values of the dialog. + this.foreach( function( contentObj ) { contentObj.setInitValue && contentObj.setInitValue(); } ); + + }, + 100, this ); + }, + + /** + * Executes a function for each UI element. + * @param {Function} fn Function to execute for each UI element. + * @returns {CKEDITOR.dialog} The current dialog object. + */ + foreach : function( fn ) + { + for ( var i in this._.contents ) + { + for ( var j in this._.contents[i] ) + fn( this._.contents[i][j] ); + } + return this; + }, + + /** + * Resets all input values in the dialog. + * @example + * dialogObj.reset(); + * @returns {CKEDITOR.dialog} The current dialog object. + */ + reset : (function() + { + var fn = function( widget ){ if ( widget.reset ) widget.reset( 1 ); }; + return function(){ this.foreach( fn ); return this; }; + })(), + + setupContent : function() + { + var args = arguments; + this.foreach( function( widget ) + { + if ( widget.setup ) + widget.setup.apply( widget, args ); + }); + }, + + commitContent : function() + { + var args = arguments; + this.foreach( function( widget ) + { + if ( widget.commit ) + widget.commit.apply( widget, args ); + }); + }, + + /** + * Hides the dialog box. + * @example + * dialogObj.hide(); + */ + hide : function() + { + if ( !this.parts.dialog.isVisible() ) + return; + + this.fire( 'hide', {} ); + this._.editor.fire( 'dialogHide', this ); + var element = this._.element; + element.setStyle( 'display', 'none' ); + this.parts.dialog.setStyle( 'visibility', 'hidden' ); + // Unregister all access keys associated with this dialog. + unregisterAccessKey( this ); + + // Close any child(top) dialogs first. + while( CKEDITOR.dialog._.currentTop != this ) + CKEDITOR.dialog._.currentTop.hide(); + + // Maintain dialog ordering and remove cover if needed. + if ( !this._.parentDialog ) + hideCover(); + else + { + var parentElement = this._.parentDialog.getElement().getFirst(); + parentElement.setStyle( 'z-index', parseInt( parentElement.$.style.zIndex, 10 ) + Math.floor( this._.editor.config.baseFloatZIndex / 2 ) ); + } + CKEDITOR.dialog._.currentTop = this._.parentDialog; + + // Deduct or clear the z-index. + if ( !this._.parentDialog ) + { + CKEDITOR.dialog._.currentZIndex = null; + + // Remove access key handlers. + element.removeListener( 'keydown', accessKeyDownHandler ); + element.removeListener( CKEDITOR.env.opera ? 'keypress' : 'keyup', accessKeyUpHandler ); + + // Remove bubbling-prevention handler. (#4269) + for ( var event in { keyup :1, keydown :1, keypress :1 } ) + element.removeListener( event, preventKeyBubbling ); + + var editor = this._.editor; + editor.focus(); + + if ( editor.mode == 'wysiwyg' && CKEDITOR.env.ie ) + { + var selection = editor.getSelection(); + selection && selection.unlock( true ); + } + } + else + CKEDITOR.dialog._.currentZIndex -= 10; + + delete this._.parentDialog; + // Reset the initial values of the dialog. + this.foreach( function( contentObj ) { contentObj.resetInitValue && contentObj.resetInitValue(); } ); + }, + + /** + * Adds a tabbed page into the dialog. + * @param {Object} contents Content definition. + * @example + */ + addPage : function( contents ) + { + var pageHtml = [], + titleHtml = contents.label ? ' title="' + CKEDITOR.tools.htmlEncode( contents.label ) + '"' : '', + elements = contents.elements, + vbox = CKEDITOR.dialog._.uiElementBuilders.vbox.build( this, + { + type : 'vbox', + className : 'cke_dialog_page_contents', + children : contents.elements, + expand : !!contents.expand, + padding : contents.padding, + style : contents.style || 'width: 100%; height: 100%;' + }, pageHtml ); + + // Create the HTML for the tab and the content block. + var page = CKEDITOR.dom.element.createFromHtml( pageHtml.join( '' ) ); + page.setAttribute( 'role', 'tabpanel' ); + + var env = CKEDITOR.env; + var tabId = 'cke_' + contents.id + '_' + CKEDITOR.tools.getNextNumber(), + tab = CKEDITOR.dom.element.createFromHtml( [ + ' 0 ? ' cke_last' : 'cke_first' ), + titleHtml, + ( !!contents.hidden ? ' style="display:none"' : '' ), + ' id="', tabId, '"', + env.gecko && env.version >= 10900 && !env.hc ? '' : ' href="javascript:void(0)"', + ' tabIndex="-1"', + ' hidefocus="true"', + ' role="tab">', + contents.label, + '' + ].join( '' ) ); + + page.setAttribute( 'aria-labelledby', tabId ); + + // Take records for the tabs and elements created. + this._.tabs[ contents.id ] = [ tab, page ]; + this._.tabIdList.push( contents.id ); + !contents.hidden && this._.pageCount++; + this._.lastTab = tab; + this.updateStyle(); + + var contentMap = this._.contents[ contents.id ] = {}, + cursor, + children = vbox.getChild(); + + while ( ( cursor = children.shift() ) ) + { + contentMap[ cursor.id ] = cursor; + if ( typeof( cursor.getChild ) == 'function' ) + children.push.apply( children, cursor.getChild() ); + } + + // Attach the DOM nodes. + + page.setAttribute( 'name', contents.id ); + page.appendTo( this.parts.contents ); + + tab.unselectable(); + this.parts.tabs.append( tab ); + + // Add access key handlers if access key is defined. + if ( contents.accessKey ) + { + registerAccessKey( this, this, 'CTRL+' + contents.accessKey, + tabAccessKeyDown, tabAccessKeyUp ); + this._.accessKeyMap[ 'CTRL+' + contents.accessKey ] = contents.id; + } + }, + + /** + * Activates a tab page in the dialog by its id. + * @param {String} id The id of the dialog tab to be activated. + * @example + * dialogObj.selectPage( 'tab_1' ); + */ + selectPage : function( id ) + { + if ( this._.currentTabId == id ) + return; + + // Returning true means that the event has been canceled + if ( this.fire( 'selectPage', { page : id, currentPage : this._.currentTabId } ) === true ) + return; + + // Hide the non-selected tabs and pages. + for ( var i in this._.tabs ) + { + var tab = this._.tabs[i][0], + page = this._.tabs[i][1]; + if ( i != id ) + { + tab.removeClass( 'cke_dialog_tab_selected' ); + page.hide(); + } + page.setAttribute( 'aria-hidden', i != id ); + } + + var selected = this._.tabs[id]; + selected[0].addClass( 'cke_dialog_tab_selected' ); + + // [IE] a unvisible input[type='text'] will enlarge it's width + // if it's value is long when it show( #5649 ) + // so we clear it's value before it shows and then recover it + if ( CKEDITOR.env.ie6Compat || CKEDITOR.env.ie7Compat ) + { + clearOrRecoverTextInputValue( selected[1] ); + selected[1].show(); + setTimeout( function() + { + clearOrRecoverTextInputValue( selected[1], true ); + }, 0 ); + } + else + { + selected[1].show(); + } + + + this._.currentTabId = id; + this._.currentTabIndex = CKEDITOR.tools.indexOf( this._.tabIdList, id ); + }, + + // Dialog state-specific style updates. + updateStyle : function() + { + // If only a single page shown, a different style is used in the central pane. + this.parts.dialog[ ( this._.pageCount === 1 ? 'add' : 'remove' ) + 'Class' ]( 'cke_single_page' ); + }, + + /** + * Hides a page's tab away from the dialog. + * @param {String} id The page's Id. + * @example + * dialog.hidePage( 'tab_3' ); + */ + hidePage : function( id ) + { + var tab = this._.tabs[id] && this._.tabs[id][0]; + if ( !tab || this._.pageCount == 1 ) + return; + // Switch to other tab first when we're hiding the active tab. + else if ( id == this._.currentTabId ) + this.selectPage( getPreviousVisibleTab.call( this ) ); + + tab.hide(); + this._.pageCount--; + this.updateStyle(); + }, + + /** + * Unhides a page's tab. + * @param {String} id The page's Id. + * @example + * dialog.showPage( 'tab_2' ); + */ + showPage : function( id ) + { + var tab = this._.tabs[id] && this._.tabs[id][0]; + if ( !tab ) + return; + tab.show(); + this._.pageCount++; + this.updateStyle(); + }, + + /** + * Gets the root DOM element of the dialog. + * @returns {CKEDITOR.dom.element} The <span> element containing this dialog. + * @example + * var dialogElement = dialogObj.getElement().getFirst(); + * dialogElement.setStyle( 'padding', '5px' ); + */ + getElement : function() + { + return this._.element; + }, + + /** + * Gets the name of the dialog. + * @returns {String} The name of this dialog. + * @example + * var dialogName = dialogObj.getName(); + */ + getName : function() + { + return this._.name; + }, + + /** + * Gets a dialog UI element object from a dialog page. + * @param {String} pageId id of dialog page. + * @param {String} elementId id of UI element. + * @example + * @returns {CKEDITOR.ui.dialog.uiElement} The dialog UI element. + */ + getContentElement : function( pageId, elementId ) + { + var page = this._.contents[ pageId ]; + return page && page[ elementId ]; + }, + + /** + * Gets the value of a dialog UI element. + * @param {String} pageId id of dialog page. + * @param {String} elementId id of UI element. + * @example + * @returns {Object} The value of the UI element. + */ + getValueOf : function( pageId, elementId ) + { + return this.getContentElement( pageId, elementId ).getValue(); + }, + + /** + * Sets the value of a dialog UI element. + * @param {String} pageId id of the dialog page. + * @param {String} elementId id of the UI element. + * @param {Object} value The new value of the UI element. + * @example + */ + setValueOf : function( pageId, elementId, value ) + { + return this.getContentElement( pageId, elementId ).setValue( value ); + }, + + /** + * Gets the UI element of a button in the dialog's button row. + * @param {String} id The id of the button. + * @example + * @returns {CKEDITOR.ui.dialog.button} The button object. + */ + getButton : function( id ) + { + return this._.buttons[ id ]; + }, + + /** + * Simulates a click to a dialog button in the dialog's button row. + * @param {String} id The id of the button. + * @example + * @returns The return value of the dialog's "click" event. + */ + click : function( id ) + { + return this._.buttons[ id ].click(); + }, + + /** + * Disables a dialog button. + * @param {String} id The id of the button. + * @example + */ + disableButton : function( id ) + { + return this._.buttons[ id ].disable(); + }, + + /** + * Enables a dialog button. + * @param {String} id The id of the button. + * @example + */ + enableButton : function( id ) + { + return this._.buttons[ id ].enable(); + }, + + /** + * Gets the number of pages in the dialog. + * @returns {Number} Page count. + */ + getPageCount : function() + { + return this._.pageCount; + }, + + /** + * Gets the editor instance which opened this dialog. + * @returns {CKEDITOR.editor} Parent editor instances. + */ + getParentEditor : function() + { + return this._.editor; + }, + + /** + * Gets the element that was selected when opening the dialog, if any. + * @returns {CKEDITOR.dom.element} The element that was selected, or null. + */ + getSelectedElement : function() + { + return this.getParentEditor().getSelection().getSelectedElement(); + }, + + /** + * Adds element to dialog's focusable list. + * + * @param {CKEDITOR.dom.element} element + * @param {Number} [index] + */ + addFocusable: function( element, index ) { + if ( typeof index == 'undefined' ) + { + index = this._.focusList.length; + this._.focusList.push( new Focusable( this, element, index ) ); + } + else + { + this._.focusList.splice( index, 0, new Focusable( this, element, index ) ); + for ( var i = index + 1 ; i < this._.focusList.length ; i++ ) + this._.focusList[ i ].focusIndex++; + } + } + }; + + CKEDITOR.tools.extend( CKEDITOR.dialog, + /** + * @lends CKEDITOR.dialog + */ + { + /** + * Registers a dialog. + * @param {String} name The dialog's name. + * @param {Function|String} dialogDefinition + * A function returning the dialog's definition, or the URL to the .js file holding the function. + * The function should accept an argument "editor" which is the current editor instance, and + * return an object conforming to {@link CKEDITOR.dialog.dialogDefinition}. + * @example + * @see CKEDITOR.dialog.dialogDefinition + */ + add : function( name, dialogDefinition ) + { + // Avoid path registration from multiple instances override definition. + if ( !this._.dialogDefinitions[name] + || typeof dialogDefinition == 'function' ) + this._.dialogDefinitions[name] = dialogDefinition; + }, + + exists : function( name ) + { + return !!this._.dialogDefinitions[ name ]; + }, + + getCurrent : function() + { + return CKEDITOR.dialog._.currentTop; + }, + + /** + * The default OK button for dialogs. Fires the "ok" event and closes the dialog if the event succeeds. + * @static + * @field + * @example + * @type Function + */ + okButton : (function() + { + var retval = function( editor, override ) + { + override = override || {}; + return CKEDITOR.tools.extend( { + id : 'ok', + type : 'button', + label : editor.lang.common.ok, + 'class' : 'cke_dialog_ui_button_ok', + onClick : function( evt ) + { + var dialog = evt.data.dialog; + if ( dialog.fire( 'ok', { hide : true } ).hide !== false ) + dialog.hide(); + } + }, override, true ); + }; + retval.type = 'button'; + retval.override = function( override ) + { + return CKEDITOR.tools.extend( function( editor ){ return retval( editor, override ); }, + { type : 'button' }, true ); + }; + return retval; + })(), + + /** + * The default cancel button for dialogs. Fires the "cancel" event and closes the dialog if no UI element value changed. + * @static + * @field + * @example + * @type Function + */ + cancelButton : (function() + { + var retval = function( editor, override ) + { + override = override || {}; + return CKEDITOR.tools.extend( { + id : 'cancel', + type : 'button', + label : editor.lang.common.cancel, + 'class' : 'cke_dialog_ui_button_cancel', + onClick : function( evt ) + { + var dialog = evt.data.dialog; + if ( dialog.fire( 'cancel', { hide : true } ).hide !== false ) + dialog.hide(); + } + }, override, true ); + }; + retval.type = 'button'; + retval.override = function( override ) + { + return CKEDITOR.tools.extend( function( editor ){ return retval( editor, override ); }, + { type : 'button' }, true ); + }; + return retval; + })(), + + /** + * Registers a dialog UI element. + * @param {String} typeName The name of the UI element. + * @param {Function} builder The function to build the UI element. + * @example + */ + addUIElement : function( typeName, builder ) + { + this._.uiElementBuilders[ typeName ] = builder; + } + }); + + CKEDITOR.dialog._ = + { + uiElementBuilders : {}, + + dialogDefinitions : {}, + + currentTop : null, + + currentZIndex : null + }; + + // "Inherit" (copy actually) from CKEDITOR.event. + CKEDITOR.event.implementOn( CKEDITOR.dialog ); + CKEDITOR.event.implementOn( CKEDITOR.dialog.prototype, true ); + + var defaultDialogDefinition = + { + resizable : CKEDITOR.DIALOG_RESIZE_BOTH, + minWidth : 600, + minHeight : 400, + buttons : [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ] + }; + + // The buttons in MacOS Apps are in reverse order #4750 + CKEDITOR.env.mac && defaultDialogDefinition.buttons.reverse(); + + // Tool function used to return an item from an array based on its id + // property. + var getById = function( array, id, recurse ) + { + for ( var i = 0, item ; ( item = array[ i ] ) ; i++ ) + { + if ( item.id == id ) + return item; + if ( recurse && item[ recurse ] ) + { + var retval = getById( item[ recurse ], id, recurse ) ; + if ( retval ) + return retval; + } + } + return null; + }; + + // Tool function used to add an item into an array. + var addById = function( array, newItem, nextSiblingId, recurse, nullIfNotFound ) + { + if ( nextSiblingId ) + { + for ( var i = 0, item ; ( item = array[ i ] ) ; i++ ) + { + if ( item.id == nextSiblingId ) + { + array.splice( i, 0, newItem ); + return newItem; + } + + if ( recurse && item[ recurse ] ) + { + var retval = addById( item[ recurse ], newItem, nextSiblingId, recurse, true ); + if ( retval ) + return retval; + } + } + + if ( nullIfNotFound ) + return null; + } + + array.push( newItem ); + return newItem; + }; + + // Tool function used to remove an item from an array based on its id. + var removeById = function( array, id, recurse ) + { + for ( var i = 0, item ; ( item = array[ i ] ) ; i++ ) + { + if ( item.id == id ) + return array.splice( i, 1 ); + if ( recurse && item[ recurse ] ) + { + var retval = removeById( item[ recurse ], id, recurse ); + if ( retval ) + return retval; + } + } + return null; + }; + + /** + * This class is not really part of the API. It is the "definition" property value + * passed to "dialogDefinition" event handlers. + * @constructor + * @name CKEDITOR.dialog.dialogDefinitionObject + * @extends CKEDITOR.dialog.dialogDefinition + * @example + * CKEDITOR.on( 'dialogDefinition', function( evt ) + * { + * var definition = evt.data.definition; + * var content = definition.getContents( 'page1' ); + * ... + * } ); + */ + var definitionObject = function( dialog, dialogDefinition ) + { + // TODO : Check if needed. + this.dialog = dialog; + + // Transform the contents entries in contentObjects. + var contents = dialogDefinition.contents; + for ( var i = 0, content ; ( content = contents[i] ) ; i++ ) + contents[ i ] = content && new contentObject( dialog, content ); + + CKEDITOR.tools.extend( this, dialogDefinition ); + }; + + definitionObject.prototype = + /** @lends CKEDITOR.dialog.dialogDefinitionObject.prototype */ + { + /** + * Gets a content definition. + * @param {String} id The id of the content definition. + * @returns {CKEDITOR.dialog.contentDefinition} The content definition + * matching id. + */ + getContents : function( id ) + { + return getById( this.contents, id ); + }, + + /** + * Gets a button definition. + * @param {String} id The id of the button definition. + * @returns {CKEDITOR.dialog.buttonDefinition} The button definition + * matching id. + */ + getButton : function( id ) + { + return getById( this.buttons, id ); + }, + + /** + * Adds a content definition object under this dialog definition. + * @param {CKEDITOR.dialog.contentDefinition} contentDefinition The + * content definition. + * @param {String} [nextSiblingId] The id of an existing content + * definition which the new content definition will be inserted + * before. Omit if the new content definition is to be inserted as + * the last item. + * @returns {CKEDITOR.dialog.contentDefinition} The inserted content + * definition. + */ + addContents : function( contentDefinition, nextSiblingId ) + { + return addById( this.contents, contentDefinition, nextSiblingId ); + }, + + /** + * Adds a button definition object under this dialog definition. + * @param {CKEDITOR.dialog.buttonDefinition} buttonDefinition The + * button definition. + * @param {String} [nextSiblingId] The id of an existing button + * definition which the new button definition will be inserted + * before. Omit if the new button definition is to be inserted as + * the last item. + * @returns {CKEDITOR.dialog.buttonDefinition} The inserted button + * definition. + */ + addButton : function( buttonDefinition, nextSiblingId ) + { + return addById( this.buttons, buttonDefinition, nextSiblingId ); + }, + + /** + * Removes a content definition from this dialog definition. + * @param {String} id The id of the content definition to be removed. + * @returns {CKEDITOR.dialog.contentDefinition} The removed content + * definition. + */ + removeContents : function( id ) + { + removeById( this.contents, id ); + }, + + /** + * Removes a button definition from the dialog definition. + * @param {String} id The id of the button definition to be removed. + * @returns {CKEDITOR.dialog.buttonDefinition} The removed button + * definition. + */ + removeButton : function( id ) + { + removeById( this.buttons, id ); + } + }; + + /** + * This class is not really part of the API. It is the template of the + * objects representing content pages inside the + * CKEDITOR.dialog.dialogDefinitionObject. + * @constructor + * @name CKEDITOR.dialog.contentDefinitionObject + * @example + * CKEDITOR.on( 'dialogDefinition', function( evt ) + * { + * var definition = evt.data.definition; + * var content = definition.getContents( 'page1' ); + * content.remove( 'textInput1' ); + * ... + * } ); + */ + function contentObject( dialog, contentDefinition ) + { + this._ = + { + dialog : dialog + }; + + CKEDITOR.tools.extend( this, contentDefinition ); + } + + contentObject.prototype = + /** @lends CKEDITOR.dialog.contentDefinitionObject.prototype */ + { + /** + * Gets a UI element definition under the content definition. + * @param {String} id The id of the UI element definition. + * @returns {CKEDITOR.dialog.uiElementDefinition} + */ + get : function( id ) + { + return getById( this.elements, id, 'children' ); + }, + + /** + * Adds a UI element definition to the content definition. + * @param {CKEDITOR.dialog.uiElementDefinition} elementDefinition The + * UI elemnet definition to be added. + * @param {String} nextSiblingId The id of an existing UI element + * definition which the new UI element definition will be inserted + * before. Omit if the new button definition is to be inserted as + * the last item. + * @returns {CKEDITOR.dialog.uiElementDefinition} The element + * definition inserted. + */ + add : function( elementDefinition, nextSiblingId ) + { + return addById( this.elements, elementDefinition, nextSiblingId, 'children' ); + }, + + /** + * Removes a UI element definition from the content definition. + * @param {String} id The id of the UI element definition to be + * removed. + * @returns {CKEDITOR.dialog.uiElementDefinition} The element + * definition removed. + * @example + */ + remove : function( id ) + { + removeById( this.elements, id, 'children' ); + } + }; + + function initDragAndDrop( dialog ) + { + var lastCoords = null, + abstractDialogCoords = null, + element = dialog.getElement().getFirst(), + editor = dialog.getParentEditor(), + magnetDistance = editor.config.dialog_magnetDistance, + margins = editor.skin.margins || [ 0, 0, 0, 0 ]; + + if ( typeof magnetDistance == 'undefined' ) + magnetDistance = 20; + + function mouseMoveHandler( evt ) + { + var dialogSize = dialog.getSize(), + viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize(), + x = evt.data.$.screenX, + y = evt.data.$.screenY, + dx = x - lastCoords.x, + dy = y - lastCoords.y, + realX, realY; + + lastCoords = { x : x, y : y }; + abstractDialogCoords.x += dx; + abstractDialogCoords.y += dy; + + if ( abstractDialogCoords.x + margins[3] < magnetDistance ) + realX = - margins[3]; + else if ( abstractDialogCoords.x - margins[1] > viewPaneSize.width - dialogSize.width - magnetDistance ) + realX = viewPaneSize.width - dialogSize.width + margins[1]; + else + realX = abstractDialogCoords.x; + + if ( abstractDialogCoords.y + margins[0] < magnetDistance ) + realY = - margins[0]; + else if ( abstractDialogCoords.y - margins[2] > viewPaneSize.height - dialogSize.height - magnetDistance ) + realY = viewPaneSize.height - dialogSize.height + margins[2]; + else + realY = abstractDialogCoords.y; + + dialog.move( realX, realY ); + + evt.data.preventDefault(); + } + + function mouseUpHandler( evt ) + { + CKEDITOR.document.removeListener( 'mousemove', mouseMoveHandler ); + CKEDITOR.document.removeListener( 'mouseup', mouseUpHandler ); + + if ( CKEDITOR.env.ie6Compat ) + { + var coverDoc = currentCover.getChild( 0 ).getFrameDocument(); + coverDoc.removeListener( 'mousemove', mouseMoveHandler ); + coverDoc.removeListener( 'mouseup', mouseUpHandler ); + } + } + + dialog.parts.title.on( 'mousedown', function( evt ) + { + dialog._.updateSize = true; + + lastCoords = { x : evt.data.$.screenX, y : evt.data.$.screenY }; + + CKEDITOR.document.on( 'mousemove', mouseMoveHandler ); + CKEDITOR.document.on( 'mouseup', mouseUpHandler ); + abstractDialogCoords = dialog.getPosition(); + + if ( CKEDITOR.env.ie6Compat ) + { + var coverDoc = currentCover.getChild( 0 ).getFrameDocument(); + coverDoc.on( 'mousemove', mouseMoveHandler ); + coverDoc.on( 'mouseup', mouseUpHandler ); + } + + evt.data.preventDefault(); + }, dialog ); + } + + function initResizeHandles( dialog ) + { + var definition = dialog.definition, + minWidth = definition.minWidth || 0, + minHeight = definition.minHeight || 0, + resizable = definition.resizable, + margins = dialog.getParentEditor().skin.margins || [ 0, 0, 0, 0 ]; + + function topSizer( coords, dy ) + { + coords.y += dy; + } + + function rightSizer( coords, dx ) + { + coords.x2 += dx; + } + + function bottomSizer( coords, dy ) + { + coords.y2 += dy; + } + + function leftSizer( coords, dx ) + { + coords.x += dx; + } + + var lastCoords = null, + abstractDialogCoords = null, + magnetDistance = dialog._.editor.config.magnetDistance, + parts = [ 'tl', 't', 'tr', 'l', 'r', 'bl', 'b', 'br' ]; + + function mouseDownHandler( evt ) + { + var partName = evt.listenerData.part, size = dialog.getSize(); + abstractDialogCoords = dialog.getPosition(); + CKEDITOR.tools.extend( abstractDialogCoords, + { + x2 : abstractDialogCoords.x + size.width, + y2 : abstractDialogCoords.y + size.height + } ); + lastCoords = { x : evt.data.$.screenX, y : evt.data.$.screenY }; + + CKEDITOR.document.on( 'mousemove', mouseMoveHandler, dialog, { part : partName } ); + CKEDITOR.document.on( 'mouseup', mouseUpHandler, dialog, { part : partName } ); + + if ( CKEDITOR.env.ie6Compat ) + { + var coverDoc = currentCover.getChild( 0 ).getFrameDocument(); + coverDoc.on( 'mousemove', mouseMoveHandler, dialog, { part : partName } ); + coverDoc.on( 'mouseup', mouseUpHandler, dialog, { part : partName } ); + } + + evt.data.preventDefault(); + } + + function mouseMoveHandler( evt ) + { + var x = evt.data.$.screenX, + y = evt.data.$.screenY, + dx = x - lastCoords.x, + dy = y - lastCoords.y, + viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize(), + partName = evt.listenerData.part; + + if ( partName.search( 't' ) != -1 ) + topSizer( abstractDialogCoords, dy ); + if ( partName.search( 'l' ) != -1 ) + leftSizer( abstractDialogCoords, dx ); + if ( partName.search( 'b' ) != -1 ) + bottomSizer( abstractDialogCoords, dy ); + if ( partName.search( 'r' ) != -1 ) + rightSizer( abstractDialogCoords, dx ); + + lastCoords = { x : x, y : y }; + + var realX, realY, realX2, realY2; + + if ( abstractDialogCoords.x + margins[3] < magnetDistance ) + realX = - margins[3]; + else if ( partName.search( 'l' ) != -1 && abstractDialogCoords.x2 - abstractDialogCoords.x < minWidth + magnetDistance ) + realX = abstractDialogCoords.x2 - minWidth; + else + realX = abstractDialogCoords.x; + + if ( abstractDialogCoords.y + margins[0] < magnetDistance ) + realY = - margins[0]; + else if ( partName.search( 't' ) != -1 && abstractDialogCoords.y2 - abstractDialogCoords.y < minHeight + magnetDistance ) + realY = abstractDialogCoords.y2 - minHeight; + else + realY = abstractDialogCoords.y; + + if ( abstractDialogCoords.x2 - margins[1] > viewPaneSize.width - magnetDistance ) + realX2 = viewPaneSize.width + margins[1] ; + else if ( partName.search( 'r' ) != -1 && abstractDialogCoords.x2 - abstractDialogCoords.x < minWidth + magnetDistance ) + realX2 = abstractDialogCoords.x + minWidth; + else + realX2 = abstractDialogCoords.x2; + + if ( abstractDialogCoords.y2 - margins[2] > viewPaneSize.height - magnetDistance ) + realY2= viewPaneSize.height + margins[2] ; + else if ( partName.search( 'b' ) != -1 && abstractDialogCoords.y2 - abstractDialogCoords.y < minHeight + magnetDistance ) + realY2 = abstractDialogCoords.y + minHeight; + else + realY2 = abstractDialogCoords.y2 ; + + dialog.move( realX, realY ); + dialog.resize( realX2 - realX, realY2 - realY ); + + evt.data.preventDefault(); + } + + function mouseUpHandler( evt ) + { + CKEDITOR.document.removeListener( 'mouseup', mouseUpHandler ); + CKEDITOR.document.removeListener( 'mousemove', mouseMoveHandler ); + + if ( CKEDITOR.env.ie6Compat ) + { + var coverDoc = currentCover.getChild( 0 ).getFrameDocument(); + coverDoc.removeListener( 'mouseup', mouseUpHandler ); + coverDoc.removeListener( 'mousemove', mouseMoveHandler ); + } + } + +// TODO : Simplify the resize logic, having just a single resize grip
      . +// var widthTest = /[lr]/, +// heightTest = /[tb]/; +// for ( var i = 0 ; i < parts.length ; i++ ) +// { +// var element = dialog.parts[ parts[i] + '_resize' ]; +// if ( resizable == CKEDITOR.DIALOG_RESIZE_NONE || +// resizable == CKEDITOR.DIALOG_RESIZE_HEIGHT && widthTest.test( parts[i] ) || +// resizable == CKEDITOR.DIALOG_RESIZE_WIDTH && heightTest.test( parts[i] ) ) +// { +// element.hide(); +// continue; +// } +// element.on( 'mousedown', mouseDownHandler, dialog, { part : parts[i] } ); +// } + } + + var resizeCover; + // Caching resuable covers and allowing only one cover + // on screen. + var covers = {}, + currentCover; + + function showCover( editor ) + { + var win = CKEDITOR.document.getWindow(); + var backgroundColorStyle = editor.config.dialog_backgroundCoverColor || 'white', + backgroundCoverOpacity = editor.config.dialog_backgroundCoverOpacity, + baseFloatZIndex = editor.config.baseFloatZIndex, + coverKey = CKEDITOR.tools.genKey( + backgroundColorStyle, + backgroundCoverOpacity, + baseFloatZIndex ), + coverElement = covers[ coverKey ]; + + if ( !coverElement ) + { + var html = [ + '
      ' + ]; + + if ( CKEDITOR.env.ie6Compat ) + { + // Support for custom document.domain in IE. + var isCustomDomain = CKEDITOR.env.isCustomDomain(), + iframeHtml = ''; + + html.push( + '' + + '' ); + } + + html.push( '
      ' ); + + coverElement = CKEDITOR.dom.element.createFromHtml( html.join( '' ) ); + coverElement.setOpacity( backgroundCoverOpacity != undefined ? backgroundCoverOpacity : 0.5 ); + + coverElement.appendTo( CKEDITOR.document.getBody() ); + covers[ coverKey ] = coverElement; + } + else + coverElement. show(); + + currentCover = coverElement; + var resizeFunc = function() + { + var size = win.getViewPaneSize(); + coverElement.setStyles( + { + width : size.width + 'px', + height : size.height + 'px' + } ); + }; + + var scrollFunc = function() + { + var pos = win.getScrollPosition(), + cursor = CKEDITOR.dialog._.currentTop; + coverElement.setStyles( + { + left : pos.x + 'px', + top : pos.y + 'px' + }); + + do + { + var dialogPos = cursor.getPosition(); + cursor.move( dialogPos.x, dialogPos.y ); + } while ( ( cursor = cursor._.parentDialog ) ); + }; + + resizeCover = resizeFunc; + win.on( 'resize', resizeFunc ); + resizeFunc(); + if ( CKEDITOR.env.ie6Compat ) + { + // IE BUG: win.$.onscroll assignment doesn't work.. it must be window.onscroll. + // So we need to invent a really funny way to make it work. + var myScrollHandler = function() + { + scrollFunc(); + arguments.callee.prevScrollHandler.apply( this, arguments ); + }; + win.$.setTimeout( function() + { + myScrollHandler.prevScrollHandler = window.onscroll || function(){}; + window.onscroll = myScrollHandler; + }, 0 ); + scrollFunc(); + } + } + + function hideCover() + { + if ( !currentCover ) + return; + + var win = CKEDITOR.document.getWindow(); + currentCover.hide(); + win.removeListener( 'resize', resizeCover ); + + if ( CKEDITOR.env.ie6Compat ) + { + win.$.setTimeout( function() + { + var prevScrollHandler = window.onscroll && window.onscroll.prevScrollHandler; + window.onscroll = prevScrollHandler || null; + }, 0 ); + } + resizeCover = null; + } + + function removeCovers() + { + for ( var coverId in covers ) + covers[ coverId ].remove(); + covers = {}; + } + + var accessKeyProcessors = {}; + + var accessKeyDownHandler = function( evt ) + { + var ctrl = evt.data.$.ctrlKey || evt.data.$.metaKey, + alt = evt.data.$.altKey, + shift = evt.data.$.shiftKey, + key = String.fromCharCode( evt.data.$.keyCode ), + keyProcessor = accessKeyProcessors[( ctrl ? 'CTRL+' : '' ) + ( alt ? 'ALT+' : '') + ( shift ? 'SHIFT+' : '' ) + key]; + + if ( !keyProcessor || !keyProcessor.length ) + return; + + keyProcessor = keyProcessor[keyProcessor.length - 1]; + keyProcessor.keydown && keyProcessor.keydown.call( keyProcessor.uiElement, keyProcessor.dialog, keyProcessor.key ); + evt.data.preventDefault(); + }; + + var accessKeyUpHandler = function( evt ) + { + var ctrl = evt.data.$.ctrlKey || evt.data.$.metaKey, + alt = evt.data.$.altKey, + shift = evt.data.$.shiftKey, + key = String.fromCharCode( evt.data.$.keyCode ), + keyProcessor = accessKeyProcessors[( ctrl ? 'CTRL+' : '' ) + ( alt ? 'ALT+' : '') + ( shift ? 'SHIFT+' : '' ) + key]; + + if ( !keyProcessor || !keyProcessor.length ) + return; + + keyProcessor = keyProcessor[keyProcessor.length - 1]; + if ( keyProcessor.keyup ) + { + keyProcessor.keyup.call( keyProcessor.uiElement, keyProcessor.dialog, keyProcessor.key ); + evt.data.preventDefault(); + } + }; + + var registerAccessKey = function( uiElement, dialog, key, downFunc, upFunc ) + { + var procList = accessKeyProcessors[key] || ( accessKeyProcessors[key] = [] ); + procList.push( { + uiElement : uiElement, + dialog : dialog, + key : key, + keyup : upFunc || uiElement.accessKeyUp, + keydown : downFunc || uiElement.accessKeyDown + } ); + }; + + var unregisterAccessKey = function( obj ) + { + for ( var i in accessKeyProcessors ) + { + var list = accessKeyProcessors[i]; + for ( var j = list.length - 1 ; j >= 0 ; j-- ) + { + if ( list[j].dialog == obj || list[j].uiElement == obj ) + list.splice( j, 1 ); + } + if ( list.length === 0 ) + delete accessKeyProcessors[i]; + } + }; + + var tabAccessKeyUp = function( dialog, key ) + { + if ( dialog._.accessKeyMap[key] ) + dialog.selectPage( dialog._.accessKeyMap[key] ); + }; + + var tabAccessKeyDown = function( dialog, key ) + { + }; + + // ESC, ENTER + var preventKeyBubblingKeys = { 27 :1, 13 :1 }; + var preventKeyBubbling = function( e ) + { + if ( e.data.getKeystroke() in preventKeyBubblingKeys ) + e.data.stopPropagation(); + }; + + (function() + { + CKEDITOR.ui.dialog = + { + /** + * The base class of all dialog UI elements. + * @constructor + * @param {CKEDITOR.dialog} dialog Parent dialog object. + * @param {CKEDITOR.dialog.uiElementDefinition} elementDefinition Element + * definition. Accepted fields: + *
        + *
      • id (Required) The id of the UI element. See {@link + * CKEDITOR.dialog#getContentElement}
      • + *
      • type (Required) The type of the UI element. The + * value to this field specifies which UI element class will be used to + * generate the final widget.
      • + *
      • title (Optional) The popup tooltip for the UI + * element.
      • + *
      • hidden (Optional) A flag that tells if the element + * should be initially visible.
      • + *
      • className (Optional) Additional CSS class names + * to add to the UI element. Separated by space.
      • + *
      • style (Optional) Additional CSS inline styles + * to add to the UI element. A semicolon (;) is required after the last + * style declaration.
      • + *
      • accessKey (Optional) The alphanumeric access key + * for this element. Access keys are automatically prefixed by CTRL.
      • + *
      • on* (Optional) Any UI element definition field that + * starts with on followed immediately by a capital letter and + * probably more letters is an event handler. Event handlers may be further + * divided into registered event handlers and DOM event handlers. Please + * refer to {@link CKEDITOR.ui.dialog.uiElement#registerEvents} and + * {@link CKEDITOR.ui.dialog.uiElement#eventProcessors} for more + * information.
      • + *
      + * @param {Array} htmlList + * List of HTML code to be added to the dialog's content area. + * @param {Function|String} nodeNameArg + * A function returning a string, or a simple string for the node name for + * the root DOM node. Default is 'div'. + * @param {Function|Object} stylesArg + * A function returning an object, or a simple object for CSS styles applied + * to the DOM node. Default is empty object. + * @param {Function|Object} attributesArg + * A fucntion returning an object, or a simple object for attributes applied + * to the DOM node. Default is empty object. + * @param {Function|String} contentsArg + * A function returning a string, or a simple string for the HTML code inside + * the root DOM node. Default is empty string. + * @example + */ + uiElement : function( dialog, elementDefinition, htmlList, nodeNameArg, stylesArg, attributesArg, contentsArg ) + { + if ( arguments.length < 4 ) + return; + + var nodeName = ( nodeNameArg.call ? nodeNameArg( elementDefinition ) : nodeNameArg ) || 'div', + html = [ '<', nodeName, ' ' ], + styles = ( stylesArg && stylesArg.call ? stylesArg( elementDefinition ) : stylesArg ) || {}, + attributes = ( attributesArg && attributesArg.call ? attributesArg( elementDefinition ) : attributesArg ) || {}, + innerHTML = ( contentsArg && contentsArg.call ? contentsArg.call( this, dialog, elementDefinition ) : contentsArg ) || '', + domId = this.domId = attributes.id || CKEDITOR.tools.getNextId() + '_uiElement', + id = this.id = elementDefinition.id, + i; + + // Set the id, a unique id is required for getElement() to work. + attributes.id = domId; + + // Set the type and definition CSS class names. + var classes = {}; + if ( elementDefinition.type ) + classes[ 'cke_dialog_ui_' + elementDefinition.type ] = 1; + if ( elementDefinition.className ) + classes[ elementDefinition.className ] = 1; + var attributeClasses = ( attributes['class'] && attributes['class'].split ) ? attributes['class'].split( ' ' ) : []; + for ( i = 0 ; i < attributeClasses.length ; i++ ) + { + if ( attributeClasses[i] ) + classes[ attributeClasses[i] ] = 1; + } + var finalClasses = []; + for ( i in classes ) + finalClasses.push( i ); + attributes['class'] = finalClasses.join( ' ' ); + + // Set the popup tooltop. + if ( elementDefinition.title ) + attributes.title = elementDefinition.title; + + // Write the inline CSS styles. + var styleStr = ( elementDefinition.style || '' ).split( ';' ); + for ( i in styles ) + styleStr.push( i + ':' + styles[i] ); + if ( elementDefinition.hidden ) + styleStr.push( 'display:none' ); + for ( i = styleStr.length - 1 ; i >= 0 ; i-- ) + { + if ( styleStr[i] === '' ) + styleStr.splice( i, 1 ); + } + if ( styleStr.length > 0 ) + attributes.style = ( attributes.style ? ( attributes.style + '; ' ) : '' ) + styleStr.join( '; ' ); + + // Write the attributes. + for ( i in attributes ) + html.push( i + '="' + CKEDITOR.tools.htmlEncode( attributes[i] ) + '" '); + + // Write the content HTML. + html.push( '>', innerHTML, '' ); + + // Add contents to the parent HTML array. + htmlList.push( html.join( '' ) ); + + ( this._ || ( this._ = {} ) ).dialog = dialog; + + // Override isChanged if it is defined in element definition. + if ( typeof( elementDefinition.isChanged ) == 'boolean' ) + this.isChanged = function(){ return elementDefinition.isChanged; }; + if ( typeof( elementDefinition.isChanged ) == 'function' ) + this.isChanged = elementDefinition.isChanged; + + // Add events. + CKEDITOR.event.implementOn( this ); + + this.registerEvents( elementDefinition ); + if ( this.accessKeyUp && this.accessKeyDown && elementDefinition.accessKey ) + registerAccessKey( this, dialog, 'CTRL+' + elementDefinition.accessKey ); + + var me = this; + dialog.on( 'load', function() + { + if ( me.getInputElement() ) + { + me.getInputElement().on( 'focus', function() + { + dialog._.tabBarMode = false; + dialog._.hasFocus = true; + me.fire( 'focus' ); + }, me ); + } + } ); + + // Register the object as a tab focus if it can be included. + if ( this.keyboardFocusable ) + { + this.tabIndex = elementDefinition.tabIndex || 0; + + this.focusIndex = dialog._.focusList.push( this ) - 1; + this.on( 'focus', function() + { + dialog._.currentFocusIndex = me.focusIndex; + } ); + } + + // Completes this object with everything we have in the + // definition. + CKEDITOR.tools.extend( this, elementDefinition ); + }, + + /** + * Horizontal layout box for dialog UI elements, auto-expends to available width of container. + * @constructor + * @extends CKEDITOR.ui.dialog.uiElement + * @param {CKEDITOR.dialog} dialog + * Parent dialog object. + * @param {Array} childObjList + * Array of {@link CKEDITOR.ui.dialog.uiElement} objects inside this + * container. + * @param {Array} childHtmlList + * Array of HTML code that correspond to the HTML output of all the + * objects in childObjList. + * @param {Array} htmlList + * Array of HTML code that this element will output to. + * @param {CKEDITOR.dialog.uiElementDefinition} elementDefinition + * The element definition. Accepted fields: + *
        + *
      • widths (Optional) The widths of child cells.
      • + *
      • height (Optional) The height of the layout.
      • + *
      • padding (Optional) The padding width inside child + * cells.
      • + *
      • align (Optional) The alignment of the whole layout + *
      • + *
      + * @example + */ + hbox : function( dialog, childObjList, childHtmlList, htmlList, elementDefinition ) + { + if ( arguments.length < 4 ) + return; + + this._ || ( this._ = {} ); + + var children = this._.children = childObjList, + widths = elementDefinition && elementDefinition.widths || null, + height = elementDefinition && elementDefinition.height || null, + styles = {}, + i; + /** @ignore */ + var innerHTML = function() + { + var html = [ '' ]; + for ( i = 0 ; i < childHtmlList.length ; i++ ) + { + var className = 'cke_dialog_ui_hbox_child', + styles = []; + if ( i === 0 ) + className = 'cke_dialog_ui_hbox_first'; + if ( i == childHtmlList.length - 1 ) + className = 'cke_dialog_ui_hbox_last'; + html.push( ' 0 ) + html.push( 'style="' + styles.join('; ') + '" ' ); + html.push( '>', childHtmlList[i], '' ); + } + html.push( '' ); + return html.join( '' ); + }; + + var attribs = { role : 'presentation' }; + elementDefinition && elementDefinition.align && ( attribs.align = elementDefinition.align ); + + CKEDITOR.ui.dialog.uiElement.call( + this, + dialog, + elementDefinition || { type : 'hbox' }, + htmlList, + 'table', + styles, + attribs, + innerHTML ); + }, + + /** + * Vertical layout box for dialog UI elements. + * @constructor + * @extends CKEDITOR.ui.dialog.hbox + * @param {CKEDITOR.dialog} dialog + * Parent dialog object. + * @param {Array} childObjList + * Array of {@link CKEDITOR.ui.dialog.uiElement} objects inside this + * container. + * @param {Array} childHtmlList + * Array of HTML code that correspond to the HTML output of all the + * objects in childObjList. + * @param {Array} htmlList + * Array of HTML code that this element will output to. + * @param {CKEDITOR.dialog.uiElementDefinition} elementDefinition + * The element definition. Accepted fields: + *
        + *
      • width (Optional) The width of the layout.
      • + *
      • heights (Optional) The heights of individual cells. + *
      • + *
      • align (Optional) The alignment of the layout.
      • + *
      • padding (Optional) The padding width inside child + * cells.
      • + *
      • expand (Optional) Whether the layout should expand + * vertically to fill its container.
      • + *
      + * @example + */ + vbox : function( dialog, childObjList, childHtmlList, htmlList, elementDefinition ) + { + if (arguments.length < 3 ) + return; + + this._ || ( this._ = {} ); + + var children = this._.children = childObjList, + width = elementDefinition && elementDefinition.width || null, + heights = elementDefinition && elementDefinition.heights || null; + /** @ignore */ + var innerHTML = function() + { + var html = [ '' ); + for ( var i = 0 ; i < childHtmlList.length ; i++ ) + { + var styles = []; + html.push( '' ); + } + html.push( '
      0 ) + html.push( 'style="', styles.join( '; ' ), '" ' ); + html.push( ' class="cke_dialog_ui_vbox_child">', childHtmlList[i], '
      ' ); + return html.join( '' ); + }; + CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition || { type : 'vbox' }, htmlList, 'div', null, { role : 'presentation' }, innerHTML ); + } + }; + })(); + + CKEDITOR.ui.dialog.uiElement.prototype = + { + /** + * Gets the root DOM element of this dialog UI object. + * @returns {CKEDITOR.dom.element} Root DOM element of UI object. + * @example + * uiElement.getElement().hide(); + */ + getElement : function() + { + return CKEDITOR.document.getById( this.domId ); + }, + + /** + * Gets the DOM element that the user inputs values. + * This function is used by setValue(), getValue() and focus(). It should + * be overrided in child classes where the input element isn't the root + * element. + * @returns {CKEDITOR.dom.element} The element where the user input values. + * @example + * var rawValue = textInput.getInputElement().$.value; + */ + getInputElement : function() + { + return this.getElement(); + }, + + /** + * Gets the parent dialog object containing this UI element. + * @returns {CKEDITOR.dialog} Parent dialog object. + * @example + * var dialog = uiElement.getDialog(); + */ + getDialog : function() + { + return this._.dialog; + }, + + /** + * Sets the value of this dialog UI object. + * @param {Object} value The new value. + * @param {Boolean} noChangeEvent Internal commit, to supress 'change' event on this element. + * @returns {CKEDITOR.dialog.uiElement} The current UI element. + * @example + * uiElement.setValue( 'Dingo' ); + */ + setValue : function( value, noChangeEvent ) + { + this.getInputElement().setValue( value ); + !noChangeEvent && this.fire( 'change', { value : value } ); + return this; + }, + + /** + * Gets the current value of this dialog UI object. + * @returns {Object} The current value. + * @example + * var myValue = uiElement.getValue(); + */ + getValue : function() + { + return this.getInputElement().getValue(); + }, + + /** + * Tells whether the UI object's value has changed. + * @returns {Boolean} true if changed, false if not changed. + * @example + * if ( uiElement.isChanged() ) + *   confirm( 'Value changed! Continue?' ); + */ + isChanged : function() + { + // Override in input classes. + return false; + }, + + /** + * Selects the parent tab of this element. Usually called by focus() or overridden focus() methods. + * @returns {CKEDITOR.dialog.uiElement} The current UI element. + * @example + * focus : function() + * { + * this.selectParentTab(); + * // do something else. + * } + */ + selectParentTab : function() + { + var element = this.getInputElement(), + cursor = element, + tabId; + while ( ( cursor = cursor.getParent() ) && cursor.$.className.search( 'cke_dialog_page_contents' ) == -1 ) + { /*jsl:pass*/ } + + // Some widgets don't have parent tabs (e.g. OK and Cancel buttons). + if ( !cursor ) + return this; + + tabId = cursor.getAttribute( 'name' ); + // Avoid duplicate select. + if ( this._.dialog._.currentTabId != tabId ) + this._.dialog.selectPage( tabId ); + return this; + }, + + /** + * Puts the focus to the UI object. Switches tabs if the UI object isn't in the active tab page. + * @returns {CKEDITOR.dialog.uiElement} The current UI element. + * @example + * uiElement.focus(); + */ + focus : function() + { + this.selectParentTab().getInputElement().focus(); + return this; + }, + + /** + * Registers the on* event handlers defined in the element definition. + * The default behavior of this function is: + *
        + *
      1. + * If the on* event is defined in the class's eventProcesors list, + * then the registration is delegated to the corresponding function + * in the eventProcessors list. + *
      2. + *
      3. + * If the on* event is not defined in the eventProcessors list, then + * register the event handler under the corresponding DOM event of + * the UI element's input DOM element (as defined by the return value + * of {@link CKEDITOR.ui.dialog.uiElement#getInputElement}). + *
      4. + *
      + * This function is only called at UI element instantiation, but can + * be overridded in child classes if they require more flexibility. + * @param {CKEDITOR.dialog.uiElementDefinition} definition The UI element + * definition. + * @returns {CKEDITOR.dialog.uiElement} The current UI element. + * @example + */ + registerEvents : function( definition ) + { + var regex = /^on([A-Z]\w+)/, + match; + + var registerDomEvent = function( uiElement, dialog, eventName, func ) + { + dialog.on( 'load', function() + { + uiElement.getInputElement().on( eventName, func, uiElement ); + }); + }; + + for ( var i in definition ) + { + if ( !( match = i.match( regex ) ) ) + continue; + if ( this.eventProcessors[i] ) + this.eventProcessors[i].call( this, this._.dialog, definition[i] ); + else + registerDomEvent( this, this._.dialog, match[1].toLowerCase(), definition[i] ); + } + + return this; + }, + + /** + * The event processor list used by + * {@link CKEDITOR.ui.dialog.uiElement#getInputElement} at UI element + * instantiation. The default list defines three on* events: + *
        + *
      1. onLoad - Called when the element's parent dialog opens for the + * first time
      2. + *
      3. onShow - Called whenever the element's parent dialog opens.
      4. + *
      5. onHide - Called whenever the element's parent dialog closes.
      6. + *
      + * @field + * @type Object + * @example + * // This connects the 'click' event in CKEDITOR.ui.dialog.button to onClick + * // handlers in the UI element's definitions. + * CKEDITOR.ui.dialog.button.eventProcessors = CKEDITOR.tools.extend( {}, + *   CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors, + *   { onClick : function( dialog, func ) { this.on( 'click', func ); } }, + *   true ); + */ + eventProcessors : + { + onLoad : function( dialog, func ) + { + dialog.on( 'load', func, this ); + }, + + onShow : function( dialog, func ) + { + dialog.on( 'show', func, this ); + }, + + onHide : function( dialog, func ) + { + dialog.on( 'hide', func, this ); + } + }, + + /** + * The default handler for a UI element's access key down event, which + * tries to put focus to the UI element.
      + * Can be overridded in child classes for more sophisticaed behavior. + * @param {CKEDITOR.dialog} dialog The parent dialog object. + * @param {String} key The key combination pressed. Since access keys + * are defined to always include the CTRL key, its value should always + * include a 'CTRL+' prefix. + * @example + */ + accessKeyDown : function( dialog, key ) + { + this.focus(); + }, + + /** + * The default handler for a UI element's access key up event, which + * does nothing.
      + * Can be overridded in child classes for more sophisticated behavior. + * @param {CKEDITOR.dialog} dialog The parent dialog object. + * @param {String} key The key combination pressed. Since access keys + * are defined to always include the CTRL key, its value should always + * include a 'CTRL+' prefix. + * @example + */ + accessKeyUp : function( dialog, key ) + { + }, + + /** + * Disables a UI element. + * @example + */ + disable : function() + { + var element = this.getInputElement(); + element.setAttribute( 'disabled', 'true' ); + element.addClass( 'cke_disabled' ); + }, + + /** + * Enables a UI element. + * @example + */ + enable : function() + { + var element = this.getInputElement(); + element.removeAttribute( 'disabled' ); + element.removeClass( 'cke_disabled' ); + }, + + /** + * Determines whether an UI element is enabled or not. + * @returns {Boolean} Whether the UI element is enabled. + * @example + */ + isEnabled : function() + { + return !this.getInputElement().getAttribute( 'disabled' ); + }, + + /** + * Determines whether an UI element is visible or not. + * @returns {Boolean} Whether the UI element is visible. + * @example + */ + isVisible : function() + { + return this.getInputElement().isVisible(); + }, + + /** + * Determines whether an UI element is focus-able or not. + * Focus-able is defined as being both visible and enabled. + * @returns {Boolean} Whether the UI element can be focused. + * @example + */ + isFocusable : function() + { + if ( !this.isEnabled() || !this.isVisible() ) + return false; + return true; + } + }; + + CKEDITOR.ui.dialog.hbox.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement, + /** + * @lends CKEDITOR.ui.dialog.hbox.prototype + */ + { + /** + * Gets a child UI element inside this container. + * @param {Array|Number} indices An array or a single number to indicate the child's + * position in the container's descendant tree. Omit to get all the children in an array. + * @returns {Array|CKEDITOR.ui.dialog.uiElement} Array of all UI elements in the container + * if no argument given, or the specified UI element if indices is given. + * @example + * var checkbox = hbox.getChild( [0,1] ); + * checkbox.setValue( true ); + */ + getChild : function( indices ) + { + // If no arguments, return a clone of the children array. + if ( arguments.length < 1 ) + return this._.children.concat(); + + // If indices isn't array, make it one. + if ( !indices.splice ) + indices = [ indices ]; + + // Retrieve the child element according to tree position. + if ( indices.length < 2 ) + return this._.children[ indices[0] ]; + else + return ( this._.children[ indices[0] ] && this._.children[ indices[0] ].getChild ) ? + this._.children[ indices[0] ].getChild( indices.slice( 1, indices.length ) ) : + null; + } + }, true ); + + CKEDITOR.ui.dialog.vbox.prototype = new CKEDITOR.ui.dialog.hbox(); + + + + (function() + { + var commonBuilder = { + build : function( dialog, elementDefinition, output ) + { + var children = elementDefinition.children, + child, + childHtmlList = [], + childObjList = []; + for ( var i = 0 ; ( i < children.length && ( child = children[i] ) ) ; i++ ) + { + var childHtml = []; + childHtmlList.push( childHtml ); + childObjList.push( CKEDITOR.dialog._.uiElementBuilders[ child.type ].build( dialog, child, childHtml ) ); + } + return new CKEDITOR.ui.dialog[elementDefinition.type]( dialog, childObjList, childHtmlList, output, elementDefinition ); + } + }; + + CKEDITOR.dialog.addUIElement( 'hbox', commonBuilder ); + CKEDITOR.dialog.addUIElement( 'vbox', commonBuilder ); + })(); + + /** + * Generic dialog command. It opens a specific dialog when executed. + * @constructor + * @augments CKEDITOR.commandDefinition + * @param {string} dialogName The name of the dialog to open when executing + * this command. + * @example + * // Register the "link" command, which opens the "link" dialog. + * editor.addCommand( 'link', new CKEDITOR.dialogCommand( 'link' ) ); + */ + CKEDITOR.dialogCommand = function( dialogName ) + { + this.dialogName = dialogName; + }; + + CKEDITOR.dialogCommand.prototype = + { + /** @ignore */ + exec : function( editor ) + { + editor.openDialog( this.dialogName ); + }, + + // Dialog commands just open a dialog ui, thus require no undo logic, + // undo support should dedicate to specific dialog implementation. + canUndo: false, + + editorFocus : CKEDITOR.env.ie || CKEDITOR.env.webkit + }; + + (function() + { + var notEmptyRegex = /^([a]|[^a])+$/, + integerRegex = /^\d*$/, + numberRegex = /^\d*(?:\.\d+)?$/; + + CKEDITOR.VALIDATE_OR = 1; + CKEDITOR.VALIDATE_AND = 2; + + CKEDITOR.dialog.validate = + { + functions : function() + { + return function() + { + /** + * It's important for validate functions to be able to accept the value + * as argument in addition to this.getValue(), so that it is possible to + * combine validate functions together to make more sophisticated + * validators. + */ + var value = this && this.getValue ? this.getValue() : arguments[0]; + + var msg = undefined, + relation = CKEDITOR.VALIDATE_AND, + functions = [], i; + + for ( i = 0 ; i < arguments.length ; i++ ) + { + if ( typeof( arguments[i] ) == 'function' ) + functions.push( arguments[i] ); + else + break; + } + + if ( i < arguments.length && typeof( arguments[i] ) == 'string' ) + { + msg = arguments[i]; + i++; + } + + if ( i < arguments.length && typeof( arguments[i]) == 'number' ) + relation = arguments[i]; + + var passed = ( relation == CKEDITOR.VALIDATE_AND ? true : false ); + for ( i = 0 ; i < functions.length ; i++ ) + { + if ( relation == CKEDITOR.VALIDATE_AND ) + passed = passed && functions[i]( value ); + else + passed = passed || functions[i]( value ); + } + + if ( !passed ) + { + if ( msg !== undefined ) + alert( msg ); + if ( this && ( this.select || this.focus ) ) + ( this.select || this.focus )(); + return false; + } + + return true; + }; + }, + + regex : function( regex, msg ) + { + /* + * Can be greatly shortened by deriving from functions validator if code size + * turns out to be more important than performance. + */ + return function() + { + var value = this && this.getValue ? this.getValue() : arguments[0]; + if ( !regex.test( value ) ) + { + if ( msg !== undefined ) + alert( msg ); + if ( this && ( this.select || this.focus ) ) + { + if ( this.select ) + this.select(); + else + this.focus(); + } + return false; + } + return true; + }; + }, + + notEmpty : function( msg ) + { + return this.regex( notEmptyRegex, msg ); + }, + + integer : function( msg ) + { + return this.regex( integerRegex, msg ); + }, + + 'number' : function( msg ) + { + return this.regex( numberRegex, msg ); + }, + + equals : function( value, msg ) + { + return this.functions( function( val ){ return val == value; }, msg ); + }, + + notEqual : function( value, msg ) + { + return this.functions( function( val ){ return val != value; }, msg ); + } + }; + + CKEDITOR.on( 'instanceDestroyed', function( evt ) + { + // Remove dialog cover on last instance destroy. + if ( CKEDITOR.tools.isEmpty( CKEDITOR.instances ) ) + { + var currentTopDialog; + while ( ( currentTopDialog = CKEDITOR.dialog._.currentTop ) ) + currentTopDialog.hide(); + removeCovers(); + } + + var dialogs = evt.editor._.storedDialogs; + for ( var name in dialogs ) + dialogs[ name ].destroy(); + + }); + + })(); +})(); + +// Extend the CKEDITOR.editor class with dialog specific functions. +CKEDITOR.tools.extend( CKEDITOR.editor.prototype, + /** @lends CKEDITOR.editor.prototype */ + { + /** + * Loads and opens a registered dialog. + * @param {String} dialogName The registered name of the dialog. + * @param {Function} callback The function to be invoked after dialog instance created. + * @see CKEDITOR.dialog.add + * @example + * CKEDITOR.instances.editor1.openDialog( 'smiley' ); + * @returns {CKEDITOR.dialog} The dialog object corresponding to the dialog displayed. null if the dialog name is not registered. + */ + openDialog : function( dialogName, callback ) + { + var dialogDefinitions = CKEDITOR.dialog._.dialogDefinitions[ dialogName ], + dialogSkin = this.skin.dialog; + + // If the dialogDefinition is already loaded, open it immediately. + if ( typeof dialogDefinitions == 'function' && dialogSkin._isLoaded ) + { + var storedDialogs = this._.storedDialogs || + ( this._.storedDialogs = {} ); + + var dialog = storedDialogs[ dialogName ] || + ( storedDialogs[ dialogName ] = new CKEDITOR.dialog( this, dialogName ) ); + + callback && callback.call( dialog, dialog ); + dialog.show(); + + return dialog; + } + else if ( dialogDefinitions == 'failed' ) + throw new Error( '[CKEDITOR.dialog.openDialog] Dialog "' + dialogName + '" failed when loading definition.' ); + + // Not loaded? Load the .js file first. + var body = CKEDITOR.document.getBody(), + cursor = body.$.style.cursor, + me = this; + + body.setStyle( 'cursor', 'wait' ); + + function onDialogFileLoaded( success ) + { + var dialogDefinition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ], + skin = me.skin.dialog; + + // Check if both skin part and definition is loaded. + if ( !skin._isLoaded || loadDefinition && typeof success == 'undefined' ) + return; + + // In case of plugin error, mark it as loading failed. + if ( typeof dialogDefinition != 'function' ) + CKEDITOR.dialog._.dialogDefinitions[ dialogName ] = 'failed'; + + me.openDialog( dialogName, callback ); + body.setStyle( 'cursor', cursor ); + } + + if ( typeof dialogDefinitions == 'string' ) + { + var loadDefinition = 1; + CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( dialogDefinitions ), onDialogFileLoaded ); + } + + CKEDITOR.skins.load( this, 'dialog', onDialogFileLoaded ); + + return null; + } + }); + +CKEDITOR.plugins.add( 'dialog', + { + requires : [ 'dialogui' ] + }); + +// Dialog related configurations. + +/** + * The color of the dialog background cover. It should be a valid CSS color + * string. + * @name CKEDITOR.config.dialog_backgroundCoverColor + * @type String + * @default 'white' + * @example + * config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)'; + */ + +/** + * The opacity of the dialog background cover. It should be a number within the + * range [0.0, 1.0]. + * @name CKEDITOR.config.dialog_backgroundCoverOpacity + * @type Number + * @default 0.5 + * @example + * config.dialog_backgroundCoverOpacity = 0.7; + */ + +/** + * If the dialog has more than one tab, put focus into the first tab as soon as dialog is opened. + * @name CKEDITOR.config.dialog_startupFocusTab + * @type Boolean + * @default false + * @example + * config.dialog_startupFocusTab = true; + */ + +/** + * The distance of magnetic borders used in moving and resizing dialogs, + * measured in pixels. + * @name CKEDITOR.config.dialog_magnetDistance + * @type Number + * @default 20 + * @example + * config.dialog_magnetDistance = 30; + */ + +/** + * Fired when a dialog definition is about to be used to create a dialog into + * an editor instance. This event makes it possible to customize the definition + * before creating it. + *

      Note that this event is called only the first time a specific dialog is + * opened. Successive openings will use the cached dialog, and this event will + * not get fired.

      + * @name CKEDITOR#dialogDefinition + * @event + * @param {CKEDITOR.dialog.dialogDefinition} data The dialog defination that + * is being loaded. + * @param {CKEDITOR.editor} editor The editor instance that will use the + * dialog. + */ + +/** + * Fired when a tab is going to be selected in a dialog + * @name dialog#selectPage + * @event + * @param String page The id of the page that it's gonna be selected. + * @param String currentPage The id of the current page. + */ diff --git a/ckeditor/_source/plugins/dialogadvtab/plugin.js b/ckeditor/_source/plugins/dialogadvtab/plugin.js new file mode 100644 index 0000000..5feec9c --- /dev/null +++ b/ckeditor/_source/plugins/dialogadvtab/plugin.js @@ -0,0 +1,207 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +(function() +{ + +function setupAdvParams( element ) +{ + var attrName = this.att; + + var value = element && element.hasAttribute( attrName ) && element.getAttribute( attrName ) || ''; + + if ( value !== undefined ) + this.setValue( value ); +} + +function commitAdvParams() +{ + // Dialogs may use different parameters in the commit list, so, by + // definition, we take the first CKEDITOR.dom.element available. + var element; + + for ( var i = 0 ; i < arguments.length ; i++ ) + { + if ( arguments[ i ] instanceof CKEDITOR.dom.element ) + { + element = arguments[ i ]; + break; + } + } + + if ( element ) + { + var attrName = this.att, + value = this.getValue(); + + if ( value ) + element.setAttribute( attrName, value ); + else + element.removeAttribute( attrName, value ); + } +} + +CKEDITOR.plugins.add( 'dialogadvtab', +{ + /** + * + * @param tabConfig + * id, dir, classes, styles + */ + createAdvancedTab : function( editor, tabConfig ) + { + if ( !tabConfig ) + tabConfig = { id:1, dir:1, classes:1, styles:1 }; + + var lang = editor.lang.common; + + var result = + { + id : 'advanced', + label : lang.advancedTab, + title : lang.advancedTab, + elements : + [ + { + type : 'vbox', + padding : 1, + children : [] + } + ] + }; + + var contents = []; + + if ( tabConfig.id || tabConfig.dir ) + { + if ( tabConfig.id ) + { + contents.push( + { + id : 'advId', + att : 'id', + type : 'text', + label : lang.id, + setup : setupAdvParams, + commit : commitAdvParams + }); + } + + if ( tabConfig.dir ) + { + contents.push( + { + id : 'advLangDir', + att : 'dir', + type : 'select', + label : lang.langDir, + 'default' : '', + style : 'width:100%', + items : + [ + [ lang.notSet, '' ], + [ lang.langDirLTR, 'ltr' ], + [ lang.langDirRTL, 'rtl' ] + ], + setup : setupAdvParams, + commit : commitAdvParams + }); + } + + result.elements[ 0 ].children.push( + { + type : 'hbox', + widths : [ '50%', '50%' ], + children : [].concat( contents ) + }); + } + + if ( tabConfig.styles || tabConfig.classes ) + { + contents = []; + + if ( tabConfig.styles ) + { + contents.push( + { + id : 'advStyles', + att : 'style', + type : 'text', + label : lang.styles, + 'default' : '', + + onChange : function(){}, + + getStyle : function( name, defaultValue ) + { + var match = this.getValue().match( new RegExp( name + '\\s*:\s*([^;]*)', 'i') ); + return match ? match[ 1 ] : defaultValue; + }, + + updateStyle : function( name, value ) + { + var styles = this.getValue(); + + // Remove the current value. + if ( styles ) + { + styles = styles + .replace( new RegExp( '\\s*' + name + '\s*:[^;]*(?:$|;\s*)', 'i' ), '' ) + .replace( /^[;\s]+/, '' ) + .replace( /\s+$/, '' ); + } + + if ( value ) + { + styles && !(/;\s*$/).test( styles ) && ( styles += '; ' ); + styles += name + ': ' + value; + } + + this.setValue( styles, true ); + + }, + + setup : setupAdvParams, + + commit : commitAdvParams + + }); + } + + if ( tabConfig.classes ) + { + contents.push( + { + type : 'hbox', + widths : [ '45%', '55%' ], + children : + [ + { + id : 'advCSSClasses', + att : 'class', + type : 'text', + label : lang.cssClasses, + 'default' : '', + setup : setupAdvParams, + commit : commitAdvParams + + } + ] + }); + } + + result.elements[ 0 ].children.push( + { + type : 'hbox', + widths : [ '50%', '50%' ], + children : [].concat( contents ) + }); + } + + return result; + } +}); + +})(); diff --git a/ckeditor/_source/plugins/dialogui/plugin.js b/ckeditor/_source/plugins/dialogui/plugin.js new file mode 100644 index 0000000..7875b5b --- /dev/null +++ b/ckeditor/_source/plugins/dialogui/plugin.js @@ -0,0 +1,1522 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** @fileoverview The "dialogui" plugin. */ + +CKEDITOR.plugins.add( 'dialogui' ); + +(function() +{ + var initPrivateObject = function( elementDefinition ) + { + this._ || ( this._ = {} ); + this._['default'] = this._.initValue = elementDefinition['default'] || ''; + this._.required = elementDefinition[ 'required' ] || false; + var args = [ this._ ]; + for ( var i = 1 ; i < arguments.length ; i++ ) + args.push( arguments[i] ); + args.push( true ); + CKEDITOR.tools.extend.apply( CKEDITOR.tools, args ); + return this._; + }, + textBuilder = + { + build : function( dialog, elementDefinition, output ) + { + return new CKEDITOR.ui.dialog.textInput( dialog, elementDefinition, output ); + } + }, + commonBuilder = + { + build : function( dialog, elementDefinition, output ) + { + return new CKEDITOR.ui.dialog[elementDefinition.type]( dialog, elementDefinition, output ); + } + }, + containerBuilder = + { + build : function( dialog, elementDefinition, output ) + { + var children = elementDefinition.children, + child, + childHtmlList = [], + childObjList = []; + for ( var i = 0 ; ( i < children.length && ( child = children[i] ) ) ; i++ ) + { + var childHtml = []; + childHtmlList.push( childHtml ); + childObjList.push( CKEDITOR.dialog._.uiElementBuilders[ child.type ].build( dialog, child, childHtml ) ); + } + return new CKEDITOR.ui.dialog[ elementDefinition.type ]( dialog, childObjList, childHtmlList, output, elementDefinition ); + } + }, + commonPrototype = + { + isChanged : function() + { + return this.getValue() != this.getInitValue(); + }, + + reset : function( noChangeEvent ) + { + this.setValue( this.getInitValue(), noChangeEvent ); + }, + + setInitValue : function() + { + this._.initValue = this.getValue(); + }, + + resetInitValue : function() + { + this._.initValue = this._['default']; + }, + + getInitValue : function() + { + return this._.initValue; + } + }, + commonEventProcessors = CKEDITOR.tools.extend( {}, CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors, + { + onChange : function( dialog, func ) + { + if ( !this._.domOnChangeRegistered ) + { + dialog.on( 'load', function() + { + this.getInputElement().on( 'change', function() + { + // Make sure 'onchange' doesn't get fired after dialog closed. (#5719) + if ( !dialog.parts.dialog.isVisible() ) + return; + + this.fire( 'change', { value : this.getValue() } ); + }, this ); + }, this ); + this._.domOnChangeRegistered = true; + } + + this.on( 'change', func ); + } + }, true ), + eventRegex = /^on([A-Z]\w+)/, + cleanInnerDefinition = function( def ) + { + // An inner UI element should not have the parent's type, title or events. + for ( var i in def ) + { + if ( eventRegex.test( i ) || i == 'title' || i == 'type' ) + delete def[i]; + } + return def; + }; + + CKEDITOR.tools.extend( CKEDITOR.ui.dialog, + /** @lends CKEDITOR.ui.dialog */ + { + /** + * Base class for all dialog elements with a textual label on the left. + * @constructor + * @example + * @extends CKEDITOR.ui.dialog.uiElement + * @param {CKEDITOR.dialog} dialog + * Parent dialog object. + * @param {CKEDITOR.dialog.uiElementDefinition} elementDefinition + * The element definition. Accepted fields: + *
        + *
      • label (Required) The label string.
      • + *
      • labelLayout (Optional) Put 'horizontal' here if the + * label element is to be layed out horizontally. Otherwise a vertical + * layout will be used.
      • + *
      • widths (Optional) This applies only for horizontal + * layouts - an 2-element array of lengths to specify the widths of the + * label and the content element.
      • + *
      + * @param {Array} htmlList + * List of HTML code to output to. + * @param {Function} contentHtml + * A function returning the HTML code string to be added inside the content + * cell. + */ + labeledElement : function( dialog, elementDefinition, htmlList, contentHtml ) + { + if ( arguments.length < 4 ) + return; + + var _ = initPrivateObject.call( this, elementDefinition ); + _.labelId = CKEDITOR.tools.getNextId() + '_label'; + var children = this._.children = []; + /** @ignore */ + var innerHTML = function() + { + var html = [], + requiredClass = elementDefinition.required ? ' cke_required' : '' ; + if ( elementDefinition.labelLayout != 'horizontal' ) + html.push( '', + '' ); + else + { + var hboxDefinition = { + type : 'hbox', + widths : elementDefinition.widths, + padding : 0, + children : + [ + { + type : 'html', + html : '
      \n"; +?> \ No newline at end of file diff --git a/inhalte/web.php b/inhalte/web.php new file mode 100644 index 0000000..aa9d96b --- /dev/null +++ b/inhalte/web.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/pdf/ang_pdf.php b/pdf/ang_pdf.php new file mode 100644 index 0000000..34f266a --- /dev/null +++ b/pdf/ang_pdf.php @@ -0,0 +1,101 @@ +query($sql); +$nt = $result->fetch_assoc(); +$sqlp = "SELECT * FROM ".PREFIX."_Angebot_Pos WHERE (Jahr = \"".$Jahr."\" AND Angebot_ID = \"".$ID."\") ORDER BY Position ASC;"; +$resultp = $db->query($sqlp); +$sqla = "SELECT * FROM Admin WHERE ID = \"".$nt['Admin_ID']."\";"; +$resulta = $db->query($sqla); +$nta = $resulta->fetch_assoc(); +$sqlk = "SELECT * FROM ".PREFIX."_Kontakte WHERE ID = \"".$nt['Kontakt_ID']."\";"; +$resultk = $db->query($sqlk); +$ntk = $resultk->fetch_assoc(); +$sqltext = "SELECT * FROM ".PREFIX."_Texte WHERE section= \"angebot\";"; +$rtext = $db->query($sqltext); +$nttext = $rtext->fetch_assoc(); + +while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen']) { + $nt['ID'] = "0".$nt['ID']; +} + +class PDF extends FPDF { + + function Header() { + include "pdf/header.php"; + } + function Footer() { + include "pdf/footer.php"; + } +} + +$pdf=new PDF(); +$pdf->SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); +$pdf->SetLeftMargin(20); +$pdf->SetAutoPageBreak(true, 30); + +if ("2" == $_SESSION['Firma']['Werbung']) { + include "pdf/header2.php"; +} else { + include "pdf/header".$_SESSION['Firma']['ASP'].".php"; +} + +$pdf->SetY(95); +$pdf->Write(4, "Angebot-Nr.:"); +$pdf->SetX(45); +$pdf->Write(4, $nt['Jahr']."_".$nt['ID']); +$pdf->SetX(138); +$pdf->Cell(15, 4, "Datum:", 0); +$pdf->Cell(47, 4, $nt['Datum'], 0, 1, 'R'); +$pdf->SetRightMargin(10); +$pdf->SetY(107); +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F1_Red'], $_SESSION['Firma']['F1_Green'], $_SESSION['Firma']['F1_Blue']); +$pdf->Write(10, "Angebot\n"); +$pdf->SetFont('Helvetica', '', 10); +$pdf->SetTextColor(0); + +$var = $nttext['Text1']; +include "pdf/replace_token.php"; +include "pdf/replace_angebot.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var."\n"); + +include "pdf/position_full.php"; + +include "pdf/berechnung.php"; + +$var = $nttext['Text2']; +include "pdf/replace_token.php"; +include "pdf/replace_angebot.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var); + +if ("" != $nt['Text']) { + $pdf->Write(4, "\n".stripslashes($nt['Text'])."\n"); +} + +$var = $_SESSION['Firma']['Gruss']; +include "pdf/replace_gruss.php"; +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, "\n".$var); + +$file = "pdf/".PREFIX."/angebot/A_".$nt['Jahr']."_".$nt['ID'].".pdf"; +$pdf->Output($file, "F"); + +$var = $nttext['EMail']; +include "pdf/replace_token.php"; +include "pdf/replace_angebot.php"; + + +?> \ No newline at end of file diff --git a/pdf/ausist_pdf.php b/pdf/ausist_pdf.php new file mode 100644 index 0000000..2555779 --- /dev/null +++ b/pdf/ausist_pdf.php @@ -0,0 +1,232 @@ +SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); + +$pdf->SetRightMargin(10); +$pdf->SetY(50); +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); + +if ("m" == $_POST['Suche']) { + $pdf->Write(20, "bezahlte Ausgangsrechnungen ".$_POST['Monat']."/".$_POST['Jahr']."\n"); + $teil = "bezahlte Teilzahlungen ".$_POST['Monat']."/".$_POST['Jahr']."\n"; + $sql = "SELECT *, DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum, DATE_FORMAT(Bezahlt_am, '%d.%m.%Y') AS Bezahlt FROM ".PREFIX."_Rechnungen WHERE (Bezahlt = \"1\" AND YEAR(Bezahlt_am) = \"".$_POST['Jahr']."\" AND MONTH(Bezahlt_am) = \"".$_POST['Monat']."\" AND Teilzahlungen = \"0\") ORDER BY Bezahlt_am ASC;"; + $sqlt = "SELECT *, DATE_FORMAT(Bezahlt_am, '%d.%m.%Y') AS Bezahlt FROM ".PREFIX."_Teilzahlungen WHERE (YEAR(Bezahlt_am) = \"".$_POST['Jahr']."\" AND MONTH(Bezahlt_am) = \"".$_POST['Monat']."\") ORDER BY Bezahlt_am ASC;"; +} elseif ("q" == $_POST['Suche']) { + $pdf->Write(20, "bezahlte Ausgangsrechnungen Q".$_POST['Quartal']."/".$_POST['Jahr']."\n"); + $teil = "bezahlte Teilzahlungen Q".$_POST['Quartal']."/".$_POST['Jahr']."\n"; + $sql = "SELECT *, DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum, DATE_FORMAT(Bezahlt_am, '%d.%m.%Y') AS Bezahlt FROM ".PREFIX."_Rechnungen WHERE (Bezahlt = \"1\" AND YEAR(Bezahlt_am) = \"".$_POST['Jahr']."\" AND QUARTER(Bezahlt_am) = \"".$_POST['Quartal']."\" AND Teilzahlungen = \"0\") ORDER BY Bezahlt_am ASC;"; + $sqlt = "SELECT *, DATE_FORMAT(Bezahlt_am, '%d.%m.%Y') AS Bezahlt FROM ".PREFIX."_Teilzahlungen WHERE (YEAR(Bezahlt_am) = \"".$_POST['Jahr']."\" AND QUARTER(Bezahlt_am) = \"".$_POST['Quartal']."\") ORDER BY Bezahlt_am ASC;"; +} elseif ("j" == $_POST['Suche']) { + $pdf->Write(20, "bezahlte Ausgangsrechnungen ".$_POST['Jahr']."\n"); + $teil = "bezahlte Teilzahlungen ".$_POST['Jahr']."\n"; + $sql = "SELECT *, DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum, DATE_FORMAT(Bezahlt_am, '%d.%m.%Y') AS Bezahlt FROM ".PREFIX."_Rechnungen WHERE (Bezahlt = \"1\" AND YEAR(Bezahlt_am) = \"".$_POST['Jahr']."\" AND Teilzahlungen = \"0\") ORDER BY Bezahlt_am ASC;"; + $sqlt = "SELECT *, DATE_FORMAT(Bezahlt_am, '%d.%m.%Y') AS Bezahlt FROM ".PREFIX."_Teilzahlungen WHERE (YEAR(Bezahlt_am) = \"".$_POST['Jahr']."\") ORDER BY Bezahlt_am ASC;"; +} + +$result = $db->query($sql); +$resultt = $db->query($sqlt); +$_19 = $_19_MwSt = 0; +$_7 = $_7_MwSt = 0; +$_0 = 0; +$Sonst_Preis = $Sonst_MwSt = 0; + +$pdf->SetTextColor(00); +$pdf->SetFont('Helvetica','B', 10); +$pdf->Cell(65, 4, "Firma / Name", 0); +$pdf->Cell(20, 4, "Re-Nr.", 0); +$pdf->Cell(20, 4, "Re-Datum", 0); +$pdf->Cell(20, 4, "Netto", 0, 0, 'R'); +$pdf->Cell(15, 4, "MwSt", 0, 0, 'R'); +$pdf->Cell(20, 4, "Gesamt", 0, 0, 'R'); +$pdf->Cell(20, 4, "Bezahlt", 0, 1, 'R'); +$pdf->Write(4, "\n"); +$y = $pdf->GetY() - 2; +$pdf->Line(20, $y, 200, $y); +$pdf->SetFont('Helvetica','', 8); + +while ($nt = $result->fetch_assoc()) { + if (19 == $nt['MwSt']) { + $_19 = $_19 + $nt['Preis']; + $_19_MwSt = $_19_MwSt + round($nt['Preis'] * $nt['MwSt'] / 100, 2); + } elseif (7 == $nt['MwSt']) { + $_7 = $_7 + $nt['Preis']; + $_7_MwSt = $_7_MwSt + round($nt['Preis'] * $nt['MwSt'] / 100, 2); + } elseif (0 == $nt['MwSt']) { + $_0 = $_0 + $nt['Preis']; + } else { + $Sonst_Preis = $Sonst_Preis + $nt['Preis']; + $Sonst_MwSt = $Sonst_MwSt + round($nt['Preis'] * $nt['MwSt'] / 100, 2); + } + $sqlk = "SELECT Firma, Vorname, Nachname FROM ".PREFIX."_Kontakte WHERE ID = \"".$nt['Kontakt_ID']."\";"; + $resultk = $db->query($sqlk); + $ntk = $resultk->fetch_assoc(); + $pdf->Cell(65, 4, $ntk['Nachname'].", ".$ntk['Firma'], 0); + while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen']) { + $nt['ID'] = "0".$nt['ID']; + } + $pdf->Cell(20, 4, $_POST['Jahr']."_".$nt['ID'], 0); + $pdf->Cell(20, 4, $nt['Datum'], 0); + $pdf->Cell(20, 4, number_format($nt['Preis'], '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Cell(15, 4, number_format($nt['Preis'] * $nt['MwSt'] / 100, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Cell(20, 4, number_format($nt['Preis'] * (1 + $nt['MwSt'] / 100), '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Cell(20, 4, $nt['Bezahlt'], 0, 1, 'R'); +} +$y = $pdf->GetY() + 2; +$pdf->Line(20, $y, 200, $y); +$pdf->Write(4, "\n"); + +$Rech = $_19 + $_7 + $_0 + $Sonst_Preis; +$Rech_MwSt = $_19_MwSt + $_7_MwSt + $_0_MwSt + $Sonst_MwSt; + +$pdf->Cell(105, 4, "Gesamt", 0); +$pdf->Cell(20, 4, number_format($Rech, '2', ',', '.')." €", 0, 0, 'R'); +$pdf->Cell(15, 4, number_format($Rech_MwSt, '2', ',', '.')." €", 0, 0, 'R'); +$pdf->Cell(20, 4, number_format($Rech + $Rech_MwSt, '2', ',', '.')." €", 0, 0, 'R'); +$pdf->Write(4, "\n"); + +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); +$pdf->Write(20, $teil); + +$pdf->SetTextColor(00); +$pdf->SetFont('Helvetica','B', 10); +$pdf->Cell(65, 4, "Firma / Name", 0); +$pdf->Cell(20, 4, "Re-Nr.", 0); +$pdf->Cell(20, 4, "Re-Datum", 0); +$pdf->Cell(20, 4, "Netto", 0, 0, 'R'); +$pdf->Cell(15, 4, "MwSt", 0, 0, 'R'); +$pdf->Cell(20, 4, "Gesamt", 0, 0, 'R'); +$pdf->Cell(20, 4, "Bezahlt", 0, 1, 'R'); +$pdf->Write(4, "\n"); +$y = $pdf->GetY() - 2; +$pdf->Line(20, $y, 200, $y); +$pdf->SetFont('Helvetica','', 8); + +while ($ntt = $resultt->fetch_assoc()) { + if (19 == $ntt['MwSt']) { + $_19 = $_19 + $ntt['Preis']; + $_19_MwSt = $_19_MwSt + round($ntt['Preis'] * $ntt['MwSt'] / 100, 2); + } elseif (7 == $ntt['MwSt']) { + $_7 = $_7 + $ntt['Preis']; + $_7_MwSt = $_7_MwSt + round($ntt['Preis'] * $ntt['MwSt'] / 100, 2); + } elseif (0 == $ntt['MwSt']) { + $_0 = $_0 + $ntt['Preis']; + } else { + $Sonst_Preis = $Sonst_Preis + $ntt['Preis']; + $Sonst_MwSt = $Sonst_MwSt + round($ntt['Preis'] * $ntt['MwSt'] / 100, 2); + } + $sqlr = "SELECT DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum, Kontakt_ID FROM ".PREFIX."_Rechnungen WHERE (Jahr = \"".$ntt['Referenz_Jahr']."\" AND ID = \"".$ntt['Referenz_ID']."\");"; + $resultr = $db->query($sqlr); + $ntr = $resultr->fetch_assoc(); + $sqlk = "SELECT Firma, Vorname, Nachname FROM ".PREFIX."_Kontakte WHERE ID = \"".$ntr['Kontakt_ID']."\";"; + $resultk = $db->query($sqlk); + $ntk = $resultk->fetch_assoc(); + $pdf->Cell(65, 4, $ntk['Nachname'].", ".$ntk['Firma'], 0); + while (strlen($ntt['Referenz_ID']) < $_SESSION['Firma']['Stellen']) { + $ntt['Referenz_ID'] = "0".$ntt['Referenz_ID']; + } + $pdf->Cell(20, 4, $ntt['Referenz_Jahr']."_".$ntt['Referenz_ID'], 0); + $pdf->Cell(20, 4, $ntr['Datum'], 0); + $pdf->Cell(20, 4, number_format($ntt['Preis'], '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Cell(15, 4, number_format($ntt['Preis'] * $ntt['MwSt'] / 100, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Cell(20, 4, number_format($ntt['Preis'] * (1 + $ntt['MwSt'] / 100), '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Cell(20, 4, $ntt['Bezahlt'], 0, 1, 'R'); +} +$y = $pdf->GetY() + 2; +$pdf->Line(20, $y, 200, $y); +$pdf->Write(4, "\n"); + +$Teil = $_19 + $_7 + $_0 + $Sonst_Preis - $Rech; +$Teil_MwSt = $_19_MwSt + $_7_MwSt + $_0_MwSt + $Sonst_MwSt - $Rech_MwSt; + +$pdf->Cell(105, 4, "Gesamt", 0); +$pdf->Cell(20, 4, number_format($Teil, '2', ',', '.')." €", 0, 0, 'R'); +$pdf->Cell(15, 4, number_format($Teil_MwSt, '2', ',', '.')." €", 0, 0, 'R'); +$pdf->Cell(20, 4, number_format($Teil + $Teil_MwSt, '2', ',', '.')." €", 0, 0, 'R'); +$pdf->Write(4, "\n"); + + + + + + + +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); + +$pdf->Write(20, "Beträge aufgeschlüsselt nach Mehrwertsteuersatz\n"); +$pdf->SetTextColor(00); +$pdf->SetFont('Helvetica','B', 10); +$pdf->Cell(105, 4, "", 0); +$pdf->Cell(25, 4, "Netto", 0, 0, 'R'); +$pdf->Cell(25, 4, "MwSt", 0, 0, 'R'); +$pdf->Cell(25, 4, "Gesamt", 0, 0, 'R'); +$pdf->Write(4, "\n\n"); +$y = $pdf->GetY() - 2; +$pdf->Line(20, $y, 200, $y); +$pdf->SetFont('Helvetica','', 10); +$pdf->SetFont('Helvetica','', 10); + +if (0 != $_19) { + $pdf->Cell(105, 4, "Umsätze zu 19% MwSt."); + $pdf->Cell(25, 4, number_format($_19, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','B', 10); + $pdf->Cell(25, 4, number_format($_19_MwSt, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','', 10); + $pdf->Cell(25, 4, number_format($_19 + $_19_MwSt, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); +} +if (0 != $_7) { + $pdf->Cell(105, 4, "Umsätze zu 7% MwSt."); + $pdf->Cell(25, 4, number_format($_7, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','B', 10); + $pdf->Cell(25, 4, number_format($_7_MwSt, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','', 10); + $pdf->Cell(25, 4, number_format($_7 + $_7_MwSt, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); +} +if (0 != $_0) { + $pdf->Cell(105, 4, "Umsatzsteuerfreie Verkäufe"); + $pdf->Cell(25, 4, number_format($_0, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','B', 10); + $pdf->Cell(25, 4, number_format(0, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','', 10); + $pdf->Cell(25, 4, number_format($_0, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); +} +if (0 != $Sonst_Preis) { + $pdf->Cell(105, 4, "Umsätze zu anderen Mehrwertsteuersätzen"); + $pdf->Cell(25, 4, number_format($Sonst_Preis, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','B', 10); + $pdf->Cell(25, 4, number_format($Sonst_MwSt, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','', 10); + $pdf->Cell(25, 4, number_format($Sonst_Preis + $Sonst_MwSt, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); +} +/* +$ntsum = $resultsum->fetch_assoc(); +$pdf->Cell(105, 4, "Gesamt", 0); +$pdf->Cell(25, 4, number_format($ntsum['Preis'], '2', ',', '.')." €", 0, 0, 'R'); +$pdf->SetFont('Helvetica','B', 10); +$pdf->Cell(25, 4, number_format($ntsum['MwSt'], '2', ',', '.')." €", 0, 0, 'R'); +$pdf->SetFont('Helvetica','', 10); +$pdf->Cell(25, 4, number_format($ntsum['Gesamt'], '2', ',', '.')." €", 0, 0, 'R'); +*/ + +$file = "pdf/".PREFIX."/eur/A_".date('Ymd').".pdf"; +$pdf->Output($file, "F"); + + +?> \ No newline at end of file diff --git a/pdf/aussoll_pdf.php b/pdf/aussoll_pdf.php new file mode 100644 index 0000000..df08df3 --- /dev/null +++ b/pdf/aussoll_pdf.php @@ -0,0 +1,151 @@ +SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); + +$pdf->SetRightMargin(10); +$pdf->SetY(50); +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); + +if ("m" == $_POST['Suche']) { + $pdf->Write(20, "erstellte Ausgangsrechnungen ".$_POST['Monat']."/".$_POST['Jahr']."\n"); + $sql = "SELECT *, DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum, DATE_FORMAT(Bezahlt_am, '%d.%m.%Y') AS Bezahlt FROM ".PREFIX."_Rechnungen WHERE (YEAR(Datum) = \"".$_POST['Jahr']."\" AND MONTH(Datum) = \"".$_POST['Monat']."\") ORDER BY Datum ASC;"; +} elseif ("q" == $_POST['Suche']) { + $pdf->Write(20, "erstellte Ausgangsrechnungen Q".$_POST['Quartal']."/".$_POST['Jahr']."\n"); + $sql = "SELECT *, DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum, DATE_FORMAT(Bezahlt_am, '%d.%m.%Y') AS Bezahlt FROM ".PREFIX."_Rechnungen WHERE (YEAR(Datum) = \"".$_POST['Jahr']."\" AND QUARTER(Datum) = \"".$_POST['Quartal']."\") ORDER BY Datum ASC;"; +} elseif ("j" == $_POST['Suche']) { + $pdf->Write(20, "erstellte Ausgangsrechnungen ".$_POST['Jahr']."\n"); + $sql = "SELECT *, DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum, DATE_FORMAT(Bezahlt_am, '%d.%m.%Y') AS Bezahlt FROM ".PREFIX."_Rechnungen WHERE (YEAR(Datum) = \"".$_POST['Jahr']."\") ORDER BY Datum ASC;"; +} + +$result = $db->query($sql); +$_19 = $_19_MwSt = 0; +$_7 = $_7_MwSt = 0; +$_0 = 0; +$Sonst_Preis = $Sonst_MwSt = 0; + +$pdf->SetTextColor(00); +$pdf->SetFont('Helvetica','B', 10); +$pdf->Cell(65, 4, "Firma / Name", 0); +$pdf->Cell(20, 4, "Re-Nr.", 0); +$pdf->Cell(20, 4, "Re-Datum", 0); +$pdf->Cell(20, 4, "Netto", 0, 0, 'R'); +$pdf->Cell(15, 4, "MwSt", 0, 0, 'R'); +$pdf->Cell(20, 4, "Gesamt", 0, 0, 'R'); +$pdf->Cell(20, 4, "Bezahlt", 0, 1, 'R'); +$pdf->Write(4, "\n"); +$y = $pdf->GetY() - 2; +$pdf->Line(20, $y, 200, $y); +$pdf->SetFont('Helvetica','', 8); + +while ($nt = $result->fetch_assoc()) { + if (19 == $nt['MwSt']) { + $_19 = $_19 + $nt['Preis']; + $_19_MwSt = $_19_MwSt + round($nt['Preis'] * $nt['MwSt'] / 100, 2); + } elseif (7 == $nt['MwSt']) { + $_7 = $_7 + $nt['Preis']; + $_7_MwSt = $_7_MwSt + round($nt['Preis'] * $nt['MwSt'] / 100, 2); + } elseif (0 == $nt['MwSt']) { + $_0 = $_0 + $nt['Preis']; + } else { + $Sonst_Preis = $Sonst_Preis + $nt['Preis']; + $Sonst_MwSt = $Sonst_MwSt + round($nt['Preis'] * $nt['MwSt'] / 100, 2); + } + $sqlk = "SELECT Firma, Vorname, Nachname FROM ".PREFIX."_Kontakte WHERE ID = \"".$nt['Kontakt_ID']."\";"; + $resultk = $db->query($sqlk); + $ntk = $resultk->fetch_assoc(); + $pdf->Cell(65, 4, $ntk['Nachname'].", ".$ntk['Firma'], 0); + while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen']) { + $nt['ID'] = "0".$nt['ID']; + } + $pdf->Cell(20, 4, $_POST['Jahr']."_".$nt['ID'], 0); + $pdf->Cell(20, 4, $nt['Datum'], 0); + $pdf->Cell(20, 4, number_format($nt['Preis'], '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Cell(15, 4, number_format($nt['Preis'] * $nt['MwSt'] / 100, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Cell(20, 4, number_format($nt['Preis'] * (1 + $nt['MwSt'] / 100), '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Cell(20, 4, $nt['Bezahlt'], 0, 1, 'R'); +} +$y = $pdf->GetY() + 2; +$pdf->Line(20, $y, 200, $y); +$pdf->Write(4, "\n"); + +$Rech = $_19 + $_7 + $_0 + $Sonst_Preis; +$Rech_MwSt = $_19_MwSt + $_7_MwSt + $_0_MwSt + $Sonst_MwSt; + +$pdf->Cell(105, 4, "Gesamt", 0); +$pdf->Cell(20, 4, number_format($Rech, '2', ',', '.')." €", 0, 0, 'R'); +$pdf->Cell(15, 4, number_format($Rech_MwSt, '2', ',', '.')." €", 0, 0, 'R'); +$pdf->Cell(20, 4, number_format($Rech + $Rech_MwSt, '2', ',', '.')." €", 0, 0, 'R'); +$pdf->Write(4, "\n"); + + + +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); + +$pdf->Write(20, "Beträge aufgeschlüsselt nach Mehrwertsteuersatz\n"); +$pdf->SetTextColor(00); +$pdf->SetFont('Helvetica','B', 10); +$pdf->Cell(105, 4, "", 0); +$pdf->Cell(25, 4, "Netto", 0, 0, 'R'); +$pdf->Cell(25, 4, "MwSt", 0, 0, 'R'); +$pdf->Cell(25, 4, "Gesamt", 0, 0, 'R'); +$pdf->Write(4, "\n\n"); +$y = $pdf->GetY() - 2; +$pdf->Line(20, $y, 200, $y); +$pdf->SetFont('Helvetica','', 10); +$pdf->SetFont('Helvetica','', 10); + +if (0 != $_19) { + $pdf->Cell(105, 4, "Umsätze zu 19% MwSt."); + $pdf->Cell(25, 4, number_format($_19, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','B', 10); + $pdf->Cell(25, 4, number_format($_19_MwSt, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','', 10); + $pdf->Cell(25, 4, number_format($_19 + $_19_MwSt, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); +} +if (0 != $_7) { + $pdf->Cell(105, 4, "Umsätze zu 7% MwSt."); + $pdf->Cell(25, 4, number_format($_7, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','B', 10); + $pdf->Cell(25, 4, number_format($_7_MwSt, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','', 10); + $pdf->Cell(25, 4, number_format($_7 + $_7_MwSt, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); +} +if (0 != $_0) { + $pdf->Cell(105, 4, "Umsatzsteuerfreie Verkäufe"); + $pdf->Cell(25, 4, number_format($_0, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','B', 10); + $pdf->Cell(25, 4, number_format(0, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','', 10); + $pdf->Cell(25, 4, number_format($_0, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); +} +if (0 != $Sonst_Preis) { + $pdf->Cell(105, 4, "Umsätze zu anderen Mehrwertsteuersätzen"); + $pdf->Cell(25, 4, number_format($Sonst_Preis, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','B', 10); + $pdf->Cell(25, 4, number_format($Sonst_MwSt, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','', 10); + $pdf->Cell(25, 4, number_format($Sonst_Preis + $Sonst_MwSt, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); +} + +$file = "pdf/".PREFIX."/eur/A_".date('Ymd').".pdf"; +$pdf->Output($file, "F"); + + +?> \ No newline at end of file diff --git a/pdf/berechnung.php b/pdf/berechnung.php new file mode 100644 index 0000000..ac6423e --- /dev/null +++ b/pdf/berechnung.php @@ -0,0 +1,59 @@ +SetFont('Helvetica', '', 10); +$y = $pdf->GetY(); +if ($y > 240) { + $pdf->AddPage(); +} +$pdf->SetX(40); +$pdf->Cell(135, 4, "Gesamtpreis zuzüglich ".$nt['MwSt']."% gesetzlicher MwSt."); +if ("0" == $take_pos) { + if(isset($ntab['Preis_aus_Pos'])) { + $Gesamtpreis = $ntab['Auftrag_Preis']; + } elseif (isset($nt['Preis_aus_Pos'])) { + $Gesamtpreis = $nt['Auftrag_Preis']; + } +} +$pdf->Cell(25, 4, number_format($Gesamtpreis, '2', ',', '.')." €", 0, 1, 'R'); +if (isset($sqlr)) { + while ($ntr = $resultr->fetch_assoc()) { + $pdf->SetX(40); + if ($ntr['Vorkasse']) { + while (strlen($ntr['ID']) < $_SESSION['Firma']['Stellen']) { + $ntr['ID'] = "0".$ntr['ID']; + } + $pdf->Cell(135, 4, "- Vorkasse aus Rechnung-Nr. ".$ntr['Jahr']."_".$ntr['ID']." vom ".$ntr['Datum']); + } else { + $pdf->Cell(135, 4, "- Abschlag aus Rechnung-Nr. ".$ntr['Jahr']."_".$ntr['ID']." vom ".$ntr['Datum']); + } + $pdf->Cell(25, 4, number_format($ntr['Preis']* (1 - $ntr['Rabatt'] / 100), '2', ',', '.')." €", 0, 1, 'R'); + $Gesamtpreis = $Gesamtpreis - $ntr['Preis']* (1 - $ntr['Rabatt'] / 100); + } + $y = $pdf->GetY(); + $pdf->Line(40,$y,200,$y); + $pdf->SetX(40); + $pdf->SetFont('Helvetica', 'B', 10); + $pdf->Cell(135, 4, "Zwischensumme zuzüglich ".$nt['MwSt']."% gesetzlicher MwSt."); + $pdf->Cell(25, 4, number_format($Gesamtpreis, '2', ',', '.')." €", 0, 1, 'R'); + $pdf->SetFont('Helvetica', '', 10); +} + +if ("rechnung" == $pdf_type) { + if (0 != $nt['Rabatt']) { + $pdf->SetX(40); + $pdf->Cell(135, 4, "- ".$nt['Rabatt']."% Rabatt auf ".number_format($Gesamtpreis, '2', ',', '.')." €"); + $pdf->Cell(25, 4, number_format($Gesamtpreis * $nt['Rabatt'] / 100, '2', ',', '.')." €", 0, 1, 'R'); + $Gesamtpreis = $Gesamtpreis * (1 - $nt['Rabatt'] / 100); + } +} +$pdf->SetX(40); +$pdf->Cell(135, 4, "+".$nt['MwSt']."% gesetzliche MwSt. auf ".number_format($Gesamtpreis, '2', ',', '.')." €"); +$pdf->Cell(25, 4, number_format($Gesamtpreis*$nt['MwSt']/100, '2', ',', '.')." €", 0, 1, 'R'); +$pdf->SetFont('Helvetica', 'B', 10); +$pdf->SetX(40); +$pdf->Cell(135, 4, "Gesamtpreis inklusive ".$nt['MwSt']."% gesetzlicher MwSt."); +$pdf->Cell(25, 4, number_format($Gesamtpreis*(1+$nt['MwSt']/100), '2', ',', '.')." €", 0, 1, 'R'); +$y = $pdf->GetY(); +$pdf->Line(40,$y,200,$y); +$pdf->Write(4, "\n"); +$pdf->SetFont('Helvetica', '', 10); +?> \ No newline at end of file diff --git a/pdf/best_pdf.php b/pdf/best_pdf.php new file mode 100644 index 0000000..7fcbc73 --- /dev/null +++ b/pdf/best_pdf.php @@ -0,0 +1,117 @@ +query($sql); +$nt = $result->fetch_assoc(); +$sqlp = "SELECT * FROM ".PREFIX."_Auftrag_Pos WHERE (Jahr = \"".$Jahr."\" AND Auftrag_ID =\"".$ID."\") ORDER BY Position ASC;"; +$resultp = $db->query($sqlp); +$sqla = "SELECT * FROM Admin WHERE ID = \"".$nt['Admin_ID']."\";"; +$resulta = $db->query($sqla); +$nta = $resulta->fetch_assoc(); +$sqlk = "SELECT * FROM ".PREFIX."_Kontakte WHERE ID = \"".$nt['Kontakt_ID']."\";"; +$resultk = $db->query($sqlk); +$ntk = $resultk->fetch_assoc(); +$sqltext = "SELECT * FROM ".PREFIX."_Texte WHERE section= \"bestaet\";"; +$rtext = $db->query($sqltext); +$nttext = $rtext->fetch_assoc(); + +while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen']) { + $nt['ID'] = "0".$nt['ID']; +} +while (strlen($nt['Angebot_ID']) < $_SESSION['Firma']['Stellen']) { + $nt['Angebot_ID'] = "0".$nt['Angebot_ID']; +} + + +class PDF extends FPDF { + + function Header() { + include "pdf/header.php"; + } + function Footer() { + include "pdf/footer.php"; + } +} + +$pdf=new PDF(); +$pdf->SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); +$pdf->SetLeftMargin(20); +$pdf->SetAutoPageBreak(true, 30); + +if ("2" == $_SESSION['Firma']['Werbung']) { + include "pdf/header2.php"; +} else { + include "pdf/header".$_SESSION['Firma']['ASP'].".php"; +} + +$pdf->SetY(95); +$pdf->Write(4, "Auftrag-Nr.:"); +$pdf->SetX(45); +$pdf->Write(4, $nt['Jahr']."_".$nt['ID']); +$pdf->SetX(138); +$pdf->Cell(15, 4, "Datum:", 0); +$pdf->Cell(47, 4, $nt['Datum'], 0, 1, 'R'); +if ((0 != $nt['Angebot_Jahr']) AND (0 != $nt['Angebot_ID'])) { + if ("1" == $nt['KV']) { + $pdf->Write(4, "KV-Nr.:"); + $pdf->SetX(45); + $pdf->Write(4, $nt['Angebot_Jahr']."_".$nt['Angebot_ID']); + } else { + $pdf->Write(4, "Angebot-Nr.:"); + $pdf->SetX(45); + $pdf->Write(4, $nt['Angebot_Jahr']."_".$nt['Angebot_ID']); + } +} +$pdf->SetRightMargin(10); +$pdf->SetY(107); +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F1_Red'], $_SESSION['Firma']['F1_Green'], $_SESSION['Firma']['F1_Blue']); +$pdf->Write(10, "Auftragsbestätigung\n"); +$pdf->SetFont('Helvetica', '', 10); +$pdf->SetTextColor(0); + +$var = $nttext['Text1']; +include "pdf/replace_token.php"; +include "pdf/replace_bestaet.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var."\n"); + +include "pdf/position_full.php"; + +include "pdf/berechnung.php"; + +$var = $nttext['Text2']; +include "pdf/replace_token.php"; +include "pdf/replace_bestaet.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var); + +if ("" != $nt['Text']) { + $pdf->Write(4, "\n".$nt['Text']."\n"); +} + +$var = $_SESSION['Firma']['Gruss']; +include "pdf/replace_gruss.php"; +include "pdf/replace_bi.php"; +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, "\n".$var); + + +$file = "pdf/".PREFIX."/bestaet/B_".$nt['Jahr']."_".$nt['ID'].".pdf"; +$pdf->Output($file, "F"); + +$var = $nttext['EMail']; +include "pdf/replace_token.php"; +include "pdf/replace_bestaet.php"; + +?> \ No newline at end of file diff --git a/pdf/einist_pdf.php b/pdf/einist_pdf.php new file mode 100644 index 0000000..b5d0819 --- /dev/null +++ b/pdf/einist_pdf.php @@ -0,0 +1,142 @@ +SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); + +$pdf->SetRightMargin(10); +$pdf->SetY(50); +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); + +if ("m" == $_POST['Suche']) { + $pdf->Write(20, "bezahlte Eingangsrechnungen / Gutschriften ".$_POST['Monat']."/".$_POST['Jahr']."\n"); + $sql = "SELECT *, DATE_FORMAT(Re_Datum, '%d.%m.%Y') AS Datum, DATE_FORMAT(Bezahlt_am, '%d.%m.%Y') AS Bezahlt FROM ".PREFIX."_Eingang WHERE (YEAR(Bezahlt_am) = \"".$_POST['Jahr']."\" AND MONTH(Bezahlt_am) = \"".$_POST['Monat']."\") ORDER BY Bezahlt_am ASC;"; + $sqlust = "SELECT SUM(Preis) AS Preis, MwSt FROM ".PREFIX."_Eingang WHERE YEAR(Bezahlt_am) = \"".$_POST['Jahr']."\" AND MONTH(Bezahlt_am) = \"".$_POST['Monat']."\" GROUP BY MwSt DESC;"; + $sqlsum = "SELECT SUM(Preis) AS Preis, SUM(Preis * MwSt / 100) AS MwSt, SUM(Preis * (1 + MwSt / 100)) AS Gesamt FROM ".PREFIX."_Eingang WHERE (YEAR(Bezahlt_am) = \"".$_POST['Jahr']."\" AND MONTH(Bezahlt_am) = \"".$_POST['Monat']."\") ORDER BY Bezahlt_am ASC;"; +} elseif ("q" == $_POST['Suche']) { + $pdf->Write(20, "bezahlte Eingangsrechnungen / Gutschriften Q".$_POST['Quartal']."/".$_POST['Jahr']."\n"); + $sql = "SELECT *, DATE_FORMAT(Re_Datum, '%d.%m.%Y') AS Datum, DATE_FORMAT(Bezahlt_am, '%d.%m.%Y') AS Bezahlt FROM ".PREFIX."_Eingang WHERE (YEAR(Bezahlt_am) = \"".$_POST['Jahr']."\" AND QUARTER(Bezahlt_am) = \"".$_POST['Quartal']."\") ORDER BY Bezahlt_am ASC;"; + $sqlust = "SELECT SUM(Preis) AS Preis, MwSt FROM ".PREFIX."_Eingang WHERE YEAR(Bezahlt_am) = \"".$_POST['Jahr']."\" AND QUARTER(Bezahlt_am) = \"".$_POST['Quartal']."\" GROUP BY MwSt DESC;"; + $sqlsum = "SELECT SUM(Preis) AS Preis, SUM(Preis * MwSt / 100) AS MwSt, SUM(Preis * (1 + MwSt / 100)) AS Gesamt FROM ".PREFIX."_Eingang WHERE (YEAR(Bezahlt_am) = \"".$_POST['Jahr']."\" AND QUARTER(Bezahlt_am) = \"".$_POST['Quartal']."\") ORDER BY Bezahlt_am ASC;"; +} elseif ("j" == $_POST['Suche']) { + $pdf->Write(20, "bezahlte Eingangsrechnungen / Gutschriften ".$_POST['Jahr']."\n"); + $sql = "SELECT *, DATE_FORMAT(Re_Datum, '%d.%m.%Y') AS Datum, DATE_FORMAT(Bezahlt_am, '%d.%m.%Y') AS Bezahlt FROM ".PREFIX."_Eingang WHERE YEAR(Bezahlt_am) = \"".$_POST['Jahr']."\" ORDER BY Bezahlt_am ASC;"; + $sqlust = "SELECT SUM(Preis) AS Preis, MwSt FROM ".PREFIX."_Eingang WHERE YEAR(Bezahlt_am) = \"".$_POST['Jahr']."\" GROUP BY MwSt DESC;"; + $sqlsum = "SELECT SUM(Preis) AS Preis, SUM(Preis * MwSt / 100) AS MwSt, SUM(Preis * (1 + MwSt / 100)) AS Gesamt FROM ".PREFIX."_Eingang WHERE (YEAR(Bezahlt_am) = \"".$_POST['Jahr']."\") ORDER BY Bezahlt_am ASC;"; +} +$result = $db->query($sql); +$resultust = $db->query($sqlust); +$resultsum = $db->query($sqlsum); + +$pdf->SetTextColor(00); +$pdf->SetFont('Helvetica','B', 10); +$pdf->Cell(65, 4, "Firma / Name", 0); +$pdf->Cell(20, 4, "Re-Nr.", 0); +$pdf->Cell(20, 4, "Re-Datum", 0); +$pdf->Cell(20, 4, "Netto", 0, 0, 'R'); +$pdf->Cell(15, 4, "MwSt", 0, 0, 'R'); +$pdf->Cell(20, 4, "Gesamt", 0, 0, 'R'); +$pdf->Cell(20, 4, "Bezahlt", 0, 1, 'R'); +$pdf->Write(4, "\n"); +$y = $pdf->GetY() - 2; +$pdf->Line(20, $y, 200, $y); +$pdf->SetFont('Helvetica','', 8); + +while ($nt = $result->fetch_assoc()) { + $pdf->Cell(65, 4, $nt['Kontakt'], 0); + while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen']) { + $nt['ID'] = "0".$nt['ID']; + } + $pdf->Cell(20, 4, $nt['Re_Nr'], 0); + $pdf->Cell(20, 4, $nt['Datum'], 0); + $pdf->Cell(20, 4, number_format($nt['Preis'], '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Cell(15, 4, number_format($nt['Preis'] * $nt['MwSt'] / 100, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Cell(20, 4, number_format($nt['Preis'] * (1 + $nt['MwSt'] / 100), '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Cell(20, 4, $nt['Bezahlt'], 0, 1, 'R'); +} +$y = $pdf->GetY() + 2; +$pdf->Line(20, $y, 200, $y); +$pdf->SetFont('Helvetica','B', 10); +$pdf->Write(4, "\n"); + +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); + +$pdf->Write(20, "Beträge aufgeschlüsselt nach Mehrwertsteuersatz\n"); +$Sonst_Preis = $Sonst_MwSt = 0; +$pdf->SetTextColor(00); +$pdf->SetFont('Helvetica','B', 10); +$pdf->Cell(105, 4, "", 0); +$pdf->Cell(25, 4, "Netto", 0, 0, 'R'); +$pdf->Cell(25, 4, "MwSt", 0, 0, 'R'); +$pdf->Cell(25, 4, "Gesamt", 0, 0, 'R'); +$pdf->Write(4, "\n\n"); +$y = $pdf->GetY() - 2; +$pdf->Line(20, $y, 200, $y); +$pdf->SetFont('Helvetica','', 10); +$pdf->SetFont('Helvetica','', 10); +$pdf->SetFont('Helvetica','', 10); + +while ($ntust = $resultust->fetch_assoc()) { + if (19 == $ntust['MwSt']) { + $pdf->Cell(105, 4, "Eingangsrechnungen / Gutschriften zu 19% MwSt."); + $pdf->Cell(25, 4, number_format($ntust['Preis'], '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','B', 10); + $pdf->Cell(25, 4, number_format($ntust['Preis'] * 0.19, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','', 10); + $pdf->Cell(25, 4, number_format($ntust['Preis'] * 1.19, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); + } elseif (7 == $ntust['MwSt']) { + $pdf->Cell(105, 4, "Eingangsrechnungen / Gutschriften zu 7% MwSt."); + $pdf->Cell(25, 4, number_format($ntust['Preis'], '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','B', 10); + $pdf->Cell(25, 4, number_format($ntust['Preis'] * 0.07, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','', 10); + $pdf->Cell(25, 4, number_format($ntust['Preis'] * 1.07, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); + } elseif (0 == $ntust['MwSt']) { + $pdf->Cell(105, 4, "Umsatzsteuerfreie Eingangsrechnungen / Gutschriften"); + $pdf->Cell(25, 4, number_format($ntust['Preis'], '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','B', 10); + $pdf->Cell(25, 4, number_format(0, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','', 10); + $pdf->Cell(25, 4, number_format($ntust['Preis'], '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); + } else { + $Sonst_Preis = $Sonst_Preis + $ntust['Preis']; + $Sonst_MwSt = $Sonst_MwSt + $ntust['Preis'] * $ntust['MwSt'] / 100; + } +} +if (0 != $Sonst_Preis) { + $pdf->Cell(105, 4, "Eingangsrechnungen / Gutschriften zu anderen Mehrwertsteuersätzen"); + $pdf->Cell(25, 4, number_format($Sonst_Preis, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','B', 10); + $pdf->Cell(25, 4, number_format($Sonst_MwSt, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','', 10); + $pdf->Cell(25, 4, number_format($Sonst_Preis + $Sonst_MwSt, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); +} +$ntsum = $resultsum->fetch_assoc(); +$pdf->Cell(105, 4, "Gesamt", 0); +$pdf->Cell(25, 4, number_format($ntsum['Preis'], '2', ',', '.')." €", 0, 0, 'R'); +$pdf->SetFont('Helvetica','B', 10); +$pdf->Cell(25, 4, number_format($ntsum['MwSt'], '2', ',', '.')." €", 0, 0, 'R'); +$pdf->SetFont('Helvetica','', 10); +$pdf->Cell(25, 4, number_format($ntsum['Gesamt'], '2', ',', '.')." €", 0, 0, 'R'); + + +$file = "pdf/".PREFIX."/eur/E_".date('Ymd').".pdf"; +$pdf->Output($file, "F"); + + +?> \ No newline at end of file diff --git a/pdf/einsoll_pdf.php b/pdf/einsoll_pdf.php new file mode 100644 index 0000000..6d547c6 --- /dev/null +++ b/pdf/einsoll_pdf.php @@ -0,0 +1,140 @@ +SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); + +$pdf->SetRightMargin(10); +$pdf->SetY(50); +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); + +if ("m" == $_POST['Suche']) { + $pdf->Write(20, "erstellte Eingangsrechnungen / Gutschriften ".$_POST['Monat']."/".$_POST['Jahr']."\n"); + $sql = "SELECT *, DATE_FORMAT(Re_Datum, '%d.%m.%Y') AS Datum, DATE_FORMAT(Bezahlt_am, '%d.%m.%Y') AS Bezahlt FROM ".PREFIX."_Eingang WHERE (YEAR(Re_Datum) = \"".$_POST['Jahr']."\" AND MONTH(Re_Datum) = \"".$_POST['Monat']."\") ORDER BY Re_Datum ASC;"; + $sqlust = "SELECT SUM(Preis) AS Preis, MwSt FROM ".PREFIX."_Eingang WHERE YEAR(Re_Datum) = \"".$_POST['Jahr']."\" AND MONTH(Re_Datum) = \"".$_POST['Monat']."\" GROUP BY MwSt DESC;"; + $sqlsum = "SELECT SUM(Preis) AS Preis, SUM(Preis * MwSt / 100) AS MwSt, SUM(Preis * (1 + MwSt / 100)) AS Gesamt FROM ".PREFIX."_Eingang WHERE (YEAR(Re_Datum) = \"".$_POST['Jahr']."\" AND MONTH(Re_Datum) = \"".$_POST['Monat']."\") ORDER BY Re_Datum ASC;"; +} elseif ("q" == $_POST['Suche']) { + $pdf->Write(20, "erstellte Eingangsrechnungen / Gutschriften Q".$_POST['Quartal']."/".$_POST['Jahr']."\n"); + $sql = "SELECT *, DATE_FORMAT(Re_Datum, '%d.%m.%Y') AS Datum, DATE_FORMAT(Bezahlt_am, '%d.%m.%Y') AS Bezahlt FROM ".PREFIX."_Eingang WHERE (YEAR(Re_Datum) = \"".$_POST['Jahr']."\" AND QUARTER(Re_Datum) = \"".$_POST['Quartal']."\") ORDER BY Re_Datum ASC;"; + $sqlust = "SELECT SUM(Preis) AS Preis, MwSt FROM ".PREFIX."_Eingang WHERE YEAR(Re_Datum) = \"".$_POST['Jahr']."\" AND QUARTER(Re_Datum) = \"".$_POST['Quartal']."\" GROUP BY MwSt DESC;"; + $sqlsum = "SELECT SUM(Preis) AS Preis, SUM(Preis * MwSt / 100) AS MwSt, SUM(Preis * (1 + MwSt / 100)) AS Gesamt FROM ".PREFIX."_Eingang WHERE (YEAR(Re_Datum) = \"".$_POST['Jahr']."\" AND QUARTER(Re_Datum) = \"".$_POST['Quartal']."\") ORDER BY Re_Datum ASC;"; +} elseif ("j" == $_POST['Suche']) { + $pdf->Write(20, "erstellte Eingangsrechnungen / Gutschriften ".$_POST['Jahr']."\n"); + $sql = "SELECT *, DATE_FORMAT(Re_Datum, '%d.%m.%Y') AS Datum, DATE_FORMAT(Bezahlt_am, '%d.%m.%Y') AS Bezahlt FROM ".PREFIX."_Eingang WHERE YEAR(Re_Datum) = \"".$_POST['Jahr']."\" ORDER BY Re_Datum ASC;"; + $sqlust = "SELECT SUM(Preis) AS Preis, MwSt FROM ".PREFIX."_Eingang WHERE YEAR(Re_Datum) = \"".$_POST['Jahr']."\" GROUP BY MwSt DESC;"; + $sqlsum = "SELECT SUM(Preis) AS Preis, SUM(Preis * MwSt / 100) AS MwSt, SUM(Preis * (1 + MwSt / 100)) AS Gesamt FROM ".PREFIX."_Eingang WHERE (YEAR(Re_Datum) = \"".$_POST['Jahr']."\") ORDER BY Re_Datum ASC;"; +} +$result = $db->query($sql); +$resultust = $db->query($sqlust); +$resultsum = $db->query($sqlsum); + +$pdf->SetTextColor(00); +$pdf->SetFont('Helvetica','B', 10); +$pdf->Cell(85, 4, "Firma / Name", 0); +$pdf->Cell(20, 4, "Re-Nr.", 0); +$pdf->Cell(20, 4, "Re-Datum", 0); +$pdf->Cell(20, 4, "Netto", 0, 0, 'R'); +$pdf->Cell(15, 4, "MwSt", 0, 0, 'R'); +$pdf->Cell(20, 4, "Gesamt", 0, 1, 'R'); +$pdf->Write(4, "\n"); +$y = $pdf->GetY() - 2; +$pdf->Line(20, $y, 200, $y); +$pdf->SetFont('Helvetica','', 8); + +while ($nt = $result->fetch_assoc()) { + $pdf->Cell(85, 4, $nt['Kontakt'], 0); + while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen']) { + $nt['ID'] = "0".$nt['ID']; + } + $pdf->Cell(20, 4, $nt['Re_Nr'], 0); + $pdf->Cell(20, 4, $nt['Datum'], 0); + $pdf->Cell(20, 4, number_format($nt['Preis'], '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Cell(15, 4, number_format($nt['Preis'] * $nt['MwSt'] / 100, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Cell(20, 4, number_format($nt['Preis'] * (1 + $nt['MwSt'] / 100), '2', ',', '.')." €", 0, 1, 'R'); +} +$y = $pdf->GetY() + 2; +$pdf->Line(20, $y, 200, $y); +$pdf->SetFont('Helvetica','B', 10); +$pdf->Write(4, "\n"); + +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); + +$pdf->Write(20, "Beträge aufgeschlüsselt nach Mehrwertsteuersatz\n"); +$Sonst_Preis = $Sonst_MwSt = 0; +$pdf->SetTextColor(00); +$pdf->SetFont('Helvetica','B', 10); +$pdf->Cell(105, 4, "", 0); +$pdf->Cell(25, 4, "Netto", 0, 0, 'R'); +$pdf->Cell(25, 4, "MwSt", 0, 0, 'R'); +$pdf->Cell(25, 4, "Gesamt", 0, 0, 'R'); +$pdf->Write(4, "\n\n"); +$y = $pdf->GetY() - 2; +$pdf->Line(20, $y, 200, $y); +$pdf->SetFont('Helvetica','', 10); +$pdf->SetFont('Helvetica','', 10); +$pdf->SetFont('Helvetica','', 10); + +while ($ntust = $resultust->fetch_assoc()) { + if (19 == $ntust['MwSt']) { + $pdf->Cell(105, 4, "Eingangsrechnungen / Gutschriften zu 19% MwSt."); + $pdf->Cell(25, 4, number_format($ntust['Preis'], '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','B', 10); + $pdf->Cell(25, 4, number_format($ntust['Preis'] * 0.19, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','', 10); + $pdf->Cell(25, 4, number_format($ntust['Preis'] * 1.19, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); + } elseif (7 == $ntust['MwSt']) { + $pdf->Cell(105, 4, "Eingangsrechnungen / Gutschriften zu 7% MwSt."); + $pdf->Cell(25, 4, number_format($ntust['Preis'], '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','B', 10); + $pdf->Cell(25, 4, number_format($ntust['Preis'] * 0.07, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','', 10); + $pdf->Cell(25, 4, number_format($ntust['Preis'] * 1.07, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); + } elseif (0 == $ntust['MwSt']) { + $pdf->Cell(105, 4, "Umsatzsteuerfreie Eingangsrechnungen / Gutschriften"); + $pdf->Cell(25, 4, number_format($ntust['Preis'], '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','B', 10); + $pdf->Cell(25, 4, number_format(0, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','', 10); + $pdf->Cell(25, 4, number_format($ntust['Preis'], '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); + } else { + $Sonst_Preis = $Sonst_Preis + $ntust['Preis']; + $Sonst_MwSt = $Sonst_MwSt + $ntust['Preis'] * $ntust['MwSt'] / 100; + } +} +if (0 != $Sonst_Preis) { + $pdf->Cell(105, 4, "Eingangsrechnungen / Gutschriften zu anderen Mehrwertsteuersätzen"); + $pdf->Cell(25, 4, number_format($Sonst_Preis, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','B', 10); + $pdf->Cell(25, 4, number_format($Sonst_MwSt, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->SetFont('Helvetica','', 10); + $pdf->Cell(25, 4, number_format($Sonst_Preis + $Sonst_MwSt, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); +} +$ntsum = $resultsum->fetch_assoc(); +$pdf->Cell(105, 4, "Gesamt", 0); +$pdf->Cell(25, 4, number_format($ntsum['Preis'], '2', ',', '.')." €", 0, 0, 'R'); +$pdf->SetFont('Helvetica','B', 10); +$pdf->Cell(25, 4, number_format($ntsum['MwSt'], '2', ',', '.')." €", 0, 0, 'R'); +$pdf->SetFont('Helvetica','', 10); +$pdf->Cell(25, 4, number_format($ntsum['Gesamt'], '2', ',', '.')." €", 0, 0, 'R'); + + +$file = "pdf/".PREFIX."/eur/E_".date('Ymd').".pdf"; +$pdf->Output($file, "F"); + + +?> \ No newline at end of file diff --git a/pdf/font/calibri.php b/pdf/font/calibri.php new file mode 100644 index 0000000..36ea073 --- /dev/null +++ b/pdf/font/calibri.php @@ -0,0 +1,24 @@ +750,'Descent'=>-250,'CapHeight'=>635,'Flags'=>32,'FontBBox'=>'[-32 -190 859 847]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>507); +$up=-113; +$ut=65; +$cw=array( + chr(0)=>507,chr(1)=>507,chr(2)=>507,chr(3)=>507,chr(4)=>507,chr(5)=>507,chr(6)=>507,chr(7)=>507,chr(8)=>507,chr(9)=>507,chr(10)=>507,chr(11)=>507,chr(12)=>507,chr(13)=>507,chr(14)=>507,chr(15)=>507,chr(16)=>507,chr(17)=>507,chr(18)=>507,chr(19)=>507,chr(20)=>507,chr(21)=>507, + chr(22)=>507,chr(23)=>507,chr(24)=>507,chr(25)=>507,chr(26)=>507,chr(27)=>507,chr(28)=>507,chr(29)=>507,chr(30)=>507,chr(31)=>507,' '=>226,'!'=>326,'"'=>401,'#'=>498,'$'=>507,'%'=>715,'&'=>682,'\''=>221,'('=>303,')'=>303,'*'=>498,'+'=>498, + ','=>250,'-'=>306,'.'=>252,'/'=>386,'0'=>507,'1'=>507,'2'=>507,'3'=>507,'4'=>507,'5'=>507,'6'=>507,'7'=>507,'8'=>507,'9'=>507,':'=>268,';'=>268,'<'=>498,'='=>498,'>'=>498,'?'=>463,'@'=>894,'A'=>579, + 'B'=>544,'C'=>533,'D'=>615,'E'=>488,'F'=>459,'G'=>631,'H'=>623,'I'=>252,'J'=>319,'K'=>520,'L'=>420,'M'=>855,'N'=>646,'O'=>662,'P'=>517,'Q'=>673,'R'=>543,'S'=>459,'T'=>487,'U'=>642,'V'=>567,'W'=>890, + 'X'=>519,'Y'=>487,'Z'=>468,'['=>307,'\\'=>386,']'=>307,'^'=>498,'_'=>498,'`'=>291,'a'=>479,'b'=>525,'c'=>423,'d'=>525,'e'=>498,'f'=>305,'g'=>471,'h'=>525,'i'=>229,'j'=>239,'k'=>455,'l'=>229,'m'=>799, + 'n'=>525,'o'=>527,'p'=>525,'q'=>525,'r'=>349,'s'=>391,'t'=>335,'u'=>525,'v'=>452,'w'=>715,'x'=>433,'y'=>453,'z'=>395,'{'=>314,'|'=>460,'}'=>314,'~'=>498,chr(127)=>507,chr(128)=>507,chr(129)=>507,chr(130)=>507,chr(131)=>507, + chr(132)=>507,chr(133)=>507,chr(134)=>507,chr(135)=>507,chr(136)=>507,chr(137)=>507,chr(138)=>507,chr(139)=>507,chr(140)=>507,chr(141)=>507,chr(142)=>507,chr(143)=>507,chr(144)=>507,chr(145)=>507,chr(146)=>507,chr(147)=>507,chr(148)=>507,chr(149)=>507,chr(150)=>507,chr(151)=>507,chr(152)=>507,chr(153)=>507, + chr(154)=>507,chr(155)=>507,chr(156)=>507,chr(157)=>507,chr(158)=>507,chr(159)=>507,chr(160)=>226,chr(161)=>326,chr(162)=>498,chr(163)=>507,chr(164)=>498,chr(165)=>507,chr(166)=>498,chr(167)=>498,chr(168)=>393,chr(169)=>834,chr(170)=>402,chr(171)=>512,chr(172)=>498,chr(173)=>306,chr(174)=>507,chr(175)=>394, + chr(176)=>339,chr(177)=>498,chr(178)=>336,chr(179)=>334,chr(180)=>292,chr(181)=>550,chr(182)=>586,chr(183)=>252,chr(184)=>307,chr(185)=>246,chr(186)=>422,chr(187)=>512,chr(188)=>636,chr(189)=>671,chr(190)=>675,chr(191)=>463,chr(192)=>579,chr(193)=>579,chr(194)=>579,chr(195)=>579,chr(196)=>579,chr(197)=>579, + chr(198)=>763,chr(199)=>533,chr(200)=>488,chr(201)=>488,chr(202)=>488,chr(203)=>488,chr(204)=>252,chr(205)=>252,chr(206)=>252,chr(207)=>252,chr(208)=>625,chr(209)=>646,chr(210)=>662,chr(211)=>662,chr(212)=>662,chr(213)=>662,chr(214)=>662,chr(215)=>498,chr(216)=>664,chr(217)=>642,chr(218)=>642,chr(219)=>642, + chr(220)=>642,chr(221)=>487,chr(222)=>517,chr(223)=>527,chr(224)=>479,chr(225)=>479,chr(226)=>479,chr(227)=>479,chr(228)=>479,chr(229)=>479,chr(230)=>773,chr(231)=>423,chr(232)=>498,chr(233)=>498,chr(234)=>498,chr(235)=>498,chr(236)=>229,chr(237)=>229,chr(238)=>229,chr(239)=>229,chr(240)=>525,chr(241)=>525, + chr(242)=>527,chr(243)=>527,chr(244)=>527,chr(245)=>527,chr(246)=>527,chr(247)=>498,chr(248)=>529,chr(249)=>525,chr(250)=>525,chr(251)=>525,chr(252)=>525,chr(253)=>453,chr(254)=>525,chr(255)=>453); +$enc='ISO-8859-1'; +$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef'; +$file='calibri.z'; +$originalsize=352736; +?> diff --git a/pdf/font/calibrib.php b/pdf/font/calibrib.php new file mode 100644 index 0000000..c109a66 --- /dev/null +++ b/pdf/font/calibrib.php @@ -0,0 +1,24 @@ +750,'Descent'=>-250,'CapHeight'=>635,'Flags'=>32,'FontBBox'=>'[-42 -186 883 856]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>507); +$up=-87; +$ut=91; +$cw=array( + chr(0)=>507,chr(1)=>507,chr(2)=>507,chr(3)=>507,chr(4)=>507,chr(5)=>507,chr(6)=>507,chr(7)=>507,chr(8)=>507,chr(9)=>507,chr(10)=>507,chr(11)=>507,chr(12)=>507,chr(13)=>507,chr(14)=>507,chr(15)=>507,chr(16)=>507,chr(17)=>507,chr(18)=>507,chr(19)=>507,chr(20)=>507,chr(21)=>507, + chr(22)=>507,chr(23)=>507,chr(24)=>507,chr(25)=>507,chr(26)=>507,chr(27)=>507,chr(28)=>507,chr(29)=>507,chr(30)=>507,chr(31)=>507,' '=>226,'!'=>326,'"'=>438,'#'=>498,'$'=>507,'%'=>729,'&'=>705,'\''=>233,'('=>312,')'=>312,'*'=>498,'+'=>498, + ','=>258,'-'=>306,'.'=>267,'/'=>430,'0'=>507,'1'=>507,'2'=>507,'3'=>507,'4'=>507,'5'=>507,'6'=>507,'7'=>507,'8'=>507,'9'=>507,':'=>276,';'=>276,'<'=>498,'='=>498,'>'=>498,'?'=>463,'@'=>898,'A'=>606, + 'B'=>561,'C'=>529,'D'=>630,'E'=>488,'F'=>459,'G'=>637,'H'=>631,'I'=>267,'J'=>331,'K'=>547,'L'=>423,'M'=>874,'N'=>659,'O'=>676,'P'=>532,'Q'=>686,'R'=>563,'S'=>473,'T'=>495,'U'=>653,'V'=>591,'W'=>906, + 'X'=>551,'Y'=>520,'Z'=>478,'['=>325,'\\'=>430,']'=>325,'^'=>498,'_'=>498,'`'=>300,'a'=>494,'b'=>537,'c'=>418,'d'=>537,'e'=>503,'f'=>316,'g'=>474,'h'=>537,'i'=>246,'j'=>255,'k'=>480,'l'=>246,'m'=>813, + 'n'=>537,'o'=>538,'p'=>537,'q'=>537,'r'=>355,'s'=>399,'t'=>347,'u'=>537,'v'=>473,'w'=>745,'x'=>459,'y'=>474,'z'=>397,'{'=>344,'|'=>475,'}'=>344,'~'=>498,chr(127)=>507,chr(128)=>507,chr(129)=>507,chr(130)=>507,chr(131)=>507, + chr(132)=>507,chr(133)=>507,chr(134)=>507,chr(135)=>507,chr(136)=>507,chr(137)=>507,chr(138)=>507,chr(139)=>507,chr(140)=>507,chr(141)=>507,chr(142)=>507,chr(143)=>507,chr(144)=>507,chr(145)=>507,chr(146)=>507,chr(147)=>507,chr(148)=>507,chr(149)=>507,chr(150)=>507,chr(151)=>507,chr(152)=>507,chr(153)=>507, + chr(154)=>507,chr(155)=>507,chr(156)=>507,chr(157)=>507,chr(158)=>507,chr(159)=>507,chr(160)=>226,chr(161)=>326,chr(162)=>498,chr(163)=>507,chr(164)=>498,chr(165)=>507,chr(166)=>498,chr(167)=>498,chr(168)=>415,chr(169)=>834,chr(170)=>416,chr(171)=>539,chr(172)=>498,chr(173)=>306,chr(174)=>507,chr(175)=>390, + chr(176)=>342,chr(177)=>498,chr(178)=>338,chr(179)=>336,chr(180)=>301,chr(181)=>563,chr(182)=>598,chr(183)=>268,chr(184)=>303,chr(185)=>252,chr(186)=>435,chr(187)=>539,chr(188)=>658,chr(189)=>691,chr(190)=>702,chr(191)=>463,chr(192)=>606,chr(193)=>606,chr(194)=>606,chr(195)=>606,chr(196)=>606,chr(197)=>606, + chr(198)=>775,chr(199)=>529,chr(200)=>488,chr(201)=>488,chr(202)=>488,chr(203)=>488,chr(204)=>267,chr(205)=>267,chr(206)=>267,chr(207)=>267,chr(208)=>639,chr(209)=>659,chr(210)=>676,chr(211)=>676,chr(212)=>676,chr(213)=>676,chr(214)=>676,chr(215)=>498,chr(216)=>681,chr(217)=>653,chr(218)=>653,chr(219)=>653, + chr(220)=>653,chr(221)=>520,chr(222)=>532,chr(223)=>555,chr(224)=>494,chr(225)=>494,chr(226)=>494,chr(227)=>494,chr(228)=>494,chr(229)=>494,chr(230)=>775,chr(231)=>418,chr(232)=>503,chr(233)=>503,chr(234)=>503,chr(235)=>503,chr(236)=>246,chr(237)=>246,chr(238)=>246,chr(239)=>246,chr(240)=>537,chr(241)=>537, + chr(242)=>538,chr(243)=>538,chr(244)=>538,chr(245)=>538,chr(246)=>538,chr(247)=>498,chr(248)=>544,chr(249)=>537,chr(250)=>537,chr(251)=>537,chr(252)=>537,chr(253)=>474,chr(254)=>537,chr(255)=>474); +$enc='ISO-8859-1'; +$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef'; +$file='calibrib.z'; +$originalsize=351544; +?> diff --git a/pdf/font/courier.php b/pdf/font/courier.php new file mode 100644 index 0000000..913f9a4 --- /dev/null +++ b/pdf/font/courier.php @@ -0,0 +1,7 @@ + diff --git a/pdf/font/helvetica.php b/pdf/font/helvetica.php new file mode 100644 index 0000000..ca94cdf --- /dev/null +++ b/pdf/font/helvetica.php @@ -0,0 +1,15 @@ +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); +?> diff --git a/pdf/font/helveticab.php b/pdf/font/helveticab.php new file mode 100644 index 0000000..276cfa8 --- /dev/null +++ b/pdf/font/helveticab.php @@ -0,0 +1,15 @@ +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); +?> diff --git a/pdf/font/helveticabi.php b/pdf/font/helveticabi.php new file mode 100644 index 0000000..8d21774 --- /dev/null +++ b/pdf/font/helveticabi.php @@ -0,0 +1,15 @@ +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); +?> diff --git a/pdf/font/helveticai.php b/pdf/font/helveticai.php new file mode 100644 index 0000000..88bf437 --- /dev/null +++ b/pdf/font/helveticai.php @@ -0,0 +1,15 @@ +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); +?> diff --git a/pdf/font/makefont/cp1250.map b/pdf/font/makefont/cp1250.map new file mode 100644 index 0000000..ec110af --- /dev/null +++ b/pdf/font/makefont/cp1250.map @@ -0,0 +1,251 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+015A Sacute +!8D U+0164 Tcaron +!8E U+017D Zcaron +!8F U+0179 Zacute +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+015B sacute +!9D U+0165 tcaron +!9E U+017E zcaron +!9F U+017A zacute +!A0 U+00A0 space +!A1 U+02C7 caron +!A2 U+02D8 breve +!A3 U+0141 Lslash +!A4 U+00A4 currency +!A5 U+0104 Aogonek +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+015E Scedilla +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+02DB ogonek +!B3 U+0142 lslash +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+0105 aogonek +!BA U+015F scedilla +!BB U+00BB guillemotright +!BC U+013D Lcaron +!BD U+02DD hungarumlaut +!BE U+013E lcaron +!BF U+017C zdotaccent +!C0 U+0154 Racute +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0139 Lacute +!C6 U+0106 Cacute +!C7 U+00C7 Ccedilla +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+011A Ecaron +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+010E Dcaron +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+0147 Ncaron +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0158 Rcaron +!D9 U+016E Uring +!DA U+00DA Uacute +!DB U+0170 Uhungarumlaut +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+0162 Tcommaaccent +!DF U+00DF germandbls +!E0 U+0155 racute +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+013A lacute +!E6 U+0107 cacute +!E7 U+00E7 ccedilla +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+011B ecaron +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+010F dcaron +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+0148 ncaron +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0159 rcaron +!F9 U+016F uring +!FA U+00FA uacute +!FB U+0171 uhungarumlaut +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+0163 tcommaaccent +!FF U+02D9 dotaccent diff --git a/pdf/font/makefont/cp1251.map b/pdf/font/makefont/cp1251.map new file mode 100644 index 0000000..de6a198 --- /dev/null +++ b/pdf/font/makefont/cp1251.map @@ -0,0 +1,255 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0402 afii10051 +!81 U+0403 afii10052 +!82 U+201A quotesinglbase +!83 U+0453 afii10100 +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+20AC Euro +!89 U+2030 perthousand +!8A U+0409 afii10058 +!8B U+2039 guilsinglleft +!8C U+040A afii10059 +!8D U+040C afii10061 +!8E U+040B afii10060 +!8F U+040F afii10145 +!90 U+0452 afii10099 +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9A U+0459 afii10106 +!9B U+203A guilsinglright +!9C U+045A afii10107 +!9D U+045C afii10109 +!9E U+045B afii10108 +!9F U+045F afii10193 +!A0 U+00A0 space +!A1 U+040E afii10062 +!A2 U+045E afii10110 +!A3 U+0408 afii10057 +!A4 U+00A4 currency +!A5 U+0490 afii10050 +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+0401 afii10023 +!A9 U+00A9 copyright +!AA U+0404 afii10053 +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+0407 afii10056 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+0406 afii10055 +!B3 U+0456 afii10103 +!B4 U+0491 afii10098 +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+0451 afii10071 +!B9 U+2116 afii61352 +!BA U+0454 afii10101 +!BB U+00BB guillemotright +!BC U+0458 afii10105 +!BD U+0405 afii10054 +!BE U+0455 afii10102 +!BF U+0457 afii10104 +!C0 U+0410 afii10017 +!C1 U+0411 afii10018 +!C2 U+0412 afii10019 +!C3 U+0413 afii10020 +!C4 U+0414 afii10021 +!C5 U+0415 afii10022 +!C6 U+0416 afii10024 +!C7 U+0417 afii10025 +!C8 U+0418 afii10026 +!C9 U+0419 afii10027 +!CA U+041A afii10028 +!CB U+041B afii10029 +!CC U+041C afii10030 +!CD U+041D afii10031 +!CE U+041E afii10032 +!CF U+041F afii10033 +!D0 U+0420 afii10034 +!D1 U+0421 afii10035 +!D2 U+0422 afii10036 +!D3 U+0423 afii10037 +!D4 U+0424 afii10038 +!D5 U+0425 afii10039 +!D6 U+0426 afii10040 +!D7 U+0427 afii10041 +!D8 U+0428 afii10042 +!D9 U+0429 afii10043 +!DA U+042A afii10044 +!DB U+042B afii10045 +!DC U+042C afii10046 +!DD U+042D afii10047 +!DE U+042E afii10048 +!DF U+042F afii10049 +!E0 U+0430 afii10065 +!E1 U+0431 afii10066 +!E2 U+0432 afii10067 +!E3 U+0433 afii10068 +!E4 U+0434 afii10069 +!E5 U+0435 afii10070 +!E6 U+0436 afii10072 +!E7 U+0437 afii10073 +!E8 U+0438 afii10074 +!E9 U+0439 afii10075 +!EA U+043A afii10076 +!EB U+043B afii10077 +!EC U+043C afii10078 +!ED U+043D afii10079 +!EE U+043E afii10080 +!EF U+043F afii10081 +!F0 U+0440 afii10082 +!F1 U+0441 afii10083 +!F2 U+0442 afii10084 +!F3 U+0443 afii10085 +!F4 U+0444 afii10086 +!F5 U+0445 afii10087 +!F6 U+0446 afii10088 +!F7 U+0447 afii10089 +!F8 U+0448 afii10090 +!F9 U+0449 afii10091 +!FA U+044A afii10092 +!FB U+044B afii10093 +!FC U+044C afii10094 +!FD U+044D afii10095 +!FE U+044E afii10096 +!FF U+044F afii10097 diff --git a/pdf/font/makefont/cp1252.map b/pdf/font/makefont/cp1252.map new file mode 100644 index 0000000..dd490e5 --- /dev/null +++ b/pdf/font/makefont/cp1252.map @@ -0,0 +1,251 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+0152 OE +!8E U+017D Zcaron +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+0153 oe +!9E U+017E zcaron +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/pdf/font/makefont/cp1253.map b/pdf/font/makefont/cp1253.map new file mode 100644 index 0000000..4bd826f --- /dev/null +++ b/pdf/font/makefont/cp1253.map @@ -0,0 +1,239 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9B U+203A guilsinglright +!A0 U+00A0 space +!A1 U+0385 dieresistonos +!A2 U+0386 Alphatonos +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+2015 afii00208 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+0384 tonos +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+0388 Epsilontonos +!B9 U+0389 Etatonos +!BA U+038A Iotatonos +!BB U+00BB guillemotright +!BC U+038C Omicrontonos +!BD U+00BD onehalf +!BE U+038E Upsilontonos +!BF U+038F Omegatonos +!C0 U+0390 iotadieresistonos +!C1 U+0391 Alpha +!C2 U+0392 Beta +!C3 U+0393 Gamma +!C4 U+0394 Delta +!C5 U+0395 Epsilon +!C6 U+0396 Zeta +!C7 U+0397 Eta +!C8 U+0398 Theta +!C9 U+0399 Iota +!CA U+039A Kappa +!CB U+039B Lambda +!CC U+039C Mu +!CD U+039D Nu +!CE U+039E Xi +!CF U+039F Omicron +!D0 U+03A0 Pi +!D1 U+03A1 Rho +!D3 U+03A3 Sigma +!D4 U+03A4 Tau +!D5 U+03A5 Upsilon +!D6 U+03A6 Phi +!D7 U+03A7 Chi +!D8 U+03A8 Psi +!D9 U+03A9 Omega +!DA U+03AA Iotadieresis +!DB U+03AB Upsilondieresis +!DC U+03AC alphatonos +!DD U+03AD epsilontonos +!DE U+03AE etatonos +!DF U+03AF iotatonos +!E0 U+03B0 upsilondieresistonos +!E1 U+03B1 alpha +!E2 U+03B2 beta +!E3 U+03B3 gamma +!E4 U+03B4 delta +!E5 U+03B5 epsilon +!E6 U+03B6 zeta +!E7 U+03B7 eta +!E8 U+03B8 theta +!E9 U+03B9 iota +!EA U+03BA kappa +!EB U+03BB lambda +!EC U+03BC mu +!ED U+03BD nu +!EE U+03BE xi +!EF U+03BF omicron +!F0 U+03C0 pi +!F1 U+03C1 rho +!F2 U+03C2 sigma1 +!F3 U+03C3 sigma +!F4 U+03C4 tau +!F5 U+03C5 upsilon +!F6 U+03C6 phi +!F7 U+03C7 chi +!F8 U+03C8 psi +!F9 U+03C9 omega +!FA U+03CA iotadieresis +!FB U+03CB upsilondieresis +!FC U+03CC omicrontonos +!FD U+03CD upsilontonos +!FE U+03CE omegatonos diff --git a/pdf/font/makefont/cp1254.map b/pdf/font/makefont/cp1254.map new file mode 100644 index 0000000..829473b --- /dev/null +++ b/pdf/font/makefont/cp1254.map @@ -0,0 +1,249 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+0152 OE +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+0153 oe +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+011E Gbreve +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0130 Idotaccent +!DE U+015E Scedilla +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+011F gbreve +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0131 dotlessi +!FE U+015F scedilla +!FF U+00FF ydieresis diff --git a/pdf/font/makefont/cp1255.map b/pdf/font/makefont/cp1255.map new file mode 100644 index 0000000..079e10c --- /dev/null +++ b/pdf/font/makefont/cp1255.map @@ -0,0 +1,233 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9B U+203A guilsinglright +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+20AA afii57636 +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00D7 multiply +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD sfthyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 middot +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00F7 divide +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+05B0 afii57799 +!C1 U+05B1 afii57801 +!C2 U+05B2 afii57800 +!C3 U+05B3 afii57802 +!C4 U+05B4 afii57793 +!C5 U+05B5 afii57794 +!C6 U+05B6 afii57795 +!C7 U+05B7 afii57798 +!C8 U+05B8 afii57797 +!C9 U+05B9 afii57806 +!CB U+05BB afii57796 +!CC U+05BC afii57807 +!CD U+05BD afii57839 +!CE U+05BE afii57645 +!CF U+05BF afii57841 +!D0 U+05C0 afii57842 +!D1 U+05C1 afii57804 +!D2 U+05C2 afii57803 +!D3 U+05C3 afii57658 +!D4 U+05F0 afii57716 +!D5 U+05F1 afii57717 +!D6 U+05F2 afii57718 +!D7 U+05F3 gereshhebrew +!D8 U+05F4 gershayimhebrew +!E0 U+05D0 afii57664 +!E1 U+05D1 afii57665 +!E2 U+05D2 afii57666 +!E3 U+05D3 afii57667 +!E4 U+05D4 afii57668 +!E5 U+05D5 afii57669 +!E6 U+05D6 afii57670 +!E7 U+05D7 afii57671 +!E8 U+05D8 afii57672 +!E9 U+05D9 afii57673 +!EA U+05DA afii57674 +!EB U+05DB afii57675 +!EC U+05DC afii57676 +!ED U+05DD afii57677 +!EE U+05DE afii57678 +!EF U+05DF afii57679 +!F0 U+05E0 afii57680 +!F1 U+05E1 afii57681 +!F2 U+05E2 afii57682 +!F3 U+05E3 afii57683 +!F4 U+05E4 afii57684 +!F5 U+05E5 afii57685 +!F6 U+05E6 afii57686 +!F7 U+05E7 afii57687 +!F8 U+05E8 afii57688 +!F9 U+05E9 afii57689 +!FA U+05EA afii57690 +!FD U+200E afii299 +!FE U+200F afii300 diff --git a/pdf/font/makefont/cp1257.map b/pdf/font/makefont/cp1257.map new file mode 100644 index 0000000..2f2ecfa --- /dev/null +++ b/pdf/font/makefont/cp1257.map @@ -0,0 +1,244 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!8D U+00A8 dieresis +!8E U+02C7 caron +!8F U+00B8 cedilla +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9B U+203A guilsinglright +!9D U+00AF macron +!9E U+02DB ogonek +!A0 U+00A0 space +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00D8 Oslash +!A9 U+00A9 copyright +!AA U+0156 Rcommaaccent +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00C6 AE +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00F8 oslash +!B9 U+00B9 onesuperior +!BA U+0157 rcommaaccent +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00E6 ae +!C0 U+0104 Aogonek +!C1 U+012E Iogonek +!C2 U+0100 Amacron +!C3 U+0106 Cacute +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+0118 Eogonek +!C7 U+0112 Emacron +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0179 Zacute +!CB U+0116 Edotaccent +!CC U+0122 Gcommaaccent +!CD U+0136 Kcommaaccent +!CE U+012A Imacron +!CF U+013B Lcommaaccent +!D0 U+0160 Scaron +!D1 U+0143 Nacute +!D2 U+0145 Ncommaaccent +!D3 U+00D3 Oacute +!D4 U+014C Omacron +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0172 Uogonek +!D9 U+0141 Lslash +!DA U+015A Sacute +!DB U+016A Umacron +!DC U+00DC Udieresis +!DD U+017B Zdotaccent +!DE U+017D Zcaron +!DF U+00DF germandbls +!E0 U+0105 aogonek +!E1 U+012F iogonek +!E2 U+0101 amacron +!E3 U+0107 cacute +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+0119 eogonek +!E7 U+0113 emacron +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+017A zacute +!EB U+0117 edotaccent +!EC U+0123 gcommaaccent +!ED U+0137 kcommaaccent +!EE U+012B imacron +!EF U+013C lcommaaccent +!F0 U+0161 scaron +!F1 U+0144 nacute +!F2 U+0146 ncommaaccent +!F3 U+00F3 oacute +!F4 U+014D omacron +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0173 uogonek +!F9 U+0142 lslash +!FA U+015B sacute +!FB U+016B umacron +!FC U+00FC udieresis +!FD U+017C zdotaccent +!FE U+017E zcaron +!FF U+02D9 dotaccent diff --git a/pdf/font/makefont/cp1258.map b/pdf/font/makefont/cp1258.map new file mode 100644 index 0000000..fed915f --- /dev/null +++ b/pdf/font/makefont/cp1258.map @@ -0,0 +1,247 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!8C U+0152 OE +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9B U+203A guilsinglright +!9C U+0153 oe +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+0300 gravecomb +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+0110 Dcroat +!D1 U+00D1 Ntilde +!D2 U+0309 hookabovecomb +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+01A0 Ohorn +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+01AF Uhorn +!DE U+0303 tildecomb +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+0301 acutecomb +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+0111 dcroat +!F1 U+00F1 ntilde +!F2 U+0323 dotbelowcomb +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+01A1 ohorn +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+01B0 uhorn +!FE U+20AB dong +!FF U+00FF ydieresis diff --git a/pdf/font/makefont/cp874.map b/pdf/font/makefont/cp874.map new file mode 100644 index 0000000..1006e6b --- /dev/null +++ b/pdf/font/makefont/cp874.map @@ -0,0 +1,225 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!85 U+2026 ellipsis +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!A0 U+00A0 space +!A1 U+0E01 kokaithai +!A2 U+0E02 khokhaithai +!A3 U+0E03 khokhuatthai +!A4 U+0E04 khokhwaithai +!A5 U+0E05 khokhonthai +!A6 U+0E06 khorakhangthai +!A7 U+0E07 ngonguthai +!A8 U+0E08 chochanthai +!A9 U+0E09 chochingthai +!AA U+0E0A chochangthai +!AB U+0E0B sosothai +!AC U+0E0C chochoethai +!AD U+0E0D yoyingthai +!AE U+0E0E dochadathai +!AF U+0E0F topatakthai +!B0 U+0E10 thothanthai +!B1 U+0E11 thonangmonthothai +!B2 U+0E12 thophuthaothai +!B3 U+0E13 nonenthai +!B4 U+0E14 dodekthai +!B5 U+0E15 totaothai +!B6 U+0E16 thothungthai +!B7 U+0E17 thothahanthai +!B8 U+0E18 thothongthai +!B9 U+0E19 nonuthai +!BA U+0E1A bobaimaithai +!BB U+0E1B poplathai +!BC U+0E1C phophungthai +!BD U+0E1D fofathai +!BE U+0E1E phophanthai +!BF U+0E1F fofanthai +!C0 U+0E20 phosamphaothai +!C1 U+0E21 momathai +!C2 U+0E22 yoyakthai +!C3 U+0E23 roruathai +!C4 U+0E24 ruthai +!C5 U+0E25 lolingthai +!C6 U+0E26 luthai +!C7 U+0E27 wowaenthai +!C8 U+0E28 sosalathai +!C9 U+0E29 sorusithai +!CA U+0E2A sosuathai +!CB U+0E2B hohipthai +!CC U+0E2C lochulathai +!CD U+0E2D oangthai +!CE U+0E2E honokhukthai +!CF U+0E2F paiyannoithai +!D0 U+0E30 saraathai +!D1 U+0E31 maihanakatthai +!D2 U+0E32 saraaathai +!D3 U+0E33 saraamthai +!D4 U+0E34 saraithai +!D5 U+0E35 saraiithai +!D6 U+0E36 sarauethai +!D7 U+0E37 saraueethai +!D8 U+0E38 sarauthai +!D9 U+0E39 sarauuthai +!DA U+0E3A phinthuthai +!DF U+0E3F bahtthai +!E0 U+0E40 saraethai +!E1 U+0E41 saraaethai +!E2 U+0E42 saraothai +!E3 U+0E43 saraaimaimuanthai +!E4 U+0E44 saraaimaimalaithai +!E5 U+0E45 lakkhangyaothai +!E6 U+0E46 maiyamokthai +!E7 U+0E47 maitaikhuthai +!E8 U+0E48 maiekthai +!E9 U+0E49 maithothai +!EA U+0E4A maitrithai +!EB U+0E4B maichattawathai +!EC U+0E4C thanthakhatthai +!ED U+0E4D nikhahitthai +!EE U+0E4E yamakkanthai +!EF U+0E4F fongmanthai +!F0 U+0E50 zerothai +!F1 U+0E51 onethai +!F2 U+0E52 twothai +!F3 U+0E53 threethai +!F4 U+0E54 fourthai +!F5 U+0E55 fivethai +!F6 U+0E56 sixthai +!F7 U+0E57 seventhai +!F8 U+0E58 eightthai +!F9 U+0E59 ninethai +!FA U+0E5A angkhankhuthai +!FB U+0E5B khomutthai diff --git a/pdf/font/makefont/iso-8859-1.map b/pdf/font/makefont/iso-8859-1.map new file mode 100644 index 0000000..61740a3 --- /dev/null +++ b/pdf/font/makefont/iso-8859-1.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/pdf/font/makefont/iso-8859-11.map b/pdf/font/makefont/iso-8859-11.map new file mode 100644 index 0000000..9168812 --- /dev/null +++ b/pdf/font/makefont/iso-8859-11.map @@ -0,0 +1,248 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0E01 kokaithai +!A2 U+0E02 khokhaithai +!A3 U+0E03 khokhuatthai +!A4 U+0E04 khokhwaithai +!A5 U+0E05 khokhonthai +!A6 U+0E06 khorakhangthai +!A7 U+0E07 ngonguthai +!A8 U+0E08 chochanthai +!A9 U+0E09 chochingthai +!AA U+0E0A chochangthai +!AB U+0E0B sosothai +!AC U+0E0C chochoethai +!AD U+0E0D yoyingthai +!AE U+0E0E dochadathai +!AF U+0E0F topatakthai +!B0 U+0E10 thothanthai +!B1 U+0E11 thonangmonthothai +!B2 U+0E12 thophuthaothai +!B3 U+0E13 nonenthai +!B4 U+0E14 dodekthai +!B5 U+0E15 totaothai +!B6 U+0E16 thothungthai +!B7 U+0E17 thothahanthai +!B8 U+0E18 thothongthai +!B9 U+0E19 nonuthai +!BA U+0E1A bobaimaithai +!BB U+0E1B poplathai +!BC U+0E1C phophungthai +!BD U+0E1D fofathai +!BE U+0E1E phophanthai +!BF U+0E1F fofanthai +!C0 U+0E20 phosamphaothai +!C1 U+0E21 momathai +!C2 U+0E22 yoyakthai +!C3 U+0E23 roruathai +!C4 U+0E24 ruthai +!C5 U+0E25 lolingthai +!C6 U+0E26 luthai +!C7 U+0E27 wowaenthai +!C8 U+0E28 sosalathai +!C9 U+0E29 sorusithai +!CA U+0E2A sosuathai +!CB U+0E2B hohipthai +!CC U+0E2C lochulathai +!CD U+0E2D oangthai +!CE U+0E2E honokhukthai +!CF U+0E2F paiyannoithai +!D0 U+0E30 saraathai +!D1 U+0E31 maihanakatthai +!D2 U+0E32 saraaathai +!D3 U+0E33 saraamthai +!D4 U+0E34 saraithai +!D5 U+0E35 saraiithai +!D6 U+0E36 sarauethai +!D7 U+0E37 saraueethai +!D8 U+0E38 sarauthai +!D9 U+0E39 sarauuthai +!DA U+0E3A phinthuthai +!DF U+0E3F bahtthai +!E0 U+0E40 saraethai +!E1 U+0E41 saraaethai +!E2 U+0E42 saraothai +!E3 U+0E43 saraaimaimuanthai +!E4 U+0E44 saraaimaimalaithai +!E5 U+0E45 lakkhangyaothai +!E6 U+0E46 maiyamokthai +!E7 U+0E47 maitaikhuthai +!E8 U+0E48 maiekthai +!E9 U+0E49 maithothai +!EA U+0E4A maitrithai +!EB U+0E4B maichattawathai +!EC U+0E4C thanthakhatthai +!ED U+0E4D nikhahitthai +!EE U+0E4E yamakkanthai +!EF U+0E4F fongmanthai +!F0 U+0E50 zerothai +!F1 U+0E51 onethai +!F2 U+0E52 twothai +!F3 U+0E53 threethai +!F4 U+0E54 fourthai +!F5 U+0E55 fivethai +!F6 U+0E56 sixthai +!F7 U+0E57 seventhai +!F8 U+0E58 eightthai +!F9 U+0E59 ninethai +!FA U+0E5A angkhankhuthai +!FB U+0E5B khomutthai diff --git a/pdf/font/makefont/iso-8859-15.map b/pdf/font/makefont/iso-8859-15.map new file mode 100644 index 0000000..6c2b571 --- /dev/null +++ b/pdf/font/makefont/iso-8859-15.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+20AC Euro +!A5 U+00A5 yen +!A6 U+0160 Scaron +!A7 U+00A7 section +!A8 U+0161 scaron +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+017D Zcaron +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+017E zcaron +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+0152 OE +!BD U+0153 oe +!BE U+0178 Ydieresis +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/pdf/font/makefont/iso-8859-16.map b/pdf/font/makefont/iso-8859-16.map new file mode 100644 index 0000000..202c8fe --- /dev/null +++ b/pdf/font/makefont/iso-8859-16.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+0105 aogonek +!A3 U+0141 Lslash +!A4 U+20AC Euro +!A5 U+201E quotedblbase +!A6 U+0160 Scaron +!A7 U+00A7 section +!A8 U+0161 scaron +!A9 U+00A9 copyright +!AA U+0218 Scommaaccent +!AB U+00AB guillemotleft +!AC U+0179 Zacute +!AD U+00AD hyphen +!AE U+017A zacute +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+010C Ccaron +!B3 U+0142 lslash +!B4 U+017D Zcaron +!B5 U+201D quotedblright +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+017E zcaron +!B9 U+010D ccaron +!BA U+0219 scommaaccent +!BB U+00BB guillemotright +!BC U+0152 OE +!BD U+0153 oe +!BE U+0178 Ydieresis +!BF U+017C zdotaccent +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0106 Cacute +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+015A Sacute +!D8 U+0170 Uhungarumlaut +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0118 Eogonek +!DE U+021A Tcommaaccent +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+0107 cacute +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+015B sacute +!F8 U+0171 uhungarumlaut +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0119 eogonek +!FE U+021B tcommaaccent +!FF U+00FF ydieresis diff --git a/pdf/font/makefont/iso-8859-2.map b/pdf/font/makefont/iso-8859-2.map new file mode 100644 index 0000000..65ae09f --- /dev/null +++ b/pdf/font/makefont/iso-8859-2.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+02D8 breve +!A3 U+0141 Lslash +!A4 U+00A4 currency +!A5 U+013D Lcaron +!A6 U+015A Sacute +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+0160 Scaron +!AA U+015E Scedilla +!AB U+0164 Tcaron +!AC U+0179 Zacute +!AD U+00AD hyphen +!AE U+017D Zcaron +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+0105 aogonek +!B2 U+02DB ogonek +!B3 U+0142 lslash +!B4 U+00B4 acute +!B5 U+013E lcaron +!B6 U+015B sacute +!B7 U+02C7 caron +!B8 U+00B8 cedilla +!B9 U+0161 scaron +!BA U+015F scedilla +!BB U+0165 tcaron +!BC U+017A zacute +!BD U+02DD hungarumlaut +!BE U+017E zcaron +!BF U+017C zdotaccent +!C0 U+0154 Racute +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0139 Lacute +!C6 U+0106 Cacute +!C7 U+00C7 Ccedilla +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+011A Ecaron +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+010E Dcaron +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+0147 Ncaron +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0158 Rcaron +!D9 U+016E Uring +!DA U+00DA Uacute +!DB U+0170 Uhungarumlaut +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+0162 Tcommaaccent +!DF U+00DF germandbls +!E0 U+0155 racute +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+013A lacute +!E6 U+0107 cacute +!E7 U+00E7 ccedilla +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+011B ecaron +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+010F dcaron +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+0148 ncaron +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0159 rcaron +!F9 U+016F uring +!FA U+00FA uacute +!FB U+0171 uhungarumlaut +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+0163 tcommaaccent +!FF U+02D9 dotaccent diff --git a/pdf/font/makefont/iso-8859-4.map b/pdf/font/makefont/iso-8859-4.map new file mode 100644 index 0000000..a7d87bf --- /dev/null +++ b/pdf/font/makefont/iso-8859-4.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+0138 kgreenlandic +!A3 U+0156 Rcommaaccent +!A4 U+00A4 currency +!A5 U+0128 Itilde +!A6 U+013B Lcommaaccent +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+0160 Scaron +!AA U+0112 Emacron +!AB U+0122 Gcommaaccent +!AC U+0166 Tbar +!AD U+00AD hyphen +!AE U+017D Zcaron +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+0105 aogonek +!B2 U+02DB ogonek +!B3 U+0157 rcommaaccent +!B4 U+00B4 acute +!B5 U+0129 itilde +!B6 U+013C lcommaaccent +!B7 U+02C7 caron +!B8 U+00B8 cedilla +!B9 U+0161 scaron +!BA U+0113 emacron +!BB U+0123 gcommaaccent +!BC U+0167 tbar +!BD U+014A Eng +!BE U+017E zcaron +!BF U+014B eng +!C0 U+0100 Amacron +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+012E Iogonek +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+0116 Edotaccent +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+012A Imacron +!D0 U+0110 Dcroat +!D1 U+0145 Ncommaaccent +!D2 U+014C Omacron +!D3 U+0136 Kcommaaccent +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+0172 Uogonek +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0168 Utilde +!DE U+016A Umacron +!DF U+00DF germandbls +!E0 U+0101 amacron +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+012F iogonek +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+0117 edotaccent +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+012B imacron +!F0 U+0111 dcroat +!F1 U+0146 ncommaaccent +!F2 U+014D omacron +!F3 U+0137 kcommaaccent +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+0173 uogonek +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0169 utilde +!FE U+016B umacron +!FF U+02D9 dotaccent diff --git a/pdf/font/makefont/iso-8859-5.map b/pdf/font/makefont/iso-8859-5.map new file mode 100644 index 0000000..f9cd4ed --- /dev/null +++ b/pdf/font/makefont/iso-8859-5.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0401 afii10023 +!A2 U+0402 afii10051 +!A3 U+0403 afii10052 +!A4 U+0404 afii10053 +!A5 U+0405 afii10054 +!A6 U+0406 afii10055 +!A7 U+0407 afii10056 +!A8 U+0408 afii10057 +!A9 U+0409 afii10058 +!AA U+040A afii10059 +!AB U+040B afii10060 +!AC U+040C afii10061 +!AD U+00AD hyphen +!AE U+040E afii10062 +!AF U+040F afii10145 +!B0 U+0410 afii10017 +!B1 U+0411 afii10018 +!B2 U+0412 afii10019 +!B3 U+0413 afii10020 +!B4 U+0414 afii10021 +!B5 U+0415 afii10022 +!B6 U+0416 afii10024 +!B7 U+0417 afii10025 +!B8 U+0418 afii10026 +!B9 U+0419 afii10027 +!BA U+041A afii10028 +!BB U+041B afii10029 +!BC U+041C afii10030 +!BD U+041D afii10031 +!BE U+041E afii10032 +!BF U+041F afii10033 +!C0 U+0420 afii10034 +!C1 U+0421 afii10035 +!C2 U+0422 afii10036 +!C3 U+0423 afii10037 +!C4 U+0424 afii10038 +!C5 U+0425 afii10039 +!C6 U+0426 afii10040 +!C7 U+0427 afii10041 +!C8 U+0428 afii10042 +!C9 U+0429 afii10043 +!CA U+042A afii10044 +!CB U+042B afii10045 +!CC U+042C afii10046 +!CD U+042D afii10047 +!CE U+042E afii10048 +!CF U+042F afii10049 +!D0 U+0430 afii10065 +!D1 U+0431 afii10066 +!D2 U+0432 afii10067 +!D3 U+0433 afii10068 +!D4 U+0434 afii10069 +!D5 U+0435 afii10070 +!D6 U+0436 afii10072 +!D7 U+0437 afii10073 +!D8 U+0438 afii10074 +!D9 U+0439 afii10075 +!DA U+043A afii10076 +!DB U+043B afii10077 +!DC U+043C afii10078 +!DD U+043D afii10079 +!DE U+043E afii10080 +!DF U+043F afii10081 +!E0 U+0440 afii10082 +!E1 U+0441 afii10083 +!E2 U+0442 afii10084 +!E3 U+0443 afii10085 +!E4 U+0444 afii10086 +!E5 U+0445 afii10087 +!E6 U+0446 afii10088 +!E7 U+0447 afii10089 +!E8 U+0448 afii10090 +!E9 U+0449 afii10091 +!EA U+044A afii10092 +!EB U+044B afii10093 +!EC U+044C afii10094 +!ED U+044D afii10095 +!EE U+044E afii10096 +!EF U+044F afii10097 +!F0 U+2116 afii61352 +!F1 U+0451 afii10071 +!F2 U+0452 afii10099 +!F3 U+0453 afii10100 +!F4 U+0454 afii10101 +!F5 U+0455 afii10102 +!F6 U+0456 afii10103 +!F7 U+0457 afii10104 +!F8 U+0458 afii10105 +!F9 U+0459 afii10106 +!FA U+045A afii10107 +!FB U+045B afii10108 +!FC U+045C afii10109 +!FD U+00A7 section +!FE U+045E afii10110 +!FF U+045F afii10193 diff --git a/pdf/font/makefont/iso-8859-7.map b/pdf/font/makefont/iso-8859-7.map new file mode 100644 index 0000000..e163796 --- /dev/null +++ b/pdf/font/makefont/iso-8859-7.map @@ -0,0 +1,250 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+2018 quoteleft +!A2 U+2019 quoteright +!A3 U+00A3 sterling +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AF U+2015 afii00208 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+0384 tonos +!B5 U+0385 dieresistonos +!B6 U+0386 Alphatonos +!B7 U+00B7 periodcentered +!B8 U+0388 Epsilontonos +!B9 U+0389 Etatonos +!BA U+038A Iotatonos +!BB U+00BB guillemotright +!BC U+038C Omicrontonos +!BD U+00BD onehalf +!BE U+038E Upsilontonos +!BF U+038F Omegatonos +!C0 U+0390 iotadieresistonos +!C1 U+0391 Alpha +!C2 U+0392 Beta +!C3 U+0393 Gamma +!C4 U+0394 Delta +!C5 U+0395 Epsilon +!C6 U+0396 Zeta +!C7 U+0397 Eta +!C8 U+0398 Theta +!C9 U+0399 Iota +!CA U+039A Kappa +!CB U+039B Lambda +!CC U+039C Mu +!CD U+039D Nu +!CE U+039E Xi +!CF U+039F Omicron +!D0 U+03A0 Pi +!D1 U+03A1 Rho +!D3 U+03A3 Sigma +!D4 U+03A4 Tau +!D5 U+03A5 Upsilon +!D6 U+03A6 Phi +!D7 U+03A7 Chi +!D8 U+03A8 Psi +!D9 U+03A9 Omega +!DA U+03AA Iotadieresis +!DB U+03AB Upsilondieresis +!DC U+03AC alphatonos +!DD U+03AD epsilontonos +!DE U+03AE etatonos +!DF U+03AF iotatonos +!E0 U+03B0 upsilondieresistonos +!E1 U+03B1 alpha +!E2 U+03B2 beta +!E3 U+03B3 gamma +!E4 U+03B4 delta +!E5 U+03B5 epsilon +!E6 U+03B6 zeta +!E7 U+03B7 eta +!E8 U+03B8 theta +!E9 U+03B9 iota +!EA U+03BA kappa +!EB U+03BB lambda +!EC U+03BC mu +!ED U+03BD nu +!EE U+03BE xi +!EF U+03BF omicron +!F0 U+03C0 pi +!F1 U+03C1 rho +!F2 U+03C2 sigma1 +!F3 U+03C3 sigma +!F4 U+03C4 tau +!F5 U+03C5 upsilon +!F6 U+03C6 phi +!F7 U+03C7 chi +!F8 U+03C8 psi +!F9 U+03C9 omega +!FA U+03CA iotadieresis +!FB U+03CB upsilondieresis +!FC U+03CC omicrontonos +!FD U+03CD upsilontonos +!FE U+03CE omegatonos diff --git a/pdf/font/makefont/iso-8859-9.map b/pdf/font/makefont/iso-8859-9.map new file mode 100644 index 0000000..48c123a --- /dev/null +++ b/pdf/font/makefont/iso-8859-9.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+011E Gbreve +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0130 Idotaccent +!DE U+015E Scedilla +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+011F gbreve +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0131 dotlessi +!FE U+015F scedilla +!FF U+00FF ydieresis diff --git a/pdf/font/makefont/koi8-r.map b/pdf/font/makefont/koi8-r.map new file mode 100644 index 0000000..6ad5d05 --- /dev/null +++ b/pdf/font/makefont/koi8-r.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+2500 SF100000 +!81 U+2502 SF110000 +!82 U+250C SF010000 +!83 U+2510 SF030000 +!84 U+2514 SF020000 +!85 U+2518 SF040000 +!86 U+251C SF080000 +!87 U+2524 SF090000 +!88 U+252C SF060000 +!89 U+2534 SF070000 +!8A U+253C SF050000 +!8B U+2580 upblock +!8C U+2584 dnblock +!8D U+2588 block +!8E U+258C lfblock +!8F U+2590 rtblock +!90 U+2591 ltshade +!91 U+2592 shade +!92 U+2593 dkshade +!93 U+2320 integraltp +!94 U+25A0 filledbox +!95 U+2219 periodcentered +!96 U+221A radical +!97 U+2248 approxequal +!98 U+2264 lessequal +!99 U+2265 greaterequal +!9A U+00A0 space +!9B U+2321 integralbt +!9C U+00B0 degree +!9D U+00B2 twosuperior +!9E U+00B7 periodcentered +!9F U+00F7 divide +!A0 U+2550 SF430000 +!A1 U+2551 SF240000 +!A2 U+2552 SF510000 +!A3 U+0451 afii10071 +!A4 U+2553 SF520000 +!A5 U+2554 SF390000 +!A6 U+2555 SF220000 +!A7 U+2556 SF210000 +!A8 U+2557 SF250000 +!A9 U+2558 SF500000 +!AA U+2559 SF490000 +!AB U+255A SF380000 +!AC U+255B SF280000 +!AD U+255C SF270000 +!AE U+255D SF260000 +!AF U+255E SF360000 +!B0 U+255F SF370000 +!B1 U+2560 SF420000 +!B2 U+2561 SF190000 +!B3 U+0401 afii10023 +!B4 U+2562 SF200000 +!B5 U+2563 SF230000 +!B6 U+2564 SF470000 +!B7 U+2565 SF480000 +!B8 U+2566 SF410000 +!B9 U+2567 SF450000 +!BA U+2568 SF460000 +!BB U+2569 SF400000 +!BC U+256A SF540000 +!BD U+256B SF530000 +!BE U+256C SF440000 +!BF U+00A9 copyright +!C0 U+044E afii10096 +!C1 U+0430 afii10065 +!C2 U+0431 afii10066 +!C3 U+0446 afii10088 +!C4 U+0434 afii10069 +!C5 U+0435 afii10070 +!C6 U+0444 afii10086 +!C7 U+0433 afii10068 +!C8 U+0445 afii10087 +!C9 U+0438 afii10074 +!CA U+0439 afii10075 +!CB U+043A afii10076 +!CC U+043B afii10077 +!CD U+043C afii10078 +!CE U+043D afii10079 +!CF U+043E afii10080 +!D0 U+043F afii10081 +!D1 U+044F afii10097 +!D2 U+0440 afii10082 +!D3 U+0441 afii10083 +!D4 U+0442 afii10084 +!D5 U+0443 afii10085 +!D6 U+0436 afii10072 +!D7 U+0432 afii10067 +!D8 U+044C afii10094 +!D9 U+044B afii10093 +!DA U+0437 afii10073 +!DB U+0448 afii10090 +!DC U+044D afii10095 +!DD U+0449 afii10091 +!DE U+0447 afii10089 +!DF U+044A afii10092 +!E0 U+042E afii10048 +!E1 U+0410 afii10017 +!E2 U+0411 afii10018 +!E3 U+0426 afii10040 +!E4 U+0414 afii10021 +!E5 U+0415 afii10022 +!E6 U+0424 afii10038 +!E7 U+0413 afii10020 +!E8 U+0425 afii10039 +!E9 U+0418 afii10026 +!EA U+0419 afii10027 +!EB U+041A afii10028 +!EC U+041B afii10029 +!ED U+041C afii10030 +!EE U+041D afii10031 +!EF U+041E afii10032 +!F0 U+041F afii10033 +!F1 U+042F afii10049 +!F2 U+0420 afii10034 +!F3 U+0421 afii10035 +!F4 U+0422 afii10036 +!F5 U+0423 afii10037 +!F6 U+0416 afii10024 +!F7 U+0412 afii10019 +!F8 U+042C afii10046 +!F9 U+042B afii10045 +!FA U+0417 afii10025 +!FB U+0428 afii10042 +!FC U+042D afii10047 +!FD U+0429 afii10043 +!FE U+0427 afii10041 +!FF U+042A afii10044 diff --git a/pdf/font/makefont/koi8-u.map b/pdf/font/makefont/koi8-u.map new file mode 100644 index 0000000..40a7e4f --- /dev/null +++ b/pdf/font/makefont/koi8-u.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+2500 SF100000 +!81 U+2502 SF110000 +!82 U+250C SF010000 +!83 U+2510 SF030000 +!84 U+2514 SF020000 +!85 U+2518 SF040000 +!86 U+251C SF080000 +!87 U+2524 SF090000 +!88 U+252C SF060000 +!89 U+2534 SF070000 +!8A U+253C SF050000 +!8B U+2580 upblock +!8C U+2584 dnblock +!8D U+2588 block +!8E U+258C lfblock +!8F U+2590 rtblock +!90 U+2591 ltshade +!91 U+2592 shade +!92 U+2593 dkshade +!93 U+2320 integraltp +!94 U+25A0 filledbox +!95 U+2022 bullet +!96 U+221A radical +!97 U+2248 approxequal +!98 U+2264 lessequal +!99 U+2265 greaterequal +!9A U+00A0 space +!9B U+2321 integralbt +!9C U+00B0 degree +!9D U+00B2 twosuperior +!9E U+00B7 periodcentered +!9F U+00F7 divide +!A0 U+2550 SF430000 +!A1 U+2551 SF240000 +!A2 U+2552 SF510000 +!A3 U+0451 afii10071 +!A4 U+0454 afii10101 +!A5 U+2554 SF390000 +!A6 U+0456 afii10103 +!A7 U+0457 afii10104 +!A8 U+2557 SF250000 +!A9 U+2558 SF500000 +!AA U+2559 SF490000 +!AB U+255A SF380000 +!AC U+255B SF280000 +!AD U+0491 afii10098 +!AE U+255D SF260000 +!AF U+255E SF360000 +!B0 U+255F SF370000 +!B1 U+2560 SF420000 +!B2 U+2561 SF190000 +!B3 U+0401 afii10023 +!B4 U+0404 afii10053 +!B5 U+2563 SF230000 +!B6 U+0406 afii10055 +!B7 U+0407 afii10056 +!B8 U+2566 SF410000 +!B9 U+2567 SF450000 +!BA U+2568 SF460000 +!BB U+2569 SF400000 +!BC U+256A SF540000 +!BD U+0490 afii10050 +!BE U+256C SF440000 +!BF U+00A9 copyright +!C0 U+044E afii10096 +!C1 U+0430 afii10065 +!C2 U+0431 afii10066 +!C3 U+0446 afii10088 +!C4 U+0434 afii10069 +!C5 U+0435 afii10070 +!C6 U+0444 afii10086 +!C7 U+0433 afii10068 +!C8 U+0445 afii10087 +!C9 U+0438 afii10074 +!CA U+0439 afii10075 +!CB U+043A afii10076 +!CC U+043B afii10077 +!CD U+043C afii10078 +!CE U+043D afii10079 +!CF U+043E afii10080 +!D0 U+043F afii10081 +!D1 U+044F afii10097 +!D2 U+0440 afii10082 +!D3 U+0441 afii10083 +!D4 U+0442 afii10084 +!D5 U+0443 afii10085 +!D6 U+0436 afii10072 +!D7 U+0432 afii10067 +!D8 U+044C afii10094 +!D9 U+044B afii10093 +!DA U+0437 afii10073 +!DB U+0448 afii10090 +!DC U+044D afii10095 +!DD U+0449 afii10091 +!DE U+0447 afii10089 +!DF U+044A afii10092 +!E0 U+042E afii10048 +!E1 U+0410 afii10017 +!E2 U+0411 afii10018 +!E3 U+0426 afii10040 +!E4 U+0414 afii10021 +!E5 U+0415 afii10022 +!E6 U+0424 afii10038 +!E7 U+0413 afii10020 +!E8 U+0425 afii10039 +!E9 U+0418 afii10026 +!EA U+0419 afii10027 +!EB U+041A afii10028 +!EC U+041B afii10029 +!ED U+041C afii10030 +!EE U+041D afii10031 +!EF U+041E afii10032 +!F0 U+041F afii10033 +!F1 U+042F afii10049 +!F2 U+0420 afii10034 +!F3 U+0421 afii10035 +!F4 U+0422 afii10036 +!F5 U+0423 afii10037 +!F6 U+0416 afii10024 +!F7 U+0412 afii10019 +!F8 U+042C afii10046 +!F9 U+042B afii10045 +!FA U+0417 afii10025 +!FB U+0428 afii10042 +!FC U+042D afii10047 +!FD U+0429 afii10043 +!FE U+0427 afii10041 +!FF U+042A afii10044 diff --git a/pdf/font/makefont/makefont.php b/pdf/font/makefont/makefont.php new file mode 100644 index 0000000..7e7ed56 --- /dev/null +++ b/pdf/font/makefont/makefont.php @@ -0,0 +1,419 @@ +Error: 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 'Warning: character '.$map[$i].' is missing
      '; + $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('Error: 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 'Warning: 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('Error: 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('Error: unrecognized font file extension: '.$ext); + } + else + { + if($type!='TrueType' && $type!='Type1') + die('Error: incorrect font type: '.$type); + } + //Start generation + $s='Error: font file not found: '.$fontfile); + if($type=='TrueType') + CheckTTF($fontfile); + $f=fopen($fontfile,'rb'); + if(!$f) + die('Error: 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('Error: 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('Error: 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.')
      '; + } + else + { + $s.='$file=\''.basename($fontfile)."';\n"; + echo 'Notice: font file could not be compressed (zlib extension not available)
      '; + } + 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'.')
      '; +} +?> diff --git a/pdf/font/new_font.php b/pdf/font/new_font.php new file mode 100644 index 0000000..a71e3af --- /dev/null +++ b/pdf/font/new_font.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/pdf/font/symbol.php b/pdf/font/symbol.php new file mode 100644 index 0000000..43b50e4 --- /dev/null +++ b/pdf/font/symbol.php @@ -0,0 +1,15 @@ +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); +?> diff --git a/pdf/font/times.php b/pdf/font/times.php new file mode 100644 index 0000000..837c706 --- /dev/null +++ b/pdf/font/times.php @@ -0,0 +1,15 @@ +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); +?> diff --git a/pdf/font/timesb.php b/pdf/font/timesb.php new file mode 100644 index 0000000..09cff86 --- /dev/null +++ b/pdf/font/timesb.php @@ -0,0 +1,15 @@ +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); +?> diff --git a/pdf/font/timesbi.php b/pdf/font/timesbi.php new file mode 100644 index 0000000..b4e38d7 --- /dev/null +++ b/pdf/font/timesbi.php @@ -0,0 +1,15 @@ +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); +?> diff --git a/pdf/font/timesi.php b/pdf/font/timesi.php new file mode 100644 index 0000000..0ba2b77 --- /dev/null +++ b/pdf/font/timesi.php @@ -0,0 +1,15 @@ +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); +?> diff --git a/pdf/font/zapfdingbats.php b/pdf/font/zapfdingbats.php new file mode 100644 index 0000000..1f926a8 --- /dev/null +++ b/pdf/font/zapfdingbats.php @@ -0,0 +1,15 @@ +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); +?> diff --git a/pdf/footer.php b/pdf/footer.php new file mode 100644 index 0000000..f30b66a --- /dev/null +++ b/pdf/footer.php @@ -0,0 +1,31 @@ +SetLineWidth(0.1); +$this->Line(20,280,200,280); +$this->SetY(-15); +$this->SetFont('Helvetica', 'B', 8); +$this->Cell(80, 4, "Bankverbindung", 0); +$this->SetX(120); +$this->Cell(40, 4, "Steuernummer", 0); +$this->SetX(165); +$this->Cell(35, 4, "Gerichtsstand", 0, 1, 'R'); +$this->SetFont('Helvetica', '', 8); +$this->Cell(80, 4, $_SESSION['Firma']['Bank1']." - BIC: ".$_SESSION['Firma']['BLZ1']." - IBAN: ".$_SESSION['Firma']['Konto1'], 0); +$this->SetX(120); +$this->Cell(40, 4, $_SESSION['Firma']['Steuernummer'], 0); +$this->SetX(165); +$this->Cell(35, 4, $_SESSION['Firma']['Gerichtsstand'], 0, 1, 'R'); +if ("" != $_SESSION['Firma']['Bank2']) { + $this->Cell(80, 4, $_SESSION['Firma']['Bank2']." - BIC: ".$_SESSION['Firma']['BLZ2']." - IBAN: ".$_SESSION['Firma']['Konto2'], 0); +} +if ("1" == $_SESSION['Firma']['Werbung']) { + + $this->Image('img/rist_logo.gif',180,273,20,0,'GIF','http://www.ri-st.de'); + $this->SetY(-22); + $this->SetFont('Helvetica', 'I', 6); + $this->Cell(80, 4, 'Dieses Dokument wurde erstellt mit ', 0); + $this->SetX(120); + $this->SetTextColor(204, 0, 102); + $this->SetFont('Helvetica', 'U', 10); + $this->Cell(40, 4, "www.ri-st.de", 0, 0, 'L', '0', "http://www.ri-st.de"); +} +?> \ No newline at end of file diff --git a/pdf/footer_best.php b/pdf/footer_best.php new file mode 100644 index 0000000..5c4985a --- /dev/null +++ b/pdf/footer_best.php @@ -0,0 +1,27 @@ +SetLineWidth(0.1); +$this->Line(20,280,200,280); +$this->SetY(-15); +$this->SetFont('Helvetica', 'B', 8); +$this->Cell(80, 4, "Bankverbindung", 0); +$this->SetX(120); +$this->Cell(40, 4, "Steuernummer", 0); +$this->SetX(165); +$this->Cell(35, 4, "Gerichtsstand", 0, 1, 'R'); +$this->SetFont('Helvetica', '', 8); +$this->Cell(80, 4, "Chrisian Steinle - Volksbank Laichinger Alb eG - BIC: GENODES1LAI - IBAN: DE07 6309 1300 0028 0020 08", 0); +$this->SetX(120); +$this->Cell(40, 4, "62353/53880", 0); +$this->SetX(165); +$this->Cell(35, 4, "Amtsgericht Geislingen/Steige", 0, 1, 'R'); + +$this->Image('img/rist_logo.gif',180,273,20,0,'GIF','http://www.ri-st.de'); +$this->SetY(-22); +$this->SetFont('Helvetica', 'I', 6); +$this->Cell(80, 4, 'Dieses Dokument wurde erstellt mit ', 0); +$this->SetX(120); +$this->SetTextColor(204, 0, 102); +$this->SetFont('Helvetica', 'U', 10); +$this->Cell(40, 4, "www.ri-st.de", 0, 0, 'L', '0', "http://www.ri-st.de"); + +?> \ No newline at end of file diff --git a/pdf/gut_pdf.php b/pdf/gut_pdf.php new file mode 100644 index 0000000..4dd1c29 --- /dev/null +++ b/pdf/gut_pdf.php @@ -0,0 +1,119 @@ +query($sql); +$nt = $result->fetch_assoc(); +$sqlp = "SELECT * FROM ".PREFIX."_Gutschrift_Pos WHERE (Jahr = \"".$Jahr."\" AND Gutschrift_ID = \"".$ID."\") ORDER BY Position ASC;"; +$resultp = $db->query($sqlp); +$sqla = "SELECT * FROM Admin WHERE ID = \"".$nt['Admin_ID']."\";"; +$resulta = $db->query($sqla); +$nta = $resulta->fetch_assoc(); +$sqlk = "SELECT * FROM ".PREFIX."_Kontakte WHERE ID = \"".$nt['Kontakt_ID']."\";"; +$resultk = $db->query($sqlk); +$ntk = $resultk->fetch_assoc(); +if ((0 == $nt['Rechnung_Jahr']) AND (0 == $nt['Rechnung_ID'])) { + $sqltext = "SELECT * FROM ".PREFIX."_Texte WHERE section= \"gut_or\";"; + $rtext = $db->query($sqltext); +} else { + $sqlr = "SELECT DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum FROM ".PREFIX."_Rechnungen WHERE (Jahr = \"".$nt['Jahr']."\" AND ID = \"".$nt['ID']."\");"; + $resultr = $db->query($sqlr); + $ntr = $resultr->fetch_assoc(); + $sqltext = "SELECT * FROM ".PREFIX."_Texte WHERE section= \"gut_mr\";"; + $rtext = $db->query($sqltext); +} +$nttext = $rtext->fetch_assoc(); + +while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen']) { + $nt['ID'] = "0".$nt['ID']; +} + +class PDF extends FPDF { + + function Header() { + include "pdf/header.php"; + } + function Footer() { + include "pdf/footer.php"; + } +} + +$pdf=new PDF(); +$pdf->SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); +$pdf->SetLeftMargin(20); +$pdf->SetAutoPageBreak(true, 30); + +if ("2" == $_SESSION['Firma']['Werbung']) { + include "pdf/header2.php"; +} else { + include "pdf/header".$_SESSION['Firma']['ASP'].".php"; +} + +$pdf->SetY(95); +$pdf->Write(4, "Gutschrift-Nr.:"); +$pdf->SetX(45); +$pdf->Write(4, $nt['Jahr']."_".$nt['ID']); +$pdf->SetX(138); +$pdf->Cell(15, 4, "Datum:", 0); +$pdf->Cell(47, 4, $nt['Datum'], 0, 1, 'R'); + +if ("0" != $nt['Rechnung_ID']) { + while (strlen($nt['Rechnung_ID']) < $_SESSION['Firma']['Stellen']) { + $nt['Rechnung_ID'] = "0".$nt['Rechnung_ID']; + } + $pdf->SetX(20); + $pdf->Write(4, "Rechnungs-Nr.:"); + $pdf->SetX(45); + $pdf->Write(4, $nt['Rechnung_Jahr']."_".$nt['Rechnung_ID']); +} + +$pdf->SetRightMargin(10); +$pdf->SetY(107); +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F1_Red'], $_SESSION['Firma']['F1_Green'], $_SESSION['Firma']['F1_Blue']); +$pdf->Write(10, "Gutschrift\n"); +$pdf->SetFont('Helvetica', '', 10); +$pdf->SetTextColor(0); + +$var = $nttext['Text1']; +include "pdf/replace_token.php"; +include "pdf/replace_gut.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var."\n"); + +include "pdf/position_full.php"; + +include "pdf/berechnung.php"; + +$var = $nttext['Text2']; +include "pdf/replace_token.php"; +include "pdf/replace_gut.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var); + +if ("" != $nt['Text']) { + $pdf->Write(4, "\n".$nt['Text']."\n"); +} + +$var = $_SESSION['Firma']['Gruss']; +include "pdf/replace_gruss.php"; +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, "\n".$var); + +$file = "pdf/".PREFIX."/gut/G_".$nt['Jahr']."_".$nt['ID'].".pdf"; +$pdf->Output($file, "F"); + +$var = $nttext['EMail']; +include "pdf/replace_token.php"; +include "pdf/replace_gut.php"; + +?> \ No newline at end of file diff --git a/pdf/header.gif b/pdf/header.gif new file mode 100644 index 0000000000000000000000000000000000000000..7375ee0656321fda601afeae42c5f6dae8f6e8c2 GIT binary patch literal 4859 zcmchZ`#;l-`^Vq!?LB75<}l}MPR+47D`F;xBn`u;v^i5Ur$}UTY6w%#i8%`~$CN{( zNKTESy6?N9D4pqCDxdrQ{t@5T57*=M`ssQ+p4Si8%W0pZdzJc zzyyNPKmXa^B$Cb6*6-iHH%A1+f*V610Q~v$=imJ6*RPF@jrH~Q4FLv_Po6xPpP!$bn-dC!ckkYvot+&W9UU1N5eNh~Zrm6i9v&JR>gww1?Cj+8`5he{ z?d|QgwY4=hH9Q`#y1Kfms;aQCkjv#36cps==clEmvDs`Eij#0dt2L8sG?9zE*s@9*K^;qLBEp->JUJm}`;MkbT(?CeM+lC7<+jg5`5 zv9Xbn5s^sTxpSwXp&=fR$Kh~lYHHHb(ijW|jYdmJNx|W87z_r2;J+CDkH`P(!2f{$ z#p?^`|F`wOn*gF)EIeES4rHC>Was3b%gZm|7M{OQlt(*T3eZ#?#SkE`rnauWp|Pp? za!YI5m1ap$lHb|V4Ty_^BJG1i!#4y&e7&0PHUQ-aL&8R8?+WLd_wdHsXpkdsX8!S$ zr)^5Ei>-V>&1vcNo5w3WHK6u=)5}+HzkQ$W0!?XZ{7-8&Q%-z(hYAoxjrF?AyLq-L zpRV|<6@M#tTc`nu*23xLD%eXO=Vp(N2ErX$2A!6L$bv>vd!?cz&f4CTUUL3aSDDVG zHdfXAt|+Xa+Rn*0{mUpCds@QN&>_i~?%vQ7QC#tQ_TgL={c6aUeW((+Vugg5971}@ zy~A(o=D7NU;>8D5-gipIc2lcp{k58n3w*3B;1-=(979Z4emunOw82^}Mzyq#<>Nd? z!~vux&ph$_`Uo6}lvGa!3h_YT1D~Yn^UalrDk`LEc?AGkdjAcVIpT zsI^DlQwj+G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>bDU@Yyxblm7cE5@EeS(q^|Jlm-I;j8v literal 0 HcmV?d00001 diff --git a/pdf/header.php b/pdf/header.php new file mode 100644 index 0000000..2a3b77e --- /dev/null +++ b/pdf/header.php @@ -0,0 +1,29 @@ +SetLineWidth(0.1); +$this->Line(7,105,12,105); +$this->Line(7,148.5,12,148.5); +$this->Line(7,210,12,210); + +if ("1005" == PREFIX) { + $this->Image('img/'.PREFIX.'_logo.gif',20,10,0,30); +} else { + $this->Image('img/'.PREFIX.'_logo.gif',20,20,0,20); +} + +$this->SetFont('Helvetica','',10); +$this->SetY(20); +$this->SetLeftMargin(148); +$this->Cell(52, 4, $_SESSION['Firma']['Firma_Name'], 0, 1, 'R'); +if ("" != $_SESSION['Firma']['Firma_Zusatz']) { + $this->Cell(52, 4, $_SESSION['Firma']['Firma_Zusatz'], 0, 1, 'R'); +} +$this->Cell(52, 4, $_SESSION['Firma']['Adresse'], 0, 1, 'R'); +$this->Cell(52, 4, $_SESSION['Firma']['PLZ']." ".$_SESSION['Firma']['Ort'], 0, 1, 'R'); + +$this->SetLeftMargin(20); +$this->SetY(55); +?> \ No newline at end of file diff --git a/pdf/header.png b/pdf/header.png new file mode 100644 index 0000000000000000000000000000000000000000..f3d260cdead969a0223d06dbae75ba9539251613 GIT binary patch literal 7860 zcmW+*c|6q58~^NKt+iP9y4SjM0ZLLK#76SlM6af4? zIki6lAVeMjR)_$go(TZlH_~0YjQ~LKjERA+P1vN{`0E=&5D2>n1SPMKL@9uwd3Y2i za4;ND1CWb~j`FnLptA^Q<9F9kq?3~qhzJbdS%kpq6&uCNkpQ>--QC@jlgO-00vdgs z9QzZK@R^R0OP&JSO1uB)76=^AP?4K8s{D?r^`r`AO!`wGB!D;h zO9ve(kRjEO7#G*_of!o{2fbUE3-!?W?`@Gna$$deU3tX>g=56$BJ9F0KrZ-z?K6#% z7#csfch9NMWgB&YPMS1^;N4mPIS%%5s^e2biE2ffNrJss}K#Eci>$x2*wa~#p% z6A`TCOPNrK8^9B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/pdf/header0.php b/pdf/header0.php new file mode 100644 index 0000000..3163781 --- /dev/null +++ b/pdf/header0.php @@ -0,0 +1,47 @@ +SetFont('Helvetica','',8); +$pdf->SetY(50); +$pdf->SetX(25); +$pdf->SetLeftMargin(25); +$pdf->Write(4, $_SESSION['Firma']['Firma_Name']); + +//if ("" != $_SESSION['Firma']['Firma_Zusatz']) { +// $pdf->Write(4, " - ".$_SESSION['Firma']['Firma_Zusatz']); +//} +$pdf->Write(4, ", ".$_SESSION['Firma']['Adresse'].", ".$_SESSION['Firma']['PLZ']." ".$_SESSION['Firma']['Ort']."\n\n"); + +$pdf->SetFont('Helvetica','',10); + +if ("" != $ntk['Firma']) { + $Adresse = $ntk['Firma']."\n"; + $Adresse .= "c/o ".$ntk['Anrede']." "; +} else { + $Adresse = $ntk['Anrede']."\n"; +} +$Adresse .= $ntk['Vorname']." ".$ntk['Nachname']."\n"; +$Adresse .= $ntk['Strasse']." ".$ntk['Nummer']."\n\n"; +$Adresse .= $ntk['PLZ']." ".$ntk['Ort']."\n"; + +$pdf->Write(4, $Adresse); + +$pdf->SetY(50); +$pdf->SetX(138); +$pdf->SetLeftMargin(138); +$pdf->Cell(15, 4, "Tel:", 0); +$pdf->Cell(47, 4, $_SESSION['Firma']['Telefon'], 0, 1, 'R'); +$pdf->Cell(15, 4, "Mail:", 0); +$pdf->SetTextColor($_SESSION['Firma']['F1_Red'], $_SESSION['Firma']['F1_Green'], $_SESSION['Firma']['F1_Blue']); +$pdf->Cell(47, 4, $_SESSION['Firma']['Email'], 0, 1, 'R', 0, "mailto:".$_SESSION['Firma']['Email']); + +$pdf->SetTextColor(0); +$pdf->Cell(15, 4, "www:", 0); +$pdf->SetTextColor($_SESSION['Firma']['F1_Red'], $_SESSION['Firma']['F1_Green'], $_SESSION['Firma']['F1_Blue']); +$pdf->Cell(47, 4, substr($_SESSION['Firma']['Homepage'], 7), 0, 1, 'R', 0, $_SESSION['Firma']['Homepage']); + +$pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); +$pdf->MultiCell(62, 4, "\n".$_SESSION['Firma']['Feld'], 0, 'R'); + +$pdf->SetTextColor(00); +$pdf->SetLeftMargin(20); +$pdf->SetRightMargin(10); +?> \ No newline at end of file diff --git a/pdf/header0_best.php b/pdf/header0_best.php new file mode 100644 index 0000000..c01755c --- /dev/null +++ b/pdf/header0_best.php @@ -0,0 +1,43 @@ +SetFont('Helvetica','',8); +$pdf->SetY(50); +$pdf->SetX(25); +$pdf->SetLeftMargin(25); +$pdf->Write(4, "Pablo Rink und Christian Steinle GbR"); + +$pdf->Write(4, ", Im Gässele 8, 89079 Ulm / Unterweiler\n\n"); + +$pdf->SetFont('Helvetica','',10); + +if ("" != $ntk['Firma']) { + $Adresse = $ntk['Firma']."\n"; + $Adresse .= "c/o ".$ntk['Anrede']." "; +} else { + $Adresse = $ntk['Anrede']."\n"; +} +$Adresse .= $ntk['Vorname']." ".$ntk['Nachname']."\n"; +$Adresse .= $ntk['Strasse']." ".$ntk['Nummer']."\n\n"; +$Adresse .= $ntk['PLZ']." ".$ntk['Ort']."\n"; + +$pdf->Write(4, $Adresse); + +$pdf->SetY(50); +$pdf->SetLeftMargin(148); +$pdf->Cell(15, 4, "Tel:", 0); +$pdf->Cell(37, 4, "+49 7346 307415", 0, 1, 'R'); +$pdf->Cell(15, 4, "Mail:", 0); +$pdf->SetTextColor(204, 0, 102); +$pdf->Cell(37, 4, "info@ri-st.de\n", 0, 1, 'R', 0, "mailto:info@ri-st.de"); + +$pdf->SetTextColor(0); +$pdf->Cell(15, 4, "www:", 0); +$pdf->SetTextColor(204, 0, 102); +$pdf->Cell(37, 4, "www.ri-st.de", 0, 1, 'R', 0, "http://www.ri-st.de"); + +$pdf->SetTextColor(204, 0, 102); +$pdf->MultiCell(52, 4, "\nBranchenlösungen\nWebseiten\nMaklerlösungen", 0, 'R'); + +$pdf->SetTextColor(00); +$pdf->SetLeftMargin(20); +$pdf->SetRightMargin(10); +?> \ No newline at end of file diff --git a/pdf/header1.php b/pdf/header1.php new file mode 100644 index 0000000..fef5804 --- /dev/null +++ b/pdf/header1.php @@ -0,0 +1,51 @@ +SetFont('Helvetica','',8); +$pdf->SetY(50); +$pdf->SetX(20); +$pdf->SetLeftMargin(20); +$pdf->Write(4, $_SESSION['Firma']['Firma_Name']); + +//if ("" != $_SESSION['Firma']['Firma_Zusatz']) { +// $pdf->Write(4, " - ".$_SESSION['Firma']['Firma_Zusatz']); +//} +$pdf->Write(4, ", ".$_SESSION['Firma']['Adresse'].", ".$_SESSION['Firma']['PLZ']." ".$_SESSION['Firma']['Ort']."\n\n"); + +$pdf->SetFont('Helvetica','',10); + +if ("" != $ntk['Firma']) { + $Adresse = $ntk['Firma']."\n"; + $Adresse .= "c/o ".$ntk['Anrede']." "; +} else { + $Adresse = $ntk['Anrede']."\n"; +} +$Adresse .= $ntk['Vorname']." ".$ntk['Nachname']."\n"; +$Adresse .= $ntk['Strasse']." ".$ntk['Nummer']."\n\n"; +$Adresse .= $ntk['PLZ']." ".$ntk['Ort']."\n"; + +$pdf->Write(4, $Adresse); + +$pdf->SetY(50); +$pdf->SetX(138); +$pdf->SetLeftMargin(138); +$pdf->Cell(62, 4, "Ihr Ansprechpartner:", 0, 1, 'R'); +$pdf->Cell(62, 4, $nta['Vorname']." ".$nta['Nachname'], 0, 1, 'R'); +$pdf->Write(4, "\n"); +$pdf->Cell(15, 4, "Tel:", 0); +$pdf->Cell(47, 4, $nta['Telefon'], 0, 1, 'R'); + +$pdf->Cell(15, 4, "Mobil:", 0); +$pdf->Cell(47, 4, $nta['Mobil'], 0, 1, 'R'); +$pdf->Cell(15, 4, "Mail:", 0); +$pdf->SetTextColor($_SESSION['Firma']['F1_Red'], $_SESSION['Firma']['F1_Green'], $_SESSION['Firma']['F1_Blue']); +$pdf->Cell(47, 4, $nta['EMail'], 0, 1, 'R', 0, "mailto:".$nta['EMail']); + +$pdf->SetTextColor(0); +$pdf->Cell(15, 4, "www:", 0); + +$pdf->SetTextColor($_SESSION['Firma']['F1_Red'], $_SESSION['Firma']['F1_Green'], $_SESSION['Firma']['F1_Blue']); +$pdf->Cell(47, 4, substr($_SESSION['Firma']['Homepage'], 7), 0, 1, 'R', 0, $_SESSION['Firma']['Homepage']); + +$pdf->SetTextColor(00); +$pdf->SetLeftMargin(20); +$pdf->SetRightMargin(10); +?> \ No newline at end of file diff --git a/pdf/header2.php b/pdf/header2.php new file mode 100644 index 0000000..f5aed29 --- /dev/null +++ b/pdf/header2.php @@ -0,0 +1,59 @@ +SetFont('Helvetica','',8); +$pdf->SetY(50); +$pdf->SetX(25); +$pdf->SetLeftMargin(25); +$pdf->Write(4, $_SESSION['Firma']['Firma_Name']); + +//if ("" != $_SESSION['Firma']['Firma_Zusatz']) { +// $pdf->Write(4, " - ".$_SESSION['Firma']['Firma_Zusatz']); +//} +$pdf->Write(4, ", ".$_SESSION['Firma']['Adresse'].", ".$_SESSION['Firma']['PLZ']." ".$_SESSION['Firma']['Ort']."\n\n"); + +$pdf->SetFont('Helvetica','',10); + +if ("" != $ntk['Firma']) { + $Adresse = $ntk['Firma']."\n"; + $Adresse .= "c/o ".$ntk['Anrede']." "; +} else { + $Adresse = $ntk['Anrede']."\n"; +} +$Adresse .= $ntk['Vorname']." ".$ntk['Nachname']."\n"; +$Adresse .= $ntk['Strasse']." ".$ntk['Nummer']."\n\n"; +$Adresse .= $ntk['PLZ']." ".$ntk['Ort']."\n"; + +$pdf->Write(4, $Adresse); + +$pdf->SetY(40); +$pdf->SetX(138); +$pdf->SetLeftMargin(138); +$pdf->Cell(15, 4, "Tel:", 0); +$pdf->Cell(47, 4, $_SESSION['Firma']['Telefon'], 0, 1, 'R'); +$pdf->Cell(15, 4, "Mail:", 0); +$pdf->SetTextColor($_SESSION['Firma']['F1_Red'], $_SESSION['Firma']['F1_Green'], $_SESSION['Firma']['F1_Blue']); +$pdf->Cell(47, 4, $_SESSION['Firma']['Email']."\n", 0, 1, 'R', 0, "mailto:".$_SESSION['Firma']['Email']); + +$pdf->SetTextColor(0); +$pdf->Cell(15, 4, "www:", 0); +$pdf->SetTextColor($_SESSION['Firma']['F1_Red'], $_SESSION['Firma']['F1_Green'], $_SESSION['Firma']['F1_Blue']); +$pdf->Cell(47, 4, substr($_SESSION['Firma']['Homepage'], 7), 0, 1, 'R', 0, $_SESSION['Firma']['Homepage']); + +$pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); + +$pdf->SetY(60); +$pdf->SetTextColor(00); +$pdf->SetFont('Helvetica', 'I', 6); +$pdf->Cell(52, 4, 'Dieses Dokument wurde erstellt mit', 0, 1, 'R'); +$pdf->Image('img/rist_logo.gif',148,65,52,0,'GIF','http://www.ri-st.de'); +$pdf->SetY(80); +$pdf->SetTextColor(204,0,102); +$pdf->SetFont('Helvetica', 'IU', 10); +$pdf->Cell(52, 4, 'www.ri-st.de', 0, 1, 'R', 0, 'http://www.ri-st.de'); +$pdf->SetTextColor(00); + + +$pdf->SetTextColor(00); +$pdf->SetLeftMargin(20); +$pdf->SetRightMargin(10); +$pdf->SetFont('Helvetica','',10); +?> \ No newline at end of file diff --git a/pdf/header3.php b/pdf/header3.php new file mode 100644 index 0000000..e471afa --- /dev/null +++ b/pdf/header3.php @@ -0,0 +1,21 @@ +SetFont('Helvetica','',8); +$pdf->SetY(45); +$pdf->SetTextColor(00); +$pdf->SetFont('Helvetica', 'I', 6); +$pdf->SetX(138); +$pdf->Cell(62, 4, 'Dieses Dokument wurde erstellt mit', 0, 1, 'R'); +$pdf->Image('img/rist_logo.gif',148,50,62,0,'GIF','http://www.ri-st.de'); +$pdf->SetY(65); +$pdf->SetTextColor(204,0,102); +$pdf->SetFont('Helvetica', 'IU', 10); +$pdf->SetX(148); +$pdf->Cell(62, 4, 'www.ri-st.de', 0, 1, 'R', 0, 'http://www.ri-st.de'); +$pdf->SetTextColor(00); + + +$pdf->SetTextColor(00); +$pdf->SetLeftMargin(20); +$pdf->SetRightMargin(10); +$pdf->SetFont('Helvetica','',10); +?> \ No newline at end of file diff --git a/pdf/header_best.php b/pdf/header_best.php new file mode 100644 index 0000000..8037ef3 --- /dev/null +++ b/pdf/header_best.php @@ -0,0 +1,18 @@ +SetLineWidth(0.1); +$this->Line(7,105,12,105); +$this->Line(7,148.5,12,148.5); +$this->Line(7,210,12,210); + +$this->Image('img/1000_logo.gif',20,20,50); + +$this->SetFont('Helvetica','',10); +$this->SetY(20); +$this->SetLeftMargin(148); +$this->Cell(52, 4, "Pablo Rink und Christian Steinle GbR", 0, 1, 'R'); +$this->Cell(52, 4, "Im Gässele 8", 0, 1, 'R'); +$this->Cell(52, 4, "89079 Ulm / Unterweiler", 0, 1, 'R'); + +$this->SetLeftMargin(20); +$this->SetY(55); +?> \ No newline at end of file diff --git a/pdf/kfz_header.php b/pdf/kfz_header.php new file mode 100644 index 0000000..ea7aed5 --- /dev/null +++ b/pdf/kfz_header.php @@ -0,0 +1,20 @@ +query($sql); +if ($ntkfz = $resultkfz->fetch_assoc()) { + $pdf->Write(4, "\n"); + $pdf->Cell(48, 4, "Fahrzeug:", 'LTR'); + $pdf->Cell(35, 4, "Kennzeichen:", 'TR'); + $pdf->Cell(35, 4, "KM-Stand:", 'TR'); + $pdf->Cell(62, 4, "Fahrzeug-Ident:", 'TR', 1); + + $pdf->Cell(48, 4, $ntkfz['Marke']." ".$ntkfz['Modell'], 'LRB'); + $pdf->Cell(35, 4, $ntkfz['Kennzeichen'], 'RB'); + $pdf->Cell(35, 4, number_format($ntkfz['Kilometerlaufleistung'], '0', ',', '.'), 'RB'); + $pdf->Cell(62, 4, $ntkfz['Fzg_Ident_Nr'], 'RB'); + $pdf->SetY(117); +} else { + $pdf->SetY(107); +} +?> \ No newline at end of file diff --git a/pdf/kontakt_pdf.php b/pdf/kontakt_pdf.php new file mode 100644 index 0000000..6410a0e --- /dev/null +++ b/pdf/kontakt_pdf.php @@ -0,0 +1,125 @@ +query($sql); +$nt = $result->fetch_assoc(); +$sqltext = "SELECT * FROM ".PREFIX."_Texte WHERE section= \"kontakt\";"; +$rtext = $db->query($sqltext); +$nttext = $rtext->fetch_assoc(); + +class PDF extends FPDF { + + function Header() { + include "pdf/header.php"; + } + function Footer() { + include "pdf/footer.php"; + } +} + +$pdf=new PDF(); +$pdf->SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); + +if ("2" == $_SESSION['Firma']['Werbung']) { + include "pdf/header3.php"; +} + +$pdf->SetY(70); +$pdf->SetX(20); +$pdf->SetRightMargin(10); + +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); +$pdf->Write(4, "Datenschutzrechtliche Erklärung"); +$pdf->Write(4, "\n\n"); +$pdf->SetTextColor(0); + +$pdf->SetFont('Helvetica', '', 10); +$var = $nttext['Text1']; +include "pdf/replace_token.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var."\n\n"); + +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F1_Red'], $_SESSION['Firma']['F1_Green'], $_SESSION['Firma']['F1_Blue']); +$pdf->Write(4, "Datenschutzrechtliche Einwilligung"); +$pdf->Write(4, "\n\n"); +$pdf->SetTextColor(0); + +$pdf->SetFont('Helvetica', '', 10); +$var = $nttext['Text2']; +include "pdf/replace_token.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var."\n\n"); + +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); +$pdf->Write(4, "Kontaktdaten"); +$pdf->Write(4, "\n\n"); +$pdf->SetTextColor(0); + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Cell(30, 4, "Firma"); +$pdf->Cell(70, 4, $nt['Firma'], "B"); +$pdf->SetX(130); +$pdf->Cell(30, 4, "Postalisch"); +$pdf->Cell(4, 4, " ", "1"); +$pdf->Cell(10, 4, "Ja"); +$pdf->Cell(4, 4, " ", "1"); +$pdf->Cell(10, 4, "Nein"); +$pdf->Write(6, "\n"); +$pdf->Cell(30, 4, "Name"); +$pdf->Cell(70, 4, $nt['Vorname']." ".$nt['Nachname'], "B"); +$pdf->SetX(130); +$pdf->Cell(30, 4, "Email / SMS"); +$pdf->Cell(4, 4, " ", "1"); +$pdf->Cell(10, 4, "Ja"); +$pdf->Cell(4, 4, " ", "1"); +$pdf->Cell(10, 4, "Nein"); +$pdf->Write(6, "\n"); +$pdf->Cell(30, 4, "Straße"); +$pdf->Cell(70, 4, $nt['Strasse']." ".$nt['Nummer'], "B"); +$pdf->SetX(130); +$pdf->Cell(30, 4, "Telefon / Fax"); +$pdf->Cell(4, 4, " ", "1"); +$pdf->Cell(10, 4, "Ja"); +$pdf->Cell(4, 4, " ", "1"); +$pdf->Cell(10, 4, "Nein"); +$pdf->Write(6, "\n"); +$pdf->Cell(30, 4, "PLZ / Ort"); +$pdf->Cell(70, 4, $nt['PLZ']." ".$nt['Ort'], "B"); +$pdf->Write(6, "\n"); +$pdf->Cell(30, 4, "Telefon"); +$pdf->Cell(70, 4, $nt['Telefon'], "B"); +$pdf->Write(6, "\n"); +$pdf->Cell(30, 4, "Fax"); +$pdf->Cell(70, 4, $nt['Fax'], "B"); +$pdf->Write(6, "\n"); +$pdf->Cell(30, 4, "Mobil"); +$pdf->Cell(70, 4, $nt['Mobil'], "B"); +$pdf->Write(6, "\n"); +$pdf->Cell(30, 4, "Email"); +$pdf->Cell(70, 4, $nt['Email'], "B"); +$pdf->Write(6, "\n\n\n\n"); +$pdf->Cell(100, 4, " ", "B"); +$pdf->Write(6, "\n"); +$pdf->Cell(100, 4, "Datum, Unterschrift"); + + + +$file = "pdf/".PREFIX."/kontakt/K_".$nt['ID'].".pdf"; +$pdf->Output($file, "F"); + +$var = $nttext['EMail']; +include "pdf/replace_token.php"; +include "pdf/replace_angebot.php"; + + +?> \ No newline at end of file diff --git a/pdf/liefer_pdf.php b/pdf/liefer_pdf.php new file mode 100644 index 0000000..432bbfc --- /dev/null +++ b/pdf/liefer_pdf.php @@ -0,0 +1,101 @@ +query($sql); +$nt = $result->fetch_assoc(); +$sqlp = "SELECT * FROM ".PREFIX."_liefer_Pos WHERE (Jahr = \"".$Jahr."\" AND liefer_ID = \"".$ID."\") ORDER BY Position ASC;"; +$resultp = $db->query($sqlp); +$sqla = "SELECT * FROM Admin WHERE ID = \"".$nt['Admin_ID']."\";"; +$resulta = $db->query($sqla); +$nta = $resulta->fetch_assoc(); +$sqlk = "SELECT * FROM ".PREFIX."_Kontakte WHERE ID = \"".$nt['Kontakt_ID']."\";"; +$resultk = $db->query($sqlk); +$ntk = $resultk->fetch_assoc(); +$sqltext = "SELECT * FROM ".PREFIX."_Texte WHERE section= \"liefer\";"; +$rtext = $db->query($sqltext); +$nttext = $rtext->fetch_assoc(); + +while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen']) { + $nt['ID'] = "0".$nt['ID']; +} + + +class PDF extends FPDF { + + function Header() { + include "pdf/header.php"; + } + function Footer() { + include "pdf/footer.php"; + } +} + +$pdf=new PDF(); +$pdf->SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); +$pdf->SetLeftMargin(20); +$pdf->SetAutoPageBreak(true, 30); + +if ("2" == $_SESSION['Firma']['Werbung']) { + include "pdf/header2.php"; +} else { + include "pdf/header".$_SESSION['Firma']['ASP'].".php"; +} + +$pdf->SetY(95); +$pdf->Write(4, "Lieferschein-Nr.:"); +$pdf->SetX(65); +$pdf->Write(4, $nt['Jahr']."_".$nt['ID']); +$pdf->SetX(138); +$pdf->Cell(15, 4, "Datum:", 0); +$pdf->Cell(47, 4, $nt['Datum'], 0, 1, 'R'); +$pdf->SetRightMargin(10); +$pdf->SetY(107); +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F1_Red'], $_SESSION['Firma']['F1_Green'], $_SESSION['Firma']['F1_Blue']); +$pdf->Write(10, "Lieferschein\n"); +$pdf->SetFont('Helvetica', '', 10); +$pdf->SetTextColor(0); + +$var = $nttext['Text1']; +include "pdf/replace_token.php"; +include "pdf/replace_liefer.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var."\n"); + +include "pdf/position_liefer.php"; + +$pdf->SetFont('Helvetica', '', 10); + +$var = $nttext['Text2']; +include "pdf/replace_token.php"; +include "pdf/replace_liefer.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var); + +if ("" != $nt['Text']) { + $pdf->Write(4, "\n".$nt['Text']."\n"); +} + +$var = $_SESSION['Firma']['Gruss']; +include "pdf/replace_gruss.php"; +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, "\n".$var); + +$file = "pdf/".PREFIX."/liefer/L_".$nt['Jahr']."_".$nt['ID'].".pdf"; +$pdf->Output($file, "F"); + +$var = $nttext['EMail']; +include "pdf/replace_token.php"; +include "pdf/replace_liefer.php"; + +?> \ No newline at end of file diff --git a/pdf/lv_pdf.php b/pdf/lv_pdf.php new file mode 100644 index 0000000..76f6ad5 --- /dev/null +++ b/pdf/lv_pdf.php @@ -0,0 +1,115 @@ +query($sql); +$nt = $result->fetch_assoc(); +$sqlp = "SELECT * FROM ".PREFIX."_LV_Pos WHERE (Jahr = \"".$Jahr."\" AND LV_ID = \"".$ID."\") ORDER BY Position ASC;"; +$resultp = $db->query($sqlp); +$sqla = "SELECT * FROM Admin WHERE ID = \"".$nt['Admin_ID']."\";"; +$resulta = $db->query($sqla); +$nta = $resulta->fetch_assoc(); +$sqlk = "SELECT * FROM ".PREFIX."_Kontakte WHERE ID = \"".$nt['Kontakt_ID']."\";"; +$resultk = $db->query($sqlk); +$ntk = $resultk->fetch_assoc(); +$sqltext = "SELECT * FROM ".PREFIX."_Texte WHERE section= \"lv\";"; +$rtext = $db->query($sqltext); +$nttext = $rtext->fetch_assoc(); + +while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen']) { + $nt['ID'] = "0".$nt['ID']; +} + + +class PDF extends FPDF { + + function Header() { + include "pdf/header.php"; + } + function Footer() { + include "pdf/footer.php"; + } +} + +$pdf=new PDF(); +$pdf->SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); +$pdf->SetLeftMargin(20); +$pdf->SetAutoPageBreak(true, 30); + +if ("2" == $_SESSION['Firma']['Werbung']) { + include "pdf/header2.php"; +} else { + include "pdf/header".$_SESSION['Firma']['ASP'].".php"; +} + +$pdf->SetY(95); +if ($_SESSION['Firma']['KfZ']) { + $pdf->Write(4, "Kostenvoranschlag-Nr.:"); +} else { + $pdf->Write(4, "Leistungsverzeichnis-Nr.:"); +} +$pdf->SetX(65); +$pdf->Write(4, $nt['Jahr']."_".$nt['ID']); +$pdf->SetX(138); +$pdf->Cell(15, 4, "Datum:", 0); +$pdf->Cell(47, 4, $nt['Datum'], 0, 1, 'R'); +$pdf->SetRightMargin(10); +$pdf->SetY(107); +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F1_Red'], $_SESSION['Firma']['F1_Green'], $_SESSION['Firma']['F1_Blue']); +if ($_SESSION['Firma']['KfZ']) { + $pdf->Write(10, "Kostenvoranschlag\n"); +} else { + $pdf->Write(10, "Leistungsverzeichnis\n"); +} +$pdf->SetFont('Helvetica', '', 10); +$pdf->SetTextColor(0); + +$var = $nttext['Text1']; +include "pdf/replace_token.php"; +include "pdf/replace_lv.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var."\n"); + +if ($_SESSION['Firma']['KfZ']) { + include "pdf/position_full.php"; + include "pdf/berechnung.php"; +} else { + include "pdf/position_lv.php"; +} + +$pdf->SetFont('Helvetica', '', 10); + +$var = $nttext['Text2']; +include "pdf/replace_token.php"; +include "pdf/replace_lv.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var); + +if ("" != $nt['Text']) { + $pdf->Write(4, "\n".$nt['Text']."\n"); +} + +$var = $_SESSION['Firma']['Gruss']; +include "pdf/replace_gruss.php"; +include "pdf/replace_bi.php"; +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, "\n".$var); + +$file = "pdf/".PREFIX."/lv/LV_".$nt['Jahr']."_".$nt['ID'].".pdf"; +$pdf->Output($file, "F"); + +$var = $nttext['EMail']; +include "pdf/replace_token.php"; +include "pdf/replace_lv.php"; + +?> \ No newline at end of file diff --git a/pdf/mahn1_pdf.php b/pdf/mahn1_pdf.php new file mode 100644 index 0000000..980219a --- /dev/null +++ b/pdf/mahn1_pdf.php @@ -0,0 +1,92 @@ +query($sql); +$nt = $result->fetch_assoc(); +$sqlr = "SELECT *, DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum FROM ".PREFIX."_Rechnungen WHERE (Jahr = \"".$nt['Referenz_Jahr']."\" AND ID=\"".$nt['Referenz_ID']."\");"; +$resultr = $db->query($sqlr); +$ntr = $resultr->fetch_assoc(); +$sqla = "SELECT * FROM Admin WHERE ID = \"".$nt['Admin_ID']."\";"; +$resulta = $db->query($sqla); +$nta = $resulta->fetch_assoc(); +$sqlk = "SELECT * FROM ".PREFIX."_Kontakte WHERE ID = \"".$nt['Kontakt_ID']."\";"; +$resultk = $db->query($sqlk); +$ntk = $resultk->fetch_assoc(); +$sqltext = "SELECT * FROM ".PREFIX."_Texte WHERE section = \"mahn1\";"; +$resulttext = $db->query($sqltext); +$nttext = $resulttext->fetch_assoc(); + +$sqlt = "SELECT SUM(Preis * (1 + MwSt / 100)) AS Preis FROM ".PREFIX."_Teilzahlungen WHERE (Referenz_Jahr = \"".$ntr['Jahr']."\" AND Referenz_ID = \"".$ntr['ID']."\") ORDER BY Bezahlt_am ASC;"; +$resultt = $db->query($sqlt); +$ntsum = $resultt->fetch_assoc( ); + +while (strlen($ntr['ID']) < $_SESSION['Firma']['Stellen']) { + $ntr['ID'] = "0".$ntr['ID']; +} + +while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen']) { + $nt['ID'] = "0".$nt['ID']; +} + + + +class PDF extends FPDF { + + function Header() { + include "pdf/header.php"; + } + function Footer() { + include "pdf/footer.php"; + } +} + +$pdf=new PDF(); +$pdf->SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); + +if ("2" == $_SESSION['Firma']['Werbung']) { + include "pdf/header2.php"; +} else { + include "pdf/header".$_SESSION['Firma']['ASP'].".php"; +} + +$pdf->SetY(95); +$pdf->SetX(20); +$pdf->Write(4, "1. Mahnung ".$nt['Jahr']."_".$nt['ID']); +$pdf->SetX(138); +$pdf->Cell(15, 4, "Datum:", 0); +$pdf->Cell(47, 4, $nt['Datum'], 0, 1, 'R'); +$pdf->SetRightMargin(10); +$pdf->SetY(107); +$pdf->SetFont('Helvetica', '', 10); +$pdf->SetTextColor(0); + +$var = $nttext['Text1']; +include "pdf/replace_token.php"; +include "pdf/replace_mahn1.php"; +include "pdf/replace_bi.php"; +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var."\n"); + +$var = $nttext['Text2']; +include "pdf/replace_token.php"; +include "pdf/replace_mahn1.php"; +include "pdf/replace_bi.php"; +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var); + +$var = $_SESSION['Firma']['Gruss']; +include "pdf/replace_gruss.php"; +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, "\n".$var); + + +$file = "pdf/".PREFIX."/oposten/M1_".$nt['Jahr']."_".$nt['ID'].".pdf"; +$pdf->Output($file, "F"); + + +?> \ No newline at end of file diff --git a/pdf/mahn2_pdf.php b/pdf/mahn2_pdf.php new file mode 100644 index 0000000..0eb5f9b --- /dev/null +++ b/pdf/mahn2_pdf.php @@ -0,0 +1,97 @@ +query($sql); +$nt = $result->fetch_assoc(); +$sql1 = "SELECT ID, DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum FROM ".PREFIX."_Mahnungen WHERE (Nr = \"1\" AND Referenz_ID = \"".$nt['Referenz_ID']."\");"; +$result1 = $db->query($sql1); +$nt1 = $result1->fetch_assoc(); +$sqlr = "SELECT *, DATE_ADD(Datum, INTERVAL ".$_SESSION['Firma']['Z_Bis']." DAY) AS R_Datum, DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum FROM ".PREFIX."_Rechnungen WHERE (Jahr = \"".$nt['Referenz_Jahr']."\" AND ID=\"".$nt['Referenz_ID']."\");"; +$resultr = $db->query($sqlr); +$ntr = $resultr->fetch_assoc(); +$sqla = "SELECT * FROM Admin WHERE ID = \"".$nt['Admin_ID']."\";"; +$resulta = $db->query($sqla); +$nta = $resulta->fetch_assoc(); +$sqlk = "SELECT * FROM ".PREFIX."_Kontakte WHERE ID = \"".$nt['Kontakt_ID']."\";"; +$resultk = $db->query($sqlk); +$ntk = $resultk->fetch_assoc(); +$sqltext = "SELECT * FROM ".PREFIX."_Texte WHERE section = \"mahn2\";"; +$resulttext = $db->query($sqltext); +$nttext = $resulttext->fetch_assoc(); + +$sqlt = "SELECT SUM(Preis * (1 + MwSt / 100)) AS Preis FROM ".PREFIX."_Teilzahlungen WHERE (Referenz_Jahr = \"".$ntr['Jahr']."\" AND Referenz_ID = \"".$ntr['ID']."\") ORDER BY Bezahlt_am ASC;"; +$resultt = $db->query($sqlt); +$ntsum = $resultt->fetch_assoc( ); + +while (strlen($ntr['ID']) < $_SESSION['Firma']['Stellen']) { + $ntr['ID'] = "0".$ntr['ID']; +} + +while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen']) { + $nt['ID'] = "0".$nt['ID']; +} + + + +class PDF extends FPDF { + + function Header() { + include "pdf/header.php"; + } + function Footer() { + include "pdf/footer.php"; + } +} + +$pdf=new PDF(); +$pdf->SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); + +if ("2" == $_SESSION['Firma']['Werbung']) { + include "pdf/header2.php"; +} else { + include "pdf/header".$_SESSION['Firma']['ASP'].".php"; +} + +$pdf->SetY(95); +$pdf->SetX(20); +$pdf->Write(4, "Letzte Mahnung ".$nt['Jahr']."_".$nt['ID']); +$pdf->SetX(138); +$pdf->Cell(15, 4, "Datum:", 0); +$pdf->Cell(47, 4, $nt['Datum'], 0, 1, 'R'); +$pdf->SetRightMargin(10); +$pdf->SetY(107); +$pdf->SetFont('Helvetica', '', 10); +$pdf->SetTextColor(0); + +$var = $nttext['Text1']; +include "pdf/replace_token.php"; +include "pdf/replace_mahn2.php"; +include "pdf/replace_bi.php"; +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var."\n"); + +include "pdf/position_mahn2.php"; + +$var = $nttext['Text2']; +include "pdf/replace_token.php"; +include "pdf/replace_mahn2.php"; +include "pdf/replace_bi.php"; +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var); + +$var = $_SESSION['Firma']['Gruss']; +include "pdf/replace_gruss.php"; +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, "\n".$var); + + +$file = "pdf/".PREFIX."/oposten/M2_".$nt['Jahr']."_".$nt['ID'].".pdf"; +$pdf->Output($file, "F"); + + +?> \ No newline at end of file diff --git a/pdf/neue_firma_pdf.php b/pdf/neue_firma_pdf.php new file mode 100644 index 0000000..9ec4337 --- /dev/null +++ b/pdf/neue_firma_pdf.php @@ -0,0 +1,99 @@ +query($sql); +$nt = $result->fetch_assoc(); +$sqlp = "SELECT * FROM 1000_Rechnung_Pos WHERE (Rechnung_ID = \"".$ID."\" AND Jahr = \"".$Jahr."\") ORDER BY Position ASC;"; +$resultp = $db->query($sqlp); +$sqlk = "SELECT * FROM 1000_Kontakte WHERE ID = \"".$nt['Kontakt_ID']."\";"; +$resultk = $db->query($sqlk); +$ntk = $resultk->fetch_assoc(); +$sqlab = "SELECT Preis_aus_Pos, Auftrag_Preis, DATE_FORMAT(A_Datum, '%d.%m.%Y') AS A_Datum FROM 1000_Auftraege WHERE ID = \"".$nt['Auftrag_ID']."\";"; +$resultab = $db->query($sqlab); +$ntab = $resultab->fetch_assoc(); +$sqltext = "SELECT * FROM 1000_Texte WHERE Name = \"Rechnungen ohne Auftragsbestätigung\";"; +$table = "full"; +$resulttext = $db->query($sqltext); +$nttext = $resulttext->fetch_assoc(); + +while (strlen($nt['ID']) < 5) { + $nt['ID'] = "0".$nt['ID']; +} +class PDF extends FPDF { + + function Header() { + include "pdf/header_best.php"; + } + function Footer() { + include "pdf/footer_best.php"; + } + +} + +$pdf=new PDF(); +$pdf->SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); + +include "pdf/header0_best.php"; + + +$pdf->SetY(95); +$pdf->Write(4, "Rechnung-Nr.:"); +$pdf->SetX(45); +$pdf->Write(4, $nt['Jahr']."_".$nt['ID']); +$pdf->SetX(138); +$pdf->Cell(15, 4, "Datum:", 0); +$pdf->Cell(47, 4, $nt['Datum'], 0, 1, 'R'); +$pdf->SetRightMargin(10); +$pdf->SetY(107); +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor(204,0,102); +$pdf->Write(10, "Rechnung\n"); +$pdf->SetFont('Helvetica', '', 10); +$pdf->SetTextColor(0); + +$var = $nttext['Text1']; +include "pdf/replace_token.php"; +include "pdf/replace_rechnung.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var."\n"); + + +include "pdf/position_full.php"; + + +include "pdf/berechnung.php"; + +$var = $nttext['Text2']; +include "pdf/replace_token.php"; +include "pdf/replace_rechnung.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var); + +if ("" != $nt['Text']) { + $pdf->Write(4, "\n".$nt['Text']."\n"); +} + +$var = "Mit freundlichen Grüßen\nPablo Rink und Christian Steinle"; +include "pdf/replace_gruss.php"; +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, "\n".$var); + + +$file = "pdf/1000/rechnung/R_".$nt['Jahr']."_".$nt['ID'].".pdf"; +$pdf->Output($file, "F"); + +$var = $nttext['EMail']; +include "pdf/replace_token.php"; +include "pdf/replace_rechnung.php"; + +?> \ No newline at end of file diff --git a/pdf/opost_pdf.php b/pdf/opost_pdf.php new file mode 100644 index 0000000..c3743c5 --- /dev/null +++ b/pdf/opost_pdf.php @@ -0,0 +1,119 @@ +query($sql); +$sql = "SELECT SUM(Preis * (1 + MwSt / 100)) AS Preis FROM ".PREFIX."_Rechnungen WHERE (Bezahlt =\"0\"".$Frage.") GROUP BY Bezahlt;"; +$res_sum = $db->query($sql); +$ntsum = $res_sum->fetch_assoc(); +$GesamtTeil = 0; + + +class PDF extends FPDF { + + function Header() { + include "pdf/header.php"; + } + function Footer() { + include "pdf/footer.php"; + } +} + +$pdf=new PDF(); +$pdf->SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); +$pdf->SetRightMargin(10); +$pdf->SetY(50); +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F1_Red'], $_SESSION['Firma']['F1_Green'], $_SESSION['Firma']['F1_Blue']); +$pdf->Write(20, "Übersicht ".$Typ." vom ".date("d.m.Y", time())."\n"); +$pdf->SetTextColor(0); + +while ($nt = $result->fetch_assoc()) { + $ID = $nt['ID']; + while (strlen($ID) < $_SESSION['Firma']['Stellen']) { + $ID = "0".$ID; + } + + $sql = "SELECT ID, Nr, DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum FROM ".PREFIX."_Mahnungen WHERE (Referenz_Jahr = \"".$nt['Jahr']."\" AND Referenz_ID = \"".$nt['ID']."\") ORDER BY Nr ASC;"; + $resultm = $db->query($sql); + + $sql = "SELECT *, DATE_FORMAT(Bezahlt_am, '%d.%m.%Y') AS Datum FROM ".PREFIX."_Teilzahlungen WHERE (Referenz_Jahr = \"".$nt['Jahr']."\" AND Referenz_ID = \"".$nt['ID']."\") ORDER BY Bezahlt_am ASC;"; + $resultt = $db->query($sql); + + $pdf->SetFont('Helvetica', 'B', 10); + $pdf->Write(4, "Rechnung: "); + $pdf->Write(4, $nt['Jahr']."_".$ID); + $pdf->Write(4, " vom ".date("d.m.Y",strtotime($nt['Datum']))); + $pdf->SetX(130); + $pdf->Cell(70, 4, number_format($nt['Preis'] * (1 + $nt['MwSt'] / 100), '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); + $pdf->SetFont('Helvetica', '', 8); + + $Summe = 0; + while ($ntt = $resultt->fetch_assoc()) { + $Summe = $Summe + round($ntt['Preis'] * (1 + $ntt['MwSt'] / 100), 2); + $pdf->SetX(30); + $pdf->Write( 4 , "Teilzahlung vom ".$ntt['Datum'] ); + $pdf->SetX(130); + $pdf->Cell(70, 4, number_format($ntt['Preis'] * (1 + $ntt['MwSt'] / 100), '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); + } + if ("0" != $resultt->num_rows) { + $pdf->SetX(30); + $pdf->Write(4, 'Gesamt:'); + $pdf->SetX(130); + $pdf->Cell(70, 4 , number_format($Summe, '2', ',', '.')." €\n", 0, 0, 'R' ); + $pdf->Write(4, "\n"); + $pdf->SetFont('Helvetica', 'B', 10); + $pdf->SetX(30); + $pdf->Write(4 , "Offener Restbetrag"); + $pdf->SetX(130); + $pdf->Cell(70, 4, number_format($nt['Preis'] * (1 + $nt['MwSt'] / 100) - $Summe, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); + $pdf->SetFont('Helvetica', '', 8); + } + + $GesamtTeil = $GesamtTeil + $Summe; + $i = 0; + while ($ntm = $resultm->fetch_assoc()) { + while (strlen($ntm['ID']) < $_SESSION['Firma']['Stellen']) { + $ntm['ID'] = "0".$ntm['ID']; + } + if (0 != $i) { + $pdf->Write(4, ", "); + } else { + $pdf->SetX(30); + } + $pdf->Write(4, $ntm['Nr'].". Mahnung-Nr. ".$ntm['ID']." vom ".$ntm['Datum']); + $i = 1; + } + if (0 != $i) { + $pdf->Write(4, "\n"); + } + + $pdf->SetX(30); + $pdf->Write(4, $nt['Nachname']); + $pdf->Write(4, ", ".$nt['Firma']."\n"); + +} + + +$y = $pdf->GetY(); +$pdf->Line(20, $y, 200, $y); +$pdf->SetFont('Helvetica','B', 14); +$pdf->Write(10, "Gesamt ".$Typ.": "); +$pdf->SetX(130); +$pdf->Cell(70, 10, number_format($ntsum['Preis'] - $GesamtTeil, '2', ',', '.')." €", 0, 0, 'R'); + + +$file = "pdf/".PREFIX."/oposten/O_".date('Ymd').".pdf"; +$pdf->Output($file, "F"); + + +?> \ No newline at end of file diff --git a/pdf/position_full.php b/pdf/position_full.php new file mode 100644 index 0000000..6183d52 --- /dev/null +++ b/pdf/position_full.php @@ -0,0 +1,71 @@ +SetFont('Helvetica', 'B', 10); +$pdf->Cell(10, 4, "Pos.", 'B'); +$pdf->Cell(10, 4, "Anz.", 'B'); +$pdf->Cell(110, 4, "Beschreibung", 'B'); +$pdf->Cell(25, 4, "E-Preis", 'B', 0, 'R'); +$pdf->Cell(25, 4, "G-Preis", 'B', 1, 'R'); + +$pdf->SetFont('Helvetica', '', 10); +$Gesamtpreis = 0; +while ($ntp = $resultp->fetch_assoc()) { + $y_oben = $pdf->GetY(); + $Gesamtpreis = $Gesamtpreis + ($ntp['Preis'] * $ntp['Anzahl']); + $pdf->Cell(10, 4, $ntp['Position']); + $pdf->Cell(10, 4, $ntp['Anzahl']); + if(isset($ntab['Preis_aus_Pos'])) { + $take_pos = $ntab['Preis_aus_Pos']; + } elseif (isset($nt['Preis_aus_Pos'])) { + $take_pos = $nt['Preis_aus_Pos']; + } + if (("0" == $ntp['Preis']) OR ("0" == $take_pos)) { + $pdf->Cell(135, 4, "-/- €", 0, 0, 'R'); + $pdf->Cell(25, 4, "-/- €", 0, 0, 'R'); + } else { + $pdf->Cell(135, 4, number_format($ntp['Preis'], '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Cell(25, 4, number_format($ntp['Preis'] * $ntp['Anzahl'], '2', ',', '.')." €", 0, 0, 'R'); + } + $pdf->SetX(40); + $pdf->MultiCell(110, 4, $ntp['Bezeichnung'], 0, 'L'); + if (("" != $_SESSION['Firma']['Feld1_Name']) AND (preg_match("/".$pdf_type.",/", $_SESSION['Firma']['Feld1'])) AND ("" != $ntp['Feld1'])) { + $pdf->SetFont('Helvetica', '', 8); + $pdf->SetX(40); + $pdf->MultiCell(110, 3, stripslashes($ntp['Feld1']), 0, 'L'); + } + if (("" != $_SESSION['Firma']['Feld2_Name']) AND (preg_match("/".$pdf_type.",/", $_SESSION['Firma']['Feld2'])) AND ("" != $ntp['Feld2'])) { + $pdf->SetFont('Helvetica', 'I', 8); + $pdf->SetX(40); + $pdf->MultiCell(110, 3, $_SESSION['Firma']['Feld2_Name'].": ".stripslashes($ntp['Feld2']), 0, 'L'); + } + if (("" != $_SESSION['Firma']['Feld3_Name']) AND (preg_match("/".$pdf_type.",/", $_SESSION['Firma']['Feld3'])) AND ("" != $ntp['Feld3'])) { + $pdf->SetFont('Helvetica', 'I', 8); + $pdf->SetX(40); + $pdf->MultiCell(110, 3, $_SESSION['Firma']['Feld3_Name'].": ".stripslashes($ntp['Feld3']), 0, 'L'); + } + if (("" != $_SESSION['Firma']['Feld4_Name']) AND (preg_match("/".$pdf_type.",/", $_SESSION['Firma']['Feld4'])) AND ("" != $ntp['Feld4'])) { + $pdf->SetFont('Helvetica', 'I', 8); + $pdf->SetX(40); + $pdf->MultiCell(110, 3, $_SESSION['Firma']['Feld4_Name'].": ".stripslashes($ntp['Feld4']), 0, 'L'); + } + if ((("" != $_SESSION['Firma']['Feld5_Name']) AND ("Intern" != $_SESSION['Firma']['Feld5_Name'])) AND (preg_match("/".$pdf_type.",/", $_SESSION['Firma']['Feld5'])) AND ("" != $ntp['Feld5'])) { + $pdf->SetFont('Helvetica', 'I', 8); + $pdf->SetX(40); + $pdf->MultiCell(110, 3, $_SESSION['Firma']['Feld5_Name'].": ".stripslashes($ntp['Feld5']), 0, 'L'); + } + $pdf->SetFont('Helvetica', '', 10); + $y_unten = $pdf->GetY(); + $pdf->Line(20,$y_unten,200,$y_unten); + if ($y_oben > $y_unten) { + $pdf->SetY(45); + $pdf->SetFont('Helvetica', 'B', 10); + $pdf->Cell(10, 4, "Pos.", 'B'); + $pdf->Cell(10, 4, "Anz.", 'B'); + $pdf->Cell(110, 4, "Beschreibung", 'B'); + $pdf->Cell(25, 4, "E-Preis", 'B', 0, 'R'); + $pdf->Cell(25, 4, "G-Preis", 'B', 1, 'R'); + $pdf->SetFont('Helvetica', '', 10); + $pdf->SetY($y_unten); + } + +} +?> \ No newline at end of file diff --git a/pdf/position_liefer.php b/pdf/position_liefer.php new file mode 100644 index 0000000..340ffd6 --- /dev/null +++ b/pdf/position_liefer.php @@ -0,0 +1,43 @@ +SetFont('Helvetica', 'B', 10); +$pdf->Cell(10, 4, "Pos.", 'B'); +$pdf->Cell(10, 4, "Anz.", 'B'); +$pdf->Cell(160, 4, "Beschreibung", 'B', 1); + +$pdf->SetFont('Helvetica', '', 10); +$pdf_type = "liefer"; +$Gesamtpreis = 0; +while ($ntp = $resultp->fetch_assoc()) { + $pdf->Cell(10, 4, $ntp['Position']); + $pdf->Cell(10, 4, $ntp['Anzahl']); + $pdf->MultiCell(160, 4, $ntp['Bezeichnung'], 0, 'L'); + if (("" != $_SESSION['Firma']['Feld1_Name']) AND (preg_match("/".$pdf_type.",/", $_SESSION['Firma']['Feld1'])) AND ("" != $ntp['Feld1'])) { + $pdf->SetFont('Helvetica', '', 8); + $pdf->SetX(40); + $pdf->MultiCell(160, 4, $ntp['Feld1'], 0, 'L'); + } + if (("" != $_SESSION['Firma']['Feld2_Name']) AND (preg_match("/".$pdf_type.",/", $_SESSION['Firma']['Feld2'])) AND ("" != $ntp['Feld2'])) { + $pdf->SetFont('Helvetica', 'I', 8); + $pdf->SetX(40); + $pdf->MultiCell(160, 4, $_SESSION['Firma']['Feld2_Name'].": ".$ntp['Feld2'], 0, 'L'); + } + if (("" != $_SESSION['Firma']['Feld3_Name']) AND (preg_match("/".$pdf_type.",/", $_SESSION['Firma']['Feld3'])) AND ("" != $ntp['Feld3'])) { + $pdf->SetFont('Helvetica', 'I', 8); + $pdf->SetX(40); + $pdf->MultiCell(160, 4, $_SESSION['Firma']['Feld3_Name'].": ".$ntp['Feld3'], 0, 'L'); + } + if (("" != $_SESSION['Firma']['Feld4_Name']) AND (preg_match("/".$pdf_type.",/", $_SESSION['Firma']['Feld4'])) AND ("" != $ntp['Feld4'])) { + $pdf->SetFont('Helvetica', 'I', 8); + $pdf->SetX(40); + $pdf->MultiCell(160, 4, $_SESSION['Firma']['Feld4_Name'].": ".$ntp['Feld4'], 0, 'L'); + } + if ((("" != $_SESSION['Firma']['Feld5_Name']) AND ("Intern" != $_SESSION['Firma']['Feld5_Name'])) AND (preg_match("/".$pdf_type.",/", $_SESSION['Firma']['Feld5'])) AND ("" != $ntp['Feld5'])) { + $pdf->SetFont('Helvetica', 'I', 8); + $pdf->SetX(40); + $pdf->MultiCell(160, 4, $_SESSION['Firma']['Feld5_Name'].": ".$ntp['Feld5'], 0, 'L'); + } + $pdf->SetFont('Helvetica', '', 10); + $y = $pdf->GetY(); + $pdf->Line(20,$y,200,$y); +} +?> \ No newline at end of file diff --git a/pdf/position_lv.php b/pdf/position_lv.php new file mode 100644 index 0000000..035ee9a --- /dev/null +++ b/pdf/position_lv.php @@ -0,0 +1,42 @@ +SetFont('Helvetica', 'B', 10); +$pdf->Cell(10, 4, "Pos.", 'B'); +$pdf->Cell(170, 4, "Beschreibung", 'B', 1); + +$pdf->SetFont('Helvetica', '', 10); +$pdf_type = "lv"; +$Gesamtpreis = 0; +while ($ntp = $resultp->fetch_assoc()) { + $pdf->Cell(10, 4, $ntp['Position']); + $pdf->MultiCell(170, 4, $ntp['Bezeichnung'], 0, 'L'); + if (("" != $_SESSION['Firma']['Feld1_Name']) AND (preg_match("/".$pdf_type.",/", $_SESSION['Firma']['Feld1'])) AND ("" != $ntp['Feld1'])) { + $pdf->SetFont('Helvetica', '', 8); + $pdf->SetX(30); + $pdf->MultiCell(170, 4, $ntp['Feld1'], 0, 'L'); + } + if (("" != $_SESSION['Firma']['Feld2_Name']) AND (preg_match("/".$pdf_type.",/", $_SESSION['Firma']['Feld2'])) AND ("" != $ntp['Feld2'])) { + $pdf->SetFont('Helvetica', 'I', 8); + $pdf->SetX(30); + $pdf->MultiCell(170, 4, $_SESSION['Firma']['Feld2_Name'].": ".$ntp['Feld2'], 0, 'L'); + } + if (("" != $_SESSION['Firma']['Feld3_Name']) AND (preg_match("/".$pdf_type.",/", $_SESSION['Firma']['Feld3'])) AND ("" != $ntp['Feld3'])) { + $pdf->SetFont('Helvetica', 'I', 8); + $pdf->SetX(30); + $pdf->MultiCell(170, 4, $_SESSION['Firma']['Feld3_Name'].": ".$ntp['Feld3'], 0, 'L'); + } + if (("" != $_SESSION['Firma']['Feld4_Name']) AND (preg_match("/".$pdf_type.",/", $_SESSION['Firma']['Feld4'])) AND ("" != $ntp['Feld4'])) { + $pdf->SetFont('Helvetica', 'I', 8); + $pdf->SetX(30); + $pdf->MultiCell(170, 4, $_SESSION['Firma']['Feld4_Name'].": ".$ntp['Feld4'], 0, 'L'); + } + if ((("" != $_SESSION['Firma']['Feld5_Name']) AND ("Intern" != $_SESSION['Firma']['Feld5_Name'])) AND (preg_match("/".$pdf_type.",/", $_SESSION['Firma']['Feld5'])) AND ("" != $ntp['Feld5'])) { + $pdf->SetFont('Helvetica', 'I', 8); + $pdf->SetX(30); + $pdf->MultiCell(170, 4, $_SESSION['Firma']['Feld5_Name'].": ".$ntp['Feld5'], 0, 'L'); + } + $pdf->SetFont('Helvetica', '', 10); + $y = $pdf->GetY(); + $pdf->Line(20,$y,200,$y); + +} +?> \ No newline at end of file diff --git a/pdf/position_mahn2.php b/pdf/position_mahn2.php new file mode 100644 index 0000000..18be182 --- /dev/null +++ b/pdf/position_mahn2.php @@ -0,0 +1,38 @@ +SetFont('Helvetica', 'B', 10); +$pdf->Cell(20, 4, "Pos.", 'B'); +$pdf->Cell(135, 4, "Beschreibung", 'B'); +$pdf->Cell(25, 4, "G-Preis", 'B', 1, 'R'); +$pdf->SetFont('Helvetica', '', 10); + +$Gesamtpreis = $ntr['Preis'] * (1 + $ntr['MwSt'] / 100); +$pdf->Cell(20, 4, "1", ''); +$pdf->Cell(135, 4, "Gesamtbetrag aus Rechnung ".$ntr['Jahr']."_".$ntr['ID']." vom ".$ntr['Datum'], ''); +$pdf->Cell(25, 4, number_format($Gesamtpreis, '2', ',', '.')." €", '', 1, 'R'); + +$pdf->Cell(20, 4, "2", ''); +$pdf->Cell(135, 4, "-Teilzahlungen", ''); +$pdf->Cell(25, 4, number_format(-1*$ntsum['Preis'], '2', ',', '.')." €", '', 1, 'R'); + +$pdf->Cell(20, 4, "3", ''); +$pdf->Cell(135, 4, "Mahngebühren", ''); +$pdf->Cell(25, 4, number_format($_SESSION['Firma']['Gebuehr'], '2', ',', '.')." €", '', 1, 'R'); + +$Tage = (strtotime($nt['Bezug_Datum']) - strtotime($ntr['R_Datum'])) / (3600 * 24); +$Zins = ($Gesamtpreis - $ntsum['Preis']) * $Tage / 365 * $_SESSION['Firma']['Zins'] / 100; +$pdf->Cell(20, 4, "4", 'B'); +$pdf->Cell(135, 4, "Verzugszinsen anteilig i.H.v. ".$_SESSION['Firma']['Zins']."% p.a.", 'B'); +$pdf->Cell(25, 4, number_format($Zins, '2', ',', '.')." €", 'B', 1, 'R'); +$y_unten = $pdf->GetY(); +$pdf->Line(20,$y_unten,200,$y_unten); + +$Gesamtpreis = $Gesamtpreis - $ntsum['Preis'] + $_SESSION['Firma']['Gebuehr'] + $Zins; +$pdf->SetX(40); +$pdf->SetFont('Helvetica', 'B', 10); +$pdf->Cell(135, 4, "Mahnbetrag", ''); +$pdf->Cell(25, 4, number_format($Gesamtpreis, '2', ',', '.')." €", '', 1, 'R'); +$y_unten = $pdf->GetY(); +$pdf->Line(40,$y_unten,200,$y_unten); +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, "\n"); +?> \ No newline at end of file diff --git a/pdf/rech_pdf.php b/pdf/rech_pdf.php new file mode 100644 index 0000000..a2b8f5b --- /dev/null +++ b/pdf/rech_pdf.php @@ -0,0 +1,168 @@ +query($sql); +$nt = $result->fetch_assoc(); +$sqlp = "SELECT * FROM ".PREFIX."_Rechnung_Pos WHERE (Rechnung_ID = \"".$ID."\" AND Jahr = \"".$Jahr."\") ORDER BY Position ASC;"; +$resultp = $db->query($sqlp); +$sqla = "SELECT * FROM Admin WHERE ID = \"".$nt['Admin_ID']."\";"; +$resulta = $db->query($sqla); +$nta = $resulta->fetch_assoc(); +$sqlk = "SELECT * FROM ".PREFIX."_Kontakte WHERE ID = \"".$nt['Kontakt_ID']."\";"; +$resultk = $db->query($sqlk); +$ntk = $resultk->fetch_assoc(); +$sqlab = "SELECT Preis_aus_Pos, Auftrag_Preis, DATE_FORMAT(A_Datum, '%d.%m.%Y') AS A_Datum FROM ".PREFIX."_Auftraege WHERE Jahr = \"" . $nt['Auftrag_Jahr'] . "\" AND ID = \"".$nt['Auftrag_ID']."\";"; +$resultab = $db->query($sqlab); +$ntab = $resultab->fetch_assoc(); +if ((0 == $nt['Auftrag_Jahr']) AND (0 == $nt['Auftrag_ID'])) { + $sqltext = "SELECT * FROM ".PREFIX."_Texte WHERE Name = \"Rechnungen ohne Auftragsbestätigung\";"; + $table = "full"; +} else { + if ($nt['Vorkasse']) { + $sqltext = "SELECT * FROM ".PREFIX."_Texte WHERE Name = \"Vorkasse-Rechnungen\";"; + $table = "VR"; + } elseif ($nt['Schluss_Rechnung']) { + $sqltext = "SELECT * FROM ".PREFIX."_Texte WHERE Name = \"Schlußrechnungen\";"; + $table = "SR"; + $sqlr = "SELECT Jahr, ID, Vorkasse, Preis, Rabatt, DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum FROM ".PREFIX."_Rechnungen WHERE (Auftrag_Jahr = \"".$nt['Auftrag_Jahr']."\" AND Auftrag_ID = \"".$nt['Auftrag_ID']."\" AND Schluss_Rechnung = \"0\") ORDER BY Vorkasse DESC, ID ASC;"; + $resultr = $db->query($sqlr); + } else { + $sqltext = "SELECT * FROM ".PREFIX."_Texte WHERE Name = \"Abschlags-Rechnungen\";"; + $table = "AR"; + } +} +$resulttext = $db->query($sqltext); +$nttext = $resulttext->fetch_assoc(); +$sqlfirma = 'SELECT * FROM Firma WHERE ID = "' . PREFIX . '";'; +$resultfirma = $db -> query ( $sqlfirma ); +$ntfirma = $resultfirma -> fetch_assoc ( ); + +while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen']) { + $nt['ID'] = "0".$nt['ID']; +} +while (strlen($nt['Auftrag_ID']) < $_SESSION['Firma']['Stellen']) { + $nt['Auftrag_ID'] = "0".$nt['Auftrag_ID']; +} + +class PDF extends FPDF { + + function Header() { + include "pdf/header.php"; + } + function Footer() { + include "pdf/footer.php"; + } +} + +$pdf=new PDF(); +$pdf->SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); + +if ("2" == $_SESSION['Firma']['Werbung']) { + include "pdf/header2.php"; +} else { + include "pdf/header".$_SESSION['Firma']['ASP'].".php"; +} + +$pdf->SetY(95); +$pdf->Write(4, "Rechnung-Nr.:"); +$pdf->SetX(45); +$pdf->Write(4, $nt['Jahr']."_".$nt['ID']); +$pdf->SetX(138); +$pdf->Cell(15, 4, "Datum:", 0); +$pdf->Cell(47, 4, $nt['Datum'], 0, 1, 'R'); +if ((0 != $nt['Auftrag_Jahr']) AND (0 != $nt['Auftrag_ID'])) { + $pdf->Write(4, "Auftrag-Nr:"); + $pdf->SetX(45); + $pdf->Write(4, $nt['Auftrag_Jahr']."_".$nt['Auftrag_ID']."\n"); +} +if ($_SESSION['Firma']['KfZ']) { + include "pdf/kfz_header.php"; +} else { + $pdf->SetY(107); +} +$pdf->SetRightMargin(10); +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F1_Red'], $_SESSION['Firma']['F1_Green'], $_SESSION['Firma']['F1_Blue']); +$pdf->Write(10, "Rechnung\n"); +$pdf->SetFont('Helvetica', '', 10); +$pdf->SetTextColor(0); + +$var = $nttext['Text1']; +include "pdf/replace_token.php"; +include "pdf/replace_rechnung.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var."\n"); + + +if (("VR" == $table) OR ("AR" == $table)) { + $pdf->SetFont('Helvetica', 'B', 10); + $pdf->Cell(10, 4, "Pos.", 1); + $pdf->Cell(10, 4, "Anz.", 1); + $pdf->Cell(110, 4, "Beschreibung", 1); + $pdf->Cell(25, 4, "E-Preis", 1, 0, 'R'); + $pdf->Cell(25, 4, "G-Preis", 1, 1, 'R'); + $pdf->SetFont('Helvetica', '', 10); + $pdf->Cell(10, 4, "1", 1); + $pdf->Cell(10, 4, "1", 1); + if ("VR" == $table) { + $pdf->Cell(110, 4, "vereinbarter Vorkassebetrag", 1); + } elseif ("AR" == $table) { + $pdf->Cell(110, 4, "vereinbarte Abschlagzahlung", 1); + } + $pdf->Cell(25, 4, number_format($nt['Preis'], '2', ',', '.')." €", 1, 0, 'R'); + $pdf->Cell(25, 4, number_format($nt['Preis'], '2', ',', '.')." €", 1, 1, 'R'); + $Gesamtpreis = $nt['Preis']; + $take_pos = 1; +} else { + include "pdf/position_full.php"; +} + + +include "pdf/berechnung.php"; + +$var = $nttext['Text2']; +include "pdf/replace_token.php"; +include "pdf/replace_rechnung.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var); + +if (0 != $nt['Skonto']) { + $var = $_SESSION['Firma']['Skonto']; + include "pdf/replace_skonto.php"; + $pdf->SetFont('Helvetica', '', 10); + $pdf->Write(4, $var."\n"); +} + + +if ("Y" == $nt['UStG_13']) { + $pdf->Write(4, "\n".$ntfirma['UStG_13']."\n"); +} + +if ("" != $nt['Text']) { + $pdf->Write(4, "\n".$nt['Text']."\n"); +} + +$var = $_SESSION['Firma']['Gruss']; +include "pdf/replace_gruss.php"; +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, "\n".$var); + + +$file = "pdf/".PREFIX."/rechnung/R_".$nt['Jahr']."_".$nt['ID'].".pdf"; +$pdf->Output($file, "F"); + +$var = $nttext['EMail']; +include "pdf/replace_token.php"; +include "pdf/replace_rechnung.php"; + +?> \ No newline at end of file diff --git a/pdf/replace_angebot.php b/pdf/replace_angebot.php new file mode 100644 index 0000000..1dcdaa4 --- /dev/null +++ b/pdf/replace_angebot.php @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/pdf/replace_bestaet.php b/pdf/replace_bestaet.php new file mode 100644 index 0000000..c87027c --- /dev/null +++ b/pdf/replace_bestaet.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/pdf/replace_bi.php b/pdf/replace_bi.php new file mode 100644 index 0000000..731930d --- /dev/null +++ b/pdf/replace_bi.php @@ -0,0 +1,87 @@ +"); +$Anz_I = substr_count($var, ""); + +while ($Anz_B + $Anz_I > 0) { + $i++; + if ($i > 100) { + return(0); + } + $Anfang_B = strpos($var, ""); + $Anfang_I = strpos($var, ""); + $Ende_B = strpos($var, ""); + $Ende_I = strpos($var, ""); + if ($Is_B AND $Is_I) { + $pdf->SetFont('Helvetica', 'BI', 10); + if ($Ende_B < $Ende_I) { + $Is_B = 0; + $pdf->Write(4, substr($var, 0, $Ende_B)); + $var = substr($var, $Ende_B+9); + $Anz_B--; + } else { + $Is_I = 0; + $pdf->Write(4, substr($var, 0, $Ende_I)); + $var = substr($var, $Ende_I+5); + $Anz_I--; + } + } elseif ($Is_B) { + $pdf->SetFont('Helvetica', 'B', 10); + if (0 == $Anfang_I AND 0 == $Ende_I) { + $Is_B = 0; + $pdf->Write(4, substr($var, 0, $Ende_B)); + $var = substr($var, $Ende_B+9); + $Anz_B--; + } elseif ($Ende_B > $Anfang_I) { + $Is_I = 1; + $pdf->Write(4, substr($var, 0, $Anfang_I)); + $var = substr($var, $Anfang_I+4); + } else { + $Is_B = 0; + $pdf->Write(4, substr($var, 0, $Ende_B)); + $var = substr($var, $Ende_B+9); + $Anz_B--; + } + } elseif ($Is_I) { + $pdf->SetFont('Helvetica', 'I', 10); + if (0 == $Anfang_B AND 0 == $Ende_B) { + $Is_I = 0; + $pdf->Write(4, substr($var, 0, $Ende_I)); + $var = substr($var, $Ende_I+5); + $Anz_I--; + } + elseif ($Ende_I > $Anfang_B) { + $Is_B = 1; + $pdf->Write(4, substr($var, 0, $Anfang_B)); + $var = substr($var, $Anfang_B+8); + } else { + $Is_I = 0; + $pdf->Write(4, substr($var, 0, $Ende_I)); + $var = substr($var, $Ende_I+5); + $Anz_I--; + } + } else { + $pdf->SetFont('Helvetica', '', 10); + if (($Anfang_B <= $Anfang_I) AND ('' != $Ende_B)) { + $Is_B = 1; + $pdf->Write(4, substr($var, 0, $Anfang_B)); + $var = substr($var, $Anfang_B+8); + } elseif (($Anfang_I <= $Anfang_B) AND ('' != $Ende_I)) { + $Is_I = 1; + $pdf->Write(4, substr($var, 0, $Anfang_I)); + $var = substr($var, $Anfang_I+4); + } elseif ($Anfang_B < $Anfang_I) { + $Is_I = 1; + $pdf->Write(4, substr($var, 0, $Anfang_I)); + $var = substr($var, $Anfang_I+4); + } elseif ($Anfang_I < $Anfang_B) { + $Is_B = 1; + $pdf->Write(4, substr($var, 0, $Anfang_B)); + $var = substr($var, $Anfang_B+8); + } else { + $Anz_B --; + } + } +} +?> \ No newline at end of file diff --git a/pdf/replace_gruss.php b/pdf/replace_gruss.php new file mode 100644 index 0000000..9fe9189 --- /dev/null +++ b/pdf/replace_gruss.php @@ -0,0 +1,23 @@ +", "", $var); + $var = str_replace("

      ", "\n", $var); + $var = str_replace("
      ", "\n", $var); + $var = str_replace("
      ", "\n", $var); + $var = str_replace(" ", " ", $var); + + $var = str_replace('[Bearbeiter_Nachname]', $nta['Nachname'], $var); + $var = str_replace('[Bearbeiter_Vorname]', $nta['Vorname'], $var); + $var = str_replace('[Bearbeiter_Telefon]', $nta['Telefon'], $var); + $var = str_replace('[Bearbeiter_Mobil]', $nta['Mobil'], $var); + $var = str_replace('[Bearbeiter_EMail]', $nta['EMail'], $var); + + $var = str_replace('[Firma_Name]', $_SESSION['Firma']['Firma_Name'], $var); + $var = str_replace('[Firma_Vertreter]', $_SESSION['Firma']['Vertreter'], $var); + $var = str_replace('[Firma_Telefon]', $_SESSION['Firma']['Telefon'], $var); + $var = str_replace('[Firma_Mobil]', $_SESSION['Firma']['Mobil'], $var); + $var = str_replace('[Firma_EMail]', $_SESSION['Firma']['EMail'], $var); + +?> \ No newline at end of file diff --git a/pdf/replace_gut.php b/pdf/replace_gut.php new file mode 100644 index 0000000..4642b8a --- /dev/null +++ b/pdf/replace_gut.php @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/pdf/replace_liefer.php b/pdf/replace_liefer.php new file mode 100644 index 0000000..734d2eb --- /dev/null +++ b/pdf/replace_liefer.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/pdf/replace_lv.php b/pdf/replace_lv.php new file mode 100644 index 0000000..f4d2249 --- /dev/null +++ b/pdf/replace_lv.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/pdf/replace_mahn1.php b/pdf/replace_mahn1.php new file mode 100644 index 0000000..ce9a4e6 --- /dev/null +++ b/pdf/replace_mahn1.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/pdf/replace_mahn2.php b/pdf/replace_mahn2.php new file mode 100644 index 0000000..84b60e5 --- /dev/null +++ b/pdf/replace_mahn2.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/pdf/replace_rechnung.php b/pdf/replace_rechnung.php new file mode 100644 index 0000000..09070b5 --- /dev/null +++ b/pdf/replace_rechnung.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/pdf/replace_skonto.php b/pdf/replace_skonto.php new file mode 100644 index 0000000..c2e887c --- /dev/null +++ b/pdf/replace_skonto.php @@ -0,0 +1,16 @@ +", "", $var); + $var = str_replace("

      ", "\n", $var); + $var = str_replace("
      ", "\n", $var); + $var = str_replace("
      ", "\n", $var); + $var = str_replace(" ", " ", $var); + + $Skonto = date("d.m.Y", strtotime("+".$_SESSION['Firma']['S_Bis']." day", strtotime($nt['Datum']))); + + $var = str_replace('[Skonto_Gültig]', $Skonto, $var); + $var = str_replace('[Skonto_Prozent]', $nt['Skonto'], $var); + $var = str_replace('[Skonto_Betrag]', number_format($Gesamtpreis * ($nt['Skonto'] / 100) * (1 + $nt['MwSt'] / 100), '2', ',', '.') , $var); +?> \ No newline at end of file diff --git a/pdf/replace_token.php b/pdf/replace_token.php new file mode 100644 index 0000000..38704f9 --- /dev/null +++ b/pdf/replace_token.php @@ -0,0 +1,33 @@ +", "", $var); + $var = str_replace("

      ", "\n", $var); + $var = str_replace("
      ", "\n", $var); + $var = str_replace("
      ", "\n", $var); + $var = str_replace(" ", " ", $var); + $var = str_replace(""", "\"", $var); + if ("Frau" == $ntk['Anrede']) { + $Briefanrede = "Sehr geehrte Frau ".$ntk['Nachname']; + } else { + $Briefanrede = "Sehr geehrter Herr ".$ntk['Nachname']; + } + $var = str_replace('[Kunde_Briefanrede]', $Briefanrede, $var); + $var = str_replace('[Kunde_Anrede]', $ntk['Anrede'], $var); + $var = str_replace('[Kunde_Nachname]', $ntk['Nachname'], $var); + $var = str_replace('[Kunde_Vorname]', $ntk['Vorname'], $var); + + $var = str_replace('[Bearbeiter_Nachname]', $nta['Nachname'], $var); + $var = str_replace('[Bearbeiter_Vorname]', $nta['Vorname'], $var); + $var = str_replace('[Bearbeiter_Telefon]', $nta['Telefon'], $var); + $var = str_replace('[Bearbeiter_Mobil]', $nta['Mobil'], $var); + $var = str_replace('[Bearbeiter_EMail]', $nta['EMail'], $var); + + $var = str_replace('[Firma_Name]', $_SESSION['Firma']['Firma_Name'], $var); + $var = str_replace('[Firma_Vertreter]', $_SESSION['Firma']['Vertreter'], $var); + $var = str_replace('[Firma_Telefon]', $_SESSION['Firma']['Telefon'], $var); + $var = str_replace('[Firma_Mobil]', $_SESSION['Firma']['Mobil'], $var); + $var = str_replace('[Firma_EMail]', $_SESSION['Firma']['EMail'], $var); + +?> \ No newline at end of file diff --git a/pdf/schrift_pdf.php b/pdf/schrift_pdf.php new file mode 100644 index 0000000..c62b8a9 --- /dev/null +++ b/pdf/schrift_pdf.php @@ -0,0 +1,81 @@ +query($sql); +$nt = $result->fetch_assoc(); +$sqla = "SELECT * FROM Admin WHERE ID = \"".$nt['Admin_ID']."\";"; +$resulta = $db->query($sqla); +$nta = $resulta->fetch_assoc(); +$sqlk = "SELECT * FROM ".PREFIX."_Kontakte WHERE ID = \"".$nt['Kontakt_ID']."\";"; +$resultk = $db->query($sqlk); +$ntk = $resultk->fetch_assoc(); +$sqltext = "SELECT * FROM ".PREFIX."_Texte WHERE section= \"schrift\";"; +$rtext = $db->query($sqltext); +$nttext = $rtext->fetch_assoc(); + +while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen']) { + $nt['ID'] = "0".$nt['ID']; +} + + +class PDF extends FPDF { + + function Header() { + include "pdf/header.php"; + } + function Footer() { + include "pdf/footer.php"; + } +} + +$pdf=new PDF(); +$pdf->SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); + +if ("2" == $_SESSION['Firma']['Werbung']) { + include "pdf/header2.php"; +} else { + include "pdf/header".$_SESSION['Firma']['ASP'].".php"; +} + +$pdf->SetY(95); +$pdf->SetX(20); +$pdf->SetRightMargin(10); +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F1_Red'], $_SESSION['Firma']['F1_Green'], $_SESSION['Firma']['F1_Blue']); +$pdf->Write(4, $nt['Betreff']); +$pdf->SetTextColor(0); +$pdf->SetFont('Helvetica', '', 10); +$pdf->SetX(138); +$pdf->Cell(15, 4, "Datum:", 0); +$pdf->Cell(47, 4, $nt['Datum'], 0, 1, 'R'); +$pdf->Write(4, "\n\n"); + +$pdf->SetFont('Helvetica', '', 10); + +$var = $nt['Text']; +include "pdf/replace_token.php"; +include "pdf/replace_bi.php"; + +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, $var); + +$var = $_SESSION['Firma']['Gruss']; +include "pdf/replace_gruss.php"; +$pdf->SetFont('Helvetica', '', 10); +$pdf->Write(4, "\n".$var); + +$file = "pdf/".PREFIX."/schrift/S_".$nt['File_Name'].".pdf"; +$pdf->Output($file, "F"); + +$var = $nttext['EMail']; +include "pdf/replace_token.php"; +include "pdf/replace_angebot.php"; + + +?> \ No newline at end of file diff --git a/pdf/track_pdf.php b/pdf/track_pdf.php new file mode 100644 index 0000000..d5b5fed --- /dev/null +++ b/pdf/track_pdf.php @@ -0,0 +1,235 @@ +query($sql); + +class PDF extends FPDF { + + function Header() { + include "pdf/header.php"; + } + function Footer() { + include "pdf/footer.php"; + } +} + + +$pdf=new PDF(); +$pdf->SetDisplayMode('fullpage'); +$pdf->AliasNbPages(); +$pdf->AddPage(); + +$pdf->SetRightMargin(10); +$pdf->SetY(50); +$pdf->SetFont('Helvetica','B', 14); +$pdf->SetTextColor($_SESSION['Firma']['F1_Red'], $_SESSION['Firma']['F1_Green'], $_SESSION['Firma']['F1_Blue']); + +if ("alle" == $_POST['Suche']) { + $pdf->Write(20, "Tracking alle Aufträge - Übersicht vom ".date("d.m.Y", time())."\n"); + $pdf->SetTextColor(0); + while ($nt = $result->fetch_assoc()) { + $pdf->SetFont('Helvetica','',10); + $sqlk = "SELECT Firma, Anrede, Vorname, Nachname FROM ".PREFIX."_Kontakte WHERE ID = \"".$nt['Kontakt_ID']."\";"; + $resultk = $db->query($sqlk); + $ntk = $resultk->fetch_assoc(); + if ("" != $ntk['Firma']) { + $pdf->Write(4, $ntk['Firma'].","); + } else { + $pdf->Write(4, $ntk['Anrede']); + } + $pdf->Write(4, " ".$ntk['Vorname']." ".$ntk['Nachname']."\n"); + while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen']) { + $nt['ID'] = "0".$nt['ID']; + } + $pdf->SetFont('Helvetica','B',10); + $pdf->SetX(25); + $pdf->Write(4, "-> Auftrag-Nr."); + $pdf->SetX(80); + $pdf->Write(4, $nt['Jahr']."_".$nt['ID']); + $pdf->SetX(110); + $pdf->Write(4, "vom ".$nt['Datum']); + $pdf->SetX(135); + $pdf->Cell(60, 4, number_format($nt['Auftrag_Preis'] * 1.19, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); + + $Rest = $nt['Auftrag_Preis']; + + $sqlr = "SELECT *, DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum FROM ".PREFIX."_Rechnungen WHERE (Auftrag_Jahr = \"".$nt['Jahr']."\" AND Auftrag_ID = \"".$nt['ID']."\") ORDER BY ID ASC;"; + $resultr = $db->query($sqlr); + while ($ntr = $resultr->fetch_assoc()) { + $pdf->SetFont('Helvetica','',10); + $pdf->SetX(30); + if ($ntr['Vorkasse']) { + $pdf->Write(4, "-> Vorkasse"); + } elseif ($ntr['Schluss_Rechnung']) { + $pdf->Write(4, "-> Schluss"); + } else { + $pdf->Write(4, "-> Abschlag"); + } + while (strlen($ntr['ID']) < $_SESSION['Firma']['Stellen']) { + $ntr['ID'] = "0".$ntr['ID']; + } + $pdf->Write(4, "-Rechnung Nr."); + $pdf->SetX(80); + $pdf->Write(4, $ntr['Jahr']."_".$ntr['ID']); + $pdf->SetX(110); + $pdf->Write(4, "vom ".$ntr['Datum']); + $pdf->SetX(135); + $pdf->Cell(60, 4, number_format($ntr['Preis'] * 1.19, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); + $Rest = $Rest - $ntr['Preis']; + } + $pdf->SetFont('Helvetica','B',10); + $pdf->SetX(20); + $pdf->Write(4, "Offener Restbetrag"); + $pdf->SetX(135); + $pdf->Cell(60, 4, number_format($Rest * 1.19, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n\n"); + $y = $pdf->GetY() - 2; + $pdf->Line(20, $y, 195, $y); + + } +} elseif ("fertig" == $_POST['Suche']) { + $pdf->Write(20, "Tracking alle abgeschlossenen Aufträge - Übersicht vom ".date("d.m.Y", time())."\n"); + $pdf->SetTextColor(0); + while ($nt = $result->fetch_assoc()) { + $sqlr = "SELECT *, DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum FROM ".PREFIX."_Rechnungen WHERE (Auftrag_Jahr = \"".$nt['Jahr']."\" AND Auftrag_ID = \"".$nt['ID']."\" AND Schluss_Rechnung = \"1\") ORDER BY ID ASC;"; + $resultr = $db->query($sqlr); + if ($ntr = $resultr->fetch_assoc()) { + $pdf->SetFont('Helvetica','',10); + $sqlk = "SELECT Firma, Anrede, Vorname, Nachname FROM ".PREFIX."_Kontakte WHERE ID = \"".$nt['Kontakt_ID']."\";"; + $resultk = $db->query($sqlk); + $ntk = $resultk->fetch_assoc(); + if ("" != $ntk['Firma']) { + $pdf->Write(4, $ntk['Firma'].","); + } else { + $pdf->Write(4, $ntk['Anrede']); + } + $pdf->Write(4, " ".$ntk['Vorname']." ".$ntk['Nachname']."\n"); + while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen']) { + $nt['ID'] = "0".$nt['ID']; + } + $pdf->SetFont('Helvetica','B',10); + $pdf->SetX(25); + $pdf->Write(4, "-> Auftrag-Nr."); + $pdf->SetX(80); + $pdf->Write(4, $nt['Jahr']."_".$nt['ID']); + $pdf->SetX(110); + $pdf->Write(4, "vom ".$nt['Datum']); + $pdf->SetX(135); + $pdf->Cell(60, 4, number_format($nt['Auftrag_Preis'] * 1.19, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); + + + $Rest = $nt['Auftrag_Preis']; + + $sqlr = "SELECT *, DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum FROM ".PREFIX."_Rechnungen WHERE (Auftrag_Jahr = \"".$nt['Jahr']."\" AND Auftrag_ID = \"".$nt['ID']."\") ORDER BY ID ASC;"; + $resultr = $db->query($sqlr); + while ($ntr = $resultr->fetch_assoc()) { + $pdf->SetFont('Helvetica','',10); + $pdf->SetX(30); + if ($ntr['Vorkasse']) { + $pdf->Write(4, "-> Vorkasse"); + } elseif ($ntr['Schluss_Rechnung']) { + $pdf->Write(4, "-> Schluss"); + } else { + $pdf->Write(4, "-> Abschlag"); + } + while (strlen($ntr['ID']) < $_SESSION['Firma']['Stellen']) { + $ntr['ID'] = "0".$ntr['ID']; + } + $pdf->Write(4, "-Rechnung Nr."); + $pdf->SetX(80); + $pdf->Write(4, $ntr['Jahr']."_".$ntr['ID']); + $pdf->SetX(110); + $pdf->Write(4, "vom ".$ntr['Datum']); + $pdf->SetX(135); + $pdf->Cell(60, 4, number_format($ntr['Preis'] * 1.19, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); + $Rest = $Rest - $ntr['Preis']; + } + $pdf->SetFont('Helvetica','B',10); + $pdf->SetX(20); + $pdf->Write(4, "Offener Restbetrag"); + $pdf->SetX(135); + $pdf->Cell(60, 4, number_format($Rest * 1.19, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n\n"); + $y = $pdf->GetY() - 2; + $pdf->Line(20, $y, 195, $y); + } + } +} elseif ("offen" == $_POST['Suche']) { + $pdf->Write(20, "Tracking alle nicht abgeschlossenen Aufträge - Übersicht vom ".date("d.m.Y", time())."\n"); + $pdf->SetTextColor(0); + while ($nt = $result->fetch_assoc()) { + $sqlr = "SELECT *, DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum FROM ".PREFIX."_Rechnungen WHERE (Auftrag_Jahr = \"".$nt['Jahr']."\" AND Auftrag_ID = \"".$nt['ID']."\" AND Schluss_Rechnung = \"1\") ORDER BY ID ASC;"; + $resultr = $db->query($sqlr); + if (!$ntr = $resultr->fetch_assoc()) { + $pdf->SetFont('Helvetica','',10); + $sqlk = "SELECT Firma, Anrede, Vorname, Nachname FROM ".PREFIX."_Kontakte WHERE ID = \"".$nt['Kontakt_ID']."\";"; + $resultk = $db->query($sqlk); + $ntk = $resultk->fetch_assoc(); + if ("" != $ntk['Firma']) { + $pdf->Write(4, $ntk['Firma'].","); + } else { + $pdf->Write(4, $ntk['Anrede']); + } + $pdf->Write(4, " ".$ntk['Vorname']." ".$ntk['Nachname']."\n"); + while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen']) { + $nt['ID'] = "0".$nt['ID']; + } + $pdf->SetFont('Helvetica','B',10); + $pdf->SetX(25); + $pdf->Write(4, "-> Auftrag-Nr."); + $pdf->SetX(80); + $pdf->Write(4, $nt['Jahr']."_".$nt['ID']); + $pdf->SetX(110); + $pdf->Write(4, "vom ".$nt['Datum']); + $pdf->SetX(135); + $pdf->Cell(60, 4, number_format($nt['Auftrag_Preis'] * 1.19, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); + + + $Rest = $nt['Auftrag_Preis']; + + $sqlr = "SELECT *, DATE_FORMAT(Datum, '%d.%m.%Y') AS Datum FROM ".PREFIX."_Rechnungen WHERE (Auftrag_Jahr = \"".$nt['Jahr']."\" AND Auftrag_ID = \"".$nt['ID']."\") ORDER BY ID ASC;"; + $resultr = $db->query($sqlr); + while ($ntr = $resultr->fetch_assoc()) { + $pdf->SetFont('Helvetica','',10); + $pdf->SetX(30); + if ($ntr['Vorkasse']) { + $pdf->Write(4, "-> Vorkasse"); + } elseif ($ntr['Schluss_Rechnung']) { + $pdf->Write(4, "-> Schluss"); + } else { + $pdf->Write(4, "-> Abschlag"); + } + while (strlen($ntr['ID']) < $_SESSION['Firma']['Stellen']) { + $ntr['ID'] = "0".$ntr['ID']; + } + $pdf->Write(4, "-Rechnung Nr."); + $pdf->SetX(80); + $pdf->Write(4, $ntr['Jahr']."_".$ntr['ID']); + $pdf->SetX(110); + $pdf->Write(4, "vom ".$ntr['Datum']); + $pdf->SetX(135); + $pdf->Cell(60, 4, number_format($ntr['Preis'] * 1.19, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n"); + $Rest = $Rest - $ntr['Preis']; + } + $pdf->SetFont('Helvetica','B',10); + $pdf->SetX(20); + $pdf->Write(4, "Offener Restbetrag"); + $pdf->SetX(135); + $pdf->Cell(60, 4, number_format($Rest * 1.19, '2', ',', '.')." €", 0, 0, 'R'); + $pdf->Write(4, "\n\n"); + $y = $pdf->GetY() - 2; + $pdf->Line(20, $y, 195, $y); + } + } +} + +$file = "pdf/".PREFIX."/tracking/T_".date('Ymd').".pdf"; +$pdf->Output($file, "F"); + + +?> \ No newline at end of file diff --git a/template/frame_1col.htm b/template/frame_1col.htm new file mode 100644 index 0000000..1872584 --- /dev/null +++ b/template/frame_1col.htm @@ -0,0 +1,5 @@ +
      + +
      diff --git a/template/frame_2col_left.htm b/template/frame_2col_left.htm new file mode 100644 index 0000000..b82ebd3 --- /dev/null +++ b/template/frame_2col_left.htm @@ -0,0 +1,9 @@ +
      +
      %frame_left_top%
      +
      %frame_left_bottom%
      +
      +
      + +
      diff --git a/template/frame_2col_right.htm b/template/frame_2col_right.htm new file mode 100644 index 0000000..c546a9f --- /dev/null +++ b/template/frame_2col_right.htm @@ -0,0 +1 @@ +
      %frame_right_top%
      %frame_right_bottom%
      \ No newline at end of file diff --git a/template/frame_3col.htm b/template/frame_3col.htm new file mode 100644 index 0000000..ff230ab --- /dev/null +++ b/template/frame_3col.htm @@ -0,0 +1,13 @@ +
      +
      %frame_left_top%
      +
      %frame_left_bottom%
      +
      +
      + +
      +
      +
      %frame_right_top%
      +
      %frame_right_bottom%
      +
      diff --git a/template/frame_middle_1col.htm b/template/frame_middle_1col.htm new file mode 100644 index 0000000..0552a4b --- /dev/null +++ b/template/frame_middle_1col.htm @@ -0,0 +1 @@ +
      %middle_left%
      \ No newline at end of file diff --git a/template/frame_middle_2col.htm b/template/frame_middle_2col.htm new file mode 100644 index 0000000..b4cd018 --- /dev/null +++ b/template/frame_middle_2col.htm @@ -0,0 +1 @@ +
      %middle_left%
      %middle_right%
      \ No newline at end of file diff --git a/template/page.css b/template/page.css new file mode 100644 index 0000000..3eeaeaa --- /dev/null +++ b/template/page.css @@ -0,0 +1,27 @@ +html {font-family:Verdana;font-size:10px;background:#EEEEEE;} +body {width:980px;margin:20px auto;background:#FFFFFF;} +br.clear {clear:both;} +input.button_search {border:none;cursor:pointer;} +#top {width:100%;height:20px;margin:0px;} +#top_left {float:left;} +#top_right {float:right;} +#top_right ul {margin:0px;padding:0px;list-style-type:none;} +#top_right li {float:left;margin:0px;width:100px;text-align:right;display:block;} +#top_right a {color:black;display:inline-block;width:100%;} +#top_right li.active {font-weight:bold;} +#top_right li:hover {font-weight:bold;} +#header {position:relative;width:100%;height:100px;border:1px solid black;display:block;overflow:hidden;} +#header img {position:absolute;top:0px;left:0px;z-index:0;opacity:0.5;moz-opacity:50;filter(alpha:50);} +#header_top_left {position:absolute;top:0px;left:0px;z-index:1;background:#FFFFFF;} +#header_top_right {position:absolute;top:0px;right:0px;float:right;z-index:1;} +#header_bottom_left {position:absolute;bottom:0px;left:0px;z-index:1;} +#header_bottom_right {position:absolute;bottom:0px;right:0px;z-index:1;} +#navi_top {height:30px;line-height:30px;border:1px solid black;width:100%;} +#navi_top_left {height:30px;line-height:30px;float:left;} +#navi_top_right {height:30px;line-height:30px;float:right;} +#banner_top {width:100%;margin-top:10px;text-align:center;} +#frame {width:100%;min-height:300px;margin:10px 0px;border:1px solid blue;} +#banner_bottom {width:100%;text-align:center;} +#footer {width:100%;height:30px;margin:10px 0px;line-height:30px;background:#CCCCCC;text-align:center;} +#footer_rist {width:100%;height:30px;line-height:15px;text-align:center;margin:10px 0px;font-variant:small-caps;} +#footer_rist a {color:#CC0033;text-decoration:none;font-family:Verdana;font-size:12px;} \ No newline at end of file diff --git a/template/template_v1.htm b/template/template_v1.htm new file mode 100644 index 0000000..d2a39b3 --- /dev/null +++ b/template/template_v1.htm @@ -0,0 +1,41 @@ + + + + + %title% + + + + + + + + +
      +
      top_left
      + top +
      top_right
      +
      +
      + + + +
      + frame +
      + + + + + \ No newline at end of file