<?php require_once('Connections/connAmazon2.php'); ?>
<?php
session_start();
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "top.php";
if (! && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
$MM_referrer .= "?" . $QUERY_STRING;
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
if && ($_POST['id'] != "")) {
$deleteSQL = sprintf("DELETE FROM amazonz_data WHERE id=%s",
GetSQLValueString($_POST['id'], "int"));
mysql_select_db($database_connAmazon2, $connAmazon2);
$Result1 = mysql_query($deleteSQL, $connAmazon2) or die(mysql_error());
$deleteGoTo = "admin2.php";
if (isset($_SERVER['QUERY_STRING'])) {
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
$deleteGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $deleteGoTo));
}
$colname_rsAmazon = "1";
if (isset($_GET['id'])) {
$colname_rsAmazon = (get_magic_quotes_gpc()) ? $_GET['id'] : addslashes($_GET['id']);
}
mysql_select_db($database_connAmazon2, $connAmazon2);
$query_rsAmazon = sprintf("SELECT * FROM amazonz_data WHERE id = %s", $colname_rsAmazon);
$rsAmazon = mysql_query($query_rsAmazon, $connAmazon2) or die(mysql_error());
$row_rsAmazon = mysql_fetch_assoc($rsAmazon);
$totalRows_rsAmazon = mysql_num_rows($rsAmazon);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-jp" />
<title>Amazonz -削除確認-</title>
<link href="css.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
</script>
</head>
<body onload="MM_preloadImages('img/account2.jpg','img/key2.jpg','img/member2.jpg','img/kate2.jpg')">
<div id="body_2">
<div id="head">
<div id="head1"></div>
<div id="head2"></div>
</div>
<div id="main">
<div id="menu">
<div class="img1"><img src="img/menu1.jpg" width="180" height="24" class="img1" /></div>
<div class="img1">
<div class="img1"><?php echo ($_SESSION['MM_Username']. "さん こんにちわ!"); ?>
</div>
<p>
<a href="admin2.php">管理画面</a><br>
<a href="admin2.php?doLogout=true">ログアウト</a><br>
<a href="top.php">HOME</a>
</p>
</div>
<div class="img1"><img src="img/menu1.jpg" width="180" height="24" hspace="0" vspace="0" border="0" class="img1" /></div>
<div class="img1"><a href="member_s.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','img/member2.jpg',1)"><img src="img/member.jpg" alt="メンバー検索" name="Image10" width="180" height="40" border="0" id="Image10" /></a></div>
<div class="img1"><a href="category_s.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','img/kate2.jpg',1)"><img src="img/kate.jpg" alt="カテゴリー検索" name="Image11" width="180" height="40" border="0" id="Image11" /></a></div>
<div class="img1"><a href="key_s.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','img/key2.jpg',1)"><img src="img/key.jpg" alt="キーワード検索" name="Image9" width="180" height="40" border="0" id="Image9" /></a></div>
</div>
<div id="text2">
<img src="img/blank.jpg" /><br>
<p><br>
</p>
<table width="400" border="0" align="center" cellpadding="3" class="style3">
<tr>
<td><p align="center">この投稿を本当に削除してもよろしいですか?<a href="admin2.php">管理画面に戻る</a></p></td>
</tr>
<tr>
<td>ID:<?php echo $row_rsAmazon['id']; ?></td>
</tr>
<tr>
<td>タイトル:<?php echo $row_rsAmazon['title']; ?></td>
</tr>
<tr>
<td>カテゴリ:<?php echo $row_rsAmazon['category']; ?></td>
</tr>
<tr>
<td>トピック:<?php echo nl2br($row_rsAmazon['topic']); ?></td>
</tr>
<tr>
<td>登録者:<?php echo $row_rsAmazon['uset_id']; ?></td>
</tr>
<tr>
<td>最終更新日時:<?php echo $row_rsAmazon['uptime']; ?></td>
</tr>
<tr>
<td><form name="form1" method="post" action="">
<input type="submit" name="Submit" value="削除">
<input name="id" type="hidden" id="id" value="<?php echo $row_rsAmazon['id']; ?>">
削除後は管理画面に戻ります</form></td>
</tr>
</table>
</div>
<div id="under">
<div id="under1"></div>
<div id="under2"></div>
</div>
</div>
</div>
</body>
</html>
最終更新:2006年11月07日 09:16