plugins/SpecialAdmin.php
changeset 1251 d543689ed2eb
parent 1249 81b03b3e88d0
child 1274 673a1b6712fa
equal deleted inserted replaced
1250:d2db9f3628ab 1251:d543689ed2eb
   271 		setConfig('avatar_directory', 'files/avatars');
   271 		setConfig('avatar_directory', 'files/avatars');
   272 		
   272 		
   273 		setConfig('userpage_grant_acl', ( isset($_POST['userpage_grant_acl']) ? '1' : '0' ));
   273 		setConfig('userpage_grant_acl', ( isset($_POST['userpage_grant_acl']) ? '1' : '0' ));
   274 		setConfig('gzip_output', ( isset($_POST['gzip_output']) ? '1' : '0' ));
   274 		setConfig('gzip_output', ( isset($_POST['gzip_output']) ? '1' : '0' ));
   275 		
   275 		
       
   276 		if ( isset($_POST['trust_xff']) )
       
   277 		{
       
   278 			setConfig('trust_xff', $_POST['trust_xff_type']);
       
   279 		}
       
   280 		else
       
   281 		{
       
   282 			setConfig('trust_xff', 'none');
       
   283 		}
       
   284 		
   276 		// Allow plugins to save their changes
   285 		// Allow plugins to save their changes
   277 		$code = $plugins->setHook('acp_general_save');
   286 		$code = $plugins->setHook('acp_general_save');
   278 		foreach ( $code as $cmd )
   287 		foreach ( $code as $cmd )
   279 		{
   288 		{
   280 			eval($cmd);
   289 			eval($cmd);
   570 					?>
   579 					?>
   571 					</select>
   580 					</select>
   572 				</td>
   581 				</td>
   573 			</tr>
   582 			</tr>
   574 		
   583 		
   575 		<!-- CDN settings -->
   584 		<!-- CDN URL -->
       
   585 		
       
   586 			<tr><th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_server_settings'); ?></th></tr>
   576 		
   587 		
   577 			<tr>
   588 			<tr>
   578 				<td class="row2">
   589 				<td class="row2">
   579 					<p>
   590 					<p>
   580 						<?php echo $lang->get('acpgc_field_cdn_path'); ?><br />
   591 						<?php echo $lang->get('acpgc_field_cdn_path'); ?><br />
   602 					<div id="gzip_check_result"></div>
   613 					<div id="gzip_check_result"></div>
   603 					<label>
   614 					<label>
   604 						<input type="checkbox" name="gzip_output" <?php if ( getConfig('gzip_output', false) == 1 ) echo 'checked="checked" '; ?>/>
   615 						<input type="checkbox" name="gzip_output" <?php if ( getConfig('gzip_output', false) == 1 ) echo 'checked="checked" '; ?>/>
   605 						<?php echo $lang->get('acpgc_field_gzip_lbl'); ?>
   616 						<?php echo $lang->get('acpgc_field_gzip_lbl'); ?>
   606 					</label>
   617 					</label>
       
   618 				</td>
       
   619 			</tr>
       
   620 			
       
   621 		<!-- XFF -->
       
   622 		
       
   623 			<tr>
       
   624 				<td class="row2">
       
   625 					<b><?php echo $lang->get('acpgc_field_xff'); ?></b><br />
       
   626 					<small><?php echo $lang->get('acpgc_field_xff_hint'); ?></small>
       
   627 				</td>
       
   628 				<td class="row2">
       
   629 					<label>
       
   630 						<input type="checkbox" name="trust_xff" onclick="$('#trust_xff_body').toggle('blind');"<?php if ( in_array(getConfig('trust_xff', 'none'), array('ipv4', 'ipv6', 'both'))) echo ' checked="checked"'; ?> />
       
   631 						<?php echo $lang->get('acpgc_field_xff_checkbox'); ?>
       
   632 					</label>
       
   633 					<div id="trust_xff_body" style="margin: 5px 0 0 10px; display: <?php echo ( in_array(getConfig('trust_xff', 'none'), array('ipv4', 'ipv6', 'both')) ) ? "block" : "none"; ?>;">
       
   634 						<label>
       
   635 							<input type="radio" name="trust_xff_type" value="both"<?php if ( getConfig('trust_xff', 'none') == 'both' || getConfig('trust_xff', 'none') == 'none' ) echo ' checked="checked"'; ?> />
       
   636 							<?php echo $lang->get('acpgc_field_xff_radio_both'); ?>
       
   637 						</label>
       
   638 						<br />
       
   639 						<label>
       
   640 							<input type="radio" name="trust_xff_type" value="ipv4"<?php if ( getConfig('trust_xff', 'none') == 'ipv4' ) echo ' checked="checked"'; ?> />
       
   641 							<?php echo $lang->get('acpgc_field_xff_radio_ipv4'); ?>
       
   642 						</label>
       
   643 						<br />
       
   644 						<label>
       
   645 							<input type="radio" name="trust_xff_type" value="ipv6"<?php if ( getConfig('trust_xff', 'none') == 'ipv6' ) echo ' checked="checked"'; ?> />
       
   646 							<?php echo $lang->get('acpgc_field_xff_radio_ipv6'); ?>
       
   647 						</label>
       
   648 					</div>
   607 				</td>
   649 				</td>
   608 			</tr>
   650 			</tr>
   609 			
   651 			
   610 		<!-- Allow plugins to add code -->
   652 		<!-- Allow plugins to add code -->
   611 			<?php
   653 			<?php