2º Sorteo Icom 7610

2º Sorteo ACRACB – Icom 7610

 

 

 

La Asociación Cultural Radioaficionados Costa Blanca pone en marcha su segundo sorteo. 

Se trata de un equipo de radio ICOM 7610 + Altavoz Icom SP-23.

El funcionamiento es el siguiente:

Se pondrán a la venta 1000 números para el sorteo de dicho equipo a 15 € la participación y tendrá 3 números a elegir.

El ganador será aquel cuyo número coincida con las tres últimas cifras del primer premio del sorteo extraordinario de la Loteria Nacional de Navidad del 22 de diciembre de 2018.

El premio será enviado al agraciado, el lunes siguiente al sorteo.

La reserva de números se hace a través de esta web, y tienes tres días para hacer el pago, si no, el número volverá a quedar libre.

Ingresos, Banco Sabadell, en concepto poner: indicativo_Sorteo_ACRACB

Pago con Paypal 16€

Mucha suerte a todos

 {source}
<?php
$max_num=999;
$max_num_ancho=3;
$max_columnas=9;
$dias_pago=3;
$id_rifa=6;
$num_sorteos=1;

$columna=0;
$db = JFactory::getDbo();

$dir_articulo=’/index.php?option=com_content&view=article&id=830′;
$dir_articulo=’/index.php?option=com_content&view=article&id=1066′;
?>

<?php

function obtener_posted_rifa(&$uname,$cambiar_usuario,&$uname_actual) {
$db = JFactory::getDbo();
$user = JFactory::getUser();

$uname=$user->get(‘username’);

$uname = strtoupper($uname);
$uname_actual=$uname;
}

function obtener_session() {
$session =JFactory::getSession();
return $session->getId();
}

$posted_filtro=»;
$posted=»;
obtener_posted_rifa($posted_filtro,»,$posted);
?>

<script language=»javascript» type=»text/javascript»>
function validaremail(valor) {
if (/^(([^<>()[\]\.,;:\s@\»]+(\.[^<>()[\]\.,;:\s@\»]+)*)|(\».+\»))@(([^<>()[\]\.,;:\s@\»]+\.)+[^<>()[\]\.,;:\s@\»]{2,})$/i.test(valor)){
return 1;
} else {
return 0;
}
}

function seleccionar_celda(numero,sorteo) {
var j = jQuery.noConflict();
j.fancybox({
‘width’:400,
‘height’:300,
‘scrolling’: ‘no’,
‘overlayOpacity’:0.1,
‘showCloseButton’: true,
‘content’ : ‘<p><center><b>Ha seleccionado su n&uacute;mero para el sorteo,<br>rellene los datos y pulse en enviar,<br>el n&uacute;mero ser&aacute; guardado <?php echo $dias_pago;?> d&iacute;as hasta su pago.</b></center></p><br><p>Indicativo&nbsp;&nbsp;<input id=»rifa_numero» type=»hidden» value=»‘+numero+'»><input id=»rifa_sorteo» type=»hidden» value=»‘+sorteo+'»><input id=»rifa_indicativo» type=»text» value=»» maxlength=»10″></p><br><p>Email de contacto&nbsp;&nbsp;<input id=»rifa_email» type=»text» value=»»></p><br><p>Tel&eacute;fono de contacto&nbsp;&nbsp;<input id=»rifa_telefono» type=»text» value=»»></p><br><p>N&uacute;mero seleccionado&nbsp;&nbsp;<b>’+numero+'</b>&nbsp;&nbsp;<input type=»button» value=»Solicitar Numero» onclick=»enviar_celda()»></p><br><br><p id=»rifa_msg»></p>’,
‘onClosed’: function() {
window.location.href='<?php echo $dir_articulo;?>’;
}
});
}

function enviar_celda() {
var indicativo = document.getElementById(«rifa_indicativo»).value;
var email = document.getElementById(«rifa_email»).value;
var telefono = document.getElementById(«rifa_telefono»).value;
var numero = document.getElementById(«rifa_numero»).value;
var sorteo = document.getElementById(«rifa_sorteo»).value;

indicativo = indicativo.trim();
email = email.trim();
telefono = telefono.trim();
numero = numero.trim();
sorteo = sorteo.trim();

if ((indicativo.length>0) && (email.length>0) && (telefono.length>0) && (numero.length>0) && (sorteo.length>0) && validaremail(email)) {
llamar_procedimiento_ajax({«rifa_id»:»<?php echo $id_rifa;?>»,»rifa_indicativo»:indicativo,»rifa_email»:email,»rifa_telefono»:telefono,»rifa_numero»:numero,»rifa_sorteo»:sorteo,»ajax_funcion»:»guardar_numero_rifa»,»ajax_actividad»:»0″,»ajax_usuario»:»<?php echo $posted;?>»,»ajax_session»:»<?php echo obtener_session();?>»});
}

}

var ajax_rifa = jQuery.noConflict();
function llamar_procedimiento_ajax(parametros) {
ajax_rifa.ajax({
data: parametros,
url: ‘/app/ajax.php’,
type: ‘post’,
success: function (response) {
var accion=response.trim();
if (accion==’1′) {
ajax_rifa(«#rifa_msg»).html(«<center><span style=’color:green’>Enhorabuena, su numero se ha guardado correctamente, SUERTE !!</span></center>»);
} else {
ajax_rifa(«#rifa_msg»).html(«<center><span style=’color:red’>Ha ocurrido un error, prueba otra vez !!</span></center>»);
}
},error: function (textStatus, errorThrown) {
ajax_rifa(«#rifa_msg»).html(«<center><span style=’color:red’>Ha ocurrido un error en la llamada al servidor, prueba otra vez !!</span></center>»);
}
});
}
</script>

<?php
for($sorteo=1;$sorteo<=$num_sorteos;$sorteo++) {

$sorteo_completo=1;

if ($sorteo>1) {
$sql=»SELECT count(*) existe FROM acracb_rifas where id_rifa=$id_rifa AND num_sorteo=’$sorteo-1′»;
$db->setQuery($sql);
$sorteo_completo=$db->loadResult();
if ($sorteo_completo==$max_num+1) {
$sorteo_completo=1;
} else {
$sorteo_completo=0;
}
}

if ($num_sorteos>1) {
$bloqueado=»»;
if ($sorteo_completo==0) {
$bloqueado=» (Bloqueado hasta que se complete el anterior)»;
}
?>
<h1><u><b>Sorteo N. <?php echo $sorteo.$bloqueado;?></b></u></h1>
<?php
}

?>
<table border=»0″ width=»100%» cellspacing=»5px»>
<?php
for($i=0;$i<=$max_num;$i++){
if ($columna==0) {
?>
<tr width=»100%»>
<?php
}

$valor=trim(strval($i));
$valor=str_pad($valor,$max_num_ancho,»0″,STR_PAD_LEFT);

$sql=»SELECT count(*) existe FROM acracb_rifas where id_rifa=$id_rifa AND num_sorteo=’$sorteo’ AND numero=’$valor'»;
$db->setQuery($sql);
$existe=$db->loadResult();

?>
<td width=»10%»>
<table border=»0″ width=»100%»><tbody>
<?php
$opcion=0; /*0 libre | 1 pedido | 2 pagado*/

if ($existe>0) {
$sql=»SELECT indicativo FROM acracb_rifas where id_rifa=$id_rifa AND num_sorteo=’$sorteo’ AND numero=’$valor'»;
$db->setQuery($sql);
$indicativo=$db->loadResult();

$sql=»SELECT estado FROM acracb_rifas where id_rifa=$id_rifa AND num_sorteo=’$sorteo’ AND numero=’$valor'»;
$db->setQuery($sql);
$estado=$db->loadResult();

if ($estado==’RESERVADO’) {
$opcion=1;
} elseif ($estado==’PAGADO’) {
$opcion=2;
} else {
$opcion=0;
}
}

if ($opcion==0) {$color=»#BEF781″;$cadena=»LIBRE»;}
if ($opcion==1) {$color=»#F3F781″;$cadena=$indicativo;}
if ($opcion==2) {$color=»#F78181″;$cadena=$indicativo;}
?>
<tr bgcolor=»<?php echo $color;?>»>
<?php
if (($opcion==0) and ($sorteo_completo==1)) {
?>
<td width=»100%» align=»center» onclick=»seleccionar_celda(‘<?php echo $valor;?>’,'<?php echo $sorteo;?>’);» style=»cursor: pointer;»><b><?php echo $valor;?></b></td>
<?php
} else {
?>
<td width=»100%» align=»center»><b><?php echo $valor;?></b></td>
<?php
}
?>
</tr>
<tr bgcolor=»<?php echo $color;?>»>
<?php
if (($opcion==0) and ($sorteo_completo==1)) {
?>
<td width=»100%» align=»center» onclick=»seleccionar_celda(‘<?php echo $valor;?>’,'<?php echo $sorteo;?>’);» style=»cursor: pointer;»><?php echo $cadena;?></td>
<?php
} else {
?>
<td width=»100%» align=»center»><?php echo $cadena;?></td>
<?php
}
?>
</tr>
</tbody></table>
</td>
<?php

if ($columna==$max_columnas) {
$columna=0;
?>
</tr>
<?php
} else {
$columna++;
}
}
?>
</table>
<br>
<?php
}
?>
{/source}

Scroll al inicio