%s', $message); } /** * Echos an notification box * @param $message */ function w3_e_notification_box($message) { echo w3_get_notification_box($message); } /** * Returns an error box * @param $message * @return string */ function w3_get_error_box($message) { return sprintf('
%s
', $message); } /** * Echos an error box * @param $message */ function w3_e_error_box($message) { echo w3_get_error_box($message); } /** * Format bytes into B, KB, MB, GB and TB * @param $bytes * @param int $precision * @return string */ function w3_format_bytes($bytes, $precision = 2) { $units = array('B', 'KB', 'MB', 'GB', 'TB'); $bytes = max($bytes, 0); $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); $pow = min($pow, count($units) - 1); // Uncomment one of the following alternatives $bytes /= pow(1024, $pow); // $bytes /= (1 << (10 * $pow)); return round($bytes, $precision) . ' ' . $units[$pow]; } /** * Echos an input text element * * @param string $id * @param string $name * @param string $value * @param bool $disabled */ function w3_ui_textbox($id, $name, $value, $disabled = false) {?> > >