Initial commit
[2ch-be.git] / dev-test / rewrite / test / p.php
blob8622901ac1461aaa0e550d70c2d0823ae7be117b
1 <?php
2 include('../include/config.php');
3 $title = "ƒ^ƒCƒgƒ‹";
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;
25 $email = trim($email);
27 $email = filter_var($email, FILTER_SANITIZE_EMAIL);
28 if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
29 exit;
32 $fdir = substr($email, 0, 1);
33 $sdir = substr($email, 1, 1);
34 $data = @file(DB_PATH."$fdir/$sdir/$email");
35 $ico = trim($data[5]);
36 $pts = trim($data[3]);
37 $info = trim(urldecode($data[6]));
38 $icoimg = "<img src=\"".$livesitePath2."/ico/".$ico."\" height=\"\" class='pic'/>";
39 $triper = '';
40 $tmp_triper = trim($data[7]);
42 if(isset($data[7]) && !empty($data[7]) && !empty($tmp_triper))
43 $triper = "<strong>ƒgƒŠƒbƒv:</strong> �Ÿ{$data[7]}<br>";
44 else
45 $triper = "";
46 //$triper = "<strong>ƒgƒŠƒbƒv:</strong> {$data[7]}<br>";
48 include "../include/header.php";
51 $emoticon = array(
52 'amazed' => '::amazed::',
53 'cry' => '::cry::',
54 'okay' => '::okay::',
55 'treasure' => '::treasure::',
56 'angry' => '::angry::',
57 'gangster' => '::gangster::',
58 'shame' => '::shame::',
59 'wink' => '::wink::',
60 'annoyed' => '::annoyed::',
61 'laugh' => '::laugh::',
62 'sick' => '::sick::',
63 'blush' => '::blush::',
64 'sing' => '::sing::',
65 'chocked' => '::chocked::',
66 'smile' => '::smile::',
67 'confused' => '::confused::',
68 'ninja' => '::ninja::',
69 'tongue' => '::tongue::',
70 'lawyer' => '::lawyer::',
71 'guru' => '::guru::'
74 $ultravariable = array();
75 foreach ($emoticon as $key => $value) {
76 $ultravariable[] = "<li class=\"lialign\"><img src='{$livesitePath}images/{$key}.gif' data-alt='{$value}'></li>";
78 $sEmote = implode("", $ultravariable);
81 <body>
82 <div class="well well-sm pad3">
84 <div class = "nav nav-header">
85 <?php
86 $logo = logo_breaker($_SERVER['SERVER_NAME']);
88 <a href="<?php echo $logo['link'] ?>" target="_BLANK">
89 <img src="<?php echo $livesitePath ?>css/img/<?php echo $logo['image'] ?>">
90 </a>
91 <h5 class="pull-right"> BE 2.0 </h5>
92 </div><!-- nav nav-header-->
94 <hr>
95 <!-- navigation-->
96 <?php
97 if (isset($_COOKIE['DMDM']) && isset($_COOKIE['MDMD'])) {
98 require '../include/nav.php';
101 <!-- end navigation-->
102 <div class="panel panel-default pull-right">
103 <div class="btn-group">
104 <button type="button" class="btn btn-default" id="btnMsg" >
105 <span class="glyphicon glyphicon-envelope"></span>
106 </button>
107 </div><!--btn-group-->
108 </div><!--panel panel-default pull-right-->
109 <div class="panel panel-default pull-right">
110 <button type="button" class="btn btn-default" id="btnBE">
111 <span class="glyphicon glyphicon-thumbs-up"></span>
112 </button>
113 </div><!--panel panel-default pull-right-->
115 <br><br>
117 <div class="ic panel panel-default pull-left">
118 <?php echo $icoimg; ?>
119 </div><!--ic panel panel-default pull-left-->
121 <div class="info panel panel-default txt">
122 <h5><strong>ƒ|ƒCƒ“ƒg:</strong> <span class="badge"><?php echo $pts ?></span></h5>
123 <h5><strong></strong><?php echo $triper ?></h5>
125 <hr class="hrw">
127 <h5><strong>�Љ</strong></h5>
128 <h5 class="just txt">
129 <?php
130 $str = $info;
132 $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);
134 $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);
136 $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);
138 $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);
140 $str = preg_replace("/https?:\/\/twitter\.com\/(\w+)/", "<a href=\"https://twitter.com/$1\" target=\"_blank\" class=\"btn btn-info btn-xs\">@$1</a>", $str);
142 echo $str; ?>
143 </h5>
145 </div><!--info panel panel-default-->
146 <?php
147 if(!empty($_SESSION['alert'])){
148 echo $_SESSION['alert'];
149 $_SESSION['alert'] = '';
153 <div class="panel3 panel panel-default" id="BEform" style="display: none;">
154 <form class="form" method="post" action="<?php echo $livesitePath ?>melontobe.php" id="sendMessage">
155 <div class="form-group">
156 <div class="input-group">
157 <span class="input-group-addon">BEƒ|ƒCƒ“ƒg(—vMP) :</span>
158 <input type="hidden" name="recipient" value="<?php echo $_GET['i']; ?>">
159 <input type="text" class="form-control" name="points" required>
160 <div class="clearfix"></div>
161 </div>
162 </div>
163 <!--input type="hidden" value="" name="rec"/> <!--receiver -->
164 <input type="reset" value="ƒLƒƒƒ“ƒZƒ‹" class="btn btn-default textpanel pull-left" id="cancel"/>
165 <input type="submit" value="‘¡‚é" name="pTransfer" class="btn btn-default textpanel pull-left" id="send"/>
166 <div class="clearfix"></div>
167 </form>
168 </div>
171 <div class="panel3 panel panel-default" id="SendForm">
172 <form class="form" method="post" action="<?php echo $livesitePath ?>message_proc.php" id="sendMessage">
173 <input type="hidden" value="<?php echo $_GET['i']; ?>" name="zxcvbnm"> <!-- need enc -->
174 <div class="form-group">
175 <div class="input-group">
176 <span class="input-group-addon">Œ�–¼ :</span>
177 <input type="text" class="form-control" name="subj" required>
178 <div class="clearfix"></div>
179 </div>
180 </div>
181 <!--input type="hidden" value="" name="rec"/> <!--receiver -->
182 <div class="form-group">
183 <textarea rows="4" class="form-control top" name="msg" maxlength="250" id="msg"></textarea>
184 </div>
185 <div class="btn-group">
186 <input type="button" class="btn btn-default dropdown-toggle pull-left textpanel" data-toggle="dropdown" value="ŠG•¶Žš">
187 <ul class="dropdown-menu dropdown-menu-right" role="menu" id="emoji">
188 <?php echo $sEmote ?>
189 </ul>
190 <input type="reset" value="ƒLƒƒƒ“ƒZƒ‹" class="btn btn-default textpanel pull-left" id="cancel"/>
191 <input type="submit" value="‘—‚é" class="btn btn-default textpanel pull-left" id="send"/>
192 <div class="clearfix"></div>
193 </form>
194 </div>
195 </div>
197 </div> <!--well well-lg-->
198 <?php
199 define('__ROOT__', dirname(dirname(__FILE__)));
200 require __ROOT__.'/include/footer.php';