Initial commit
[2ch-be.git] / dev-test / old_dev / melon / status2.php
blobc5fd03a94bce5d5eb0774e39fe617c8ef69c1974
1 <?php
4 //DMDM = email
5 //MDMD = password
6 include('encrypt.php');
7 // isset if login or not
8 if (!isset($_COOKIE['DMDM']) && !isset($_COOKIE['MDMD'])) {
9 header('location:index.php');
10 exit;
13 $icoimg="";
15 $email = Decrypt($_COOKIE['DMDM'],KEY);
16 $email = filter_var($email, FILTER_SANITIZE_EMAIL);
18 if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
19 exit;
22 include('inf.php');
24 $fdir = substr($email, 0, 1);
25 $sdir = substr($email, 1, 1);
26 $data = @file(DB_PATH."$fdir/$sdir/$email");
28 if(count($data)<3) {
29 foreach($_COOKIE as $ky => $vl)
30 setcookie($ky,"",time()-3600);
31 header('location:index.php');
32 exit;
35 for ($i=0; $i < count($data); $i++) {
36 $data[$i] = trim($data[$i]);
38 if(count($data)>5){
39 $mystatus = '';
40 if($data[6]!=FORGOT){
41 $mystatus = urldecode($data[6]);
42 $mystatus = str_replace("<br>","¥n",$mystatus);
46 $e_ = (isset($_GET['e_'])) ? strip_tags(addslashes(filter_var($_GET['e_'], FILTER_SANITIZE_STRING))):'';
47 if($e_=='1'){
48 $isforedit =true;
51 if (isset($_GET['ico'])) {
52 $ico = $_GET['ico'];
53 $ico=trim($ico);
54 if(preg_match('/[^a-z_¥-0-9._]/i', $ico)){
55 $ico ="";
58 $type =Array(1 => 'gif'); //store all the image extension types in array
59 $ext = explode(".",$ico); //explode and find value after dot
60 if (strlen($ext[0]) <= 0 ) $ico = "nida.gif";
61 if(!(in_array($ext[1],$type))) //check image extension not in the array $type
63 echo "412";
64 exit;
67 $icoimg = "<img src=¥"".$livesitePath2."/ico/".$ico."¥" class='pic'/>";
68 $data[5] =$ico;
69 $writeData = implode("¥n",$data);
70 file_put_contents(DB_PATH."$fdir/$sdir/$email", $writeData);
71 header('location:status.php');
74 if (isset($data[5]) && !empty($data[5])) {
75 $ico=trim($data[5]);
76 if(preg_match('/[^a-z_¥-0-9._]/i', $ico))
78 $ico ="";
80 $icoimg = "<img src=¥"".$livesitePath2."/ico/".$ico."¥" class='pic'/>";
83 include "include/header.php";
85 $inbox = new Message;
86 $uid = $inbox->GetID($_COOKIE['DMDM'],$id_mail_path);
90 <body>
91 <div class="well well-sm pad3">
93 <!-- navigation-->
94 <?php require 'include/nav.php'; ?>
95 <!-- end navigation-->
97 <!--<h3 class="form-signin-heading">Xe[^Xy[W</h3>-->
99 <a href="choose.php"><div class="ic panel panel-default pull-left"><?php echo $icoimg; ?></div></a><!-- ACR“NbNX -->
101 <!-- start tripcode -->
102 <div class="panel2 panel panel-default ">
103 <h5><strong>トリップ:</strong></h5>
104 <!-- tripcode -->
105 <div class="tripc input-group">
106 <span class="input-group-addon"><strong>#</strong></span>
107 <input type="text" class="form-control" name="trip" id="trip_c" value="<?php print $data[7];?>" />
108 <!-- <input type="text" class="form-control" value="B1VjUMK0na7D"/> -->
109 <span class="input-group-btn">
110 <button class="btn btn-default" type="submit" value="vZ" id="caltrip" />
111 <span class="glyphicon glyphicon-random"></span>
112 </button>
113 </span>
114 </div>
116 </div>
117 <!-- end tripcode!! -->
119 <!-- start status -->
120 <div class="panel4 panel panel-default b ">
121 <strong>紹介文</strong>
122 <?php if(!$isforedit){
123 $hide="";
124 } else {
125 $hide="hide";
127 <form method="post">
128 <?php if(isset($echo)) echo "<span style=¥"color:green¥">$echo</span>"; ?>
129 <button name="isca" class="bottom btn btn-default pull-right btn-sm">
130 <span class="glyphicon glyphicon-remove"></span>
131 </button>
132 <button name="isub" class="bottom btn btn-default pull-right btn-sm">
133 <span class="glyphicon glyphicon-ok"></span>
134 </button>
135 <div class="clearfix"></div>
136 <textarea rows="4" id="input" name="info" class="textpanel form-control " maxlength="250"><?php echo $mystatus; ?></textarea>
137 </form>
139 <?php
143 <a href="<?php echo $_SERVER['PHP_SELF'] . '?e_=1'; ?>" class="<?php echo $hide; ?> bottom btn btn-default pull-right btn-sm">
144 <span class="glyphicon glyphicon-edit"></span>
145 </a>
146 <div class="clearfix"></div>
147 <div class="wordwrap_ panel panel-default scroll <?php echo $hide; ?>"> <?php echo $mystatus; ?></div>
149 </div>
150 <!-- end status -->
152 <div class="clearfix"></div>
154 <div class="panel3 panel panel-default txt ">
155 <?php
156 $points = file_get_contents("http://tpol27.nttec.com/melon.php?email=".$email);
157 echo
158 "<h5><strong>Eメール:</strong> ".$data[1]."</h5>
159 <h5><strong>Beポイント:</strong><span class='badge'> ".$data[3]."</span></h5>
160 <h5><strong>メロンのポイント:</strong><span class='badge'> ".$points."</span>
161 &nbsp;&nbsp;&nbsp;<a href=¥"convert.php¥" target=¥"_blan>変換</a>
162 &nbsp;&nbsp;&nbsp;<a href=¥"#">買う</a>
163 &nbsp;&nbsp;&nbsp;<a href=¥"#">ガイド</a></h5>";
165 <strong>古いアカウントの移行</strong><br><a href="mailto:migrate@2ch.net">証明として、旧アカウントの詳細を電子メールで送信します。</a><br><br>
167 <h4 class="text pull-right"> <a href="logout.php"><span class="label label-danger">ログアウトする</span></a> </h4>
168 <h4 class="text pull-right"> <a href="change_pass.php"><span class="label label-primary">パスワードを変更する</span></a> </h4>
169 <div class="clearfix"></div>
170 </div>
172 </div>
174 <?php
175 require 'include/footer.php';