Esempio n. 1
0
/**
 *
 * @TODO document
 *
 */
function pagelines_admin_errors()
{
    $errors = array();
    if (ie_version() && ie_version() < 8) {
        $errors['ie']['title'] = sprintf(__('You are using Internet Explorer version: %s', 'pagelines'), ie_version());
        $errors['ie']['text'] = __("Advanced options don't support Internet Explorer version 7 or lower. Please switch to a standards based browser that will allow you to easily configure your site (e.g. Firefox, Chrome, Safari, even IE8 or better would work).", 'pagelines');
    }
    if (floatval(phpversion()) < 5.0) {
        $errors['php']['title'] = sprintf(__('You are using PHP version %s', 'pagelines'), phpversion());
        $errors['php']['text'] = __('Version 5 or higher is required for this theme to work correctly. Please check with your host about upgrading to a newer version.', 'pagelines');
    }
    if (isset($_GET['extend_error'])) {
        $errors['extend']['title'] = __('Extension problem found', 'pagelines');
        switch ($_GET['extend_error']) {
            case 'blank':
                $errors['extend']['text'] = __('No file selected!', 'pagelines');
                break;
            case 'filename':
                $errors['extend']['text'] = __('The file did not appear to be a PageLines section.', 'pagelines');
                break;
            default:
                $errors['extend']['text'] = sprintf(__('Unknown error: %s', 'pagelines'), $_GET['extend_error']);
                break;
        }
    }
    return apply_filters('pagelines_admin_notifications', $errors);
}
Esempio n. 2
0
function build_header(){?>
			<div class='wrap'>
				<table id="optionstable"><tbody><tr><td valign="top" width="100%">
					
				  <form id="epanel-settings-form" method="post" action="options.php" class="main_settings_form">
					
						 <!-- hidden fields -->
							<?php wp_nonce_field('update-options') ?>
							<?php settings_fields(EPANEL_SETTINGS); // important! ?>
							
							<input type="hidden" name="<?php echo EPANEL_SETTINGS; ?>[theme_version]>" value="<?php echo esc_attr(epanel_option('theme_version')); ?>" />
							<input type="hidden" name="<?php echo EPANEL_SETTINGS; ?>[selectedtab]" id="selectedtab" value="<?php print_epanel_option('selectedtab', 0); ?>" />
							<input type="hidden" name="<?php echo EPANEL_SETTINGS; ?>[just_saved]" id="just_saved" value="1" />
							<input type="hidden" id="input-full-submit" name="input-full-submit" value="0" />
							
							<?php $this->_get_confirmations_and_system_checking(); ?>
							

					<?php
					
						if(isset($_COOKIE['EPANEL_WPTabCookie']))
							$selected_tab = (int) $_COOKIE['EPANEL_WPTabCookie'];
						elseif(epanel_option('selectedtab'))
							$selected_tab = epanel_option('selectedtab');
						else
							$selected_tab = 0;
				
					//echo $_COOKIE['EPANEL_WPTabCookie'];
					?>
				
						<script type="text/javascript">
								jQuery.noConflict();
								jQuery(document).ready(function($) {						
									var $myTabs = $("#tabs").tabs({ fx: { opacity: "toggle", duration: "fast" }, selected: <?php echo $selected_tab; ?>});
									
									$('#tabs').bind('tabsshow', function(event, ui) {
										
										var selectedTab = $('#tabs').tabs('option', 'selected');
										
										$("#selectedtab").val(selectedTab);
										
										$.cookie('EPANEL_WPTabCookie', selectedTab);
									});

								});
						</script>
								
								
									
									<div id="header">
									
										<h2>E-Panel Theme Configuration</h2>
									
									</div>

									<?php $theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); ?>
									
									<?php if(isset($_GET['updated']) || isset($_GET['pageaction']) || isset($_GET['reset'])):?>
													
											<div id="message" class="confirmation slideup_message fade <?php if(isset($_GET['reset']) && !isset($_GET['updated'])) echo ' reset'; elseif(isset($_GET['pageaction']) && $_GET['pageaction']=='activated' && !isset($_GET['updated'])) echo ' activated'; elseif($_GET['pageaction']=='import' && !isset($_GET['updated'])) echo 'settings-import';?>" style="">
												<div class="confirmation-pad">
													<?php if(isset($_GET['updated'])) echo THEMENAME.' Settings Saved. &nbsp;<a class="sh_preview" href="'.home_url().'/" target="_blank" target-position="front">View Your Site &rarr;</a>' ;
														
														elseif(isset($_GET['pageaction']) && $_GET['pageaction']=='activated' && !isset($_GET['updated'])) echo "Congratulations! ".THEMENAME ." Has Been Successfully Activated. Remember To Check The Documentation.";
														
														elseif(isset($_GET['pageaction']) && $_GET['pageaction']=='import' && isset($_GET['imported']) && !isset($_GET['updated'])) echo "Congratulations! New settings have been successfully imported.";
														
														elseif(isset($_GET['pageaction']) && $_GET['pageaction']=='import' && isset($_GET['error']) && !isset($_GET['updated'])) echo "There was an error with import. Please make sure you are using the correct file.";
														
														elseif(isset($_GET['reset']) && isset($_GET['opt_id']) && $_GET['opt_id'] == 'resettemplates') echo "Template Configuration Restored To Default.";
														
														elseif(isset($_GET['reset']) && isset($_GET['opt_id']) && $_GET['opt_id'] == 'resetlayout') echo "Layout Dimensions Restored To Default.";
														
														elseif(isset($_GET['reset'])) echo "Settings Successfully Restored To Default Values.";
															?>
															</div>
														</div>
														
												<?php endif;?>
									
									
									
									<?php if(ini_get('safe_mode')):?>
										<div id="message" class="confirmation fade plerror">
											<div class="confirmation-pad">
												
													Your server is currently running PHP in 'Safe Mode' a deprecated security feature used by some hosts.<br/>
													This causes issues with <?php echo $theme_data['Title'];?> Theme, please contact your host to disable the Safe Mode.
											</div>
									
										</div>
									
									<?php endif;?>
									
									<?php if(floatval(phpversion()) < 5.2):?>
									<div id="message" class="confirmation plerror fade">	
										<div class="confirmation-pad">
											<div class="confirmation-head">You are using PHP version <?php echo phpversion(); ?></div>
											<div class="confirmation-subtext">
												Version 5.2 or higher is required for this theme to work correctly. Please contact your hosting provider and request an update. 
											</div>
										</div>
									</div>
									<?php endif;?>
									
									<?php if(ie_version() && ie_version() < 8):?>
									<div id="message" class="confirmation plerror fade">	
										<div class="confirmation-pad">
											<div class="confirmation-head">You are using Internet Explorer version: <?php echo ie_version();?></div>
											<div class="confirmation-subtext">
												Advanced options don't support Internet Explorer version 7 or lower. Please switch to a standards based browser that will allow you to easily configure your site (e.g. Firefox, Chrome, Safari, even IE8 or better would work).
											</div>
										</div>
									</div>
									
									<?php endif; ?>
												
									<div id="optionssubheader">
										<div class="hl"></div>
										<div class="padding fix">
											<div class="subheader_links">
												<a class="sh_preview" href="<?php echo home_url(); ?>/" target="_blank" target-position="front">View Your Website</a>
					
												<a class="sh_support" href="<?php support_url();?>" target="_blank" ><?php _e('Support', 'epanel');?></a>
												<a class="sh_version" href="<?php theme_url();?>" target="_blank" ><?php _e('Theme Version : ', 'epanel'); echo $theme_data['Version'];?></a>
											</div>

											<div class="subheader_right">

												<input class="button-primary" type="submit" name="submit" value="<?php _e('Save Theme Settings', 'epanel');?>" />
											</div>
										</div>
									</div>



									<div class="clear"></div>
								</div>
		<?php }
Esempio n. 3
0
function iexplorer($arch)
{
    $ie_extra = array('', '; .NET CLR 1.1.' . rand(4320, 4325) . '', '; WOW64');
    $nt = nt_version();
    $ie = ie_version();
    $trident = trident_version();
    return "(compatible; MSIE {$ie}; Windows NT {$nt}; Trident/{$trident})";
}
Esempio n. 4
0
    function _get_confirmations_and_system_checking()
    {
        if (isset($_GET['updated']) || isset($_GET['pageaction']) || isset($_GET['reset'])) {
            ?>
				
					<div id="message" class="confirmation fade <?php 
            if (isset($_GET['reset']) && !isset($_GET['updated'])) {
                echo ' reset';
            } elseif (isset($_GET['pageaction']) && $_GET['pageaction'] == 'activated' && !isset($_GET['updated'])) {
                echo ' activated';
            } elseif ($_GET['pageaction'] == 'import' && !isset($_GET['updated'])) {
                echo 'settings-import';
            }
            ?>
" style="">
						<div class="confirmation-pad">
<?php 
            if (isset($_GET['updated'])) {
                echo THEMENAME . ' Settings Saved. &nbsp;<a class="sh_preview" href="' . get_option('home') . '/" target="_blank" target-position="front">View Your Site &rarr;</a>';
            } elseif (isset($_GET['pageaction']) && $_GET['pageaction'] == 'activated' && !isset($_GET['updated'])) {
                echo "Congratulations! " . THEMENAME . " Has Been Successfully Activated.";
            } elseif (isset($_GET['pageaction']) && $_GET['pageaction'] == 'import' && isset($_GET['imported']) && !isset($_GET['updated'])) {
                echo "Congratulations! New settings have been successfully imported.";
            } elseif (isset($_GET['pageaction']) && $_GET['pageaction'] == 'import' && isset($_GET['error']) && !isset($_GET['updated'])) {
                echo "There was an error with import. Please make sure you are using the correct file.";
            } elseif (isset($_GET['reset']) && isset($_GET['opt_id']) && $_GET['opt_id'] == 'resettemplates') {
                echo "Template Configuration Restored To Default.";
            } elseif (isset($_GET['reset']) && isset($_GET['opt_id']) && $_GET['opt_id'] == 'resetlayout') {
                echo "Layout Dimensions Restored To Default.";
            } elseif (isset($_GET['reset'])) {
                echo "Settings Restored To Default.";
            }
            ?>
						</div>
					</div>
			<?php 
        }
        ?>
			
			<?php 
        if (!is_writable(CORE . '/css/dynamic.css')) {
            ?>
			<div id="message" class="confirmation plerror fade">	
				<div class="confirmation-pad">
					<div class="confirmation-head">Dynamic CSS File Not Writable</div>
					<div class="confirmation-subtext">
						Your dynamic CSS file is not writable by the server. To fix just change the file permissions of your dynamic.css file to 666, and you'll be all set. After setting your file permissions, hit the save button so your dynamic CSS can be generated.  <br/>
						<strong>The file is located here: <?php 
            echo CORE . '/css/dynamic.css';
            ?>
</strong>
					</div>
				</div>
			</div>
			<?php 
        }
        ?>
			
			<?php 
        if (floatval(phpversion()) < 5.0) {
            ?>
			<div id="message" class="confirmation plerror fade">	
				<div class="confirmation-pad">
					<div class="confirmation-head">You are using PHP version <?php 
            echo phpversion();
            ?>
</div>
					<div class="confirmation-subtext">
						Version 5 or higher is required for this theme to work correctly. Please check with your host about upgrading to a newer version. 
					</div>
				</div>
			</div>
			<?php 
        }
        ?>
			
			<?php 
        if (ie_version() && ie_version() < 8) {
            ?>
			<div id="message" class="confirmation plerror fade">	
				<div class="confirmation-pad">
					<div class="confirmation-head">You are using Internet Explorer version: <?php 
            echo ie_version();
            ?>
</div>
					<div class="confirmation-subtext">
						Advanced options don't support Internet Explorer version 7 or lower. Please switch to a standards based browser that will allow you to easily configure your site (e.g. Firefox, Chrome, Safari, even IE8 or better would work).
					</div>
				</div>
			</div>
<?php 
        }
        do_action('pagelines_config_checking');
    }
function pagelines_admin_errors()
{
    $errors = array();
    if (ie_version() && ie_version() < 8) {
        $errors['ie']['title'] = 'You are using Internet Explorer version: ' . ie_version();
        $errors['ie']['text'] = "Advanced options don't support Internet Explorer version 7 or lower. Please switch to a standards based browser that will allow you to easily configure your site (e.g. Firefox, Chrome, Safari, even IE8 or better would work).";
    }
    if (floatval(phpversion()) < 5.0) {
        $errors['php']['title'] = 'You are using PHP version ' . phpversion();
        $errors['php']['text'] = "Version 5 or higher is required for this theme to work correctly. Please check with your host about upgrading to a newer version.";
    }
    return apply_filters('pagelines_admin_notifications', $errors);
}