function tkSendError($errorMsg) { global $ln_error_heading, $ln_to_mainpage; tkLog($errorMsg); echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <title>' . $ln_error_heading . '</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> </head> <body> <h4>' . $ln_error_heading . '</h4> ' . $errorMsg . ' <br /> <br /> <a href="' . tkMakeURL("", "_all") . '">' . $ln_to_mainpage . '</a> </body> </html>'; exit; }
} // Search Button (Start / Stop) if (isset($_GET["tkSearch"]) && !empty($_GET["tkSearch"]) && strlen($_GET["tkSearch"]) > 1) { // ------------ Official: Search is active: $envSearchActive = true; $searchValue = htmlspecialchars($_GET["tkSearch"]); $searchButton = '<a href="' . tkMakeURL("", $confStripQueryVars . ",tkSearch,page") . '"><img src="img/stop_search.png" alt="Suche beenden" title="Die Suche beenden" /style="vertical-align:middle"></a>'; } else { $searchValue = $ln_searchValueStandard; # $searchButton = '<input type="image" src="img/start_search.png" alt="Suche starten" title="Suche starten" style="vertical-align:middle"/>'; $searchButton = ""; if (isset($_GET['id'])) { $searchButton .= '<input type="hidden" name="id" value="' . $_GET["id"] . '" />'; } } $tmplGlobalReplacements = array("currentUserName" => $tkUser["name"], "topAdminMenu" => $topmenuHtml, "globStatus" => $globStatusHtml, "overviewURL" => tkMakeURL("", $confStripQueryVars), "backURL" => empty($_GET["id"]) ? "../admin/index.php?login=1" : tkMakeURL("", $confStripQueryVars), "ticketURL" => empty($_GET["id"]) ? tkMakeURL("", $confStripQueryVars . ",page") : tkMakeURL("id=" . $_GET["id"], $confStripQueryVars), "version" => TICKET, "newlink" => tkMakeURL("c=new", $confStripQueryVars), "searchValue" => $searchValue, "standardSearchValue" => $ln_searchValueStandard, "searchActive" => $envSearchActive ? " searchActive" : " searchPassive", "searchURL" => tkMakeURL(""), "searchButton" => " " . $searchButton, "searchKeepFilter" => $_GET["f"], "filterButtons" => $tmplFilterChoice, "groupJs" => $gJs); // Page Management $tkThreadsPerPage = 15; $tkOverviewSubjectMaxChars = 50; /* ---------------------------- Core Engine ---------------------------- */ // Abstraction Engine include "includes/felox.php"; // Threads include "includes/tkThread.php"; // Posts
} // Mail hint if (!validateMail($tkUser["email"])) { $mailParams = array(); $mailHtml = tkMakeHtml($tmpl["mailhint"], $mailParams); } else { $mailHtml = ""; } // Page Management $numPages = ceil($thread->numTotalElements / $tkThreadsPerPage); $paginationLinksHtml = ""; #$paginationHtml .= "pages at all: $numPages <br>"; #echo "pagelink:".$tmpl["pagelink"]; for ($page = 0; $page < $numPages; $page++) { #echo "page $page <br>"; $pageParams = array("link" => tkMakeURL("page=" . ($page + 1), $confStripQueryVars), "title" => $page + 1, "special" => $curPage == $page ? " currentPage" : ""); $paginationLinksHtml .= tkMakeHtml($tmpl["pagelink"], $pageParams); } $params = array("pagelink" => $paginationLinksHtml); $paginationHtml = tkMakeHtml($tmpl["pagination"], $params); /*$nextO = $offset + $tkThreadsPerPage; $prevO = $offset - $tkThreadsPerPage; $pageParams = Array( "nextOffset"=>tkMakeURL( "offset=".( $nextO <= $thread->numTotalElements ? $nextO : $thread->numTotalElements ), $confStripQueryVars ), "lastOffset"=>tkMakeURL( "offset=".( $prevO < 0 ? 0 : $prevO ), $confStripQueryVars ) ); if( $offset + $tkThreadsPerPage < $thread->numTotalElements ) $forwardHtml = tkMakeHtml( $tmpl["forwardlink"], $pageParams ); if( $offset > 0 ) $newerHtml = tkMakeHtml( $tmpl["newerlink"], $pageParams );*/ // Form the body $params = array("list" => $listHtml, "title" => $ln_overview, "newCount" => $countHtml, "message" => $msgHtml, "currentFilter" => $filterHtml, "filterchoice" => $tmplFilterChoice, "newlinkcon" => $linkHtml, "pagination" => $paginationHtml, "mailhint" => $mailHtml); $html = tkMakeHtml($tmpl["body"], $params);