Esempio n. 1
0
        echo date(get_option('date_format'), $stat->created_at);
        ?>
 <?php 
        echo date(get_option('time_format'), $stat->created_at);
        ?>
</td>
			<td><a href="http://urbangiraffe.com/map/?ip=<?php 
        echo $stat->ip;
        ?>
"><?php 
        echo $stat->ip;
        ?>
</a></td>
			<td><?php 
        if ($stat->speed > 0) {
            echo DH_File::bytes($stat->speed) . '/s';
        }
        ?>
</td>
			<td><?php 
        if ($stat->speed == 0) {
            echo __('Cancelled', 'drain-hole');
        } else {
            echo DH_File::timespan($stat->time_taken);
        }
        ?>
</td>
			<td><a href="#" onclick="return delete_stat(<?php 
        echo $stat->id;
        ?>
)"><img src="<?php 
Esempio n. 2
0
 /**
  * Replaces inline tags when showing a file
  *
  * @param string $text The text to perform the replacement upon
  * @param DH_Hole $hole The Hole object for the file we are displaying
  * @param DH_File $file The File object representing the file we are displaying
  * @return string The original text with any replacements made
  **/
 function tags_inline($text, $hole, $file)
 {
     $options = $this->get_options();
     $text = str_replace('$url$', $file->url($hole, '', $options['google']), $text);
     $text = str_replace('$size$', $file->bytes($file->filesize($hole)), $text);
     $text = str_replace('$desc$', $file->description, $text);
     $text = str_replace('$updated$', date(get_option('date_format'), $file->updated_at), $text);
     $text = str_replace('$hits$', number_format($file->hits), $text);
     $text = str_replace('$version$', $file->version, $text);
     $text = str_replace('$icon$', $file->icon($hole, $this->url(), $options['google']), $text);
     $text = str_replace('$svn$', $file->svn(), $text);
     $text = str_replace('$href$', $file->url_ref($hole), $text);
     $text = str_replace('$name$', $file->name(), $text);
     $text = str_replace('$iconref$', $file->icon_ref($this->url()), $text);
     $text = str_replace('$md5$', md5($file->file($hole)), $text);
     return $text;
 }