From 8b5fc1c905f363e786b7ad8f8ae49ccfd01c0eba Mon Sep 17 00:00:00 2001 From: james Date: Wed, 20 Aug 2008 20:25:42 +0000 Subject: [PATCH] Shrink the summarytable headers a bit in size Add the content management front-end file Add the content management back-end file - its not quite done yet --- admin/registration_list.php | 2 +- cms.php | 26 +++++++ config/cms.php | 136 ++++++++++++++++++++++++++++++++++++ config/pagetexts.php | 2 +- theme/default/sfiab.css | 4 +- 5 files changed, 166 insertions(+), 4 deletions(-) create mode 100644 cms.php create mode 100644 config/cms.php diff --git a/admin/registration_list.php b/admin/registration_list.php index de70cd0b..b4ce72ef 100644 --- a/admin/registration_list.php +++ b/admin/registration_list.php @@ -124,7 +124,7 @@ else $wherestatus=""; "); echo mysql_error(); - echo ""; + echo "
"; echo ""; if($showstatus) $stat="&showstatus=".$showstatus; echo ""; diff --git a/cms.php b/cms.php new file mode 100644 index 00000000..3c3fe133 --- /dev/null +++ b/cms.php @@ -0,0 +1,26 @@ + + + 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, version 2. + + 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; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ +?> + diff --git a/config/cms.php b/config/cms.php new file mode 100644 index 00000000..89a2e780 --- /dev/null +++ b/config/cms.php @@ -0,0 +1,136 @@ + + + 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, version 2. + + 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; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ +?> + 'committee_main.php', + 'SFIAB Configuration' => 'config/index.php') + ); + + if($_POST['action']=="save") + { + + echo happy(i18n("Page text successfully saved")); + echo "no, actually its not saving yet, im not done!
"; + + } + + if($_GET['filename'] || $_GET['id'] || $_GET['action']=="create") + { + echo "<< Back to file list
\n"; + echo ""; + echo "\n"; + if($_GET['filename']) + echo "textname)."\">\n"; + else + echo "Choose filename to create: /web/.html
"; + + echo "
".i18n("Status")."
"; + foreach($config['languages'] AS $lang=>$langname) { + echo "\n"; + echo "\n"; + } + echo "
"; + echo ""; + echo "\n"; + echo "
"; + $q=mysql_query("SELECT * FROM cms WHERE filename='".mysql_escape_string($_GET['filename'])."' AND lang='$lang' ORDER BY dt DESC LIMIT 1"); + if($r=mysql_fetch_object($q)) { + if($r->dt=="0000-00-00 00:00:00" || !$r->dt) $dt="Never"; + else $dt=$r->dt; + echo "".htmlspecialchars($_GET['filename'])." - $langname    ".i18n("Last updated").": $dt
"; + } + else + { + echo "$langname
"; //    ".i18n("Last updated").": $dt
"; + } + echo "
"; + require_once("../fckeditor/fckeditor.php"); + + $oFCKeditor = new FCKeditor("text_$lang") ; + $oFCKeditor->BasePath = "../fckeditor/"; + $oFCKeditor->Value = $r->text; + $oFCKeditor->Width="100%"; + $oFCKeditor->Height=400; + $oFCKeditor->Create() ; + + echo "
\n"; + + echo "
"; + echo ""; + + if($_GET['historylimit']) $historylimit=$_GET['historylimit']; + else $historylimit=30; + + echo "\n"; + $q=mysql_query("SELECT id,dt FROM cms WHERE filename='".$_GET['filename']."' ORDER BY dt DESC LIMIT $historylimit"); + if(mysql_num_rows($q)) { + echo "\n"; + + } + else + echo "\n"; + echo "
".i18n("File History")."
id\" style=\"font-size: 0.75em;\">$r->dt
No History
\n"; + echo "

"; + echo "
"; + echo "\n"; + echo ""; + echo ""; + echo "
"; + echo "\n"; + echo "
\n"; + echo "
\n"; + + echo "
\n"; + + } + else + { + echo i18n("Choose a web page filename to edit"); + echo ""; + + $q=mysql_query("SELECT DISTINCT(filename) AS filename, dt FROM cms ORDER BY filename"); + echo ""; + while($r=mysql_fetch_object($q)) + { + echo ""; + if($r->dt=="0000-00-00 00:00:00") $dt="Never"; + else $dt=$r->dt; + echo ""; + echo ""; + + + } + echo "
".i18n("Filename")."".i18n("Last Update")."
filename)."\">/web/$r->filename$dt
"; + } + + send_footer(); +?> diff --git a/config/pagetexts.php b/config/pagetexts.php index 87c31c37..101a2959 100644 --- a/config/pagetexts.php +++ b/config/pagetexts.php @@ -4,7 +4,7 @@ SFIAB Website: http://www.sfiab.ca Copyright (C) 2005 Sci-Tech Ontario Inc - Copyright (C) 2005 James Grant + Copyright (C) 2008 James Grant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public diff --git a/theme/default/sfiab.css b/theme/default/sfiab.css index f406a96e..bbd66485 100644 --- a/theme/default/sfiab.css +++ b/theme/default/sfiab.css @@ -176,13 +176,13 @@ a:hover { background-color: #5C6F90; padding: 5px; margin: 0px; - font-size: 1.1em; + font-size: 1.0em; color: white; font-weight: bold; } .summarytable th a{ - font-size: 1.1em; + font-size: 1.0em; color: white; font-weight: bold; }