Initial commit
[2ch-be.git] / dev-test / old / status.php
blobc5c8c12f948a6b13e46080a5f75a24c338bb271e
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[6]!=FORGOT){
40 $mystatus = urldecode($data[6]);
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 var ss = $('#trip_c').val();
108 ss = escape(ss);
109 $.post(
110 'trip.php',
111 {s:ss},
112 function(e){
113 $('#trip_c').val(e);
114 $('#caltrip').attr('disabled','disabled');
115 setTimeout(function(){
116 $('#caltrip').removeAttr('disabled');
117 },1000);
121 </script> <style>
122 .wordwrap_ {
123 white-space: pre; /* CSS 2.0 */
124 white-space: pre-wrap; /* CSS 2.1 */
125 white-space: pre-line; /* CSS 3.0 */
126 white-space: -pre-wrap; /* Opera 4-6 */
127 white-space: -o-pre-wrap; /* Opera 7 */
128 white-space: -moz-pre-wrap; /* Mozilla */
129 word-wrap: break-word; /* IE 5+ */
131 </style>
132 </head>
133 <body>
134 <div class="containerz">
135 <div class="navbar-collapse">
136 <ul class="nav navbar-nav">
137 </ul>
138 </div>
139 </div>
140 <div class="container">
141 <center>
142 <div class="form-signin">
143 <h3 class="form-signin-heading">ƒXƒe�[ƒ^ƒXƒy�[ƒW</h3><br>
144 <a href="choose.php"><div class="ico"><?php echo $icoimg; ?></div></a>ƒAƒCƒRƒ“‚̓NƒŠƒbƒN‚·‚é‚Æ•Ï�X‚Å‚«‚Ü‚· <br>
145 <div class="info"><br>
146 <?php echo "Eƒ��[ƒ‹: ".$data[1]."<br>“_�”: ".$data[3]; ?><br>
147 <span>ƒgƒŠƒbƒv:</span>
148 <input type="text" name="trip" id="trip_c" value="<?php print $data[7];?>" /><input type="submit" value="ŒvŽZ‚·‚é" id="caltrip" />
149 <br>
150 <a href="/test/p.php?i=<?php echo $data[0]; ?>">ƒvƒ�ƒtƒB�[ƒ‹</a>
151 <br><br>
152 <form method="post">
153 <?php if(isset($echo)) echo "<span style=\"color:green\">$echo</span>"; ?>
154 <?php if(isset($isforedit)):?>
155 <textarea id="input" name="info" cols="37" style="height:110px;width:100%" maxlength="250"><?php echo $mystatus; ?></textarea>
156 <br>
157 <button name="isub" type="submit">’ñ�o‚·‚é</button>
158 <button name="isca" type="submit">ƒLƒƒƒ“ƒZƒ‹</button>
159 <?php else: ?>
160 <div style="padding:2px;padding-bottom:10px;border:1px solid #dfdfdf;width:100%" class="wordwrap_"><?php echo $mystatus; ?></div>
161 <?php
162 if(!empty($mystatus)){
163 print "<a href=\"status.php?e_=1\">•Ò�W</a>";
164 }else{
165 print "<a href=\"status.php?e_=1\">‰Á‚¦‚é</a>";
168 <?php endif ?>
169 </form>
170 <br><br>
171 ŒÃ‚¢ƒAƒJƒEƒ“ƒg‚̈Ú�s <br><a href="mailto:migrate@2ch.net">�Ø–¾‚Æ‚µ‚Ä�A‹ŒƒAƒJƒEƒ“ƒg‚Ì�Ú�ׂð“dŽqƒ��[ƒ‹‚Å‘—�M‚µ‚Ü‚·�B</a><br><br>
172 <a href="change_pass.php">ƒpƒXƒ��[ƒh‚ð•Ï�X‚·‚é</a><br>
173 <a href="logout.php" style="color:red">ƒ�ƒOƒAƒEƒg‚·‚é</a>
174 </div>
175 </div>
176 </center>
177 </div>
178 </body>
179 </html>