예제 #1
0
파일: main.php 프로젝트: JustManG/Kursovaya
function mantra_page_fn()
{
    // Load the import form page if the import button has been pressed
    if (isset($_POST['mantra_import'])) {
        mantra_import_form();
        return;
    }
    // Load the import form  page after upload button has been pressed
    if (isset($_POST['mantra_import_confirmed'])) {
        mantra_import_file();
        return;
    }
    if (!current_user_can('edit_theme_options')) {
        wp_die(__('Sorry, but you do not have sufficient permissions to access this page.', 'mantra'));
    }
    ?>


<div class="wrap"><!-- Admin wrap page -->

<div id="lefty"><!-- Left side of page - the options area -->
	<div>
<div id="admin_header"><img src="<?php 
    echo get_template_directory_uri() . '/admin/images/mantra-logo.png';
    ?>
" /> </div>

<div id="admin_links">
	<a target="_blank" href="http://www.cryoutcreations.eu/mantra">Mantra Homepage</a>
	<a target="_blank" href="http://www.cryoutcreations.eu/forum">Support</a>
	<a target="_blank" href="http://www.cryoutcreations.eu">Cryout Creations</a>
</div>
	<div style="clear: both;"></div>
</div>

<?php 
    if (isset($_GET['settings-updated'])) {
        echo "<div class='updated fade' style='clear:left;'><p>";
        echo _e('Mantra settings updated successfully.', 'mantra');
        echo "</p></div>";
    }
    ?>

<div id="jsAlert" class=""><b>Checking jQuery functionality...</b><br/><em>If this message remains visible after the page has loaded then there is a problem with your WordPress jQuery library. This can have several causes, including incompatible plugins.
The Parabola Settings page cannot function without jQuery. </em></div>

	<div id="main-options">
		<form name="mantra_form" action="options.php" method="post" enctype="multipart/form-data">
			<div id="accordion">
				<?php 
    settings_fields('ma_options');
    ?>
				<?php 
    do_settings_sections(__FILE__);
    ?>
			</div>
			<div id="submitDiv">
			    <br>
				<input class="button" name="ma_options[mantra_submit]" type="submit" style="float:right;"   value="<?php 
    _e('Save Changes', 'mantra');
    ?>
" />
				<input class="button" name="ma_options[mantra_defaults]" id="mantra_defaults" type="submit" style="float:left;" value="<?php 
    _e('Reset to Defaults', 'mantra');
    ?>
" />
				</div>
		</form>
		<?php 
    $mantra_theme_data = get_transient('mantra_theme_info');
    ?>
		<span id="version">
		Mantra v <?php 
    echo MANTRA_VERSION;
    ?>
 by <a href="http://www.cryoutcreations.eu" target="_blank">Cryout Creations</a>
		</span>
	</div><!-- main-options -->
</div><!--lefty -->


<div id="righty" ><!-- Right side of page - Coffee, RSS tips and others -->
	<div class="postbox donate">
		<h3 class="hndle"> Coffee Break </h3>
		<div class="inside"><?php 
    echo "<p>Here at Cryout Creations (the developers of yours truly Mantra Theme), we spend night after night improving the Mantra Theme. We fix a lot of bugs (that we previously created); we add more and more customization options while also trying to keep things as simple as possible; then... we might play a game or two but rest assured that we return to read and (in most cases) reply to your late night emails and comments, take notes and draw dashboards of things to implement in future versions.</p>\n\t\t\t<p>So you might ask yourselves: <i>How do they do it? How can they keep so fresh after all that hard labor for that darned theme? </i> Well folks, it's simple. We drink coffee. Industrial quantities of hot boiling coffee. We love it! So if you want to help with the further development of the Mantra Theme...</p>";
    ?>
			<div style="display:block;float:none;margin:0 auto;text-align:center;">

			<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
				<input type="hidden" name="cmd" value="_donations">
				<input type="hidden" name="business" value="KYL26KAN4PJC8">
				<input type="hidden" name="item_name" value="Cryout Creations / Mantra Theme donation">
				<input type="hidden" name="currency_code" value="EUR">
				<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_SM.gif:NonHosted">
				<input type="image" src="<?php 
    echo get_template_directory_uri() . '/admin/images/coffee.png';
    ?>
" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
				<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
			</form>

			</div>
			<p>Or socially smother, caress and embrace us:</p>
			<div style="display:table;float:none;margin:0 auto;">
				<div id="fb-root"></div><div class="fb-like" data-href="https://www.facebook.com/CryoutCreations" data-layout="button" data-action="like" data-show-faces="false" data-share="false"></div>
				<a href="https://twitter.com/cryoutcreations" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false">Follow @cryoutcreations</a>
				<script src="https://apis.google.com/js/platform.js" async defer></script> <div class="g-plusone" data-href="https://plus.google.com/+CryoutcreationsEuCR2"  data-size="medium" data-annotation="none"></div>
			</div>
		</div><!-- inside -->
	</div><!-- donate -->

    <div class="postbox export non-essential-option" style="overflow:hidden;">
        <div class="head-wrap">
            <div title="Click to toggle" class="handlediv"><br /></div>
           	<h3 class="hndle"><?php 
    _e('Import/Export Settings', 'mantra');
    ?>
</h3>
        </div><!-- head-wrap -->
        <div class="panel-wrap inside">
				<form action="" method="post">
                	<?php 
    wp_nonce_field('mantra-export', 'mantra-export');
    ?>
                    <input type="hidden" name="mantra_export" value="true" />
                    <input type="submit" class="button" value="<?php 
    _e('Export Theme options', 'mantra');
    ?>
" />
					<p style="display:block;float:left;clear:left;margin-top:0;"><?php 
    _e("It's that easy: a mouse click away - the ability to export your Mantra settings and save them on your computer. Feeling safer? You should!", "mantra");
    ?>
</p>
                </form>
				<br />
                <form action="" method="post">
                    <input type="hidden" name="mantra_import" value="true" />
                    <input type="submit" class="button" value="<?php 
    _e('Import Theme options', 'mantra');
    ?>
" />
					<p style="display:block;float:left;clear:left;margin-top:0;"><?php 
    _e(" Without the import, the export would just be a fool's exercise. Make sure you have the exported file ready and see you after the mouse click.", "mantra");
    ?>
</p>
                </form>
		</div><!-- inside -->
	</div><!-- export -->


    <div class="postbox news" >
            <div>
        		<h3 class="hndle"><?php 
    _e('Mantra Latest News', 'mantra');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside" style="height:200px;overflow:auto;">
                <?php 
    $mantra_news = fetch_feed(array('http://www.cryoutcreations.eu/cat/mantra/feed'));
    if (!is_wp_error($mantra_news)) {
        $maxitems = $mantra_news->get_item_quantity(10);
        $news_items = $mantra_news->get_items(0, $maxitems);
    }
    ?>
                <ul class="news-list">
                	<?php 
    if ($maxitems == 0) {
        echo '<li>' . __('No news items.', 'mantra') . '</li>';
    } else {
        foreach ($news_items as $news_item) {
            ?>
                    	<li>
                        	<a class="news-header" href='<?php 
            echo esc_url($news_item->get_permalink());
            ?>
'><?php 
            echo esc_html($news_item->get_title());
            ?>
</a><br />
                   <span class="news-item-date"><?php 
            _e('Posted on', 'mantra');
            echo $news_item->get_date(' j F Y');
            ?>
</span><br />
                           <a class="news-read" href='<?php 
            echo esc_url($news_item->get_permalink());
            ?>
'>Read more &raquo;</a>
                        </li>
                    <?php 
        }
    }
    ?>
                </ul>
            </div><!-- inside -->
    </div><!-- news -->


</div><!--  righty -->
</div><!--  wrap -->

<script>

function startfarb(a,b) {
	jQuery(b).css('display','none');
	jQuery(b).farbtastic(a);

	jQuery(a).click(function() {
			if(jQuery(b).css('display') == 'none')	{
                                        			jQuery(b).parents('div:eq(0)').addClass('ui-accordion-content-overflow');
                                                       jQuery(b).css('display','inline-block').hide().show(300);
                                                       }
		});

	jQuery(document).mousedown( function() {
			jQuery(b).hide(700, function(){ jQuery(b).parents('div:eq(0)').removeClass('ui-accordion-content-overflow'); });
			// todo: find a better way to remove class after the fade on IEs
		});
}

function tooltip_terain() {
jQuery('#accordion small').parent('div').append('<a class="tooltip"><img src="<?php 
    echo get_template_directory_uri();
    ?>
/images/icon-tooltip.png" /></a>').
	each(function() {
	//jQuery(this).children('a.tooltip').attr('title',jQuery(this).children('small').html() );
	var tooltip_info = jQuery(this).children('small').html();
	jQuery(this).children('.tooltip').tooltip({content : tooltip_info});
     jQuery(this).children('.tooltip').tooltip( "option", "items", "a" );
	//jQuery(this).children('.tooltip').tooltip( "option", "show", "false");
	jQuery(this).children('.tooltip').tooltip( "option", "hide", "false");
	jQuery(this).children('small').remove();
	if (!jQuery(this).hasClass('slmini') && !jQuery(this).hasClass('slidercontent') && !jQuery(this).hasClass('slideDivs')) jQuery(this).addClass('tooltip_div');
	});
}

function coloursel(el){
	var id = "#"+jQuery(el).attr('id');
	jQuery(id+"2").hide();
	var bgcolor = jQuery(id).val();
	if (bgcolor <= "#666666") { jQuery(id).css('color','#ffffff'); } else { jQuery(id).css('color','#000000'); };
	jQuery(id).css('background-color',jQuery(id).val());
}

function vercomp(ver, req) {
    var v = ver.split('.');
    var q = req.split('.');
    for (var i = 0; i < v.length; ++i) {
        if (q.length == i) { return true; } // v is bigger 
        if (parseInt(v[i]) == parseInt(q[i])) { continue; } // nothing to do here, move along
        else if (parseInt(v[i]) > parseInt(q[i])) { return true; } // v is bigger
        else { return false; } // q is bigger
    }
    if (v.length != q.length) { return false; } // q is bigger
    return true; // v = q;
}

jQuery(document).ready(function(){
	//var _jQueryVer = parseFloat('.'+jQuery().jquery.replace(/\./g, ''));  // jQuery version as float, eg: 0.183
	//var _jQueryUIVer = parseFloat('.'+jQuery.ui.version.replace(/\./g, '')); // jQuery UI version as float, eg: 0.192
	//if (_jQueryUIVer >= 0.190) {
	if (vercomp(jQuery.ui.version,"1.9.0")) {
		// tooltip function is included since jQuery UI 1.9.0
		tooltip_terain();
		startfarb("#mantra_backcolor","#mantra_backcolor2");
		startfarb("#mantra_headercolor","#mantra_headercolor2");
		startfarb("#mantra_contentbg","#mantra_contentbg2");
		startfarb("#mantra_menubg","#mantra_menubg2");
		startfarb("#mantra_s1bg","#mantra_s1bg2");
		startfarb("#mantra_s2bg","#mantra_s2bg2");
		startfarb("#mantra_prefootercolor","#mantra_prefootercolor2");
		startfarb("#mantra_footercolor","#mantra_footercolor2");
		startfarb("#mantra_titlecolor","#mantra_titlecolor2");
		startfarb("#mantra_descriptioncolor","#mantra_descriptioncolor2");
		startfarb("#mantra_contentcolor","#mantra_contentcolor2");
		startfarb("#mantra_linkscolor","#mantra_linkscolor2");
		startfarb("#mantra_hovercolor","#mantra_hovercolor2");
		startfarb("#mantra_headtextcolor","#mantra_headtextcolor2");
		startfarb("#mantra_headtexthover","#mantra_headtexthover2");
		startfarb("#mantra_sideheadbackcolor","#mantra_sideheadbackcolor2");
		startfarb("#mantra_sideheadtextcolor","#mantra_sideheadtextcolor2");
		startfarb("#mantra_footerheader","#mantra_footerheader2");
		startfarb("#mantra_footertext","#mantra_footertext2");
		startfarb("#mantra_footerhover","#mantra_footerhover2");
		startfarb("#mantra_fpsliderbordercolor","#mantra_fpsliderbordercolor2");
		startfarb("#mantra_fronttitlecolor","#mantra_fronttitlecolor2");		
	} else {
		jQuery("#mantra_backcolor").addClass('colorthingy');
		jQuery("#mantra_headercolor").addClass('colorthingy');
		jQuery("#mantra_contentbg").addClass('colorthingy');
		jQuery("#mantra_menubg").addClass('colorthingy');
		jQuery("#mantra_s1bg").addClass('colorthingy');
		jQuery("#mantra_s2bg").addClass('colorthingy');
		jQuery("#mantra_prefootercolor").addClass('colorthingy');
		jQuery("#mantra_footercolor").addClass('colorthingy');
		jQuery("#mantra_titlecolor").addClass('colorthingy');
		jQuery("#mantra_descriptioncolor").addClass('colorthingy');
		jQuery("#mantra_contentcolor").addClass('colorthingy');
		jQuery("#mantra_linkscolor").addClass('colorthingy');
		jQuery("#mantra_hovercolor").addClass('colorthingy');
		jQuery("#mantra_headtextcolor").addClass('colorthingy');
		jQuery("#mantra_sideheadbackcolor").addClass('colorthingy');
		jQuery("#mantra_sideheadtextcolor").addClass('colorthingy');
		jQuery("#mantra_footerheader").addClass('colorthingy');
		jQuery("#mantra_footertext").addClass('colorthingy');
		jQuery("#mantra_headtexthover").addClass('colorthingy');
		jQuery("#mantra_footerhover").addClass('colorthingy');
		jQuery("#mantra_fpsliderbordercolor").addClass('colorthingy');
		jQuery("#mantra_fronttitlecolor").addClass('colorthingy');
		jQuery('.colorthingy').each(function(){
			id = "#"+jQuery(this).attr('id');
			jQuery(this).on('keyup',function(){coloursel(this)});
			coloursel(this);
		});
		// inform the user about the old partially unsupported version
		jQuery("#jsAlert").after("<div class='updated fade' style='clear:left; font-size: 16px;'><p>Mantra has detected you are running an old version of Wordpress (jQuery) and will be running in compatibility mode. Some features may not work correctly. Consider updating your Wordpress to the latest version.</p></div>");
	}

});

jQuery('#jsAlert').hide();
</script>

<?php 
}
예제 #2
0
/**
 * This actual import of the options from the file to the settings array.
*/
function mantra_import_file()
{
    global $mantra_options;
    /* Check authorisation */
    $authorised = true;
    // Check nonce
    if (!wp_verify_nonce($_POST['mantra-import'], 'mantra-import')) {
        $authorised = false;
    }
    // Check permissions
    if (!current_user_can('edit_theme_options')) {
        $authorised = false;
    }
    // If the user is authorised, import the theme's options to the database
    if ($authorised) {
        ?>
        <?php 
        // make sure there is an import file uploaded
        if (isset($_FILES["import"]["size"]) && $_FILES["import"]["size"] > 0) {
            $form_fields = array('import');
            $method = '';
            $url = wp_nonce_url('themes.php?page=mantra-page', 'mantra-import');
            // Get file writing credentials
            if (false === ($creds = request_filesystem_credentials($url, $method, false, false, $form_fields))) {
                return true;
            }
            if (!WP_Filesystem($creds)) {
                // our credentials were no good, ask the user for them again
                request_filesystem_credentials($url, $method, true, false, $form_fields);
                return true;
            }
            // Write the file if credentials are good
            $upload_dir = wp_upload_dir();
            $filename = trailingslashit($upload_dir['path']) . 'mantra_options.txt';
            // by this point, the $wp_filesystem global should be working, so let's use it to create a file
            global $wp_filesystem;
            if (!$wp_filesystem->move($_FILES['import']['tmp_name'], $filename, true)) {
                echo 'Error saving file!';
                return;
            }
            $file = $_FILES['import'];
            if ($file['type'] == 'text/plain') {
                $data = $wp_filesystem->get_contents($filename);
                // try to read the file
                if ($data !== FALSE) {
                    $settings = json_decode($data, true);
                    // try to read the settings array
                    if (isset($settings['mantra_db'])) {
                        ?>
        <div class="wrap">
        <div id="icon-tools" class="icon32"><br></div>
        <h2><?php 
                        echo __('Import Mantra Theme Options ', 'mantra');
                        ?>
</h2> <?php 
                        $settings = array_merge($mantra_options, $settings);
                        update_option('ma_options', $settings);
                        echo '<div class="updated fade"><p>' . __('Great! The options have been imported!', 'mantra') . '<br />';
                        echo '<a href="themes.php?page=mantra-page">' . __('Go back to the Mantra options page and check them out!', 'mantra') . '<a></p></div>';
                    } else {
                        // else: try to read the settings array
                        echo '<div class="error"><p><strong>' . __('Oops, there\'s a small problem.', 'mantra') . '</strong><br />';
                        echo __('The uploaded file does not contain valid Mantra options. Make sure the file is exported from the Mantra Options page.', 'mantra') . '</p></div>';
                        mantra_import_form();
                    }
                } else {
                    // else: try to read the file
                    echo '<div class="error"><p><strong>' . __('Oops, there\'s a small problem.', 'mantra') . '</strong><br />';
                    echo __('The uploaded file could not be read.', 'mantra') . '</p></div>';
                    mantra_import_form();
                }
            } else {
                // else: make sure the file uploaded was a plain text file
                echo '<div class="error"><p><strong>' . __('Oops, there\'s a small problem.', 'mantra') . '</strong><br />';
                echo __('The uploaded file is not supported. Make sure the file was exported from the Mantra page and that it is a text file.', 'mantra') . '</p></div>';
                mantra_import_form();
            }
            // Delete the file after we're done
            $wp_filesystem->delete($filename);
        } else {
            // else: make sure there is an import file uploaded
            echo '<div class="error"><p>' . __('Oops! The file is empty or there was no file. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.', 'mantra') . '</p></div>';
            mantra_import_form();
        }
        echo '</div> <!-- end wrap -->';
    } else {
        wp_die(__('ERROR: You are not authorised to perform that operation', 'mantra'));
    }
}
예제 #3
0
파일: main.php 프로젝트: rzb/boletos2
function mantra_page_fn()
{
    // Load the import form page if the import button has been pressed
    if (isset($_POST['mantra_import'])) {
        mantra_import_form();
        return;
    }
    // Load the import form  page after upload button has been pressed
    if (isset($_POST['mantra_import_confirmed'])) {
        mantra_import_file();
        return;
    }
    if (!current_user_can('edit_theme_options')) {
        wp_die(__('Sorry, but you do not have sufficient permissions to access this page.', 'mantra'));
    }
    ?>


<div class="wrap"><!-- Admin wrap page -->

<div id="lefty"><!-- Left side of page - the options area -->
<div style="display:block;float:left;padding:10px;padding-left:20px;overflow:hidden;"><img src="<?php 
    echo get_template_directory_uri() . '/admin/images/mantra-logo.png';
    ?>
" /> </div>
<?php 
    if (isset($_GET['settings-updated'])) {
        echo "<div class='updated fade' style='clear:left;'><p>";
        echo _e('Mantra settings updated successfully.', 'mantra');
        echo "</p></div>";
    }
    ?>

	<div id="main-options">
		<form name="mantra_form" action="options.php" method="post" enctype="multipart/form-data">
			<div id="accordion">	
				<?php 
    settings_fields('ma_options');
    ?>
				<?php 
    do_settings_sections(__FILE__);
    ?>
			</div>
			<div id="submitDiv">
				<input name="ma_options[mantra_defaults]" id="mantra_defaults" type="submit" style="float:left;" value="<?php 
    _e('Reset to Defaults', 'mantra');
    ?>
" />
				<input name="ma_options[mantra_submit]" type="submit" style="float:right;"   value="<?php 
    _e('Save Changes', 'mantra');
    ?>
" />
			</div>
		</form>
		<?php 
    $mantra_theme_data = get_transient('cryout_theme_info');
    ?>
		<span id="version"> 
		<?php 
    echo $mantra_theme_data['Name'] . ' v. ' . $mantra_theme_data['Version'] . ' by ' . $mantra_theme_data['Author'];
    ?>
		</span>
	</div><!-- main-options -->
</div><!--lefty -->


<div id="righty" ><!-- Right side of page - Coffee, RSS tips and others -->
	<div class="postbox donate"> 
		<h3 class="hndle"> Coffee Break </h3>
		<div class="inside"><?php 
    _e("<p>Here at Cryout Creations (the developers of yours truly Mantra Theme), we spend night after night improving the Mantra Theme. We fix a lot of bugs (that we previously created); we add more and more customization options while also trying to keep things as simple as possible; then... we might play a game or two but rest assured that we return to read and (in most cases) reply to your late night emails and comments, take notes and draw dashboards of things to implement in future versions.</p>\n\t\t\t<p>So you might ask yourselves: <i>How do they do it? How can they keep so fresh after all that hard labor for that darned theme? </i> Well folks, it's simple. We drink coffee. Industrial quantities of hot boiling coffee. We love it! So if you want to help with the further development of the Mantra Theme...</p> ", "mantra");
    ?>
			<div style="display:block;float:none;margin:0 auto;text-align:center;">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_s-xclick"><input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTA
kNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHD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U5Gze/kUo5OvpezDjckdR0TJfoNFDKiAit+Qf9+ToViM/CmY2cONArejftWlnEKikB7UxCFuA3uPj8lXq5KXvukDTdrDJicqh+vZvjDr2ipMsrEl+BgRsUsYamXRosq6U/bT/zcmXcdgdbg44pJQ==-----END PKCS7-----"><input type="image" src="<?php 
    echo get_template_directory_uri() . '/admin/images/coffee.png';
    ?>
" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"><img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"></form>		
			</div>
		</div><!-- inside -->
	</div><!-- donate -->

    <div class="postbox export non-essential-option" style="overflow:hidden;">
        <div class="head-wrap">
            <div title="Click to toggle" class="handlediv"><br /></div>
           	<h3 class="hndle"><?php 
    _e('Import/Export Settings', 'mantra');
    ?>
</h3>
        </div><!-- head-wrap -->
        <div class="panel-wrap inside">
				<form action="" method="post">
                	<?php 
    wp_nonce_field('mantra-export', 'mantra-export');
    ?>
                    <input type="hidden" name="mantra_export" value="true" />
                    <input type="submit" class="button" value="<?php 
    _e('Export Theme options', 'mantra');
    ?>
" />
					<p style="display:block;float:left;clear:left;margin-top:0;"><?php 
    _e("It's that easy: a mouse click away - the ability to export your Mantra settings and save them on your computer. Feeling safer? You should!", "mantra");
    ?>
</p>
                </form>  
				<br />
                <form action="" method="post">
                    <input type="hidden" name="mantra_import" value="true" />
                    <input type="submit" class="button" value="<?php 
    _e('Import Theme options', 'mantra');
    ?>
" />
					<p style="display:block;float:left;clear:left;margin-top:0;"><?php 
    _e(" Without the import, the export would just be a fool's exercise. Make sure you have the exported file ready and see you after the mouse click.", "mantra");
    ?>
</p>         
                </form> 
		</div><!-- inside -->
	</div><!-- export -->

    <div class="postbox news" >
            <div>
        		<h3 class="hndle"><?php 
    _e('Mantra Latest News', 'mantra');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside" style="height:200px;overflow:auto;">
                <?php 
    $mantra_news = fetch_feed(array('http://www.riotreactions.eu/tag/mantra-2/feed/'));
    if (!is_wp_error($mantra_news)) {
        $maxitems = $mantra_news->get_item_quantity(10);
        $news_items = $mantra_news->get_items(0, $maxitems);
    }
    ?>
                <ul class="news-list">
                	<?php 
    if ($maxitems == 0) {
        echo '<li>' . __('No news items.', 'mantra') . '</li>';
    } else {
        foreach ($news_items as $news_item) {
            ?>
                    	<li>
                        	<a class="news-header" href='<?php 
            echo esc_url($news_item->get_permalink());
            ?>
'><?php 
            echo esc_html($news_item->get_title());
            ?>
</a><br />
                   <span class="news-item-date"><?php 
            echo 'Posted on ' . $news_item->get_date('j F Y, g:i a');
            ?>
</span><br />
                            <?php 
            echo mantra_truncate_words(strip_tags($news_item->get_description()), 40, '...');
            ?>
					<a class="news-read" href='<?php 
            echo esc_url($news_item->get_permalink());
            ?>
'>Read more &raquo;</a><br />
                        </li><br />
                    <?php 
        }
    }
    ?>
                </ul>
            </div><!-- inside -->
    </div><!-- news -->

	<div class="postbox support"> 
		<h3 class="hndle"><?php 
    _e("Mantra Help", "mantra");
    ?>
 </h3>

		<div class="inside">
		<?php 
    _e("\n\t\t\t<ul>\n\t\t\t\t<li>- Need any Mantra or WordPress help?</li>\n\t\t\t\t<li>- Want to know what changes are made to the theme with each new version?</li>\n\t\t\t\t<li>- Found a bug or maybe something doesn't work exactly as expected?</li>\n\t\t\t\t<li>- Got an idea on how to improve the Mantra Theme to better suit your needs?</li>\n\t\t\t\t<li>- Want a setting implemented?</li>\n\t\t\t\t<li>- Do you have or would you like to make a translation of the Mantra Theme?</li>\n\t\t\t</ul>\n\t\t\t<p>Then come visit us at Mantra's support page.</p>\n\t", "mantra");
    ?>
		<a style="display:block;float:none;margin:0 auto;text-align:center;padding-bottom:10px;" href='http://www.riotreactions.com/mantra'><?php 
    _e('Mantra Support Page', 'mantra');
    ?>
</a>
		</div><!-- inside -->
	</div><!-- support -->

</div><!--  righty -->
</div><!--  wrap -->

<script>
startfarb("#mantra_backcolor","#mantra_backcolor2");
startfarb("#mantra_headercolor","#mantra_headercolor2");
startfarb("#mantra_contentbg","#mantra_contentbg2");
startfarb("#mantra_menubg","#mantra_menubg2");
startfarb("#mantra_prefootercolor","#mantra_prefootercolor2");
startfarb("#mantra_footercolor","#mantra_footercolor2");
startfarb("#mantra_titlecolor","#mantra_titlecolor2");
startfarb("#mantra_descriptioncolor","#mantra_descriptioncolor2");
startfarb("#mantra_contentcolor","#mantra_contentcolor2");
startfarb("#mantra_linkscolor","#mantra_linkscolor2");
startfarb("#mantra_hovercolor","#mantra_hovercolor2");
startfarb("#mantra_headtextcolor","#mantra_headtextcolor2");
startfarb("#mantra_headtexthover","#mantra_headtexthover2");
startfarb("#mantra_sideheadbackcolor","#mantra_sideheadbackcolor2");
startfarb("#mantra_sideheadtextcolor","#mantra_sideheadtextcolor2");
startfarb("#mantra_footerheader","#mantra_footerheader2");
startfarb("#mantra_footertext","#mantra_footertext2");
startfarb("#mantra_footerhover","#mantra_footerhover2");

startfarb("#mantra_fpsliderbordercolor","#mantra_fpsliderbordercolor2");
startfarb("#mantra_fronttitlecolor","#mantra_fronttitlecolor2");

function startfarb(a,b) {
	jQuery(b).css('display','none');	
	jQuery(b).farbtastic(a);
	
	jQuery(a).click(function() {
			if(jQuery(b).css('display') == 'none')	jQuery(b).show(300);
		});

	jQuery(document).mousedown( function() {
			jQuery(b).hide(700);
		});
}
</script>

<?php 
}