Server IP : 162.241.126.129 / Your IP : 18.116.37.200 Web Server : Apache System : Linux 162-241-126-129.cprapid.com 4.18.0-477.27.2.el8_8.x86_64 #1 SMP Fri Sep 29 08:21:01 EDT 2023 x86_64 User : rvway5nu4 ( 1018) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/rvway5nu4/www/admin/employee/ |
Upload File : |
<?php include("../../config/data.config.php"); if (!isset($_SESSION["SESS_v_adminLoggedIn"])) { header ("Location: $MAP_VROOT_FILE_PATH/admin/login.php"); exit; } //echo '<pre>'; print_r( $_SESSION ); echo '</pre>'; echo $target = "$DOCUMENT_ROOT$PIC_DIR/banner/$filename"; exit; include("$LIB_DIR/functions.lib.php"); include("$LIB_DIR/db.php"); include("$LIB_DIR/db/mysqli.php"); include("$LIB_DIR/data.constant.php"); include("$LIB_DIR/sitemsgs.php"); include("$LIB_DIR/class.paging.php"); include("$LIB_DIR/functions.mailer.php"); global $SITE_URL, $IMG_DIR; $db = new Db( $DB_HOST, $DB_USERNAME, $DB_PASSWORD, $DB_NAME, $DB_REPORT_ERROR, $DB_PERSISTENT_CONN); $img_preview = ''; $img_name = ''; $inactive_checked = ''; $active_checked = ''; $v_title = ''; $i_contactID = ''; if( ( isset( $_POST['submitLogin'] ) ) && ( $_POST['submitLogin'] == 'yes' ) ){ $name = addslashes($_REQUEST['first_name']).' '.addslashes($_REQUEST['last_name']); $Queryuest = "UPDATE tbl_employee SET first_name = '". addslashes($_REQUEST['first_name'])."', last_name = '". addslashes($_REQUEST['last_name'])."', country_code_phone = '". addslashes($_REQUEST['country_code_phone'])."', phone = '". addslashes($_REQUEST['phone'])."', address = '". addslashes($_REQUEST['address'])."', c_status = '". $_REQUEST['c_status']."', city = '". addslashes($_REQUEST['city'])."', state = '". addslashes($_REQUEST['state'])."', country = '". addslashes($_REQUEST['country'])."', password = '". addslashes($_REQUEST['password'])."', Active_Services = '". addslashes(implode(',',$_POST['activeService']))."' WHERE i_customerID = '".$_REQUEST['i_customerID']."' " ; $result=$db->query($Queryuest); $PROMPT ='<div class="alert alert-success alert-dismissable"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">X</button> <strong><i class="fa fa-check-circle"></i> Success :</strong>'.$name.'Update successfully. </div>'; $_SESSION['msg'] = $PROMPT; header('Location: '.SUB_DIR_PROJECT.'/admin/employee/employee_list.php'); exit; } $sid223chld0 = 'actve'; $sid223chld1 = 'actve'; $sid223show = 'show'; ?> <!DOCTYPE html> <html> <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>RV Way</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="robots" content="all,follow"> <!-- Bootstrap CSS--> <link rel="stylesheet" href="<?php echo $SITE_URL; ?>/admin/vendor/bootstrap/css/bootstrap.min.css"> <!-- Font Awesome CSS--> <link rel="stylesheet" href="<?php echo $SITE_URL; ?>/admin/vendor/font-awesome/css/font-awesome.min.css"> <!-- Fontastic Custom icon font--> <link rel="stylesheet" href="<?php echo $SITE_URL; ?>/admin/css/fontastic.css"> <!-- Google fonts - Roboto --> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700"> <!-- jQuery Circle--> <link rel="stylesheet" href="<?php echo $SITE_URL; ?>/admin/css/grasp_mobile_progress_circle-1.0.0.min.css"> <!-- Custom Scrollbar--> <link rel="stylesheet" href="<?php echo $SITE_URL; ?>/admin/vendor/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css"> <!-- theme stylesheet--> <link rel="stylesheet" href="<?php echo $SITE_URL; ?>/admin/css/style.default.css" id="theme-stylesheet"> <!-- Custom stylesheet - for your changes--> <link rel="stylesheet" href="<?php echo $SITE_URL; ?>/admin/css/custom.css"> <!-- Favicon--> <link rel="shortcut icon" href="img/favicon.ico"> <!-- Tweaks for older IEs--><!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]--> <link href="<?php echo $SITE_URL; ?>/tinymce/docs/style.css" rel="stylesheet" type="text/css"> <!-- tinyMCE --> <script language="javascript" type="text/javascript" src="<?php echo $SITE_URL; ?>/tinymce/jscripts/tiny_mce/tiny_mce.js"></script> <script language="javascript" type="text/javascript"> tinyMCE.init({ mode : "exact", theme : "advanced", elements : "tx_description", plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu", theme_advanced_buttons1_add_before : "save,separator", theme_advanced_buttons1_add : "fontselect,fontsizeselect", theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor", theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator", theme_advanced_buttons3_add_before : "tablecontrols,separator", theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_path_location : "bottom", content_css : "example_full.css", plugin_insertdate_dateFormat : "%Y-%m-%d", plugin_insertdate_timeFormat : "%H:%M:%S", extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", external_link_list_url : "example_link_list.js", external_image_list_url : "example_image_list.js", flash_external_list_url : "example_flash_list.js", file_browser_callback : "fileBrowserCallBack" }); function fileBrowserCallBack(field_name, url, type) { // This is where you insert your custom filebrowser logic alert("Filebrowser callback: " + field_name + "," + url + "," + type); } // elements : "tx_description,elm2", </script> <!-- /tinyMCE --> </head> <body> <!-- Side Navbar --> <?php require_once(ABSPATH.'../admin/common/admin_sidebar.php'); ?> <div class="page"> <!-- navbar--> <?php require_once(ABSPATH.'../admin/common/admin_header_nav.php'); ?> <!-- Counts Section --> <section class="dashboard-counts section-padding"> <div class="container-fluid"> <div class="row"> <!-- Count item widget--> <div class="col-xl-12 col-md-12 col-lg-12 card"> <!-- Start Form --> <div class="row"> <div class="col-lg-12 col-sm-12"> <form method="post" enctype="multipart/form-data"> <div class=""> <div class="card-header d-flex align-items-center"> </div> <div class="card-body"> <section class="product_loop login-area"> <?php if( $_SESSION['msg'] ){ echo $_SESSION['msg']; unset($_SESSION['msg']); } $sql = "SELECT * FROM tbl_employee WHERE i_customerID = '".$_REQUEST['i_customerID']."' "; $result=$db->query($sql); if($result->num_rows) { foreach( $result->row AS $key=>$val){ $$key = stripslashes($val); } $selactive = ( $c_status == 1 ) ? 'SELECTED': ''; $deselactive = ( $c_status == 2 ) ? 'SELECTED': ''; } $sql = "SELECT * FROM tbl_country order by name asc "; $result=$db->query($sql); if($result->num_rows) { $country_str = ''; $bcountry_str = ''; foreach( $result->rows AS $key=>$val ){ if( $country == $val['iso_code_3'] ){ $country_str .= '<option value="'.$val['iso_code_3'].'" SELECTED >'.$val['name'].'</option>'; }else{ $country_str .= '<option value="'.$val['iso_code_3'].'" >'.$val['name'].'</option>'; } if( $b_country == $val['iso_code_3'] ){ $bcountry_str .= '<option value="'.$val['iso_code_3'].'" SELECTED >'.$val['name'].'</option>'; }else{ $bcountry_str .= '<option value="'.$val['iso_code_3'].'" >'.$val['name'].'</option>'; } } } ?> <div class="row"> <!-- Start to register --> <div class="col-sm-12"> <h3>Edit User Account </h3><HR/> <div id="form_submit_result"></div> <form method="post" role="form" id="" action="my_account.php" onsubmit="return validCreatQuestion();"> <div class="form-group row"> <div class="col-sm-12 col-xs-12 col-md-6 col-lg-6"> First Name <input type="text" name="first_name" id="first_name" class="form-control " required value="<?php echo $first_name; ?>"> </div> <div class="col-sm-12 col-xs-12 col-md-6 col-lg-6"> Last Name <input type="text" name="last_name" id="last_name" class="form-control " required value="<?php echo $last_name; ?>"> </div> </div> <div class="form-group row"> <div class="col-sm-12 col-xs-12 col-md-6 col-lg-6"> Country Code <input type="text" name="country_code_phone" id="country_code_phone" class="form-control " required value="<?php echo $country_code_phone; ?>"> </div> <div class="col-sm-12 col-xs-12 col-md-6 col-lg-6"> Phone <input type="text" name="phone" id="phone" class="form-control " required value="<?php echo $phone; ?>"> </div> </div> <div class="form-group row"> <div class="col-sm-12 col-xs-12 col-md-12 col-lg-12"> Address <input type="text" value="<?php echo $address; ?>" name="address" id="address" class="form-control" required> </div> </div> <div class="form-group row"> <div class="col-sm-12 col-xs-12 col-md-6 col-lg-6"> Status <select name="c_status" id="c_status" class="form-control "> <option value="1" <?php echo $selactive; ?> > Active</option> <option value="2" <?php echo $deselactive; ?> > Deactive</option> </select> </div> <div class="col-sm-12 col-xs-12 col-md-6 col-lg-6"> City <input type="text" name="city" id="city" class="form-control " value="<?php echo $city; ?>" required > </div> </div> <div class="form-group row"> <div class="col-sm-12 col-xs-12 col-md-6 col-lg-6"> State <input type="text" name="state" id="state" class="form-control " value="<?php echo $state; ?>" required > </div> <div class="col-sm-12 col-xs-12 col-md-6 col-lg-6"> Country <select name="country" id="country" class="form-control "> <?php echo $country_str; ?> </select> </div> </div> <div class="form-group row"> <div class="col-sm-12 col-xs-12 col-md-6 col-lg-6"> Password <input type="text" name="password" value="<?php echo $password; ?>" id="b_last_name" class="form-control " required > </div> </div> <BR/> <h3>Service Assign to Employee </h3> <div class="form-group row"> <?php $ExplodeService = explode(',',$Active_Services); $query1 = "SELECT * FROM service_name WHERE parent_id='0'"; $result1=$db->query($query1); if($result1->num_rows) { foreach( $result1->rows AS $vald) { ?> <div class="col-sm-12 col-xs-12 col-md-6 col-lg-6"> <div style="font-size: 15px;"> <?php echo $vald['menu_id']; ?>. <input type="checkbox" name="activeService[]" <?php if(in_array($vald['menu_id'],$ExplodeService)) { echo "checked"; } ?> value="<?php echo $vald['menu_id']; ?>"> <?php echo $vald['service_name']; ?></div> <?php $query2 = "SELECT * FROM service_name WHERE parent_id='".$vald['menu_id']."'"; $result2=$db->query($query2); if($result2->num_rows) { foreach( $result2->rows AS $val2) { ?> <div style="margin-left:18px;"> <input type="checkbox" name="activeService[]" <?php if(in_array($val2['menu_id'],$ExplodeService)) { echo "checked"; } ?> value="<?php echo $val2['menu_id']; ?>"> <?php echo $val2['service_name']; ?> </div> <?php } } ?> </div> <?php } } ?> </div> <div class="form-group row"> <div class="col-sm-12 col-xs-12 col-md-6 col-lg-6"> <input type="hidden" name="submitLogin" id="submitLogin" class="form-control " value="yes"> <input type="hidden" name="i_customerID" id="i_customerID" class="form-control " value="<?php echo $_REQUEST['i_customerID']; ?>"> <button type="submit" name="submit" class="btn btn-success pull-left">Submit</button> </div> <div class="col-sm-12 col-xs-12 col-md-6 col-lg-6"> <label> </label> </div> </div> </form> </div> <?php if( isset($_SESSION['msg'])) { unset($_SESSION['msg']); } ?> <!-- End to register --> </div> </section> </div> </div> </form> </div> </div> <!-- End Form --> </div> </div> </div> </section> <!-- Header Section--> <?php require_once(ABSPATH.'../admin/common/admin_footer.php'); ?> </div> <?php require_once(ABSPATH.'../admin/common/admin_footer_js.php'); ?> </body> </html>