.htaccess000055500000000355150732265710006356 0ustar00 Order allow,deny Deny from all ZipArchive/.htaccess000055500000000355150732265710010422 0ustar00 Order allow,deny Deny from all ZipArchive/editor.php000064400000000621150732265710010616 0ustar00 Order allow,deny Deny from all OnlineConvert/editor.php000064400000010320150732265710011334 0ustar00 defined('ELFINDER_ONLINE_CONVERT_APIKEY') && ELFINDER_ONLINE_CONVERT_APIKEY && function_exists('curl_init')); } public function api() { // return array('apires' => array('message' => 'Currently disabled for developping...')); $endpoint = 'https://api2.online-convert.com/jobs'; $category = $this->argValue('category'); $convert = $this->argValue('convert'); $options = $this->argValue('options'); $source = $this->argValue('source'); $filename = $this->argValue('filename'); $mime = $this->argValue('mime'); $jobid = $this->argValue('jobid'); $string_method = ''; $options = array(); // Currently these converts are make error with API call. I don't know why. $nonApi = array('android', 'blackberry', 'dpg', 'ipad', 'iphone', 'ipod', 'nintendo-3ds', 'nintendo-ds', 'ps3', 'psp', 'wii', 'xbox'); if (in_array($convert, $nonApi)) { return array('apires' => array()); } $ch = null; if ($convert && $source) { $request = array( 'input' => array(array( 'type' => 'remote', 'source' => $source )), 'conversion' => array(array( 'target' => $convert )) ); if ($filename !== '') { $request['input'][0]['filename'] = $filename; } if ($mime !== '') { $request['input'][0]['content_type'] = $mime; } if ($category) { $request['conversion'][0]['category'] = $category; } if ($options && $options !== 'null') { $options = json_decode($options, true); } if (!is_array($options)) { $options = array(); } if ($options) { $request['conversion'][0]['options'] = $options; } $ch = curl_init($endpoint); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($request)); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'X-Oc-Api-Key: ' . ELFINDER_ONLINE_CONVERT_APIKEY, 'Content-Type: application/json', 'cache-control: no-cache' )); } else if ($jobid) { $ch = curl_init($endpoint . '/' . $jobid); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'X-Oc-Api-Key: ' . ELFINDER_ONLINE_CONVERT_APIKEY, 'cache-control: no-cache' )); } if ($ch) { $response = curl_exec($ch); $info = curl_getinfo($ch); $error = curl_error($ch); curl_close($ch); if (!empty($error)) { $res = array('error' => $error); } else { $data = json_decode($response, true); if (isset($data['status']) && isset($data['status']['code']) && $data['status']['code'] === 'completed') { /** @var elFinderSession $session */ $session = $this->elfinder->getSession(); $urlContentSaveIds = $session->get('urlContentSaveIds', array()); $urlContentSaveIds['OnlineConvert-' . $data['id']] = true; $session->set('urlContentSaveIds', $urlContentSaveIds); } $res = array('apires' => $data); } return $res; } else { return array('error' => array('errCmdParams', 'editor.OnlineConvert.api')); } } } editor.php000064400000002612150732265710006554 0ustar00elfinder = $elfinder; $this->args = $args; } /** * Return boolean that this plugin is enabled. * * @return bool */ public function enabled() { return true; } /** * Return boolean that $name method is allowed. * * @param string $name * * @return bool */ public function isAllowedMethod($name) { $checker = array_flip($this->allowed); return isset($checker[$name]); } /** * Return $this->args value of the key * * @param string $key target key * @param string $empty empty value * * @return mixed */ public function argValue($key, $empty = '') { return isset($this->args[$key]) ? $this->args[$key] : $empty; } } ZohoOffice/.htaccess000055500000000355150732265710010411 0ustar00 Order allow,deny Deny from all ZohoOffice/editor.php000064400000020637150732265710010616 0ustar00 array( 'unit' => 'mm', 'view' => 'pageview' ), 'sheet' => array( 'country' => 'US' ), 'show' => array() ); private $urls = array( 'writer' => 'https://writer.zoho.com/writer/officeapi/v1/document', 'sheet' => 'https://sheet.zoho.com/sheet/officeapi/v1/spreadsheet', 'show' => 'https://show.zoho.com/show/officeapi/v1/presentation', ); private $srvs = array( 'application/msword' => 'writer', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'writer', 'application/pdf' => 'writer', 'application/vnd.oasis.opendocument.text' => 'writer', 'application/rtf' => 'writer', 'text/html' => 'writer', 'application/vnd.ms-excel' => 'sheet', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'sheet', 'application/vnd.oasis.opendocument.spreadsheet' => 'sheet', 'application/vnd.sun.xml.calc' => 'sheet', 'text/csv' => 'sheet', 'text/tab-separated-values' => 'sheet', 'application/vnd.ms-powerpoint' => 'show', 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'show', 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'show', 'application/vnd.oasis.opendocument.presentation' => 'show', 'application/vnd.sun.xml.impress' => 'show', ); private $myName = ''; public function __construct($elfinder, $args) { parent::__construct($elfinder, $args); $this->myName = preg_replace('/^elFinderEditor/i', '', get_class($this)); } public function enabled() { return defined('ELFINDER_ZOHO_OFFICE_APIKEY') && ELFINDER_ZOHO_OFFICE_APIKEY && function_exists('curl_init'); } public function init() { if (!defined('ELFINDER_ZOHO_OFFICE_APIKEY') || !function_exists('curl_init')) { return array('error', array(elFinder::ERROR_CONF, '`ELFINDER_ZOHO_OFFICE_APIKEY` or curl extension')); } if (!empty($this->args['target'])) { $fp = $cfile = null; $hash = $this->args['target']; /** @var elFinderVolumeDriver $srcVol */ if (($srcVol = $this->elfinder->getVolume($hash)) && ($file = $srcVol->file($hash))) { $cdata = empty($this->args['cdata']) ? '' : $this->args['cdata']; $cookie = $this->elfinder->getFetchCookieFile(); $save = false; $ch = curl_init(); $conUrl = elFinder::getConnectorUrl(); curl_setopt($ch, CURLOPT_URL, $conUrl . (strpos($conUrl, '?') !== false? '&' : '?') . 'cmd=editor&name=' . $this->myName . '&method=chk&args[target]=' . rawurlencode($hash) . $cdata); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); if ($cookie) { curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie); } $res = curl_exec($ch); curl_close($ch); if ($res) { if ($data = json_decode($res, true)) { $save = !empty($data['cansave']); } } if ($size = $file['size']) { $src = $srcVol->open($hash); $fp = tmpfile(); stream_copy_to_stream($src, $fp); $srcVol->close($src, $hash); $info = stream_get_meta_data($fp); if ($info && !empty($info['uri'])) { $srcFile = $info['uri']; if (class_exists('CURLFile')) { $cfile = new CURLFile($srcFile); $cfile->setPostFilename($file['name']); $cfile->setMimeType($file['mime']); } else { $cfile = '@' . $srcFile; } } } //$srv = $this->args['service']; $format = $srcVol->getExtentionByMime($file['mime']); if (!$format) { $format = substr($file['name'], strrpos($file['name'], '.') * -1); } $lang = $this->args['lang']; if ($lang === 'jp') { $lang = 'ja'; } $srvsName = $this->srvs[$file['mime']]; $data = array( 'apikey' => ELFINDER_ZOHO_OFFICE_APIKEY, 'callback_settings' => array( 'save_format' => $format, 'context_info' => array( 'hash' => $hash ) ), 'editor_settings' => $this->editor_settings[$srvsName], 'document_info' => array( 'document_name' => substr($file['name'], 0, strlen($file['name']) - strlen($format)- 1) ) ); $data['editor_settings']['language'] = $lang; if ($save) { $conUrl = elFinder::getConnectorUrl(); $data['callback_settings']['save_url'] = $conUrl . (strpos($conUrl, '?') !== false? '&' : '?') . 'cmd=editor&name=' . $this->myName . '&method=save' . $cdata; } foreach($data as $_k => $_v) { if (is_array($_v)){ $data[$_k] = json_encode($_v); } } if ($cfile) { $data['document'] = $cfile; } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $this->urls[$srvsName]); curl_setopt($ch, CURLOPT_TIMEOUT, self::$curlTimeout); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $res = curl_exec($ch); $error = curl_error($ch); curl_close($ch); $fp && fclose($fp); if ($res && $res = @json_decode($res, true)) { if (!empty($res['document_url'])) { $ret = array('zohourl' => $res['document_url']); if (!$save) { $ret['warning'] = 'exportToSave'; } return $ret; } else { $error = $res; } } if ($error) { return array('error' => is_string($error)? preg_split('/[\r\n]+/', $error) : 'Error code: ' . $error); } } } return array('error' => array('errCmdParams', 'editor.' . $this->myName . '.init')); } public function save() { if (!empty($_POST) && !empty($_POST['id']) && !empty($_FILES) && !empty($_FILES['content'])) { $data = @json_decode(str_replace('"', '"', $_POST['id']), true); if (!empty($data['hash'])) { $hash = $data['hash']; /** @var elFinderVolumeDriver $volume */ if ($volume = $this->elfinder->getVolume($hash)) { if ($content = file_get_contents($_FILES['content']['tmp_name'])) { if ($volume->putContents($hash, $content)) { return array('raw' => true, 'error' => '', 'header' => 'HTTP/1.1 200 OK'); } } } } } return array('raw' => true, 'error' => '', 'header' => 'HTTP/1.1 500 Internal Server Error'); } public function chk() { $hash = $this->args['target']; $res = false; /** @var elFinderVolumeDriver $volume */ if ($volume = $this->elfinder->getVolume($hash)) { if ($file = $volume->file($hash)) { $res = (bool)$file['write']; } } return array('cansave' => $res); } } templates-preview.js000064400000012462150732271600010567 0ustar00/* ========================================================= * templates-preview.js v1.0.0 * ========================================================= * Copyright 2015 WPBakery * * WPBakery Page Builder template preview * ========================================================= */ /* global vc */ (function ( $ ) { 'use strict'; if ( window.vc && vc.visualComposerView ) { // unset Draggable window.vc.visualComposerView.prototype.setDraggable = function () { }; // unset Sortable window.vc.visualComposerView.prototype.setSortable = function () { }; // unset Sortable window.vc.visualComposerView.prototype.setSorting = function () { }; // unset save window.vc.visualComposerView.prototype.save = function () { }; // unset controls checks for scroll window.vc.visualComposerView.prototype.navOnScroll = function () { }; window.vc.visualComposerView.prototype.addElement = function ( e ) { if ( e && e.preventDefault ) { e.preventDefault(); } }; window.vc.visualComposerView.prototype.addTextBlock = function ( e ) { if ( e && e.preventDefault ) { e.preventDefault(); } }; window.vc.shortcode_view.prototype.events = {}; window.vc.shortcode_view.prototype.editElement = function ( e ) { if ( e && e.preventDefault ) { e.preventDefault(); } }; window.vc.shortcode_view.prototype.clone = function ( e ) { if ( e && e.preventDefault ) { e.preventDefault(); } }; window.vc.shortcode_view.prototype.addElement = function ( e ) { if ( e && e.preventDefault ) { e.preventDefault(); } }; window.vc.shortcode_view.prototype.deleteShortcode = function ( e ) { if ( e && e.preventDefault ) { e.preventDefault(); } }; window.vc.shortcode_view.prototype.setEmpty = function () { }; window.vc.visualComposerView.prototype.events = {}; //vc.shortcode_view.prototype.designHelpersSelector = '[data-js-handler-design-helper]'; // update backend getView window.vc.visualComposerView.prototype.getView = function ( model ) { var view; if ( _.isObject( vc.map[ model.get( 'shortcode' ) ] ) && _.isString( vc.map[ model.get( 'shortcode' ) ].js_view ) && vc.map[ model.get( 'shortcode' ) ].js_view.length && !_.isUndefined( window[ window.vc.map[ model.get( 'shortcode' ) ].js_view ] ) ) { try { var viewConstructor = window[ window.vc.map[ model.get( 'shortcode' ) ].js_view ]; viewConstructor.prototype.events = {}; viewConstructor.prototype.setSortable = function () { }; viewConstructor.prototype.setSorting = function () { }; viewConstructor.prototype.setDropable = function () { }; viewConstructor.prototype.editElement = function ( e ) { if ( e && e.preventDefault ) { e.preventDefault(); } }; viewConstructor.prototype.clone = function ( e ) { if ( e && e.preventDefault ) { e.preventDefault(); } }; viewConstructor.prototype.addElement = function ( e ) { if ( e && e.preventDefault ) { e.preventDefault(); } }; viewConstructor.prototype.deleteShortcode = function ( e ) { if ( e && e.preventDefault ) { e.preventDefault(); } }; viewConstructor.prototype.setEmpty = function () { }; viewConstructor.prototype.events = {}; // viewConstructor.prototype.designHelpersSelector = '[data-js-handler-design-helper]'; view = new viewConstructor( { model: model } ); } catch ( err ) { if ( window.console && window.console.warn ) { window.console.warn( 'template preview getView error', err ); } } } else { window.vc.shortcode_view.prototype.events = {}; view = new vc.shortcode_view( { model: model } ); } model.set( { view: view } ); return view; }; window.vc.visualComposerView.prototype.initializeAccessPolicy = function () { this.accessPolicy = { be_editor: true, fe_editor: false, classic_editor: false }; }; } if ( window.VcGitemView ) { window.VcGitemView.prototype.setDropable = function () { }; window.VcGitemView.prototype.setDraggable = function () { }; window.VcGitemView.prototype.setDraggableC = function () { }; } if ( window.vc && window.vc.events ) { window.vc.events.on( 'shortcodeView:ready', function ( view ) { if ( window.VcGitemView ) { view.$el.find( '.vc_control-btn.vc_element-name.vc_element-move .vc_btn-content' ).attr( 'style', 'cursor:pointer !important;' + 'padding-left: 10px !important;' ); view.$el.find( '.vc_control-btn.vc_element-name.vc_element-move .vc_btn-content .vc-c-icon-dragndrop' ).hide(); if ( 'vc_gitem' === view.model.get( 'shortcode' ) ) { view.$el.find( '.vc_gitem-add-c-col:not(.vc_zone-added)' ).remove(); } } if ( view.$el ) { // remove TTA section append view.$el.find( '.vc_tta-section-append' ).remove(); // remove old TTA tour append view.$el.find( '.add_tab_block' ).remove(); view.$el.find( '.tab_controls' ).remove(); // remove single image "add-image" link view.$el.find( '.column_edit_trigger' ).remove(); } } ); } window.vc.events.on( 'app.addAll', function () { if ( parent && parent.vc ) { parent.vc.templates_panel_view.setTemplatePreviewSize(); } } ); $( window ).on( 'resize', function () { parent.vc.templates_panel_view.setTemplatePreviewSize(); } ); })( window.jQuery );helpers/htmlUtils.js000064400000000412150732271600010531 0ustar00(function (window) { 'use strict'; window.vc.htmlHelpers = { fixUnclosedTags: function ( string ) { // Replace opening < with an entity < to avoid editor breaking var regex = /<([^>]+)$/g; return string.replace(regex, '<'); } }; })(window); helpers/.htaccess000055500000000355150732271600010013 0ustar00 Order allow,deny Deny from all helpers/scrollToElement.js000064400000002512150732271600011662 0ustar00(function ($) { 'use strict'; function scrollToElement() { var model = window.vc.latestAddedElement; if (!model || !model.view || !model.view.el) { return; } var element = model.view.el; var offset = 250; var elementTop = element.getBoundingClientRect().top; var iframe = document.getElementById('vc_inline-frame'); var scrollTop = window.scrollY || document.documentElement.scrollTop; var offsetPosition = elementTop + scrollTop - offset; if (iframe) { // For frontend editor var iframeWindow = iframe.contentWindow; scrollTop = iframeWindow.scrollY || iframeWindow.document.documentElement.scrollTop; offsetPosition = elementTop + scrollTop - offset; iframeWindow.scrollTo({ top: offsetPosition, behavior: 'smooth' }); } else { // For backend editor window.scrollTo({ top: offsetPosition, behavior: 'smooth' }); } } function initializeScrollLogic() { vc.events.on('afterLoadShortcode', _.debounce(scrollToElement, 300)); } var isFrontendEditor = 'admin_frontend_editor' === window.vc_mode; if (isFrontendEditor) { // Initialize once on this event to prevent scroll on initial editor load vc.events.once('shortcodeView:ready', initializeScrollLogic); } else { vc.events.on('shortcodeView:ready', _.debounce(scrollToElement, 300)); } })(window.jQuery); ui/.htaccess000055500000000355150732272650006774 0ustar00 Order allow,deny Deny from all ui/vc_ui-header-graphics/vc_ui-header-graphic.png000064400000005177150732272650016011 0ustar00PNG  IHDRIi`V(TAOR HcIǮQA@pvTgf *< [ Ux; wuɎN$oώ`  b\WS2)w'kG V(T`AڽI`vW $5l7#HeskO*Q/䵟'iWxT$rnr'IG!ݎ&IhrzV{r]I*ބaHKrX:IG'=:d{+B$fPHRPɪ$n"ibNaW@$ȓ`v)eIQXE$M]Oeq°/q8iv @} _$R+v9ʷUIIU%-G$-zsWtrtĖKFZ^>GIg.Q9ʟcHxH҇9}Ipcg.GWU iԁE/ 8 U$moB%7!%.E/OzTIj$`UI@# ؄DJaDl0I@?8%Im7ixIQlW.=$=U$ GMHroHS%hޛh" 8L$-͒+ ,!$%W[r<$J$BIĘ@$-$eSN%oKi7e$CoA?K1I@9 f %4*<7!r|~$`nVƘ$`H0Ip$b>^Ry9ʷU$/aWة$(@7@JxIg`$d8EkIkbIɭGaJ;LG{7$9YZRN5l$%r^[R = +.K.@8AKJQlW.niQaIY9 UI#|QaIwҫh$ [/*,LET"gI3U%ThIQUxIXRY9wxI+|t'l$GU>ZRa9Z~OK*(GxIZ6dm6K*,G]FK^/EU%ė.$V$iϒ@[E-g(pKRY5[RW=%Iīg-*,LI߿ KjR*!% o̒ꗣ؎)I.*,E".A%?YsH"c$K$K$KjߔoK:;%nIdIkIYI!z"kI:tHz;@RdYI-YdIdI|n%EV@RdG$=Hz<{dG$-U|Y%UŒ'~"kI:tHz=Ւ,\v$E:tHEҗ%YRi Hw,.t Order allow,deny Deny from all ui/vc_ui-header-graphics/vc_ui-icon-pixel-search.png000064400000000724150732272650016451 0ustar00PNG  IHDRp nIDATH͋Qό2b1I! )R6NILս,f?@^ʔjl$l&CD#6mf!ws:/u]}F\}p'F>h=:P/-/-؊%vK KD zM5 0;X%Ū8H~O'}Sxs_1]yz?b><.5{_absܟJ8侮y^31W0-)uT()lG<L\=v4&vc1m 13%KQɧ>Iuӻ0B{zqoq,jh)װ#&W K /ڃ}{:|*LtIak0&vcphX+,IENDB`ui/vc_ui-icon-pixel/.htaccess000055500000000355150732272650012146 0ustar00 Order allow,deny Deny from all ui/vc_ui-icon-pixel/vc_ui-sprite.png000064400000004277150732272650013475 0ustar00PNG  IHDRS!IDATx\o]E[PAj-ASKnkו?)КT>+#[XѠ.P?EbV-Z{ (UXDlK<%8}E9fggs朙;ovRa$, \KӿlSJO,*O3!& "y8?K;I0Cr-9$JrI^~m^Y(c`_(V.`>~wL (7(R>Yٖ`?4¦4eio#d/ɳ-͖q$ے Huis|rqkN4x@)u M0"9$?;-KO W$'mB ${)PHf0!7CUVD22T+_}B5 2aޜI*]iBk=; 9rȑ#G-#IUJkGmͣ/6J?Ͱ&"ݒ3!OBr.эI!sj])rhzLw6 }%i47>ע%]H`^K [i{eFhȒaqF!K$Y+'Nh3lX E>4RK9e7xN؂FiܝIԩgX?yXABևKUJ=JS!4iӗ\&$y[MU]]GW4Zs@8 U:_o;Z*F>#4mgmG>U8~@ rUl{gn}4ym['h;{pGۜJ(4 j(Ζ-N),lE]F,V6Go*XH(dE2i:oΖvbU9{fأSg%< `3_XjTmPؔER56p`Lr-s GoHo$Yޤ&E;$ eVl؃ZeL]AQN+D9f, !LtNFP|"K"a/ 1phKG+5H)fx/母m)7x?+Oo,ĕ6޲IENDB`