Server IP : 108.163.255.210 / Your IP : 18.119.158.110 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 : |
<?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')){ $aid=$_GET['aid']; $row_select=mysql_query("select * from admin where admin_id='".$aid."'") or die(mysql_error()); $tot_select=mysql_num_rows($row_select); $heading="User"; $subheading="Edit User"; if($tot_select!='0'){ while($row=mysql_fetch_array($row_select)){ $username=$row['username']; $roleid=$row['roleid']; $first_name=$row['first_name']; $last_name=$row['last_name']; $useremail=$row['useremail']; $status=$row['status']; } } $submit="Update"; $action="update"; $submit_title="user_submit_update"; }else{ $heading="User"; $subheading="Add User"; $submit="Add"; $action="add"; $submit_title="user_submit"; } $res_role=mysql_query("select * from roles group by role_name order by roleid") or die(mysql_error()); 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"> <?php if($_GET['action']=="edit" ) {}else{?> <div class="form-group field"> <label for="signup_v1-cat_name" class="col-sm-2 control-label">Select Branch</label> <div class="col-sm-10 ui left labeled input"> <select name="comp" class="form-control" data-validation="[NOTEMPTY]" data-validation-message="Branch must not be empty" onchange="getval(this);"> <?php echo $option ; $sql=mysql_query("select * from companies"); while($f=mysql_fetch_array($sql)) { $name=$f['name']; ?> <option value="<?php echo $name ?>"><?php echo $name ?></option> <?php } ?> </select> <div class="ui corner label"> <i class="asterisk icon">*</i> </div> </div> </div> <?php } ?> <?php if($_GET['action']=="edit" ) {}else{?> <div class="form-group field"> <label for="signup_v1-cat_name" class="col-sm-2 control-label">User Name</label> <div class="col-sm-10 ui left labeled input"> <input type="text" class="form-control" placeholder="User Name" name="username" id="username" value="<?php echo $username?>" data-validation="[NOTEMPTY]" data-validation-message="User Name must not be empty" > <div class="ui corner label"> <i class="asterisk icon">*</i> </div> </div> </div> <?php } ?> <div class="form-group field"> <label for="signup_v1-cat_name" class="col-sm-2 control-label">First Name</label> <div class="col-sm-10 ui left labeled input"> <input type="text" class="form-control" placeholder="First Name" name="first_name" id="first_name" value="<?php echo $first_name?>" data-validation="[NOTEMPTY]" data-validation-message="First 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-cat_name" class="col-sm-2 control-label">Last Name</label> <div class="col-sm-10 ui left labeled input"> <input type="text" class="form-control" placeholder="Last Name" name="last_name" id="last_name" value="<?php echo $last_name?>" data-validation="[NOTEMPTY]" data-validation-message="Last 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-cat_name" class="col-sm-2 control-label">Email</label> <div class="col-sm-10 ui left labeled input"> <input type="text" class="form-control" placeholder="Email" name="useremail" id="useremail" value="<?php echo $useremail?>" data-validation="[Email]" data-validation-message="Email 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-cat_name" class="col-sm-2 control-label">Password</label> <div class="col-sm-10 ui left labeled input"> <input type="password" class="form-control" placeholder="Password" name="password" id="password" value="" > <div class="ui corner label"> <i class="asterisk icon">*</i> </div> </div> </div> <div class="form-group field"> <label for="signup_v1-cat_name" class="col-sm-2 control-label">Confirm Password</label> <div class="col-sm-10 ui left labeled input"> <input type="password" class="form-control" placeholder="Confirm Password" name="cpassword" id="cpassword" value="" > <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">Status</label> <div class="col-sm-10 ui left labeled input"> <?php if($_REQUEST['action']=='edit'){?> <select name="status" id="status" class="form-control" data-validation="[NOTEMPTY]"> <option value="yes" <?php if($status=='yes'){?> selected="selected" <?php }?>>Active</option> <option value="no" <?php if($status=='no'){?> selected="selected" <?php }?>>Inactive</option> </select> <?php }else{?> <select name="status" id="status" class="form-control"> <option value="yes" <selected="selected">Active</option> <option value="no">Inactive</option> </select> <?php }?> </div> </div> <script> function hide(x){ var x; if(x==5) { document.getElementById("hidden_div").style.display="block"; } else { document.getElementById("hidden_div").style.display="none"; } } </script> <?php if($_GET['action']=="edit" ) {}else{?> <div class="form-group field"> <label for="signup_v1-status" class="col-sm-2 control-label" >User Role</label> <div class="col-sm-10 ui left labeled input"> <select name="rolename" id="rolename" class="form-control" data-validation="[NOTEMPTY]" data-validation-message="User Role must not be empty" onchange="hide (this.value);"> <option value="">Select User Role</option> <?php while($row_role=mysql_fetch_array($res_role)) { if($row_role['role_name']=="admin") { } else { if($row_role['roleid']==$roleid){?> <option value="<?php echo $row_role['roleid']?>" selected="selected"> <?php echo $row_role['role_name']?> </option> <?php }else{?> <option value="<?php echo $row_role['roleid']?>"> <?php echo $row_role['role_name']?> </option> <?php }}}?> </select> </div> </div> <?php } ?> <div class="form-group field" style="display:none;" id="hidden_div"> <label for="signup_v1-status" class="col-sm-2 control-label" >Class</label> <div class="col-sm-10 ui left labeled input"> <select name="class" id="class" class="form-control" data-validation="" data-validation-message="User Role must not be empty" onchange="hide (this.value);"> <option value="" >Select Student Class</option> <?php $class=mysql_query("select * from class"); while($c=mysql_fetch_array($class)) { ?> <option value="<?php echo $c['classid']?>"> <?php echo $c['classname']?> </option> <?php }?> </select> </div> </div><!-- /.box-body --> <div class="box-footer"> <button type="button" class="btn btn-default" onclick="location.href='manage_user.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="aid" id="aid" value="<?php echo $aid?>"> </div><!-- /.box-footer --> </form> </div><!-- /.box --> </div><!--/.col (right) --> </div> <!-- /.row --> </section><!-- /.content --> </div><!-- /.content-wrapper --> <?php require_once("footer.php"); ?>