<?php
	require_once("../includes/bootstrap2.php");
	$sesion=new sesion(); // inicio la sesion
	$academia=bootstrap::initBd($sesion->get('anio'));	
	$cons="SELECT cod_sede as codigo,nom_sede as nombre from adm_sedes";

	$academia->instruccion($cons);
	$dtsSedes = $academia->fetchAll();
//	print_r($dtsSedes);
	$datas=array();
	$datas["total"]=8;
	
	$datas["rows"][]=array("name"=>"Sede Principal","value"=>"","group"=>"Configuracion Colegio","editor"=>array(
		"type"=>"combobox",
		"formatter"=>'function(value,row){return row.productname;}',
		"options"=>array(
			"valueField"=>'nombre',
			"textField"=> 'nombre',
			"data"=> $dtsSedes,
			"required"=>true
		),
	));
	$dtsCalen[]=array("codigo"=>'A',"value"=>'A');
	$dtsCalen[]=array("codigo"=>'B',"value"=>'B');
	
	$datas["rows"][]=array("name"=>"Calendario Academico","value"=>"","group"=>"Configuracion Colegio","editor"=>array(
		"type"=>"combobox",
		"options"=>array(
			"valueField"=>'value',
			"textField"=> 'codigo',
			"data"=>$dtsCalen,
			"required"=>true
		),
	));
	$dtsLang['mod_config']['cons_grupo_sede'];
	$dtsLang['mod_config']['cons_grupo_jorn'];
	
	
	$datas["rows"][]=array("name"=>$dtsLang['mod_config']['cod_nom_grupo'],"value"=>'',"group"=>"Configuracion Academica","editor"=>"numberspinner");
	$datas["rows"][]=array("name"=>"Birthday","value"=>"01/02/2012","group"=>"Configuracion Academica","editor"=>"datebox");
	$datas["rows"][]=array("name"=>"SSN","value"=>"123-456-7890","group"=>"Configuracion Academica","editor"=>"text");
	
	$datas["rows"][]=array("name"=>"Agregar o quitar saberes","value"=>"Si","group"=>"Configuracion Modulo Notas","editor"=>array(
		"type"=>"checkbox",
		"options"=>array(
			"on"=>Si,
			"off"=>No
		)
	));
	
	$datas["rows"][]=array("name"=>"Agregar o quitar notas","width"=>'145',"value"=>"Si","group"=>"Configuracion Modulo Notas","editor"=>array(
		"type"=>"checkbox",
		"options"=>array(
			"on"=>Si,
			"off"=>No
		),
	));
	

	
	/*{"total"=>7,"rows"=>[

	{},
	{},
	{},
	{},
	{"name"=>"Email","value"=>"bill@gmail.com","group"=>"Marketing Settings","editor"=>{
		"type"=>"validatebox",
		"options"=>{
			"validType"=>"email"
		}
	}},
	{"name"=>"FrequentBuyer","value"=>"false","group"=>"Marketing Settings","editor"=>{
		"type"=>"checkbox",
		"options"=>{
			"on"=>true,
			"off"=>false
		}
	}}
]}*/
	echo json_encode($datas);
	$academia->cerrar();
?>
