- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
DROP PROCEDURE map.notify;
CREATE DEFINER=`root`@`localhost` PROCEDURE `notify`(t tinyint, a int, e tinyint(1), t_id bigint(20),sd DATE,st TIME,t3 DATETIME,f1 tinyint(1),f2 tinyint(1))
BEGIN
declare d1,d2,d3,d4 int;
declare s1,s2,s3 varchar(1024) CHARSET UTF8;
declare s4,s5 varchar(64) CHARSET UTF8;
declare m1,m2,m3,m4,m5,m6 varchar(1024) CHARSET UTF8;
declare t4 DATETIME;
declare l1 varchar(10) CHARSET UTF8;
set t4 = TIMESTAMP(sd,st);
UPDATE `transport` SET `status` = e, `time3` = t4 WHERE actId = a AND actType=t AND device=t_id AND `status` <> e ;
if ((e AND f1) or ((not e) and f2)) and (ROW_COUNT()>0) then
case t
when 0 then
select groupId, notifyType, notifyTo, name, lang from `map`.`tbl_act_zones` where id = a into d1,d2,s1,s2,l1;
select Model, GosNum from `map`.`tr_objects` where id_term= t_id into s4,s5;
select mess1,mess2,mess3 from tbl_act_messages where `type`=0 and `lang`=l1 into m1,m2,m3;
IF e THEN
set s3 = CONCAT(m1, s4,' ', s5 ,m2,'"',s2,'"');
ELSE
set s3 = CONCAT(m1, s4,' ', s5 ,m3,'"',s2,'"');
END IF;
INSERT INTO `actions_log` (groupId,dateEv,timeEv,`type`,act_id,id_term,notifyType,notifyTo,status,`text`,st2,time3)
VALUES (d1,sd,st,0,a,t_id,d2,s1,d2,s3,e,t3);
when 1 then
select groupId, notifyType, notifyTo, name, kod, lang from `map`.`tbl_act_stops` where id = a into d1,d2,s1,m3,m6,l1;
select Model, GosNum, user_comment from `map`.`tr_objects` where id_term= t_id into s4,s5,s2;
select mess1,mess2,mess3,mess4 from tbl_act_messages where `type`=1 and `lang`=l1 into m1,m2,m4,m5;
IF (d1 = 566) or (d1 = 735) or (d1 = 751) or (d1 = 754) or (d1 = 755) THEN
IF e THEN
set s3 = CONCAT(m1,'"',m3,'"',m2, s4,' ', s5, ' (', s2,')');
ELSE
set s3 = CONCAT(m5, s4,' ', s5, ' (', s2 ,')' ,m4,'"',m3,'"');
END IF;
ELSE
IF e THEN
Кусок из отличной процедуры. Всем же должно быть ясно что у нас, например в m2 или е или же.. ну не важно =_=
Konardo 13.02.2014 16:34 # −16
DBdev 13.02.2014 20:09 # +2
Хендмейд обфускация, куле.