Revonzy Mini Shell
<?php
include('../../../config.php');
require_once(PATH_LIBRARIES.'/classes/DBConn.php');
require_once(PATH_ADMIN_INCLUDE.'/header.php');
$db = new DBConn();
//Get Here Langauge List
//$getLang=$db->ExecuteQuery("SELECT * FROM langauge");
//Get Here Category List
$getCategory=$db->ExecuteQuery("SELECT CG.Category_Id, CG.Category_Name , SC.Position, SC.Sub_Name , SC.Sub_Desc , SC.HSub_Name , SC.HSub_Desc, SC.Url_Path, SC.File_Uplaod FROM catelog_sub_category SC INNER JOIN catelog_category CG ON CG.Category_Id=SC.Category_Id WHERE SC.Sub_Id='".$_REQUEST['id']."'");
//GEt Here Category list
$getList=$db->ExecuteQuery("SELECT Category_Id, Category_Name FROM catelog_category ");
?>
<script type="text/javascript" src="subcategory.js"></script>
<div class="">
<div class="page-title">
<div class="title_left">
<h3>Sub - Category </h3>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>Edit Form </h2>
<ul class="nav navbar-right panel_toolbox">
<li><button class="btn btn-round btn-success" onclick="window.history.back();">Back</button>
</li>
</ul>
<div class="clearfix"></div>
</div>
<div class="x_content">
<form class="form-horizontal form-label-left" action="" method="post" id="categoryform">
<input type="hidden" id="id" value="<?php echo $_REQUEST['id']?>">
<div class="col-sm-12">
<!---Write here English Content Here-->
<div class="col-sm-6">
<div class="item form-group">
<center>
<strong >English Section</strong>
</center>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Category <span class="required">*</span> </label>
<div class="col-md-9 col-sm-6 col-xs-12">
<select id="category" class="form-control col-md-7 col-xs-12" name="category">
<option value="">Select Category</option>
<?php foreach($getList as $val){ ?>
<option value="<?php echo $val['Category_Id']?>" <?php if($val['Category_Id']==$getCategory[1]['Category_Id']){ echo "Selected";}?>><?php echo $val['Category_Name']?></option>
<?php } ?>
</select>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="subcategory">Sub Category <span class="required">*</span> </label>
<div class="col-md-9 col-sm-6 col-xs-12">
<input type="text" id="subcategory" name="subcategory" required="required" class="form-control col-md-7 col-xs-12 " value="<?php echo $getCategory[1]['Sub_Name']?>" />
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="position">Position <span class="required">*</span> </label>
<div class="col-md-9 col-sm-6 col-xs-12">
<input type="text" id="position" name="position" required="required" class="form-control col-md-7 col-xs-12 number" value="<?php echo $getCategory[1]['Position']?>">
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="position">Description <span class="required"></span> </label>
<div class="col-md-9 col-sm-6 col-xs-12">
<textarea id="desc" name="desc" class="form-control col-md-7 col-xs-12 " placeholder="Write Here Something... " rows="10"><?php echo $getCategory[1]['Sub_Desc']?></textarea>
</div>
</div>
</div>
<!---Close Here English -->
<!---Write here Hindi Content Here-->
<div class="col-sm-6">
<div class="item form-group">
<center>
<strong >Hindi Section</strong>
</center>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="subcategory">Sub Category <span class="required">*</span> </label>
<div class="col-md-9 col-sm-6 col-xs-12">
<input type="text" id="hsubcategory" name="hsubcategory" class="form-control col-md-7 col-xs-12 " value="<?php echo $getCategory[1]['HSub_Name']?>">
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="position">Description <span class="required"></span> </label>
<div class="col-md-9 col-sm-6 col-xs-12">
<textarea id="hdesc" name="hdesc" class="form-control col-md-7 col-xs-12 " placeholder="यहाँ कुछ लिखिए... " rows="10"><?php echo $getCategory[1]['HSub_Desc']?></textarea>
</div>
</div>
</div>
</div>
<div class="col-sm-10">
<div class="item form-group">
<label class="control-label col-md-2 col-sm-3 col-xs-12" for="position">Redirect Link <span class="required">*</span> </label>
<div class="col-md-9 col-sm-9 col-xs-12">
<input type="text" id="url_path" name="url_path" required="required" class="form-control col-md-7 col-xs-12 " placeholder="http://www.shrishtiarchitecture.com/, http://www.example.com/" value="<?php echo $getCategory[1]['Url_Path']?>">
</div>
</div>
</div><div class="col-sm-10">
<div class="item form-group">
<label class="control-label col-md-2 col-sm-3 col-xs-12" for="position">File Upload </label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type="file" id="fileupload" name="fileupload" class="form-control col-md-7 col-xs-12 " /><br/>(Note :- Upload Only PDF, DOC, PPT Files)
<br/>
<a href="#" onclick="window.open('<?php echo PATH_UPLOAD_IMAGE.'/materials/file/'.$getCategory[1]['File_Uplaod']?>')" title="Click Here To Open"><?php echo $getCategory[1]['File_Uplaod']?></a>
<input type="hidden" name="oldfile" id="oldfile" value="<?php echo $getCategory[1]['File_Uplaod']?>" />
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-6 col-md-offset-3">
<!-- <button type="submit" class="btn btn-primary">Cancel</button>-->
<button id="update" type="button" class="btn btn-success">Update</button>
</div>
</div>
</form>
</div>
<div id="dialog" title="Message" style="display:none; text-align:left;">
<p>Successfully Update Subcategory</p>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
require_once(PATH_ADMIN_INCLUDE.'/footer.php');
?>
EliteHackz.ORG
Revonzy Mini Shell
root@revonzy.com