header('Content-Type: text/plain; charset=utf-8'); die("You have not purchased or installed that app.\n"); } switch ($_POST['item']) { case 'feedback': $body = <<<BODY {$LOGIN_DATA['nickname']} has sent you {$_POST['item']} feedback about your app "{$package['name']}" version {$_POST['version']}. They are using {$_POST['os']} (platform: {$_POST['platform']}) version {$_POST['osVersion']} on {$_POST['machine']}. {$_POST['body']} BODY; require dirname(__FILE__) . '/../include/emailclass.php'; if ($package['developer_public_key']) { $mail = new sendmail(); $mail->gpg_add_key("0x{$package['developer_public_key']}"); $mail->gpg_set_type(GPG_ASYMMETRIC); $mail->gpg_set_sign(1); } else { $mail = new sendmail_gpgsign(); } $mail->gpg_set_signing_key('0x0DD626E6'); // Verifies it was sent by our server $mail->gpg_set_homedir('/home/apt/.gnupg/'); $mail->sender("*****@*****.**"); $mail->from('"' . $LOGIN_DATA['nickname'] . '" <' . $LOGIN_DATA['email'] . '>'); $mail->add_to($package['developer_email']); $mail->subject("[TVE] {$_POST['type']} feedback for {$package['package']}"); $mail->body($body); if ($mail->send()) { header('Content-Type: text/plain; charset=utf-8');
<?php require_once dirname(__FILE__) . '/../include/use_type.php'; require_once dirname(__FILE__) . '/../include/check_method.php'; require dirname(__FILE__) . '/../include/processCookie.php'; if ($LOGIN_DATA['user_id'] && check_method(array('GET', 'POST')) == 'POST') { $successful_submit = false; if ($_POST['name'] && $_POST['price'] && $_POST['source_license'] && $_POST['content_license'] && ($_POST['source_file'] || $_POST['source_control'])) { require dirname(__FILE__) . '/../include/emailclass.php'; $mail = new sendmail(); $mail->gpg_add_key('0x0DD626E6'); $mail->gpg_set_type(GPG_ASYMMETRIC); $mail->gpg_set_sign(1); $mail->gpg_set_signing_key('0x0DD626E6'); $mail->gpg_set_homedir('/home/apt/.gnupg/'); $mail->sender("*****@*****.**"); $mail->from($LOGIN_DATA['email']); $mail->add_to('*****@*****.**'); $mail->subject('TVE Application Submission: ' . $_POST['name']); if ($_FILES['source_file']) { $mail->attachment($_FILES['source_file']['tmp_name'], $_FILES['source_file']['type'], $_FILES['source_file']['name']); } foreach ($_POST as $key => $val) { if ($key == 'source_file') { continue; } $mail->body($key . ': ' . $val . "\n"); } $mail->body('User: '******'user_id']); $successful_submit = $mail->send(); }