<?php
include "chkuser.php";
include "includefilemng.php";
	
	$edit=false;
	$edit_id=0;
	$proceed_flag=0;
	$id=0;
	$franname=''; 
	$fname='';
	$lname='';
	$address='';
	$city='';
	$postcode='';
	$l_phone='';
	$m_phone='';
	$email='';
	$uname='';
	$pass='';
	$conpass='';	
	$update_id="id";	
	$insert_primary_table="franchise";	
		
							
	if(isset($_GET['fid'])){
	  $edit_id=$_GET['fid'];
	  $edit=true;	  
	  }
  
     if($edit){  
		$pdelre =array(); 
		$pdelr = "select * from ".$insert_primary_table." where  ".$update_id." ='$edit_id'";		
		//echo $pdelr;
		$pdelq = mysql_query($pdelr);
		$pdelre = mysql_fetch_array($pdelq);
		extract ($pdelre);		
      }


?>
<html>
<head>
<title>control panel </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="ssi.css" rel="stylesheet" type="text/css">
<script language="javascript" src="includenp/functions.js"></script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script> 
<style type="text/css">
<!--
.style2 {color: #000000}
-->
</style>
</head>
<body>
<table width="98%" border="0" cellspacing="0" cellpadding="2" align="center">
  <tr>
    <td width="1%"   bgcolor="#C9C9C9"></td>
	<td width="98%"><?php include_once "top.php";?></td>
	<td width="1%"   bgcolor="#C9C9C9"></td>
  </tr>
  <tr>
   <td width="1%"   bgcolor="#C9C9C9"></td>
    <td width="98%"><table width="100%"  border="0" cellpadding="0" cellspacing="0" class="centertable">
      <tr>
        <td><table width="85%"  border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="40" class="bigblackTxt">&nbsp;</td>
          </tr>
          <tr>
            <td>
            
              <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="4">
                <form method="POST" action="<?php echo $_SERVER['PHP_SELF'];?>" name="SaveForm" ID="SaveForm" enctype="multipart/form-data" >
                 <input type="hidden" name="edit_id" value="<?php  echo $edit_id;?>">
				
                  <tr>
                    <td colspan="2" class="bigblackTxt"> Franchise Details :</td>
                  </tr>
				  
				  <tr>
                    <td colspan="2" class="normalBoldblackTxt">&nbsp;</td>
                  </tr>                 
                  <tr>
                    <td width="26%" class="bluebold"><span class="bluebold">Franchise Name </span>: </td>
                    <td width="74%" class="normalTxt"><?php echo $franname;?></td>
                  </tr>
                   <tr>
                     <td height="30" colspan="2" align="left" valign="middle" class="bigblackTxt">Franchise Contact details :</td>
                     </tr>
                   <tr>
                     <td class="bluebold">First Name :</td>
                     <td class="normalTxt"><?php echo $fname;?></td>
                   </tr>
                   <tr>
                     <td class="bluebold">Last Name :</td>
                     <td class="normalTxt"><?php echo $lname;?></td>
                   </tr>
                   <tr>
                     <td class="bluebold">Address :</td>
                     <td class="normalTxt">
                 <?php echo $address;?></td>
                   </tr>
                   <tr>
                     <td class="bluebold">City :</td>
                     <td class="normalTxt"><?php echo $city;?></td>
                   </tr>
                   <tr>
                     <td class="bluebold">Post code :</td>
                     <td class="normalTxt"><?php echo $postcode;?></td>
                   </tr>
                   <tr>
                     <td class="bluebold">Phone :</td>
                     <td class="normalTxt"><?php echo $l_phone;?></td>
                   </tr>
                   <tr>
                     <td class="bluebold">Mobile :</td>
                     <td class="normalTxt"><?php echo $m_phone;?></td>
                   </tr>
                   <tr>
                     <td class="bluebold">Email Address :</td>
                     <td class="normalTxt"><?php echo $email;?></td>
                   </tr>
                   <tr>
                     <td class="bluebold">User Name :</td>
                     <td class="normalTxt"><?php echo $uname;?></td>
                   </tr>
                   <tr>
                     <td class="bluebold">Password :</td>
                     <td class="normalTxt"><?php echo $pass;?></td>
                   </tr>
				
				  <tr>
                  <td class="bluebold">&nbsp;</td>
				    <td class="bluebold">&nbsp;</td>
				    </tr>
				  <tr>
                    <td align="right">&nbsp;</td>
                    <td>                     
                     <input name="sendmail" type="submit" class="hbutton" id="sendmail" onclick="MM_goToURL('parent','view_franchise.php');return document.MM_returnValue" value="BACK" /></td>
                  </tr>
                  <tr>
                    <td colspan="2">&nbsp;</td>
                  </tr>
                </form>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
    <td width="1%"   bgcolor="#C9C9C9"></td>
  </tr>
  <tr>
    <td   bgcolor="#C9C9C9" width="1%"></td>
	<td><?php include_once "footer.php";?></td>
	<td width="1%"   bgcolor="#C9C9C9"></td>
  </tr>
</table>
</body>
</html>
