※上記の広告は60日以上更新のないWIKIに表示されています。更新することで広告が下部へ移動します。

<?php require_once('Connections/connAmazon2.php'); ?>
<?php

$currentPage = $_SERVER["PHP_SELF"];

$maxRows_rsAmazonz2 = 10;

$pageNum_rsAmazonz2 = 0;

if (isset($_GET['pageNum_rsAmazonz2'])) {
 $pageNum_rsAmazonz2 = $_GET['pageNum_rsAmazonz2'];
}
$startRow_rsAmazonz2 = $pageNum_rsAmazonz2 * $maxRows_rsAmazonz2;

$colname_rsAmazonz2 = "%";

if (isset($_GET['key'])) {
//magic_quotes_gpcの設定に応じて取得した値を変換する
 $colname_rsAmazonz2 = (get_magic_quotes_gpc()) ? $_GET['key'] : addslashes($_GET['key']);
}

$maxRows_rsAmazonz2 = 5;
$pageNum_rsAmazonz2 = 0;
if (isset($_GET['pageNum_rsAmazonz2'])) {
 $pageNum_rsAmazonz2 = $_GET['pageNum_rsAmazonz2'];
}
$startRow_rsAmazonz2 = $pageNum_rsAmazonz2 * $maxRows_rsAmazonz2;

mysql_select_db($database_connAmazon2, $connAmazon2);
$query_rsAmazonz2 = sprintf("SELECT * FROM amazonz_data WHERE uset_id LIKE '%s' ORDER BY uptime DESC", $colname_rsAmazonz2);
$query_limit_rsAmazonz2 = sprintf("%s LIMIT %d, %d", $query_rsAmazonz2, $startRow_rsAmazonz2, $maxRows_rsAmazonz2);
$rsAmazonz2 = mysql_query($query_limit_rsAmazonz2, $connAmazon2) or die(mysql_error());
$row_rsAmazonz2 = mysql_fetch_assoc($rsAmazonz2);

if (isset($_GET['totalRows_rsAmazonz2'])) {
 $totalRows_rsAmazonz2 = $_GET['totalRows_rsAmazonz2'];
} else {
 $all_rsAmazonz2 = mysql_query($query_rsAmazonz2);
 $totalRows_rsAmazonz2 = mysql_num_rows($all_rsAmazonz2);
}
$totalPages_rsAmazonz2 = ceil($totalRows_rsAmazonz2/$maxRows_rsAmazonz2)-1;

mysql_select_db($database_connAmazon2, $connAmazon2);
$query_rsMember = "SELECT * FROM amazonz_user ORDER BY id ASC";
$rsMember = mysql_query($query_rsMember, $connAmazon2) or die(mysql_error());
$row_rsMember = mysql_fetch_assoc($rsMember);
$totalRows_rsMember = mysql_num_rows($rsMember);

$queryString_rsAmazonz2 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
 $params = explode("&", $_SERVER['QUERY_STRING']);
 $newParams = array();
 foreach ($params as $param) {
   if (stristr($param, "pageNum_rsAmazonz2") == false && 
       stristr($param, "totalRows_rsAmazonz2") == false) {
     array_push($newParams, $param);
   }
 }
 if (count($newParams) != 0) {
   $queryString_rsAmazonz2 = "&" . htmlentities(implode("&", $newParams));
 }
}
$queryString_rsAmazonz2 = sprintf("&totalRows_rsAmazonz2=%d%s", $totalRows_rsAmazonz2, $queryString_rsAmazonz2);
?>

<?php
session_start();

$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($accesscheck)) {
 $GLOBALS['PrevUrl'] = $accesscheck;
 session_register('PrevUrl');
}

if (isset($_POST['id'])) {
 $loginUsername=$_POST['id'];
 $password=$_POST['pass'];
 $MM_fldUserAuthorization = "";
 $MM_redirectLoginSuccess = "admin2.php";
 $MM_redirectLoginFailed = "account_cre2.php";
 $MM_redirecttoReferrer = false;
 mysql_select_db($database_connAmazon2, $connAmazon2);
 
 $LoginRS__query=sprintf("SELECT id, pass FROM amazonz_user WHERE id='%s' AND pass='%s'",
   get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password)); 
  
 $LoginRS = mysql_query($LoginRS__query, $connAmazon2) or die(mysql_error());
 $loginFoundUser = mysql_num_rows($LoginRS);
 if ($loginFoundUser) {
    $loginStrGroup = "";
   
   //declare two session variables and assign them
   $GLOBALS['MM_Username'] = $loginUsername;
   $GLOBALS['MM_UserGroup'] = $loginStrGroup;	      

   //register the session variables
   session_register("MM_Username");
   session_register("MM_UserGroup");

   if (isset($_SESSION['PrevUrl']) && false) {
     $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];	
   }
   header("Location: " . $MM_redirectLoginSuccess );
 }
 else {
   header("Location: ". $MM_redirectLoginFailed );
 }
}
?>
<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>
	   <?php
	   if($_SESSION['MM_Username'] == ""){
	   ?>		   
	   <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 id="login">
	<form name="form1" method="POST" action="<?php echo $loginFormAction; ?>">
      ユーザーID:<input name="id" type="text"><br>
      パスワード:<input name="pass" type="password" id="pass"><br>
     <p><input type="submit" name="Submit" value="ログイン"></p>
      </form> 
       </div>
	<?php
	}else{
	?>
	<div class="img1"><?php echo ("ようこそ  " .$_SESSION['MM_Username']. "  さん"); ?><br><br>
	<a href="admin2.php?doLogout=true">ログアウト</a><br>
	<a href="admin2.php">管理画面</a><br>
	<a href="top.php">home</a>
	</div>
	<?php
	}
	?>
	 <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"></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"></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"></a></div>
      </div>
   <div id="text">
	 <img src="img/blank.jpg">
	 <form name="form1" method="get" action="">
 <div align="center">
   <p>メンバ検索</p>
   <?php do { ?>
<table width="250" border="0" cellpadding="3">
	 <tr>
       	<td><input name="key" type="radio" id="key" value="<?php echo $row_rsMember['id']; ?>">
               <?php echo $row_rsMember['id']; ?>
	    </td>
        </tr>
   </table>
       <?php } while ($row_rsMember = mysql_fetch_assoc($rsMember)); ?>
	<input type="submit" name="Submit" value="検索">
 </div>	
</form>
<p align="center">
<!-- セレクトKEYが空でない場合以後表示 -->
<?php if($_GET['key'] !=""){
$key=$_GET['key'];
$kensu=$totalRows_rsAmazonz2;
print(" $key で検索した結果");
print(" $kensu 件ヒットしました");
}  ?>
 レコード <?php echo ($startRow_rsAmazonz2 + 1) ?>
~ <?php echo min($startRow_rsAmazonz2 + $maxRows_rsAmazonz2, $totalRows_rsAmazonz2) ?>
 件 / 全 <?php echo $totalRows_rsAmazonz2 ?> </p>
<table width="400" border="0" align="center" cellpadding="3">
 <?php do { ?>
 <tr>
   <td><span class="style3"><?php echo $row_rsAmazonz2['uptime']; ?></span></td>
 </tr>
 <tr>
   <td><span class="style3"><?php echo $row_rsAmazonz2['title']; ?></span></td>
 </tr>
 <tr>
   <td><span class="style3"><?php echo $row_rsAmazonz2['category']; ?></span></td>
 </tr>
 <tr>
   <td><span class="style3"><?php echo nl2br($row_rsAmazonz2['topic']); ?></span></td>
 </tr>
 <tr>
   <td><span class="style3"><?php echo $row_rsAmazonz2['uset_id']; ?></span></td>
 </tr>
 <tr>
   <td><hr></td>
 </tr>
 <?php } while ($row_rsAmazonz2 = mysql_fetch_assoc($rsAmazonz2)); ?>
</table>

<table border="0" width="50%" align="center">
 <tr>
   <td width="23%" align="center"><?php if ($pageNum_rsAmazonz2 > 0) { // Show if not first page ?>
     <a href="<?php printf("%s?pageNum_rsAmazonz2=%d%s", $currentPage, 0, $queryString_rsAmazonz2); ?>">先頭</a>
     <?php } // Show if not first page ?>
   </td>
   <td width="31%" align="center"><?php if ($pageNum_rsAmazonz2 > 0) { // Show if not first page ?>
     <a href="<?php printf("%s?pageNum_rsAmazonz2=%d%s", $currentPage, max(0, $pageNum_rsAmazonz2 - 1), $queryString_rsAmazonz2); ?>">戻る</a>
     <?php } // Show if not first page ?>
   </td>
   <td width="23%" align="center"><?php if ($pageNum_rsAmazonz2 < $totalPages_rsAmazonz2) { // Show if not last page ?>
     <a href="<?php printf("%s?pageNum_rsAmazonz2=%d%s", $currentPage, min($totalPages_rsAmazonz2, $pageNum_rsAmazonz2 + 1), $queryString_rsAmazonz2); ?>">次へ</a>
     <?php } // Show if not last page ?>
   </td>
   <td width="23%" align="center"><?php if ($pageNum_rsAmazonz2 < $totalPages_rsAmazonz2) { // Show if not last page ?>
     <a href="<?php printf("%s?pageNum_rsAmazonz2=%d%s", $currentPage, $totalPages_rsAmazonz2, $queryString_rsAmazonz2); ?>">最終</a>
     <?php } // Show if not last page ?>
   </td>
 </tr>
</table>
<?php
mysql_free_result($rsAmazonz2);
mysql_free_result($rsMember);
?>
	 <p>&nbsp;</p>
        </div> 
	 <div id="under">
	   <div id="under1"></div>
	   <div id="under2"></div>
        </div> 
    </div>
 </div>  
</body>
</html>
|