/specialmarry/pet.php
PHP | 282 lines | 261 code | 12 blank | 9 comment | 15 complexity | 34171ef0e232c052d28be56124863115 MD5 | raw file
- <?php
- session_start();
- require_once("../mysql/DataBasesClass.php");
- $DB=new DataBasesClass;
- if(isset($_GET['page']))
- {
- $page=$_GET['page'];
- $userid=$_GET['userid'];
- }
- else
- {
- $page=0;
- $userid=$_GET['userid']; // ??user_id;
- // $userid=$DB->atrribute_value('user',$username,'user_id');
- }
-
- $userarr=$DB->user_information($userid);
- $username=$userarr['user_name'];
-
- if($userid==-1)//?????(???????id)
- {
- Header("Location:namewrong.php");//DataBasesClass.php???????????????????
- exit;
- }
- $sql="select * from pet where user_id='".$userid."'";
- $result=mysql_query($sql,$DB->my_connect);
- $pet_num=@mysql_num_rows($result);
-
- //echo $pet_num;
- if($userid==-1)
- {
- $pet_num=-1;//?????
- }
-
- while($row = @mysql_fetch_array($result, MYSQL_ASSOC))
- {
- $petid=$row['pet_id'];
- $pet_id[]=$DB->atrribute_value("pet",$petid,"pet_id");
- $pet_name[]=$DB->atrribute_value("pet",$petid,"pet_name");
- $pet_sex[]=$DB->atrribute_value("pet",$petid,"pet_sex");
- $pet_species[]=$DB->atrribute_value("pet",$petid,"pet_species");
- $pet_otherspecies[]=$DB->atrribute_value("pet",$petid,"pet_species_others");
- $pet_birth[]=$DB->atrribute_value("pet",$petid,"pet_birthday");
- $pet_info[]=$DB->atrribute_value("pet",$petid,"pet_information");
- $pet_pay_way[]=$DB->atrribute_value("pet",$petid,"pet_pay_way");
- $pet_pay_cost[]=$DB->atrribute_value("pet",$petid,"pet_pay_cost");
- $pet_pay_time[]=$DB->atrribute_value("pet",$petid,"pet_pay_time");
- $pet_require[]=$DB->atrribute_value("pet",$petid,"pet_sex_require");
- $pet_child_distribution[]=$DB->atrribute_value("pet",$petid,"pet_child_distribution");
- $pet_visited[]=$DB->atrribute_value("pet",$petid,"pet_visited");//
- $pet_kind[]=$DB->atrribute_value("pet",$petid,"pet_kind");//
- }
-
- if($pet_num==1)
- {//???
- $turnpage="";
- }
- if(($pet_num==($page+1))&&($pet_num!=1))
- {//??????
- $turnpage='<a href=otherspecialprofile.php?page='.($page-1).'&userid='.$userid.'>???</a>';
- }
- if($pet_num>($page+1))
- {//?????????
- $turnpage='<a href=otherspecialprofile.php?page='.($page-1).'&userid='.$userid.'>???</a>|<a href=otherspecialprofile.php?page='.($page+1).'&userid='.$userid.'>???</a>';
- }
- if(($page==0)&&($pet_num!=1))
- {
- $turnpage='<a href=otherspecialprofile.php?page='.($page+1).'&userid='.$userid.'>???</a>';
- }
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
- <!-- InstanceBeginEditable name="doctitle" -->
- <title>??????????</title>
- <link rel="stylesheet" type="text/css" href="../../Templates/sdmenu/sdmenu.css" />
- <script type="text/javascript" src="../../Templates/sdmenu/sdmenu.js">
- /***********************************************
- * Slashdot Menu script- By DimX
- * Submitted to Dynamic Drive DHTML code library: http://www.dynamicdrive.com
- * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
- ***********************************************/
- </script>
- <script type="text/javascript">
- // <![CDATA[
- var myMenu;
- window.onload = function() {
- myMenu = new SDMenu("my_menu");
- myMenu.init();
- };
- function loginin()
- {
- window.showModalDialog('http://localhost/petfeeling/loginout/loginin.php');
- }
- function loginout()
- {
- if(confirm("??????")){
- window.location.href='http://localhost/petfeeling/loginout/exitok.php';
- } }
- // ]]>
- </script>
- <!-- InstanceEndEditable -->
- <!-- InstanceBeginEditable name="head" -->
- <!-- InstanceEndEditable -->
- <style type="text/css">
- <!--
- .STYLE1 {font-family: "????", "??"}
- .STYLE3 {
- font-size: 18px;
- font-family: "??";
- }
- -->
- </style>
- <link href="../../style.css" rel="stylesheet" type="text/css" />
- <link href="../style.css" rel="stylesheet" type="text/css" />
- <style type="text/css">
- <!--
- .STYLE6 {font-size: 18px}
- .STYLE7 {font-family: "??"}
- -->
- </style>
- </head>
-
- <body style="margin:0">
- <div id="main" style="width:1000px;margin:0 auto;border:1px #ccc solid;">
- <div class="headline" style="text-align: right;background:#b64eeb;">
- <?php if(!isset($_SESSION['username']))
- {?>
- <td> <button type="button" onclick='loginin()'>??</button></td>
- <td><a href="../../loginout/register.php">??</a></td>
- <?php }
- else { ?>
- <td> <button type="button" onclick='loginout()'>??</button></td>
- <td> <?php echo "??: ".$_SESSION['username']; ?></td>
- <td> <?php echo "???:".$DB->noreadmessage($_SESSION['username']) ; ?></td>
- <?php
- }
- ?>
- </div>
- <div id="head" style="height:187px;width:1000px;border:1px #ccc solid">
- <table width="1000" height="187px" border="0" bgcolor="#FF9999" background-color="rgb(255,128,128)" cellpadding="0" cellspacing="0">
- <tr>
- <td height="132" colspan="9" align="left" bordercolor="#FF9999" bgcolor="white"><img src="../images/??logo.jpg" width="210" height="132" />
- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="782" height="132">
- <param name="movie" value="../../images/logo.swf" />
- <param name="quality" value="high" />
- <embed src="../../images/logo.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="782" height="132"></embed>
- </object></td>
- </tr>
- <tr>
- <td width="111" height="55" align="center" background="../images/????.jpg" bgcolor="#FF9999" class="content"><span class="STYLE3 STYLE6 STYLE1"><a href="../index.php" class="STYLE1">??</a></span></td>
- <td width="111" align="center" background="../images/????.jpg" bgcolor="#FF9999" class="content"><span class="STYLE1 STYLE7 STYLE3 STYLE6"><span class="STYLE1"><a href="../marry/dogmarry.php">????</a></span></span></td>
- <td width="107" align="center" background="../images/????.jpg" bgcolor="#FF9999" class="content"><span class="STYLE3 STYLE1 STYLE6"><span class="STYLE1"><a href="../marry/catmarry.php">????</a></span></span></td>
- <td width="104" align="center" background="../images/????.jpg" bgcolor="#FF9999" class="content"><span class="STYLE3 STYLE1 STYLE6"><span class="STYLE1"><a href="../marry/othermarry.php">????</a></span></span></td>
- <td width="117" align="center" background="../images/????.jpg" bgcolor="#FF9999" class="content"><span class="STYLE3 STYLE1 STYLE6"><span class="STYLE1"><a href="specialmarry.php">??????</a></span></span></td>
- <td width="105" align="center" background="../images/????.jpg" bgcolor="#FF9999" class="content"><span class="STYLE3 STYLE1 STYLE6"><span class="STYLE1"><a href="../myaccount/myaccount.php">????</a></span></span></td>
- <td width="104" align="center" background="../images/????.jpg" bgcolor="#FF9999" class="content"><span class="STYLE3 STYLE1 STYLE6"><span class="STYLE1"><a href="../petknowledge/petknowledgeindex.php">????</a></span></span></td>
- <td width="106" align="center" background="../images/????.jpg" bgcolor="#FF9999" class="content"><span class="STYLE3 STYLE1 STYLE6"><span class="STYLE1">????</span></span></td>
- <td width="97" height="55" align="center" background="../images/????.jpg" bgcolor="#FF9999" class="content"><span class="STYLE1 STYLE6">????</span></td>
- </tr>
- </table>
- </div>
-
- <div style="float:left;width:845px;height:900px;">
- <!-- InstanceBeginEditable name="EditRegion3" -->
- <div style="margin:20px;">
- <table width="807" height="193" border="0">
- <td width="265"><form action="../myaccount/mail/message.php?email_to=<?php echo $username; ?> " method="post" name="form" id="form" >
- <tr class="content">
- <td height="57" colspan="3" class="title" background="../images/?????.gif">????????</td>
- </tr>
- <tr class="content">
- <td height="57" align="left" class="dashedtd">?????<?php echo $userarr['user_real_name'];?><strong></strong></td>
- <td width="284" height="57" class="dashedtd">???<?php echo $userarr['user_email'];?><strong></strong></td>
- <td width="244" class="dashedtd"><input name="submit" type="submit" class="STYLE3" value="????"/></td>
- </tr>
- <form/>
- <tr>
- <td height="69" align="left" class="dashedtd">?????<?php $province=$userarr['user_province'];
- if ($province=="??"||$province=="??"||$province=="??"||$province=="??")
- {
- echo $province."?";
- }
- else{
- echo $province."?".$userarr['user_city'];
- } ?></td>
- <td height="69" valign="middle" class="dashedtd">?????<?php echo $userarr['user_tel']; ?></td>
- <td class="dashedtd"> </td>
- </tr>
- <tr>
- <td height="69" colspan="3" align="left" class="dashedtd">???????<?php echo $userarr['user_information']; ?></td>
- </tr>
- <tr class="content">
- <td height="57" colspan="3" background="../images/?????.gif" class="title">????</td>
- </tr>
- </table>
- <table width="807" height="865" border="0">
- <?php if($pet_num==0)
- echo "<tr><td class='title STYLE4'>"."???????????"."</td></tr>";
- else {
- ?>
- <tr>
- <td width="182" rowspan="7">
- <?php if(!file_exists("../../petsimage/".$user_id.'_'.$petid."small.jpg")){ ?>
- <p><img src="../images/petphoto.gif" width="160" height="160" /></p>
- <?php }
- else{ ?><p><img src="../../petsimage/<?php echo $user_id.'_'.$petid."small.jpg"; ?>" width="160" height="160" /></p> <?php }?></td>
- <td width="123" height="39" class="dashedtd"><span class="dashedtd">?????</span></td>
- <td width="488" class="dashedtd"> <?php echo $pet_name[$page];?></td>
- </tr>
- <tr>
- <td height="44" class="dashedtd">?????</td>
- <td height="44" class="dashedtd"> <?php echo $pet_kind[$page];?></td>
- </tr>
- <tr>
- <td height="44" class="dashedtd"><span class="content">?????</span></td>
- <td height="44" class="dashedtd"> <?php echo $pet_sex[$page];?></td>
- </tr>
- <tr>
- <td height="36" class="dashedtd"><span class="content">?????</span></td>
- <td height="36" class="dashedtd"> <?php $petspecies=$pet_species[$page];
- if ($petspecies=="??"){
- echo $pet_species[$page];
- echo " ".$pet_otherspecies[$page];
- }
- else
- echo $pet_species[$page];?></td>
- </tr>
- <tr>
- <td height="39" class="dashedtd"><span class="content">?????</span></td>
- <td height="39" class="dashedtd"> <?php echo $pet_birth[$page];?></td>
- </tr>
-
-
- <tr>
- <td height="39" class="dashedtd">?????</td>
- <td height="39" class="dashedtd"> <?php echo $pet_visited[$page];?></td>
- </tr>
-
- <tr>
- <td height="39" class="dashedtd"><span class="content">???????</span></td>
- <td height="39" class="dashedtd"> <?php echo $pet_info[$page];?></td>
- </tr>
- <tr>
- <td height="57" colspan="3" background="../images/?????.gif" class="title">??????</td>
- </tr>
- <tr>
- <td height="36" class="dashedtd">????:</td>
- <td colspan="2" class="dashedtd"> <?php echo $pet_pay_way[$page];?></td>
- </tr>
- <tr>
- <td height="38" class="dashedtd">??????:</td>
- <td colspan="2" class="dashedtd"> <?php echo $pet_child_distribution[$page];?></td>
- </tr>
- <tr>
- <td height="38" class="dashedtd">????:</td>
- <td colspan="2" class="dashedtd"> <?php echo $pet_pay_cost[$page];?></td>
- </tr>
- <tr>
- <td height="37" class="dashedtd">??????:</td>
- <td colspan="2" class="dashedtd"> <?php echo $pet_pay_time[$page];?></td>
- </tr>
- <tr>
- <td height="37" class="dashedtd"><span class="content">???????</span></td>
- <td colspan="2" class="dashedtd"> <?php echo $pet_require[$page];?></td>
- </tr>
- <tr>
- <td height="22" colspan="3" align="center"> <?php echo $turnpage?></td>
- </tr>
- <?php
- }
- ?>
- <td height="128"></tbody>
- </table>
- </div>
- <!-- InstanceEndEditable --> </div>
-
- </div>
-
- </body>
- <!-- InstanceEnd --></html>