-
Notifications
You must be signed in to change notification settings - Fork 0
/
SvFunctions.php
2043 lines (1902 loc) · 92.8 KB
/
SvFunctions.php
1
2
3
4
5
6
7
8
9
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?
session_start();?>
<html>
<head>
<META content="text/html; charset=windows-1251" http-equiv=Content-Type />
<SCRIPT LANGUAGE="JavaScript">
function Search_Text(ID_Data, ID_Docum, TextDoc, Target) {
SearchText = window.open("../SearchText_View.php?ID_Data=" + ID_Data + "&ID_Docum=" + ID_Docum + "&TextDoc=" + TextDoc, Target, "toolbar=no,location=no,directoties=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + (screen.width-10) + ",height=" + (screen.height-55) + ",left=0,top=0");
}
function OpenHREF(S_DELO,TIPDELA,VIDDELA,ID_DELO,TIP_DOCUM){
var WND=window.open("Kartochka.php"+"?ID="+S_DELO+"&TIP_DELA="+TIPDELA+"&VID_DELA="+VIDDELA+"&TIP_DOCUM="+TIP_DOCUM+"&ID_DELO="+ID_DELO, "KART", "toolbar=no,location=no,directoties=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=400,left=400,top=200");
WND.focus();
}
function Search_ConnectDocum(ID_DocSr, ID_Docum, nTypeDocum, UniqNum) {
if (nTypeDocum == 1) {
SearchConnectDocum = window.open("../l_form_edit.php?0.2.." + ID_Docum + ".", "_blank", "toolbar=no,location=no,directoties=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + (screen.width-10) + ",height=" + (screen.height-55) + ",left=0,top=0");
}
else {
SearchConnectDocum = window.open("../sp_view_jour.php?id=" + ID_DocSr, "_blank", "toolbar=no,location=no,directoties=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + (screen.width-10) + ",height=" + (screen.height-55) + ",left=0,top=0");
}
}
function close_button() {
document.getElementById('pbSave').style.display='none';
}
</SCRIPT>
</head>
<?
include('../common.func');
function sv_VERDICT_BY_BSR($VERDICT_ID_AGORA, $VERDICT_ID_AGORA2, &$DOC_TYPE){
$VNCODE=0;
/*Àäìèíèñòðàòèâêà 1-îé èíñòàíöèè*/
if ($VERDICT_ID_AGORA==70090002){ return $VNCODE=103;}
else if ($VERDICT_ID_AGORA==70090003){ $DOC_TYPE="Ïîñòàíîâëåíèå"; return $VNCODE=104;}
else if ($VERDICT_ID_AGORA==70090004){ $DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=105;}
else if ($VERDICT_ID_AGORA==70090005){ return $VNCODE=106;}
else if ($VERDICT_ID_AGORA==70090006){ $DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=107;}
else if ($VERDICT_ID_AGORA==70090000 or $VERDICT_ID_AGORA==40030000){$DOC_TYPE="Ïîñòàíîâëåíèå"; return $VNCODE=101; }
else if ($VERDICT_ID_AGORA==70090001 or $VERDICT_ID_AGORA==40030001){ $DOC_TYPE="Ïîñòàíîâëåíèå"; return $VNCODE=102;}
else if ($VERDICT_ID_AGORA==40030002){$DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=105; }
else if ($VERDICT_ID_AGORA==40030003){ $DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=107;}
else if ($VERDICT_ID_AGORA==40030004){ $DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=104;}
/*Àäìèíèñòðàòèâêà 1-ûé ïåðåñìîòð, 2-îé ïåðåñìîòð, íàäçîð*/
if ($VERDICT_ID_AGORA==70100000 or $VERDICT_ID_AGORA==70030002 or $VERDICT_ID_AGORA==70050002){ $DOC_TYPE="Ðåøåíèå"; return $VNCODE=201;}
else if ($VERDICT_ID_AGORA==70200000 ){return $VNCODE=201;}
else if ($VERDICT_ID_AGORA==70100001 or $VERDICT_ID_AGORA==70030003 or $VERDICT_ID_AGORA==70050003){$DOC_TYPE="Ðåøåíèå"; return $VNCODE=202;}
else if ($VERDICT_ID_AGORA==70100002 or $VERDICT_ID_AGORA==70030004 or $VERDICT_ID_AGORA==70050004){$DOC_TYPE="Ðåøåíèå"; return $VNCODE=203;}
else if ($VERDICT_ID_AGORA==70100003 or $VERDICT_ID_AGORA==70030005 or $VERDICT_ID_AGORA==70050005){$DOC_TYPE="Ðåøåíèå"; return $VNCODE=204;}
else if ($VERDICT_ID_AGORA==70100004 or $VERDICT_ID_AGORA==70030006 or $VERDICT_ID_AGORA==70050006){ return $VNCODE=205;}
else if ($VERDICT_ID_AGORA==70200008 and $VERDICT_ID_AGORA2==70100000){$DOC_TYPE="Ðåøåíèå"; return $VNCODE=201;}
else if ($VERDICT_ID_AGORA==70200008 and $VERDICT_ID_AGORA2==70200000){ $DOC_TYPE="Ðåøåíèå"; return $VNCODE=201;}
else if ($VERDICT_ID_AGORA==70200008 and $VERDICT_ID_AGORA2==70100002){ $DOC_TYPE="Ðåøåíèå"; return $VNCODE=203;}
else if ($VERDICT_ID_AGORA==331010001){return $VNCODE=201;}
else if ($VERDICT_ID_AGORA==331010005 or $VERDICT_ID_AGORA==331010007 or $VERDICT_ID_AGORA==331010009 or $VERDICT_ID_AGORA==70005){return $VNCODE=202;}
else if ($VERDICT_ID_AGORA==331010002 or $VERDICT_ID_AGORA==70007){return $VNCODE=203;}
else if ($VERDICT_ID_AGORA==331010003 or $VERDICT_ID_AGORA==70006){return $VNCODE=204;}
else if ($VERDICT_ID_AGORA==331010004){return $VNCODE=205;}
/*Óãîëîâêà 1-àÿ èíñòàíöèÿ*/
if ($VERDICT_ID_AGORA==51230000){$DOC_TYPE="Ïðèãîâîð"; return $VNCODE=101;}
else if ($VERDICT_ID_AGORA==51230001){$DOC_TYPE="Ïðèãîâîð"; return $VNCODE=102;}
else if ($VERDICT_ID_AGORA==51230004){$DOC_TYPE="Ïîñòàíîâëåíèå"; return $VNCODE=117;}
else if ($VERDICT_ID_AGORA==51230004 and $VERDICT_ID_AGORA2==51240000){ return $VNCODE=105;}
else if ($VERDICT_ID_AGORA==51230004 and $VERDICT_ID_AGORA2==51240001){ return $VNCODE=105;}
else if ($VERDICT_ID_AGORA==51230004 and $VERDICT_ID_AGORA2==51240002){ return $VNCODE=114;}
else if ($VERDICT_ID_AGORA==51230004 and $VERDICT_ID_AGORA2==51240003){ return $VNCODE=115;}
else if ($VERDICT_ID_AGORA==51230004 and $VERDICT_ID_AGORA2==51240004){ return $VNCODE=111;}
else if ($VERDICT_ID_AGORA==51230004 and $VERDICT_ID_AGORA2==51240006){ return $VNCODE=110;}
else if ($VERDICT_ID_AGORA==51230004 and $VERDICT_ID_AGORA2==51240008){ return $VNCODE=106;}
else if ($VERDICT_ID_AGORA==51230004 and $VERDICT_ID_AGORA2==51240009){ return $VNCODE=108;}
else if ($VERDICT_ID_AGORA==51230004 and $VERDICT_ID_AGORA2==51240011){ return $VNCODE=116;}
else if ($VERDICT_ID_AGORA==51230004 and $VERDICT_ID_AGORA2==51240015){ return $VNCODE=109;}
else if ($VERDICT_ID_AGORA==51230004 and $VERDICT_ID_AGORA2==51240017){ return $VNCODE=110;}
else if ($VERDICT_ID_AGORA==51230004 and $VERDICT_ID_AGORA2==51240019){ return $VNCODE=112;}
else if ($VERDICT_ID_AGORA==51230004 and $VERDICT_ID_AGORA2==51240020){ return $VNCODE=107;}
else if ($VERDICT_ID_AGORA==51230004 and $VERDICT_ID_AGORA2==51240021){ return $VNCODE=113;}
else if ($VERDICT_ID_AGORA==51230004 and $VERDICT_ID_AGORA2==51240022){ return $VNCODE=109;}
else if ($VERDICT_ID_AGORA==51230005){ return $VNCODE=103;}
/*Óãîëîâêà àïåëëÿöèîííàÿ èíñòàíöèÿ*/
else if ($VERDICT_ID_AGORA==51220000){return $VNCODE=401;}
else if ($VERDICT_ID_AGORA==51220001){return $VNCODE=402;}
else if ($VERDICT_ID_AGORA==51220011){return $VNCODE=403;}
else if ($VERDICT_ID_AGORA==51220012){return $VNCODE=404;}
else if ($VERDICT_ID_AGORA==51220014){return $VNCODE=405;}
else if ($VERDICT_ID_AGORA==51220013){return $VNCODE=406;}
else if ($VERDICT_ID_AGORA==51220015){return $VNCODE=407;}
else if ($VERDICT_ID_AGORA==51220016){return $VNCODE=408;}
else if ($VERDICT_ID_AGORA==51220017){return $VNCODE=409;}
else if ($VERDICT_ID_AGORA==51220003){return $VNCODE=410;}
else if ($VERDICT_ID_AGORA==51220018){return $VNCODE=410;}
else if ($VERDICT_ID_AGORA==51220019){return $VNCODE=411;}
else if ($VERDICT_ID_AGORA==51220004){return $VNCODE=411;}
else if ($VERDICT_ID_AGORA==51220100){return $VNCODE=413;}
else if ($VERDICT_ID_AGORA==51220100 and $VERDICT_ID_AGORA2==51240003){return $VNCODE=415;}
/*Óãîëîâêà Êàññàöèÿ*/
else if ($VERDICT_ID_AGORA==50170000){$DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=201;}
else if ($VERDICT_ID_AGORA==50170001 and $VERDICT_ID_AGORA2==50170002){ $DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=202;}
else if ($VERDICT_ID_AGORA==50170001 and $VERDICT_ID_AGORA2==50170003){ $DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=205;}
else if ($VERDICT_ID_AGORA==50170001 and $VERDICT_ID_AGORA2==50170011){ $DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=204;}
else if ($VERDICT_ID_AGORA==50170012 and $VERDICT_ID_AGORA2==50170015){ $DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=209;}
else if ($VERDICT_ID_AGORA==50170012 and $VERDICT_ID_AGORA2==50170016){ $DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=209;}
else if ($VERDICT_ID_AGORA==50170012 and $VERDICT_ID_AGORA2==50170018){ $DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=209;}
else if ($VERDICT_ID_AGORA==50170012 and $VERDICT_ID_AGORA2==50170013){ $DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=208;}
else if ($VERDICT_ID_AGORA==50170012 and $VERDICT_ID_AGORA2==50170014){ $DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=207;}
else if ($VERDICT_ID_AGORA==50170012 and $VERDICT_ID_AGORA2==50170025){ $DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=206;}
else if ($VERDICT_ID_AGORA==50170033){ $DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=212;}
/*Óãîëîâêà Íàäçîð*/
else if ($VERDICT_ID_AGORA==11070001 and $VERDICT_ID_AGORA2==11080001){ return $VNCODE=302;}
else if ($VERDICT_ID_AGORA==11070001 and $VERDICT_ID_AGORA2==11080002){ return $VNCODE=303;}
else if ($VERDICT_ID_AGORA==11070001 and $VERDICT_ID_AGORA2==11080003){ return $VNCODE=304;}
else if ($VERDICT_ID_AGORA==11070001 and $VERDICT_ID_AGORA2==11080004){ return $VNCODE=305;}
else if ($VERDICT_ID_AGORA==11070002 and $VERDICT_ID_AGORA2==11080011){ return $VNCODE=308;}
else if ($VERDICT_ID_AGORA==11070002 and $VERDICT_ID_AGORA2==11080012){ return $VNCODE=309;}
else if ($VERDICT_ID_AGORA==11070002 and $VERDICT_ID_AGORA2==11080010){ return $VNCODE=307;}
else if ($VERDICT_ID_AGORA==11070003 and $VERDICT_ID_AGORA2==11080020){ return $VNCODE=310;}
else if ($VERDICT_ID_AGORA==11070003 and $VERDICT_ID_AGORA2==11080021){ return $VNCODE=311;}
else if ($VERDICT_ID_AGORA==11070004 and $VERDICT_ID_AGORA2==11080030){ return $VNCODE=312;}
else if ($VERDICT_ID_AGORA==11070004 and $VERDICT_ID_AGORA2==11080031){ return $VNCODE=313;}
else if ($VERDICT_ID_AGORA==11070005 and $VERDICT_ID_AGORA2==11080040){ return $VNCODE=314;}
else if ($VERDICT_ID_AGORA==11070005 and $VERDICT_ID_AGORA2==11080041){ return $VNCODE=315;}
else if ($VERDICT_ID_AGORA==11070006){ return $VNCODE=317;}
else if ($VERDICT_ID_AGORA==11070006 and $VERDICT_ID_AGORA2==11080050){ return $VNCODE=320;}
else if ($VERDICT_ID_AGORA==11070006 and $VERDICT_ID_AGORA2==11080051){ return $VNCODE=321;}
else if ($VERDICT_ID_AGORA==11070007 and $VERDICT_ID_AGORA2==11080001){ return $VNCODE=302;}
/*Ãðàæäàíêà 1-àÿ èíñòàíöèÿ*/
else if ($VERDICT_ID_AGORA==50640000){ return $VNCODE=101;}
else if ($VERDICT_ID_AGORA==50640001){ return $VNCODE=101;}
else if ($VERDICT_ID_AGORA==50640005 or $VERDICT_ID_AGORA==50640002){ return $VNCODE=102;}
else if ($VERDICT_ID_AGORA==50640007){ return $VNCODE=104;}
else if ($VERDICT_ID_AGORA==50640112 or $VERDICT_ID_AGORA==50640004){ return $VNCODE=105;}
else if ($VERDICT_ID_AGORA==50640003 or $VERDICT_ID_AGORA==50640113){$DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=103;}
else if ($VERDICT_ID_AGORA==50640100){ return $VNCODE=401;}
else if ($VERDICT_ID_AGORA==50640101){ return $VNCODE=402;}
else if ($VERDICT_ID_AGORA==50640102){ return $VNCODE=402;}
else if ($VERDICT_ID_AGORA==50640103){ return $VNCODE=203;}
else if ($VERDICT_ID_AGORA==50640104){ return $VNCODE=206;}
else if ($VERDICT_ID_AGORA==50640105){ return $VNCODE=204;}
else if ($VERDICT_ID_AGORA==50640106){ return $VNCODE=404;}
else if ($VERDICT_ID_AGORA==50640107){ return $VNCODE=205;}
else if ($VERDICT_ID_AGORA==50640200){ return $VNCODE=408;}
else if ($VERDICT_ID_AGORA==11020002){ return $VNCODE=102;}
else if ($VERDICT_ID_AGORA==11020003){ return $VNCODE=103;}
/*Ãðàæäàíêà àïåëëÿöèÿ*/
else if ($VERDICT_ID_AGORA==50640100){$DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=401;}
else if ($VERDICT_ID_AGORA==50640104){$DOC_TYPE="Ðåøåíèå"; return $VNCODE=407;}
else if ($VERDICT_ID_AGORA==50640103 or $VERDICT_ID_AGORA==50640111){$DOC_TYPE="Îïðåäåëåíèå"; return $VNCODE=403;}
else if ($VERDICT_ID_AGORA==50640105 or $VERDICT_ID_AGORA==50640106){return $VNCODE=404;}
else if ($VERDICT_ID_AGORA==50640107 or $VERDICT_ID_AGORA==50640108){return $VNCODE=405;}
/*Ãðàæäàíêà êàññàöèÿ*/
else if ($VERDICT_ID_AGORA==50440000){ return $VNCODE=201;}
else if ($VERDICT_ID_AGORA==50440001){ return $VNCODE=202;}
else if ($VERDICT_ID_AGORA==50440002){ return $VNCODE=202;}
else if ($VERDICT_ID_AGORA==50440003){ return $VNCODE=204;}
else if ($VERDICT_ID_AGORA==50440004){ return $VNCODE=204;}
else if ($VERDICT_ID_AGORA==50440005){ return $VNCODE=205;}
else if ($VERDICT_ID_AGORA==50440006){ return $VNCODE=205;}
else if ($VERDICT_ID_AGORA==50440007){ return $VNCODE=206;}
else if ($VERDICT_ID_AGORA==50440020){ return $VNCODE=206;}
else if ($VERDICT_ID_AGORA==50440008){ return $VNCODE=203;}
else if ($VERDICT_ID_AGORA==50440021){ return $VNCODE=203;}
else if ($VERDICT_ID_AGORA==50440009){ return $VNCODE=202;}
else if ($VERDICT_ID_AGORA==50440010){ return $VNCODE=207;}
else if ($VERDICT_ID_AGORA==50440011){ return $VNCODE=207;}
else if ($VERDICT_ID_AGORA==50440012){ return $VNCODE=204;}
/*Ãðàæäàíêà íàäçîð*/
else if ($VERDICT_ID_AGORA==11020001){ return $VNCODE=302;}
else if ($VERDICT_ID_AGORA==11020002){ return $VNCODE=304;}
else if ($VERDICT_ID_AGORA==11020003){ return $VNCODE=303;}
else if ($VERDICT_ID_AGORA==11020004){ return $VNCODE=305;}
else if ($VERDICT_ID_AGORA==11020006){ return $VNCODE=309;}
else if ($VERDICT_ID_AGORA==11020007){ return $VNCODE=308;}
else if ($VERDICT_ID_AGORA==11020008){ return $VNCODE=310;}
else if ($VERDICT_ID_AGORA==11020010){ return $VNCODE=312;}
else if ($VERDICT_ID_AGORA==11020090){ return $VNCODE=304;}
else if ($VERDICT_ID_AGORA==11020091){ return $VNCODE=313;}
else if ($VERDICT_ID_AGORA==11020100){ return $VNCODE=301;}
else {return $VNCODE=-1;}
}
function GetNameByCod($dbcnx,$nCod){
if ($nCod<>""){
$stmt1 = JosPrepareAndExecute($dbcnx,'SELECT USERNAME FROM GroupContent@IBASEDATA where GROUPcontentid='.$nCod);
ocifetch($stmt1);
if (ociresult($stmt1,"USERNAME")<>""){
//oci_free_statement($stmt1);
return ociresult($stmt1,"USERNAME");
}
else {
$stmt1 = JosPrepareAndExecute($dbcnx,"select NAME from CatalogContent@IBASEDATA where contentid=".$nCod);
ocifetch($stmt1);
//oci_free_statement($stmt1);
return ociresult($stmt1,"NAME");
}
}
}
function svFindParamMater($dbcnx,&$Date_Validite,$value,&$TypeID,&$NUMDELA,&$VERDICTDELA,&$DELOVERDICT,&$STATYA,&$FIO,&$status){
$r=0;
$Date_Validite='';
while ($r<15){
$FIO[$r]="";
$status[$r]="";
$r=$r+1;
}
$stmt = JosPrepareAndExecute($dbcnx,"SELECT M_TYPE,TO_CHAR(VALIDITY_DATE,'dd.MM.yyyy') as VALIDITY_DATE,JUDICIAL_POSITION_ID,NAME,DEPTOR,DEPOSITOR,M_SUB_TYPE,CLERK_ID,DECLARANT,
BAILIFF,ID,FULL_NUMBER,TO_CHAR(VERDICT_DATE,'dd.MM.yyyy') as VERDICT_DATE,VERDICT_ID,JUDGE_ID,null as CASE_NUMBER_I FROM M_CASE@ibasedata I WHERE I.ID=".$value);
ocifetch($stmt);
$DELOTYPE=ociresult($stmt,"M_TYPE");//âèä ìàòåðèàëà
if (ociresult($stmt,"VALIDITY_DATE") == ''){}
else{$Date_Validite = date('d.m.Y',strtotime(ociresult($stmt,"VALIDITY_DATE")));}
$stmt1 = JosImmidiate($dbcnx, "SELECT IDITEM FROM dic WHERE DATE_RETRO IS null and numdic=7312 AND vncode='04'");
$TypeID = ociresult($stmt1,"IDITEM");
oci_free_statement($stmt1);
$NUMDELA=ociresult($stmt,"FULL_NUMBER");//íîìåð äåëà
$VERDICTDELA=ociresult($stmt,"VERDICT_ID");//ðåçóëüòàò ðàññìîòðåíèÿ äåëà
$DELOVERDICT=DATE('d.m.Y',strtotime(ociresult($stmt,"VERDICT_DATE")));//äàòà âûíåñåíèÿ ïîñòàíîâëåíèÿ
$STATYA=ociresult($stmt,"M_SUB_TYPE");
$i=0;
if (ociresult($stmt,"JUDGE_ID")<>""){
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"JUDGE_ID"));
$status[$i]='Ñóäüÿ';
$i=$i+1;
}
if (ociresult($stmt,"DECLARANT")<>""){
$FIO[$i]=ociresult($stmt,"DECLARANT");
$status[$i]='Ëèöî, çàÿâèâøåå õîäàòàéñòâî';
$i=$i+1;
}
if (ociresult($stmt,"NAME")<>""){
$FIO[$i]=ociresult($stmt,"NAME");
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt,"JUDICIAL_POSITION_ID"));
if ($status[$i]=='') {$status[$i]='Îñóæäåííûé';}
$i=$i+1;
}
}
function svFindParamUgol($dbcnx,&$Date_Validite,$TIP_DELA,$AgoraID,&$NUM_DOC,&$DATE_DOC,&$Stage,&$RESULT_AGORA,&$RESULT_AGORA2,&$KSA_SUD,&$TypeID,&$FIO,&$status,&$statya,&$NumDocFirst,&$STATYA_ALL,&$UID){
$r=0;
while ($r<15){
$FIO[$r]="";
$status[$r]="";
$r=$r+1;
}
$Date_Validite='';
$stmt = OCIParse($dbcnx, "select ZAVNUMKSA from PARAM_NASTR");
ociexecute($stmt, OCI_DEFAULT);
while(ocifetch($stmt)){
$ZAVNUMK = ociresult($stmt,'ZAVNUMKSA');
$ZAVNUMK = substr ($ZAVNUMK,2,2);
}
$RESULT_AGORA=0;
$RESULT_AGORA2=0;
//$TypeID=731201;
$stmt = JosImmidiate($dbcnx, "SELECT IDITEM FROM dic WHERE DATE_RETRO IS null and numdic=7312 AND vncode='01'");
$TypeID = ociresult($stmt,"IDITEM");
oci_free_statement($stmt);
$i=0;
if ($TIP_DELA=='115'){
$Stage="Íàäçîð";
if ($_SESSION["SXEMA"]==1){
$STR_SELECT_UGOL="SELECT FULL_NUMBER,(select t.VERDICT_ID from U33_COMPLAINT@IBASEDATA t where t.PROC_ID = I.ID and t.ENTRY_DATE=I.LAST_UPDATED) as GALOBA_VERDICT,
(select TO_CHAR(t.VERDICT_DATE,'dd.MM.yyyy') from U33_COMPLAINT@IBASEDATA t where t.PROC_ID = I.ID and t.ENTRY_DATE=I.LAST_UPDATED)
as GALOBA_DATA,VERDICT_BY_PROTEST as VERDICT_ID,TO_CHAR(PROTEST_VERDICT_DATE,'dd.MM.yyyy') as VERDICT_DATE,null as CASE_NUMBER_I,
null as CERTIORARI_JUDGE_ID,COURT_I_JUDGE_ID as JUDGE_I,PRESIDING_JUDGE as SPEAKER,null as VALIDITY_DATE,
CASS_SPEAKER_ID as SPEAKER_II,PRESIDING_JUDGE_III as PRESIDING_JUDGE,null as CASE_NUMBER_I,
CASS_PRESIDING_ID as PRESIDING_JUDGE_II,null as JUDGE_PEACE,null as THIRD_JUDGE_ID2,null as THIRD_JUDGE_ID,
null as JUDGE_PEACE FROM U33_PROCEEDING@IBASEDATA I where I.ID=".$AgoraID;
$STRSELECT='select NAME,LAW_ARTICLE,VERDICT_I_1 as VERDICT_1,VERDICT_I_2 as VERDICT_2 from U33_PARTS@IBASEDATA where PROC_ID='.$AgoraID;
}
else {
$STRSELECT='SELECT NAME,LOW_ARTICLE as LAW_ARTICLE,VERDICT_I_1 as VERDICT_1,VERDICT_I_2 as VERDICT_2 FROM U3_CASE_DEFENDANT@IBASEDATA where CASE_ID='.$AgoraID;
$STR_SELECT_UGOL="select PROTEST_FULL_NUMBER as FULL_NUMBER, TO_CHAR(PROTEST_VERDICT_DATE,'dd.MM.yyyy') as VERDICT_DATE,null as VALIDITY_DATE,
VERDICT_BY_PROTEST as VERDICT_ID,CASE_NUMBER_I,CERTIORARI_JUDGE_ID,JUDGE_I,PRESIDING_JUDGE as SPEAKER,
PRESIDING_JUDGE_II,PRESIDING_JUDGE_III as PRESIDING_JUDGE,SPEAKER_II,THIRD_JUDGE_ID,THIRD_JUDGE_ID2,JUDGE_PEACE
from U3_CASE@IBASEDATA where id=".$AgoraID;}
}
else if (($TIP_DELA==114 and ($ZAVNUMK<>'OS' and $ZAVNUMK<>'OV' and $ZAVNUMK<>'KJ' and $ZAVNUMK<>'AJ' and $ZAVNUMK<>'KV' and $ZAVNUMK<>'AV')) or
($TIP_DELA==112 and ($ZAVNUMK=='OS' or $ZAVNUMK=='OV' or $ZAVNUMK=='KJ' or $ZAVNUMK=='AJ' or $ZAVNUMK=='KV' or $ZAVNUMK=='AV'))) {
if ($TIP_DELA==114) {
$Stage="Êàññàöèÿ";
} else {
$Stage="Àïåëëÿöèÿ";
}
$STR_SELECT_UGOL="select FULL_NUMBER,VERDICT_II_ID as VERDICT_ID, TO_CHAR(VERDICT_II_DATE,'dd.MM.yyyy') as VERDICT_DATE,
INCOMMING_I_NUMBER as CASE_NUMBER_I,ACCUSER,JUDGE_I,CLERK,JUDGE_PEACE_ID as JUDGE_PEACE,PRESIDING_APP_JUDGE,PRESIDING_JUDGE,SPEAKER,null as VALIDITY_DATE,
THIRD_JUDGE_ID,THIRD_JUDGE_ID2 from U2_CASE@IBASEDATA where id=".$AgoraID;
$STRSELECT='SELECT NAME,LOW_ARTICLE_I as LAW_ARTICLE,VERDICT_II_ID as VERDICT_1,VERDICT_II_ID2 as VERDICT_2 FROM U2_DEFENDANT@IBASEDATA where CASE_ID='.$AgoraID;
}
else if ($TIP_DELA==114 and ($ZAVNUMK=='OS' or $ZAVNUMK=='OV' or $ZAVNUMK=='KJ' or $ZAVNUMK=='AJ' or $ZAVNUMK=='KV' or $ZAVNUMK=='AV')){
$Stage="Êàññàöèÿ";
$STR_SELECT_UGOL="SELECT FULL_NUMBER,(select t.VERDICT_ID from U33_COMPLAINT@IBASEDATA t where t.PROC_ID = I.ID and t.ENTRY_DATE=I.LAST_UPDATED) as GALOBA_VERDICT,
(select TO_CHAR(t.VERDICT_DATE,'dd.MM.yyyy') from U33_COMPLAINT@IBASEDATA t where t.PROC_ID = I.ID and t.ENTRY_DATE=I.LAST_UPDATED)
as GALOBA_DATA,VERDICT_BY_PROTEST as VERDICT_ID,TO_CHAR(PROTEST_VERDICT_DATE,'dd.MM.yyyy') as VERDICT_DATE,null as CASE_NUMBER_I,
null as CERTIORARI_JUDGE_ID,COURT_I_JUDGE_ID as JUDGE_I,PRESIDING_JUDGE as SPEAKER,null as VALIDITY_DATE,
CASS_SPEAKER_ID as SPEAKER_II,PRESIDING_JUDGE_III as PRESIDING_JUDGE,null as CASE_NUMBER_I,
CASS_PRESIDING_ID as PRESIDING_JUDGE_II,null as JUDGE_PEACE,null as THIRD_JUDGE_ID2,null as THIRD_JUDGE_ID,
null as JUDGE_PEACE FROM U33_PROCEEDING@IBASEDATA I where I.ID=".$AgoraID;
$STRSELECT='select NAME,LAW_ARTICLE,VERDICT_I_1 as VERDICT_1,VERDICT_I_2 as VERDICT_2 from U33_PARTS@IBASEDATA where PROC_ID='.$AgoraID;
}
else if (($TIP_DELA==112 and $ZAVNUMK<>'OS' and $ZAVNUMK<>'OV' and $ZAVNUMK<>'KJ' and $ZAVNUMK<>'AJ' and $ZAVNUMK<>'KV' and $ZAVNUMK<>'AV') or ($TIP_DELA==113)){
if ($TIP_DELA==112) {
$Stage="Àïåëëÿöèÿ";
}
else {
$Stage="Ïåðâàÿ èíñòàíöèÿ";
}
$STRSELECT='SELECT NAME,VERDICT_LAW_ART as LAW_ARTICLE,VERDICT_ID as VERDICT_1,VERDICT_ID2 as VERDICT_2 FROM U1_DEFENDANT@IBASEDATA where CASE_ID='.$AgoraID;
$STR_SELECT_UGOL="select FULL_NUMBER, JUDICIAL_UID, TO_CHAR(VERDICT_DATE,'dd.MM.yyyy') as VERDICT_DATE,VERDICT_ID,CASE_TYPE_ID,A_CASE_NUMBER_I as CASE_NUMBER_I,null as SPEAKER, null as PRESIDING_JUDGE,
ADJUTANT_ID,A_JUDGE_I_ID as JUDGE_PEACE,A_RET_JUDGE_ID,CLERK_ID,JUDGE_ID, TO_CHAR(VALIDITY_DATE,'dd.MM.yyyy') as VALIDITY_DATE
from U1_CASE@IBASEDATA where id=".$AgoraID;
}
$stmt1 = JosPrepareAndexecute($dbcnx,$STRSELECT);
while(ocifetch($stmt1)){
if (ociresult($stmt1,"NAME") <> ""){
$FIO[$i]=ociresult($stmt1,"NAME");
if ($TIP_DELA=='115'){$status[$i]='Îñóæäåííûé';}
else {$status[$i]='Ïîäñóäèìûé';}
$statya[$i]=ociresult($stmt1,"VERDICT_1").'.'.ociresult($stmt1,"VERDICT_2");
$i=$i+1;
}
$STATYA_ALL=ociresult($stmt1,"LAW_ARTICLE");
$RESULT_AGORA=ociresult($stmt1,"VERDICT_1");
$RESULT_AGORA2=ociresult($stmt1,"VERDICT_2");
}
oci_free_statement($stmt1);
$stmt=JosPrepareAndExecute($dbcnx,$STR_SELECT_UGOL);
ocifetch($stmt);
$NUM_DOC = ociresult($stmt,"FULL_NUMBER"); // íîìåð äåëà
$UID = ociresult($stmt,"JUDICIAL_UID"); // íîìåð ÓÈÄ
if (preg_match("/[A-Z]/", ociresult($stmt,"VERDICT_DATE"))==0){ $DATE_DOC=ociresult($stmt,"VERDICT_DATE");}
else {$DATE_DOC=date('d.m.Y',strtotime(ociresult($stmt,"VERDICT_DATE"))); }
if ($DATE_DOC == '' and (($TIP_DELA=='115' and $_SESSION["SXEMA"]==1) or ($ZAVNUMK=='OS' or $ZAVNUMK=='OV' or $ZAVNUMK=='KJ' or $ZAVNUMK=='AJ' or $ZAVNUMK=='KV' or $ZAVNUMK=='AV')) )
{$DATE_DOC = date('d.m.Y',strtotime(ociresult($stmt,"GALOBA_DATA")));}
$VERDICT_ID = ociresult($stmt,"VERDICT_ID"); // âåðäèêò ïî äåëó îáùèé
if ($VERDICT_ID == '' and $TIP_DELA=='115' and $_SESSION["SXEMA"]==1){// âåðäèêò ïî äåëó îáùèé
$VERDICT_ID = ociresult($stmt,"GALOBA_VERDICT");
}
$NumDocFirst = ociresult($stmt,"CASE_NUMBER_I");// íîìåð äåëà ïåðâîé èíñòàíöèè
if (ociresult($stmt,"VALIDITY_DATE") == ''){}
else{$Date_Validite = date('d.m.Y',strtotime(ociresult($stmt,"VALIDITY_DATE")));}
if (ociresult($stmt,"JUDGE_PEACE") <> ""){
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"JUDGE_PEACE"));
$status[$i]="Ìèðîâîé ñóäüÿ";
$i=$i+1;
}
if (ociresult($stmt,"SPEAKER") <> ""){
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"SPEAKER"));
$status[$i]="Äîêëàä÷èê";
$i=$i+1;
}
if (ociresult($stmt,"PRESIDING_JUDGE") <> "") {
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"PRESIDING_JUDGE"));
$status[$i]="Ïðåäñåäàòåëüñòâóþùèé â ñîñòàâå";
$i=$i+1;
}
if (($TIP_DELA=='115') or ($TIP_DELA==114 and ($ZAVNUMK=='OS' or $ZAVNUMK=='OV' or $ZAVNUMK=='KJ' or $ZAVNUMK=='AJ' or $ZAVNUMK=='KV' or $ZAVNUMK=='AV'))){
if (ociresult($stmt,"CERTIORARI_JUDGE_ID") <> "") {
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"CERTIORARI_JUDGE_ID"));
$status[$i]="Ñóäüÿ, èçó÷èâøèé èñòðåáîâàííîå äåëî";
$i=$i+1;
}
if (ociresult($stmt,"JUDGE_I") <> "") {
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"JUDGE_I"));
$status[$i]="Ôåäåðàëüíûé ñóäüÿ";
$i=$i+1;
}
if (ociresult($stmt,"PRESIDING_JUDGE_II") <> "") {
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"PRESIDING_JUDGE_II"));
$status[$i]="Ñóäüÿ, ïðåäñåäàòåëüñòâóþùèé â êàññàöèîííîé èíñòàíöèè";
$i=$i+1;
}
if (ociresult($stmt,"SPEAKER_II") <> "") {
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"SPEAKER_II"));
$status[$i]="Äîêëàä÷èê â êàññàöèîííîé èíñòàíöèè";
$i=$i+1;
}
if (ociresult($stmt,"THIRD_JUDGE_ID") <> "") {
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"THIRD_JUDGE_ID"));
$status[$i]="Â ñîñòàâå ñóäåé - òðåòèé ñóäüÿ";
$i=$i+1;
}
if (ociresult($stmt,"THIRD_JUDGE_ID2") <> "") {
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"THIRD_JUDGE_ID2"));
$status[$i]="Â ñîñòàâå ñóäåé - âòîðîé ñóäüÿ";
$i=$i+1;
}
}
else if(($TIP_DELA==114 and ($ZAVNUMK<>'OS' and $ZAVNUMK<>'OV' and $ZAVNUMK<>'KJ' and $ZAVNUMK<>'AJ' and $ZAVNUMK<>'KV' and $ZAVNUMK<>'AV')) or
($TIP_DELA==112 and ($ZAVNUMK=='OS' or $ZAVNUMK=='OV' or $ZAVNUMK=='KJ' or $ZAVNUMK=='AJ' or $ZAVNUMK=='KV' or $ZAVNUMK=='AV'))) {
if (ociresult($stmt,"ACCUSER") <> "") {
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"ACCUSER"));
$status[$i]="Ïðîêóðîð";
$i=$i+1;
}
if (ociresult($stmt,"JUDGE_I") <> "") {
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"JUDGE_I"));
$status[$i]="ÔÈÎ ñóäüè ôåäåðàëüíîãî (ðàéîííîãî) ñóäà";
$i=$i+1;
}
if (ociresult($stmt,"PRESIDING_APP_JUDGE") <> "") {
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"PRESIDING_APP_JUDGE"));
$status[$i]="Ïðåäñåäàòåëüñòâóþùèé â àïåëëÿöèîííîé èíñòàíöèè";
$i=$i+1;
}
if (ociresult($stmt,"THIRD_JUDGE_ID") <> "") {
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"THIRD_JUDGE_ID"));
$status[$i]="Â ñîñòàâå ñóäåé - òðåòèé ñóäüÿ";
$i=$i+1;
}
if (ociresult($stmt,"THIRD_JUDGE_ID2") <> "") {
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"THIRD_JUDGE_ID2"));
$status[$i]="Â ñîñòàâå ñóäåé - âòîðîé ñóäüÿ";
$i=$i+1;
}
$STRSELECT="SELECT NAME,PARTS_TYPE_ID FROM U2_PARTS@IBASEDATA where CASE_ID=".$AgoraID;
$stmt1 = JosPrepareAndExecute($dbcnx,$STRSELECT);
while(ocifetch($stmt1)){
$FIO[$i]=ociresult($stmt1,"NAME");
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt1,"PARTS_TYPE_ID"));
$i=$i+1;
}
oci_free_statement($stmt1);
}
else if (($TIP_DELA==112 and $ZAVNUMK<>'OS' and $ZAVNUMK<>'OV' and $ZAVNUMK<>'KJ' and $ZAVNUMK<>'AJ' and $ZAVNUMK<>'KV' and $ZAVNUMK<>'AV') or $TIP_DELA==113){
if ($TIP_DELA==112) {
$Stage="Àïåëëÿöèÿ";
} else {
$Stage="Ïåðâàÿ èíñòàíöèÿ";
}
if (ociresult($stmt,"A_RET_JUDGE_ID") <> "") {
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"A_RET_JUDGE_ID"));
$status[$i]="Ìèðîâîé ñóäüÿ, êîòîðîìó âîçâðàùåíî äåëî";
$i=$i+1;
}
if (ociresult($stmt,"JUDGE_ID") <> "") {
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"JUDGE_ID"));
$status[$i]="Ïðåäñåäàòåëüñòâóþùèé ñóäüÿ";
$i=$i+1;
}
$STRSELECT='SELECT NAME,PARTS_TYPE_ID FROM U1_PARTS@IBASEDATA where CASE_ID='.$AgoraID;
$stmt1 = JosPrepareAndExecute($dbcnx,$STRSELECT);
while(ocifetch($stmt1)){
$FIO[$i]=ociresult($stmt1,"NAME");
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt1,"PARTS_TYPE_ID"));
$i=$i+1;
}
oci_free_statement($stmt1);
}
oci_free_statement($stmt);
}
function svFindParamAdm($dbcnx,&$Date_Validite,$TIP_DELA,$AgoraID,&$NUM_DOC,&$DATE_DOC,&$Stage,&$RESULT_AGORA,&$RESULT_AGORA2,&$KSA_SUD,&$TypeID,&$FIO,&$status,&$NumDocFirst,&$STATYA_ALL,&$ANAT,&$UID){
$r=0;
while ($r<15){
$FIO[$r]="";
$status[$r]="";
$r=$r+1;
}
$RESULT_AGORA=0;
$RESULT_AGORA2=0;
$Date_Validite='';
//$TypeID=731205;
$stmt = JosImmidiate($dbcnx, "SELECT IDITEM FROM dic WHERE DATE_RETRO IS null and numdic=7312 AND vncode='01'");
$TypeID = ociresult($stmt,"IDITEM");
oci_free_statement($stmt);
$i=0;
$stmt = JosPrepareAndExecute($dbcnx,"select ESSENCE as ANAT,TO_CHAR(TAKE_LAW_EFFECT_DATE,'dd.MM.yyyy') as TAKE_LAW_EFFECT_DATE,CASE_NUMBER,JUDICIAL_UID, TO_CHAR(DECREE_DATE,'dd.MM.yyyy') as DECREE_DATE,DECREE_ID,JUDGE_ID from adm_case@IBASEDATA where id=".$AgoraID);
ocifetch($stmt);
$NUM_DOC=ociresult($stmt,"CASE_NUMBER");
if ($NUM_DOC==""){
$stmt = JosPrepareAndExecute($dbcnx,"select ESSENCE as ANAT,TO_CHAR(TAKE_LAW_EFFECT_DATE,'dd.MM.yyyy') as TAKE_LAW_EFFECT_DATE,TO_CHAR(DECREE_DATE,'dd.MM.yyyy') as DECREE_DATE,DECREE_ID,CASE_NUMBER,JUDICIAL_UID,DECREE_ID,CASE_NUMBER_I,LAW_ARTICLES1,JUDGE_I,JUDGE_ID,DECLARANT_STATUS_ID,DECLARANT_NAME,DEFENDANT_STATUS_ID,DEFENDANT_NAME from adm1_case@IBASEDATA where id=".$AgoraID);
ocifetch($stmt);
$NUM_DOC=ociresult($stmt,"CASE_NUMBER");
if ($NUM_DOC==""){
$stmt = JosPrepareAndExecute($dbcnx,"select ESSENCE as ANAT,NULL AS TAKE_LAW_EFFECT_DATE,CASE_NUMBER,JUDGE_II,SECRETARY_ID,DECLARANT_NAME,JUDGE_ID,DEFENDANT_STATUS_ID,DEFENDANT_NAME, TO_CHAR(DECREE_DATE,'dd.MM.yyyy') as DECREE_DATE,DECLARANT_STATUS_ID,DECREE_ID,LAW_ARTICLES1,CASE_NUMBER_I,JUDGE_I from adm2_case@IBASEDATA where id=".$AgoraID);
ocifetch($stmt);
$NUM_DOC=ociresult($stmt,"CASE_NUMBER");
if ($NUM_DOC==""){
$stmt = JosPrepareAndExecute($dbcnx,"select ESSENCE as ANAT,NULL AS TAKE_LAW_EFFECT_DATE,PRESIDING_JUDGE,PROTEST_FULL_NUMBER,JUDGE_II,DEFENDANT_STATUS_ID,DEFENDANT_NAME,DECLARANT_STATUS_ID,DECLARANT_NAME,CERTIORARI_JUDGE_ID,JUDGE_I,LAW_ARTICLES1,CASE_NUMBER_I,VERDICT_0_CANCELED,VERDICT_1_CANCELED,VERDICT_2_CANCELED, TO_CHAR(PROTEST_VERDICT_DATE,'dd.MM.yyyy') as PROTEST_VERDICT_DATE,VERDICT_BY_PROTEST,VERDICT_BY_PROTEST from ADM3_CASE@IBASEDATA where id=".$AgoraID);
ocifetch($stmt);
$NUM_DOC=ociresult($stmt,"PROTEST_FULL_NUMBER");
// íîâûé íàäçîð
if ($NUM_DOC==""){
$stmt = JosPrepareAndExecute($dbcnx,"select DEFENDANT_NAME,JUDGE_ID,DECLARANT_TYPE_ID,DECLARANT_NAME,CHAIRMAN_ASSIST_ID,JUDGE_STUDY_ID,LAW_ARTICLE,TO_CHAR(VERDICT_DATE,'dd.MM.yyyy') as VERDICT_DATE,VERDICT_ID,FULL_NUMBER from A33_PROCEEDING@IBASEDATA where ID=".$AgoraID);
ocifetch($stmt);
$NUM_DOC=ociresult($stmt,"FULL_NUMBER");
$Stage="Íàäçîð";
if (preg_match("/[A-Z]/", ociresult($stmt,"VERDICT_DATE"))==0){ $DATE_DOC=ociresult($stmt,"VERDICT_DATE");}
else {$DATE_DOC=date('d.m.Y',strtotime(ociresult($stmt,"VERDICT_DATE"))); }
$RESULT_AGORA=ociresult($stmt,"VERDICT_ID");
$STATYA_ALL=ociresult($stmt,"LAW_ARTICLE");
$FIO[$i]=ociresult($stmt,"DECLARANT_NAME");
if ($FIO[$i]<>""){
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt,"DECLARANT_TYPE_ID"));
$i=$i+1;
}
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"JUDGE_STUDY_ID"));
if ($FIO[$i]<>""){
$status[$i]="Ïåðåäàíî íà ðàññìîòðåíèå ñóäüå";
$i=$i+1;
}
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"JUDGE_ID"));
if ($FIO[$i]<>""){
$status[$i]="Ñóäüÿ";
$i=$i+1;
}
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"CHAIRMAN_ASSIST_ID"));
if ($FIO[$i]<>""){
$status[$i]="Çàì.ïðåäñåäàòåëÿ";
$i=$i+1;
}
$FIO[$i]=ociresult($stmt,"DEFENDANT_NAME");
if ($FIO[$i]<>""){
$status[$i]="Ïðàâîíàðóøèòåëü";
$i=$i+1;
}
$STATYA_ALL=ociresult($stmt,"LAW_ARTICLE");
}
else{
if (preg_match("/[A-Z]/", ociresult($stmt,"PROTEST_VERDICT_DATE"))==0){ $DATE_DOC=ociresult($stmt,"PROTEST_VERDICT_DATE");}
else {$DATE_DOC=date('d.m.Y',strtotime(ociresult($stmt,"PROTEST_VERDICT_DATE")));}
$Stage="Íàäçîð";
$ANAT = ociresult($stmt,"ANAT");
$RESULT_AGORA=ociresult($stmt,"VERDICT_BY_PROTEST");
if (ociresult($stmt,"TAKE_LAW_EFFECT_DATE") == ''){}
else{$Date_Validite = date('d.m.Y',strtotime(ociresult($stmt,"TAKE_LAW_EFFECT_DATE")));}
if (ociresult($stmt,"VERDICT_2_CANCELED")<>""){$RESULT_AGORA2=ociresult($stmt,"VERDICT_2_CANCELED");}
else if (ociresult($stmt,"VERDICT_1_CANCELED")<>""){$RESULT_AGORA2=ociresult($stmt,"VERDICT_1_CANCELED");}
else {$RESULT_AGORA2=ociresult($stmt,"VERDICT_0_CANCELED");}
if ($RESULT_AGORA==70050010){$RESULT_AGORA=$RESULT_AGORA2;}
$STATYA_ALL=ociresult($stmt,"LAW_ARTICLES1");
$NumDocFirst=ociresult($stmt,"CASE_NUMBER_I");
$$JUDGE_ID=ociresult($stmt,"JUDGE_I");
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"CERTIORARI_JUDGE_ID"));
if ($FIO[$i]<>""){
$status[$i]="Ñóäüÿ, èçó÷èâøèé èñòðåáîâàííîå äåëî";
$i=$i+1;
}
$FIO[$i]=ociresult($stmt,"DECLARANT_NAME");
if ($FIO[$i]<>""){
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt,"DECLARANT_STATUS_ID"));
$i=$i+1;
}
$FIO[$i]=ociresult($stmt,"DEFENDANT_NAME");
if ($FIO[$i]<>""){
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt,"DEFENDANT_STATUS_ID"));
$i=$i+1;
}
if ($JUDGE_ID<>""){
$FIO[$i]=$status[$i]=GetNameByCod($dbcnx,$JUDGE_ID);
$status[$i]="Ôåäåðàëüíûé ñóäüÿ";
$i=$i+1;
}
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"JUDGE_II"));
if ($FIO[$i]<>""){
$status[$i]="ÔÈÎ ñóäüè ïðè ïåðâîì ïåðåñìîòðå";
$i=$i+1;
}
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"PRESIDING_JUDGE"));
if ($FIO[$i]<>""){
$status[$i]="Äîêëàä÷èê";
$i=$i+1;
}
}
}
else {
if (preg_match("/[A-Z]/", ociresult($stmt,"DECREE_DATE"))==0){ $DATE_DOC=ociresult($stmt,"DECREE_DATE");}
else {$DATE_DOC=date('d.m.Y',strtotime(ociresult($stmt,"DECREE_DATE"))); }
if (ociresult($stmt,"TAKE_LAW_EFFECT_DATE") == ''){}
else{$Date_Validite = date('d.m.Y',strtotime(ociresult($stmt,"TAKE_LAW_EFFECT_DATE")));}
//$DATE_DOC=date('d.m.Y',strtotime(ociresult($stmt,"DECREE_DATE")));
$Stage="Âòîðîé ïåðåñìîòð";
$ANAT = ociresult($stmt,"ANAT");
$RESULT_AGORA=ociresult($stmt,"DECREE_ID");
$RESULT_AGORA2=ociresult($stmt,"DECREE_ID");
$STATYA_ALL=ociresult($stmt,"LAW_ARTICLES1");
$NumDocFirst=ociresult($stmt,"CASE_NUMBER_I");
$JUDGE_ID=ociresult($stmt,"JUDGE_I");
if ($JUDGE_ID<>""){
$FIO[$i]=GetNameByCod($dbcnx,$JUDGE_ID);
$status[$i]="ÔÈÎ ñóäüè ïåðâîé èíñòàíöèè";
$i=$i+1;
}
$FIO[$i]=ociresult($stmt,"DECLARANT_NAME");
if ($FIO[$i]<>""){
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt,"DECLARANT_STATUS_ID"));
$i=$i+1;
}
$FIO[$i]=ociresult($stmt,"DEFENDANT_NAME");
if ($FIO[$i]<>""){
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt,"DEFENDANT_STATUS_ID"));
$i=$i+1;
}
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"JUDGE_ID"));
if ($FIO[$i]<>""){
$status[$i]="Ïåðåäàíî â ïðîèçâîäñòâî ñóäüå";
$i=$i+1;
}
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"JUDGE_II"));
if ($FIO[$i]<>""){
$status[$i]="ÔÈÎ ñóäüè âòîðîé èíñòàíöèè";
$i=$i+1;
}
}
}
else {
if (preg_match("/[A-Z]/", ociresult($stmt,"DECREE_DATE"))==0){ $DATE_DOC=ociresult($stmt,"DECREE_DATE");}
else {$DATE_DOC=date('d.m.Y',strtotime(ociresult($stmt,"DECREE_DATE"))); }
if (ociresult($stmt,"TAKE_LAW_EFFECT_DATE") == ''){}
else{$Date_Validite = date('d.m.Y',strtotime(ociresult($stmt,"TAKE_LAW_EFFECT_DATE")));}
// $DATE_DOC=date('d.m.Y',strtotime(ociresult($stmt,"DECREE_DATE")));
$Stage="Ïåðâûé ïåðåñìîòð";
$ANAT = ociresult($stmt,"ANAT");
$UID=ociresult($stmt,"JUDICIAL_UID");
$RESULT_AGORA=ociresult($stmt,"DECREE_ID");
$NumDocFirst=ociresult($stmt,"CASE_NUMBER_I");
if ($NumDocFirst=="") {$NumDocFirst=null;}
$STATYA_ALL=ociresult($stmt,"LAW_ARTICLES1");
$JUDGE_ID=ociresult($stmt,"JUDGE_I");
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"JUDGE_ID"));
$status[$i]="Ïåðåäàíî â ïðîèçâîäñòâî ñóäüå";
$i=$i+1;
$FIO[$i]=ociresult($stmt,"DEFENDANT_NAME");
if ($FIO[$i]<>""){
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt,"DEFENDANT_STATUS_ID"));
$i=$i+1;
}
if ($JUDGE_ID<>""){
$FIO[$i]=GetNameByCod($dbcnx,$JUDGE_ID);
$status[$i]="ÔÈÎ ñóäüè ïåðâîé èíñòàíöèè";
$i=$i+1;
}
$FIO[$i]=ociresult($stmt,"DECLARANT_NAME");
if ($FIO[$i]<>""){
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt,"DECLARANT_STATUS_ID"));
$i=$i+1;
}
}
}
else { if (preg_match("/[A-Z]/", ociresult($stmt,"DECREE_DATE"))==0){ $DATE_DOC=ociresult($stmt,"DECREE_DATE");}
else {$DATE_DOC=date('d.m.Y',strtotime(ociresult($stmt,"DECREE_DATE"))); }
if (ociresult($stmt,"TAKE_LAW_EFFECT_DATE") == ''){}
else{$Date_Validite = date('d.m.Y',strtotime(ociresult($stmt,"TAKE_LAW_EFFECT_DATE")));}
//$DATE_DOC=date('d.m.Y',strtotime(ociresult($stmt,"DECREE_DATE")));;
$Stage="Ïåðâàÿ èíñòàíöèÿ";
$ANAT = ociresult($stmt,"ANAT");
$UID=ociresult($stmt,"JUDICIAL_UID");
$RESULT_AGORA=ociresult($stmt,"DECREE_ID");
//$NumDocFirst=ociresult($stmt,"CASE_NUMBER");
if ($NumDocFirst=="") {$NumDocFirst=null;}
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"JUDGE_ID"));
if ($FIO[$i]<>""){
$status[$i]="Ïðåäñåäàòåëüñòâóþùèé ñóäüÿ";
$i=$i+1;
}
$STRSELECT='SELECT PARTY_NAME,LAW_ARTICLES1,PARTY_TYPE_ID FROM adm_parts@IBASEDATA where CASE_ID='.$AgoraID;
$stmt = JosPrepareAndExecute($dbcnx,$STRSELECT);
while(ocifetch($stmt)){
$FIO[$i]=ociresult($stmt,"PARTY_NAME");
$STATYA_ALL=ociresult($stmt,"LAW_ARTICLES1");
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt,"PARTY_TYPE_ID"));
$i=$i+1;
}
oci_free_statement($stmt);
}
}
function svFindParamGr($dbcnx,$Date_Validite,$Tip,$AgoraID,&$NUM_DOC,&$DATE_DOC,&$Stage,&$RESULT_AGORA,&$RESULT_AGORA2,&$KSA_SUD,&$TypeID,&$FIO,&$status,&$NumDocFirst,&$STATYA,&$STATYA2,&$ANAT,&$UID){
$r=0;
while ($r<15){
$FIO[$r]="";
$status[$r]="";
$r=$r+1;
}
$Date_Validite='';
$RESULT_AGORA=0;
$RESULT_AGORA2=0;
$stmt = OCIParse($dbcnx, "select ZAVNUMKSA from PARAM_NASTR");
ociexecute($stmt, OCI_DEFAULT);
while(ocifetch($stmt)){
$ZAVNUMK = ociresult($stmt,'ZAVNUMKSA');
$ZAVNUMK = substr ($ZAVNUMK,2,2);
}
oci_free_statement($stmt);
$stmt = JosImmidiate($dbcnx, "SELECT IDITEM FROM dic WHERE DATE_RETRO IS null and numdic=7312 AND vncode='01'");
$TypeID = ociresult($stmt,"IDITEM");
$i=0;
if ($Tip==113){
$STRSELECT='SELECT NAME,PARTS_TYPE_ID FROM G1_PARTS@IBASEDATA where CASE_ID='.$AgoraID;
$stmt2 = JosPrepareAndExecute($dbcnx,$STRSELECT);
while(ocifetch($stmt2)){
$FIO[$i]=ociresult($stmt2,"NAME");
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt2,"PARTS_TYPE_ID"));
$i=$i+1;
}
oci_free_statement($stmt2);
$Stage="Ïåðâàÿ èíñòàíöèÿ";
$str_zapros = "select null as IST,null as OTV,null as DECLARANT_NAME,FULL_NUMBER,JUDICIAL_UID, TO_CHAR(RESULT_DATE,'dd.MM.yyyy') as VERDICT_DATE,
RESULT_TYPE_ID,RESULT_ID, TO_CHAR(VALIDITY_DATE,'dd.MM.yyyy') as VALIDITY_DATE, REQ_ESSENCE as ANAT, CATEGORY_ID, CATEGORY_ID2, CASE_TYPE_ID,
null as COURT_I,null as CASS_SPEAKER_ID, JUDGE_ID as PRESIDING_JUDGE,null as CERTIORARI_JUDGE_ID,null as PRESIDING_JUDGE_III,
null as THIRD_JUDGE_ID,null as THIRD_JUDGE_ID2, null as JUDGE,null as CASE_NUMBER_I, null as JUDGE_I from G1_CASE@IBASEDATA
where id=".$AgoraID;
}
else if ($Tip==112 and $ZAVNUMK<>'OS' and $ZAVNUMK<>'OV' and $ZAVNUMK<>'KJ' and $ZAVNUMK<>'AJ' and $ZAVNUMK<>'KV' and $ZAVNUMK<>'AV'){
$STRSELECT='SELECT NAME,PARTS_TYPE_ID FROM G1_PARTS@IBASEDATA where CASE_ID='.$AgoraID;
$stmt2 = JosPrepareAndExecute($dbcnx,$STRSELECT);
while(ocifetch($stmt2)){
$FIO[$i]=ociresult($stmt2,"NAME");
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt2,"PARTS_TYPE_ID"));
$i=$i+1;
}
oci_free_statement($stmt2);
$Stage="Àïåëëÿöèÿ";
$str_zapros = "select null as IST,null as OTV,null as DECLARANT_NAME,FULL_NUMBER,JUDICIAL_UID,RESULT_ID,
TO_CHAR(RESULT_DATE,'dd.MM.yyyy') as VERDICT_DATE,CATEGORY_ID, CATEGORY_ID2,RESULT_TYPE_ID,TO_CHAR(VALIDITY_DATE,'dd.MM.yyyy') as VALIDITY_DATE,
REQ_ESSENCE as ANAT,CASE_TYPE_ID,null as COURT_I,JUDGE_ID as PRESIDING_JUDGE,null as CASS_SPEAKER_ID,A_CASE_NUMBER_I as CASE_NUMBER_I,
null as CERTIORARI_JUDGE_ID,null as PRESIDING_JUDGE_III,null as THIRD_JUDGE_ID,null as THIRD_JUDGE_ID2,null as JUDGE,null as JUDGE_I
from G1_CASE@IBASEDATA where id=".$AgoraID;
}
else if (($Tip==114 and ($ZAVNUMK<>'OS' and $ZAVNUMK<>'OV' and $ZAVNUMK<>'KJ' and $ZAVNUMK<>'AJ' and $ZAVNUMK<>'KV' and $ZAVNUMK<>'AV')) or
($Tip==112 and ($ZAVNUMK=='OS' or $ZAVNUMK=='OV' or $ZAVNUMK=='KJ' or $ZAVNUMK=='AJ' or $ZAVNUMK=='KV' or $ZAVNUMK=='AV'))){
$STRSELECT='SELECT PARTY_NAME,PARTY_TYPE_ID FROM G2_PARTS@IBASEDATA where CASE_ID='.$AgoraID;
$stmt2 = JosPrepareAndexecute($dbcnx,$STRSELECT);
while(ocifetch($stmt2)){
$FIO[$i]=ociresult($stmt2,"PARTY_NAME");
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt2,"PARTY_TYPE_ID"));
$i=$i+1;
}
oci_free_statement($stmt2);
if ($Tip==114) {
$Stage="Êàññàöèÿ";
} else {
$Stage="Àïåëëÿöèÿ";
}
$str_zapros = "select null as PRESIDING_JUDGE,null as DECLARANT_NAME,Z_FULLNUMBER as FULL_NUMBER,IDRESH as RESULT_ID,TO_CHAR(DRESALT,'dd.MM.yyyy') as VERDICT_DATE,
NULL AS VALIDITY_DATE,ESSENCE_STATEMENT as ANAT,IDKATEG as CATEGORY_ID, CATEGORY_ID2,NUMRNS as CASE_NUMBER_I,THIRD_JUDGE_ID,
IDDOC as CASS_SPEAKER_ID,null as CERTIORARI_JUDGE_ID,IDPRED as PRESIDING_JUDGE_III,
THIRD_JUDGE_ID2,null as JUDGE_I,SUDRNS as COURT_I,IST,null as JUDGE,OTV from GR2_DELO@IBASEDATA where id=".$AgoraID;
}
else if ($Tip==114 and ($ZAVNUMK=='OS' or $ZAVNUMK=='OV' or $ZAVNUMK=='KJ' or $ZAVNUMK=='AJ' or $ZAVNUMK=='KV' or $ZAVNUMK=='AV')){
$STRSELECT='SELECT NAME,PARTS_TYPE_ID FROM G3_PARTS@IBASEDATA where CASE_ID='.$AgoraID;
$stmt2 = JosPrepareAndexecute($dbcnx,$STRSELECT);
while(ocifetch($stmt2)){
$FIO[$i]=str_replace("\"","",ociresult($stmt2,"NAME"));
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt2,"PARTS_TYPE_ID"));
$i=$i+1;
}
oci_free_statement($stmt2);
$Stage="Êàññàöèÿ";
$str_zapros = "select FULL_NUMBER,NULL as ANAT,NULL AS VALIDITY_DATE,
CATEGORY_ID,CASS_SPEAKER_ID,PRESIDING_JUDGE,null as CERTIORARI_JUDGE_ID,PRESIDING_JUDGE_III,null as JUDGE_I,
SATISFIED_VERDICT_I_ID as RESULT_ID,TO_CHAR(PROTEST_VERDICT_DATE,'dd.MM.yyyy') as VERDICT_DATE,
null as CASE_NUMBER_I,null as THIRD_JUDGE_ID,null as THIRD_JUDGE_ID2, null as COURT_I,null as JUDGE,
null as IST,null as OTV,null as DECLARANT_NAME from G33_PROCEEDING@IBASEDATA where id=".$AgoraID;
}
else if ($Tip==115){
$STRSELECT='SELECT NAME,PARTS_TYPE_ID FROM G3_PARTS@IBASEDATA where CASE_ID='.$AgoraID;
$stmt2 = JosPrepareAndexecute($dbcnx,$STRSELECT);
while(ocifetch($stmt2)){
$FIO[$i]=str_replace("\"","",ociresult($stmt2,"NAME"));
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt2,"PARTS_TYPE_ID"));
$i=$i+1;
}
oci_free_statement($stmt2);
$Stage="Íàäçîð";
if ($_SESSION["SXEMA"]==1){
$str_zapros = "select FULL_NUMBER,NULL as ANAT,NULL AS VALIDITY_DATE,
CATEGORY_ID,CASS_SPEAKER_ID,PRESIDING_JUDGE,null as CERTIORARI_JUDGE_ID,PRESIDING_JUDGE_III,null as JUDGE_I,
SATISFIED_VERDICT_I_ID as RESULT_ID,TO_CHAR(PROTEST_VERDICT_DATE,'dd.MM.yyyy') as VERDICT_DATE,
null as CASE_NUMBER_I,null as THIRD_JUDGE_ID,null as THIRD_JUDGE_ID2, null as COURT_I,null as JUDGE,
null as IST,null as OTV,null as DECLARANT_NAME from G33_PROCEEDING@IBASEDATA where id=".$AgoraID;
}
else{
$str_zapros = "select FULL_NUMBER2 as FULL_NUMBER,TO_CHAR(PROTEST_VERDICT_DATE,'dd.MM.yyyy') as VERDICT_DATE,
SATISFIED_VERDICT_I_ID as RESULT_ID, NULL AS VALIDITY_DATE,ESSENCE as ANAT, SPEAKER_II as CASS_SPEAKER_ID,
PRESIDING_JUDGE, CERTIORARI_JUDGE_ID,PRESIDING_JUDGE_III,JUDGE_I, THIRD_JUDGE_ID,THIRD_JUDGE_ID2,COURT_I,
CASE_NUMBER_I,CATEGORY_ID,null as IST, null as JUDGE,DECLARANT_NAME,null as OTV from G3_CASE@IBASEDATA where id=".$AgoraID;
$stmt = JosImmidiate($dbcnx,$str_zapros);
if (ociresult($stmt,"FULL_NUMBER")==""){
$STRSELECT='SELECT NAME,PARTS_TYPE_ID FROM G3_COMPL_PARTS@IBASEDATA where COMPLAINT_ID='.$AgoraID;
$stmt2 = JosPrepareAndexecute($dbcnx,$STRSELECT);
while(ocifetch($stmt2)){
$FIO[$i]=str_replace("\"","",ociresult($stmt2,"NAME"));
$status[$i]=GetNameByCod($dbcnx,ociresult($stmt2,"PARTS_TYPE_ID"));
$i=$i+1;
}
oci_free_statement($stmt2);
$str_zapros = "select DECLARANT_NAME,FULL_NUMBER,TO_CHAR(VERDICT_DATE,'dd.MM.yyyy') as VERDICT_DATE,VERDICT as RESULT_ID,
null as VALIDITY_DATE,ESSENCE as ANAT,SPEAKER_II as CASS_SPEAKER_ID,JUDGE, null as PRESIDING_JUDGE,CASE_NUMBER_I,
null as CERTIORARI_JUDGE_ID,CATEGORY_ID,null as PRESIDING_JUDGE_III, null as THIRD_JUDGE_ID,null as IST,
JUDGE_I,null as THIRD_JUDGE_ID2,COURT_I,null as OTV from g3_complaint@ibasedata
where id=".$AgoraID;
}
}
}
$stmt = JosImmidiate($dbcnx,$str_zapros);
$NUM_DOC=ociresult($stmt,"FULL_NUMBER");
if ($NUM_DOC<>""){
if ($Tip==113 or ($ZAVNUMK<>'OS' and $ZAVNUMK<>'OV' and $ZAVNUMK<>'KJ' and $ZAVNUMK<>'AJ' and $ZAVNUMK<>'KV' and $ZAVNUMK<>'AV' and $Tip==112)){
$RESULT_TYPE_ID=ociresult($stmt,"RESULT_TYPE_ID"); //âèä ñóäåáíîãî ïîñòàíîâëåíèÿ
$CASE_TYPE_ID=ociresult($stmt,"CASE_TYPE_ID"); //âèä ãðàæäàíñêîãî ïðîèçâîäñòâà
}
if (preg_match("/[A-Z]/", ociresult($stmt,"VERDICT_DATE"))==0){ $DATE_DOC=ociresult($stmt,"VERDICT_DATE");}
else {$DATE_DOC=date('d.m.Y',strtotime(ociresult($stmt,"VERDICT_DATE"))); }
if ($DATE_DOC == ''){$DATE_DOC = date('d.m.Y',strtotime(ociresult($stmt,"VERDICT_DATE")));}
if (ociresult($stmt,"VALIDITY_DATE") == ''){}
else{$Date_Validite = date('d.m.Y',strtotime(ociresult($stmt,"VALIDITY_DATE")));}
$RESULT_AGORA=ociresult($stmt,"RESULT_ID");
$ANAT = ociresult($stmt,"ANAT");
$UID=ociresult($stmt,"JUDICIAL_UID");
$STATYA=ociresult($stmt,"CATEGORY_ID");
$STATYA2=ociresult($stmt,"CATEGORY_ID2");
if (ociresult($stmt,"CASS_SPEAKER_ID")<>""){
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"CASS_SPEAKER_ID"));
$status[$i]="Äîêëàä÷èê â êàññàöèîííîé èíñòàíöèè";
$i=$i+1;
}
if (ociresult($stmt,"PRESIDING_JUDGE")<>""){
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"PRESIDING_JUDGE"));
//Äåðáåíåâ. Èçìåíèë "Äîêëàä÷èê" íà "Ïðåäñåäàòåëüñòâóþùèé ñóäüÿ"
$status[$i]="Ïðåäñåäàòåëüñòâóþùèé ñóäüÿ";
$i=$i+1;
}
if (ociresult($stmt,"DECLARANT_NAME")<>""){
$FIO[$i]=ociresult($stmt,"DECLARANT_NAME");
$status[$i]="ÔÈÎ çàÿâèòåëÿ";
$i=$i+1;
}
$NumDocFirst=ociresult($stmt,"CASE_NUMBER_I");
if (ociresult($stmt,"CERTIORARI_JUDGE_ID")<>""){
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"CERTIORARI_JUDGE_ID"));
$status[$i]="Ñóäüÿ, èçó÷èâøèé èñòðåáîâàííîå äåëî";
$i=$i+1;
}
if (ociresult($stmt,"PRESIDING_JUDGE_III")<>""){
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"PRESIDING_JUDGE_III"));
$status[$i]="Ïðåäñåäàòåëüñòâóþùèé â ñîñòàâå";
$i=$i+1;
}
if (ociresult($stmt,"THIRD_JUDGE_ID")<>""){
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"THIRD_JUDGE_ID"));
$status[$i]="Â ñîñòàâå ñóäåé - òðåòèé ñóäüÿ";
$i=$i+1;
}
if (ociresult($stmt,"THIRD_JUDGE_ID2")<>""){
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"THIRD_JUDGE_ID2"));
$status[$i]="Â ñîñòàâå ñóäåé - âòîðîé ñóäüÿ";
$i=$i+1;
}
if (ociresult($stmt,"JUDGE_I")<>""){
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"JUDGE_I"));
$status[$i]="Ñóäüÿ, ïðåäñåäàòåëüñòâóþùèé â ïåðâîé èíñòàíöèè";
$i=$i+1;
}
if (ociresult($stmt,"JUDGE_I")<>""){
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"JUDGE"));
$status[$i]="Ñóäüÿ, ðàññìîòðåâøèé ìàòåðèàë";
$i=$i+1;
}
/* if (ociresult($stmt,"COURT_I")<>""){
$FIO[$i]=GetNameByCod($dbcnx,ociresult($stmt,"COURT_I"));
$status[$i]="Ôåäåðàëüíûé ñóä";
$i=$i+1;
}
*/
if (ociresult($stmt,"IST")<>""){
$FIO[$i]=ociresult($stmt,"IST");
$status[$i]="Èñòåö";
$i=$i+1;
}
if (ociresult($stmt,"OTV")<>""){
$FIO[$i]=ociresult($stmt,"OTV");
$status[$i]="Îòâåò÷èê";
$i=$i+1;
}
}
oci_free_statement($stmt);
}
function SvFindStr ($svFind){
$stroka = "";
$svFind_UK=stristr($svFind,"ÓÏÊ");
if ($svFind_UK==""){
if (strstr($svFind, 'ÓÊ ÐÔ')){
$svFind = trim(str_replace('ÓÊ ÐÔ', '', $svFind));
}
while ($p=strpos($svFind,"[")){$svFind=substr($svFind,0,$p).substr($svFind,$p+1,strlen($svFind)-$p+1);}
while ($p=strpos($svFind,"]")){$svFind=substr($svFind,0,$p).substr($svFind,$p+1,strlen($svFind)-$p+1);}
while ($p=strpos($svFind,"-")){$svFind=substr($svFind,0,$p).substr($svFind,$p+1,strlen($svFind)-$p+1);}
$svFindDetSt = explode("ñò.",$svFind);
$i=1;
$h=1;
while ($svFindDetSt[$i]<>""){
settype($svFindDetCh[0],"string");
settype($svFindDetRazd[0],"string");
$svFindDetSt[$i]=str_replace(";"," ",$svFindDetSt[$i]);
$svFindDetCh = explode("÷.",$svFindDetSt[$i]);
if (strlen(trim($svFindDetCh[0])==1)){ $svFindDetCh[0]="00".trim($svFindDetCh[0]); }
else if (strlen(trim($svFindDetCh[0])==2)){ $svFindDetCh[0]="0".trim($svFindDetCh[0]); }
$svFindDetP = explode("ïï.",$svFindDetCh[1]);
if ($svFindDetP[1] == "") {$svFindDetP = explode("ï.",$svFindDetCh[1]);}
$svFindDetRazd=explode("/",$svFindDetCh[0]);
if ($svFindDetRazd[1]==""){
$svFindDetRazd=explode(".",$svFindDetCh[0]);
if ($svFindDetRazd[1]==""){
if ($svFindDetP[1]==""){
if (strlen(trim($svFindDetCh[0]))==1) {$strFind[$h]="00".trim($svFindDetCh[0]).".0%".trim($svFindDetP[0]).".0";}
else if (strlen(trim($svFindDetCh[0]))==2) {$strFind[$h]="0".trim($svFindDetCh[0]).".0%".trim($svFindDetP[0]).".0";}
else{
if ($svFindDetP[0]==""){$strFind[$h]=trim($svFindDetCh[0]).".0%";}
else {$strFind[$h]=trim($svFindDetCh[0]).".0%".trim($svFindDetP[0]).".0";}
}
$h=$h+1;
}
else{
$stroka=trim($svFindDetCh[0]).".0%".trim($svFindDetP[0]);
if (strlen($svFindDetCh[0])==1) {$stroka="00".$stroka;}
if (strlen($svFindDetCh[0])==2) {$stroka="0".$stroka;}
}
}
else {
if (strlen(trim($svFindDetRazd[0]))==1) {
if (strlen(trim($svFindDetRazd[1]))==1) {$strFind[$h]="00".trim($svFindDetRazd[0]).".".trim($svFindDetRazd[1])."%".trim($svFindDetCh[1]).".0";}
else {$strFind[$h]="0".trim($svFindDetRazd[0]).".".trim($svFindDetRazd[1])."%".trim($svFindDetCh[1]).".0";}
$h=$h+1;
}
else if (strlen(trim($svFindDetRazd[0]))==2) {
if (strlen(trim($svFindDetRazd[1]))==1) {$strFind[$h]="0".trim($svFindDetRazd[0]).".".trim($svFindDetRazd[1]);}
else {$strFind[$h]=trim($svFindDetRazd[0]).".".trim($svFindDetRazd[1]);}