function sendMessage($from_user_id, $to_user_id, $message, $con) { $con->query("INSERT INTO `pm`(`message_id`, `from_user_id`, `to_user_id`, " . "`message`, `message_time`) " . "VALUES (null, '{$from_user_id}','{$to_user_id}','{$message}',now())"); $user = getUserDetail($from_user_id, $con); $message = str_replace("<br>", "\n", $message); $message = str_replace("<b>", "", $message); $message = str_replace("</b>", "", $message); pushToUser($to_user_id, "Dog Blood Donor PM", $user["firstname"] . ": " . $message, "pm", $from_user_id, $con); if ($con->error == "") { return 1; } else { return 0; } }
$word = isset($_POST["word"]) ? $_POST["word"] : ""; $wordBase = isset($_POST["wordbase"]) ? $_POST["wordbase"] : ""; $translation = isset($_POST["translation"]) ? $_POST["translation"] : ""; $description = isset($_POST["description"]) ? $_POST["description"] : ""; $list = $_POST["list"]; $forceInsert = isset($_POST["force"]) ? filter_var($_POST["force"], FILTER_VALIDATE_BOOLEAN) : false; $message = insertWord($conn, $userID, $word, $translation, $description, $wordBase, $list, $forceInsert); break; case "get": $message["action"] = "check"; break; case "userinfo": $message["user"] = getUserInfo($conn, $userID); break; case "userdetail": $message["user"] = getUserDetail($conn, $userID); break; case "updateuserdetail": $message["status"] = updateUserDetail($conn, $userID, $_POST["firstname"], $_POST["lastname"], $_POST["nickname"]); break; case "updatepassword": $message["update"] = updatePassword($conn, $userID, $_POST["password"], $_POST["newpassword"], $passwordSalt); break; case "wordlist": $filter = "%"; if (isset($_POST["filter"])) { $filter = $_POST["filter"]; } $message["wordcount"] = getWordsCount($conn, $_POST["lists"], $userID, $filter); $message["words"] = getWordsList($conn, $userID, $_POST["lists"], $_POST["first"], $_POST["last"], $filter); break;
<?php require_once '../config/dbconnection.php'; db_open(); require_once '../phpInclude/functions.php'; if (!isset($_SESSION['admin_session_id']) && $_SESSION['admin_session_id'] == "") { header("Location:index.php"); } else { $user_condition = " id='" . trim($_SESSION['admin_session_id']) . "' "; $user = getUserDetail($user_condition); $data = mysql_fetch_assoc($user); //print_r($data); if (isset($data['profile_image_url']) && $data['profile_image_url'] != "") { $image = "../profile/" . trim($data['profile_image_url']); } else { $image = "../images/profile_user.jpg"; } } $condition = ""; if (isset($_GET['search']) && !empty($_GET['search'])) { $condition .= " and a.heading LIKE '%" . $_GET['search'] . "%' "; } $totalrecords = ""; if (isset($_GET['results']) && !empty($_GET['results'])) { $recordperpage = $_GET['results']; } else { $recordperpage = 5; } $pageno = isset($_GET['pgno']) ? $_GET['pgno'] : '1'; $start = ($pageno - 1) * $recordperpage; $limit = " LIMIT " . $start . ", " . $recordperpage;
require_once 'loader.php'; $Email = urldecode($_POST['Email']); $Password = urldecode($_POST['Password']); $Name = urldecode($_POST['Name']); $Age = urldecode($_POST['Age']); $Contact = urldecode($_POST['Contact']); $City = urldecode($_POST['City']); $State = urldecode($_POST['State']); $sex = urldecode($_POST['sex']); $GcmId = urldecode($_POST['GcmId']); $profile_pic = urldecode($_POST['profile_pic']); $facebook = false; if (isset($_POST['Type'])) { $facebook = true; } $res = isUserExisted($Email); if ($res) { if ($facebook) { updateUser($Email, $Password, $Name, $Age, $Contact, $City, $State, $sex, $GcmId, $profile_pic); getUserDetail($Email); } else { echo "user_exits"; } } else { if ($facebook) { $res = storeFacebookUser($Email, $Password, $Name, $Age, $Contact, $City, $State, $sex, $GcmId, $profile_pic); } else { $res = storeUser($Email, $Password, $Name, $Age, $Contact, $City, $State, $sex, $GcmId, $profile_pic); } getUserDetail($Email); }
echo getDeckInfo($cvset, 'type'); ?> &d=<?php echo getDeckInfo($cvset, 'display_url'); ?> " title="<?php echo $cvsetDisplay; ?> Japanese Vocabulary Page"> <?php echo $cvsetDisplay; ?> </a> </div> <div class="col-xs-2"><? if(getUserDetail($userID,'is_guest')!=1){include("deckDropdown.php");} else{include("deckDropdown-sample.php");}?> </div> </div> <div class="col-sm-12 divider bg-<?php echo $vstyleBG; ?> "></div> <div class="col-xs-12 hidden-xs pad-bot"> <a href="<?php echo $cvsetAffilUrl; ?> " ><img src="http://www.jpvocab.com/img/<?php echo $cvsetPic; ?> " alt="<?php
* Step 3: Define the Slim application routes * * Here we define several Slim application routes that respond * to appropriate HTTP request methods. In this example, the second * argument for `Slim::get`, `Slim::post`, `Slim::put`, `Slim::patch`, and `Slim::delete` * is an anonymous function. */ // GET route $app->get('/', function () { echo "Hello1 world"; }); $app->get('/Users/', function () { getUsers(); }); $app->get('/Users/id/:mid', function ($mid) { getUserDetail($mid); }); $app->get('/Signup/id/:id/pw/:pw/Des/:Des/BDes/:BDes/Loc/:Loc/Icon/:Icon', function () { $uri = $_SERVER['REQUEST_URI']; $arr_items = split('/', $uri); $Icon = $arr_items[count($arr_items) - 1]; $Loc = $arr_items[count($arr_items) - 3]; $BDes = $arr_items[count($arr_items) - 5]; $Des = $arr_items[count($arr_items) - 7]; $pw = $arr_items[count($arr_items) - 9]; $id = $arr_items[count($arr_items) - 11]; //echo $id." ".$pw." ".$Des." ".$BDes." ".$Loc." ".$Icon; Signup($id, $pw, $Des, $BDes, $Loc, $Icon); }); $app->get('/Update/oid/:oid/id/:id/pw/:pw/Des/:Des/BDes/:BDes/Loc/:Loc/Icon/:Icon', function () { $uri = $_SERVER['REQUEST_URI'];
<link rel="stylesheet" type="text/css" href="css/readable.bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="css/newStyle.css"> <link rel="stylesheet" type="text/css" href="css/font-awesome.css"> </head> <body> <div class="row"> <div class="col-md-2"></div> <div class="col-md-8 table-responsive"> <h1>PVP</h1> <?php $i =2; foreach($pvpDis as $rank){?> <div class="row"> <div class="col-xs-12"> <?= getPvpRank(getPvpUI($pvpDis[$i])); ?> <span id="user<?= $i;?>"><?= getUserDetail(getPvpUI($pvpDis[$i]),'username'); ?>, </span> Lvl <?= getStat('lv',getPvpUI($pvpDis[$i])); ?> <a href="#3" id="battle<?= $i;?>" name="">Battle</a> </div> </div><? $i--; } ?> </div> <div class="col-md-2"></div> </div> <script> var battle2 = document.getElementById("battle2"); var battle1 = document.getElementById("battle1"); var battle0 = document.getElementById("battle0");
</tr> </thead> <!-- <tfoot> <tr> <th>Name</th> <th>Email</th> <th>Phone</th> <th>Enabled</th> </tr> </tfoot> --> <tbody> <?php $condition = " is_admin='no' ORDER BY created DESC "; $post = getUserDetail($condition); //$getAllEvent = mysql_query($post); if ($post) { if (mysql_num_rows($post) > 0) { $countNum = 1; while ($event = mysql_fetch_assoc($post)) { //print_r($event);die; ?> <tr> <td><?php echo date('m-d-Y', strtotime($event['created'])); ?> </td> <td><?php echo $event['fname'];
$user_id = trim($_POST['userId']); $sql = "Delete from users where id='" . $user_id . "' "; $query = mysql_query($sql) or die(mysql_error()); if ($query) { echo "success"; } else { echo "error"; } } /*admin login */ if (isset($_POST['action']) && $_POST['action'] == 'admin_login') { $email = trim($_POST["email"]); $password = trim($_POST["password"]); /*****function for admin login ******/ $condition = " email='" . $email . "' and password = '******' "; $mysql = getUserDetail($condition); $count = mysql_num_rows($mysql); $data = mysql_fetch_assoc($mysql); if ($count > 0) { $_SESSION['msg'] = "success"; $_SESSION['id'] = $data['id']; $_SESSION['db_session_id'] = $data['id']; $_SESSION['username'] = $data['username']; $_SESSION['user_email'] = $data['email']; $_SESSION['test'] = 'test'; //print_r($_SESSION);die; echo "success"; } else { $_SESSION['msg'] = "failed"; echo "error"; }
function getUserById($id) { global $db; $user = $db->get("me_users", ["username", "email"], ["id" => $id]); if ($user) { $user["detail"] = getUserDetail($id); return $user; } return false; }
echo $username; ?> </h4></td> </tr> </thead> <tr> <td>Join date</td> <td><?php echo date("F jS \\, Y", strtotime(getUserDetail(getUserID($_GET['player']), 'signup'))); ?> </td> </tr> <tr> <td>Approximate JLPT</td> <td>N<?php echo getUserDetail(getUserID($_GET['player']), 'jlpt'); ?> </td> </tr> <tr> <td style="vertical-align: middle;">Last practiced Flashcard Deck:</td> <td style="vertical-align: middle;"><a href="<?php echo getDeckFullUrl(getSkill('cvset', $pid)); ?> "><?php echo $cvDN; ?> </a></td> </tr> <tr> <td style="vertical-align: middle;">Gold Coins</td>