concat inferno

This commit is contained in:
mynah
2018-07-20 05:16:47 -05:00
parent e25fc46010
commit ef16d6f7b5
19 changed files with 518 additions and 423 deletions

View File

@@ -1,14 +1,14 @@
insert into evento
(lugar_id, fecha_inicio, fecha_fin,precio,curso_id,imagen_chica,estado,promocion,promo_estado)
(lugar_id, fecha_inicio, fecha_fin, precio, promocion, promo_estado, curso_id, imagen_chica, estado)
values(
?, # eplace
" ?-?-? ", # yini - mini - dini
" ?-?-? ", # yend - mend - dend
concat(?,"-",?,"-",?), # yini - mini - dini
concat(?,"-",?,"-",?), # yend - mend - dend
?, # cost ,
?, # promo ,
case ? when "on" then 1 else 0 end, # pen
?, # ecourse ,
?, # eimg ,
case ? when "on" then 1 else 0 end, # een
?, # promo ,
case ? when "on" then 1 else 0 end # pen
case ? when "on" then 1 else 0 end # een
);

View File

@@ -7,8 +7,8 @@
?, # pto
?, # pst
?, # pco
?, # lat
?, # lng
?, # plat
?, # plng
case ? when "on" then 1 else 0 end #pen
);

View File

@@ -1,12 +1,12 @@
update evento set
lugar_id = ?, # eplace ,
fecha_inicio='?-?-?', # yini - mini - dini ',
fecha_fin='?-?-?', # yend - mend - dend ',
precio= ?, # cost ,
promocion= ?, # promo ,
lugar_id = ?, # eplace
fecha_inicio = concat(?,"-",?,"-",?), # yini - mini - dini
fecha_fin = concat(?,"-",?,"-",?), # yend - mend - dend
precio = ?, # cost
promocion = ?, # promo
promo_estado = case ? when "on" then 1 else 0 end, #pen
curso_id= ?, # ecourse ,
imagen_chica= ?, # eimg ,
curso_id = ?, # ecourse
imagen_chica = ?, # eimg
estado = case ? when "on" then 1 else 0 end # een
where id = ?; # eprev ;
where id = ?; # eprev

View File

@@ -22,48 +22,48 @@ d3.select("select#eimg").on("change",updateImage);
/*preload form contents for event*/
d3.select("select#eprev").on("change",function(){
var eprev_id=d3.select("select#eprev").node().value;
d3.json( json_path+"ecourse/"+eprev_id ,function(d){
if(d[0] !=undefined) {if(d[0].cid != 0){
dropdownUpdate("ecourse",d[0].cid);
dropdownUpdate("eplace",d[0].pid);
d3.select("input#dini").attr("value",d[0].dini);
dropdownUpdate("mini",d[0].mini);
dropdownUpdate("yini",d[0].yini);
d3.select("input#dend").attr("value",d[0].dend);
dropdownUpdate("mend",d[0].mend);
dropdownUpdate("yend",d[0].yend);
d3.select("input#cost").attr("value",d[0].cost);
d3.select("input#promo").attr("value",d[0].promo);
d3.select("input#pen").attr("checked",d[0].pen);
d3.select("input#een").attr("checked",d[0].een);
dropdownUpdate("eimg",d[0].eimg);
d3.json( json_path+"event/"+eprev_id ,function(d){
if(d !=undefined) {if(d.cid != 0){
dropdownUpdate("ecourse",d.cid);
dropdownUpdate("eplace",d.pid);
d3.select("input#dini").attr("value",d.dini);
dropdownUpdate("mini",d.mini);
dropdownUpdate("yini",d.yini);
d3.select("input#dend").attr("value",d.dend);
dropdownUpdate("mend",d.mend);
dropdownUpdate("yend",d.yend);
d3.select("input#cost").attr("value",d.cost);
d3.select("input#promo").attr("value",d.promo);
d3.select("input#pen").attr("checked",d.pen);
d3.select("input#een").attr("checked",d.een);
dropdownUpdate("eimg",d.eimg);
updateImage();
}} }); });
/*preload form content for course*/
d3.select("select#cprev").on("change",function(){
var cprev_id=d3.select("select#cprev").node().value;
d3.json(json_path+"qcourse/"+cprev_id ,function(d){
if(d[0]!=undefined){if(d[0].cid != 0){
d3.select("input#cname").attr("value",d[0].cname);
d3.select("textarea#csubjects").text(d[0].csubjects);
d3.select("textarea#cservices").text(d[0].cservices);
d3.json(json_path+"course/"+cprev_id ,function(d){
if(d!=undefined){if(d.cid != 0){
d3.select("input#cname").attr("value",d.cname);
d3.select("textarea#csubjects").text(d.csubjects);
d3.select("textarea#cservices").text(d.cservices);
}} }); });
/*preload form content for place*/
d3.select("select#pprev").on("change",function(){
var pprev_id=d3.select("select#pprev").node().value;
d3.json(json_path+"qplace/"+pprev_id ,function(d){
if(d[0]!=undefined){if(d[0].pid != 0){
d3.select("input#pname").attr("value",d[0].pname);
d3.select("input#paddr").attr("value",d[0].paddr);
d3.select("input#pobs").attr("value",d[0].pobs);
d3.select("input#pto").attr("value",d[0].pto);
d3.select("input#pst").attr("value",d[0].pst);
d3.select("input#pco").attr("value",d[0].pco);
d3.select("input#plat").attr("value",d[0].plat);
d3.select("input#plng").attr("value",d[0].plng);
d3.select("input#pen").attr("checked",d[0].pen);
d3.json(json_path+"place/"+pprev_id ,function(d){
if(d!=undefined){if(d.pid != 0){
d3.select("input#pname").attr("value",d.pname);
d3.select("input#paddr").attr("value",d.paddr);
d3.select("input#pobs").attr("value",d.pobs);
d3.select("input#pto").attr("value",d.pto);
d3.select("input#pst").attr("value",d.pst);
d3.select("input#pco").attr("value",d.pco);
d3.select("input#plat").attr("value",d.plat);
d3.select("input#plng").attr("value",d.plng);
d3.select("input#pen").attr("checked",d.pen);
}} }); });
/*support "selected" option on other drop down*/

View File

@@ -1,11 +0,0 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_user */
/* c#password #dbdata_pass */
select
nombre as "tag",
contenido as "admContent"
from casa where 1=1;

View File

@@ -1,11 +1,11 @@
d3.select("select#sentry").on("change",function(){
var msg_id=d3.select("select#sentry").node().value;
d3.json("/admin/json/mensajes/"+msg_id ,function(d){
if(d[0] !=undefined) {if(d[0] != 0){
d3.select("p#fecha").text(d[0].imdate);
d3.select("p#correo").text(d[0].imail);
d3.select("p#nombre").text(d[0].imname);
d3.select("p#mensaje").text(d[0].immsg);
d3.json("/admin/json/mensaje/"+msg_id ,function(d){
if(d !=undefined) {if(d != 0){
d3.select("p#fecha").text(d.imdate);
d3.select("p#correo").text(d.imail);
d3.select("p#nombre").text(d.imname);
d3.select("p#mensaje").text(d.immsg);
}}});
});

View File

@@ -1,4 +1,3 @@
select distinct
replace(grupo,' ','_' ) as "group",
grupo as "name"

View File

@@ -1,13 +1,4 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_user */
/* c#password #dbdata_pass */
select
"table" as "tag",
nombre as "name",
vinculo as "link",
orden as "order",