Server IP : 108.163.255.210 / Your IP : 18.118.144.239 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/leads/ |
Upload File : |
<?php include('../template/header.php'); $order_by= $_GET['order_by']; $order_by2= $_GET['order_by2']; if($order_by=='') { $order_by='lead_id'; } if($order_by2==""){ $order_by2='ASC'; } $_SESSION['order_by2']=$order_by2; $_SESSION['sess_order_by']=$order_by; //==================================select data================ //pagination include('../includes/newPagers.php'); $Num_Records_Page = 30; $PGobj = new PagerClass(); if($_REQUEST['page']==""){ $cp=1; } else{ $cp=intval($_REQUEST['page']); } $PGobj->setCurrentPage($cp); $PGobj->SetCurpage($_SERVER['PHP_SELF']); $columns="SELECT * "; $listingsql=" FROM tmp_leads WHERE company_id = '".$_SESSION['company_id']."' and user_id = '".$_SESSION['user_id']."'"; $reccnt = getSingleResult("SELECT COUNT(*) ".$listingsql); $limit = $PGobj->MyPaging($reccnt,$Num_Records_Page); $sql= $columns.$listingsql." order by $order_by $order_by2 ".$limit; $result= executeQuery($sql); $no= mysql_num_rows($result); if(isset($_POST['save'])){ $c = count($_POST['ids']); for($i='0';$i<$c;$i++){ //echo $_POST['name'][$i]."<br/>"; //echo $leadids = $_POST['lead_id'][$i]; $sql="INSERT INTO mstr_leads (lead_code,source,project_name,name,email,mobile,phone,city,country,status,tol,tsr,msg,plan_to_buy,contacted_by,msg_date,interested,budget,high_lead,pref_loc,look_for,subject,other_detail,rev_id,company_id,user_id,upload_date,del_id) values('".$_POST['lead_code'][$i]."','".$_POST['source'][$i]."','".$_POST['project_name'][$i]."','".$_POST['name'][$i]."','".$_POST['email'][$i]."','".$_POST['mobile'][$i]."','".$_POST['phone'][$i]."','".$_POST['city'][$i]."','".$_POST['country'][$i]."','".$_POST['status'][$i]."','".$_POST['tol'][$i]."','".$_POST['tsr'][$i]."','".$_POST['msg'][$i]."','".$_POST['plan_to_buy'][$i]."','".$_POST['contacted_by'][$i]."','".$_POST['msg_date'][$i]."','".$_POST['interested'][$i]."','".$_POST['budget'][$i]."','".$_POST['high_lead'][$i]."','".$_POST['pref_loc'][$i]."','".$_POST['look_for'][$i]."','".$_POST['subject'][$i]."','".$_POST['other_detail'][$i]."','".$_POST['rev_id'][$i]."','".$_SESSION['company_id']."','".$_SESSION['user_id']."',NOW(),'0')"; executeQuery($sql); $sql2 = "Delete from tmp_leads where lead_id= '".$_POST['ids'][$i]."'"; executeQuery($sql2); } echo "<script type=\"text/javascript\"> alert(\"Leads successfully Saved.\"); window.location = \"upload_lead.php\" </script>"; } if(isset($_POST['delete'])){ //$sql = 'TRUNCATE TABLE tmp_leads'; $sql = 'Delete '.$listingsql; executeQuery($sql); echo "<script type=\"text/javascript\"> alert(\"Temporary Leads Deleted successfully.\"); window.location = \"upload.php\" </script>"; } ?> <!-- page heading start--> <div class="panel box-shadow-none content-header"> <div class="panel-body"> <div class="col-md-12"> <h3 class="animated fadeInLeft">Save Leads</h3> <p class="animated fadeInDown"> Leads <span class="fa-angle-right fa"></span>Save Leads </p> </div> </div> </div> <!-- page heading end--> <!--body wrapper start--> <?php include('../template/response.php'); ?> <div class="col-md-12 top-20 padding-0"> <div class="col-md-12"> <div class="panel"> <div class="panel-heading"><h3> Verify List (<?php echo $reccnt;?>)</h3></div> <div class="panel-body"> <form method="post" action="upload_lead.php" name="form_frm"> <div class="table-responsive"> <table class="table table-striped table-bordered" width="100%" cellspacing="0"> <thead class="cf"> <tr> <th>Project Name</th> <th>Source</th> <th>Name</th> <th>Email</th> <th>Mobile</th> <th>Phone</th> <th>City</th> <th>Country</th> <th>Status</th> <th>Type Of Lead</th> <th>Type (Sale / Rent)</th> <th>Message Details</th> <th>Plan to Buy</th> <th>Contacted By</th> <th>Message Date</th> <th>Interested In</th> <th>Budget</th> <th>High Quality Lead</th> <th>Preferred Location</th> <th>Looking For</th> <th>Subject</th> <th>Another Details</th> </tr> </thead> <tbody> <?php function next_value_LeadCode($current) { $letter = substr($current,0,2); $number = (int) substr($current, 2); if ($number == 9999) { $letter++; $number = 1; } else { $number++; } return date("ym").$letter.str_pad($number, 4, '0', STR_PAD_LEFT); } if($no>0){ $leadid = getSingleResult("SELECT MAX(lead_code) FROM `mstr_leads` where company_id ='".$_SESSION['company_id']."'"); if(empty($leadid)){ $lead_code = "AA0000"; }else{ $lead_code = substr($leadid,4,6); } // $lead_code = substr($leadid,4,6); //$lead_code = 'AA0001'; while($line=mysql_fetch_array($result)) { ?> <tr> <!--td><input type="checkbox" name="u_ids[]" value="< ?php echo $line['lead_id']?>"></td--> <td><?php echo $line['project_name']; ?></td> <td><?php echo $line['source']?></td> <td><?php echo $line['name']?></td> <td><?php echo $line['email']?></td> <td><?php echo $line['mobile']?></td> <td><?php echo $line['phone']?></td> <td><?php echo $line['city']?></td> <td><?php echo $line['country']?></td> <td><?php echo $line['status']?></td> <td><?php echo $line['tol']?></td> <td><?php echo $line['tsr']?></td> <td><?php echo $line['msg']?></td> <td><?php echo $line['plan_to_buy']?></td> <td><?php echo $line['contacted_by']?></td> <td><?php echo $line['msg_date']?></td> <td><?php echo $line['interested']?></td> <td><?php echo $line['budget']?></td> <td><?php echo $line['high_lead']?></td> <td><?php echo $line['pref_loc']?></td> <td><?php echo $line['look_for']?></td> <td><?php echo $line['subject']?></td> <td><?php echo $line['other_detail']?></td> <input type="hidden" name="lead_code[]" value="<?php echo next_value_LeadCode($lead_code); ?>"> <input type="hidden" name="rev_id[]" value="<?php echo $line['lead_id']?>"> <input type="hidden" name="ids[]" value="<?php echo $line['lead_id']?>"> <input type="hidden" name="project_name[]" value="<?php echo $line['project_name']?>"> <input type="hidden" name="source[]" value="<?php echo $line['source']?>"> <input type="hidden" name="name[]" value="<?php echo $line['name']?>"> <input type="hidden" name="email[]" value="<?php echo $line['email']?>"> <input type="hidden" name="mobile[]" value="<?php echo $line['mobile']?>"> <input type="hidden" name="phone[]" value="<?php echo $line['phone']?>"> <input type="hidden" name="city[]" value="<?php echo $line['city']?>"> <input type="hidden" name="country[]" value="<?php echo $line['country']?>"> <input type="hidden" name="status[]" value="<?php echo $line['status']?>"> <input type="hidden" name="tol[]" value="<?php echo $line['tol']?>"> <input type="hidden" name="tsr[]" value="<?php echo $line['tsr']?>"> <input type="hidden" name="msg[]" value="<?php echo $line['msg']?>"> <input type="hidden" name="plan_to_buy[]" value="<?php echo $line['plan_to_buy']?>"> <input type="hidden" name="contacted_by[]" value="<?php echo $line['contacted_by']?>"> <input type="hidden" name="msg_date[]" value="<?php echo $line['msg_date']?>"> <input type="hidden" name="interested[]" value="<?php echo $line['interested']?>"> <input type="hidden" name="budget[]" value="<?php echo $line['budget']?>"> <input type="hidden" name="high_lead[]" value="<?php echo $line['high_lead']?>"> <input type="hidden" name="pref_loc[]" value="<?php echo $line['pref_loc']?>"> <input type="hidden" name="look_for[]" value="<?php echo $line['look_for']?>"> <input type="hidden" name="subject[]" value="<?php echo $line['subject']?>"> <input type="hidden" name="other_detail[]" value="<?php echo 'other_detail'; ?>"> </tr> <?php $lead_code++; } }else {?> <tr> <td colspan="100%" style="margin:0px auto; text-align:center; color:#282828; font-size:14px; font-variant:small-caps; font-weight:bold;"> Your Leads List is Empty.</td> </tr> <?php }?> </tbody> </table> <div class="col-md-6" style="padding-top:20px;"> <span><?php echo $PGobj->showEntries($no); ?></span> </div> <div class="col-md-6"> <?php echo $PGobj->showPagerContent(); ?> </div> </div> <?php if($no>0){ ?> <div class="col-md-12"> <div class="col-md-3"> <button type="submit" name="save" style="margin-top:0px !important;" class="btn-flip btn btn-gradient btn-success"> <div class="flip"> <div class="side"> Save <span class="fa fa-upload"></span> </div> <div class="side back"> are you sure? </div> </div> <span class="icon"></span> </button> </div> <div class="col-md-3"> <button type="submit" name="delete" style="margin-top:0px !important;" class="btn-flip btn btn-gradient btn-danger"> <div class="flip"> <div class="side"> Trash <span class="fa fa-trash"></span> </div> <div class="side back"> are you sure? </div> </div> <span class="icon"></span> </button> </div> </div> <?php }?> </form> </div> </div> </div> </div> <!--body wrapper end--> <?php include('../template/footer.php');?>