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

//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, 'Annoncer', 'sn_ads', 'view_ads.php,Vis annoncer', 'admin.php', '$modtable_ads')");
}
mysql_query("INSERT INTO $table_configuration VALUES ('ads_disclaimer', 'Her kommer din disclaimer tekst', '')");
mysql_query("INSERT INTO $table_configuration VALUES ('ads_welcome_text', 'Her kommer din velkomst tekst, se modul konfigurationen', '')");

//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, 'Kalender', 'sn_calendar', 'calendar.php,Vis Kalender', '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 side (kategorier),download_pag.php,Download side (pr side),upload.php,Upload ', 'admin.php', '$downloadstable,$downloadcategorytable ')");
}
mysql_query("INSERT INTO $table_configuration VALUES ('download_welcome_text', 'Download velkomst tekst, se modulkonfigurationen', '')");
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, 'Formular', '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, ' Offentligt - Forum', '3', '')");
mysql_query("INSERT INTO $table_cat VALUES (NULL, ' Lærernes - Forum', '2', '')");
mysql_query("INSERT INTO $table_cat VALUES (NULL, ' Elevernes - 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, 'Gæstebog', 'sn_gbook', 'gbook.php,View Guestbook', 'admin.php', '$modtable_guestbook')");
}

mysql_query("INSERT INTO $table_configuration VALUES ('gbook_welcome_text', 'Velkomst tekst, se modulkonfigurationen<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 side', 'sn_mailpage', 'mailpage.php,E-mail pagina', 'admin.php', '')");
}
mysql_query("INSERT INTO $table_configuration VALUES ('email_text', 'Her kommer din velkomst tekst, se modulkonfigurationen.', '')");
mysql_query("INSERT INTO $table_configuration VALUES ('email_thankyou_text', '<br><br><p align=\"center\"><font size=\"2\"><b>Din besked er blevet sendt,<br><br>tak.</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, 'Nyheder', 'sn_news', 'frontpage.php,Nyheds Side,frontpage_cat.php,Kategori pr side,archive.php,Nyheds Arkiv', 'admin.php', '$modtable_news_articles,$modtable_news_categories')");
}
  
mysql_query("INSERT INTO $table_configuration VALUES ('news_welcome_text', 'Her kommer din velkomst tekst, se modulkonfigurationen', '')");
mysql_query("INSERT INTO $table_configuration VALUES ('news_archive_welcome_text', 'Her kommer din velkomst tekst, se modulkonfigurationen', '')");

//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, 'Nyhedsbrev', 'sn_newsletter', 'newsletter.php, Tilføj Nyhedsbrev', '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, 'Elevernes sider', 'sn_studentpages', 'user_login.php,Lærer/Elevernes logind,viewpage.php,Vis elev sider,viewpage2.php,View pupil pages per project,Vis elev sider pr klasse,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, 'Søg', 'dgs_search', 'search.php,Søge side', 'admin.php', '')");
}
mysql_query("INSERT INTO $table_configuration VALUES ('search_module_welcome', '<h3>Søg på hjemmesiden</h3><br>Angiv et søge kriterie:<p>', 'Søgemodul velkomst tekst ')");

//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") ;

?>
