Bible Reading Program 2015
// (C)Copyright 2015-2005 American Programmers Independent, LLC.
// and John D. Nash, Jr. All Rights Reserved, Worldwide.
// jdnash@jdnash.com
//
/***************************************************************************
* 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, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
As with anything, no guarantees. No warranties. No promises.
Use it as you wish, at your own risk, no strings attached.
If you already have the prior version working on your server,
you can just upload the files -- database schema is the same.
To install on your Apache2 server, create a folder /brp and unpack the files
into it. Upload the provided brp.sql to your mysql database. Create an account
"MyBible" with GRANT SELECT TO "MYBible"@"localhost" IDENTIFIED BY "test"; Or
edit the defines.php file to use whatever crediential you want. BRP only
needs SELECT. You can edit the scripts to change the web site however you wish.
FILES AND FUNCTIONS
index.php is the index file.
defines.php is server specifics (login, hostname, etc)
get_verse.php fetches the reading from the sql server
layout.php is the web page proper. Don't name it layout.html -- leave it at layout.php.
layout.css is the style sheet for layout.php
Change anything you want. Layout.php is the web page and layout.css is the
stylesheet. Make a different one to your liking and name it the same, then
insert the <?php echo $variable ?> stuff where you want the content to appear
in your own design.
Some coding changes were made to accomodate the upcoming php v7,
and also to improve and simplify the code. The program is intended
to display a daily reading from a list, in the reading_list table,
and each day can have more than one row in the reading_list table,
in which case they are shown one after another.
Specific changes are as follows:
All the mysql_command() were changed to mysqli_command() because the old version
is unavailable in php 7.0, which is in release candidate 3 at this time.
Since this is a general thought of the day program rather than
specifically locked into the Christian Bible, other material can
be uploaded to the 'bible' table in the same format. Readings
are categorized as book, chapter, and verse, so any text that follows
that same table format can be used.
function get_verse() is now an insert instead of a function. This streamlined
a lot of things.
There is a new file layout.php and its related layout.css.