<?php
 if ( ! defined( 'ABSPATH' ) ) { exit; } function myarcade_settings_htmlgames() { $htmlgames = F370DD774B2D974BFC80CFD42084987D1( 'htmlgames' ); ?>
  <h2 class="trigger"><?php _e("HTML Games", 'myarcadeplugin'); ?></h2>
  <div class="toggle_container">
    <div class="block">
      <table class="optiontable" width="100%" cellpadding="5" cellspacing="5">
        <tr>
          <td colspan="2">
            <i>
              <?php printf( __( "%s distributes HTML5 games.", 'myarcadeplugin' ), '<a href="http://htmlgames.com" target="_blank">HTMLGames.com</a>' ); ?>
            </i>
            <br /><br />
          </td>
        </tr>
        <tr><td colspan="2"><h3><?php _e("Feed URL", 'myarcadeplugin'); ?></h3></td></tr>
        <tr>
          <td>
            <input type="text" size="40"  name="htmlgames_url" value="<?php echo $htmlgames['feed']; ?>" />
          </td>
          <td><i><?php _e("Edit this field only if Feed URL has been changed!", 'myarcadeplugin'); ?></i></td>
        </tr>

        <tr><td colspan="2"><h3><?php _e("Category", 'myarcadeplugin'); ?></h3></td></tr>

        <tr>
          <td>
            <select size="1" name="htmlgames_category" id="htmlgames_category">
              <option value="all" <?php FDDF3EC25B8F21FAFBFA55C25519BBBBF($htmlgames['category'], 'all'); ?> ><?php _e("All Games", 'myarcadeplugin'); ?></option>
              <option value="Classic games" <?php FDDF3EC25B8F21FAFBFA55C25519BBBBF($htmlgames['category'], '2'); ?> ><?php _e("Classic games", 'myarcadeplugin'); ?></option>
              <option value="Hidden objects" <?php FDDF3EC25B8F21FAFBFA55C25519BBBBF($htmlgames['category'], '3'); ?> ><?php _e("Hidden objects", 'myarcadeplugin'); ?></option>
              <option value="Mahjong" <?php FDDF3EC25B8F21FAFBFA55C25519BBBBF($htmlgames['category'], '5'); ?> ><?php _e("Mahjong", 'myarcadeplugin'); ?></option>
              <option value="Match 3 games" <?php FDDF3EC25B8F21FAFBFA55C25519BBBBF($htmlgames['category'], '6'); ?> ><?php _e("Match 3 games", 'myarcadeplugin'); ?></option>
              <option value="Mind games" <?php FDDF3EC25B8F21FAFBFA55C25519BBBBF($htmlgames['category'], '7'); ?> ><?php _e("Mind games", 'myarcadeplugin'); ?></option>
              <option value="Solitaire" <?php FDDF3EC25B8F21FAFBFA55C25519BBBBF($htmlgames['category'], '8'); ?> ><?php _e("Solitaire", 'myarcadeplugin'); ?></option>
            </select>
          </td>
          <td><i><?php _e("Select which games you would like to fetch.", 'myarcadeplugin'); ?></i></td>
        </tr>

        <tr><td colspan="2"><h3><?php _e("Thumbnail Size", 'myarcadeplugin'); ?></h3></td></tr>

        <tr>
          <td>
            <select size="1" name="htmlgames_thumbnail" id="htmlgames_thumbnail">
              <option value="thumb1" <?php FDDF3EC25B8F21FAFBFA55C25519BBBBF($htmlgames['thumbnail'], 'thumb1'); ?> ><?php _e("120x120", 'myarcadeplugin'); ?></option>
              <option value="thumb2" <?php FDDF3EC25B8F21FAFBFA55C25519BBBBF($htmlgames['thumbnail'], 'thumb2'); ?> ><?php _e("196x196", 'myarcadeplugin'); ?></option>
              <option value="thumb3" <?php FDDF3EC25B8F21FAFBFA55C25519BBBBF($htmlgames['thumbnail'], 'thumb3'); ?> ><?php _e("300x200", 'myarcadeplugin'); ?></option>
            </select>
          </td>
          <td><i><?php _e("Select a thumbnail size.", 'myarcadeplugin'); ?></i></td>
        </tr>

        <tr><td colspan="2"><h3><?php _e("Automated Game Publishing", 'myarcadeplugin'); ?></h3></td></tr>

        <tr>
          <td>
            <input type="checkbox" name="htmlgames_cron_publish" value="true" <?php F739F7FB06301A1E6810F08B95CC237ED($htmlgames['cron_publish'], true); ?> /><label class="opt">&nbsp;<?php _e("Yes", 'myarcadeplugin'); ?></label>
          </td>
          <td><i><?php _e("Enable this if you want to publish games automatically. Go to 'General Settings' to select a cron interval.", 'myarcadeplugin'); ?></i></td>
        </tr>

        <tr><td colspan="2"><h4><?php _e("Publish Games", 'myarcadeplugin'); ?></h4></td></tr>

        <tr>
          <td>
            <input type="text" size="40"  name="htmlgames_cron_publish_limit" value="<?php echo $htmlgames['cron_publish_limit']; ?>" />
          </td>
          <td><i><?php _e("How many games should be published on every cron trigger?", 'myarcadeplugin'); ?></i></td>
        </tr>

      </table>
      <input class="button button-primary" id="submit" type="submit" name="submit" value="<?php _e("Save Settings", 'myarcadeplugin'); ?>" />
    </div>
  </div>
  <?php
} function myarcade_default_settings_htmlgames() { return array( 'feed' => 'http://www.htmlgames.com/rss/games.php', 'category' => 'all', 'thumbnail' => 'thumb1', 'cron_publish' => false, 'cron_publish_limit' => '1', ); } function myarcade_save_settings_htmlgames() { F7D8DBE932D4B983CB93613EE5AED34A4(); $settings = array(); $settings['feed'] = esc_sql( filter_input( INPUT_POST, 'htmlgames_url' ) ); $settings['category'] = filter_input( INPUT_POST, 'htmlgames_category' ); $settings['thumbnail'] = filter_input( INPUT_POST, 'htmlgames_thumbnail' ); $settings['cron_publish'] = filter_input( INPUT_POST, 'htmlgames_cron_publish', FILTER_VALIDATE_BOOLEAN ); $settings['cron_publish_limit'] = filter_input( INPUT_POST, 'htmlgames_cron_publish_limit', FILTER_VALIDATE_INT, array( "options" => array( "default" => 1) ) ); update_option('myarcade_htmlgames', $settings); } function FB0CF9AF6A648E37A574D6139817FED5E() { return array( "Action" => false, "Adventure" => false, "Arcade" => "Classic games", "Board Game" => "Mahjong,Match 3 games,Solitaire", "Casino" => false, "Defense" => false, "Customize" => false, "Dress-Up" => false, "Driving" => false, "Education" => false, "Fighting" => false, "Jigsaw" => false, "Multiplayer" => false, "Other" => "Hidden objects,Mind games", "Puzzles" => false, "Rhythm" => false, "Shooting" => false, "Sports" => false, "Strategy" => false, ); } function myarcade_feed_htmlgames( $R9FE302BDF914868081913A22F58F9E7E = array() ) { global $wpdb; $R1C087CFC2417747F08C78E3E5D5121E5 = array( 'echo' => false, 'settings' => array(), ); $RAA7BB4B05FBD27DB7CA594893F166B47 = wp_parse_args( $R9FE302BDF914868081913A22F58F9E7E, $R1C087CFC2417747F08C78E3E5D5121E5 ); extract($RAA7BB4B05FBD27DB7CA594893F166B47); $R630F8C3F00ED4BE49091A902C671B200 = 0; $R7E48A94D08652CE34DE703DF9E891458 = false; $htmlgames = F370DD774B2D974BFC80CFD42084987D1( 'htmlgames' ); $R14C8E77639EE987D86F66FEBCF773D21 = FB0CF9AF6A648E37A574D6139817FED5E(); $R281A0F7BC3D849F3386A5AC36FB35807 = get_option('myarcade_categories'); if ( !empty($settings) ) { $settings = array_merge($htmlgames, $settings); } else { $settings = $htmlgames; } $settings['feed'] = trim( $settings['feed'] ) . '?json'; require_once( MYARCADE_CORE_DIR . '/fetch.php' ); $RC12AC9F8ECF1A75EF50F5C500668B033 = F720E8C77506CFC05F85A08A7EF8F1D41( array( 'url' => $settings['feed'], 'service' => 'json', 'echo' => $echo) ); if ( !empty( $RC12AC9F8ECF1A75EF50F5C500668B033 ) ) { foreach ( $RC12AC9F8ECF1A75EF50F5C500668B033 as $R2CDAD6EF7D5C41B8DB9EB739620C280A ) { if ( ! empty( $settings['keyword_filter'] ) ) { if ( ! preg_match( $settings['keyword_filter'], strtolower( $R2CDAD6EF7D5C41B8DB9EB739620C280A->name ) ) && ! preg_match( $settings['keyword_filter'], strtolower( $R2CDAD6EF7D5C41B8DB9EB739620C280A->description ) ) ) { continue; } } $R69F05BD3024E3A18B29F11DF8A3E8C79 = new stdClass(); $R69F05BD3024E3A18B29F11DF8A3E8C79->uuid = crc32( $R2CDAD6EF7D5C41B8DB9EB739620C280A->name ) . '_htmlgames'; $R69F05BD3024E3A18B29F11DF8A3E8C79->game_tag = md5( $R2CDAD6EF7D5C41B8DB9EB739620C280A->name . 'htmlgames' ); $R89FEDA984B61366DE78855CB7D5F44D1 = $wpdb->get_var("SELECT id FROM ".$wpdb->prefix . 'myarcadegames'." WHERE uuid = '".$R69F05BD3024E3A18B29F11DF8A3E8C79->uuid."' OR game_tag = '".$R69F05BD3024E3A18B29F11DF8A3E8C79->game_tag."' OR name = '".esc_sql($R2CDAD6EF7D5C41B8DB9EB739620C280A->name)."'"); if ( ! $R89FEDA984B61366DE78855CB7D5F44D1 ) { $R7E48A94D08652CE34DE703DF9E891458 = false; foreach ( $R281A0F7BC3D849F3386A5AC36FB35807 as $RAE9A4476893066B7B92C648E9F0FDEE8 ) { if ( $RAE9A4476893066B7B92C648E9F0FDEE8['Status'] != 'checked' ) { continue; } if ( empty( $R14C8E77639EE987D86F66FEBCF773D21[ $RAE9A4476893066B7B92C648E9F0FDEE8['Name'] ] ) ) { continue; } $R30E38C1F8EC85F8EE8DF620FF3267157 = explode( ',', $R14C8E77639EE987D86F66FEBCF773D21[ $RAE9A4476893066B7B92C648E9F0FDEE8['Name'] ] ); if ( ! $R30E38C1F8EC85F8EE8DF620FF3267157 || ! in_array( $R2CDAD6EF7D5C41B8DB9EB739620C280A->category, $R30E38C1F8EC85F8EE8DF620FF3267157 ) ) { continue; } $R69F05BD3024E3A18B29F11DF8A3E8C79->categs = $RAE9A4476893066B7B92C648E9F0FDEE8['Name']; $R7E48A94D08652CE34DE703DF9E891458 = true; break; } if ( ! $R7E48A94D08652CE34DE703DF9E891458 ) { continue; } $R69F05BD3024E3A18B29F11DF8A3E8C79->type = 'htmlgames'; $R69F05BD3024E3A18B29F11DF8A3E8C79->name = esc_sql($R2CDAD6EF7D5C41B8DB9EB739620C280A->name); $R69F05BD3024E3A18B29F11DF8A3E8C79->slug = F64A2F46BC8BAFD9163DD9691D1207278($R2CDAD6EF7D5C41B8DB9EB739620C280A->name); $R69F05BD3024E3A18B29F11DF8A3E8C79->description = esc_sql($R2CDAD6EF7D5C41B8DB9EB739620C280A->description); $R69F05BD3024E3A18B29F11DF8A3E8C79->swf_url = esc_sql( $R2CDAD6EF7D5C41B8DB9EB739620C280A->url ); $R69F05BD3024E3A18B29F11DF8A3E8C79->width = esc_sql( $R2CDAD6EF7D5C41B8DB9EB739620C280A->width ); $R69F05BD3024E3A18B29F11DF8A3E8C79->height = esc_sql( $R2CDAD6EF7D5C41B8DB9EB739620C280A->height ); $RBD4076544B640033ED860F85C21C7BDE = $settings['thumbnail']; if ( ! empty( $R2CDAD6EF7D5C41B8DB9EB739620C280A->$RBD4076544B640033ED860F85C21C7BDE ) ) { $R69F05BD3024E3A18B29F11DF8A3E8C79->thumbnail_url = esc_sql( $R2CDAD6EF7D5C41B8DB9EB739620C280A->$RBD4076544B640033ED860F85C21C7BDE ); } else { $R69F05BD3024E3A18B29F11DF8A3E8C79->thumbnail_url = esc_sql( $R2CDAD6EF7D5C41B8DB9EB739620C280A->thumb1 ); } if ( ! empty( $R2CDAD6EF7D5C41B8DB9EB739620C280A->youtube ) ) { $R69F05BD3024E3A18B29F11DF8A3E8C79->video_url = $R2CDAD6EF7D5C41B8DB9EB739620C280A->youtube; } $R630F8C3F00ED4BE49091A902C671B200++; FF09D7482BA5FAADAB6D947666FFD8C43( $R69F05BD3024E3A18B29F11DF8A3E8C79, $echo ); } } } FC6BC39ED73177ED6BA0A3E5B1C3D6848( $R630F8C3F00ED4BE49091A902C671B200, $echo ); } function myarcade_embedtype_htmlgames() { return 'iframe'; } function myarcade_can_download_htmlgames() { return false; } ?>