Skip to content

Commit

Permalink
remove unnecessary database_library.php inclusion
Browse files Browse the repository at this point in the history
git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/branches/1.8@189 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
Dave Goodwin committed Oct 25, 2011
1 parent 1056d56 commit 77afeb3
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 158 deletions.
13 changes: 6 additions & 7 deletions database.php
@@ -1,4 +1,4 @@
<?php
<?php
/**
*
* database page, has the settings for database connection
Expand All @@ -12,26 +12,25 @@
/*
* Host where database is
*/
$xerte_toolkits_site->database_host = "localhost";
$xerte_toolkits_site->database_host = "mysqlserver";

/*
* Username for database
*/
$xerte_toolkits_site->database_username ="root";
$xerte_toolkits_site->database_username ="dg";

/*
* Password for database
*/
$xerte_toolkits_site->database_password ="";
$xerte_toolkits_site->database_password ="gingerdog";

/*
* Database name
*/
$xerte_toolkits_site->database_name ="toolkits_data";
$xerte_toolkits_site->database_name ="xertetoolkits";

/*
* Database table prefix
*/
$xerte_toolkits_site->database_table_prefix ="";

?>

2 changes: 0 additions & 2 deletions demo.txt
Expand Up @@ -26,8 +26,6 @@ $_SESSION['toolkits_firstname'] = "Guest";

$_SESSION['toolkits_surname'] = "User 2";

include $xerte_toolkits_site->php_library_path . "database_library.php";

include $xerte_toolkits_site->php_library_path . "user_library.php";

$_SESSION['toolkits_logon_username'] = "guest2";
Expand Down
2 changes: 1 addition & 1 deletion drawing.php
Expand Up @@ -9,7 +9,7 @@
* @package
*/

require_once('config.php');
require_once(dirname(__FILE__) . '/config.php');


echo file_get_contents("modules/xerte/drawing_xerte_top");
Expand Down
1 change: 0 additions & 1 deletion edit.php
Expand Up @@ -11,7 +11,6 @@

require_once("config.php");

require $xerte_toolkits_site->php_library_path . "database_library.php";
require $xerte_toolkits_site->php_library_path . "screen_size_library.php";
require $xerte_toolkits_site->php_library_path . "template_status.php";
require $xerte_toolkits_site->php_library_path . "display_library.php";
Expand Down
123 changes: 61 additions & 62 deletions integration.txt
@@ -1,93 +1,92 @@
<?PHP require("config.php");
<?php
require_once("config.php");

/**
*
* Integration page, generic framework for integrating this service into other systems.
*
* Please look below at the INSERT strings and make sure you have these sorted
* If your system is providing it's own sessions then you also need to empty the code from session.php so it is just the PHP tags and possibly session_start().
*
* @author Patrick Lockley
* @version 1.0
* @copyright Copyright (c) 2008,2009 University of Nottingham
* @package
*/
/**
*
* Integration page, generic framework for integrating this service into other systems.
*
* Please look below at the INSERT strings and make sure you have these sorted
* If your system is providing it's own sessions then you also need to empty the code from session.php so it is just the PHP tags and possibly session_start().
*
* @author Patrick Lockley
* @version 1.0
* @copyright Copyright (c) 2008,2009 University of Nottingham
* @package
*/

/**
* Create the basic session
*/
/**
* Create the basic session
*/

include $xerte_toolkits_site->php_library_path . "login_library.php";
include $xerte_toolkits_site->php_library_path . "login_library.php";

include $xerte_toolkits_site->php_library_path . "display_library.php";
include $xerte_toolkits_site->php_library_path . "display_library.php";

$_SESSION['toolkits_firstname'] = "INSERTFIRSTNAMEHERE";

$_SESSION['toolkits_surname'] = "INSERTSURNAMEHERE";
$_SESSION['toolkits_firstname'] = "INSERTFIRSTNAMEHERE";

include $xerte_toolkits_site->php_library_path . "database_library.php";
$_SESSION['toolkits_surname'] = "INSERTSURNAMEHERE";

include $xerte_toolkits_site->php_library_path . "user_library.php";
include $xerte_toolkits_site->php_library_path . "user_library.php";

$mysql_id=database_connect("index.php database connect success","index.php database connect fail");
$mysql_id=database_connect("index.php database connect success","index.php database connect fail");

$_SESSION['toolkits_logon_username'] = "INSERTUSERNAMEHERE";
$_SESSION['toolkits_logon_username'] = "INSERTUSERNAMEHERE";

/*
* Check to see if this is a users' first time on the site
*/
/*
* Check to see if this is a users' first time on the site
*/

if(check_if_first_time($_SESSION['toolkits_logon_username'])){
if(check_if_first_time($_SESSION['toolkits_logon_username'])){

/*
* create the user a new id
*/
/*
* create the user a new id
*/

$_SESSION['toolkits_logon_id'] = create_user_id();
$_SESSION['toolkits_logon_id'] = create_user_id();

/*
* create a virtual root folder for this user
*/
/*
* create a virtual root folder for this user
*/

create_a_virtual_root_folder();
create_a_virtual_root_folder();

}else{

/*
* User exists so update the user settings
*/
}else{

$_SESSION['toolkits_logon_id'] = get_user_id();
/*
* User exists so update the user settings
*/

update_user_logon_time();

}
$_SESSION['toolkits_logon_id'] = get_user_id();

recycle_bin();
update_user_logon_time();

/*
* Output the main page, including the user's and blank templates
*/

echo file_get_contents($xerte_toolkits_site->website_code_path . "management_headers");
}

echo "<script type=\"text/javascript\"> // JAVASCRIPT library for fixed variables\n // management of javascript is set up here\n // SITE SETTINGS\n";
recycle_bin();

echo "var site_url = \"" . $xerte_toolkits_site->site_url . "\";\n";
/*
* Output the main page, including the user's and blank templates
*/

echo "var site_apache = \"" . $xerte_toolkits_site->apache . "\";\n";
echo file_get_contents($xerte_toolkits_site->website_code_path . "management_headers");

echo "var properties_ajax_php_path = \"website_code/php/properties/\";\n var management_ajax_php_path = \"website_code/php/management/\";\n var ajax_php_path = \"website_code/php/\";\n";
echo "<script type=\"text/javascript\"> // JAVASCRIPT library for fixed variables\n // management of javascript is set up here\n // SITE SETTINGS\n";

echo file_get_contents($xerte_toolkits_site->website_code_path . "management_top");

list_users_projects("data_down");
echo "var site_url = \"" . $xerte_toolkits_site->site_url . "\";\n";

echo logged_in_page_format_middle(file_get_contents($xerte_toolkits_site->website_code_path . "management_middle"));
echo "var site_apache = \"" . $xerte_toolkits_site->apache . "\";\n";

list_blank_templates();
echo "var properties_ajax_php_path = \"website_code/php/properties/\";\n var management_ajax_php_path = \"website_code/php/management/\";\n var ajax_php_path = \"website_code/php/\";\n";

echo file_get_contents($xerte_toolkits_site->website_code_path . "management_bottom");
echo file_get_contents($xerte_toolkits_site->website_code_path . "management_top");

list_users_projects("data_down");

echo logged_in_page_format_middle(file_get_contents($xerte_toolkits_site->website_code_path . "management_middle"));

list_blank_templates();

echo file_get_contents($xerte_toolkits_site->website_code_path . "management_bottom");

?>
</body>
Expand Down
4 changes: 0 additions & 4 deletions switch.txt
Expand Up @@ -114,10 +114,6 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {

if($authenticated){



include $xerte_toolkits_site->php_library_path . "database_library.php";

include $xerte_toolkits_site->php_library_path . "user_library.php";

$mysql_id=database_connect("index.php database connect success","index.php database connect fail");
Expand Down

0 comments on commit 77afeb3

Please sign in to comment.