<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">
password = "456789asd"; //Паролата от config файла на сървъра
$errormsg = ''; //Да има... (Не попълвай.)
// ---/
$servID = 26257; //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 ($ws->connect())
{ //проверяваме дали сървъра е пуснат...
if ($playername == NULL | $code == NULL)
{ //Проверяваме дали полетата са попълнени
$errormsg = '
Попълнете всички полета!
'; //Ако полетата са празни изписва това.
}
else
{
if (mobio_checkcode($servID, $code, 0) == 1)
{ //Проверяваме мобио кода
$ws->doCommandAsConsole("sms $playername 100"); //Съобщаваме на всички, че някой си е купил еди какво си..
$ws->disconnect();
$errormsg = '
Честито (' . $playername . ') успешно закупи 100 Coins в сървъра!
'; //Съобщение за Активирана група...
}
else
{
$errormsg = '
СМС КОДА Е ГРЕШЕН! Опитай отново!
'; //Ако кода е грешен изписва това.
}
}
}
else
{
$errormsg = '
Сървъра е офлайн, моля ела отново когато е пуснат!
'; //Ако сървъра е спрян изписва това..
}
}
?>
<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>
<div class="row marketing">
Изпрати смс на номер 1096 с текст bgmc на цена 6.00лв с ДДС!
<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>
</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 ?>