From f472c60b18469ff8a06963708174dea1bfc08015 Mon Sep 17 00:00:00 2001 From: Evan O'Connell Date: Sun, 18 Aug 2013 18:29:07 -0400 Subject: Adds untracked changes --- admin/adjutant/functions.php | 55 ++++- admin/adjutant/index.php | 13 +- admin/admins/functions.php | 91 +++++-- admin/admins/index.php | 4 + admin/index.php | 2 +- admin/newsreel/updateDB.php | 2 +- admin/rudi/includes/functions.members.php | 44 +++- admin/rudi/views/view.awards.add.php | 5 +- admin/rudi/views/view.awards.php | 2 +- admin/rudi/views/view.members.delete.php | 31 +++ admin/rudi/views/view.members.new.php | 381 ++++++++++++++++-------------- admin/rudi/views/view.members.php | 24 +- admin/rudi/views/view.members.profile.php | 11 +- blocks/forum_login/index.php | 2 - blocks/mini_calendar/functions.php | 3 +- blocks/mini_calendar/style.css | 226 +++++++++--------- include/classes.php | 4 +- include/config.example.php | 61 +++++ include/config.ini.example | 50 ---- index.php | 5 +- modules/news/functions.php | 2 +- modules/news/style.css | 22 +- modules/newsreel/index.php | 2 +- modules/rudi/images/ranks/large/CW2.gif | Bin 0 -> 946 bytes modules/rudi/images/ranks/large/WO1.gif | Bin 0 -> 989 bytes modules/rudi/images/ranks/small/CW2.png | Bin 0 -> 3820 bytes 26 files changed, 645 insertions(+), 397 deletions(-) create mode 100644 admin/rudi/views/view.members.delete.php create mode 100644 include/config.example.php delete mode 100644 include/config.ini.example create mode 100644 modules/rudi/images/ranks/large/CW2.gif create mode 100644 modules/rudi/images/ranks/large/WO1.gif create mode 100644 modules/rudi/images/ranks/small/CW2.png diff --git a/admin/adjutant/functions.php b/admin/adjutant/functions.php index 87bc4b4..b38400e 100644 --- a/admin/adjutant/functions.php +++ b/admin/adjutant/functions.php @@ -67,6 +67,59 @@ echo ""; } + +/****** NEW CODE ADDED LARRABEE 11-20-2012 ********/ + function EditPoints2(){ + + global $db; + + $result = $db->Query("SELECT * FROM `rudi_unit_members` JOIN `rudi_ranks` ON rudi_unit_members.rank_id=rudi_ranks.rank_id WHERE rudi_unit_members.status_id < 4 ORDER BY rudi_ranks.weight DESC , rudi_unit_members.date_promotion ASC , rudi_unit_members.date_enlisted ASC"); + $row = $db->Fetch($result); + + if(isset($_POST['processed'])){ + echo "Updating data... Please wait."; + foreach($row as $soldier){ + $mID = $soldier['member_id']; + $missed = $_POST[$mID.'missed']; + $attended = $_POST[$mID.'attended']; + $points = $_POST[$mID.'points']; + + if($missed !="" && $points != ""){ + $db->Query("UPDATE `rudi_unit_members` SET `points` = $points, `drillcount` = $missed, `attendcount` = $attended WHERE `member_id` = $mID LIMIT 1"); + }else{ + ReportError("Error updating points for soldier id# '$mID'. Please contact administrator."); + } + } + PageRedirect(1,"?op=adjutant&edit=pointsnew"); + return; + } +?> +
+ + + +"; + else + echo ""; + echo " + + + + + "; + + + echo "\n"; + } + CloseTable(); + echo ""; + + } +/****** END NEW CODE ADDED *******/ function EditLOAs($status_id = 1){ @@ -160,4 +213,4 @@ $num = 1; return $row['name']; } - ?> \ No newline at end of file + ?> diff --git a/admin/adjutant/index.php b/admin/adjutant/index.php index 5149c28..d8491ac 100644 --- a/admin/adjutant/index.php +++ b/admin/adjutant/index.php @@ -19,8 +19,10 @@ ?> +

- Adjutant Control Panel

Edit Points   + Edit Points *NEW*   Edit LOAs
RankSoldierStatusPointsDrills MissedDrills Attended
{$soldier['shortname']}{$soldier['first_name']} {$soldier['last_name']}".getStatus($soldier['status_id'])."/100/3/3
-
@@ -39,6 +41,10 @@ echo "

Edit Points

"; EditPoints(); } + if($_GET['edit'] == "pointsnew"){ + echo "

Edit Points *NEW*

"; + EditPoints(); + } if($_GET['edit'] == "loas"){ echo "

Edit LOAs

"; if(isset($_GET['member'])){ @@ -53,6 +59,11 @@ } } } + else if(isset($_GET['drills'])){ + if($_GET['drills'] == "new"){ + + } + } ?>
\ No newline at end of file + diff --git a/admin/admins/functions.php b/admin/admins/functions.php index f3da1be..016b7a1 100644 --- a/admin/admins/functions.php +++ b/admin/admins/functions.php @@ -101,25 +101,15 @@ ReportError("The email and or username you entered is already in use."); return; } - - - $Name = "Rocky the Marne Dog"; - $subject = "3rd ID Admin Password"; - $header = "From: ". $Name . " < DO NOT RESPOND >\r\n"; //optional headerfields - $mail_body = "Do not respond to this email.\n\n------------------------------\nUsername: ".$username."\nPassword: ".$password."\n------------------------------\n\nTo login click on this link. http://testbed.3rd-infantry-division.org/cms/admin/ \n\nIt is recommended that you change your password once you login. To do so, click on Account Settings>Change Password."; - - $sent = mail($email, $subject, $mail_body, $header); - if(!$sent){ - ReportError("Error validating email. This user was not saved."); - return; - } - + + EmailPassword($username, $password, $email); + $db->Query("INSERT INTO `bayonet_users` (`user_id` ,`username` ,`password` ,`lastname` ,`firstname` ,`email` ,`joined` ,`level` ,`all` ,`squadleader` ,`adjutant` ,`quartermaster`) VALUES (NULL, '$username', '$cryptpassword', '$last', '$first', '$email', CURRENT_TIMESTAMP, $level, $all, $squadleader, $adjutant, $quartermaster)"); echo "Admin, '$username' level '$level' has been added. An email has been sent to him with his username and password.\n

Please wait while you are redirected.

Click here if you don't feel like waiting."; - + // 3 second redirect to go back to the edit page PageRedirect(2, "?op=admins"); return; @@ -158,6 +148,22 @@ \r\n"; //optional headerfields + $mail_body = "Do not respond to this email.\n\n------------------------------\nUsername: ".$username."\nPassword: ".$password."\n------------------------------\n\nTo login click on this link. ".Bayonet_Config::$ini['site']['url']."admin/ \n\nIt is recommended that you change your password once you login. To do so, click on Account Settings>Change Password."; + + $sent = mail($email, $subject, $mail_body, $header); + if(!$sent){ + ReportError("Error validating email. This user was not saved."); + return false; + } + + return true; + } + function GetPermissions($user = NULL) { ?> @@ -217,7 +223,7 @@ while(strlen($string)<$length) { $string .= substr($possible_charactors, rand()%(strlen($possible_charactors)),1); } - return($string); + return($string); } function EditAdmin($user_id) @@ -264,7 +270,11 @@ Edit the attributes of this administrator.
- + diff --git a/admin/index.php b/admin/index.php index c1da495..3ae793c 100644 --- a/admin/index.php +++ b/admin/index.php @@ -21,7 +21,7 @@ session_start(); define('BAYONET_INCLUDE', '../include'); -define('BAYONET_CONFIG', '../include/config.ini'); +define('BAYONET_CONFIG', '../include/config.php'); include BAYONET_INCLUDE . '/debug.php'; include BAYONET_INCLUDE . '/sql.class.php'; diff --git a/admin/newsreel/updateDB.php b/admin/newsreel/updateDB.php index 0e5efda..09516d0 100644 --- a/admin/newsreel/updateDB.php +++ b/admin/newsreel/updateDB.php @@ -5,7 +5,7 @@ $dirname = "/path/to/bayonet/here"; define('BAYONET_ROOT', $dirname); define('BAYONET_INCLUDE', BAYONET_ROOT . '/include'); -define('BAYONET_CONFIG', BAYONET_ROOT . '/include/config.ini'); +define('BAYONET_CONFIG', BAYONET_ROOT . '/include/config.php'); require BAYONET_INCLUDE . '/debug.php'; require BAYONET_INCLUDE . '/sql.class.php'; diff --git a/admin/rudi/includes/functions.members.php b/admin/rudi/includes/functions.members.php index 86848dc..4a93134 100644 --- a/admin/rudi/includes/functions.members.php +++ b/admin/rudi/includes/functions.members.php @@ -37,8 +37,13 @@ function GetMembersRoles($member_id){ global $db; $row = NULL; - $query = sprintf("SELECT r.role_id, r.name AS role_name FROM rudi_roles AS r LEFT OUTER JOIN rudi_roles_container AS rl USING(role_id) INNER JOIN rudi_unit_members AS rm USING(member_id) WHERE rm.member_id = %d AND r.name IS NOT NULL ORDER BY r.role_id ASC", - (int)$member_id); + $query = sprintf("SELECT r.role_id, r.name AS role_name + FROM rudi_roles AS r + LEFT OUTER JOIN rudi_roles_container AS rl USING(role_id) + INNER JOIN rudi_unit_members AS rm USING(member_id) + WHERE rm.member_id = %d + AND r.name IS NOT NULL + ORDER BY r.role_id ASC", (int)$member_id); $result = $db->Query($query); $row = $db->Fetch($result); @@ -299,4 +304,39 @@ CloseTable(); $form->__destruct(); } + + + + + function DeleteMember($member_id) + { + // FROM unit_members, service_record, award_record FOR member_id + global $db; + + $db->Query("DELETE FROM `rudi_unit_members`, + `rudi_service_record`, + `rudi_award_record`, + `rudi_combat_record`, + `rudi_drills_record` + USING `rudi_unit_members` + INNER JOIN `rudi_award_record` USING(member_id) + INNER JOIN `rudi_service_record` USING(member_id) + INNER JOIN `rudi_combat_record` USING(member_id) + INNER JOIN `rudi_drills_record` USING(member_id) + WHERE `member_id` = $member_id"); + decho("DELETE FROM `rudi_unit_members`, + `rudi_service_record`, + `rudi_award_record`, + `rudi_combat_record`, + `rudi_drills_record` + USING `rudi_unit_members` + INNER JOIN `rudi_award_record` USING(member_id) + INNER JOIN `rudi_service_record` USING(member_id) + INNER JOIN `rudi_combat_record` USING(member_id) + INNER JOIN `rudi_drills_record` USING(member_id) + WHERE `member_id` = $member_id"); + decho("Done."); + return; + } + ?> \ No newline at end of file diff --git a/admin/rudi/views/view.awards.add.php b/admin/rudi/views/view.awards.add.php index 9c97c54..71f6a91 100644 --- a/admin/rudi/views/view.awards.add.php +++ b/admin/rudi/views/view.awards.add.php @@ -6,12 +6,13 @@ global $db; $name = $form->request['name']; $text = $form->request['text']; + decho("INSERT INTO `rudi_awards` SET `class_id` = '$class_id', `name` = '$name', `description` = '$text'"); $db->Query("INSERT INTO `rudi_awards` SET `class_id` = '$class_id', `name` = '$name', `image` = '', `description` = '$text'"); - PageRedirect(1, "?op=rudi&show=awards&cid={$class_id}"); + PageRedirect(1, "?op=rudi&show=awards&cid=".$class_id); return; } - echo LinkInternal("Cancel","?op=rudi&show=awards&cid={$class_id}"); + echo LinkInternal("Cancel","?op=rudi&show=awards&cid=".$class_id); OpenTable(); ?> diff --git a/admin/rudi/views/view.awards.php b/admin/rudi/views/view.awards.php index 3a5729f..4902577 100644 --- a/admin/rudi/views/view.awards.php +++ b/admin/rudi/views/view.awards.php @@ -23,7 +23,7 @@ $class_id = $_GET['cid']; $awards = getAwardsByClass($class_id); echo "

Awards

"; - echo LinkInternal(' Add New Award','?op=rudi&show=awards&cid={$class_id}&add=true'); + echo LinkInternal(' Add New Award','?op=rudi&show=awards&cid='.$class_id.'&add=true'); OpenTable(); foreach($awards as $award){ echo " diff --git a/admin/rudi/views/view.members.delete.php b/admin/rudi/views/view.members.delete.php new file mode 100644 index 0000000..e0adf5e --- /dev/null +++ b/admin/rudi/views/view.members.delete.php @@ -0,0 +1,31 @@ +Query("SELECT CONCAT(last_name,', ',first_name) AS name FROM `rudi_unit_members` WHERE `member_id` = '$member_id' LIMIT 1"); + $member = $db->FetchRow($result); + $form = new BayonetForm("", "POST"); + + if(isset($_POST['proceed'])) + { + //echo "Soldier '{$member['name']}', was deleted."; + ReportError("This is not completed yet."); + // DELETE unit_members, service_record, award_record FOR member_id + //DeleteMember($member_id); + PageRedirect(2, "?op=rudi&show=members"); + return; + } + if(isset($_POST['cancel'])) + { + echo "User cancelled deletion of soldier: '{$member['name']}'"; + PageRedirect(2, "?op=rudi&show=members&profile={$member_id}"); + return; + } + + OpenTable(); +?> + + +__destruct(); +?> \ No newline at end of file diff --git a/admin/rudi/views/view.members.new.php b/admin/rudi/views/view.members.new.php index cbc086f..ab309ea 100644 --- a/admin/rudi/views/view.members.new.php +++ b/admin/rudi/views/view.members.new.php @@ -1,179 +1,204 @@ -Query($query); - - $member_id = $db->InsertID(); - decho($member_id); - $db->Query("INSERT INTO `rudi_roles_container` SET `role_id` = '$role_id', `member_id` = '$member_id'"); - - PageRedirect(1, "?op=rudi&show=members"); - return; - } -?> - Cancel
- -
Username:
Username: + = 2): ?> + + +
Level: @@ -299,8 +309,8 @@ global $db; $maxLevel = $_SESSION['level']; - $result = $db->Query("SELECT `username` FROM `bayonet_users` WHERE `user_id` = '$user_id'"); - $admin = $db->Fetch($result); + $result = $db->Query("SELECT `username` FROM `bayonet_users` WHERE `user_id` = '$user_id' LIMIT 1"); + $admin = $db->FetchRow($result); if(isset($_POST['proceed'])) { @@ -326,4 +336,49 @@ Query("SELECT `username`, `email` FROM `bayonet_users` WHERE `user_id` = '$user_id' LIMIT 1"); + $admin = $db->FetchRow($result); + decho($admin); + + if(isset($_POST['proceed'])) + { + $password = GeneratePassword(8); + $cryptpassword = crypt(md5($password),'iamnotadirtywhorebitch'); + + $status = EmailPassword($admin['username'], $password, $admin['email']); + + if($status) + { + $db->Query("UPDATE `bayonet_users` SET `password` = '$cryptpassword' WHERE `user_id` = '$user_id' LIMIT 1"); + echo "Password has been reset and emailed to '{$admin['username']}'"; + PageRedirect(3, "?op=admins"); + } + else + { + ReportError("An error has occured emailing the new password. It will not take effect."); + } + + return; + } + if(isset($_POST['cancel'])) + { + echo "The password WILL NOT be reset for '{$admin['username']}'"; + PageRedirect(3, "?op=admins"); + return; + } + ?> +
+ + + + +
Are you SURE you want to reset this user's password: ''?
   
+ +
+ \ No newline at end of file diff --git a/admin/admins/index.php b/admin/admins/index.php index a2e71e9..87ce2a0 100644 --- a/admin/admins/index.php +++ b/admin/admins/index.php @@ -48,6 +48,10 @@ else if(isset($_GET['delete'])){ else if(isset($_GET['create'])){ NewAdmin(); } +else if(isset($_GET['resetpassword'])){ + $user_id = $_GET['resetpassword']; + ResetPassword($user_id); +} ?>
".$award['name']."Are you SURE you want to delete soldier: ''?
All records for this soldier will be permenantly removed.
   
- - - -
Personnel File of
Rank: - -
Country: - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Vital Statistics
First:
Last:
Username:
City:
Province:
Status: - -
Primary MOS:
Role: - -
Unit: - -
Weapons: - -
Enlisted Date:
Promotion Date: - -
Discharge Date:
Xfire:
E-Mail:
-
- - - - -
Personal Bio
+Query($query); + + $member_id = $db->InsertID(); + decho($member_id); + //$db->Query("INSERT INTO `rudi_roles_container` SET `role_id` = '$role_id', `member_id` = '$member_id'"); + + PageRedirect(1, "?op=rudi&show=members&profile=$member_id"); + return; + } +?> + Cancel
+ + + + + + + +
Personnel File of
Rank: + +
Country: + +
ArmA2 ID
ArmA2:OA ID
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Vital Statistics
First:
Last:
Username:
City:
Province:
Status: + +
Primary MOS:
Role: + +
Unit: + +
Primary Weapon: + +
Secondary Weapon: + +
Enlisted Date:
Promotion Date: + +
Discharge Date:
Xfire:
E-Mail:
+
+ + + + +
Personal Bio
\ No newline at end of file diff --git a/admin/rudi/views/view.members.php b/admin/rudi/views/view.members.php index 9013b8e..7aabb89 100644 --- a/admin/rudi/views/view.members.php +++ b/admin/rudi/views/view.members.php @@ -1,17 +1,31 @@ - - + + + + +
Personal Bio
+ + + +
\ No newline at end of file diff --git a/blocks/forum_login/index.php b/blocks/forum_login/index.php index c5343d9..ca094f6 100644 --- a/blocks/forum_login/index.php +++ b/blocks/forum_login/index.php @@ -25,8 +25,6 @@ if (isset($GLOBALS['ID_MEMBER']) && $GLOBALS['ID_MEMBER'] != 0): ?>

Your IP:
- - <?php echo 'No Avatar'; ?>
Total posts:

diff --git a/blocks/mini_calendar/functions.php b/blocks/mini_calendar/functions.php index ffc98a6..0aed0d5 100644 --- a/blocks/mini_calendar/functions.php +++ b/blocks/mini_calendar/functions.php @@ -29,7 +29,8 @@ diff --git a/blocks/mini_calendar/style.css b/blocks/mini_calendar/style.css index d34db05..52af08d 100644 --- a/blocks/mini_calendar/style.css +++ b/blocks/mini_calendar/style.css @@ -1,114 +1,114 @@ -/* START>> CALENDAR STYLES*/ - .monthTitle{ - color:black; - text-align:center; - font-size:12px; - font-weight:bold; - font-family:arial; - } - td.weekday { - width:40px; - height:20px; - background-color:#cb2121; - color:green; - text-align:center; - font-size:10px; - /* font-weight:bold; */ - } - th.weekday { - width:40px; - height:29px; - background-color:white; - color:black; - text-align:center; - font-size:11px; - font-weight:normal; - } - .monthday { - width:40px; - height:20px; - background-color:#aea2a2; - color:white; - text-align:left; - font-size:10pt; - /* font-weight:bold; */ - - } - .monthtoday { - width:38px; - height:38px; - /* background-color:#3666ba; */ - color:#225eac; - text-align:center; - font-size:14px; - font-weight:bold; - font-family: arial; - border:1px solid #333333; - } - .event { - width:38px; - height:38px; - background-color:#225eac; - text-align:center; - border:1px solid #333333; - cursor: pointer; - } - table.calendar a, table.calendar a:visited, table.calendar a:active, table.calendar a:hover { - color:white; - } - .eventtoday { - width:38px; - height:38px; - background-color:#225eac; - color: white; - text-align:center; - font-size:14px; - font-weight:bold; - font-family: arial; - border:1px solid #333333; - } - td.cal_weekday { - width:40px; - height:40px; - background-color:#a1a1a1; - vertical-align:top; - color:#eeeeee; - font-family:arial; - text-align:center; - font-size:12px; - } - td.cal_weekend { - width:40px; - height:40px; - background-color:#8f8f8f; - vertical-align:top; - color:#eeeeee; - font-family:arial; - text-align:center; - font-size:12px; - } - td.cal_notmonth { - width:40px; - height:40px; - background-color:#6e6e6e; - vertical-align:top; - color:#d4d4d4; - text-align:left; - font-size:11px; - } - div.event_title { - font-family: Geneva, Verdana, Arial; - font-size: 14px; - } - div.event_text { - font-family: Geneva, Verdana, Arial; - font-size: 12px; - padding-top: 3px; - padding-left: 10px; - padding-right: 5px; - } - div.event_time { - font-family: Geneva, Verdana, Arial; - font-size: 12px; - } +/* START>> CALENDAR STYLES*/ + .monthTitle{ + color:black; + text-align:center; + font-size:12px; + font-weight:bold; + font-family:arial; + } + td.weekday { + width:40px; + height:20px; + background-color:#cb2121; + color:green; + text-align:center; + font-size:10px; + /* font-weight:bold; */ + } + th.weekday { + width:40px; + height:29px; + background-color:white; + color:black; + text-align:center; + font-size:11px; + font-weight:normal; + } + .monthday { + width:40px; + height:20px; + background-color:#aea2a2; + color:white; + text-align:left; + font-size:10pt; + /* font-weight:bold; */ + + } + .monthtoday { + width:38px; + height:38px; + /* background-color:#3666ba; */ + color:#225eac; + text-align:center; + font-size:14px; + font-weight:bold; + font-family: arial; + border:1px solid #333333; + } + .event { + width:38px; + height:38px; + background-color:#225eac; + text-align:center; + border:1px solid #333333; + cursor: pointer; + } + table.calendar a, table.calendar a:visited, table.calendar a:active, table.calendar a:hover { + color:white; + } + .eventtoday { + width:38px; + height:38px; + background-color:#225eac; + color: white; + text-align:center; + font-size:14px; + font-weight:bold; + font-family: arial; + border:1px solid #333333; + } + td.cal_weekday { + width:40px; + height:40px; + background-color:#a1a1a1; + vertical-align:top; + color:#eeeeee; + font-family:arial; + text-align:center; + font-size:12px; + } + td.cal_weekend { + width:40px; + height:40px; + background-color:#8f8f8f; + vertical-align:top; + color:#eeeeee; + font-family:arial; + text-align:center; + font-size:12px; + } + td.cal_notmonth { + width:40px; + height:40px; + background-color:#6e6e6e; + vertical-align:top; + color:#d4d4d4; + text-align:left; + font-size:11px; + } + div.event_title { + font-family: Geneva, Verdana, Arial; + font-size: 14px; + } + div.event_text { + font-family: Geneva, Verdana, Arial; + font-size: 12px; + padding-top: 3px; + padding-left: 10px; + padding-right: 5px; + } + div.event_time { + font-family: Geneva, Verdana, Arial; + font-size: 12px; + } /* END>> CALENDAR STYLES */ \ No newline at end of file diff --git a/include/classes.php b/include/classes.php index 321e063..65017b6 100644 --- a/include/classes.php +++ b/include/classes.php @@ -97,13 +97,13 @@ class Bayonet_Theme extends Bayonet_Layout class Bayonet_Config { static $ini; + static function init() { decho('Parsing configuration data'); if (file_exists(BAYONET_CONFIG)) { - self::$ini = parse_ini_file(BAYONET_CONFIG, true); - decho(self::$ini); + self::$ini = require_once 'config.php'; } else die(BAYONET_CONFIG . ' not found'); } diff --git a/include/config.example.php b/include/config.example.php new file mode 100644 index 0000000..5854828 --- /dev/null +++ b/include/config.example.php @@ -0,0 +1,61 @@ +. +*/ + +return array( + + 'sql' => array( + 'hostname' => 'localhost', + 'database' => 'bayonet', + 'username' => 'bayonet', + 'password' => 'password' + ), + + 'site' => array( + 'url' => 'http://example.com/', // must have a trailing slash + 'theme' => 'new', + 'favicon' => 'favicon.ico' + ), + + 'modules' => array( + 'default' => 'index', + ), + + 'blocks' => array( + 'spacer' => true + ), + + 'logs' => array( + 'enabled' => true, + 'timezone' => 'EST', + 'dir' => 'logs/' + ), + + 'debug' => array( + 'enabled' => true, + 'show_messages' => true, + 'repeat_messages' => false + ), + + 'product' => array( + 'name' => 'Bayonet CMS', + 'copyright' => 'Copyright © 2007-2010 Joseph Hunkeler & Evan O\'Connell, All rights reserved.', + 'version' => '0.0.1', + 'release' => 'Beta' + ) +); \ No newline at end of file diff --git a/include/config.ini.example b/include/config.ini.example deleted file mode 100644 index 074fc24..0000000 --- a/include/config.ini.example +++ /dev/null @@ -1,50 +0,0 @@ -; -; Bayonet Content Management System -; Copyright (C) 2008 Joseph Hunkeler & Evan O'Connell -; -; 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, either version 3 of the License, or -; (at your option) any later version. -; -; 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. If not, see . -; - -[sql] -hostname="localhost" -database="bayonet" -username="bayonet" -password="passwd" - -[site] -theme="gttheme" -favicon="favicon.ico" - -[modules] -default="index" - -[blocks] -spacer=true - -[logs] -enabled=true -timezone="EST" -dir="logs/" - -[debug] -enabled=false -show_messages=true -repeat_messages=false - -[product] -name="Bayonet CMS" -copyright="Copyright © 2007-2010 Joseph Hunkeler & Evan O\'Connell, All rights reserved." -version="2.1" -release="Alpha" - diff --git a/index.php b/index.php index a811ba4..2cc98bf 100644 --- a/index.php +++ b/index.php @@ -22,7 +22,7 @@ */ define('BAYONET_ROOT', basename(dirname('.'))); define('BAYONET_INCLUDE', BAYONET_ROOT . '/include'); -define('BAYONET_CONFIG', BAYONET_ROOT . '/include/config.ini'); +define('BAYONET_CONFIG', BAYONET_ROOT . '/include/config.php'); require BAYONET_INCLUDE . '/debug.php'; require BAYONET_INCLUDE . '/sql.class.php'; @@ -31,6 +31,3 @@ require_once BAYONET_INCLUDE . '/classes.php'; /* Initialize Bayonet CMS */ Bayonet::init(); - - -?> diff --git a/modules/news/functions.php b/modules/news/functions.php index 790a00e..5fd722c 100644 --- a/modules/news/functions.php +++ b/modules/news/functions.php @@ -181,7 +181,7 @@ function displayNews($data, $short = false){ -
+
<?php echo $news['catname']; ?> newsreel
- +