diff options
Diffstat (limited to 'admin/survey/classes/class.SurveyStatusCasi.php')
-rw-r--r-- | admin/survey/classes/class.SurveyStatusCasi.php | 57 |
1 files changed, 39 insertions, 18 deletions
diff --git a/admin/survey/classes/class.SurveyStatusCasi.php b/admin/survey/classes/class.SurveyStatusCasi.php index 27cc59b..851c306 100644 --- a/admin/survey/classes/class.SurveyStatusCasi.php +++ b/admin/survey/classes/class.SurveyStatusCasi.php @@ -27,13 +27,40 @@ class SurveyStatusCasi }
static function RefreshData() {
- # preberemo podatke vseh porfilov ki so na voljo in jih dodamo v array
- $stringSelect = "SELECT * FROM srv_status_casi WHERE uid = '".self::getGlobalUserId()."' OR (uid = '0' AND `system` =1) ORDER BY id";
- $querySelect = sisplet_query($stringSelect);
+ global $lang;
+
+ // Profila za status - prej smo imeli to v bazi ampak ni potrebe, ker sta itak samo 2 in ne pustimo vec custom profilov
+ self::$profiles['1'] = array(
+ 'id' => '1',
+ 'uid' => '0',
+ 'name' => $lang['srv_userstatus_6'],
+ 'system' => '1',
+ 'statusnull' => '0',
+ 'status0' => '0',
+ 'status1' => '0',
+ 'status2' => '0',
+ 'status3' => '0',
+ 'status4' => '0',
+ 'status5' => '0',
+ 'status6' => '1',
+ 'statuslurker' => '0'
+ );
+ self::$profiles['2'] = array(
+ 'id' => '2',
+ 'uid' => '0',
+ 'name' => $lang['srv_userstatus_total'],
+ 'system' => '1',
+ 'statusnull' => '1',
+ 'status0' => '1',
+ 'status1' => '1',
+ 'status2' => '1',
+ 'status3' => '1',
+ 'status4' => '1',
+ 'status5' => '1',
+ 'status6' => '1',
+ 'statuslurker' => '1'
+ );
- while ( $rowSelect = mysqli_fetch_assoc($querySelect) ) {
- self::$profiles[$rowSelect['id']] = $rowSelect;
- }
# poiscemo privzet profil
self::$currentProfileId = SurveyUserSetting :: getInstance()->getSettings('default_status_casi');
if (!self::$currentProfileId || self::$currentProfileId == 1)
@@ -54,8 +81,10 @@ class SurveyStatusCasi return true;
}
}
+
static function DisplayProfile( $pid = null) {
global $lang;
+
if ($pid == null ) {
$pid = self::$currentProfileId;
}
@@ -90,29 +119,21 @@ class SurveyStatusCasi echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="statusCasiAction(\'newSave\'); return false;"><span>'.$lang['srv_save_profile'].'</span></a></span></span>'."\n";
echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="showHideNewMissingProfile(\'false\'); return false;"><span>'.$lang['srv_close_profile'].'</span></a></span></span>'."\n";
echo '</div>'."\n";
-/*
- // div za preimenovanje
- echo '<div id="renameProfileDiv">'.$lang['srv_missing_profile_name'].': '."\n";
- echo '<input id="renameProfileName" name="renameProfileName" type="text" value="' . self::$profiles[$pid]['name'] . '" size="45" />'."\n";
- echo '<input id="renameProfileId" type="hidden" value="' . $pid . '" />'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="(\'deleteCancle\'); return false;"><span>'.$lang['srv_close_profile'].'</span></a></span></span>'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="(); return false;"><span>'.$lang['srv_rename_profile_yes'].'</span></a></span></span>'."\n";
- echo '</div>'."\n";
-*/
+
// div za brisanje
echo '<div id="deleteProfileDiv">'.$lang['srv_missing_profile_delete_confirm'].': <b>' . self::$profiles[$pid]['name'] . '</b>?'."\n";
echo '<input id="deleteProfileId" type="hidden" value="' . $pid . '" />'."\n";
echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="statusCasiAction(\'deleteCancle\'); return false;"><span>'.$lang['srv_close_profile'].'</span></a></span></span>'."\n";
echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="statusCasiAction(\'deleteConfirm\'); return false;"><span>'.$lang['srv_delete_profile_yes'].'</span></a></span></span>'."\n";
echo '</div>'."\n";
-
}
static function DisplayProfileData($pid) {
global $lang;
+
$curentProfileData = self :: $profiles[$pid];
-// echo '<div id="status_profile_notes" >help?'.'</div>';
- echo '<div id="statusProfileFieldsetHolder" >';
+
+ echo '<div id="statusProfileFieldsetHolder" >';
echo '<fieldset id="missingProfileFieldset">'."\n";
echo '<legend>' . $lang['srv_missing_profile_title4'] . '</legend>'."\n";
echo '<form name="" id="" autocomplete="off">'."\n";
|