Initial commit
[2ch-be.git] / dev-test / old_dev / old / status_original.php
blob0b5cc4d30b77d87237ab8f81e8e7cd1f9103a549
1 <?php
3 //DMDM = email
4 //MDMD = password
5 include('encrypt.php');
6 // isset if login or not
7 if (!isset($_COOKIE['DMDM']) && !isset($_COOKIE['MDMD'])) {
8 header('location:index.php');
9 exit;
11 $icoimg="";
14 $email = Decrypt($_COOKIE['DMDM'],KEY);
15 $email = filter_var($email, FILTER_SANITIZE_EMAIL);
17 if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
18 exit;
21 include('inf.php');
23 $fdir = substr($email, 0, 1);
24 $sdir = substr($email, 1, 1);
25 $data = @file(DB_PATH."$fdir/$sdir/$email");
27 if(count($data)<3) {
28 foreach($_COOKIE as $ky => $vl)
29 setcookie($ky,"",time()-3600);
30 header('location:index.php');
31 exit;
34 for ($i=0; $i < count($data); $i++) {
35 $data[$i] = trim($data[$i]);
37 if(count($data)>5){
38 $mystatus = '';
39 if($data[count($data)-1]!=FORGOT){
40 $mystatus = urldecode($data[count($data)-1]);
41 $mystatus = str_replace("<br>","\n",$mystatus);
45 $e_ = (isset($_GET['e_'])) ? strip_tags(addslashes(filter_var($_GET['e_'], FILTER_SANITIZE_STRING))):'';
46 if($e_=='1'){
47 $isforedit=true;
50 if (isset($_GET['ico'])) {
51 $ico = $_GET['ico'];
52 $ico=trim($ico);
53 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(!(in_array($ext[1],$type))) //check image extension not in the array $type
62 echo "412";exit;
65 $icoimg = "<img src=\"http://204.63.8.28/ico/".$ico."\" height=\"100%\"/>";
66 $data[5]=$ico;
67 $writeData = implode("\n",$data);
68 file_put_contents(DB_PATH."$fdir/$sdir/$email", $writeData);
69 header('location:status.php');
72 if (isset($data[5]) && !empty($data[5])) {
74 $ico=trim($data[5]);
75 if(preg_match('/[^a-z_\-0-9._]/i', $ico))
77 $ico="";
79 $icoimg = "<img src=\"http://204.63.8.28/ico/".$ico."\" height=\"100%\"/>";
83 <!DOCTYPE html>
84 <html lang="en">
85 <head>
86 <meta charset="shift_jis">
87 <title>ƒXƒe�[ƒ^ƒXƒy�[ƒW</title>
88 <meta name="viewport" content="width=device-width, initial-scale=1.0">
89 <meta name="description" content="">
90 <meta name="author" content="">
91 <link rel="stylesheet" type="text/css" href="css/style.css"/>
92 <script type="text/javascript" src="js/jquery-1.9.1.js"></script>
93 <script type="text/javascript">
94 $(document).ready(function() {
95 $('#trip_c').keyup(function(e){
96 var code = (e.keyCode ? e.keyCode : e.which);
97 if (code==13) {
98 e.preventDefault();
99 calctrip();
102 $('#caltrip').click(function(){
103 calctrip();
106 function calctrip(){
107 $.post(
108 'trip.php',
109 {s:$('#trip_c').val()},
110 function(e){
111 $('#trip_c').val(e);
112 $('#caltrip').attr('disabled','disabled');
113 setTimeout(function(){
114 $('#caltrip').removeAttr('disabled');
115 },1000);
119 </script> <style>
120 .wordwrap_ {
121 white-space: pre; /* CSS 2.0 */
122 white-space: pre-wrap; /* CSS 2.1 */
123 white-space: pre-line; /* CSS 3.0 */
124 white-space: -pre-wrap; /* Opera 4-6 */
125 white-space: -o-pre-wrap; /* Opera 7 */
126 white-space: -moz-pre-wrap; /* Mozilla */
127 word-wrap: break-word; /* IE 5+ */
129 </style>
130 </head>
131 <body>
132 <div class="containerz">
133 <div class="navbar-collapse">
134 <ul class="nav navbar-nav">
135 </ul>
136 </div>
137 </div>
138 <div class="container">
139 <center>
140 <div class="form-signin">
141 <h3 class="form-signin-heading">ƒXƒe�[ƒ^ƒXƒy�[ƒW</h3><br>
142 <a href="choose.php"><div class="ico"><?php echo $icoimg; ?></div></a>ƒAƒCƒRƒ“‚̓NƒŠƒbƒN‚·‚é‚Æ•Ï�X‚Å‚«‚Ü‚· <br>
143 <div class="info"><br>
144 <?php echo "Eƒ��[ƒ‹: ".$data[1]."<br>“_�”: ".$data[3]; ?><br>
145 <span>Trip:</span>
146 <input type="text" name="trip" id="trip_c" />
147 <input type="submit" value="Calculate" id="caltrip" />
148 <br>
149 <a href="/test/p.php?i=<?php echo $data[0]; ?>">Profile</a>
150 <br><br>
151 <form method="post">
152 <?php if(isset($echo)) echo "<span style=\"color:green\">$echo</span>"; ?>
153 <?php if(isset($isforedit)):?>
154 <textarea id="input" name="info" cols="37" style="height:110px;width:100%" maxlength="250"><?php echo $mystatus; ?></textarea>
155 <br>
156 <button name="isub" type="submit">’ñ�o‚·‚é</button>
157 <button name="isca" type="submit">ƒLƒƒƒ“ƒZƒ‹</button>
158 <?php else: ?>
159 <div style="padding:2px;padding-bottom:10px;border:1px solid #dfdfdf;width:100%" class="wordwrap_"><?php echo $mystatus; ?></div>
160 <?php
161 if(!empty($mystatus)){
162 print "<a href=\"status.php?e_=1\">•Ò�W</a>";
163 }else{
164 print "<a href=\"status.php?e_=1\">‰Á‚¦‚é</a>";
167 <?php endif ?>
168 </form>
169 <br><br>
170 ŒÃ‚¢ƒAƒJƒEƒ“ƒg‚̈Ú�s <br><a href="mailto:migrate@2ch.net">�Ø–¾‚Æ‚µ‚Ä�A‹ŒƒAƒJƒEƒ“ƒg‚Ì�Ú�ׂð“dŽqƒ��[ƒ‹‚Å‘—�M‚µ‚Ü‚·�B</a><br><br>
171 <a href="change_pass.php">ƒpƒXƒ��[ƒh‚ð•Ï�X‚·‚é</a><br>
172 <a href="logout.php" style="color:red">ƒ�ƒOƒAƒEƒg‚·‚é</a>
173 </div>
174 </div>
175 </center>
176 </div>
177 </body>
178 </html>