..." while (!(strpos($textToParse, "") === FALSE)) { $beginTagPosBegin = strpos($textToParse, ""); $beginTagPosEnd = $beginTagPosBegin + 12; $endTagPosBegin = strpos($textToParse, ""); $endTagPosEnd = $endTagPosBegin + 13; if ($beginTagPosEnd < $endTagPosBegin) : $tagContent = substr($textToParse, $beginTagPosEnd, $endTagPosBegin - $beginTagPosEnd); // $tagContent contains 0. "tif_id", 1. "hq_id", 2. "emp_id", 3. "emp_id_creator" $tmp = spliti(",",$tagContent); // Init $tagContent = ""; // Response $tagContent .= ""; // Remove message, created by myself only $buttonClass = "buttonActionDisabled"; if ($emp_id == $tmp[3] || ($empIdRootAdmin != "" && $emp_id == $empIdRootAdmin)) : $buttonClass = "buttonAction"; endif; $tagContent .= ""; // Substitute text fragment $textToParse = substr_replace($textToParse, $tagContent, $beginTagPosBegin, $endTagPosEnd - $beginTagPosBegin); endif; } endif; return $textToParse; } // Remove newsticker entry if ($f_act == "removeTifEntry") : if ($f_tifIdToRemove != "") : deleteStmt("phoenix_group.tickerforum","tif_id = ".$f_tifIdToRemove); $f_tifIdToRemove = ""; // Reset ID else: $statusMessage = getLngt("Es wurde kein Eintrag zum Löschen selektiert!"); endif; endif; // Message to couriers belonging to one or more groups if ($f_act == "sendmsg") : if ($f_tif_text != "") : if ($toDateRange >= $currentTime) : $statusMessage = getLngt("Die Tickermeldung wurde eingestellt!"); // If the message was inserted for a special employee, a potential headquarter information will be deleted if ($f_emp_id_insert != "" && $f_emp_id_insert != "0" && $f_hq_id_insert != "" && $f_hq_id_insert != "0") : $f_hq_id_insert = "0"; $statusMessage .= " " . getLngt("Es wurde ein bestimmter Empfänger selektiert, deshalb wird die Zentralenauswahl verworfen!"); endif; if (substr($fromDateRange, 0, 10) < substr($currentTime, 0, 10)) : $fromDateRange = $currentTime; if (authCheckEmployeeRights($emp_id, "10")) : $statusMessage .= " " . getLngt("Der Startzeitpunkt wurde auf den aktuellen Zeitpunkt gelegt, da ein vergangenes Startdatum nicht zulässig ist!"); endif; endif; insertStmt("phoenix_group.tickerforum", array("hq_id", $f_hq_id_insert, "emp_id", $f_emp_id_insert, "emp_id_creator", $emp_id, "tif_createtime ", $currentTime, "tif_starttime", $fromDateRange, "tif_endtime", $toDateRange, "tif_subject", "", "tif_text", $f_tif_text, "tif_unerasable", $f_tif_unerasable)); // Initialisieren $f_tif_subject = ""; $f_tif_text = ""; else : $statusMessage = getLngt("Das Endedatum sollte nicht in der Vergangenheit liegen!"); endif; else : $statusMessage = getLngt("Bitte erfassen Sie erst einen neuen Eintrag!"); endif; endif; // --- Current newsticker data ------------------ if (true) : // From table "messageforum" $fieldClause = "hq.hq_name, tif.tif_id, tif.hq_id, tif.emp_id, tif.emp_id_creator,tif.tif_createtime," . "LEFT(tif.tif_starttime, 10) AS tif_starttime, LEFT(tif.tif_endtime, 10) AS tif_endtime, tif.tif_subject, tif.tif_text, tif.tif_unerasable," . "CONCAT(usr_s.usr_firstname,'
',usr_s.usr_name,'
','[',hq_s.hq_mnemonic,']') AS usr_from," . "CONCAT(usr_r.usr_firstname,'
',usr_r.usr_name,'
','[',hq_r.hq_mnemonic,']') AS usr_to," . "CONCAT(tif.tif_id,',',tif.hq_id,',',tif.emp_id,',',tif.emp_id_creator) AS tif_special"; $fromClause = "phoenix_group.tickerforum AS tif " . "LEFT JOIN phoenix.headquarters AS hq ON tif.hq_id = hq.hq_id " . "LEFT JOIN phoenix.employee AS emp_s ON tif.emp_id_creator = emp_s.emp_id " . "LEFT JOIN phoenix.user AS usr_s ON emp_s.usr_id = usr_s.usr_id " . "LEFT JOIN phoenix.headquarters AS hq_s ON usr_s.hq_id = hq_s.hq_id " . "LEFT JOIN phoenix.employee AS emp_r ON tif.emp_id = emp_r.emp_id " . "LEFT JOIN phoenix.user AS usr_r ON emp_r.usr_id = usr_r.usr_id " . "LEFT JOIN phoenix.headquarters AS hq_r ON usr_r.hq_id = hq_r.hq_id "; // $whereClause = "tif.tif_createtime >= '$fromDateRange' AND tif.tif_createtime <= '$toDateRange'"; $whereClause = "tif.tif_unerasable != '1'"; $whereClause .= " AND (tif.emp_id_creator = '" . $emp_id . "' OR tif.emp_id = '" . $emp_id . "' OR" . " ( (isnull(tif.emp_id) OR tif.emp_id = '0') AND tif.hq_id = '" . $hq_id . "') OR" . " ( (isnull(tif.emp_id) OR tif.emp_id = '0') AND (isnull(tif.hq_id) OR tif.hq_id = '0') ) )"; $orderByClause = "tif.tif_createtime DESC LIMIT 0," . $limitOfRowsDisplayed; $sqlquery = generateStatement($fieldClause,$fromClause,$whereClause,$orderByClause); // echo $sqlquery . "
"; // Send request to database $result = $db->query($sqlquery); if (DB::isError($result)) die ("$PHP_SELF: " . $result->getMessage()); // Generate list with header $titleArray = array(getLngt("Erstellung")."  ",getLngt("Gültig von")."  ",getLngt("bis")."  ",getLngt("Absender")."  ",getLngt("an Zentrale")."  ",getLngt("an Empfänger")."  ",getLngt("Mitteilung")."  ",getLngt("Aktionen")); $fieldArray = array("tif_createtime","tif_starttime","tif_endtime","usr_from","hq_name","usr_to","tif_text","tif_special"); $aligns = "c,c,c,c,c,c,l,c"; if ($empIdRootAdmin != "" && $emp_id == $empIdRootAdmin) : $titleArray = array_merge(array(getLngt("Nr.")."  "), $titleArray); $fieldArray = array_merge(array("tif_id"), $fieldArray); $aligns = "r," . $aligns; endif; $alignArray = spliti(",",$aligns); $alignTitles = "center"; $widths = "30,80,80,80,100,100,100,400,200"; $widthArray = spliti(",",$widths); $summationField = ""; $postParserField = "tif_special"; $mode = "1"; // Output from DB-RESULT $sortDBField = ""; // Used in following include-file for sorting per column; include ("../include/inc_list_defineoutput.inc.php"); $result->free(); endif; // *** ONLY OUTPUT *** // Post parsing if necessary if ($postParserField != "") : $tableBody = postParseHistory($tableBody); $tableBody = nl2br($tableBody); endif; // Define output table $historyentry = $tableHeader . $tableBody; $currentFrameName = ""; // Empty string for "main frame" // Date-ranges $filter_dateranges = getLngt("Gültig von") . "\n"; $filter_dateranges .= "\n"; $filter_dateranges .= "\n"; $filter_dateranges .= "\n"; $filter_dateranges .= "  " . getLngt("bis:") . "\n"; $filter_dateranges .= "\n"; $filter_dateranges .= "\n"; $filter_dateranges .= "\n"; // Javascript-function as template only for $js_date = "\n"; ?> <?php echo $pageTitel ?>
>
" . $f_tif_text . ""; ?>
               
1000) : echo getLngt("Mehr als") . " " . $limitOfRowsDisplayed . " " . getLngt("Datensätze werden nicht dargestellt"); echo htmlDivLineSpacer("20px"); endif; ?>