Server IP : 108.163.255.210 / Your IP : 52.14.255.122 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 require_once "../includes/application_top.php"; $ids = implode(",",$_POST['u_ids']); if($_SESSION['role_id']=='16'){ $listingsql=" FROM mstr_leads WHERE 1=1 and del_id !='1' and company_id ='".$_SESSION['company_id']."' and lead_status IN (1,4,7,8,9,13) and assign_tc = '".$_SESSION['user_id']."' and assign_by = '".$_SESSION['user_id']."'"; }else if($_SESSION['role_id']>='6'){ $listingsql=" FROM mstr_leads WHERE 1=1 and del_id !='1' and company_id ='".$_SESSION['company_id']."' and lead_status IN (1,4,5,7,8,9,12,13,14) and sales_tc = '".$_SESSION['user_id']."'"; }else { $listingsql=" FROM mstr_leads WHERE 1=1 and del_id !='1' and company_id ='".$_SESSION['company_id']."' and lead_status IN (1,4,5,8,9,14) and assign_tc = '".$_SESSION['user_id']."'"; } $SQL = "SELECT lead_code,project_name,name,email,mobile,phone,interested,budget,lead_cat,lead_status ".$listingsql." and lead_id IN ($ids) "; $header = ''; $result =''; $exportData = mysql_query ($SQL ) or die ( "Sql error : " . mysql_error( ) ); $header .= "S.No.\t"; $header .= "Lead Code\t"; $header .= "Project Name\t"; $header .= "Name\t"; $header .= "Email\t"; $header .= "Mobile\t"; $header .= "Phone\t"; $header .= "Interested In\t"; $header .= "Budget\t"; $header .= "Lead Category\t"; $header .= "Lead Status\t"; $c=1; $LeadStatus = array('0' => 'Unassigned','1' => 'Assigned','2' => 'Interested','3' => 'Not Interested','4' => 'Follow UP','5' => 'Reassign','6' => 'Forwarded to Sales','7' => 'Meeting Scheduled','8' => 'No Response','9' => 'No Reachable','10' => 'Not Converted','11' => 'Converted','12' => 'Assign','13' => 'Assign'); while( $rowData = mysql_fetch_row( $exportData ) ) { $line = ''; foreach( $rowData as $key => $value ) { if($key=='9'){ $value = $LeadStatus[$value]; } if ( ( !isset( $value ) ) || ( $value == "" ) ) { $value = "\t"; } else { $value = str_replace( '"' , '""' , $value ); $value = '"' . $value . '"' . "\t"; } $line .= $value; } $result .= '"' . $c . '"' . "\t"; $result .= trim( $line ) . "\n"; $c++; } $result = str_replace( "\r" , "" , $result ); if ( $result == "" ) { $result = "\nNo Record(s) Found!\n"; } //print_r($result); $FileName = "LMSExport-".date("d-m-Y"); //die; header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=$FileName.xls"); header("Pragma: no-cache"); header("Expires: 0"); print "$header\n$result"; ?>