<? ob_start();
session_start();
require_once("../dbconnect.php");
?>
<!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=iso-8859-1" />
<?php include_once("title.php");?>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="ajaxvalid.js"></script>
<style type="text/css">
<!--
.style2 {
	color: #21262A;
	font-size: 12px;
}
-->
</style>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td><? require_once("header.php"); ?></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td height="30" class="cate_pro">Customers</td>
                    <td>&nbsp;</td>
                    <td class="index_text" align="right">&nbsp;</td>
                    <td width="20">&nbsp;</td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="72%" valign="top" style="padding-right:1px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td height="35" colspan="5"><table border="0" cellpadding="2" cellspacing="0" width="100%">
                          <tr class="dataTableHeadingRow">
                            <td width="59" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent"><u>Id</u></td>
                            <td width="94" align="left" bgcolor="#D7D6CC" class="dataTableHeadingContent"><strong>First Name</strong></td>
                            <td width="69" align="left" bgcolor="#D7D6CC" class="dataTableHeadingContent"><strong>Last Name</strong></td>
                            <td width="1" align="right" bgcolor="#D7D6CC" class="dataTableHeadingContent">&nbsp;</td>
                            <td width="2" align="right" bgcolor="#D7D6CC" class="dataTableHeadingContent">&nbsp;</td>
                            <td width="139" align="left" bgcolor="#D7D6CC" class="dataTableHeadingContent"><strong>Email Address</strong>&nbsp;&nbsp;&nbsp;</td>
                            <td width="113" align="left" bgcolor="#D7D6CC" class="dataTableHeadingContent"><strong>Phone Number</strong></td>
                            <td width="80" align="left" bgcolor="#D7D6CC" class="dataTableHeadingContent"><strong>Fax Number</strong></td>
                            <td width="22" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">&nbsp;</td>
                            <td width="97" align="left" bgcolor="#D7D6CC" class="dataTableHeadingContent">Action&nbsp;</td>
                          </tr>
                          <? 
					$sql = "Select * from register where user_id=".$_GET['userid'];
	$catres = mysql_query($sql); 
	$laxman=0;
	 while($catrow=mysql_fetch_array($catres))
											 { 
											  $laxman++; 
						  ?>
                         <div id="stufftotoggle">
                          <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">
                            <td width="59" height="30" align="center" class="dataTableContent"><?php echo $catrow['user_id']; ?></td>
                            <td align="left" class="dataTableContent"><?php echo $catrow['Fname']; ?></td>
                            <td align="left" class="dataTableContent"><?php echo $catrow['Lname']; ?></td>
                            <td colspan="2" class="dataTableContent" align="left">&nbsp;</td>
                            <td class="dataTableContent" align="left"><?php echo $catrow['Email']; ?></td>
                            <td class="dataTableContent" align="left"><?php echo $catrow['Phone']; ?></td>
                            <td class="dataTableContent" align="left"><?php echo $catrow['Fax']; ?></td>
                            <td class="dataTableContent" align="center">&nbsp;</td>
                            <td class="dataTableContent" align="left" style="padding-left:15px;">
                       
                       
                                      
     <?          
 if($_GET['userid']!=$catrow['user_id'])
{?>
           <a href="customersid.php?edit=edit&userid=<? echo $catrow['user_id']; ?>&page=<?php echo $_GET['page']; ?>">
                   <img src="<? echo $baseurl; ?>images/icon_info.gif" border="0" />                   </a>
                   
           <? } else
		   {?>
            <a href="customersid.php?edit=edit&userid=<? echo $catrow['user_id']; ?>&page=<?php echo $_GET['page']; ?>">
                            
                   <img src="<? echo $baseurl; ?>images/icon_arrow_right.gif" border="0" />                   </a>
           <?
		   }?> 
                  
                 
                   
                   
                   
                          </td>
                          </tr>
                          </div>
                          <? } ?>
                        </table></td>
                      </tr>
                      <tr>
                        <td width="22%" height="35">&nbsp;</td>
                        <td width="16%" align="center"><a href="addcategory.php?addcat=addcat"></a></td>
                        <td width="16%" align="center"></td>
                        <td width="23%">&nbsp;</td>
                        <td width="23%">&nbsp;</td>
                      </tr>
                    </table></td>
                    <td width="28%" valign="top">
                               <? if($_GET['edit']=='edit')
				    {
					 $sqlcus="Select * from register where user_id=".$_GET['userid']; 
					  $sqlexe=mysql_query($sqlcus);
					  $rowc=mysql_fetch_array($sqlexe);
						
						?>
                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
                      
                        <tr>
                          <td height="17" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent"><table cellspacing="0" cellpadding="0">
                            <tr>
                              <td><strong>ID#<? echo $rowc['categoryname']; ?><? echo $rowc['Fname']; ?> <? echo $rowc['Lname']; ?></strong></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td height="10" align="center"><strong><span id="errorMessage"></span></strong></td>
                        </tr>
                        <tr>
                          <td height="25" align="center" valign="top">
						   
						  
		&nbsp;&nbsp;
						  
						  
						  <a href="customeremail.php?userid=<? echo $_GET['userid']; ?>&page=<? echo $_GET['page'];  ?>"><img src="<? echo $baseurl; ?>images/button_email.gif" border="0" /></a>&nbsp;&nbsp;
                          
                          
                          <a href="customers.php?userid=<? echo $rowc['user_id'];  ?>&del=del&page=<? echo $_GET['page'];  ?>"><img src="<? echo $baseurl; ?>images/button_delete.gif" width="65" height="22" border="0" /></a>                          </td>
                        </tr>
                        <tr>
                          <td height="25" align="center" valign="bottom" style="padding-left:5px;"><a href="delete.php"></a> &nbsp;<a href="email.php"></a>&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center"><label></label></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                    </table>
                  <? } elseif($_GET['del']=='del')
			         {?>
                    
                      
                    <form action="custmerinsert.php?action=delete" method="post" enctype="multipart/form-data" name="frm" id="frm" onsubmit="return validate(this);"> 
                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
                    
                        <tr>
                          <td height="17" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent"><table cellspacing="0" cellpadding="0">
                            <tr>
                              <td><strong>ID#<? echo $rowc['categoryname']; ?><? echo $rowc['Fname']; ?> <? echo $rowc['Lname']; ?></strong></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td height="10" align="center"><strong><span id="errorMessage"></span></strong></td>
                        </tr>
                        <tr>
                          <td height="25" align="center" valign="top">&nbsp;&nbsp;
                       <input type="image" src="<? echo $baseurl; ?>images/button_delete.gif" border="0" />
                       <input type="hidden" name="userid" value="<?  echo $_GET['userid']; ?>"/>
					   <input type="hidden" name="page" value="<?  echo $_GET['page']; ?>"/>
                          
                           </td>
                        </tr>
                        <tr>
                          <td height="25" align="center" valign="bottom" style="padding-left:5px;">
                          Are you sure you want to delete this category? &nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center"><label></label></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                    
                    </table>
					</form>
                    <? } elseif($_GET['sec']=='sec')
			         {?>
					 <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
             
                        <tr>
                          <td height="17" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">Mail</td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="left">&nbsp;</td>
                        </tr>
                        <tr>
                          <td height="20" align="center" style="padding-left:5px;">
			<span class="style2"><img src="<? echo $baseurl; ?>images/tick.gif" />Mail Send Successfully</span>			              </td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                      
                        <tr>
                          <td align="center"><label></label></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                    </table>
					 
					 
					 
                    <? } ?>
                  
                     </td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td><? require_once("footer.php"); ?></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
