function get_task($user_id, $task_id) { $task = DB::getInstance()->queryRow("SELECT * FROM tasks WHERE task_uid = :user_id AND task_id = :task_id", array("user_id" => $user_id, "task_id" => $task_id)); if ($task['task_encrypted']) { $task['task_text'] = decryptText($task['task_text']); } return $task; }
ban (ban) beatmap (beatmap not ranked) disabled (specific mods/mode) oldver (old osu! version) */ include '/home/osuserve/public_html/web/inc/functions_db.php'; include '/home/osuserve/public_html/web/inc/aes.php'; if ($disabled) { exit(displayError('disabled')); } $replayID = 0; $replayLocation = '/home/osuserve/public_html/web/replay/'; $IV = $_POST['iv']; $key = 'h89f2-890h2h89b34g-h80g134n90133'; $scoreEncrypted = $_POST["score"]; $scoreDecrypted = decryptText($scoreEncrypted); $score = explode(':', $scoreDecrypted); //BOOM //get playerID $playerID = getPlayerIDFromOsu($score[1]); if ($playerID == '') { displayError('nouser'); } if (!checkOsuLogin($score[1], $_POST["pass"])) { displayError('pass'); } if (isUserBanned($playerID)) { displayError('ban'); } //set failed or not //pass: 2
} $tablename = 'auto_' . $resultModule['module_name']; $images = array(); $videos = array(); $urls = array(); if ($id) { $queryEdit = "SELECT a.* FROM {$tablename} as a LEFT JOIN google_auth as u ON a.uid = u.uid WHERE 1 AND a.id = ?"; $rowResultEdit = $modelGeneral->fetchRow($queryEdit, array($id), 0); if ($_SESSION['user']['id'] != $rowResultEdit['uid']) { header("Location: " . $redirectURL); exit; } //decryption foreach ($resultModuleFields as $k => $v) { if (!empty($rowResultEdit[$v['field_name']]) && $v['encrypted'] == 1) { $rowResultEdit[$v['field_name']] = decryptText($rowResultEdit[$v['field_name']]); } if ($v['field_type'] == 'images') { if (!empty($rowResultEdit[$v['field_name']])) { $images = json_decode($rowResultEdit[$v['field_name']], 1); if (!empty($images)) { $image = $images[0]; } } } if ($v['field_type'] == 'videos') { if (!empty($rowResultEdit[$v['field_name']])) { $videos = json_decode($rowResultEdit[$v['field_name']], 1); } } if ($v['field_type'] == 'urls') {
<div class="row"> <div class="col-md-8"> <?php $names_array = array(); if (isset($_GET['id'])) { $query = "SELECT * FROM `chats` WHERE `user_id`='{$user_id}'"; $query_run = mysqli_query($connection, $query); while ($query_row = mysqli_fetch_assoc($query_run)) { $timestamp = strtotime($query_row['time']); $timestamp = date('(d-M-y) h:i A', $timestamp + 19800); if ($query_row['flag'] % 2 != 0) { echo '<div class="aloo person0">'; } else { echo '<div class="aloo person1 left-margin-20">'; } echo '<div class="text">' . decryptText($query_row['message']) . '</div>'; echo '<div class="time">' . $timestamp . '</div>'; echo "</div>\n"; } } ?> </div> </div> <hr> <div class="row"> <form method="POST"> <div class="form-group"> <label for="exampleInputEmail1">Text</label> <input type="text" class="form-control" name="message" placeholder="Email"> </div>
<?php /** * @Author: ManrajGrover * @Date: 2016-03-05 12:55:33 * @Last Modified by: ManrajGrover * @Last Modified time: 2016-03-05 13:04:29 */ require_once 'inc/connection.inc.php'; require_once 'inc/function.inc.php'; $getDataQuery = "SELECT event_name, rules FROM events WHERE event_id='8'"; $getDataSuccess = mysqli_query($connection, $getDataQuery); $getData = $getDataSuccess->fetch_assoc(); var_dump(nl2br(decryptText($getData["rules"])));
//echo "<hr>"; //$bf = new Crypt_Blowfish('JKjVXtFdY3NNT6Fp6U9uM3m5eeWbtqXWrR5qwWpyM9b8SFSdWVK2vruN'); //$encrypted = $bf->encrypt('prbc_id=107682291&billeo_id=505&history_flag=HP'); //echo "encrypted: ".bin2hex($encrypted); //echo "<br>"; //$plaintext = $bf->decrypt(convert('33cc757285de361a1c726a6c465fa02077482c1844311bd154c398e9da14d109c9b83af639b16e635b1caf1d00bf64b8')); //echo ", plain text: ".trim($plaintext); //echo "<hr>"; //$bf = new Crypt_Blowfish('JKjVXtFdY3NNT6Fp6U9uM3m5eeWbtqXWrR5qwWpyM9b8SFSdWVK2vruN'); if ($_POST['type'] == "encrypt") { echo "encrypted: " . encryptText($_POST['desc']); //$encrypted = $bf->encrypt($_POST['desc']); //echo "encrypted: ".bin2hex($encrypted); } else { if ($_POST['type'] == "decrypt") { echo 'decrypted: ' . decryptText($_POST['desc']); //$plaintext = $bf->decrypt(convert(trim($_POST['desc']))); //echo trim($plaintext); } } } ?> <form id="form1" name="form1" method="post" action=""> <p>Key: <input name="key" type="text" id="key" size="100" value="<?php echo $_POST['key']; ?> " /> </p> <p>Text:</p> <p>
<?php require_once '../inc/connection.inc.php'; require_once '../inc/function.inc.php'; $final_response = array(); if (isset($_GET['id'])) { $beacon_id = (int) $_GET['id']; $monument_id = getMonumentID($connection, $beacon_id); $query = "SELECT M.monument_name, M.monument_description, M.monument_image, C.city_name, M.city_id FROM `monuments` M INNER JOIN `cities` C ON M.city_id = C.id WHERE M.monument_id='{$monument_id}' LIMIT 1"; $query_row = mysqli_fetch_assoc(mysqli_query($connection, $query)); $query_row['monument_description'] = decryptText($query_row['monument_description']); $final_response = $query_row; } echo json_encode($final_response);
<?php /** * @Author: Prabhakar Gupta * @Date: 2016-02-21 15:22:42 * @Last Modified by: Prabhakar Gupta * @Last Modified time: 2016-02-21 15:36:51 */ require_once '../inc/connection.inc.php'; require_once '../inc/function.inc.php'; $final_response = null; /*$category_id = (int)$_GET['category'];*/ //WHERE `event_category`='$category_id' ORDER BY `event_name` $event_id = $_GET['event_id']; $query = "SELECT * FROM `events` WHERE `event_id`={$event_id}"; $query_run = mysqli_query($connection, $query); while ($query_row = mysqli_fetch_assoc($query_run)) { $image_url = $query_row['image'] == '' ? null : decryptText($query_row['image']); $final_response = array('id' => (int) $query_row['event_id'], 'name' => decryptText($query_row['event_name']), 'image_url' => $image_url, 'description' => decryptText($query_row['descp']), 'date' => timestamp_to_date($query_row['date']), 'rules' => decryptText($query_row['rules']), 'prizes' => decryptText($query_row['prizes']), 'over' => (bool) $query_row['registration_over']); //array_push($final_response, $temp_array); } echo json_encode($final_response);
$getUserDataQuery = "SELECT name, email FROM users WHERE user_id='{$user_id}'"; $success = (bool) mysqli_query($connection, $query); $getDataSuccess = mysqli_query($connection, $getDataQuery); $getUserDataSuccess = mysqli_query($connection, $getUserDataQuery); $getData = $getDataSuccess->fetch_assoc(); $getUserData = $getUserDataSuccess->fetch_assoc(); $name = $getUserData["name"]; $name = ucwords($name); $email = $getUserData["email"]; $event_name = $getData["event_name"]; $rules = $getData["rules"]; $to = "{$email}"; $subject = "Event Registration | Moksha 2016"; if (empty($rules)) { $message = "<p>Dear {$name},<br><br>You have successfully registered for the event <b>{$event_name}</b>. Please visit the event page on Facebook for more information.<br><br>"; } else { $message = "<p>Dear {$name},<br><br>You have successfully registered for the event <b>{$event_name}</b>. Please read the rules carefully and also visit the event page on Facebook for more information.<br><br>"; $message = $message . "Rules:<br><br>"; $rules = nl2br(decryptText($rules)); $message = $message . $rules; } $from = "*****@*****.**"; $headers = "From: {$from}" . "\nMIME-Version: 1.0\nContent-Type: text/html; charset=utf-8\n"; mail($to, $subject, $message, $headers); } } if ((bool) $success == false) { $already = 2; } $final_response = array('errcode' => $already); echo json_encode($final_response);
if ($changed_char < 65 && $char >= 65 || $changed_char < 97 && $char >= 97) { // При выходе за дипазон a-zA-Z находим нужное // значение ASCII кода $changed_char = $char - $rot + 26; } // Получаем символ по ASCII коду // Записываем измененные символы в файл fwrite($changed_text, chr($changed_char)); } } $changed_text = fopen('changedText.txt', 'w+'); // Файл в котором хранится измененный текст $data = json_decode(file_get_contents('php://input')); // Декодируем JSON данные // Проверяем какая кнопка была нажата на клиенте if ($data->encrypt == "true") { encrypText($data->source_text, $data->rot, $changed_text); } elseif ($data->encrypt == "false") { decryptText($data->source_text, $data->rot, $changed_text); } // Вызов функции дешифровки $response = file_get_contents('changedText.txt'); // Считываем измененный текст в переменную fclose($changed_text); // Закрываем файл с измененным текстом $json_arr = array("changed_text" => $response); // Записываем текст в массив с ключем changed_text $jsn = json_encode($json_arr); // Возвращает JSON закодированную строку echo $jsn; // Вывод измененного текста