X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=htdocs%2Fwebredirect.php;h=cca10b1d54ec87cf9a8584000c925200007f06d4;hb=fc1e1399ad17d4a5c4cd8ffb8221938aa61dce11;hp=9bff9b508c6f338607ab0fcb1f55afa7218044b1;hpb=0337d704b62718d7c77106c0e4c4e26fb02beacf;p=platal.git diff --git a/htdocs/webredirect.php b/htdocs/webredirect.php index 9bff9b5..cca10b1 100644 --- a/htdocs/webredirect.php +++ b/htdocs/webredirect.php @@ -1,6 +1,6 @@ xdb->execute('UPDATE auth_user_quick SET redirecturl = {?} WHERE user_id = {?}', - $url, Session::getInt('uid'))) - { - $log->log('carva_add', 'http://'.Env::get('url')); - $page->trig("Redirection activée vers $url"); +if ($url = $res->fetchOneCell()) { + $url = preg_replace('@/+$@', '', $url); + if ($path) { + http_redirect("http://$url/$path"); } else { - $page->trig('Erreur de mise à jour'); - } -} elseif (Env::get('submit') == "Supprimer") { - if ($globals->xdb->execute("UPDATE auth_user_quick SET redirecturl = '' WHERE user_id = {?}", Session::getInt('uid'))) - { - $log->log("carva_del", $url); - Post::kill('url'); - $page->trig('Redirection supprimée'); - } else { - $page->trig('Erreur de suppression'); + http_redirect("http://$url"); } } +header("HTTP/1.0 404 Not Found"); -$res = $globals->xdb->query('SELECT redirecturl FROM auth_user_quick WHERE user_id = {?}', Session::getInt('uid')); -$page->assign('carva', $res->fetchOneCell()); - -$page->run(); +?> + + + + 404 Not Found + + +

Not Found

+ The requested URL was not found on this server.

+


+
Apache Server at www.carva.org Port 80
+ +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>