$result = mysql_query("SELECT ID, siglas, nombre, fecha_creacion, ID_presidente,\r\n(SELECT nick FROM users WHERE ID = " . SQL . "partidos.ID_presidente LIMIT 1) AS nick_presidente, \r\n(SELECT (SELECT nick FROM users WHERE ID = " . SQL . "partidos_listas.user_ID LIMIT 1) AS nick FROM " . SQL . "partidos_listas WHERE ID_partido = " . SQL . "partidos.ID ORDER BY ID ASC LIMIT 1) AS nick_candidato, \r\n(SELECT COUNT(ID) FROM users WHERE partido_afiliado = " . SQL . "partidos.ID AND pais = '" . PAIS . "' AND estado = 'ciudadano' LIMIT 1) AS afiliados, \r\n(SELECT COUNT(ID) FROM " . SQL . "partidos_listas WHERE ID_partido = " . SQL . "partidos.ID LIMIT 1) AS num_lista\r\nFROM " . SQL . "partidos \r\nWHERE estado = 'ok'\r\nORDER BY num_lista DESC, afiliados DESC, nombre DESC", $link); while ($r = mysql_fetch_array($result)) { $num_lista = $r['num_lista']; if ($num_lista > 0) { if ($num_lista >= 1) { $num_lista = '<b>' . $num_lista . '</b>'; $elecciones = '<b style="color:blue;">Si</b>'; } else { $elecciones = '<b style="color:red;">No</b>'; } if ($r['nick_candidato']) { $nick_candidato = '<b>' . crear_link($r['nick_candidato']) . '</b>'; } else { $nick_candidato = ''; } $txt .= '<tr><td align="right" valign="top"><b style="font-size:20px;">' . crear_link($r['siglas'], 'partido') . '</b></td><td>' . $r['nombre'] . '</td><td><b>' . $r['afiliados'] . '</b>/' . $num_lista . '</td><td>' . crear_link($r['nick_presidente']) . '</td><td>' . $nick_candidato . '</td><td align="right">' . duracion(time() - strtotime($r['fecha_creacion'])) . '</td><td>' . $elecciones . '</td><td align="right">' . $r['ID'] . '</td></tr>' . "\n"; } else { $txt_otros .= '<span title="' . $r['afiliados'] . ' afiliados / ' . strip_tags($num_lista) . ' candidatos">' . crear_link($r['siglas'], 'partido') . '</span> '; } } $txt .= '</table><p style="width:700px;">' . NOM_PARTIDOS . ' que no participan en elecciones:<br /> <b>' . $txt_otros . '</b></p>'; $txt .= ECONOMIA ? '<p>* Para poder participar en las Elecciones ha de tener al menos un candidato en su lista. Para poder añadir candidatos en la lista, se ha de ser el Presidente, el candidato ha de estar afiliado y con el examen de Diputado aprobado.</p>' : ''; $txt_title = NOM_PARTIDOS; $txt_nav = array('/partidos' => 'Partidos'); if (nucleo_acceso($vp['acceso']['crear_partido'])) { $txt_tab = array('/form/crear-partido' => 'Crear ' . NOM_PARTIDOS); } } //THEME $txt_menu = 'demo';
} } if ($pol['config']['elecciones_estado'] == 'normal') { $li_elecciones_num = 'en ' . duracion(strtotime($pol['config']['elecciones_inicio']) - time()); $li_elecciones = '<a href="/elecciones/">Escrutinio, escaños y nuevo Gobierno</a>'; } elseif ($pol['config']['elecciones_estado'] == 'elecciones') { $fecha_24_antes = date('Y-m-d H:i:00', strtotime($pol['config']['elecciones_inicio']) - $pol['config']['elecciones_antiguedad']); $result = mysql_query("SELECT COUNT(ID) AS num FROM " . SQL_USERS . " WHERE estado = 'ciudadano' AND pais = '" . PAIS . "' AND fecha_registro < '" . $fecha_24_antes . "'", $link); while ($row = mysql_fetch_array($result)) { $num_votantes = $row['num']; } $result = mysql_query("SELECT COUNT(ID) AS num FROM " . SQL . "elecciones", $link); while ($row = mysql_fetch_array($result)) { $num_votos = $row['num']; } $elecciones_quedan = duracion(strtotime($pol['config']['elecciones_inicio']) + $pol['config']['elecciones_duracion'] - time()); $li_elecciones_num = 'En curso'; } $txt .= '<h1>Bienvenido a ' . PAIS . '</h1> <br /> <table border="0"><tr><td width="50%" valign="top"> <h2>¿Qué es ' . PAIS . '?</h2> <p style="text-align:justify;">' . PAIS . ' es un Pais auto-gestionado Democráticamente de la comunidad <a href="http://www.' . DOMAIN . '">VirtualPol</a>.</p> <p style="text-align:justify;">El Gobierno Democrático se compone de un Presidente, Diputados, Jueces, Policías, Leyes, Juicios, Periodistas, Abogados, etc... sin la existencia de usuarios privilegiados (god).</p> <p style="text-align:justify;">En ' . PAIS . ' todos los ciudadanos están en absoluta igualdad, con las mismas oportunidades para el liderazgo o el fracaso en la búsqueda del Poder.</p> <p>' . boton('Regístrate!', REGISTRAR) . '</p>
$(this).find('ul').stop(true, true).hide(); $(this).removeClass('hover'); }); </script> <?php echo notificacion('print'); } else { if ($_REQUEST['a'] == 'whois' and isset($_REQUEST['nick'])) { $res = mysql_query("SELECT ID, fecha_registro, partido_afiliado, fecha_last, nivel, online, nota, avatar, voto_confianza, estado, pais, cargo,\r\n(SELECT siglas FROM " . SQL . "partidos WHERE ID = users.partido_afiliado LIMIT 1) AS partido,\r\n(SELECT COUNT(ID) FROM " . SQL . "foros_hilos WHERE user_ID = users.ID LIMIT 1) AS num_hilos,\r\n(SELECT COUNT(ID) FROM " . SQL . "foros_msg WHERE user_ID = users.ID LIMIT 1) AS num_msg\r\nFROM users WHERE nick = '" . $_REQUEST['nick'] . "' LIMIT 1", $link); while ($r = mysql_fetch_array($res)) { include 'inc-functions.php'; if ($r['avatar'] == 'true') { $r['avatar'] = 1; } else { $r['avatar'] = 0; } if (!isset($r['partido'])) { $r['partido'] = '-'; } if ($r['estado'] == 'expulsado') { $res2 = mysql_query("SELECT razon FROM expulsiones WHERE user_ID = '" . $r['ID'] . "' AND estado = 'expulsado' ORDER BY expire DESC LIMIT 1", $link); while ($r2 = mysql_fetch_array($res2)) { $expulsion = str_replace(':', '', $r2['razon']); } } echo $r['ID'] . ':' . round((time() - strtotime($r['fecha_registro'])) / 60 / 60 / 24) . ' dias:' . duracion(time() - strtotime($r['fecha_last'])) . ':' . $r['nivel'] . ':' . $r['nota'] . ':' . duracion($r['online']) . ':' . $r['avatar'] . ':' . $r['partido'] . ':' . $r['num_hilos'] . '+' . $r['num_msg'] . ':' . $r['estado'] . ':' . $r['pais'] . ':' . $r['cargo'] . ':' . $expulsion . ':' . $r['voto_confianza'] . ':'; } } } } mysql_close($link);
$result = mysql_query("SELECT mercado_ID, pols\r\nFROM " . SQL . "pujas WHERE mercado_ID = '1' OR mercado_ID = '2' \r\nORDER BY time ASC LIMIT 500", $link); while ($row = mysql_fetch_array($result)) { $dgrafico[$row['mercado_ID']][] = $row['pols']; $i++; } if ($dgrafico[1]) { $dgrafico_max_1 = max($dgrafico[1]); } else { $dgrafico_max_1 = 0; } if ($dgrafico[2]) { $dgrafico_max_2 = max($dgrafico[2]); } else { $dgrafico_max_2 = 0; } $queda = duracion(strtotime(date('Y-m-d 20:00:00')) - time()); if (substr($queda, 0, 1) == '-') { $queda = '1 dia'; } $result = mysql_query("SELECT valor,\r\n(SELECT nick FROM " . SQL_USERS . " WHERE ID = " . SQL . "config.valor LIMIT 1) AS nick\r\nFROM " . SQL . "config WHERE dato = 'pols_fraseedit' LIMIT 1", $link); while ($row = mysql_fetch_array($result)) { $nick = $row['nick']; } $txt .= '<h1>Subastas (<a href="/subasta/">Actualizar</a>) <span class="gris">Proceso en <span class="timer" value="' . strtotime(date('Y-m-d 20:00:00')) . '"></span></span></h1> <br /> <table border="0"><tr><td width="50%" valign="top"> <table border="0" cellspacing="2" cellpadding="0" class="pol_table">
default: $order_by = 'WHERE estado = \'ciudadano\' AND pais = \'' . PAIS . '\' ORDER BY fecha_last DESC'; } if ($p_init) { $orden = $p_init + 1; } else { $orden = 1; } if ($pol['estado']) { $sql_extra = ", (SELECT voto FROM votos WHERE tipo = 'confianza' AND emisor_ID = '" . $pol['user_ID'] . "' AND item_ID = users.ID LIMIT 1) AS has_votado"; } $sc = get_supervisores_del_censo(); $result = mysql_query("SELECT ID, ID AS user_ID, nick, estado, pais, nivel, online, ref, ref_num, num_elec, voto_confianza, fecha_registro, nota, fecha_last, cargo, avatar, datos,\r\n(SELECT siglas FROM " . SQL . "partidos WHERE users.partido_afiliado != '0' AND ID = users.partido_afiliado LIMIT 1) AS siglas" . $sql_extra . "\r\nFROM users " . $order_by . " LIMIT " . mysql_real_escape_string($p_limit), $link); while ($r = mysql_fetch_array($result)) { if ($r['online'] != 0) { $online = duracion($r['online']); } else { $online = ''; } if ($r['avatar'] == 'true') { $avatar = avatar($r['ID'], 40) . ' '; } else { $avatar = ''; } if ($r['siglas']) { $partido = '<a href="/partidos/' . strtolower($r['siglas']) . '/">' . $r['siglas'] . '</a>'; } else { $partido = ''; } if ($r['ref_num'] == 0) { $r['ref_num'] = '';
<p>Nota minima para aprobar: <b class="gris">' . $r['nota'] . '</b>. Examen tipo test, tiempo limitado, <b>' . $r['num_preguntas'] . '</b> preguntas de entre <b>' . $r['num_preguntas_especificas'] . '</b> en total.</p> <p>No podrás repetir este examen hasta <b>' . duracion($pol['config']['examen_repe']) . '</b> después.</p>'; if ($r['cargo_ID'] == 0) { $txt .= '<p>Examen sin vinculación con cargo.</p>'; } else { $result2 = mysql_query("SELECT nombre FROM cargos WHERE cargo_ID = '" . $r['cargo_ID'] . "' LIMIT 1", $link); while ($r2 = mysql_fetch_array($result2)) { $txt .= '<p>Examen vinculado al cargo: <a href="/cargos/">' . $r2['nombre'] . '</a>.</p>'; } } $margen_ultimoexamen = strtotime($r['fecha_ultimoexamen']) + $pol['config']['examen_repe']; if (!$r['fecha_ultimoexamen'] or $margen_ultimoexamen < time()) { $txt .= '<p>' . boton('HACER EXAMEN', '/examenes/examen/' . $r['ID'], '¿Estás preparado para EXAMINARTE?\\n\\nSolo podrás intentarlo UNA VEZ cada ' . duracion($pol['config']['examen_repe']) . '.\\n\\nSi ejerces el cargo y suspendes lo perderás!', 'large blue', $pol['config']['pols_examen']) . '</p>'; } else { $txt .= '<p><b class="amarillo">No puedes repetir el examen hasta dentro de ' . duracion($margen_ultimoexamen - time()) . '</b></p>'; } $txt .= '</td><td valign="top" width="40%"></td></tr></table>'; } } else { // VER LISTA EXAMENES $txt_title = 'Exámenes'; $txt_nav = array('/examenes' => 'Exámenes'); $txt_tab = array('/cargos' => 'Cargos'); $txt .= '<h1 class="quitar">Examenes: <a href="/examenes/mis-examenes/">Mis examenes</a></h1>'; $result = mysql_query("SELECT examen_ID FROM " . SQL . "examenes_preg", $link); while ($r = mysql_fetch_array($result)) { if ($r['examen_ID'] == 0) { $num_generales++; } else { $num_especificas++;
Ver: <em title="' . $r['acceso_cfg_ver'] . '">' . $r['acceso_ver'] . '</em>, votar: <em title="' . $r['acceso_cfg_votar'] . '">' . $r['acceso_votar'] . '</em>, tipo voto: <em>' . $r['tipo_voto'] . '</em>, duración: <em>' . duracion($r['duracion']) . '</em></td> </tr>'; } $txt .= '</table>'; } elseif ($_GET['a']) { // VER VOTACION $result = mysql_query("SELECT *,\r\n(SELECT nick FROM users WHERE ID = votacion.user_ID LIMIT 1) AS nick, \r\n(SELECT ID FROM votacion_votos WHERE ref_ID = votacion.ID AND user_ID = '" . $pol['user_ID'] . "' LIMIT 1) AS ha_votado,\r\n(SELECT voto FROM votacion_votos WHERE ref_ID = votacion.ID AND user_ID = '" . $pol['user_ID'] . "' LIMIT 1) AS que_ha_votado,\r\n(SELECT validez FROM votacion_votos WHERE ref_ID = votacion.ID AND user_ID = '" . $pol['user_ID'] . "' LIMIT 1) AS que_ha_votado_validez,\r\n(SELECT mensaje FROM votacion_votos WHERE ref_ID = votacion.ID AND user_ID = '" . $pol['user_ID'] . "' LIMIT 1) AS que_ha_mensaje,\r\n(SELECT comprobante FROM votacion_votos WHERE ref_ID = votacion.ID AND user_ID = '" . $pol['user_ID'] . "' LIMIT 1) AS comprobante\r\nFROM votacion\r\nWHERE ID = '" . $_GET['a'] . "' AND pais = '" . PAIS . "'\r\nLIMIT 1", $link); while ($r = mysql_fetch_array($result)) { if (!nucleo_acceso($r['acceso_ver'], $r['acceso_cfg_ver']) and $r['estado'] != 'borrador') { $txt .= '<p style="color:red;">Esta votación es privada. No tienes acceso para ver su contenido o resultado.</p>'; break; } $votos_total = $r['num']; $time_expire = strtotime($r['time_expire']); $time_creacion = strtotime($r['time']); $duracion = duracion($time_expire - $time_creacion); $respuestas = explode("|", $r['respuestas']); $respuestas_desc = explode("][", $r['respuestas_desc']); $respuestas_num = count($respuestas) - 1; $txt_title = 'Votacion: ' . strtoupper($r['tipo']) . ' | ' . $r['pregunta']; $txt_nav = array('/votacion' => 'Votaciones', '/votacion/' . $r['ID'] => strtoupper($r['tipo'])); if ($r['estado'] == 'ok') { $txt_nav['/votacion/' . $r['ID']] = 'En curso: ' . num($votos_total) . ' votos'; $txt_tab = array('/votacion' => 'Ver otros resultados'); $tiempo_queda = '<span style="color:blue;">Quedan ' . timer($time_expire, true) . '.</span>'; } elseif ($r['estado'] == 'borrador') { $txt_nav[] = 'Borrador'; $txt_tab = array('/votacion/borradores' => 'Ver borradores', '/votacion/' . $r['ID'] => 'Previsualizar', '/votacion/crear/' . $r['ID'] => 'Editar borrador'); $tiempo_queda = '<span style="color:red;">Borrador <span style="font-weight:normal;">(Previsualización de votación)</span></span> '; } else { $txt_nav['/votacion/' . $r['ID']] = 'Finalizado: ' . num($votos_total) . ' votos';
$kick_IP = '\'' . $r['IP'] . '\''; $kick_pais = $r['pais']; } $result = mysql_query("SELECT ID FROM " . SQL . "ban WHERE user_ID = '" . $kick_user_ID . "' AND estado = 'activo' LIMIT 1", $link); while ($r = mysql_fetch_array($result)) { $user_kicked = true; } $el_userid = $kick_user_ID; } $_POST['razon'] = ereg_replace("(^|\n| )[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\">\\0</a>", strip_tags($_POST['razon'])); $_POST['motivo'] = ereg_replace("(^|\n| )[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\">\\0</a>", strip_tags($_POST['motivo'])); if (nucleo_acceso($vp['acceso']['kick']) and $kick_user_ID >= 0 and $user_kicked != true and ($kick_cargo != 7 and $kick_cargo != 13 or $kick_pais != PAIS) and $_POST['razon'] and $_POST['expire'] <= 777600) { $_POST['razon'] = ucfirst(strip_tags($_POST['razon'])); $expire = date('Y-m-d H:i:s', time() + $_POST['expire']); mysql_query("INSERT INTO " . SQL . "ban (user_ID, autor, expire, razon, estado, tiempo, IP, cargo, motivo) VALUES ('" . $el_userid . "', " . $pol['user_ID'] . ", '" . $expire . "', '" . $_POST['razon'] . "', 'activo', '" . $_POST['expire'] . "', " . $kick_IP . ", '" . $pol['cargo'] . "', '" . $_POST['motivo'] . "')", $link); evento_chat('<span style="color:red;"><img src="' . IMG . 'varios/kick.gif" alt="Kick" border="0" /> <b>[KICK] ' . $kick_nick . '</b> ha sido kickeado por <img src="' . IMG . 'cargos/' . $pol['cargo'] . '.gif" border="0" /> <b>' . $pol['nick'] . '</b>, durante <b>' . duracion($_POST['expire']) . '</b>. Razon: <em>' . $_POST['razon'] . '</em> (<a href="/control/kick/">Ver kicks</a>)</span>'); } $refer_url = 'control/kick'; } break; case 'mensaje-leido': if ($_GET['ID'] == 'all') { mysql_query("UPDATE mensajes SET leido = '1' WHERE recibe_ID = '" . $pol['user_ID'] . "'", $link); } elseif ($_GET['ID']) { mysql_query("UPDATE mensajes SET leido = '1' WHERE ID = '" . $_GET['ID'] . "' AND recibe_ID = '" . $pol['user_ID'] . "' LIMIT 1", $link); } mysql_query("UPDATE notificaciones SET visto = 'true' WHERE user_ID = '" . $pol['user_ID'] . "' AND visto = 'false' AND texto LIKE 'Mensaje %'", $link); $refer_url = 'msg'; break; case 'borrar-mensaje': if (is_numeric($_GET['ID'])) {
} $txt .= '</table> <p style="margin-bottom:0px;">Cargos y Examenes: <b>' . $los_cargos_num . '</b> (<a href="/examenes/">Ver examenes</a>)</p> ' . $los_cargos . '<br />'; if ($r['grupos'] != '') { $txt .= '<b>Grupos</b>:<ul>'; $result2 = mysql_query("SELECT nombre FROM grupos WHERE grupo_ID IN (" . str_replace(' ', ',', $r['grupos']) . ")"); while ($r2 = mysql_fetch_array($result2)) { $txt .= '<li><a href="/grupos">' . $r2['nombre'] . '</a></li>'; } $txt .= '</ul>'; } $result2 = mysql_query("SELECT pais, titulo, url, fecha_creacion, fecha_last\r\nFROM chats WHERE user_ID = '" . $r['ID'] . "' \r\nORDER BY fecha_creacion ASC", $link); while ($r2 = mysql_fetch_array($result2)) { $txt .= '<li>' . duracion(time() - strtotime($r2['fecha_creacion'])) . ' <a href="http://' . strtolower($r2['pais']) . '.' . DOMAIN . '/chats/' . $r2['url'] . '/"><b>' . $r2['titulo'] . '</b></a> (hace ' . duracion(time() - strtotime($r2['fecha_last'])) . ')</li>'; } $txt .= '</ul> </td></tr></table>'; if ($user_ID != $pol['user_ID']) { $txt .= '<p class="quitar">' . boton('Enviar mensaje', 'http://' . strtolower($pol['pais']) . '.' . DOMAIN . '/msg/' . strtolower($nick) . '/') . ' ' . (ECONOMIA ? boton('Transferir ' . MONEDA_NOMBRE . '', 'http://' . strtolower($pol['pais']) . '.' . DOMAIN . '/pols/transferir/' . strtolower($nick) . '/') : '') . '</p>'; } $txt .= '</div>'; $txt_title = $nick . ' - ' . ucfirst($r['estado']) . ' de ' . $r['pais']; $txt_nav = array('/info/censo' => 'Censo', '/perfil/' . $nick => $nick); if ($user_ID != $pol['user_ID']) { $txt_tab['http://' . strtolower($pol['pais']) . '.' . DOMAIN . '/msg/' . $nick . '/'] = 'Enviar mensaje'; if (ECONOMIA) { $txt_tab['http://' . strtolower($pol['pais']) . '.' . DOMAIN . '/pols/transferir/' . strtolower($nick) . '/'] = 'Transferir'; }
$queda['pres'] = $elec_ini + 86400 * 14 - time() . ' seg'; $queda['parl'] = $elec_ini - time() . ' seg'; } if (substr($queda['pres'], 0, 1) == '-') { if ($pol['config']['elecciones'] == 'pres1') { $queda['pres'] = '<b>1ª</b> Vuelta en curso...'; } elseif ($pol['config']['elecciones'] == 'pres2') { $queda['pres'] = '<b>2ª</b> Vuelta en curso...'; } } else { $queda['pres'] = duracion($queda['pres']); } if (substr($queda['parl'], 0, 1) == '-') { $queda['parl'] = 'En curso...'; } else { $queda['parl'] = duracion($queda['parl']); } $next_inicio = $elec_ini - 86400 * $mul; $hoy = date('j'); for ($i = 1; $i <= 28; $i++) { $dia = date('j', $next_inicio + 86400 * $i); if ($dia == $hoy) { $dia = '<b style="font-size:24px;color:#333;">' . $dia . '</b>'; } if ($i == 13 or $i == 14) { $dia = '<span style="color:red;">' . $dia . '</span>'; } if ($i == 27 or $i == 28) { $dia = '<span style="color:blue;">' . $dia . '</span>'; } $txt .= '<td align="center" class="dia" valign="bottom" style="font-size:16px;color:#999;">' . $dia . '</td>';
'; } $result = mysql_query("SELECT ID, user_ID, time, text, \r\n(SELECT nick FROM " . SQL_USERS . " WHERE ID = " . SQL . "foros_msg.user_ID LIMIT 1) AS nick,\r\n(SELECT avatar FROM " . SQL_USERS . " WHERE ID = " . SQL . "foros_msg.user_ID LIMIT 1) AS avatar\r\nFROM " . SQL . "foros_msg\r\nWHERE hilo_ID = '-1'\r\nORDER BY time DESC\r\nLIMIT 50", $link); $num_id = 0; while ($row = mysql_fetch_array($result)) { if ($row['user_ID'] == $pol['user_ID']) { $boton = boton('X', '/accion.php?a=foro&b=eliminarreply&ID=' . $row['ID'] . '&hilo_ID=-1', '¿Estás seguro de querer ELIMINAR esta NOTA?') . '</span>'; } else { $boton = ''; } if ($row['avatar'] == 'true') { $avatar = '<span class="navatar">' . avatar($row['user_ID'], 40) . '</span>'; } else { $avatar = ''; } $txt .= '<tr onmouseover="show(\'div' . $num_id . '\')" onmouseout="hide(\'div' . $num_id . '\')"><td align="right"><b class="big">' . crear_link($row['nick']) . '</b><br /><acronym title="' . $row['time'] . '">' . duracion(time() - strtotime($row['time'])) . '</acronym></td><td valign="top" class="amarillo">' . $avatar . $row['text'] . '</td><td width="1">' . $boton . '</td> <td><div id="div' . $num_id . '"style="display: inline; visibility: hidden"><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://' . strtolower(PAIS) . '.' . DOMAIN . '/notas/" data-text="' . $row['text'] . ' #' . DOMAIN . '" data-count="none" data-lang="es"> Tweet</a></div></td></tr>' . "\n"; $num_id++; } $txt .= '</table>'; } $txt_header .= '<style type="text/css"> h1 a { color:#4BB000; } #enviar { background:#FFFFB7; padding:20px 0 20px 50px; } .navatar { float:left; margin:-4px 10px -4px 0; } </style> <script language="javascript">
<form action="/accion.php?a=mercado&b=puja&ID=1" method="post"> <p><span class="amarillo"><b><input type="text" name="puja" value="' . $puja_minima . '" size="2" maxlength="6" style="text-align:right;" /> ' . MONEDA . ' <input type="submit" value="Pujar" /></b></span></p> </form> <table border="0" cellspacing="2" cellpadding="0" class="pol_table"> <tr> <th>' . MONEDA . '</th> <th>Ciudadano</th> <th><a href="/mercado/frase/">Actualizar</a></th> <th><b>' . $queda . '</b></th> </tr>'; $ganador = 'ok'; $result = mysql_query("SELECT user_ID, pols, time,\r\n(SELECT nick FROM " . SQL_USERS . " WHERE ID = " . SQL . "pujas.user_ID LIMIT 1) AS nick\r\nFROM " . SQL . "pujas\r\nWHERE mercado_ID = 1\r\nORDER BY pols DESC\r\nLIMIT 15", $link); while ($row = mysql_fetch_array($result)) { if ($ganador == 'ok') { $ganador = '<b>(Ganador)</b>'; } else { $ganador = false; } $txt .= '<tr><td align="right"><b style="font-size:20px;">' . pols($row['pols']) . '</b></td><td>' . crear_link($row['nick']) . '</td><td>' . duracion(time() - strtotime($row['time'])) . '</td><td>' . $ganador . '</td></tr>'; } if (!$puja_minima) { $puja_minima = 1; } $txt .= '</table>'; } //THEME $txt_title = 'Mercado - ' . $_GET['a']; $txt_nav = array('Mercado'); $txt_menu = 'econ'; include 'theme.php';
$expulsar = boton('X', '/accion.php?a=kick&b=quitar&ID=' . $r['ID'], '¿Seguro que quieres hacer INACTIVO este kick?'); } else { $expulsar = ''; } $duracion = '<acronym title="' . $r['expire'] . '">' . duracion(time() + $r['tiempo'] - strtotime($r['expire'])) . '</acronym>'; if ($r['estado'] == 'activo') { $estado = '<span style="color:red;">Activo</span>'; } elseif ($r['estado'] == 'cancelado') { $estado = '<span style="color:grey;">Cancelado</span>'; } else { $estado = '<span style="color:grey;">Inactivo</span>'; } if (!$r['expulsado_estado']) { $r['expulsado_estado'] = 'expulsado'; } $txt .= '<tr><td valign="top"><img src="' . IMG . 'varios/kick.gif" alt="Kick" border="0" /></td><td valign="top"><b>' . $estado . '</b></td><td valign="top"><b>' . ($r['user_ID'] == 0 ? 'Anonimo' : crear_link($r['expulsado'], 'nick', $r['expulsado_estado'])) . '</b></td><td valign="top" nowrap="nowrap"><img src="' . IMG . 'cargos/' . $r['cargo'] . '.gif" border="0" /> ' . crear_link($r['nick_autor']) . '</td><td align="right" valign="top" nowrap="nowrap"><acronym title="' . $r['expire'] . '">' . timer($r['expire']) . '</acronym></td><td align="right" valign="top" nowrap="nowrap">' . duracion($r['tiempo'] + 1) . '</td><td><b style="font-size:13px;">' . ($r['motivo'] ? '<a href="/control/kick/info/' . $r['ID'] . '/">' . $r['razon'] . '</a>' : $r['razon']) . '</b></td><td>' . $expulsar . '</td></tr>' . "\n"; } $txt .= '</table>' . (ASAMBLEA ? '' : '<p>Los kicks solo pueden ser revocadas por un Comisario de Policia, un Juez Supremo o el Policía autor de la expulsión.</p>'); } break; case 'judicial': $txt_title = 'Control: Judicial'; $txt_nav = array('/control' => 'Control', 'Judicial'); $txt .= '<h1 class="quitar"><a href="/control/">Control</a>: Judicial</h1><p>Panel Judicial para Jueces.</p> <h2>1. Sanciones</h2><hr /> <table border="0" cellspacing="1" cellpadding="" class="pol_table"> <tr> <th></th> <th>Sancionado</th>
if ($row['nick_emisor'] == $pol['nick']) { //doy $transferir_nick = $row['nick_receptor']; $transf = '→ ' . crear_link($row['nick_receptor']); $transf_pre = '→'; $transf_ID = $row['receptor_ID']; $pols = '-' . $row['pols']; } else { //recibo $transferir_nick = $row['nick_emisor']; $transf = '← ' . crear_link($row['nick_emisor']); $transf_pre = '←'; $transf_ID = $row['emisor_ID']; $pols = $row['pols']; } if ($transf_ID < 0) { $cuenta_ID = substr($transf_ID, 1); $result2 = mysql_query("SELECT nombre FROM " . SQL . "cuentas WHERE ID = '" . $cuenta_ID . "' LIMIT 1", $link); while ($row2 = mysql_fetch_array($result2)) { $cuenta_nombre = $row2['nombre']; } $transferir_nick = $transf_ID; $transf = $transf_pre . ' #<a href="/pols/cuentas/' . $cuenta_ID . '/"><b>' . $cuenta_nombre . '</b></a>'; } $txt .= '<tr><td align="right" valign="top"><b>' . pols($pols) . '</b></td><td valign="top">' . $transf . '</td><td>' . $row['concepto'] . '</td><td valign="top" align="right"><acronym title="' . $row['time'] . '">' . str_replace(" ", " ", duracion(time() - strtotime($row['time']))) . '</acronym></td><td valign="top" align="right">' . boton('→', '/pols/transferir/' . strtolower($transferir_nick), false, 'small') . '</td></tr>'; } $txt .= '</table><p>' . $p_paginas . '</p>'; } //THEME $txt_menu = 'econ'; include 'theme.php';