Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
movio source code v1.8
- Loading branch information
1 parent
5690dac
commit 3746f6c
Showing
3,418 changed files
with
602,710 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
# Minimum requirements | ||
|
||
* Operating Sistem: Linux | ||
* Apache 2.2.x | ||
* MySQL 5.5 | ||
* PHP 5.3.x with extensions: | ||
* PDO | ||
* PDO_mysql | ||
* JSON | ||
* GDlib 2 | ||
|
||
# Configuration | ||
Clone the repository and publish the src folder in your webserver. | ||
|
||
Open config.xml, located inside the folder: application/config/ | ||
Edit the network parameters and the DB name, username, password (to access the DB): | ||
|
||
|
||
` | ||
<glz:Param name="DB_HOST" value="localhost" /> | ||
|
||
<glz:Param name="DB_NAME" value="movio" /> | ||
|
||
<glz:Param name="DB_USER" value="root" /> | ||
|
||
<glz:Param name="DB_PSW" value="" /> | ||
` | ||
|
||
* DB_HOST: is the name of the data base host in mysql | ||
* DB_NAME: name of the data base | ||
* DB_USER: name of the user connecting to the DB | ||
* DB_PSW: password to connect to the DB | ||
|
||
|
||
MOVIO can work with different configurations: the developers might use one configuration for the development and one for the production | ||
To have different configuration, you should copy and modify the congig.xml and rename it as config_DomainName.xml (as example, if you are using www.myserver.com, the file should be named as: config_www.myserver.com; or if the server is www. minervaeurope.org you should name the config file as: config_www.minervaeurope.org.xml) | ||
|
||
|
||
You need to use an administration tool to manage mySql (es. phpMyAdmin): create the MOVIO DB (if you want to use a different name, you need to change accordingly the parameter DB_NAME in the config.xml file (see previous steps). | ||
|
||
Once you created the DB you need to import the file file install/movio.sql. | ||
|
||
The following folders must be set with ‘write’ rights: | ||
|
||
* cache | ||
* application/mediaArchive (and all the sub folders) | ||
* application/classes/userModules | ||
* application/startup | ||
* admin/cache | ||
|
||
|
||
The Mod Rewrite in Apache must be active with right configuration in virtual-host (AllowOverride All) | ||
|
||
Open the browser at http://www.myserver.com to check that all has been executed correctly. | ||
Open the admin page http://www.myserver.com/admin/ using the admim/admin to login. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 GruppoMeta | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<IfModule mod_rewrite.c> | ||
RewriteEngine On | ||
RewriteRule ^(ajax\.php|static/|cache/|favicon\.ico) - [L] | ||
|
||
RewriteRule ^application/.*\.js - [L] | ||
RewriteRule ^application/mediaArchive - [L] | ||
RewriteRule ^application(/|$) - [F,NC] | ||
|
||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteRule ^(.*)$ index.php [QSA,L] | ||
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<IfModule mod_rewrite.c> | ||
RewriteEngine On | ||
RewriteRule ^(ajax\.php|static/|cache/|favicon\.ico) - [L] | ||
|
||
RewriteRule ^application/.*\.js - [L] | ||
RewriteRule ^application/templates - [L] | ||
RewriteRule ^application(/|$) - [F,NC] | ||
|
||
RewriteRule ^proxy/(.*)$ ajax.php?pageId=contentseditor&ajaxTarget=Page&action=GetUrl&url=$1 [QSA,L] | ||
RewriteRule ^rest/(.*)$ rest.php?$1 [QSA,L] | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteRule ^(.*)$ index.php [QSA,L] | ||
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
ob_start(); | ||
setlocale(LC_TIME, "it_IT", "it", "it_IT.utf8"); | ||
|
||
require_once("../core/core.inc.php"); | ||
|
||
$application = org_glizy_ObjectFactory::createObject('org.glizycms.core.application.AdminApplication', 'application', '../', '../application/'); | ||
$application->useXmlSiteMap = true; | ||
$application->setLanguage('it'); | ||
$application->runAjax(); |
Empty file.
6 changes: 6 additions & 0 deletions
6
src/admin/application/classes/movio/models/Mobilecontents.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<model:Model | ||
xmlns:glz="http://www.glizy.org/dtd/1.0/" | ||
xmlns:model="http://www.glizy.org/dtd/1.0/model/" | ||
model:tableName="mobilecontents_tbl" model:usePrefix="true"> | ||
</model:Model> |
Empty file.
30 changes: 30 additions & 0 deletions
30
src/admin/application/classes/movio/modules/codes/controllers/MakeQRCode.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
class movio_modules_codes_controllers_MakeQRCode extends org_glizy_mvc_core_Command | ||
{ | ||
function execute($id) | ||
{ | ||
if ($id) { | ||
require_once(__Paths::get('APPLICATION_LIBS').'phpqrcode/qrlib.php'); | ||
|
||
$ar = org_glizy_objectFactory::createModel('movio.modules.codes.models.Model'); | ||
$ar->load($id); | ||
$codeType = $ar->custom_code_mapping_code ? 'c' : 'm'; | ||
$value = $codeType == 'c' ? $ar->custom_code_mapping_code : $ar->custom_code_mapping_link; | ||
|
||
$codeContents = GLZ_HOST_ROOT.':'.$codeType.':'.$value; | ||
$filePath = __Paths::get('CACHE').$id.'.png'; | ||
|
||
QRcode::png($codeContents, $filePath, QR_ECLEVEL_H, 4); | ||
|
||
header("Pragma: public"); | ||
header("Expires: " . gmdate("D, d M Y H:i:s") . " GMT"); | ||
header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); | ||
header("Cache-Control: private",false); | ||
header("Content-Type: image/png"); | ||
header("Content-Transfer-Encoding: binary"); | ||
header("Content-Disposition: attachment; filename=\"".$id.'.png'."\""); | ||
@readfile($filePath) or die(); | ||
} | ||
} | ||
} | ||
?> |
12 changes: 12 additions & 0 deletions
12
src/admin/application/classes/movio/modules/codes/controllers/ajax/Del.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
class movio_modules_codes_controllers_ajax_Del extends org_glizy_mvc_core_CommandAjax | ||
{ | ||
function execute($id) | ||
{ | ||
// TODO verificare permessi | ||
$ar = org_glizy_objectFactory::createModel('movio.modules.codes.models.Model'); | ||
$ar->delete($id); | ||
|
||
return true; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
src/admin/application/classes/movio/modules/codes/controllers/ajax/Load.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
class movio_modules_codes_controllers_ajax_Load extends org_glizy_mvc_core_CommandAjax | ||
{ | ||
function execute() | ||
{ | ||
// TODO controllo dei permessi | ||
$it = org_glizy_objectFactory::createModelIterator('movio.modules.codes.models.Model'); | ||
|
||
$result = array( | ||
'items' => array() | ||
); | ||
|
||
foreach($it as $ar) { | ||
$id = $ar->getId(); | ||
|
||
$item = array( | ||
'id' => $id, | ||
'description' => $ar->custom_code_mapping_description, | ||
'code' => $ar->custom_code_mapping_code, | ||
'resourceLink' => $ar->custom_code_mapping_link, | ||
); | ||
|
||
if ($ar->custom_code_mapping_link) { | ||
$speakingUrlManager = $this->application->retrieveProxy('org.glizycms.speakingUrl.Manager'); | ||
$docs = $speakingUrlManager->searchDocumentsByTerm('', $ar->custom_code_mapping_link); | ||
$item['resourceLinkLabel'] = $docs[0]['text']; | ||
$item['downloadQrCode'] = __Link::makeUrl('actionsMVC', array('action' => 'makeQRCode', 'id' => $id)); | ||
} | ||
|
||
$result['items'][] = $item; | ||
} | ||
|
||
return $result; | ||
} | ||
} | ||
?> |
14 changes: 14 additions & 0 deletions
14
src/admin/application/classes/movio/modules/codes/controllers/ajax/New.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
class movio_modules_codes_controllers_ajax_New extends org_glizy_mvc_core_CommandAjax | ||
{ | ||
function execute($custom_code_mapping_description, $custom_code_mapping_code, $custom_code_mapping_link) | ||
{ | ||
$ar = org_glizy_objectFactory::createModel('movio.modules.codes.models.Model'); | ||
$ar->custom_code_mapping_description = $custom_code_mapping_description; | ||
$ar->custom_code_mapping_code = $custom_code_mapping_code; | ||
$ar->custom_code_mapping_link = $custom_code_mapping_link; | ||
$id = $ar->save(); | ||
return $id; | ||
} | ||
} | ||
?> |
13 changes: 13 additions & 0 deletions
13
src/admin/application/classes/movio/modules/codes/controllers/ajax/Set.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
class movio_modules_codes_controllers_ajax_Set extends org_glizy_mvc_core_CommandAjax | ||
{ | ||
function execute($pk, $name, $value) | ||
{ | ||
$ar = org_glizy_objectFactory::createModel('movio.modules.codes.models.Model'); | ||
|
||
if ($ar->load($pk)) { | ||
$ar->$name = $value; | ||
$ar->save(); | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/admin/application/classes/movio/modules/codes/models/Model.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<model:Model | ||
xmlns:glz="http://www.glizy.org/dtd/1.0/" | ||
xmlns:model="http://www.glizy.org/dtd/1.0/model/" | ||
model:tableName="custom_code_mapping_tbl" model:usePrefix="true"> | ||
</model:Model> |
20 changes: 20 additions & 0 deletions
20
src/admin/application/classes/movio/modules/codes/views/Admin.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<mvc:Page id="Page" | ||
xmlns:glz="http://www.glizy.org/dtd/1.0/" | ||
xmlns:mvc="org.glizy.mvc.components.*" | ||
xmlns:cmp="movio.modules.ontologybuilder.views.components.*" | ||
controllerName="movio.modules.codes.controllers.*" | ||
defaultEditableRegion="content" | ||
templateType="php" | ||
templateFileName="Page.php"> | ||
<glz:Import src="_common.xml" /> | ||
<glz:JSscript folder="movio.modules.codes.views.js" /> | ||
|
||
<glz:CSS src="../static/jquery/select2-3.4.6/select2.css" /> | ||
<glz:JSscript src="../static/jquery/select2-3.4.6/select2.min.js" /> | ||
<glz:CSS src="../static/jquery/bootstrap-editable-1.5.1/bootstrap-editable/css/bootstrap-editable.css" /> | ||
<glz:JSscript src="../static/jquery/bootstrap-editable-1.5.1/bootstrap-editable/js/bootstrap-editable.min.js" /> | ||
<glz:JSscript src="application/classes/movio/modules/codes/views/js/locale/##LANG2##.js"/> | ||
<glz:JSscript src="../static/handlebars/handlebars-1.0.rc.1.js" /> | ||
<glz:JSscript folder="movio.modules.codes.views.skins" inline="true" extension=".html"/> | ||
</mvc:Page> |
4 changes: 4 additions & 0 deletions
4
src/admin/application/classes/movio/modules/codes/views/js/CodesEditor.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
GlizyApp.pages[ 'movio.modules.codes.views.Admin' ] = function( state, routing ) { | ||
CodesEditorLoader.start(); | ||
CodesEditorLoader.load(); | ||
} |
Oops, something went wrong.