Initial commit
[2ch-be.git] / dev-test / test / pmelon.php.bak
blob609909484c5bd7fdb0bd7a4681f4971932c5258e
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-->
115     <!--panel panel-default pull-right-->
117         <div class="panel panel-default pull-right">
118                 <button type="button" class="btn btn-default" id="btnMelon">
119                         <span class="glyphicon glyphicon-gift"></span>
120                 </button>
121         </div><!--panel panel-default pull-right-->
122         <br><br>
124         <div class="ic panel panel-default pull-left">
125                 <?php echo $icoimg; ?>
126         </div><!--ic panel panel-default pull-left-->
128         <div class="info panel panel-default txt">
129                 <h5><strong>ƒ|ƒCƒ“ƒg:</strong> <span class="badge"><?php echo $pts ?></span></h5>
130                 <h5><strong></strong><?php echo $triper ?></h5>
132         <hr class="hrw">
134                 <h5><strong>�Љ</strong></h5>
135                 <h5 class="just txt">
136                         <?php echo $info ?> 
137                 </h5>
139         </div><!--info panel panel-default-->
140         <?php 
141             if(!empty($_SESSION['alert'])){
142                 echo $_SESSION['alert'];
143                 $_SESSION['alert'] = '';
144             }
145         ?>
148         <div class="panel3 panel panel-default" id="melonForm" style="display: none;">
149                 <form class="form" method="post" action="<?php echo $livesitePath ?>transfer.php" id="sendMessage">
150                         <div class="form-group">
151                                 <div class="input-group">
152                         <span class="input-group-addon">ƒ�ƒ�ƒ“ƒ|ƒCƒ“ƒg :</span>
153                         <input type="hidden" name="recipient" value="<?php echo $_GET['i']; ?>">
154                         <input type="text" class="form-control" name="points" required>
155                         <div class="clearfix"></div>
156                        </div>
157                         </div>
158                         <!--input type="hidden" value="" name="rec"/> <!--receiver -->
159                         <input type="reset" value="ƒLƒƒƒ“ƒZƒ‹" class="btn btn-default textpanel pull-left" id="cancel"/>
160                         <input type="submit" value="‘¡‚é" name="pTransfer" class="btn btn-default textpanel pull-left" id="send"/>
161                 <div class="clearfix"></div>
162                 </form>
163         </div>
165                 <div class="panel3 panel panel-default" id="SendForm">
166                         <form class="form" method="post" action="<?php echo $livesitePath ?>message_proc.php" id="sendMessage">
167                                 <input type="hidden" value="<?php echo $_GET['i']; ?>" name="zxcvbnm"> <!-- need enc -->
168                                 <div class="form-group">
169                                         <div class="input-group">
170                                 <span class="input-group-addon">Œ�–¼ :</span>
171                                 <input type="text" class="form-control" name="subj" required>
172                                 <div class="clearfix"></div>
173                                </div>
174                                 </div>
175                                 <!--input type="hidden" value="" name="rec"/> <!--receiver -->
176                                 <div class="form-group">
177                                         <textarea rows="4" class="form-control top" name="msg" maxlength="250" id="msg"></textarea>
178                                 </div>
179                                 <div class="btn-group">
180                                  <input type="button" class="btn btn-default dropdown-toggle pull-left textpanel" data-toggle="dropdown" value="ŠG•¶Žš">
181                                 <ul class="dropdown-menu dropdown-menu-right" role="menu" id="emoji">
182                                 <?php echo $sEmote ?>
183                                 </ul>
184                                 <input type="reset" value="ƒLƒƒƒ“ƒZƒ‹" class="btn btn-default textpanel pull-left" id="cancel"/>
185                                 <input type="submit" value="‘—‚é" class="btn btn-default textpanel pull-left" id="send"/>
186                         <div class="clearfix"></div>
187                         </form>
188                 </div>
189         </div>
190         
191 </div> <!--well well-lg-->
192 <?php
193 define('__ROOT__', dirname(dirname(__FILE__))); 
194 require __ROOT__.'/include/footer.php';