$dbase = "product_reviews"; //database for mysql
$host = "localhost"; //host for mysql
$login = "nsmb"; //username for mysql
$password = "balfa"; //password for mysql
$registration = "0"; //set to 1 to require users to register before they post, 0 for no registration. feature not yet implemented.
$image_length = "75"; //width of total image for reviews show
$time_offset = "25200";
?>
$db = @mysql_connect($host,$login,$password) or die("Can't connect to MySQL server!");
@mysql_select_db($dbase,$db) or die("Can't select the right MySQL database.");
function get_template($template){
$sql = @mysql_query("select * from template where title='$template'");
if ($template = @mysql_fetch_array($sql)){
$template=str_replace("\"","\\\"",$template['template']);
return $template;
} else { echo "This template was not found: ".$template; }
}
function query($sql){
$result = @mysql_query($sql);
return $result;
}
function fetch_array($row){
$row = @mysql_fetch_array($row);
return $row;
}
function fetch_row($row){
$row = @mysql_fetch_row($row);
return $row;
}
function select_db($databse){
global $db;
$databse = @mysql_select_db($databse,$db);
if($databse){ return $databse; } else { echo "
Can't select the database";}
}
?>