Initial commit
[2ch-be.git] / dev-test / old_dev / test / p.bak.php
blob64c0bb1656a2315fd75c34115cd03a580bdf2464
1 <?php
2 include('../encrypt.php');
3 $init = new Message;
4 $fObj = new Follower($init);
5 $Ouid = $init->GetID($_COOKIE['DMDM'],$id_mail_path);
6 $uid = trim($_GET['i']);
7 $uid = filter_var($uid,FILTER_SANITIZE_NUMBER_INT);
9 // VALIDATEE
10 if (strlen($uid) != 9){
11 echo "NG";
12 exit;
15 $read = file($id_mail_path);
16 $found = 0;
17 for ($i=0; $i < count($read); $i++) {
18 $udata = explode("<><>", trim($read[$i]));
20 if ($udata[0] == $uid && $found == 0) {
21 $tmp = explode("<><>", $read[$i]);
22 $email = $tmp[1];
23 $found = 1;
26 $email = trim($email);
28 $email = filter_var($email, FILTER_SANITIZE_EMAIL);
29 if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
30 exit;
33 $fdir = substr($email, 0, 1);
34 $sdir = substr($email, 1, 1);
35 $data = @file(DB_PATH."$fdir/$sdir/$email");
36 $ico = trim($data[5]);
37 $pts = trim($data[3]);
38 $info = trim(urldecode($data[6]));
39 $icoimg = "<img src=\"".$livesitePath2."/ico/".$ico."\" height=\"\" class='pic'/>";
40 $triper = '';
42 if(isset($data[7]) && !empty(trim($data[7])))
43 $triper = "<strong>ƒgƒŠƒbƒv:</strong> {$data[7]}<br>";
45 include "../include/header.php";
47 $ultravariable = array();
48 foreach ($emoticon as $key => $value) {
49 $ultravariable[] = "<li class=\"lialign\"><img src='{$livesitePath}images/{$key}.gif' data-alt='{$value}'></li>";
51 $sEmote = implode("", $ultravariable);
54 <body>
55 <div class="well well-sm pad3">
57 <div class = "nav nav-header">
58 <?php
59 if($_SERVER['SERVER_NAME'] == "be.2ch.net") {
61 <a href="<?php echo $livesitePath ?>" class="pull-right"><img src="<?php echo $livesitePath ?>css/img/2ch_logo.gif"/></a>
62 <?php
63 } elseif ($_SERVER['SERVER_NAME'] == "be.bbspink.com") {
65 <a href="<?php echo $livesitePath ?>" class="pull-right"><img src="<?php echo $livesitePath ?>css/img/pink.png"/></a>
66 <?php
69 <h5 class="pull-right"> BE 2.0 ƒÀ</h5>
70 </div><!-- nav nav-header-->
72 <hr>
73 <!-- navigation-->
74 <?php (isset($_COOKIE['DMDM']) && isset($_COOKIE['MDMD'])) ? require '../include/nav.php' : '' ; ?>
75 <!-- end navigation-->
76 <div class="panel panel-default pull-right">
78 <?php
79 // echo $fObj->checkFollow($uid);
81 switch ($fObj->checkFollow($uid)) {
82 case 1:
83 $follow = array('status'=>"is-following", 'btn'=>"btn-success");
84 break;
85 case 0:
86 $follow = array('status'=>"not-following", 'btn'=>"btn-default");
87 break;
89 case "NG":
90 $follow = array('status'=>"not-following", 'btn'=>"btn-default");
91 break;
96 // print_r($follow);
100 if($uid != $Ouid){ ?>
101 <div class="user-actions btn-group <?php echo $follow['status'] ?>">
102 <button type="button" class="btn <?php echo $follow['btn'] ?>" id="btnFollow">
103 <span class="is-following"><span class="glyphicon glyphicon-plus"></span> Following </span>
104 <span class="to-unfollow"><span class="glyphicon glyphicon-plus"></span> Unfollow</span>
105 <span class="to-follow"><span class="glyphicon glyphicon-plus"></span> Follow</span>
106 </button>
107 <button type="button" class="btn btn-default" id="btnMsg" >
108 <span class="glyphicon glyphicon-envelope"></span>
109 </button>
110 </div>
112 <?php } ?>
113 </div><!--panel panel-default pull-right-->
114 <br><br>
115 <div class="ic panel panel-default pull-left">
116 <?php echo $icoimg; ?>
117 </div><!--ic panel panel-default pull-left-->
119 <div class="info panel panel-default txt">
120 <h5><strong>ƒ|ƒCƒ“ƒg:</strong><span class="badge"><?php echo $pts ?></span></h5>
121 <h5><strong></strong><?php echo $triper ?></h5>
122 <hr class="hrw">
123 <h5><strong>�Љ</strong></h5>
124 <h5 class="just txt">
125 <?php echo $info ?>
126 </h5>
128 </div><!--info panel panel-default-->
129 <?php
130 if(!empty($_SESSION['alert'])){
131 echo $_SESSION['alert'];
132 $_SESSION['alert'] = '';
137 <div class="panel3 panel panel-default" id="SendForm">
138 <form class="form" method="post" action="<?php echo $livesitePath ?>message_proc.php" id="sendMessage">
139 <input type="hidden" value="<?php echo $uid; ?>" name="zxcvbnm"> <!-- need enc -->
140 <div class="form-group">
141 <div class="input-group">
142 <span class="input-group-addon">Œ�–¼ :</span>
143 <input type="text" class="form-control" name="subj" required>
144 <div class="clearfix"></div>
145 </div>
146 </div>
147 <!--input type="hidden" value="" name="rec"/> <!--receiver -->
148 <div class="form-group">
149 <textarea rows="4" class="form-control top" name="msg" maxlength="250" id="msg"></textarea>
150 </div>
151 <div class="btn-group">
152 <input type="button" class="btn btn-default dropdown-toggle pull-left textpanel" data-toggle="dropdown" value="ŠG•¶Žš">
153 <ul class="dropdown-menu dropdown-menu-right" role="menu" id="emoji">
154 <?php echo $sEmote ?>
155 </ul>
156 <input type="reset" value="ƒLƒƒƒ“ƒZƒ‹" class="btn btn-default textpanel pull-left" id="cancel"/>
157 <input type="submit" value="‘—‚é" class="btn btn-default textpanel pull-left" id="send"/>
158 <div class="clearfix"></div>
159 </form>
160 </div>
161 </div>
163 </div> <!--well well-lg-->
164 <?php
165 define('__ROOT__', dirname(dirname(__FILE__)));
166 require __ROOT__.'/include/footer.php';