Server IP : 108.163.255.210 / Your IP : 18.223.210.196 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/Intellilead/users/ |
Upload File : |
<?php include('../template/header.php'); unset($_SESSION['edit_success']); if(isset($_REQUEST['editprofile']) && $_REQUEST['editprofile']=='submit') { //$username = valid_data(str_replace("''","'",$_POST["user"])); $pass = valid_data(str_replace("''","'",$_POST["password"])); $contact = valid_data(str_replace("''","'",$_POST["contact"])); $email = valid_data(str_replace("''","'",$_POST["email"])); $userimage = $_POST['image']; $imgr1 = $_POST["imgr1"]; //----------------------------------------Image------------------------------------------------------// if($_FILES['image']['name']!=""){ $ext_allowed = array ("gif", "jpg", "jpeg", "png"); $img_prefix = date('Ymdhis')."_";//str_replace(" ", "_", $product_name)."_"; $file_name = $_FILES['image']['name']; $pos = strrpos($file_name, "."); $len = strlen($file_name); $ext = substr($file_name ,$pos+1, $len-1); $ext = strtolower($ext); if (in_array ($ext, $ext_allowed)) { if (is_uploaded_file($_FILES['image']['tmp_name'])){ $userimage = $img_prefix.$file_name; @unlink("../resources/".$_SESSION['image_path'].$imgr1); @copy($_FILES['image']['tmp_name'], "../resources/".$_SESSION['image_path'].$userimage); //$image_thumb = make_thumb("uploaded/thumb/".$image1, 250, 150,"uploaded/thumb/"); } } }else{ $userimage = $imgr1; } ///End Image// $sql2="update mstr_user SET password='".crypt_now($pass)."',pass='$pass',contact_no='$contact',email_id='$email',image='$userimage',lastupdated=NOW() WHERE user_id='".$_SESSION['user_id']."'"; executeQuery($sql2); //$_SESSION['user_name']=$username; $_SESSION['password']=$pass; $_SESSION['email_id']=$email; $_SESSION['contact_no']=$contact; $_SESSION['image']=$userimage; $_SESSION['edit_success'] = "RECORD UPDATED SUCCESSFULLY"; echo "<script type=\"text/javascript\"> alert(\"RECORD UPDATED SUCCESSFULLY.\"); window.location = \"profile_edit.php\" </script>"; } if($_SESSION['image']!=""){ $fileexists ="exists"; } else { $fileexists ="new"; } ?> <!-- page heading start--> <div class="panel box-shadow-none content-header"> <div class="panel-body"> <div class="col-md-12"> <h3 class="animated fadeInLeft">Edit Profile</h3> <p class="animated fadeInDown"> Users <span class="fa-angle-right fa"></span> Edit Profile </p> </div> </div> </div> <!-- page heading end--> <div class="col-md-12"> <?php include('../template/response.php');?> <div class="col-md-12 panel"> <div class="col-md-12 panel-heading"> </div> <form class="" id="commentForm" method="post" enctype="multipart/form-data"action="<?php echo $_SERVER['PHP_SELF'];?>"> <div class="col-md-12 panel-body"> <div class="col-md-12"> <div class="col-md-6"> <div class="form-group form-animate-text" style="margin-top:40px !important;"> <p>User Name</p> <input type="text" class="form-group mask-mixed" id="cname" name="user" minlength="2" type="text" value="<?php echo $_SESSION['user_name']; ?>" style="width:100%;" disabled/> <span class="bar"></span> <!--label>User Name</label--> </div> <div class="form-group form-animate-text" style="margin-top:40px !important;"> <input type="text" class="form-text mask-mixed" id="cemail" type="email" name="email" value="<?php echo $_SESSION['email_id']; ?>" required /> <span class="bar"></span> <label>E-Mail</label> </div> <div class="form-group form-animate-text" style="margin-top:40px !important;"> <input type="text" class="form-text mask-mixed noSpace numeric" id="ccontact" type="text" name="contact" minlength="10" maxlength="10" oninvalid="setCustomValidity('Please insert 10 digit contact number')" value="<?php echo $_SESSION['contact_no']; ?>" required /> <span class="bar"></span> <label>Contact Number</label> </div> <div class="form-group form-animate-text" style="margin-top:40px !important;"> <input class="form-text mask-mixed" id="cpassword" type="password" name="password" value="<?php echo $_SESSION['password']; ?>" required /> <span class="bar"></span> <label>Password</label> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="exampleInputFile" class="control-label col-lg-2"></label> <div class="col-md-9"><p>Upload Image</p> <div class="fileupload fileupload-<?php echo $fileexists;?>" data-provides="fileupload"> <div class="fileupload-new thumbnail" style="max-width:200px;max-height:150px;"> <img src="../resources/no_image.jpg" alt="" /> </div> <div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; line-height: 20px;"> <?php if($fileexists =="exists"){?><img src="<?php echo "../resources/". $_SESSION['image_path'].$_SESSION['image']; ?>" alt="" /><?php }?></div> <div> <span class="btn btn-default btn-file"> <span class="fileupload-new"><i class="fa fa-paper-clip"></i> Select image</span> <span class="fileupload-exists"><i class="fa fa-undo"></i> Change</span> <input type="file" class="default" name="image" /> <input type="hidden" name="imgr1" value="<?php echo $_SESSION['image'];?>"/> </span> <a href="#" class="btn btn-danger fileupload-exists" data-dismiss="fileupload" onClick="deleteFile(<?php echo "'".$_SESSION['image']."','edit_user.php','".$_SESSION['user_id']."'";?>)"><i class="fa fa-trash"></i> Remove</a> </div> </div> </div> </div> </div> <div class="form-group form-animate-text" style="margin-top:40px !important;"> <div class="col-lg-offset-2 col-lg-10"> <button class="btn btn-primary" type="submit" name="editprofile" value="submit">Save</button> </div> </div> </div> </div> </form> </div> </div> <?php include('../template/footer.php');?>