Initial commit
[2ch-be.git] / dev-test / transfer_orig.php
blob2a6c3bed5edd09705f482f19720a540c4093d91d
1 <?php
2 session_start();
3 include('encrypt.php');
5 $email = Decrypt($_COOKIE['DMDM'],KEY);
6 $email = filter_var($email, FILTER_SANITIZE_EMAIL);
7 if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
8 //echo "Please login to your BE Account";
9 header("Location: index.php");
10 exit;
13 if(isset($_POST['transfer']) && !empty($_POST['transfer'])) {
15 if(is_numeric($_POST['points'])){
16 $error = "ƒGƒ‰�[�A‚à‚¤ˆê“xŽŽ‚µ‚Ä‚­‚¾‚³‚¢";
17 foreach($_POST as $index=>$value){
18 if(empty($value)){
19 switch ($index) {
20 case 'points':
21 $emptyVar .= "<br>ƒ�ƒ�ƒ“ƒ|ƒCƒ“ƒg";
22 break;
24 case 'recipient':
25 $emptyVar .= "<br>Žó—eŽÒ";
26 break;
32 if(!isset($emptyVar)){
33 $pts = addslashes(strip_tags(trim($_POST['points'])));
34 $pts = round($pts);
35 $id = addslashes(strip_tags(trim($_POST['recipient'])));
36 $fuser = new Message;
37 $recipient = $fuser->FindUser($id,$id_mail_path);
38 $trimmedPts = trim(file_get_contents("http://tpol27.nttec.com/dev/melon.php?email=".$email));
39 if($recipient){
40 if($trimmedPts < $pts) {
41 $_SESSION['error'] = "‚ ‚È‚½‚Í‚Ì�\•ª‚ȃ|ƒCƒ“ƒg‚ðŽ�‚Á‚Ä‚¢‚È‚¢";
42 } else {
43 $points = file_get_contents("http://tpol27.nttec.com/dev/melon.php?conv=".$pts."&usr=".$email."&ip=".$_SERVER['REMOTE_ADDR']."&trans=sent");
44 //echo $points;
45 if($points){
46 $animal = '';
47 $points = file_get_contents("http://tpol27.nttec.com/dev/melon.php?uname=".$recipient."&pts=".$pts."&ip=".$_SERVER['REMOTE_ADDR']."&animal=".$animal."&trans=receive");
48 $_SESSION['error'] = "“]‘—‚Ì�¬Œ÷ƒ|ƒCƒ“ƒg";
49 if(abs($pts) >= 100)
50 file_get_contents("http://207.29.229.25/tmail.php?usname=".trim($recipient)."&tkn=gokp5WATBYOovz2S4LKo");
53 header("Location: transfer.php");
54 exit;
56 }else{
57 $_SESSION['error'] = "ƒGƒ‰�[�A‚à‚¤ˆê“xŽŽ‚µ‚Ä‚­‚¾‚³‚¢";
58 header("Location: transfer.php");
59 exit;
62 }else{
63 $_SESSION['error'] = "ƒ†�[ƒU�[‚Í‘¶�Ý‚µ‚Ü‚¹‚ñ";
64 header("Location: transfer.php");
65 exit;
67 }else{
68 $_SESSION['error'] = "–³Œø‚ȃ|ƒCƒ“ƒg";
69 header("Location: transfer.php");
70 exit;
75 }else{
76 $_SESSION['error'] = "–³Œø‚ȃ|ƒCƒ“ƒg";
77 header("Location: transfer.php");
78 exit;
82 <!DOCTYPE html>
83 <html lang="en">
84 <head>
85 <meta charset="Shift_JIS">
86 <title>]‘—ƒ|ƒCƒ“ƒg</title>
87 <meta name="viewport" content="width=device-width, initial-scale=1.0">
88 <meta name="description" content="">
89 <meta name="author" content="">
90 <link rel="stylesheet" type="text/css" href="<?php echo $livesitePath ?>css/style.css"/>
91 <style>
92 span.green{
93 color: green;
94 font-weight: bold;
96 </style>
97 </head>
98 <body>
99 <?php
100 $varMessage = $_SESSION['error'];
101 // echo $varMessage.'xx';
102 if(!empty($varMessage)){
103 echo $varMessage;
104 $_SESSION['error'] = "";
107 <div class="containerz">
108 <div class="navbar-collapse">
109 <ul class="nav navbar-nav">
110 </ul>
111 </div>
112 </div>
114 <div class="container">
115 <center>
116 <div class="form-signin" style = "font-size: 1.2em;text-align:right;">
117 <?php
118 if($_SERVER['SERVER_NAME'] == "be.2ch.net") {
120 <a href="http://www.2ch.net/" target="_BLANK">
121 <img src="<?php echo $livesitePath ?>css/img/2ch_logo.gif">
122 </a>
123 <?php
124 } elseif ($_SERVER['SERVER_NAME'] == "be.bbspink.com") {
126 <a href="http://www.bbspink.com/" target="_BLANK">
127 <img src="<?php echo $livesitePath ?>css/img/pink.png">
128 </a>
129 <?php
132 <br>
133 BE 2.0
134 </div>
135 </center>
136 </div>
137 <div class="container">
138 <center>
139 <form class="form-signin" method="post">
140 <?php
141 $cpts = file_get_contents("http://tpol27.nttec.com/dev/melon.php?email=".$email);
142 echo "ƒ�ƒ�ƒ“‚̃|ƒCƒ“ƒg: <span class='green'>".$cpts."</span></b><br><br>";
145 <input type="text" name="points" placeholder="‘¡‚éƒ|ƒCƒ“ƒg‚Ì�”"><br>
146 <input type="text" name="recipient" placeholder="ŽóŽæ�l‚ÌID"><br>
147 <input type="submit" name="transfer" value="‘—�M"><br>
148 </form>
149 </center>
150 </div>
151 </body>
152 </html>