Initial commit
[2ch-be.git] / dev-test / test / p.php
blob428f80bfd7800148a911b6003c760e101b660399
1 <?php
2 include('../encrypt.php');
4 // SANITIZE
5 $uid = trim($_GET['i']);
6 $uid = filter_var($uid,FILTER_SANITIZE_NUMBER_INT);
8 // VALIDATEE
9 if (strlen($uid) != 9){
10 echo "NG";
11 exit;
14 $read = file($id_mail_path);
15 $found = 0;
16 for ($i=0; $i < count($read); $i++) {
17 $udata = explode("<><>", trim($read[$i]));
19 if ($udata[0] == $uid && $found == 0) {
20 $tmp = explode("<><>", $read[$i]);
21 $email = $tmp[1];
22 $found = 1;
26 if ($found == 0){
27 echo "NG";
28 exit;
31 $email = trim($email);
33 $email = filter_var($email, FILTER_SANITIZE_EMAIL);
34 if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
35 exit;
38 $fdir = substr($email, 0, 1);
39 $sdir = substr($email, 1, 1);
40 $data = @file(DB_PATH."$fdir/$sdir/$email");
41 $ico = trim($data[5]);
42 $pts = trim($data[3]);
43 $info = trim(urldecode($data[6]));
44 if (strpos($ico, "-PREM")) {
45 $ico = explode("-PREM", $ico);
46 $icoimg = "<img src=\"".$livesitePath2."/premium/".$ico[0]."\" class='pic'/>";
47 } else {
48 $icoimg = "<img src=\"".$livesitePath2."/ico/".$ico."\" class='pic'/>";
50 #$icoimg = "<img src=\"".$livesitePath2."/ico/".$ico."\" height=\"\" class='pic'/>";
51 $triper = '';
52 $tmp_triper = trim($data[7]);
54 if(isset($data[7]) && !empty($data[7]) && !empty($tmp_triper))
55 $triper = "<strong>ƒgƒŠƒbƒv:</strong> �Ÿ{$data[7]}<br>";
56 else
57 $triper = "";
58 //$triper = "<strong>ƒgƒŠƒbƒv:</strong> {$data[7]}<br>";
60 include "../include/header.php";
63 $emoticon = array(
64 'amazed' => '::amazed::',
65 'cry' => '::cry::',
66 'okay' => '::okay::',
67 'treasure' => '::treasure::',
68 'angry' => '::angry::',
69 'gangster' => '::gangster::',
70 'shame' => '::shame::',
71 'wink' => '::wink::',
72 'annoyed' => '::annoyed::',
73 'laugh' => '::laugh::',
74 'sick' => '::sick::',
75 'blush' => '::blush::',
76 'sing' => '::sing::',
77 'chocked' => '::chocked::',
78 'smile' => '::smile::',
79 'confused' => '::confused::',
80 'ninja' => '::ninja::',
81 'tongue' => '::tongue::',
82 'lawyer' => '::lawyer::',
83 'guru' => '::guru::'
86 $ultravariable = array();
87 foreach ($emoticon as $key => $value) {
88 $ultravariable[] = "<li class=\"lialign\"><img src='{$livesitePath}images/{$key}.gif' data-alt='{$value}'></li>";
90 $sEmote = implode("", $ultravariable);
93 <body>
94 <div class="well well-sm pad3">
96 <div class = "nav nav-header">
97 <?php
98 if($_SERVER['SERVER_NAME'] == "be.2ch.net") {
100 <a href="<?php echo $livesitePath ?>" class="pull-right"><img src="<?php echo $livesitePath ?>css/img/2ch_logo.gif"/></a>
101 <?php
102 } elseif ($_SERVER['SERVER_NAME'] == "be.bbspink.com") {
104 <a href="<?php echo $livesitePath ?>" class="pull-right"><img src="<?php echo $livesitePath ?>css/img/pink.png"/></a>
105 <?php
108 <h5 class="pull-right"> BE 2.0 </h5>
109 </div><!-- nav nav-header-->
111 <hr>
112 <!-- navigation-->
113 <?php
114 if (isset($_COOKIE['DMDM']) && isset($_COOKIE['MDMD'])) {
115 require '../include/nav.php';
118 <!-- end navigation-->
119 <div class="panel panel-default pull-right">
120 <div class="btn-group">
121 <button type="button" class="btn btn-default" id="btnMsg" >
122 <span class="glyphicon glyphicon-envelope"></span>
123 </button>
124 </div><!--btn-group-->
125 </div><!--panel panel-default pull-right-->
126 <div class="panel panel-default pull-right">
127 <button type="button" class="btn btn-default" id="btnBE">
128 <span class="glyphicon glyphicon-thumbs-up"></span>
129 </button>
130 </div><!--panel panel-default pull-right-->
132 <br><br>
134 <div class="ic panel panel-default pull-left">
135 <?php echo $icoimg; ?>
136 </div><!--ic panel panel-default pull-left-->
138 <div class="info panel panel-default txt">
139 <h5><strong>Žó�MŽÒ ID:</strong> <span class="badge"><?php echo $data[0] ?></span></h5>
140 <h5><strong>ƒ|ƒCƒ“ƒg:</strong> <span class="badge"><?php echo $pts ?></span></h5>
141 <h5><strong></strong><?php echo $triper ?></h5>
143 <hr class="hrw">
145 <h5><strong>�Љ</strong></h5>
146 <h5 class="just txt">
147 <?php
148 $str = $info;
150 $str = preg_replace("/(http:\/\/\w+\.2ch\.net\/test\/read\.cgi\/(\w+\/\d+)(?:\/[-n\d]*)?)/", "<a href=\"$1\" target=\"_blank\" class=\"btn btn-success btn-xs\"><span class=\"glyphicon glyphicon-ok\"></span> $2</a>", $str);
152 $str = preg_replace("/(http:\/\/\w+\.bbspink\.com\/test\/read\.cgi\/(\w+\/\d+)(?:\/[-n\d]*)?)/", "<a href=\"$1\" target=\"_blank\" class=\"btn btn-danger btn-xs\"><span class=\"glyphicon glyphicon-warning-sign\"></span> $2</a>", $str);
154 $str = preg_replace("/https?:\/\/be\.(2ch\.net|bbspink\.com)\/(?:user\/|test\/p\.php\?i=)(\d{9})/", "<a href=\"https://be.$1/user/$2\" target=\"_blank\" class=\"btn btn-warning btn-xs\"><span class=\"glyphicon glyphicon-user\"></span> $2</a>", $str);
156 $str = preg_replace("/http:\/\/info\.2ch\.net\/index\.php\/([^\?&\s]+)/", "<a href=\"http://info.2ch.net/index.php/$1\" target=\"_blank\" class=\"btn btn-primary btn-xs\"><span class=\"glyphicon glyphicon-book\"></span> $1</a>", $str);
158 $str = preg_replace("/https?:\/\/twitter\.com\/(\w+)/", "<a href=\"https://twitter.com/$1\" target=\"_blank\" class=\"btn btn-info btn-xs\">@$1</a>", $str);
160 echo $str; ?>
161 </h5>
163 </div><!--info panel panel-default-->
164 <?php
165 if(!empty($_SESSION['alert'])){
166 echo $_SESSION['alert'];
167 $_SESSION['alert'] = '';
171 <div class="panel3 panel panel-default" id="BEform" style="display: none;">
172 <form class="form" method="post" action="<?php echo $livesitePath ?>melontobe.php" id="sendMessage">
173 <div class="form-group">
174 <div class="input-group">
175 <span class="input-group-addon">BEƒ|ƒCƒ“ƒg(—vMP) :</span>
176 <input type="hidden" name="recipient" value="<?php echo $_GET['i']; ?>">
177 <input type="text" class="form-control" name="points" required>
178 <div class="clearfix"></div>
179 </div>
180 </div>
181 <!--input type="hidden" value="" name="rec"/> <!--receiver -->
182 <input type="reset" value="ƒLƒƒƒ“ƒZƒ‹" class="btn btn-default textpanel pull-left" id="cancel"/>
183 <input type="submit" value="‘¡‚é" name="pTransfer" class="btn btn-default textpanel pull-left" id="send"/>
184 <div class="clearfix"></div>
185 </form>
186 </div>
189 <div class="panel3 panel panel-default" id="SendForm">
190 <form class="form" method="post" action="<?php echo $livesitePath ?>message_proc.php" id="sendMessage">
191 <input type="hidden" value="<?php echo $_GET['i']; ?>" name="zxcvbnm"> <!-- need enc -->
192 <div class="form-group">
193 <div class="input-group">
194 <span class="input-group-addon">Œ�–¼ :</span>
195 <input type="text" class="form-control" name="subj" required>
196 <div class="clearfix"></div>
197 </div>
198 </div>
199 <!--input type="hidden" value="" name="rec"/> <!--receiver -->
200 <div class="form-group">
201 <textarea rows="4" class="form-control top" name="msg" maxlength="250" id="messageBox"></textarea>
202 <br>
203 <input type="text" id="textarea_feedback" class="form-control" readonly="readonly">
204 <span>ƒLƒƒƒ‰ƒNƒ^�[�¶</span>
205 </div>
206 <div class="clearfix"></div>
207 <div class="btn-group pull-right">
208 <input type="button" class="btn btn-default dropdown-toggle pull-left textpanel" data-toggle="dropdown" value="ŠG•¶Žš">
209 <ul class="dropdown-menu dropdown-menu-right" role="menu" id="emoji">
210 <?php echo $sEmote ?>
211 </ul>
212 <input type="reset" value="ƒLƒƒƒ“ƒZƒ‹" class="btn btn-default textpanel pull-left" id="cancel"/>
213 <input type="submit" value="‘—‚é" class="btn btn-default textpanel pull-left" id="send"/>
214 </div>
215 <div class="clearfix"></div>
216 </form>
217 </div>
218 </div>
220 </div> <!--well well-lg-->
221 <?php
222 define('__ROOT__', dirname(dirname(__FILE__)));
223 require __ROOT__.'/include/footer.php';