Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Loader)
- *
- * @ Version : 2.0.0.4
- * @ Author : DeZender
- * @ Release on : 21.10.2015
- * @ Official site : http://DeZender.Net
- *
- */
- function mytheme_add_admin() {
- global $themename;
- global $shortname;
- global $options;
- global $optBgStyle;
- global $opthaberresimyon;
- global $anasayfasidebaryon;
- global $anasayfabuyukyon;
- if ($_GET["page"] == basename(__FILE__))
- {
- if ("save" == $_REQUEST["action"])
- {
- foreach ($options as $value)
- {
- update_option($value["id"], $_REQUEST[$value["id"]]);
- continue;
- }
- foreach ($options as $value)
- {
- if (isset($_REQUEST[$value["id"]]))
- {
- update_option($value["id"], $_REQUEST[$value["id"]]);
- continue;
- }
- delete_option($value["id"]);
- continue;
- }
- header("Location: themes.php?page=functions.php&saved=true");
- exit();
- }
- else
- {
- if ("reset" == $_REQUEST["action"])
- {
- foreach ($options as $value)
- {
- delete_option($value["id"]);
- continue;
- }
- header("Location: themes.php?page=functions.php&saved=true");
- exit();
- }
- }
- }
- add_menu_page($themename, $themename, "administrator", basename(__FILE__), "mytheme_admin");
- return;
- }
- function mytheme_add_init() {
- $file_dir = get_bloginfo("template_directory");
- wp_enqueue_style("functions", $file_dir . "/admin/css/functions.css", false, "1.0", "all");
- return;
- }
- function mytheme_admin() {
- global $themename;
- global $shortname;
- global $options;
- $i = 0;
- if ($_REQUEST["saved"])
- {
- echo "<div id=\"message\" class=\"updated fade\"><p><strong>" . $themename . " Ayarlar Kaydedildi.</strong></p></div>";
- }
- if ($_REQUEST["reset"])
- {
- echo "<div id=\"message\" class=\"updated fade\"><p><strong>" . $themename . " Ayarlar Resetlendi.</strong></p></div>";
- }
- echo "\r
- <div class='wrap'>\r
- <br />\r
- ";
- if (version_compare($wp_version, "3.8", "<"))
- {
- screen_icon();
- }
- echo "\r\n";
- if ($action == "delete-all")
- {
- echo "<div class='updated fade'>\r
- <p>";
- _e("Tüm Cacheler Silindi", "delxtrans");
- echo "</p>\r
- </div>\r
- ";
- }
- echo "\r
- <form action=\"";
- echo admin_url("tools.php");
- echo "?page=delxtrans\" method=\"post\">\r
- \r
- <table class=\"form-table\">\r
- \r
- <tr valign='top'>\r
- <th>";
- echo "<s";
- echo "trong>";
- _e("Cache Temizleme Sistemi", "delxtrans");
- echo "</strong></th>\r
- <td>\r
- \r
- <label><input type=\"radio\" name=\"delxtrans-action\" value=\"delete-all\" />\r
- ";
- _e("Hepsini Temizle", "delxtrans");
- echo "</label>\r
- </td>\r
- </tr>\r
- <tr>\r
- <th> </th>\r
- ";
- echo "<s";
- echo "trong>";
- _e("<font color=\"red\">Önemli: </font> Bu Bölümdeki Tema Ayarlarını Yapıp <font color=\"red\"><b>Değişiklikleri Kaydet</b></font> Dedikten Sonra Bazı Değişikliklerin Site Ön Yüzünde Etkili Olabilmesi İçin Lütfen Aşağıdaki <font color=\"red\">Hepsini Temizle</font> Kısmını Seçip <font color=\"red\">Temizle</font> Diyerek Cache Temizlemesi Yapınız.", "delxtrans");
- echo "</strong><br />\r
- <td>\r
- <input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"";
- _e("Temizle", "delxtrans");
- echo "\" />\r
- ";
- wp_nonce_field("delete", "delxtrans_wpnonce", false);
- echo " </td>\r
- </tr>\r
- </table>\r
- </form>\r
- <br /> <br />\r
- \r
- \r
- <div class=\"wrap\">\r
- <div id=\"icon-themes\" class=\"icon32\"><br></div>\r
- <h2>";
- echo $themename;
- echo " ";
- _e("Tema Ayarları", "hb");
- echo "</h2>\r
- <div class=\"bordertitle\"></div>\r
- ";
- echo "<s";
- echo "tyle type=\"text/css\">\r
- table, td {font-size:13px; }\r
- th {font-weight:normal; width:250px;}\r
- span.setting-description { font-size:11px; line-height:16px; font-style:italic;}\r
- </style>\r
- \r
- <link rel=\"stylesheet\" media=\"screen\" type=\"text/css\" href=\"";
- echo get_template_directory_uri();
- echo "/admin/css/colorpicker.css\" />\r
- ";
- echo "<s";
- echo "cript type=\"text/javascript\" src=\"";
- echo get_template_directory_uri();
- echo "/admin/js/colorpicker.js\"></script>\r
- ";
- echo "<s";
- echo "cript type=\"text/javascript\" src=\"";
- echo get_template_directory_uri();
- echo "/admin/js/eye.js\"></script>\r
- ";
- echo "<s";
- echo "cript type=\"text/javascript\" src=\"";
- echo get_template_directory_uri();
- echo "/admin/js/utils.js\"></script>\r
- <link rel=\"stylesheet\" media=\"screen\" type=\"text/css\" href=\"";
- echo get_template_directory_uri();
- echo "/admin/css/tabs.css\" />\r
- <!-- Javascript for the tabs -->\r
- ";
- echo "<s";
- echo "cript type=\"text/javascript\">\r
- var \$ = jQuery.noConflict();\r
- \$(document).ready(function(){\r
- /* For Tab */\r
- \$(\".tab_content\").hide(); //Hide all content\r
- \$(\"ul.tabs li:first\").addClass(\"active\").show(); //Activate first tab\r
- \$(\".tab_content:first\").show(); //Show first tab content\r
- //On Click Event\r
- \$(\"ul.tabs li\").click(function() {\r
- \$(\"ul.tabs li\").removeClass(\"active\"); ";
- echo "//Remove any \"active\" class\r
- \$(this).addClass(\"active\"); //Add \"active\" class to selected tab\r
- \$(\".tab_content\").hide(); //Hide all tab content\r
- var activeTab = \$(this).find(\"a\").attr(\"href\"); //Find the rel attribute value to identify the active tab + content\r
- \$(activeTab).fadeIn(900); //Fade in the active content\r
- return false;\r
- });\r
- }); \r
- </script><br />\r
- \r
- <ul class=\"ta";
- echo "bs\"> \r
- <li><a href=\"#Renkler\">";
- _e("Renk Ayar", "hb");
- echo "</a></li>\r
- <li><a href=\"#Genel\">";
- _e("Genel Ayar", "hb");
- echo "</a></li>\r
- <li><a href=\"#Anasayfa\">";
- _e("Anasayfa Ayar", "hb");
- echo "</a></li>\r
- <li><a href=\"#anasidebar\">";
- _e("Anasayfa Sidebar", "hb");
- echo "</a></li>\r
- <li><a href=\"#Manset\">";
- _e("Manşet Ayar", "hb");
- echo "</a></li>\r
- <li><a href=\"#icSayfa\">";
- _e("İç Sayfa Ayar", "hb");
- echo "</a></li>\r
- <li><a href=\"#Galeri\">";
- _e("Galerİ Ayar", "hb");
- echo "</a></li>\r
- <li><a href=\"#Yazarlar\">";
- _e("Yazarlar Ayar", "hb");
- echo "</a></li>\r
- <li><a href=\"#Reklamlar\">";
- _e("Reklam Ayar", "hb");
- echo "</a></li>\r
- <li><a href=\"#sosyalayar\">";
- _e("Sosyal Medya", "hb");
- echo "</a></li>\r
- <li><a href=\"#Footer\">";
- _e("Footer Ayar", "hb");
- echo "</a></li>\r
- </ul> \r
- \r
- <form method=\"post\">\r
- <div class=\"tab_container\">\r
- ";
- foreach ($options as $value)
- {
- if ($value["type"] == "open")
- {
- echo " \r
- <div id=\"";
- echo $value["name"];
- echo "\" class=\"tab_content\" >\r
- <table border=\"1\" cellpadding=\"0\" cellspacing=\"12\" style=\"text-align:left\">\r
- ";
- }
- if ($value["type"] == "close")
- {
- echo " </table></div>\r
- ";
- }
- if ($value["type"] == "heading")
- {
- echo " <thead>\r
- <tr>\r
- <td colspan=\"2\"><h3>";
- echo $value["name"];
- echo "</h3>";
- echo "<s";
- echo "pan class=\"setting-description\">";
- echo $value["desc"];
- echo "</span></td>\r
- </tr>\r
- </thead>\r
- ";
- }
- if ($value["type"] == "description")
- {
- echo " <tr valign=\"top\"> \r
- <th scope=\"row\">";
- echo $value["name"];
- echo ":</th>\r
- <td>\r
- ";
- echo "<s";
- echo "pan class=\"setting-description\">";
- echo $value["desc"];
- echo "</span>\r
- </td>\r
- </tr>\r
- ";
- }
- if ($value["type"] == "info")
- {
- echo " <tr valign=\"top\"> \r
- <th scope=\"row\" colspan=\"2\">";
- echo "<s";
- echo "pan class=\"setting-description\">";
- echo $value["desc"];
- echo "</span></th>\r
- \r
- </tr>\r
- ";
- }
- if ($value["type"] == "line")
- {
- echo " <tr valign=\"top\"> \r
- <th colspan=\"2\" ><div style=\"padding-top:10px;padding-bottom:10px; vertical-align:middle; padding-left:0px;\"><div style=\"border-bottom: 1px solid #efefef;\"></div></div></th>\r
- \r
- </tr>\r
- \r
- ";
- }
- if ($value["type"] == "text")
- {
- echo " <tr valign=\"top\"> \r
- <th scope=\"row\">";
- echo $value["name"];
- echo "</th>\r
- <td><div class=\"rm_input rm_text\">\r
- <input name=\"";
- echo $value["id"];
- echo "\" size=\"60\" id=\"";
- echo $value["id"];
- echo "\" type=\"";
- echo $value["type"];
- echo "\" value=\"";
- if (get_option($value["id"]) != "")
- {
- echo get_option($value["id"]);
- }
- else
- {
- echo $value["std"];
- }
- echo "\" /><br />\r
- \r
- <br />";
- echo "<s";
- echo "pan class=\"setting-description\">";
- echo $value["desc"];
- echo "</span></div>\r
- </td>\r
- </tr>\r
- ";
- }
- if ($value["type"] == "textarea")
- {
- echo " \r
- <tr valign=\"top\"> \r
- <th scope=\"row\">";
- echo $value["name"];
- echo "</th>\r
- \r
- <td><div class=\"rm_input rm_textarea\">\r
- <textarea cols=\"500\" rows=\"5\" name=\"";
- echo $value["id"];
- echo "\" id=\"";
- echo $value["id"];
- echo "\">";
- if (get_option($value["id"]) != "")
- {
- echo stripslashes(get_option($value["id"]));
- }
- else
- {
- echo $value["std"];
- }
- echo "</textarea><br />";
- echo "<s";
- echo "pan class=\"setting-description\">";
- echo $value["desc"];
- echo "</span></div>\r
- \r
- </td>\r
- </tr>\r
- ";
- }
- if ($value["type"] == "checkbox")
- {
- echo " <tr valign=\"top\"> \r
- <th scope=\"row\">";
- echo $value["name"];
- echo "</th>\r
- <td><div class=\"rm_input rm_checkbox\">\r
- ";
- if (get_option($value["id"]))
- {
- $checked = "checked=\"checked\"";
- }
- else
- {
- $checked = "";
- }
- echo " <input type=\"checkbox\" name=\"";
- echo $value["id"];
- echo "\" id=\"";
- echo $value["id"];
- echo "\" value=\"true\" ";
- echo $checked;
- echo " />\r
- <br />";
- echo "<s";
- echo "pan class=\"setting-description\">";
- echo $value["desc"];
- echo "</span></div>\r
- </td>\r
- </tr>\r
- \r
- \r
- ";
- }
- if ($value["type"] == "checkbox-pages")
- {
- echo " <tr valign=\"top\"> \r
- <th scope=\"row\">";
- echo $value["name"];
- echo "<br />";
- echo "<s";
- echo "pan class=\"setting-description\">";
- echo $value["desc"];
- echo "</span></th>\r
- <td>\r
- ";
- $pages_list = get_pages();
- echo "<table>";
- $i = 0;
- foreach ($pages_list as $option)
- {
- $checked = "";
- if (get_option($value["id"]))
- {
- if (in_array($option->ID, get_option($value["id"])))
- {
- $checked = "checked=\"checked\"";
- }
- }
- else
- {
- if ($value["std"][$i] == "true")
- {
- $checked = "checked=\"checked\"";
- }
- }
- echo "<tr><td><input type=\"checkbox\" name=\"";
- echo $value["id"];
- echo "[]\" id=\"";
- echo $value["id"];
- echo "-";
- echo $option->ID;
- echo "\" value=\"";
- echo $option->ID;
- echo "\" ";
- echo $checked;
- echo " /> <label for=\"";
- echo $value["id"];
- echo "-";
- echo $option->ID;
- echo "\">";
- echo is_array($value["desc"]) ? ($value["desc"][$i]) : ($option->post_title);
- echo "</label> </td></tr> ";
- $i++;
- continue;
- }
- echo "</table>\r
- </td>\r
- </tr>\r
- ";
- }
- if ($value["type"] == "select")
- {
- echo " \r
- <tr valign=\"top\">\r
- <th scope=\"row\">";
- echo $value["name"];
- echo "</th>\r
- <td> <div class=\"rm_input rm_select\">\r
- ";
- echo "<s";
- echo "elect name=\"";
- echo $value["id"];
- echo "\" id=\"";
- echo $value["id"];
- echo "\">\r
- ";
- foreach ($value["options"] as $option)
- {
- echo " <option ";
- if (get_settings($value["id"]) == $option)
- {
- echo "selected=\"selected\"";
- }
- echo ">";
- echo $option;
- echo "</option>";
- continue;
- }
- echo "</select><br /><br />";
- echo "<s";
- echo "pan class=\"setting-description\">";
- echo $value["desc"];
- echo "</span></div>\r
- </td>\r
- </tr>\r
- \r
- ";
- }
- if ($value["type"] == "colorpicker")
- {
- echo " <tr valign=\"top\"> \r
- <th scope=\"row\">";
- echo $value["name"];
- echo "</th>\r
- <td>\r
- ";
- echo "<s";
- echo "cript language=\"javascript\">\r
- (function(\$){\r
- var initLayout = function() { \r
- \$('#colorSelector-";
- echo $value["id"];
- echo "').ColorPicker({\r
- color: '";
- if (get_option($value["id"]) != "")
- {
- echo get_option($value["id"]);
- }
- else
- {
- echo $value["std"];
- }
- echo "',\r
- onShow: function (colpkr) {\r
- \$(colpkr).fadeIn(500);\r
- return false;\r
- },\r
- onHide: function (colpkr) {\r
- \$(colpkr).fadeOut(500);\r
- return false;\r
- },\r
- onChange: function (hsb, hex, rgb) {\r
- \$('#colorSelector-";
- echo $value["id"];
- echo " div').css('backgroundColor', '#' + hex);\r
- \$(\"#";
- echo $value["id"];
- echo "\").attr('value', '#' + hex); \r
- }\r
- });\r
- }; \r
- EYE.register(initLayout, 'init');\r
- })(jQuery)\r
- </script>\r
- <div id=\"colorContainer\"><div id=\"colorSelector-";
- echo $value["id"];
- echo "\"><div style=\"background-color: ";
- if (get_option($value["id"]) != "")
- {
- echo get_option($value["id"]);
- }
- else
- {
- echo $value["std"];
- }
- echo "\"></div></div></div>\r
- <input name=\"";
- echo $value["id"];
- echo "\" id=\"";
- echo $value["id"];
- echo "\" type=\"text\" value=\"";
- if (get_option($value["id"]) != "")
- {
- echo get_option($value["id"]);
- ........................................................
- ........................
- ......
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement