function googleapp()
{
    echo admin_tabs();
    if (has_action('connection')) {
        do_action('connection');
    }
    if (has_action('ukuumailchimp')) {
        do_action('ukuumailchimp');
    }
}
Esempio n. 2
0
$globals['ads'] = false;
do_header(_('Administración de bans'));
$page_size = 40;
$offset = (get_current_page() - 1) * $page_size;
$ban_text_length = 64;
// Cambiar también en checkfield.php
$ban_comment_length = 120;
if ($current_user->admin) {
    if (!$_REQUEST["admin"]) {
        $_REQUEST["admin"] = 'hostname';
    } else {
        $_REQUEST["admin"] = clean_input_string($_REQUEST["admin"]);
    }
    // Delete expired bans
    $db->query("delete from bans where ban_expire is not null and ban_expire < date_sub(now(), interval 60 day)");
    admin_tabs($_REQUEST["admin"]);
    echo '<div id="singlewrap">' . "\n";
    admin_bans($_REQUEST["admin"]);
} else {
    echo '<div id="singlewrap">' . "\n";
    echo '<div class="topheading"><h2>' . _('Esta página es sólo para administradores') . '</h2>';
}
echo "</div>";
echo "</div>";
// singlewrap
do_footer();
function admin_tabs($tab_selected = false)
{
    global $globals;
    $active = ' class="tabsub-this"';
    echo '<ul class="tabsub">' . "\n";
Esempio n. 3
0
function settings_page()
{
    global $pagenow;
    $settings = get_option("theme_settings");
    $theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
    ?>
	
	<div class="wrap">
		<h2><?php 
    echo $theme_data['Name'];
    ?>
 Theme Settings</h2>
		
		<?php 
    if ('true' == esc_attr($_GET['updated'])) {
        echo '<div class="updated" ><p>Theme Settings updated.</p></div>';
    }
    if (isset($_GET['tab'])) {
        admin_tabs($_GET['tab']);
    } else {
        admin_tabs('general');
    }
    ?>

		<div id="poststuff">
			<form method="post" action="<?php 
    admin_url('themes.php?page=theme-settings');
    ?>
">
				<?php 
    wp_nonce_field("ilc-settings-page");
    if ($pagenow == 'themes.php' && $_GET['page'] == 'theme-settings') {
        if (isset($_GET['tab'])) {
            $tab = $_GET['tab'];
        } else {
            $tab = 'general';
        }
        echo '<table class="form-table">';
        switch ($tab) {
            case 'general':
                ?>
							<tr>
								<th><label for="login_url">Login URL:</label></th>
								<td>
									<input id="login_url" name="login_url" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["login_url"]));
                ?>
" /> 
									<span class="description">Default login URL for nav</span>
								</td>
							</tr>
							<tr>
								<th><label for="signup_url">Signup URL:</label></th>
								<td>
									<input id="signup_url" name="signup_url" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["signup_url"]));
                ?>
" /> 
									<span class="description">Default signup URL for nav</span>
								</td>
							</tr>
							<tr>
								<th><label for="blog_title">Blog Title:</label></th>
								<td>
									<input id="blog_title" name="blog_title" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["blog_title"]));
                ?>
" /> 
									<span class="description">Header in green header block on each blog post.</span>
								</td>
							</tr>
							<tr>
								<th><label for="blog_subtitle">Blog Subtitle:</label></th>
								<td>
									<input id="blog_subtitle" name="blog_subtitle" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["blog_subtitle"]));
                ?>
" /> 
									<span class="description">Subtitle in green header block on each blog post.</span>
								</td>
							</tr>
							<tr>
								<th><label for="contact_email">Public Email Address:</label></th>
								<td>
									<input id="contact_email" name="contact_email" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["contact_email"]));
                ?>
" /> 
								</td>
							</tr>
							<tr>
								<th><label for="contact_number">Public Phone Number:</label></th>
								<td>
									<input id="contact_number" name="contact_number" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["contact_number"]));
                ?>
" /> 
								</td>
							</tr>

							<tr>
								<th><label for="blog_footer_h2">Blog Footer Title:</label></th>
								<td>
									<input id="blog_footer_h2" name="blog_footer_h2" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["blog_footer_h2"]));
                ?>
" /> 
								</td>
							</tr>
							<tr>
								<th><label for="blog_footer_subtitle">Bloog Footer Subtitle:</label></th>
								<td>
									<input id="blog_footer_subtitle" name="blog_footer_subtitle" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["blog_footer_subtitle"]));
                ?>
" /> 
								</td>
							</tr>

							<tr>
								<th><label for="blog_footer_primary_button_url">Blog Footer Button URL:</label></th>
								<td>
									<input id="blog_footer_primary_button_url" name="blog_footer_primary_button_url" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["blog_footer_primary_button_url"]));
                ?>
" /> 
								</td>
							</tr>

							<tr>
								<th><label for="blog_footer_primary_button_text">Blog Footer Button Text:</label></th>
								<td>
									<input id="blog_footer_primary_button_text" name="blog_footer_primary_button_text" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["blog_footer_primary_button_text"]));
                ?>
" /> 
								</td>
							</tr>

							<?php 
                break;
            case 'testimonials':
                ?>
							<tr>
								<th><label for="testimonial_1_img">Testimonial 1 Image</label></th>
								<td>
									<img class="testimonial_1_img" src="<?php 
                echo get_custom('testimonial_1_img');
                ?>
" height="100" width="100"/><br>
									<input class="testimonial_1_img_url" type="text" name="testimonial_1_img" size="60" value="<?php 
                echo get_custom('testimonial_1_img');
                ?>
"><br/>
									<a href="#" class="testimonial_1_img_upload">Upload</a>
								</td>
							</tr>
							<tr>
								<th><label for="btestimonial_1_name">Testimonial 1 Name:</label></th>
								<td>
									<input id="testimonial_1_name" name="testimonial_1_name" cols="60" type="text" value="<?php 
                echo get_custom('testimonial_1_name');
                ?>
" /> <br/>
									<span class="description">Subtitle in green header block on each blog post.</span>
								</td>
							</tr>
							<tr>
								<th><label for="testimonial_1_position">Testimonial 1 Position:</label></th>
								<td>
									<input id="testimonial_1_position" name="testimonial_1_position" cols="60" type="text" value="<?php 
                echo get_custom('testimonial_1_position');
                ?>
" /> <br/>
									<span class="description">First Testimonial Job/Company</span>
								</td>
							</tr>
							<tr>
								<th><label for="testimonial_1_testimonial">Testimonial 1 Testimonial:</label></th>
								<td>
									<textarea id="testimonial_1_testimonial" name="testimonial_1_testimonial" cols="60" type="text" value="<?php 
                echo get_custom('testimonial_1_testimonial');
                ?>
" /><?php 
                echo get_custom('testimonial_1_testimonial');
                ?>
</textarea><br/>
									<span class="description">The Testimonial</span>
								</td>
							</tr>



							<tr>
								<th><label for="testimonial_2_img">Testimonial 2 Image</label></th>
								<td>
									<img class="testimonial_2_img" src="<?php 
                echo get_custom('testimonial_2_img');
                ?>
" height="100" width="100"/><br>
									<input class="testimonial_2_img_url" type="text" name="testimonial_2_img" size="60" value="<?php 
                echo get_custom('testimonial_2_img');
                ?>
"><br/>
									<a href="#" class="testimonial_2_img_upload">Upload</a>
								</td>
							</tr>
							<tr>
								<th><label for="btestimonial_2_name">Testimonial 2 Name:</label></th>
								<td>
									<input id="testimonial_2_name" name="testimonial_2_name" cols="60" type="text" value="<?php 
                echo get_custom('testimonial_2_name');
                ?>
" /> <br/>
									<span class="description">Subtitle in green header block on each blog post.</span>
								</td>
							</tr>
							<tr>
								<th><label for="testimonial_2_position">Testimonial 2 Position:</label></th>
								<td>
									<input id="testimonial_2_position" name="testimonial_2_position" cols="60" type="text" value="<?php 
                echo get_custom('testimonial_2_position');
                ?>
" /> <br/>
									<span class="description">First Testimonial Job/Company</span>
								</td>
							</tr>
							<tr>
								<th><label for="testimonial_2_testimonial">Testimonial 2 Testimonial:</label></th>
								<td>
									<textarea id="testimonial_2_testimonial" name="testimonial_2_testimonial" cols="60" type="text" value="<?php 
                echo get_custom('testimonial_2_testimonial');
                ?>
" /><?php 
                echo get_custom('testimonial_2_testimonial');
                ?>
</textarea><br/>
									<span class="description">The Testimonial</span>
								</td>
							</tr>
							<?php 
                break;
            case 'footer':
                ?>
							<tr>
								<th><label for="footer_scripts">Insert Scripts here</label></th>
								<td>
									<textarea id="footer_scripts" name="footer_scripts" cols="60" rows="5"><?php 
                echo esc_html(stripslashes($settings["footer_scripts"]));
                ?>
</textarea><br/>
									<span class="description">Tracking codes go here (i.e. Google Analytics)</span>
								</td>
							</tr>
							<tr>
								<th><label for="facebook_url">Facebook URL:</label></th>
								<td>
									<input id="facebook_url" name="facebook_url" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["facebook_url"]));
                ?>
" /> 
								</td>
							</tr>
							<tr>
								<th><label for="twitter_url">Twitter URL:</label></th>
								<td>
									<input id="twitter_url" name="twitter_url" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["twitter_url"]));
                ?>
" /> 
								</td>
							</tr>
							<tr>
								<th><label for="linkedin_url">LinkedIn URL:</label></th>
								<td>
									<input id="linkedin_url" name="linkedin_url" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["linkedin_url"]));
                ?>
" /> 
								</td>
							</tr>
							<tr>
								<th><label for="instagram_url">Instagram URL:</label></th>
								<td>
									<input id="instagram_url" name="instagram_url" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["instagram_url"]));
                ?>
" /> 
								</td>
							</tr>
							<?php 
                break;
        }
        echo '</table>';
    }
    ?>
				<p class="submit" style="clear: both;">
					<input type="submit" name="Submit"  class="button-primary" value="Update Settings" />
					<input type="hidden" name="ilc-settings-submit" value="Y" />
				</p>
			</form>
		</div>

	</div>

	<script>
    jQuery(document).ready(function($) {
        $('.testimonial_1_img_upload').click(function(e) {
            e.preventDefault();

            var custom_uploader = wp.media({
                title: 'Custom Image',
                button: {
                    text: 'Upload Image'
                },
                multiple: false  // Set this to true to allow multiple files to be selected
            })
            .on('select', function() {
                var attachment = custom_uploader.state().get('selection').first().toJSON();
                $('.testimonial_1_img').attr('src', attachment.url);
                $('.testimonial_1_img_url').val(attachment.url);

            })
            .open();
        });

         $('.testimonial_2_img_upload').click(function(e) {
            e.preventDefault();

            var custom_uploader = wp.media({
                title: 'Custom Image',
                button: {
                    text: 'Upload Image'
                },
                multiple: false  // Set this to true to allow multiple files to be selected
            })
            .on('select', function() {
                var attachment = custom_uploader.state().get('selection').first().toJSON();
                $('.testimonial_2_img').attr('src', attachment.url);
                $('.testimonial_2_img_url').val(attachment.url);

            })
            .open();
        });

          $('.header_testimonial_img_upload').click(function(e) {
            e.preventDefault();

            var custom_uploader = wp.media({
                title: 'Custom Image',
                button: {
                    text: 'Upload Image'
                },
                multiple: false  // Set this to true to allow multiple files to be selected
            })
            .on('select', function() {
                var attachment = custom_uploader.state().get('selection').first().toJSON();
                $('.header_testimonial_img').attr('src', attachment.url);
                $('.header_testimonial_img_url').val(attachment.url);

            })
            .open();
        });
    });
</script>


<?php 
}
Esempio n. 4
0
function bndls_page_output()
{
    $bndls_plugin_tabs = array('bundles_overview' => 'Bundles (beta)', 'settings' => 'Settings');
    $bndls_plugin_page = 'bundles';
    echo admin_tabs($bndls_plugin_page, $bndls_plugin_tabs);
}