From 20407702b92cb93970eaa4a71e659f383d2f92a5 Mon Sep 17 00:00:00 2001 From: jimmacfx Date: Fri, 25 Nov 2005 22:45:21 +0000 Subject: 0.11 git-svn-id: https://forgesvn1.novell.com/svn/original/trunk@8 4fa712ea-3c06-0410-9261-c11b4c06c003 --- www/inc/www.class.inc.php | 221 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 221 insertions(+) create mode 100644 www/inc/www.class.inc.php (limited to 'www/inc/www.class.inc.php') diff --git a/www/inc/www.class.inc.php b/www/inc/www.class.inc.php new file mode 100644 index 0000000..2206382 --- /dev/null +++ b/www/inc/www.class.inc.php @@ -0,0 +1,221 @@ +\n"; + /* + echo "\n"; + */ + echo "\n"; + echo "\n"; + echo "\n"; + + #IE hacks + echo "\n"; + echo "\n"; + + echo " $title\n"; + echo "\n"; + echo "\n"; + # mozilla style links + if ($snimek && $galerie) { + #Top + echo " \n"; + #First + #Prev + $predchozi = $snimek - 1; + $dalsi = $snimek + 1; + if ($snimek > 1) { + echo " \n"; + echo " \n"; + } + #Next + if (is_file("$gallery_dir/$galerie/lq/img-$dalsi.jpg")) { + echo " \n"; + } + #Last + $adr = opendir("$gallery_dir/$galerie/thumbs/"); + $i = -2; + while ($file = readdir($adr)) { + $i++; + } + if ($i!=$snimek) { + echo " \n"; + } + } + + /* check the theme in a cookie */ + $theme = @$_COOKIE["theme"]; + if (!$theme) { //we didn't set the cookie yet + // select first key of the themes array in config.inc.php as default + $theme_keys = array_keys($themes); + $theme = $theme_keys[0]; + } + foreach ($themes as $skin => $url) { + echo "\n"; + } + + //require("javascript.inc.php"); + echo "\n"; + echo "\n\n"; + echo "\n"; + } + + //// + // !zavre html stranku + function footer() { + echo "\n"; + echo "\n"; + } + + //// + // !vypise chybovou hlasku + // $title - nadpis a title HTML stranky + // $message - vlastni chybova hlaska + function error($title, $message) { + $this->header($title); + echo "

$title

\n"; + echo $message; + $this->footer(); + exit; //vysere se na vsechno + } + + + + //// + // !zacatek fomrulare + function form_start($action, $method, $upload) { + echo "
\n"; + } + + //// + // !konec formulare + function form_end() { + echo "
\n"; + } + + //// + // !vykresli polozku formulare + // umi text, password, submit, file, hidden, textarea, select + // u textarea je default pocet radku... + function input($type, $name, $value, $popis, $default, $title) { + echo "
\n"; + if (!$title) { + echo "
$popis
\n"; + } else { + echo " \n"; + } + echo "
"; + switch ($type) { + case "checkbox": + echo ""; + break; + case "password": + case "text": + echo ""; + break; + case "file": + echo ""; + break; + case "hidden": + echo ""; + break; + case "textarea": + echo ""; + break; + case "select": + echo ""; + break; + case "submit": + echo ""; + break; + } + echo "
\n"; + echo "
\n"; + } + + +} + +# return dirs sorted +class SortDir { + var $items; + + function SortDir($directory) { + $handle=@opendir($directory); + if (!$handle) return; + while ($file = readdir($handle)) { + if ($file != "." && $file != "..") { + $this->items[]=$file; + } + } + closedir($handle); + if ($this->items) { + natsort($this->items); + } + } + + function Read() { + if ($this->items) { + $getback= (pos($this->items)); + next($this->items); + return $getback; + } + } +} + +?> -- cgit v1.2.3