2 if (!isset($_COOKIE['DMDM']) && !isset($_COOKIE['MDMD'])) {
3 header('location:index.php');
7 include('encrypt_artist.php');
10 $message = new Message
;
11 $email = Decrypt($_COOKIE['DMDM'],KEY
);
12 // $email = filter_var($email, FILTER_SANITIZE_EMAIL);
14 if(isset($_GET['pay'])){
15 $premiumList = file("/home/adb/imglist.log");
16 $stat = $message->within_str($premiumList[$_GET['pay']], "<stat>", "</stat>");
18 if(isset($premiumList[$_GET['pay']])){
20 $buyerID = trim($message->GetID($_COOKIE['DMDM'],$id_mail_path));
22 $id = $message->within_str($premiumList[$_GET['pay']], "<id>", "</id>");
23 $name = $message->within_str($premiumList[$_GET['pay']], "<name>", "</name>");;
24 $price = $message->within_str($premiumList[$_GET['pay']], "<price>", "</price>");;
25 $writeData = "<time>{$time}</time><id>{$id}</id><name>{$name}</name><price>{$price}</price>\n";
26 $filename = ADB_PATH
."/transaction.log";
28 $points = file_get_contents("http://tpol27.nttec.com/dev/melon.php?conv=".$price."&usr=".$email."&ip=".$_SERVER['REMOTE_ADDR']."&trans=premium&puid=".$buyerID);
31 if (!file_exists($filename)) {
32 if(!file_put_contents($filename,$writeData)) {
37 $handle = fopen($filename, "a");
38 if(!fwrite($handle, $writeData)) {
44 $_SESSION['msg'] = '<div class="alert alert-success">You\'re new avatar is updated.</div>';
49 if(preg_match('/[^a-z_\-0-9._]/i', $ico)){
53 $type = Array(1 => 'gif'); //store all the image extension types in array
54 $ext = explode(".",$ico); //explode and find value after dot
56 if (strlen($ext[0]) <= 0 ) $ico = "nida.gif";
57 if(!(in_array($ext[1],$type))) //check image extension not in the array $type
63 $fdir = substr($email, 0, 1);
64 $sdir = substr($email, 1, 1);
65 $userData = file(DB_PATH
."$fdir/$sdir/$email");
67 for ($i=0; $i < count($userData); $i++
) {
68 $userData[$i] = trim($userData[$i]);
71 $userData[5] = $ico."-PREM";
72 $writeData = implode("\n",$userData);
73 file_put_contents(DB_PATH
."$fdir/$sdir/$email", $writeData);
74 $_SESSION['msg'] = '<div class="alert alert-success">You\'re new avatar is updated.</div>';
75 header('location:status.php');
79 $_SESSION['msg'] = '<div class="alert alert-danger">Not enough points</div>';
80 header("Location: status.php");
86 $_SESSION['msg'] = '<div class="alert alert-danger">Doesn\'t Exist</div>';
87 header("Location: status.php");
95 <meta charset
="UTF-8">
96 <meta http
-equiv
="X-UA-Compatible" content
="IE=edge">
97 <meta name
="viewport" content
="width=device-width, initial-scale=1">
98 <title
>Artist Page
</title
>
99 <link rel
="stylesheet" href
="css/bootstrap.css">
100 <link rel
="stylesheet" href
="css/astyle.css">
104 <div
class="container body">
106 <div
class="col-md-12">
108 <!-- <button
class="btn btn-lg btn-default">FREE
</button
>
109 <button
class="btn btn-lg btn-primary">PAID
</button
> -->
110 <a href
="chooseart.php" class="btn btn-lg btn-default">フリー
</a
>
111 <a href
="chooseart.php?p" class="btn btn-lg btn-primary">有給の
</a
>
114 echo "<h3>無料アバター</h3>";
116 echo "<h3>有料のアバター</h3>";
122 #echo $livesitePath2;
124 if (!isset($_GET['p'])) {
125 $ico = file('ico.txt');
129 $p = (isset($_GET['p'])&&is_numeric($_GET['p']))?
($_GET['p']*20):20;
130 $s = (isset($_GET['p'])&&is_numeric($_GET['p']))?
$p-20:0;
131 print "<div style=\"margin-top:100px\">";
132 for ($i=$s; $i < $p; $i++
)
134 echo "<a href=\"status.php?ico=".$ico[$i]."\"><img src=\"".$livesitePath2."/ico/".$ico[$i]."\" height=\"30\" style=\"margin:5px;\"></a>";
136 print "<div style=\"max-width:500px;margin-top:30px;text-align:center\">";
137 for($t=1;$t<=$c;$t++
)
138 print "<a href=\"choose.php?p=$t\" style=\"margin:5px;padding:5px;display:inline-block\">$t</a>";
143 <div
class="body showcase sizecontrol">
144 <div style
="margin-left:5%;">
146 $points = file_get_contents("http://tpol27.nttec.com/melon.php?email=".$email);
147 echo "<h1>メロンポイント: {$points}</h1>";
149 $file = file("/home/adb/imglist.log");
151 foreach ($file as $key => $value) {
152 if(!$message->within_str($value, "<stat>", "</stat>")){
153 echo '<div class="panel panel-default art">
154 <a class="thumbnail">
155 <img src="'.$livesitePath.'dev-test/premium/'.$message->within_str($value, "<name>", "</name>") .'.gif" style="width:80px; height:80px;" alt="">
158 <span>'.$message->within_str($value, "<price>", "</price>").' MP</span><br><br>
159 <button class="btn btn-success" data-toggle="modal" data-target="#'.$message->within_str($value, "<name>", "</name>") .'">BUY</button><center><br>
160 <div class="clearfix"></div>
164 echo "<div id='".$message->within_str($value, "<name>", "</name>") ."' class='modal fade' tabindex='-1' role='dialog' aria-labelledby='buy' aria-hidden='true'>
165 <div class='modal-dialog'>
166 <div class='modal-content'>
167 <div class='modal-header'>
168 <button type='button' class='close' data-dismiss='modal'>
169 <span aria-hidden='true'>×</span><span class='sr-only'>Close</span>
171 <h3>これと同様にあなたがあなたの新しいBEアバターなるにはするか? </h3>
173 <div class='modal-body'>
174 これは価値がある ".$message->within_str($value, "<price>", "</price>")." メロンポイント
176 <div class='modal-footer'>
177 <a href='chooseart.php?pay=".$premiumBreaker."' class='btn btn-success'>購入</a>
195 <script src
="js/jquery-1.9.1.js"></script
>
196 <script src
="js/bootstrap.js"></script
>