<?php require 'db.php'; if (isset($_GET['id'])) { $deck = intval($_GET['id']); $db = database_connection(); $words = get_all_game_words($db, $deck); $number_of_words = get_number_of_words_for_game($db, $deck); $deck_name = get_deck_title($db, $deck); $image_url = '../../../'; $currency = get_points_symbol($db); } ?> <!DOCTYPE html> <html lang="en"> <link> <meta charset="UTF-8"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.flip.js"></script> <script src="js/main.js"></script> <link href="css/jquery.circliful.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/jquery.circliful.min.js"></script> <link href="css/style.css" type="text/css" rel="stylesheet"> <title>Vocabulary Play - Game</title> </head> <body> <script type="text/javascript"> var game_title = "<?php
function edit_points_info_settings_page() { $semantic = WP_PLUGIN_URL . '/panomanager/css/semantic.css'; ?> <link rel="stylesheet" type="text/css" href="<?php echo $semantic; ?> "/> <h2>Edit the name of your points!</h2> <hr> <style type="text/css"> #wpfooter{ display: none; } #file_input { border: 1px solid #cccccc; padding: 5px; } .new_pano_form{ width:85%; margin: 0px auto; } </style> <?php if (isset($_GET['settings-saved'])) { ?> <div class="updated"><p>Points info updated successfully.</p></div> <?php } elseif (isset($_GET['error'])) { ?> <div class="error"><p>Error updating points info.</p></div> <?php } ?> <p> 'Points' is a dull word. You can change it to be whatever you want! What about earning dollars? </p> <p> You can assign a currency symbol, a name to be displayed in the singular and plural forms, for example: </p> <ul> <li> Symbol: $ </li> <li> Name (singular): dollar </li> <li> Name (plural): dollars </li> </ul> <p> You can also add web entity symbols, such as ¥ - to see a list of symbol codes, visit <a href="http://www.fileformat.info/format/w3c/entitytest.htm" target="_blank">this website</a>. </p> <form method="post" enctype="multipart/form-data" action="<?php echo get_admin_url() . 'admin-post.php'; ?> "> <input type="hidden" name="action" value="update_points_info" /> <div class="ui form"> <div class="field"> <div class="ui left labeled icon input"> <label for="symbol">Symbol: </label> <input name="symbol" id="symbol" placeholder="Edit the symbol of your currency (optional)" value="<?php echo get_points_symbol(); ?> " /> </div> </div> <div class="field"> <div class="ui left labeled icon input"> <label for="singular">Name (singular): </label> <input name="singular" id="singular" placeholder="Edit the singular name of your currency" value="<?php echo get_points_name_singular(); ?> " /> </div> </div> <div class="field"> <div class="ui left labeled icon input"> <label for="plural">Name (plural): </label> <input name="plural" id="plural" placeholder="Edit the plural name of your currency" value="<?php echo get_points_name_plural(); ?> " /> </div> </div> </div> <?php submit_button(); ?> </form> <?php }
function view_spotgame_settings_page() { $main_js = WP_PLUGIN_URL . '/vocabulary-plugin/spotGame/js/main.js'; $flip_js = WP_PLUGIN_URL . '/vocabulary-plugin/spotGame/js/jquery.flip.js'; $circliful_js = WP_PLUGIN_URL . '/vocabulary-plugin/spotGame/js/jquery.circliful.min.js'; $circliful_css = WP_PLUGIN_URL . '/vocabulary-plugin/spotGame/css/jquery.circliful.css'; $style_css = WP_PLUGIN_URL . '/vocabulary-plugin/spotGame/css/style.css'; if (isset($_POST['deck_id'])) { $deck = intval($_POST['deck_id']); $right_word_id = intval(get_number_of_words_for_game($deck)); $words = get_all_game_words_spotgame($deck, $right_word_id); //$number_of_words = get_number_of_words_for_game($deck); $deck_name = get_deck_title($deck); $word = get_word($right_word_id); $image_url = '../../../'; $currency = get_points_symbol(); } ?> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script type="text/javascript" src="<?php echo $flip_js; ?> "></script> <script src="<?php echo $main_js; ?> "></script> <link href="<?php echo $circliful_css; ?> " rel="stylesheet" type="text/css" /> <script type="text/javascript" src="<?php echo $circliful_js; ?> "></script> <link href="<?php echo $style_css; ?> " type="text/css" rel="stylesheet"> <script type="text/javascript"> var right_word_db = [ {word:"<?php echo $word->word; ?> ", description:"<?php echo $word->description; ?> ", image:"<?php echo $image_url . $word->image; ?> ", audio:"<?php echo $word->audio; ?> ", points:"<?php echo $word->points; ?> "} ]; </script> <div id="wrapper"> <script type="text/javascript"> var game_title = "Spot Game"; var currency = "<?php echo $currency; ?> "; var question = "<?php echo $deck_name->name; ?> "; var words = [ <?php foreach ($words as $word) { ?> {word:"<?php echo $word->word; ?> ", description:"<?php echo $word->description; ?> ", image:"<?php echo $image_url . $word->image; ?> ", audio:"<?php echo $word->audio; ?> ", points:"<?php echo $word->points; ?> "}, <?php } ?> ]; var number_of_words_to_guess_from_db = 1; var errors = 0; var points = 0; var total_game_points = 0; var current_index = 0; var words_to_guess; var wrong_words; var game = []; build_home(); initiate("game"); </script> </div> <?php }
function build_menu_nav($quest) { // $script = '<div style="display:none" class="slider_menu">'; $points = calculate_total_user_points(); $script = '<nav id="mission-menu"> <ul > <li class="Label"> <span class="mission_title">MISSIONS</span> <span class="user_points"> <span>Mission ' . get_points_name_plural(1) . ': </span> <span class="points_symbol">' . get_points_symbol(1) . '</span> <span id="current_points">' . get_regular_points_for_mission_tab(get_current_user_id()) . '</span> <span>/</span> <span class="points_symbol">' . get_points_symbol(1) . '</span> <span id="total_mission_points">0</span> </span> <span class="user_points"> <span>Bonus ' . get_points_name_plural(1) . ': </span> <span class="points_symbol">' . get_points_symbol(1) . '</span> <span id="bonus_points">' . get_bonus_points_for_mission_tab(get_current_user_id()) . '</span> </span> <input id="done_activities" type="hidden" value="0" /> <input id="admin_dir" type="hidden" value="' . get_admin_url() . '" /> </li>'; // Get the elements needed to build the menu $script .= get_mission_tasks($quest); $script .= '</ul> </nav>'; // $script .= '</div>'; return $script; }
<link href="css/style-3.css" type="text/css" rel="stylesheet"> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> </head> <body> <div id="wrapper"> <h2>Can you earn your <?php echo $profession; ?> 's Hat?</h2> <div class="content"> <aside><p id="life"></p></aside> </div> <div class="content"> <aside><p id="points"><?php echo get_points_symbol($db); ?> <span id="points_so_far"></span></p></aside> <div id="buttons"></div> <div id="inf"> <div id="smileImage"></div> <p id="categoryName"></p> <div id="hold"></div> <p id="gameOver"></p> <p id="clue"></p> </div> </div> </div> <div class="container"> <button id="hint">Hint</button> <button id="reset">Play again</button>
<?php require_once '../../../../../wp-config.php'; require_once '../../../../../wp-includes/wp-db.php'; require_once '../../../../../wp-includes/pluggable.php'; $user_id = wp_get_current_user()->ID; $purchases = get_purchases_by_user_reverse($user_id); $symbol = get_points_symbol(); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="./purchases.css"> </head> <body> <div id="content"> <h2>Purchases</h2> <table> <thead> <tr> <th>Date</th> <th>Item</th> <th>Price</th> </tr> </thead> <tbody> <?php if (!empty($purchases)) { ?>
<?php require_once '../../../../wp-config.php'; require_once '../../../../wp-includes/wp-db.php'; require_once '../../../../wp-includes/pluggable.php'; $semantic = WP_PLUGIN_URL . '/panomanager/css/semantic.css'; $pano_id = $_GET['pano_id']; $prereq = get_pano_prereq($pano_id); $currency = get_points_symbol(); $items = get_prereq_items($prereq->id); $user_id = get_current_user_id(); $items_size = sizeof($items); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="<?php echo $semantic; ?> "/> </head> <body> <h1>Pano Requirements</h1> <p><?php echo "To access this pano you need:"; ?> </p>