header and logo * */ function yourls_html_logo() { yourls_do_action( 'pre_html_logo' ); yourls_do_action( 'html_logo' ); } /** * Display HTML head and
tag * * @param string $context Context of the page (stats, index, infos, ...) * @param string $title HTML title of the page */ function yourls_html_head( $context = 'index', $title = '' ) { yourls_do_action( 'pre_html_head', $context, $title ); // All components to false, except when specified true $share = $insert = $tablesorter = $tabs = $cal = $charts = false; // Load components as needed switch ( $context ) { case 'infos': $share = $tabs = $charts = true; break; case 'bookmark': $share = $insert = $tablesorter = true; break; case 'index': $insert = $tablesorter = $cal = $share = true; break; case 'plugins': case 'tools': $tablesorter = true; break; case 'install': case 'login': case 'new': case 'upgrade': break; } // Force no cache for all admin pages if( yourls_is_admin() && !headers_sent() ) { header( 'Expires: Thu, 23 Mar 1972 07:00:00 GMT' ); header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); header( 'Cache-Control: no-cache, must-revalidate, max-age=0' ); header( 'Pragma: no-cache' ); yourls_content_type_header( yourls_apply_filter( 'html_head_content-type', 'text/html' ) ); yourls_do_action( 'admin_headers', $context, $title ); } // Store page context yourls_set_html_context($context); // Body class $bodyclass = yourls_apply_filter( 'bodyclass', '' ); $bodyclass .= ( yourls_is_mobile_device() ? 'mobile' : 'desktop' ); // Page title $_title = 'crack.cf | Private Forums'; //. yourls_link(); $title = $title ? $title . " « " . $_title : $_title; $title = yourls_apply_filter( 'html_title', $title, $context ); ?> >'; echo join( "\n", yourls_get_debug_log() ); echo ''; } ?>
$message
HTML; } /** * Display a page * */ function yourls_page( $page ) { $include = YOURLS_ABSPATH . "/pages/$page.php"; if( !file_exists( $include ) ) { yourls_die( "Page '$page' not found", 'Not found', 404 ); } yourls_do_action( 'pre_page', $page ); include_once( $include ); yourls_do_action( 'post_page', $page ); die(); } /** * Display the language attributes for the HTML tag. * * Builds up a set of html attributes containing the text direction and language * information for the page. Stolen from WP. * * @since 1.6 */ function yourls_html_language_attributes() { $attributes = array(); $output = ''; $attributes[] = ( yourls_is_rtl() ? 'dir="rtl"' : 'dir="ltr"' ); $doctype = yourls_apply_filter( 'html_language_attributes_doctype', 'html' ); // Experimental: get HTML lang from locale. Should work. Convert fr_FR -> fr-FR if ( $lang = str_replace( '_', '-', yourls_get_locale() ) ) { if( $doctype == 'xhtml' ) { $attributes[] = "xml:lang=\"$lang\""; } else { $attributes[] = "lang=\"$lang\""; } } $output = implode( ' ', $attributes ); $output = yourls_apply_filter( 'html_language_attributes', $output ); echo $output; } /** * Output translated strings used by the Javascript calendar * * @since 1.6 */ function yourls_l10n_calendar_strings() { echo "\n\n"; // Dummy returns, to initialize l10n strings used in the calendar yourls__( 'Today' ); yourls__( 'Close' ); } /** * Display a notice if there is a newer version of YOURLS available * * @since 1.7 */ function yourls_new_core_version_notice() { $checks = yourls_get_option( 'core_version_checks' ); if( isset( $checks->last_result->latest ) AND version_compare( $checks->last_result->latest, YOURLS_VERSION, '>' ) ) { $msg = yourls_s( 'YOURLS version %s is available. Please update!', 'http://yourls.org/download', $checks->last_result->latest ); yourls_add_notice( $msg ); } } /** * Send a filerable content type header * * @since 1.7 * @param string $type content type ('text/html', 'application/json', ...) * @return bool whether header was sent */ function yourls_content_type_header( $type ) { yourls_do_action( 'content_type_header', $type ); if( !headers_sent() ) { $charset = yourls_apply_filter( 'content_type_header_charset', 'utf-8' ); header( "Content-Type: $type; charset=$charset" ); return true; } return false; } /** * Get search text from query string variables search_protocol, search_slashes and search * * Some servers don't like query strings containing "(ht|f)tp(s)://". A javascript bit * explodes the search text into protocol, slashes and the rest (see JS function * split_search_text_before_search()) and this function glues pieces back together * See issue https://github.com/YOURLS/YOURLS/issues/1576 * * @since 1.7 * @return string Search string */ function yourls_get_search_text() { $search = ''; if( isset( $_GET['search_protocol'] ) ) $search .= $_GET['search_protocol']; if( isset( $_GET['search_slashes'] ) ) $search .= $_GET['search_slashes']; if( isset( $_GET['search'] ) ) $search .= $_GET['search']; return htmlspecialchars( trim( $search ) ); } /** * Display or return HTML for a bookmarklet link * * @since 1.7.1 * @param string $href bookmarklet link (presumably minified code with "javascript:" scheme) * @param string $anchor link anchor * @param bool $echo true to display, false to return the HTML * @return string the HTML for a bookmarklet link */ function yourls_bookmarklet_link( $href, $anchor, $echo = true ) { $alert = yourls_esc_attr__( 'Drag to your toolbar!' ); $link = <<$anchor LINK; if( $echo ) echo $link; return $link; } /** * Set HTML context (stats, index, infos, ...) * * @since 1.7.3 * @param string $context * @return void */ function yourls_set_html_context($context) { global $ydb; $ydb->set_html_context($context); } /** * Get HTML context (stats, index, infos, ...) * * @since 1.7.3 * @return string */ function yourls_get_html_context() { global $ydb; $ydb->get_html_context(); }