Changeset 550
- Timestamp:
- 06/30/08 13:45:19 (4 years ago)
- Location:
- trunk
- Files:
-
- 9 added
- 4 deleted
- 69 edited
- 60 copied
- 18 moved
-
css/gallery.css (deleted)
-
dynamics.js (deleted)
-
gallery.php (modified) (1 diff)
-
graphics (deleted)
-
index.php (modified) (3 diffs)
-
lib/plogger (deleted)
-
plog-admin (moved) (moved from trunk/admin)
-
plog-admin/_install.php (moved) (moved from trunk/_install.php) (4 diffs)
-
plog-admin/_upgrade.php (moved) (moved from trunk/_upgrade.php) (16 diffs)
-
plog-admin/css (moved) (moved from trunk/css)
-
plog-admin/css/admin.css (modified) (11 diffs)
-
plog-admin/css/greybox.css (modified) (1 diff)
-
plog-admin/css/lightbox.css (modified) (1 diff)
-
plog-admin/css/tabs.css (modified) (2 diffs)
-
plog-admin/images (added)
-
plog-admin/images/ajax-loader.gif (copied) (copied from trunk/graphics/ajax-loader.gif)
-
plog-admin/images/alert.gif (copied) (copied from trunk/graphics/alert.gif)
-
plog-admin/images/auto.gif (copied) (copied from trunk/graphics/auto.gif)
-
plog-admin/images/bg.gif (copied) (copied from trunk/graphics/bg.gif)
-
plog-admin/images/button-bg.gif (copied) (copied from trunk/graphics/button-bg.gif)
-
plog-admin/images/close.gif (copied) (copied from trunk/graphics/close.gif)
-
plog-admin/images/edit.gif (copied) (copied from trunk/graphics/edit.gif)
-
plog-admin/images/folder_open.gif (copied) (copied from trunk/graphics/folder_open.gif)
-
plog-admin/images/left.gif (copied) (copied from trunk/graphics/left.gif)
-
plog-admin/images/left_on.gif (copied) (copied from trunk/graphics/left_on.gif)
-
plog-admin/images/loading.gif (copied) (copied from trunk/graphics/loading.gif)
-
plog-admin/images/login.gif (copied) (copied from trunk/graphics/login.gif)
-
plog-admin/images/new_file.gif (copied) (copied from trunk/graphics/new_file.gif)
-
plog-admin/images/overlay.png (copied) (copied from trunk/graphics/overlay.png)
-
plog-admin/images/plogger-box-add-green.png (copied) (copied from trunk/graphics/plogger-box-add-green.png)
-
plog-admin/images/plogger-box-add.png (copied) (copied from trunk/graphics/plogger-box-add.png)
-
plog-admin/images/plogger-sm.gif (copied) (copied from trunk/graphics/plogger-sm.gif)
-
plog-admin/images/plogger.gif (copied) (copied from trunk/graphics/plogger.gif)
-
plog-admin/images/right.gif (copied) (copied from trunk/graphics/right.gif)
-
plog-admin/images/right_on.gif (copied) (copied from trunk/graphics/right_on.gif)
-
plog-admin/images/rss.gif (copied) (copied from trunk/graphics/rss.gif)
-
plog-admin/images/shadow.gif (copied) (copied from trunk/graphics/shadow.gif)
-
plog-admin/images/shadowAlpha.png (copied) (copied from trunk/graphics/shadowAlpha.png)
-
plog-admin/images/table-middle.gif (copied) (copied from trunk/graphics/table-middle.gif)
-
plog-admin/images/table-top-left.gif (copied) (copied from trunk/graphics/table-top-left.gif)
-
plog-admin/images/table-top-right.gif (copied) (copied from trunk/graphics/table-top-right.gif)
-
plog-admin/images/x.gif (copied) (copied from trunk/graphics/x.gif)
-
plog-admin/includes (added)
-
plog-admin/includes/install-form-setup-complete.php (copied) (copied from trunk/lib/plogger/form_setup_complete.php) (1 diff)
-
plog-admin/includes/install-form-setup.php (copied) (copied from trunk/lib/plogger/form_setup.php) (1 diff)
-
plog-admin/includes/install-functions.php (copied) (copied from trunk/lib/plogger/install_functions.php) (11 diffs)
-
plog-admin/index.php (modified) (2 diffs)
-
plog-admin/js/ajax_editing.js (modified) (1 diff)
-
plog-admin/js/lightbox.js (modified) (1 diff)
-
plog-admin/plog-admin-functions.php (modified) (30 diffs)
-
plog-admin/plog-admin.php (modified) (2 diffs)
-
plog-admin/plog-feedback.php (modified) (2 diffs)
-
plog-admin/plog-import.php (modified) (11 diffs)
-
plog-admin/plog-manage.php (modified) (20 diffs)
-
plog-admin/plog-options.php (modified) (7 diffs)
-
plog-admin/plog-rpc.php (modified) (6 diffs)
-
plog-admin/plog-themes.php (modified) (5 diffs)
-
plog-admin/plog-thumb.php (modified) (1 diff)
-
plog-admin/plog-thumbpopup.php (modified) (2 diffs)
-
plog-admin/plog-upload.php (modified) (8 diffs)
-
plog-config-sample.php (moved) (moved from trunk/plog-config.php)
-
plog-content (added)
-
plog-content/images (moved) (moved from trunk/images)
-
plog-content/images/index.php (modified) (1 diff)
-
plog-content/themes (moved) (moved from trunk/themes)
-
plog-content/themes/air/album.php (modified) (2 diffs)
-
plog-content/themes/air/collection.php (modified) (4 diffs)
-
plog-content/themes/air/collections.php (modified) (3 diffs)
-
plog-content/themes/air/comments.php (modified) (4 diffs)
-
plog-content/themes/air/dynamics.js (modified) (4 diffs)
-
plog-content/themes/air/explorer.css (modified) (2 diffs)
-
plog-content/themes/air/footer.php (modified) (3 diffs)
-
plog-content/themes/air/gallery.css (modified) (20 diffs)
-
plog-content/themes/air/header.php (modified) (1 diff)
-
plog-content/themes/air/images/comment.gif (copied) (copied from trunk/graphics/comment.gif)
-
plog-content/themes/air/images/fforward.gif (copied) (copied from trunk/graphics/fforward.gif)
-
plog-content/themes/air/images/play.gif (copied) (copied from trunk/graphics/play.gif)
-
plog-content/themes/air/images/printer.gif (copied) (copied from trunk/graphics/printer.gif)
-
plog-content/themes/air/images/rewind.gif (copied) (copied from trunk/graphics/rewind.gif)
-
plog-content/themes/air/images/rss.gif (copied) (copied from trunk/graphics/rss.gif)
-
plog-content/themes/air/images/search.gif (copied) (copied from trunk/graphics/search.gif)
-
plog-content/themes/air/images/stop.gif (copied) (copied from trunk/graphics/stop.gif)
-
plog-content/themes/air/images/thumb-video.gif (copied) (copied from trunk/graphics/thumb-video.gif)
-
plog-content/themes/air/meta.php (modified) (1 diff)
-
plog-content/themes/air/picture.php (modified) (2 diffs)
-
plog-content/themes/air/search.php (modified) (2 diffs)
-
plog-content/themes/air/slideshow.php (modified) (6 diffs)
-
plog-content/themes/default/album.php (modified) (2 diffs)
-
plog-content/themes/default/collection.php (modified) (3 diffs)
-
plog-content/themes/default/collections.php (modified) (1 diff)
-
plog-content/themes/default/comments.php (modified) (3 diffs)
-
plog-content/themes/default/dynamics.js (modified) (4 diffs)
-
plog-content/themes/default/footer.php (modified) (2 diffs)
-
plog-content/themes/default/gallery.css (modified) (16 diffs)
-
plog-content/themes/default/head.php (modified) (1 diff)
-
plog-content/themes/default/header.php (modified) (1 diff)
-
plog-content/themes/default/images (added)
-
plog-content/themes/default/images/button-bg.gif (copied) (copied from trunk/graphics/button-bg.gif)
-
plog-content/themes/default/images/comment.gif (copied) (copied from trunk/graphics/comment.gif)
-
plog-content/themes/default/images/fforward.gif (copied) (copied from trunk/graphics/fforward.gif)
-
plog-content/themes/default/images/play.gif (copied) (copied from trunk/graphics/play.gif)
-
plog-content/themes/default/images/printer.gif (copied) (copied from trunk/graphics/printer.gif)
-
plog-content/themes/default/images/rewind.gif (copied) (copied from trunk/graphics/rewind.gif)
-
plog-content/themes/default/images/rss.gif (copied) (copied from trunk/graphics/rss.gif)
-
plog-content/themes/default/images/search.gif (copied) (copied from trunk/graphics/search.gif)
-
plog-content/themes/default/images/stop.gif (copied) (copied from trunk/graphics/stop.gif)
-
plog-content/themes/default/images/thumb-video.gif (copied) (copied from trunk/graphics/thumb-video.gif)
-
plog-content/themes/default/images/x.gif (copied) (copied from trunk/graphics/x.gif)
-
plog-content/themes/default/meta.php (modified) (1 diff)
-
plog-content/themes/default/picture.php (modified) (3 diffs)
-
plog-content/themes/default/search.php (modified) (2 diffs)
-
plog-content/themes/default/slideshow.php (modified) (5 diffs)
-
plog-content/themes/index.php (added)
-
plog-content/themes/lucid/album.php (modified) (2 diffs)
-
plog-content/themes/lucid/collection.php (modified) (2 diffs)
-
plog-content/themes/lucid/collections.php (modified) (2 diffs)
-
plog-content/themes/lucid/comments.php (modified) (3 diffs)
-
plog-content/themes/lucid/dynamics.js (modified) (4 diffs)
-
plog-content/themes/lucid/footer.php (modified) (1 diff)
-
plog-content/themes/lucid/gallery.css (modified) (3 diffs)
-
plog-content/themes/lucid/header.php (modified) (1 diff)
-
plog-content/themes/lucid/images/comment.gif (copied) (copied from trunk/graphics/comment.gif)
-
plog-content/themes/lucid/images/fforward.gif (copied) (copied from trunk/graphics/fforward.gif)
-
plog-content/themes/lucid/images/play.gif (copied) (copied from trunk/graphics/play.gif)
-
plog-content/themes/lucid/images/printer.gif (copied) (copied from trunk/graphics/printer.gif)
-
plog-content/themes/lucid/images/rewind.gif (copied) (copied from trunk/graphics/rewind.gif)
-
plog-content/themes/lucid/images/rss.gif (copied) (copied from trunk/graphics/rss.gif)
-
plog-content/themes/lucid/images/search.gif (copied) (copied from trunk/graphics/search.gif)
-
plog-content/themes/lucid/images/stop.gif (copied) (copied from trunk/graphics/stop.gif)
-
plog-content/themes/lucid/images/thumb-video.gif (copied) (copied from trunk/graphics/thumb-video.gif)
-
plog-content/themes/lucid/images/x.gif (copied) (copied from trunk/graphics/x.gif)
-
plog-content/themes/lucid/meta.php (modified) (1 diff)
-
plog-content/themes/lucid/picture.php (modified) (3 diffs)
-
plog-content/themes/lucid/search.php (modified) (2 diffs)
-
plog-content/themes/lucid/slideshow.php (added)
-
plog-content/thumbs (moved) (moved from trunk/thumbs)
-
plog-content/thumbs/index.php (modified) (1 diff)
-
plog-content/translations (moved) (moved from trunk/plog-translations)
-
plog-content/translations/index.php (modified) (1 diff)
-
plog-content/uploads (moved) (moved from trunk/uploads)
-
plog-content/uploads/index.php (modified) (1 diff)
-
plog-download.php (modified) (9 diffs)
-
plog-globals.php (modified) (3 diffs)
-
plog-includes (added)
-
plog-includes/captcha.ttf (moved) (moved from trunk/captcha.ttf)
-
plog-includes/js (added)
-
plog-includes/js/plog-slideshow.js (moved) (moved from trunk/slideshow.js)
-
plog-includes/lib (moved) (moved from trunk/lib)
-
plog-includes/plog-captcha.php (moved) (moved from trunk/plog-captcha.php) (2 diffs)
-
plog-includes/plog-comment.php (moved) (moved from trunk/plog-comment.php) (2 diffs)
-
plog-includes/plog-functions.php (moved) (moved from trunk/plog-functions.php) (66 diffs)
-
plog-includes/plog-tag-functions.php (moved) (moved from trunk/plog-tag-functions.php) (1 diff)
-
plog-load-config.php (moved) (moved from trunk/plog-load_config.php) (9 diffs)
-
plog-print.php (modified) (2 diffs)
-
plog-remote.php (modified) (8 diffs)
-
plog-rss.php (modified) (8 diffs)
-
plog-thumb.php (modified) (2 diffs)
-
plog-xml.php (modified) (21 diffs)
-
plogger.php (added)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gallery.php
r546 r550 1 1 <?php 2 #error_reporting(E_ALL); 3 include_once(dirname(__FILE__)."/plog-load_config.php"); 4 //include("plog-globals.php"); 5 //include_once("plog-functions.php"); 6 7 global $config; 8 9 // process path here - is set if mod_rewrite is in use 10 if (!empty($_REQUEST["path"])) { 11 // The following line calculates the path in the album and excludes any subdirectories if 12 // Plogger is installed in one 13 $path = join("/",array_diff(explode("/",$_SERVER["REQUEST_URI"]),explode("/",$_SERVER["PHP_SELF"]))); 14 $resolved_path = resolve_path($path); 15 if (is_array($resolved_path)) { 16 $_GET["level"] = $resolved_path["level"]; 17 $_GET["id"] = $resolved_path["id"]; 18 if (isset($resolved_path['mode'])) { 19 $_GET['mode'] = $resolved_path['mode']; 20 } 21 22 // get page number from url, if present 23 $parts = parse_url($_SERVER["REQUEST_URI"]); 24 if (isset($parts["query"])) { 25 parse_str($parts["query"],$query_parts); 26 if (!empty($query_parts["plog_page"])) $_GET["plog_page"] = $query_parts["plog_page"]; 27 } 28 $path = $parts["path"]; 29 } 30 } 31 32 // Set sorting session variables if they are passed 33 if (isset($_GET['sortby'])) { 34 $_SESSION['plogger_sortby'] = $_GET['sortby']; 35 } 36 37 if (isset($_GET['sortdir'])) { 38 $_SESSION['plogger_sortdir'] = $_GET['sortdir']; 39 } 40 41 // The three GET parameters that it accepts are 42 // $level = "collection", "album", or "picture" 43 // $id = id number of collection, album, or picture 44 // $n = starting element (for pagination) go from n to n + max_thumbs (in global config) 45 46 // use plogger specific variables to avoid name clashes if Plogger is embedded 47 48 49 50 $GLOBALS['plogger_level'] = isset($_GET["level"]) ? $_GET["level"] : ''; 51 $GLOBALS['plogger_id'] = isset($_GET["id"]) ? intval($_GET["id"]) : 0; 52 $GLOBALS['plogger_mode'] = isset($_GET["mode"]) ? $_GET["mode"] : ''; 53 54 $allowed_levels = array('collections','collection','album','picture','search'); 55 if (!in_array($GLOBALS['plogger_level'],$allowed_levels)) { 56 $GLOBALS['plogger_level'] = 'collections'; 57 } 58 59 // Some Estonian remarks was here ?!? 60 61 define('THEME_DIR', dirname(__FILE__) . '/themes/' . $config['theme_dir']); 62 define('THEME_URL', $config['theme_url']); 2 /* This is a backwords compatible file to make old installations work correctly */ 3 include_once(dirname(__FILE__)."/plogger.php"); 63 4 64 5 function the_gallery_head() { 65 plogger_head(); 66 67 $use_file = 'head.php'; 68 if (file_exists(THEME_DIR . "/" . $use_file)) { 69 include(THEME_DIR . "/" . $use_file); 70 } else { 71 include(dirname(__FILE__).'/themes/default/'.$use_file); 72 } 6 return the_plogger_gallery_head(); 73 7 } 74 8 75 9 function the_gallery(){ 76 // collections mode (show all albums within a collection) 77 // it's the default 78 $use_file = "collections.php"; 79 if ($GLOBALS['plogger_level'] == "picture"){ 80 $use_file = 'picture.php'; 81 } 82 elseif ($GLOBALS['plogger_level'] == "search"){ 83 if ($GLOBALS['plogger_mode'] == "slideshow") { 84 $use_file = 'slideshow.php'; 85 } else { 86 $use_file = 'search.php'; 87 } 88 } 89 elseif ($GLOBALS['plogger_level'] == "album") { 90 // Album level display mode (display all pictures within album) 91 if ($GLOBALS['plogger_mode'] == "slideshow") { 92 $use_file = 'slideshow.php'; 93 } else { 94 $use_file = 'album.php'; 95 } 96 } 97 else if ($GLOBALS['plogger_level'] == "collection") { 98 $use_file = 'collection.php'; 99 } 100 101 // if the theme does not have the requested file, then use the one from the default template 102 if (file_exists(THEME_DIR . "/" . $use_file)) { 103 include(THEME_DIR . "/" . $use_file); 104 } else { 105 include(dirname(__FILE__).'/themes/default/'.$use_file); 106 } 107 } 10 return the_plogger_gallery(); 11 } 108 12 ?> -
trunk/index.php
r511 r550 3 3 * Plogger - A web based photo gallery 4 4 * Copyright (C) 2005 Mike Johnson 5 * 5 * 6 6 * This program is free software; you can redistribute it and/or modify 7 7 * it under the terms of the GNU General Public License as published by 8 8 * the Free Software Foundation; either version 2 of the License, or (at 9 9 * your option) any later version. 10 * 10 * 11 11 * This program is distributed in the hope that it will be useful, but 12 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 14 * General Public License for more details. 15 * 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software … … 21 21 <?php require("gallery.php"); ?> 22 22 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 23 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">24 25 <html xml:lang="<?php echo $language; ?>" lang="<?php echo $language; ?>" xmlns="http://www.w3.org/1999/xhtml"> 23 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 24 25 <html xml:lang="<?php echo $language; ?>" lang="<?php echo $language; ?>" xmlns="http://www.w3.org/1999/xhtml"> 26 26 27 27 <head> … … 30 30 </head> 31 31 32 <body> 32 <body> 33 33 <?php the_gallery(); ?> 34 34 35 35 </body> 36 36 -
trunk/plog-admin/_install.php
r546 r550 1 1 <?php 2 2 error_reporting(E_ERROR); 3 require (dirname(__FILE__) .'/plog-globals.php');4 require (PLOGGER_DIR . 'plog-functions.php');5 require (PLOGGER_DIR . 'lib/plogger/install_functions.php');3 require_once(dirname(dirname(__FILE__)).'/plog-globals.php'); 4 require_once(PLOGGER_DIR.'plog-includes/plog-functions.php'); 5 require_once(PLOGGER_DIR.'plog-admin/includes/install-functions.php'); 6 6 7 7 // serve the config file 8 8 if (!empty($_POST['dlconfig']) && !empty($_SESSION['plogger_config'])) { 9 header('Content-type: application/octet-stream');10 header('Content-Disposition: attachment; filename="plog-config.php"');11 print $_SESSION['plogger_config'];12 die();13 } ;9 header('Content-type: application/octet-stream'); 10 header('Content-Disposition: attachment; filename="plog-config.php"'); 11 print $_SESSION['plogger_config']; 12 exit(); 13 } 14 14 15 15 // Create the SQL tables and try to proceed to the admin interface. … … 19 19 if (empty($mysql)) { 20 20 create_tables(); 21 configure_plogger($_SESSION[ "install_values"]); // undefined index install_values22 require (PLOGGER_DIR . "plog-load_config.php");21 configure_plogger($_SESSION['install_values']); // undefined index install_values 22 require_once(PLOGGER_DIR."plog-load-config.php"); 23 23 connect_db(); 24 24 $col = add_collection(plog_tr("Plogger test collection"),plog_tr("Feel free to delete it")); … … 27 27 $alb = add_album(plog_tr("Plogger test album"),plog_tr("feel free to delete it"),$col['id']); 28 28 } 29 unset($_SESSION[ "plogger_config"]);30 unset($_SESSION[ "install_values"]);31 header("Location: admin/index.php");29 unset($_SESSION['plogger_config']); 30 unset($_SESSION['install_values']); 31 header("Location: index.php"); 32 32 exit; 33 } ;34 } ;33 } 34 } 35 35 ?> 36 36 <html> … … 40 40 </head> 41 41 <body> 42 <img src=" graphics/plogger.gif" alt="Plogger">42 <img src="images/plogger.gif" alt="Plogger"> 43 43 <?php 44 44 if (empty($_POST['proceed'])) { 45 45 do_install($_POST); 46 46 } else { 47 require(PLOGGER_DIR . 'lib/plogger/form_setup_complete.php');48 } ;47 require(PLOGGER_DIR.'plog-admin/includes/install-form-setup-complete.php'); 48 } 49 49 ?> 50 50 </body> -
trunk/plog-admin/_upgrade.php
r509 r550 1 1 <?php 2 3 2 error_reporting(E_ERROR); 4 5 3 echo ' 6 4 <html> 7 5 <head> 8 6 <title>Upgrade Plogger</title> 9 <link rel="stylesheet" type="text/css" href=" admin/../css/admin.css">7 <link rel="stylesheet" type="text/css" href="css/admin.css"> 10 8 </head> 11 9 <body> 12 <img src=" graphics/plogger.gif" alt="Plogger">10 <img src="images/plogger.gif" alt="Plogger"> 13 11 <h1>Performing Upgrade...</h1>'; 14 12 15 13 // This is the upgrade file for upgrading your Plogger gallery from Beta 1 16 $workdir = getcwd();14 $workdir = dirname(dirname(__FILE__)); 17 15 if (file_exists($workdir.'/plog-connect.php')) 18 16 { … … 23 21 print $workdir . " is not writable, but I need to create a new file in it"; 24 22 exit; 25 } ;23 } 26 24 27 25 // now parse DB connection parameters out of plog-connect … … 50 48 if (!$fh) { 51 49 die("Could not write plog-config.php, please make the file writable and then try running this script again"); 52 } ;50 } 53 51 fwrite($fh,"<?php\n"); 54 52 fwrite($fh,$cfg_file); … … 57 55 58 56 unlink($workdir.'/plog-connect.php'); 59 print "Done!<br />";60 61 } ;57 print "Done!<br />"; 58 59 } 62 60 63 61 function makeDirs($strPath, $mode = 0777) //creates directory tree recursively … … 72 70 while($row = mysql_fetch_array($res,MYSQL_NUM)) { 73 71 if ($row[0] == $column) $found = true; 74 } ;72 } 75 73 if (!$found) { 76 74 print "<li>Adding new field $column to database."; … … 78 76 } else { 79 77 print "<li>$column already present in database."; 80 } ;78 } 81 79 } 82 80 … … 87 85 while($row = mysql_fetch_array($res,MYSQL_NUM)) { 88 86 if ($row[0] == $column) $found = true; 89 } ;87 } 90 88 if ($found) { 91 89 print "<li>dropping $column"; … … 94 92 } else { 95 93 //print "$column does not exist<br/>"; 96 } ;94 } 97 95 } 98 96 … … 106 104 } 107 105 108 include("plog-functions.php"); 109 include("plog-globals.php"); 110 include("plog-config.php"); 106 include($workdir."/plog-config.php"); 107 include($workdir."/plog-globals.php"); 108 include($workdir."/plog-includes/plog-functions.php"); 109 111 110 connect_db(); 112 111 $errors = ""; … … 195 194 $sql = "UPDATE $config_table SET gallery_url = '" . $config['baseurl'] . "'"; 196 195 mysql_query($sql); 197 } ;196 } 198 197 199 198 … … 255 254 256 255 // insert default value (default theme directory) 257 $default_theme_dir = dirname(__FILE__)."/ ". 'themes/default/';256 $default_theme_dir = dirname(__FILE__)."/plog-content/themes/default/""; 258 257 print "<li>Setting default theme directory to $default_theme_dir</li>"; 259 258 $sql = 'UPDATE '.TABLE_PREFIX.'config SET `theme_dir` = \''.$default_theme_dir.'\' WHERE 1'; … … 270 269 $sql = 'ALTER TABLE '.TABLE_PREFIX.'config 271 270 ADD (`small_lastmodified` datetime NOT NULL, 272 `large_lastmodified` datetime NOT NULL,273 `rss_lastmodified` datetime NOT NULL)';271 `large_lastmodified` datetime NOT NULL, 272 `rss_lastmodified` datetime NOT NULL)'; 274 273 275 274 if (mysql_query($sql)) … … 280 279 281 280 echo "</ul>"; 282 echo "<p>Reorganizing your imagesfolder...";281 echo "<p>Reorganizing your 'images/' folder..."; 283 282 284 283 # strip images prefix from pictures table … … 324 323 $filename = basename($row['path']); 325 324 $directory = $row['collection_path']."/".$row['album_path']."/"; 326 $new_path = " images/".$directory.$filename;325 $new_path = "plog-content/images/".$directory.$filename; 327 326 if ($row['path'] == $new_path) continue; 328 327 echo "<li>Moving $row[path] -> $new_path</li>"; 329 328 330 329 // move physical file, create directory if necessary and update path in database 331 if (!makeDirs(" images/".$directory, 0755))330 if (!makeDirs("plog-content/images/".$directory, 0755)) 332 331 echo "<ul><li>Error: Could not create directory $directory!</li></ul>"; 333 332 … … 347 346 echo "</ul>"; 348 347 349 if (!$errors) 348 if (!$errors) { 350 349 echo "Your files were successfully reorganized!"; 351 else 350 } else { 352 351 echo "There were $errors errors, check your permissions settings."; 352 } 353 353 354 354 … … 376 376 print "failed to convert $tablename to $charset<br/>"; 377 377 print mysql_error(); 378 } ;379 } 380 } ;381 382 echo "<p>Upgrade has completed! "378 } 379 } 380 } 381 382 echo "<p>Upgrade has completed!</p>" 383 383 ?> 384 385 386 -
trunk/plog-admin/css/admin.css
r475 r550 1 html 2 { 3 padding: 15px; 4 border-bottom: 10px solid #336699; 5 border-top: 10px solid #336699; 6 } 7 8 html, body, p, form, table, td, tr 9 { 10 font-family: "Lucida Sans Unicode", "Lucida Sans", "Georgia", "Trebuchet MS", "Verdana", sans-serif; 11 font-size: 10pt 1 html { 2 padding: 15px; 3 border-bottom: 10px solid #369; 4 border-top: 10px solid #369; 5 } 6 7 html, body, p, form, table, td, tr { 8 font-family: "Lucida Sans Unicode", "Lucida Sans", "Georgia", "Trebuchet MS", "Verdana", sans-serif; 9 font-size: 13px; 12 10 } 13 11 … … 19 17 padding: 8px; 20 18 } 21 22 19 23 20 .option-table td { … … 33 30 34 31 tr.activated td { 35 background: #BEDEBE; 36 border-bottom: 1px solid #519E51; 37 } 38 39 input.submit 40 { 41 border: 3px double #999999; 42 border-top-color: #CCCCCC; 43 border-left-color: #CCCCCC; 44 background-color: #FFFFFF; 45 background-image: url('../graphics/button-bg.gif'); 32 background: #bedebe; 33 border-bottom: 1px solid #519e51; 34 } 35 36 input.submit { 37 border: 3px double #999; 38 border-top-color: #ccc; 39 border-left-color: #ccc; 40 background-color: #fff; 41 background-image: url("../images/button-bg.gif"); 46 42 background-repeat: repeat-x; 47 color: #333 333;43 color: #333; 48 44 font-size: 90%; 49 45 font-weight: normal; … … 52 48 } 53 49 54 h1 55 { 56 font-family: "Verdana", "Lucida Sans", "Lucida Grande", "Trebuchet MS", sans-serif; 57 font-size: 1.4em; 58 margin-top: 25px; 59 margin-bottom: 15px; 60 font-weight: bold; 61 color: #264B71; 62 } 63 64 h2 65 { 66 font-family: "Verdana", "Lucida Sans", "Lucida Grande", "Trebuchet MS", sans-serif; 67 font-size: 1.0em; 68 margin-top: 20px; 69 margin-bottom: 15px; 70 text-decoration: underline; 71 } 72 73 74 a:link, a:active 75 { 76 color: maroon; 77 text-decoration: none; 78 } 79 80 a:visited 81 { 82 color: maroon; 83 text-decoration: none; 84 } 85 86 a:hover 87 { 88 color: navy; 89 text-decoration: underline; 90 } 91 92 a:focus 93 { 94 outline: none; 95 96 -moz-outline:none; 97 } 98 99 .actions 100 { 101 background-image: url('../graphics/alert.gif'); 102 background-repeat: no-repeat; 103 background-position: 5px 8px; 104 margin-bottom: 15px; 105 margin-right: 15px; 106 border-top: 2px solid #BBBB00; 107 border-bottom: 2px solid #BBBB00; 108 padding: 8px; 109 background-color: #FFFFE0; 110 padding-left: 28px; 111 clear: both; 112 } 113 114 .errors 115 { 116 background-image: url('../graphics/x.gif'); 117 background-repeat: no-repeat; 118 background-position: 5px 8px; 119 margin-bottom: 15px; 120 margin-right: 15px; 121 border: 1px solid maroon; 122 padding: 8px; 123 background-color: #FFCCCC; 124 padding-left: 28px; 125 clear: both; 126 } 127 128 .edit 129 { 130 background-image: url('../graphics/edit.gif'); 131 background-repeat: no-repeat; 132 background-position: 5px 8px; 133 margin-bottom: 15px; 134 padding: 8px; 135 padding-left: 28px; 136 margin: 15px; 137 margin-left: 0; 138 border: 2px solid #CCCC66; 139 background-color: #FFFFE0; 140 width: auto; 141 clear: both; 142 } 143 144 .edit img 145 { 146 50 h1 { 51 font-family: "Verdana", "Lucida Sans", "Lucida Grande", "Trebuchet MS", sans-serif; 52 font-size: 1.4em; 53 margin-top: 25px; 54 margin-bottom: 15px; 55 font-weight: bold; 56 color: #264b71; 57 } 58 59 h2 { 60 font-family: "Verdana", "Lucida Sans", "Lucida Grande", "Trebuchet MS", sans-serif; 61 font-size: 1.0em; 62 margin-top: 20px; 63 margin-bottom: 15px; 64 text-decoration: underline; 65 } 66 67 a:link, a:active { 68 color: maroon; 69 text-decoration: none; 70 } 71 72 a:visited { 73 color: maroon; 74 text-decoration: none; 75 } 76 77 a:hover { 78 color: navy; 79 text-decoration: underline; 80 } 81 82 a:focus { 83 outline: none; 84 -moz-outline:none; 85 } 86 87 .actions { 88 background-image: url("../images/alert.gif"); 89 background-repeat: no-repeat; 90 background-position: 5px 8px; 91 margin-bottom: 15px; 92 margin-right: 15px; 93 border-top: 2px solid #bb0; 94 border-bottom: 2px solid #bb0; 95 padding: 8px; 96 background-color: #ffffe0; 97 padding-left: 28px; 98 clear: both; 99 } 100 101 .errors { 102 background-image: url("../images/x.gif"); 103 background-repeat: no-repeat; 104 background-position: 5px 8px; 105 margin-bottom: 15px; 106 margin-right: 15px; 107 border: 1px solid maroon; 108 padding: 8px; 109 background-color: #fcc; 110 padding-left: 28px; 111 clear: both; 112 } 113 114 .edit { 115 background-image: url("../images/edit.gif"); 116 background-repeat: no-repeat; 117 background-position: 5px 8px; 118 margin-bottom: 15px; 119 padding: 8px; 120 padding-left: 28px; 121 margin: 15px; 122 margin-left: 0; 123 border: 2px solid #cc6; 124 background-color: #ffffe0; 125 width: auto; 126 clear: both; 127 } 128 129 .edit img { 147 130 border: 1px solid #000; 148 131 padding: 3px; 149 132 background-color: #fff; 150 151 } 152 153 img 154 { 155 border: 0; 156 display: inline; 157 } 158 159 160 161 tr.color-1 162 { 163 background-color: #ccc 164 } 165 166 tr.color-2 167 { 168 background-color: #efefef; 169 } 170 171 tr.header 172 { 173 color: #FFF; 174 background-color: #264E75; 175 font-weight: bold; 133 } 134 135 img { 136 border: 0; 137 display: inline; 138 } 139 140 tr.color-1 { 141 background-color: #ccc; 142 } 143 144 tr.color-2 { 145 background-color: #efefef; 146 } 147 148 tr.header { 149 color: #fff; 150 background-color: #264e75; 151 font-weight: bold; 176 152 } 177 153 … … 180 156 } 181 157 182 tr.breadcrumb 183 { 184 background-color: #FFFFE0; 185 height: 16px; 186 vertical-align: middle; 187 } 188 189 label 190 { 191 padding: 8px; 192 } 193 194 input, select, textarea 195 { 196 margin: 5px; 197 font-family: "Lucida Sans Unicode", "Lucida Sans", "Georgia", "Trebuchet MS", "Verdana", sans-serif; 198 font-size: 10pt; 199 } 200 201 img 202 { 203 padding: 5px 204 } 205 206 #login 207 { 208 background-image: url('../graphics/login.gif'); 209 background-repeat: no-repeat; 210 width: 382px; 211 height: 327px; 212 padding: 187px 15px 10px 15px; 213 margin: auto; 214 } 215 216 #login-page 217 { 218 background: #336699; 219 text-align: center; 220 margin-top: 100px; 221 } 222 223 a.folder 224 { 225 background-image: url("../graphics/folder_open.gif"); 226 background-repeat: no-repeat; 227 background-position: left 1px; 228 padding-left: 20px; 229 } 230 231 .box-1 232 { 233 margin: 15px; 234 border: 1px solid #264B71; 235 padding: 10px; 236 padding-left: 20px; 237 background-color: #C4DADB; 238 padding-top: 0; 239 margin-top: 5px; 240 width: 470px; 241 margin-left: 0; 242 } 243 244 .box-2 245 { 246 margin: 15px; 247 border: 1px solid #CCCC66; 248 padding: 10px; 249 padding-left: 20px; 250 background-color: #FFFFE0; 251 padding-top: 0; 252 margin-top: 5px; 253 width: 470px; 254 margin-left: 0; 255 } 256 257 .box-3 258 { 259 margin: 15px; 260 border: 1px solid #488F62; 261 padding: 10px; 262 padding-left: 20px; 263 padding-bottom: 18px; 264 margin-bottom: 10px; 265 background-color: #BEDEBE; 266 padding-top: 0; 267 margin-top: 5px; 268 width: 470px; 269 margin-left: 0; 158 tr.breadcrumb { 159 background-color: #ffffe0; 160 height: 16px; 161 vertical-align: middle; 162 } 163 164 label { 165 padding: 8px; 166 } 167 168 input, select, textarea { 169 margin: 5px; 170 font-family: verdana, arial, sans-serif; 171 font-size: 12px; 172 } 173 174 img { 175 padding: 5px 176 } 177 178 #login { 179 background-image: url("../images/login.gif"); 180 background-repeat: no-repeat; 181 width: 382px; 182 height: 327px; 183 padding: 187px 15px 10px 15px; 184 margin: auto; 185 } 186 187 #login-page { 188 background: #369; 189 text-align: center; 190 margin-top: 100px; 191 } 192 193 a.folder { 194 background-image: url("../images/folder_open.gif"); 195 background-repeat: no-repeat; 196 background-position: left 1px; 197 padding-left: 20px; 198 } 199 200 .box-1 { 201 margin: 15px; 202 margin-top: 5px; 203 margin-left: 0; 204 border: 1px solid #264b71; 205 padding: 10px; 206 padding-top: 0; 207 padding-left: 20px; 208 background-color: #c4dadb; 209 width: 470px; 210 } 211 212 .box-2 { 213 margin: 15px; 214 margin-top: 5px; 215 margin-left: 0; 216 border: 1px solid #cc6; 217 padding: 10px; 218 padding-top: 0; 219 padding-left: 20px; 220 background-color: #ffffe0; 221 width: 470px; 222 } 223 224 .box-3 { 225 margin: 15px; 226 margin-top: 5px; 227 margin-bottom: 10px; 228 margin-left: 0; 229 border: 1px solid #488f62; 230 padding: 10px; 231 padding-top: 0; 232 padding-left: 20px; 233 padding-bottom: 18px; 234 background-color: #bedebe; 235 width: 470px; 270 236 } 271 237 272 238 .add { 273 background-image: url( ../graphics/new_file.gif);274 background-repeat: no-repeat; 275 background-position: left center; 239 background-image: url("../images/new_file.gif"); 240 background-repeat: no-repeat; 241 background-position: left center; 276 242 padding-left: 20px; 277 243 margin-left: -12px; 278 text-decoration: underline; 244 text-decoration: underline; 279 245 } 280 246 281 247 .breadcrumb-header { 282 248 height: 16px; 283 vertical-align: middle;284 background-color: # FFFFCC;249 vertical-align: middle; 250 background-color: #ffc; 285 251 padding: 3px; 286 252 } … … 299 265 300 266 .thumbselect { 301 height: 80px;302 padding-left: 90px;303 background-repeat: no-repeat;304 background-position: center left;267 height: 80px; 268 padding-left: 90px; 269 background-repeat: no-repeat; 270 background-position: center left; 305 271 } 306 272 307 273 .thumboption { 308 309 padding-left: 90px; 310 height: 40px; 311 margin-bottom: 2px; 312 background-position: center left; 313 274 padding-left: 90px; 275 height: 40px; 276 margin-bottom: 2px; 277 background-position: center left; 314 278 } 315 279 316 280 .highlight { 317 281 padding: 8px; 318 background: # FFFFE0;282 background: #ffffe0; 319 283 border-top: 2px solid #ccc; 320 284 border-bottom: 2px solid #ccc; … … 323 287 324 288 .highlight-row { 325 background: # FFFFE0;289 background: #ffffe0; 326 290 } 327 291 … … 332 296 /* set the image to use and establish the lower-right position */ 333 297 .cssbox, .cssbox_body, .cssbox_head, .cssbox_head h2 { 334 background: transparent url(../graphics/plogger-box-add.png) no-repeat bottom right;335 margin: 0;336 padding: 0;298 background: transparent url("../images/plogger-box-add.png") no-repeat bottom right; 299 margin: 0; 300 padding: 0; 337 301 } 338 302 339 303 .cssbox label, .cssbox-green label { 340 padding:0;341 margin: 0;342 font-weight:bold;343 display: inline;304 padding: 0; 305 margin: 0; 306 font-weight: bold; 307 display: inline; 344 308 } 345 309 346 310 .cssbox-green, .cssbox_body-green, .cssbox_head-green, .cssbox_head-green h2 { 347 background: transparent url(../graphics/plogger-box-add-green.png) no-repeat bottom right;348 margin: 0;349 padding: 0;311 background: transparent url("../images/plogger-box-add-green.png") no-repeat bottom right; 312 margin: 0; 313 padding: 0; 350 314 } 351 315 352 316 .cssbox-green { 353 width: 320px !important; /* intended total box width - padding-right(next) */354 width: 300px;/* IE Win = width - padding */355 padding-right: 15px;/* the gap on the right edge of the image (not content padding) */356 margin: 2px 0 20px 0;/* use to position the box */317 width: 320px !important; /* intended total box width - padding-right(next) */ 318 width: 300px; /* IE Win = width - padding */ 319 padding-right: 15px; /* the gap on the right edge of the image (not content padding) */ 320 margin: 2px 0 20px 0; /* use to position the box */ 357 321 } 358 322 … … 363 327 364 328 .cssbox { 365 width: 420px !important;/* intended total box width - padding-right(next) */366 width: 405px;/* IE Win = width - padding */367 padding-right: 15px;/* the gap on the right edge of the image (not content padding) */368 margin: 2px 0 20px 0;/* use to position the box */329 width: 420px !important; /* intended total box width - padding-right(next) */ 330 width: 405px; /* IE Win = width - padding */ 331 padding-right: 15px; /* the gap on the right edge of the image (not content padding) */ 332 margin: 2px 0 20px 0; /* use to position the box */ 369 333 } 370 334 371 335 /* set the top-right image */ 372 336 .cssbox_head, .cssbox_head-green { 373 background-position: top right;374 margin-right: -15px;/* pull the right image over on top of border */375 padding-right: 40px;/* right-image-gap + right-inside padding */337 background-position: top right; 338 margin-right: -15px; /* pull the right image over on top of border */ 339 padding-right: 40px; /* right-image-gap + right-inside padding */ 376 340 } 377 341 378 342 /* set the top-left image */ 379 343 .cssbox_head h2, .cssbox_head-green h2 { 380 background-position: top left;381 margin: 0;/* reset */382 border: 0;/* reset */383 padding: 7px 0 15px 20px; /* padding-left = image gap + interior padding ... no padding-right */384 height: auto !important;385 height: 1%;/* IE Holly Hack */344 background-position: top left; 345 margin: 0; /* reset */ 346 border: 0; /* reset */ 347 padding: 7px 0 15px 20px; /* padding-left = image gap + interior padding ... no padding-right */ 348 height: auto !important; 349 height: 1%; /* IE Holly Hack */ 386 350 } 387 351 388 352 /* set the lower-left corner image */ 389 353 .cssbox_body, .cssbox_body-green { 390 background-position: bottom left; 391 margin-right: 25px; /* interior-padding right */ 392 padding: 15px 0 15px 20px; /* mirror .cssbox_head right/left */ 393 } 394 354 background-position: bottom left; 355 margin-right: 25px; /* interior-padding right */ 356 padding: 15px 0 15px 20px; /* mirror .cssbox_head right/left */ 357 } 395 358 396 359 /* Misc Text formatting */ 397 360 .cssbox_head h2, .cssbox_head-green h2 { 398 color: white; 399 font-weight: bold; 400 font-size: 15px; /* this is tricky if box width is in ems */ 401 text-align: center; 402 text-shadow: rgb(0,0,0) 0px 2px 5px; /* Safari-only, but I'm doing it just 'cause I can */ 403 text-decoration: none; 404 } 361 color: #fff; 362 font-weight: bold; 363 font-size: 15px; /* this is tricky if box width is in ems */ 364 text-align: center; 365 text-shadow: rgb(0,0,0) 0 2px 5px; /* Safari-only, but I'm doing it just 'cause I can */ 366 text-decoration: none; 367 } 368 405 369 .cssbox_body p, .cssbox_body-green p { 406 margin: 0 0 20px; 407 } 370 margin: 0 0 20px; 371 } 372 408 373 .cssbox_body a, .css_body a:hover { 409 margin: 0 !important;410 padding: 0 !important;411 border: 0 !important;412 text-decoration: underline;374 margin: 0 !important; 375 padding: 0 !important; 376 border: 0 !important; 377 text-decoration: underline; 413 378 } 414 379 … … 417 382 418 383 #contentList #breadcrumb_links { 419 font-size: 1.1em;420 padding: 5px 3px 5px 0 px;384 font-size: 1.1em; 385 padding: 5px 3px 5px 0; 421 386 } 422 387 423 388 #contentList #pagination { 424 font-size: 1.3em;425 padding: 5px 3px 5px 0 px;426 font-weight: bold;389 font-size: 1.3em; 390 padding: 5px 3px 5px 0; 391 font-weight: bold; 427 392 } 428 393 429 394 #uploadForm label { 430 display:block;431 white-space: nowrap;395 display: block; 396 white-space: nowrap; 432 397 } 433 398 434 399 #options_section label { 435 font-weight:bold;400 font-weight: bold; 436 401 } 437 402 438 403 label em { 439 font-style:normal;440 text-decoration:underline;404 font-style: normal; 405 text-decoration: underline; 441 406 } 442 407 443 408 .table-header-middle { 444 background: url( '../graphics/table-middle.gif') repeat-x top left;409 background: url("../images/table-middle.gif") repeat-x top left; 445 410 } 446 411 447 412 .table-header-left { 448 background: url( '../graphics/table-top-left.gif') no-repeat top left;413 background: url("../images/table-top-left.gif") no-repeat top left; 449 414 } 450 415 451 416 .table-header-right { 452 background: url( '../graphics/table-top-right.gif') no-repeat top right;417 background: url("../images/table-top-right.gif") no-repeat top right; 453 418 } 454 419 455 420 a#show-collection, a#show-album { 456 421 padding-left: 20px; 457 background: #ff ffcc url('../graphics/new_file.gif') no-repeat left;422 background: #ffc url("../images/new_file.gif") no-repeat left; 458 423 font-size: 1.1em; 459 424 } … … 462 427 text-decoration: none; 463 428 color: white; 464 background: #99CC99 url('../graphics/new_file.gif') no-repeat left; 465 } 466 429 background: #9c9 url("../images/new_file.gif") no-repeat left; 430 } 467 431 468 432 .editable{ 469 color: #000; 470 background: #fff url(../graphics/diag-bg.gif) repeat top left; 471 padding:2px; 472 border:1px solid #efefef; 473 display: block; 474 } 475 476 477 p { 433 color: #000; 434 background: #fff url("../images/diag-bg.gif") repeat top left; 435 padding: 2px; 436 border: 1px solid #efefef; 437 display: block; 438 } 439 440 p { 478 441 padding: 3px; 479 442 } 480 443 481 444 .img-shadow { 482 float:left;483 background: url(../graphics/shadowAlpha.png) no-repeat bottom right !important;484 background: url(../graphics/shadow.gif) no-repeat bottom right;485 margin: 10px 0 0 10px !important;486 margin: 10px 0 0 5px;445 float:left; 446 background: url("../images/shadowAlpha.png") no-repeat bottom right !important; 447 background: url("../images/shadow.gif") no-repeat bottom right; 448 margin: 10px 0 0 10px !important; 449 margin: 10px 0 0 5px; 487 450 } 488 451 489 452 .img-shadow img { 490 display: block;491 position: relative;492 background-color: #fff;493 border: 1px solid #a9a9a9;494 margin: -6px 6px 6px -6px;495 padding: 4px;496 } 453 display: block; 454 position: relative; 455 background-color: #fff; 456 border: 1px solid #a9a9a9; 457 margin: -6px 6px 6px -6px; 458 padding: 4px; 459 } -
trunk/plog-admin/css/greybox.css
r348 r550 1 1 #GB_overlay { 2 background-image: url('../graphics/overlay.png'); 3 position: absolute;4 margin: auto;5 top: 0;6 left: 0;7 z-index: 100;2 background-image: url("../images/overlay.png"); 3 position: absolute; 4 margin: auto; 5 top: 0; 6 left: 0; 7 z-index: 100; 8 8 } 9 9 10 10 * html #GB_overlay { 11 background-color: #000;12 background-color: transparent;13 background-image: url(blank.gif);14 filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../graphics/overlay.png", sizingMethod="scale");11 background-color: #000; 12 background-color: transparent; 13 background-image: url('blank.gif'); 14 filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../images/overlay.png", sizingMethod="scale"); 15 15 } 16 16 17 17 #GB_window { 18 top: 22px;19 left: 0;20 position: absolute;21 background-color: #fff;22 border: 3px solid #336699;23 border-top: 0;24 overflow: visible;25 z-index: 150;18 top: 22px; 19 left: 0; 20 position: absolute; 21 background-color: #fff; 22 border: 3px solid #369; 23 border-top: 0; 24 overflow: visible; 25 z-index: 150; 26 26 } 27 27 28 28 #GB_frame { 29 border: 0;30 overflow: auto;29 border: 0; 30 overflow: auto; 31 31 } 32 32 33 33 #GB_header { 34 margin: 0;35 top: 0;36 border-left: 3px solid #336699;37 border-right: 3px solid #336699;38 height: 25px;39 position: absolute;40 background-color: #264B71;41 z-index: 151;34 margin: 0; 35 top: 0; 36 border-left: 3px solid #369; 37 border-right: 3px solid #369; 38 height: 25px; 39 position: absolute; 40 background-color: #264b71; 41 z-index: 151; 42 42 } 43 43 44 44 #GB_caption { 45 font-family: helvetica, verdana, sans-serif;46 font-size: 12px;47 color: #fff;48 font-weight: bold;49 padding: 4px 0 0 5px;50 margin: 0;51 text-align: left;45 font-family: helvetica, verdana, sans-serif; 46 font-size: 12px; 47 color: #fff; 48 font-weight: bold; 49 padding: 4px 0 0 5px; 50 margin: 0; 51 text-align: left; 52 52 } 53 53 54 54 #GB_close { 55 padding: 2px 5px 0 0;56 float: right;57 cursor: pointer;55 padding: 2px 5px 0 0; 56 float: right; 57 cursor: pointer; 58 58 } 59 -
trunk/plog-admin/css/lightbox.css
r345 r550 1 #lightbox {1 #lightbox { 2 2 background-color:#eee; 3 3 padding: 10px; 4 4 border-bottom: 2px solid #666; 5 5 border-right: 2px solid #666; 6 } 7 #lightboxDetails{ 6 } 7 8 #lightboxDetails { 8 9 font-size: 0.8em; 9 10 padding-top: 0.4em; 10 } 11 #lightboxCaption{ float: left; } 12 #keyboardMsg{ float: right; } 13 #closeButton{ top: 5px; right: 5px; } 11 } 14 12 15 #lightbox img{ border: none; clear: both;} 16 #overlay img{ border: none; } 13 #lightboxCaption { 14 float: left; 15 } 17 16 18 #overlay{ background-image: url(../graphics/overlay.png); } 17 #keyboardMsg { 18 float: right; 19 } 19 20 20 * html #overlay{ 21 #closeButton { 22 top: 5px; 23 right: 5px; 24 } 25 26 #lightbox img { 27 border: none; 28 clear: both; 29 } 30 31 #overlay img { 32 border: none; 33 } 34 35 #overlay { 36 background-image: url("../images/overlay.png"); 37 } 38 39 * html #overlay { 21 40 background-color: #333; 22 41 back\ground-color: transparent; 23 background-image: url(blank.gif); 24 filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../graphics/overlay.png", sizingMethod="scale"); 25 } 26 42 background-image: url("blank.gif"); 43 filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../images/overlay.png", sizingMethod="scale"); 44 } -
trunk/plog-admin/css/tabs.css
r440 r550 1 1 #tab-nav { 2 float:left; 3 width:100%; 4 background:transparent url("../graphics/bg.gif") repeat-x bottom; 5 font-size:13px; 6 line-height:normal; 7 margin-bottom: 18px; 8 border-bottom: 2px solid #336699; 9 } 2 float: left; 3 width: 100%; 4 background: transparent url("../images/bg.gif") repeat-x bottom; 5 font-size: 13px; 6 line-height: normal; 7 margin-bottom: 18px; 8 border-bottom: 2px solid #369; 9 } 10 10 11 #tab-nav ul { 11 margin:0; 12 padding:10px 10px 0; 13 list-style:none; 14 } 12 margin: 0; 13 padding: 10px 10px 0; 14 list-style: none; 15 } 16 15 17 #tab-nav li { 16 float:left; 17 background:url("../graphics/left.gif") no-repeat left top; 18 margin:0; 19 padding:0 0 0 9px; 20 } 18 float: left; 19 background: url("../images/left.gif") no-repeat left top; 20 margin: 0; 21 padding: 0 0 0 9px; 22 } 23 21 24 #tab-nav a { 22 float:left; 23 display:block; 24 background:url("../graphics/right.gif") no-repeat right top; 25 padding:5px 15px 4px 6px; 26 text-decoration:none; 27 font-weight:normal; 28 color:#765; 29 } 30 /* Commented Backslash Hack 31 hides rule from IE5-Mac \*/ 32 #tab-nav a {float:none;} 25 float: left; 26 display: block; 27 background: url("../images/right.gif") no-repeat right top; 28 padding: 5px 15px 4px 6px; 29 text-decoration: none; 30 font-weight: normal; 31 color: #765; 32 } 33 /* Commented Backslash Hack hides rule from IE5-Mac \*/ 34 #tab-nav a { 35 float: none; 36 } 33 37 /* End IE5-Mac hack */ 38 34 39 #tab-nav a:hover { 35 color:green; 36 } 40 color: green; 41 } 42 37 43 #tab-nav #current { 38 background-image:url("../graphics/left_on.gif"); 39 } 44 background-image: url("../images/left_on.gif"); 45 } 46 40 47 #tab-nav #current a { 41 background-image:url("../graphics/right_on.gif");42 color:#fff;43 padding-bottom:5px;44 font-weight:bold;45 }46 48 background-image: url("../images/right_on.gif"); 49 color: #fff; 50 padding-bottom: 5px; 51 font-weight: bold; 52 } 53 47 54 #tab-nav a em { 48 55 text-decoration: underline; … … 51 58 52 59 #tab-subnav { 53 background: #3 36699;60 background: #369; 54 61 padding: 8px; 55 62 clear: both; -
trunk/plog-admin/includes/install-form-setup-complete.php
r546 r550 2 2 if (!defined('PLOGGER_DIR')) { 3 3 return false; 4 } ;4 } 5 5 ?> 6 <h1>Plogger Install</h1>7 <form method="POST">8 <p>Configuration setup is now complete.<br/>Click 'Install' to finish installation.</p>9 <p>Your username is <?php echo $_SESSION['install_values']['admin_username']; ?> and your password is `<?php echo $_SESSION['install_values']['admin_password']; ?>`</p>6 <h1>Plogger Install</h1> 7 <form method="POST"> 8 <p>Configuration setup is now complete.<br />Click 'Install' to finish installation.</p> 9 <p>Your username is <?php echo $_SESSION['install_values']['admin_username']; ?> and your password is `<?php echo $_SESSION['install_values']['admin_password']; ?>`</p> 10 10 <?php if (!empty($_SESSION["plogger_config"])) { ?> 11 <p>Before you can proceed, please <input type="submit" name="dlconfig" value="click here"/> to download configuration file for your gallery, then upload it to your webhost (into the same directory where you installed Plogger itself).</p>11 <p>Before you can proceed, please <input type="submit" name="dlconfig" value="click here"/> to download configuration file for your gallery, then upload it to your webhost (into the same directory where you installed Plogger itself).</p> 12 12 <?php } ?> 13 <p>14 <input type="submit" name="proceed" id="proceed" value="Install"/>15 </p>16 </form>13 <p> 14 <input type="submit" name="proceed" id="proceed" value="Install"/> 15 </p> 16 </form> -
trunk/plog-admin/includes/install-form-setup.php
r546 r550 4 4 }; 5 5 ?> 6 <h1>Plogger Configuration Setup</h1>7 <p>To install, simply fill out the following form. If there are any problems, you will be notified and asked to fix them before the installation will continue. After the installation has finished, you will be redirected to the Plogger admin page.</p>8 <form action="_install.php" method="post">9 <input type="hidden" name="action" value="install" />10 <table>11 <tr>12 <td colspan="2">13 <div id="navcontainer">14 <h1>Database Setup</h1>15 </div>16 </td>17 </tr>18 <tr>19 <td class="form_label"><label for="db_host">MySQL host:</label></td>20 <td class="form_input"><input type="text" name="db_host" id="db_host" value="<?php echo $form['db_host']; ?>" /></td>21 </tr>6 <h1>Plogger Configuration Setup</h1> 7 <p>To install, simply fill out the following form. If there are any problems, you will be notified and asked to fix them before the installation will continue. After the installation has finished, you will be redirected to the Plogger admin page.</p> 8 <form action="_install.php" method="post"> 9 <input type="hidden" name="action" value="install" /> 10 <table> 11 <tr> 12 <td colspan="2"> 13 <div id="navcontainer"> 14 <h1>Database Setup</h1> 15 </div> 16 </td> 17 </tr> 18 <tr> 19 <td class="form_label"><label for="db_host">MySQL host:</label></td> 20 <td class="form_input"><input type="text" name="db_host" id="db_host" value="<?php echo $form['db_host']; ?>" /></td> 21 </tr> 22 22 23 <tr>24 <td class="form_label"><label for="db_user">MySQL Username:</label></td>25 <td class="form_input"><input type="text" name="db_user" id="db_user" value="<?php echo $form['db_user']; ?>" /></td>26 </tr>27 <tr>28 <td class="form_label"><label for="db_password">MySQL Password:</label></td>29 <td class="form_input"><input type="password" name="db_pass" id="db_pass" value="<?php echo $form['db_pass']; ?>" /></td>30 </tr>23 <tr> 24 <td class="form_label"><label for="db_user">MySQL Username:</label></td> 25 <td class="form_input"><input type="text" name="db_user" id="db_user" value="<?php echo $form['db_user']; ?>" /></td> 26 </tr> 27 <tr> 28 <td class="form_label"><label for="db_password">MySQL Password:</label></td> 29 <td class="form_input"><input type="password" name="db_pass" id="db_pass" value="<?php echo $form['db_pass']; ?>" /></td> 30 </tr> 31 31 32 <tr> 33 <td class="form_label"><label for="db_name">MySQL Database:</label></td> 34 <td class="form_input"><input type="text" name="db_name" id="db_name" value="<?php echo $form['db_name']; ?>" /></td> 35 </tr> 36 <tr> 37 <td colspan="2"> 38 <div id="navcontainer"> 39 <h1>Administrative Setup</h1> 40 </div> 41 </td> 42 </tr> 43 <tr> 44 <td class="form_label"><label for="gallery">Gallery Name:</label></td> 45 <td class="form_input"><input type="text" name="gallery_name" id="gallery" value="<?php echo $form['gallery_name']; ?>" /></td> 46 </tr> 47 <tr> 48 <td class="form_label"><label for="username">Your e-mail:</label></td> 49 <td class="form_input"><input type="text" name="admin_email" id="email" value="<?php echo $form['admin_email']; ?>" /></td> 50 </tr> 51 <?php 52 //if server is safe_mode enabled, prompt user for FTP info for FTP workaround 53 if (ini_get('safe_mode') && function_exists('ftp_connect')){?> 54 <tr> 55 <td colspan="2"> 56 <div id="navcontainer"> 57 <h1>Safe_mode FTP workaround</h1> 58 <br />Safe mode has been detected on your server. FTP access is needed to allow Plogger to work correctly with safe_mode enabled. 59 </div> 60 </td> 61 </tr> 62 <tr> 63 <td class="form_label"><label for="ftp_host">FTP Host:</label></td> 64 <td class="form_input"><input type="text" name="ftp_host" id="ftp_host" value="<?php echo $form['ftp_host']; ?>" /></td> 65 </tr> 66 <tr> 67 <td class="form_label"><label for="ftp_user">FTP Username:</label></td> 68 <td class="form_input"><input type="text" name="ftp_user" id="ftp_user" value="<?php echo $form['ftp_user']; ?>" /></td> 69 </tr> 70 <tr> 71 <td class="form_label"><label for="ftp_password">FTP Password:</label></td> 72 <td class="form_input"><input type="password" name="ftp_pass" id="ftp_pass" value="<?php echo $form['ftp_pass']; ?>" /></td> 73 </tr> 74 <tr> 75 <td class="form_label"><label for="ftp_path">FTP Path to Plogger Base Folder (from FTP login):</label></td> 76 <td class="form_input"><input type="text" name="ftp_path" id="ftp_path" value="<?php echo $form['ftp_path']; ?>" /></td> 77 </tr> 78 <?php } //end safe_mode workaround ?> 79 <tr> 80 <td class="submitButtonRow" colspan="2"> 81 <input type="submit" name="submit" id="submit" value="Proceed" /> 82 </td> 83 </tr> 84 </table> 85 </form> 32 <tr> 33 <td class="form_label"><label for="db_name">MySQL Database:</label></td> 34 <td class="form_input"><input type="text" name="db_name" id="db_name" value="<?php echo $form['db_name']; ?>" /></td> 35 </tr> 36 <tr> 37 <td colspan="2"> 38 <div id="navcontainer"> 39 <h1>Administrative Setup</h1> 40 </div> 41 </td> 42 </tr> 43 <tr> 44 <td class="form_label"><label for="gallery">Gallery Name:</label></td> 45 <td class="form_input"><input type="text" name="gallery_name" id="gallery" value="<?php echo $form['gallery_name']; ?>" /></td> 46 </tr> 47 <tr> 48 <td class="form_label"><label for="username">Your e-mail:</label></td> 49 <td class="form_input"><input type="text" name="admin_email" id="email" value="<?php echo $form['admin_email']; ?>" /></td> 50 </tr> 51 <?php 52 //if server is safe_mode enabled, prompt user for FTP info for FTP workaround 53 if (ini_get('safe_mode') && function_exists('ftp_connect')){ 54 ?> 55 <tr> 56 <td colspan="2"> 57 <div id="navcontainer"> 58 <h1>Safe_mode FTP workaround</h1> 59 <br />Safe mode has been detected on your server. FTP access is needed to allow Plogger to work correctly with safe_mode enabled. 60 </div> 61 </td> 62 </tr> 63 <tr> 64 <td class="form_label"><label for="ftp_host">FTP Host:</label></td> 65 <td class="form_input"><input type="text" name="ftp_host" id="ftp_host" value="<?php echo $form['ftp_host']; ?>" /></td> 66 </tr> 67 <tr> 68 <td class="form_label"><label for="ftp_user">FTP Username:</label></td> 69 <td class="form_input"><input type="text" name="ftp_user" id="ftp_user" value="<?php echo $form['ftp_user']; ?>" /></td> 70 </tr> 71 <tr> 72 <td class="form_label"><label for="ftp_password">FTP Password:</label></td> 73 <td class="form_input"><input type="password" name="ftp_pass" id="ftp_pass" value="<?php echo $form['ftp_pass']; ?>" /></td> 74 </tr> 75 <tr> 76 <td class="form_label"><label for="ftp_path">FTP Path to Plogger Base Folder (from FTP login):</label></td> 77 <td class="form_input"><input type="text" name="ftp_path" id="ftp_path" value="<?php echo $form['ftp_path']; ?>" /></td> 78 </tr> 79 <?php } //end safe_mode workaround ?> 80 <tr> 81 <td class="submitButtonRow" colspan="2"> 82 <input type="submit" name="submit" id="submit" value="Proceed" /> 83 </td> 84 </tr> 85 </table> 86 </form> -
trunk/plog-admin/includes/install-functions.php
r546 r550 1 1 <?php 2 require_once(PLOGGER_DIR . 'admin/plog-admin-functions.php'); 3 @include(PLOGGER_DIR . 'plog-config.php'); 2 if (!defined('PLOGGER_DIR')) { 3 return false; 4 } 5 require_once(PLOGGER_DIR.'plog-admin/plog-admin-functions.php'); 6 @include(PLOGGER_DIR.'plog-config.php'); 4 7 5 8 function do_install($form) { 6 9 $form = array_map('stripslashes',$form); 7 10 $form = array_map('trim',$form); 8 11 9 12 $errors = check_requirements(); 10 13 if (sizeof($errors) > 0) { … … 43 46 $errors[] = 'Please enter the MySQL password.'; 44 47 } 45 48 46 49 if (empty($form['db_name'])) { 47 50 $errors[] = 'Please enter the MySQL database name.'; 48 51 } 49 52 50 53 if (empty($form['gallery_name'])) { 51 54 $errors[] = 'Please enter the name for your gallery.'; 52 55 } 53 56 54 57 if (empty($form['admin_email'])) { 55 58 $errors[] = 'Please enter your e-mail address.'; 56 59 } 57 60 58 61 if (ini_get('safe_mode') && function_exists('ftp_connect')) { 59 62 //if safe_mode enabled, check the FTP information form inputs … … 67 70 68 71 if (empty($form['ftp_pass'])) { 69 $errors[] = 'Please enter the FTP password.';70 } 71 72 $errors[] = 'Please enter the FTP password.'; 73 } 74 72 75 if (!empty($form['ftp_path'])) { 73 76 if (substr($form['ftp_path'],0,1)!="/"){ … … 98 101 $password = generate_password(); 99 102 $_SESSION["install_values"] = array( 100 "gallery_name" => $form["gallery_name"],101 "admin_email" => $form["admin_email"],102 "admin_password" => $password,103 "admin_username" => "admin"103 "gallery_name" => $form["gallery_name"], 104 "admin_email" => $form["admin_email"], 105 "admin_password" => $password, 106 "admin_username" => "admin" 104 107 ); 105 108 106 109 if (ini_get('safe_mode') && function_exists('ftp_connect')) { 107 110 $conf = create_config_file($form['db_host'],$form['db_user'],$form['db_pass'],$form['db_name'],$form['ftp_host'],$form['ftp_user'],$form['ftp_pass'],$form['ftp_path']); … … 117 120 $_SESSION["plogger_config"] = $conf; 118 121 } 119 require(PLOGGER_DIR . ' lib/plogger/form_setup_complete.php');122 require(PLOGGER_DIR . 'plog-admin/includes/install-form-setup-complete.php'); 120 123 return true; 121 124 } … … 126 129 $form['db_host'] = 'localhost'; 127 130 } 128 if (empty($form['ftp_host'])) {131 if (empty($form['ftp_host'])) { 129 132 $form['ftp_host'] = 'localhost'; 130 133 } … … 136 139 } 137 140 } 138 require(PLOGGER_DIR . ' lib/plogger/form_setup.php');141 require(PLOGGER_DIR . 'plog-admin/includes/install-form-setup.php'); 139 142 } 140 143 … … 152 155 153 156 maybe_add_table( 154 TABLE_PREFIX . 'collections'155 ,"`name` varchar(128) NOT NULL default '',156 `description` varchar(255) NOT NULL default '',157 `path` varchar(255) NOT NULL default '',158 `id` int(11) NOT NULL auto_increment,159 `thumbnail_id` int(11) NOT NULL DEFAULT '0',160 PRIMARY KEY (id)"161 ,"Type=MyISAM $default_charset");162 163 164 maybe_add_table( 165 TABLE_PREFIX . 'albums'166 ," `name` varchar(128) NOT NULL default '',167 `id` int(11) NOT NULL auto_increment,168 `description` varchar(255) NOT NULL default '',169 `path` varchar(255) NOT NULL default '',170 `parent_id` int(11) NOT NULL default '0',171 `thumbnail_id` int(11) NOT NULL default '0',172 PRIMARY KEY (id),173 INDEX pid_idx (parent_id)"174 ," Type=MyISAM $default_charset");175 176 maybe_add_table( 177 TABLE_PREFIX . 'pictures'178 ,"`path` varchar(255) NOT NULL default '',179 `parent_album` int(11) NOT NULL default '0',180 `parent_collection` int(11) NOT NULL default '0',181 `caption` mediumtext NOT NULL,182 `description` text NOT NULL,183 `id` int(11) NOT NULL auto_increment,184 `date_modified` timestamp(14) NOT NULL,185 `date_submitted` timestamp(14) NOT NULL,186 `EXIF_date_taken` varchar(64) NOT NULL default '',187 `EXIF_camera` varchar(64) NOT NULL default '',188 `EXIF_shutterspeed` varchar(64) NOT NULL default '',189 `EXIF_focallength` varchar(64) NOT NULL default '',190 `EXIF_flash` varchar(64) NOT NULL default '',191 `EXIF_aperture` varchar(64) NOT NULL default '',192 `allow_comments` int(11) NOT NULL default '1',193 PRIMARY KEY (id),194 INDEX pa_idx (parent_album),195 INDEX pc_idx (parent_collection)"196 ,"Type=MyISAM $default_charset");197 198 maybe_add_table( 199 TABLE_PREFIX . 'comments'200 ,"`id` int(11) NOT NULL auto_increment,201 `parent_id` int(11) NOT NULL default '0',202 `author` varchar(64) NOT NULL default '',203 `email` varchar(64) NOT NULL default '',204 `url` varchar(64) NOT NULL default '',205 `date` datetime NOT NULL,206 `comment` longtext NOT NULL,207 `ip` char(64),208 `approved` tinyint default '1',209 PRIMARY KEY (id),210 INDEX pid_idx (parent_id),211 INDEX approved_idx (approved)"212 ,"Type=MyISAM $default_charset");213 214 maybe_add_table( 215 TABLE_PREFIX . 'config'216 ,"`max_thumbnail_size` int(11) NOT NULL default '0',217 `max_display_size` int(11) NOT NULL default '0',218 `thumb_num` int(11) NOT NULL default '0',219 `admin_username` varchar(64) NOT NULL default '',220 `admin_password` varchar(64) NOT NULL default '',221 `admin_email` varchar(50) NOT NULL default '',222 `date_format` varchar(64) NOT NULL default '',223 `compression` int(11) NOT NULL default '75',224 `default_sortby` varchar(20) NOT NULL default '',225 `default_sortdir` varchar(5) NOT NULL default '',226 `album_sortby` varchar(20) NOT NULL default '',227 `album_sortdir` varchar(5) NOT NULL default '',228 `collection_sortby` varchar(20) NOT NULL default '',229 `collection_sortdir` varchar(5) NOT NULL default '',230 `gallery_name` varchar(255) NOT NULL default '',231 `allow_dl` smallint(1) NOT NULL default '0',232 `allow_comments` smallint(1) NOT NULL default '1',233 `allow_print` smallint(1) NOT NULL default '1',234 `truncate` int(11) NOT NULL default '12',235 `square_thumbs` tinyint default 1,236 `feed_num_entries` int(15) NOT NULL default '15',237 `rss_thumbsize` int(11) NOT NULL default '400',238 `feed_title` text NOT NULL,239 `use_mod_rewrite` tinyint NOT NULL default '0',240 `gallery_url` varchar(255) NOT NULL default '',241 `comments_notify` tinyint NOT NULL default '1',242 `comments_moderate` tinyint NOT NULL default '0',243 `feed_language` varchar(255) NOT NULL default 'en-us',244 `theme_dir` varchar(128) NOT NULL default '',245 `thumb_nav_range` int(11) NOT NULL default '0',246 `enable_thumb_nav` tinyint default '0',247 `allow_fullpic` tinyint default '1'"248 ,"Type=MyISAM $default_charset");249 250 maybe_add_table( 251 TABLE_PREFIX . 'thumbnail_config'252 ,"`id` int(10) unsigned NOT NULL auto_increment,253 `update_timestamp` int(10) unsigned default NULL,254 `max_size` int(10) unsigned default NULL,255 `disabled` tinyint default 0,256 PRIMARY KEY (`id`)");257 258 maybe_add_table( 259 TABLE_PREFIX . 'tag2picture'260 ,"`tag_id` bigint(20) unsigned NOT NULL default '0',261 `picture_id` bigint(20) unsigned NOT NULL default '0',262 `tagdate` datetime default NULL,263 KEY `tag_id` (`tag_id`),264 KEY `picture_id` (`picture_id`)"265 ,"Type=MyISAM $default_charset");266 267 maybe_add_table( 268 TABLE_PREFIX . 'tags'269 ,"`id` bigint(20) unsigned NOT NULL auto_increment,270 `tag` char(50) NOT NULL default '',271 `tagdate` datetime NOT NULL default '0000-00-00 00:00:00',272 `urlified` char(50) NOT NULL default '',273 PRIMARY KEY (`id`),274 UNIQUE `tag` (`tag`),275 UNIQUE `urlified` (`urlified`)"276 ,"Type=MyISAM $default_charset");157 TABLE_PREFIX . 'collections' 158 ,"`name` varchar(128) NOT NULL default '', 159 `description` varchar(255) NOT NULL default '', 160 `path` varchar(255) NOT NULL default '', 161 `id` int(11) NOT NULL auto_increment, 162 `thumbnail_id` int(11) NOT NULL DEFAULT '0', 163 PRIMARY KEY (id)" 164 ,"Type=MyISAM $default_charset"); 165 166 167 maybe_add_table( 168 TABLE_PREFIX . 'albums' 169 ," `name` varchar(128) NOT NULL default '', 170 `id` int(11) NOT NULL auto_increment, 171 `description` varchar(255) NOT NULL default '', 172 `path` varchar(255) NOT NULL default '', 173 `parent_id` int(11) NOT NULL default '0', 174 `thumbnail_id` int(11) NOT NULL default '0', 175 PRIMARY KEY (id), 176 INDEX pid_idx (parent_id)" 177 ," Type=MyISAM $default_charset"); 178 179 maybe_add_table( 180 TABLE_PREFIX . 'pictures' 181 ,"`path` varchar(255) NOT NULL default '', 182 `parent_album` int(11) NOT NULL default '0', 183 `parent_collection` int(11) NOT NULL default '0', 184 `caption` mediumtext NOT NULL, 185 `description` text NOT NULL, 186 `id` int(11) NOT NULL auto_increment, 187 `date_modified` timestamp(14) NOT NULL, 188 `date_submitted` timestamp(14) NOT NULL, 189 `EXIF_date_taken` varchar(64) NOT NULL default '', 190 `EXIF_camera` varchar(64) NOT NULL default '', 191 `EXIF_shutterspeed` varchar(64) NOT NULL default '', 192 `EXIF_focallength` varchar(64) NOT NULL default '', 193 `EXIF_flash` varchar(64) NOT NULL default '', 194 `EXIF_aperture` varchar(64) NOT NULL default '', 195 `allow_comments` int(11) NOT NULL default '1', 196 PRIMARY KEY (id), 197 INDEX pa_idx (parent_album), 198 INDEX pc_idx (parent_collection)" 199 ,"Type=MyISAM $default_charset"); 200 201 maybe_add_table( 202 TABLE_PREFIX . 'comments' 203 ,"`id` int(11) NOT NULL auto_increment, 204 `parent_id` int(11) NOT NULL default '0', 205 `author` varchar(64) NOT NULL default '', 206 `email` varchar(64) NOT NULL default '', 207 `url` varchar(64) NOT NULL default '', 208 `date` datetime NOT NULL, 209 `comment` longtext NOT NULL, 210 `ip` char(64), 211 `approved` tinyint default '1', 212 PRIMARY KEY (id), 213 INDEX pid_idx (parent_id), 214 INDEX approved_idx (approved)" 215 ,"Type=MyISAM $default_charset"); 216 217 maybe_add_table( 218 TABLE_PREFIX . 'config' 219 ,"`max_thumbnail_size` int(11) NOT NULL default '0', 220 `max_display_size` int(11) NOT NULL default '0', 221 `thumb_num` int(11) NOT NULL default '0', 222 `admin_username` varchar(64) NOT NULL default '', 223 `admin_password` varchar(64) NOT NULL default '', 224 `admin_email` varchar(50) NOT NULL default '', 225 `date_format` varchar(64) NOT NULL default '', 226 `compression` int(11) NOT NULL default '75', 227 `default_sortby` varchar(20) NOT NULL default '', 228 `default_sortdir` varchar(5) NOT NULL default '', 229 `album_sortby` varchar(20) NOT NULL default '', 230 `album_sortdir` varchar(5) NOT NULL default '', 231 `collection_sortby` varchar(20) NOT NULL default '', 232 `collection_sortdir` varchar(5) NOT NULL default '', 233 `gallery_name` varchar(255) NOT NULL default '', 234 `allow_dl` smallint(1) NOT NULL default '0', 235 `allow_comments` smallint(1) NOT NULL default '1', 236 `allow_print` smallint(1) NOT NULL default '1', 237 `truncate` int(11) NOT NULL default '12', 238 `square_thumbs` tinyint default 1, 239 `feed_num_entries` int(15) NOT NULL default '15', 240 `rss_thumbsize` int(11) NOT NULL default '400', 241 `feed_title` text NOT NULL, 242 `use_mod_rewrite` tinyint NOT NULL default '0', 243 `gallery_url` varchar(255) NOT NULL default '', 244 `comments_notify` tinyint NOT NULL default '1', 245 `comments_moderate` tinyint NOT NULL default '0', 246 `feed_language` varchar(255) NOT NULL default 'en-us', 247 `theme_dir` varchar(128) NOT NULL default '', 248 `thumb_nav_range` int(11) NOT NULL default '0', 249 `enable_thumb_nav` tinyint default '0', 250 `allow_fullpic` tinyint default '1'" 251 ,"Type=MyISAM $default_charset"); 252 253 maybe_add_table( 254 TABLE_PREFIX . 'thumbnail_config' 255 ,"`id` int(10) unsigned NOT NULL auto_increment, 256 `update_timestamp` int(10) unsigned default NULL, 257 `max_size` int(10) unsigned default NULL, 258 `disabled` tinyint default 0, 259 PRIMARY KEY (`id`)"); 260 261 maybe_add_table( 262 TABLE_PREFIX . 'tag2picture' 263 ,"`tag_id` bigint(20) unsigned NOT NULL default '0', 264 `picture_id` bigint(20) unsigned NOT NULL default '0', 265 `tagdate` datetime default NULL, 266 KEY `tag_id` (`tag_id`), 267 KEY `picture_id` (`picture_id`)" 268 ,"Type=MyISAM $default_charset"); 269 270 maybe_add_table( 271 TABLE_PREFIX . 'tags' 272 ,"`id` bigint(20) unsigned NOT NULL auto_increment, 273 `tag` char(50) NOT NULL default '', 274 `tagdate` datetime NOT NULL default '0000-00-00 00:00:00', 275 `urlified` char(50) NOT NULL default '', 276 PRIMARY KEY (`id`), 277 UNIQUE `tag` (`tag`), 278 UNIQUE `urlified` (`urlified`)" 279 ,"Type=MyISAM $default_charset"); 277 280 278 281 } … … 283 286 284 287 $thumbnail_sizes = array( 285 THUMB_SMALL => 100,286 THUMB_LARGE => 500,287 THUMB_RSS => 400,288 THUMB_NAV => 60288 THUMB_SMALL => 100, 289 THUMB_LARGE => 500, 290 THUMB_RSS => 400, 291 THUMB_NAV => 60 289 292 ); 290 293 291 294 foreach($thumbnail_sizes as $key => $size) { 292 295 $sql = "INSERT INTO `".TABLE_PREFIX."thumbnail_config` (id,update_timestamp,max_size) 293 VALUES('$key','$long_ago','$size')";296 VALUES('$key','$long_ago','$size')"; 294 297 mysql_query($sql); 295 298 } 296 299 297 $config['default_theme_dir'] = PLOGGER_DIR . 'themes/default/'; 298 $config['baseurl'] = "http://".$_SERVER["SERVER_NAME"]. substr($_SERVER["PHP_SELF"],0,strrpos($_SERVER["PHP_SELF"],"/")) . "/"; 300 $config['default_theme_dir'] = PLOGGER_DIR . 'plog-content/themes/default/'; 301 $config['gallery_url'] = "http://".$_SERVER["SERVER_NAME"]. dirname(dirname($_SERVER["PHP_SELF"])); 302 // verify that gallery URL contains a trailing slash. if not, add one. 303 if ($config['gallery_url']{strlen($config['gallery_url'])-1} != '/'){ 304 $config['gallery_url'] .= '/'; 305 } 306 // verify that the gallery URL begins with 'http://' for mod_rewrite 301 redirects 307 if (strpos($config['gallery_url'], 'http://') === false){ 308 $config['gallery_url'] = 'http://'.$config['gallery_url']; 309 } 310 // verify that the gallery URL has a 'www.' for mod_rewrite 301 redirects 311 if (strpos($config['gallery_url'], "www.") === false){ 312 $config['gallery_url'] = str_replace("http://", "http://www.", $config['gallery_url']); 313 } 299 314 $config['admin_username'] = 'admin'; 300 315 $config['admin_password'] = $form['admin_password']; 301 316 $config['admin_email'] = $form['admin_email']; 302 317 $config['gallery_name'] = $form['gallery_name']; 303 318 304 319 $config = array_map('mysql_real_escape_string',$config); 305 320 306 321 $row_exist = mysql_query("SELECT * FROM `".TABLE_PREFIX."config`"); 307 322 $row_exist_num = mysql_num_rows($row_exist); … … 309 324 if ($row_exist_num == 0) { 310 325 $query = "INSERT INTO `".TABLE_PREFIX."config` 311 (`theme_dir`,312 `compression`,313 `max_thumbnail_size`,314 `max_display_size`,315 `thumb_num`,316 `admin_username`,317 `admin_email`,318 `admin_password`,319 `date_format`,320 `feed_title`,321 `gallery_name`,322 `gallery_url`)326 (`theme_dir`, 327 `compression`, 328 `max_thumbnail_size`, 329 `max_display_size`, 330 `thumb_num`, 331 `admin_username`, 332 `admin_email`, 333 `admin_password`, 334 `date_format`, 335 `feed_title`, 336 `gallery_name`, 337 `gallery_url`) 323 338 VALUES 324 ('${config['default_theme_dir']}',339 ('${config['default_theme_dir']}', 325 340 75, 326 341 100, … … 328 343 20, 329 344 '${config['admin_username']}', 330 '${config['admin_email']}',331 MD5('${config['admin_password']}'),332 'n.j.Y',333 'Plogger Photo Feed',334 '${config['gallery_name']}',335 '${config['baseurl']}')";336 } else {337 $query = "UPDATE `".TABLE_PREFIX."config` SET338 `theme_dir` = '${config['default_theme_dir']}',339 `compression` = 75,340 `max_thumbnail_size` = 100,341 `max_display_size` = 500,342 `thumb_num` = 20,343 `admin_username` = '${config['admin_username']}',344 `admin_email` = '${config['admin_email']}',345 `admin_password` = MD5('${config['admin_password']}'),346 `date_format` = 'n.j.Y',347 `feed_title` = 'Plogger Photo Feed',348 `gallery_name` = '${config['gallery_name']}',349 `gallery_url` = '${config['baseurl']}'";350 }351 352 mysql_query($query) or die(mysql_error().'<br /><br />'. $query);353 354 mail($config['admin_email'],"Your new gallery","You have successfully installed your new Plogger gallery. You can manage it at ${config['baseurl']}admin Username is ${config['admin_username']} and password ${config['admin_password']}.");355 }356 357 function create_config_file($db_host,$db_user,$db_pass,$db_name,$ftp_host,$ftp_user,$ftp_pass,$ftp_path) {358 $cfg_file = "<?php\n";359 $cfg_file .= '// this is the file used to connect to your database.'."\n";360 $cfg_file .= '// you must change these values in order to run the gallery.'."\n";361 $cfg_file .= 'define("PLOGGER_DB_HOST","'.$db_host.'");'."\n";362 $cfg_file .= 'define("PLOGGER_DB_USER","'.$db_user.'");'."\n";363 $cfg_file .= 'define("PLOGGER_DB_PW","'.addcslashes($db_pass, '\\$"').'");'."\n"; // escape certain password characters stored in double quotes (\) ($) (")364 $cfg_file .= 'define("PLOGGER_DB_NAME","'.$db_name.'");'."\n";365 $cfg_file .= ''."\n";366 $cfg_file .= '// define("PLOGGER_EMBEDDED",""); // 1/0 (True/False) if set will overrule automatic check'."\n";367 $cfg_file .= '// define("PLOGGER_LOCALE",""); // da_DK de et fr pl ro_RO tr ...etc.'."\n";368 if (ini_get('safe_mode') && function_exists('ftp_connect') && !empty($ftp_host)) {369 //if safe_mode enabled, write the FTP workaround information to plog-config.php with db information370 $cfg_file .= "\n";371 $cfg_file .= '// these values are used to connect via FTP.'."\n";372 $cfg_file .= 'define("PLOGGER_FTP_HOST","'.$ftp_host.'");'."\n";373 $cfg_file .= 'define("PLOGGER_FTP_USER","'.$ftp_user.'");'."\n";374 $cfg_file .= 'define("PLOGGER_FTP_PW","'.addcslashes($ftp_pass, '\\$"').'");'."\n"; // escape certain password characters stored in double quotes (\) ($) (")375 $cfg_file .= 'define("PLOGGER_FTP_PATH","'.$ftp_path.'");'."\n";376 }377 378 $cfg_file .= "?>\n";379 return $cfg_file;380 }381 382 383 function maybe_add_column($table,$column,$add_sql) {384 $sql = "DESCRIBE $table";385 $res = mysql_query($sql);386 $found = false;387 while($row = mysql_fetch_array($res,MYSQL_NUM)) {388 if ($row[0] == $column) $found = true;389 }390 if (!$found) {391 mysql_query("ALTER TABLE $table ADD `$column` ". $add_sql);392 return "<li>Adding new field $column to database.";393 } else {394 return "<li>$column already present in database.";395 }396 }397 398 function maybe_drop_column($table,$column) {399 $sql = "DESCRIBE $table";400 $res = mysql_query($sql);401 $found = false;402 while($row = mysql_fetch_array($res,MYSQL_NUM)) {403 if ($row[0] == $column) $found = true;404 }405 if ($found) {406 $sql = "ALTER TABLE $table DROP `$column`";407 mysql_query($sql);408 return "<li>dropping $column";409 } else {410 //print "$column does not exist<br/>";411 }412 }413 414 function maybe_add_table($table,$add_sql,$options = "") {415 $sql = "DESCRIBE $table";416 $res = mysql_query($sql);417 if (!$res) {418 $q = "CREATE table `$table` ($add_sql) $options";419 mysql_query($q);420 if (mysql_error()) {421 var_dump(mysql_error());422 }423 } else {424 return "<li>Table `$table` already exists, ignoring.";425 }426 }427 428 function gd_missing() {429 require_once(dirname(__FILE__) . '/../../lib/phpthumb/phpthumb.functions.php');430 // this is copied over from phpthumb431 return phpthumb_functions::gd_version() < 1;432 }433 434 function check_requirements() {435 $errors = array();436 if (gd_missing()) {437 $errors[] = "PHP GD module was not detected.";438 }439 440 if (!function_exists('mysql_connect')) {441 $errors[] = "PHP MySQL module was not detected.";442 }443 444 $files_to_read = array("./","./admin","./css","./images","./lib","./thumbs","./uploads");445 foreach($files_to_read as $file){446 if (!is_readable(PLOGGER_DIR . $file)){447 $errors[] = "The path ".realpath(PLOGGER_DIR . $file)." (".$file.") is not readable.";448 }449 }450 451 $files_to_write = array("./","./thumbs","./images", "./uploads");452 foreach($files_to_write as $file){453 if (!is_writable(PLOGGER_DIR . $file)){454 $errors[] = 'The path '.realpath(PLOGGER_DIR . $file).' is not writable by the Web server.';455 }456 }457 458 return $errors;459 }460 461 function check_mysql($host,$user,$pass,$database) {462 $errors = array();463 if (function_exists('mysql_connect')) {464 $connection = @mysql_connect($host,$user,$pass);465 if (!$connection) {466 $errors[] = "Cannot connect to MySQL with the information provided. MySQL error: "467 . mysql_error();468 }469 }470 $select = @mysql_select_db($database);471 if (!$select) {472 $errors[] = "Couldn't find the database $database. MySQL error: " . mysql_error();473 474 }475 return $errors;476 }477 478 function check_FTP($host, $user, $pass, $path) {479 $errors = array();480 481 $connection = @ftp_connect($host);482 if (!$connection) {483 $errors[] = "Couldn't connect to FTP host \"$host\". Please check your FTP Host:";484 } else {485 $login = @ftp_login($connection, $user, $pass);486 if (!$login) {487 $errors[] = "Couldn't login to FTP host \"$host\" with username \"$user\" and password \"$pass\". Please check your FTP Username: and FTP Password:";488 } else {489 $checkdir = @ftp_chdir($connection, $path."images/"); // check to see if theimages/ folder is accessible490 if (!$checkdir) {491 $errors[] = "Couldn't find the Plogger images\folder along the path \"$path\". Please check your FTP Path to Plogger Base Folder (from FTP login):";492 }493 }494 }495 @ftp_close($connection);496 return $errors;497 }498 499 function generate_password() {500 $src = preg_split("//","abcdefghkmnpqrstuvwxyz23456789",-1,PREG_SPLIT_NO_EMPTY);501 shuffle($src);502 return join("",array_slice($src,0,5));503 }504 505 function config_writable() {506 $cf = PLOGGER_DIR . "plog-config.php";507 if (file_exists($cf)) {508 return is_writable($cf);509 }510 return is_writable(PLOGGER_DIR);511 } 512 513 function write_config($data) {514 $cf = PLOGGER_DIR . "plog-config.php";515 $handle = fopen($cf,"w");516 fwrite($handle,$data);517 fclose($handle);518 }345 '${config['admin_email']}', 346 MD5('${config['admin_password']}'), 347 'n.j.Y', 348 'Plogger Photo Feed', 349 '${config['gallery_name']}', 350 '${config['gallery_url']}')"; 351 } else { 352 $query = "UPDATE `".TABLE_PREFIX."config` SET 353 `theme_dir` = '${config['default_theme_dir']}', 354 `compression` = 75, 355 `max_thumbnail_size` = 100, 356 `max_display_size` = 500, 357 `thumb_num` = 20, 358 `admin_username` = '${config['admin_username']}', 359 `admin_email` = '${config['admin_email']}', 360 `admin_password` = MD5('${config['admin_password']}'), 361 `date_format` = 'n.j.Y', 362 `feed_title` = 'Plogger Photo Feed', 363 `gallery_name` = '${config['gallery_name']}', 364 `gallery_url` = '${config['gallery_url']}'"; 365 } 366 367 mysql_query($query) or die(mysql_error().'<br /><br />'. $query); 368 369 mail($config['admin_email'],"Your new gallery","You have successfully installed your new Plogger gallery. You can manage it at ${config['gallery_url']}plog-admin Username is ${config['admin_username']} and password ${config['admin_password']}."); 370 } 371 372 function create_config_file($db_host,$db_user,$db_pass,$db_name,$ftp_host,$ftp_user,$ftp_pass,$ftp_path) { 373 $cfg_file = "<?php\n"; 374 $cfg_file .= '// this is the file used to connect to your database.'."\n"; 375 $cfg_file .= '// you must change these values in order to run the gallery.'."\n"; 376 $cfg_file .= 'define("PLOGGER_DB_HOST","'.$db_host.'");'."\n"; 377 $cfg_file .= 'define("PLOGGER_DB_USER","'.$db_user.'");'."\n"; 378 $cfg_file .= 'define("PLOGGER_DB_PW","'.addcslashes($db_pass, '\\$"').'");'."\n"; // escape certain password characters stored in double quotes (\) ($) (") 379 $cfg_file .= 'define("PLOGGER_DB_NAME","'.$db_name.'");'."\n"; 380 $cfg_file .= ''."\n"; 381 $cfg_file .= '// define("PLOGGER_EMBEDDED",""); // 1/0 (True/False) if set will overrule automatic check'."\n"; 382 $cfg_file .= '// define("PLOGGER_LOCALE",""); // da_DK de et fr pl ro_RO tr ...etc.'."\n"; 383 if (ini_get('safe_mode') && function_exists('ftp_connect') && !empty($ftp_host)) { 384 //if safe_mode enabled, write the FTP workaround information to plog-config.php with db information 385 $cfg_file .= "\n"; 386 $cfg_file .= '// these values are used to connect via FTP.'."\n"; 387 $cfg_file .= 'define("PLOGGER_FTP_HOST","'.$ftp_host.'");'."\n"; 388 $cfg_file .= 'define("PLOGGER_FTP_USER","'.$ftp_user.'");'."\n"; 389 $cfg_file .= 'define("PLOGGER_FTP_PW","'.addcslashes($ftp_pass, '\\$"').'");'."\n"; // escape certain password characters stored in double quotes (\) ($) (") 390 $cfg_file .= 'define("PLOGGER_FTP_PATH","'.$ftp_path.'");'."\n"; 391 } 392 393 $cfg_file .= "?>\n"; 394 return $cfg_file; 395 } 396 397 398 function maybe_add_column($table,$column,$add_sql) { 399 $sql = "DESCRIBE $table"; 400 $res = mysql_query($sql); 401 $found = false; 402 while($row = mysql_fetch_array($res,MYSQL_NUM)) { 403 if ($row[0] == $column) $found = true; 404 } 405 if (!$found) { 406 mysql_query("ALTER TABLE $table ADD `$column` ". $add_sql); 407 return "<li>Adding new field $column to database."; 408 } else { 409 return "<li>$column already present in database."; 410 } 411 } 412 413 function maybe_drop_column($table,$column) { 414 $sql = "DESCRIBE $table"; 415 $res = mysql_query($sql); 416 $found = false; 417 while($row = mysql_fetch_array($res,MYSQL_NUM)) { 418 if ($row[0] == $column) $found = true; 419 } 420 if ($found) { 421 $sql = "ALTER TABLE $table DROP `$column`"; 422 mysql_query($sql); 423 return "<li>dropping $column"; 424 } else { 425 //print "$column does not exist<br/>";
