Файл: Source/pages/smspoints.php
Строк: 343
<?php
/*
* Script name: Points4Prize
* Author: Soft Projects
* Date created: 15/07/2015
*/
require_once 'inc/header.php';
if (!isset($_SESSION['logged_in'])) {
header('Location: /login');
exit();
}
if (isset($_SESSION['user'], $_SESSION['pass'])) {
$user = str_replace(" ", "", $_SESSION['user']);
$user = sprintf("%s", mysql_real_escape_string($user));
} else {
$user = str_replace(" ", "", $_COOKIE['user']);
$user = sprintf("%s", mysql_real_escape_string($user));
}
$result = mysql_query("SELECT * FROM vn_users WHERE user='{$user}'") or die(mysql_error());
$row = mysql_fetch_array($result);
$mail = $row['email'];
$USERID = $row['id'];
$description = $row['about'];
$points = number_format($row['points'], 0, ',', ' ');
$query31 = mysql_query("SELECT count(id) as sms from `vn_sms` WHERE `userid` = '".$row['id']."'");
$row1 = mysql_fetch_array($query31);
$xaxa = $row1['sms'];
if ($row1['sms'] > 1) {
$sms = $xaxa;
} else {
$sms = $xaxa;
}
$regdate = date("j.F.Y", $row['regtime']);
if (empty($row['avatar'])) {
$avatar = "uploads/avatars/noavatar.png";
} else {
$avatar = $row['avatar'];
}
$result2 = mysql_query("SELECT forw FROM vn_messages WHERE forw='{$user}' and readed='0'") or die(mysql_error());
$countm = mysql_num_rows($result2);
if ($countm > 0) {
$countm = "<b>$countm</b>";
} else {
$countm = $countm;
}
?>
<body class="no-slider">
<!-- <body class="has-top-menu"> -->
<!-- BEGIN #slider-imgs -->
<div id="slider-imgs">
<div class="featured-img-box">
<div id="featured-img-1" class="featured-img"></div>
<div id="featured-img-2" class="featured-img invisible"></div>
<div id="featured-img-3" class="featured-img invisible"></div>
<div id="featured-img-4" class="featured-img invisible"></div>
</div>
<!-- END #slider-imgs -->
</div>
<!-- BEGIN #top-layer -->
<div id="top-layer">
<div id="header-top">
<?php
require_once 'inc/header_top.php';
?>
</div>
<section id="content">
<header id="header">
<div id="menu-bottom">
<?php
require_once 'inc/menu_bottom.php';
?>
</div>
<div class="wrapper">
<div class="header-breadcrumbs">
<?php require_once 'inc/stats.php';
?>
</div>
</div>
</header>
<br />
<br />
<div id="main-box" class="full-width">
<div id="main">
<!-- BEGIN .user-profile -->
<div class="user-profile">
<div class="profile-shadow"></div>
<!-- BEGIN .profile-left-side -->
<div class="profile-left-side">
<div class="the-profile-top">
<div class="profile-user-name">
<h1><?php echo $user;?></h1>
<div class="sttaa"><a href="/pm">Messages <b>(<?php echo $countm;?>)</b></a></div>
</div>
<div class="avatar online">
<div class="avatar-button"><a href="/avatar"><i class="fa fa-camera-retro"></i>Change avatar</a></div>
<img src="<?php echo $avatar;?>" class="setborder" style="width:100%;" alt="" />
</div>
<div class="user-panel-about">
<div>
<b><i class="fa fa-male"></i>Description</b>
<p>
<?php
if (empty($description)) {
$description = "None";
} else {
$description = htmlentities($description, ENT_COMPAT, 'UTF-8');
$description = $description;
$description = str_replace(":)", " <img border='0'src='assets/img/emoticons/01.gif'> ", "$description");
$description = str_replace(":(", " <img border='0'src='assets/img/emoticons/02.gif'> ", "$description");
$description = str_replace(":D", " <img border='0'src='assets/img/emoticons/03.gif'> ", "$description");
$description = str_replace("8-)", " <img border='0'src='assets/img/emoticons/04.gif'> ", "$description");
$description = str_replace(":O", " <img border='0'src='assets/img/emoticons/05.gif'> ", "$description");
$description = str_replace(";)", " <img border='0'src='assets/img/emoticons/06.gif'> ", "$description");
$description = str_replace(";(", " <img border='0'src='assets/img/emoticons/07.gif'> ", "$description");
$description = str_replace("(sweat)", " <img border='0'src='assets/img/emoticons/08.gif'> ", "$description");
$description = str_replace(":|", " <img border='0'src='assets/img/emoticons/09.gif'> ", "$description");
$description = str_replace(":*", " <img border='0'src='assets/img/emoticons/10.gif'> ", "$description");
$description = str_replace(":p", " <img border='0'src='assets/img/emoticons/11.gif'> ", "$description");
$description = str_replace("(blush)", " <img border='0'src='assets/img/emoticons/12.gif'> ", "$description");
$description = str_replace(":^)", " <img border='0'src='assets/img/emoticons/13.gif'> ", "$description");
$description = str_replace(":-)", " <img border='0'src='assets/img/emoticons/14.gif'> ", "$description");
$description = str_replace(":-(", " <img border='0'src='assets/img/emoticons/15.gif'> ", "$description");
$description = str_replace("(love)", " <img border='0'src='assets/img/emoticons/16.gif'> ", "$description");
$description = str_replace("(inlove)", " <img border='0'src='assets/img/emoticons/16.gif'> ", "$description");
$description = str_replace(":_)", " <img border='0'src='assets/img/emoticons/17.gif'> ", "$description");
$description = str_replace("(talk)", " <img border='0'src='assets/img/emoticons/18.gif'> ", "$description");
$description = str_replace("(yawn)", " <img border='0'src='assets/img/emoticons/19.gif'> ", "$description");
$description = str_replace("(puke)", " <img border='0'src='assets/img/emoticons/20.gif'> ", "$description");
$description = str_replace("(doh)", " <img border='0'src='assets/img/emoticons/21.gif'> ", "$description");
$description = str_replace(":@", " <img border='0'src='assets/img/emoticons/22.gif'> ", "$description");
$description = str_replace("@", " <img border='0'src='assets/img/emoticons/22.gif'> ", "$description");
$description = str_replace(";@", " <img border='0'src='assets/img/emoticons/22.gif'> ", "$description");
$description = str_replace("(wasntme)", " <img border='0'src='assets/img/emoticons/23.gif'> ", "$description");
$description = str_replace("(party)", " <img border='0'src='assets/img/emoticons/24.gif'> ", "$description");
$description = str_replace(":s", " <img border='0'src='assets/img/emoticons/25.gif'> ", "$description");
$description = str_replace("(mm)", " <img border='0'src='assets/img/emoticons/26.gif'> ", "$description");
$description = str_replace("8-|", " <img border='0'src='assets/img/emoticons/27.gif'> ", "$description");
$description = str_replace(":x", " <img border='0'src='assets/img/emoticons/28.gif'> ", "$description");
$description = str_replace("(wave)", " <img border='0'src='assets/img/emoticons/29.gif'> ", "$description");
$description = str_replace("(hi)", " <img border='0'src='assets/img/emoticons/29.gif'> ", "$description");
$description = str_replace("(devil)", " <img border='0'src='assets/img/emoticons/31.gif'> ", "$description");
$description = str_replace("(hug)", " <img border='0'src='assets/img/emoticons/35.gif'> ", "$description");
$description = str_replace("(thing)", " <img border='0'src='assets/img/emoticons/39.gif'> ", "$description");
$description = str_replace("(rofl)", " <img border='0'src='assets/img/emoticons/41.gif'> ", "$description");
$description = str_replace("(whew)", " <img border='0'src='assets/img/emoticons/42.gif'> ", "$description");
$description = str_replace("(happy)", " <img border='0'src='assets/img/emoticons/43.gif'> ", "$description");
$description = str_replace("(punch)", " <img border='0'src='assets/img/emoticons/47.gif'> ", "$description");
$description = str_replace("(skype)", " <img border='0'src='assets/img/emoticons/52.gif'> ", "$description");
$description = str_replace("(h)", " <img border='0'src='assets/img/emoticons/53.gif'> ", "$description");
$description = str_replace("(u)", " <img border='0'src='assets/img/emoticons/54.gif'> ", "$description");
$description = str_replace("(rain)", " <img border='0'src='assets/img/emoticons/57.gif'> ", "$description");
$description = str_replace("(sun)", " <img border='0'src='assets/img/emoticons/58.gif'> ", "$description");
$description = str_replace("(o)", " <img border='0'src='assets/img/emoticons/59.gif'> ", "$description");
$description = str_replace("(mp)", " <img border='0'src='assets/img/emoticons/62.gif'> ", "$description");
$description = str_replace("(pi)", " <img border='0'src='assets/img/emoticons/64.gif'> ", "$description");
$description = str_replace("(^)", " <img border='0'src='assets/img/emoticons/67.gif'> ", "$description");
$description = str_replace("(beer)", " <img border='0'src='assets/img/emoticons/68.gif'> ", "$description");
$description = str_replace("(d)", " <img border='0'src='assets/img/emoticons/69.gif'> ", "$description");
$description = str_replace("(drunk)", " <img border='0'src='assets/img/emoticons/75.gif'> ", "$description");
$description = str_replace("(flag:bg)", " <img border='0'src='assets/img/emoticons/77.gif'> ", "$description");
$description = str_replace("(bg)", " <img border='0'src='assets/img/emoticons/77.gif'> ", "$description");
$description = str_replace("(headbang)", " <img border='0'src='assets/img/emoticons/79.gif'> ", "$description");
$description = str_replace("(mooning)", " <img border='0'src='assets/img/emoticons/80.gif'> ", "$description");
$description = str_replace("(poolparty)", " <img border='0'src='assets/img/emoticons/81.gif'> ", "$description");
$description = str_replace("(smoke)", " <img border='0'src='assets/img/emoticons/83.gif'> ", "$description");
$description = str_replace("<plaintext></plaintext>", " <img border='0'src='assets/img/emoticons/01.gif'> ", "$description");
$description = str_replace("<plaintext>", " <img border='0'src='assets/img/emoticons/01.gif'> ", "$description");
$description = str_replace("</plaintext>", " <img border='0'src='assets/img/emoticons/01.gif'> ", "$description");
$description = str_replace("alert", " <img border='0'src='assets/img/emoticons/01.gif'> ", "$description");
$description = str_replace("<table>", " <img border='0'src='assets/img/emoticons/01.gif'> ", "$description");
$description = str_replace("<div>", " <img border='0'src='assets/img/emoticons/01.gif'> ", "$description");
$description = str_replace("<fieldset>", " <img border='0'src='assets/img/emoticons/01.gif'> ", "$description");
$description = str_replace("<script>", " <img border='0'src='assets/img/emoticons/01.gif'> ", "$description");
$description = str_replace("<body>", " <img border='0'src='assets/img/emoticons/01.gif'> ", "$description");
}
echo $description;
?>
</p>
</div>
<style>
.maibaton{
font-family: "Cuprum",sans-serif;
text-transform: uppercase;
font-size: 13px;
font-weight: bold;
width:100%;padding:9px;color:#4D4D4D;border:0px;backround:#EAEAEA;
}
</style>
</div>
<div>
<ul class="user-button-list">
<li><a href="/cp" class="defbutton profile-button"><i class="fa fa-user"></i>Profile</a></li>
<li><a href="/messages" class="defbutton profile-button"><i class="fa fa-comment"></i>Mesagess</a></li>
<li><a href="/getprize" class="defbutton profile-button"><i class="fa fa-gift"></i>Get Prize</a></li>
<li><a href="/smspoints" class="defbutton profile-button"><i class="fa fa-mobile"></i>SMS Points</a></li>
<li><a href="/settings" class="defbutton profile-button"><i class="fa fa-cog"></i>Settings</a></li>
<li><a href="/logout" class="defbutton profile-button"><i class="fa fa-toggle-on"></i>Logout</a></li>
</ul>
</div>
</div>
<!-- END .profile-left-side -->
</div>
<!-- BEGIN .profile-right-side -->
<div class="profile-right-side">
<!-- BEGIN .content-padding -->
<div class="content-padding">
<div>
<div>
<h2 style="margin-left:-30px;"><span>SMS points</span></h2>
<br />
<div >
<?php
$info = mysql_query("SELECT * FROM `pages` WHERE `title`= 'smspoints' ORDER BY id DESC LIMIT 1");
$row = mysql_fetch_array($info);
if (empty($row)) {
echo "<div class='alert alert-danger'>Please, add info in admin panel.</div>";
} else {
$row['content'] = str_replace("{username}", $user, $row['content'] );
$row['content'] = str_replace("<p>", "<p style='color:#FFF;'>", $row['content'] );
echo html_entity_decode($row['content']);
}
?>
<div>
</div>
<!-- END .content-padding -->
</div>
<!-- END .profile-right-side -->
</div>
<div class="clear-float"></div>
<!-- END .user-profile -->
</div>
</div>
<div class="clear-float"></div>
</div>
</div>
</div>
<?php
require_once 'inc/footer.php';
?>