function processFilters($tplHelper, $count_newspots, $filterList) { $selfUrl = $tplHelper->makeSelfUrl("path"); foreach ($filterList as $filter) { $strFilter = $tplHelper->getPageUrl('index') . '&search[tree]=' . $filter['tree']; if (!empty($filter['valuelist'])) { foreach ($filter['valuelist'] as $value) { $strFilter .= '&search[value][]=' . $value; } # foreach } # if if (!empty($filter['sorton'])) { $strFilter .= '&sortby=' . $filter['sorton'] . '&sortdir=' . $filter['sortorder']; } # if # escape the filter vlaues $filter['title'] = htmlentities($filter['title'], ENT_NOQUOTES, 'UTF-8'); $filter['icon'] = htmlentities($filter['icon'], ENT_NOQUOTES, 'UTF-8'); # Output de HTML echo '<li>'; echo ' <img src="images/icons/' . $filter['icon'] . '" class="ui-li-icon" />'; echo ' <h3><a href="' . $strFilter . '#spots" rel="external">' . $filter['title'] . '</a></h3>'; echo '</li>'; # Als er children zijn, output die ool if (!empty($filter['children'])) { echo '<ul class="filterlist subfilterlist">'; processFilters($tplHelper, $count_newspots, $filter['children']); echo '</ul>'; } # if echo '</li>' . PHP_EOL; } # foreach }
function filterDoc_button($buttons) { if (isset($_REQUEST['filterDoc'])) { XSRFdefender('filterDoc'); processFilters(); } $buttons[] = array('enable' => true, 'button_text' => gettext('Filter Doc Gen'), 'formname' => 'filterDoc_button', 'action' => '?filterDoc=gen', 'icon' => 'images/add.png', 'title' => gettext('Generate filter document'), 'alt' => '', 'hidden' => '<input type="hidden" name="filterDoc" value="gen" />', 'rights' => ADMIN_RIGHTS, 'XSRFTag' => 'filterDoc'); return $buttons; }
function processFilters($tplHelper, $filterList) { foreach ($filterList as $filter) { # escape the filter vlaues $filter['title'] = htmlentities($filter['title'], ENT_NOQUOTES, 'UTF-8'); $filter['icon'] = htmlentities($filter['icon'], ENT_NOQUOTES, 'UTF-8'); # Output de HTML echo '<li class="sortable-element-class ' . $tplHelper->filter2cat($filter['tree']) . '" id="orderfilterslist_' . $filter['id']; echo '"><div><a href="" onclick="return openDialog(\'editfilterdialogdiv\', \'' . _('Edit filter') . '\', \'?page=render&tplname=editfilter&data[filterid]=' . $filter['id'] . '\', \'editfilterform\', null, \'autoclose\', function() { refreshTab(\'edituserpreferencetabs\')}, null);">'; echo '<span class="spoticon spoticon-' . str_replace('.png', '', $filter['icon']) . '"> </span>' . $filter['title'] . '</a>'; echo '</div>'; # Als er children zijn, output die ook if (!empty($filter['children'])) { echo '<ul>'; processFilters($tplHelper, $filter['children']); echo '</ul>'; } # if echo '</li>' . PHP_EOL; } # foreach }
function processActions() { global $CONFIG; require LIVEZILLA_PATH . "_lib/functions.internal.process.inc.php"; processAcceptedConversations(); processAuthentications(); processStatus(); processClosures(); processRequests(); processForwards(); processWebsitePushs(); processFilters(); processProfile(); processProfilePictures(); processWebcamPictures(); processAlerts(); processPermissions(); processClosedTickets(); processExternalReloads(); processReceivedPosts(); processCancelInvitation(); processEvents(); processGoals(); if (SERVERSETUP) { processBannerPictures(); } }
function processFilters($tplHelper, $count_newspots, $filterList) { $selfUrl = $tplHelper->makeSelfUrl("path"); foreach ($filterList as $filter) { $strFilter = $tplHelper->getPageUrl('index') . '&search[tree]=' . $filter['tree']; if (!empty($filter['valuelist'])) { foreach ($filter['valuelist'] as $value) { $strFilter .= '&search[value][]=' . $value; } # foreach } # if if (!empty($filter['sorton'])) { $strFilter .= '&sortby=' . $filter['sorton'] . '&sortdir=' . $filter['sortorder']; } # if $newCount = $count_newspots ? $tplHelper->getNewCountForFilter($strFilter) : ""; /* add the current search terms */ $strFilterInclusive = $strFilter . $tplHelper->convertSortToQueryParams() . $tplHelper->convertTextFilterToQueryParams(); # escape the filter values $filter['title'] = htmlentities($filter['title'], ENT_QUOTES, 'UTF-8'); $filter['icon'] = htmlentities($filter['icon'], ENT_QUOTES, 'UTF-8'); # Output de HTML echo '<li class="' . $tplHelper->filter2cat($filter['tree']) . '">'; echo '<a class="filter ' . $filter['title']; if ($selfUrl == $strFilter) { echo ' selected'; } # if echo '" href="' . $strFilter . '">'; echo '<span class="spoticon spoticon-' . str_replace('.png', '', $filter['icon']) . '"> </span>' . $filter['title']; if ($newCount > 0) { echo "<span onclick=\"gotoNew('" . $strFilter . "')\" class='newspots' title='" . sprintf(_('Show new spots in filter "%s"'), $filter['title']) . "'>{$newCount}</span>"; } # if # als er children zijn, moeten we de category kunnen inklappen if (!empty($filter['children'])) { echo '<span class="toggle" title="' . _('Collapse filter') . '" onclick="toggleFilter(this)"> </span>'; } # if # show the inclusive filter echo '<span onclick="gotoFilteredCategory(\'' . $strFilterInclusive . '\')" class="inclusive" title="' . _('Include current search terms') . '">+</span>'; echo '</a>'; # Als er children zijn, output die ook if (!empty($filter['children'])) { echo '<ul class="filterlist subfilterlist">'; processFilters($tplHelper, $count_newspots, $filter['children']); echo '</ul>'; } # if echo '</li>' . PHP_EOL; } # foreach }
function processFilters($tplHelper, $count_newspots, $filterList) { $selfUrl = $tplHelper->makeSelfUrl("path"); foreach ($filterList as $filter) { $strFilter = $tplHelper->getPageUrl('index') . '&search[tree]=' . $filter['tree']; if (!empty($filter['valuelist'])) { foreach ($filter['valuelist'] as $value) { $strFilter .= '&search[value][]=' . $value; } # foreach } # if if (!empty($filter['sorton'])) { $strFilter .= '&sortby=' . $filter['sorton'] . '&sortdir=' . $filter['sortorder']; } # if $newCount = $count_newspots ? $tplHelper->getNewCountForFilter($strFilter) : ""; # escape the filter vlaues $filter['title'] = htmlentities($filter['title'], ENT_NOQUOTES, 'UTF-8'); $filter['icon'] = htmlentities($filter['icon'], ENT_NOQUOTES, 'UTF-8'); # Output de HTML echo '<li class="' . $tplHelper->filter2cat($filter['tree']) . '">'; echo ' <a class="filter ' . $filter['title']; if ($selfUrl == $strFilter) { echo ' selected'; } # if echo '" href="' . $strFilter . '">'; echo '<span class="spoticon spoticon-' . str_replace('.png', '', $filter['icon']) . '"> </span>' . $filter['title']; if ($newCount) { echo "<span onclick=\"gotoNew('" . $strFilter . "')\" class='newspots' title='Laat nieuwe spots in filter "" . $filter['title'] . "" zien'>{$newCount}</span>"; } # if # als er children zijn, moeten we de category kunnen inklappen if (!empty($filter['children'])) { echo '<span class="toggle" title="Filter inklappen" onclick="toggleFilter(this)"> </span>'; } # if echo '</a>'; # Als er children zijn, output die ook if (!empty($filter['children'])) { echo '<ul class="filterlist subfilterlist">'; processFilters($tplHelper, $count_newspots, $filter['children']); echo '</ul>'; } # if echo '</li>' . PHP_EOL; } # foreach }
function processActions() { global $CONFIG, $INTERNAL; require LIVEZILLA_PATH . "_lib/functions.internal.process.inc.php"; processChatActions(); processAuthentications(); processStatus(); processChatInvitation(); processForwards(); processWebsitePushs(); processAutoReplies(); processFilters(); processProfile(); processProfilePictures(); processWebcamPictures(); processAlerts(); processPermissions(); processTicketActions(); processExternalReloads(); processReceivedPosts(); processCancelInvitation(); processEvents(); processGoals(); if (SERVERSETUP && $INTERNAL[CALLER_SYSTEM_ID]->Level == USER_LEVEL_ADMIN || in_array($CONFIG["gl_host"], $INTERNAL[CALLER_SYSTEM_ID]->WebsitesConfig)) { processButtonIcons(); } }
static function Process() { require LIVEZILLA_PATH . "_lib/functions.internal.process.inc.php"; processChatActions(); processAuthentications(); processStatus(); processChatInvitation(); processForwards(); processWebsitePushs(); processAutoReplies(); processFilters(); processProfile(); processProfilePictures(); processWebcamPictures(); processAlerts(); processPermissions(); processTicketActions(); processExternalReloads(); processReceivedPosts(); processCancelInvitation(); processEvents(); processGoals(); processResources(); if (SERVERSETUP && Server::$Operators[CALLER_SYSTEM_ID]->Level == USER_LEVEL_ADMIN || in_array(Server::$Configuration->File["gl_host"], Server::$Operators[CALLER_SYSTEM_ID]->WebsitesConfig)) { processButtonIcons(); } }