Пример #1
0
    	echo "list_of_months: "; print_r( $list_of_months );
    	echo "list_of_years: "; print_r( $list_of_years );
    	echo "last_24h: "; print_r( $last_24h );
    	echo "countries: "; print_r( $countries );
    	die();
    	/**/
}
yourls_html_head('infos', yourls_s('Statistics for %s', YOURLS_SITE . '/' . $keyword));
yourls_html_logo();
//yourls_html_menu();
?>

<div class="panel panel-teaser">
<div class="panel-header">
	<h2 id="informations"><?php 
echo yourls_esc_html($title);
?>
</h2>
</div>
<div class="panel-body">

<h3><span class="label"><?php 
yourls_e('Short URL');
?>
:</span> <img src="<?php 
print yourls_favicon();
?>
"/>
<?php 
if ($aggregate) {
    $i = 0;
Пример #2
0
		<atom:link href="<?php 
echo YOURLS_SITE;
?>
/rss.php" rel="self" type="application/rss+xml" />
		<generator>YOURLS v<?php 
echo YOURLS_VERSION;
?>
</generator>
		<language>en</language>
		<?php 
foreach ($items['links'] as $item) {
    ?>
		
		<item>
			<title><?php 
    echo yourls_esc_html($item['title']);
    ?>
</title>
			<description><?php 
    echo htmlentities($item['url']);
    echo htmlentities('<img src="https://piwik.mylesb.ca/piwik.php?idsite=15&rec=1" style="border:0" alt="" />');
    ?>
</description>
			<pubDate><?php 
    echo date('D, d M Y H:i:s O', strtotime($item['timestamp']));
    ?>
</pubDate>
			<link><?php 
    echo $item['shorturl'];
    ?>
</link>
Пример #3
0
/**
 * Echo HTML tag for a link
 *
 */
function yourls_html_link($href, $title = '', $element = '')
{
    if (!$title) {
        $title = $href;
    }
    if ($element) {
        $element = sprintf('id="%s"', yourls_esc_attr($element));
    }
    $link = sprintf('<a href="%s" %s>%s</a>', yourls_esc_url($href), $element, yourls_esc_html($title));
    echo yourls_apply_filter('html_link', $link);
}
Пример #4
0
            $search_in = 'keyword';
            break;
        case 'url':
            $search_in_text = yourls__('URL');
            $search_in = 'url';
            break;
        case 'title':
            $search_in_text = yourls__('Title');
            $search_in = 'title';
            break;
        case 'ip':
            $search_in_text = yourls__('IP Address');
            $search_in = 'ip';
            break;
    }
    $search_sentence = yourls_s('Searching for <strong>%1$s</strong> in <strong>%2$s</strong>.', yourls_esc_html($search), yourls_esc_html($search_in_text));
    $search_url = yourls_sanitize_url("&amp;search={$search}&amp;search_in={$search_in}");
    $search_text = $search;
    $search = str_replace('*', '%', '*' . yourls_escape($search) . '*');
    if ($search_in == 'all') {
        $where .= " AND CONCAT_WS('',`keyword`,`url`,`title`,`ip`) LIKE ('{$search}')";
        // Search across all fields. The resulting SQL will be something like:
        // SELECT * FROM `yourls_url` WHERE CONCAT_WS('',`keyword`,`url`,`title`,`ip`) LIKE ("%ozh%")
        // CONCAT_WS because CONCAT('foo', 'bar’, NULL) = NULL. NULL wins. Not sure if values can be NULL now or in the future, so better safe.
        // TODO: pay attention to this bit when the DB schema changes
    } else {
        $where .= " AND `{$search_in}` LIKE ('{$search}')";
    }
}
// Time span
if (!empty($_GET['date_filter'])) {
Пример #5
0
/**
 * Return translated text, with context, that has been escaped for safe use in HTML output
 *
 * @see yourls_translate() Return returned yourls_translate() string
 * @see yourls_esc_attr()
 * @see yourls_x()
 * @since 1.6
 *
 * @param string   $single
 * @param string   $context
 * @param string   $domain Optional. Domain to retrieve the translated text
 * @internal param string $text Text to translate
 * @return string
 */
function yourls_esc_html_x($single, $context, $domain = 'default')
{
    return yourls_esc_html(yourls_translate_with_context($single, $context, $domain));
}