Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * Created 10-2016 by Marcel Minke (marcel.minke@limesurvey.org)
- *
- * This script creates an overview of different translations
- */
- /*
- * ------------ START CONFIGURATION --------------
- */
- //set the survey language (usually "de") for output
- $lang = "de";
- /*
- * ------------ END CONFIGURATION --------------
- */
- /*
- * ------------ START WORKFLOW --------------
- */
- //error reporting
- //ini_set('display_errors',1);
- //error_reporting(E_ALL & ~E_NOTICE);
- include_once './yiiInstantiate.php';
- Yii::import('application.helpers.common_helper', true);
- // Push all config details (config.details returns them as array) into this a rray
- $config = require_once("../application/config/config.php");
- // DB CONNECTION DETAILS
- $databaseUsername = $config['components']['db']['username'];
- $databasePassword = $config['components']['db']['password'];
- $dbprefix = $config['components']['db']['tablePrefix'];
- // The DB connection string looks like this:
- // 'mysql:host=localhost;port=3306;dbname=etcvps88_devm;'
- // so we need to check for the last "=", add 1 and get the string without the ending ";" character:
- $databaseName = substr($config['components']['db']['connectionString'],strrpos($config['components']['db']['connectionString'],"=")+1,-1);
- $connect = mysqli_connect("localhost", $databaseUsername, $databasePassword, $databaseName);
- //fake survey ID for initialisation
- $sid = 123456;
- setYiiLang(NULL, $sid);
- //check if SURVEYID was passed
- if(isset($_GET['sid']) && $_GET['sid'] != "")
- {
- $sid = intval($_GET['sid']);
- $fieldmap = createFieldMap($sid,'full',false,false,$lang);
- //output fieldmap for testing here
- }
- //END
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement