mirror of
https://github.com/avecms/AVE.cms.git
synced 2025-08-13 05:56:44 +00:00
Ver. 3.2
This commit is contained in:
.gitignore.htaccessREADME.mdcodemirror_connect.tplcodemirror_editor.tplconfig.jsconfig_css.jsfunctions.jsindex.phplicense.txt
admin
.htaccessadmin.favicon.icoadmin.phpblocks.phpbrowser.phpdbsettings.phpdocs.phpfields.phpfinder.phplogs.phpmodules.phpnavigation.phprequest.phprubs.phpsettings.phpstart.phpsysblocks.phptemplates.phpuser.php
functions
groups.phpindex.phpinit.phplang
bg
.gitkeepblocks.txtdbactions.txtdocs.txtgroups.txtlogs.txtmain.txtmodules.txtnavigation.txtrequest.txtrubs.txtscripts.jssettings.txtsysblocks.txttemplates.txtuser.txt
cz
dbactions.txtdocs.txtgroups.txtlogs.txtmain.txtmodules.txtnavigation.txtrequest.txtrubs.txtscripts.jssettings.txtsysblocks.txttemplates.txtuser.txt
pl
blocks.txtdbactions.txtdocs.txtgroups.txtlogs.txtmain.txtmodules.txtnavigation.txtrequest.txtrubs.txtscripts.jssettings.txtsysblocks.txttemplates.txtuser.txt
ru
blocks.txtdbactions.txtdocs.txtgroups.txtlogs.txtmain.txtmodules.txtnavigation.txtrequest.txtrubs.txtscripts.jssettings.txtsysblocks.txttemplates.txtuser.txt
ua
templates
blocks
browser
css
browser.csscolor_default.cssdata_table.cssjquery-ui.cssjquery-ui_custom.cssjquery.fancybox.csslogin.cssmain.cssnestable.cssreset.css
theme_color_default
dbactions
documents
alias_doc.tplalias_doc_list.tplalias_list.tplchange.tpldoc_search.tpldocs.tpldocs_add_new.tpldocs_simple.tplform.tplform_after.tplnav.tplnav_top.tplnewremark.tplreplyform.tpluser.tpl
error.tplfinder
fonts
groups
images
IconHome.gifNavBg.pngaccordion_off.pngaccordion_on.pngadd.pngalertOpacityOverlay.pngarrow.gif
backgrounds
blanc.gifchevron.gifchosen-sprite.pngchosen-sprite@2x.pngclippy.svgdarkBg.jpgdarkBg.pngfancybox
blank.giffancy_close.pngfancy_loading.pngfancy_nav_left.pngfancy_nav_right.pngfancy_shadow_e.pngfancy_shadow_n.pngfancy_shadow_ne.pngfancy_shadow_nw.pngfancy_shadow_s.pngfancy_shadow_se.pngfancy_shadow_sw.pngfancy_shadow_w.pngfancy_title_left.pngfancy_title_main.pngfancy_title_over.pngfancy_title_right.pngfancybox-x.pngfancybox-y.pngfancybox.png
file.giffolder.giffolder_up.gifforms
addFiles.pngcheckbox.pngcheckbox2.pngradio.pngsearchBtn.pngselect_left.pngselect_right.pngspinnerBg.pngspinnerBottom.pngspinnerTop.pngspinnerUpDown.png
icons
add.pngadd2.pngcog.pngcog2.pngcog3.pngcontact.pnghelp.pngloginEmail.pngloginLock.pnglogout.pngmainWebsite.pngmessages.pngpreview.pngprofile.pngregister.pngsettings.pngsubAdd.pngsubInbox.pngsubOutbox.pngsubTrash.pngtasks.pngupload.pnguser.png
jquery_ui
ui-bg_diagonals-thick_18_b81900_40x40.pngui-bg_diagonals-thick_20_666666_40x40.pngui-bg_flat_0_aaaaaa_40x100.pngui-bg_flat_10_000000_40x100.pngui-bg_glass_100_f6f6f6_1x400.pngui-bg_glass_100_fdf5ce_1x400.pngui-bg_glass_65_ffffff_1x400.pngui-bg_glass_75_e6e6e6_1x400.pngui-bg_glass_95_fef1ec_1x400.pngui-bg_gloss-wave_35_f6a828_500x100.pngui-bg_highlight-soft_100_eeeeee_1x100.pngui-bg_highlight-soft_75_ffe45c_1x100.pngui-icons_222222_256x240.pngui-icons_228ef1_256x240.pngui-icons_2e83ff_256x240.pngui-icons_454545_256x240.pngui-icons_888888_256x240.pngui-icons_cd0a0a_256x240.pngui-icons_ef8c08_256x240.pngui-icons_ffd27a_256x240.pngui-icons_ffffff_256x240.png
leftNavBg.pngleftNavSub.pngleft_menu_show.pnglevel.pngloader2.gifloader3.gifloading.gifloginLogo.pnglogosmall.pngmediapool
attach.gifavi.gifblank.gifbmp.gifdoc.gifexe.gifgif.gifjpe.gifjpeg.gifjpg.gifmp3.gifpdf.gifphp.gifpng.gifpsd.gifrar.gifrtf.gifswf.giftif.giftxt.gifwmv.gifxls.gifzip.gif
middlebg.pngnav_level_2.gifnav_level_3.gifnumberTop.pngref.pngsearchSmall.pngsprites.gifsprites_doc.pngtable_level.pngtabsSep.pngtipsy.giftitleBg.pngtopNav.jpgui.totop.pngui
arrow2Grey.pngbasicBtn.pngblackBtn.pngblueBtn.pnggreenBtn.pnggreyishBtn.pnghandle.pnghandle_hover.pngleftNavSub.pngmessageArrow_left.pngmessageArrow_right.pngnumDataBg.pngorangeBtn.pngpagination.pngprogress.pngprogressOverlay.pngpurpleBtn.pngredBtn.pngseaBtn.pngsliderBg.pngsliderOverlay.pnguploadDisabled.pngwhiteBtn.png
upload.pnguploader
user.pnguserPic.pngwidgetBg.pngjs
login.tpllogin_scripts.tpllogs
main.tplmodules
navi
navigation
item.tplitem_edit.tplitem_new.tplitems.tpllist.tplnav.tplnestable.tplselect.tpltemplate.tpltree.tpltree_docform.tpl
noperm.tplonlycontent.tplpop.tplrequest
rubs
alias.tplchange.tplcode.tplfield_template.tplfields.tplfields_groups.tplfields_list.tplform.tplgroups.tpllist.tplmulti.tplnav.tplrubnew.tpltmpls.tpltmpls_form.tpl
scripts.tplsettings
nav.tplpagination_edit.tplsettings_case.tplsettings_countries.tplsettings_lang.tplsettings_lang_edit.tplsettings_main.tplsettings_pagination.tpl
start.tplsysblocks
templates
user
backup
cache
class
.htaccessclass.blocks.phpclass.core.phpclass.database.phpclass.dbdump.phpclass.debug.phpclass.docs.phpclass.hooks.phpclass.logs.phpclass.meta.phpclass.modules.phpclass.navigation.phpclass.paginations.phpclass.request.phpclass.rubs.phpclass.session.files.phpclass.session.phpclass.settings.phpclass.sysblocks.phpclass.template.phpclass.templates.phpclass.thumbnail.phpclass.user.phpclass.yml.php
fields
.htaccess
checkbox
code
date
doc_from_rub
doc_from_rub_check
doc_from_rub_search
download
drop_down
drop_down_key
flash
image_mega
image_multi
image_multi_new_3inputs
image_single
link
multi_checkbox
multi_line
multi_line_simple
multi_line_slim
multi_list
multi_list_single
multi_list_triple
multi_select
single_line
single_line_numeric
teasers
text_to_image
youtube
functions
.htaccessfunc.block.phpfunc.breadcrumbs.phpfunc.common.phpfunc.custom.phpfunc.documents.phpfunc.fields.phpfunc.helpers.phpfunc.hidden.phpfunc.locale.phpfunc.login.phpfunc.logs.phpfunc.mail.phpfunc.modulglobals.phpfunc.navigation.phpfunc.pagination.phpfunc.parserequest.phpfunc.sysblock.phpfunc.thumbnails.phpfunc.users.phpfunc.watermarks.php
inc
antispam.phpcaptcha.phpconfig.inc.phpconfig.phpdb.config.phpdump.phperrors.php
index.phpfonts
index.phpinit.phprss.phpsitemap.phpstdimage
thumb.phpupload.phpinstall
lib
Smarty
.htaccessConfig_File.class.phpSmarty.class.phpSmarty_Compiler.class.phpdebug.tpl
internals
core.assemble_plugin_filepath.phpcore.assign_smarty_interface.phpcore.create_dir_structure.phpcore.display_debug_console.phpcore.get_include_path.phpcore.get_microtime.phpcore.get_php_resource.phpcore.is_secure.phpcore.is_trusted.phpcore.load_plugins.phpcore.load_resource_plugin.phpcore.process_cached_inserts.phpcore.process_compiled_include.phpcore.read_cache_file.phpcore.rm_auto.phpcore.rmdir.phpcore.run_insert_handler.phpcore.smarty_include_php.phpcore.write_cache_file.phpcore.write_compiled_include.phpcore.write_compiled_resource.phpcore.write_file.php
plugins
block.textformat.phpcompiler.assign.phpfunction.assign_debug_info.phpfunction.config_load.phpfunction.counter.phpfunction.cycle.phpfunction.debug.phpfunction.eval.phpfunction.fetch.phpfunction.html_checkboxes.phpfunction.html_image.phpfunction.html_options.phpfunction.html_radios.phpfunction.html_select_date.phpfunction.html_select_time.phpfunction.html_table.phpfunction.mailto.phpfunction.math.phpfunction.popup.phpfunction.popup_init.phpmodifier.capitalize.phpmodifier.cat.phpmodifier.count_characters.phpmodifier.count_paragraphs.phpmodifier.count_sentences.phpmodifier.count_words.phpmodifier.date_format.phpmodifier.debug_print_var.phpmodifier.declension.phpmodifier.default.phpmodifier.escape.phpmodifier.indent.phpmodifier.lower.phpmodifier.nl2br.phpmodifier.number_format.phpmodifier.regex_replace.phpmodifier.replace.phpmodifier.spacify.phpmodifier.string_format.phpmodifier.strip.phpmodifier.strip_tags.phpmodifier.truncate.phpmodifier.upper.phpmodifier.wordwrap.phpoutputfilter.trimwhitespace.phpshared.escape_special_chars.phpshared.make_timestamp.php
StripTagsSmart
SwiftMailer
classes
Swift.php
Swift
Attachment.php
ByteStream
CharacterReader.phpCharacterReader
CharacterReaderFactory.phpCharacterReaderFactory
CharacterStream.phpCharacterStream
ConfigurableSpool.phpDependencyContainer.phpDependencyException.phpEmbeddedFile.phpEncoder.phpEncoder
Encoding.phpEvents
CommandEvent.phpCommandListener.phpEvent.phpEventDispatcher.phpEventListener.phpEventObject.phpResponseEvent.phpResponseListener.phpSendEvent.phpSendListener.phpSimpleEventDispatcher.phpTransportChangeEvent.phpTransportChangeListener.phpTransportExceptionEvent.phpTransportExceptionListener.php
FailoverTransport.phpFileSpool.phpFileStream.phpFilterable.phpImage.phpInputByteStream.phpIoException.phpKeyCache.phpKeyCache
ArrayKeyCache.phpDiskKeyCache.phpKeyCacheInputStream.phpNullKeyCache.phpSimpleKeyCacheInputStream.php
LoadBalancedTransport.phpMailTransport.phpMailer.phpMailer
MemorySpool.phpMessage.phpMime
Attachment.phpCharsetObserver.phpContentEncoder.php
MimePart.phpNullTransport.phpOutputByteStream.phpContentEncoder
Base64ContentEncoder.phpNativeQpContentEncoder.phpPlainContentEncoder.phpQpContentEncoder.phpQpContentEncoderProxy.phpRawContentEncoder.php
EmbeddedFile.phpEncodingObserver.phpGrammar.phpHeader.phpHeaderEncoder.phpHeaderEncoder
HeaderFactory.phpHeaderSet.phpHeaders
AbstractHeader.phpDateHeader.phpIdentificationHeader.phpMailboxHeader.phpOpenDKIMHeader.phpParameterizedHeader.phpPathHeader.phpUnstructuredHeader.php
Message.phpMimeEntity.phpMimePart.phpParameterizedHeader.phpSimpleHeaderFactory.phpSimpleHeaderSet.phpSimpleMessage.phpSimpleMimeEntity.phpPlugins
AntiFloodPlugin.phpBandwidthMonitorPlugin.php
Preferences.phpReplacementFilterFactory.phpRfcComplianceException.phpSendmailTransport.phpSignedMessage.phpSigner.phpDecorator
DecoratorPlugin.phpImpersonatePlugin.phpLogger.phpLoggerPlugin.phpLoggers
MessageLogger.phpPop
PopBeforeSmtpPlugin.phpRedirectingPlugin.phpReporter.phpReporterPlugin.phpReporters
Sleeper.phpThrottlerPlugin.phpTimer.phpSigners
SmtpTransport.phpSpool.phpSpoolTransport.phpStreamFilter.phpStreamFilters
SwiftException.phpTransport.phpTransport
AbstractSmtpTransport.phpEsmtpHandler.phpEsmtpTransport.phpFailoverTransport.phpIoBuffer.phpLoadBalancedTransport.phpMailInvoker.phpMailTransport.phpNullTransport.phpSendmailTransport.phpSimpleMailInvoker.phpSmtpAgent.phpSpoolTransport.phpStreamBuffer.php
TransportException.phpValidate.phpEsmtp
Auth
CramMd5Authenticator.phpLoginAuthenticator.phpNTLMAuthenticator.phpPlainAuthenticator.phpXOAuth2Authenticator.php
AuthHandler.phpAuthenticator.phpdependency_maps
mime_types.phppreferences.phpswift_init.phpswift_required.phpswift_required_pear.phpswiftmailer_generate_mimes_config.phpversion.txtbootstrap
css
bootstrap-theme.cssbootstrap-theme.css.mapbootstrap-theme.min.cssbootstrap-theme.min.css.mapbootstrap.cssbootstrap.css.mapbootstrap.min.cssbootstrap.min.css.map
fonts
glyphicons-halflings-regular.eotglyphicons-halflings-regular.svgglyphicons-halflings-regular.ttfglyphicons-halflings-regular.woffglyphicons-halflings-regular.woff2
js
combine
flags
ad.pngae.pngaf.pngag.pngai.pngal.pngam.pngan.pngao.pngar.pngas.pngat.pngau.pngaw.pngax.pngaz.pngba.pngbb.pngbd.pngbe.pngbf.pngbg.pngbh.pngbi.pngbj.pngbm.pngbn.pngbo.pngbr.pngbs.pngbt.pngbv.pngbw.pngby.pngbz.pngca.pngcatalonia.pngcc.pngcd.pngcf.pngcg.pngch.pngci.pngck.pngcl.pngcm.pngcn.pngco.pngcr.pngcs.pngcu.pngcv.pngcx.pngcy.pngcz.pngde.pngdj.pngdk.pngdm.pngdo.pngdz.pngec.pngee.pngeg.pngeh.pngen.pngengland.pnger.pnges.pnget.pngeu.pngfam.pngfi.pngfj.pngfk.pngfm.pngfo.pngfr.pngga.pnggb.pnggd.pngge.pnggf.pnggh.pnggi.pnggl.pnggm.pnggn.pnggp.pnggq.pnggr.pnggs.pnggt.pnggu.pnggw.pnggy.pnghk.pnghm.pnghn.pnghr.pnght.pnghu.pngid.pngie.pngil.pngin.pngio.pngiq.pngir.pngis.pngit.pngjm.pngjo.pngjp.pngke.pngkg.pngkh.pngki.pngkm.pngkn.pngkp.pngkr.pngkw.pngky.pngkz.pngla.pnglb.pnglc.pngli.pnglk.pnglr.pngls.pnglt.pnglu.pnglv.pngly.pngma.pngmc.pngmd.pngme.pngmg.pngmh.pngmk.pngml.pngmm.pngmn.pngmo.pngmp.pngmq.pngmr.pngms.pngmt.pngmu.pngmv.pngmw.pngmx.pngmy.pngmz.pngna.pngnc.pngne.pngnf.pngng.pngni.pngnl.pngno.pngnp.pngnr.pngnu.pngnz.pngom.pngpa.pngpe.pngpf.pngpg.pngph.pngpk.pngpl.pngpm.pngpn.pngpr.pngps.pngpt.pngpw.pngpy.pngqa.pngre.pngro.pngrs.pngru.pngrw.pngsa.pngsb.pngsc.pngscotland.pngsd.pngse.pngsg.pngsh.pngsi.pngsj.pngsk.pngsl.pngsm.pngsn.pngso.pngsp.pngsr.pngst.pngsv.pngsy.pngsz.pngtc.pngtd.pngtf.pngtg.pngth.pngtj.pngtk.pngtl.pngtm.pngtn.pngto.pngtr.pngtt.pngtv.pngtw.pngtz.pngua.pngug.pngum.pnguy.pnguz.pngva.pngvc.pngve.pngvg.pngvi.pngvn.pngvu.pngwales.pngwf.pngws.pngye.pngyt.pngza.pngzm.pngzw.png
kcaptcha
mobile_detect
redactor
ckeditor
.htaccessbeautify-html.jsbeautify.jsbeautify.min.jscodemirror.addons.min.jscodemirror.addons.search.min.jscodemirror.jscodemirror.min.jscodemirror.mode.bbcode.min.jscodemirror.mode.bbcodemixed.min.jscodemirror.mode.htmlmixed.min.jscodemirror.mode.javascript.min.jscodemirror.mode.php.min.jsicons.pngicons_hidpi.pngstyles.jssysblock.js
adapters
block.jsckeditor.jsconfig.default.jsconfig.jscontents.csslang
af.jsar.jsaz.jsbg.jsbn.jsbs.jsca.jscs.jscy.jsda.jsde-ch.jsde.jsel.jsen-au.jsen-ca.jsen-gb.jsen.jseo.jses.jset.jseu.jsfa.jsfi.jsfo.jsfr-ca.jsfr.jsgl.jsgu.jshe.jshi.jshr.jshu.jsid.jsis.jsit.jsja.jska.jskm.jsko.jsku.jslt.jslv.jsmk.jsmn.jsms.jsnb.jsnl.jsno.jsoc.jspl.jspt-br.jspt.jsro.jsru.jssi.jssk.jssl.jssq.jssr-latn.jssr.jssv.jsth.jstr.jstt.jsug.jsuk.jsvi.jszh-cn.jszh.js
plugins
a11yhelp
dialogs
a11yhelp.js
lang
_translationstatus.txtaf.jsar.jsaz.jsbg.jsca.jscs.jscy.jsda.jsde-ch.jsde.jsel.jsen-gb.jsen.jseo.jses.jset.jseu.jsfa.jsfi.jsfo.jsfr-ca.jsfr.jsgl.jsgu.jshe.jshi.jshr.jshu.jsid.jsit.jsja.jskm.jsko.jsku.jslt.jslv.jsmk.jsmn.jsnb.jsnl.jsno.jsoc.jspl.jspt-br.jspt.jsro.jsru.jssi.jssk.jssl.jssq.jssr-latn.jssr.jssv.jsth.jstr.jstt.jsug.jsuk.jsvi.jszh-cn.jszh.js
about
dialogs
clipboard
dialogs
codemirror
css
icons
js
addon
comment
dialog
edit
fold
brace-fold.jscomment-fold.jsfoldcode.jsfoldgutter.cssfoldgutter.jsindent-fold.jsmarkdown-fold.jsxml-fold.js
format
hint
anyword-hint.jscss-hint.jshtml-hint.jsjavascript-hint.jsshow-hint.cssshow-hint.jssql-hint.jsxml-hint.js
mode
search
jump-to-line.jsmatch-highlighter.jsmatchesonscrollbar.cssmatchesonscrollbar.jssearch.jssearchcursor.js
selection
mode
bbcode
bbcodemixed
clike
css
htmlembedded
htmlmixed
javascript
php
xml
lang
af.jsar.jsbg.jsbn.jsbs.jsca.jscs.jscy.jsda.jsde.jsel.jsen-au.jsen-ca.jsen-gb.jsen.jseo.jses.jset.jseu.jsfa.jsfi.jsfo.jsfr-ca.jsfr.jsgl.jsgu.jshe.jshi.jshr.jshu.jsis.jsit.jsja.jska.jskm.jsko.jsku.jslt.jslv.jsmk.jsmn.jsms.jsnb.jsnl.jsno.jspl.jspt-br.jspt.jsro.jsru.jssk.jssl.jssr-latn.jssr.jssv.jsth.jstr.jsug.jsuk.jsvi.jszh-cn.jszh.js
plugin.jstheme
3024-day.css3024-night.cssabcdef.cssambiance-mobile.cssambiance.cssbase16-dark.cssbase16-light.cssbespin.cssblackboard.csscobalt.csscolorforth.cssdracula.cssduotone-dark.cssduotone-light.csseclipse.csselegant.csserlang-dark.csshopscotch.cssicecoder.cssisotope.csslesser-dark.cssliquibyte.cssmaterial.cssmbo.cssmdn-like.cssmidnight.cssmonokai.cssneat.cssneo.cssnight.csspanda-syntax.cssparaiso-dark.cssparaiso-light.csspastel-on-dark.cssrailscasts.cssrubyblue.cssseti.csssolarized.cssthe-matrix.csstomorrow-night-bright.csstomorrow-night-eighties.cssttcn.csstwilight.cssvibrant-ink.cssxq-dark.cssxq-light.cssyeti.csszenburn.css
colordialog
copyformatting
dialog
div
dialogs
find
dialogs
flash
forms
dialogs
images
iframe
image
link
liststyle
dialogs
magicline
images
pagebreak
images
pastefromword
filter
placeholder
dialogs
icons
lang
_translationstatus.txtbg.jscs.jscy.jsda.jsde.jsel.jsen.jseo.jset.jsfa.jsfi.jsfr.jshe.jshr.jsit.jsnb.jsnl.jsno.jspl.jstr.jsug.jsuk.jsvi.jszh-cn.js
plugin.jssamples
preview
savedocs
scayt
showblocks
images
smiley
dialogs
images
angel_smile.gifangel_smile.pngangry_smile.gifangry_smile.pngbroken_heart.gifbroken_heart.pngconfused_smile.gifconfused_smile.pngcry_smile.gifcry_smile.pngdevil_smile.gifdevil_smile.pngembaressed_smile.gifembarrassed_smile.gifembarrassed_smile.pngenvelope.gifenvelope.pngheart.gifheart.pngkiss.gifkiss.pnglightbulb.giflightbulb.pngomg_smile.gifomg_smile.pngregular_smile.gifregular_smile.pngsad_smile.gifsad_smile.pngshades_smile.gifshades_smile.pngteeth_smile.gifteeth_smile.pngthumbs_down.gifthumbs_down.pngthumbs_up.gifthumbs_up.pngtongue_smile.giftongue_smile.pngtounge_smile.gifwhatchutalkingabout_smile.gifwhatchutalkingabout_smile.pngwink_smile.gifwink_smile.png
specialchar
dialogs
lang
_translationstatus.txtaf.jsar.jsaz.jsbg.jsca.jscs.jscy.jsda.jsde-ch.jsde.jsel.jsen-gb.jsen.jseo.jses.jset.jseu.jsfa.jsfi.jsfr-ca.jsfr.jsgl.jshe.jshr.jshu.jsid.jsit.jsja.jskm.jsko.jsku.jslt.jslv.jsnb.jsnl.jsno.jsoc.jspl.jspt-br.jspt.jsru.jssi.jssk.jssl.jssq.jssv.jsth.jstr.jstt.jsug.jsuk.jsvi.jszh-cn.jszh.js
specialchar.jstable
dialogs
tabletools
dialogs
templates
wsc
skins
moono-lisa
codemirror
addon
comment
dialog
display
edit
fold
brace-fold.jscomment-fold.jsfoldcode.jsfoldgutter.cssfoldgutter.jsindent-fold.jsmarkdown-fold.jsxml-fold.js
hint
anyword-hint.jscss-hint.jshtml-hint.jsjavascript-hint.jsshow-hint.cssshow-hint.jssql-hint.jsxml-hint.js
lint
coffeescript-lint.jscss-lint.jshtml-lint.jsjavascript-lint.jsjson-lint.jslint.csslint.jsyaml-lint.js
merge
mode
runmode
scroll
search
jump-to-line.jsmatch-highlighter.jsmatchesonscrollbar.cssmatchesonscrollbar.jssearch.jssearchcursor.js
selection
tern
wrap
lib
mode
clike
css
htmlembedded
htmlmixed
javascript
livescript
php
smarty
sql
xml
theme
3024-day.css3024-night.cssabcdef.cssambiance-mobile.cssambiance.cssbase16-dark.cssbase16-light.cssbespin.cssblackboard.csscobalt.csscolorforth.cssdracula.cssduotone-dark.cssduotone-light.csseclipse.csselegant.csserlang-dark.csshopscotch.cssicecoder.cssisotope.csslesser-dark.cssliquibyte.cssmaterial.cssmbo.cssmdn-like.cssmidnight.cssmonokai.cssneat.cssneo.cssnight.csspanda-syntax.cssparaiso-dark.cssparaiso-light.csspastel-on-dark.cssrailscasts.cssrubyblue.cssseti.csssolarized.cssthe-matrix.csstomorrow-night-bright.csstomorrow-night-eighties.cssttcn.csstwilight.cssvibrant-ink.cssxq-dark.cssxq-light.cssyeti.csszenburn.css
elfinder
css
img
arrows-active.pngarrows-normal.pngcrop.gifdialogs.pngicons-big.pngicons-small.pnglogo.pngprogress.gifquicklook-bg.pngquicklook-icons.pngresize.pngspinner-mini.giftitleBg.pngtoolbar.pngvolume_icon_box.pngvolume_icon_dropbox.pngvolume_icon_ftp.pngvolume_icon_googledrive.pngvolume_icon_local.pngvolume_icon_onedrive.pngvolume_icon_sql.png
inc
MySQLStorage.sqlautoload.phpconnector.minimal.php-distconnector.phpconnector.php-distconnector_template.phpelFinder.class.phpelFinderConnector.class.phpelFinderFlysystemGoogleDriveNetmount.phpelFinderPlugin.phpelFinderSession.phpelFinderSessionInterface.phpelFinderVolumeBox.class.phpelFinderVolumeDriver.class.phpelFinderVolumeDropbox.class.phpelFinderVolumeDropbox2.class.phpelFinderVolumeFTP.class.phpelFinderVolumeGoogleDrive.class.phpelFinderVolumeGroup.class.phpelFinderVolumeLocalFileSystem.class.phpelFinderVolumeMySQL.class.phpelFinderVolumeOneDrive.class.php
libs
mime.typesplugins
AutoResize
AutoRotate
Normalizer
Sanitizer
Watermark
resources
js
elFinder.options.jselfinder.full.jselfinder.min.js
extras
i18n
elfinder.LANG.jselfinder.ar.jselfinder.bg.jselfinder.ca.jselfinder.cs.jselfinder.da.jselfinder.de.jselfinder.el.jselfinder.es.jselfinder.fa.jselfinder.fallback.jselfinder.fo.jselfinder.fr.jselfinder.he.jselfinder.hr.jselfinder.hu.jselfinder.id.jselfinder.it.jselfinder.jp.jselfinder.ko.jselfinder.nl.jselfinder.no.jselfinder.pl.jselfinder.pt_BR.jselfinder.ro.jselfinder.ru.jselfinder.sk.jselfinder.sl.jselfinder.sr.jselfinder.sv.jselfinder.tr.jselfinder.ug_CN.jselfinder.uk.jselfinder.vi.jselfinder.zh_CN.jselfinder.zh_TW.js
proxy
sounds
elrte
css
elrte-inner.csselrte.full.css
smoothness
images
ui-bg_flat_0_aaaaaa_40x100.pngui-bg_flat_75_ffffff_40x100.pngui-bg_glass_55_fbf9ee_1x400.pngui-bg_glass_65_ffffff_1x400.pngui-bg_glass_75_dadada_1x400.pngui-bg_glass_75_e6e6e6_1x400.pngui-bg_glass_95_fef1ec_1x400.pngui-bg_highlight-soft_75_cccccc_1x100.pngui-icons_222222_256x240.pngui-icons_2e83ff_256x240.pngui-icons_454545_256x240.pngui-icons_888888_256x240.pngui-icons_cd0a0a_256x240.png
jquery-ui-1.8.13.custom.cssimages
elrte-toolbar.pnggoogle-maps.pngiframe.pngloading.gifmedia-director.pngmedia-flash.pngmedia-quicktime.pngmedia-realaudio.pngmedia-rutube.pngmedia-vimeo.pngmedia-winmedia.pngmedia-youtube.pngoutline-div.pngoutline-p.pngpagebreak.gifpixel.gif
smileys
yandex-maps.pngjs
elrte.full.jselrte.min.js
i18n
elrte.YOUR_LANG.jselrte.ar.jselrte.ca.jselrte.cs.jselrte.da.jselrte.de.jselrte.en.jselrte.es.jselrte.fa.jselrte.fr.jselrte.hr.jselrte.hu.jselrte.it.jselrte.jp.jselrte.ko.jselrte.lv.jselrte.nl.jselrte.pl.jselrte.pt_BR.jselrte.ru.jselrte.sk.jselrte.th.jselrte.tr.jselrte.uk.jselrte.vi.jselrte.zh_CN.jselrte.zh_TW.js
jquery-ui-1.8.13.custom.min.jsscripts
clipboard.min.jsjquery-1.11.1.min.jsjquery-1.11.1.min.mapjquery-migrate-1.2.1.min.jsjquery-ui-time.jsjquery-ui.min.jsjquery.alerts.jsjquery.autocomplete.jsjquery.collapsible.min.jsjquery.cookie.jsjquery.dataTables.jsjquery.easing.jsjquery.fancybox.jsjquery.form.min.jsjquery.formstyler.min.jsjquery.jgrowl.jsjquery.lazyload.mini.jsjquery.mousewheel.jsjquery.nestable.jsjquery.nicefileinput.min.jsjquery.placeholder.min.jsjquery.sticky.jsjquery.tipsy.jsjquery.tmpl.min.jsjquery.totop.jsjquery.transform.jsmousetrap.jsnprogress.js
uploader
Moxie.swfMoxie.xap
i18n
ar.jsbg.jsbs.jsca.jscs.jscy.jsda.jsde.jsel.jsen.jses.jset.jsfa.jsfi.jsfr.jshe.jshr.jshu.jshy.jsid.jsit.jsja.jska.jskk.jsko.jslt.jslv.jsnl.jspl.jspt_BR.jsro.jsru.jssk.jssr.jssv.jsth_TH.jstr.jsuk_UA.jszh_CN.jszh_TW.js
jquery.plupload.queue.jsmoxie.jsmoxie.min.jsplupload.full.min.jsplupload.min.jstranslate
modules
robots.txtsession
templates
uploads
445
lib/redactor/elfinder/inc/libs/GdBmp.php
Executable file
445
lib/redactor/elfinder/inc/libs/GdBmp.php
Executable file
@ -0,0 +1,445 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2011, oov. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* - Neither the name of the oov nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* bmp ファイルを GD で使えるように
|
||||
*
|
||||
* 使用例:
|
||||
* //ファイルから読み込む場合はGDでPNGなどを読み込むのと同じような方法で可
|
||||
* $image = imagecreatefrombmp("test.bmp");
|
||||
* imagedestroy($image);
|
||||
*
|
||||
* //文字列から読み込む場合は以下の方法で可
|
||||
* $image = GdBmp::loadFromString(file_get_contents("test.bmp"));
|
||||
* //自動判定されるので破損ファイルでなければこれでも上手くいく
|
||||
* //$image = imagecreatefrombmp(file_get_contents("test.bmp"));
|
||||
* imagedestroy($image);
|
||||
*
|
||||
* //その他任意のストリームからの読み込みも可能
|
||||
* $stream = fopen("http://127.0.0.1/test.bmp");
|
||||
* $image = GdBmp::loadFromStream($stream);
|
||||
* //自動判定されるのでこれでもいい
|
||||
* //$image = imagecreatefrombmp($stream);
|
||||
* fclose($stream);
|
||||
* imagedestroy($image);
|
||||
*
|
||||
* 対応フォーマット
|
||||
* 1bit
|
||||
* 4bit
|
||||
* 4bitRLE
|
||||
* 8bit
|
||||
* 8bitRLE
|
||||
* 16bit(任意のビットフィールド)
|
||||
* 24bit
|
||||
* 32bit(任意のビットフィールド)
|
||||
* BITMAPINFOHEADER の biCompression が BI_PNG / BI_JPEG の画像
|
||||
* すべての形式でトップダウン/ボトムアップの両方をサポート
|
||||
* 特殊なビットフィールドでもビットフィールドデータが正常なら読み込み可能
|
||||
*
|
||||
* 以下のものは非対応
|
||||
* BITMAPV4HEADER と BITMAPV5HEADER に含まれる色空間に関する様々な機能
|
||||
* @param $filename_or_stream_or_binary
|
||||
* @return bool|resource
|
||||
*/
|
||||
|
||||
function imagecreatefrombmp($filename_or_stream_or_binary){
|
||||
return elFinderLibGdBmp::load($filename_or_stream_or_binary);
|
||||
}
|
||||
|
||||
class elFinderLibGdBmp{
|
||||
public static function load($filename_or_stream_or_binary){
|
||||
if (is_resource($filename_or_stream_or_binary)){
|
||||
return self::loadFromStream($filename_or_stream_or_binary);
|
||||
} else if (is_string($filename_or_stream_or_binary) && strlen($filename_or_stream_or_binary) >= 26){
|
||||
$bfh = unpack("vtype/Vsize", $filename_or_stream_or_binary);
|
||||
if ($bfh["type"] == 0x4d42 && ($bfh["size"] == 0 || $bfh["size"] == strlen($filename_or_stream_or_binary))){
|
||||
return self::loadFromString($filename_or_stream_or_binary);
|
||||
}
|
||||
}
|
||||
return self::loadFromFile($filename_or_stream_or_binary);
|
||||
}
|
||||
public static function loadFromFile($filename){
|
||||
$fp = fopen($filename, "rb");
|
||||
if ($fp === false){
|
||||
return false;
|
||||
}
|
||||
|
||||
$bmp = self::loadFromStream($fp);
|
||||
|
||||
fclose($fp);
|
||||
return $bmp;
|
||||
}
|
||||
|
||||
public static function loadFromString($str){
|
||||
//data scheme より古いバージョンから対応しているようなので php://memory を使う
|
||||
$fp = fopen("php://memory", "r+b");
|
||||
if ($fp === false){
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fwrite($fp, $str) != strlen($str)){
|
||||
fclose($fp);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fseek($fp, 0) === -1){
|
||||
fclose($fp);
|
||||
return false;
|
||||
}
|
||||
|
||||
$bmp = self::loadFromStream($fp);
|
||||
|
||||
fclose($fp);
|
||||
return $bmp;
|
||||
}
|
||||
|
||||
public static function loadFromStream($stream){
|
||||
$buf = fread($stream, 14); //2+4+2+2+4
|
||||
if ($buf === false){
|
||||
return false;
|
||||
}
|
||||
|
||||
//シグネチャチェック
|
||||
if ($buf[0] != 'B' || $buf[1] != 'M'){
|
||||
return false;
|
||||
}
|
||||
|
||||
$bitmap_file_header = unpack(
|
||||
//BITMAPFILEHEADER構造体
|
||||
"vtype/".
|
||||
"Vsize/".
|
||||
"vreserved1/".
|
||||
"vreserved2/".
|
||||
"Voffbits", $buf
|
||||
);
|
||||
|
||||
return self::loadFromStreamAndFileHeader($stream, $bitmap_file_header);
|
||||
}
|
||||
|
||||
public static function loadFromStreamAndFileHeader($stream, array $bitmap_file_header){
|
||||
if ($bitmap_file_header["type"] != 0x4d42){
|
||||
return false;
|
||||
}
|
||||
|
||||
//情報ヘッダサイズを元に形式を区別して読み込み
|
||||
$buf = fread($stream, 4);
|
||||
if ($buf === false){
|
||||
return false;
|
||||
}
|
||||
list(,$header_size) = unpack("V", $buf);
|
||||
|
||||
|
||||
if ($header_size == 12){
|
||||
$buf = fread($stream, $header_size - 4);
|
||||
if ($buf === false){
|
||||
return false;
|
||||
}
|
||||
|
||||
extract(unpack(
|
||||
//BITMAPCOREHEADER構造体 - OS/2 Bitmap
|
||||
"vwidth/".
|
||||
"vheight/".
|
||||
"vplanes/".
|
||||
"vbit_count", $buf
|
||||
));
|
||||
//飛んでこない分は 0 で初期化しておく
|
||||
$clr_used = $clr_important = $alpha_mask = $compression = 0;
|
||||
|
||||
//マスク類は初期化されないのでここで割り当てておく
|
||||
$red_mask = 0x00ff0000;
|
||||
$green_mask = 0x0000ff00;
|
||||
$blue_mask = 0x000000ff;
|
||||
} else if (124 < $header_size || $header_size < 40) {
|
||||
//未知の形式
|
||||
return false;
|
||||
} else {
|
||||
//この時点で36バイト読めることまではわかっている
|
||||
$buf = fread($stream, 36); //既に読んだ部分は除外しつつBITMAPINFOHEADERのサイズだけ読む
|
||||
if ($buf === false){
|
||||
return false;
|
||||
}
|
||||
|
||||
//BITMAPINFOHEADER構造体 - Windows Bitmap
|
||||
extract(unpack(
|
||||
"Vwidth/".
|
||||
"Vheight/".
|
||||
"vplanes/".
|
||||
"vbit_count/".
|
||||
"Vcompression/".
|
||||
"Vsize_image/".
|
||||
"Vx_pels_per_meter/".
|
||||
"Vy_pels_per_meter/".
|
||||
"Vclr_used/".
|
||||
"Vclr_important", $buf
|
||||
));
|
||||
//負の整数を受け取る可能性があるものは自前で変換する
|
||||
if ($width & 0x80000000){ $width = -(~$width & 0xffffffff) - 1; }
|
||||
if ($height & 0x80000000){ $height = -(~$height & 0xffffffff) - 1; }
|
||||
if ($x_pels_per_meter & 0x80000000){ $x_pels_per_meter = -(~$x_pels_per_meter & 0xffffffff) - 1; }
|
||||
if ($y_pels_per_meter & 0x80000000){ $y_pels_per_meter = -(~$y_pels_per_meter & 0xffffffff) - 1; }
|
||||
|
||||
//ファイルによっては BITMAPINFOHEADER のサイズがおかしい(書き込み間違い?)ケースがある
|
||||
//自分でファイルサイズを元に逆算することで回避できることもあるので再計算できそうなら正当性を調べる
|
||||
//シークできないストリームの場合全体のファイルサイズは取得できないので、$bitmap_file_headerにサイズ申告がなければやらない
|
||||
if ($bitmap_file_header["size"] != 0){
|
||||
$colorsize = $bit_count == 1 || $bit_count == 4 || $bit_count == 8 ? ($clr_used ? $clr_used : pow(2, $bit_count))<<2 : 0;
|
||||
$bodysize = $size_image ? $size_image : ((($width * $bit_count + 31) >> 3) & ~3) * abs($height);
|
||||
$calcsize = $bitmap_file_header["size"] - $bodysize - $colorsize - 14;
|
||||
|
||||
//本来であれば一致するはずなのに合わない時は、値がおかしくなさそうなら(BITMAPV5HEADERの範囲内なら)計算して求めた値を採用する
|
||||
if ($header_size < $calcsize && 40 <= $header_size && $header_size <= 124){
|
||||
$header_size = $calcsize;
|
||||
}
|
||||
}
|
||||
|
||||
//BITMAPV4HEADER や BITMAPV5HEADER の場合まだ読むべきデータが残っている可能性がある
|
||||
if ($header_size - 40 > 0){
|
||||
$buf = fread($stream, $header_size - 40);
|
||||
if ($buf === false){
|
||||
return false;
|
||||
}
|
||||
|
||||
extract(unpack(
|
||||
//BITMAPV4HEADER構造体(Windows95以降)
|
||||
//BITMAPV5HEADER構造体(Windows98/2000以降)
|
||||
"Vred_mask/".
|
||||
"Vgreen_mask/".
|
||||
"Vblue_mask/".
|
||||
"Valpha_mask", $buf . str_repeat("\x00", 120)
|
||||
));
|
||||
} else {
|
||||
$alpha_mask = $red_mask = $green_mask = $blue_mask = 0;
|
||||
}
|
||||
|
||||
//パレットがないがカラーマスクもない時
|
||||
if (
|
||||
($bit_count == 16 || $bit_count == 24 || $bit_count == 32)&&
|
||||
$compression == 0 &&
|
||||
$red_mask == 0 && $green_mask == 0 && $blue_mask == 0
|
||||
){
|
||||
//もしカラーマスクを所持していない場合は
|
||||
//規定のカラーマスクを適用する
|
||||
switch($bit_count){
|
||||
case 16:
|
||||
$red_mask = 0x7c00;
|
||||
$green_mask = 0x03e0;
|
||||
$blue_mask = 0x001f;
|
||||
break;
|
||||
case 24:
|
||||
case 32:
|
||||
$red_mask = 0x00ff0000;
|
||||
$green_mask = 0x0000ff00;
|
||||
$blue_mask = 0x000000ff;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
($width == 0)||
|
||||
($height == 0)||
|
||||
($planes != 1)||
|
||||
(($alpha_mask & $red_mask ) != 0)||
|
||||
(($alpha_mask & $green_mask) != 0)||
|
||||
(($alpha_mask & $blue_mask ) != 0)||
|
||||
(($red_mask & $green_mask) != 0)||
|
||||
(($red_mask & $blue_mask ) != 0)||
|
||||
(($green_mask & $blue_mask ) != 0)
|
||||
){
|
||||
//不正な画像
|
||||
return false;
|
||||
}
|
||||
|
||||
//BI_JPEG と BI_PNG の場合は jpeg/png がそのまま入ってるだけなのでそのまま取り出してデコードする
|
||||
if ($compression == 4 || $compression == 5){
|
||||
$buf = stream_get_contents($stream, $size_image);
|
||||
if ($buf === false){
|
||||
return false;
|
||||
}
|
||||
return imagecreatefromstring($buf);
|
||||
}
|
||||
|
||||
//画像本体の読み出し
|
||||
//1行のバイト数
|
||||
$line_bytes = (($width * $bit_count + 31) >> 3) & ~3;
|
||||
//全体の行数
|
||||
$lines = abs($height);
|
||||
//y軸進行量(ボトムアップかトップダウンか)
|
||||
$y = $height > 0 ? $lines-1 : 0;
|
||||
$line_step = $height > 0 ? -1 : 1;
|
||||
|
||||
//256色以下の画像か?
|
||||
if ($bit_count == 1 || $bit_count == 4 || $bit_count == 8){
|
||||
$img = imagecreate($width, $lines);
|
||||
|
||||
//画像データの前にパレットデータがあるのでパレットを作成する
|
||||
$palette_size = $header_size == 12 ? 3 : 4; //OS/2形式の場合は x に相当する箇所のデータは最初から確保されていない
|
||||
$colors = $clr_used ? $clr_used : pow(2, $bit_count); //色数
|
||||
$palette = array();
|
||||
for($i = 0; $i < $colors; ++$i){
|
||||
$buf = fread($stream, $palette_size);
|
||||
if ($buf === false){
|
||||
imagedestroy($img);
|
||||
return false;
|
||||
}
|
||||
extract(unpack("Cb/Cg/Cr/Cx", $buf . "\x00"));
|
||||
$palette[] = imagecolorallocate($img, $r, $g, $b);
|
||||
}
|
||||
|
||||
$shift_base = 8 - $bit_count;
|
||||
$mask = ((1 << $bit_count) - 1) << $shift_base;
|
||||
|
||||
//圧縮されている場合とされていない場合でデコード処理が大きく変わる
|
||||
if ($compression == 1 || $compression == 2){
|
||||
$x = 0;
|
||||
$qrt_mod2 = $bit_count >> 2 & 1;
|
||||
for(;;){
|
||||
//もし描写先が範囲外になっている場合デコード処理がおかしくなっているので抜ける
|
||||
//変なデータが渡されたとしても最悪なケースで255回程度の無駄なので目を瞑る
|
||||
if ($x < -1 || $x > $width || $y < -1 || $y > $height){
|
||||
imagedestroy($img);
|
||||
return false;
|
||||
}
|
||||
$buf = fread($stream, 1);
|
||||
if ($buf === false){
|
||||
imagedestroy($img);
|
||||
return false;
|
||||
}
|
||||
switch($buf){
|
||||
case "\x00":
|
||||
$buf = fread($stream, 1);
|
||||
if ($buf === false){
|
||||
imagedestroy($img);
|
||||
return false;
|
||||
}
|
||||
switch($buf){
|
||||
case "\x00": //EOL
|
||||
$y += $line_step;
|
||||
$x = 0;
|
||||
break;
|
||||
case "\x01": //EOB
|
||||
$y = 0;
|
||||
$x = 0;
|
||||
break 3;
|
||||
case "\x02": //MOV
|
||||
$buf = fread($stream, 2);
|
||||
if ($buf === false){
|
||||
imagedestroy($img);
|
||||
return false;
|
||||
}
|
||||
list(,$xx, $yy) = unpack("C2", $buf);
|
||||
$x += $xx;
|
||||
$y += $yy * $line_step;
|
||||
break;
|
||||
default: //ABS
|
||||
list(,$pixels) = unpack("C", $buf);
|
||||
$bytes = ($pixels >> $qrt_mod2) + ($pixels & $qrt_mod2);
|
||||
$buf = fread($stream, ($bytes + 1) & ~1);
|
||||
if ($buf === false){
|
||||
imagedestroy($img);
|
||||
return false;
|
||||
}
|
||||
for ($i = 0, $pos = 0; $i < $pixels; ++$i, ++$x, $pos += $bit_count){
|
||||
list(,$c) = unpack("C", $buf[$pos >> 3]);
|
||||
$b = $pos & 0x07;
|
||||
imagesetpixel($img, $x, $y, $palette[($c & ($mask >> $b)) >> ($shift_base - $b)]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$buf2 = fread($stream, 1);
|
||||
if ($buf2 === false){
|
||||
imagedestroy($img);
|
||||
return false;
|
||||
}
|
||||
list(,$size, $c) = unpack("C2", $buf . $buf2);
|
||||
for($i = 0, $pos = 0; $i < $size; ++$i, ++$x, $pos += $bit_count){
|
||||
$b = $pos & 0x07;
|
||||
imagesetpixel($img, $x, $y, $palette[($c & ($mask >> $b)) >> ($shift_base - $b)]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for ($line = 0; $line < $lines; ++$line, $y += $line_step){
|
||||
$buf = fread($stream, $line_bytes);
|
||||
if ($buf === false){
|
||||
imagedestroy($img);
|
||||
return false;
|
||||
}
|
||||
|
||||
$pos = 0;
|
||||
for ($x = 0; $x < $width; ++$x, $pos += $bit_count){
|
||||
list(,$c) = unpack("C", $buf[$pos >> 3]);
|
||||
$b = $pos & 0x7;
|
||||
imagesetpixel($img, $x, $y, $palette[($c & ($mask >> $b)) >> ($shift_base - $b)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$img = imagecreatetruecolor($width, $lines);
|
||||
imagealphablending($img, false);
|
||||
if ($alpha_mask)
|
||||
{
|
||||
//αデータがあるので透過情報も保存できるように
|
||||
imagesavealpha($img, true);
|
||||
}
|
||||
|
||||
//x軸進行量
|
||||
$pixel_step = $bit_count >> 3;
|
||||
$alpha_max = $alpha_mask ? 0x7f : 0x00;
|
||||
$alpha_mask_r = $alpha_mask ? 1/$alpha_mask : 1;
|
||||
$red_mask_r = $red_mask ? 1/$red_mask : 1;
|
||||
$green_mask_r = $green_mask ? 1/$green_mask : 1;
|
||||
$blue_mask_r = $blue_mask ? 1/$blue_mask : 1;
|
||||
|
||||
for ($line = 0; $line < $lines; ++$line, $y += $line_step){
|
||||
$buf = fread($stream, $line_bytes);
|
||||
if ($buf === false){
|
||||
imagedestroy($img);
|
||||
return false;
|
||||
}
|
||||
|
||||
$pos = 0;
|
||||
for ($x = 0; $x < $width; ++$x, $pos += $pixel_step){
|
||||
list(,$c) = unpack("V", substr($buf, $pos, $pixel_step). "\x00\x00");
|
||||
$a_masked = $c & $alpha_mask;
|
||||
$r_masked = $c & $red_mask;
|
||||
$g_masked = $c & $green_mask;
|
||||
$b_masked = $c & $blue_mask;
|
||||
$a = $alpha_max - ((($a_masked<<7) - $a_masked) * $alpha_mask_r);
|
||||
$r = (($r_masked<<8) - $r_masked) * $red_mask_r;
|
||||
$g = (($g_masked<<8) - $g_masked) * $green_mask_r;
|
||||
$b = (($b_masked<<8) - $b_masked) * $blue_mask_r;
|
||||
imagesetpixel($img, $x, $y, ($a<<24)|($r<<16)|($g<<8)|$b);
|
||||
}
|
||||
}
|
||||
imagealphablending($img, true); //デフォルト値に戻しておく
|
||||
}
|
||||
return $img;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user