plugins/SpecialAdmin.php
changeset 1246 330f4de4c937
parent 1227 bdac73ed481e
child 1247 30f023a13a71
equal deleted inserted replaced
1243:db42b7c50e57 1246:330f4de4c937
  1108 		echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>';
  1108 		echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>';
  1109 		echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>';
  1109 		echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>';
  1110 		return;
  1110 		return;
  1111 	}
  1111 	}
  1112 	
  1112 	
       
  1113 	if ( isset($_GET['act']) && $_GET['act'] == 'verify_path' )
       
  1114 	{
       
  1115 		$path = $_POST['path'];
       
  1116 		$result = @file_exists($path) && @is_file($path) && @is_executable($path);
       
  1117 		echo $result ? 'true' : 'false';
       
  1118 		return;
       
  1119 	}
       
  1120 	
  1113 	if(isset($_POST['save']))
  1121 	if(isset($_POST['save']))
  1114 	{
  1122 	{
  1115 		if(isset($_POST['enable_uploads']) && getConfig('enable_uploads') != '1')
  1123 		if(isset($_POST['enable_uploads']) && getConfig('enable_uploads') != '1')
  1116 		{
  1124 		{
  1117 			$q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,edit_summary,author,author_uid) VALUES(\'security\',\'upload_enable\',' . time() . ',\'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\',\'' . $db->escape($session->username) . '\', ' . $session->user_id . ');');
  1125 			$q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,edit_summary,author,author_uid) VALUES(\'security\',\'upload_enable\',' . time() . ',\'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\',\'' . $db->escape($session->username) . '\', ' . $session->user_id . ');');
  1216 		<label>
  1224 		<label>
  1217 			<input type="checkbox" name="enable_imagemagick" <?php if(getConfig('enable_imagemagick')=='1') echo 'checked="checked"'; ?> />
  1225 			<input type="checkbox" name="enable_imagemagick" <?php if(getConfig('enable_imagemagick')=='1') echo 'checked="checked"'; ?> />
  1218 			<?php echo $lang->get('acpup_field_magick_enable'); ?>
  1226 			<?php echo $lang->get('acpup_field_magick_enable'); ?>
  1219 		</label>
  1227 		</label>
  1220 		<br />
  1228 		<br />
  1221 		<?php echo $lang->get('acpup_field_magick_path'); ?> <input type="text" name="imagemagick_path" value="<?php if(getConfig('imagemagick_path')) echo getConfig('imagemagick_path'); else echo '/usr/bin/convert'; ?>" /><br />
  1229 		<?php echo $lang->get('acpup_field_magick_path'); ?> <input type="text" name="imagemagick_path" value="<?php echo htmlspecialchars(getConfig('imagemagick_path'), '/usr/bin/convert'); ?>" onkeyup="ajaxVerifyFilePath(this);" /><br />
  1222 		<?php echo $lang->get('acpup_field_magick_path_hint'); ?>
  1230 		<?php echo $lang->get('acpup_field_magick_path_hint'); ?>
  1223 	</p>
  1231 	</p>
  1224  		
  1232  		
  1225 	<p><?php echo $lang->get('acpup_info_cache'); ?></p>
  1233 	<p><?php echo $lang->get('acpup_info_cache'); ?></p>
  1226 	<p>
  1234 	<p>