= 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, $config; if(function_exists('sql_close')) sql_close(); die(Element('page.html', Array( 'index'=>$config['root'], 'title'=>'Error', 'subtitle'=>'An error has occured.', 'body'=>"
' . // Delete ''; $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($config['show_ratio']) { $fraction = fraction($this->filex, $this->filey, ':'); $built .= ', ' . $fraction; } // Filename $built .= ', ' . $this->filename . ')
' . // Thumbnail ''; } elseif($this->file == 'deleted') { $built .= ''; } $built .= $this->postControls(); // Body $built .= '' . $this->body . '
File: ' . $this->file . ' (' . // Filesize format_bytes($this->filesize) . ', ' . // File dimensions $this->filex . 'x' . $this->filey; // Aspect Ratio if($config['show_ratio']) { $fraction = fraction($this->filex, $this->filey, ':'); $built .= ', ' . $fraction; } // Filename $built .= ', ' . $this->filename . ')
' . // Thumbnail ''; $built .= ''; // Delete $built .= ''; $built .= ' No.' . // JavaScript cite ''.$this->id.'' . // Sticky ($this->sticky ? '' : '') . // Locked ($this->locked ? '' : '') . // [Reply] ($index ? '[Reply]' : '') . // Mod controls $this->postControls() . '
'; // Body $built .= $this->body . // Omitted posts ($this->omitted ? '' . $this->omitted . ' post' . ($this->omitted==1?'':'s') . ' omitted. Click reply to view.':'') . // End '