<?php
#############################################################################
#                              Site@School
# Site@School is a website management system designed for schools.
#
# mysql_ES.php 
#$Id: mysql_ES.php,v 1.2 2006/10/15 19:08:53 fstuurman Exp $
############################################################################
//general
mysql_query("INSERT INTO $table_configuration VALUES ('language', 'EN', '')");

//agenda
mysql_query("INSERT INTO $table_configuration (config_key, config_value, description) VALUES( 'agenda_time45', 'Rem.', '' )");

//ads
$result = mysql_query("select id from $table_modules WHERE location = 'sn_ads'");
$RecordCount = mysql_num_rows($result);
if($RecordCount == 0) 
{
mysql_query("INSERT INTO $table_modules VALUES (NULL, 'Advertisements', 'sn_ads', 'view_ads.php,View advertisements', 'admin.php', '$modtable_ads')");
}
mysql_query("INSERT INTO $table_configuration VALUES ('ads_disclaimer', 'Here comes your disclaimer text', '')");
mysql_query("INSERT INTO $table_configuration VALUES ('ads_welcome_text', 'Here comes your welcome text, see module configuration', '')");

//allbum
mysql_query("INSERT INTO $table_configuration VALUES ('allbum_welcome','ALLbum Main Page','Welcome text allbum')");

$result = mysql_query("SELECT id FROM $table_modules WHERE location = 'sn_allbum'");
$RecordCount = mysql_num_rows($result);
if($RecordCount == 0) 
{
mysql_query("INSERT INTO $table_modules VALUES (NULL, 'ALLbum', 'sn_allbum', 'sas_index.php,View Albums,sas_index2.php,View Album per page,slideshow.php,Album slideshow', 'admin.php', '$table_module_allbum')"); 
}

//chat
$result = mysql_query("SELECT id FROM $table_modules WHERE location = 'sn_chat'");
$RecordCount = mysql_num_rows($result);
if($RecordCount == 0) 
{
mysql_query("INSERT INTO $table_modules VALUES ('', 'Chat', 'sn_chat', 'chat.php, Chat page', 'admin.php', '')");
}

//calender
$result = mysql_query("select id from $table_modules WHERE location = 'sn_calendar'");
$RecordCount = mysql_num_rows($result);
if($RecordCount == 0) 
{
mysql_query("INSERT INTO $table_modules VALUES (NULL, 'Calendar', 'sn_calendar', 'calendar.php,Show Calendar', 'admin.php', '$calendar_table,$calendars_table')");
}

//up download
$result = mysql_query("select id from $table_modules WHERE location = 'sn_downloads'");
$RecordCount = mysql_num_rows($result);
if($RecordCount == 0) 
{
mysql_query("INSERT INTO $table_modules VALUES (NULL, 'Up/Download', 'sn_downloads', 'download_cat.php,Download page (categories),download_pag.php,Download page (per page),upload.php,Upload ', 'admin.php', '$downloadstable,$downloadcategorytable ')");
}
mysql_query("INSERT INTO $table_configuration VALUES ('download_welcome_text', 'Download welcome text, see module configuration', '')");
mysql_query("INSERT INTO $table_configuration VALUES('download_welcome_text_prot' , 'Welcome text protected area' , '')") ;

//forms
$result = mysql_query("select id from $table_modules WHERE location = 'sn_form'");
$RecordCount = mysql_num_rows($result);
if($RecordCount == 0) 
{
mysql_query("INSERT INTO $table_modules VALUES (NULL, 'Formsbuilder', 'sn_form', 'show_form.php,Showform', 'admin.php', '$forms_table,$forms_config_table')");
}

//forum
$result = mysql_query("select id from $table_modules WHERE location = 'sn_forum'");
$RecordCount = mysql_num_rows($result);
if($RecordCount == 0) 
{
mysql_query("INSERT INTO $table_modules VALUES (NULL, 'Forum', 'sn_forum', 'index.php,Forum', 'admin.php', '$table_users,$table_topics,$table_replies,$table_cat')");
}
mysql_query("INSERT INTO $table_cat VALUES (NULL, ' Public - Forum', '3', '')");
mysql_query("INSERT INTO $table_cat VALUES (NULL, ' Teachers - Forum', '2', '')");
mysql_query("INSERT INTO $table_cat VALUES (NULL, ' Pupil\'s - Forum' , '1', '')");
mysql_query("INSERT INTO $table_configuration VALUES ('forum_welcome_text', 'Forum welcome text, see forum configuration', '')");

//guestbook
$result = mysql_query("select id from $table_modules WHERE location = 'sn_gbook'");
$RecordCount = mysql_num_rows($result);

if($RecordCount == 0) 
{
mysql_query("INSERT INTO $table_modules VALUES (NULL, 'Guestbook', 'sn_gbook', 'gbook.php,View Guestbook', 'admin.php', '$modtable_guestbook')");
}

mysql_query("INSERT INTO $table_configuration VALUES ('gbook_welcome_text', 'Welcome text, see module configuration<br>', '')");

//message
$result = mysql_query("SELECT id FROM $table_modules WHERE location = 'sn_message'");
$RecordCount = mysql_num_rows($result);
if($RecordCount == 0) 
{
mysql_query("INSERT INTO $table_modules VALUES (NULL, 'Messages', 'sn_message', 'message.php,Add messages,view_message.php,View messages', 'admin.php', '')");
mysql_query("INSERT INTO $table_configuration VALUES ('message_add_text', '<font size=6><b>Add a Message</font></b><hr>', '')");
mysql_query("INSERT INTO $table_configuration VALUES ('message_view_text', '<font size=6><b>View messages</font></b><hr> ', '')");
mysql_query("INSERT INTO $table_configuration VALUES ('message_view_text_prot', '<font size=6><b>View messages Protected Area</font></b><hr> ', '')");
}

//links
mysql_query("INSERT INTO $table_configuration VALUES ('links_welcome_text', 'Welcome text links page', '')");

//mail module
$result = mysql_query("select id from $table_modules WHERE location = 'sn_mailpage'");
$RecordCount = mysql_num_rows($result);
if($RecordCount == 0) {
mysql_query("INSERT INTO $table_modules VALUES (NULL, 'Mail page', 'sn_mailpage', 'mailpage.php,E-mail pagina', 'admin.php', '')");
}
mysql_query("INSERT INTO $table_configuration VALUES ('email_text', 'Here comes your welcome text, see module configuration.', '')");
mysql_query("INSERT INTO $table_configuration VALUES ('email_thankyou_text', '<br><br><p align=\"center\"><font size=\"2\"><b>Your message has been sent,<br><br>thank you very much.</b></font></p>', '')");

//news
$result = mysql_query("select id from $table_modules WHERE location = 'sn_news'");
$RecordCount = mysql_num_rows($result);
if($RecordCount == 0) 
{ 
mysql_query("INSERT INTO $table_modules VALUES (NULL, 'News', 'sn_news', 'frontpage.php,News Page,frontpage_cat.php,Category per page,archive.php,News Archive', 'admin.php', '$modtable_news_articles,$modtable_news_categories')");
}
  
mysql_query("INSERT INTO $table_configuration VALUES ('news_welcome_text', 'Here comes your welcome text, see module configuration', '')");
mysql_query("INSERT INTO $table_configuration VALUES ('news_archive_welcome_text', 'Here comes your welcome text, see module configuration', '')");

//newsletter
$result = mysql_query("SELECT id FROM $table_modules WHERE location = 'sn_newsletter'");
$RecordCount = mysql_num_rows($result);
if($RecordCount == 0) 
{
mysql_query("INSERT INTO $table_modules VALUES (NULL, 'Newsletter', 'sn_newsletter', 'newsletter.php, Add Newsletter', 'admin.php', '$table_newsletter_content,$table_newsletters,$table_email_adresses')");
}

//pupilpages
$result = mysql_query("select id from $table_modules WHERE location = 'sn_studentpages'");
$RecordCount = mysql_num_rows($result);
if($RecordCount == 0) 
{
mysql_query("INSERT INTO $table_modules VALUES (NULL, 'Class pages', 'sn_studentpages', 'user_login.php,Teacher/Pupil login,viewpage.php,View pupil pages,viewpage2.php,View pupil pages per class,viewproject.php,View pupil pages per project,teacher_page.php,Teacher pages', 'admin.php', '$table_studentpages')");
}

//search
$result = mysql_query("select id from $table_modules WHERE location = 'dgs_search'");
$RecordCount = mysql_num_rows($result);
if($RecordCount == 0) 
{
mysql_query("INSERT INTO $table_modules VALUES (NULL, 'Search', 'dgs_search', 'search.php,Search page', 'admin.php', '')");
}
mysql_query("INSERT INTO $table_configuration VALUES ('search_module_welcome', '<h3>Search our site</h3><br>Give a search argument:<p>', 'Search module welcome text ')");

//sitemap
$result = mysql_query("select id from $table_modules WHERE location = 'sn_sitemap'");
$RecordCount = mysql_num_rows($result);
if($RecordCount == 0) 
{
mysql_query("INSERT INTO $table_modules VALUES (NULL, 'Sitemap', 'sn_sitemap', 'view_sitemap.php,Sitemap,view_sitemap_date.php,Sitemap with date', 'admin.php', '')");
}
mysql_query("INSERT INTO $table_configuration VALUES ('sitemap_welcome_text', 'Sitemap:', '')");



include("template_EN.php") ;

?>
