Ejemplo n.º 1
0
<?php

require "settings.php";
require "functions.php";
// Split the variable into two, $domain & $port.
list($domain, $port) = filter_domain($_GET["domain"]);
// Check the site and get the response code.
$data = get_response($domain, $port);
// Caluate and format the time taken to connect.
$time = round($data["time"], 3);
$id = gen_id($data);
$title = gen_title($id, $domain);
$html = gen_html($id, $domain, $port, $time, $data["code"]);
?>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>

    <title><?php 
echo $title . " // isitup.org";
// display the dynamic title
?>
</title>

    <!-- Hi r/ProgrammerHumor :wave:! -->

    <!-- Meta Info -->
    <meta name="description" content="The availability results for <?php 
echo $domain;
?>
Ejemplo n.º 2
0
         }
     } elseif ($_GET['b'] == 'borrar') {
         unlink($img_root . $pol['user_ID'] . '.jpg');
         unlink($img_root . $pol['user_ID'] . '_40.jpg');
         unlink($img_root . $pol['user_ID'] . '_80.jpg');
         mysql_query("UPDATE users SET avatar = 'false' WHERE ID = '" . $pol['user_ID'] . "' LIMIT 1", $link);
         $refer_url = 'perfil/' . strtolower($pol['nick']) . '/';
     } elseif ($_GET['b'] == 'desc' and strlen($_POST['desc']) <= 2000) {
         $_POST['desc'] = gen_text($_POST['desc'], 'plain');
         mysql_query("UPDATE users SET text = '" . $_POST['desc'] . "' WHERE ID = '" . $pol['user_ID'] . "' LIMIT 1", $link);
     }
     $refer_url = 'perfil/' . strtolower($pol['nick']);
     break;
 case 'examenes':
     if ($_GET['b'] == 'crear' and $_POST['titulo'] and nucleo_acceso($vp['acceso']['examenes_decano'])) {
         $_POST['titulo'] = gen_title($_POST['titulo']);
         mysql_query("INSERT INTO " . SQL . "examenes (titulo, descripcion, user_ID, time, cargo_ID, nota, num_preguntas) VALUES ('" . $_POST['titulo'] . "', 'Editar...', '" . $pol['user_ID'] . "', '" . $date . "', '" . $_POST['cargo_ID'] . "', '5.0', 10)", $link);
         $new_ID = mysql_insert_id($link);
         mysql_query("UPDATE " . SQL . "examenes SET cargo_ID = '-" . $new_ID . "' WHERE ID = '" . $new_ID . "' LIMIT 1", $link);
         $refer_url = 'examenes';
     } elseif ($_GET['b'] == 'nueva-pregunta' and $_GET['ID'] != null and (nucleo_acceso($vp['acceso']['examenes_decano']) or nucleo_acceso($vp['acceso']['examenes_profesor'])) and $_POST['pregunta'] and $_POST['respuesta0'] != null and $_POST['respuesta1'] != null and $_POST['tiempo']) {
         for ($i = 0; $i < 10; $i++) {
             if ($_POST['respuesta' . $i]) {
                 if ($respuestas) {
                     $respuestas .= '|';
                 }
                 $respuestas .= ucfirst(trim(str_replace("|", "", $_POST['respuesta' . $i])));
             }
         }
         $pregunta = ucfirst($_POST['pregunta']);
         mysql_query("INSERT INTO " . SQL . "examenes_preg (examen_ID, user_ID, time, pregunta, respuestas, tiempo) VALUES ('" . $_GET['ID'] . "', '" . $pol['user_ID'] . "', '" . $date . "', '" . $pregunta . "', '" . $respuestas . "', " . $_POST['tiempo'] . ")", $link);