-
Notifications
You must be signed in to change notification settings - Fork 0
/
First_level_bug_fixing_.patch
1599 lines (1575 loc) · 67.5 KB
/
First_level_bug_fixing_.patch
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
Index: module/master/tallyledger/tallyledger.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/master/tallyledger/tallyledger.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/master/tallyledger/tallyledger.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -32,9 +32,9 @@
*
* @return
*/
- public function LoadTallyLedgerGrid()
+ public function LoadTallyLedgerGrid($menuid)
{
- global $db, $core, $Tableinfo;
+ global $db, $core, $Tableinfo, $Menu;
$c = '';
$sql = "SELECT tl.TallyLedgerId, tl.TallyLedgerName,tl.IsActive FROM " . $Tableinfo->mas_tallyledger." as tl";
$sql .= " ORDER BY tl.TallyLedgerName ASC";
@@ -63,9 +63,13 @@
$c .= '<td>'.$row['TallyLedgerName'].'</td>';
$c .= '<td>'.FieldStatus($row['IsActive']).'</td>';
$c .= '<td>';
- $c .= '<a href="'.$this->EditPath.'&id='.$row['TallyLedgerId'].'" class="sepV_a" title="'.TL_Edit.'"><i class="icon-pencil"></i></a>';
+ if($Menu->CheckEditRights($menuid)) {
+ $c .= '<a href="' . $this->EditPath . '&id=' . $row['TallyLedgerId'] . '" class="sepV_a" title="' . TL_Edit . '"><i class="icon-pencil"></i></a>';
+ }
//$c .= '<a href="#" class="sepV_a" title="View"><i class="icon-eye-open"></i></a>';
- $c .= '<a href="javascript:void(0);" title="'.TL_Del.'" onclick="do_delete('.$row['TallyLedgerId'].')"><i class="icon-trash"></i></a>';
+ if($Menu->CheckDeleteRights($menuid)) {
+ $c .= '<a href="javascript:void(0);" title="' . TL_Del . '" onclick="do_delete(' . $row['TallyLedgerId'] . ')"><i class="icon-trash"></i></a>';
+ }
$c .= '</td>';
$c .= '</tr>';
}
Index: module/master/city/city.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/master/city/city.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/master/city/city.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -30,9 +30,9 @@
*
* @return
*/
- public function LoadCityGrid()
+ public function LoadCityGrid($menuid)
{
- global $db, $core, $Tableinfo;
+ global $db, $core, $Tableinfo, $Menu;
$c = '';
$sql = "SELECT me.CityId, me.CityName, mc.StateName, me.IsActive FROM " . $Tableinfo->mas_city." as me";
$sql .= " LEFT JOIN " . $Tableinfo->mas_state." as mc on mc.StateId=me.StateId";
@@ -66,9 +66,13 @@
$c .= '<td>'.$row['StateName'].'</td>';
$c .= '<td>'.FieldStatus($row['IsActive']).'</td>';
$c .= '<td>';
- $c .= '<a href="'.$this->EditPath.'&id='.$row['CityId'].'" class="sepV_a" title="Edit"><i class="icon-pencil"></i></a>';
+ if($Menu->CheckEditRights($menuid)) {
+ $c .= '<a href="' . $this->EditPath . '&id=' . $row['CityId'] . '" class="sepV_a" title="Edit"><i class="icon-pencil"></i></a>';
+ }
//$c .= '<a href="#" class="sepV_a" title="View"><i class="icon-eye-open"></i></a>';
- $c .= '<a href="javascript:void(0);" title="'.CITY_Del.'" onclick="do_delete('.$row['CityId'].')"><i class="icon-trash"></i></a>';
+ if($Menu->CheckDeleteRights($menuid)) {
+ $c .= '<a href="javascript:void(0);" title="' . CITY_Del . '" onclick="do_delete(' . $row['CityId'] . ')"><i class="icon-trash"></i></a>';
+ }
$c .= '</td>';
$c .= '</tr>';
}
Index: module/transaction/cottoninward/cottoninward.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/transaction/cottoninward/cottoninward.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/transaction/cottoninward/cottoninward.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -35,12 +35,17 @@
* Function Name : LoadCottonInwardGrid
* @return string
*/
- public function LoadCottonInwardGrid()
+ public function LoadCottonInwardGrid($menuid=0, $FromDate="", $ToDate="", $SupplierId=0)
{
- global $db, $core, $Tableinfo;
+ global $db, $core, $Tableinfo, $Menu;
$c = '';
$sql = "select tci.CiId,tci.CiNo,tci.CiDate,tci.TotalBales,tci.TotalSupplierWt,tci.TotalMillsWt,ms.SupplierName from trn_cottoninward as tci
-left join mas_supplier as ms on ms.SupplierId=tci.SupplierId";
+ left join mas_supplier as ms on ms.SupplierId=tci.SupplierId";
+ $sql .= " where 1=1 ";
+ $sql .= " AND tci.CiDate between '".date_to_db($FromDate)."' AND '".date_to_db($ToDate)."'";
+ if($SupplierId > 0){
+ $sql .= " AND tci.SupplierId=".(int)$SupplierId;
+ }
$sql .= " ORDER BY CiDate DESC ";
$emp_row = $db->fetch_all($sql);
@@ -76,9 +81,15 @@
$c .= '<td hidden class="text_align_right">'.sprintf("%0.3f",$row['TotalSupplierWt']).'</td>';
$c .= '<td class="text_align_right">'.sprintf("%0.3f",$row['TotalMillsWt']).'</td>';
$c .= '<td>';
- $c .= '<a href="'.$this->EditPath.'&id='.$row['CiId'].'" class="sepV_a" title="'.COTTONINWARD_Edit.'"><i class="icon-pencil"></i></a>';
- $c .= '<a href="'.$this->ViewPath.'&id='.$row['CiId'].'" class="sepV_a" title="'.COTTONINWARD_View.'"><i class="icon-eye-open"></i></a>';
- $c .= '<a href="javascript:void(0);" title="'.COTTONINWARD_Del.'" onclick="do_delete('.$row['CiId'].')"><i class="icon-trash"></i></a>';
+ if($Menu->CheckEditRights($menuid)) {
+ $c .= '<a href="' . $this->EditPath . '&id=' . $row['CiId'] . '" class="sepV_a" title="' . COTTONINWARD_Edit . '"><i class="icon-pencil"></i></a>';
+ }
+ if($Menu->CheckViewRights($menuid)) {
+ $c .= '<a href="' . $this->ViewPath . '&id=' . $row['CiId'] . '" class="sepV_a" title="' . COTTONINWARD_View . '"><i class="icon-eye-open"></i></a>';
+ }
+ if($Menu->CheckDeleteRights($menuid)) {
+ $c .= '<a href="javascript:void(0);" title="' . COTTONINWARD_Del . '" onclick="do_delete(' . $row['CiId'] . ')"><i class="icon-trash"></i></a>';
+ }
$c .= '</td>';
$c .= '</tr>';
}
@@ -363,8 +374,8 @@
public function GetCottonInwardById($id){
global $db;
$sql = 'select ci.CiId,ci.CiNo,ci.CiDate,ci.SupplierId,ci.TotalBales,ci.TotalSupplierWt,ci.TotalMillsWt,ci.SupplierLotNo,ci.MillsLotNo,su.SupplierName ,ci.cRemarks from trn_cottoninward as ci
-left join mas_supplier as su on su.SupplierId=ci.SupplierId
- where CiId='.$id;
+ left join mas_supplier as su on su.SupplierId=ci.SupplierId
+ where CiId='.$id;
$result = $db->query($sql);
$row = $db->fetch($result);
return ($row) ? $row : 0;
@@ -373,9 +384,9 @@
public function GetCottonInwardDetailById($id){
global $db;
$sql ='select cid.SupplierBaleNo,cid.SupplierWt,cid.MillWt,mit.ItemCode,mit.ItemName,muo.UomName from trn_cottoninwarddetail as cid
-left join mas_item as mit on cid.ItemId=mit.ItemId
-left join mas_uom as muo on cid.UomId=muo.UomId
-WHERE cid.CiId='.$id;
+ left join mas_item as mit on cid.ItemId=mit.ItemId
+ left join mas_uom as muo on cid.UomId=muo.UomId
+ WHERE cid.CiId='.$id;
$row = $db->fetch_all($sql);
return ($row) ? $row : 0;
}
@@ -393,6 +404,38 @@
return $this->_CiId = $id;
}
}
+
+ public function deleteCottonInward($id){
+ global $core, $mysqli, $wojosec, $usercls;
+ //print_r($this->_CiId);
+
+ if (empty($core->msgs)) {
+ $mysqli->startTransaction();
+ $mysqli->where("CiId=", $id);
+ $oids = $mysqli->delete("trn_cottoninwarddetail");
+ if(!$oids){
+ $mysqli->rollback();
+ $core->msgAlert('Error: '. $mysqli->getLastError());
+ }
+
+ $mysqli->where("CiId=", $id);
+ $oids = $mysqli->delete("trn_cottoninward");
+ if(!$oids){
+ $mysqli->rollback();
+ $core->msgAlert('Error: '. $mysqli->getLastError());
+ }
+
+ $mysqli->commit();
+ $message = "#".$id." Cottom Inward Deleted Successfully";
+ //$wojosec->writeLog($message, "", "no", "transaction");
+ $wojosec->writeLog($message, "", "no", _COTTONINWARD, 3);
+ $core->msgOkSmoke($message);
+ }
+ else{
+ $core->msgAlert("Nothing to Process");
+ }
+ //print $core->msgStatus();
+ }
}
?>
\ No newline at end of file
Index: module/master/city/listing.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/master/city/listing.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/master/city/listing.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -29,7 +29,16 @@
<div class="row-fluid marginleft0 margintop0 marginbottom0">
<div class="block-border">
<div class="block-header">
- <h2><span><a class="button-sml" href="<?= $City->AddPath; ?>"><?= CITY_Add; ?></a></span><?= CITY_View; ?></h2>
+ <h2>
+ <?php
+ if($Menu->CheckAddRights($core->menuid)) {
+ ?>
+ <span><a class="button-sml" href="<?= $City->AddPath; ?>"><?= CITY_Add; ?></a></span>
+ <?= CITY_View; ?>
+ <?php
+ }
+ ?>
+ </h2>
</div>
</div>
<div class="block-content">
@@ -45,10 +54,11 @@
});
function loadList() {
+ var menuid = <?php echo $core->menuid; ?>;
$.ajax({
type: 'post',
url: "ajax.php",
- data: 'get_Citylist=1',
+ data: 'get_Citylist=1&menuid=' + menuid,
cache: false,
success: function (html) {
$("div.sortable").html(html);
Index: module/master/tax/listing.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/master/tax/listing.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/master/tax/listing.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -29,7 +29,16 @@
<div class="row-fluid marginleft0 margintop0 marginbottom0">
<div class="block-border">
<div class="block-header">
- <h2><span><a class="button-sml" href="<?= $Tax->AddPath; ?>"><?= strtoupper(_ADD.' '._TAX); ?></a></span><?= _VIEW.' '._TAX; ?></h2>
+ <h2>
+ <?php
+ if($Menu->CheckAddRights($core->menuid)) {
+ ?>
+ <span><a class="button-sml" href="<?= $Tax->AddPath; ?>"><?= strtoupper(_ADD.' '._TAX); ?></a></span>
+ <?php
+ }
+ ?>
+ <?= _VIEW.' '._TAX; ?>
+ </h2>
</div>
</div>
<div class="block-content">
@@ -54,10 +63,11 @@
});
function loadList() {
+ var menuid = <?php echo $core->menuid; ?>;
$.ajax({
type: 'post',
url: "ajax.php",
- data: 'get_taxlist=1',
+ data: 'get_taxlist=1&menuid=' + menuid,
cache: false,
success: function (html) {
$("div.sortable").html(html);
Index: module/master/supplier/listing.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/master/supplier/listing.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/master/supplier/listing.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -29,7 +29,16 @@
<div class="row-fluid marginleft0 margintop0 marginbottom0">
<div class="block-border">
<div class="block-header">
- <h2><span><a class="button-sml" href="<?= $Supplier->AddPath; ?>"><?= strtoupper(_ADD.' '._SUPPLIER); ?></a></span><?= _VIEW.' '._SUPPLIER; ?></h2>
+ <h2>
+ <?php
+ if($Menu->CheckAddRights($core->menuid)) {
+ ?>
+ <span><a class="button-sml" href="<?= $Supplier->AddPath; ?>"><?= strtoupper(_ADD.' '._SUPPLIER); ?></a></span>
+ <?php
+ }
+ ?>
+ <?= _VIEW.' '._SUPPLIER; ?>
+ </h2>
</div>
</div>
<div class="block-content">
@@ -45,10 +54,11 @@
});
function loadList() {
+ var menuid = <?php echo $core->menuid; ?>;
$.ajax({
type: 'post',
url: "ajax.php",
- data: 'get_supplierlist=1',
+ data: 'get_supplierlist=1&menuid=' + menuid,
cache: false,
success: function (html) {
$("div.sortable").html(html);
Index: module/master/uom/listing.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/master/uom/listing.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/master/uom/listing.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -29,7 +29,16 @@
<div class="row-fluid marginleft0 margintop0 marginbottom0">
<div class="block-border">
<div class="block-header">
- <h2><span><a class="button-sml" href="<?= $Uom->AddPath; ?>"><?= strtoupper(_ADD.' '._UOM); ?></a></span><?= _VIEW.' '._UOM; ?></h2>
+ <h2>
+ <?php
+ if($Menu->CheckAddRights($core->menuid)) {
+ ?>
+ <span><a class="button-sml" href="<?= $Uom->AddPath; ?>"><?= strtoupper(_ADD.' '._UOM); ?></a></span>
+ <?php
+ }
+ ?>
+ <?= _VIEW.' '._UOM; ?>
+ </h2>
</div>
</div>
<div class="block-content">
@@ -54,10 +63,11 @@
});
function loadList() {
+ var menuid = <?php echo $core->menuid; ?>;
$.ajax({
type: 'post',
url: "ajax.php",
- data: 'get_uomlist=1',
+ data: 'get_uomlist=1&menuid=' + menuid,
cache: false,
success: function (html) {
$("div.sortable").html(html);
Index: module/transaction/cottoninward/listing.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/transaction/cottoninward/listing.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/transaction/cottoninward/listing.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -7,7 +7,7 @@
<div class="row-fluid marginleft0 margintop0 marginbottom0">
<div class="block-top-header">
<div class="row-fluid">
- <h1><img src="<?php echo IMG_URL; ?>/agent.png" alt="" /><?= strtoupper(_COTTONINWARD); ?></h1>
+ <h1><img src="<?php echo GCONS_IMG_URL; ?>/agent.png" alt="" /><?= strtoupper(_COTTONINWARD); ?></h1>
<div class="divider"><span></span></div>
</div>
<!--<div class="row-fluid">
@@ -29,7 +29,16 @@
<div class="row-fluid marginleft0 margintop0 marginbottom0">
<div class="block-border">
<div class="block-header">
- <h2><span><a class="button-sml" href="<?= $Cottoninward->AddPath; ?>"><?= strtoupper(_ADD.' '._COTTONINWARD); ?></a></span><?= _VIEW.' '._COTTONINWARD; ?></h2>
+ <h2>
+ <?php
+ if($Menu->CheckAddRights($core->menuid)) {
+ ?>
+ <span><a class="button-sml" href="<?= $Cottoninward->AddPath; ?>"><?= strtoupper(_ADD.' '._COTTONINWARD); ?></a></span>
+ <?php
+ }
+ ?>
+ <?= _VIEW.' '._COTTONINWARD; ?>
+ </h2>
</div>
</div>
<div class="block-content">
@@ -37,7 +46,12 @@
<table class="display">
<tbody>
<tr>
- <td></td>
+ <td>
+ <input class="input-small datepicker" placeholder="From Date" type="text" id="dp1" name="txt_FromDate" value="<?= date_from_db(GetCurentDate()); ?>" />
+ <input class="input-small datepicker" placeholder="To Date" type="text" id="dp1" name="txt_ToDate" value="<?= date_from_db(GetCurentDate()); ?>" />
+ <?php echo $Supplier->getSupplierList(0,"cmb_s_supplier","","chzn-a");?>
+ <button onclick="loadList()" class="btn btn-info"><i class="splashy-zoom"></i> FIND</button>
+ </td>
</tr>
</tbody>
</table>
@@ -54,10 +68,14 @@
});
function loadList() {
+ var menuid = <?php echo $core->menuid; ?>;
+ var txt_FromDate = document.getElementsByName("txt_FromDate")[0].value;
+ var txt_ToDate = document.getElementsByName("txt_ToDate")[0].value;
+ var cmb_s_supplier = document.getElementsByName("cmb_s_supplier")[0].value;
$.ajax({
type: 'post',
url: "ajax.php",
- data: 'get_cottoninward=1',
+ data: 'get_cottoninward=1&menuid=' + menuid + "&txt_FromDate=" + txt_FromDate + "&txt_ToDate=" + txt_ToDate + "&cmb_s_supplier=" + cmb_s_supplier,
cache: false,
success: function (html) {
$("div.sortable").html(html);
Index: class/class_user.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- class/class_user.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ class/class_user.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -20,6 +20,7 @@
public $sesid;
public $UserTypeId;
public $Password;
+ public $CompanyId;
private $LastLogin = "NOW()";
private $LastLoginTime = "NOW()";
@@ -158,6 +159,7 @@
$this->UserName = $_SESSION['UserName'] = $row['UserName'];
$this->UserTypeId = $_SESSION['UserTypeId'] = $row['UserTypeId'];
$this->Password = $_SESSION['Password'] = $row['Password'];
+ $this->CompanyId = $_SESSION['CompanyId'] = $row['CompanyId'];
$data = array(
'LastLogin' => $this->LastLogin,
'LastLoginTime' => $this->LastLoginTime,
Index: index.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- index.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ index.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -49,6 +49,7 @@
}
if(isset($_GET['proj'])) {
$core->proj=$_GET['proj'];
+ $core->menuid = $Menu->GetMenuIdByTemplateName($core->do);
}
include('header.php');
?>
Index: module/master/itemtype/listing.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/master/itemtype/listing.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/master/itemtype/listing.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -29,7 +29,17 @@
<div class="row-fluid marginleft0 margintop0 marginbottom0">
<div class="block-border">
<div class="block-header">
- <h2><span><a class="button-sml" href="<?= $Itemtype->AddPath; ?>"><?= strtoupper(_ADD.' '._ITEMTYPE); ?></a></span><?= _VIEW.' '._ITEMTYPE; ?></h2>
+ <h2>
+ <?php
+ if($Menu->CheckAddRights($core->menuid)) {
+ ?>
+ <span><a class="button-sml"
+ href="<?= $Itemtype->AddPath; ?>"><?= strtoupper(_ADD . ' ' . _ITEMTYPE); ?></a></span>
+ <?php
+ }
+ ?>
+ <?= _VIEW.' '._ITEMTYPE; ?>
+ </h2>
</div>
</div>
<div class="block-content">
@@ -45,10 +55,11 @@
});
function loadList() {
+ var menuid = <?php echo $core->menuid; ?>;
$.ajax({
type: 'post',
url: "ajax.php",
- data: 'get_itemtypelist=1',
+ data: 'get_itemtypelist=1&menuid=' + menuid,
cache: false,
success: function (html) {
$("div.sortable").html(html);
Index: module/master/tax/tax.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/master/tax/tax.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/master/tax/tax.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -32,9 +32,9 @@
*
* @return
*/
- public function LoadTaxGrid()
+ public function LoadTaxGrid($menuid)
{
- global $db, $core, $Tableinfo;
+ global $db, $core, $Tableinfo, $Menu;
$c = '';
$sql = "SELECT * FROM " . $Tableinfo->mas_tax." as me";
$sql .= " where 1=1 AND IsActive=1 ";
@@ -73,9 +73,13 @@
$c .= '<td>'.$row['Igst'].'</td>';
$c .= '<td>'.FieldStatus($row['IsActive']).'</td>';
$c .= '<td>';
- $c .= '<a href="'.$this->EditPath.'&id='.$row['TaxId'].'" class="sepV_a" title="'.TAX_Edit.'"><i class="icon-pencil"></i></a>';
+ if($Menu->CheckEditRights($menuid)) {
+ $c .= '<a href="' . $this->EditPath . '&id=' . $row['TaxId'] . '" class="sepV_a" title="' . TAX_Edit . '"><i class="icon-pencil"></i></a>';
+ }
//$c .= '<a href="#" class="sepV_a" title="View"><i class="icon-eye-open"></i></a>';
- $c .= '<a href="javascript:void(0);" title="'.TAX_Del.'" onclick="do_delete('.$row['TaxId'].')"><i class="icon-trash"></i></a>';
+ if($Menu->CheckDeleteRights($menuid)) {
+ $c .= '<a href="javascript:void(0);" title="' . TAX_Del . '" onclick="do_delete(' . $row['TaxId'] . ')"><i class="icon-trash"></i></a>';
+ }
$c .= '</td>';
$c .= '</tr>';
}
Index: module/master/country/listing.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/master/country/listing.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/master/country/listing.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -29,7 +29,16 @@
<div class="row-fluid marginleft0 margintop0 marginbottom0">
<div class="block-border">
<div class="block-header">
- <h2><span><a class="button-sml" href="<?= $Country->AddPath; ?>"><?= COUNTRY_Add; ?></a></span><?= COUNTRY_View; ?></h2>
+ <h2>
+ <?php
+ if($Menu->CheckAddRights($core->menuid)) {
+ ?>
+ <span><a class="button-sml" href="<?= $Country->AddPath; ?>"><?= COUNTRY_Add; ?></a></span>
+ <?php
+ }
+ ?>
+ <?= COUNTRY_View; ?>
+ </h2>
</div>
</div>
<div class="block-content">
@@ -51,10 +60,11 @@
});
function loadList() {
+ var menuid = <?php echo $core->menuid; ?>;
$.ajax({
type: 'post',
url: "ajax.php",
- data: 'get_countrylist=1',
+ data: 'get_countrylist=1&menuid=' + menuid,
cache: false,
success: function (html) {
$("div.sortable").html(html);
Index: module/master/itemtype/itemtype.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/master/itemtype/itemtype.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/master/itemtype/itemtype.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -1,11 +1,11 @@
<?php
/**
- * Comments Class
+ * ItemType Class
*
- * @package CMS Pro
- * @author wojoscripts.com
- * @copyright 2010
- * @version $Id: class_admin.php, v2.00 2011-04-20 10:12:05 gewa Exp $
+ * @package Yathav Sri Technology
+ * @author yathavtech.in
+ * @copyright 2017
+ * @version $Id: class_itemtype.php, v2.00 2011-04-20 10:12:05 gewa Exp $
*/
if (!defined("_VALID_PHP"))
@@ -19,9 +19,8 @@
public $EditPath = "index.php?mod=module&proj=master&do=itemtype&action=edit";
public $ListingPath = "index.php?mod=module&proj=master&do=itemtype&action=listing";
-
/**
- * Department constructor.
+ * ItemType constructor.
*/
function __construct()
{
@@ -29,13 +28,13 @@
}
/**
- * Department::getEvents()
+ * ItemType::getEvents()
*
* @return
*/
- public function LoadItemtypeGrid()
+ public function LoadItemtypeGrid($menuid)
{
- global $db, $core, $Tableinfo;
+ global $db, $core, $Tableinfo, $Menu;
$c = '';
$sql = "SELECT * FROM " . $Tableinfo->mas_itemtype . " as me";
$sql .= " where 1=1 AND IsActive=1 ";
@@ -65,9 +64,12 @@
$c .= '<td>'.$row['ItemType'].'</td>';
$c .= '<td>'.FieldStatus($row['IsActive']).'</td>';
$c .= '<td>';
- $c .= '<a href="'.$this->EditPath.'&id='.$row['ItemTypeId'].'" class="sepV_a" title="'.ITEMTYPE_Edit.'"><i class="icon-pencil"></i></a>';
- //$c .= '<a href="#" class="sepV_a" title="View"><i class="icon-eye-open"></i></a>';
- $c .= '<a href="javascript:void(0);" title="'.ITEMTYPE_Del.'" onclick="do_delete('.$row['ItemTypeId'].')"><i class="icon-trash"></i></a>';
+ if($Menu->CheckEditRights($menuid)) {
+ $c .= '<a href="' . $this->EditPath . '&id=' . $row['ItemTypeId'] . '" class="sepV_a" title="' . ITEMTYPE_Edit . '"><i class="icon-pencil"></i></a>';
+ }
+ if($Menu->CheckDeleteRights($menuid)) {
+ $c .= '<a href="javascript:void(0);" title="'.ITEMTYPE_Del.'" onclick="do_delete('.$row['ItemTypeId'].')"><i class="icon-trash"></i></a>';
+ }
$c .= '</td>';
$c .= '</tr>';
}
@@ -82,7 +84,7 @@
}
/**
- * Skills::getSkillsList()
+ * ItemType::getItemTypeList()
* @param bool $sel
* @param bool $IdName
* @param bool $onchange
@@ -154,6 +156,7 @@
print $core->msgStatus();
}
}
+
public function getItemTypeById($id){
global $db;
$sql = 'select ItemTypeId,ItemType, IsActive from '.$this->Table.' where ItemTypeId='.$id;
@@ -162,6 +165,7 @@
return ($row) ? $row : 0;
}
+
public function CheckItemTypeName($ItemType="", $ItemTypeId=0){
global $db;
@@ -183,6 +187,7 @@
$count = $db->numrows($sql);
return ($count > 0) ? 1 : 0;
}
+
private function getItemTypeId()
{
global $core, $DEBUG;
Index: module/master/item/item.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/master/item/item.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/master/item/item.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -32,9 +32,9 @@
*
* @return
*/
- public function LoadItemGrid()
+ public function LoadItemGrid($menuid)
{
- global $db, $core, $Tableinfo;
+ global $db, $core, $Tableinfo, $Menu;
$c = '';
$sql = "select it.ItemId,it.ItemCode,it.ItemName,ig.ItemGroup,uo3.UomName,tx.TaxName, it.IsActive, it.IsTaxable from mas_item as it
left join mas_itemgroup as ig on it.ItemGroupId=ig.ItemGroupId
@@ -78,9 +78,13 @@
$c .= '<td>'.FieldStatus($row['IsTaxable']).'</td>';
$c .= '<td>'.FieldStatus($row['IsActive']).'</td>';
$c .= '<td>';
- $c .= '<a href="'.$this->EditPath.'&id='.$row['ItemId'].'" class="sepV_a" title="'.UOM_Edit.'"><i class="icon-pencil"></i></a>';
+ if($Menu->CheckEditRights($menuid)) {
+ $c .= '<a href="' . $this->EditPath . '&id=' . $row['ItemId'] . '" class="sepV_a" title="' . UOM_Edit . '"><i class="icon-pencil"></i></a>';
+ }
//$c .= '<a href="#" class="sepV_a" title="View"><i class="icon-eye-open"></i></a>';
- $c .= '<a href="javascript:void(0);" title="'.ITEM_Del.'" onclick="do_delete('.$row['ItemId'].')"><i class="icon-trash"></i></a>';
+ if($Menu->CheckDeleteRights($menuid)) {
+ $c .= '<a href="javascript:void(0);" title="' . ITEM_Del . '" onclick="do_delete(' . $row['ItemId'] . ')"><i class="icon-trash"></i></a>';
+ }
$c .= '</td>';
$c .= '</tr>';
}
Index: class_info.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- class_info.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ class_info.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -106,6 +106,10 @@
$Country = new Country();
//Start CottonInward Class
+require_once(SETPATH . "/menu/menu.php");
+$Menu = new Menu();
+
+//Start Menu Class
require_once(TRNPATH . "/cottoninward/cottoninward.php");
$Cottoninward = new CottonInward();
Index: header_top.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- header_top.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ header_top.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -27,21 +27,27 @@
<nav>
<div class="nav-collapse">
<ul class="nav">
- <li class="dropdown">
- <?php
- $sql = "select * from menu as m where m.parent=0 AND m.show_after_login=1 order by m.menu_order ASC"
- ?>
+ <?php
+ $row_modules = $Menu->LoadModule();
+ foreach ($row_modules as $val_modules){
+ echo '<li class="dropdown">';
+ echo '<a data-toggle="dropdown" class="dropdown-toggle" href="#"><i class="icon-list-alt icon-white"></i> '.$val_modules['ModuleName'].' <b class="caret"></b></a>';
+ echo '<ul class="dropdown-menu">';
+ $row_menu = $Menu->LoadMenuByModuleId($val_modules['ModuleId']);
+ if($row_menu){
+ foreach ($row_menu as $val_menu){
+ if($Menu->GetRightsLists($val_menu['menu_id']) > 0) {
+ echo '<li><a href="index.php?mod=module&proj=' . $val_modules['ModuleTemplate'] . '&do=' . $val_menu['menu_template'] . '&action=listing">' . $val_menu['menu_name'] . '</a></li>';
+ }
+ }
+ }
+ echo '</ul>';
+ echo '</li>';
+ }
+ ?>
+ <!--<li class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="#"><i class="icon-list-alt icon-white"></i> Master <b class="caret"></b></a>
<ul class="dropdown-menu">
- <!--
- <li><a href="index.php?mod=module&proj=master&do=employee&action=listing">Employees</a></li>
- <li><a href="index.php?mod=module&proj=master&do=department&action=listing">Department</a></li>
- <li><a href="index.php?mod=module&proj=master&do=designation&action=listing">Designation</a></li>
- <li><a href="index.php?mod=module&proj=master&do=location&action=listing">Location</a></li>
- <li><a href="index.php?mod=module&proj=master&do=skills&action=listing">Skills</a></li>
- <li><a href="index.php?mod=module&proj=master&do=gender&action=listing">Gender</a></li>
- <li><a href="index.php?mod=module&proj=master&do=shift&action=listing">Shift</a></li>
- -->
<li><a href="index.php?mod=module&proj=master&do=itemtype&action=listing">ItemType</a></li>
<li><a href="index.php?mod=module&proj=master&do=itemgroup&action=listing">ItemGroup</a></li>
<li><a href="index.php?mod=module&proj=master&do=item&action=listing">Item</a></li>
@@ -65,74 +71,7 @@
<ul class="dropdown-menu">
<li><a href="index.php?mod=module&proj=settings&do=generalsettings&action=listing">General Settings </a></li>
</ul>
- </li>
- <!--<li class="dropdown">
- <a data-toggle="dropdown" class="dropdown-toggle" href="#"><i class="icon-list-alt icon-white"></i> Forms <b class="caret"></b></a>
- <ul class="dropdown-menu">
- <li><a href="form_elements.html">Form elements</a></li>
- <li><a href="form_extended.html">Extended form elements</a></li>
- <li><a href="form_validation.html">Form Validation</a></li>
- </ul>
- </li>
- <li class="dropdown">
- <a data-toggle="dropdown" class="dropdown-toggle" href="#"><i class="icon-th icon-white"></i> Components <b class="caret"></b></a>
- <ul class="dropdown-menu">
- <li><a href="alerts_btns.html">Alerts & Buttons</a></li>
- <li><a href="icons.html">Icons</a></li>
- <li><a href="notifications.html">Notifications</a></li>
- <li><a href="tables.html">Tables</a></li>
- <li><a href="tables_more.html">Tables (more examples)</a></li>
- <li><a href="tabs_accordion.html">Tabs & Accordion</a></li>
- <li><a href="tooltips.html">Tooltips, Popovers</a></li>
- <li><a href="typography.html">Typography</a></li>
- <li><a href="widgets.html">Widget boxes</a></li>
- <li class="dropdown">
- <a href="#">Sub menu <b class="caret-right"></b></a>
- <ul class="dropdown-menu">
- <li><a href="#">Sub menu 1.1</a></li>
- <li><a href="#">Sub menu 1.2</a></li>
- <li><a href="#">Sub menu 1.3</a></li>
- <li>
- <a href="#">Sub menu 1.4 <b class="caret-right"></b></a>
- <ul class="dropdown-menu">
- <li><a href="#">Sub menu 1.4.1</a></li>
- <li><a href="#">Sub menu 1.4.2</a></li>
- <li><a href="#">Sub menu 1.4.3</a></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li class="dropdown">
- <a data-toggle="dropdown" class="dropdown-toggle" href="#"><i class="icon-wrench icon-white"></i> Plugins <b class="caret"></b></a>
- <ul class="dropdown-menu">
- <li><a href="charts.html">Charts</a></li>
- <li><a href="calendar.html">Calendar</a></li>
- <li><a href="datatable.html">Datatable</a></li>
- <li><a href="file_manager.html">File Manager</a></li>
- <li><a href="floating_header.html">Floating List Header</a></li>
- <li><a href="google_maps.html">Google Maps</a></li>
- <li><a href="gallery.html">Gallery Grid</a></li>
- <li><a href="wizard.html">Wizard</a></li>
- </ul>
- </li>
- <li class="dropdown">
- <a data-toggle="dropdown" class="dropdown-toggle" href="#"><i class="icon-file icon-white"></i> Pages <b class="caret"></b></a>
- <ul class="dropdown-menu">
- <li><a href="chat.html">Chat</a></li>
- <li><a href="error_404.html">Error 404</a></li>
- <li><a href="mailbox.html">Mailbox</a></li>
- <li><a href="search_page.html">Search page</a></li>
- <li><a href="user_profile.html">User profile</a></li>
- <li><a href="user_static.html">User profile (static)</a></li>
- </ul>
- </li>
- <li>
- </li>
- <li>
- <a href="documentation.html"><i class="icon-book icon-white"></i> Help</a>
- </li>-->
+ </li>-->
</ul>
</div>
</nav>
Index: module/master/supplier/supplier.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/master/supplier/supplier.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/master/supplier/supplier.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -32,9 +32,9 @@
*
* @return
*/
- public function LoadSupplierGrid()
+ public function LoadSupplierGrid($menuid)
{
- global $db, $core, $Tableinfo;
+ global $db, $core, $Tableinfo, $Menu;
$c = '';
$sql = "select sup.SupplierId,sup.SupplierName,sup.PhoneNo,sup.GSTId,sup.IsActive,ct.CityName from mas_supplier as sup
left join mas_city as ct on sup.CityId=ct.CityId";
@@ -72,9 +72,13 @@
$c .= '<td>'.$row['GSTId'].'</td>';
$c .= '<td>'.FieldStatus($row['IsActive']).'</td>';
$c .= '<td>';
- $c .= '<a href="'.$this->EditPath.'&id='.$row['SupplierId'].'" class="sepV_a" title="'.SUPPLIER_Edit.'"><i class="icon-pencil"></i></a>';
+ if($Menu->CheckEditRights($menuid)) {
+ $c .= '<a href="' . $this->EditPath . '&id=' . $row['SupplierId'] . '" class="sepV_a" title="' . SUPPLIER_Edit . '"><i class="icon-pencil"></i></a>';
+ }
//$c .= '<a href="#" class="sepV_a" title="View"><i class="icon-eye-open"></i></a>';
- $c .= '<a href="javascript:void(0);" title="'.SUPPLIER_Del.'" onclick="do_delete('.$row['SupplierId'].')"><i class="icon-trash"></i></a>';
+ if($Menu->CheckDeleteRights($menuid)) {
+ $c .= '<a href="javascript:void(0);" title="' . SUPPLIER_Del . '" onclick="do_delete(' . $row['SupplierId'] . ')"><i class="icon-trash"></i></a>';
+ }
$c .= '</td>';
$c .= '</tr>';
}
Index: module/master/country/country.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/master/country/country.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/master/country/country.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -30,9 +30,9 @@
*
* @return
*/
- public function LoadCountryGrid()
+ public function LoadCountryGrid($menuid)
{
- global $db, $core, $Tableinfo;
+ global $db, $core, $Tableinfo, $Menu;
$c = '';
$sql = "SELECT * FROM " . $Tableinfo->mas_country." as me";
$sql .= " where 1=1 AND IsActive=1 ";
@@ -63,9 +63,13 @@
$c .= '<td>'.$row['CountryName'].'</td>';
$c .= '<td>'.FieldStatus($row['IsActive']).'</td>';
$c .= '<td>';
- $c .= '<a href="'.$this->EditPath.'&id='.$row['CountryId'].'" class="sepV_a" title="'.COUNTRY_Edit.'"><i class="icon-pencil"></i></a>';
+ if($Menu->CheckEditRights($menuid)) {
+ $c .= '<a href="' . $this->EditPath . '&id=' . $row['CountryId'] . '" class="sepV_a" title="' . COUNTRY_Edit . '"><i class="icon-pencil"></i></a>';
+ }
//$c .= '<a href="#" class="sepV_a" title="View"><i class="icon-eye-open"></i></a>';
- $c .= '<a href="javascript:void(0);" title="'.COUNTRY_Del.'" onclick="do_delete('.$row['CountryId'].')"><i class="icon-trash"></i></a>';
+ if($Menu->CheckDeleteRights($menuid)) {
+ $c .= '<a href="javascript:void(0);" title="' . COUNTRY_Del . '" onclick="do_delete(' . $row['CountryId'] . ')"><i class="icon-trash"></i></a>';
+ }
$c .= '</td>';
$c .= '</tr>';
}
Index: module/master/state/listing.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/master/state/listing.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/master/state/listing.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -29,7 +29,16 @@
<div class="row-fluid marginleft0 margintop0 marginbottom0">
<div class="block-border">
<div class="block-header">
- <h2><span><a class="button-sml" href="<?= $State->AddPath; ?>"><?= STATE_Add; ?></a></span><?= STATE_View; ?></h2>
+ <h2>
+ <?php
+ if($Menu->CheckAddRights($core->menuid)) {
+ ?>
+ <span><a class="button-sml" href="<?= $State->AddPath; ?>"><?= STATE_Add; ?></a></span>
+ <?php
+ }
+ ?>
+ <?= STATE_View; ?>
+ </h2>
</div>
</div>
<div class="block-content">
@@ -45,10 +54,11 @@
});
function loadList() {
+ var menuid = <?php echo $core->menuid; ?>;
$.ajax({
type: 'post',
url: "ajax.php",
- data: 'get_statelist=1',
+ data: 'get_statelist=1&menuid=' + menuid,
cache: false,
success: function (html) {
$("div.sortable").html(html);
Index: module/master/itemgroup/listing.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- module/master/itemgroup/listing.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ module/master/itemgroup/listing.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -31,7 +31,16 @@
<div class="row-fluid marginleft0 margintop0 marginbottom0">
<div class="block-border">
<div class="block-header">
- <h2><span><a class="button-sml" href="<?= $Itemgroup->AddPath; ?>"><?= strtoupper(_ADD.' '._ITEMGROUP); ?></a></span><?= _VIEW.' '._ITEMGROUP; ?></h2>
+ <h2>
+ <?php
+ if($Menu->CheckAddRights($core->menuid)) {
+ ?>
+ <span><a class="button-sml" href="<?= $Itemgroup->AddPath; ?>"><?= strtoupper(_ADD.' '._ITEMGROUP); ?></a></span>
+ <?php
+ }
+ ?>
+ <?= _VIEW.' '._ITEMGROUP; ?>
+ </h2>
</div>
</div>
<div class="block-content">
@@ -47,10 +56,11 @@
});
function loadList() {
+ var menuid = <?php echo $core->menuid; ?>;
$.ajax({
type: 'post',
url: "ajax.php",
- data: 'get_itemgrouplist=1',
+ data: 'get_itemgrouplist=1&menuid=' + menuid,
cache: false,
success: function (html) {
$("div.sortable").html(html);
Index: config.ini.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config.ini.php (revision 21:d5051d18f96f3753365670a8ee393903fdf5e5e2)
+++ config.ini.php (revision 22:21dc38bff3dbdbac2c23dfd96db2a7e2c6a4e4e3)
@@ -15,9 +15,15 @@
* Database Constants - these constants refer to
* the database configuration settings.
*/
- define('DB_SERVER', '192.168.1.5');
+ /*define('DB_SERVER', '192.168.1.5');
define('DB_USER', 'yathav');
define('DB_PASS', 'King@7499!');
+ define('DB_DATABASE', 'jegan_spinning_erp');
+ define('DB_PORT', 3306);*/
+
+ define('DB_SERVER', 'localhost');
+ define('DB_USER', 'root');
+ define('DB_PASS', 'king74991');
define('DB_DATABASE', 'jegan_spinning_erp');
define('DB_PORT', 3306);
@@ -26,4 +32,4 @@
* Not recomended for live site. true/false
*/
$DEBUG = true;
-?>