mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-30 00:47:22 +08:00
smtp setting add encryption
This commit is contained in:
+13
-9
@@ -104,15 +104,19 @@ $trackerReportAuthKey = $torrentRep->getTrackerReportAuthKey($id, $CURUSER['id']
|
||||
$dict = \Rhilip\Bencode\Bencode::load($fn);
|
||||
$dict['announce'] = $ssl_torrent . $base_announce_url . "?authkey=$trackerReportAuthKey";
|
||||
|
||||
if (count($announce_urls) > 1) {
|
||||
foreach ($announce_urls as $announce_url) {
|
||||
/** d['announce-list'] = [[ tracker1, tracker2, tracker3 ]] */
|
||||
$dict['announce-list'][0][] = $ssl_torrent . $announce_url . "?authkey=$trackerReportAuthKey";
|
||||
|
||||
/** d['announce-list'] = [ [tracker1], [backup1], [backup2] ] */
|
||||
//$dict['announce-list'][] = [$ssl_torrent . $announce_url . "?passkey=" . $CURUSER['passkey']];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* does not support multi-tracker
|
||||
*
|
||||
* @see https://github.com/xiaomlove/nexusphp/issues/26
|
||||
*/
|
||||
//if (count($announce_urls) > 1) {
|
||||
// foreach ($announce_urls as $announce_url) {
|
||||
// /** d['announce-list'] = [[ tracker1, tracker2, tracker3 ]] */
|
||||
// $dict['announce-list'][0][] = $ssl_torrent . $announce_url . "?authkey=$trackerReportAuthKey";
|
||||
// /** d['announce-list'] = [ [tracker1], [backup1], [backup2] ] */
|
||||
// //$dict['announce-list'][] = [$ssl_torrent . $announce_url . "?passkey=" . $CURUSER['passkey']];
|
||||
// }
|
||||
//}
|
||||
|
||||
//$dict = bdec_file($fn, $max_torrent_size);
|
||||
//$dict['value']['announce']['value'] = $ssl_torrent . $base_announce_url . "?passkey=$CURUSER[passkey]";
|
||||
|
||||
+5
-2
@@ -112,14 +112,17 @@ function bonusarray($option = 0){
|
||||
$results[] = $bonus;
|
||||
|
||||
//Buy medal
|
||||
$medals = \App\Models\Medal::query()->get();
|
||||
$medals = \App\Models\Medal::query()->where('get_type', \App\Models\Medal::GET_TYPE_EXCHANGE)->get();
|
||||
foreach ($medals as $medal) {
|
||||
$results[] = [
|
||||
'points' => $medal->price,
|
||||
'art' => 'buy_medal',
|
||||
'menge' => 0,
|
||||
'name' => $medal->name,
|
||||
'description' => sprintf('<span>%s</span><input type="hidden" name="medal_id" value="%s">', $medal->description, $medal->id),
|
||||
'description' => sprintf(
|
||||
'<div style="display: flex;align-items: center"><div style="padding: 10px">%s</div><div><img src="%s" style="max-height: 120px"/></div></div><input type="hidden" name="medal_id" value="%s">',
|
||||
$medal->description, $medal->image_large, $medal->id
|
||||
),
|
||||
'medal_id' => $medal->id,
|
||||
];
|
||||
}
|
||||
|
||||
+5
-1
@@ -166,7 +166,7 @@ elseif ($action == 'savesettings_smtp') // save smtp
|
||||
if (isset($smtptype) && $smtptype == 'advanced') {
|
||||
$validConfig = array_merge($validConfig, array('smtp_host','smtp_port','smtp_from'));
|
||||
} elseif ($smtptype == 'external') {
|
||||
$validConfig = array_merge($validConfig, array('smtpaddress','smtpport','accountname','accountpassword'));
|
||||
$validConfig = array_merge($validConfig, array('smtpaddress','smtpport', 'encryption', 'accountname','accountpassword'));
|
||||
}
|
||||
|
||||
GetVar($validConfig);
|
||||
@@ -306,6 +306,10 @@ elseif ($action == 'smtpsettings') // stmp settings
|
||||
print("<tr><td colspan=2 align=center><b>".$lang_settings['text_setting_for_external_type']."</b></td></tr>");
|
||||
tr($lang_settings['row_outgoing_mail_address'], "<input type=text name=smtpaddress style=\"width: 300px\" ".(!empty($SMTP['smtpaddress']) ? "value=\"".$SMTP['smtpaddress']."\"" : "")."> ".$lang_settings['text_outgoing_mail_address_note'], 1);
|
||||
tr($lang_settings['row_outgoing_mail_port'], "<input type=text name=smtpport style=\"width: 300px\" ".(!empty($SMTP['smtpport']) ? "value=\"".$SMTP['smtpport']."\"" : "")."> ".$lang_settings['text_outgoing_mail_port_note'], 1);
|
||||
$encryptionRadio = '<label><input type="radio" name="encryption" value="" ' . (empty($SMTP['encryption']) ? " checked" : "") . ' />none</label>';
|
||||
$encryptionRadio .= '<label><input type="radio" name="encryption" value="tls"' . ($SMTP['encryption'] == "tls" ? " checked" : "") . '/>tls</label>';
|
||||
$encryptionRadio .= '<label><input type="radio" name="encryption" value="ssl"' . ($SMTP['encryption'] == "ssl" ? " checked" : "") . '/>ssl</label>';
|
||||
tr($lang_settings['row_outgoing_mail_encryption'], $encryptionRadio, 1);
|
||||
tr($lang_settings['row_smtp_account_name'], "<input type=text name=accountname style=\"width: 300px\" ".(!empty($SMTP['accountname']) ? "value=\"".$SMTP['accountname']."\"" : "")."> ".$lang_settings['text_smtp_account_name_note'], 1);
|
||||
tr($lang_settings['row_smtp_account_password'], "<input type=password name=accountpassword style=\"width: 300px\" ".(!empty($SMTP['accountpassword']) ? "value=\"".$SMTP['accountpassword']."\"" : "")."> ".$lang_settings['text_smtp_account_password_note'], 1);
|
||||
print("</tbody><tbody>");
|
||||
|
||||
Reference in New Issue
Block a user