Advertisement
Guest User

Untitled

a guest
Apr 19th, 2012
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.45 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 1.1.4.0
  8. * @ Author : DeZender
  9. * @ Release on : 30.03.2012
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function openhouse_init() {
  15. load_theme_textdomain( 'openhouse', get_template_directory( ) . '/lang' );
  16. }
  17.  
  18. function new_meta_boxes_4() {
  19. global $post;
  20. global $new_meta_boxes;
  21. global $new_meta_boxes_2;
  22. global $new_meta_boxes_3;
  23. global $new_meta_boxes_4;
  24. foreach ($new_meta_boxes_4 as $meta_box) {
  25. echo '<input type="hidden" name="' . $meta_box['name'] . '_noncename" id="' . $meta_box['name'] . '_noncename" value="' . wp_create_nonce( plugin_basename( __FILE__ ) ) . '" />';
  26. echo '<h4>' . $meta_box['title'] . '</h4>';
  27. if ($meta_box['type'] == 'input') {
  28. $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
  29. if ($meta_box_value == '') {
  30. $meta_box_value = $meta_box['std'];
  31. }
  32.  
  33. echo '<input type="text" name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" size="55" /><br />';
  34. } else {
  35. if ($meta_box['type'] == 'textarea') {
  36. $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
  37. if ($meta_box_value == '') {
  38. $meta_box_value = $meta_box['std'];
  39. }
  40.  
  41. echo '<textarea name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" style="width:100%" cols="20" rows="7">' . $meta_box_value . '</textarea><br />';
  42. } else {
  43. if ($meta_box['type'] == 'select') {
  44. echo '<select name="' . $meta_box['name'] . '_value">';
  45. foreach ($meta_box['options'] as $option) {
  46. echo '<option';
  47. if (get_post_meta( $post->ID, $meta_box['name'] . '_value', true ) == $option) {
  48. echo ' selected="selected"';
  49. } else {
  50. if ($option == $meta_box['std']) {
  51. echo ' selected="selected"';
  52. }
  53. }
  54.  
  55. echo '>' . $option . '</option>';
  56. }
  57.  
  58. echo '</select>';
  59. } else {
  60. if ($meta_box['type'] == 'info') {
  61. echo '<p>Add your slideshow image using the "Upload/Insert" button above the content textbox. Only one image per post.<br />Note: For this to show up in the slideshow, go to Theme Options -> Slideshow, and set the Slideshow Source to "Just Photos".</p>';
  62. }
  63. }
  64. }
  65. }
  66.  
  67. echo '<p><label for="' . $meta_box['name'] . '_value">' . $meta_box['description'] . '</label></p>';
  68. }
  69.  
  70. }
  71.  
  72. function new_meta_boxes_3() {
  73. global $post;
  74. global $new_meta_boxes;
  75. global $new_meta_boxes_2;
  76. global $new_meta_boxes_3;
  77. foreach ($new_meta_boxes_3 as $meta_box) {
  78. echo '<input type="hidden" name="' . $meta_box['name'] . '_noncename" id="' . $meta_box['name'] . '_noncename" value="' . wp_create_nonce( plugin_basename( __FILE__ ) ) . '" />';
  79. echo '<h4>' . $meta_box['title'] . '</h4>';
  80. if ($meta_box['type'] == 'input') {
  81. $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
  82. if ($meta_box_value == '') {
  83. $meta_box_value = $meta_box['std'];
  84. }
  85.  
  86. echo '<input type="text" name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" size="55" /><br />';
  87. } else {
  88. if ($meta_box['type'] == 'textarea') {
  89. $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
  90. if ($meta_box_value == '') {
  91. $meta_box_value = $meta_box['std'];
  92. }
  93.  
  94. echo '<textarea name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" style="width:100%" cols="20" rows="7">' . $meta_box_value . '</textarea><br />';
  95. } else {
  96. if ($meta_box['type'] == 'select') {
  97. echo '<select name="' . $meta_box['name'] . '_value">';
  98. foreach ($meta_box['options'] as $option) {
  99. echo '<option';
  100. if (get_post_meta( $post->ID, $meta_box['name'] . '_value', true ) == $option) {
  101. echo ' selected="selected"';
  102. } else {
  103. if ($option == $meta_box['std']) {
  104. echo ' selected="selected"';
  105. }
  106. }
  107.  
  108. echo '>' . $option . '</option>';
  109. }
  110.  
  111. echo '</select>';
  112. } else {
  113. if ($meta_box['type'] == 'info') {
  114. echo '<p>Add your property images using the "Upload/Insert" button above the content textbox.</p>';
  115. }
  116. }
  117. }
  118. }
  119.  
  120. echo '<p><label for="' . $meta_box['name'] . '_value">' . $meta_box['description'] . '</label></p>';
  121. }
  122.  
  123. }
  124.  
  125. function new_meta_boxes() {
  126. global $post;
  127. global $new_meta_boxes;
  128. global $new_meta_boxes_2;
  129. foreach ($new_meta_boxes as $meta_box) {
  130. echo '<input type="hidden" name="' . $meta_box['name'] . '_noncename" id="' . $meta_box['name'] . '_noncename" value="' . wp_create_nonce( plugin_basename( __FILE__ ) ) . '" />';
  131. echo '<h4>' . $meta_box['title'] . '</h4>';
  132. if ($meta_box['type'] == 'input') {
  133. $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
  134. if ($meta_box_value == '') {
  135. $meta_box_value = $meta_box['std'];
  136. }
  137.  
  138. echo '<input type="text" name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" size="55" /><br />';
  139. } else {
  140. if ($meta_box['type'] == 'textarea') {
  141. $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
  142. if ($meta_box_value == '') {
  143. $meta_box_value = $meta_box['std'];
  144. }
  145.  
  146. echo '<textarea name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" style="width:100%" cols="20" rows="7">' . $meta_box_value . '</textarea><br />';
  147. } else {
  148. if ($meta_box['type'] == 'select') {
  149. echo '<select name="' . $meta_box['name'] . '_value">';
  150. foreach ($meta_box['options'] as $option) {
  151. echo '<option';
  152. if (get_post_meta( $post->ID, $meta_box['name'] . '_value', true ) == $option) {
  153. echo ' selected="selected"';
  154. } else {
  155. if ($option == $meta_box['std']) {
  156. echo ' selected="selected"';
  157. }
  158. }
  159.  
  160. echo '>' . $option . '</option>';
  161. }
  162.  
  163. echo '</select>';
  164. }
  165. }
  166. }
  167.  
  168. echo '<p><label for="' . $meta_box['name'] . '_value">' . $meta_box['description'] . '</label></p>';
  169. }
  170.  
  171. }
  172.  
  173. function new_meta_boxes_2() {
  174. global $post;
  175. global $new_meta_boxes;
  176. global $new_meta_boxes_2;
  177. foreach ($new_meta_boxes_2 as $meta_box) {
  178. echo '<input type="hidden" name="' . $meta_box['name'] . '_noncename" id="' . $meta_box['name'] . '_noncename" value="' . wp_create_nonce( plugin_basename( __FILE__ ) ) . '" />';
  179. echo '<h4>' . $meta_box['title'] . '</h4>';
  180. if ($meta_box['type'] == 'input') {
  181. $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
  182. if ($meta_box_value == '') {
  183. $meta_box_value = $meta_box['std'];
  184. }
  185.  
  186. echo '<input type="text" name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" size="55" /><br />';
  187. } else {
  188. if ($meta_box['type'] == 'select') {
  189. echo '<select name="' . $meta_box['name'] . '_value">';
  190. foreach ($meta_box['options'] as $option) {
  191. echo '<option';
  192. if (get_post_meta( $post->ID, $meta_box['name'] . '_value', true ) == $option) {
  193. echo ' selected="selected"';
  194. } else {
  195. if ($option == $meta_box['std']) {
  196. echo ' selected="selected"';
  197. }
  198. }
  199.  
  200. echo '>' . $option . '</option>';
  201. }
  202.  
  203. echo '</select>';
  204. }
  205. }
  206.  
  207. echo '<p><label for="' . $meta_box['name'] . '_value">' . $meta_box['description'] . '</label></p>';
  208. }
  209.  
  210. }
  211.  
  212. function new_meta_boxes_6() {
  213. global $post;
  214. global $new_meta_boxes;
  215. global $new_meta_boxes_6;
  216. foreach ($new_meta_boxes_6 as $meta_box) {
  217. echo '<input type="hidden" name="' . $meta_box['name'] . '_noncename" id="' . $meta_box['name'] . '_noncename" value="' . wp_create_nonce( plugin_basename( __FILE__ ) ) . '" />';
  218. echo '<h4>' . $meta_box['title'] . '</h4>';
  219. if ($meta_box['type'] == 'input') {
  220. $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
  221. if ($meta_box_value == '') {
  222. $meta_box_value = $meta_box['std'];
  223. }
  224.  
  225. $meta_box_value = str_replace( '"', '\'', $meta_box_value );
  226. echo '<input type="text" name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" size="55" /><br />';
  227. } else {
  228. if ($meta_box['type'] == 'textarea') {
  229. $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
  230. if ($meta_box_value == '') {
  231. $meta_box_value = $meta_box['std'];
  232. }
  233.  
  234. echo '<textarea name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" style="width:100%" cols="20" rows="7">' . $meta_box_value . '</textarea><br />';
  235. } else {
  236. if ($meta_box['type'] == 'select') {
  237. echo '<select name="' . $meta_box['name'] . '_value">';
  238. foreach ($meta_box['options'] as $option) {
  239. echo '<option';
  240. if (get_post_meta( $post->ID, $meta_box['name'] . '_value', true ) == $option) {
  241. echo ' selected="selected"';
  242. } else {
  243. if ($option == $meta_box['std']) {
  244. echo ' selected="selected"';
  245. }
  246. }
  247.  
  248. echo '>' . $option . '</option>';
  249. }
  250.  
  251. echo '</select>';
  252. } else {
  253. if ($meta_box['type'] == 'info') {
  254. echo '<p>Add your property images using the "Upload/Insert" button above the content textbox.</p>';
  255. }
  256. }
  257. }
  258. }
  259.  
  260. echo '<p><label for="' . $meta_box['name'] . '_value">' . $meta_box['description'] . '</label></p>';
  261. }
  262.  
  263. }
  264.  
  265. function create_meta_box() {
  266. global $theme_name;
  267. global $new_meta_boxes;
  268. global $new_meta_boxes_2;
  269. global $new_meta_boxes_3;
  270. global $new_meta_boxes_4;
  271. global $new_meta_boxes_5;
  272. global $new_meta_boxes_6;
  273. if (function_exists( 'add_meta_box' )) {
  274. add_meta_box( 'new-meta-boxes_3', __( 'Images and Video', 'openhouse' ), 'new_meta_boxes_3', 'listing', 'normal', 'high' );
  275. add_meta_box( 'new-meta-boxes', __( 'Location', 'openhouse' ), 'new_meta_boxes', 'listing', 'normal', 'high' );
  276. add_meta_box( 'new-meta-boxes_2', __( 'Property Information', 'openhouse' ), 'new_meta_boxes_2', 'listing', 'normal', 'high' );
  277. add_meta_box( 'new-meta-boxes_4', __( 'Slideshow Photo', 'openhouse' ), 'new_meta_boxes_4', 'photoslideshow', 'normal', 'high' );
  278. add_meta_box( 'new-meta-boxes_6', __( 'Agent Information', 'openhouse' ), 'new_meta_boxes_6', 'agent', 'normal', 'high' );
  279. }
  280.  
  281. }
  282. .............................................
  283. ................................
  284. ................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement