-
-
Save Wohaho/5ff3051d671798bc00cf842b9eaa449f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /* Template Name: VIP */ | |
get_header(); ?> | |
<div id="content"> | |
<div id="inner-content" class="wrap clearfix"> | |
<div id="main" class="ninecol first clearfix" role="main"> | |
<div class="inner-bg"> | |
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?> role="article" itemscope itemtype="http://schema.org/BlogPosting"> | |
<header class="article-header"> | |
<h1 class="page-title" itemprop="headline"><?php the_title(); ?></h1> | |
</header> <?php // end article header ?> | |
<section class="entry-content clearfix" itemprop="articleBody"> | |
<?php the_content(); ?> | |
</section> <?php // end article section ?> | |
<footer class="article-footer"> | |
<?php | |
require_once("WebsenderAPI.php"); // Load Library | |
$wsr = new WebsenderAPI("217.182.41.72:25915","456789asd","9876"); // HOST , PASSWORD , PORT | |
// ---/ | |
$servID = 26578; //ID на услуга от Mobio.bg | |
// Функция за връзка с mobio.bg | |
function mobio_checkcode($servID, $code, $debug = 0) | |
{ | |
$res_lines = file("http://www.mobio.bg/code/checkcode.php?servID=$servID&code=$code"); | |
$ret = 0; | |
if ($res_lines) | |
{ | |
if (strstr("PAYBG=OK", $res_lines[0])) | |
{ | |
$ret = 1; | |
} | |
else | |
{ | |
if ($debug) echo $line . "\n"; | |
} | |
} | |
else | |
{ | |
if ($debug) echo "Unable to connect to mobio.bg server.\n"; | |
$ret = 0; | |
} | |
return $ret; | |
} | |
// Заявката | |
if (isset($_POST['submit'])) | |
{ | |
$code = htmlspecialchars(addslashes(trim($_POST['code']))); | |
$playername = htmlspecialchars(addslashes($_POST['playername'])); | |
if ($wsr->connect()) | |
{ //проверяваме дали сървъра е пуснат... | |
if ($playername == NULL | $code == NULL) | |
{ //Проверяваме дали полетата са попълнени | |
$errormsg = '<div class="alert alert-danger" role="alert">Попълнете всички полета!</div>'; //Ако полетата са празни изписва това. | |
} | |
else | |
{ | |
if (mobio_checkcode($servID, $code, 0) == 1) | |
{ //Проверяваме мобио кода | |
$wsr->sendCommand("pex user $playername group set V.I.P spawn"); //Съобщаваме на всички, че някой си е купил еди какво си.. | |
$wsr->sendCommand("pex user $playername group set V.I.P gamemode"); //Съобщаваме на всички, че някой си е купил еди какво си.. | |
$wsr->sendCommand("bc &f&l$playername&r &6Закупи ранг V.I.P"); //Съобщаваме на всички, че някой си е купил еди какво си.. | |
$wsr->sendCommand("bc &6Закупите го и Вие от нашият сайт!"); //Съобщаваме на всички, че някой си е купил еди какво си.. | |
$wsr->sendCommand("bc &6https://bg-mc.info/store/"); //Съобщаваме на всички, че някой си е купил еди какво си.. | |
$wsr->disconnect(); | |
$errormsg = '<div class="alert alert-success" role="alert">Честито <font color="black">(' . $playername . ')</font> успешно закупи <font color="orange">RANK V.I.P</font> в Creative Server-a</div>'; //Съобщение за Активирана група... | |
} | |
else | |
{ | |
$errormsg = '<div class="alert alert-danger" role="alert">СМС КОДА Е ГРЕШЕН! Опитай отново!</div>'; //Ако кода е грешен изписва това. | |
} | |
} | |
} | |
else | |
{ | |
$errormsg = '<div class="alert alert-danger" role="alert">Сървъра е офлайн, моля ела отново когато е пуснат!</div>'; //Ако сървъра е спрян изписва това.. | |
} | |
} | |
?> | |
<!DOCTYPE html> | |
<html lang="bg"> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
.myButton { | |
background-color:#44c767; | |
-moz-border-radius:28px; | |
-webkit-border-radius:28px; | |
border-radius:28px; | |
border:1px solid #18ab29; | |
display:inline-block; | |
cursor:pointer; | |
color:#ffffff; | |
font-family:Arial; | |
font-size:17px; | |
padding:10px 20px; | |
text-decoration:none; | |
text-shadow:0px 1px 0px #2f6627; | |
} | |
.myButton:hover { | |
background-color:#5cbf2a; | |
} | |
.myButton:active { | |
position:relative; | |
top:1px; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="row marketing"> | |
<center> <div class="alert alert-warning" role="alert">Изпрати смс на номер <font color="red">1094</font> с текст <font color="red">bgmc</font> на цена 4,80лв с ДДС!</div> | |
<form method="post" action=""> | |
<div class="form-group"> | |
<label for="playername">Име в сървъра: <font color="red">*</font></label> | |
<input type="text" class="form-control" name="playername" placeholder="Моля бъди точен!"> | |
<br> </br> | |
</div> | |
<div class="form-group"> | |
<label for="smscode">СМС Код <font color="red">*</font></label> | |
<input type="text" class="form-control" name="code" placeholder="Моля бъди точен!"> | |
</div> | |
<br> </br> | |
<input type="submit" class="myButton" name="submit" value="Изпълни" /></center> | |
</form> | |
<br /> | |
<?php echo $errormsg; //Показване на грешките или успешните.. ?> | |
</div> | |
</body> | |
</html> | |
</footer> <?php // end article footer ?> | |
<?php // comments_template(); ?> | |
</article> <?php // end article ?> | |
<?php endwhile; else : ?> | |
<article id="post-not-found" class="hentry clearfix"> | |
<header class="article-header"> | |
<h1><?php _e( 'Oops, Post Not Found!', 'bonestheme' ); ?></h1> | |
</header> | |
<section class="entry-content"> | |
<p><?php _e( 'Uh Oh. Something is missing. Try double checking things.', 'bonestheme' ); ?></p> | |
</section> | |
<footer class="article-footer"> | |
<p><?php _e( 'This is the error message in the page.php template.', 'bonestheme' ); ?></p> | |
</footer> | |
</article> | |
<?php endif; ?> | |
</div> <?php //end .inner-bg ?> | |
<div class="creepy-content-border creepy-3d-border"><span class="border-left"></span><span class="border-middle"><span></span></span><span class="border-right"></span></div> | |
</div> <?php // end #main ?> | |
<?php get_sidebar(); ?> | |
</div> <?php // end #inner-content ?> | |
<div class='creepy-main-border creepy-3d-border wrap'> | |
<span class="border-left"></span><span class="border-middle"><span></span></span><span class="border-right"></span> | |
</div> | |
</div> <?php // end #content ?> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment