<?php


// To select correct option by default
function get_selected_option($option, $right)
{
	if ($option == $right)
	{
		return "selected";
	}
}

// Test if checkbox selected
function get_mailing_checkbox($checked)
{
	if ($checked == 1)
	{
		return "checked";
	}
}



function get_right_name($right)
{
	if ($right == 1)
		return "Basic";
	else if ($right == 2)
		return "Guest";	
	else if ($right == 3)
		return "";	
	else if ($right == 4)
		return "EpiReg";	
	else if ($right == 5)
		return "Reporter";	
	else if ($right == 6)
		return "Priv Guest";	
	else if ($right == 7)
		return "EPTV";	
	else if ($right == 8)
		return "Root EPTV";
}




function get_date(){ // récupère la date

  $date = "";
  if (strlen($date_court) < 2) {
    $date = $date_court;
  }
  $date .= date("Y/m/d");

  return ($date);
}


function get_filesize($path)
{
   $size = round(filesize($path)/1000000);
   return ($size);
}


function get_time(){ // récupère l'heure

  $time = date("h:i");

  return($time);
}


?>