<?php

	define('IN_HUGLO', true);
	require_once('./common.php');
	require_once(ROOT_PATH . 'includes/menu_veille.php');

	$error = array();

	$sql = 'SELECT c2.category_id, c2.category_parent_id, c1.category_name_fr , c2.category_name_fr AS category_s_name_fr, c1.category_name_en , c2.category_name_en AS category_s_name_en, c2.category_bg_img, c2.category_bg_color FROM ' . CATEGORY_TABLE . ' c1 LEFT JOIN ' . CATEGORY_TABLE . ' c2 ON c2.category_parent_id = c1.category_id WHERE c2.category_id = 21';
	$result = mysql_query($sql);
	$category = mysql_fetch_assoc($result);
	mysql_free_result($result);


	if(isset($_POST['submit'])) {
		$user = trim($_POST['login']);
		$pass = trim($_POST['password']);
		
		if(empty($user) or empty($pass)) {
			$error[] = $lang['FIELDS_EMPTY'];
		}
	}


	$template->assign_vars(array(
		'T_JUR_NAME'		=>	$category['category_s_name_' . $l],
		
		'T_ERROR'			=>	(count($error) > 0) ? join('<br />', $error) : false,
		
		//'U_SUBMIT'			=>	BASE_PATH . '/login.php',
		
		
		'T_NAME_PAGE'		=>	$category['category_s_name_' . $l],
		'V_C_NAME'			=>	$category['category_name_' . $l],
		'V_BG'				=>	true,
		'V_BG_IMG'			=>	$category['category_bg_img'],
		'V_BG_COLOR'		=>	$category['category_bg_color'],
		
		'L_LOGIN'			=>	$lang['LOGIN'],
		'L_PASSWORD'		=>	$lang['PASSWORD']
	));

	$template->set_filenames(array('body' => 'view_juridiques.html'));
	$template->display('body');

	$db->sql_close();

?>
