-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofessionals-alert-save.php
105 lines (80 loc) · 2.75 KB
/
professionals-alert-save.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?PHP
include("support/firstline.php");
include("process/progressing-alert.php");
if(isset($_REQUEST['Submit']) && $_REQUEST['Submit']== "Sign Up")
{
$fac = $_REQUEST["fac"];
if($fac == "")
{//#1
$email = $_REQUEST["email"];
$company = $_REQUEST["company"];
$job_area = $_REQUEST["job_area"];
$job_location = $_REQUEST["job_location"];
$job_type = $_REQUEST["job_type"];
$curdate=date("Y-m-d");
$total = $db->fetchSingleRow("select * from professional_master where email='".$email."'");
if($total > 0){
$resmsg =202;
}else{
$tbl = "professional_master";
$career_in["email"] = $email;
$career_in["company"] = $company;
$career_in["job_area"] = $job_area;
$career_in["job_location"] = $job_location;
$career_in["job_type"] = $job_type;
$career_in["apply_on"] = $curdate;
$staticid = $db->db_insert($tbl,$career_in);
if($staticid > 0)
{
$job_email = $db->fetchSingleRow("select ID,company,email,job_area,job_location,job_type from professional_master where ID= ".$staticid);
$user_id = $db->encode64("PMA:".$job_email['ID']);
$user_email = $job_email['email'];
$user_name = $job_email['company'];
$user_job_area = $job_email['job_area'];
$user_job_location = $job_email['job_location'];
$user_job_type = $job_email['job_type'];
$email_to = "[email protected]";
//$email_to = "[email protected]";
$email_subject = "Need Professional for : ".$job_area;
$email_txt ="";
?>
<div style="display:none;">
<?PHP
ob_start();
include("mailer/admin_pro_alert_mailer.php");
$email_txt = ob_get_contents();
ob_end_flush();
?>
</div>
<?PHP
$headers = "From: Kidston <[email protected]>\r\n Reply-to: $user_email \r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$ok = mail($email_to,$email_subject,$email_txt,$headers);
/* Mail to Registered User*/
$email_u_to = $user_email;
$email_u_subject = "Activation Required for Kidston Pro alert";
$uemail_txt = "";
?>
<div style="display:none;">
<?PHP
ob_start();
include("mailer/user_pro_alert_mailer.php");
$uemail_txt = ob_get_contents();
ob_end_flush();
?>
</div>
<?PHP
$yheaders = "From: Kidston | Support Team<[email protected]> \r\n";
$yheaders .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$yok = mail($email_u_to,$email_u_subject,$uemail_txt,$yheaders);
}
$resmsg = 200;
}//#1
}
?>
<script language="javascript">
window.location = "<?php echo "professionals-alert.php?status=".$resmsg;?>";
</script>
<?
}
?>