• DONATE to NULLED!
    Вы можете помочь Форуму и команде, поддержать финансово.
    starwanderer - модератор этого раздела будет Вам благодарен!

Помощь помогите расшифровать functions.php

Статус
В этой теме нельзя размещать новые ответы.

Shadrin

Создатель
Регистрация
19 Фев 2009
Сообщения
24
Реакции
5
Очень прошу низ понятно а верх не пойму чем зашифрован :thenks:
это из темы Playmaker код
 

Вложения

  • functions.txt
    57,8 KB · Просмотры: 29
понимаете чтобы создать тему я раз 10 подумаю,это с футерами денвером, а это не хочет он чем то другим зашифрован
Код:
<!--error--><br />
<b>Fatal error</b>:  Call to undefined function get_categories() in <b>W:\home\test1.ru\www\functions.php(1) : eval()'d code(1) : eval()'d code</b> on line <b>8</b><br />
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>
вот что мне денвер выдал
 
Держи

HTML:
<?php
if ( function_exists('register_sidebars') )
    register_sidebars(1);

$themename = "Playmaker";
$shortname = "playmaker";

$playmaker_categories_obj = get_categories('hide_empty=0');
$playmaker_categories = array();

foreach ($playmaker_categories_obj as $playmaker_cat) {
	$playmaker_categories[$playmaker_cat->cat_ID] = $playmaker_cat->cat_name;
}

$categories_tmp = array_unshift($playmaker_categories, "Select a category:");

$options = array (




				array(	"name" => "<div style=\"width:800px;padding:20px;background:#eeeeee;\"><h3 style=\"color:#336699;\">META Control</h3></div>",
						"type" => "heading"),


				array(	"name" => "Keywords",
						"desc" => "Give your site some META keywords<br /><br />",
			    		"id" => $shortname."_keywords",
			    		"std" => "Enter keywords seperated with a comma",
			    		"type" => "textarea"),


				array(	"name" => "Description",
						"desc" => "Give your site a META description<br /><br /><br />",
			    		"id" => $shortname."_description",
			    		"std" => "Enter a description for the search engines",
			    		"type" => "textarea"),







				array(	"name" => "<div style=\"width:800px;padding:20px;background:#eeeeee;\"><h3 style=\"color:#336699;\">RSS Newsticker Control</h3></div>",
						"type" => "heading"),

				array(	"name" => "Enable Ticker?",
						"desc" => "Check to activate this banner spot.<br />(If this ticker is <u>not</u> enabled then ad spot #6 will be displayed instead.)<br /><br />",
						"id" => $shortname."_show_ticker",
						"std" => "true",
						"type" => "checkbox"),

				array(	"name" => "Newsticker title",
					"desc" => "Edit the text above the news ticker.<br /><br /><br />",
			    		"id" => $shortname."_tickertitle",
			    		"std" => "BREAKING NEWS HEADLINES",
			    		"type" => "text"),








				array(	"name" => "<div style=\"width:800px;padding:20px;background:#eeeeee;\"><h3 style=\"color:#336699;\">Google Analytics Control</h3></div>",
						"type" => "heading"),


				array(	"name" => "Google Analytics",
					"desc" => "Want to track your site visitors?<br /><br /><br />",
			    		"id" => $shortname."_analytics",
					"std" => "Paste your Google Analytics (or similar) tracking code here",
			    		"type" => "textarea"),







				array(	"name" => "<div style=\"width:800px;padding:20px;background:#eeeeee;\"><h3 style=\"color:#336699;\">Search Control</h3></div>",
						"type" => "heading"),


				array(	"name" => "Search Text",
						"desc" => "Edit the text in your search field.<br /><br />",
			    		"id" => $shortname."_searchtxt",
			    		"std" => "Search this website . . .",
			    		"type" => "text"),

				array(	"name" => "Search Results",
						"desc" => "Edit the search results header text.<br /><br /><br />",
			    		"id" => $shortname."_searchheader",
			    		"std" => "SEARCH RESULTS",
			    		"type" => "text"),




				array(	"name" => "<div style=\"width:800px;padding:20px;background:#eeeeee;\"><h3 style=\"color:#336699;\">Advertisement Banner Control</h3></div>",
						"type" => "heading"),


						
		    		
				array(	"name" => "Spot #1",
					"desc" => "Paste your 728x90 ad code above.<br /><br />",
			    		"id" => $shortname."_banner1",
					"std" => "Paste your ad code here",
			    		"type" => "textarea"),	

				array(	"name" => "Spot #2",
					"desc" => "Paste your 728x15 ad code above.<br /><br />",
			    		"id" => $shortname."_banner2",
					"std" => "Paste your ad code here",
			    		"type" => "textarea"),	

				array(	"name" => "Spot #3",
					"desc" => "Paste your 300x250 ad code above.<br /><br />",
			    		"id" => $shortname."_banner3",
					"std" => "Paste your ad code here",
			    		"type" => "textarea"),

				array(	"name" => "Spot #4",
					"desc" => "Paste your 120x600 ad code above.<br /><br />",
			    		"id" => $shortname."_banner4",
					"std" => "Paste your ad code here",
			    		"type" => "textarea"),

				array(	"name" => "Spot #5",
					"desc" => "Paste your 250x250 ad code above.<br /><br />",
			    		"id" => $shortname."_banner5",
					"std" => "Paste your ad code here",
			    		"type" => "textarea"),

				array(	"name" => "Spot #6",
					"desc" => "Paste your 468x60 ad code above.<br />(This ad spot is only active if you <u>do not</u> enable the ticker.)<br /><br /><br />",
			    		"id" => $shortname."_banner6",
					"std" => "Paste your ad code here",
			    		"type" => "textarea"),








				array(	"name" => "<div style=\"width:800px;padding:20px;background:#eeeeee;\"><h3 style=\"color:#336699;\">Chatroom Control</h3></div>",
						"type" => "heading"),

				array(	"name" => "Enable Chatroom?",
						"desc" => "Check to activate the chatroom.<br /><br />",
						"id" => $shortname."_show_ichat",
						"std" => "true",
						"type" => "checkbox"),

				array(	"name" => "Access link text",
					"desc" => "Edit the chatroom access link.<br /><br />",
			    		"id" => $shortname."_chatroomlink",
			    		"std" => "Toggle Live Chatroom",
			    		"type" => "text"),


				array(	"name" => "Chatroom Code",
					"desc" => "Paste your chatroom code in the box above, remember to re-size your chatroom to 675 x 250.<br /><br /><br />",
			    		"id" => $shortname."_chatroom",
					"std" => "Paste your chatroom code here",
			    		"type" => "textarea"),





				array(	"name" => "<div style=\"width:800px;padding:20px;background:#eeeeee;\"><h3 style=\"color:#336699;\">Forum Board Control</h3></div>",
						"type" => "heading"),

				array(	"name" => "Access link text",
					"desc" => "Edit the forum access link.<br /><br />",
			    		"id" => $shortname."_forumlink",
			    		"std" => "Enter Discussion Forums",
			    		"type" => "text"),



				array(	"name" => "Forum URL",
					"desc" => "Enter the URL to your forums.<br /><br /><br />",
			    		"id" => $shortname."_forumurl",
			    		"std" => "Enter your forum URL here",
			    		"type" => "text"),







				array(	"name" => "<div style=\"width:800px;padding:20px;background:#eeeeee;\"><h3 style=\"color:#336699;\">Featured Video Control</h3></div>",
						"type" => "heading"),

				array(	"name" => "Block text",
					"desc" => "Give this block a suitable title.<br /><br />",
			    		"id" => $shortname."_featuredvideotxt",
			    		"std" => "Featured video",
			    		"type" => "text"),

				array(	"name" => "Embed Code",
					"desc" => "Paste your video code in the box above, remember to re-size your video to 280 x 220.<br /><br /><br />",
			    		"id" => $shortname."_featuredvideo",
					"std" => "Paste your video embed code here",
			    		"type" => "textarea"),







				array(	"name" => "<div style=\"width:800px;padding:20px;background:#eeeeee;\"><h3 style=\"color:#336699;\">Promotional Box Control</h3></div>",
						"type" => "heading"),

				array(	"name" => "<h5>Box One</h5>",
						"type" => "heading"),

				array(	"name" => "Title",
					"desc" => "Add a suitable title in the field above.<br /><br />",
			    		"id" => $shortname."_promo1txt",
			    		"std" => "Promotional Box One",
			    		"type" => "text"),

				array(	"name" => "Image",
					"desc" => "Paste the full URL to your chosen image (65x45) in the field above.<br /><br />",
			    		"id" => $shortname."_promo1img",
			    		"std" => "Paste the image URL here",
			    		"type" => "text"),

				array(	"name" => "Destination",
					"desc" => "Paste the full destination URL in the field above.<br /><br />",
			    		"id" => $shortname."_promo1url",
			    		"std" => "Paste the destination URL here",
			    		"type" => "text"),

				array(	"name" => "Contents",
					"desc" => "Add some promotional text in the field above.<br /><br /><br /><br /><br /><br />",
			    		"id" => $shortname."_promo1words",
					"std" => "This is a promotional block that is controlled fully via the built-in theme control panel, allowing you to promote your products.",
			    		"type" => "textarea"),

















				array(	"name" => "<h5>Box Two</h5>",
						"type" => "heading"),

				array(	"name" => "Title",
					"desc" => "Add a suitable title in the field above.<br /><br /><br />",
			    		"id" => $shortname."_promo2txt",
			    		"std" => "Promotional Box Two",
			    		"type" => "text"),








































				array(	"name" => "Image",
					"desc" => "Paste the full URL to your chosen image (65x45) in the field above.<br /><br /><br />",
			    		"id" => $shortname."_promo2img",
			    		"std" => "Paste the image URL here",
			    		"type" => "text"),

				array(	"name" => "Destination",
					"desc" => "Paste the full destination URL in the field above.<br /><br />",
			    		"id" => $shortname."_promo2url",
			    		"std" => "Paste the destination URL here",
			    		"type" => "text"),

				array(	"name" => "Contents",
					"desc" => "Add some promotional text in the field above.<br /><br /><br /><br /><br /><br />",
			    		"id" => $shortname."_promo2words",
					"std" => "This is another promotional block that you can control via the theme control panel.",
			    		"type" => "textarea"),












				array(	"name" => "<h5>Box Three</h5>",
						"type" => "heading"),

				array(	"name" => "Image",
					"desc" => "Paste the full URL to your chosen image (147x80) in the field above.<br /><br /><br />",
			    		"id" => $shortname."_promo3img",
			    		"std" => "Paste the image URL here",
			    		"type" => "text"),

				array(	"name" => "Destination",
					"desc" => "Paste the full destination URL in the field above.<br /><br />",
			    		"id" => $shortname."_promo3url",
			    		"std" => "Paste the destination URL here",
			    		"type" => "text"),

				array(	"name" => "Contents",
					"desc" => "Add some promotional text in the field above.<br /><br /><br /><br /><br /><br />",
			    		"id" => $shortname."_promo3txt",
					"std" => "This is promo block number three.",
			    		"type" => "textarea"),








				array(	"name" => "<h5>Box Four</h5>",
						"type" => "heading"),


				array(	"name" => "Image",
					"desc" => "Paste the full URL to your chosen image (65x45) in the field above.<br /><br /><br />",
			    		"id" => $shortname."_promo4img",
			    		"std" => "Paste the image URL here",
			    		"type" => "text"),

				array(	"name" => "Destination",
					"desc" => "Paste the full destination URL in the field above.<br /><br />",
			    		"id" => $shortname."_promo4url",
			    		"std" => "Paste the destination URL here",
			    		"type" => "text"),

				array(	"name" => "Contents",
					"desc" => "Add some promotional text in the field above.<br /><br /><br /><br /><br /><br />",
			    		"id" => $shortname."_promo4words",
					"std" => "This is a promotional block that appears on every news item and is independently controlled via the built-in theme control panel allowing you to promote almost anything you want.",
			    		"type" => "textarea"),














				array(	"name" => "<h5>Box Five</h5>",
						"type" => "heading"),

				array(	"name" => "Image",
					"desc" => "Paste the full URL to your chosen image (147x80) in the field above.<br /><br /><br />",
			    		"id" => $shortname."_promo5img",
			    		"std" => "Paste the image URL here",
			    		"type" => "text"),

				array(	"name" => "Destination",
					"desc" => "Paste the full destination URL in the field above.<br /><br />",
			    		"id" => $shortname."_promo5url",
			    		"std" => "Paste the destination URL here",
			    		"type" => "text"),

				array(	"name" => "Contents",
					"desc" => "Add some promotional text in the field above.",
			    		"id" => $shortname."_promo5txt",
					"std" => "This is promo block number five.",
			    		"type" => "textarea"),









				array(	"name" => "<div style=\"width:800px;padding:20px;background:#eeeeee;\"><h3 style=\"color:#336699;\">Featured News Control</h3></div>",
						"type" => "heading"),



				array( 	"name" => "Left Block",
					   	"desc" => "Select the category this area will display news from.<br /><br />",
						"id" => $shortname."_featured1cats",
						"std" => "Select a category:",
						"type" => "select",
						"options" => $playmaker_categories),

				array(	"name" => "Block Title",
						"desc" => "Edit the title used for this block.<br /><br /><br />",
			    		"id" => $shortname."_onecatstitle",
			    		"std" => "FEATURED NEWS",
			    		"type" => "text"),







				array( 	"name" => "Right Block",
					   	"desc" => "Select the category this area will display news from.<br /><br /><br />",
						"id" => $shortname."_featured2cats",
						"std" => "Select a category:",
						"type" => "select",
						"options" => $playmaker_categories),

				array(	"name" => "Block Title",
						"desc" => "Edit the title used for this block.<br /><br /><br />",
			    		"id" => $shortname."_twocatstitle",
			    		"std" => "FEATURED NEWS",
			    		"type" => "text"),
						
				





				array(	"name" => "<div style=\"width:800px;padding:20px;background:#eeeeee;\"><h3 style=\"color:#336699;\">Social Links Control</h3></div>",
						"type" => "heading"),

				array(	"name" => "Enable Social Area?",
						"desc" => "If this option is not checked then the entire social area will not be shown.<br /><br />",
						"id" => $shortname."_show_socialblock",
						"std" => "true",
						"type" => "checkbox"),

				array(	"name" => "Social Text",
					"desc" => "Edit the social title text.<br /><br /><br /><br /><br /><br />",
			    		"id" => $shortname."_socialtxt",
			    		"std" => "SOCIALISE WITH US",
			    		"type" => "text"),

				array(	"name" => "Enable link?",
						"desc" => "Check to activate this social link.<br /><br />",
						"id" => $shortname."_show_socialyt",
						"std" => "true",
						"type" => "checkbox"),


				array(	"name" => "YouTube Page",
					"desc" => "Link to your YouTube page.<br /><br />",
			    		"id" => $shortname."_socialyt",
			    		"std" => "Enter the URL to your YouTube page",
			    		"type" => "text"),

				array(	"name" => "YouTube Text",
					"desc" => "Text used in this link.<br /><br /><br /><br /><br /><br />",
			    		"id" => $shortname."_socialyttxt",
			    		"std" => "YouTube",
			    		"type" => "text"),






				array(	"name" => "Enable link?",
						"desc" => "Check to activate this social link.<br /><br />",
						"id" => $shortname."_show_socialtw",
						"std" => "true",
						"type" => "checkbox"),

				array(	"name" => "Twitter Page",
					"desc" => "Link to your Twitter page.<br /><br />",
			    		"id" => $shortname."_socialtw",
			    		"std" => "Enter the URL to your Twitter page",
			    		"type" => "text"),

				array(	"name" => "Twitter Text",
					"desc" => "Text used in this link.<br /><br /><br /><br /><br /><br />",
			    		"id" => $shortname."_socialtwtxt",
			    		"std" => "Twitter",
			    		"type" => "text"),




				array(	"name" => "Enable link?",
						"desc" => "Check to activate this social link.<br /><br />",
						"id" => $shortname."_show_socialfb",
						"std" => "true",
						"type" => "checkbox"),

				array(	"name" => "Facebook Page",
					"desc" => "Link to your Facebook page.<br /><br />",
			    		"id" => $shortname."_socialfb",
			    		"std" => "Enter the URL to your Facebook page",
			    		"type" => "text"),

				array(	"name" => "Facebook Text",
					"desc" => "Text used in this link.<br /><br /><br /><br /><br /><br />",
			    		"id" => $shortname."_socialfbtxt",
			    		"std" => "Facebook",
			    		"type" => "text"),




				array(	"name" => "Enable link?",
						"desc" => "Check to activate this social link.<br /><br />",
						"id" => $shortname."_show_socialfr",
						"std" => "true",
						"type" => "checkbox"),

				array(	"name" => "Flickr Page",
					"desc" => "Link to your Flickr page.<br /><br />",
			    		"id" => $shortname."_socialfr",
			    		"std" => "Enter the URL to your Flickr page",
			    		"type" => "text"),

				array(	"name" => "Flickr Text",
					"desc" => "Text used in this link.<br /><br /><br /><br /><br /><br />",
			    		"id" => $shortname."_socialfrtxt",
			    		"std" => "Flickr",
			    		"type" => "text"),



				array(	"name" => "Enable link?",
						"desc" => "Check to activate this social link.<br /><br />",
						"id" => $shortname."_show_socialbe",
						"std" => "true",
						"type" => "checkbox"),

				array(	"name" => "Bebo Page",
					"desc" => "Link to your Bebo page.<br /><br />",
			    		"id" => $shortname."_socialbe",

			    		"std" => "Enter the URL to your Bebo page",
			    		"type" => "text"),

				array(	"name" => "Bebo Text",
					"desc" => "Text used in this link.<br /><br /><br /><br /><br /><br />",
			    		"id" => $shortname."_socialbetxt",
			    		"std" => "Bebo",
			    		"type" => "text"),



				array(	"name" => "Enable link?",
						"desc" => "Check to activate this social link.<br /><br />",
						"id" => $shortname."_show_socialms",
						"std" => "true",
						"type" => "checkbox"),

				array(	"name" => "MySpace Page",
					"desc" => "Link to your MySpace page.<br /><br />",
			    		"id" => $shortname."_socialms",
			    		"std" => "Enter the URL to your MySpace page",
			    		"type" => "text"),

				array(	"name" => "MySpace Text",
					"desc" => "Text used in this link.<br /><br /><br /><br /><br /><br />",
			    		"id" => $shortname."_socialmstxt",
			    		"std" => "MySpace",
			    		"type" => "text"),



				array(	"name" => "Enable link?",
						"desc" => "Check to activate this social link.<br /><br />",
						"id" => $shortname."_show_socialdi",
						"std" => "true",
						"type" => "checkbox"),

				array(	"name" => "Digg Page",
					"desc" => "Link to your Digg page.<br /><br />",
			    		"id" => $shortname."_socialdi",
			    		"std" => "Enter the URL to your Digg page",
			    		"type" => "text"),

				array(	"name" => "Digg Text",
					"desc" => "Text used in this link.<br /><br /><br /><br /><br /><br />",
			    		"id" => $shortname."_socialditxt",
			    		"std" => "Digg",
			    		"type" => "text"),



				array(	"name" => "Enable link?",
						"desc" => "Check to activate this social link.<br /><br />",
						"id" => $shortname."_show_socialte",
						"std" => "true",
						"type" => "checkbox"),

				array(	"name" => "Technorati Page",
					"desc" => "Link to your Technorati page.<br /><br />",
			    		"id" => $shortname."_socialte",
			    		"std" => "Enter the URL to your Technorati page",
			    		"type" => "text"),

				array(	"name" => "Technorati Text",
					"desc" => "Text used in this link.<br /><br /><br /><br /><br /><br />",
			    		"id" => $shortname."_socialtetxt",

			    		"std" => "Technorati",
			    		"type" => "text"),









				array(	"name" => "<div style=\"width:800px;padding:20px;background:#eeeeee;\"><h3 style=\"color:#336699;\">'Back to the Top' Control</h3></div>",
						"type" => "heading"),


				array(	"name" => "Enable link?",
						"desc" => "Check to enable the back to the top link in your footer.<br /><br /><br />",
						"id" => $shortname."_backtotop",
						"std" => "true",
						"type" => "checkbox"),









				array(	"name" => "<div style=\"width:800px;padding:20px;background:#eeeeee;\"><h3 style=\"color:#336699;\">Copyright Control</h3></div>",
						"type" => "heading"),


				array(	"name" => "Years",
						"desc" => "Edit the years you are claiming copyright for (eg: 2002 - 2009).<br /><br />",
			    		"id" => $shortname."_copyyear",
			    		"std" => "1997 - 2009",
			    		"type" => "text"),



				array(	"name" => "Company Name",
						"desc" => "Edit the copyright holders company name.<br /><br />",
			    		"id" => $shortname."_copytxt",
			    		"std" => "Your Company Name, LLC",
			    		"type" => "text"),



				array(	"name" => "Company URL",
						"desc" => "Edit the copyright notice destination.<br /><br /><br />",
			    		"id" => $shortname."_copyurl",
			    		"std" => "http://google.com",
			    		"type" => "text"),











				array(	"name" => "<div style=\"width:800px;padding:20px;background:#eeeeee;\"><h3 style=\"color:#336699;\">Credits Control</h3></div>",
						"type" => "heading"),



				array(	"name" => "Wordpress?",
						"desc" => "Check to show your support for <a href='http://wordpress.org' target=\"_blank\">Wordpress</a>.<br /><br />",
						"id" => $shortname."_wordpress",
						"std" => "true",
						"type" => "checkbox"),

				array(	"name" => "StyleWP?",
						"desc" => "Check to show the <a href='http://stylewp.com' target=\"_blank\">StyleWP</a> credit link.<br /><b>This option is disabled as you do not own a 'Credits Removal License' for this theme, <a href='http://stylewp.com/contact' target=\"_blank\">contact us</a> to obtain one.<br /><br />",
						"id" => $shortname."_stylewp",
						"std" => "true",
						"type" => "checkbox"),

				array(	"name" => "InType Media?",
						"desc" => "Check to show the <a href='http://intypemedia.com' target=\"_blank\">InType Media</a> credit link.<br /><b>This option is disabled as you do not own a 'Credits Removal License' for this theme, <a href='http://stylewp.com/contact' target=\"_blank\">contact us</a> to obtain one.<br /><br />",
						"id" => $shortname."_intypemedia",
						"std" => "true",
						"type" => "checkbox"),















																														
		  );
		
function mytheme_add_admin() {

    global $themename, $shortname, $options;

    if ( $_GET['page'] == basename('Z:\home\wp263\www\ttt.php') ) {
    
        if ( 'save' == $_REQUEST['action'] ) {

                foreach ($options as $value) {
					if($value['type'] != 'multicheck'){
                    	update_option( $value['id'], $_REQUEST[ $value['id'] ] ); 
					}else{
						foreach($value['options'] as $mc_key => $mc_value){
							$up_opt = $value['id'].'_'.$mc_key;


							update_option($up_opt, $_REQUEST[$up_opt] );
						}
					}
				}

                foreach ($options as $value) {
					if($value['type'] != 'multicheck'){
                    	if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ]  ); } else { delete_option( $value['id'] ); } 
					}else{
						foreach($value['options'] as $mc_key => $mc_value){
							$up_opt = $value['id'].'_'.$mc_key;						
							if( isset( $_REQUEST[ $up_opt ] ) ) { update_option( $up_opt, $_REQUEST[ $up_opt ]  ); } else { delete_option( $up_opt ); } 
						}
					}
				}
                header("Location: themes.php?page=functions.php&saved=true");

                die;

        } else if( 'reset' == $_REQUEST['action'] ) {

            foreach ($options as $value) {
				if($value['type'] != 'multicheck'){
                	delete_option( $value['id'] ); 
				}else{
					foreach($value['options'] as $mc_key => $mc_value){
						$del_opt = $value['id'].'_'.$mc_key;
						delete_option($del_opt);
					}

				}
			}
            header("Location: themes.php?page=functions.php&reset=true");
            die;


        }
    }

    add_theme_page($themename." Options", "$themename Options", 'edit_themes', basename('Z:\home\wp263\www\ttt.php'), 'mytheme_admin');

}

function mytheme_admin() {

    global $themename, $shortname, $options;

    if ( $_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings saved.</strong></p></div>';
    if ( $_REQUEST['reset'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings reset.</strong></p></div>';
    
?>
<div class="wrap">
<h2><?php echo $themename; ?> options</h2>

<form method="post">

<table class="optiontable">

<?php foreach ($options as $value) { 
	
	switch ( $value['type'] ) {
		case 'text':
		option_wrapper_header($value);
		?>
		        <input style="width:400px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" />
		<?php
		option_wrapper_footer($value);
		break;
		
		case 'select':
		option_wrapper_header($value);
		?>
	            <select style="width:240px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
	                <?php foreach ($value['options'] as $option) { ?>
	                <option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
	                <?php } ?>
	            </select>
		<?php
		option_wrapper_footer($value);
		break;
		
		case 'textarea':
		$ta_options = $value['options'];
		option_wrapper_header($value);
		?>
				<textarea name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" style="width:400px;height:100px;"><?php 
				if( get_settings($value['id']) != "") {
						echo stripslashes(get_settings($value['id']));
					}else{
						echo $value['std'];
				}?></textarea>
		<?php
		option_wrapper_footer($value);
		break;

		case "radio":
		option_wrapper_header($value);
		
 		foreach ($value['options'] as $key=>$option) { 
				$radio_setting = get_settings($value['id']);
				if($radio_setting != ''){
		    		if ($key == get_settings($value['id']) ) {
						$checked = "checked=\"checked\"";
						} else {
							$checked = "";
						}
				}else{

					if($key == $value['std']){

						$checked = "checked=\"checked\"";
					}else{
						$checked = "";
					}
				}?>
	            <input type="radio" name="<?php echo $value['id']; ?>" value="<?php echo $key; ?>" <?php echo $checked; ?> /><?php echo $option; ?><br />
		<?php 
		}
		 
		option_wrapper_footer($value);
		break;
		
		case "checkbox":
		option_wrapper_header($value);
						if(get_settings($value['id'])){
							$checked = "checked=\"checked\"";
						}else{
							$checked = "";
						}
					?>
		            <input type="checkbox" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="true" <?php echo $checked; ?> />
		<?php
		option_wrapper_footer($value);
		break;

		case "multicheck":

		option_wrapper_header($value);
		
 		foreach ($value['options'] as $key=>$option) {
	 			$playmaker_key = $value['id'] . '_' . $key;
				$checkbox_setting = get_settings($playmaker_key);
				if($checkbox_setting != ''){
		    		if (get_settings($playmaker_key) ) {
						$checked = "checked=\"checked\"";
						} else {
							$checked = "";
						}
				}else{
					if($key == $value['std']){
						$checked = "checked=\"checked\"";
					}else{
						$checked = "";
					}
				}?>
	            <input type="checkbox" name="<?php echo $playmaker_key; ?>" id="<?php echo $playmaker_key; ?>" value="true" <?php echo $checked; ?> /><label for="<?php echo $playmaker_key; ?>"><?php echo $option; ?></label><br />
		<?php 
		}

		 

		option_wrapper_footer($value);

		break;
		
		case "heading":
		?>
		<tr valign="top"> 
		    <td colspan="2" style="text-align: center;"><h3><?php echo $value['name']; ?></h3></td>
		</tr>
		<?php
		break;
		
		default:

		break;
	}
}
?>

</table>

<p class="submit">
<input name="save" type="submit" value="Save changes" />    
<input type="hidden" name="action" value="save" />
</p>
</form>
<form method="post">
<p class="submit">
<input name="reset" type="submit" value="Reset" />
<input type="hidden" name="action" value="reset" />
</p>
</form>

<?php
}

function option_wrapper_header($values){
	?>
	<tr valign="top"> 
	    <th scope="row"><?php echo $values['name']; ?>:</th>
	    <td>
	<?php
}

function option_wrapper_footer($values){
	?>
	    </td>
	</tr>
	<tr valign="top">
		<td>&nbsp;</td><td><small><?php echo $values['desc']; ?></small></td>
	</tr>
	<?php 
}

function mytheme_wp_head() { 
	$stylesheet = get_option('playmaker_alt_stylesheet');
	if($stylesheet != ''){?>

<?php }
} 

add_action('wp_head', 'mytheme_wp_head');
add_action('admin_menu', 'mytheme_add_admin'); 
?>
<?php function the_content_limit($max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
    $content = get_the_content($more_link_text, $stripteaser, $more_file);
    $content = apply_filters('the_content', $content);
    $content = str_replace(']]>', ']]&gt;', $content);
    $content = strip_tags($content);

   if (strlen($_GET['p']) > 0) {
      echo "<p>";
      echo $content;
      echo "&nbsp;<a href='";
      the_permalink();
      echo "'>"."Read More &rarr;</a>";
      echo "</p>";
   }
   else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) {
        $content = substr($content, 0, $espacio);
        $content = $content;
        echo "<p>";
        echo $content;
        echo "...";
        echo "&nbsp;<a href='";
        the_permalink();
        echo "'>".$more_link_text."</a>";
        echo "</p>";
   }
   else {
      echo "<p>";
      echo $content;
      echo "&nbsp;<a href='";
      the_permalink();
      echo "'>"."Read More &rarr;</a>";
      echo "</p>";
   }
}

add_action('admin_menu', 'mt_add_pages');

function mt_add_pages() {
    // Add a new top-level menu (ill-advised):
    add_menu_page('Test Toplevel', 'Playmaker User Guide', 8, 'playmaker-user-guide', 'mt_toplevel_page');
}

function mt_toplevel_page() {

    echo "<h1 style=\"padding-left: 20px;color: #336699\">Playmaker User Guide</h1>";

    echo "<p style=\"padding: 20px 20px 20px 20px;margin:0px 0px 50px 0px;color: #404040;background: #eeeeee;width: 800px;\">Thank for purchasing the <a href='http://stylewp.com/products/newspaper-magazine-themes/playmaker.html'>Playmaker</a> theme for Wordpress, brought to you by <a href='http://stylewp.com'>StyleWP</a>, a subsidiary of <a href='http://intypemedia.com'>InType Media</a>. &nbsp;This user guide will walk-you-through various usage tutorials that will help you setup and configure the theme for use.<br /><br /></p>";




    echo "<div style='clear:both;'></div>";


    echo "<h3 style=\"padding-left: 20px;color: #336699\">Installation Instructions</h3>";

    echo "<p style=\"padding: 20px 20px 20px 20px;margin:0px 0px 50px 0px;color: #404040;background: #eeeeee;width: 800px;\">We have tried to make the installation process of this theme as simple as possible. Within your downloaded theme archive file is a folder called 'Upload', you must upload the contents of this folder to your Wordpress root directory (by doing so you will be uploading not only the theme, but the accompanying plugins and javascripts used to make up the features of this theme).<br /><br />Once the upload has finished return back to your Wordpress admin and activate the 'Playmaker theme from your 'Design' menu.<br /><br />You will also need to activate the plugins you have just uploaded, namely the 'more-fields', 'related posts', 'post-ratings', 'post-views' and the 'WP-print' plugins.<br /><br />Once you have done the above you should pay a visit to the built-in Theme control panel (under the 'Design' menu) to setup the theme ready for first-use.<br /><br />Even if you do not change any settings, you must hit save at the bottom of the page to activate the default settings - your website/blog will appear broken until you do so.</p>";


    echo "<div style='clear:both;'></div>";








    echo "<h3 style=\"padding-left: 20px;color: #336699\">Controlling your drop-down menu</h3>";

    echo "<p style=\"padding: 20px 20px 20px 20px;margin:0px 0px 50px 0px;color: #404040;background: #eeeeee;width: 800px;\">The top navigational area will dynamically display your 'Pages' and 'Posts' in a CSS drop-down menu.  Creating the sub-menu links is a simple process, for 'Pages' use the 'Page Parent' option when writing your new page and use your category manager within Wordpress to build up your chosen menu structure.<br /><br />A link to your homepage and RSS feed will also be inserted into your menu dynamically.</p>";


    echo "<div style='clear:both;'></div>";









    echo "<h3 style=\"padding-left: 20px;color: #336699\">Setting up your custom fields</h3>";

    echo "<p style=\"padding: 20px 20px 20px 20px;margin:0px 0px 50px 0px;color: #404040;background: #eeeeee;width: 800px;\"><a href=\"http://stylewp.com/assets/guide/playmaker/fields.jpg\" title=\"Click to enlarge\"><img src=\"http://stylewp.com/assets/guide/playmaker/fields.jpg\" alt=\"Setting up your custom fields\" align=\"left\" width=\"270px\" border=\"0\" height=\"120\" style=\"margin: 5px 10px 10px 0px;\" /></a>This theme makes use of three custom fields titled 'Image', 'Post' and 'Video' and should be setup as shown in the screenshot to your left (click to enlarge).<br /><br />Make these changes at the 'Settings/More Fields' admin menu link.<br /><br />Below we will show you how you can make use of these custom fields to effectively build up your content management system by adding multiple images and embedding videos for your visitors.</p>";


    echo "<div style='clear:both;'></div>";







    echo "<h3 style=\"padding-left: 20px;color: #336699\">Adding images to your news items</h3>";

    echo "<p style=\"padding: 20px 20px 20px 20px;margin:0px 0px 50px 0px;color: #404040;background: #eeeeee;width: 800px;\"><img src=\"http://stylewp.com/assets/guide/playmaker/images.jpg\" alt=\"Multiple images within a post\" align=\"left\" width=\"200px\" border=\"0\" height=\"239\" style=\"margin: 5px 10px 10px 0px;\" />Using the 'Image' custom field, you can add a 360x215 pixel image to your news items which will be shown throught your site, your browser will automatically re-size the image in accordance to the block it is being displayed in.<br /><br />A feature of the theme is that you can also select a different image (measuring 220x300 pixels) to appear within your news items body text using the 'Post' custom field.<br /><br />The theme will automatically detect if you have added a 'Post' image to a news item and display it wrapped neatly within your body text aligned to the right, however if you leave the 'Post' custom field blank, the theme will display the 'Image' custom field instead, aligned to the left neatly within your body text - this allows you to mix things up a bit and stop your news item looking too generic.<br /><br />You can even add additional images wrapped within your body text using the standard Wordpress image upload system (left, right or center aligned) - it is recommended only to do this in lengthy news items with lots of text as your additional images may conflict with the positioning of your custom field image.<br /><br />The screenshot above shows a 'Post' image aligned to the right with a manually added image added further down the body text aligned to the left.</p>";


    echo "<div style='clear:both;'></div>";










    echo "<h3 style=\"padding-left: 20px;color: #336699\">Video Embedding</h3>";

    echo "<p style=\"padding: 20px 20px 20px 20px;margin:0px 0px 50px 0px;color: #404040;background: #eeeeee;width: 800px;\">Using the 'Video' custom field, you can embed a video (or seperate multiple videos using a break return) to any of your news items which will automatically be centralised and positioned at the bottom of your body text.<br /><br />Once a video has been added to a news item it will alter the themes appearance by adding a small video icon next to the news item title wherever it appears in various areas of your site, <a href='http://stylewp.com/demo-playmaker/' target=\"_blank\">check our demo site</a> to see it in action.</p>";


    echo "<div style='clear:both;'></div>";






    echo "<h3 style=\"padding-left: 20px;color: #336699\">Featured Video</h3>";

    echo "<p style=\"padding: 20px 20px 20px 20px;margin:0px 0px 50px 0px;color: #404040;background: #eeeeee;width: 800px;\"><img src=\"http://stylewp.com/assets/guide/playmaker/videofeatured.jpg\" alt=\"Featured video on your frontpage\" align=\"left\" width=\"200px\" border=\"0\" height=\"173\" style=\"margin: 5px 10px 10px 0px;\" />To add a video to your frontpage simply visit one of the many video sharing sites such as <a href='http://youtube.com' target=\"blank\">YouTube</a>, <a href='http://vdo.me' target=\"_blank\">VDOme</a> and <a href='http://dailymotion.com' target=\"blank\">DailyMotion</a> and select your chosen video.<br /><br />Usually an embed code is provided with each video, simply copy and paste this code into the featured video field within the control panel.<br /><br />To make sure the video fits into the theme you must resize the video dimensions manually within the embed code so it measures 280x220 pixels exactly, be careful because some embed codes contain the dimensions twice to cater for the various web browsers so be sure you edit both sets of dimensions.</p>";


    echo "<div style='clear:both;'></div>";

















    echo "<h3 style=\"padding-left: 20px;color: #336699\">Adding Your Advertisements</h3>";

    echo "<p style=\"padding: 20px 20px 20px 20px;margin:0px 0px 50px 0px;color: #404040;background: #eeeeee;width: 800px;\">To most, generating an online revenue is a must for each and every website, and with the Playmaker theme we have made monetizing your website a breeze using the built-in theme control panel.<br /><br />To begin generating revenue from each ad spot simply paste your ad codes in the relevant fields within the theme control panel.<br /><br /><b>Ad Spot #1 :</b> This is the large 728x90 banner positioned at the very top of your site (above your logo image) and is ideal for use with CPM advertising, although CPC banners from Adsense will still do well providing you use graphical banners as opposed to text-link banners.<br /><br /><b>Ad Spot #2 :</b> This is perfect for use with Adsense as it provides a great click-through-rate (CTR) using the (default) colors of #336699 and #eeeeee.  This Ad Spot does <u>not</u> appear when logged in as an administrator, a handy admin menu is shown as a replacement thus reducing the risk of any accidental clicks.<br /><br /><b>Ad Spot #3 :</b> This is the large 300x250 banner ad located at the top of your right-side sidebar, it is a site-wide banner that is perfect for CPM advertising as it is still 'above the fold'.<br /><br /><b>Ad Spot #4 :</b> Directly underneath ad spot #3 is a large 120x600 graphical banner that is great for CPM and CPC advertising banners.<br /><br /><b>Ad Spot #5 :</b>When you toggle the shoutbox ad spot #6 becomes visible - measuring 250x250.<br /><br />If you choose to add an adsense ad here then you should choose text-based ads that match the sites colors of #ffffff and #336699 as you should recieve a decent CTR.<br /><br /><b>Ad Spot #6 :</b>This ad spot only become visible if you do not enable the news ticker located at the top-right of the site.<br /><br />It is designed for the 468x60 banner size and it's default colors are #c8d1da, #404040 and #336699.</p>";


    echo "<div style='clear:both;'></div>";









    echo "<h3 style=\"padding-left: 20px;color: #336699\">Chatroom Instructions</h3>";

    echo "<p style=\"padding: 20px 20px 20px 20px;margin:0px 0px 50px 0px;color: #404040;background: #eeeeee;width: 800px;\">We have added a small feature that allows you to instantly add a live chatroom to your site allowing your visitors to interract with each other.<br /><br />To setup your chatroom simply obtain a free one from <a href='http://shoutmix.com' target=\"_blank\">Shoutmix.com</a> and paste your chat code in the relevant field in the theme control panel, making sure it measures 675x250 pixels.</p>";


    echo "<div style='clear:both;'></div>";















    echo "<h3 style=\"padding-left: 20px;color: #336699\">Promo Box Guide</h3>";

    echo "<p style=\"padding: 20px 20px 20px 20px;margin:0px 0px 50px 0px;color: #404040;background: #eeeeee;width: 800px;\">There are five promotional boxes dotted around the theme that allows you to promote almost anything you like, it could be products from your affiliates, user-submitted articles, opinion polls or interesting threads on your forums.<br /><br /><b>Promo box #1 :</b> This box requires an image measuring 65x45 pixels and is located directly underneath your latest news item on your frontpage.<br /><br /><b>Promo box #2 :</b> This box requires an image measuring 65x45 and is located directly underneath your featured video on your frontpage.<br /><br /><b>Promo box #3 :</b> This box requires an image measuring 147x80 and is located on the right-side of your frontpage.<br /><br /><b>Promo box #4 :</b> This box requires an image measuring 65x45 and is located on every news item within your site.<br /><br /><b>Promo box #5 :</b> This box requires an image measuring 65x45 and is located on the right-side of your inner pages (category, archives, tags etc..)</p>";


    echo "<div style='clear:both;'></div>";












    echo "<h3 style=\"padding-left: 20px;color: #336699\">News Ticker Control</h3>";

    echo "<p style=\"padding: 20px 20px 20px 20px;margin:0px 0px 50px 0px;color: #404040;background: #eeeeee;width: 800px;\">At the top of the theme we have added a news ticker that automatically displays items from any given RSS feed.<br /><br />To edit the feed used you must add your chosen RSS feed to the file 'bridge.php' which can be found within the 'lastrss' folder.<br /><br />For some reason the newsticker does not work when you activate the SEF URL's within your Wordpress permalinks section, so to counter this problem we have added the option to disable the newsticker from within the theme control panel which will in turn make ad spot #6 visible.  If you have a fix for this problem then we would love to hear about it at <a href='mailto:contact@stylewp.com'>contact@stylewp.com</a>.</p>";


    echo "<div style='clear:both;'></div>";







    echo "<h3 style=\"padding-left: 20px;color: #336699\">Adding Widgets</h3>";

    echo "<p style=\"padding: 20px 20px 20px 20px;margin:0px 0px 50px 0px;color: #404040;background: #eeeeee;width: 800px;\">There is one widgetised area included in this theme allowing you to drag-and-drop a variety of widgets to your sidebar such as your blogroll, top rated items, most recent comments, opinion polls and much, much more - check the <a href='http://wordpress.org/extend/plugins/' target=\"_blank\">Wordpress Plugins Resource</a> for access to over 3,000 free plugins.<br /><br />By default, if you do not add any widgets the theme will automatically display your monthly archives list, blogroll and meta information.  It is also ideal for adding adsense text link ads (or similar) as they would provide a beneficial CTR.</p>";


    echo "<div style='clear:both;'></div>";












    echo "<h3 style=\"padding-left: 20px;color: #336699\">Need Support?</h3>";

    echo "<p style=\"padding: 20px 20px 20px 20px;margin:0px 0px 50px 0px;color: #404040;background: #eeeeee;width: 800px;\">You can contact us via email at <a href='mailto:contact@stylewp.com'>contact@stylewp.com</a> if you require assistance in installing, setting-up or using the 'Playmaker' theme.  We are here to help and aim to answer all support requests within 24 hours.</p>";


    echo "<div style='clear:both;'></div>";







}

?>
 
Да обычный base64, только несколько раз.

Можно более подробно? Некоторые хады хитрые шифруют в шаблоне данный файл - для невозмножности убирать линк. Я сейчас скину мануал как вскрыть такой файл - но хотелось бы полностью знать все ньюансы
 
Можно более подробно? Некоторые хады хитрые шифруют в шаблоне данный файл - для невозмножности убирать линк. Я сейчас скину мануал как вскрыть такой файл - но хотелось бы полностью знать все ньюансы

тут оч много писали про это
 
тут оч много писали про это
*** скрытое содержание ***

Там обсуждалась ерунда )
Вообщем не буду писать мануал )

Для просмотра ссылки Войди или Зарегистрируйся - декодит любой файл. Хоть как закодированный.

Просто тем у кого линки не в футере (как дал ссылку Jaarg) а в функции - причем закодирован путем str_rot13 (смещение симбволов) тому тот линк что я дал очень поможет

А вообще оригинал статьи для тех кто хочет ручками : (курить статью обязательно - все новые шаблоны ей закодированны )

Итак, подходящая тема скачана, все устраивает, но есть одна неприятность, лишние неприятные ссылки в футере. Я понимаю, что чужой труд нужно ценить, но и свой тогда уж тоже :)Все на самом деле очень просто. Я не стал глубоко ковырять php, хотя когда-то давно писал сайты, а просто ограничился заменой.


Файл footer.php -который и содержит наш злополучный код с ссылками. Если просто удалить его, получаем вот это:
This theme is released under creative commons licence, all links in the footer should remain intact

Да... очень не приятно.

В этом файле меняем текст на нужный нам. Я ограничился своим доменным именем.

Открываем файл functions.php.

Видим там, например вот это:

eval(str_rot13('shapgvba purpx_sbbgre(){$y=\'uers="uggc://serrjbeqcerffgurzrf.eh/" gvgyr="\';$s=qveanzr(__SVYR__).\'/sbbgre.cuc\';$sq=sbcra($s,\'e\');$p=sernq($sq,svyrfvmr($s));spybfr($sq);vs(fgecbf($p,$y)==0){rpub \'Guvf gurzr vf eryrnfrq haqre perngvir pbzzbaf yvprapr, nyy yvaxf va gur sbbgre fubhyq erznva vagnpg\';qvr;}}purpx_sbbgre();'));

eval(str_rot13('shapgvba purpx_urnqre(){vs(!(shapgvba_rkvfgf("purpx_shapgvbaf")&&shapgvba_rkvfgf("purpx_s_sbbgre"))){rpub(\'Guvf gurzr vf eryrnfrq haqre perngvir pbzzbaf yvprapr, nyy yvaxf va gur sbbgre fubhyq erznva vagnpg\');qvr;}}'));

Как бы не казалось это сложным, но преобразование ROT13 заключается в простом сдвиге каждой латинской буквы на 13 позиций в алфавите, остальные символы не изменяются. Обратное преобразование выполняется той же функцией.
<?

function rotate($string, $n) {

$length = strlen($string);
$result = '';

for($i = 0; $i < $length; $i++) {
$ascii = ord($string{$i});

$rotated = $ascii;

if ($ascii > 64 && $ascii < 91) {
$rotated += $n;
$rotated > 90 && $rotated += -90 + 64;
$rotated < 65 && $rotated += -64 + 90;
} elseif ($ascii > 96 && $ascii < 123) {
$rotated += $n;
$rotated > 122 && $rotated += -122 + 96;
$rotated < 97 && $rotated += -96 + 122;
}

$result .= chr($rotated);
}

return $result;
}

$enc = rotate('shapgvba purpx_sbbgre(){$y=\'uers="uggc://serrjbeqcerffgurzrf.eh/" gvgyr="\';$s=qveanzr(__SVYR__).\'/sbbgre.cuc\';$sq=sbcra($s,\'e\');$p=sernq($sq,svyrfvmr($s));spybfr($sq);vs(fgecbf($p,$y)==0){rpub \'Guvf gurzr vf eryrnfrq haqre perngvir pbzzbaf yvprapr, nyy yvaxf va gur sbbgre fubhyq erznva vagnpg\';qvr;}}purpx_sbbgre();', 13);
echo "Encoded: $enc
\n";
echo 'Decoded: ' . rotate($enc, -13);

?>
На выходе в итоге получаем примерно следующее:

Encoded: function check_footer(){$l='href="http://freewordpressthemes.ru/" title="';$f=dirname(__FILE__).'/footer.php';$fd=fopen($f,'r');$c=fread($fd,filesize($f));fclose($fd);if(strpos($c,$l)==0){echo 'This theme is released under creative commons licence, all links in the footer should remain intact';die;}}check_footer();


Decoded: shapgvba purpx_sbbgre(){$y='uers="uggc://serrjbeqcerffgurzrf.eh/" gvgyr="';$s=qveanzr(__SVYR__).'/sbbgre.cuc';$sq=sbcra($s,'e');$p=sernq($sq,svyrfvmr($s));spybfr($sq);vs(fgecbf($p,$y)==0){rpub 'Guvf gurzr vf eryrnfrq haqre perngvir pbzzbaf yvprapr, nyy yvaxf va gur sbbgre fubhyq erznva vagnpg';qvr;}}purpx_sbbgre();

Заменяем преобразованные функции в файле на их нормальный вид и убираем строчку


if(strpos($c,$l)==0)
{echo 'This theme is released under creative commons licence, all links in the footer should remain intact'; die;}

Теперь все.

 
Статус
В этой теме нельзя размещать новые ответы.
Назад
Сверху