forked from science-ation/science-ation
7e84ab0222
Add .htaccess rules for the cms Add cms page display code and convert index.php to pull from the cms If no page title is passed to send_header(), output the fair name in the <title> tag
15 lines
548 B
PHP
15 lines
548 B
PHP
<?
|
|
function db_update_111_post()
|
|
{
|
|
global $config;
|
|
//grab the index page
|
|
$q=mysql_query("SELECT * FROM pagetext WHERE textname='index' AND year='{$config['FAIRYEAR']}'");
|
|
while($r=mysql_fetch_object($q)) {
|
|
//insert it into the CMS under index.html
|
|
mysql_query("INSERT INTO cms (filename,dt,lang,text,showlogo) VALUES ('index.html','$r->lastupdate','$r->lang','".mysql_escape_string($r->text)."','1')");
|
|
}
|
|
//and remove it from the pagetext
|
|
mysql_query("DELETE FROM pagetext WHERE textname='index' AND year='{$config['FAIRYEAR']}'");
|
|
}
|
|
?>
|