Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
what's the problem with decoded php script?
Old 06-02-2010, 11:41 AM what's the problem with decoded php script?
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
hi,

I have decoded the php but what's the problem with this code :

PHP Code:
?><?php

$themename 
"WPSN";
$shortname "stylewp";

$stylewp_categories_obj get_categories('hide_empty=0');
$stylewp_categories = array();

$sidebarlatest = array("Select a Number:","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50");

foreach (
$stylewp_categories_obj as $stylewp_cat) {
$stylewp_categories[$stylewp_cat->cat_ID] = $stylewp_cat->cat_name;
}

$categories_tmp array_unshift($stylewp_categories"Select a category:");

$options = array (




                array(    
"name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">General Settings</h3></div>",
                        
"type" => "heading"),


                array(    
"name" => "Activate News Ticker?",
                        
"desc" => "Check to activate the RSS news ticker on your frontpage<br />(See users guide for setup instructions)<br /><br />",
                        
"id" => $shortname."_showticker",
                        
"std" => "true",
                        
"type" => "checkbox"),

                array(    
"name" => "Activate Pages Menu?",
                        
"desc" => "Check to activate your 'Pages' menu<br /><br />",
                        
"id" => $shortname."_showpagesmenu",
                        
"std" => "true",
                        
"type" => "checkbox"),

                array(    
"name" => "Activate Categories Menu?",
                        
"desc" => "Check to activate your 'Categories' menu<br /><br />",
                        
"id" => $shortname."_showcatsmenu",
                        
"std" => "true",
                        
"type" => "checkbox"),

                array(    
"name" => "Activate Todays Date?",
                        
"desc" => "Check to activate the date and time in your header<br /><br />",
                        
"id" => $shortname."_showdate",
                        
"std" => "true",
                        
"type" => "checkbox"),


                array(    
"name" => "More News Title",
                    
"desc" => "Edit the more news block.<br /><br />",
                        
"id" => $shortname."_haveyouread",
                        
"std" => "Have you read?",
                        
"type" => "text"),

                array(    
"name" => "Show 'Top' link?",
                        
"desc" => "Check to activate the 'top' link in your footer<br /><br />",
                        
"id" => $shortname."_showtop",
                        
"std" => "true",
                        
"type" => "checkbox"),

                array(    
"name" => "Edit 'Top' text",
                    
"desc" => "Edit the 'top' link text.<br /><br /><br />",
                        
"id" => $shortname."_toplink",
                        
"std" => "Back to the Top",
                        
"type" => "text"),



                array(    
"name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Google Analytics</h3></div>",

                        
"type" => "heading"),



                array(    
"name" => "Analytics Code",
                        
"desc" => "Paste your Google analytics code here or<br />leave blank to deactivate this setting.<br /><br />",
                        
"id" => $shortname."_analytics",
                        
"std" => "",
                        
"type" => "textarea"),



                array(    
"name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">META Settings</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:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Members Menu</h3></div>",
                        
"type" => "heading"),



                array(    
"name" => "Home Link",
                    
"desc" => "Give this link a suitable title.<br /><br />",
                        
"id" => $shortname."_toplinks1",
                        
"std" => "WPSN.com",
                        
"type" => "text"),

                array(    
"name" => "Admin Link",
                    
"desc" => "Give this link a suitable title.<br /><br />",
                        
"id" => $shortname."_toplinks2",
                        
"std" => "MyWPSN",
                        
"type" => "text"),


                array(    
"name" => "Profile Link",
                    
"desc" => "Give this link a suitable title.<br /><br />",
                        
"id" => $shortname."_toplinks3",
                        
"std" => "Profile",
                        
"type" => "text"),

                array(    
"name" => "Register Link",
                    
"desc" => "Give this link a suitable title.<br /><br />",
                        
"id" => $shortname."_toplinks4",
                        
"std" => "Register",





                        
"type" => "text"),

                array(    
"name" => "Password Link",
                    
"desc" => "Give this link a suitable title.<br /><br /><br />",
                        
"id" => $shortname."_toplinks5",
                        
"std" => "Forgot Password?",
                        
"type" => "text"),





                array(    
"name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Search Settings</h3></div>",
                        
"type" => "heading"),



                array(    
"name" => "Search Tagline",
                    
"desc" => "Add a suitable tagline above your frontpage search field.<br /><br />",
                        
"id" => $shortname."_searchtagline",
                        
"std" => "Try the powerful WPSN search:",
                        
"type" => "text"),

                array(    
"name" => "Search field text",
                    
"desc" => "Add some text to your search field.<br /><br />",
                        
"id" => $shortname."_searchline",
                        
"std" => "Search our site . . .",
                        
"type" => "text"),


                array(    
"name" => "Selected Search Text",
                    
"desc" => "Add some text above your selected search area.<br /><br />",
                        
"id" => $shortname."_searchestagline",
                        
"std" => "Selected WPSN searches:",
                        
"type" => "text"),

                array(    
"name" => "Search Term #1",
                    
"desc" => "Add a single-word search term here.<br /><br />",
                        
"id" => $shortname."_search1",
                        
"std" => "Rankings",
                        
"type" => "text"),

                array(    
"name" => "Search Term #2",
                    
"desc" => "Add a single-word search term here.<br /><br />",
                        
"id" => $shortname."_search2",
                        
"std" => "Fantasy",
                        
"type" => "text"),

                array(    
"name" => "Search Term #3",
                    
"desc" => "Add a single-word search term here.<br /><br />",
                        
"id" => $shortname."_search3",
                        
"std" => "Picks",
                        
"type" => "text"),

                array(    
"name" => "Search Term #4",
                    
"desc" => "Add a single-word search term here.<br /><br />",
                        
"id" => $shortname."_search4",
                        
"std" => "Injuries",
                        
"type" => "text"),

                array(    
"name" => "Search Term #5",
                    
"desc" => "Add a single-word search term here.<br /><br />",
                        
"id" => $shortname."_search5",
                        
"std" => "Projections",
                        
"type" => "text"),

                array(    
"name" => "Search Term #6",
                    
"desc" => "Add a single-word search term here.<br /><br />",
                        
"id" => $shortname."_search6",
                        
"std" => "Rookies",
                        
"type" => "text"),

                array(    
"name" => "Search Term #7",
                    
"desc" => "Add a single-word search term here.<br /><br />",
                        
"id" => $shortname."_search7",
                        
"std" => "Blogs",
                        
"type" => "text"),

                array(    
"name" => "Search Term #8",
                    
"desc" => "Add a single-word search term here.<br /><br /><br />",
                        
"id" => $shortname."_search8",
                        
"std" => "Superbowl",
                        
"type" => "text"),






                array(    
"name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Frontpage Static Links</h3></div>",
                        
"type" => "heading"),



                array(    
"name" => "Sub-Link #1",
                    
"desc" => "Give this link a suitable title.<br /><br />",
                        
"id" => $shortname."_lbox1txt",
                        
"std" => "Watch: Implications",
                        
"type" => "text"),

                array(    
"name" => "Sub-Link URL #1",
                    
"desc" => "Enter the link destination.<br /><br />",
                        
"id" => $shortname."_lbox1url",
                        
"std" => "#",
                        
"type" => "text"),





                array(    
"name" => "Sub-Link #2",
                    
"desc" => "Give this link a suitable title.<br /><br />",
                        
"id" => $shortname."_lbox2txt",
                        
"std" => "Zoom Gallery",
                        
"type" => "text"),

                array(    
"name" => "Sub-Link URL #2",
                    
"desc" => "Enter the link destination.<br /><br />",
                        
"id" => $shortname."_lbox2url",
                        
"std" => "#",
                        
"type" => "text"),





                array(    
"name" => "Sub-Link #3",
                    
"desc" => "Give this link a suitable title.<br /><br />",
                        
"id" => $shortname."_lbox3txt",
                        
"std" => "Giants 31 - 34 Redskins",
                        
"type" => "text"),

                array(    
"name" => "Sub-Link URL #3",
                    
"desc" => "Enter the link destination.<br /><br />",
                        
"id" => $shortname."_lbox3url",
                        
"std" => "#",
                        
"type" => "text"),





                array(    
"name" => "Sub-Link #4",
                    
"desc" => "Give this link a suitable title.<br /><br />",
                        
"id" => $shortname."_lbox4txt",
                        
"std" => "Leap of faith",
                        
"type" => "text"),

                array(    
"name" => "Sub-Link URL #4",
                    
"desc" => "Enter the link destination.<br /><br />",
                        
"id" => $shortname."_lbox4url",
                        
"std" => "#",
                        
"type" => "text"),





                array(    
"name" => "Sub-Link #5",
                    
"desc" => "Give this link a suitable title.<br /><br />",
                        
"id" => $shortname."_lbox5txt",
                        
"std" => "Bulls 99 - 102 Lakers",
                        
"type" => "text"),

                array(    
"name" => "Sub-Link URL #5",
                    
"desc" => "Enter the link destination.<br /><br />",
                        
"id" => $shortname."_lbox5url",
                        
"std" => "#",
                        
"type" => "text"),





                array(    
"name" => "Sub-Link #6",
                    
"desc" => "Give this link a suitable title.<br /><br />",
                        
"id" => $shortname."_lbox6txt",
                        
"std" => "NFL Europa LIVE!",
                        
"type" => "text"),

                array(    
"name" => "Sub-Link URL #6",
                    
"desc" => "Enter the link destination.<br /><br />",
                        
"id" => $shortname."_lbox6url",
                        
"std" => "#",
                        
"type" => "text"),



                array(    
"name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Selectable News Block</h3></div>",
                        
"type" => "heading"),


                array(     
"name" => "Item #1",
                           
"desc" => "Select the category this area will display news from.<br /><br />",
                        
"id" => $shortname."_fl1l",
                        
"std" => "Select a category:",
                        
"type" => "select",
                        
"options" => $stylewp_categories),

                array(     
"name" => "Item #2",
                           
"desc" => "Select the category this area will display news from.<br /><br />",
                        
"id" => $shortname."_fl2l",
                        
"std" => "Select a category:",
                        
"type" => "select",
                        
"options" => $stylewp_categories),

                array(     
"name" => "Item #3",
                           
"desc" => "Select the category this area will display news from.<br /><br />",
                        
"id" => $shortname."_fl3l",
                        
"std" => "Select a category:",
                        
"type" => "select",
                        
"options" => $stylewp_categories),






                array(    
"name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Latest News Links</h3></div>",
                        
"type" => "heading"),



                array(    
"name" => "Link #1",
                    
"desc" => "Give this link a suitable title.<br /><br />",
                        
"id" => $shortname."_newslink1",
                        
"std" => "Latest News",
                        
"type" => "text"),





                array(    
"name" => "Link #2",
                    
"desc" => "Give this link a suitable title.<br /><br />",
                        
"id" => $shortname."_newslink2",
                        
"std" => "Rumor Central",
                        
"type" => "text"),







                array(    
"name" => "Link #2 Destination",
                    
"desc" => "Paste the destination URL for this link.<br /><br />",
                        
"id" => $shortname."_newslink2url",
                        
"std" => "#",
                        
"type" => "text"),



                array(    
"name" => "Link #3",
                    
"desc" => "Give this link a suitable title.<br /><br />",
                        
"id" => $shortname."_newslink3",
                        
"std" => "On WPSN TV",
                        
"type" => "text"),



                array(    
"name" => "Link #3 Destination",
                    
"desc" => "Paste the destination URL for this link.<br /><br />",
                        
"id" => $shortname."_newslink3url",
                        
"std" => "#",
                        
"type" => "text"),







                array(    
"name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Promotional Settings</h3></div>",
                        
"type" => "heading"),

                array(    
"name" => "<h4 style=\"color:#cc0000;\">Block #1</h4></div>",
                        
"type" => "heading"),

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


                array(    
"name" => "Left Title",
                    
"desc" => "Enter a header for this block.<br /><br />",
                        
"id" => $shortname."_p1h1",
                        
"std" => "This is a suitable title for this block",
                        
"type" => "text"),

                array(    
"name" => "Left Image",
                    
"desc" => "Enter the URL to your chosen image.<br /><br />",
                        
"id" => $shortname."_p1img",
                        
"std" => "http://stylewp.com/assets/author_1.jpg",
                        
"type" => "text"),

                array(    
"name" => "Left Contents",
                    
"desc" => "Enter some relevant text here.<br /><br />",
                        
"id" => $shortname."_p1txt",
                        
"std" => "This is some text to accompany the above image and is controlled using the built-in theme control panel.",
                        
"type" => "textarea"),

                array(    
"name" => "Left Destination",
                    
"desc" => "Enter the destination URL here.<br /><br /><br />",
                        
"id" => $shortname."_p1url",
                        
"std" => "#",
                        
"type" => "text"),




                array(    
"name" => "Right Title",
                    
"desc" => "Enter a header for this block.<br /><br />",
                        
"id" => $shortname."_p2h1",
                        
"std" => "This is a suitable title for this block",
                        
"type" => "text"),

                array(    
"name" => "Right Image",
                    
"desc" => "Enter the URL to your chosen image.<br /><br />",
                        
"id" => $shortname."_p2img",
                        
"std" => "http://stylewp.com/assets/author_2.jpg",
                        
"type" => "text"),

                array(    
"name" => "Right Contents",
                    
"desc" => "Enter some relevant text here.<br /><br />",
                        
"id" => $shortname."_p2txt",
                        
"std" => "This is some text to accompany the above image and is controlled using the built-in theme control panel.",
                        
"type" => "textarea"),

                array(    
"name" => "Right Destination",
                    
"desc" => "Enter the destination URL here.<br /><br /><br />",
                        
"id" => $shortname."_p2url",
                        
"std" => "#",
                        
"type" => "text"),





                array(    
"name" => "<h4 style=\"color:#cc0000;\">Block #2</h4></div>",
                        
"type" => "heading"),



                array(    
"name" => "Block Title",
                    
"desc" => "Give this block a title.<br /><br /><br />",
                        
"id" => $shortname."_pbtitle",
                        
"std" => "Another Promotional Block",
                        
"type" => "text"),


                array(    
"name" => "Destination",
                    
"desc" => "Enter the destination URL here.<br /><br />",
                        
"id" => $shortname."_pburl",
                        
"std" => "#",
                        
"type" => "text"),



                array(    
"name" => "Image",
                    
"desc" => "Enter your chosen image URL.<br /><br />",
                        
"id" => $shortname."_pbimg",
                        
"std" => "http://stylewp.com/assets/300_promo.jpg",
                        
"type" => "text"),



                array(    
"name" => "Alt Text",
                    
"desc" => "Enter some relevant text which is used as the image alt.<br /><br /><br />",
                        
"id" => $shortname."_pbalt",
                        
"std" => "This is a promotional block",
                        
"type" => "text"),






                array(    
"name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Inner Pages Control</h3></div>",

                        
"type" => "heading"),

                array(    
"name" => "Author Sub-Text",
                    
"desc" => "Edit the line of text underneath each authors name.<br /><br />",
                        
"id" => $shortname."_authorsub",
                        
"std" => "for WPSN.com",
                        
"type" => "text"),

                array(    
"name" => "Published",
                    
"desc" => "Edit the published date text.<br /><br />",
                        
"id" => $shortname."_publishedon",
                        
"std" => "Published:",
                        
"type" => "text"),

                array(    
"name" => "Show Tags?",
                        
"desc" => "Check to show tags under each news item<br /><br />",
                        
"id" => $shortname."_showtags",
                        
"std" => "true",
                        
"type" => "checkbox"),

                array(    
"name" => "Show Gravatars?",
                        
"desc" => "Check to activate <a href=\"http://gravatar.com\">Gravatar</a> support for your comments<br /><br />",
                        
"id" => $shortname."_showava",
                        
"std" => "true",
                        
"type" => "checkbox"),

                array(    
"name" => "Related Items",
                    
"desc" => "Edit the Related Items header text.<br /><br />",
                        
"id" => $shortname."_siderelated",
                        
"std" => "Related News Headlines",
                        
"type" => "text"),

                array(    
"name" => "Latest Items",
                    
"desc" => "Edit the Latest Items header text.<br /><br />",
                        
"id" => $shortname."_sidelatest",
                        
"std" => "WPSN Latest",
                        
"type" => "text"),

                array(     
"name" => "How Many Latest Items?",
                           
"desc" => "Select how many Latest Items to show in your sidebar.",
                        
"id" => $shortname."_sidebarlatest",
                                
"std" => "Select a Number:",
                                    
"type" => "select",
                              
"options" => $sidebarlatest),








                array(    
"name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Advertisement Settings</h3></div>",
                        
"type" => "heading"),





                array(    
"name" => "Spot #1",
                    
"desc" => "Paste your <b>728x90</b> ad code above.<br /><br />",
                        
"id" => $shortname."_banner1",
                    
"std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner1.gif\" /></a>",
                        
"type" => "textarea"),    



                array(    
"name" => "Spot #2",
                    
"desc" => "Paste your <b>336x280</b> ad code above.<br /><br />",
                        
"id" => $shortname."_banner2",
                    
"std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner2.gif\" border=\"0\" /></a>",
                        
"type" => "textarea"),    






                array(    
"name" => "Spot #3",
                    
"desc" => "Paste your <b>300x50</b> ad code above.<br /><br />",
                        
"id" => $shortname."_banner3",
                    
"std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner3.gif\" border=\"0\" /></a>",
                        
"type" => "textarea"),

                array(    
"name" => "Spot #4",
                    
"desc" => "Paste your <b>300x250</b> ad code above.<br /><br />",
                        
"id" => $shortname."_banner4",
                    
"std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner4.gif\" border=\"0\" /></a>",
                        
"type" => "textarea"),

                array(    
"name" => "Spot #5 Title",
                    
"desc" => "Edit the title text above this ad spot.<br /><br />",
                        
"id" => $shortname."_sponsoredby",
                    
"std" => "WPSN Recommended Sponsors",
                        
"type" => "text"),

                array(    
"name" => "Spot #5",
                    
"desc" => "Paste your <b>250x250</b> ad code above.<br /><br />",
                        
"id" => $shortname."_banner5",
                    
"std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner5.gif\" border=\"0\" /></a>",
                        
"type" => "textarea"),



                array(    
"name" => "Show Spot #6?",
                        
"desc" => "Check to activate this banner spot<br /><br />",
                        
"id" => $shortname."_show6",
                        
"std" => "true",
                        
"type" => "checkbox"),

                array(    
"name" => "Spot #6",
                    
"desc" => "Paste your <b>234x150</b> ad code above.<br /><br />",
                        
"id" => $shortname."_banner6",
                    
"std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner6.gif\" border=\"0\" alt=\"banner 6\" /></a>",
                        
"type" => "textarea"),

                array(    
"name" => "Show Spot #7?",
                        
"desc" => "Check to activate this banner spot<br /><br />",
                        
"id" => $shortname."_show7",
                        
"std" => "true",
                        
"type" => "checkbox"),


                array(    
"name" => "Spot #7",
                    
"desc" => "Paste your <b>234x150</b> ad code above.<br /><br />",
                        
"id" => $shortname."_banner7",
                    
"std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner7.gif\" border=\"0\" alt=\"banner 7\" /></a>",
                        
"type" => "textarea"),



                array(    
"name" => "Show Spot #8?",
                        
"desc" => "Check to activate this banner spot<br /><br />",
                        
"id" => $shortname."_show8",
                        
"std" => "true",
                        
"type" => "checkbox"),



                array(    
"name" => "Spot #8",
                    
"desc" => "Paste your <b>234x150</b> ad code above.<br /><br />",
                        
"id" => $shortname."_banner8",
                    
"std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner8.gif\" border=\"0\" alt=\"banner 8\" /></a>",
                        
"type" => "textarea"),
            



                array(    
"name" => "Show Spot #9?",
                        
"desc" => "Check to activate this banner spot<br /><br />",
                        
"id" => $shortname."_show9",
                        
"std" => "true",
                        
"type" => "checkbox"),



                array(    
"name" => "Spot #9",
                    
"desc" => "Paste your <b>234x150</b> ad code above.<br /><br />",
                        
"id" => $shortname."_banner9",
                    
"std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner9.gif\" border=\"0\" alt=\"banner 9\" /></a>",
                        
"type" => "textarea"),



                array(    
"name" => "Show Spot #10?",
                        
"desc" => "Check to activate this banner spot<br /><br />",
                        
"id" => $shortname."_show10",
                        
"std" => "true",
                        
"type" => "checkbox"),



                array(    
"name" => "Spot #10",
                    
"desc" => "Paste your <b>234x150</b> ad code above.<br /><br />",
                        
"id" => $shortname."_banner10",
                    
"std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner10.gif\" border=\"0\" alt=\"banner 10\" /></a>",
                        
"type" => "textarea"),





                array(    
"name" => "Show Spot #11?",
                        
"desc" => "Check to activate this banner spot<br /><br />",
                        
"id" => $shortname."_show11",
                        
"std" => "true",
                        
"type" => "checkbox"),

                array(    
"name" => "Spot #11 Title",
                    
"desc" => "Edit the title text above this ad spot.<br /><br />",
                        
"id" => $shortname."_sptext",
                    
"std" => "Sponsored Links",
                        
"type" => "text"),


                array(    
"name" => "Spot #11",
                    
"desc" => "Paste your <b>336x280</b> ad code above.<br /><br />",
                        
"id" => $shortname."_banner11",
                    
"std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_banner11.gif\" border=\"0\" alt=\"banner 11\" /></a>",
                        
"type" => "textarea"),













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


                array(    
"name" => "Show Video?",
                        
"desc" => "Check to activate the featured video spot on<br />the frontpage.<br /><br />",
                        
"id" => $shortname."_showvideo",
                        
"std" => "true",
                        
"type" => "checkbox"),


                array(    
"name" => "Embed Code",
                    
"desc" => "Paste your chosen video embed code here.<br />(Be sure to resize the video to 234x200)<br /><br /><br />",
                        
"id" => $shortname."_featuredvideo",
                    
"std" => "<a href=\"#\"><img src=\"http://stylewp.com/assets/defaults/wpsn_featuredvideo.gif\" border=\"0\" /></a>",
                        
"type" => "textarea"),    











                array(    
"name" => "<div style=\"width:800px;padding:20px;background:#ffeded;\"><h3 style=\"color:#1c1c1c;\">Copyright Settings</h3></div>",
                        
"type" => "heading"),


                array(    
"name" => "Years",
                    
"desc" => "Enter the years of copyright<br /><br />",
                        
"id" => $shortname."_copyyear",
                    
"std" => "1997 - 2009",
                        
"type" => "text"),

                array(    
"name" => "URL",
                    
"desc" => "Enter the full URL to copyright holders site<br /><br />",
                        
"id" => $shortname."_copyurl",
                    
"std" => "http://www.google.com",
                        
"type" => "text"),



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



                array(    
"name" => "Rights",
                    
"desc" => "Enter the rights reserved text<br /><br />",
                        
"id" => $shortname."_copyrights",
                    
"std" => "All rights reserved.",
                        
"type" => "text"),











                                                                                                                        
          );
        
function 
mytheme_add_admin() {

    global 
$themename$shortname$options;

    if ( 
$_GET['page'] == basename(__FILE__) ) {
    
        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(__FILE__), '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'];
                }
?>
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
 
Register now for full access!
Old 06-02-2010, 11:48 AM Re: what's the problem with decoded php script?
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
What problem are you having with the code?

What does the error log say?
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 06-02-2010, 04:05 PM Re: what's the problem with decoded php script?
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
nothing other than a clear window.
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Reply     « Reply to what's the problem with decoded php script?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16057 seconds with 12 queries