<?php require_once realpath($_SERVER['DOCUMENT_ROOT']) . '/includes/init_trigger.inc.php'; echo isset($_GET['keyword']) ? list_ajax_user_links('user-birthdates', $_GET['keyword']) : list_ajax_user_links('user-birthdates');
function list_user_links($name) { global $lang_code; global $span_interfaces; $output = ''; $output .= '<a id="birthdates_toggle" class="button">' . translate_span('list_user_links') . '</a>'; $output .= '<div class="clear"></div>'; $output .= '<input id="user_birthdates_search" type="text" name="user_birthdates_search" class="m-wrap" size="60" maxlength="128" />'; $output .= '<i id="user_birthdates_search_label" class="icon-search"></i>'; $output .= '<div id="birthdates">'; $output .= list_ajax_user_links($name); $output .= '</div>'; $output .= '<script> var dobListStatus; if (!$.cookie("NSH:list-' . $name . '-status")) { dobListStatus = "show"; } else { dobListStatus = $.cookie("NSH:list-' . $name . '-status"); } if (dobListStatus == "hide") { $("#birthdates_toggle").removeClass("clicked"); hideBirthdates(); } else if (dobListStatus == "show") { $("#birthdates_toggle").addClass("clicked"); showBirthdates(); } $("#birthdates_toggle").on("click",function(){ if ($(this).hasClass("clicked") && dobListStatus == "show") { $.cookie("NSH:list-' . $name . '-status", "hide") dobListStatus = "hide"; $(this).removeClass("clicked"); hideBirthdates(); } else if (!$(this).hasClass("clicked") && dobListStatus == "hide") { $.cookie("NSH:list-' . $name . '-status", "show") dobListStatus = "show"; $(this).addClass("clicked"); showBirthdates(); } }); $("#user_birthdates_search").on({ input: function(){ searchBirthdates($("#user_birthdates_search").val()); }, change: function(){ searchBirthdates($("#user_birthdates_search").val()); } }); </script>'; return $output; }