resetContainerPageCounter(); // Returns container page counter values // $mode: "0" or empty <=> returns the array(row, col) regarding current container ID // "1" returns the page counter by itself // "2" returns the ID of the container // $gridMatrix = $grid->getNextContainerPageCounter(); // Current user data $sqlquery = "SELECT usr.usr_name, usr.usr_firstname, usr.usr_type" . " FROM user AS usr" . " WHERE usr.usr_id = " . $usr_id; $result = $db->dbQ($sqlquery); while ($row = $result->fetch_assoc()): $v_usr_type = $row["usr_type"]; $v_usr_name = $row["usr_name"]; $v_usr_firstname = $row["usr_firstname"]; endwhile; $result->free(); if ($v_usr_type == "1") : if (authCheckEmployeeRights($emp_id, "0") && authCheckEmployeeRights($emp_id, "11")) : include ("../groupware/calendar.php"); endif; endif; // Get the emp_id of the root admin, e.g. setting new passwords of employees $empIdRootAdmin = getEmpIdOfRootAdmin("hq"); // Company-data $sqlquery = ""; if ($v_usr_type == "3") : // Courier $sqlquery = "SELECT cmp.cmp_id, cmp.cmp_comp, cmp.cmp_comp2, cmp.cmp_logo, cmp.cmp_logo_width, cmp.cmp_logo_height" . " FROM company AS cmp, courier AS cr" . " WHERE cr.usr_id = " . $usr_id . " AND cmp.cmp_id = cr.cmp_id"; elseif ($v_usr_type == "2") : // Customer $sqlquery = "SELECT cmp.cmp_id, cmp.cmp_comp, cmp.cmp_comp2, cmp.cmp_logo, cmp.cmp_logo_width, cmp.cmp_logo_height" . " FROM company AS cmp, customer AS cs" . " WHERE cs.cs_admin = " . $emp_id . " AND cmp.cmp_id = cs.cmp_id"; elseif ($v_usr_type == "1") : // Headquarter $sqlquery = "SELECT cmp.cmp_id, cmp.cmp_comp, cmp.cmp_comp2, cmp.cmp_logo, cmp.cmp_logo_width, cmp.cmp_logo_height" . " FROM company AS cmp, headquarters AS hq" . " WHERE hq.hq_id = " . $hq_id . " AND hq.cmp_id = cmp.cmp_id"; endif; if ($sqlquery != "") : $result = $db->dbQ($sqlquery); while ($row = $result->fetch_assoc()): $v_cmp_id = $row["cmp_id"]; $v_cmp_comp = $row["cmp_comp"]; $v_cmp_comp2 = $row["cmp_comp2"]; $v_cmp_logo = $row["cmp_logo"]; $v_cmp_logo_width = $row["cmp_logo_width"]; $v_cmp_logo_height = $row["cmp_logo_height"]; endwhile; $result->free(); endif; $companyLogo = ""; if (trim($v_cmp_logo) == "") : $v_cmp_id = getFieldValueFromId("headquarters", "hq_id", $hq_id, "cmp_id"); list ($v_cmp_logo, $v_cmp_logo_width, $v_cmp_logo_height) = getFieldsValueFromId("company","cmp_id",$v_cmp_id,array("cmp_logo","cmp_logo_width","cmp_logo_height")); endif; if (trim($v_cmp_logo) != "") : $companyLogo = ""; endif; // Container $gridMatrix = $grid->getNextContainerPageCounter(); $gridJsOut .= $grid->gridSetCss($gridMatrix[0], $gridMatrix[1], array("background-color", "red"), "hl"); $gridJsOut .= $grid->gridSetHtml($gridMatrix[0], $gridMatrix[1], $v_cmp_comp . " " . $v_cmp_comp2, "hl"); $gridJsOut .= $grid->gridSetCss($gridMatrix[0], $gridMatrix[1], array("font-size", "14pt", "font-weight", "bold"), "bd"); $gridJsOut .= $grid->gridSetHtml($gridMatrix[0], $gridMatrix[1], "
" . $companyLogo . "

" . getLngt("Hallo") . " " . $v_usr_firstname . " " . $v_usr_name . "

", "bd"); // ********************************************** // *** Birthdays, newsticker and appointments *** // ********************************************** $currentTime = getDateTime("0"); $birthdateOut = ""; $newstickerOut = ""; $appointmentOut = ""; // FOR HEADQUARTERS ONLY if ($v_usr_type == "1") : // Birthday data /* $sqlquery = "SELECT DISTINCT hq.hq_mnemonic, usr.usr_name, usr.usr_firstname, usr.usr_type" . " FROM user AS usr, headquarters AS hq" . " WHERE usr.hq_id = hq.hq_id AND RIGHT(usr.usr_birthdate, 5) = RIGHT(CURDATE(), 5)" . " ORDER BY usr.usr_type, usr.usr_name"; $result = $db->dbQ($sqlquery); $tmpUsrTypeArray = array(0,0,0,0); while ($row = $result->fetch_assoc()): if ($tmpUsrTypeArray[$row["usr_type"]] == "0") : $tmpUsrTypeArray[$row["usr_type"]] = "1"; if ($row["usr_type"] == "1") : $birthdateOut .= "" . getLngt("Mitarbeiter") . ":"; endif; if ($row["usr_type"] == "2") : $birthdateOut .= "" . getLngt("Kunden") . ":"; endif; if ($row["usr_type"] == "3") : $birthdateOut .= "" . getLngt("Transporteure") . ":"; endif; endif; $birthdateOut .= ""; $birthdateOut .= "(" . $row["hq_mnemonic"] . ")  "; $birthdateOut .= "" . $row["usr_firstname"] . " " . $row["usr_name"] . ""; $birthdateOut .= ""; endwhile; $result->free(); */ $sqlquery = "SELECT DISTINCT hq.hq_mnemonic, usr.usr_name, usr.usr_firstname, usr.usr_type, cr_cmp.cmp_authenticated, cr_cmp.cmp_visible" . " FROM headquarters AS hq, user AS usr LEFT JOIN courier AS cr ON cr.usr_id = usr.usr_id AND usr.usr_type = '3'" . " LEFT JOIN company AS cr_cmp ON cr.cmp_id = cr_cmp.cmp_id" . " WHERE usr.hq_id = hq.hq_id AND RIGHT(usr.usr_birthdate, 5) = RIGHT(CURDATE(), 5)" . " ORDER BY usr.usr_type, usr.usr_name"; $result = $db->dbQ($sqlquery); $tmpUsrTypeArray = array(0,0,0,0); while ($row = $result->fetch_assoc()): if ($tmpUsrTypeArray[$row["usr_type"]] == "0") : $tmpUsrTypeArray[$row["usr_type"]] = "1"; if ($row["usr_type"] == "1") : $birthdateOut .= "" . getLngt("Mitarbeiter") . ":"; endif; if ($row["usr_type"] == "2") : $birthdateOut .= "" . getLngt("Kunden") . ":"; endif; if ($row["usr_type"] == "3") : $birthdateOut .= "" . getLngt("Transporteure") . ":"; endif; endif; if ($row["usr_type"] != "3" || ($row["usr_type"] == "3" && $row["cmp_authenticated"] == "1" && $row["cmp_visible"] == "1")) : $birthdateOut .= ""; $birthdateOut .= "(" . $row["hq_mnemonic"] . ")  "; $birthdateOut .= "" . $row["usr_firstname"] . " " . $row["usr_name"] . ""; $birthdateOut .= ""; endif; endwhile; $result->free(); // Container birthdays $gridMatrix = $grid->getNextContainerPageCounter(); $gridJsOut .= $grid->gridSetCss($gridMatrix[0], $gridMatrix[1], array("background-color", "green"), "hl"); $gridJsOut .= $grid->gridSetHtml($gridMatrix[0], $gridMatrix[1], getLngt("Wir gratulieren herzlich zum Geburtstag!"), "hl"); $gridJsOut .= $grid->gridSetCss($gridMatrix[0], $gridMatrix[1], array("font-size", "14pt", "font-weight", "bold"), "bd"); $gridJsOut .= $grid->gridSetHtml($gridMatrix[0], $gridMatrix[1], "

" . "" . $birthdateOut . "
" . "
", "bd"); // DIRECT SEARCH $bdOut = "

" . getLngt("Auftrag, Kunde, Fahrer, Fahrzeug") . ":  " . "  " . "
" . "
" . "
" . "
" . "
"; // Container meta search $gridMatrix = $grid->getNextContainerPageCounter(); $gridJsOut .= $grid->gridSetCss($gridMatrix[0], $gridMatrix[1], array("background-color", "green"), "hl"); $gridJsOut .= $grid->gridSetHtml($gridMatrix[0], $gridMatrix[1], getLngt("DIREKTSUCHE"), "hl"); $gridJsOut .= $grid->gridSetCss($gridMatrix[0], $gridMatrix[1], array("font-size", "12pt", "font-weight", "normal"), "bd"); $gridJsOut .= $grid->gridSetHtml($gridMatrix[0], $gridMatrix[1], $bdOut, "bd"); // SPECIAL RIGHTS FOR reports !!!!!!!!!!!!!!!!!!!!!!!!!!!! $lastLoginTime = ""; $newCsReportsOut = ""; $newCrReportsOut = ""; $numOfNewCrReports = 0; $presetDays = 7; if (authCheckEmployeeRights($emp_id, "0") && authCheckEmployeeRights($emp_id, "16")) : $numOfNewCsReports = 0; $listOfLoginsArray = getListOfLogEntries(array('52','53'), array(0,0,0,0,-($presetDays),0), array("log_createtime"), $emp_id, "log_createtime DESC"); $listOfLoginsArrayLen = count($listOfLoginsArray); if ($listOfLoginsArrayLen > 0) : $lastLoginTime = $listOfLoginsArray[1][0]; if ($lastLoginTime != "") : $numOfNewCsReports = getCountOfTable("phoenix_group.report_process", "hq_id = '" . $hq_id . "' AND rp_objtype = 'cs' AND rp_createtime >= '" . $lastLoginTime . "'"); if ($numOfNewCsReports == -1) : $numOfNewCsReports = 0; endif; $numOfNewCrReports = getCountOfTable("phoenix_group.report_process", "hq_id = '" . $hq_id . "' AND rp_objtype = 'cr' AND rp_createtime >= '" . $lastLoginTime . "'"); if ($numOfNewCrReports == -1) : $numOfNewCrReports = 0; endif; endif; endif; $newCsReportsOut = "" . getLngt("[Kundenberichte]") . ""; $newCrReportsOut = "" . getLngt("[Transporteursberichte]") . ""; endif; // SPECIAL RIGHTS FOR reports !!!!!!!!!!!!!!!!!!!!!!!!!!!! // Number of reports $reportOut = ""; $lastLoginTimestamp = ""; if ($lastLoginTime != "") : $lastLoginTimestamp = substr($lastLoginTime,8,2) . "." . substr($lastLoginTime,5,2) . "." . substr($lastLoginTime,0,4). "  " . substr($lastLoginTime,11,2) . "." . substr($lastLoginTime,14,2) . "." . substr($lastLoginTime,17,2); endif; if ($newCsReportsOut != "" || $newCrReportsOut != "") : $reportOut .= "
"; $reportOut .= ""; if ($newCsReportsOut != "") : $reportOut .= ""; endif; if ($newCrReportsOut != "") : $reportOut .= ""; endif; $reportOut .= "
" . getLngt("BERICHTE seit letztem Login") . " [" . $lastLoginTimestamp . "] " . getLngt("(max. eine Woche)") . "

" . $newCsReportsOut . "  [" . getLngt("Anzahl") . " " . $numOfNewCsReports . "]

" . $newCrReportsOut . "  [" . getLngt("Anzahl") . " " . $numOfNewCrReports . "]

"; // Container reports $gridMatrix = $grid->getNextContainerPageCounter(); // $gridJsOut .= $grid->gridSetCss($gridMatrix[0], $gridMatrix[1], array("background-color", "blue"), "hl"); $gridJsOut .= $grid->gridSetHtml($gridMatrix[0], $gridMatrix[1], getLngt("BERICHTE seit letztem Login") . " [" . $lastLoginTimestamp . "] " . getLngt("(max. eine Woche)"), "hl"); $gridJsOut .= $grid->gridSetCss($gridMatrix[0], $gridMatrix[1], array("font-size", "10pt", "font-weight", "normal"), "bd"); $gridJsOut .= $grid->gridSetHtml($gridMatrix[0], $gridMatrix[1], "

" . $reportOut . "
", "bd"); endif; // SPECIAL RIGHTS FOR calendar !!!!!!!!!!!!!!!!!!!!!!!!!!!! if (authCheckEmployeeRights($emp_id, "0") && authCheckEmployeeRights($emp_id, "11")) : // Appointment data $f_hq_id = array($hq_id); $f_selUsrId = $usr_id; // Monitored appointments $f_ap_cat_search_4 = "1"; // Get only appointments with activated "alarm" $tmpApRangeStarttime = getDateTime("date_plus_offset", array(-1,0,0), "Ymd"); $tmpApRangeEndtime = getDateTime("date_plus_offset", array(0,7,0), "Ymd"); $apArray = getAppointmentsFromDB(substr($tmpApRangeStarttime,0,4), substr($tmpApRangeStarttime,4,2) , substr($tmpApRangeStarttime,6,2), substr($tmpApRangeEndtime,0,4), substr($tmpApRangeEndtime,4,2) , substr($tmpApRangeEndtime,6,2)); // Normal appointments $f_ap_cat_search_4 = "0"; // Get normal appointments $tmpApRangeStarttime = getDateTime("date_plus_offset", array(0,0,0), "Ymd"); $tmpApRangeEndtime = getDateTime("date_plus_offset", array(0,1,0), "Ymd"); $apArray2 = getAppointmentsFromDB(substr($tmpApRangeStarttime,0,4), substr($tmpApRangeStarttime,4,2) , substr($tmpApRangeStarttime,6,2), substr($tmpApRangeEndtime,0,4), substr($tmpApRangeEndtime,4,2) , substr($tmpApRangeEndtime,6,2)); // Merge arrays $apArray = array_merge($apArray, $apArray2); $lenApArray = count($apArray); $apOut = ""; for ($j = 0; $j < $lenApArray; $j++) : $tmpId = $apArray[$j][0]; $tmpText = $apArray[$j][1]; $tmpExecDateTime = $apArray[$j][2]; $tmpExecDate = substr($tmpExecDateTime,8,2) . "." . substr($tmpExecDateTime,5,2) . "." . substr($tmpExecDateTime,0,4); $tmpExecTime = substr($tmpExecDateTime,11,5); $tmpExecDateYear = substr($apArray[$j][2],0,4); $tmpExecDateMonth = substr($apArray[$j][2],5,2); $tmpExecDateDay = substr($apArray[$j][2],8,2); $tmpCmpId = trim($apArray[$j][3]); $tmpCmpComp = trim($apArray[$j][4]); $tmpCmpComp2 = trim($apArray[$j][5]); $tmpCsId = $apArray[$j][6]; $tmpCsEid = $apArray[$j][7]; $tmpEndDateTime = $apArray[$j][8]; $tmpEndDate = substr($tmpEndDateTime,8,2) . "." . substr($tmpEndDateTime,5,2) . "." . substr($tmpEndDateTime,0,4); $tmpEndTime = substr($tmpEndDateTime,11,5); $tmpUsrId = trim($apArray[$j][9]); $tmpUsrFirstname = trim($apArray[$j][10]); $tmpUsrName = trim($apArray[$j][11]); $tmpParticipants = trim($apArray[$j][12]); $tmpParticipants = substr($tmpParticipants,1,-1); // Remove commata from db-field $tmpConfirmed = trim($apArray[$j][13]); $tmpConfirmed = substr($tmpConfirmed,1,-1); // Remove commata from db-field $tmpPtCmpComp = trim($apArray[$j][14]); $tmpPtCmpComp2 = trim($apArray[$j][15]); $tmpPtCsEid = $apArray[$j][16]; $tmpPtId = $apArray[$j][17]; $tmpApCat1 = $apArray[$j][18]; $tmpApCat2 = $apArray[$j][19]; $tmpApCat3 = $apArray[$j][20]; $tmpApCat4 = $apArray[$j][21]; $cellCol = "FFFFFF"; $apOut .= "" . getLngt("Beginn") . "" . getLngt("Ende") . "" . getLngt("Ersteller") . "" . getLngt("Teilnehmer") . "" . getLngt("Beschreibung") . "" . getLngt("Kunde") . " "; $apOut .= ""; // Dates (From, To) $apOut .= "" . $tmpExecDate . "
" . ($tmpApCat4 == "1" ? "" : "") . "
" . $tmpExecTime . "
"; if ($tmpEndTime != "00:00") : $apOut .= "" . $tmpEndDate . "

" . $tmpEndTime . "
"; else : $apOut .= " "; endif; // User if ($tmpUsrId != "") : $apOut .= "" . $tmpUsrFirstname . "
" . $tmpUsrName . ""; else : $apOut .= " "; endif; // Participants $apOut .= ""; if ($tmpParticipants != "") : $tmpParticipants = spliti(",", $tmpParticipants); // It has to be an array $tmpParticipantsLen = count($tmpParticipants); // Needs array of users confirmed the appointment $tmpConfirmed = spliti(",", $tmpConfirmed); for ($k = 0; $k < $tmpParticipantsLen; $k++) : $participantName = getOneStmt("SELECT CONCAT(usr_name,', ',usr_firstname) AS name FROM user WHERE usr_id = '" . $tmpParticipants[$k] . "'", "name"); $participantConfirmed = "[?]"; $l = array_search($tmpParticipants[$k], $tmpConfirmed); if (!($l === FALSE)) : $participantConfirmed = getLngt("[OK]"); else : if ($tmpParticipants[$k] == $tmpUsrId) : $participantConfirmed = getLngt("[OK]"); elseif ($tmpParticipants[$k] == $usr_id) : // Only the user has a link to confirm his/her own entry // $participantConfirmed = "" . getLngt("[Bestätigen]") . ""; $participantConfirmed = getLngt("[Bestätigen]"); endif; endif; $apOut .= $participantName . " " . $participantConfirmed . "
"; endfor; else : $apOut .= " "; endif; $apOut .= ""; // Text $apOut .= "" . my_nl2br($tmpText) . ""; // Potential customer relation (Company name and EID) if ($tmpCsId != "") : $apOut .= "" . $tmpCmpComp . "
" . ($tmpCmpComp2 != "" ? $tmpCmpComp2 . "
" : "") . $tmpCsEid . "
"; // . "" // . "" // . "" // . ""; // elseif ($tmpPtId != "") : // $apOut .= "" . $tmpPtCmpComp . "
" . ($tmpPtCmpComp2 != "" ? $tmpPtCmpComp2 . "
" : "") . $tmpPtCsEid . "
" // . "" // . "" // . ""; else : $apOut .= " "; endif; $apOut .= ""; $apOut .= "  " . getLngt("[Zum Termin]") . ""; $apOut .= ""; // if ($j < $lenApArray - 1) : $apOut .= ""; endif; $apOut .= ""; endfor; if (true || $lenApArray > 0) : // Container appointments $gridMatrix = $grid->getNextContainerPageCounter(); $gridJsOut .= $grid->gridSetCss($gridMatrix[0], $gridMatrix[1], array("background-color", "blue"), "hl"); $gridJsOut .= $grid->gridSetHtml($gridMatrix[0], $gridMatrix[1], getLngt("AKTUELLE TERMINE") . "         ", "hl"); $gridJsOut .= $grid->gridSetCss($gridMatrix[0], $gridMatrix[1], array("font-size", "10pt", "font-weight", "normal"), "bd"); $gridJsOut .= $grid->gridSetHtml($gridMatrix[0], $gridMatrix[1], "

" . "" . $apOut . "
" . "
", "bd"); endif; endif; // SPECIAL RIGHTS FOR calendar !!!!!!!!!!!!!!!!!!!!!!!!!!!! endif; // A text, transmitted by ajax from client to server with "encodeURI(escape(content))" in javascript, // stored - urldecoded in PHP - into the DB and read by PHP from the database again like here for (editable) output function my_str_check_ajax($aStr, $nl2br_enabled = true) { while (strpos($aStr, "\\")) : $aStr = str_replace("\\n", "\n", $aStr); $aStr = str_replace("\\r", "\r", $aStr); endwhile; if ($nl2br_enabled) : $aStr = str_replace("\n\r", "
", $aStr); $aStr = str_replace("\r\n", "
", $aStr); $aStr = str_replace("\n", "
", $aStr); $aStr = str_replace("\r", "
", $aStr); endif; return $aStr; } // CUSTOMER NEWS, visible for headquarter and customers, editable by headquarters only regarding access rights if ($v_usr_type == "1" || $v_usr_type == "2") : $csGlobalInfoByHq = ""; if (existsEntry("genericdatacontainer",array("gdc_obj_type","hq2cs","gdc_obj_id",$hq_id,"gdc_gen_fieldname","global_cs_info"))) : $csGlobalInfoByHq = getFieldValueFromClause("genericdatacontainer","gdc_content","gdc_obj_type = 'hq2cs' AND gdc_obj_id = '" . $hq_id . "' AND gdc_gen_fieldname = 'global_cs_info'"); endif; // Check for access right to edit the text if ($v_usr_type == "1") : $outCsGlobalInfoByHqHeadline = getLngt("Aktuelle Infos für die Kunden"); else : $outCsGlobalInfoByHqHeadline = getLngt("Aktuelle Informationen für Sie"); endif; if ($v_usr_type == "1" && authCheckEmployeeRights($emp_id, "0") && authCheckEmployeeRights($emp_id, "35")) : $outCsGlobalInfoByHqHeadline .= "         " . ""; $outCsGlobalInfoByHqBody = "
"; else : $outCsGlobalInfoByHqBody = my_str_check_ajax($csGlobalInfoByHq); endif; // Container customer news $gridMatrix = $grid->getNextContainerPageCounter(); $gridJsOut .= $grid->gridSetCss($gridMatrix[0], $gridMatrix[1], array("background-color", "green"), "hl"); $gridJsOut .= $grid->gridSetHtml($gridMatrix[0], $gridMatrix[1], $outCsGlobalInfoByHqHeadline, "hl"); $gridJsOut .= $grid->gridSetCss($gridMatrix[0], $gridMatrix[1], array("font-size", "10pt", "font-weight", "normal", "color", "black"), "bd"); $gridJsOut .= $grid->gridSetHtml($gridMatrix[0], $gridMatrix[1], "
" . $outCsGlobalInfoByHqBody, "bd"); endif; // CUSTOMER EMAIL NEWS, visible for and editable by headquarter only regarding access rights if ($v_usr_type == "1") : $csGlobalEmailInfoByHq = ""; if (existsEntry("genericdatacontainer",array("gdc_obj_type","hq2cs","gdc_obj_id",$hq_id,"gdc_gen_fieldname","global_cs_email_info"))) : $csGlobalEmailInfoByHq = getFieldValueFromClause("genericdatacontainer","gdc_content","gdc_obj_type = 'hq2cs' AND gdc_obj_id = '" . $hq_id . "' AND gdc_gen_fieldname = 'global_cs_email_info'"); endif; // Check for access right to edit the text $outCsGlobalEmailInfoByHqHeadline = getLngt("Aktuelle Infos in den Kunden-Emails"); if (authCheckEmployeeRights($emp_id, "0") && authCheckEmployeeRights($emp_id, "35")) : $outCsGlobalEmailInfoByHqHeadline .= "         " . ""; $outCsGlobalEmailInfoByHqBody = "
"; else : $outCsGlobalEmailInfoByHqBody = my_str_check_ajax($csGlobalEmailInfoByHq); endif; // Container customer news $gridMatrix = $grid->getNextContainerPageCounter(); $gridJsOut .= $grid->gridSetCss($gridMatrix[0], $gridMatrix[1], array("background-color", "green"), "hl"); $gridJsOut .= $grid->gridSetHtml($gridMatrix[0], $gridMatrix[1], $outCsGlobalEmailInfoByHqHeadline, "hl"); $gridJsOut .= $grid->gridSetCss($gridMatrix[0], $gridMatrix[1], array("font-size", "10pt", "font-weight", "normal", "color", "black"), "bd"); $gridJsOut .= $grid->gridSetHtml($gridMatrix[0], $gridMatrix[1], "
" . $outCsGlobalEmailInfoByHqBody, "bd"); endif; // 2-FA-Registration $usrTypeEnabledFor2FA = getParameterValue("0", "USERTYPE_2FA_ENABLED", "0"); $usrNoDeactivationByUserOf2FA = getParameterValue("0", "USER_2FA_NO_DEACTIVATION", "0"); $ut2FAarr = explode(",", $usrTypeEnabledFor2FA); if ($v_usr_type == "1" && $ut2FAarr[0] || $v_usr_type == "2" && $ut2FAarr[1] || $v_usr_type == "3" && $ut2FAarr[2]) : // Get current state of 2-FA regarding the user logged in $usrTotpSecret = getFieldValueFromId("user", "usr_id", $usr_id, "usr_totp_secret"); $usrTotpActivated = getFieldValueFromId("user", "usr_id", $usr_id, "usr_totp_activated"); if ($usrTotpSecret == "" || $usrTotpActivated != "1") : $outCellBody = "" . getLngt("BITTE BEACHTEN:") . "

" . getLngt("Hier können Sie für Ihren Benutzerzugang eine Authenticator-App zur zusätzlichen Bestätigung des Logins einrichten.") . "

" . getLngt("Installieren Sie eine Authenticator-App auf Ihrem Smartphone, z.B. die Google Authenticator-App:") . "
" . "[" . getLngt("Google Play Store") . "]" . "    " . "[" . getLngt("Apple App Store") . "]" . "

" . "[" . getLngt("Bitte hier klicken zur Aktivierung der Zwei-Faktor-Authentifikation") . "]

"; else : if ($v_usr_type != "1" || $usrNoDeactivationByUserOf2FA != "1") : $outCellBody = "

         " . getLngt("Hier bitte deaktivieren:") . "    [" . getLngt("Deaktivierung") . "]"; else : $outCellBody = "

         " . getLngt("Für eine Deaktivierung wenden Sie sich bitte an den zuständigen Mitarbeiter!") . ""; endif; endif; // $outCellBody = my_str_check_ajax($outCellBody); // Check for access right to edit the text $outCellHeadline = getLngt("Zwei-Faktor-Authentifikation"); // $outCellHeadline = my_str_check_ajax($outCellHeadline); /* if (authCheckEmployeeRights($emp_id, "0") && authCheckEmployeeRights($emp_id, "35")) : $outCsGlobalEmailInfoByHqHeadline .= "         " . ""; $outCsGlobalEmailInfoByHqBody = "
"; else : $outCsGlobalEmailInfoByHqBody = my_str_check_ajax($csGlobalEmailInfoByHq); endif; */ // 2-FA-Registration $gridMatrix = $grid->getNextContainerPageCounter(); $gridJsOut .= $grid->gridSetCss($gridMatrix[0], $gridMatrix[1], array("background-color", "red"), "hl"); $gridJsOut .= $grid->gridSetHtml($gridMatrix[0], $gridMatrix[1], $outCellHeadline, "hl"); $gridJsOut .= $grid->gridSetCss($gridMatrix[0], $gridMatrix[1], array("font-size", "10pt", "font-weight", "normal", "color", "black"), "bd"); $gridJsOut .= $grid->gridSetHtml($gridMatrix[0], $gridMatrix[1], "
" . $outCellBody, "bd"); endif; // Hide remaining containers without content $gridJsOut .= $grid->gridHideRemaining(); ?> <?php echo $pageTitel ?>
getGridItemParameter("output_html"); endif; ?>