<?php
 function myarcade_save_settings_softgames() { F7D8DBE932D4B983CB93613EE5AED34A4(); $settings = array(); $settings['feed'] = esc_sql( filter_input( INPUT_POST, 'softgames_url' ) ); $settings['category'] = filter_input( INPUT_POST, 'softgames_category' ); $settings['publisher_id'] = filter_input( INPUT_POST, 'softgames_publisher_id' ); $settings['thumbnail'] = filter_input( INPUT_POST, 'softgames_thumbnail' ); $settings['language'] = 'en'; $settings['cron_publish'] = filter_input( INPUT_POST, 'softgames_cron_publish', FILTER_VALIDATE_BOOLEAN ); $settings['cron_publish_limit'] = filter_input( INPUT_POST, 'softgames_cron_publish_limit', FILTER_VALIDATE_INT, array( "options" => array( "default" => 1) ) ); update_option( 'myarcade_softgames', $settings ); } function myarcade_settings_softgames() { $softgames = F370DD774B2D974BFC80CFD42084987D1( 'softgames' ); ?>
  <h2 class="trigger"><?php _e("Softgames", '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://softgames.de" target="_blank">Softgames</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="softgames_url" value="<?php echo $softgames['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("Publisher ID", 'myarcadeplugin'); ?></h3></td></tr>
        <tr>
          <td>
            <input type="text" size="40"  name="softgames_publisher_id" value="<?php echo $softgames['publisher_id']; ?>" />
          </td>
          <td><i><?php _e("Enter your Publisher ID if available.", 'myarcadeplugin'); ?></i></td>
        </tr>

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

        <?php
 $R19C8E058DAB626CC7BFB34437ED91F61 = array( 'all' => __("All games", 'myarcadeplugin' ), "Action" => "Action", "Arcade" => "Arcade", "Board" => "Board Games", "Brain Teaser" => "Brain Teaser", "Card" => "Card Games", "Classic" => "Classic", "Games for Girls" => "Games for Girls", "Halloween" => "Halloween", "Jump &#39;N&#39; Run" => "Jump 'N' Run", "Puzzle" => "Puzzles", "Racing" => "Racing", "Skill" => "Skill", "Sport" => "Sports", "Strategy" => "Strategy", "Word" => "Word Games", ); ?>
        <tr>
          <td>
            <select size="1" name="softgames_category" id="softgames_category">
              <?php foreach ( $R19C8E058DAB626CC7BFB34437ED91F61 as $RF413F06AEBBCEF5E1C8B1019DEE6FE6B => $R7D0596C36891967F3BB9D994B4A97C19 ) : ?>
               <option value="<?php echo $RF413F06AEBBCEF5E1C8B1019DEE6FE6B; ?>" <?php FDDF3EC25B8F21FAFBFA55C25519BBBBF( $softgames['category'], $RF413F06AEBBCEF5E1C8B1019DEE6FE6B ); ?>><?php echo $R7D0596C36891967F3BB9D994B4A97C19; ?></option>
              <?php endforeach; ?>
            </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="softgames_thumbnail" id="softgames_thumbnail">
              <option value="thumb" <?php FDDF3EC25B8F21FAFBFA55C25519BBBBF($softgames['thumbnail'], 'thumb'); ?> ><?php _e("60x60", 'myarcadeplugin'); ?></option>
              <option value="thumbBig" <?php FDDF3EC25B8F21FAFBFA55C25519BBBBF($softgames['thumbnail'], 'thumbBig'); ?> ><?php _e("120x120", 'myarcadeplugin'); ?></option>
              <option value="teaser" <?php FDDF3EC25B8F21FAFBFA55C25519BBBBF($softgames['thumbnail'], 'teaser'); ?> ><?php _e("300x180", 'myarcadeplugin'); ?></option>
              <option value="image620" <?php FDDF3EC25B8F21FAFBFA55C25519BBBBF($softgames['thumbnail'], 'image620'); ?> ><?php _e("520x520", 'myarcadeplugin'); ?></option>
            </select>
          </td>
          <td><i><?php _e("Select a thumbnail size.", 'myarcadeplugin'); ?></i></td>
        </tr>

        <?php  ?>

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

        <tr>
          <td>
            <input type="checkbox" name="softgames_cron_publish" value="true" <?php F739F7FB06301A1E6810F08B95CC237ED($softgames['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="softgames_cron_publish_limit" value="<?php echo $softgames['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_softgames() { return array( 'feed' => 'http://kirk.softgames.de/categories/latest-games.json/', 'publisher_id' => '', 'category' => 'all', 'thumbnail' => 'thumbBig', 'language' => 'en', 'cron_publish' => false, 'cron_publish_limit' => '1', ); } function myarcade_feed_softgames( $R9FE302BDF914868081913A22F58F9E7E = array() ) { global $wpdb; $R1C087CFC2417747F08C78E3E5D5121E5 = array( 'echo' => false, 'settings' => array(), ); $RAA7BB4B05FBD27DB7CA594893F166B47 = wp_parse_args( $R9FE302BDF914868081913A22F58F9E7E, $R1C087CFC2417747F08C78E3E5D5121E5 ); extract($RAA7BB4B05FBD27DB7CA594893F166B47); $R630F8C3F00ED4BE49091A902C671B200 = 0; $R7E48A94D08652CE34DE703DF9E891458 = false; $softgames = F370DD774B2D974BFC80CFD42084987D1( 'softgames' ); $R281A0F7BC3D849F3386A5AC36FB35807 = get_option( 'myarcade_categories' ); if ( ! empty($settings) ) { $settings = array_merge( $softgames, $settings ); } else { $settings = $softgames; } if ( empty( $settings['publisher_id'] ) ) { $settings['publisher_id'] = 'myarcadeplugin'; } $settings['feed'] = add_query_arg( array( "p" => $settings['publisher_id'] ), trim( $settings['feed'] ) ); $settings['feed'] = add_query_arg( array( "locale" => $settings['language'] ), trim( $settings['feed'] ) ); require_once( MYARCADE_CORE_DIR . '/fetch.php' ); $RC12AC9F8ECF1A75EF50F5C500668B033 = F720E8C77506CFC05F85A08A7EF8F1D41( array( 'url' => $settings['feed'], 'service' => 'json', 'echo' => $echo ) ); if ( !empty($RC12AC9F8ECF1A75EF50F5C500668B033->channel->games ) ) { foreach ( $RC12AC9F8ECF1A75EF50F5C500668B033->channel->games as $R2CDAD6EF7D5C41B8DB9EB739620C280A ) { if ( ! empty( $settings['keyword_filter'] ) ) { if ( ! preg_match( $settings['keyword_filter'], strtolower( $R2CDAD6EF7D5C41B8DB9EB739620C280A->title ) ) && ! preg_match( $settings['keyword_filter'], strtolower( $R2CDAD6EF7D5C41B8DB9EB739620C280A->description ) ) ) { continue; } } $R69F05BD3024E3A18B29F11DF8A3E8C79 = new stdClass(); $R69F05BD3024E3A18B29F11DF8A3E8C79->uuid = crc32( $R2CDAD6EF7D5C41B8DB9EB739620C280A->title ) . '_softgames'; $R69F05BD3024E3A18B29F11DF8A3E8C79->game_tag = md5( $R2CDAD6EF7D5C41B8DB9EB739620C280A->title . 'softgames' ); $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->title)."'"); if ( !$R89FEDA984B61366DE78855CB7D5F44D1 ) { $R7E48A94D08652CE34DE703DF9E891458 = false; $R294E407FFD0BBD22EA24DD907D5DDE58 = 'Other'; if ( preg_match('[Action|Jump]', $R2CDAD6EF7D5C41B8DB9EB739620C280A->type ) ) { $R294E407FFD0BBD22EA24DD907D5DDE58 = 'Action'; } elseif ( preg_match('[Arcade]', $R2CDAD6EF7D5C41B8DB9EB739620C280A->type ) ) { $R294E407FFD0BBD22EA24DD907D5DDE58 = 'Arcade'; } elseif ( preg_match('[Board|Card|Classic]', $R2CDAD6EF7D5C41B8DB9EB739620C280A->type ) ) { $R294E407FFD0BBD22EA24DD907D5DDE58 = 'Board Game'; } elseif ( preg_match('[Girls]', $R2CDAD6EF7D5C41B8DB9EB739620C280A->type ) ) { $R294E407FFD0BBD22EA24DD907D5DDE58 = 'Customize'; } elseif ( preg_match('[Puzzles|Word]', $R2CDAD6EF7D5C41B8DB9EB739620C280A->type ) ) { $R294E407FFD0BBD22EA24DD907D5DDE58 = 'Puzzles'; } elseif ( preg_match('[Sports]', $R2CDAD6EF7D5C41B8DB9EB739620C280A->type ) ) { $R294E407FFD0BBD22EA24DD907D5DDE58 = 'Sports'; } elseif ( preg_match('[Racing]', $R2CDAD6EF7D5C41B8DB9EB739620C280A->type ) ) { $R294E407FFD0BBD22EA24DD907D5DDE58 = 'Driving'; } else { $R294E407FFD0BBD22EA24DD907D5DDE58 = 'Other'; } foreach ( $R281A0F7BC3D849F3386A5AC36FB35807 as $RAE9A4476893066B7B92C648E9F0FDEE8 ) { if ( ($RAE9A4476893066B7B92C648E9F0FDEE8['Name'] == $R294E407FFD0BBD22EA24DD907D5DDE58) && ($RAE9A4476893066B7B92C648E9F0FDEE8['Status'] == 'checked') ) { $R7E48A94D08652CE34DE703DF9E891458 = true; break; } } if ( ! $R7E48A94D08652CE34DE703DF9E891458 ) { continue; } $R69F05BD3024E3A18B29F11DF8A3E8C79->width = 588; $R69F05BD3024E3A18B29F11DF8A3E8C79->height = 800; if ( isset( $R2CDAD6EF7D5C41B8DB9EB739620C280A->iframeMaxResolution ) ) { $RDBAB3ACEDC772A2151A49D9B4E0B1DE6 = explode( 'x', $R2CDAD6EF7D5C41B8DB9EB739620C280A->iframeMaxResolution ); if ( ! empty($RDBAB3ACEDC772A2151A49D9B4E0B1DE6) ) { $R69F05BD3024E3A18B29F11DF8A3E8C79->width = esc_sql( $RDBAB3ACEDC772A2151A49D9B4E0B1DE6[0] ); $R69F05BD3024E3A18B29F11DF8A3E8C79->height = esc_sql( $RDBAB3ACEDC772A2151A49D9B4E0B1DE6[1] ); } } elseif ( isset( $R2CDAD6EF7D5C41B8DB9EB739620C280A->landscape) && $R2CDAD6EF7D5C41B8DB9EB739620C280A->landscape ) { $R69F05BD3024E3A18B29F11DF8A3E8C79->width = 800; $R69F05BD3024E3A18B29F11DF8A3E8C79->height = 588; } $R376EF4C91ABCD6851756303BA4F9935E = explode( '?p', $R2CDAD6EF7D5C41B8DB9EB739620C280A->link ); $RF4105941EE9F5052B678CABE23FE7CCE = $R376EF4C91ABCD6851756303BA4F9935E[0]; $R739F6542BB76E1DDEC494F839F85A06E = $settings['language']; if ( isset( $R2CDAD6EF7D5C41B8DB9EB739620C280A->descriptions[0]->$R739F6542BB76E1DDEC494F839F85A06E ) ) { $RC5934A886BA9823EDE289AB2FD67CED1 = $R2CDAD6EF7D5C41B8DB9EB739620C280A->descriptions[0]->$R739F6542BB76E1DDEC494F839F85A06E; } else { $RC5934A886BA9823EDE289AB2FD67CED1 = ''; } $R69F05BD3024E3A18B29F11DF8A3E8C79->type = 'softgames'; $R69F05BD3024E3A18B29F11DF8A3E8C79->name = esc_sql($R2CDAD6EF7D5C41B8DB9EB739620C280A->title); $R69F05BD3024E3A18B29F11DF8A3E8C79->slug = F64A2F46BC8BAFD9163DD9691D1207278($R2CDAD6EF7D5C41B8DB9EB739620C280A->title); $R69F05BD3024E3A18B29F11DF8A3E8C79->description = esc_sql($RC5934A886BA9823EDE289AB2FD67CED1); $R69F05BD3024E3A18B29F11DF8A3E8C79->categs = $R294E407FFD0BBD22EA24DD907D5DDE58; $R69F05BD3024E3A18B29F11DF8A3E8C79->swf_url = esc_sql( $RF4105941EE9F5052B678CABE23FE7CCE ); $R69F05BD3024E3A18B29F11DF8A3E8C79->screen1_url = ! empty($R2CDAD6EF7D5C41B8DB9EB739620C280A->screenshots->screenshoturl_1) ? $R2CDAD6EF7D5C41B8DB9EB739620C280A->screenshots->screenshoturl_1 : ''; $R69F05BD3024E3A18B29F11DF8A3E8C79->screen2_url = ! empty($R2CDAD6EF7D5C41B8DB9EB739620C280A->screenshots->screenshoturl_2) ? $R2CDAD6EF7D5C41B8DB9EB739620C280A->screenshots->screenshoturl_2 : ''; $R69F05BD3024E3A18B29F11DF8A3E8C79->screen3_url = ! empty($R2CDAD6EF7D5C41B8DB9EB739620C280A->screenshots->screenshoturl_3) ? $R2CDAD6EF7D5C41B8DB9EB739620C280A->screenshots->screenshoturl_3 : ''; $RBD4076544B640033ED860F85C21C7BDE = $settings['thumbnail']; if ( ! empty( $R2CDAD6EF7D5C41B8DB9EB739620C280A->$RBD4076544B640033ED860F85C21C7BDE ) ) { $R69F05BD3024E3A18B29F11DF8A3E8C79->thumbnail_url = esc_sql( $R2CDAD6EF7D5C41B8DB9EB739620C280A->$RBD4076544B640033ED860F85C21C7BDE ); } else { $R69F05BD3024E3A18B29F11DF8A3E8C79->thumbnail_url = esc_sql( $R2CDAD6EF7D5C41B8DB9EB739620C280A->thumbBig ); } $R630F8C3F00ED4BE49091A902C671B200++; FF09D7482BA5FAADAB6D947666FFD8C43( $R69F05BD3024E3A18B29F11DF8A3E8C79, $echo ); } } } FC6BC39ED73177ED6BA0A3E5B1C3D6848( $R630F8C3F00ED4BE49091A902C671B200, $echo ); } function myarcade_embedtype_softgames() { return 'iframe'; } function myarcade_can_download_softgames() { return false; } ?>