]> CyberLeo.Net >> Repos - Github/YOURLS.git/blob - yourls-infos.php
Allow multiple short URLs for the same long URL. Fixes Issue 35.
[Github/YOURLS.git] / yourls-infos.php
1 <?php\r
2 // Require Files\r
3 require_once( dirname(__FILE__).'/includes/load-yourls.php' );\r
4 require_once( dirname(__FILE__).'/includes/functions-infos.php' );\r
5 yourls_maybe_require_auth();\r
6 \r
7 if ( !isset( $_GET['id'] ) )\r
8         yourls_redirect( YOURLS_SITE, 307 );\r
9         \r
10 $aggregate = false;\r
11 if ( isset( $_GET['all'] ) && $_GET['all'] == 1 && yourls_allow_duplicate_longurls() )\r
12         $aggregate = true;\r
13 \r
14 // Get basic infos for this shortened URL\r
15 $keyword = yourls_sanitize_string( $_GET['id'] );\r
16 $longurl = yourls_get_keyword_longurl( $keyword );\r
17 $clicks = yourls_get_keyword_clicks( $keyword );\r
18 $timestamp = yourls_get_keyword_timestamp( $keyword );\r
19 \r
20 if ( $longurl === false )\r
21         yourls_redirect( YOURLS_SITE, 307 );\r
22 \r
23 // Duplicate keywords, if applicable\r
24 $keyword_list = yourls_get_duplicate_keywords( $longurl );\r
25         \r
26 // Fetch all information from the table log\r
27 $table = YOURLS_DB_TABLE_LOG;\r
28 \r
29 \r
30 if( $aggregate ) {\r
31         $keywords = join( "', '", $keyword_list );\r
32         // Fetch information for all keywords pointing to $longurl\r
33         $hits = $ydb->get_results( "SELECT `shorturl`, `click_time`, `referrer`, `user_agent`, `country_code` FROM `$table` WHERE `shorturl` IN ( '$keywords' );" );\r
34 } else {\r
35         // Fetch information for current keyword only\r
36         $hits = $ydb->get_results( "SELECT `click_time`, `referrer`, `user_agent`, `country_code` FROM `$table` WHERE `shorturl` = '$keyword';" );\r
37 }\r
38 \r
39 $referrers = array();\r
40 $direct = 0;\r
41 $countries = array();\r
42 $dates = array();\r
43 $list_of_days = array();\r
44 $list_of_months = array();\r
45 $list_of_years = array();\r
46 $last_24h = array();\r
47 \r
48 // Loop through all results and build list of referrers, countries and hits per day\r
49 foreach( (array)$hits as $hit ) {\r
50         extract( (array)$hit );\r
51 \r
52         if ( isset( $country_code ) && $country_code ) {\r
53                 if( !array_key_exists( $country_code, $countries ) )\r
54                         $countries[$country_code] = 0;\r
55                 $countries[$country_code]++;\r
56         }\r
57         \r
58         if( isset( $referrer ) ) {\r
59                 if ( $referrer == 'direct' ) {\r
60                         $direct++;\r
61                 } else {\r
62                         $host = yourls_get_domain( $referrer );\r
63                         if( !array_key_exists( $host, $referrers ) )\r
64                                 $referrers[$host] = array( );\r
65                         if( !array_key_exists( $referrer, $referrers[$host] ) )\r
66                                 $referrers[$host][$referrer] = 0;\r
67                         $referrers[$host][$referrer]++;\r
68                 }\r
69         }\r
70         \r
71         if( isset( $click_time ) ) {\r
72                 $now = intval( date('U') );\r
73 \r
74                 preg_match('/(\d+)-(\d+)-(\d+)\s(\d+):(\d+):(\d+)/', $click_time, $matches);\r
75                 list( $temp, $year, $month, $day, $hour, $min, $sec ) = $matches;\r
76                 unset( $matches );\r
77                 \r
78                 // Build array of $dates[$year][$month][$day] = number of clicks\r
79                 if( !array_key_exists( $year, $dates ) )\r
80                         $dates[$year] = array();\r
81                 if( !array_key_exists( $month, $dates[$year] ) )\r
82                         $dates[$year][$month] = array();\r
83                 if( !array_key_exists( $day, $dates[$year][$month] ) )\r
84                         $dates[$year][$month][$day] = 0;\r
85                 $dates[$year][$month][$day]++;\r
86                 \r
87                 // Build array of last 24 hours $last_24h[$hour] = number of click\r
88                 $then = strtotime( $click_time);\r
89                 if( ( $now >= $then ) && ( ( $now - $then ) < ( 24 * 60 * 60 ) ) ) {\r
90                         $year = sprintf( "%02d", substr( $year, -1, 2 ) ); // 2009 -> 09\r
91                         $diff = $now - strtotime( $click_time);\r
92                         if( !array_key_exists( "$year-$month-$day-$hour", $last_24h ) )\r
93                                 $last_24h["$year-$month-$day-$hour"] = 0;\r
94                         $last_24h["$year-$month-$day-$hour"]++;\r
95                 }\r
96         }\r
97 }\r
98 \r
99 \r
100 // Sort dates, chronologically from [2007][12][24] to [2009][02][19]\r
101 ksort( $dates );\r
102 foreach( $dates as $year=>$months ) {\r
103         ksort( $dates[$year] );\r
104         foreach( $months as $month=>$day ) {\r
105                 ksort( $dates[$year][$month] );\r
106         }\r
107 }\r
108 \r
109 // Get $list_of_days, $list_of_months, $list_of_years\r
110 if( $dates ) {\r
111         extract( yourls_build_list_of_days( $dates ) );\r
112 \r
113         // If the $last_24h doesn't have all the hours, insert missing hours with value 0\r
114         for ($i = 23; $i >= 0; $i--) {\r
115                 $h = date('y-m-d-H', $now - ($i * 60 * 60) );\r
116                 if( !array_key_exists( $h, $last_24h ) ) {\r
117                         $last_24h[$h] = 0;\r
118                 }\r
119         }\r
120         ksort( $last_24h );\r
121 }\r
122 \r
123 // Sort countries, most frequent first\r
124 if ( $countries )\r
125         arsort( $countries );\r
126 \r
127 // Sort referrers. $referrer_sort is a array of most frequent domains\r
128 arsort( $referrers );\r
129 $referrer_sort = array();\r
130 $number_of_sites = count( array_keys( $referrers ) );\r
131 foreach( $referrers as $site => $urls ) {\r
132         if( count($urls) > 1 || $number_of_sites == 1 )\r
133                 $referrer_sort[$site] = array_sum( $urls );\r
134 }\r
135 arsort($referrer_sort);\r
136 \r
137 /**\r
138 echo "<pre>";\r
139 //echo "referrers: "; print_r( $referrers );\r
140 //echo "referrer sort: "; print_r( $referrer_sort );\r
141 echo "dates: "; print_r( $dates );\r
142 echo "list of days: "; print_r( $list_of_days );\r
143 echo "list_of_months: "; print_r( $list_of_months );\r
144 echo "list_of_years: "; print_r( $list_of_years );\r
145 echo "last_24h: "; print_r( $last_24h );\r
146 //echo "countries: "; print_r( $countries );\r
147 \r
148 die();\r
149 /**/\r
150 \r
151 \r
152 yourls_html_head( 'infos' );\r
153 ?>\r
154 \r
155 <h1>\r
156         <a href="<?php echo YOURLS_SITE; ?>/admin/index.php" title="YOURLS"><span>YOURLS</span>: <span>Y</span>our <span>O</span>wn <span>URL</span> <span>S</span>hortener<br/>\r
157         <img src="<?php echo YOURLS_SITE; ?>/images/yourls-logo.png" alt="YOURLS" title="YOURLS" style="border: 0px;" /></a>\r
158 </h1>\r
159 <?php if ( yourls_is_private() ) { ?>\r
160 <p>Your are logged in as: <strong><?php echo YOURLS_USER; ?></strong>. <a href="?mode=logout" title="Logout">Logout</a></p>\r
161 <?php } ?>\r
162 \r
163 <h2 id="informations">Informations</h2>\r
164 \r
165 <h3>Short URL: <img src="<?php echo YOURLS_SITE; ?>/images/favicon.gif"/>\r
166 <?php if( $aggregate ) {\r
167         $i = 0;\r
168         foreach( $keyword_list as $k ) {\r
169                 $i++;\r
170                 if ( $i == 1 ) {\r
171                         yourls_html_link( YOURLS_SITE."/$k" );\r
172                 } else {\r
173                         yourls_html_link( YOURLS_SITE."/$k", "/$k" );\r
174                 }\r
175                 if ( $i < count( $keyword_list ) )\r
176                         echo ' + ';\r
177         }\r
178 } else {\r
179         yourls_html_link( YOURLS_SITE."/$keyword" );\r
180         if( count( $keyword_list ) > 1 )\r
181                 echo ' <a href="'. YOURLS_SITE .'/'.$keyword.'+all" title="Aggregate stats for duplicate short URLs"><img src="' . YOURLS_SITE . '/images/chart_bar_add.png" border="0" /></a>';\r
182 } ?></h3>\r
183 <h3 id="longurl">Long URL: <img class="fix_images" src="<?php echo yourls_get_domain( $longurl, true );?>/favicon.ico"/> <?php yourls_html_link( $longurl, '', 'longurl' ); ?></h3>\r
184 \r
185 <div id="tabs">\r
186         <div class="wrap_unfloat">\r
187         <ul id="headers" class="toggle_display stat_tab">\r
188                 <li class="selected"><a href="#stat_tab_stats"><h2>Traffic statistics</h2></a></li>\r
189                 <li><a href="#stat_tab_location"><h2>Traffic location</h2></a></li>\r
190                 <li><a href="#stat_tab_sources"><h2>Traffic sources</h2></a></li>\r
191                 <li><a href="#stat_tab_share"><h2>Share</h2></a></li>\r
192         </ul>\r
193         </div>\r
194 \r
195                         \r
196         <div id="stat_tab_stats" class="tab">\r
197                 <h2>Traffic statistics</h2>\r
198                 \r
199                 <?php if ( $list_of_days ) { ?>\r
200                 \r
201                         <?php\r
202                         $graphs = array(\r
203                                 '24' => 'Last 24 hours',\r
204                                 '7'  => 'Last 7 days',\r
205                                 '30' => 'Last 30 days',\r
206                                 'all'=> 'All time'\r
207                         );\r
208                         \r
209                         // Which graph to generate ?\r
210                         $do_all = $do_30 = $do_7 = $do_24 = false;\r
211                         $hits_all = array_sum( $list_of_days );\r
212                         $hits_30  = array_sum( array_slice( $list_of_days, -30 ) );\r
213                         $hits_7   = array_sum( array_slice( $list_of_days, -7 ) );\r
214                         $hits_24  = array_sum( $last_24h );\r
215                         if( $hits_all > 0 )\r
216                                 $do_all = true; // graph for all days range\r
217                         if( $hits_30 > 0 && count( array_slice( $list_of_days, -30 ) ) == 30 )\r
218                                 $do_30 = true; // graph for last 30 days\r
219                         if( $hits_7 > 0 && count( array_slice( $list_of_days, -7 ) ) == 7 )\r
220                                 $do_7 = true; // graph for last 7 days\r
221                         if( $hits_24 > 0 )\r
222                                 $do_24 = true; // graph for last 24 hours\r
223                         \r
224                         // Which graph to display ?\r
225                         $display_all = $display_30 = $display_7 = $display_24 = false;\r
226                         if( $do_24 ) {\r
227                                 $display_24 = true;\r
228                         } elseif ( $do_7 ) {\r
229                                 $display_7 = true;\r
230                         } elseif ( $do_30 ) {\r
231                                 $display_30 = true;\r
232                         } elseif ( $do_all ) {\r
233                                 $display_all = true;\r
234                         }                               \r
235                         ?>\r
236 \r
237                         <table border="0" cellspacing="2">\r
238                         <tr>\r
239                                 <td valign="top">\r
240                                 <ul id="stats_lines" class="toggle_display stat_line">\r
241                                 <?php\r
242                                 if( $do_24 == true )\r
243                                         echo "<li><a href='#stat_line_24'>Last 24 hours</a>";\r
244                                 if( $do_7 == true )\r
245                                         echo "<li><a href='#stat_line_7'>Last 7 days</a>";\r
246                                 if( $do_30 == true )\r
247                                         echo "<li><a href='#stat_line_30'>Last 30 days</a>";\r
248                                 if( $do_all == true )\r
249                                         echo "<li><a href='#stat_line_all'>All time</a>";\r
250                                 ?>                              \r
251                                 </ul>\r
252                                 <?php\r
253                                 // Generate, and display if applicable, each needed graph\r
254                                 foreach( $graphs as $graph => $title ) {\r
255                                         if( ${'do_'.$graph} == true ) {\r
256                                                 $display = ( ${'display_'.$graph} === true ? 'display:block' : 'display:none' );\r
257                                                 echo "<div id='stat_line_$graph' class='stats_line line' style='$display'>";\r
258                                                 $labels_1 = $labels_2 = array();\r
259                                                 switch( $graph ) {\r
260                                                         case '24':\r
261                                                                 // each key of $last_24h is of type "yy-mm-dd-hh"\r
262                                                                 $first_key = current( array_keys( $last_24h ) );\r
263                                                                 $last_key = end( array_keys( $last_24h ) );\r
264                                                                 // Get "dd/mm" of first and last key\r
265                                                                 $first_label = preg_replace( '/\d\d-(\d\d)-(\d\d)-\d\d/', '$2/$1', $first_key );\r
266                                                                 $last_label = preg_replace( '/\d\d-(\d\d)-(\d\d)-\d\d/', '$2/$1', $last_key );\r
267                                                                 $labels_2 = array( $first_label, $last_label);\r
268                                                                 // Get hh of each key\r
269                                                                 foreach( $last_24h as $k=>$v ) {\r
270                                                                         $labels_1[] = end( explode( '-', $k ) ); // 'hh'\r
271                                                                 }\r
272                                                                 \r
273                                                                 echo "<h3>Number of hits : $title</h3>";\r
274                                                                 yourls_stats_line( $last_24h, $labels_1, $labels_2 );\r
275                                                                 break;\r
276 \r
277                                                         case '7':\r
278                                                         case '30':\r
279                                                                 // each key of $list_of_days is of type "yyyy-mm-dd"\r
280                                                                 $slice = array_slice( $list_of_days, intval( $graph ) * -1 );\r
281                                                                 foreach( $slice as $k=>$v ) {\r
282                                                                         // get "dd"\r
283                                                                         $labels_1[] = preg_replace( '/\d\d\d\d-\d\d-(\d\d)/', '$1', $k );\r
284                                                                 }\r
285                                                                 $first_key = current( array_keys( $slice ) );\r
286                                                                 $last_key = end( array_keys( $slice ) );\r
287                                                                 // Get "dd/mm" of first and last key\r
288                                                                 $first_label = preg_replace( '/\d\d\d\d-(\d\d)-(\d\d)/', '$2/$1', $first_key );\r
289                                                                 $last_label = preg_replace( '/\d\d\d\d-(\d\d)-(\d\d)/', '$2/$1', $last_key );\r
290                                                                 $labels_2 = array( $first_label, $last_label);\r
291                                                                 \r
292                                                                 echo "<h3>Number of hits : $title</h3>";\r
293                                                                 yourls_stats_line( $slice, $labels_1, $labels_2 );\r
294                                                                 unset( $slice );\r
295                                                                 break;\r
296 \r
297                                                         case 'all':\r
298                                                                 // get "yy-mm"\r
299                                                                 foreach( $list_of_days as $k=>$v ) {\r
300                                                                         $labels_1[] = preg_replace( '/\d\d(\d\d)-(\d\d)-\d\d/', '$1-$2', $k );\r
301                                                                 }\r
302                                                                 // take out duplicates\r
303                                                                 $labels_1 = array_unique( $labels_1 );\r
304                                                                 // now get "mm" only so we have all different month\r
305                                                                 foreach( $labels_1 as $k=>$v ) {\r
306                                                                         $labels_1[$k] = preg_replace( '/\d\d-(\d\d)/', '$1', $v );\r
307                                                                 }\r
308                                                                 \r
309                                                                 echo "<h3>Number of hits : $title</h3>";\r
310                                                                 $labels_1 = yourls_array_granularity( $labels_1, 30, false );\r
311                                                                 $labels_2 = yourls_array_granularity( $list_of_years, 30, false );\r
312                                                                 yourls_stats_line( $list_of_days, $labels_1, $labels_2 );\r
313                                                                 break;\r
314                                                 }\r
315                                                 echo "</div>\n";\r
316                                         }                       \r
317                                 } ?>\r
318                                 \r
319                                 </td>\r
320                                 <td valign="top">\r
321                                 <h3>Historical click count</h3>\r
322                                 <?php\r
323                                 $ago = round( (date('U') - strtotime($timestamp)) / (24* 60 * 60 ) );\r
324                                 if( $ago <= 1 ) {\r
325                                         $ago = '';\r
326                                 } else {\r
327                                         $ago = '(about '.$ago .' '.yourls_plural( ' day', $ago ).' ago)';\r
328                                 }\r
329                                 ?>\r
330                                 <p>Short URL created on <?php echo date("F j, Y @ g:i a", strtotime($timestamp)); ?> <?php echo $ago; ?></p>\r
331                                 <div class="wrap_unfloat">\r
332                                         <ul class="no_bullet toggle_display stat_line" id="historical_clicks">\r
333                                         <?php\r
334                                         foreach( $graphs as $graph => $title ) {\r
335                                                 if ( ${'do_'.$graph} ) {\r
336                                                         $link = "<a href='#stat_line_$graph'>$title</a>";\r
337                                                 } else {\r
338                                                         $link = $title;\r
339                                                 }\r
340                                                 $hits = yourls_plural( 'hit', ${'hits_'.$graph} );\r
341                                                 echo "<li><span class='historical_link'>$link</span> ${'hits_'.$graph} $hits</li>\n";\r
342                                         }\r
343                                         ?>\r
344                                         </ul>\r
345                                 </div>\r
346                 \r
347                                 <h3>Best day</h3>\r
348                                 <?php $best = yourls_stats_get_best_day( $list_of_days ); ?>\r
349                                 <p><strong><?php echo $best['max'];?></strong> <?php echo yourls_plural( 'hit', $best['max'] ); ?> on <?php echo date("F j, Y", strtotime($best['day'])); ?>. \r
350                                 <a href="" class='details' id="more_clicks">Click for more details</a></p>\r
351                                 <ul id="details_clicks" style="display:none">\r
352                                         <?php\r
353                                         foreach( $dates as $year=>$months ) {\r
354                                                 if( count( $list_of_years ) > 1 ) {\r
355                                                         $li = "<a href='' class='details' id='more_year$year'>Year $year</a>";\r
356                                                         $display = 'none';\r
357                                                 } else {\r
358                                                         $li = "Year $year";\r
359                                                         $display = 'block';\r
360                                                 }\r
361                                                 echo "<li>$li";\r
362                                                 echo "<ul style='display:$display' id='details_year$year'>";\r
363                                                 foreach( $months as $month=>$days ) {\r
364                                                         $monthname = date("F", mktime(0, 0, 0, $month,1));\r
365                                                         if( count( $list_of_months ) > 1 ) {\r
366                                                                 $li = "<a href='' class='details' id='more_month$year$month'>$monthname</a>";\r
367                                                                 $display = 'none';\r
368                                                         } else {\r
369                                                                 $li = "$monthname";\r
370                                                                 $display = 'block';\r
371                                                         }\r
372                                                         echo "<li>$li";\r
373                                                         echo "<ul style='display:$display' id='details_month$year$month'>";\r
374                                                                 foreach( $days as $day=>$hits ) {\r
375                                                                         $class = ( $hits == $best['max'] ? 'class="bestday"' : '' );\r
376                                                                         echo "<li $class>$day: $hits". yourls_plural( ' hit', $hits) ."</li>\n";\r
377                                                                 }\r
378                                                         echo "</ul>\n";\r
379                                                 }\r
380                                                 echo "</ul>\n";\r
381                                         }\r
382                                         ?>\r
383                                 </ul>\r
384                                 \r
385                                 </td>\r
386                                 \r
387                         </tr>\r
388                         </table>\r
389 \r
390 \r
391                 \r
392                 <?php } else {\r
393                         echo "<p>No traffic yet. Get some clicks first!</p>";\r
394                 } ?>\r
395         </div>\r
396 \r
397 \r
398         <div id="stat_tab_location" class="tab">\r
399                 <h2>Traffic location</h2>\r
400                 \r
401                 <?php if ( $countries ) { ?>\r
402                         \r
403                         <table border="0" cellspacing="2">\r
404                         <tr>\r
405                                 <td valign="top">\r
406                                         <h3>Top 5 countries</h3>\r
407                                         <?php yourls_stats_pie( $countries, 5 ); ?>\r
408                                         <p><a href="" class='details' id="more_countries">Click for more details</a></p>\r
409                                         <ul id="details_countries" style="display:none" class="no_bullet">\r
410                                         <?php\r
411                                         foreach( $countries as $code=>$count ) {\r
412                                                 echo "<li><img src='".yourls_geo_get_flag( $code )."' /> $code (".yourls_geo_countrycode_to_countryname( $code ).") : $count ".yourls_plural('hit', $count)."</li>\n";\r
413                                         }               \r
414                                         ?>\r
415                                         </ul>\r
416 \r
417                                 </td>\r
418                                 <td valign="top">\r
419                                         <h3>Overall traffic</h3>\r
420                                         <?php yourls_stats_countries_map( $countries ); ?>\r
421                                 </td>\r
422                         </tr>\r
423                         </table>\r
424                 \r
425                 <?php } else {\r
426                         echo "<p>No country data.</p>";\r
427                 } ?>\r
428         </div>\r
429                                 \r
430                                 \r
431         <div id="stat_tab_sources" class="tab">\r
432                 <h2>Traffic Sources</h2>\r
433                 \r
434                 <?php if ( $referrers ) { ?>\r
435                         \r
436                         <table border="0" cellspacing="2">\r
437                         <tr>\r
438                                 <td valign="top">\r
439                                         <h3>Referrer shares</h3>\r
440                                         <?php\r
441                                         if ( $number_of_sites > 1 )\r
442                                                 $referrer_sort['Others'] = count( $referrers );\r
443                                         yourls_stats_pie( $referrer_sort, 5, '440x220', '902020,FF6060' );\r
444                                         unset( $referrer_sort['Others'] );\r
445                                         ?>\r
446                                         <h3>Referrers</h3>\r
447                                         <ul class="no_bullet">\r
448                                                 <?php\r
449                                                 $i = 0;\r
450                                                 foreach( $referrer_sort as $site => $count ) {\r
451                                                         $i++;\r
452                                                         echo "<li class='sites_list'><img src='http://$site/favicon.ico' class='fix_images'/> $site: <strong>$count</strong> <a href='' class='details' id='more_url$i'>(details)</a></li>\n";\r
453                                                         echo "<ul id='details_url$i' style='display:none'>";\r
454                                                         foreach( $referrers[$site] as $url => $count ) {\r
455                                                                 echo "<li>"; yourls_html_link($url); echo ": <strong>$count</strong></li>\n";\r
456                                                         }\r
457                                                         echo "</ul>\n";\r
458                                                         unset( $referrers[$site] );\r
459                                                 }\r
460                                                 // Any referrer left? Group in "various"\r
461                                                 if ( $referrers ) {\r
462                                                         echo "<li id='sites_various'>Various: <strong>". count( $referrers ). "</strong> <a href='' class='details' id='more_various'>(details)</a></li>\n";\r
463                                                         echo "<ul id='details_various' style='display:none'>";\r
464                                                         foreach( $referrers as $url ) {\r
465                                                                 echo "<li>"; yourls_html_link(key($url)); echo ": 1</li>\n";    \r
466                                                         }\r
467                                                         echo "</ul>\n";\r
468                                                 }\r
469                                                 ?>\r
470                                                 \r
471                                         </ul>\r
472                                 \r
473                                 </td>\r
474                                 \r
475                                 <td valign="top">\r
476                                         <h3>Direct vs Referrer Traffic</h3>\r
477                                         <?php\r
478                                         $ref_traffic = count($referrer_sort) + count($referrers);\r
479                                         yourls_stats_pie( array('Direct'=>$direct, 'Referrers'=> $ref_traffic), 5, '440x220', '902020,FF6060' );\r
480                                         ?>\r
481                                         <p>Direct traffic: <strong><?php echo $direct; ?></strong> <?php echo yourls_plural( 'hit', $direct ); ?> </p>\r
482                                         <p>Referrer traffic: <strong><?php echo $ref_traffic; ?></strong> <?php echo yourls_plural( 'hit', $ref_traffic ); ?> </p>\r
483 \r
484                                 </td>\r
485                         </tr>\r
486                         </table>\r
487 \r
488                 <?php } else {\r
489                         echo "<p>No referrer data.</p>";\r
490                 } ?>\r
491                         \r
492         </div>\r
493 \r
494         <div id="stat_tab_share" class="tab">\r
495                 <h2>Share</h2>\r
496                 \r
497                 <?php yourls_share_box( $longurl, YOURLS_SITE.'/'.$keyword, '', '', '<h3>Short link</h3>', '<h3>Quick Share</h3>'); ?>\r
498 \r
499         </div>\r
500         \r
501 </div>\r
502 \r
503 \r
504 <?php yourls_html_footer(); ?>