function sendmsg($conc, $mid, $uid, $to, $msg) { $mq = mysqli_query($conc, "INSERT INTO `msg` VALUES(NULL ,{$mid},1,'{$uid}','{$msg}','" . date("U") . "')"); if ($mq) { s_mail($_SESSION["user"], " sent you a <a href='http://muzikkitchen.com/#!/msg/'>Message</a><br/><div style='font-size:14px'><b><br/><br/>{$msg}</b></div>", $to, $conc, "sent you a message"); if ($_SESSION["mobile"] == 2) { echo $mid; } else { echo 1; } //"<center><b>Message wast sent</b></center>"; } else { echo 2; //"Error sending message"; } }
if ($q) { $qq = mysqli_query($conc, "SELECT * FROM `users` WHERE user = '******'"); $r = mysqli_fetch_array($qq); $q2 = $con->insertInto("online", array($r[0], date("U"))); $_SESSION["user"] = $user; $_SESSION["uid"] = $r[0]; $_SESSION["name"] = $name; $_SESSION["user"] = $r[2]; $_SESSION["email"] = $r[1]; $_SESSION["p"] = $r[4]; $_SESSION["img1"] = $_70x70; $_SESSION["img2"] = $_150x150; $_SESSION["img3"] = $_500x500; $_SESSION["ula"] = md5("{$user} {$r['4']} {$r['0']}"); $_SESSION["new_user"] = "******"; s_mail($user, " Welcome to <a href='http://muzikkitchen.com/'>Muzik Kitchen</a><br/><div style='font-size:14px'><b><br/>Your temporal user name is {$r['2']}, you can always change it, as well as other info, in <a href='http://muzikkitchen.com/#!/settings'>your account settings</a>.<br/><br/>Enjoy</b></div>", $r[0], $conc, "Welcome"); $con->insertInto("follow", array($r[0], 101212574, date("U"))); $con->close_db_con($conc); header("location: ./m/getting_started/"); } else { $res = "Registration Failed. Please try again in a minute"; } $con->close_db_con($conc); } else { $captch = "<b style='color:red'>Invalid Captcha Value, Please try again</b>"; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
echo "<div {$style} >Passwords do not match</div>"; exit; } //echo "$opass | $npass | $uid"; $q = mysqli_query($conc, "SELECT `id` FROM users WHERE pass = '******' AND id = {$uid}"); if (mysqli_num_rows($q) != 1) { $con->close_db_con($conc); echo "<div {$style} >Thats the wrong old password</div>"; exit; } $r = mysqli_fetch_array($q); $q = NULL; $q = mysqli_query($conc, "UPDATE users SET pass = '******' WHERE pass = '******' AND id = {$r['0']}"); if ($q) { $_SESSION["p"] = $npass; s_mail($_SESSION["user"], "You changed your password recently to " . $_POST["npass"], $_SESSION["uid"], $conc, "Password change notification"); echo "<div {$style} >Your password has been successfully changed.</div>"; /*Please relogin <script language='javascript'>window.open('../?logout','_parent');</script>"; */ } else { echo "<div {$style} >Ooppss, something went wrong. Please try again.</div>"; } $con->close_db_con($conc); exit; } ?> <div id="tabs" style="width:630px;font-size:12px;"> <b style="color:red;"><?php echo isset($_SESSION["set_user"]) ? $_SESSION["set_user"] : ""; ?>
<?php session_start(); include "../scripts/db.php"; $email = $_POST["email"]; if (isset($email)) { $con = new db(); $q = $con->query("users", "id,user", "email = '{$email}'"); if ($q[0] == 1) { $r = mysqli_fetch_array($q[1]); $p = sha1(date("U") . rand(505, 909)); $pass = substr($p, 0, 8); $sha_pass = sha1($pass); $emailbody = "Your new password is <b>{$pass}</b>.<br/><br/><i style='font-size:12px;color:#999;'>The password contains just numbers and lowercase alphabets.<br/><br/>Discard previous password reset requests if any, only the latest password reset email will be valid.<br/><br/><br/>Thank you.</i>"; s_mail($r[1], $emailbody, $r[0], $q[2], "Password Reset '{$pass}'"); $up = $con->update("users", "pass = '******'", "id = {$r['0']}"); if ($up) { echo "Your new password has been sent to <a href='mailto:{$email}'>{$email}</a>.<br/><br/>If you have trouble receiving our mail, please <a href='#'onclick='reset_password(event)' >try again</a>.<br/><br/>Continue to <a href='" . PTH . "'>login</a>"; } else { echo "Error resetting password, please <a href='#'onclick='reset_password(event)' >try again</a>."; } } else { echo "The email address entered is not paired with any account.<br/><Br/>Do you want to <a href='" . PTH . "/?reg_email={$email}'>register?</a> using {$email}"; } $con->close_db_con($q[2]); }
function send_mention_mail($user, $str, $type) { $con = new db(); $conc = $con->c(); $user = str_replace("@", "", $user); if ($user != $_SESSION["user"]) { switch ($type) { case 1: s_mail($_SESSION["user"], "mentioned you in his/her feed<br/><div style='font-size:12px;'>{$str}</div>", $user, $conc, "mentioned you"); break; case 2: s_mail($_SESSION["user"], "included you in his/her<br/>relationship status", $user, $conc, " updated his/her status"); break; default: //goHard or goHome break; } } mysqli_kill($conc, mysqli_thread_id($con->c())); mysqli_close($con->c()); }
<?php session_start(); $uid = intval($_SESSION["uid"]); if (!isset($_SESSION["user"], $_SESSION["uid"]) || $uid == 0) { exit; } include "../scripts/db.php"; $id = intval($_POST["id"]); $userid = intval($_POST["userid"]); if (isset($id)) { $con = new db(); $conc = $con->c(); $q = mysqli_query($conc, "SELECT `id` FROM `like` WHERE `uid`={$uid} AND `id`={$id}"); if (mysqli_num_rows($q) == 0) { $qp = mysqli_query($conc, "INSERT INTO `like` VALUES({$id},{$uid})"); if ($userid != $uid) { $qq = $con->insertInto("hist", array(7, $userid, $uid, $id, date("U"))); s_mail($_SESSION["user"], " likes your <a href='http://muzikkitchen.com/?view={$id}&t=0'>feed</a>", $userid, $conc, "likes your feed"); } echo 1; } else { $qp = mysqli_query($conc, "DELETE FROM `like` WHERE `uid` = {$uid} AND `id` ={$id}"); $qq = mysqli_query($conc, "DELETE FROM hist WHERE var1={$userid} AND var2 = {$uid} AND var3 = '{$id}' "); echo 2; } $con->close_db_con($conc); }
<?php include "../scripts/db.php"; $con = new db(); $conc = $con->c(); $id = isset($_GET["id"]) ? $_GET["id"] : 101212136; $date = date("U") - 60 * 60 * 24 * 7; $q = $con->query("online", "uid,date", "date < {$date}"); s_mail("", "We miss you here at <a href='http://muzikkitchen.com/'>Muzik Kitchen</a><br/><div style='font-size:14px'><b><br/><br/>We miss you! We haven't seen you in a while and wanted to remind you that Muzik Kitchen is still here for you!</b><br/><br/>We look forward to having you back with us! Do let us know if you need any other information by emailing to <a href='mailto:info@muzikkitchen.com'>info@muzikkitchen.com</a></div>", $id, $q[2], "We Miss You!!"); echo "{$id} We miss you here at <a href='http://muzikkitchen.com/'>Muzik Kitchen</a><br/><div style='font-size:14px'><b><br/><br/>We miss you! We haven't seen you in a while and wanted to remind you that Muzik Kitchen is still here for you!</b><br/><br/>We look forward to having you back with us! Do let us know if you need any other information by emailing to <a href='mailto:info@muzikkitchen.com'>info@muzikkitchen.com</a></div><br/>"; /*while($r = mysqli_fetch_array($q[1])) { s_mail("","We miss you here at <a href='http://muzikkitchen.com/'>Muzik Kitchen</a><br/><div style='font-size:14px'><b><br/><br/>We miss you! We haven't seen you in a while and wanted to remind you that Muzik Kitchen is still here for you!</b><br/><br/>We look forward to having you back with us! Do let us know if you need any other information by emailing to <a href='mailto:info@muzikkitchen.com'>info@muzikkitchen.com</a></div>",$r[0],$q[2],"We Miss You!!"); echo "$r[0] We miss you here at <a href='http://muzikkitchen.com/'>Muzik Kitchen</a><br/><div style='font-size:14px'><b><br/><br/>We miss you! We haven't seen you in a while and wanted to remind you that Muzik Kitchen is still here for you!</b><br/><br/>We look forward to having you back with us! Do let us know if you need any other information by emailing to <a href='mailto:info@muzikkitchen.com'>info@muzikkitchen.com</a></div><br/>"; }*/ $con->close_db_con($q[2]);
case 1: $q = mysqli_query($conc, "SELECT user FROM post WHERE id = {$id}"); $r = mysqli_fetch_array($q); if ($r[0] != $uid) { $q = $con->insertInto("hist", array(8, $r[0], $uid, $id, date("U"))); s_mail($_SESSION["user"], " replied your <a href='http://muzikkitchen.com/?view={$id}&t={$type}'>feed</a><br/><div style='font-size:14px'><b><br/><br/>{$real_post}</b></div>", $r[0], $conc, "replied your feed"); $r = NULL; } $q = NULL; break; case 2: $q = mysqli_query($conc, "SELECT user FROM post WHERE id = {$id}"); $r = mysqli_fetch_array($q); if ($r[0] != $uid) { $q = $con->insertInto("hist", array(9, $r[0], $uid, $id, date("U"))); s_mail($_SESSION["user"], " refed your <a href='http://muzikkitchen.com/?view={$id}&t={$type}'>feed</a><br/><div style='font-size:14px'><b><br/><br/>{$real_post}</b></div>", $r[0], $conc, "refed your feed"); $r = NULL; } $q = NULL; break; default: //go HArd or go HOme break; } echo 1; } else { echo 2; } _Trend($real_post, $conc); } else { echo 2;
$conc = $con->c(); $q = mysqli_query($conc, "select id from follow where u1 = {$uid} and u2 = {$u2}"); if (mysqli_num_rows($q) != 1) { $q = NULL; $q = $con->insertInto("follow", array($uid, $u2, date("U"))); if ($q) { if (me_n_you($conc, $uid, $u2)) { $q = $con->insertInto("hist", array(2, $u2, $uid, "", date("U"))); $q = NULL; $q = $con->insertInto("chat", array($uid, $u2, date("U"))); //mail s_mail($_SESSION["user"], " is dinning back with you", $u2, $conc, " is dinning back with you"); //mail } else { $q = $con->insertInto("hist", array(1, $u2, $uid, "", date("U"))); s_mail($_SESSION["user"], " is dinning with you", $u2, $conc, " is dinning with you"); } echo 1; } } else { $q = NULL; $q = mysqli_query($conc, "DELETE FROM follow where u1={$uid} AND u2={$u2}"); if ($q) { $q = NULL; $q = mysqli_query($conc, "SELECT id FROM chat WHERE (u1 = {$uid} AND u2 = {$u2}) OR (u1 = {$u2} AND u2 = {$uid})"); $r = mysqli_fetch_array($q); $q = NULL; $q = mysqli_query($conc, "DELETE FROM chat where (u1={$uid} AND u2={$u2}) OR (u1={$u2} AND u2={$uid})"); $q = $con->insertInto("hist", array(3, $u2, $uid, "", date("U"))); echo 2; if (is_file("../chatt/room/{$r['0']}" . ".dat")) {