Initial commit
[2ch-be.git] / dev-test / zxcvbnm / transfer.php
blobe61261eb3e101e99983ff9556d43a778571962d7
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 exit;
11 if(isset($_POST['transfer']) && !empty($_POST['transfer'])) {
13 if(is_numeric($_POST['points'])){
14 $error = "ƒGƒ‰�[�A‚à‚¤ˆê“xŽŽ‚µ‚Ä‚­‚¾‚³‚¢";
15 foreach($_POST as $index=>$value){
16 if(empty($value)){
17 switch ($index) {
18 case 'points':
19 $emptyVar .= "<br>ƒ�ƒ�ƒ“ƒ|ƒCƒ“ƒg";
20 break;
22 case 'recipient':
23 $emptyVar .= "<br>Žó—eŽÒ";
24 break;
30 if(!isset($emptyVar)){
31 $pts = addslashes(strip_tags(trim($_POST['points'])));
32 $pts = round($pts);
33 $id = addslashes(strip_tags(trim($_POST['recipient'])));
34 $fuser = new Message;
35 $recipient = $fuser->FindUser($id,$id_mail_path);
36 // echo $recipient;
37 // echo "xx";
38 // die();
39 $trimmedPts = trim(file_get_contents("http://tpol27.nttec.com/dev/melon.php?email=".$email));
40 if($recipient){
42 if($trimmedPts < $pts) {
43 $_SESSION['error'] = "‚ ‚È‚½‚Í‚Ì�\•ª‚ȃ|ƒCƒ“ƒg‚ðŽ�‚Á‚Ä‚¢‚È‚¢";
44 } else {
45 $points = file_get_contents("http://tpol27.nttec.com/dev/melon.php?conv=".$pts."&usr=".$email."&ip=".$_SERVER['REMOTE_ADDR']."&trans=sent");
46 //echo $points;
47 if($points){
48 $animal = '';
49 $points = file_get_contents("http://tpol27.nttec.com/dev/melon.php?uname=".$recipient."&pts=".$pts."&ip=".$_SERVER['REMOTE_ADDR']."&animal=".$animal."&trans=receive");
50 $_SESSION['error'] = "“]‘—‚Ì�¬Œ÷ƒ|ƒCƒ“ƒg";
51 header("Location: transfer.php");
52 exit;
54 }else{
55 $_SESSION['error'] = "ƒGƒ‰�[�A‚à‚¤ˆê“xŽŽ‚µ‚Ä‚­‚¾‚³‚¢";
56 header("Location: transfer.php");
57 exit;
60 }else{
61 $_SESSION['error'] = "ƒ†�[ƒU�[‚Í‘¶�Ý‚µ‚Ü‚¹‚ñ";
62 header("Location: transfer.php");
63 exit;
65 }else{
66 $_SESSION['error'] = "–³Œø‚ȃ|ƒCƒ“ƒg";
67 header("Location: transfer.php");
68 exit;
73 }else{
74 $_SESSION['error'] = "–³Œø‚ȃ|ƒCƒ“ƒg";
75 header("Location: transfer.php");
76 exit;
80 <!DOCTYPE html>
81 <html lang="en">
82 <head>
83 <meta charset="Shift_JIS">
84 <title>]‘—ƒ|ƒCƒ“ƒg</title>
85 <meta name="viewport" content="width=device-width, initial-scale=1.0">
86 <meta name="description" content="">
87 <meta name="author" content="">
88 <link rel="stylesheet" type="text/css" href="<?php echo $livesitePath ?>css/style.css"/>
89 <style>
90 span.green{
91 color: green;
92 font-weight: bold;
94 </style>
95 </head>
96 <body>
97 <?php
98 $varMessage = $_SESSION['error'];
99 // echo $varMessage.'xx';
100 if(!empty($varMessage)){
101 echo $varMessage;
102 $_SESSION['error'] = "";
105 <div class="containerz">
106 <div class="navbar-collapse">
107 <ul class="nav navbar-nav">
108 </ul>
109 </div>
110 </div>
112 <div class="container">
113 <center>
114 <div class="form-signin" style = "font-size: 1.2em;text-align:right;">
115 <?php
116 if($_SERVER['SERVER_NAME'] == "be.2ch.net") {
118 <a href="http://www.2ch.net/" target="_BLANK">
119 <img src="<?php echo $livesitePath ?>css/img/2ch_logo.gif">
120 </a>
121 <?php
122 } elseif ($_SERVER['SERVER_NAME'] == "be.bbspink.com") {
124 <a href="http://www.bbspink.com/" target="_BLANK">
125 <img src="<?php echo $livesitePath ?>css/img/pink.png">
126 </a>
127 <?php
130 <br>
131 BE 2.0<?php echo (detect_device($_SERVER['HTTP_USER_AGENT'])) ? "ƒÀ" : "" ?>
132 </div>
133 </center>
134 </div>
135 <div class="container">
136 <center>
137 <form class="form-signin" method="post">
138 <?php
139 $cpts = file_get_contents("http://tpol27.nttec.com/dev/melon.php?email=".$email);
140 echo "ƒ�ƒ�ƒ“‚̃|ƒCƒ“ƒg: <span class='green'>".$cpts."</span></b><br><br>";
143 <input type="text" name="points" placeholder="‘¡‚éƒ|ƒCƒ“ƒg‚Ì�”"><br>
144 <input type="text" name="recipient" placeholder="ŽóŽæ�l‚ÌID"><br>
145 <input type="submit" name="transfer" value="‘—�M"><br>
146 </form>
147 </center>
148 </div>
149 </body>
150 </html>