= 1024 && $i < 4; $i++) $size /= 1024; return round($size, 2).$units[$i]; } function commaize($n) { $n = strval($n); return (intval($n) < 1000) ? $n : commaize(substr($n, 0, -3)) . ',' . substr($n, -3); } function error($message) { global $board, $mod; if(function_exists('sql_close')) sql_close(); die(Element('page.html', Array( 'index'=>ROOT, 'title'=>'Error', 'subtitle'=>'An error has occured.', 'body'=>"
'; // Subject if(!empty($this->subject)) $built .= '' . $this->subject . ' '; // Email if(!empty($this->email)) $built .= ''; // Name $built .= '' . $this->name . '' // Trip . (!empty($this->trip) ? ' '.$this->trip.'':''); // IP Address if($this->mod && $this->mod['type'] >= MOD_SHOW_IP) { $built .= ' [' . $this->ip . ']'; } // End email if(!empty($this->email)) $built .= ''; // Date/time $built .= ' ' . date(POST_DATE, $this->time); $built .= ' No.' . // JavaScript cite ''.$this->id.'' . '
'; // File info if(!empty($this->file) && $this->file != 'deleted') { $built .= 'File: ' . $this->file . ' (' . // Filesize format_bytes($this->filesize) . ', ' . // File dimensions $this->filex . 'x' . $this->filey; // Aspect Ratio if(SHOW_RATIO) { $fraction = fraction($this->filex, $this->filey, ':'); $built .= ', ' . $fraction; } // Filename $built .= ', ' . $this->filename . ')
' . // Thumbnail '' . $this->body . '
File: ' . $this->file . ' (' . // Filesize format_bytes($this->filesize) . ', ' . // File dimensions $this->filex . 'x' . $this->filey; // Aspect Ratio if(SHOW_RATIO) { $fraction = fraction($this->filex, $this->filey, ':'); $built .= ', ' . $fraction; } // Filename $built .= ', ' . $this->filename . ')
' . // Thumbnail '';
// Subject
if(!empty($this->subject))
$built .= '' . $this->subject . ' ';
// Email
if(!empty($this->email))
$built .= '';
// Name
$built .= '' . $this->name . ''
// Trip
. (!empty($this->trip) ? ' '.$this->trip.'':'');
// IP Address
if($this->mod && $this->mod['type'] >= MOD_SHOW_IP) {
$built .= ' [' . $this->ip . ']';
}
// End email
if(!empty($this->email))
$built .= '';
// Date/time
$built .= ' ' . date(POST_DATE, $this->time);
$built .= ' No.' .
// JavaScript cite
''.$this->id.'' .
// Sticky
($this->sticky ? '' : '') .
// Locked
($this->locked ? '
' : '') .
// [Reply]
($index ? '[Reply]' : '') .
// Mod controls
$this->postControls() .
'