mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-23 23:20:57 +01:00
...
This commit is contained in:
parent
e1e5dc713e
commit
d7f7b602ef
17
mod.php
17
mod.php
@ -348,6 +348,23 @@
|
||||
header('Location: ' . $_SERVER['HTTP_REFERER'], true, REDIRECT_HTTP);
|
||||
else
|
||||
header('Location: ?/' . sprintf(BOARD_PATH, $boardName) . FILE_INDEX, true, REDIRECT_HTTP);
|
||||
} elseif(preg_match('/^\/' . $regex['board'] . 'deletebyip\/(\d+)$/', $query, $matches)) {
|
||||
// Delete all posts by an IP
|
||||
|
||||
$boardName = $matches[1];
|
||||
$post = $matches[2];
|
||||
// Open board
|
||||
if(!openBoard($boardName))
|
||||
error(ERROR_NOBOARD);
|
||||
|
||||
$query = prepare(sprintf("SELECT `id` FROM `posts_%s` WHERE `ip` = :ip", $board['uri']));
|
||||
$query->bindValue(':ip', $ip);
|
||||
$query->execute() or error(db_error($query));
|
||||
|
||||
//if(isset($_SERVER['HTTP_REFERER']))
|
||||
// header('Location: ' . $_SERVER['HTTP_REFERER'], true, REDIRECT_HTTP);
|
||||
//else
|
||||
// header('Location: ?/' . sprintf(BOARD_PATH, $boardName) . FILE_INDEX, true, REDIRECT_HTTP);
|
||||
} elseif(preg_match('/^\/ban$/', $query)) {
|
||||
// Ban page
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
<script type="text/javascript" src="{index}main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<img style="margin:10px auto;float:none" src="/banner.php" />
|
||||
<h1>{board[url]} - {board[name]}</h1>
|
||||
<div class="title">{board[title]?{board[title]}}<p>{mod?<a href="?/">Return to dashboard</a>}</p></div>
|
||||
|
||||
@ -38,7 +39,7 @@
|
||||
</th>
|
||||
<td>
|
||||
<input style="float:left;" type="text" name="subject" size="25" maxlength="25" autocomplete="off" />
|
||||
<input style="float:right;" type="submit" name="post" value="{button=New Topic}" />
|
||||
<input accesskey="s" style="float:right;" type="submit" name="post" value="{button=New Topic}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -8,6 +8,7 @@
|
||||
<script type="text/javascript" src="{index}main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<img style="margin:10px auto;float:none" src="/banner.php" />
|
||||
<h1>{board[url]} - {board[name]}</h1>
|
||||
<div class="title">{board[title]?{board[title]}}<p>{mod?<a href="?/">Return to dashboard</a>}</p></div>
|
||||
|
||||
@ -39,7 +40,7 @@
|
||||
</th>
|
||||
<td>
|
||||
<input style="float:left;" type="text" name="subject" size="25" maxlength="25" autocomplete="off" />
|
||||
<input style="float:right;" type="submit" name="post" value="{button=New Topic}" />
|
||||
<input accesskey="s" style="float:right;" type="submit" name="post" value="{button=New Topic}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
Loading…
Reference in New Issue
Block a user