Location: PHPKode > projects > Esvon Personals > esvon-personals/upgrades/v4_to_v4_09/upgrade406-407.php
<?php

// File to upgrade Esvon Classifieds from 4.0.6 to 4.0.7
// After use this, you can delete it

//*********************************************

define('DB_UPGRADE', 1);

if(!defined('SITE_PATH')){
  if(!file_exists('./inc/application.php')) die("File Not Found: application.php");
  require_once './inc/application.php';
}

mysql_query('ALTER TABLE '.TBL_CAT.' ADD image_alt varchar(255) NOT NULL');
mysql_query('ALTER TABLE '.TBL_CAT.' ADD disabled tinyint(3) unsigned NOT NULL');

mysql_query("UPDATE ".TBL_MODULES." SET block_capable=1 where dir IN ('Form_to_Email')");

if(hwModGetState('Regions')){
  
  mysql_query('ALTER TABLE '.TBL_AD.' ADD hw_reg_level tinyint(3) unsigned NOT NULL');

  /*$tbl_reg = hwModTable('Regions','category');
  $res = $db->query('SELECT link_id,hw_region_id FROM '.TBL_AD);
  while(list($lid,$rid) = mysql_fetch_row($res)){
    $lev = 0;
    $reg_path = ShowCategoryPath($rid,'',$tbl_reg);
    if($rid) $lev = count(explode(' > ',$reg_path));
    //echo "$lid, $rid, $reg_path ($lev)<br>";
    $db->query('UPDATE '.TBL_AD.' SET hw_reg_level='.$lev.' WHERE link_id='.$lid);
  }*/

}

if(hwModGetState('Mailing_Lists')){

  $db->query("CREATE TABLE IF NOT EXISTS ".hwModTable('Mailing_Lists','unsub')." (
   list_id tinyint(5) NOT NULL,
   email varchar(80) NOT NULL,
   date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
   PRIMARY KEY (list_id, email))");

}

echo 'Esvon Classifieds Tables Updated, Ok.. ('.basename(__FILE__).')';

?>
Return current item: Esvon Personals