Evoli - popravki preusmeritev na forme
This commit is contained in:
parent
142c6aaa0c
commit
20650da9f2
@ -53,7 +53,7 @@ class SurveyTeamMeter{
|
||||
if(isset($modules['evoli_quality_climate'])){
|
||||
$this->submodule = 'evoli_quality_climate';
|
||||
$this->submodule_name = 'Quality climate';
|
||||
$this->submodule_form = 'quality_climate.php';
|
||||
$this->submodule_form = 'quality_climate_form.php';
|
||||
|
||||
$this->execute_params['csv_name'] = 'quality_climate.csv';
|
||||
|
||||
@ -77,7 +77,7 @@ class SurveyTeamMeter{
|
||||
elseif(isset($modules['evoli_teamship_meter'])){
|
||||
$this->submodule = 'evoli_teamship_meter';
|
||||
$this->submodule_name = 'Teamship meter';
|
||||
$this->submodule_form = 'teamship_meter.php';
|
||||
$this->submodule_form = 'teamship_meter_form.php';
|
||||
|
||||
$this->execute_params['csv_name'] = 'evoli_teamship.csv';
|
||||
|
||||
@ -101,7 +101,7 @@ class SurveyTeamMeter{
|
||||
elseif(isset($modules['evoli_organizational_employeeship_meter'])){
|
||||
$this->submodule = 'evoli_organizational_employeeship_meter';
|
||||
$this->submodule_name = 'Organizational employeeship meter';
|
||||
$this->submodule_form = 'organizational_employeeship_meter.php';
|
||||
$this->submodule_form = 'organizational_employeeship_meter_form.php';
|
||||
|
||||
$this->execute_params['csv_name'] = 'evoli_team.csv';
|
||||
|
||||
@ -125,7 +125,7 @@ class SurveyTeamMeter{
|
||||
else{
|
||||
$this->submodule = 'evoli_teammeter';
|
||||
$this->submodule_name = 'Team meter';
|
||||
$this->submodule_form = 'team_meter.php';
|
||||
$this->submodule_form = 'team_meter_form.php';
|
||||
|
||||
$this->execute_params['csv_name'] = 'evoli_team.csv';
|
||||
|
||||
@ -327,7 +327,7 @@ class SurveyTeamMeter{
|
||||
|
||||
// Naknadno posiljanje vabil
|
||||
// https://tools.evoli.si/admin/survey/modules/mod_EVOLI/team_meter.php?ank_id=SURVEY_ID&email=CLIENT_EMAIL&departments=1&language=slo&pass=GENERATED_PASSWORD
|
||||
$url = $site_url.'admin/survey/modules/mod_EVOLI/'.$this->submodule_form.'?';
|
||||
$url = $site_url.'admin/survey/modules/mod_EVOLI/forms/'.$this->submodule_form.'?';
|
||||
$url .= 'ank_id='.$this->anketa;
|
||||
$url .= '&language='.$language;
|
||||
$url .= '&email='.$row['email'];
|
||||
|
@ -1,54 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* redirect na ustrezno formo, ko pride kupec iz trgovine
|
||||
* redirect se izvede na podlagi id-ja ankete in vklopljenega modula
|
||||
*/
|
||||
|
||||
include_once('../../../../function.php');
|
||||
include_once('../../../../vendor/autoload.php');
|
||||
|
||||
|
||||
global $lang;
|
||||
global $site_url;
|
||||
|
||||
|
||||
// Dekodiramo parametre in dobimo id ankete
|
||||
$evoli = new EvoliForm();
|
||||
$ank_id = $evoli->getAnkId();
|
||||
|
||||
if($ank_id == 0){
|
||||
echo $lang['srv_evoli_form_error'].'!';
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
// V bazi pogledamo kateri modul ima anketa vklopljen
|
||||
$sql = sisplet_query("SELECT * FROM srv_anketa_module WHERE ank_id='".$ank_id."' AND modul LIKE '%evoli%'");
|
||||
|
||||
if(mysqli_num_rows($sql) == 0){
|
||||
echo $lang['srv_evoli_form_error_module'].'!';
|
||||
die();
|
||||
}
|
||||
|
||||
$row = mysqli_fetch_assoc($sql);
|
||||
|
||||
if($row['modul'] == 'evoli_quality_climate'){
|
||||
$script_name = 'quality_climate.php';
|
||||
}
|
||||
elseif($row['modul'] == 'teamship_meter'){
|
||||
$script_name = 'evoli_teamship_meter.php';
|
||||
}
|
||||
elseif($row['modul'] == 'evoli_organizational_employeeship_meter'){
|
||||
$script_name = 'organizational_employeeship_meter.php';
|
||||
}
|
||||
else{
|
||||
$script_name = 'team_meter.php';
|
||||
}
|
||||
|
||||
|
||||
// Redirect na ustrezno skripto
|
||||
header("Location: ".$site_url."/admin/survey/modules/mod_EVOLI/".$script_name.'?'.$_SERVER['QUERY_STRING']);
|
||||
|
||||
|
||||
?>
|
133
admin/survey/modules/mod_EVOLI/forms/team_meter_form.php
Normal file
133
admin/survey/modules/mod_EVOLI/forms/team_meter_form.php
Normal file
@ -0,0 +1,133 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* forma za vnos Evoli TM
|
||||
*
|
||||
*/
|
||||
|
||||
ob_start();
|
||||
|
||||
header('Cache-Control: no-cache');
|
||||
header('Pragma: no-cache');
|
||||
|
||||
include_once '../../../../function.php';
|
||||
include_once('../../../../vendor/autoload.php');
|
||||
|
||||
|
||||
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
|
||||
echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
|
||||
|
||||
|
||||
echo '<head>';
|
||||
|
||||
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
|
||||
|
||||
//echo '<script type="text/javascript" src="admin/survey/script/jquery/ui-1.8.18/js/jquery-1.7.1.min.js"></script>';
|
||||
echo '<script type="text/javascript" src="../../script/jquery/ui-1.8.18/js/jquery-1.7.1.min.js"></script>';
|
||||
//echo '<script type="text/javascript" src="admin/survey/script/jquery/ui-1.8.18/js/jquery-ui-1.8.18.custom.min.js"></script>';
|
||||
echo '<script type="text/javascript" src="../../script/jquery/ui-1.8.18/js/jquery-ui-1.8.18.custom.min.js"></script>';
|
||||
//echo '<script type="text/javascript" src="admin/survey/modules/mod_EVOLI/script/script.js"></script>';
|
||||
echo '<script type="text/javascript" src="script/script.js"></script>';
|
||||
|
||||
echo '<link type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,700italic,400,600,700&subset=latin,latin-ext" rel="stylesheet">';
|
||||
//echo '<link type="text/css" href="admin/survey/modules/mod_EVOLI/css/style.css" media="screen" rel="stylesheet" />';
|
||||
echo '<link type="text/css" href="css/style.css" media="screen" rel="stylesheet" />';
|
||||
//echo '<link type="text/css" href="admin/survey/script/jquery/ui-1.8.18/js/jquery-ui.css" media="screen" rel="stylesheet" />';
|
||||
echo '<link type="text/css" href="../../script/jquery/ui-1.8.18/js/jquery-ui.css" media="screen" rel="stylesheet" />';
|
||||
|
||||
echo '<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#date_from").datepicker({
|
||||
showOtherMonths: true,
|
||||
selectOtherMonths: true,
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
dateFormat: "dd.mm.yy",
|
||||
showAnim: "slideDown",
|
||||
showOn: "button",
|
||||
buttonImage: "../../script/calendar/calendar.gif",
|
||||
buttonImageOnly: true,
|
||||
buttonText: ""
|
||||
});
|
||||
|
||||
$("#date_to").datepicker({
|
||||
showOtherMonths: true,
|
||||
selectOtherMonths: true,
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
dateFormat: "dd.mm.yy",
|
||||
showAnim: "slideDown",
|
||||
showOn: "button",
|
||||
buttonImage: "../../script/calendar/calendar.gif",
|
||||
buttonImageOnly: true,
|
||||
buttonText: ""
|
||||
});
|
||||
})
|
||||
</script>';
|
||||
|
||||
echo '</head>';
|
||||
|
||||
|
||||
echo '<body>';
|
||||
|
||||
|
||||
$evoli = new EvoliForm();
|
||||
$evoli->setReportType($type='team_meter');
|
||||
|
||||
|
||||
// Glava
|
||||
echo '<div id="tm_header"><a href="https://www.evoli.si/" title="Evoli">';
|
||||
|
||||
echo ' <img src="css/logo.png" />';
|
||||
|
||||
echo ' <div class="title_text">';
|
||||
if($_GET['language'] == 'slo' || $_POST['language'] == 'slo')
|
||||
echo 'Team Energy Meter';
|
||||
elseif($_GET['language'] == 'den' || $_POST['language'] == 'den')
|
||||
echo 'Team Energy Meter';
|
||||
else
|
||||
echo 'Team Energy Meter';
|
||||
echo ' </div>';
|
||||
|
||||
echo '</a></div>';
|
||||
|
||||
|
||||
// Srednji del
|
||||
echo '<div id="tm_body">';
|
||||
echo ' <div id="tm_holder">';
|
||||
|
||||
|
||||
// Submit obrazca
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
$evoli->submitForm();
|
||||
}
|
||||
// Izris obrazca
|
||||
else{
|
||||
if($evoli->getAnkId() > 0 && $evoli->getEmail() != ''){
|
||||
// Preverimo ce ima user dostop do obrazca (parameter pass v get-u)
|
||||
if($evoli->checkAccess())
|
||||
$evoli->displayForm();
|
||||
else
|
||||
$evoli->displayErrorAccess();
|
||||
}
|
||||
else{
|
||||
$evoli->displayError();
|
||||
}
|
||||
}
|
||||
|
||||
echo ' </div>';
|
||||
echo '</div>';
|
||||
|
||||
// Footer
|
||||
echo '<div id="tm_footer">';
|
||||
$evoli->displayFooter();
|
||||
echo '</div>';
|
||||
|
||||
echo '</body>';
|
||||
|
||||
|
||||
echo '</html>';
|
||||
|
||||
?>
|
@ -1,133 +1,54 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* forma za vnos Evoli TM
|
||||
*
|
||||
* redirect na ustrezno formo, ko pride kupec iz trgovine
|
||||
* redirect se izvede na podlagi id-ja ankete in vklopljenega modula
|
||||
*/
|
||||
|
||||
ob_start();
|
||||
|
||||
header('Cache-Control: no-cache');
|
||||
header('Pragma: no-cache');
|
||||
|
||||
include_once '../../../../function.php';
|
||||
include_once('../../../../function.php');
|
||||
include_once('../../../../vendor/autoload.php');
|
||||
|
||||
|
||||
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
|
||||
echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
|
||||
|
||||
|
||||
echo '<head>';
|
||||
|
||||
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
|
||||
|
||||
//echo '<script type="text/javascript" src="admin/survey/script/jquery/ui-1.8.18/js/jquery-1.7.1.min.js"></script>';
|
||||
echo '<script type="text/javascript" src="../../script/jquery/ui-1.8.18/js/jquery-1.7.1.min.js"></script>';
|
||||
//echo '<script type="text/javascript" src="admin/survey/script/jquery/ui-1.8.18/js/jquery-ui-1.8.18.custom.min.js"></script>';
|
||||
echo '<script type="text/javascript" src="../../script/jquery/ui-1.8.18/js/jquery-ui-1.8.18.custom.min.js"></script>';
|
||||
//echo '<script type="text/javascript" src="admin/survey/modules/mod_EVOLI/script/script.js"></script>';
|
||||
echo '<script type="text/javascript" src="script/script.js"></script>';
|
||||
global $lang;
|
||||
global $site_url;
|
||||
|
||||
echo '<link type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,700italic,400,600,700&subset=latin,latin-ext" rel="stylesheet">';
|
||||
//echo '<link type="text/css" href="admin/survey/modules/mod_EVOLI/css/style.css" media="screen" rel="stylesheet" />';
|
||||
echo '<link type="text/css" href="css/style.css" media="screen" rel="stylesheet" />';
|
||||
//echo '<link type="text/css" href="admin/survey/script/jquery/ui-1.8.18/js/jquery-ui.css" media="screen" rel="stylesheet" />';
|
||||
echo '<link type="text/css" href="../../script/jquery/ui-1.8.18/js/jquery-ui.css" media="screen" rel="stylesheet" />';
|
||||
|
||||
echo '<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#date_from").datepicker({
|
||||
showOtherMonths: true,
|
||||
selectOtherMonths: true,
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
dateFormat: "dd.mm.yy",
|
||||
showAnim: "slideDown",
|
||||
showOn: "button",
|
||||
buttonImage: "../../script/calendar/calendar.gif",
|
||||
buttonImageOnly: true,
|
||||
buttonText: ""
|
||||
});
|
||||
|
||||
$("#date_to").datepicker({
|
||||
showOtherMonths: true,
|
||||
selectOtherMonths: true,
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
dateFormat: "dd.mm.yy",
|
||||
showAnim: "slideDown",
|
||||
showOn: "button",
|
||||
buttonImage: "../../script/calendar/calendar.gif",
|
||||
buttonImageOnly: true,
|
||||
buttonText: ""
|
||||
});
|
||||
})
|
||||
</script>';
|
||||
|
||||
echo '</head>';
|
||||
|
||||
|
||||
echo '<body>';
|
||||
|
||||
|
||||
|
||||
// Dekodiramo parametre in dobimo id ankete
|
||||
$evoli = new EvoliForm();
|
||||
$evoli->setReportType($type='team_meter');
|
||||
|
||||
|
||||
// Glava
|
||||
echo '<div id="tm_header"><a href="https://www.evoli.si/" title="Evoli">';
|
||||
$ank_id = $evoli->getAnkId();
|
||||
|
||||
echo ' <img src="css/logo.png" />';
|
||||
if($ank_id == 0){
|
||||
echo $lang['srv_evoli_form_error'].'!';
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
echo ' <div class="title_text">';
|
||||
if($_GET['language'] == 'slo' || $_POST['language'] == 'slo')
|
||||
echo 'Team Energy Meter';
|
||||
elseif($_GET['language'] == 'den' || $_POST['language'] == 'den')
|
||||
echo 'Team Energy Meter';
|
||||
else
|
||||
echo 'Team Energy Meter';
|
||||
echo ' </div>';
|
||||
// V bazi pogledamo kateri modul ima anketa vklopljen
|
||||
$sql = sisplet_query("SELECT * FROM srv_anketa_module WHERE ank_id='".$ank_id."' AND modul LIKE '%evoli%'");
|
||||
|
||||
if(mysqli_num_rows($sql) == 0){
|
||||
echo $lang['srv_evoli_form_error_module'].'!';
|
||||
die();
|
||||
}
|
||||
|
||||
$row = mysqli_fetch_assoc($sql);
|
||||
|
||||
if($row['modul'] == 'evoli_quality_climate'){
|
||||
$script_name = 'quality_climate_form.php';
|
||||
}
|
||||
elseif($row['modul'] == 'teamship_meter'){
|
||||
$script_name = 'evoli_teamship_meter_form.php';
|
||||
}
|
||||
elseif($row['modul'] == 'evoli_organizational_employeeship_meter'){
|
||||
$script_name = 'organizational_employeeship_meter_form.php';
|
||||
}
|
||||
else{
|
||||
$script_name = 'team_meter_form.php';
|
||||
}
|
||||
|
||||
|
||||
// Redirect na ustrezno skripto
|
||||
header("Location: ".$site_url."/admin/survey/modules/mod_EVOLI/forms/".$script_name.'?'.$_SERVER['QUERY_STRING']);
|
||||
|
||||
echo '</a></div>';
|
||||
|
||||
|
||||
// Srednji del
|
||||
echo '<div id="tm_body">';
|
||||
echo ' <div id="tm_holder">';
|
||||
|
||||
|
||||
// Submit obrazca
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
$evoli->submitForm();
|
||||
}
|
||||
// Izris obrazca
|
||||
else{
|
||||
if($evoli->getAnkId() > 0 && $evoli->getEmail() != ''){
|
||||
// Preverimo ce ima user dostop do obrazca (parameter pass v get-u)
|
||||
if($evoli->checkAccess())
|
||||
$evoli->displayForm();
|
||||
else
|
||||
$evoli->displayErrorAccess();
|
||||
}
|
||||
else{
|
||||
$evoli->displayError();
|
||||
}
|
||||
}
|
||||
|
||||
echo ' </div>';
|
||||
echo '</div>';
|
||||
|
||||
// Footer
|
||||
echo '<div id="tm_footer">';
|
||||
$evoli->displayFooter();
|
||||
echo '</div>';
|
||||
|
||||
echo '</body>';
|
||||
|
||||
|
||||
echo '</html>';
|
||||
|
||||
?>
|
||||
|
@ -7958,7 +7958,7 @@ $lang = array (
|
||||
'srv_evoli_form_footer' => "Kontaktirajte pomoč na naslovu <a href=\"mailto:info@evoli.si\">info@evoli.si</a>",
|
||||
'srv_evoli_form_error' => "Napaka! Manjka email naslov ali id ankete",
|
||||
'srv_evoli_form_error_access' => "Napaka! Nimate dostopa do vnosne forme",
|
||||
'srv_evoli_form_error_module' => "Napaka! Anekta nima vklopljenega ustreznega modula",
|
||||
'srv_evoli_form_error_module' => "Napaka! Anketa nima vklopljenega ustreznega modula",
|
||||
'srv_evoli_form_help1' => "Vpišite ime podjetja, ki bo viden na poročilu Energy Meter.",
|
||||
'srv_evoli_form_help2' => "Vnesite imena timov ali oddelkov, katerim pripadajo zaposleni.<br />Dodajte ali izbrišite time s pomočjo gumbov + ali –.",
|
||||
'srv_evoli_form_help3' => "Vpišite začetni in končni datum izpolnjevanja ankete.",
|
||||
|
Loading…
x
Reference in New Issue
Block a user