「account_cre2.php」の編集履歴(バックアップ)一覧はこちら
「account_cre2.php」(2006/11/07 (火) 09:15:52) の最新版変更点
追加された行は緑色になります。
削除された行は赤色になります。
<?php require_once('Connections/connAmazon2.php'); ?>
<?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;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO amazonz_user (id, name, pass) VALUES (%s, %s, %s)",
GetSQLValueString($_POST['id'], "text"),
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString($_POST['pass'], "text"));
mysql_select_db($database_connAmazon2, $connAmazon2);
$Result1 = mysql_query($insertSQL, $connAmazon2) or die(mysql_error());
$insertGoTo = "admin2.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?>
<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"><a href="account_cre2.php" class="img1" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','img/account2.jpg',1)"><img src="img/account.jpg" alt="アカウントを作成する" name="Image6" width="180" height="40" hspace="0" vspace="0" border="0" class="img1"></a></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="text">
<img src="img/blank.jpg" /><br>
<p></p>
<form method="post" name="form1" action="<?php echo $editFormAction; ?>">
<table align="center" class="style3">
<tr>
<td colspan="2"><p align="center">希望するIDとパスワード、名前を入力してください<br>HOMEへ戻る方は<a href="top.php">こちら</a>をクリックしてください</p></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">ID:</td>
<td><input type="text" name="id" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td height="37" align="right" nowrap>名前</td>
<td><input type="text" name="name" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">パスワード</td>
<td><input type="text" name="pass" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"> </td>
<td><input type="submit" value="作成"></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1">
</form>
</div>
<div id="under">
<div id="under1"></div>
<div id="under2"></div>
</div>
</div>
</div>
</body>
</html>