diff options
Diffstat (limited to 'central/trunk/instadisc.php')
-rw-r--r-- | central/trunk/instadisc.php | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/central/trunk/instadisc.php b/central/trunk/instadisc.php index e2796aa..c9bf051 100644 --- a/central/trunk/instadisc.php +++ b/central/trunk/instadisc.php | |||
@@ -24,7 +24,7 @@ function instaDisc_checkVerification($username, $verification, $verificationID, | |||
24 | $cntverid = "SELECT COUNT(*) FROM oldVerID WHERE username = \"" . mysql_escape_string($username) . "\""; | 24 | $cntverid = "SELECT COUNT(*) FROM oldVerID WHERE username = \"" . mysql_escape_string($username) . "\""; |
25 | $cntverid2 = mysql_query($cntverid); | 25 | $cntverid2 = mysql_query($cntverid); |
26 | $cntverid3 = mysql_fetch_array($cntverid2); | 26 | $cntverid3 = mysql_fetch_array($cntverid2); |
27 | if ($cntverid3[0] >= intval(getConfig('verIDBufferSize'))) | 27 | if ($cntverid3[0] >= intval(instaDisc_getConfig('verIDBufferSize'))) |
28 | { | 28 | { |
29 | $delverid = "DELETE FROM oldVerID WHERE username = \"" . mysql_escape_string($username) . "\""; | 29 | $delverid = "DELETE FROM oldVerID WHERE username = \"" . mysql_escape_string($username) . "\""; |
30 | $delverid2 = mysql_query($delverid); | 30 | $delverid2 = mysql_query($delverid); |
@@ -74,7 +74,7 @@ function instaDisc_sendItem($username, $id) | |||
74 | 74 | ||
75 | function instaDisc_sendUpdateNotice($softwareVersion) | 75 | function instaDisc_sendUpdateNotice($softwareVersion) |
76 | { | 76 | { |
77 | $username = getConfig('owner'); | 77 | $username = instaDisc_getConfig('owner'); |
78 | $subscription = 'http://' . $_SERVER['HTTP_HOST']; | 78 | $subscription = 'http://' . $_SERVER['HTTP_HOST']; |
79 | $title = 'Update your software to ' . $software; | 79 | $title = 'Update your software to ' . $software; |
80 | $author = 'Hatkirby'; | 80 | $author = 'Hatkirby'; |
@@ -132,14 +132,14 @@ function instaDisc_phpMailer() | |||
132 | { | 132 | { |
133 | $mail = new PHPMailer(); | 133 | $mail = new PHPMailer(); |
134 | $mail->IsSMTP(); | 134 | $mail->IsSMTP(); |
135 | $mail->From = 'instadisc@' . getConfig('mailDomain'); | 135 | $mail->From = 'instadisc@' . instaDisc_getConfig('mailDomain'); |
136 | $mail->FromName = 'InstaDisc'; | 136 | $mail->FromName = 'InstaDisc'; |
137 | $mail->Host = getConfig('smtpHost'); | 137 | $mail->Host = instaDisc_getConfig('smtpHost'); |
138 | if (getConfig('smtpAuth') == 'true') | 138 | if (instaDisc_getConfig('smtpAuth') == 'true') |
139 | { | 139 | { |
140 | $mail->SMTPAuth = true; | 140 | $mail->SMTPAuth = true; |
141 | $mail->Username = getConfig('smtpUser'); | 141 | $mail->Username = instaDisc_getConfig('smtpUser'); |
142 | $mail->Password = getConfig('smtpPass'); | 142 | $mail->Password = instaDisc_getConfig('smtpPass'); |
143 | } | 143 | } |
144 | $mail->Helo = $_SERVER['HTTP_HOST']; | 144 | $mail->Helo = $_SERVER['HTTP_HOST']; |
145 | $mail->ClearAddresses(); | 145 | $mail->ClearAddresses(); |
@@ -178,7 +178,7 @@ function instaDisc_activateAccount($username, $penKey) | |||
178 | $mail = instaDisc_phpMailer(); | 178 | $mail = instaDisc_phpMailer(); |
179 | $mail->AddAddress($getuser3['email'], $username); | 179 | $mail->AddAddress($getuser3['email'], $username); |
180 | $mail->Subject = 'Welcome to InstaDisc!'; | 180 | $mail->Subject = 'Welcome to InstaDisc!'; |
181 | $mail->Body = "Welcome to InstaDisc! Thank you for registering at " . getConfig('siteName') . " Central Server, we hope you enjoy our service! Now, when you download an InstaDisc Client, it will ask you for the following information which you will need to enter into it for it to work:\r\n\r\nUsername: " . $username . "\r\nPassword: (you should know this, it's not displayed here for security reasons)\r\nCentral Server URL: " . getConfig("xmlrpcURL") . "\r\n\r\nOnce again, thank you for choosing " . getConfig("siteName") . "!"; | 181 | $mail->Body = "Welcome to InstaDisc! Thank you for registering at " . instaDisc_getConfig('siteName') . " Central Server, we hope you enjoy our service! Now, when you download an InstaDisc Client, it will ask you for the following information which you will need to enter into it for it to work:\r\n\r\nUsername: " . $username . "\r\nPassword: (you should know this, it's not displayed here for security reasons)\r\nCentral Server URL: " . instaDisc_getConfig("xmlrpcURL") . "\r\n\r\nOnce again, thank you for choosing " . instaDisc_getConfig("siteName") . "!"; |
182 | 182 | ||
183 | return $mail->Send(); | 183 | return $mail->Send(); |
184 | } else { | 184 | } else { |
@@ -229,4 +229,13 @@ function instaDisc_deleteAccount($username) | |||
229 | return false; | 229 | return false; |
230 | } | 230 | } |
231 | 231 | ||
232 | function instaDisc_getConfig($key) | ||
233 | { | ||
234 | $getconfig = "SELECT * FROM config WHERE name = \"" . mysql_escape_string($key) . "\""; | ||
235 | $getconfig2 = mysql_query($getconfig); | ||
236 | $getconfig3 = mysql_fetch_array($getconfig2); | ||
237 | |||
238 | return $getconfig3['value']; | ||
239 | } | ||
240 | |||
232 | ?> | 241 | ?> |