Initial commit
[2ch-be.git] / dev-test / old_dev / bak / p.php.bak
blob4366b432772d3638d88c88672b5f2e689c2f1943
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";
50    $emoticon = array(
51                                    'amazed' => '::amazed::',
52                                   'cry' => '::cry::',
53                                   'okay' => '::okay::',
54                                   'treasure' => '::treasure::',
55                                   'angry' => '::angry::',
56                                   'gangster' => '::gangster::', 
57                                  'shame' => '::shame::',
58                                  'wink' => '::wink::',
59                                   'annoyed' => '::annoyed::',
60                                   'laugh' => '::laugh::',
61                                   'sick' => '::sick::',
62                                   'blush' => '::blush::',
63                                   'sing' => '::sing::',
64                                   'chocked' => '::chocked::',
65                                   'smile' => '::smile::',
66                                   'confused' => '::confused::',
67                                   'ninja' => '::ninja::',
68                                   'tongue' => '::tongue::',
69                                   'lawyer' => '::lawyer::',
70                                   'guru' => '::guru::',
71   
72                                 );
73                         $ultravariable = array();
74                         foreach ($emoticon as $key => $value) {
75                                 $ultravariable[] = "<li class=\"lialign\"><img src='{$livesitePath}images/{$key}.gif' data-alt='{$value}'></li>";
76                         }
77                         $sEmote = implode("", $ultravariable);
80 <body>
81 <div class="well well-sm pad3">
83         <div class = "nav nav-header">
84 <?php
85 if($_SERVER['SERVER_NAME'] == "be.2ch.net") {
87         <a href="<?php echo $livesitePath ?>" class="pull-right"><img src="<?php echo $livesitePath ?>css/img/2ch_logo.gif"/></a>
88 <?php
89 } elseif ($_SERVER['SERVER_NAME'] == "be.bbspink.com") {
91         <a href="<?php echo $livesitePath ?>" class="pull-right"><img src="<?php echo $livesitePath ?>css/img/pink.png"/></a>
92 <?php
95                 <h5 class="pull-right"> BE 2.0 ƒÀ</h5>
96         </div><!-- nav nav-header-->
98         <hr>
99         <!-- navigation-->
100                 <?php
101                         if (isset($_COOKIE['DMDM']) && isset($_COOKIE['MDMD'])) {
102                                 require '../include/nav.php';
103                         }
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                         <!--button type="button" class="btn btn-default" onClick="window.location.href='status.php?i=<?php echo $uid; ?>'"-->
113                         <!-- <button type="button" class="btn btn-default" onClick="window.location.href='status.php'">
114                                 <span class="glyphicon glyphicon-home"></span>
115                         </button>  -->
116                 </div><!--btn-group-->
117         </div><!--panel panel-default pull-right-->
118 <br><br>
119         <div class="ic panel panel-default pull-left">
120                 <?php echo $icoimg; ?>
121         </div><!--ic panel panel-default pull-left-->
123         <div class="info panel panel-default txt">
124                 <h5><strong>ƒ|ƒCƒ“ƒg:</strong><span class="badge"><?php echo $pts ?></span></h5>
125                 <h5><strong></strong><?php echo $triper ?></h5>
126                 <hr class="hrw">
127                 <h5><strong>�Љ</strong></h5>
128                 <h5 class="just txt">
129                         <?php echo $info ?> 
130                 </h5>
132         </div><!--info panel panel-default-->
133         <?php 
134                 if(!empty($_SESSION['alert'])){
135                         echo $_SESSION['alert'];
136                         $_SESSION['alert'] = '';
137                 }
139         ?>
141         <div class="panel3 panel panel-default" id="SendForm">
142         <form class="form" method="post" action="<?php echo $livesitePath ?>message_proc.php" id="sendMessage">
143                 <input type="hidden" value="<?php echo $uid; ?>" name="zxcvbnm"> <!-- need enc -->
144                 <div class="form-group">
145                         <div class="input-group">
146                         <span class="input-group-addon">Œ�–¼ :</span>
147                         <input type="text" class="form-control" name="subj" required>
148                         <div class="clearfix"></div>
149                </div>
150                 </div>
151                 <!--input type="hidden" value="" name="rec"/> <!--receiver -->
152                 <div class="form-group">
153                         <textarea rows="4" class="form-control top" name="msg" maxlength="250" id="msg"></textarea>
154                 </div>
155                 <div class="btn-group">
156                  <input type="button" class="btn btn-default dropdown-toggle pull-left textpanel" data-toggle="dropdown" value="ŠG•¶Žš">
157                 <ul class="dropdown-menu dropdown-menu-right" role="menu" id="emoji">
158                 <?php echo $sEmote ?>
159                 </ul>
160                 <input type="reset" value="ƒLƒƒƒ“ƒZƒ‹" class="btn btn-default textpanel pull-left" id="cancel"/>
161                 <input type="submit" value="‘—‚é" class="btn btn-default textpanel pull-left" id="send"/>
162         <div class="clearfix"></div>
163         </form>
164         </div>
165         </div>
166         
167 </div> <!--well well-lg-->
168 <?php
169 define('__ROOT__', dirname(dirname(__FILE__))); 
170 require __ROOT__.'/include/footer.php';