Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
movio source code v1.8
  • Loading branch information
danieleugoletti committed Dec 15, 2015
1 parent 5690dac commit 3746f6c
Show file tree
Hide file tree
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.
Empty file added .gitignore
Empty file.
57 changes: 57 additions & 0 deletions Install.md
@@ -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.

21 changes: 21 additions & 0 deletions LICENSE.md
@@ -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.
1,391 changes: 1,391 additions & 0 deletions install/movio.sql

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions src/.htaccess
@@ -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>
13 changes: 13 additions & 0 deletions src/admin/.htaccess
@@ -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>
10 changes: 10 additions & 0 deletions src/admin/ajax.php
@@ -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 src/admin/application/classes/movio/models/Mobilecontents.xml
@@ -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.
@@ -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();
}
}
}
?>
@@ -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;
}
}
@@ -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;
}
}
?>
@@ -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;
}
}
?>
@@ -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();
}
}
}
@@ -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 src/admin/application/classes/movio/modules/codes/views/Admin.xml
@@ -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>
@@ -0,0 +1,4 @@
GlizyApp.pages[ 'movio.modules.codes.views.Admin' ] = function( state, routing ) {
CodesEditorLoader.start();
CodesEditorLoader.load();
}

0 comments on commit 3746f6c

Please sign in to comment.