<?php
/*
  ===============================================================

  inGenio X
  http://ingenio.area421.com

  Created by 
  Julian Moreno Hidalgo (Software developer)
  Jesus Moreno Hidalgo (Communication's tree)

  inGenio X is a free software licensed under CC-GNU GPL

  ===============================================================
*/
	if (!defined("IGNX")) { die("Attempt..."); }

	// <head>
	
	// skin
	$qcomp = myquery("SELECT * FROM ".COMPOSICION." WHERE enabled=1 ORDER BY skinID ASC limit 0, 1","[inc.head]");
	$row_comp = myfetch($qcomp);

	// test
	if (!$row_comp) { die ("ERROR: !enabled"); }

	// update css js
	if (!isset($_SESSION["update_sess_admin"]))
	{
		$tpl_update_css_js = "?update=".mktime(date('H'), date('i'), date('s'), date('m'), date('d'), date('Y')); 
	} else {
		$tpl_update_css_js = "";	
	}
	$_SESSION["update_sess_admin"] = 1;

?>
<link rel="STYLESHEET" href="../skins_admin/<?php echo $row_comp['skin_admin'].$tpl_update_css_js; ?>" type="text/css" media="screen" />
<?php
 // skins css plugins
 	$tpl_archivos_man_css = getfilesdir("../skins_admin/".substr($row_comp['skin_admin'],0,-4)."/css","","(css)");
	for ($m=0; $m<count($tpl_archivos_man_css); $m++)
	{		
		echo '<link rel="STYLESHEET" href="../skins_admin/'.substr($row_comp['skin_admin'],0,-4).'/css/'.basename($tpl_archivos_man_css[$m]).$tpl_update_css_js.'" type="text/css" media="screen" />';	
	}

?>

<script language="javascript" src="rsc/scripts_adms.js" type="text/javascript"></script>
<script type="text/javascript" src="../paqs/jquery/jquery-1.2.6.min.js"></script>
<script type="text/javascript" src="../paqs/jquery/lib/jquery.bgiframe.js"></script>
<script type="text/javascript" src="../paqs/jquery/lib/jquery.dimensions.js"></script>
<script type="text/javascript" src="../paqs/jquery/tooltip/jquery.tooltip.js"></script>
<script type="text/javascript" src="../paqs/jquery/ddaccordion/ddaccordion.js"></script>
<script type="text/javascript">
	$(function() {
		$('a.conex_gral, a.conex_tip').tooltip({
		showURL: false
		});
	});
/***********************************************
* Accordion Content script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/
ddaccordion.init({
	headerclass: "submenuheader",
	contentclass: "submenu",
	revealtype: "click",
	collapseprev: true, 
	defaultexpanded: [],
	onemustopen: false,
	animatedefault: false,
	persiststate: true,
	toggleclass: ["", ""],
	togglehtml: ["suffix", "<img src='../skins_admin/<?php echo substr($row_comp['skin_admin'],0,-4); ?>/imgs/plus.gif' class='statusicon' />", "<img src='../skins_admin/<?php echo substr($row_comp['skin_admin'],0,-4); ?>/imgs/minus.gif' class='statusicon' />"],
	animatespeed: "normal"
});
</script>
