Insert External Scripts (Pages)

Hi guys. I want to integrate an external bible script I downloaded (http://www.hotscripts.com/listing/bible-php-script/) into the content page of my existing website I am building for my church: http://maranatha.tv (click on BIBLIA).

I am using include() to insert the main bible’s index.php page, but nothing is displayed. I am calling this page from an included function content() in my website’s root index page; basically, this is the folder structure:

  1. server root: contains index.php
    and two main functions are called within this index page: menu() and content();
    The content() makes a call to bible().

  2. bible/__WINDOWS/index.php

Here’s bible() function:
[php]function bible(){
include(‘bible/__WINDOWS/index.php’);
echo ‘TEST’;//testing simple text
}[/php]
3) Here’s content()
[php]function content(){

// DETERMINE which page ID to USE in our query below ********************************************************************
if (!isset($_GET['jesusid'])) {
	$pageid = '1';
	
} else {
	
$pageid = preg_replace('#[^0-9]#i', '', $_GET['jesusid']);} // filter everything but numbers for security(new)
//preg_replace($pattern, $replacement, $string);//preg_replace() Function structure

// Query the body section for the proper page
$query = mysql_query ("SELECT body_text,title,author FROM content WHERE id = '$pageid' LIMIT 1 ") or die (mysql_error());  

while ($row = mysql_fetch_array($query)) { 

echo ucwords($row['title']).'</span> por ';
echo '<b>'.$row['author']. '</b><br>';

echo $row['body_text'];

//ADD CONTACT FORM
if (ucwords($row['title'])=='Contacto') //use row title -- Capitalized word
echo '
	 <iframe src="contact/contact.html" width="445px" height="260" marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=NO>
	  Your browser does not support iframes.
      </iframe>';

//ADD BIBLE Iframe
if (ucwords($row['title'])=='Biblia') //use row title -- Capitalized word
	{		
		bible();
	}
	
	//INSERT LIVESTREAM JW PLAYER
	
		//ADD CONTACT FORM
if (ucwords($row['title'])=='Cultos')
	{ //use row title -- Capitalized word
	include ('envivo.php');
	}
	
if ($pageid == 16) //use row title -- Capitalized word
	{
	include ('envivo.php');	
	}	
}

}[/php]

I already installed the bible script, created the database, and is working on its own: http://maranatha.tv/bible/__WINDOWS/index.php

I tried inserting it using iframes but got frustrated because I couldn’t manage to have the iframe resize with content.

Can anybody throw some light as why the include doesn’t seem to display the contets from the bible script?

Thanks in adavance for your time.

Just avoid any extra confusion let me clarify a bit the folder structure as I think this might part of the problem:

ROOT
index.php -->content() and menu() form the basics of this page
. The functions.php file is called from this page – include(_includes/functions.php)

Folders in ROOT

  1. _includes/functions.php
    —> All page functions are defined here: content(), menu bible(), etc.

  2. bible/__WINDOWS/index.php
    —>contains a series of folder related to the online bible script: bibles, data, include, js, language, template

Here are the Basic page structures

index.php
[php]

include(‘functions.php’)

//two main functions are called
menu();
content();

[/php]

functions.php
[php]//define functions

//see first post for complete function definition.
function menu(){};
function content(){};
function bible(){};
[/php]

Let me know if all this makes some sense at all.

Sponsor our Newsletter | Privacy Policy | Terms of Service