<td style="font-size:18px;" align="right">' . pols($total_moneda) . '</td> <td>' . MONEDA . $cuadrar . '</td> </tr> <tr> <td colspan="3" valign="top"> <h2>Los más ricos:</h2><ol>'; arsort($ricos); $extra = ''; foreach ($ricos as $info => $pols_total) { $num++; if ($pols_total > 0 and $num <= 25) { $nick = explodear(':', $info, 0); $pais = explodear(':', $info, 1); // $extra = pols($pols_total).' '; $txt .= '<li>' . MONEDA . ' <b class="big">' . $extra . '' . crear_link($nick, 'nick', 'ciudadano', $pais) . '</b></li>'; } } $txt .= '</ol> </td> <td colspan="6" valign="top"> <h2>Deudores:</h2><ol>'; $result = mysql_query("SELECT pols, pais, nick FROM users WHERE pols < 0 ORDER BY pols ASC"); while ($r = mysql_fetch_array($result)) { $txt .= '<li>' . pols($r['pols']) . ' ' . MONEDA . ' <b class="big">' . crear_link($r['nick'], 'nick', 'ciudadano', $r['pais']) . '</b></li>';
<span id="time_expire"> <b>Duración</b>: <input type="text" name="time_expire" value="' . (isset($edit['ID']) ? round($edit['duracion'] / 3600) : '24') . '" style="text-align:right;width:50px;" /> <select name="time_expire_tipo"> <option value="3600" selected="selected">horas</option> <option value="86400">días</option> </select></span> <span id="cargo_form" style="display:none;"> <b>Cargo</b>: <select name="cargo">'; $sel['cargo'][explodear('|', $edit['ejecutar'], 0)] = ' selected="selected"'; $result = mysql_query("SELECT cargo_ID, nombre FROM cargos ORDER BY nivel DESC", $link); while ($r = mysql_fetch_array($result)) { $txt .= '<option value="' . $r['cargo_ID'] . '"' . $sel['cargo'][$r['cargo_ID']] . '>' . $r['nombre'] . '</option>'; } $txt .= ' </select><br /> Ciudadano: <input type="text" name="nick" value="" size="10" /></span> <br /><span id="votos_expire"> <b>Finalizar con</b>: <input type="text" name="votos_expire" value="' . ($edit['votos_expire'] ? $edit['votos_expire'] : '') . '" size="1" maxlength="5" style="text-align:right;" /> votos</span><br /> <span id="tipo_voto"> <b>Tipo de voto</b>: <select name="tipo_voto">
<?php include 'inc-login.php'; // carga config $result = mysql_query("SELECT valor, dato FROM " . SQL . "config WHERE autoload = 'no'", $link); while ($row = mysql_fetch_array($result)) { $pol['config'][$row['dato']] = $row['valor']; } /* pol_mercado (ID, user_ID, title, descripcion, pols ,tipo, time, estado) pol_pujas (ID, mercado_ID, user_ID, pols, time) */ if ($_GET['a'] == 'editar') { if ($pol['user_ID'] == $pol['config']['pols_fraseedit']) { $url = str_replace("http://", "", explodear("\"", $pol['config']['pols_frase'], 1)); $frase = explodear("<", explodear(">", $pol['config']['pols_frase'], 1), 0); $txt .= '<div class="azul"><h2>"la frase"</h2> <form action="/accion.php?a=mercado&b=editarfrase" method="post"> <table border="0"><tr> <td align="right">Texto: <input value="' . $frase . '" type="text" name="frase" size="50" maxlength="70" /><br /> http://<input type="text" name="url" size="50" maxlength="150" value="' . $url . '" /></td><td> ' . boton('Editar', 'submit', false, 'blue') . ' </form></b></td></tr> <tr><td align="right"> <form action="/accion.php?a=mercado&b=cederfrase" method="post"> Ceder al Ciudadano: <input type="text" name="nick" size="14" maxlength="20" value="" /> </td><td> ' . boton('Ceder', 'submit', false, 'small pill') . ' </form> </td></tr></table>
if (!ASAMBLEA) { $txt .= ' <td class="amarillo" width="50%" valign="top"> <h1 style="color:red;">Presidenciales en ' . $queda['pres'] . '</h1>'; $tabla = ''; $chart_dato = ''; $chart_nom = ''; $tabla_final = ''; $result = mysql_query("SELECT time, tipo, num_votantes, escrutinio, num_votos\r\nFROM " . SQL . "elec \r\nWHERE tipo = 'pres'\r\nORDER BY time DESC LIMIT 1", $link); while ($r = mysql_fetch_array($result)) { $votos_total = $r['num_votos']; $txt .= '<p style="text-align:center;margin-top:8px;"><b>' . num($votos_total) . '</b> votos de <em>' . num($r['num_votantes']) . '</em>, participación: <b>' . num($votos_total * 100 / $r['num_votantes'], 2) . '%</b></p>'; // formato: candidato1|candidato1#escrutinio if ($r['escrutinio']) { if ($pol['config']['elecciones'] == 'pres2') { $r['escrutinio'] = explodear("#", $r['escrutinio'], 1); $tabla .= '<tr><td colspan="4" align="center"><b>Escrutinio de la Primera Vuelta:</b></td></tr>'; } // genera escrutinio en tabla $m = explode("|", $r['escrutinio']); $votos_total = 0; foreach ($m as $t) { $t = explode(":", $t); if ($t[1] != 'I' and $t[1] != 'B') { $votos_total += $t[0]; } } foreach ($m as $t) { $t = explode(":", $t); if ($t[1] == 'B') { // if ($chart_dato) { $chart_dato .= ','; } $chart_dato .= $t[0];
} unset($_POST['voto'], $_POST['mensaje'], $_POST['validez']); } redirect('http://' . strtolower($pais) . '.' . DOMAIN . '/votacion/' . $_POST['ref_ID']); } elseif ($_GET['b'] == 'eliminar' and is_numeric($_GET['ID'])) { $result = mysql_query("SELECT ID, user_ID, estado, tipo FROM votacion WHERE estado != 'end' AND ID = '" . $_GET['ID'] . "' AND pais = '" . PAIS . "' LIMIT 1", $link); while ($r = mysql_fetch_array($result)) { if ($r['user_ID'] == $pol['user_ID'] or $r['estado'] == 'borrador' and nucleo_acceso($vp['acceso'][$r['tipo']])) { mysql_query("DELETE FROM votacion WHERE ID = '" . $r['ID'] . "' LIMIT 1", $link); mysql_query("DELETE FROM votacion_votos WHERE ref_ID = '" . $r['ID'] . "'", $link); } } } elseif ($_GET['b'] == 'concluir' and is_numeric($_GET['ID'])) { mysql_query("UPDATE votacion SET time_expire = '" . $date . "' WHERE ID = '" . $_GET['ID'] . "' AND user_ID = '" . $pol['user_ID'] . "' AND pais = '" . PAIS . "' AND tipo != 'cargo' LIMIT 1", $link); } elseif ($_GET['b'] == 'enviar_comprobante' and $_GET['comprobante']) { $votacion_ID = explodear('-', $_GET['comprobante'], 0); $asunto = 'Comprobante de voto: votación ' . $votacion_ID; $mensaje = 'Hola Ciudadano,<br /><br />Este email es para guardar tu comprobante de voto. Te permitirá comprobar el sentido de tu voto cuando la votacion finaliza y así aportar verificabilidad a la votación.<br /><br /><blockquote>Comprobante: <b>' . $_GET['comprobante'] . '</b><br />Comprobar: http://' . HOST . '/votacion/' . $votacion_ID . '/verificacion#' . $_GET['comprobante'] . '<br />Votación: http://' . HOST . '/votacion/' . $votacion_ID . '</blockquote><br /><br />No debes entregar a nadie esta información, de lo contrario podrían saber qué has votado.<br /><br />Atentamente.<br /><br /><br />VirtualPol - http://' . HOST; enviar_email($pol['user_ID'], $asunto, $mensaje); redirect('/votacion/' . $votacion_ID); } // actualizar info en theme $result = mysql_query("SELECT COUNT(ID) AS num FROM votacion WHERE estado = 'ok' AND pais = '" . PAIS . "' AND acceso_ver = 'anonimos'", $link); while ($r = mysql_fetch_array($result)) { mysql_query("UPDATE " . SQL . "config SET valor = '" . $r['num'] . "' WHERE dato = 'info_consultas' LIMIT 1", $link); } $refer_url = 'votacion'; break; case 'foro': // añadir, editar if (($_GET['b'] == 'reply' or $_GET['b'] == 'hilo') and strlen($_POST['text']) > 1 and $_POST['subforo']) {
} $result = mysql_query("SELECT ID, url, nombre, user_ID, descripcion, web, cat_ID, time, pv,\r\n(SELECT nombre FROM " . SQL . "cat WHERE ID = " . SQL . "empresas.cat_ID LIMIT 1) AS cat_nom,\r\n(SELECT url FROM " . SQL . "cat WHERE ID = " . SQL . "empresas.cat_ID LIMIT 1) AS cat_url,\r\n(SELECT nick FROM " . SQL_USERS . " WHERE ID = " . SQL . "empresas.user_ID LIMIT 1) AS nick\r\nFROM " . SQL . "empresas\r\nWHERE url = '" . $_GET['b'] . "' AND cat_ID = '" . $cat_ID . "'\r\nLIMIT 1", $link); while ($r = mysql_fetch_array($result)) { mysql_query("UPDATE " . SQL . "empresas SET pv = pv+1 WHERE ID = '" . $r['ID'] . "'", $link); $r['pv']++; $txt_title = 'Empresa: ' . $r['nombre'] . ' - Sector: ' . $r['cat_nom']; $txt_nav = array('/empresas' => 'Empresas', '/empresas/' . $_GET['a'] => $r['cat_nom'], $r['nombre']); if ($pol['user_ID'] == $r['user_ID']) { $editar .= boton('Editar', '/empresas/editar/' . $r['ID'] . '/'); } $txt .= '<h1 class="quitar"><a href="/empresas/">Empresas</a>: <a href="/empresas/' . $r['cat_url'] . '/">' . $r['cat_nom'] . '</a> | ' . $r['nombre'] . ' ' . $editar . '</h1> <br /> <div class="amarillo">' . $r['descripcion'] . '</div> <p class="azul">Fundador: <b>' . crear_link($r['nick']) . '</b> | creación: <em>' . explodear(" ", $r['time'], 0) . '</em> | sector: <a href="/empresas/' . $r['cat_url'] . '/">' . $r['cat_nom'] . '</a> | visitas: ' . $r['pv'] . '</p> '; if ($r['user_ID'] == $pol['user_ID']) { $txt .= '<form action="/accion.php?a=empresa&b=acciones&ID=' . $r['ID'] . '" method="post"> Ceder acciones a: <input type="text" name="nick" size="8" maxlength="20" value="" /><br /> Cantidad de acciones: <input type="text" name="cantidad" size="8" maxlength="3" value="" /><br /> <input type="submit" value="Ceder" /> </form>'; } if ($r['user_ID'] == $pol['user_ID']) { $boton = '<form action="/accion.php?a=empresa&b=ceder&ID=' . $r['ID'] . '" method="post"> <input type="submit" value="Ceder a:" /> <input type="text" name="nick" size="8" maxlength="20" value="" /></form> ' . boton('X', '/accion.php?a=empresa&b=eliminar&ID=' . $r['ID'], '¿Estas seguro de querer ELIMINAR definitivamente esta empresa?'); } $txt .= '<span style="float:right;">' . $boton . $editar . '</span>'; }
<th title="Confianza">Conf</th> <th title="Partidos">Par</th> <th title="Empresas">Emp</th> <th title="Pols">Pols</th> <th title="Pols Gobierno">Pols_G</th> <th title="Pols cuentas">Pols_C</th> <th title="Pols frase+palabras">PF</th> <th title="Numero de transacciones">T</th> <th title="Porcentaje del mapa en venta">MV%</th> <th title="Pols de la propiedad mas barata en venta">MV</th> </tr> '; $result = mysql_query("SELECT * FROM stats WHERE pais = '" . PAIS . "' ORDER BY time DESC, pais ASC LIMIT 20000", $link); while ($r = mysql_fetch_array($result)) { $txt .= '<tr> <td>' . explodear(' ', $r['time'], 0) . '</td> <td>' . $r['pais'] . '</td> <td align="right">' . $r['ciudadanos'] . '</td> <td align="right">' . $r['nuevos'] . '</td> <td align="right">' . $r['eliminados'] . '</td> <td align="right">' . $r['24h'] . '</td> <td align="right">' . $r['hilos_msg'] . '</td> <td align="right">' . $r['confianza'] . '</td> <td align="right">' . $r['partidos'] . '</td> <td align="right">' . $r['empresas'] . '</td> <td align="right">' . $r['pols'] . '</td> <td align="right">' . $r['pols_gobierno'] . '</td> <td align="right">' . $r['pols_cuentas'] . '</td>
} paginacion('eventos', '/log-eventos', null, $_GET['a'], null, '250'); $txt .= '<h1 class="quitar">Log de Eventos:</h1> <br />' . $p_paginas . ' <table border="0" cellspacing="0" cellpadding="0" class="pol_table"> <tr> <th>Fecha</th> <th>Quien</th> <th>Acción</th> </tr>'; $result = mysql_query("SELECT \r\ntime, accion, user_ID, user_ID2, dato,\r\n(SELECT nick FROM users WHERE ID = " . SQL . "log.user_ID LIMIT 1) AS nick,\r\n(SELECT nick FROM users WHERE " . SQL . "log.user_ID2 != '0' AND ID = " . SQL . "log.user_ID2 LIMIT 1) AS nick2\r\nFROM " . SQL . "log " . $filtro_ID . "\r\nORDER BY time DESC\r\nLIMIT " . mysql_real_escape_string($p_limit), $link); while ($r = mysql_fetch_array($result)) { $fecha = explodear(' ', $r['time'], 1); $fecha = explodear(':', $fecha, 0) . ':' . explodear(':', $fecha, 1); $fecha = '<acronym title="' . $r['time'] . '">' . $fecha . '</acronym>'; /* #accion 1 x Turista creado 2 x Ciudadano creado (user_ID2) 3 x Partido creado (dato=siglas) 4 - Partido editado (dato=siglas) 5 x Partido eliminado (dato=siglas) 6 x Documento creado (dato=ID_documento) 7 x Documento editado (dato=ID_documento) 8 x Documento eliminado (dato=ID_documento) 9 x Afiliacion (dato=siglas) 10 x Estudio iniciado (dato=cargo_ID) 11 x Cargo asignado (user_ID2=user_ID, dato=cargo_ID) 12 x Cargo quitado (user_ID2=user_ID, dato=cargo_ID)
} } if ($clones != '') { $txt .= '<tr><td><b>' . crear_link($r['nick'], 'nick', $r['estado'], $r['pais']) . '</b> ' . $siglas[$r['partido_afiliado']] . '</td><td align="right"></td><td><b>' . $r['ref_num'] . '</b></td><td>(<b>' . $clones . '</b>)</td></tr>'; } } $txt .= '</table>'; $emails_whitelist = array('correo.ugr.es', 'gmail.com', 'googlemail.com', 'hotmail.com', 'hotmail.es', 'live.com', 'live.com.ar', 'live.com.mx', 'live.cl', 'movistar.es', 'msn.com', 'msn.es', 'ono.com', 'ozu.es', 'rocketmail.com', 'telefonica.es', 'telefonica.net', 'terra.es', 'vodafone.es', 'yahoo.com', 'yahoo.com.ar', 'yahoo.com.mx', 'yahoo.com.ve', 'yahoo.es', 'ymail.com', 'eresmas.com'); $txt .= '<br /><h1>6. Emails atípicos</h1><hr /><table border="0" cellspacing="4">'; $result = mysql_query("SELECT email, nick, ref, ref_num, estado FROM users ORDER BY fecha_registro DESC", $link); while ($r = mysql_fetch_array($result)) { $r['email'] = strtolower($r['email']); $email = explode("@", $r['email']); if (!in_array($email[1], $emails_whitelist)) { $clones = ''; $r['email'] = explodear("@", $r['email'], 1); $txt .= '<tr><td>' . crear_link($r['nick'], 'nick', $r['estado']) . '</td><td>*@<b>' . $r['email'] . '</b></td></tr>'; } } $txt .= '</table>'; $txt .= '<br /><h1>7. Referencias desde URLs</h1><hr /><table border="0" cellspacing="4"> <tr> <th></th> <th>Ref</th> <th>Nuevos</th> <th>URL de referencia</th> </tr>'; $result = mysql_query("SELECT user_ID, COUNT(*) AS num, referer,\r\n(SELECT nick FROM users WHERE ID = " . SQL_REFERENCIAS . ".user_ID LIMIT 1) AS nick,\r\n(SELECT COUNT(*) FROM " . SQL_REFERENCIAS . " WHERE referer = " . SQL_REFERENCIAS . ".referer AND new_user_ID != '0') AS num_registrados\r\nFROM " . SQL_REFERENCIAS . " \r\nGROUP BY referer HAVING COUNT(*) > 1\r\nORDER BY num DESC", $link); while ($r = mysql_fetch_array($result)) { $result2 = mysql_query("SELECT COUNT(*) AS num_registrados FROM " . SQL_REFERENCIAS . " WHERE referer = '" . $r['referer'] . "' AND new_user_ID != '0'", $link); while ($r2 = mysql_fetch_array($result2)) {
js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/es_LA/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, \'script\', \'facebook-jssdk\'));</script> <div class="fb-like" data-href="http://' . $_SERVER['HTTP_HOST'] . '" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false" data-font="verdana"></div></td> '; } else { echo '<td><a href="https://twitter.com/share" class="twitter-share-button" data-url="http://' . $_SERVER['HTTP_HOST'] . '" data-text="VirtualPol, la primera red democrática virtual http://www.virtualpol.com/video" data-lang="es" data-size="large" data-related="VirtualPol" data-count="none" data-hashtags="VirtualPol">Twittear</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></td> <td><g:plusone annotation="none" href="http://' . HOST . '"></g:plusone></td> '; } echo '</tr></table>'; if (isset($pol['user_ID']) and $pol['config']['palabra_gob'] != ':' and $pol['config']['palabra_gob'] != '') { echo '<div class="azul"><b><a href="http://' . explodear(':', $pol['config']['palabra_gob'], 1) . '">' . explodear(':', $pol['config']['palabra_gob'], 0) . '</a></b></div><br />'; } if (!ASAMBLEA) { echo '<div class="amarillo"><b>' . $pol['config']['pols_frase'] . '</b></div>'; if ($pol['config']['pols_fraseedit'] == $pol['user_ID']) { echo ' <a href="/subasta/editar" class="gris">#</a>'; } } ?> </div> </div> <div> <div id="pnick" class="azul" style="display:none;"></div>