Skip to content

Commit

Permalink
Agrego listado y update
Browse files Browse the repository at this point in the history
See #4
  • Loading branch information
mgarciaisaia committed May 4, 2016
1 parent aaf8ca3 commit 6218541
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
33 changes: 33 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<html>
<head>
<title>[email protected]</title>
<style>tr:nth-child(even){ background-color: #DDD; }</style>
</head>
<body>
<h1>[email protected]</h1>
<h4>Porque el CSS es muy 2000's</h4>
Las URLs de la tabla redirigen a sus destinos. Cualquiera de ellas puede usarse accediendo a <b>http://faq.utn.so/<i>${URL}</i></b>.<br />
Las redirecciones v&aacute;lidas <a href="https://github.com/sisoputnfrba/faqoperativos-links">se versionan en GitHub</a>. Los pull requests son bienvenidos.
<table>
<tr>
<th>URL</th>
<th>Destino</th>
</tr>
<?php
$archivo = file(".htaccess");
foreach($archivo as $line_number => $line) {
if(strpos($line, '#') === FALSE) {
$parts = explode(' ', $line);
if($parts[0] == "Redirect" && $parts[1] == "302") { ?>
<tr>
<td><a href="<?php echo $parts[3]; ?>"><?php echo $parts[2]; ?></a></td>
<td><?php echo $parts[3]; ?></td>
</tr><?php
}
}
}
?>
</table>
</body>
</html>

6 changes: 6 additions & 0 deletions update.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
if(md5($_GET['key']) == $_ENV['FAQ_UTN_SO_SECRET']) {
echo copy('https://raw.github.com/sisoputnfrba/faqoperativos-links/master/.htaccess', '.htaccess');
}
?>

0 comments on commit 6218541

Please sign in to comment.