Advertisement
Guest User

Untitled

a guest
Mar 8th, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.66 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Loader)
  6. *
  7. * @ Version : 2.0.0.4
  8. * @ Author : DeZender
  9. * @ Release on : 21.10.2015
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function mytheme_add_admin() {
  15.  
  16. global $themename;
  17. global $shortname;
  18. global $options;
  19. global $optBgStyle;
  20. global $opthaberresimyon;
  21. global $anasayfasidebaryon;
  22. global $anasayfabuyukyon;
  23. if ($_GET["page"] == basename(__FILE__))
  24. {
  25. if ("save" == $_REQUEST["action"])
  26. {
  27. foreach ($options as $value)
  28. {
  29. update_option($value["id"], $_REQUEST[$value["id"]]);
  30. continue;
  31. }
  32. foreach ($options as $value)
  33. {
  34. if (isset($_REQUEST[$value["id"]]))
  35. {
  36. update_option($value["id"], $_REQUEST[$value["id"]]);
  37. continue;
  38. }
  39. delete_option($value["id"]);
  40. continue;
  41. }
  42. header("Location: themes.php?page=functions.php&saved=true");
  43. exit();
  44. }
  45. else
  46. {
  47. if ("reset" == $_REQUEST["action"])
  48. {
  49. foreach ($options as $value)
  50. {
  51. delete_option($value["id"]);
  52. continue;
  53. }
  54. header("Location: themes.php?page=functions.php&saved=true");
  55. exit();
  56. }
  57. }
  58. }
  59. add_menu_page($themename, $themename, "administrator", basename(__FILE__), "mytheme_admin");
  60. return;
  61. }
  62.  
  63. function mytheme_add_init() {
  64.  
  65. $file_dir = get_bloginfo("template_directory");
  66. wp_enqueue_style("functions", $file_dir . "/admin/css/functions.css", false, "1.0", "all");
  67. return;
  68. }
  69.  
  70. function mytheme_admin() {
  71.  
  72. global $themename;
  73. global $shortname;
  74. global $options;
  75. $i = 0;
  76. if ($_REQUEST["saved"])
  77. {
  78. echo "<div id=\"message\" class=\"updated fade\"><p><strong>" . $themename . " Ayarlar Kaydedildi.</strong></p></div>";
  79. }
  80. if ($_REQUEST["reset"])
  81. {
  82. echo "<div id=\"message\" class=\"updated fade\"><p><strong>" . $themename . " Ayarlar Resetlendi.</strong></p></div>";
  83. }
  84. echo "\r
  85. <div class='wrap'>\r
  86. <br />\r
  87. ";
  88. if (version_compare($wp_version, "3.8", "<"))
  89. {
  90. screen_icon();
  91. }
  92. echo "\r\n";
  93. if ($action == "delete-all")
  94. {
  95. echo "<div class='updated fade'>\r
  96. <p>";
  97. _e("Tüm Cacheler Silindi", "delxtrans");
  98. echo "</p>\r
  99. </div>\r
  100. ";
  101. }
  102. echo "\r
  103. <form action=\"";
  104. echo admin_url("tools.php");
  105. echo "?page=delxtrans\" method=\"post\">\r
  106. \r
  107. <table class=\"form-table\">\r
  108. \r
  109. <tr valign='top'>\r
  110. <th>";
  111. echo "<s";
  112. echo "trong>";
  113. _e("Cache Temizleme Sistemi", "delxtrans");
  114. echo "</strong></th>\r
  115. <td>\r
  116. \r
  117. <label><input type=\"radio\" name=\"delxtrans-action\" value=\"delete-all\" />\r
  118. ";
  119. _e("Hepsini Temizle", "delxtrans");
  120. echo "</label>\r
  121. </td>\r
  122. </tr>\r
  123. <tr>\r
  124. <th>&nbsp;</th>\r
  125. ";
  126. echo "<s";
  127. echo "trong>";
  128. _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");
  129. echo "</strong><br />\r
  130. <td>\r
  131. <input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"";
  132. _e("Temizle", "delxtrans");
  133. echo "\" />\r
  134. ";
  135. wp_nonce_field("delete", "delxtrans_wpnonce", false);
  136. echo " </td>\r
  137. </tr>\r
  138. </table>\r
  139. </form>\r
  140. <br /> <br />\r
  141. \r
  142. \r
  143. <div class=\"wrap\">\r
  144. <div id=\"icon-themes\" class=\"icon32\"><br></div>\r
  145. <h2>";
  146. echo $themename;
  147. echo " ";
  148. _e("Tema Ayarları", "hb");
  149. echo "</h2>\r
  150. <div class=\"bordertitle\"></div>\r
  151. ";
  152. echo "<s";
  153. echo "tyle type=\"text/css\">\r
  154. table, td {font-size:13px; }\r
  155. th {font-weight:normal; width:250px;}\r
  156. span.setting-description { font-size:11px; line-height:16px; font-style:italic;}\r
  157. </style>\r
  158. \r
  159. <link rel=\"stylesheet\" media=\"screen\" type=\"text/css\" href=\"";
  160. echo get_template_directory_uri();
  161. echo "/admin/css/colorpicker.css\" />\r
  162. ";
  163. echo "<s";
  164. echo "cript type=\"text/javascript\" src=\"";
  165. echo get_template_directory_uri();
  166. echo "/admin/js/colorpicker.js\"></script>\r
  167. ";
  168. echo "<s";
  169. echo "cript type=\"text/javascript\" src=\"";
  170. echo get_template_directory_uri();
  171. echo "/admin/js/eye.js\"></script>\r
  172. ";
  173. echo "<s";
  174. echo "cript type=\"text/javascript\" src=\"";
  175. echo get_template_directory_uri();
  176. echo "/admin/js/utils.js\"></script>\r
  177. <link rel=\"stylesheet\" media=\"screen\" type=\"text/css\" href=\"";
  178. echo get_template_directory_uri();
  179. echo "/admin/css/tabs.css\" />\r
  180. <!-- Javascript for the tabs -->\r
  181. ";
  182. echo "<s";
  183. echo "cript type=\"text/javascript\">\r
  184. var \$ = jQuery.noConflict();\r
  185. \$(document).ready(function(){\r
  186. /* For Tab */\r
  187. \$(\".tab_content\").hide(); //Hide all content\r
  188. \$(\"ul.tabs li:first\").addClass(\"active\").show(); //Activate first tab\r
  189. \$(\".tab_content:first\").show(); //Show first tab content\r
  190. //On Click Event\r
  191. \$(\"ul.tabs li\").click(function() {\r
  192. \$(\"ul.tabs li\").removeClass(\"active\"); ";
  193. echo "//Remove any \"active\" class\r
  194. \$(this).addClass(\"active\"); //Add \"active\" class to selected tab\r
  195. \$(\".tab_content\").hide(); //Hide all tab content\r
  196. var activeTab = \$(this).find(\"a\").attr(\"href\"); //Find the rel attribute value to identify the active tab + content\r
  197. \$(activeTab).fadeIn(900); //Fade in the active content\r
  198. return false;\r
  199. });\r
  200. }); \r
  201. </script><br />\r
  202. \r
  203. <ul class=\"ta";
  204. echo "bs\"> \r
  205. <li><a href=\"#Renkler\">";
  206. _e("Renk Ayar", "hb");
  207. echo "</a></li>\r
  208. <li><a href=\"#Genel\">";
  209. _e("Genel Ayar", "hb");
  210. echo "</a></li>\r
  211. <li><a href=\"#Anasayfa\">";
  212. _e("Anasayfa Ayar", "hb");
  213. echo "</a></li>\r
  214. <li><a href=\"#anasidebar\">";
  215. _e("Anasayfa Sidebar", "hb");
  216. echo "</a></li>\r
  217. <li><a href=\"#Manset\">";
  218. _e("Manşet Ayar", "hb");
  219. echo "</a></li>\r
  220. <li><a href=\"#icSayfa\">";
  221. _e("İç Sayfa Ayar", "hb");
  222. echo "</a></li>\r
  223. <li><a href=\"#Galeri\">";
  224. _e("Galerİ Ayar", "hb");
  225. echo "</a></li>\r
  226. <li><a href=\"#Yazarlar\">";
  227. _e("Yazarlar Ayar", "hb");
  228. echo "</a></li>\r
  229. <li><a href=\"#Reklamlar\">";
  230. _e("Reklam Ayar", "hb");
  231. echo "</a></li>\r
  232. <li><a href=\"#sosyalayar\">";
  233. _e("Sosyal Medya", "hb");
  234. echo "</a></li>\r
  235. <li><a href=\"#Footer\">";
  236. _e("Footer Ayar", "hb");
  237. echo "</a></li>\r
  238. </ul> \r
  239. \r
  240. <form method=\"post\">\r
  241. <div class=\"tab_container\">\r
  242. ";
  243. foreach ($options as $value)
  244. {
  245. if ($value["type"] == "open")
  246. {
  247. echo " \r
  248. <div id=\"";
  249. echo $value["name"];
  250. echo "\" class=\"tab_content\" >\r
  251. <table border=\"1\" cellpadding=\"0\" cellspacing=\"12\" style=\"text-align:left\">\r
  252. ";
  253. }
  254. if ($value["type"] == "close")
  255. {
  256. echo " </table></div>\r
  257. ";
  258. }
  259. if ($value["type"] == "heading")
  260. {
  261. echo " <thead>\r
  262. <tr>\r
  263. <td colspan=\"2\"><h3>";
  264. echo $value["name"];
  265. echo "</h3>";
  266. echo "<s";
  267. echo "pan class=\"setting-description\">";
  268. echo $value["desc"];
  269. echo "</span></td>\r
  270. </tr>\r
  271. </thead>\r
  272. ";
  273. }
  274. if ($value["type"] == "description")
  275. {
  276. echo " <tr valign=\"top\"> \r
  277. <th scope=\"row\">";
  278. echo $value["name"];
  279. echo ":</th>\r
  280. <td>\r
  281. ";
  282. echo "<s";
  283. echo "pan class=\"setting-description\">";
  284. echo $value["desc"];
  285. echo "</span>\r
  286. </td>\r
  287. </tr>\r
  288. ";
  289. }
  290. if ($value["type"] == "info")
  291. {
  292. echo " <tr valign=\"top\"> \r
  293. <th scope=\"row\" colspan=\"2\">";
  294. echo "<s";
  295. echo "pan class=\"setting-description\">";
  296. echo $value["desc"];
  297. echo "</span></th>\r
  298. \r
  299. </tr>\r
  300. ";
  301. }
  302. if ($value["type"] == "line")
  303. {
  304. echo " <tr valign=\"top\"> \r
  305. <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
  306. \r
  307. </tr>\r
  308. \r
  309. ";
  310. }
  311. if ($value["type"] == "text")
  312. {
  313. echo " <tr valign=\"top\"> \r
  314. <th scope=\"row\">";
  315. echo $value["name"];
  316. echo "</th>\r
  317. <td><div class=\"rm_input rm_text\">\r
  318. <input name=\"";
  319. echo $value["id"];
  320. echo "\" size=\"60\" id=\"";
  321. echo $value["id"];
  322. echo "\" type=\"";
  323. echo $value["type"];
  324. echo "\" value=\"";
  325. if (get_option($value["id"]) != "")
  326. {
  327. echo get_option($value["id"]);
  328. }
  329. else
  330. {
  331. echo $value["std"];
  332. }
  333. echo "\" /><br />\r
  334. \r
  335. <br />";
  336. echo "<s";
  337. echo "pan class=\"setting-description\">";
  338. echo $value["desc"];
  339. echo "</span></div>\r
  340. </td>\r
  341. </tr>\r
  342. ";
  343. }
  344. if ($value["type"] == "textarea")
  345. {
  346. echo " \r
  347. <tr valign=\"top\"> \r
  348. <th scope=\"row\">";
  349. echo $value["name"];
  350. echo "</th>\r
  351. \r
  352. <td><div class=\"rm_input rm_textarea\">\r
  353. <textarea cols=\"500\" rows=\"5\" name=\"";
  354. echo $value["id"];
  355. echo "\" id=\"";
  356. echo $value["id"];
  357. echo "\">";
  358. if (get_option($value["id"]) != "")
  359. {
  360. echo stripslashes(get_option($value["id"]));
  361. }
  362. else
  363. {
  364. echo $value["std"];
  365. }
  366. echo "</textarea><br />";
  367. echo "<s";
  368. echo "pan class=\"setting-description\">";
  369. echo $value["desc"];
  370. echo "</span></div>\r
  371. \r
  372. </td>\r
  373. </tr>\r
  374. ";
  375. }
  376. if ($value["type"] == "checkbox")
  377. {
  378. echo " <tr valign=\"top\"> \r
  379. <th scope=\"row\">";
  380. echo $value["name"];
  381. echo "</th>\r
  382. <td><div class=\"rm_input rm_checkbox\">\r
  383. ";
  384. if (get_option($value["id"]))
  385. {
  386. $checked = "checked=\"checked\"";
  387. }
  388. else
  389. {
  390. $checked = "";
  391. }
  392. echo " <input type=\"checkbox\" name=\"";
  393. echo $value["id"];
  394. echo "\" id=\"";
  395. echo $value["id"];
  396. echo "\" value=\"true\" ";
  397. echo $checked;
  398. echo " />\r
  399. <br />";
  400. echo "<s";
  401. echo "pan class=\"setting-description\">";
  402. echo $value["desc"];
  403. echo "</span></div>\r
  404. </td>\r
  405. </tr>\r
  406. \r
  407. \r
  408. ";
  409. }
  410. if ($value["type"] == "checkbox-pages")
  411. {
  412. echo " <tr valign=\"top\"> \r
  413. <th scope=\"row\">";
  414. echo $value["name"];
  415. echo "<br />";
  416. echo "<s";
  417. echo "pan class=\"setting-description\">";
  418. echo $value["desc"];
  419. echo "</span></th>\r
  420. <td>\r
  421. ";
  422. $pages_list = get_pages();
  423. echo "<table>";
  424. $i = 0;
  425. foreach ($pages_list as $option)
  426. {
  427. $checked = "";
  428. if (get_option($value["id"]))
  429. {
  430. if (in_array($option->ID, get_option($value["id"])))
  431. {
  432. $checked = "checked=\"checked\"";
  433. }
  434. }
  435. else
  436. {
  437. if ($value["std"][$i] == "true")
  438. {
  439. $checked = "checked=\"checked\"";
  440. }
  441. }
  442. echo "<tr><td><input type=\"checkbox\" name=\"";
  443. echo $value["id"];
  444. echo "[]\" id=\"";
  445. echo $value["id"];
  446. echo "-";
  447. echo $option->ID;
  448. echo "\" value=\"";
  449. echo $option->ID;
  450. echo "\" ";
  451. echo $checked;
  452. echo " /> <label for=\"";
  453. echo $value["id"];
  454. echo "-";
  455. echo $option->ID;
  456. echo "\">";
  457. echo is_array($value["desc"]) ? ($value["desc"][$i]) : ($option->post_title);
  458. echo "</label> </td></tr> ";
  459. $i++;
  460. continue;
  461. }
  462. echo "</table>\r
  463. </td>\r
  464. </tr>\r
  465. ";
  466. }
  467. if ($value["type"] == "select")
  468. {
  469. echo " \r
  470. <tr valign=\"top\">\r
  471. <th scope=\"row\">";
  472. echo $value["name"];
  473. echo "</th>\r
  474. <td> <div class=\"rm_input rm_select\">\r
  475. ";
  476. echo "<s";
  477. echo "elect name=\"";
  478. echo $value["id"];
  479. echo "\" id=\"";
  480. echo $value["id"];
  481. echo "\">\r
  482. ";
  483. foreach ($value["options"] as $option)
  484. {
  485. echo " <option ";
  486. if (get_settings($value["id"]) == $option)
  487. {
  488. echo "selected=\"selected\"";
  489. }
  490. echo ">";
  491. echo $option;
  492. echo "</option>";
  493. continue;
  494. }
  495. echo "</select><br /><br />";
  496. echo "<s";
  497. echo "pan class=\"setting-description\">";
  498. echo $value["desc"];
  499. echo "</span></div>\r
  500. </td>\r
  501. </tr>\r
  502. \r
  503. ";
  504. }
  505. if ($value["type"] == "colorpicker")
  506. {
  507. echo " <tr valign=\"top\"> \r
  508. <th scope=\"row\">";
  509. echo $value["name"];
  510. echo "</th>\r
  511. <td>\r
  512. ";
  513. echo "<s";
  514. echo "cript language=\"javascript\">\r
  515. (function(\$){\r
  516. var initLayout = function() { \r
  517. \$('#colorSelector-";
  518. echo $value["id"];
  519. echo "').ColorPicker({\r
  520. color: '";
  521. if (get_option($value["id"]) != "")
  522. {
  523. echo get_option($value["id"]);
  524. }
  525. else
  526. {
  527. echo $value["std"];
  528. }
  529. echo "',\r
  530. onShow: function (colpkr) {\r
  531. \$(colpkr).fadeIn(500);\r
  532. return false;\r
  533. },\r
  534. onHide: function (colpkr) {\r
  535. \$(colpkr).fadeOut(500);\r
  536. return false;\r
  537. },\r
  538. onChange: function (hsb, hex, rgb) {\r
  539. \$('#colorSelector-";
  540. echo $value["id"];
  541. echo " div').css('backgroundColor', '#' + hex);\r
  542. \$(\"#";
  543. echo $value["id"];
  544. echo "\").attr('value', '#' + hex); \r
  545. }\r
  546. });\r
  547. }; \r
  548. EYE.register(initLayout, 'init');\r
  549. })(jQuery)\r
  550. </script>\r
  551. <div id=\"colorContainer\"><div id=\"colorSelector-";
  552. echo $value["id"];
  553. echo "\"><div style=\"background-color: ";
  554. if (get_option($value["id"]) != "")
  555. {
  556. echo get_option($value["id"]);
  557. }
  558. else
  559. {
  560. echo $value["std"];
  561. }
  562. echo "\"></div></div></div>\r
  563. <input name=\"";
  564. echo $value["id"];
  565. echo "\" id=\"";
  566. echo $value["id"];
  567. echo "\" type=\"text\" value=\"";
  568. if (get_option($value["id"]) != "")
  569. {
  570. echo get_option($value["id"]);
  571. ........................................................
  572. ........................
  573. ......
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement