Location: PHPKode > projects > PHP Mafia RP > phpmafia/func.php
<?php //functions
include ("config.php");

global $confcver,$newver;
$confcver="001";
$newver="001";

function Conect() {
		mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
		mysql_select_db(SQL_DB);
	}

function mtimetn(){  //time stamp oggi
	//data oggi
	$dt=date("j");
	$mt=date("n");
	$yt=date("y");
	//ore oggi
	$timenow=getdate();
	$hn=substr("0" . $timenow["hours"], -2);
	$mih=substr("0" . $timenow["minutes"], -2);
	$sn=substr("0" . $timenow["seconds"], -2);
	$mtimet=mktime($hn,$mih,$sn,$mt,$dt,$yt); //data e ora oggi pronto per le operazioni e per il db!

	return $mtimet;
}
// login e registration in log-reg.php page!
include("log-reg.php");

function mafia_ver() {
	$vvc=mysql_fetch_array( mysql_query("SELECT mafia_ver FROM ".TB_PREFIX."conf") );
	$mafia_ver=$vvc['mafia_ver'];
	
	return $mafia_ver;
}

function logout() {
	session_start();
	$_SESSION['log']="";
	session_destroy();
}
?>
Return current item: PHP Mafia RP