Initial commit
[2ch-be.git] / dev-test / test / pbe.php.bak
blob6d715653c51fd596d96f9d6755ecf0594d409b20
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;
23         }
25 $email = trim($email);
27         $email = filter_var($email, FILTER_SANITIZE_EMAIL);
28         if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
29                 exit;   
30         }
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>";
47         
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::'
72  );
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 if($_SERVER['SERVER_NAME'] == "be.2ch.net") {
88         <a href="<?php echo $livesitePath ?>" class="pull-right"><img src="<?php echo $livesitePath ?>css/img/2ch_logo.gif"/></a>
89 <?php
90 } elseif ($_SERVER['SERVER_NAME'] == "be.bbspink.com") {
92         <a href="<?php echo $livesitePath ?>" class="pull-right"><img src="<?php echo $livesitePath ?>css/img/pink.png"/></a>
93 <?php
96                 <h5 class="pull-right"> BE 2.0 </h5>
97         </div><!-- nav nav-header-->
99         <hr>
100         <!-- navigation-->
101     <?php
102         if (isset($_COOKIE['DMDM']) && isset($_COOKIE['MDMD'])) {
103                 require '../include/nav.php';
104         }
105     ?>
106         <!-- end navigation-->
107         <div class="panel panel-default pull-right">
108                 <div class="btn-group">
109                         <button type="button" class="btn btn-default" id="btnMsg" >
110                                 <span class="glyphicon glyphicon-envelope"></span>
111                         </button>
112                 </div><!--btn-group-->
113         </div><!--panel panel-default pull-right-->
114         <div class="panel panel-default pull-right">
115             <button type="button" class="btn btn-default" id="btnBE">
116                     <span class="glyphicon glyphicon-thumbs-up"></span>
117             </button>
118     </div><!--panel panel-default pull-right-->
120         <br><br>
122         <div class="ic panel panel-default pull-left">
123                 <?php echo $icoimg; ?>
124         </div><!--ic panel panel-default pull-left-->
126         <div class="info panel panel-default txt">
127                 <h5><strong>ƒ|ƒCƒ“ƒg:</strong> <span class="badge"><?php echo $pts ?></span></h5>
128                 <h5><strong></strong><?php echo $triper ?></h5>
130         <hr class="hrw">
132                 <h5><strong>�Љ</strong></h5>
133                 <h5 class="just txt">
134                         <?php echo $info ?> 
135                 </h5>
137         </div><!--info panel panel-default-->
138         <?php 
139             if(!empty($_SESSION['alert'])){
140                 echo $_SESSION['alert'];
141                 $_SESSION['alert'] = '';
142             }
143         ?>
145         <div class="panel3 panel panel-default" id="BEform" style="display: none;">
146                 <form class="form" method="post" action="<?php echo $livesitePath ?>convert_send.php" id="sendMessage">
147                         <div class="form-group">
148                                 <div class="input-group">
149                         <span class="input-group-addon">ƒ|ƒCƒ“ƒg‚ðBE :</span>
150                         <input type="hidden" name="recipient" value="<?php echo $_GET['i']; ?>">
151                         <input type="text" class="form-control" name="points" required>
152                         <div class="clearfix"></div>
153                        </div>
154                         </div>
155                         <!--input type="hidden" value="" name="rec"/> <!--receiver -->
156                         <input type="reset" value="ƒLƒƒƒ“ƒZƒ‹" class="btn btn-default textpanel pull-left" id="cancel"/>
157                         <input type="submit" value="‘¡‚é" name="pTransfer" class="btn btn-default textpanel pull-left" id="send"/>
158                 <div class="clearfix"></div>
159                 </form>
160         </div>
162                 <div class="panel3 panel panel-default" id="SendForm">
163                         <form class="form" method="post" action="<?php echo $livesitePath ?>message_proc.php" id="sendMessage">
164                                 <input type="hidden" value="<?php echo $_GET['i']; ?>" name="zxcvbnm"> <!-- need enc -->
165                                 <div class="form-group">
166                                         <div class="input-group">
167                                 <span class="input-group-addon">Œ�–¼ :</span>
168                                 <input type="text" class="form-control" name="subj" required>
169                                 <div class="clearfix"></div>
170                                </div>
171                                 </div>
172                                 <!--input type="hidden" value="" name="rec"/> <!--receiver -->
173                                 <div class="form-group">
174                                         <textarea rows="4" class="form-control top" name="msg" maxlength="250" id="msg"></textarea>
175                                 </div>
176                                 <div class="btn-group">
177                                  <input type="button" class="btn btn-default dropdown-toggle pull-left textpanel" data-toggle="dropdown" value="ŠG•¶Žš">
178                                 <ul class="dropdown-menu dropdown-menu-right" role="menu" id="emoji">
179                                 <?php echo $sEmote ?>
180                                 </ul>
181                                 <input type="reset" value="ƒLƒƒƒ“ƒZƒ‹" class="btn btn-default textpanel pull-left" id="cancel"/>
182                                 <input type="submit" value="‘—‚é" class="btn btn-default textpanel pull-left" id="send"/>
183                         <div class="clearfix"></div>
184                         </form>
185                 </div>
186         </div>
187         
188 </div> <!--well well-lg-->
189 <?php
190 define('__ROOT__', dirname(dirname(__FILE__))); 
191 require __ROOT__.'/include/footer.php';