diff options
Diffstat (limited to '')
-rw-r--r-- | admin/survey/classes/class.Prevajanje.php | 374 |
1 files changed, 230 insertions, 144 deletions
diff --git a/admin/survey/classes/class.Prevajanje.php b/admin/survey/classes/class.Prevajanje.php index 7b0ac67..6c1e8ab 100644 --- a/admin/survey/classes/class.Prevajanje.php +++ b/admin/survey/classes/class.Prevajanje.php @@ -47,8 +47,7 @@ class Prevajanje { SurveySetting::getInstance()->Init($this->anketa);
- if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
- $this->db_table = '_active';
+ $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
$row = SurveyInfo::getInstance()->getSurveyRow();
@@ -114,8 +113,12 @@ class Prevajanje { // default je pač prvi jezik v seznamu...
if ($this->lang_id==0) {
$lang_array = $this->get_all_translation_langs();
+
if (count($lang_array) > 0) {
- list($this->lang_id) = each($lang_array);
+
+ //list($this->lang_id) = each($lang_array);
+ reset($lang_array);
+ $this->lang_id = key($lang_array);
// redirectamo, da je nastavljen tudi v urlju
header("Location: index.php?anketa=".$this->anketa."&a=prevajanje&lang_id=".$this->lang_id);
@@ -132,22 +135,27 @@ class Prevajanje { }
+ echo '<div class="prevajanje_holder">';
+
+
+ // Segment z zgornjimi nastavitvami
+ echo '<div class="section jezik_top_settings">';
$this->top_settings();
+ echo '</div>';
+
$sql = sisplet_query("SELECT * FROM srv_language WHERE ank_id = '$this->anketa'");
- if (mysqli_num_rows($sql) == 0) {
-
+ if (mysqli_num_rows($sql) == 0) {
//$this->dodaj_jezik(1);
-
- } else {
+ }
+ elseif ($rowa['multilang'] == 1) {
- if ($rowa['multilang'] == 1) {
-
- $this->urejanje();
-
- ?><script> var srv_meta_lang_id = <?=$this->lang_id?>; </script><?
- }
+ $this->urejanje();
+
+ ?><script> var srv_meta_lang_id = <?=$this->lang_id?>; </script><?
}
+
+ echo '</div>';
}
/**
@@ -167,6 +175,7 @@ class Prevajanje { $lang_admin = $row['lang_admin'];
$lang_resp = $row['lang_resp'];
$lang_array = array();
+
// Preberemo razpoložljive jezikovne datoteke
if ($dir = opendir($site_path . 'lang')) {
while (($file = readdir($dir)) !== false) {
@@ -190,11 +199,10 @@ class Prevajanje { }
- /**
- * Leva stran nastavitev
- */
-
- echo '<fieldset class="wide prevajanje" style="position:relative">';
+ echo '<div class="jezik_row">';
+
+ // Leva stran nastavitev
+ echo '<fieldset class="jezik_left settings">';
if ($this->user_dostop_edit == 1) {
@@ -208,42 +216,61 @@ class Prevajanje { asort($lang_array);
-
- echo '<p><span class="nastavitveSpan1">'.$lang['srv_language_respons_1'].': </span><select name="lang_resp" onchange="document.settingsanketa_' . $row['id'] . '.submit(); return false;">';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_language_respons_1'].':</span>';
+ echo '<select class="dropdown large" name="lang_resp" onchange="document.settingsanketa_' . $row['id'] . '.submit(); return false;">';
foreach ($lang_array AS $key => $val) {
echo '<option value="'.$key.'" '.($key==$lang_resp?' selected':'').'>'.$val.'</option>';
}
- echo '</select> <a href="index.php?anketa='.$this->anketa.'&a=jezik">'.$lang['srv_extra_translations'].'</a></p>' . "\n\r";
+ echo '</select>';
+ echo '</div>';
$resp_change_lang = SurveySetting::getInstance()->getSurveyMiscSetting('resp_change_lang');
+ $resp_change_lang = ($resp_change_lang == '') ? 0 : $resp_change_lang;
if ($this->lang_id != 0) {
-
- echo '<p><span class="nastavitveSpan1"><label for="">'.$lang['srv_resp_change_lang'].':</label> </span>
- <label for="resp_change_lang_0"><input type="radio" name="resp_change_lang" id="resp_change_lang_0" value="0" '.($resp_change_lang==0?' checked':'').' onchange="document.settingsanketa_' . $row['id'] . '.submit(); return false;" />'.$lang['no'].'</label>
- <label for="resp_change_lang_1"><input type="radio" name="resp_change_lang" id="resp_change_lang_1" value="1" '.($resp_change_lang==1?' checked':'').' onchange="document.settingsanketa_' . $row['id'] . '.submit(); return false;" />'.$lang['yes'].'</label></p>';
-
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_resp_change_lang'].':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="resp_change_lang" id="resp_change_lang_0" value="0" '.($resp_change_lang==0?' checked':'').' onchange="document.settingsanketa_' . $row['id'] . '.submit(); return false;" />';
+ echo '<label for="resp_change_lang_0">'.$lang['no'].'</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="resp_change_lang" id="resp_change_lang_1" value="1" '.($resp_change_lang==1?' checked':'').' onchange="document.settingsanketa_' . $row['id'] . '.submit(); return false;" />';
+ echo '<label for="resp_change_lang_1">'.$lang['yes'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
+
if($resp_change_lang==1){
- $resp_change_lang_type = SurveySetting::getInstance()->getSurveyMiscSetting('resp_change_lang_type');
-
- echo '<p>';
+ $resp_change_lang_type = SurveySetting::getInstance()->getSurveyMiscSetting('resp_change_lang_type');
+ $resp_change_lang_type = ($resp_change_lang_type == '') ? 0 : $resp_change_lang_type;
- echo '<span class="nastavitveSpan1"><label for="">'.$lang['srv_resp_change_lang_type'].':</label> </span>
- <label for="resp_change_lang_type_0"><input type="radio" name="resp_change_lang_type" id="resp_change_lang_type_0" value="0" '.($resp_change_lang_type==0?' checked':'').' onchange="document.settingsanketa_' . $row['id'] . '.submit(); return false;" />'.$lang['srv_resp_change_lang_type_0'].'</label>
- <label for="resp_change_lang_type_1"><input type="radio" name="resp_change_lang_type" id="resp_change_lang_type_1" value="1" '.($resp_change_lang_type==1?' checked':'').' onchange="document.settingsanketa_' . $row['id'] . '.submit(); return false;" />'.$lang['srv_resp_change_lang_type_1'].'</label>';
-
- echo '</p>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_resp_change_lang_type'].':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="resp_change_lang_type" id="resp_change_lang_type_0" value="0" '.($resp_change_lang_type==0?' checked':'').' onchange="document.settingsanketa_' . $row['id'] . '.submit(); return false;" />';
+ echo '<label for="resp_change_lang_type_0">'.$lang['srv_resp_change_lang_type_0'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="resp_change_lang_type" id="resp_change_lang_type_1" value="1" '.($resp_change_lang_type==1?' checked':'').' onchange="document.settingsanketa_' . $row['id'] . '.submit(); return false;" />';
+ echo '<label for="resp_change_lang_type_1">'.$lang['srv_resp_change_lang_type_1'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
}
- }
+ }
else {
- echo '<a href="index.php?anketa='.$this->anketa.'" style="position:absolute; top:0px; right:10px">'.$lang['srv_back_edit'].'</a>';
+ //echo '<a href="index.php?anketa='.$this->anketa.'" style="position:absolute; top:0px; right:10px">'.$lang['srv_back_edit'].'</a>';
}
+
+ //Standardne besede
+ echo '<p class="top16">'.$lang['srv_language_std_bes1'].'<a href="index.php?anketa='.$this->anketa.'&a=jezik">'.$lang['srv_language_std_bes2'].'</a>.</p>';
- // Jezik administrativnega vmesnika
- echo '<div style="position:absolute; right:20px; bottom:10px;"><span class="bold">';
- //printf ($lang['srv_language_admin_survey2'], 'index.php?anketa='.$this->anketa.'&a=nastavitve');
- echo '<a href="index.php?anketa='.$this->anketa.'&a=nastavitve">'.$lang['srv_language_admin_survey'].'</a>';
- echo '</span></div>';
echo '</form>';
}
@@ -251,36 +278,48 @@ class Prevajanje { echo '</fieldset>';
- /**
- * Desna stran
- */
- echo '<fieldset class="wide prevajanje" style="position:relative; float:right;"><legend>'.$lang['srv_multilang'].'</legend>';
+ // Desna stran
+ echo '<fieldset class="jezik_right"><legend>'.$lang['srv_multilang'].'</legend>';
if ($this->lang_id != 0) {
$lang_array = $this->get_all_translation_langs();
foreach ($lang_array AS $key => $l) {
+
+ $bold = '';
+ $display = 'displayNone';
+ $active_urejanje = '';
+
+ if ($this->lang_id == $key) {
+ $bold = 'semi-bold';
+ $display = '';
+ $active_urejanje = '<div class="active_urejanje">'.$lang['edit2'].'</div>';
+ }
+
echo '<p>';
-
- echo '<a href="index.php?anketa='.$this->anketa.'&a=prevajanje&lang_id='.$key.'" style="font-size: 1.2em; display:inline-block; min-width: 150px; '.($this->lang_id==$key?' font-weight:bold':'').'">'.$l.'</a> ';
-
- echo '<span class="prevajanje_settings '.($key!=$this->lang_id?'transparent':'').'">';
-
- echo '<a href="'.SurveyInfo::getSurveyLink().'?language='.$key.'&preview=on" target="_blank" title="'.$lang['srv_poglejanketo'].': '.$lang['srv_preview_text'].'"><span class="faicon preview large"></span> '.$lang['srv_poglejanketo2'].'</a> - ';
- echo '<a href="'.SurveyInfo::getSurveyLink().'?language='.$key.'&preview=on&testdata=on" target="_blank" title="'.$lang['srv_survey_testdata2'].': '.$lang['srv_testdata_text'].'"><span class="faicon edit_square large"></span> '.$lang['srv_test'].'</a> - ';
- echo '<a href="'.SurveyInfo::getSurveyLink().'?language='.$key.'" target="_blank" title="'.$lang['url'].': '.SurveyInfo::getSurveyLink().'?language='.$key.'"><span class="faicon data_link_small large"></span> '.$lang['url'].'</a> - ';
- // Pdf in rtf izvoz vprasalnika v tujem jeziku
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?a=vprasalnik_pdf&anketa='.$this->anketa.'&type=1&language='.$key).'" target="_blank" title="'.$lang['PDF_Izpis'].'"><span class="faicon pdf large"></span> '.$lang['srv_export_hover_pdf'].'</a> - ';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?a=vprasalnik_rtf&anketa='.$this->anketa.'&type=1&language='.$key).'" target="_blank" title="'.$lang['RTF_Izpis'].'"><span class="faicon rtf large"></span> '.$lang['srv_export_hover_rtf'].'</a>';
-
+ echo '<div class="lang_name '.$bold.'">';
+ echo '<a href="index.php?anketa='.$this->anketa.'&a=prevajanje&lang_id='.$key.'">'.$l.'</a> ';
+ echo $active_urejanje;
+ echo '</div>';
+
+ echo '<div class="lang_content '.$display.'">';
+
+ echo '<div class="lang_column">';
+ echo '<div class="lang_item">';
+ echo '<a href="'.SurveyInfo::getSurveyLink().'?language='.$key.'" target="_blank" title="'.$lang['url'].': '.SurveyInfo::getSurveyLink().'?language='.$key.'"><span class="faicon data_link"></span>'.$lang['srv_multilang_link'].'</a>';
+ echo '</div>';
+ echo '<div class="lang_item">';
+ echo '<a href="'.SurveyInfo::getSurveyLink().'?language='.$key.'&preview=on" target="_blank" title="'.$lang['srv_poglejanketo'].': '.$lang['srv_preview_text'].'"><span class="faicon monitor"></span> '.$lang['srv_poglejanketo2'].'</a>';
+ echo '</div>';
+ echo '<div class="lang_item">';
+ echo '<a href="'.SurveyInfo::getSurveyLink().'?language='.$key.'&preview=on&testdata=on" target="_blank" title="'.$lang['srv_survey_testdata2'].': '.$lang['srv_testdata_text'].'"><span class="faicon edit_square"></span> '.$lang['srv_survey_testdata'].'</a>';
+ echo '</div>';
+ echo '</div>';
+
$d = new Dostop();
if ($d->checkDostopSub('edit')) {
-
- echo '<span class="prevajanje_settings_sub">';
-
- echo '<a href="index.php?anketa='.$this->anketa.'&a=jezik&lang_id='.$key.'"><span class="faicon compress"></span> '.$lang['srv_extra_translations'].'</a>';
-
+
$title = '';
$sqlu = sisplet_query("SELECT uid FROM srv_dostop_language WHERE ank_id='$this->anketa' AND lang_id='$key'");
while ($rowu = mysqli_fetch_array($sqlu)) {
@@ -289,18 +328,33 @@ class Prevajanje { if ($title != '') $title .= ', ';
$title .= $row1['name'].' '.$row1['surname'].' ('.$row1['email'].')';
}
-
- echo ' - <a href="index.php?anketa='.$this->anketa.'&a=dostop" title="'.$lang['srv_passive_multilang_1'].': '.$title.'"><span class="faicon users_small"></span> '.$lang['srv_users'].'</a>';
-
- if ($this->user_dostop_edit == 1)
- echo ' - <a href="ajax.php?anketa='.$this->anketa.'&t=prevajanje&a=brisi_jezik&lang_id='.$key.'" onclick="if (!confirm(\''.$lang['srv_lang_rem_confirm'].'\')) return false"><span class="faicon delete_circle icon-orange"></span> '.$lang['srv_lang_rem'].'</a></span>';
-
- echo '</span>';
+
+ echo '<div class="lang_column">';
+ echo '<div class="lang_item">';
+ echo '<a href="index.php?anketa='.$this->anketa.'&a=jezik&lang_id='.$key.'"><span class="faicon paragraph"></span> '.$lang['srv_extra_translations'].'</a>';
+ echo '</div>';
+ echo '<div class="lang_item">';
+ echo '<a href="index.php?anketa='.$this->anketa.'&a=dostop" title="'.$lang['srv_passive_multilang_1'].': '.$title.'"><span class="faicon users"></span> '.$lang['srv_multilang_users'].'</a>';
+ echo '</div>';
+ echo '</div>';
}
-
- echo '</span>';
-
- echo '</p>';
+
+ echo '<div class="lang_column">';
+ echo '<div class="lang_item">';
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?a=vprasalnik_pdf&anketa='.$this->anketa.'&type=1&language='.$key).'" target="_blank" title="'.$lang['PDF_Izpis'].'"><span class="faicon pdf"></span> '.$lang['srv_lang_pdf'].'</a>';
+ echo '</div>';
+ echo '<div class="lang_item">';
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?a=vprasalnik_rtf&anketa='.$this->anketa.'&type=1&language='.$key).'" target="_blank" title="'.$lang['RTF_Izpis'].'"><span class="faicon rtf"></span> '.$lang['srv_lang_rtf'].'</a>';
+ echo '</div>';
+ if ($this->user_dostop_edit == 1) {
+ echo '<div class="lang_item">';
+ echo '<a href="ajax.php?anketa='.$this->anketa.'&t=prevajanje&a=brisi_jezik&lang_id='.$key.'" onclick="if (!confirm(\''.$lang['srv_lang_rem_confirm'].'\')) return false"><span class="faicon trash empty"></span> '.$lang['srv_lang_rem'].'</a></span>';
+ echo '</div>';
+ }
+ echo '</div>';
+
+ echo '</div>';
+
}
}
@@ -308,9 +362,8 @@ class Prevajanje { $this->dodaj_jezik();
echo '</fieldset>';
-
-
- echo '<div class="clr"></div><p></p>';
+
+ echo '</div>';
}
/**
@@ -331,19 +384,28 @@ class Prevajanje { asort($lang_array);
- //echo '<form action="ajax.php?anketa='.$this->anketa.'&t=prevajanje&a=dodaj_jezik" method="post" name="dodaj_jezik" style="position:absolute; right:10px; top:0">';
echo '<form action="ajax.php?anketa='.$this->anketa.'&t=prevajanje&a=dodaj_jezik" method="post" name="dodaj_jezik" >';
- echo '<p><span class="bold">'.$lang['srv_prevajanje_dodaj'].': </span> ';
- echo '<select name="lang_id">';
+
+ echo '<div class="dodaj_prevod">';
+ echo '<div class="button_holder">';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_prevajanje_dodaj'].':</span>';
+
+ echo '<select class="dropdown large" name="lang_id">';
echo '<option value="0"></option>';
foreach ($lang_array AS $key => $l) {
echo '<option value="'.$key.'">'.$l.'</option>';
}
echo '</select> ';
- echo '<input type="submit" value="'.$lang['srv_add_new_language'].'" />';
+ echo '</div>';
+
+ echo '<button class="medium blue" type="submit">'.$lang['srv_add_new_language'].'</button>';
+ echo '</div>'; //button_holder
- echo '</p>';
+ echo '</div>'; //dodaj_prevod
+
echo '</form>';
}
@@ -366,49 +428,49 @@ class Prevajanje { function urejanje () {
global $lang;
global $lang1;
-
- /*echo '<div style="float:right">';
- $this->dodaj_jezik();
- echo '</div>';*/
-
- echo '<fieldset style="margin-top:40px; min-width:1100px;" class="locked">';
-
- /**
- * Leva stran
- */
- echo '<div class="jezik_left noborder" style="opacity:1; margin-bottom:30px;">';
- echo '<span class="red" style="font-weight:bold; font-size:1.2em;">'.$lang['srv_base_lang'].': <span style="font-size:1em">'.$lang1['language'];
+
+
+ // Segment z zgornjimi nastavitvami
+ echo '<div class="section jezik_additional_settings">';
+
+ echo '<div class="jezik_row">';
+
+ // Leva stran
+ echo '<div class="jezik_left">';
+ echo '<span class="title">'.$lang['srv_base_lang'].': <span class="title semi-bold">'.$lang1['language'];
echo '</span></span>';
$d = new Dostop();
if ($d->checkDostopSub('edit'))
- echo ' - '.$lang['srv_edit_in_edit'].' <a href="index.php?anketa='.$this->anketa.'">'.$lang['srv_urejanje'].'</a>';
+ echo ' - '.$lang['srv_edit_in_edit'].' <a href="index.php?anketa='.$this->anketa.'" style="pointer-events:auto;">'.$lang['srv_social_settings_text6'].'</a>';
echo '</div>';
- /**
- * Desna stran
- */
- echo '<div class="jezik_right noborder">';
-
- echo '<span class="red" style="font-weight:bold; font-size:1.2em;">'.$lang['srv_trans_lang'].': ';
+ // Desna stran
+ echo '<div class="jezik_right">';
+ echo ' <span class="title">'.$lang['srv_trans_lang'].': ';
$lang_array = $this->get_all_translation_langs();
- echo '<span style="font-size:1em">'.$lang_array[$this->lang_id].'</span>';
-
- echo '</span>';
+ echo ' <span class="title semi-bold">'.$lang_array[$this->lang_id].'</span>';
+ echo ' </span>';
echo '</div>';
-
-
+
+ echo '</div>';
+
+ echo '</div>';
+
+
// Prevajanje imena ankete
+ echo '<div class="section jezik_texti">';
$this->urejanje_texti();
-
+ echo '</div>';
+
+
// Prevajanje vprasanj
+ echo '<div class="section jezik_vprasanja">';
$this->urejanje_vprasanja();
+ echo '</div>';
- echo '</fieldset>';
-
- echo '<div class="clr"></div>';
-
+
?><script>
prevajanje_bind_click();
</script><?
@@ -421,15 +483,28 @@ class Prevajanje { function urejanje_texti () {
global $lang;
- echo '<div class="clr"></div>';
- echo '<div class="jezik_left noborder"><h2 class="jezik_page">'.$lang['srv_novaanketa_kratkoime'].'</h2></div>';
- echo '<div class="jezik_right noborder"><h2 class="jezik_page">'.$lang['srv_novaanketa_kratkoime'].'</h2></div>';
-
- echo '<strong>';
+ echo '<div class="jezik_row">';
+ echo ' <div class="jezik_left"><p class="caps semi-bold bottom16">'.$lang['srv_survey_info'].'</p></div>';
+ echo ' <div class="jezik_right"><p class="caps semi-bold bottom16">'.$lang['srv_survey_info'].'</p></div>';
+ echo '</div>';
+
+ echo '<div class="jezik_row">';
+ echo ' <div class="jezik_left semi-bold">'.$lang['srv_novaanketa_kratkoime'].':</div>';
+ echo ' <div class="jezik_right semi-bold">'.$lang['srv_novaanketa_kratkoime'].':</div>';
+ echo '</div>';
+
+ echo '<div class="jezik_row">';
$this->extra_translation('srv_novaanketa_kratkoime');
- echo '</strong>';
+ echo '</div>';
+
+ echo '<div class="jezik_row">';
+ echo ' <div class="jezik_left semi-bold top16">'.$lang['note'].' ('.$lang['srv_internal'].'):</div>';
+ echo ' <div class="jezik_right semi-bold top16">'.$lang['note'].' ('.$lang['srv_internal'].'):</div>';
+ echo '</div>';
+ echo '<div class="jezik_row">';
$this->extra_translation('srv_anketa_opomba');
+ echo '</div>';
}
/**
@@ -442,7 +517,7 @@ class Prevajanje { global $lang2;
$row = SurveyInfo::getInstance()->getSurveyRow();
-
+
if ($text == 'srv_novaanketa_kratkoime') { // akronim pri default jeziku je pac v srv_anketa
$value = (($row['akronim'] == null || $row['akronim'] == '') ? $row['naslov'] : $row['akronim'] );
} elseif ($text == 'srv_question_comment_text') { // "Vaš komentar k vprašanju" ni v lang, ampak je v settingsih
@@ -454,8 +529,8 @@ class Prevajanje { if ($value == '') $value = $lang1[$text];
}
- echo '<div class="jezik_left">';
- echo '<p style="margin-left:10px">'.$value.'</p>';
+ echo '<div class="jezik_left vert_middle">';
+ echo '<span>'.$value.'</span>';
echo '</div>';
echo '<div class="jezik_right srvlang" id="srvlang_'.$text.'">';
@@ -473,15 +548,11 @@ class Prevajanje { $value1 = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_'.$text.'_'.$this->lang_id);
if ($value1 == '' && $text != 'srv_anketa_opomba') $value1 = $def;
+
+ //if ($text == 'srv_novaanketa_kratkoime')
+ // echo $lang['srv_naslov'].': ';
- echo '<span style="margin-left: 10px; margin:10px; display:block; width:120px; float:left;">';
- if ($text == 'srv_novaanketa_kratkoime')
- echo $lang['srv_naslov'].': ';
- if ($text == 'srv_anketa_opomba')
- echo $lang['note'].' ('.$lang['srv_internal'].'): ';
- echo '</span>';
-
- echo '<p style="margin-left:10px; min-height:15px; min-width:200px; float:left; outline:1px dashed gray; cursor: text" class="editable" id="srvlang_'.$text.'_'.$this->lang_id.'" contenteditable="true" onblur="extra_translation_save(\''.$text.'\');">'.$value1.'</p>';
+ echo '<p class="editable" id="srvlang_'.$text.'_'.$this->lang_id.'" contenteditable="true" onblur="extra_translation_save(\''.$text.'\');">'.$value1.'</p>';
}
/**
@@ -492,34 +563,43 @@ class Prevajanje { global $lang;
Cache::cache_all_srv_spremenljivka($this->anketa);
+
+ // Naslov prve strani (ime strani)
+ echo '<div class="jezik_row page">';
+ echo ' <div class="jezik_left">'.$lang['srv_intro_label'].'</div>';
+ echo ' <div class="jezik_right">'.$lang['srv_intro_label'].'</div>';
+ echo '</div>';
- echo '<div class="clr"></div>';
- echo '<div class="jezik_left noborder"><h2 class=" jezik_page">'.$lang['srv_intro_label'].'</h2></div>';
- echo '<div class="jezik_right noborder"><h2 class=" jezik_page">'.$lang['srv_intro_label'].'</h2></div>';
-
- $this->urejanje_vprasanje(-1);
+ // Urejanje texta uvoda
+ $this->urejanje_vprasanje(-1, -1);
$gru_id = 0;
- $sql = sisplet_query("SELECT s.id, g.naslov, g.id AS gru_id, g.vrstni_red FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa' AND s.visible='1' ORDER BY g.vrstni_red ASC, s.vrstni_red ASC");
+ $sql = sisplet_query("SELECT s.id, s.tip, g.naslov, g.id AS gru_id, g.vrstni_red FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa' AND s.visible='1' ORDER BY g.vrstni_red ASC, s.vrstni_red ASC");
while ($row = mysqli_fetch_array($sql)) {
if ($gru_id != $row['gru_id']) {
- echo '<div class="clr"></div>';
- echo '<div class="jezik_left noborder"><h2 class=" jezik_page">'.$lang['srv_stran'].' '.$row['vrstni_red'].'</h2></div>';
- echo '<div class="jezik_right noborder"><h2 class=" jezik_page">'.$lang['srv_stran'].' '.$row['vrstni_red'].'</h2></div>';
-
+
+ // Naslov vmesne strani (ime strani)
+ echo '<div class="jezik_row page">';
+ echo ' <div class="jezik_left">'.$lang['srv_stran'].' '.$row['vrstni_red'].'</div>';
+ echo ' <div class="jezik_right">'.$lang['srv_stran'].' '.$row['vrstni_red'].'</div>';
+ echo '</div>';
+
$gru_id = $row['gru_id'];
}
- $this->urejanje_vprasanje($row['id']);
+ $this->urejanje_vprasanje($row['id'], $row['tip']);
}
- echo '<div class="clr"></div>';
- echo '<div class="jezik_left noborder"><h2 class=" jezik_page">'.$lang['srv_end_label'].'</h2></div>';
- echo '<div class="jezik_right noborder"><h2 class=" jezik_page">'.$lang['srv_end_label'].'</h2></div>';
+ // Naslov zadnje strani (ime strani)
+ echo '<div class="jezik_row page">';
+ echo ' <div class="jezik_left">'.$lang['srv_end_label'].'</div>';
+ echo ' <div class="jezik_right">'.$lang['srv_end_label'].'</div>';
+ echo '</div>';
- $this->urejanje_vprasanje(-2);
+ // Urejanje texta uvoda
+ $this->urejanje_vprasanje(-2, -2);
}
/**
@@ -527,7 +607,7 @@ class Prevajanje { *
* @param mixed $spremenljivka
*/
- function urejanje_vprasanje ($spremenljivka) {
+ function urejanje_vprasanje ($spremenljivka, $tip) {
global $lang;
global $lang1;
global $lang2;
@@ -551,6 +631,9 @@ class Prevajanje { }
+ echo '<div class="jezik_row question tip_'.$tip.'">';
+
+
// LEVA STRAN PREVAJANJA
echo '<div class="jezik_left">';
@@ -568,7 +651,7 @@ class Prevajanje { echo '</div>';
-
+
// DESNA STRAN PREVAJANJA
echo '<div class="jezik_right vprlang" id="vprlang_'.$spremenljivka.'">';
@@ -585,6 +668,9 @@ class Prevajanje { $this->Branching->vprasanje($spremenljivka, true); //poklici izris vprasanja za prevajanje (za enkrat je drugi argument pomemben le za slider)
echo '</div>';
+
+
+ echo '</div>';
// Nastavimo nazaj originalen jezik vmesnika
|