diff --git a/admin/survey/SurveyAdminSettings.php b/admin/survey/SurveyAdminSettings.php index 3511c22fd..51a2e1caa 100644 --- a/admin/survey/SurveyAdminSettings.php +++ b/admin/survey/SurveyAdminSettings.php @@ -6956,6 +6956,7 @@ class SurveyAdminSettings { $survey_comment = SurveySetting::getInstance()->getSurveyMiscSetting('survey_comment'); $survey_comment_resp = SurveySetting::getInstance()->getSurveyMiscSetting('survey_comment_resp'); $comment_count = $this->testiranje_komentarji_count(); + $commentmarks_who = SurveySetting::getInstance()->getSurveyMiscSetting('commentmarks_who'); $rowa = SurveyInfo::getInstance()->getSurveyRow(); @@ -6970,16 +6971,6 @@ class SurveyAdminSettings { echo $this->string_format((int)($comment_count['survey_resp']['all']+$comment_count['survey_admin']['all']), 'srv_cnt_komentarji_survey_od'); echo ''; - - /* - ZAČASNO ZAKOMENTIRAN TOOLTIP (prekriva vsebino za redizajn) @TG - echo ' '; - echo ' ('.SurveyInfo::getSurveyLink().'&preview=on&testdata=on'.$preview_options.') '; - echo ''; - echo '' . $lang['srv_survey_testdata2'] . ': '.$lang['srv_testdata_text'].''; - echo '

'.$lang['srv_preview_testdata_longtext'].'

'; - echo ''; - echo '
'; // expanded-tooltip bottom - echo '
'; // tooltip */ echo '
'; echo ' '.$lang['srv_survey_testdata'].''; @@ -6998,7 +6989,8 @@ class SurveyAdminSettings { echo ''; echo '
'; - } else { + } + else { echo $lang['move_show'].': '; } - //echo ' '.Help::display('srv_comments_only_unresolved'); $only_unresolved = " "; switch($_GET['only_unresolved']){ @@ -7046,11 +7037,6 @@ class SurveyAdminSettings { while ($row = mysqli_fetch_array($sql)) { if (($i != 0 && $sortpostorder==0) || ($i < $rows && $sortpostorder==1)) { - /*if ($row['ocena'] == 0) echo ''; - elseif ($row['ocena'] == 1) echo ''; - elseif ($row['ocena'] == 2) echo ''; - elseif ($row['ocena'] == 3) echo ''; - else echo '';*/ echo '
'; @@ -7070,33 +7056,37 @@ class SurveyAdminSettings { echo '
'; - echo '
'; - if ($commentmarks == 1) { - echo ' '; - } else { - /*// Checkbox za "Koncano" - echo '= 2?' checked':'').' />'; - echo ''; */ - - if ($row['ocena']==0) { - echo '

'; - echo $lang['srv_comments_archive'].'

'; - } - else { - echo '

'.$lang['srv_comments_archived'].'

'; - echo '

'; - echo $lang['srv_comments_unarchive'].'

'; - } - } - echo '
'; + if ($admin_type <= 1 || $rowa['insert_uid']==$global_user_id || $commentmarks_who==0) { + + echo '
'; + + if ($commentmarks == 1) { + echo ' '; + } + else { + + if ($row['ocena']==0) { + echo '

'; + echo $lang['srv_comments_archive'].'

'; + } + else { + echo '

'.$lang['srv_comments_archived'].'

'; + echo '

'; + echo $lang['srv_comments_unarchive'].'

'; + } + } + + echo '
'; + } echo ''; } + $i++; } } @@ -7139,12 +7129,6 @@ class SurveyAdminSettings { while ($row = mysqli_fetch_array($sql)) { echo '
'; - - /*if ($row['ocena'] == 0) echo ''; - elseif ($row['ocena'] == 1) echo ''; - elseif ($row['ocena'] == 2) echo ''; - elseif ($row['ocena'] == 3) echo ''; - else echo '';*/ $datetime = strtotime($row['comment_time']); $datetime = date("d.m.Y G:i", $datetime); @@ -7174,30 +7158,33 @@ class SurveyAdminSettings { echo '
'; - echo '
'; - if ($commentmarks == 1) { - echo ' '; - } else { - /*// Checkbox za "Koncano" - echo '= 2?' checked':'').' />'; - echo ''; */ - - if ($row['ocena']==0) { - echo '

'; - echo $lang['srv_comments_archive'].'

'; - } - else { - echo '

'.$lang['srv_comments_archived'].'

'; - echo '

'; - echo $lang['srv_comments_unarchive'].'

'; - } - } - echo '
'; + if ($admin_type <= 1 || $rowa['insert_uid']==$global_user_id || $commentmarks_who==0) { + + echo '
'; + + if ($commentmarks == 1) { + echo ' '; + } + else { + + if ($row['ocena']==0) { + echo '

'; + echo $lang['srv_comments_archive'].'

'; + } + else { + echo '

'.$lang['srv_comments_archived'].'

'; + echo '

'; + echo $lang['srv_comments_unarchive'].'

'; + } + } + + echo '
'; + } echo ''; @@ -7719,7 +7706,7 @@ class SurveyAdminSettings { $sql1 = sisplet_query("SELECT tip, thread, note FROM srv_spremenljivka WHERE id = '$spr_id'"); $row1 = mysqli_fetch_array($sql1); - $orderby = $sortpostorder == 1 ? 'DESC' : 'ASC' ; + $orderby = $sortpostorder == 1 ? 'DESC' : 'ASC'; $tid = $row1['thread']; $only_unresolved = " "; @@ -7744,9 +7731,11 @@ class SurveyAdminSettings { if ($admin_type <= $question_comment_viewadminonly) { // vidi vse komentarje $sqlt = sisplet_query("SELECT * FROM post WHERE vsebina NOT LIKE '%{$tema_vsebuje}%' AND tid='$tid' $only_unresolved ORDER BY time $orderby, id $orderby"); - } elseif ($question_comment_viewauthor==1) { // vidi samo svoje komentarje + } + elseif ($question_comment_viewauthor==1) { // vidi samo svoje komentarje $sqlt = sisplet_query("SELECT * FROM post WHERE vsebina NOT LIKE '%{$tema_vsebuje}%' AND tid='$tid' $only_unresolved AND uid='$global_user_id' ORDER BY time $orderby, id $orderby"); - } else { // ne vidi nobenih komentarjev + } + else { // ne vidi nobenih komentarjev $sqlt = sisplet_query("SELECT * FROM post WHERE 1=0"); } @@ -7796,19 +7785,6 @@ class SurveyAdminSettings { $i = 0; while ($rowt = mysqli_fetch_array($sqlt)) { - /* if ($_GET['only_unresolved'] == 1) { - if ($rowt['ocena'] == 0) echo ''; - elseif ($rowt['ocena'] == 1) echo ''; - elseif ($rowt['ocena'] == 2) echo ''; - elseif ($rowt['ocena'] == 3) echo ''; - else echo ''; - } else { - if ($rowt['ocena'] == 0) echo ''; - elseif ($rowt['ocena'] == 1) echo ''; - elseif ($rowt['ocena'] == 2) echo ''; - elseif ($rowt['ocena'] == 3) echo ''; - else echo ''; - }*/ echo '
'; @@ -7894,25 +7870,17 @@ class SurveyAdminSettings { if ($admin_type <= $question_resp_comment_viewadminonly) { echo '
'; - echo $lang['srv_repondent_comment'].':'; - echo '
'; if ($_GET['only_unresolved'] == 1) $only_unresolved = " AND d.text2 <= 1 "; else $only_unresolved = " "; - $sqlt = sisplet_query("SELECT * FROM srv_data_text".$this->db_table." WHERE spr_id='0' AND vre_id='$spr_id' $only_unresolved2 ORDER BY id ASC"); + $sqlt = sisplet_query("SELECT * FROM srv_data_text".$this->db_table." WHERE spr_id='0' AND vre_id='$spr_id' $only_unresolved2 ORDER BY id $orderby"); if (!$sqlt) echo mysqli_error($GLOBALS['connect_db']); while ($rowt = mysqli_fetch_array($sqlt)) { echo '
'; - /*if ($rowt['text2'] == 0) echo ''; - elseif ($rowt['text2'] == 1) echo ''; - elseif ($rowt['text2'] == 2) echo ''; - elseif ($rowt['text2'] == 3) echo ''; - else echo ''; */ - // Ce smo slucajno pobrisali testne vnose, nimamo casa vnosa komentarja $sqlTime = sisplet_query("SELECT time_edit FROM srv_user WHERE id='".$rowt['usr_id']."'"); if(mysqli_num_rows($sqlTime) > 0){ @@ -7958,7 +7926,9 @@ class SurveyAdminSettings { } if ($admin_type <= 1 || $rowi['insert_uid']==$global_user_id || $commentmarks_who==0) { + echo '
'; + if ($commentmarks == 1) { echo '