<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
global $configverssion_id; global $configapp_version; global $userID; global $server; global $LANG; $resellerID = getReseller();
//=== List page stuffs =============
$page = 1; $setLimit = 30;
if(isset($_GET["page"])) $page = (int)$_GET["page"];
$pageLimit = ($page * $setLimit) - $setLimit; 
$pageurl=$_SERVER['REQUEST_URI']."?";
if(count($_GET)) { $pageurl = $_SERVER['REQUEST_URI'].'&'; }
$trans = array("s=d_o" => "", "s=d_n" => "", "s=r_h" => "", "s=r_l" => "", "s=s_r" => "", "s=s_u" => "", "s=s_q" => "", "s=s_c" => "", "s=s_f" => "", "s=s_p" => "");
$pageurl = strtr($pageurl,$trans);
$pageurl = str_replace('&&','&',$pageurl);
//====End ==============
define('TITLE','Administrators');
if(userRole()>1) {
	header('location: index.php');	
	exit;
}

$today = date('Y-m-d'); $time = strtotime($today.'-1 months'); $lastMonth = date("Y-m", $time); $time = strtotime($today.'-1 years'); $lastYear = date("Y", $time);
?>
<?php

if(isset($_REQUEST['v'])&& $_REQUEST['v']>0) {	

	$did = mysqli_real_escape_string($server,$_REQUEST['v']);	
	$query="SELECT * FROM users WHERE id = '$did' AND (role_id < 3 OR role_id > 9)"; 
	$result = mysqli_query($server,$query) or die(mysqli_error($server));  
	$profile = mysqli_fetch_assoc($result); 
	if($profile['id'] > 0) {
		$id = $profile['id'];	
		$type = 'Supper Admin';
		if($profile['role_id']==2) $type = 'Manager';
		if($profile['role_id']==10) $type = 'Support';
		if($profile['role_id']==11) $type = 'Account Manager';
		$status = '<span class="green-text">'.$LANG['Active'].'</span';
	} else {
		header('location: user');	
	}

?>
  <div class="row">
     <div class="col s12 m12 l12"><h5><?=$LANG['Managing']?> <?=ucfirst($profile['first_name'].' '.$profile['last_name'])?>'s <?=$LANG['Account']?></h5> <a class="btn waves-effect waves-light light-blue darken-4 right" href="user"><?=$LANG['Back to Users']?></a></div>
   </div>  
   
 <div class="row no-m-t no-m-b">
 
     <div class="col s12 m6 l5">
         <div class="card card-white">   
            <div class="card-content">
            	 <div class="card-title"><i class="material-icons">info</i> <?=$LANG['Account Information']?></div>
                  <div class="card-content center-align">
                     <img src="files/temp/<?=userData($profile['id'],'photo')?>" class="circle" alt="" style="max-width: 150px;">
                     <p class="m-t-lg flow-text"><?=ucfirst($profile['first_name'].' '.$profile['last_name'])?></p>
                     <a class="btn waves-effect waves-light indigo darken-4" href="#" onclick="addPB();"><i class="fa fa-pencil"></i> <?=$LANG['Update Profile']?></a> 
                     <a class="btn waves-effect waves-light blue darken-4" href="#" onclick="$('#add_newrole').show();"><i class="fa fa-shield"></i> <?=$LANG['Update Roles']?></a> 
                </div>
            	<table class="highlight responsive2-table">
                	<tbody>
                        <tr class="">
                            <td><b><?=$LANG['Role']?></b></td>
                            <td><?=$LANG[$type]?></td>
                        </tr>
                        <tr class="">
                            <td><b><?=$LANG['Account Status']?></b></td>
                            <td><?=$status?></td>
                        </tr>

                        <tr class="">
                            <td><b><?=$LANG['Last Login']?></b></td>
                            <td><?=date('F j Y h:iA',$profile['last_login'])?></td>
                        </tr>
                        <tr class="">
                            <td><b><?=$LANG['Last IP']?></b></td>
                            <td><a target="_blank" href="http://www.geoiptool.com/en/?IP=<?=$profile['last_ip']?>"><?=$profile['last_ip']?></a></td>
                        </tr>
                        <?php $from = '1970-01-01 00:00:00'; $to = date('Y-m-d H:i:s');?>
                    </tbody>
                </table>
            </div>
         </div> 
         
     </div>           

    <div class="col s12 m6 l7">
        <div class="card card-white">   
            <div class="card-content">
            	 <div class="card-title"><i class="material-icons">contact_phone</i> <?=$LANG['Contact Information']?></div>
            	<table class="highlight responsive2-table">
                	<tbody>
                    	<tr class="">
                			<td><b><?=$LANG['Email Address']?></b></td>
                            <td><?=$profile['email']?></td>        	
                        </tr>
                        <tr class="">
                			<td><b><?=$LANG['Phone']?></b></td>
                            <td><?=$profile['phone']?></td>        	
                        </tr>
                        <tr class="">
                            <td><b><?=$LANG['Address']?></b></td>
                            <td><?=$profile['address']?></td>
                        </tr>
                        <tr class="">
                            <td><b><?=$LANG['City']?></b></td>
                            <td><?=$profile['city']?></td>
                        </tr>
                        <tr class="">
                            <td><b><?=$LANG['State']?></b></td>
                            <td><?=$profile['state']?></td>
                        </tr>
                        <tr class="">
                            <td><b><?=$LANG['Country']?></b></td>
                            <td><?=countryName($profile['country_id'])?></td>
                        </tr>
                    </tbody>
                </table>
            </div>
         </div> 
         
         <div class="card card-white">   
            <div class="card-content">
            	 <div class="card-title"><i class="fa fa-shield"></i> <?=$LANG['Assigned Roles']?></div>
        		 <?php 
					 $previliages = listAvailablePrivilages();
					 $previliages = explode(',',$previliages);
					 foreach($previliages as $n_role) {
					 echo hasPrivilage($n_role,$profile['id']) ? '<div class="chip">'.ucwords($n_role).'</div>' : '';
                 } ?>      
             </div>
         </div>     
         
</div>
 
 <div id="add_new" style="display: none;overflow-x: hidden; width: 99.99%; height: 99.99%; z-index: 1000; position: fixed; top: 0; left: 0; background: rgba(0,0,0,0.7);">
   	 <div class="row"><br><br>
       	<div class="col s1 m2 l3"> </div>
           <div class="col s10 m8 l6 white"> 
             <h5><?=$LANG['Update Information']?> <span class="right"><a href="#" class="red-text" onclick="$('#add_contact')[0].reset();$('#add_new').hide('slow');"><i class="fa fa-times"></i></a></span></h5>
            
             <div class="card ">
                 <form action="aprofile?v=<?=$profile['id']?>" method="post" id="add_contact"  onSubmit="return false;">
                 <div class="card-content">
                    <div class="row">
                      <div class="col s12">
                          <ul class="tabs tab-demo z-depth-1" style="width: 100%;">
                             <li class="tab col s6"><a id="sc5" href="#accd" class=""><?=$LANG['Account Details']?></a></li>
                             <li id="bulk_cont" class="tab col s6"><a href="#paaw"><?=$LANG['Login Details']?></a></li>
                          </ul>
                      </div>
                      <div id="accd">
						 <div class="row no-m-t no-m-b">
                         <div class="input-field col s12">
                               <select id="role_id" required class="validate">
                                    <option value="2" <?php if($profile['role_id']==2 || $profile['role_id'] > 9) echo 'selected'?> ><?=$LANG['Manager']?></option>
                                    <option value="1" <?php if($profile['role_id']==1) echo 'selected'?> ><?=$LANG['Supper Admin']?></option>
                               </select>
                               <label><?=$LANG['Account Type']?></label>
                         </div>
                       </div>
                        <div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                                   <input id="fname" type="text" required class="validate"  value="<?=$profile['first_name']?>">
                                   <label for="fname"><?=$LANG['First Name']?></label>
                             </div>
                       	</div>
                         <div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                                   <input id="lname" type="text" required class="validate"  value="<?=$profile['last_name']?>">
                                   <label for="lname"><?=$LANG['Last Name']?></label>
                             </div>
                       	</div>
                        <div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                                   <input id="phone" type="text" class="validate" required value="<?=$profile['phone']?>">
                                   <label for="phone"><?=$LANG['Phone']?> <?=$LANG['Include country code']?></label>
                             </div>
                       	</div>
                        <div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                                   <input id="address" type="text" class="validate" required value="<?=$profile['address']?>">
                                   <label for="address"><?=$LANG['Address']?></label>
                             </div>
                       	</div>
                        <div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                                   <input id="city" type="text" class="validate" required value="<?=$profile['city']?>">
                                   <label for="city"><?=$LANG['City']?></label>
                             </div>
                       	</div>
                        <div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                                   <input id="state" type="text" class="validate" required value="<?=$profile['state']?>">
                                   <label for="state"><?=$LANG['State']?></label>
                             </div>
                       	</div>
                         <div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                                   <select id="country" required class="js-states browser-default"  style="width: 100%" >
                                        <?=getCountryList($profile['country_id']) ?>                            
                                   </select>
                                   <label class="active"><?=$LANG['Country']?></label>
                             </div>
                         </div>
                         <input id="currency" value="0" type="hidden" >
                      </div>
                      
                      <div id="paaw">
                      	<div class="row no-m-t no-m-b">
                            <div class="col s12 m12 l12">
                                <div class="card blue lighten-5 ">
                                    <div class="card-content black-text"><?=$LANG['aprof_paa_tip']?><br>
                                </div>
                            </div>
                         </div>	
                          <div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                                   <input id="email" type="email" required <?php if(userRole()==2) echo 'readonly'?> class="validate" value="<?=$profile['email']?>">
                                   <label for="email"><?=$LANG['Email']?></label>
                             </div>
                       	  </div>
                          <div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                                   <input id="password" type="text" class="validate"  value="">
                                   <label for="password"><?=$LANG['New Passowrd']?></label>
                             </div>
                       	  </div>
                      </div>  
                    </div>  
                 </div>   
                 <div class="card-action">
                     <input id="customer_id" value="<?=$profile['id']?>" type="hidden" >
                     <input id="photo" value="<?=$profile['photo']?>" type="hidden" >
                     <button id="cus-button" class="btn green darken-4" type="submit"><i class="fa fa-save"></i> <?=$LANG['Save Profile']?> </button>
                     <span id="cus-spin" class="btn-flat" style="display: none;"><i class="fa fa-spinner fa-spin"></i> <strong><?=$LANG['Please wait']?>...</strong></span>
                             <span id="upload-spin" class="btn-flat" style="display: none;"><i class="fa fa-spinner fa-spin"></i> <strong><?=$LANG['Uploading your files']?> <span id="progress-wrp">0%</span>...</strong></span>
                     <a class="btn waves-effect waves-light red" href="#" onclick="$('#add_contact')[0].reset();$('#add_new').hide('slow');"><i class="fa fa-times"></i> <?=$LANG['Cancel']?></a>
                 </div>
                 </form>
             </div>
           </div>
       <div class="col s1 m2 l3"> </div>
	 </div>
 </div>          
 </div>

 <div id="add_newrole" style="display: none;overflow-x: hidden; width: 99.99%; height: 99.99%; z-index: 1000; position: fixed; top: 0; left: 0; background: rgba(0,0,0,0.7);">
   	 <div class="row"><br><br>
       	<div class="col s1 m2 l3"> </div>
           <div class="col s10 m8 l6 white"> 
             <h5><?=$LANG['Update Roles']?> <span class="right"><a href="#" class="red-text" onclick="$('#add_newrole').hide('slow');"><i class="fa fa-times"></i></a></span></h5>
            
             <div class="card ">
                 <form action="aprofile?v=<?=$profile['id']?>" method="post" id="add_nrole"  onSubmit="return false;">
                 <div class="card-content">
                 
                        <div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                             <?php 
							 $previliages = listAvailablePrivilages();
							 $previliages = explode(',',$previliages);
							 foreach($previliages as $n_role) {
							 ?>
                                   <p class="p-v-xs col s6">
                                        <input <?=hasPrivilage($n_role,$profile['id'])?'checked':''?> type="checkbox" id="admin_roles-<?=$n_role?>" name="admin_roles[]" value="<?=$n_role?>"/>
                                        <label for="admin_roles-<?=$n_role?>"><?=ucwords($n_role)?></label>
                                    </p>
                             <?php } ?>       
                             </div>
                       	</div>
                        
                  </div>      
                 <div class="card-action">
                     <input id="customer_id3" name="customer_id3" value="<?=$profile['id']?>" type="hidden" >
                     <button id="role-button" class="btn green darken-4" type="submit"><i class="fa fa-save"></i> <?=$LANG['Save Roles']?> </button>
                     <span id="role-spin" class="btn-flat" style="display: none;"><i class="fa fa-spinner fa-spin"></i> <strong><?=$LANG['Please wait']?>...</strong></span>
                     <a class="btn waves-effect waves-light red" href="#" onclick="$('#add_newrole').hide('slow');"><i class="fa fa-times"></i> <?=$LANG['Cancel']?></a>
                 </div>
                 </form>
             </div>
           </div>
       <div class="col s1 m2 l3"> </div>
	 </div>
 </div>          
 </div>

<?php	
} else {
if(isset($_POST['bulk'])) { 
  $userID = getUser();
  if($_POST['action']=='delete') {
	 if(DEMO_MODE) {
		$_SESSION['message'] = $LANG['This operation can not be performed on Demo Mode!'];
		header('location: user?err=1');
	} else {
		foreach($_POST['bulk'] as $inbid) { 
			$inbid = mysqli_real_escape_string($server,$inbid);
			mysqli_query($server,"DELETE FROM `users` WHERE `id` = '$inbid' AND 1") or die(mysqli_error($server));
			logEvent($userID,'Deleted admin ID '.$inbid.'.');
		}	
		$_SESSION['message'] = $LANG['The selected accounts(s) has been deleted'];
		header('location: user?err=0');
	}
  } elseif($_POST['action']=='suspend') {
	  if(DEMO_MODE) {
		$_SESSION['message'] = $LANG['This operation can not be performed on Demo Mode!'];
		header('location: user?err=1');
	} else {
		foreach($_POST['bulk'] as $inbid) { 
			$inbid = mysqli_real_escape_string($server,$inbid);
			mysqli_query($server,"UPDATE users SET `status` = '0' WHERE `id` = '$inbid' AND 1") or die(mysqli_error($server));
			logEvent($userID,'Suspended admin ID '.$inbid.'.');
		}	
		$_SESSION['message'] = $LANG['The selected account(s) has been suspended'];
		header('location: user?err=0');
	}
  } elseif($_POST['action']=='activate') {
	foreach($_POST['bulk'] as $inbid) { 
		$inbid = mysqli_real_escape_string($server,$inbid);
		mysqli_query($server,"UPDATE users SET `status` = '1' WHERE `id` = '$inbid' AND 1") or die(mysqli_error($server));
		logEvent($userID,'Activated admin ID '.$inbid.'.');
	}	
	$_SESSION['message'] = $LANG['The selected account(s) has been activated'];
	header('location: user?err=0');
  } else {
	  header('location: user');
  }
}
	//show list
	$added = '';	
	if(isset($_GET['sc'])) {
		$keywords = mysqli_real_escape_string($server,$_GET['sc']);
		$ser = explode(' ', $keywords);
		$clauses = array();
		foreach($ser as $look){
			$term = trim(preg_replace('/[^a-z0-9]/i', '', $look));   
			if (!empty($term)){
				 $clauses[] = "first_name LIKE '%$term%' OR last_name LIKE '%$term%'  OR email LIKE '%$term%' OR phone LIKE '%$term%' OR city LIkE '%$term%'  OR state LIKE '%$term%' ";
			} else {
				 $clauses[] = " id LIKE '%%' ";
			}
		}
		$added .= ' AND ('.implode(' OR ', $clauses).') ';		
	}
	if(isset($_GET['s'])) {
	} else {
		$added .= " order by id DESC ";	
	}

    $query="SELECT * FROM users WHERE role_id < 3 OR role_id > 9 $added limit $pageLimit,$setLimit";
	$result = mysqli_query($server,$query) or die(mysqli_error($server));
	$x = mysqli_num_rows($result);
?>
<!-- Quick Navs ::::: You can customize this -->
 <div class="row no-m-t no-m-b">
 	<div class="col s12 m12 l12">
        <div class="card blue">
            <div class="card-content white-text"><?=$LANG['acustomer_tip']?></div>
        </div>
    </div>
 </div>

<div class="row no-m-t no-m-b">
 	<div class="col s12 m12 l12">
        <div class="card card-transparent">
            <div class="card-content">
            	<div class="col s12 m5 l5">
                     <a class="btn waves-effect waves-light light-green darken-4" href="#" onclick="addPB();"><?=$LANG['Create User']?></a>

                </div>
                <div class="col s12 m7 l7">
                  <div class="col s12 m12 l12">
                    <div class="row no-m-t no-m-b">
                     <form action="user" method="get">
                     <div class="input-field col s12">
                        <i class="material-icons prefix">search</i>
                        <input type="text" name="sc" value="<?=@$_GET['sc']?>" placeholder="<?=$LANG['Search...']?>">
                     </div>
                     </form>  
                    </div>
                  </div> 
                </div>
            </div>
        </div>
    </div>
 </div>
 

<div class="row no-m-t no-m-b">
 	<div class="col s12 m12 l12">
         <div class="card card-white">   
            <div class="card-content">
            <div class="card-options">
            	<ul>
                </ul>    
                <ul id='bulka' class='dropdown-content'>
                        <li><a href="#" onclick="bulkaction('delete','inbox-form','<?=$LANG['delete_confirm']?>');"> <i class="fa fa-trash"></i> <?=$LANG['Delete']?></a></li>
                         <li><a href="#" onclick="bulkaction('suspend','inbox-form','<?=$LANG['suspend_confirm']?>');"> <i class="fa fa-times"></i> <?=$LANG['Suspend']?></a></li>
                         <li><a href="#" onclick="bulkaction('activate','inbox-form','<?=$LANG['activae_confirm']?>');"> <i class="fa fa-check"></i> <?=$LANG['Activate']?></a></li>
                </ul>                
            </div>
            <span class="card-title"><a class='dropdown-button btn light-blue darken-4' href='#' data-activates='bulka' data-beloworigin='true' data-constrainwidth='false'><?=$LANG['With Selected']?></a></span>
       		<table class="highlight responsive-table">
                <thead>
                	<tr>
                    	<th><input type="checkbox" class="filled-in" id="selectall" /><label for="selectall"></label></th>
                        <th data-field="id"><?=$LANG['ID']?></th>
                        <th data-field="date"><?=$LANG['First Name']?></th>
                        <th data-field="type"><?=$LANG['Last Name']?></th>
                        <th data-field="message"><?=$LANG['Email']?></th>
                        <th data-field="message"><?=$LANG['Role']?></th>
                        <th data-field="date"><?=$LANG['Status']?></th>
                        <th data-field="act"></th>
                    </tr>
                 </thead>
                 <tbody>
                    <form action="user" method="post" id="inbox-form">
                    	<input type="hidden" id="bulkaction" name="action" value=""/>
<?php $xf=0; while ($rows = mysqli_fetch_assoc($result)) { $xf+=1; $stats = ''; 
$type = 'Supper Admin';
if($rows['role_id']==2) $type = 'Manager';
if($rows['role_id']==10) $type = 'Support';
if($rows['role_id']==11) $type = 'Account Manager';
$status = '<span class="green-text">'.$LANG['Active'].'</span';
if($rows['status']==0) $status = '<span class="red-text">'.$LANG['Suspended'].'</span';
$disabled = '';
if(getUser()==$rows['id']) $disabled = 'disabled';
?>
						<tr class="">
                             <td><input type="checkbox" <?=$disabled?> class="filled-in bulk" id="bulk<?=$rows['id']?>" value="<?=$rows['id']?>]" name="bulk[<?=$rows['id']?>]"/> <label for="bulk<?=$rows['id']?>"></label></td>
                             <td><?=$rows['id']?></td>
                             <td><?=$rows['first_name']?></td>
                             <td><?=$rows['last_name']?></td>
                             <td><?=$rows['email']?></td>
                             <td><?=$type?></td>
                             <td><?=$status?></td>
                             <td><a class="hoverable" href="user?v=<?=$rows['id']?>"><i class="fa fa-eye"></i> <?=$LANG['Manage']?></a></td>
                        </tr>
<?php } ?>
<?php if($xf<1) echo '<tr class="orange lighten-5"><td colspan=10><h5 class="center-align">'.$LANG['No records found!'].'</h5></td></tr>' ?>	
					</form>
                 </tbody>
            </table>  
          </div>
        </div>          
     </div>
  </div>
 <div class="row">
 	<div class="col s12 m12 l12" style="margin-top: 5px;">
        <?php displayPagination($setLimit,$page,$query);  ?>
    </div>
 </div>     
 
 <div id="add_new" style="display: none;overflow-x: hidden; width: 99.99%; height: 99.99%; z-index: 1000; position: fixed; top: 0; left: 0; background: rgba(0,0,0,0.7);">
   	 <div class="row"><br><br>
       	<div class="col s1 m2 l3"> </div>
           <div class="col s10 m8 l6 white"> 
             <h5><?=$LANG['Create User']?> <span class="right"><a href="#" class="red-text" onclick="$('#add_contact')[0].reset();$('#add_new').hide('slow');"><i class="fa fa-times"></i></a></span></h5>
            
             <div class="card ">
                 <form action="user" method="post" id="add_contact"  onSubmit="return false;">
                 <div class="card-content">
                    <div class="row">
                      <div class="col s12">
                          <ul class="tabs tab-demo z-depth-1" style="width: 100%;">
                             <li class="tab col s6"><a id="sc5" href="#accd" class=""><?=$LANG['Account Details']?></a></li>
                             <li id="bulk_cont" class="tab col s6"><a href="#paaw"><?=$LANG['Login Details']?></a></li>
                          </ul>
                      </div>
                      <div id="accd">
                       <div class="row no-m-t no-m-b">
                         <div class="input-field col s12">
                               <select id="role_id" required class="validate">
                                    <option value="2" ><?=$LANG['Manager']?></option>
                                    <option value="1" ><?=$LANG['Supper Admin']?></option>
                               </select>
                               <label><?=$LANG['Account Type']?></label>
                         </div>
                       </div>
                       
                        <div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                                   <input id="fname" type="text" required class="validate"  value="">
                                   <label for="fname"><?=$LANG['First Name']?></label>
                             </div>
                       	</div>
                         <div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                                   <input id="lname" type="text" required class="validate"  value="">
                                   <label for="lname"><?=$LANG['Last Name']?></label>
                             </div>
                       	</div>
                        <div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                                   <input id="phone" type="text" class="validate" required value="">
                                   <label for="phone"><?=$LANG['Phone']?></label>
                             </div>
                       	</div>
                        
                         <input id="country" value="0" type="hidden" >
                         <input id="currency" value="0" type="hidden" >
                    </div>     
                      
                      <div id="paaw">
                          <div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                                   <input id="email" type="email" required class="validate" value="">
                                   <label for="email"><?=$LANG['Email']?></label>
                             </div>
                       	  </div>
                          <div class="row no-m-t no-m-b">
                             <div class="input-field col s12">
                                   <input id="password" type="text" class="validate"  value="">
                                   <label for="password"><?=$LANG['Passowrd']?></label>
                             </div>
                       	  </div>
                      </div>  
                    </div>  
                 </div>   
                 <div class="card-action">
                     <input id="customer_id" value="0" type="hidden" >
                     <button id="cus-button" class="btn green darken-4" type="submit"><?=$LANG['Save User']?> </button>
                     <span id="cus-spin" class="btn-flat" style="display: none;"><i class="fa fa-spinner fa-spin"></i> <strong><?=$LANG['Please wait']?>...</strong></span>
                     <a class="btn waves-effect waves-light red" href="#" onclick="$('#add_contact')[0].reset();$('#add_new').hide('slow');"><?=$LANG['Cancel']?></a>
                 </div>
                 </form>
             </div>
           </div>
       <div class="col s1 m2 l3"> </div>
	 </div>
 </div>          
 <?php } ?> 
