4images PHP Cross Reference Image Galleries

Source: /update_1.6.1_to_1.7.php - 121 lines - 4671 bytes - Summary - Text - Print

   1  <?php
   2  /**************************************************************************
   3   *                                                                        *
   4   *    4images - A Web Based Image Gallery Management System               *
   5   *    ----------------------------------------------------------------    *
   6   *                                                                        *
   7   *             File: update_1.6.1_to_1.7.php                              *
   8   *        Copyright: (C) 2002-2012 Jan Sorgalla                           *
   9   *            Email: jan@4homepages.de                                    * 
  10   *              Web: http://www.4homepages.de                             * 
  11   *    Scriptversion: 1.7.11                                               *
  12   *                                                                        *
  13   *    Never released without support from: Nicky (http://www.nicky.net)   *
  14   *                                                                        *
  15   **************************************************************************
  16   *                                                                        *
  17   *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
  18   *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
  19   *    ---------------------------------------------------------------     *
  20   *    This script is NOT freeware! Please read the Copyright Notice       *
  21   *    (Licence.txt) for further information.                              *
  22   *                                                                        *
  23   *************************************************************************/
  24  
  25  error_reporting(E_ERROR | E_WARNING | E_PARSE);
  26  set_magic_quotes_runtime(0);
  27  define('ROOT_PATH', './');
  28  
  29  if (isset($HTTP_GET_VARS['action']) || isset($HTTP_POST_VARS['action'])) {
  30    $action = (isset($HTTP_GET_VARS['action'])) ? trim($HTTP_GET_VARS['action']) : trim($HTTP_POST_VARS['action']);
  31  }
  32  else {
  33    $action = "intro";
  34  }
  35  
  36  @include(ROOT_PATH.'config.php');
  37  
  38  if (!defined("4IMAGES_ACTIVE")) {
  39    header("Location: install.php");
  40    exit;
  41  }
  42  if ($action == "finish") {
  43    header("Location: index.php");
  44    exit;
  45  }
  46  
  47  include (ROOT_PATH.'includes/constants.php');
  48  include (ROOT_PATH.'includes/search_utils.php');
  49  include(ROOT_PATH.'includes/db_'.$db_servertype.'.php');
  50  $site_db = new Db($db_host, $db_user, $db_password, $db_name);
  51  
  52  function next_step($action, $msg) {
  53    global $PHP_SELF;
  54  ?>
  55  <br />
  56  <table width="400" border="0" cellspacing="0" cellpadding="1" align="center">
  57    <tr>
  58      <td class="tableseparator">
  59        <table width="100%" border="0" cellspacing="0" cellpadding="3">
  60          <tr>
  61            <td class="tablerow2" align="center">
  62              <?php echo "Next step: <a href=\"".$PHP_SELF."?action=".$action."\"><b>".$msg."</b></a>\n"; ?>
  63            </td>
  64          </tr>
  65        </table>
  66      </td>
  67    </tr>
  68  </table>
  69  <br />
  70  <?php
  71  }
  72  ?>
  73  <html>
  74    <head>
  75    <meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
  76    <link rel="stylesheet" href="admin/cpstyle.css">
  77    <title>4images Update 1.6.1 to 1.7</title>
  78  </head>
  79  <body leftmargin="20" topmargin="20" marginwidth="20" marginheight="20" bgcolor="#FFFFFF">
  80  <table width="400" border="0" cellspacing="0" cellpadding="1" align="center">
  81    <tr>
  82      <td>
  83  <p align="center"><span class="headline">4images Update 1.6.1 to 1.7</span></p><br /><br />
  84  <?php
  85  if ($action == "intro") {
  86    next_step("updatesettings", "Update Settings");
  87  }
  88  
  89  if ($action == "updatesettings") {
  90    $ok = 1;
  91    $sql_edit = array();
  92    $sql_edit[] = "INSERT INTO ".SETTINGS_TABLE." (setting_name, setting_value) VALUES ('auto_thumbnail_resize_type', '1')";
  93    $sql_edit[] = "INSERT INTO ".SETTINGS_TABLE." (setting_name, setting_value) VALUES ('user_edit_image', '0')";
  94    $sql_edit[] = "INSERT INTO ".SETTINGS_TABLE." (setting_name, setting_value) VALUES ('user_delete_image', '0')";
  95    $sql_edit[] = "INSERT INTO ".SETTINGS_TABLE." (setting_name, setting_value) VALUES ('user_edit_comments', '0')";
  96    $sql_edit[] = "INSERT INTO ".SETTINGS_TABLE." (setting_name, setting_value) VALUES ('user_delete_comments', '0')";
  97  
  98    foreach ($sql_edit as $val) {
  99      if (!$site_db->query($val)) {
 100        $ok = 0;
 101      }
 102    }
 103  
 104    if ($ok) {
 105      echo "Settings updated succesfully!<br />\n";
 106    }
 107    else {
 108      echo "<span class=\"marktext\">An error occured while updating settings</b></span><br />\n";
 109    }
 110    next_step("finish", "Update complete");
 111  }
 112  ?>
 113  <br />
 114      </td>
 115    </tr>
 116  </table>
 117  <p align="center">Powered by <b>4images</b> <?php echo SCRIPT_VERSION ?><br />
 118    Copyright &copy; 2002 <a href="http://www.4homepages.de" target="_blank">4homepages.de</a>
 119  </p>
 120  </body>
 121  </html>

title

Description

title

Description

title

Description

title

title

Body