2024-10-10
This commit is contained in:
21
web/admin/news_df_change.php
Normal file
21
web/admin/news_df_change.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php require_once("admin-header.php");
|
||||
require_once("../include/check_get_key.php");
|
||||
if (!(isset($_SESSION[$OJ_NAME.'_'.'administrator']))){
|
||||
echo "<a href='../loginpage.php'>Please Login First!</a>";
|
||||
exit(1);
|
||||
}
|
||||
?>
|
||||
<?php $id=intval($_GET['id']);
|
||||
$sql="SELECT `defunct` FROM `news` WHERE `news_id`=?";
|
||||
$result=pdo_query($sql,$id);
|
||||
$row=$result[0];
|
||||
$defunct=$row[0];
|
||||
echo $defunct;
|
||||
|
||||
if ($defunct=='Y') $sql="update `news` set `defunct`='N' where `news_id`=?";
|
||||
else $sql="update `news` set `defunct`='Y' where `news_id`=?";
|
||||
pdo_query($sql,$id) ;
|
||||
?>
|
||||
<script language=javascript>
|
||||
history.go(-1);
|
||||
</script>
|
||||
Reference in New Issue
Block a user