<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: infusion.php
| CVS Version: 1.00
| Author: olelau
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }



// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS."infusion_folder/locale/".$settings['locale'].".php")) {
	// Load the locale file matching the current site locale setting.
	include INFUSIONS."infusion_folder/locale/".$settings['locale'].".php";
} else {
	// Load the infusion's default locale file.
	include INFUSIONS."auto_avatar_resizer_infusion/locale/English.php";
}

// Infusion general information
$inf_title = $locale['rsze000'];
$inf_description = $locale['rsze001'];
$inf_version = "1.3";
$inf_developer = "olelau";
$inf_email = "ole.l@hgs.dk";
$inf_weburl = "http://www.itfordig.dk//";

$inf_folder = "auto_avatar_resizer_infusion"; // The folder in which the infusion resides.


// Delete any items not required here.
$inf_newtable[1] = DB_PREFIX."auto_avatar_resizer_images (
  img_id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  user_id SMALLINT(5) UNSIGNED NOT NULL,
  img_file VARCHAR(60) NULL DEFAULT '',
  img_resizeddate DATETIME NULL DEFAULT '1000-01-01 00:00:00',
  PRIMARY KEY(img_id)
);";

$inf_newtable[2] = DB_PREFIX."auto_avatar_resizer_templates (
  tem_id SMALLINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
  tem_maxY SMALLINT(5) UNSIGNED NOT NULL DEFAULT 100,
  tem_maxX SMALLINT(5) UNSIGNED NOT NULL DEFAULT 100,
  tem_name VARCHAR(35) NOT NULL DEFAULT '',
  tem_description TEXT NULL DEFAULT '',
  tem_format TINYINT(2) NULL DEFAULT 0,
  PRIMARY KEY(tem_id)
);";

$inf_newtable[3] = DB_PREFIX."auto_avatar_resizer_settings (
  buffer_length TINYINT(3) UNSIGNED NULL DEFAULT 15,
  maxFileSize INTEGER UNSIGNED NOT NULL DEFAULT 3000000,
  group_id SMALLINT(3) UNSIGNED NULL DEFAULT 101
);";

$inf_insertdbrow[1] = DB_PREFIX."auto_avatar_resizer_settings (buffer_length, maxFileSize, group_id) VALUES(15, 3000000, 101)";
$inf_insertdbrow[2] = DB_PREFIX."auto_avatar_resizer_templates (tem_maxY, tem_maxX, tem_name, tem_description, tem_format)"
					  ." VALUES(100, 100, 'Avatar', 'Default Avatar-size', ".IMAGETYPE_GIF.")";


$inf_droptable[1] = DB_PREFIX."auto_avatar_resizer_images";
$inf_droptable[2] = DB_PREFIX."auto_avatar_resizer_templates";
$inf_droptable[3] = DB_PREFIX."auto_avatar_resizer_settings";

$inf_adminpanel[1] = array(
	"title" => "Auto avatar resizer",
	"image" => "news.gif",
	"panel" => "auto_avatar_resizer_admin.php",
	"rights" => "OL"
);
$inf_sitelink[1] = array(
	"title" => "Avatar resizer",
	"url" => "../../infusions/auto_avatar_resizer_infusion/auto_avatar_resizer.php",
	"visibility" => "101"
);


?>