<?php
#############################################################################
#                              Site@School
# Site@School is a website management system designed for schools.
#
# demodata_NL.php 
#$Id: demodata_NL.php,v 1.2 2006/10/15 19:08:53 fstuurman Exp $
############################################################################
if ($q == 1) 
{
$modtable_news_categories = "$dbprefix" . "m_news_cat";
$modtable_news_articles = "$dbprefix" . "m_news_articles";
$modtable_ads = "$dbprefix" . "adtext";
$table_prot_pages = $dbprefix."prot_pages";
$table_prot_sections = $dbprefix."prot_sections";
mysql_query("INSERT INTO $modtable_ads (ad_id, email, ad_text, date, name) VALUES( '1', 'info@sesamstraat.org', 'Gebruikte poppen te koop, zie onze website.', '2005-12-01', 'Sesamstraat')");
mysql_query("INSERT INTO $table_classes (id, name, teachers, project) VALUES( '2', 'testklas','', '0')");
mysql_query("INSERT INTO $table_classes (id, name, teachers, project) VALUES( '3', 'testprojekt','' ,'1')");
mysql_query("INSERT INTO $modtable_news_categories (id, title) VALUES( '1', 'Algemeen nieuws')");
mysql_query("INSERT INTO $modtable_news_articles (id, title, date, category, content, archive) VALUES( '1', 'Website operationeel', '01-04-2006', '1', 'We zijn blij u te informeren dat onze website operationeel is met Site@School versie 2.4', '0')");
mysql_query("INSERT INTO $table_studentpages (studentid, content, newcontent, pcheck, approved, send_email, title, dir_number) 
VALUES( '1', 'Hier is mijn eerste pagina','', '0', '0', '0', 'Mijn eerste pagina', '1')");
mysql_query("INSERT INTO $table_studentpages (studentid, content, newcontent, pcheck, approved, send_email, title, dir_number) 
VALUES( 2, 'Dit is de eerste leerkracht pagina.\r\n', '', 2, 0, 0, 'Eerste pagina', 2)");
mysql_query("INSERT INTO $table_studentpages (studentid, content, newcontent, pcheck, approved, send_email, title, dir_number) 
VALUES( 3, 'Dit is de project pagina.\r\n', '', 0, 0, 0, 'Projekt pagina', 3)");
mysql_query("INSERT INTO $table_pages (id, section, name, invisible, content, module, sort, count, createdate, lastvisitdate, category, lastupdate) 
VALUES( '1', '1', 'Algemene info','', 'Hier komt de startpagina van de website.','', '1', '8', '2005-11-27', '2005-12-02','', '2005-11-28')");
mysql_query("INSERT INTO $table_pages (id, section, name, invisible, content, module, sort, count, createdate, lastvisitdate, category, lastupdate) 
VALUES( '3', '4', 'Leraar login','','', 'sn_studentpages/user_login.php', '1', '2', '2005-11-28', '2005-12-02','', '2005-11-28')");
mysql_query("INSERT INTO $table_pages (id, section, name, invisible, content, module, sort, count, createdate, lastvisitdate, category, lastupdate) 
VALUES( '4', '2', 'Nieuws','','', 'sn_news/frontpage.php', '1', '5', '2005-11-28', '2005-12-02','', '2005-11-28')");
mysql_query("INSERT INTO $table_pages (id, section, name, invisible, content, module, sort, count, createdate, lastvisitdate, category, lastupdate) 
VALUES( '5', '5', 'Bekijk advertenties','','', 'sn_ads/view_ads.php', '2', '4', '2005-11-28', '2005-12-02','', '2005-11-28')");
mysql_query("INSERT INTO $table_pages (id, section, name, invisible, content, module, sort, count, createdate, lastvisitdate, category, lastupdate) 
VALUES( '7', '3', 'leerling pagina\'s','','', 'sn_studentpages/viewpage.php', '1', '9', '2005-11-28', '2005-12-02','', '2005-11-28')");
mysql_query("INSERT INTO $table_pages (id, section, name, invisible, content, module, sort, count, createdate, lastvisitdate, category, lastupdate) 
VALUES( '8', '3', 'Leerling login','','', 'sn_studentpages/user_login.php', '2', '4', '2005-11-28', '2005-12-01','', '2005-11-28')");
mysql_query("INSERT INTO $table_pages (id, section, name, invisible, content, module, sort, count, createdate, lastvisitdate, category, lastupdate) 
VALUES( '9', '6', 'Site doorzoeken','','', 'dgs_search/search.php', '1', '4', '2005-11-28', '2005-12-01','', '2005-11-28')");
mysql_query("INSERT INTO $table_pages (id, section, name, invisible, content, module, sort, count, createdate, lastvisitdate, category, lastupdate) 
VALUES( '10', '6', 'Sitemap','','', 'sn_sitemap/view_sitemap.php', '2', '2', '2005-11-28', '2005-12-01','', '2005-11-28')");
mysql_query("INSERT INTO $table_pages (id, section, name, invisible, content, module, sort, count, createdate, lastvisitdate, category, lastupdate) 
VALUES( 12, '4', 'Leerkracht pagina\'s', '', '', 'sn_studentpages/teacher_page.php', 2, 4, '2005-03-04', '2005-03-04', '', '2005-03-04')");
mysql_query("INSERT INTO $table_sections (id, name, invisible, frontpage, parent, sort) VALUES( '1', 'School info','', '1','', '1')");
mysql_query("INSERT INTO $table_sections (id, name, invisible, frontpage, parent, sort) VALUES( '2', 'Nieuws','', '4','', '2')");
mysql_query("INSERT INTO $table_sections (id, name, invisible, frontpage, parent, sort) VALUES( '3', 'Leerlingen','', '7','', '3')");
mysql_query("INSERT INTO $table_sections (id, name, invisible, frontpage, parent, sort) VALUES( '4', 'Leraren','', '3','', '4')");
mysql_query("INSERT INTO $table_sections (id, name, invisible, frontpage, parent, sort) VALUES( '5', 'Ouders','', '5','', '5')");
mysql_query("INSERT INTO $table_sections (id, name, invisible, frontpage, parent, sort) VALUES( '6', 'Zoeken','', '9','', '5')");
mysql_query("INSERT INTO $table_users (username, name, password, email, class, type, access, highvisibility, project) 
VALUES('leerling', 'Eerste leerling', md5('leerling'),'', '2', '1', '000000000000,000000000000', '2', '3')");
mysql_query("INSERT INTO $table_users (username, name, password, email, class, type, access, highvisibility, project) 
VALUES('leraar', 'Dhr. Leraar', md5('leraar'), ' ','2', '2', '000000000000,000000000000', '2', '3')");
mysql_query("INSERT INTO $table_users (username, name, password, email, class, type, access, highvisibility, project) 
VALUES('testprojekt', 'testproject', md5('testprojekt'), ' ','3', '0', '000000000000,000000000000', '2', '3')");
mysql_query("INSERT INTO $table_prot_pages (id, section, name, invisible, content, module, sort, count, createdate, lastvisitdate, category, lastupdate) VALUES( '1', '1', 'Download','','', 'sn_downloads/download_cat.php', '2', '0', '2005-12-02', '0000-00-00','', '2005-12-02')");
mysql_query("INSERT INTO $table_prot_pages (id, section, name, invisible, content, module, sort, count, createdate, lastvisitdate, category, lastupdate) VALUES( '2', '1', 'Startpagina','', 'Dit is de startpagina voor het intranet.
','', '1', '0', '2005-12-02', '0000-00-00','', '2005-12-02')");
mysql_query("INSERT INTO $table_prot_sections (id, name, invisible, frontpage, parent, sort) VALUES( '1', 'Intranet','', '2','', '1')");
mysql_query("UPDATE $table_configuration SET config_value='editable' WHERE config_key='protected_theme'");
#

} 
else 
{
// fill sections and pages with some initial data
$d = date("Y-m-d");
mysql_query("INSERT INTO $table_sections  VALUES (NULL, 'Eerste Sectie', '', '1', '', 1)");
mysql_query("INSERT INTO $table_pages VALUES (NULL, '1', 'Eerste pagina', '', 'Hier komt de start pagina' , '', '1', '0', '$d', '0000-00-00', ' ', '$d')");

}
?>