<?
// +-------------------------------------------------------------+
// | HiveMail™ version 1.3.1
// +-------------------------------------------------------------+
// | HIVEMAIL™ IS NOT FREE SOFTWARE
// | If you have downloaded this software from a website other
// | than Hivemail or if you have otherwise received
// | this software from someone who is not a representative of
// | this organization you are involved in an illegal activity.
// +-------------------------------------------------------------+
// | $RCSfile: functions_install.php,v $ - $Revision: 1.3 $
// | $Date: 2004/08/05 16:49:46 $ - $Author: tubedogg $
// +-------------------------------------------------------------+

error_reporting(E_ALL & ~E_NOTICE);

// ############################################################################
// Checks after each query if it was ok
function report_mysql_error($define = true, $echo = true) {
	global $DB_site;

	if ($DB_site->errno() != 0) {
		echo '<span class="cp_temp_edit"><b>ERROR</b></span>: '.$DB_site->error();
		define('GOTO_NEXT', $define);
	} else {
		if ($echo) {
			echo '<span class="cp_temp_orig"><b>OK!</b></span>';
		}
	}
}

// ############################################################################
// Checks if the values of the $array are all empty
if (!function_exists('array_empty')) {
	function array_empty($array) {
		foreach ($array as $value) {
			if (!empty($value)) {
				return false;
			}
		}
		return true;
	}
}

// ############################################################################
// Checks if the values of the $array are all empty
function install_header($type = 1) {
	global $step, $steps;

	echo '<div align="left" style="padding: 10px;"><b><div align="center"><span style="font-size: 20px;">HiveMail&trade; '.iif($type == 1, 'Installation', 'Version '.HIVEVERSION).'</span><br /><span style="font-size: 15px;">[<a href="#'.iif($type == 1, 'install', 'upgrade').'" target="_blank">Online '.iif($type == 1, 'Installation', 'Upgrade').' Guide]</a></span><br />'.iif(is_numeric($step), "Step $step of ".count($steps).": $steps[$step]", 'Welcome to '.iif($type == 1, 'HiveMail&trade; Nullified v'.HIVEVERSION , 'the HiveMail&trade; Upgrade Script')).'</b></div><br /><br />';
}

?>