- replaced $apidb_root with BASE
- removed variables that are not registered since php.ini has changed
This commit is contained in:
@@ -3,9 +3,6 @@
|
|||||||
/* Main Include Library for Application Database */
|
/* Main Include Library for Application Database */
|
||||||
/*************************************************/
|
/*************************************************/
|
||||||
|
|
||||||
// set global path
|
|
||||||
$apidb_root = BASE;
|
|
||||||
|
|
||||||
// get modules
|
// get modules
|
||||||
require(BASE."include/"."config.php");
|
require(BASE."include/"."config.php");
|
||||||
require(BASE."include/"."util.php");
|
require(BASE."include/"."util.php");
|
||||||
@@ -26,25 +23,20 @@ function apidb_help_add($desc, $id)
|
|||||||
|
|
||||||
|
|
||||||
// return url with docroot prepended
|
// return url with docroot prepended
|
||||||
//
|
|
||||||
function apidb_url($path)
|
function apidb_url($path)
|
||||||
{
|
{
|
||||||
global $apidb_root;
|
return BASE.$path;
|
||||||
return $apidb_root.$path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// return FULL url with docroot prepended
|
// return FULL url with docroot prepended
|
||||||
function apidb_fullurl($path = "")
|
function apidb_fullurl($path = "")
|
||||||
{
|
{
|
||||||
global $apidb_root;
|
return BASE.$path;
|
||||||
return $apidb_root.$path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function apidb_fullpath($path)
|
function apidb_fullpath($path)
|
||||||
{
|
{
|
||||||
global $apidb_root;
|
return $_SERVER['DOCUMENT_ROOT'].BASE.$path;
|
||||||
global $DOCUMENT_ROOT;
|
|
||||||
return $DOCUMENT_ROOT.$apidb_root.$path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -53,8 +45,6 @@ function apidb_fullpath($path)
|
|||||||
*/
|
*/
|
||||||
function apidb_header($title = 0)
|
function apidb_header($title = 0)
|
||||||
{
|
{
|
||||||
global $apidb_root;
|
|
||||||
|
|
||||||
$username = isset($_SESSION['current'])?$_SESSION['current']->username:"";
|
$username = isset($_SESSION['current'])?$_SESSION['current']->username:"";
|
||||||
|
|
||||||
// Set Page Title
|
// Set Page Title
|
||||||
@@ -89,8 +79,6 @@ function apidb_header($title = 0)
|
|||||||
*/
|
*/
|
||||||
function apidb_footer()
|
function apidb_footer()
|
||||||
{
|
{
|
||||||
global $apidb_root;
|
|
||||||
|
|
||||||
echo html_frame_end();
|
echo html_frame_end();
|
||||||
|
|
||||||
//Close Sidebar and Content Well
|
//Close Sidebar and Content Well
|
||||||
@@ -106,7 +94,6 @@ function apidb_footer()
|
|||||||
*/
|
*/
|
||||||
function apidb_sidebar()
|
function apidb_sidebar()
|
||||||
{
|
{
|
||||||
global $apidb_root;
|
|
||||||
global $sidebar_func_list;
|
global $sidebar_func_list;
|
||||||
|
|
||||||
//TURN on GLOBAL ADMIN MENU
|
//TURN on GLOBAL ADMIN MENU
|
||||||
@@ -146,8 +133,7 @@ function apidb_sidebar_add($funcname)
|
|||||||
|
|
||||||
function apidb_image($name)
|
function apidb_image($name)
|
||||||
{
|
{
|
||||||
global $apidb_root;
|
return BASE."images/$name";
|
||||||
return $apidb_root."images/$name";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -193,13 +179,11 @@ function redirectref($url = null)
|
|||||||
*/
|
*/
|
||||||
function addmsg($text, $color = "black")
|
function addmsg($text, $color = "black")
|
||||||
{
|
{
|
||||||
global $PHPSESSID;
|
|
||||||
|
|
||||||
if($color)
|
if($color)
|
||||||
$text = "<font color='$color'> $text </font>\n";
|
$text = "<font color='$color'> $text </font>\n";
|
||||||
|
|
||||||
$text = str_replace("'", "\\'", $text);
|
$text = str_replace("'", "\\'", $text);
|
||||||
mysql_query("INSERT INTO sessionMessages VALUES (null, null, '$PHPSESSID', '$text')");
|
mysql_query("INSERT INTO sessionMessages VALUES (null, null, '".session_id()."', '$text')");
|
||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,9 +194,7 @@ function addmsg($text, $color = "black")
|
|||||||
*/
|
*/
|
||||||
function dumpmsgbuffer()
|
function dumpmsgbuffer()
|
||||||
{
|
{
|
||||||
global $PHPSESSID;
|
$result = mysql_query("SELECT * FROM sessionMessages WHERE sessionId = '".session_id()."'");
|
||||||
|
|
||||||
$result = mysql_query("SELECT * FROM sessionMessages WHERE sessionId = '$PHPSESSID'");
|
|
||||||
if(!$result)
|
if(!$result)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -224,7 +206,7 @@ function dumpmsgbuffer()
|
|||||||
echo "<br>\n";
|
echo "<br>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_query("DELETE FROM sessionMessages WHERE sessionId = '$PHPSESSID'");
|
mysql_query("DELETE FROM sessionMessages WHERE sessionId = '".session_id()."'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user