Initial commit
[2ch-be.git] / dev-test / melon / zm.php
bloba96dd19799f0506b0e4f6850d98e60f681def4e6
1 <?php
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']) is_numeric($_POST['points'])) {
12 foreach($_POST as $index=>$value){
13 if(empty($value)){
14 switch ($index) {
15 case 'points':
16 $emptyVar .= "<br>ƒ�ƒ�ƒ“‚̃|ƒCƒ“ƒg";
17 break;
19 case 'recipient':
20 $emptyVar .= "<br>Žó—eŽÒ";
21 break;
27 if(!isset($emptyVar)){
28 $pts = addslashes(strip_tags(trim($_POST['points'])));
29 $id = addslashes(strip_tags(trim($_POST['recipient'])));
30 $fuser = new Message;
31 $recipient = $fuser->FindUser($id,$id_mail_path);
32 // echo $recipient;
33 // echo "xx";
34 // die();
35 $trimmedPts = trim(file_get_contents("http://tpol27.nttec.com/dev/melon.php?email=".$email));
36 if($recipient){
38 if($trimmedPts < $pts) {
39 $error = "‚ ‚È‚½‚Í‚Ì�\•ª‚ȃ|ƒCƒ“ƒg‚ðŽ�‚Á‚Ä‚¢‚È‚¢";
40 } else {
41 $points = file_get_contents("http://tpol27.nttec.com/dev/melon.php?conv=".$pts."&usr=".$email."&ip=".$_SERVER['REMOTE_ADDR']."&trans=sent");
42 echo $points;
43 if($points){
44 $animal = '';
45 $points = file_get_contents("http://tpol27.nttec.com/dev/melon.php?uname=".$recipient."&pts=".$pts."&ip=".$_SERVER['REMOTE_ADDR']."&animal=".$animal."&trans=receive");
46 $error = "“]‘—‚Ì�¬Œ÷ƒ|ƒCƒ“ƒg";
47 }else{
48 $error = "ƒGƒ‰�[�A‚à‚¤ˆê“xŽŽ‚µ‚Ä‚­‚¾‚³‚¢";
51 }else{
52 $error = "ƒ†�[ƒU�[‚Í‘¶�Ý‚µ‚Ü‚¹‚ñ";
54 }else{
55 $error = "‹ó‚ÌŽŸ‚̃tƒB�[ƒ‹ƒh‚ð•ú’u‚µ‚È‚¢‚ʼnº‚³‚¢: ".$emptyVar.'<br><br>
56 <br>';
59 }else{
60 $error = "ƒGƒ‰�[�A‚à‚¤ˆê“xŽŽ‚µ‚Ä‚­‚¾‚³‚¢";
63 if(isset($error)){
64 echo $error;
67 <!DOCTYPE html>
68 <html lang="en">
69 <head>
70 <meta charset="Shift_JIS">
71 <title>•ÏŠ·</title>
72 <meta name="viewport" content="width=device-width, initial-scale=1.0">
73 <meta name="description" content="">
74 <meta name="author" content="">
75 <link rel="stylesheet" type="text/css" href="<?php echo $livesitePath ?>css/style.css"/>
76 <style>
77 span.green{
78 color: green;
79 font-weight: bold;
81 </style>
82 </head>
83 <body>
84 <div class="containerz">
85 <div class="navbar-collapse">
86 <ul class="nav navbar-nav">
87 </ul>
88 </div>
89 </div>
91 <div class="container">
92 <center>
93 <div class="form-signin" style = "font-size: 1.2em;text-align:right;">
94 <?php
95 if($_SERVER['SERVER_NAME'] == "be.2ch.net") {
97 <a href="http://www.2ch.net/" target="_BLANK">
98 <img src="<?php echo $livesitePath ?>css/img/2ch_logo.gif">
99 </a>
100 <?php
101 } elseif ($_SERVER['SERVER_NAME'] == "be.bbspink.com") {
103 <a href="http://www.bbspink.com/" target="_BLANK">
104 <img src="<?php echo $livesitePath ?>css/img/pink.png">
105 </a>
106 <?php
109 <br>
110 BE 2.0<?php echo (detect_device($_SERVER['HTTP_USER_AGENT'])) ? "ƒÀ" : "" ?>
111 </div>
112 </center>
113 </div>
114 <div class="container">
115 <center>
116 <form class="form-signin" method="post">
117 <?php
118 $cpts = file_get_contents("http://tpol27.nttec.com/dev/melon.php?email=".$email);
119 echo "ƒ�ƒ�ƒ“‚̃|ƒCƒ“ƒg: <span class='green'>".$cpts."</span></b><br><br>";
122 <input type="text" name="points" placeholder="ƒ|ƒCƒ“ƒg�”"><br>
123 <input type="text" name="recipient" placeholder="ŽóŽæ�l"><br>
124 <input type="submit" name="transfer" value="‘—�M"><br>
125 </form>
126 </center>
127 </div>
128 </body>
129 </html>