HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.52.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 15 06:39:08 EDT 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/barbeatleanalyti/public_html/m.beatleanalytics.com/application/views/admin/industryList.php
<?php 
	include('include/header.php');
	$this->load->model('Admin_model');
?>     
 
<style>
	.error {color:#900;}
</style> 
        
 
	<script>
	$(document).ready(function() {
		
		 $(".deluser").click(function(){
			var txt;
			var r = confirm("Would you like to delete this user");
			if (r == true) 
			{
				var id = $(this).attr('data-uid');
				//alert(id);
				var token = 'deleteuser';		
				 $.ajax({
					type : 'POST',
					url	 : 'deleteIndById',
					data : {id:id,token:token},
					success : function(res)
					{  
						if (res)
						{
							$("#rowid_"+id).hide('500');
						}
					}			
					
				 });
			} 
			else 
			{
					
			}
			 
		 });
		
			$('#example').DataTable();
			
		} );
	</script>
<div class="app-content ng-scope">
    <div class="butterbar hide"><span class="bar"></span></div>
    <a href="" class="off-screen-toggle hide" data-target=".app-aside"></a>
	<div class="ng-scope">
		<div class="hbox bg-light ng-scope">
		<div>
			<div style="position: fixed;width: 100%;background: #fff; z-index: 2;height: 42px" class="b-b padder">
				<ul class="nav nav-pills nav-sm m-t-xs">
					<li><a class="btn btn-info" href="<?php echo base_url();?>index.php/admin/industry">Add New Industry</a></li>
				</ul>
			</div>
		</div>
	<div class="wrapper-md">
		<div class="m-t-md"></div>
		<div class="clearfix"></div>
		<div class="m-t-md"></div>
		<div class="m-t-xs hbox card-applicant"><!--scrollable-table(watch="UsersList.users" table-offset="400")-->
			<div class="panel panel-default">
			<div class="panel-heading font-bold">Industry List</div>
			
			<div class="table-responsive">
					
					<table id="example" class="table table-striped table-bordered" width="100%" cellspacing="0">
						<thead class="thead">
							<tr>
								<th >Name</th>
								<!--<th >type</th>-->
								<th >Organization</th>
								<th >Manager</th>
								<th >Line Manager</th>
								<th	>Add Pages</th>
								<th	>Pages</th>
								<th >Branch</th>
								<th >Feedback</th>
								<th >Ticket</th>
								<th >Edit</th>
								<th >Delete</th>
							</tr>
							
						</thead>
						<tbody id="hidedata">
							<?php 
								if (empty($allIndustry)){
							?>
							<tr class="ng-hide">
								<td colspan="10"><h1 class="text-center text-muted ng-scope">No Industry</h1><!-- end ngIf: !UsersList.ui.loading --></td>
							</tr><!-- ngRepeat: user in UsersList.users track by $index -->
							<?php } else {	
									 
									 
									 foreach ($allIndustry as $keyind=>$valind){
								 
							?>	
							<tr class="animate-repeat bg-white ng-scope" id="rowid_<?php echo $valind->IndId;?>">
								<td class="ng-binding">
									<?php echo $valind->db_industry;?>
								</td>
								<td class="ng-binding">
									<?php 
										$indId = $valind->IndId;
										$organization = $this->Admin_model->getAllOrgByIndustryId($indId);
									 
										if (!empty($organization)){echo $organization[0]->db_Orgname;}
									?>
									
								</td>
								<td class="ng-binding">
									<?php 
										$indId = $valind->IndId;
										$managerName = $this->Admin_model->getAllUserByIndustryId($indId);
										if (!empty($managerName)){echo $managerName[0]->db_username;}
									?>
								</td>
								 
								<td class="ng-binding">
									<?php 
										$indId = $valind->IndId;
										$LinemanagerName = $this->Admin_model->getLineManagerByIndstry($indId);
										if (!empty($LinemanagerName)){echo $LinemanagerName[0]->db_username;}
									
									?> 
								</td>
								<td><a class="btn-sm btn btn-success btn-rounded addpagesModel" id=" "data-indname="<?php echo $valind->db_industry;?>" data-indid="<?php echo $valind->IndId;?>" href="javascript:;" data-toggle="modal" data-target="#myModal">Add Pages</a></td>
								<td class="ng-binding" >
									<a href="<?php echo base_url();?>index.php/admin/pageList/<?php echo $valind->IndId;?>" class="btn-sm btn btn-success btn-rounded" style="background-color:#F55050; border:1px solid #F55050;">
										<?php 
											$InId = $valind->IndId;
											$data = $this->Admin_model->getIndustryById($InId);
											$pagesCount = explode('|',$data[0]->db_pagesId);
											 if ($pagesCount[0] == '')
											 {
												 echo '0';
											 }
											 else 
											 {
												 echo count($pagesCount);
											 }
										?> 
									</a>
								</td>
								<td class="ng-binding">
										 
									<a href="<?php echo base_url();?>index.php/admin/branchList/<?php echo $valind->db_bracnchid;?>/token" class="btn-sm btn btn-success btn-rounded" style="background-color:#F55050; border:1px solid #F55050;">
										<?php  
											$InId = $valind->IndId;
											$dataBranch = $this->Admin_model->getBranchByInd($InId);
											 if (!empty($dataBranch))
											 {
												 echo count($dataBranch);
											 } 
											 else 
											 {
												 echo '0';
											 }
											 
										 
										?>
									</a>
								</td>
								<td class="ng-binding">
									<a href="javascript:;" style="background-color:#F55050; border:1px solid #F55050;" class="btn-sm btn btn-success btn-rounded">
										<?php echo count($data);?>
									</a>
								</td>
								<td class="ng-binding">
									<a href="javascript:;" class="btn-sm btn btn-success btn-rounded" style="background-color:#F55050; border:1px solid #F55050;">
										<?php echo count($data);?>
									</a>
								</td>
								<td><a class="btn-sm btn btn-success btn-rounded" href="<?php echo base_url();?>index.php/admin/industry/<?php echo $valind->IndId;?>">Edit</a></td>
								<td><a class="btn-sm btn btn-primary btn-rounded deluser" data-uid="<?php echo $valind->IndId;?>">Delete</a></td>
							</tr>
						<?php 
								}
							}
						?>
						
					</tbody>
					<tbody id="showdata">
						
					</tbody>
					<tfoot>
						<tr><td><!-- ngIf: UsersList.ui.loading --><!-- ngIf: UsersList.ui.lazyLoad --></td><td></td><td></td></tr>
					</tfoot>
				</table>
			</div>
			
			<script>
				$(document).ready(function(){
					$(".addpagesModel").click(function(){
						var addpagesModel = $(this);
						var indname = 	addpagesModel.attr('data-indname');
						var indid 	= 	addpagesModel.attr('data-indid');
						$("#pageTitle").html('Add Pages For '+indname);
						$("#indusId").val(indid);
					})
					$(function() {
					 
						/*$('.table-sortable tbody').sortable({
							handle: 'span',
							placeholder:'ssss'
						});*/
						$('.table-sortable tbody').sortable().bind('sortupdate', function() {
							var tablerowPos = $(this);
							
						});
						 
					});
					
					$("#indpageSubmit").click(function(){
						 $(".dragmain tr").each(function(){
							 console.log()
						 })
					})
				})
			</script>
			
				
				
			<!-- Modal -->
<div id="myModal" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title" id="pageTitle"></h4>
		
      </div>
      <div class="modal-body">
        <form action="" method="post" name="Indpageform	" id="Indpageform">
			<input type="hidden" name="indusId" id="indusId" >
			<table class="table table-sortable ">
                        
                        <tbody>
						<?php
							if (!empty($allpages))
							{
							foreach ($allpages as $keypage=>$valpage)
								{
									$countrow = $keypage+1;
						?>
							<tr draggable="true" class="dragmain" data-mainid="<?php echo $countrow;?>" style="display: table-row;" id="RowPos_<?php echo $countrow;?>">
								<td><span class="glyphicon glyphicon-move"></span> <?php echo $countrow;?></td>
								<td><input type="checkbox" name="pagecheck" id="pagecheck" value="<?php echo $valpage->pageId;?>"></td>
								<td colspan="2"><?php echo $valpage->db_pagename;?></td>
							</tr> 
						<?php 
								}
							}
							else 
							{
						?>
							<div style="padding:5px;border:1px solid #900;font-size:14px;">Their Are No Page For Add Please Add Some Pages <a href="<?php echo base_url();?>index.php/admin/pages"></a></div>
						<?php
							}
						?>
						<tr>
							<td colspan="4"><input type="button" name="indpageSubmit" id="indpageSubmit" class="btn-sm btn btn-success btn-rounded" value="Save"></td>
						</tr>
                        </tbody>
            </table>
			
		</form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div>

  </div>
</div>
			
			
			
			
		</div>
	</div>
</div>
</div>
</div>
  </div>
  <!-- jQuery -->
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>