<?php
/* Fonction limite au travail dans des tableau 1D */
function on_off_table($vars, $table,$prefix,$prefix_cst='') {
	$e=(empty($prefix_cst)) ? constant(strtoupper($vars)) :constant(strtoupper($prefix_cst.$vars))  ;
	if ( ($e =='false')OR($e==false) ) {
		echo $query ='UPDATE '.$table.' SET '.$vars.' =  \'true\'';//  WHERE  '.$prefix.' =  '.$vars;
		echo $g=sql ('',$table,$prefix,$query,'');
		return true;
	}else {
		echo $query ='UPDATE '.$table.' SET '.$vars.' = \'false\'';//.' WHERE  '.$prefix.' =  '.$vars;
		echo $g=sql ('',$table,$prefix,$query,'');
		return true;
	}
	return false;
 }
?>