diff --git a/egr/gr/papan_tulis.php b/egr/gr/papan_tulis.php
index 237c46be7..7923de876 100755
--- a/egr/gr/papan_tulis.php
+++ b/egr/gr/papan_tulis.php
@@ -38,12 +38,25 @@
-//nek enter, ke simpan
-$x_enter = 'onKeyDown="var keyCode = event.keyCode;
-if (keyCode == 13)
+
+
+//nilai folder //////////////////////////////////////////////////////////////
+$path1 = "../../filebox/materi/$gmkd";
+$path2x = "../../filebox/materi";
+
+
+
+//cek, sudah ada belum folder-nya...
+if (!file_exists($path1))
{
- document.formx.btnSMP.focus();
- }"';
+ chmod("$path2x",0777);
+ mkdir("$path1", 0777, true);
+ chmod("$path2x",0755);
+ chmod("$path1",0755);
+ }
+
+
+
diff --git a/inc/class/ckeditor/build-config.js b/inc/class/ckeditor/build-config.js
old mode 100644
new mode 100755
index da8ade71a..7b849c139
--- a/inc/class/ckeditor/build-config.js
+++ b/inc/class/ckeditor/build-config.js
@@ -117,6 +117,7 @@ var CKBUILDER_CONFIG = {
'uploadimage' : 1,
'wsc' : 1,
'wysiwygarea' : 1
+ 'youtube' : 1
},
languages : {
'en' : 1,
diff --git a/inc/class/ckeditor/config.js b/inc/class/ckeditor/config.js
old mode 100644
new mode 100755
index 111cdd6ec..739e09374
--- a/inc/class/ckeditor/config.js
+++ b/inc/class/ckeditor/config.js
@@ -11,7 +11,22 @@ CKEDITOR.editorConfig = function( config ) {
+
+config.extraPlugins = 'youtube';
+config.youtube_height = '480';
+config.youtube_responsive = true;
+config.youtube_older = false;
+config.youtube_autoplay = true;
+config.youtube_controls = true;
+
+
config.extraPlugins = 'FMathEditor';
+config.extraPlugins = 'html5audio';
+
+
+
+
+config.extraPlugins = 'FMathEditor,html5audio,youtube';
diff --git a/inc/class/ckeditor/plugins/html5audio/dialogs/html5audio.js b/inc/class/ckeditor/plugins/html5audio/dialogs/html5audio.js
new file mode 100755
index 000000000..fc3d8eccd
--- /dev/null
+++ b/inc/class/ckeditor/plugins/html5audio/dialogs/html5audio.js
@@ -0,0 +1,152 @@
+CKEDITOR.dialog.add( 'html5audio', function( editor ) {
+ return {
+ title: editor.lang.html5audio.title,
+ minWidth: 500,
+ minHeight: 100,
+ contents: [ {
+ id: 'info',
+ label: editor.lang.html5audio.infoLabel,
+ elements: [ {
+ type: 'vbox',
+ padding: 0,
+ children: [ {
+ type: 'hbox',
+ widths: [ '365px', '110px' ],
+ align: 'right',
+ children: [ {
+ type: 'text',
+ id: 'url',
+ label: editor.lang.common.url,
+ required: true,
+ validate: CKEDITOR.dialog.validate.notEmpty( editor.lang.html5audio.urlMissing ),
+ setup: function( widget ) {
+ this.setValue( widget.data.src );
+ },
+ commit: function( widget ) {
+ widget.setData( 'src', this.getValue() );
+ }
+ },
+ {
+ type: 'button',
+ id: 'browse',
+ // v-align with the 'txtUrl' field.
+ // TODO: We need something better than a fixed size here.
+ style: 'display:inline-block;margin-top:14px;',
+ align: 'center',
+ label: editor.lang.common.browseServer,
+ hidden: true,
+ filebrowser: 'info:url'
+ } ]
+ } ]
+ },
+ {
+ type: 'hbox',
+ id: 'alignment',
+ children: [ {
+ type: 'radio',
+ id: 'align',
+ label: editor.lang.common.align,
+ items: [
+ [editor.lang.common.alignCenter, 'center'],
+ [editor.lang.common.alignLeft, 'left'],
+ [editor.lang.common.alignRight, 'right'],
+ [editor.lang.common.alignNone, 'none']
+ ],
+ 'default': 'center',
+ setup: function( widget ) {
+ if ( widget.data.align ) {
+ this.setValue( widget.data.align );
+ }
+ },
+ commit: function( widget ) {
+ widget.setData( 'align', this.getValue() );
+ }
+ } ]
+ } ]
+ },
+ {
+ id: 'Upload',
+ hidden: true,
+ filebrowser: 'uploadButton',
+ label: editor.lang.html5audio.upload,
+ elements: [ {
+ type: 'file',
+ id: 'upload',
+ label: editor.lang.html5audio.btnUpload,
+ style: 'height:40px',
+ size: 38
+ },
+ {
+ type: 'fileButton',
+ id: 'uploadButton',
+ filebrowser: 'info:url',
+ label: editor.lang.html5audio.btnUpload,
+ 'for': [ 'Upload', 'upload' ]
+ } ]
+ },
+ {
+ id: 'advanced',
+ label: editor.lang.html5audio.advanced,
+ elements: [ {
+ type: 'vbox',
+ padding: 10,
+ children: [ {
+ type: 'hbox',
+ children: [ {
+ type: 'radio',
+ id: 'autoplay',
+ label: editor.lang.html5audio.autoplay,
+ items: [
+ [editor.lang.html5audio.yes, 'yes'],
+ [editor.lang.html5audio.no, 'no']
+ ],
+ 'default': 'no',
+ setup: function( widget ) {
+ if ( widget.data.autoplay ) {
+ this.setValue( widget.data.autoplay );
+ }
+ },
+ commit: function( widget ) {
+ widget.setData( 'autoplay', this.getValue() );
+ }
+ },
+ {
+ type: 'radio',
+ id: 'allowdownload',
+ label: editor.lang.html5audio.allowdownload,
+ items: [
+ [editor.lang.html5audio.yes, 'yes'],
+ [editor.lang.html5audio.no, 'no']
+ ],
+ 'default': 'no',
+ setup: function( widget ) {
+ if ( widget.data.allowdownload ) {
+ this.setValue(widget.data.allowdownload);
+ }
+ },
+ commit: function( widget ) {
+ widget.setData( 'allowdownload', this.getValue() );
+ }
+ } ]
+ },
+ {
+ type: 'hbox',
+ children: [ {
+ type: "text",
+ id: 'advisorytitle',
+ label: editor.lang.html5audio.advisorytitle,
+ 'default': '',
+ setup: function( widget ) {
+ if ( widget.data.advisorytitle ) {
+ this.setValue(widget.data.advisorytitle);
+ }
+ },
+ commit: function( widget ) {
+ widget.setData( 'advisorytitle', this.getValue() );
+ }
+ } ]
+ } ]
+ } ]
+ } ]
+ };
+} );
diff --git a/inc/class/ckeditor/plugins/html5audio/icons/hidpi/html5audio.png b/inc/class/ckeditor/plugins/html5audio/icons/hidpi/html5audio.png
new file mode 100644
index 000000000..16f07e722
Binary files /dev/null and b/inc/class/ckeditor/plugins/html5audio/icons/hidpi/html5audio.png differ
diff --git a/inc/class/ckeditor/plugins/html5audio/icons/html5audio.png b/inc/class/ckeditor/plugins/html5audio/icons/html5audio.png
new file mode 100644
index 000000000..59e5fb236
Binary files /dev/null and b/inc/class/ckeditor/plugins/html5audio/icons/html5audio.png differ
diff --git a/inc/class/ckeditor/plugins/html5audio/lang/bg.js b/inc/class/ckeditor/plugins/html5audio/lang/bg.js
new file mode 100644
index 000000000..c24d69568
--- /dev/null
+++ b/inc/class/ckeditor/plugins/html5audio/lang/bg.js
@@ -0,0 +1,15 @@
+CKEDITOR.plugins.setLang( 'html5audio', 'bg', {
+ button: 'Вмъква HTML5 аудио',
+ title: 'HTML5 аудио',
+ infoLabel: 'Аудио',
+ urlMissing: 'URL адресът на източника на аудио липсва.',
+ audioProperties: 'Свойства на аудио',
+ upload: 'Качване',
+ btnUpload: 'Изпрати на сървъра',
+ advanced: 'Разширено',
+ autoplay: 'Автоматично изпълнение',
+ allowdownload: 'Позволено изтегляне?',
+ advisorytitle: 'Заглавие',
+ yes: 'Да',
+ no: 'Не'
+} );
diff --git a/inc/class/ckeditor/plugins/html5audio/lang/ca.js b/inc/class/ckeditor/plugins/html5audio/lang/ca.js
new file mode 100644
index 000000000..461373b95
--- /dev/null
+++ b/inc/class/ckeditor/plugins/html5audio/lang/ca.js
@@ -0,0 +1,15 @@
+CKEDITOR.plugins.setLang( 'html5audio', 'ca', {
+ button: "Insereix un àudio HTML5",
+ title: "Àudio HTML5",
+ infoLabel: "Informació de l'àudio",
+ urlMissing: "Falta l'URL d'origen d'àudio.",
+ audioProperties: "Propietats de l'àudio",
+ upload: "Pujar",
+ btnUpload: "Envia-lo al servidor",
+ advanced: "Avançat",
+ autoplay: "Reproducció automàtica?",
+ allowdownload: "Permet la descàrrega?",
+ advisorytitle: 'Advisory title',
+ yes: "Sí",
+ no: "No"
+} );
diff --git a/inc/class/ckeditor/plugins/html5audio/lang/de.js b/inc/class/ckeditor/plugins/html5audio/lang/de.js
new file mode 100644
index 000000000..a9f5a9637
--- /dev/null
+++ b/inc/class/ckeditor/plugins/html5audio/lang/de.js
@@ -0,0 +1,15 @@
+CKEDITOR.plugins.setLang( 'html5audio', 'de', {
+ button: 'HTML5 Audio einfügen',
+ title: 'HTML5 Audio',
+ infoLabel: 'Audio Infos',
+ urlMissing: 'Sie haben keine URL zur Audio-Datei angegeben.',
+ audioProperties: 'Audio-Einstellungen',
+ upload: 'Hochladen',
+ btnUpload: 'Zum Server senden',
+ advanced: 'Erweitert',
+ autoplay: 'Autoplay?',
+ allowdownload: 'Download zulassen?',
+ advisorytitle: 'Titel Beschreibung',
+ yes: 'Ja',
+ no: 'Nein'
+} );
diff --git a/inc/class/ckeditor/plugins/html5audio/lang/el.js b/inc/class/ckeditor/plugins/html5audio/lang/el.js
new file mode 100644
index 000000000..670500306
--- /dev/null
+++ b/inc/class/ckeditor/plugins/html5audio/lang/el.js
@@ -0,0 +1,15 @@
+CKEDITOR.plugins.setLang( 'html5audio', 'el', {
+ button: 'Προσθέστε HTML5 ήχο',
+ title: 'HTML5 ήχος',
+ infoLabel: 'Πληροφορίες ήχου',
+ urlMissing: 'Η πηγή URL ήχου απουσιάζει.',
+ audioProperties: 'Ιδιότητες ήχου',
+ upload: 'Upload',
+ btnUpload: 'Αποστολή στον διακομιστή',
+ advanced: 'Προχωρημένα',
+ autoplay: 'Αυτόματη αναπαραγωγή;',
+ allowdownload: 'Επιτρέψτε τη λήψη;',
+ advisorytitle: 'Advisory title',
+ yes: 'Ναι',
+ no: 'Όχι'
+} );
diff --git a/inc/class/ckeditor/plugins/html5audio/lang/en.js b/inc/class/ckeditor/plugins/html5audio/lang/en.js
new file mode 100755
index 000000000..fd3bb4f0a
--- /dev/null
+++ b/inc/class/ckeditor/plugins/html5audio/lang/en.js
@@ -0,0 +1,15 @@
+CKEDITOR.plugins.setLang( 'html5audio', 'en', {
+ button: 'Insert HTML5 audio',
+ title: 'HTML5 audio',
+ infoLabel: 'Audio info',
+ urlMissing: 'Audio source URL is missing.',
+ audioProperties: 'Audio properties',
+ upload: 'Upload',
+ btnUpload: 'Send it to the server',
+ advanced: 'Advanced',
+ autoplay: 'Autoplay?',
+ allowdownload: 'Allow download?',
+ advisorytitle: 'Advisory title',
+ yes: 'Yes',
+ no: 'No'
+} );
diff --git a/inc/class/ckeditor/plugins/html5audio/lang/es.js b/inc/class/ckeditor/plugins/html5audio/lang/es.js
new file mode 100644
index 000000000..51f20be17
--- /dev/null
+++ b/inc/class/ckeditor/plugins/html5audio/lang/es.js
@@ -0,0 +1,15 @@
+CKEDITOR.plugins.setLang( 'html5audio', 'es', {
+ button: 'Insertar audio HTML5',
+ title: 'Audio HTML5',
+ infoLabel: 'Información del audio',
+ urlMissing: 'La URL del audio no puede estar vacia.',
+ audioProperties: 'Propiedades del audio',
+ upload: 'Cargar',
+ btnUpload: 'Enviar al servidor',
+ advanced: 'Avanzado',
+ autoplay: '¿Reproducir automáticamente?',
+ allowdownload: '¿Permitir la descarga?',
+ advisorytitle: 'Advisory title',
+ yes: 'Si',
+ no: 'No'
+} );
diff --git a/inc/class/ckeditor/plugins/html5audio/lang/eu.js b/inc/class/ckeditor/plugins/html5audio/lang/eu.js
new file mode 100755
index 000000000..7b2ab78fe
--- /dev/null
+++ b/inc/class/ckeditor/plugins/html5audio/lang/eu.js
@@ -0,0 +1,15 @@
+CKEDITOR.plugins.setLang( 'html5audio', 'eu', {
+ button: 'Txertatu HTML5 audioa',
+ title: 'HTML5 audioa',
+ infoLabel: 'Audioaren informazioa',
+ urlMissing: 'Audioaren URLak ezin du hutsik egon.',
+ audioProperties: 'Audioaren propietateak',
+ upload: 'Kargatu',
+ btnUpload: 'Bidali zerbitzarira',
+ advanced: 'Aurreratua',
+ autoplay: 'Automatikoki erreproduzitu?',
+ allowdownload: 'Baimendu deskargatzea?',
+ advisorytitle: 'Argibidea',
+ yes: 'Bai',
+ no: 'Ez'
+} );
diff --git a/inc/class/ckeditor/plugins/html5audio/lang/fa.js b/inc/class/ckeditor/plugins/html5audio/lang/fa.js
new file mode 100644
index 000000000..c5604f8b7
--- /dev/null
+++ b/inc/class/ckeditor/plugins/html5audio/lang/fa.js
@@ -0,0 +1,15 @@
+CKEDITOR.plugins.setLang( 'html5audio', 'fa', {
+ button: 'اضافه کردن فایل صوتی',
+ title: 'اضافه کردن فایل صوتی به شکل HTML5',
+ infoLabel: 'اطلاعات فایل صوتی',
+ urlMissing: 'آدرس منبع فایل صوتی یافت نشد.',
+ audioProperties: 'ویژگیهای فایل صوتی',
+ upload: 'بارگذاری',
+ btnUpload: 'ارسال به سرور',
+ advanced: 'تنظیمات پیشرفته',
+ autoplay: 'پخش خودکار؟',
+ allowdownload: 'دانلود؟',
+ advisorytitle: 'Advisory title',
+ yes: 'بله',
+ no: 'خیر'
+} );
\ No newline at end of file
diff --git a/inc/class/ckeditor/plugins/html5audio/lang/fr.js b/inc/class/ckeditor/plugins/html5audio/lang/fr.js
new file mode 100644
index 000000000..fea3d7b0b
--- /dev/null
+++ b/inc/class/ckeditor/plugins/html5audio/lang/fr.js
@@ -0,0 +1,15 @@
+CKEDITOR.plugins.setLang( 'html5audio', 'fr', {
+ button: 'Insérer un lecteur audio HTML5',
+ title: 'HTML5 audio',
+ infoLabel: 'Informations audio',
+ urlMissing: 'URL de la source audio manquante. Veuillez la renseigner.',
+ audioProperties: 'Propriétés Audio',
+ upload: 'Télécharger',
+ btnUpload: 'Envoyer vers le serveur',
+ advanced: 'Avancé',
+ autoplay: 'Jouer automatiquement ?',
+ allowdownload: 'Autoriser le téléchargement ?',
+ advisorytitle: 'Infobulle',
+ yes: 'Oui',
+ no: 'Non'
+} );
diff --git a/inc/class/ckeditor/plugins/html5audio/lang/ru.js b/inc/class/ckeditor/plugins/html5audio/lang/ru.js
new file mode 100644
index 000000000..5dc4b11d4
--- /dev/null
+++ b/inc/class/ckeditor/plugins/html5audio/lang/ru.js
@@ -0,0 +1,15 @@
+CKEDITOR.plugins.setLang( 'html5audio', 'ru', {
+ button: 'Вставить HTML5 аудио',
+ title: 'HTML5 аудио',
+ infoLabel: 'Аудио',
+ urlMissing: 'Не выбран источник аудио',
+ audioProperties: 'Свойства аудио',
+ upload: 'Загрузить',
+ btnUpload: 'Загрузить на сервер',
+ advanced: 'Дополнительно',
+ autoplay: 'Автовоспроизведение',
+ allowdownload: 'Разрешить загрузку',
+ advisorytitle: 'Заголовок',
+ yes: 'Да',
+ no: 'Нет'
+} );
diff --git a/inc/class/ckeditor/plugins/html5audio/lang/uk.js b/inc/class/ckeditor/plugins/html5audio/lang/uk.js
new file mode 100644
index 000000000..d11a7beb1
--- /dev/null
+++ b/inc/class/ckeditor/plugins/html5audio/lang/uk.js
@@ -0,0 +1,15 @@
+CKEDITOR.plugins.setLang( 'html5audio', 'uk', {
+ button: 'Вставити HTML5 аудіо',
+ title: 'HTML5 аудіо',
+ infoLabel: 'Інформація',
+ urlMissing: 'Не обрано джерела аудіо',
+ audioProperties: 'Властивості аудіо',
+ upload: 'Відвантажити',
+ btnUpload: 'Відвантажити на сервер',
+ advanced: 'Додатково',
+ autoplay: 'Автовідтворення?',
+ allowdownload: 'Дозволити завантаження?',
+ advisorytitle: 'Заголовок',
+ yes: 'Так',
+ no: 'Ні'
+} );
diff --git a/inc/class/ckeditor/plugins/html5audio/lang/uz.js b/inc/class/ckeditor/plugins/html5audio/lang/uz.js
new file mode 100644
index 000000000..448b2ce02
--- /dev/null
+++ b/inc/class/ckeditor/plugins/html5audio/lang/uz.js
@@ -0,0 +1,15 @@
+CKEDITOR.plugins.setLang( 'html5audio', 'uz', {
+ button: 'HTML5 audio qo‘shing',
+ title: 'HTML5 audio',
+ infoLabel: 'Audio ma\'lumot',
+ urlMissing: 'Audio\'ning URL manbasi topilmadi.',
+ audioProperties: 'Audio xususiyatlari',
+ upload: 'Yuklash',
+ btnUpload: 'Serverga jo‘natish',
+ advanced: 'Kengaytrilgan',
+ autoplay: 'Avtoijro?',
+ allowdownload: 'Yuklab olish uchun ruxsat berilsinmi?',
+ advisorytitle: 'Advisory title',
+ yes: 'Ha',
+ no: 'Yo‘q'
+} );
diff --git a/inc/class/ckeditor/plugins/html5audio/lang/zh-cn.js b/inc/class/ckeditor/plugins/html5audio/lang/zh-cn.js
new file mode 100644
index 000000000..a64ac1c33
--- /dev/null
+++ b/inc/class/ckeditor/plugins/html5audio/lang/zh-cn.js
@@ -0,0 +1,15 @@
+CKEDITOR.plugins.setLang( 'html5audio', 'zh-cn', {
+ button: '插入HTML5音频',
+ title: 'HTML5 音频',
+ infoLabel: '音频信息',
+ urlMissing: '音频URL',
+ audioProperties: '音频属性',
+ upload: '上传',
+ btnUpload: '上传到服务器',
+ advanced: '高级',
+ autoplay: '自动播放?',
+ allowdownload: '允许下载?',
+ advisorytitle: '提示语',
+ yes: '是',
+ no: '否'
+} );
diff --git a/inc/class/ckeditor/plugins/html5audio/plugin.js b/inc/class/ckeditor/plugins/html5audio/plugin.js
new file mode 100755
index 000000000..da728c390
--- /dev/null
+++ b/inc/class/ckeditor/plugins/html5audio/plugin.js
@@ -0,0 +1,135 @@
+CKEDITOR.plugins.add( 'html5audio', {
+ requires: 'widget',
+ lang: 'bg,ca,de,el,en,eu,es,fr,ru,uk,uz,zh-cn,fa',
+ icons: 'html5audio',
+ hidpi: true,
+ init: function( editor ) {
+ editor.widgets.add( 'html5audio', {
+ button: editor.lang.html5audio.button,
+ template: '
', // We add the audio element when needed in the data function, to avoid having an undefined src attribute.
+ // See issue #9 on github: https://github.com/iametza/ckeditor-html5-audio/issues/9
+ editables: {},
+ /*
+ * Allowed content rules (http://docs.ckeditor.com/#!/guide/dev_allowed_content_rules):
+ * - div-s with text-align,float,margin-left,margin-right inline style rules and required ckeditor-html5-audio class.
+ * - audio tags with src and controls attributes.
+ */
+ allowedContent: 'div(!ckeditor-html5-audio){text-align,float,margin-left,margin-right}; audio[src,controls,controlslist,autoplay];',
+ requiredContent: 'div(ckeditor-html5-audio); audio[src,controls];',
+ upcast: function( element ) {
+ return element.name === 'div' && element.hasClass( 'ckeditor-html5-audio' );
+ },
+ dialog: 'html5audio',
+ init: function() {
+ var src = '';
+ var autoplay = '';
+ var align = this.element.getStyle( 'text-align' );
+
+ // If there's a child (the audio element)
+ if ( this.element.getChild( 0 ) ) {
+ // get it's attributes.
+ src = this.element.getChild( 0 ).getAttribute( 'src' );
+ autoplay = this.element.getChild( 0 ).getAttribute( 'autoplay' );
+ allowdownload = !this.element.getChild( 0 ).getAttribute( 'controlslist' );
+ advisorytitle = this.element.getChild( 0 ).getAttribute( 'title' );
+ }
+
+ if ( src ) {
+ this.setData( 'src', src );
+
+ if ( align ) {
+ this.setData( 'align', align );
+ } else {
+ this.setData( 'align', 'none' );
+ }
+
+ if ( autoplay ) {
+ this.setData( 'autoplay', 'yes' );
+ }
+
+ if ( allowdownload ) {
+ this.setData( 'allowdownload', 'yes' );
+ }
+
+ if ( advisorytitle ) {
+ this.setData( 'advisorytitle', advisorytitle );
+ }
+ }
+ },
+ data: function() {
+ // If there is an audio source
+ if ( this.data.src ) {
+ // and there isn't a child (the audio element)
+ if ( !this.element.getChild( 0 ) ) {
+ // Create a new