Location: PHPKode > projects > Cdub's Logs > cdubs-logs/cdub_config.php
<?
// ###################################
// #   Config file for cdubz logs    #
// ###################################

// NOTE : IF YOU SET $cdub_globals TO no THE SCRIPT MAY NOT WORK, ONLY SET THIS TO no if you have global variables turned on
// in your server settings, if you are unsure leave this as 'yes'
$cdub_globals = 'yes'; // ENTER HERE IF YOU WANT GLOBAL VARIABLES REGISTERED. IF YOU DO NOT WANT THEM ENTER no INSTEAD OF yes.


// SET ALL VARIABLES TO GLOBAL DO NOT EDIT
$cdub_globals = strtolower($cdub_golbals);
if($cdub_globals = 'yes') {
while (list($key, $val) = @each($HTTP_GET_VARS)) {
$GLOBALS[$key] = $val;
}
while (list($key, $val) = @each($HTTP_POST_VARS)) {
$GLOBALS[$key] = $val;
}
while (list($key, $val) = @each($HTTP_SESSION_VARS)) {
$GLOBALS[$key] = $val;
}
}
// DO NOT EDIT ANYTHING ABOVE THIS EVER!


$cdub_db_host = 'localhost';     // ENTER YOUR DATABASE HOST HERE, NORMALLY 'localhost'
$cdub_db_login = 'login';    // ENTER YOUR DATABASE LOGIN NAME HERE.
$cdub_db_pass = 'password';      // ENTER YOUR DATABASE PASSWORD HERE.
$cdub_db_name = 'database_name'; // ENTER THE NAME OF YOUR DATABASE HERE


// DO NOT EDIT THE FOLLOWING 2 LINES
$cdub_db_connect = @mysql_connect($cdub_db_host, $cdub_db_login, $cdub_db_pass) or die("Couldn't Connect to database!"); // DO NOT EDIT
$cdub_db_select = @mysql_select_db($cdub_db_name, $cdub_db_connect) or die("Couldn't select database!"); // DO NOT EDIT
// DO NOT EDIT THE ABOVE 2 LINES


$cdub_site = 'http://www.yoursite.com' // ENTER YOUR SITES URL HERE



// FUNCTIONS NEEDED
// ##############################################
// #   cdubz logs functions were created by :   #
// #             Mark-Shamus McCahey            #
// #           mark-hide@address.com          #
// ##############################################
// DO NOT EDIT ANYTHING BELOW EVER!
?>
<?php
function cdub_error($msg) {
?>
<html>
<head>
<script language="JavaScript">
<!--
alert("<?=$msg?>");
history.back(1);
//-->
</script>
</head>
<body>
</body>
</html>
<?php
exit;
}
function cdub_newwindow($link) {
?>
<script language=javascript>
window.navigate("<?=$link?>");
</script>
<?php
}
function cdub_alert($msg) { ?>
<script language="JavaScript">
<!--
alert("<?=$msg?>");
//-->
</script>
<? }
function cdub_alertgo($msg, $navto) { ?>
<script language="JavaScript">
<!--
alert("<?=$msg?>");
window.navigate("<?=$navto?>");
//-->
</script>
<?php
}
?>
Return current item: Cdub's Logs