$PAGE->set_context($context); $PAGE->set_url($baseurl); //muestra el hdeader de moodle echo $OUTPUT->header(); echo "<p>"; //display info antropologia echo "<b>" . get_string('ANTRO', 'local_fitness') . "</b>"; //titulo antropologia display_info(get_string('talla', 'local_fitness'), get_string('des_talla', 'local_fitness')); display_info(get_string('peso', 'local_fitness'), get_string('des_peso', 'local_fitness')); display_info(get_string('IMC', 'local_fitness'), get_string('des_IMC', 'local_fitness')); display_info(get_string('Suma mm', 'local_fitness'), get_string('des_suma mm', 'local_fitness')); display_info(get_string('grasa', 'local_fitness'), get_string('des_grasa', 'local_fitness')); echo "<br>"; //display info flexibilidad echo "<b>" . get_string('flex', 'local_fitness') . "</b>"; //titulo flexibilidad display_info(get_string('sit_reach_R', 'local_fitness'), get_string('des_sit_reach_R', 'local_fitness')); display_info(get_string('sit_reach_L', 'local_fitness'), get_string('des_sit_reach_L', 'local_fitness')); display_info(get_string('trunk_lift', 'local_fitness'), get_string('des_trunk_lift', 'local_fitness')); echo "<br>"; //display info fuerza echo "<b>" . get_string('fuerza', 'local_fitness') . "</b>"; //titulo fuerza display_info(get_string('abdominales', 'local_fitness'), get_string('des_abdominales', 'local_fitness')); display_info(get_string('push up', 'local_fitness'), get_string('des_push up', 'local_fitness')); echo "<br>"; display_info(get_string('pacer', 'local_fitness'), get_string('des_pacer', 'local_fitness')); display_info(get_string('vo2', 'local_fitness'), get_string('des_vo2', 'local_fitness')); echo "</p>"; echo $OUTPUT->footer();
} /***************************** POST STATEMENTS *****************************/ $diff_post = Diffs::getSpecialDiff("POST"); if (!empty($diff_post)) { echo display_info('4', "\n-- ********************************** POST Statements ***********************************\n\n", $debug); echo implode("\n", $diff_post); echo display_info('4', "\n\n", $debug); } Diffs::removeSpecialDiff("PRE"); unset($diff_post); if ($info_db_tmp->dropDb() == false) { echo "\n\n-- ERROR: Failure to drop temporary database name\n\n"; exit; } } echo display_info('4', "\n-- " . date("H:i:s") . " MysqlDiff Version 1.0 Completed\n", $debug); /******************************************************** ********************* Class Used ************************ *********************************************************/ /** * Class: Conf * Description: Class which contains the connection parameters of a database */ class Conf { private $_userdb; private $_passdb; private $_hostdb; static $_instance; private function __construct() {
$t->display('admin/email_test.html'); exit; } $t->assign('error', $error); $t->assign('a', ''); $t->assign('text_message', 'Verification email message has been just emailed to you. Did you receive this message?'); $t->display('admin/email_test.html'); } function display_info($vars = '') { global $db, $t; settype($vars, 'array'); $t->assign('a', 'info'); $t->assign('text_message', 'Instruction of email settings.'); $t->display('admin/email_test.html'); } //////////////////////////////////////////////////////////////////////////// // // M A I N // //////////////////////////////////////////////////////////////////////////// $vars = get_input_vars(); $error = array(); //admin_check_permissions('browse_users'); switch (@$vars['a']) { case 'info': display_info($vars); break; default: email_test($vars); }
function get_results($category, $subcategory, $sort = '', $search = '', $user_name = '', $order = 'DESC', $comment_search = false) { global $PAGE_SIZE; global $LSP_URL; $user_id = ''; $order = in_array(trim(strtoupper($order)), array('DESC', 'ASC')) ? trim(strtoupper($order)) : 'DESC'; if (strlen($user_name)) { $user_id = get_user_id($user_name); } $additional_items = ''; // Get an additional CSV list of files with comments match if (strlen($search) && $comment_search) { $additional_items = search_comments($search); $additional_items = strlen($additional_items) ? "OR files.id IN ({$additional_items})" : ''; } $user_id = $user_id == -1 ? '' : $user_id; $count = get_results_count($category, $subcategory, $search, $user_id, $additional_items); if ($count > 0) { echo '<div class="col-md-9">'; create_title(array(GET('category'), GET('subcategory'), "\"{$search}\"", "({$user_name})")); list_sort_options(); $order_by = 'files.insert_date'; switch ($sort) { case 'downloads': $order_by = 'downloads_per_day'; break; case 'rating': $order_by = "rating {$order}, COUNT(ratings.file_id)"; break; case 'comments': break; //FIXME: TODO: Add support for sorting by comments } $start = intval(GET('page', 0) * $PAGE_SIZE); $dbh =& get_db(); $stmt = $dbh->prepare('SELECT files.id, licenses.name AS license, size,realname, filename, ' . 'users.login, categories.name AS category, subcategories.name AS subcategory, ' . 'files.downloads*files.downloads/(UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(files.insert_date)) AS downloads_per_day, ' . 'files.downloads AS downloads, insert_date, update_date, description, AVG(ratings.stars) as rating FROM files ' . 'INNER JOIN categories ON categories.id=files.category ' . 'INNER JOIN subcategories ON subcategories.id=files.subcategory ' . 'INNER JOIN users ON users.id=files.user_id ' . 'INNER JOIN licenses ON licenses.id=files.license_id ' . 'LEFT JOIN ratings ON ratings.file_id=files.id ' . 'WHERE ' . (strlen($user_id) ? 'files.user_id=:user_id' : 'true') . ' AND ' . (strlen($category) ? 'categories.name=:category' : 'true') . ' AND ' . (strlen($subcategory) ? 'subcategories.name=:subcategory' : 'true') . ' AND ' . (strlen($search) ? "(files.filename LIKE :search OR users.login LIKE :search OR users.realname LIKE :search {$additional_items})" : 'true') . ' ' . 'GROUP BY files.id ' . 'ORDER BY ' . $order_by . " {$order} " . "LIMIT {$start}, {$PAGE_SIZE}"); if (strlen($user_name)) { $stmt->bindParam(':user_id', $user_id); } if (strlen($category)) { $stmt->bindParam(':category', $category); } if (strlen($subcategory)) { $stmt->bindParam(':subcategory', $subcategory); } if (strlen($search)) { $search = "%{$search}%"; $stmt->bindParam(':search', $search); } if ($stmt->execute()) { echo '<table class="table table-striped">'; while ($object = $stmt->fetch(PDO::FETCH_ASSOC)) { show_basic_file_info($object, true); } } echo '</table></div>'; echo '<div class="text-center">' . get_pagination($count) . '</div>'; } else { display_info('No results found', array(GET('category'), GET('subcategory'), "\"{$search}\"", "({$user_name})")); } $stmt = null; $dbh = null; }
<html> <head> <title>Game Central - Mon compte</title> <!-- En-tête des Pages Web (metas, links) --> <?php include "commons/links.php"; ?> </head> <body> <header> <!-- Barre de Navigation (connecté/non connecté) --> <?php is_connect(); ?> </header> <section> <div class="container"> <!-- Affichage des informations utilisateur --> <?php display_info(); ?> </div> </section> <footer> <!-- Scripts JS --> <?php include "commons/footer.php"; ?> </footer> </body> </html>
break; case "f": // flush DB $redis->flushdb(); break; case "p": // make persistent if (isset($_REQUEST['sel']) && count($_REQUEST['sel']) > 0) { foreach ($_REQUEST['sel'] as $s) { $redis->persist(base64_decode($s)); } } break; case "i": // display server info display_info($redis); die; // done here } /*************************************************************************** * * * done with actions - display the rest of the header section * */ display_databases($redis, $_SESSION['db_num']); echo '<center><form name="search" method="get" action="' . $script_name . '">'; echo 'Pattern <input type="text" size=30 name="p" value="' . $pattern . '" />'; echo '<input type="submit" value="Search" /> '; echo 'sort by: '; echo '<input type="radio" name="s" value="key"' . ($sort == 'key' ? "checked" : "") . ' />Key ';