[ Index ]

MailPress 7.1

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-admin/includes/settings/connection_smtp/ -> form.php (source)

   1  <?php // connection_smtp
   2  
   3  $xssl = array ( ''    => __( 'No', 'MailPress' ),
   4              'ssl'    => 'SSL' ,
   5              'tls'    => 'TLS' 
   6   ); 
   7  $xport = array (     '25'        => __( 'Default SMTP Port', 'MailPress' ),
   8              '465'        => __( 'Use for SSL/TLS/GMAIL', 'MailPress' ),
   9              'custom'    => __( 'Custom Port: (Use Box)', 'MailPress' )
  10   ); 
  11  
  12  if ( !isset( $connection_smtp ) ) $connection_smtp = get_option( MailPress::option_name_smtp );
  13  
  14  $connection_smtp['customport'] = '';
  15  if ( isset( $connection_smtp['port'] ) && !in_array( $connection_smtp['port'], array( 25, 465 ) ) ) 
  16  {
  17      $connection_smtp['customport'] = $connection_smtp['port']; 
  18      $connection_smtp['port'] = 'custom';
  19  }
  20  
  21  if ( isset( $pophostclass ) ) $connection_smtp['smtp-auth'] = '@PopB4Smtp';
  22  
  23  $popb4smtp_class = '';
  24  $popb4smtp_class .= ( isset( $connection_smtp['smtp-auth'] ) && ( '@PopB4Smtp' == $connection_smtp['smtp-auth'] ) ) ? '' : 'hidden ';
  25  $popb4smtp_class .= ( !isset( $pophostclass ) ) ? '' : 'form-invalid'; 
  26  
  27  ?>
  28  <form name="<?php echo basename(__DIR__); ?>" method="post" class="mp_settings">
  29      <input type="hidden" name="_tab" value="<?php echo basename(__DIR__); ?>" />
  30      <table class="form-table">
  31  
  32  <!-- smtp server -->
  33          <tr<?php if ( isset( MP_AdminPage::$err_mess['server'] ) ) echo ' class="form-invalid"'; ?>>
  34              <th>
  35                  <?php _e( 'SMTP Server', 'MailPress' ); ?>  
  36              </th>
  37              <td colspan="2">
  38                  <input type="text" name="connection_smtp[server]" size="25" value="<?php echo ( isset( $connection_smtp['server'] ) ) ? esc_attr( $connection_smtp['server'] ) : ''; ?>" />
  39              </td>
  40          </tr>
  41  <!-- smtp username -->
  42          <tr<?php if ( isset( MP_AdminPage::$err_mess['username'] ) ) echo ' class="form-invalid"'; ?>>
  43              <th>
  44                  <?php _e( 'Username', 'MailPress' ); ?>  
  45              </th>
  46              <td colspan="2">
  47                  <input type="text" name="connection_smtp[username]" size="25" value="<?php echo ( isset( $connection_smtp['username'] ) ) ? esc_attr( $connection_smtp['username'] ) : ''; ?>" />
  48              </td>
  49          </tr>
  50  <!-- smtp pw -->
  51          <tr>
  52              <th>
  53                  <?php _e( 'Password', 'MailPress' ); ?>   
  54              </th>
  55              <td colspan="2">
  56                  <input type="password" name="connection_smtp[password]" size="25" value="<?php echo ( isset( $connection_smtp['password'] ) ) ? esc_attr( $connection_smtp['password'] ) : ''; ?>" />
  57              </td>
  58          </tr>
  59  <!-- smtp ssl/tls -->
  60          <tr>
  61              <th>
  62                  <?php _e( 'Use SSL or TLS ?', 'MailPress' ); ?>   
  63              </th>
  64              <td colspan="2">
  65                  <select name="connection_smtp[ssl]">
  66  <?php MP_AdminPage::select_option( $xssl,( isset( $connection_smtp['ssl'] ) ) ? $connection_smtp['ssl'] : 'No' );?>
  67                  </select>
  68                  &#160;
  69  <i><?php printf( __( 'Site registered socket transports are : <b>%1$s</b>', 'MailPress' ), ( array() == stream_get_transports() ) ? __( 'none', 'MailPress' ) : implode( '</b>, <b>',stream_get_transports() ) ); ?></i>
  70              </td>
  71          </tr>
  72  <!-- smtp port -->
  73          <tr<?php if ( isset( MP_AdminPage::$err_mess['customport'] ) ) echo ' class="form-invalid"'; ?>>
  74              <th>
  75                  <?php _e( 'Port', 'MailPress' ); ?>   
  76              </th>
  77              <td colspan="2">
  78                  <select name="connection_smtp[port]">
  79  <?php MP_AdminPage::select_option( $xport,( isset( $connection_smtp['port'] ) ) ? $connection_smtp['port'] : '25' );?>
  80                  </select>
  81                  &#160;
  82                  <input type="text" size="4" name="connection_smtp[customport]" value="<?php echo $connection_smtp['customport']; ?>" />
  83              </td>
  84          </tr>
  85  <!-- smtp popB4smtp -->
  86          <tr<?php if ( isset( MP_AdminPage::$err_mess['smtp-auth'] ) ) echo ' class="form-invalid"'; ?>>
  87              <th>
  88                  <label for="smtp-auth"><?php _e( 'Pop before Smtp', 'MailPress' ); ?></label>
  89              </th>
  90              <td> 
  91                  <input type="checkbox" value="@PopB4Smtp" name="connection_smtp[smtp-auth]" id="smtp-auth"<?php if ( isset( $connection_smtp['smtp-auth'] ) ) checked( '@PopB4Smtp', $connection_smtp['smtp-auth'] ); ?> />
  92              </td>
  93              <td id="POP3" class="<?php echo $popb4smtp_class; ?>"> 
  94                  <?php _e( "POP3 hostname", 'MailPress' ); ?>
  95                  &#160;&#160;
  96                  <input type="text" name="connection_smtp[pophost]" size="25" value="<?php if ( isset( $connection_smtp['pophost'] ) ) echo esc_attr( $connection_smtp['pophost'] ); ?>" />
  97                  <?php _e( "port", 'MailPress' ); ?>
  98                  &#160;&#160;
  99                  <input type="text" name="connection_smtp[popport]" size="4"  value="<?php if ( isset( $connection_smtp['popport'] ) ) echo $connection_smtp['popport']; ?>" />
 100              </td>
 101          </tr>
 102  
 103      </table>
 104  
 105  <?php MP_AdminPage::save_button(); ?>
 106  
 107  </form>


Generated: Mon Mar 11 18:33:33 2019 Cross-referenced by PHPXref 0.7.1