<style type="text/css">
.bronze{display:show;}
.silver{display:none;}
.gold{display:none;}
.platinum{display:none;}
</style>
<script type="text/javascript">
top.visible_div_id = 'bronze';
function toggle_visibility(id) {
var old_e = document.getElementById(top.visible_div_id);
var new_e = document.getElementById(id);
if(old_e) {
console.log('old', old_e, 'none');
old_e.style.display = 'none';
}
console.log('new', new_e, 'block');
new_e.style.display = 'block';
top.visible_div_id = id;
}
</script>
<?
echo "<script type=\"text/javascript\">document.getElementById(\"h4\").innerHTML = \"Upgrade your account to VIP user\"</script>
<input type='hidden' id='module_contet' value='Upgrade your account to VIP user'>";
$load_vip_settings = simplexml_load_file('engine/config_mods/get_vip.xml');
$bronze = explode(",",trim($load_vip_settings->bronze));
$silver = explode(",",trim($load_vip_settings->silver));
$gold = explode(",",trim($load_vip_settings->gold));
$platinum = explode(",",trim($load_vip_settings->platinum));
$link_identifier = mssql_connect($core['db_host'], $core['db_user'], $core['db_password']);
mssql_select_db($core['db_name'], $link_identifier);
$exist = $core_db->Execute("Select memb___id from MEMB_INFO where memb___id=?",array($user_auth_id));
if($exist->EOF)
{
mssql_query("INSERT INTO MEMB_INFO(memb___id,AccountExpireDate,AccountLevel) VALUES ('$user_auth_id',NULL,NULL)");
}
if (isset($_POST['get_vip1']))
{
$viptime = htmlspecialchars($_POST['viptime1'],ENT_QUOTES);
$result2 = mssql_query("select credits from CashShopData where AccountID='$user_auth_id'");
$myrow2 = mssql_fetch_array($result2);
if ($viptime == NULL )
{
echo msg('0',"VIP period was not found.");
}
switch($viptime)
{
case '10' : $kredit = $bronze[0];
break;
case '30' : $kredit = $bronze[1];
break;
case '60' : $kredit = $bronze[2];
break;
default : echo msg('0',"VIP period was not found.");
break;
}
if ($myrow2['credits'] < $kredit)
{
echo msg('0',"Not enough credits.");
}
else
{
$select = mssql_query("select AccountLevel,AccountExpireDate,memb___id from MEMB_INFO where memb___id='$user_auth_id'");
$select_req = mssql_fetch_array($select);
$actualDate = time();
$vipEndDate = strtotime($select_req['AccountExpireDate']);
$checkStatus = ($vipEndDate) - ($actualDate);
$result = mssql_query("select AccountLevel from MEMB_INFO where memb___id='$user_auth_id'");
if (mssql_num_rows($result) > 0)
{
$myrow = mssql_fetch_array($result);
if ($checkStatus > 0)
{
echo msg('0',"You have already active VIP status.");
}
else
{
$cas = time()+$viptime*86400;
$small = date("Y-m-d H:i:s",$cas);
mssql_query("update MEMB_INFO set AccountExpireDate='$small',AccountLevel ='1' WHERE memb___id='$user_auth_id'");
mssql_query("update CashShopData set credits= credits-".$kredit." where AccountID='$user_auth_id'");
echo msg('1',"VIP status was successfully bought.");
}
}
}
}
if (isset($_POST['get_vip2']))
{
$viptime = htmlspecialchars($_POST['viptime2'],ENT_QUOTES);
$result2 = mssql_query("select credits from CashShopData where AccountID='$user_auth_id'");
$myrow2 = mssql_fetch_array($result2);
if ($viptime == NULL )
{
echo msg('0',"VIP period was not found.");
}
switch($viptime)
{
case '10' : $kredit = $silver[0];
break;
case '30' : $kredit = $silver[1];
break;
case '60' : $kredit = $silver[2];
break;
default : echo msg('0',"VIP period was not found.");
break;
}
if ($myrow2['credits'] < $kredit)
{
echo msg('0',"No tienes los credits necesarios en tu cuenta.");
}
else
{
$result = mssql_query("select AccountLevel from MEMB_INFO where memb___id='$user_auth_id'");
$select = mssql_query("select AccountLevel,AccountExpireDate,memb___id from MEMB_INFO where memb___id='$user_auth_id'");
$select_req = mssql_fetch_array($select);
$actualDate = time();
$vipEndDate = strtotime($select_req['AccountExpireDate']);
$checkStatus = ($vipEndDate) - ($actualDate);
if (mssql_num_rows($result) > 0)
{
$myrow = mssql_fetch_array($result);
if ($checkStatus > 0)
{
echo msg('0',"Tienes una membresia VIP ya activa.");
}
else
{
$cas = time()+$viptime*86400;
$small = date("Y-m-d H:i:s",$cas);
mssql_query("update MEMB_INFO set AccountExpireDate='$small',AccountLevel ='2' WHERE memb___id='$user_auth_id'");
mssql_query("update CashShopData set credits= credits-".$kredit." where AccountID='$user_auth_id'");
echo msg('1',"¡BIENVENIDO AL CLUB VIP! Tu membresia a sido activada .");
}
}
}
}
if (isset($_POST['get_vip3']))
{
$viptime = htmlspecialchars($_POST['viptime3'],ENT_QUOTES);
$result2 = mssql_query("select credits from CashShopData where AccountID='$user_auth_id'");
$myrow2 = mssql_fetch_array($result2);
if ($viptime == NULL )
{
echo msg('0',"VIP period was not found.");
}
switch($viptime)
{
case '10' : $kredit = $gold[0];
break;
case '30' : $kredit = $gold[1];
break;
case '60' : $kredit = $gold[2];
break;
default : echo msg('0',"VIP period was not found.");
break;
}
if ($myrow2['credits'] < $kredit)
{
echo msg('0',"Not enough credits.");
}
else
{
$result = mssql_query("select AccountLevel from MEMB_INFO where memb___id='$user_auth_id'");
$select_req = mssql_fetch_array($select);
$actualDate = time();
$vipEndDate = strtotime($select_req['AccountExpireDate']);
$checkStatus = ($vipEndDate) - ($actualDate);
if (mssql_num_rows($result) > 0)
{
$myrow = mssql_fetch_array($result);
if ($checkStatus > 0)
{
echo msg('0',"You have already active VIP status.");
}
else
{
$cas = time()+$viptime*86400;
$small = date("Y-m-d H:i:s",$cas);
mssql_query("update MEMB_INFO set AccountExpireDate='$small',Type ='3' WHERE memb___id='$user_auth_id'");
mssql_query("update CashShopData set credits= credits-".$kredit." where AccountID='$user_auth_id'");
echo msg('1',"VIP status was successfully bought.");
}
}
}
}
if (isset($_POST['get_vip4']))
{
$viptime = htmlspecialchars($_POST['viptime4'],ENT_QUOTES);
$result2 = mssql_query("select credits from MEMB_CREDITS where memb___id='$user_auth_id'");
$myrow2 = mssql_fetch_array($result2);
if ($viptime == NULL )
{
echo msg('0',"VIP period was not found.");
}
switch($viptime)
{
case '10' : $kredit = $platinum[0];
break;
case '30' : $kredit = $platinum[1];
break;
case '60' : $kredit = $platinum[2];
break;
default : echo msg('0',"VIP period was not found.");
break;
}
if ($myrow2['credits'] < $kredit)
{
echo msg('0',"Not enough credits.");
}
else
{
$result = mssql_query("select Type from T_VIPList where AccountID='$user_auth_id'");
$select_req = mssql_fetch_array($select);
$actualDate = time();
$vipEndDate = strtotime($select_req['Date']);
$checkStatus = ($vipEndDate) - ($actualDate);
if (mssql_num_rows($result) > 0)
{
$myrow = mssql_fetch_array($result);
if ($checkStatus > 0)
{
echo msg('0',"You have already active VIP status.");
}
else
{
$cas = time()+$viptime*86400;
$small = date("Y-m-d H:i:s",$cas);
mssql_query("update T_VIPList set Date='$small',Type ='4' WHERE AccountID='$user_auth_id'");
mssql_query("update MEMB_CREDITS set credits= credits-".$kredit." where memb___id='$user_auth_id'");
echo msg('1',"VIP status was successfully bought.");
}
}
}
}
?>
<br><br>
<center>
<h1><i class=" fa fa-money" aria-hidden="true"></i> Comprar VIP</h1>
<div class="alert alert-info">
<h2 class="tips-ayudas-color"><i class="fa fa-info-circle" aria-hidden="true"></i> INFORMACIÓN PARA COMPRAR VIP</h2>
<p class="alert-info">
No nos hacemos cargo por el mal uso del modulo:<br><br>
<i class="fa fa-check" aria-hidden="true"></i> Una vez hecha la compra no habra devolucion.<br>
<i class="fa fa-check" aria-hidden="true"></i> Solo podras comprar una opcion de VIP, elegi bien.<br>
<i class="fa fa-check" aria-hidden="true"></i> LOS DIAS VIP SE COMPRAN POR credits o credits2.<br>
<i class="fa fa-check" aria-hidden="true"></i> TODO esta especificado, leer bien antes de efectuar algun movimiento.<br>
</p>
</div>
<form method="post" action="">
<label class="control-label">Tipo de VIP</label>
<select class="form-control" style="width: 120px" name="type" onchange="toggle_visibility(this.value);">
<option value="gold" selected>VIP Gold</option>
<option value="silver" selected>VIP Silver</option>
<option value="bronze" selected>VIP Bronze</option>
</select>
<div id="bronze" class="bronze" align="center" ><br>
<label class="control-label">Tiempo |credits</label>
<form action="" method="post" onsubmit="request("form_vip","sh_","POST","getpage.php?cat=Get-VIP"); return false;" id="form_vip">
<select name="viptime1" class="form-control" style="margin-bottom:10px; width:250px;">
<option value="30">VIP por 30 dias | <? echo $bronze[1];?>credits</option>
<option value="60">VIP por 60 dias | <? echo $bronze[2];?>credits2</option>
</select>
<input class="btn btn-success btn-lg" type="submit" name="get_vip1" value="Adquirir membresia"><br><br>
</form>
</div>
<div id="silver" class="silver" align="center"><br>
<label class="control-label">Tiempo |credits</label>
<form action="" method="post" onsubmit="request("form_vip","sh_","POST","getpage.php?cat=Get-VIP"); return false;" id="form_vip">
<select name="viptime2" class="form-control" style="margin-bottom:10px; width:250px;">
<option value="30">VIP por 30 dias | <? echo $silver[1];?>credits</option>
<option value="60">VIP por 60 dias | <? echo $silver[2];?>credits2</option>
</select>
<input class="btn btn-success btn-lg" type="submit" name="get_vip2" value="Adquirir membresia"><br><br>
</form>
</div>
<div id="gold" class="gold" align="center"><br>
<label class="control-label">Tiempo | <style type="text/css">
.bronze{display:show;}
.silver{display:none;}
.gold{display:none;}
.platinum{display:none;}
</style>
<script type="text/javascript">
top.visible_div_id = 'bronze';
function toggle_visibility(id) {
var old_e = document.getElementById(top.visible_div_id);
var new_e = document.getElementById(id);
if(old_e) {
console.log('old', old_e, 'none');
old_e.style.display = 'none';
}
console.log('new', new_e, 'block');
new_e.style.display = 'block';
top.visible_div_id = id;
}
</script>
<?
echo "<script type=\"text/javascript\">document.getElementById(\"h4\").innerHTML = \"Upgrade your account to VIP user\"</script>
<input type='hidden' id='module_contet' value='Upgrade your account to VIP user'>";
$load_vip_settings = simplexml_load_file('engine/config_mods/get_vip.xml');
$bronze = explode(",",trim($load_vip_settings->bronze));
$silver = explode(",",trim($load_vip_settings->silver));
$gold = explode(",",trim($load_vip_settings->gold));
$platinum = explode(",",trim($load_vip_settings->platinum));
$link_identifier = mssql_connect($core['db_host'], $core['db_user'], $core['db_password']);
mssql_select_db($core['db_name'], $link_identifier);
$exist = $core_db->Execute("Select memb___id from MEMB_INFO where memb___id=?",array($user_auth_id));
if($exist->EOF)
{
mssql_query("INSERT INTO MEMB_INFO(memb___id,AccountExpireDate,AccountLevel) VALUES ('$user_auth_id',NULL,NULL)");
}
if (isset($_POST['get_vip1']))
{
$viptime = htmlspecialchars($_POST['viptime1'],ENT_QUOTES);
$result2 = mssql_query("select credits from CashShopData where AccountID='$user_auth_id'");
$myrow2 = mssql_fetch_array($result2);
if ($viptime == NULL )
{
echo msg('0',"VIP period was not found.");
}
switch($viptime)
{
case '10' : $kredit = $bronze[0];
break;
case '30' : $kredit = $bronze[1];
break;
case '60' : $kredit = $bronze[2];
break;
default : echo msg('0',"VIP period was not found.");
break;
}
if ($myrow2['credits'] < $kredit)
{
echo msg('0',"Not enough credits.");
}
else
{
$select = mssql_query("select AccountLevel,AccountExpireDate,memb___id from MEMB_INFO where memb___id='$user_auth_id'");
$select_req = mssql_fetch_array($select);
$actualDate = time();
$vipEndDate = strtotime($select_req['AccountExpireDate']);
$checkStatus = ($vipEndDate) - ($actualDate);
$result = mssql_query("select AccountLevel from MEMB_INFO where memb___id='$user_auth_id'");
if (mssql_num_rows($result) > 0)
{
$myrow = mssql_fetch_array($result);
if ($checkStatus > 0)
{
echo msg('0',"You have already active VIP status.");
}
else
{
$cas = time()+$viptime*86400;
$small = date("Y-m-d H:i:s",$cas);
mssql_query("update MEMB_INFO set AccountExpireDate='$small',AccountLevel ='1' WHERE memb___id='$user_auth_id'");
mssql_query("update CashShopData set credits= credits-".$kredit." where AccountID='$user_auth_id'");
echo msg('1',"VIP status was successfully bought.");
}
}
}
}
if (isset($_POST['get_vip2']))
{
$viptime = htmlspecialchars($_POST['viptime2'],ENT_QUOTES);
$result2 = mssql_query("select credits from CashShopData where AccountID='$user_auth_id'");
$myrow2 = mssql_fetch_array($result2);
if ($viptime == NULL )
{
echo msg('0',"VIP period was not found.");
}
switch($viptime)
{
case '10' : $kredit = $silver[0];
break;
case '30' : $kredit = $silver[1];
break;
case '60' : $kredit = $silver[2];
break;
default : echo msg('0',"VIP period was not found.");
break;
}
if ($myrow2['credits'] < $kredit)
{
echo msg('0',"No tienes los credits necesarios en tu cuenta.");
}
else
{
$result = mssql_query("select AccountLevel from MEMB_INFO where memb___id='$user_auth_id'");
$select = mssql_query("select AccountLevel,AccountExpireDate,memb___id from MEMB_INFO where memb___id='$user_auth_id'");
$select_req = mssql_fetch_array($select);
$actualDate = time();
$vipEndDate = strtotime($select_req['AccountExpireDate']);
$checkStatus = ($vipEndDate) - ($actualDate);
if (mssql_num_rows($result) > 0)
{
$myrow = mssql_fetch_array($result);
if ($checkStatus > 0)
{
echo msg('0',"Tienes una membresia VIP ya activa.");
}
else
{
$cas = time()+$viptime*86400;
$small = date("Y-m-d H:i:s",$cas);
mssql_query("update MEMB_INFO set AccountExpireDate='$small',AccountLevel ='2' WHERE memb___id='$user_auth_id'");
mssql_query("update CashShopData set credits= credits-".$kredit." where AccountID='$user_auth_id'");
echo msg('1',"¡BIENVENIDO AL CLUB VIP! Tu membresia a sido activada .");
}
}
}
}
if (isset($_POST['get_vip3']))
{
$viptime = htmlspecialchars($_POST['viptime3'],ENT_QUOTES);
$result2 = mssql_query("select credits from CashShopData where AccountID='$user_auth_id'");
$myrow2 = mssql_fetch_array($result2);
if ($viptime == NULL )
{
echo msg('0',"VIP period was not found.");
}
switch($viptime)
{
case '10' : $kredit = $gold[0];
break;
case '30' : $kredit = $gold[1];
break;
case '60' : $kredit = $gold[2];
break;
default : echo msg('0',"VIP period was not found.");
break;
}
if ($myrow2['credits'] < $kredit)
{
echo msg('0',"Not enough credits.");
}
else
{
$result = mssql_query("select AccountLevel from MEMB_INFO where memb___id='$user_auth_id'");
$select_req = mssql_fetch_array($select);
$actualDate = time();
$vipEndDate = strtotime($select_req['AccountExpireDate']);
$checkStatus = ($vipEndDate) - ($actualDate);
if (mssql_num_rows($result) > 0)
{
$myrow = mssql_fetch_array($result);
if ($checkStatus > 0)
{
echo msg('0',"You have already active VIP status.");
}
else
{
$cas = time()+$viptime*86400;
$small = date("Y-m-d H:i:s",$cas);
mssql_query("update MEMB_INFO set AccountExpireDate='$small',Type ='3' WHERE memb___id='$user_auth_id'");
mssql_query("update CashShopData set credits= credits-".$kredit." where AccountID='$user_auth_id'");
echo msg('1',"VIP status was successfully bought.");
}
}
}
}
if (isset($_POST['get_vip4']))
{
$viptime = htmlspecialchars($_POST['viptime4'],ENT_QUOTES);
$result2 = mssql_query("select credits from MEMB_CREDITS where memb___id='$user_auth_id'");
$myrow2 = mssql_fetch_array($result2);
if ($viptime == NULL )
{
echo msg('0',"VIP period was not found.");
}
switch($viptime)
{
case '10' : $kredit = $platinum[0];
break;
case '30' : $kredit = $platinum[1];
break;
case '60' : $kredit = $platinum[2];
break;
default : echo msg('0',"VIP period was not found.");
break;
}
if ($myrow2['credits'] < $kredit)
{
echo msg('0',"Not enough credits.");
}
else
{
$result = mssql_query("select Type from T_VIPList where AccountID='$user_auth_id'");
$select_req = mssql_fetch_array($select);
$actualDate = time();
$vipEndDate = strtotime($select_req['Date']);
$checkStatus = ($vipEndDate) - ($actualDate);
if (mssql_num_rows($result) > 0)
{
$myrow = mssql_fetch_array($result);
if ($checkStatus > 0)
{
echo msg('0',"You have already active VIP status.");
}
else
{
$cas = time()+$viptime*86400;
$small = date("Y-m-d H:i:s",$cas);
mssql_query("update T_VIPList set Date='$small',Type ='4' WHERE AccountID='$user_auth_id'");
mssql_query("update MEMB_CREDITS set credits= credits-".$kredit." where memb___id='$user_auth_id'");
echo msg('1',"VIP status was successfully bought.");
}
}
}
}
?>
<br><br>
<center>
<h1><i class=" fa fa-money" aria-hidden="true"></i> Comprar VIP</h1>
<div class="alert alert-info">
<h2 class="tips-ayudas-color"><i class="fa fa-info-circle" aria-hidden="true"></i> INFORMACIÓN PARA COMPRAR VIP</h2>
<p class="alert-info">
No nos hacemos cargo por el mal uso del modulo:<br><br>
<i class="fa fa-check" aria-hidden="true"></i> Una vez hecha la compra no habra devolucion.<br>
<i class="fa fa-check" aria-hidden="true"></i> Solo podras comprar una opcion de VIP, elegi bien.<br>
<i class="fa fa-check" aria-hidden="true"></i> LOS DIAS VIP SE COMPRAN POR credits o credits2.<br>
<i class="fa fa-check" aria-hidden="true"></i> TODO esta especificado, leer bien antes de efectuar algun movimiento.<br>
</p>
</div>
<form method="post" action="">
<label class="control-label">Tipo de VIP</label>
<select class="form-control" style="width: 120px" name="type" onchange="toggle_visibility(this.value);">
<option value="gold" selected>VIP Gold</option>
<option value="silver" selected>VIP Silver</option>
<option value="bronze" selected>VIP Bronze</option>
</select>
<div id="bronze" class="bronze" align="center" ><br>
<label class="control-label">Tiempo |credits</label>
<form action="" method="post" onsubmit="request("form_vip","sh_","POST","getpage.php?cat=Get-VIP"); return false;" id="form_vip">
<select name="viptime1" class="form-control" style="margin-bottom:10px; width:250px;">
<option value="30">VIP por 30 dias | <? echo $bronze[1];?>credits</option>
<option value="60">VIP por 60 dias | <? echo $bronze[2];?>credits2</option>
</select>
<input class="btn btn-success btn-lg" type="submit" name="get_vip1" value="Adquirir membresia"><br><br>
</form>
</div>
<div id="silver" class="silver" align="center"><br>
<label class="control-label">Tiempo |credits</label>
<form action="" method="post" onsubmit="request("form_vip","sh_","POST","getpage.php?cat=Get-VIP"); return false;" id="form_vip">
<select name="viptime2" class="form-control" style="margin-bottom:10px; width:250px;">
<option value="30">VIP por 30 dias | <? echo $silver[1];?>credits</option>
<option value="60">VIP por 60 dias | <? echo $silver[2];?>credits2</option>
</select>
<input class="btn btn-success btn-lg" type="submit" name="get_vip2" value="Adquirir membresia"><br><br>
</form>
</div>
<div id="gold" class="gold" align="center"><br>
<label class="control-label">Tiempo |credits</label>
<form action="" method="post" onsubmit="request("form_vip","sh_","POST","getpage.php?cat=Get-VIP"); return false;" id="form_vip">
<select name="viptime2" class="form-control" style="margin-bottom:10px; width:250px;">
<option value="30">VIP por 30 dias | <? echo $gold[1];?>credits</option>
<option value="60">VIP por 60 dias | <? echo $gold[2];?>credits2</option>
</select>
<input class="btn btn-success btn-lg" type="submit" name="get_vip3" value="Adquirir membresia"><br><br>
</form>
</div>
</center>
<br>
<ul>
<p></p><b>Ventajas de las Membresias VIP:</b></p>
<p><font color="#CD7F32"><strong>VIP Bronze</strong></font>: +150x exp, +X MasterEXP, +Rates 5%</p>
<p><font color="#CD7F32"><strong>VIP Silver</strong></font>: +250x exp, +X MasterEXP, +Rates 10%</p>
<p><font color="#CD7F32"><strong>VIP Gold</strong></font>: +350x exp, +X MasterEXP, +Rates 15%</p>
<p></ul></label>
<form action="" method="post" onsubmit="request("form_vip","sh_","POST","getpage.php?cat=Get-VIP"); return false;" id="form_vip">
<select name="viptime2" class="form-control" style="margin-bottom:10px; width:250px;">
<option value="30">VIP por 30 dias | <? echo $gold[1];?>credits</option>
<option value="60">VIP por 60 dias | <? echo $gold[2];?>credits2</option>
</select>
<input class="btn btn-success btn-lg" type="submit" name="get_vip3" value="Adquirir membresia"><br><br>
</form>
</div>
</center>
<br>
<ul>
<p></p><b>Ventajas de las Membresias VIP:</b></p>
<p><font color="#CD7F32"><strong>VIP Bronze</strong></font>: +150x exp, +X MasterEXP, +Rates 5%</p>
<p><font color="#CD7F32"><strong>VIP Silver</strong></font>: +250x exp, +X MasterEXP, +Rates 10%</p>
<p><font color="#CD7F32"><strong>VIP Gold</strong></font>: +350x exp, +X MasterEXP, +Rates 15%</p>
<p></ul>