setStat('conf', $userID, '0'); setStat('maxconf', $userID, '150'); setStat('mag', $userID, '5'); setStat('lv', $userID, '1'); //Set Money setStat('gold', $userID, '0'); setStat('dmd', $userID, '0'); //Set Initial Deck setOwnershipDeck('hirkat', $userID); setOwnershipvStyle('hirkat', 'audioR', $userID); setOwnershipDeck('minna', $userID); //sets ownership of deck(adds this deck to users' user_decks); initializesdeck_lv, deck_progress, deck_prog_max setStat('ttldks', $userID, '2'); setSkill('cvset', $userID, 'hirkat'); setSkill('vstyle', $userID, 'kanjiRE'); setAchiev('submit_jlpt', $userID, '1'); //Could create a folder for this user at this point. Folder would hold their files //Email the suer their activation link $to = "{$e}"; $from = "*****@*****.**"; //create this $subject = 'Free JP decks for ' . $u . ' coming right up! One step left.'; $message = '<!DOCTYPE html><html><head><meta charset="UTF-8"><title>jpvocab.com Email Confirmation</title></head><body style="margin:0px; font-family:Tahoma, Geneva, sans-serif;"><div style="padding:10px; background: #2c3e50; font-size:24px; color:#CCC;"><a href="http://www.jpvocab.com" style="color:white;"><!--<img src="http://www.jpvocab.com/img/logo.png" width="36" height="30" alt="jpvocab.com" style="border:none; float:left;"></a>-->jpvocab.com Account Activation</div><div style="padding:24px; font-size:17px;">Welcome ' . $u . '!<p>I am so grateful that you decided to check out jpvocab! My name is Ben and I am a Japanese learner just like you. I went on a year exchange to Japan in 2012-2013 and it changed my life. Now I am working towards helping others learn Japanese even faster than I did.</p><p>So, free vocab decks? All you need to do is click the link to confirm your email and they\'ll be transmorgified straight to your account (Calvin & Hobbes reference anyone?).</p><p>Sincerely,</p><p>Ben<br />jpvocab.com</p><p>Click the link to activate your account.</p><p><a href="http://www.jpvocab.com/activation.php?id=' . $userID . '&u=' . $u . '&e=' . $e . '&p=' . $pHashed . '">Click to activate</a><br /><br />Your login info:<br /><b>Username:</b> ' . $u . '<br /><b>Email:</b> ' . $e . '</div><br /><a href="https://twitter.com/jpvocab_ben" target="_blank"><img src="http://static.viewbook.com/images/social_icons/twitter_32.png"/></a></p></body></html>'; $headers = "From: {$from}\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n"; if (mail($to, $subject, $message, $headers)) { echo "signup_success"; mail('*****@*****.**', 'New User', 'A new user signed up: ' . $u, $headers); } else {
<?php session_start(); include '../stats.php'; $t = $_POST['t']; $u = $_POST['u']; if ($_POST['query'] == 'check') { $status = getAchiev($t, $u) == '1' ? 'claimed' : 'not claimed'; error_log("getAchiev..{$t},{$u}.ss {$status}"); echo $status; } else { if ($_POST['query'] == 'claim') { if ($t == 'dmd_reg_bonus') { setStat('dmd', $u, getStat('dmd', $u) + getAchievInfo($t, 'reward')); setAchiev($t, $u, '1'); echo "Success"; } else { if ($t == 'submit_jlpt') { $j = $_POST['j']; setUserDetail('jlpt', $j, $u); setStat(getAchievInfo($t, 'reward_type'), $u, getStat(getAchievInfo($t, 'reward_type'), $u) + getAchievInfo($t, 'reward')); setAchiev($t, $u, '1'); echo "Success"; } else { echo "Fail"; } } } } error_log("nuthin" . $_POST['query']);