Initial commit
[2ch-be.git] / dev-test / test / p2.php
blob49c701cdcba3bce73dc71ed62387c4a70d9efc5d
1 <?php
2 include('../encrypt.php');
3 echo "IP";
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 $icoimg = "<img src=\"".$livesitePath2."/ico/".$ico."\" height=\"\" class='pic'/>";
45 $triper = '';
46 $tmp_triper = trim($data[7]);
48 if(isset($data[7]) && !empty($data[7]) && !empty($tmp_triper))
49 $triper = "<strong>ƒgƒŠƒbƒv:</strong> �Ÿ{$data[7]}<br>";
50 else
51 $triper = "";
52 //$triper = "<strong>ƒgƒŠƒbƒv:</strong> {$data[7]}<br>";
54 include "../include/header.php";
57 $emoticon = array(
58 'amazed' => '::amazed::',
59 'cry' => '::cry::',
60 'okay' => '::okay::',
61 'treasure' => '::treasure::',
62 'angry' => '::angry::',
63 'gangster' => '::gangster::',
64 'shame' => '::shame::',
65 'wink' => '::wink::',
66 'annoyed' => '::annoyed::',
67 'laugh' => '::laugh::',
68 'sick' => '::sick::',
69 'blush' => '::blush::',
70 'sing' => '::sing::',
71 'chocked' => '::chocked::',
72 'smile' => '::smile::',
73 'confused' => '::confused::',
74 'ninja' => '::ninja::',
75 'tongue' => '::tongue::',
76 'lawyer' => '::lawyer::',
77 'guru' => '::guru::'
80 $ultravariable = array();
81 foreach ($emoticon as $key => $value) {
82 $ultravariable[] = "<li class=\"lialign\"><img src='{$livesitePath}images/{$key}.gif' data-alt='{$value}'></li>";
84 $sEmote = implode("", $ultravariable);
87 <body>
88 <div class="well well-sm pad3">
90 <div class = "nav nav-header">
91 <?php
92 if($_SERVER['SERVER_NAME'] == "be.2ch.net") {
94 <a href="<?php echo $livesitePath ?>" class="pull-right"><img src="<?php echo $livesitePath ?>css/img/2ch_logo.gif"/></a>
95 <?php
96 } elseif ($_SERVER['SERVER_NAME'] == "be.bbspink.com") {
98 <a href="<?php echo $livesitePath ?>" class="pull-right"><img src="<?php echo $livesitePath ?>css/img/pink.png"/></a>
99 <?php
102 <h5 class="pull-right"> BE 2.0 </h5>
103 </div><!-- nav nav-header-->
105 <hr>
106 <!-- navigation-->
107 <?php
108 if (isset($_COOKIE['DMDM']) && isset($_COOKIE['MDMD'])) {
109 require '../include/nav.php';
112 <!-- end navigation-->
113 <div class="panel panel-default pull-right">
114 <div class="btn-group">
115 <button type="button" class="btn btn-default" id="btnMsg" >
116 <span class="glyphicon glyphicon-envelope"></span>
117 </button>
118 </div><!--btn-group-->
119 </div><!--panel panel-default pull-right-->
120 <div class="panel panel-default pull-right">
121 <button type="button" class="btn btn-default" id="btnBE">
122 <span class="glyphicon glyphicon-thumbs-up"></span>
123 </button>
124 </div><!--panel panel-default pull-right-->
126 <br><br>
128 <div class="ic panel panel-default pull-left">
129 <?php echo $icoimg; ?>
130 </div><!--ic panel panel-default pull-left-->
132 <div class="<?php echo (detect_device2($_SERVER['HTTP_USER_AGENT'])!="PLSDISPLAY") ? "unclick" : ""; ?> info panel panel-default txt">
133 <h5><strong>ƒ|ƒCƒ“ƒg:</strong> <span class="badge"><?php echo $pts ?></span></h5>
134 <h5><strong></strong><?php echo $triper ?></h5>
136 <hr class="hrw">
138 <h5><strong>�Љ</strong></h5>
139 <h5 class="just txt">
140 <?php
141 $str = $info;
143 $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);
145 $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);
147 $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);
149 $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);
151 $str = preg_replace("/https?:\/\/twitter\.com\/(\w+)/", "<a href=\"https://twitter.com/$1\" target=\"_blank\" class=\"btn btn-info btn-xs\">@$1</a>", $str);
153 echo $str; ?>
154 </h5>
156 </div><!--info panel panel-default-->
157 <?php
158 if(!empty($_SESSION['alert'])){
159 echo $_SESSION['alert'];
160 $_SESSION['alert'] = '';
164 <div class="panel3 panel panel-default" id="BEform" style="display: none;">
165 <form class="form" method="post" action="<?php echo $livesitePath ?>melontobe.php" id="sendMessage">
166 <div class="form-group">
167 <div class="input-group">
168 <span class="input-group-addon">BEƒ|ƒCƒ“ƒg(—vMP) :</span>
169 <input type="hidden" name="recipient" value="<?php echo $_GET['i']; ?>">
170 <input type="text" class="form-control" name="points" required>
171 <div class="clearfix"></div>
172 </div>
173 </div>
174 <!--input type="hidden" value="" name="rec"/> <!--receiver -->
175 <input type="reset" value="ƒLƒƒƒ“ƒZƒ‹" class="btn btn-default textpanel pull-left" id="cancel"/>
176 <input type="submit" value="‘¡‚é" name="pTransfer" class="btn btn-default textpanel pull-left" id="send"/>
177 <div class="clearfix"></div>
178 </form>
179 </div>
182 <div class="panel3 panel panel-default" id="SendForm">
183 <form class="form" method="post" action="<?php echo $livesitePath ?>message_proc.php" id="sendMessage">
184 <input type="hidden" value="<?php echo $_GET['i']; ?>" name="zxcvbnm"> <!-- need enc -->
185 <div class="form-group">
186 <div class="input-group">
187 <span class="input-group-addon">Œ�–¼ :</span>
188 <input type="text" class="form-control" name="subj" required>
189 <div class="clearfix"></div>
190 </div>
191 </div>
192 <!--input type="hidden" value="" name="rec"/> <!--receiver -->
193 <div class="form-group">
194 <textarea rows="4" class="form-control top" name="msg" maxlength="250" id="msg"></textarea>
195 </div>
196 <div class="btn-group">
197 <input type="button" class="btn btn-default dropdown-toggle pull-left textpanel" data-toggle="dropdown" value="ŠG•¶Žš">
198 <ul class="dropdown-menu dropdown-menu-right" role="menu" id="emoji">
199 <?php echo $sEmote ?>
200 </ul>
201 <input type="reset" value="ƒLƒƒƒ“ƒZƒ‹" class="btn btn-default textpanel pull-left" id="cancel"/>
202 <input type="submit" value="‘—‚é" class="btn btn-default textpanel pull-left" id="send"/>
203 <div class="clearfix"></div>
204 </form>
205 </div>
206 </div>
208 </div> <!--well well-lg-->
209 <?php
210 define('__ROOT__', dirname(dirname(__FILE__)));
211 require __ROOT__.'/include/footer.php';