@@ -1439,6 +1439,49 @@ function InputStandard($type, $status_arr = "")
1439
1439
$ out .= '<input ' .$ status_theme .' type="text" name="conf[webservice][WS_DOL_URL]" value=" ' .$ configuration ->conf ["webservice " ]["WS_DOL_URL " ].'"> ' ;
1440
1440
break ;
1441
1441
1442
+ case 'proxy_conf ' :
1443
+ if ($ configuration ->conf ["proxy " ]["proxyOn " ] == 1 ) $ onoroff = 'checked="" ' ;
1444
+ else $ onoroff = '' ;
1445
+
1446
+ $ out .= '<div data-role="collapsible" id="conf-proxy-detail" data-theme="b" data-content-theme="a"> ' ;
1447
+ $ out .= '<h2> ' .$ langs ->trans ("ProxyConfiguration " ).'</h2> ' ;
1448
+ $ out .= '<ul data-role="listview"> ' ;
1449
+
1450
+ // switch On
1451
+ $ out .= '<li id="proxy_switchDIV" class="ui-field-contain"> ' ;
1452
+ $ out .= '<legend> ' .$ langs ->trans ("LabelProxy " ).': ' .$ this ->tooltip ($ type .'tool ' , $ langs ->trans ("LabelProxyDesc " )).'</legend> ' ;
1453
+ $ out .= '<input ' .$ status_theme .' type="checkbox" data-role="flipswitch" name="conf[proxy][proxyOn]" id="proxy_switch" ' .$ onoroff .' data-theme="b"> ' ;
1454
+ $ out .= '</li> ' ;
1455
+
1456
+ // IP
1457
+ $ out .= '<li id="proxyIPDIV" class="ui-field-contain"> ' ;
1458
+ $ out .= '<legend> ' .$ langs ->trans ("LabelProxy_ip " ).': ' .$ this ->tooltip ($ type .'tool ' , $ langs ->trans ("LabelProxy_ipDesc " )).'</legend> ' ;
1459
+ $ out .= '<input ' .$ status_theme .' type="text" name="conf[proxy][proxyIP]" value=" ' .$ configuration ->conf ["proxy " ]["proxyIP " ].'"> ' ;
1460
+ $ out .= '</li> ' ;
1461
+
1462
+ // Port
1463
+ $ out .= '<li id="proxyPortDIV" class="ui-field-contain"> ' ;
1464
+ $ out .= '<legend> ' .$ langs ->trans ("LabelProxy_port " ).': ' .$ this ->tooltip ($ type .'tool ' , $ langs ->trans ("LabelProxy_portDesc " )).'</legend> ' ;
1465
+ $ out .= '<input ' .$ status_theme .' type="text" name="conf[proxy][proxyPort]" value=" ' .$ configuration ->conf ["proxy " ]["proxyPort " ].'"> ' ;
1466
+ $ out .= '</li> ' ;
1467
+
1468
+ // UserName
1469
+ $ out .= '<li id="proxyUserNameDIV" class="ui-field-contain"> ' ;
1470
+ $ out .= '<legend> ' .$ langs ->trans ("LabelProxy_username " ).': ' .$ this ->tooltip ($ type .'tool ' , $ langs ->trans ("LabelProxy_usernameDesc " )).'</legend> ' ;
1471
+ $ out .= '<input ' .$ status_theme .' type="text" name="conf[proxy][proxyUserName]" value=" ' .$ configuration ->conf ["proxy " ]["proxyUserName " ].'"> ' ;
1472
+ $ out .= '</li> ' ;
1473
+
1474
+ // UserPass
1475
+ $ out .= '<li id="proxyUserPassDIV" class="ui-field-contain"> ' ;
1476
+ $ out .= '<legend> ' .$ langs ->trans ("LabelProxy_password " ).': ' .$ this ->tooltip ($ type .'tool ' , $ langs ->trans ("LabelProxy_passwordDesc " )).'</legend> ' ;
1477
+ $ out .= '<input ' .$ status_theme .' type="text" name="conf[proxy][proxyUserPass]" value=" ' .$ configuration ->conf ["proxy " ]["proxyUserPass " ].'"> ' ;
1478
+ $ out .= '</li> ' ;
1479
+
1480
+ $ out .= '</ul> ' ;
1481
+ $ out .= '</div> ' ; // DETAILS
1482
+
1483
+ break ;
1484
+
1442
1485
case 'capview ' :
1443
1486
$ out = '<textarea id="capviewtextarea" readonly name="capeditfield"></textarea> ' ;
1444
1487
$ out .= '<input type="button" value="edit" onclick="$( \'#capviewtextarea \').prop( \'readonly \', \'\'); $( \'#capedit \').val(true)"> ' ;
@@ -2493,11 +2536,11 @@ function Webservice($ID)
2493
2536
$ out .= '<div data-theme="a" data-form="ui-body-a" class="ui-body ui-body-a ui-corner-all"> ' ;
2494
2537
2495
2538
// decryp password
2496
- $ configuration ->set ("webservice " , "password " , $ this ->encrypt_decrypt (2 , $ configuration ->conf ["webservice " ]["password " ]));
2539
+ $ configuration ->setValue ("webservice " , "password " , $ this ->encrypt_decrypt (2 , $ configuration ->conf ["webservice " ]["password " ]));
2497
2540
2498
2541
include ("lib/cap.webservices.php " );
2499
2542
2500
- $ configuration ->set ("webservice " , "password " ,$ this ->encrypt_decrypt (1 , $ configuration ->conf ["webservice " ]["password " ]));
2543
+ $ configuration ->setValue ("webservice " , "password " ,$ this ->encrypt_decrypt (1 , $ configuration ->conf ["webservice " ]["password " ]));
2501
2544
2502
2545
$ out .= '</div> ' ;
2503
2546
@@ -2688,7 +2731,7 @@ function PostToConf($post)
2688
2731
*/
2689
2732
if (!empty ($ post ['user ' ]['lang ' ]))
2690
2733
{
2691
- $ configuration ->set ("user " , "language " , $ post ['user ' ]['lang ' ]);
2734
+ $ configuration ->setValue ("user " , "language " , $ post ['user ' ]['lang ' ]);
2692
2735
}
2693
2736
2694
2737
// set langs
@@ -2736,31 +2779,31 @@ function PostToConf($post)
2736
2779
// specifie the automatic time set
2737
2780
if ($ post ['identifier ' ]['time ' ]['on ' ] == "on " )
2738
2781
{
2739
- $ configuration ->set ("identifier " , "time_on " , 1 );
2782
+ $ configuration ->setValue ("identifier " , "time_on " , 1 );
2740
2783
}
2741
2784
else
2742
2785
{
2743
- $ configuration ->set ("identifier " , "time_on " , 0 );
2786
+ $ configuration ->setValue ("identifier " , "time_on " , 0 );
2744
2787
}
2745
2788
unset($ post ['identifier ' ]['time ' ]);
2746
2789
2747
2790
if ($ post ['cap ' ]['save ' ] == "on " )
2748
2791
{
2749
- $ configuration ->set ("cap " , "save " , 1 );
2792
+ $ configuration ->setValue ("cap " , "save " , 1 );
2750
2793
}
2751
2794
else
2752
2795
{
2753
- $ configuration ->set ("cap " , "save " , 0 );
2796
+ $ configuration ->setValue ("cap " , "save " , 0 );
2754
2797
}
2755
2798
unset($ post ['cap ' ]['save ' ]);
2756
2799
2757
2800
if ($ post ['webservice ' ]['on ' ] == "on " )
2758
2801
{
2759
- $ configuration ->set ("webservice " , "service_on " , 1 );
2802
+ $ configuration ->setValue ("webservice " , "service_on " , 1 );
2760
2803
}
2761
2804
else
2762
2805
{
2763
- $ configuration ->set ("webservice " , "service_on " , 0 );
2806
+ $ configuration ->setValue ("webservice " , "service_on " , 0 );
2764
2807
}
2765
2808
unset($ post ['webservice ' ]['on ' ]);
2766
2809
@@ -2771,14 +2814,30 @@ function PostToConf($post)
2771
2814
}
2772
2815
else
2773
2816
{
2774
- $ configuration ->set ("webservice " , "password " , $ this ->encrypt_decrypt (1 , $ post ['webservice ' ]['password ' ]));
2817
+ $ configuration ->setValue ("webservice " , "password " , $ this ->encrypt_decrypt (1 , $ post ['webservice ' ]['password ' ]));
2775
2818
unset($ post ['webservice ' ]['password ' ]);
2776
2819
}
2777
2820
2821
+ if ($ post ['proxy ' ]['proxyOn ' ] == "on " )
2822
+ {
2823
+ $ configuration ->setValue ("proxy " , "proxyOn " , 1 );
2824
+ }
2825
+ else
2826
+ {
2827
+ $ configuration ->setValue ("proxy " , "proxyOn " , 0 );
2828
+ }
2829
+ unset($ post ['proxy ' ]['proxyOn ' ]);
2830
+
2831
+ // crypt pass
2832
+ if ($ configuration ->conf ["proxy " ]["proxyUserPass " ] != $ post ['proxy ' ]['proxyUserPass ' ])
2833
+ {
2834
+ $ configuration ->setValue ("proxy " , "proxyUserPass " , $ post ['proxy ' ]['proxyUserPass ' ]);
2835
+ unset($ post ['proxy ' ]['proxyUserPass ' ]);
2836
+ }
2778
2837
2779
2838
if (!empty ($ post ['timezone ' ]))
2780
2839
{
2781
- $ configuration ->set ("installed " , "timezone " , $ post ['timezone ' ]);
2840
+ $ configuration ->setValue ("installed " , "timezone " , $ post ['timezone ' ]);
2782
2841
}
2783
2842
2784
2843
/*
@@ -2798,26 +2857,26 @@ function PostToConf($post)
2798
2857
{
2799
2858
foreach ($ obj_2_val as $ obj_3_name => $ obj_3_val )
2800
2859
{
2801
- $ configuration ->set ($ obj_name , $ obj_2_name ."_ " .$ obj_3_name , $ obj_3_val );
2860
+ $ configuration ->setValue ($ obj_name , $ obj_2_name ."_ " .$ obj_3_name , $ obj_3_val );
2802
2861
} // Level 2
2803
2862
}
2804
2863
else
2805
2864
{
2806
- $ configuration ->set ($ obj_name , $ obj_2_name , $ obj_2_val );
2865
+ $ configuration ->setValue ($ obj_name , $ obj_2_name , $ obj_2_val );
2807
2866
}
2808
2867
2809
2868
} // Level 1
2810
2869
}
2811
2870
else
2812
2871
{
2813
- $ configuration ->set ($ obj_name , $ obj_1_name , $ obj_1_val );
2872
+ $ configuration ->setValue ($ obj_name , $ obj_1_name , $ obj_1_val );
2814
2873
}
2815
2874
2816
2875
} // Base
2817
2876
}
2818
2877
else
2819
2878
{
2820
- $ configuration ->set ($ obj_name , "" , $ obj_val );
2879
+ $ configuration ->setValue ($ obj_name , "" , $ obj_val );
2821
2880
}
2822
2881
2823
2882
}
0 commit comments