<?php
 defined('MYARCADE_VERSION') or die(); function F887EE638D29D376387DD283D95BA2879() { add_meta_box('myarcade-game-data', __('MyArcadePlugin Game Details', MYARCADE_TEXT_DOMAIN), 'F44486779B1A9D67B6334F6E71537D0CA', 'post', 'normal', 'high'); } add_action('add_meta_boxes', 'F887EE638D29D376387DD283D95BA2879'); function F44486779B1A9D67B6334F6E71537D0CA() { global $post, $R1B61EBCBB45EB87E353FD55E2588B461; $R1B61EBCBB45EB87E353FD55E2588B461 = $post->ID; $R8CE970ED0281F2178F2BB03A8DF5EB5B = get_post_meta($R1B61EBCBB45EB87E353FD55E2588B461, 'mabp_game_type', true); if( !empty($R8CE970ED0281F2178F2BB03A8DF5EB5B) ) { $R88A33D29429F80B24F150A7737FAA03B = array( 'mochi' => 'Mochi', 'playtomic' => 'Playtomic', 'kongregate' => 'Kongregate', 'fgd' => 'FlashGameDistribution', 'fog' => 'FreeGamesForYourWebsite', 'spilgames' => 'Spilgames', 'dcr' => 'DCR Game', 'custom' => 'SWF Game', 'ibparcade' => 'IBPArcade Game', 'phpbb' => 'PHPBB Game', 'embed' => 'Embed / Iframe Game', 'phpbb' => 'PHPBB Game' ); wp_nonce_field( 'myarcade_save_data', 'myarcade_meta_nonce' ); ?>
  <div class="panel-wrap myarcade_game_data">
    <ul class="myarcade_data_tabs tabs" style="display:none;">
      <li class="active"><a href="#myarcade_game_data"><?php _e('Game Details', MYARCADE_TEXT_DOMAIN); ?></a></li>
      <li class="files_tab"><a href="#myarcade_game_files"><?php _e('Game Files', MYARCADE_TEXT_DOMAIN); ?></a></li>
    </ul> 

    <?php ?>
    <div id="myarcade_game_data" class="panel myarcade_game_panel"> 
      <div class="options_group">
        <?php  F95BB518A64EEE3888BC384400611615C ( array ( 'id' => 'mabp_instructions', 'label' => __('Game Instructions', MYARCADE_TEXT_DOMAIN) )); F7C80A30CB9126044221684B16EB26128( array( 'id' => 'mabp_height', 'label' => __('Height', MYARCADE_TEXT_DOMAIN), 'description' => __('Game height in pixel (px)', MYARCADE_TEXT_DOMAIN) )); F7C80A30CB9126044221684B16EB26128( array( 'id' => 'mabp_width', 'label' => __('Width', MYARCADE_TEXT_DOMAIN), 'description' => __('Game width in pixel (px)', MYARCADE_TEXT_DOMAIN) )); F3CF00E39B6155136D6FF816443CC1C7A( array( 'id' => 'mabp_game_type', 'label' => __('Game Type', MYARCADE_TEXT_DOMAIN), 'options' => $R88A33D29429F80B24F150A7737FAA03B )); F7C80A30CB9126044221684B16EB26128( array( 'id' => 'mabp_game_tag', 'label' => __('Mochi Game Tag', MYARCADE_TEXT_DOMAIN), 'description' => __('Game Tag is only important for Mochi games.', MYARCADE_TEXT_DOMAIN) )); F3CF00E39B6155136D6FF816443CC1C7A( array( 'id' => 'mabp_leaderboard', 'label' => __('Score Support', MYARCADE_TEXT_DOMAIN), 'description' => __('Select if this game supports score submitting (Only Mochi or IBPArcade games).'), 'options' => array( '' => 'No', '1' => 'Yes') )); F3CF00E39B6155136D6FF816443CC1C7A( array( 'id' => 'mabp_score_order', 'label' => __('Score Order', MYARCADE_TEXT_DOMAIN), 'description' => __('How should MyArcadePlugin order scores for this game.'), 'options' => array( 'DESC' => 'DESC (High to Low)', 'ASC' => 'ASC (Low to High)') )); ?>        
      </div>
    </div>

    <?php ?>
    <div id="myarcade_game_files" class="panel myarcade_game_panel"> 
      <div class="options_group">
        <?php
 $R745F944ACCFEA4F3BA7E777D3BDD4BA0 = get_post_meta($post->ID, 'mabp_swf_url', true); $R4454E360FFF252043E577C8411615F0E = array( 'id' => 'mabp_swf_url', 'label' => __('Game File / Embed Code', MYARCADE_TEXT_DOMAIN) ); echo '<p class="form-field"><label for="'.$R4454E360FFF252043E577C8411615F0E['id'].'">'.$R4454E360FFF252043E577C8411615F0E['label'].':</label>
					<input type="text" class="game_path" name="'.$R4454E360FFF252043E577C8411615F0E['id'].'" id="'.$R4454E360FFF252043E577C8411615F0E['id'].'" value="'.$R745F944ACCFEA4F3BA7E777D3BDD4BA0.'" placeholder="'.__('File path / URL / Embed Code', MYARCADE_TEXT_DOMAIN).'" />
            <input type="button"  class="upload_game_button button" value="'.__('Upload a file', MYARCADE_TEXT_DOMAIN).'" />
				</p>'; $R745F944ACCFEA4F3BA7E777D3BDD4BA0 = get_post_meta($post->ID, 'mabp_thumbnail_url', true); $R4454E360FFF252043E577C8411615F0E = array( 'id' => 'mabp_thumbnail_url', 'label' => __('Game Thumbnail', MYARCADE_TEXT_DOMAIN) ); echo '<p class="form-field"><label for="'.$R4454E360FFF252043E577C8411615F0E['id'].'">'.$R4454E360FFF252043E577C8411615F0E['label'].':</label>
					<input type="text" class="thumbnail_path" name="'.$R4454E360FFF252043E577C8411615F0E['id'].'" id="'.$R4454E360FFF252043E577C8411615F0E['id'].'" value="'.$R745F944ACCFEA4F3BA7E777D3BDD4BA0.'" placeholder="'.__('File path / URL', MYARCADE_TEXT_DOMAIN).'" />
					<input type="button"  class="upload_thumbnail_button button" value="'.__('Upload a file', MYARCADE_TEXT_DOMAIN).'" />
				</p>'; $R745F944ACCFEA4F3BA7E777D3BDD4BA0 = get_post_meta($post->ID, 'mabp_screen1_url', true); $R4454E360FFF252043E577C8411615F0E = array( 'id' => 'mabp_screen1_url', 'label' => __('Game Screenshot No. 1', MYARCADE_TEXT_DOMAIN) ); echo '<p class="form-field"><label for="'.$R4454E360FFF252043E577C8411615F0E['id'].'">'.$R4454E360FFF252043E577C8411615F0E['label'].':</label>
					<input type="text" class="screen1_path" name="'.$R4454E360FFF252043E577C8411615F0E['id'].'" id="'.$R4454E360FFF252043E577C8411615F0E['id'].'" value="'.$R745F944ACCFEA4F3BA7E777D3BDD4BA0.'" placeholder="'.__('File path / URL', MYARCADE_TEXT_DOMAIN).'" />
					<input type="button"  class="upload_screen1_button button" value="'.__('Upload a file', MYARCADE_TEXT_DOMAIN).'" />
				</p>'; $R745F944ACCFEA4F3BA7E777D3BDD4BA0 = get_post_meta($post->ID, 'mabp_screen2_url', true); $R4454E360FFF252043E577C8411615F0E = array( 'id' => 'mabp_screen2_url', 'label' => __('Game Screenshot No. 2', MYARCADE_TEXT_DOMAIN) ); echo '<p class="form-field"><label for="'.$R4454E360FFF252043E577C8411615F0E['id'].'">'.$R4454E360FFF252043E577C8411615F0E['label'].':</label>
					<input type="text" class="screen1_path" name="'.$R4454E360FFF252043E577C8411615F0E['id'].'" id="'.$R4454E360FFF252043E577C8411615F0E['id'].'" value="'.$R745F944ACCFEA4F3BA7E777D3BDD4BA0.'" placeholder="'.__('File path / URL', MYARCADE_TEXT_DOMAIN).'" />
					<input type="button"  class="upload_screen2_button button" value="'.__('Upload a file', MYARCADE_TEXT_DOMAIN).'" />
				</p>'; $R745F944ACCFEA4F3BA7E777D3BDD4BA0 = get_post_meta($post->ID, 'mabp_screen3_url', true); $R4454E360FFF252043E577C8411615F0E = array( 'id' => 'mabp_screen3_url', 'label' => __('Game Screenshot No. 3', MYARCADE_TEXT_DOMAIN) ); echo '<p class="form-field"><label for="'.$R4454E360FFF252043E577C8411615F0E['id'].'">'.$R4454E360FFF252043E577C8411615F0E['label'].':</label>
					<input type="text" class="screen3_path" name="'.$R4454E360FFF252043E577C8411615F0E['id'].'" id="'.$R4454E360FFF252043E577C8411615F0E['id'].'" value="'.$R745F944ACCFEA4F3BA7E777D3BDD4BA0.'" placeholder="'.__('File path / URL', MYARCADE_TEXT_DOMAIN).'" />
					<input type="button"  class="upload_screen3_button button" value="'.__('Upload a file', MYARCADE_TEXT_DOMAIN).'" />
				</p>'; $R745F944ACCFEA4F3BA7E777D3BDD4BA0 = get_post_meta($post->ID, 'mabp_screen4_url', true); $R4454E360FFF252043E577C8411615F0E = array( 'id' => 'mabp_screen4_url', 'label' => __('Game Screenshot No. 4', MYARCADE_TEXT_DOMAIN) ); echo '<p class="form-field"><label for="'.$R4454E360FFF252043E577C8411615F0E['id'].'">'.$R4454E360FFF252043E577C8411615F0E['label'].':</label>
					<input type="text" class="screen4_path" name="'.$R4454E360FFF252043E577C8411615F0E['id'].'" id="'.$R4454E360FFF252043E577C8411615F0E['id'].'" value="'.$R745F944ACCFEA4F3BA7E777D3BDD4BA0.'" placeholder="'.__('File path / URL', MYARCADE_TEXT_DOMAIN).'" />
					<input type="button"  class="upload_screen4_button button" value="'.__('Upload a file', MYARCADE_TEXT_DOMAIN).'" />
				</p>'; ?>        
      </div>
    </div>    
  </div>
  <script type="text/javascript">
    // Uploading files
    var file_path_field;	
    window.send_to_editor_default = window.send_to_editor;

    jQuery('.upload_thumbnail_button').live('click', function(){		
      file_path_field = jQuery(this).parent().find('.thumbnail_path');		
      formfield = jQuery(file_path_field).attr('name');		
      window.send_to_editor = window.send_to_download_url;		
      tb_show('', 'media-upload.php?post_id=<?php echo $post->ID; ?>&amp;type=myarcade_image&amp;from=wc01&amp;TB_iframe=true');
      return false;
    });

    jQuery('.upload_game_button').live('click', function(){		
      file_path_field = jQuery(this).parent().find('.game_path');		
      formfield = jQuery(file_path_field).attr('name');		
      window.send_to_editor = window.send_to_download_url;		
      tb_show('', 'media-upload.php?post_id=<?php echo $post->ID; ?>&amp;type=myarcade_game&amp;from=wc01&amp;TB_iframe=true');
      return false;
    });  
    
    jQuery('.upload_screen1_button').live('click', function(){		
      file_path_field = jQuery(this).parent().find('.screen1_path');		
      formfield = jQuery(file_path_field).attr('name');		
      window.send_to_editor = window.send_to_download_url;		
      tb_show('', 'media-upload.php?post_id=<?php echo $post->ID; ?>&amp;type=myarcade_image&amp;from=wc01&amp;TB_iframe=true');
      return false;
    });
    
    jQuery('.upload_screen2_button').live('click', function(){		
      file_path_field = jQuery(this).parent().find('.screen2_path');		
      formfield = jQuery(file_path_field).attr('name');		
      window.send_to_editor = window.send_to_download_url;		
      tb_show('', 'media-upload.php?post_id=<?php echo $post->ID; ?>&amp;type=myarcade_image&amp;from=wc01&amp;TB_iframe=true');
      return false;
    }); 

    jQuery('.upload_screen3_button').live('click', function(){		
      file_path_field = jQuery(this).parent().find('.screen3_path');		
      formfield = jQuery(file_path_field).attr('name');		
      window.send_to_editor = window.send_to_download_url;		
      tb_show('', 'media-upload.php?post_id=<?php echo $post->ID; ?>&amp;type=myarcade_image&amp;from=wc01&amp;TB_iframe=true');
      return false;
    }); 
    
    jQuery('.upload_screen4_button').live('click', function(){		
      file_path_field = jQuery(this).parent().find('.screen4_path');		
      formfield = jQuery(file_path_field).attr('name');		
      window.send_to_editor = window.send_to_download_url;		
      tb_show('', 'media-upload.php?post_id=<?php echo $post->ID; ?>&amp;type=myarcade_image&amp;from=wc01&amp;TB_iframe=true');
      return false;
    });     

    window.send_to_download_url = function(html) {		
      file_url = jQuery(html).attr('href');
      if (file_url) {
        jQuery(file_path_field).val(file_url);
      }
      tb_remove();
      window.send_to_editor = window.send_to_editor_default;		
    }    
  </script>
  <?php
 } else { ?>
    <p>
      <?php _e("This post is not a game.", MYARCADE_TEXT_DOMAIN); ?>
    </p>
    <?php  } } function FC9320B750FBF30BABF71EA549AFD58D5($R25B2D534C29A8DE83951DBAD8C9380F1, $post) { if ( !isset($_POST) ) return $R25B2D534C29A8DE83951DBAD8C9380F1; if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) return $R25B2D534C29A8DE83951DBAD8C9380F1; if ( !isset($_POST['myarcade_meta_nonce']) || (isset($_POST['myarcade_meta_nonce']) && !wp_verify_nonce( $_POST['myarcade_meta_nonce'], 'myarcade_save_data' ))) return $R25B2D534C29A8DE83951DBAD8C9380F1; if ( !current_user_can( 'edit_post', $R25B2D534C29A8DE83951DBAD8C9380F1 )) return $R25B2D534C29A8DE83951DBAD8C9380F1; $RA6B610A19706344D5E105EFEAE8E8E44 = (isset($_POST['mabp_game_tag'])) ? $_POST['mabp_game_tag'] : ''; $R170BC90B7311F52F8887011D9D4C9EC0 = (isset($_POST['mabp_height'])) ? $_POST['mabp_height'] : ''; $RA81D75BDA546491791F39B0712F89443 = (isset($_POST['mabp_width'])) ? $_POST['mabp_width'] : ''; $R189FB0CA345E635FB3B97C25615D0E94 = (isset($_POST['mabp_instructions'])) ? $_POST['mabp_instructions'] : ''; $R7E262491C8214F62973FFCBE1D00E90D = (isset($_POST['mabp_leaderboard'])) ? $_POST['mabp_leaderboard'] : ''; update_post_meta($R25B2D534C29A8DE83951DBAD8C9380F1, 'mabp_game_tag', $RA6B610A19706344D5E105EFEAE8E8E44); update_post_meta($R25B2D534C29A8DE83951DBAD8C9380F1, 'mabp_game_type',$_POST['mabp_game_type']); update_post_meta($R25B2D534C29A8DE83951DBAD8C9380F1, 'mabp_height', $R170BC90B7311F52F8887011D9D4C9EC0); update_post_meta($R25B2D534C29A8DE83951DBAD8C9380F1, 'mabp_width', $RA81D75BDA546491791F39B0712F89443); update_post_meta($R25B2D534C29A8DE83951DBAD8C9380F1, 'mabp_instructions', $R189FB0CA345E635FB3B97C25615D0E94); update_post_meta($R25B2D534C29A8DE83951DBAD8C9380F1, 'mabp_leaderboard', $R7E262491C8214F62973FFCBE1D00E90D); update_post_meta($R25B2D534C29A8DE83951DBAD8C9380F1, 'mabp_score_order', $_POST['mabp_score_order'] ); $R6A39AF2A2BC3EA151BD12B1462BA22E9 = (isset($_POST['mabp_thumbnail_url'])) ? $_POST['mabp_thumbnail_url'] : ''; $R69F05BD3024E3A18B29F11DF8A3E8C79 = (isset($_POST['mabp_swf_url'])) ? $_POST['mabp_swf_url'] : ''; $RC63826E3032661EEA49E2EEDC9DFC682 = (isset($_POST['mabp_screen1_url'])) ? $_POST['mabp_screen1_url'] : ''; $RC5066ED01D2078524BBF502BAA8BCEF4 = (isset($_POST['mabp_screen2_url'])) ? $_POST['mabp_screen2_url'] : ''; $R602895CCAEDD3708C0F692906E20F733 = (isset($_POST['mabp_screen3_url'])) ? $_POST['mabp_screen3_url'] : ''; $R6947E129BB15A982FBEC82D2B48EF810 = (isset($_POST['mabp_screen4_url'])) ? $_POST['mabp_screen4_url'] : ''; update_post_meta($R25B2D534C29A8DE83951DBAD8C9380F1, 'mabp_thumbnail_url', $R6A39AF2A2BC3EA151BD12B1462BA22E9); update_post_meta($R25B2D534C29A8DE83951DBAD8C9380F1, 'mabp_swf_url', $R69F05BD3024E3A18B29F11DF8A3E8C79); update_post_meta($R25B2D534C29A8DE83951DBAD8C9380F1, 'mabp_screen1_url', $RC63826E3032661EEA49E2EEDC9DFC682); update_post_meta($R25B2D534C29A8DE83951DBAD8C9380F1, 'mabp_screen2_url', $RC5066ED01D2078524BBF502BAA8BCEF4); update_post_meta($R25B2D534C29A8DE83951DBAD8C9380F1, 'mabp_screen3_url', $R602895CCAEDD3708C0F692906E20F733); update_post_meta($R25B2D534C29A8DE83951DBAD8C9380F1, 'mabp_screen4_url', $R6947E129BB15A982FBEC82D2B48EF810); } add_action('save_post', 'FC9320B750FBF30BABF71EA549AFD58D5', 1, 2); function F7C80A30CB9126044221684B16EB26128( $R4454E360FFF252043E577C8411615F0E ) { global $R1B61EBCBB45EB87E353FD55E2588B461, $post; if (!$R1B61EBCBB45EB87E353FD55E2588B461) $R1B61EBCBB45EB87E353FD55E2588B461 = $post->ID; if (!isset($R4454E360FFF252043E577C8411615F0E['placeholder'])) $R4454E360FFF252043E577C8411615F0E['placeholder'] = ''; if (!isset($R4454E360FFF252043E577C8411615F0E['class'])) $R4454E360FFF252043E577C8411615F0E['class'] = 'short'; if (!isset($R4454E360FFF252043E577C8411615F0E['value'])) $R4454E360FFF252043E577C8411615F0E['value'] = get_post_meta($R1B61EBCBB45EB87E353FD55E2588B461, $R4454E360FFF252043E577C8411615F0E['id'], true); echo '<p class="form-field '.$R4454E360FFF252043E577C8411615F0E['id'].'_field"><label for="'.$R4454E360FFF252043E577C8411615F0E['id'].'">'.$R4454E360FFF252043E577C8411615F0E['label'].'</label><input type="text" class="'.$R4454E360FFF252043E577C8411615F0E['class'].'" name="'.$R4454E360FFF252043E577C8411615F0E['id'].'" id="'.$R4454E360FFF252043E577C8411615F0E['id'].'" value="'.esc_attr( $R4454E360FFF252043E577C8411615F0E['value'] ).'" placeholder="'.$R4454E360FFF252043E577C8411615F0E['placeholder'].'" /> '; if (isset($R4454E360FFF252043E577C8411615F0E['description'])) echo '<span class="description">' .$R4454E360FFF252043E577C8411615F0E['description'] . '</span>'; echo '</p>'; } function F95BB518A64EEE3888BC384400611615C( $R4454E360FFF252043E577C8411615F0E ) { global $R1B61EBCBB45EB87E353FD55E2588B461, $post; if (!$R1B61EBCBB45EB87E353FD55E2588B461) $R1B61EBCBB45EB87E353FD55E2588B461 = $post->ID; if (!isset($R4454E360FFF252043E577C8411615F0E['placeholder'])) $R4454E360FFF252043E577C8411615F0E['placeholder'] = ''; if (!isset($R4454E360FFF252043E577C8411615F0E['class'])) $R4454E360FFF252043E577C8411615F0E['class'] = 'short'; if (!isset($R4454E360FFF252043E577C8411615F0E['value'])) $R4454E360FFF252043E577C8411615F0E['value'] = get_post_meta($R1B61EBCBB45EB87E353FD55E2588B461, $R4454E360FFF252043E577C8411615F0E['id'], true); echo '<p class="form-field '.$R4454E360FFF252043E577C8411615F0E['id'].'_field"><label for="'.$R4454E360FFF252043E577C8411615F0E['id'].'">'.$R4454E360FFF252043E577C8411615F0E['label'].'</label><textarea class="'.$R4454E360FFF252043E577C8411615F0E['class'].'" name="'.$R4454E360FFF252043E577C8411615F0E['id'].'" id="'.$R4454E360FFF252043E577C8411615F0E['id'].'" placeholder="'.$R4454E360FFF252043E577C8411615F0E['placeholder'].'" rows="2" cols="20">'.esc_textarea( $R4454E360FFF252043E577C8411615F0E['value'] ).'</textarea> '; if ( isset( $R4454E360FFF252043E577C8411615F0E['description'] ) && $R4454E360FFF252043E577C8411615F0E['description'] ) { echo '<span class="description">' . $R4454E360FFF252043E577C8411615F0E['description'] . '</span>'; } echo '</p>'; } function F3CF00E39B6155136D6FF816443CC1C7A( $R4454E360FFF252043E577C8411615F0E ) { global $R1B61EBCBB45EB87E353FD55E2588B461, $post; if (!$R1B61EBCBB45EB87E353FD55E2588B461) $R1B61EBCBB45EB87E353FD55E2588B461 = $post->ID; if (!isset($R4454E360FFF252043E577C8411615F0E['class'])) $R4454E360FFF252043E577C8411615F0E['class'] = 'select short'; if (!isset($R4454E360FFF252043E577C8411615F0E['value'])) $R4454E360FFF252043E577C8411615F0E['value'] = get_post_meta($R1B61EBCBB45EB87E353FD55E2588B461, $R4454E360FFF252043E577C8411615F0E['id'], true); echo '<p class="form-field '.$R4454E360FFF252043E577C8411615F0E['id'].'_field"><label for="'.$R4454E360FFF252043E577C8411615F0E['id'].'">'.$R4454E360FFF252043E577C8411615F0E['label'].'</label><select id="'.$R4454E360FFF252043E577C8411615F0E['id'].'" name="'.$R4454E360FFF252043E577C8411615F0E['id'].'" class="'.$R4454E360FFF252043E577C8411615F0E['class'].'">'; foreach ($R4454E360FFF252043E577C8411615F0E['options'] as $RF413F06AEBBCEF5E1C8B1019DEE6FE6B => $R7D0596C36891967F3BB9D994B4A97C19) { echo '<option value="'.$RF413F06AEBBCEF5E1C8B1019DEE6FE6B.'" '; selected($R4454E360FFF252043E577C8411615F0E['value'], $RF413F06AEBBCEF5E1C8B1019DEE6FE6B); echo '>'.$R7D0596C36891967F3BB9D994B4A97C19.'</option>'; } echo '</select> '; if ( isset( $R4454E360FFF252043E577C8411615F0E['description'] ) && $R4454E360FFF252043E577C8411615F0E['description'] ) { echo '<span class="description">' . $R4454E360FFF252043E577C8411615F0E['description'] . '</span>'; } echo '</p>'; } ?>