<?php
###############################################################################
##             Formulaire - Information submitting module for XOOPS          ##
##                    Copyright (c) 2003 NS Tai (aka tuff)                   ##
##                       <http://www.brandycoke.com/>                        ##
###############################################################################
##                    XOOPS - PHP Content Management System                  ##
##                       Copyright (c) 2000 XOOPS.org                        ##
##                          <http://www.xoops.org/>                          ##
###############################################################################
##  This program is free software; you can redistribute it and/or modify     ##
##  it under the terms of the GNU General Public License as published by     ##
##  the Free Software Foundation; either version 2 of the License, or        ##
##  (at your option) any later version.                                      ##
##                                                                           ##
##  You may not change or alter any portion of this comment or credits       ##
##  of supporting developers from this source code or any supporting         ##
##  source code which is considered copyrighted (c) material of the          ##
##  original comment or credit authors.                                      ##
##                                                                           ##
##  This program is distributed in the hope that it will be useful,          ##
##  but WITHOUT ANY WARRANTY; without even the implied warranty of           ##
##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            ##
##  GNU General Public License for more details.                             ##
##                                                                           ##
##  You should have received a copy of the GNU General Public License        ##
##  along with this program; if not, write to the Free Software              ##
##  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA ##
###############################################################################
/**
 *
 * XOOPS module 'FormMail'  by Tom (Malaika System)
 *
 **/

$modversion['name'] = _MI_FORM_NAME;
$modversion['version'] = '1.6';
$modversion['description'] = _MI_FORM_DESC;
$modversion['credits'] = "based on :xoops-themes.com, NS Tai (aka tuff),BRANDYCOKE&middot;COM, Marcel Widmer";
$modversion['author'] = "J.Kume<br />(<a href='http://www.kume.biz/'>Nine Stars</a>)<br />Tac Hisaoka<br />(<a href='http://www.impresscms.jp/'>impressCMS Japan Team</a>)";
$modversion['help'] = "";
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 0;
$modversion['image'] = 'images/icon_big.png';
$modversion['iconsmall'] = 'images/icon_small.png';
$modversion['iconbig'] = 'images/icon_big.png';
$modversion['dirname'] = "formmail";

// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin)
// All tables should not have any prefix!
$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
//$modversion['sqlfile']['postgresql'] = "sql/pgsql.sql";

// Tables created by sql file (without prefix!)
$modversion['tables'][0] = "formmail";
$modversion['tables'][1] = "formmail_id";
$modversion['tables'][2] = "formmail_menu";


// Admin things
$modversion['hasAdmin'] = 1;
$modversion['adminindex'] = "admin/index.php";
$modversion['adminmenu'] = "admin/menu.php";

// Menu -- content in main menu block
$modversion['hasMain'] = 1;

// Submenu Items
global $xoopsDB;
$result = $xoopsDB->query("SELECT id_form, desc_form FROM ".$xoopsDB->prefix("formmail_id")."  WHERE form_req='on' ORDER BY form_order");
$i = 1;
while (list($id_form, $desc_form) = $xoopsDB->fetchRow($result)) {
	$modversion['sub'][$i]['name'] = $desc_form;
	$modversion['sub'][$i]['url'] = "index.php?id_form=".$id_form."";
	$i++;
}

// Templates
$modversion['templates'][1]['file'] = 'formmail_form.html';
$modversion['templates'][1]['description'] = 'mail form';
$modversion['templates'][2]['file'] = 'formmail_index.html';
$modversion['templates'][2]['description'] = 'index';

//	Module Configs
// $xoopsModuleConfig['t_width']
$modversion['config'][1]['name'] = 't_width';
$modversion['config'][1]['title'] = '_MI_FORM_TEXT_WIDTH';
$modversion['config'][1]['description'] = '';
$modversion['config'][1]['formtype'] = 'textbox';
$modversion['config'][1]['valuetype'] = 'int';
$modversion['config'][1]['default'] = '50';

// $xoopsModuleConfig['t_max']
$modversion['config'][2]['name'] = 't_max';
$modversion['config'][2]['title'] = '_MI_FORM_TEXT_MAX';
$modversion['config'][2]['description'] = '';
$modversion['config'][2]['formtype'] = 'textbox';
$modversion['config'][2]['valuetype'] = 'int';
$modversion['config'][2]['default'] = '255';

// $xoopsModuleConfig['ta_rows']
$modversion['config'][3]['name'] = 'ta_rows';
$modversion['config'][3]['title'] = '_MI_FORM_TAREA_ROWS';
$modversion['config'][3]['description'] = '';
$modversion['config'][3]['formtype'] = 'textbox';
$modversion['config'][3]['valuetype'] = 'int';
$modversion['config'][3]['default'] = '10';

// $xoopsModuleConfig['ta_cols']
$modversion['config'][4]['name'] = 'ta_cols';
$modversion['config'][4]['title'] = '_MI_FORM_TAREA_COLS';
$modversion['config'][4]['description'] = '';
$modversion['config'][4]['formtype'] = 'textbox';
$modversion['config'][4]['valuetype'] = 'int';
$modversion['config'][4]['default'] = '50';

// $xoopsModuleConfig['delimeter']
$modversion['config'][5]['name'] = 'delimeter';
$modversion['config'][5]['title'] = '_MI_FORM_DELIMETER';
$modversion['config'][5]['description'] = '';
$modversion['config'][5]['formtype'] = 'select';
$modversion['config'][5]['valuetype'] = 'text';
$modversion['config'][6]['default'] = 'space';
$modversion['config'][5]['options'] = array(_MI_FORM_DELIMETER_SPACE=>'space', _MI_FORM_DELIMETER_BR=>'br');

// $xoopsModuleConfig['method']
$modversion['config'][6]['name'] = 'method';
$modversion['config'][6]['title'] = '_MI_FORM_SEND_METHOD';
$modversion['config'][6]['description'] = '_MI_FORM_SEND_METHOD_DESC';
$modversion['config'][6]['formtype'] = 'select';
$modversion['config'][6]['valuetype'] = 'text';
$modversion['config'][6]['default'] = 'email';
$modversion['config'][6]['options'] = array(_MI_FORM_SEND_METHOD_MAIL=>'email', _MI_FORM_SEND_METHOD_PM=>'pm');

// $xoopsModuleConfig['guest_expe']
$modversion['config'][7]['name'] = 'guest_expe';
$modversion['config'][7]['title'] = '_MI_FORM_SEND_GUESTEXPE';
$modversion['config'][7]['description'] = '_MI_FORM_SEND_GUESTEXPE_DESC';
$modversion['config'][7]['formtype'] = 'yesno';
$modversion['config'][7]['valuetype'] = 'int';
$modversion['config'][7]['default'] = '0';
$modversion['config'][7]['options'] = array();


// $xoopsModuleConfig['username_sel']
$modversion['config'][8]['name'] = 'username_sel';
$modversion['config'][8]['title'] = '_MI_FORM_SEND_USERNAME';
$modversion['config'][8]['description'] = '_MI_FORM_SEND_USERNAME_DESC';
$modversion['config'][8]['formtype'] = 'select';
$modversion['config'][8]['valuetype'] = 'text';
$modversion['config'][8]['default'] = 'uname';
$modversion['config'][8]['options'] = array(_MI_FORM_SEND_USERNAME_UNAME=>'uname', _MI_FORM_SEND_USERNAME_NAME=>'name');

// $xoopsModuleConfig['mail_title']
$modversion['config'][9]['name'] = 'mail_title';
$modversion['config'][9]['title'] = '_MI_FORM_SEND_MAILTITLE';
$modversion['config'][9]['description'] = '_MI_FORM_SEND_MAILTITLE_DESC';
$modversion['config'][9]['formtype'] = 'yesno';
$modversion['config'][9]['valuetype'] = 'int';
$modversion['config'][9]['default'] = '1';
$modversion['config'][9]['options'] = array();

// $xoopsModuleConfig['mail_title2']
$modversion['config'][10]['name'] = 'mail_title2';
$modversion['config'][10]['title'] = '_MI_FORM_SEND_MAILTITLE2';
$modversion['config'][10]['description'] = '_MI_FORM_SEND_MAILTITLE2_DESC';
$modversion['config'][10]['formtype'] = 'textbox';
$modversion['config'][10]['valuetype'] = 'text';
$modversion['config'][10]['default'] = '';
$modversion['config'][10]['options'] = array();

// $xoopsModuleConfig['mail_title2']
$modversion['config'][11]['name'] = 'spam_ok';
$modversion['config'][11]['title'] = '_MI_FORM_SPAM_OK';
$modversion['config'][11]['description'] = '_MI_FORM_SPAM_OK_DESC';
$modversion['config'][11]['formtype'] = 'yesno';
$modversion['config'][11]['valuetype'] = 'int';
$modversion['config'][11]['default'] = '1';
$modversion['config'][11]['options'] = array();

// $xoopsModuleConfig['mail_title2']
$modversion['config'][12]['name'] = 'spam_sitekey';
$modversion['config'][12]['title'] = '_MI_FORM_SPAM_SITEKEY';
$modversion['config'][12]['description'] = '_MI_FORM_SPAM_SITEKEY_DESC';
$modversion['config'][12]['formtype'] = 'textbox';
$modversion['config'][12]['valuetype'] = 'text';
$modversion['config'][12]['default'] = '';
$modversion['config'][12]['options'] = array();

// $xoopsModuleConfig['mail_title2']
$modversion['config'][13]['name'] = 'spam_secretkey';
$modversion['config'][13]['title'] = '_MI_FORM_SPAM_SECRETKEY';
$modversion['config'][13]['description'] = '_MI_FORM_SPAM_SECRETKEY_DESC';
$modversion['config'][13]['formtype'] = 'textbox';
$modversion['config'][13]['valuetype'] = 'text';
$modversion['config'][13]['default'] = '';
$modversion['config'][13]['options'] = array();



// Blocks
$modversion['blocks'][1]['file'] = "mymenu.php";
$modversion['blocks'][1]['name'] = _MI_FORM_MENU_BNAME;
$modversion['blocks'][1]['description'] = "My menu";
$modversion['blocks'][1]['show_func'] = "block_FORMMAIL_show";
?>
