[ Index ]
 

Code source de IMP H3 (4.1.5)

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/templates/pgp/ -> pgp.inc (source)

   1  <input type="checkbox" id="use_pgp" name="use_pgp"<?php echo ($prefs->getValue('use_pgp')) ? ' checked="checked"' : '' ?> /> <label for="use_pgp"><?php echo _("Enable PGP functionality?") ?></label>&nbsp;<?php echo Help::link('imp', 'pgp-overview') ?><br />
   2  <strong style="color:red"><?php echo _("NOTE") ?>:</strong> <?php echo _("PGP support requires popup windows to be used.  If your browser is currently set to disable popup windows, you must change this setting or else the PGP features will not work correctly.") ?><br />
   3  <?php if (!$prefs->isLocked('pgp_attach_pubkey')): ?>
   4  <input type="checkbox" id="pgp_attach_pubkey" name="pgp_attach_pubkey" <?php echo ($prefs->getValue('pgp_attach_pubkey')) ? "checked=\"checked\"" : "" ?> /> <label for="pgp_attach_pubkey"><?php echo _("Should your PGP public key to be attached to your messages by default?") ?></label>&nbsp;<?php echo Help::link('imp', 'pgp-option-attach-pubkey') ?><br />
   5  <?php endif; ?>
   6  <?php if (!$prefs->isLocked('pgp_scan_body')): ?>
   7  <input type="checkbox" id="pgp_scan_body" name="pgp_scan_body" <?php echo ($prefs->getValue('pgp_scan_body')) ? "checked=\"checked\"" : "" ?> /> <label for="pgp_scan_body"><?php echo _("Should the body of text/plain messages be scanned for PGP data?") ?></label>&nbsp;<?php echo Help::link('imp', 'pgp-option-scan-body') ?><br />
   8  <?php endif; ?>
   9  </div>
  10  
  11  <br class="spacer" />
  12  <div class="header">
  13    <ul><li><?php echo Help::link('imp', 'pgp-manage-pubkey') ?></li></ul>
  14    <?php echo _("PGP Public Keyring") ?>
  15  </div>
  16  
  17  <div class="item">
  18  <?php if (empty($pubkey_list)): ?>
  19  <strong><?php echo _("No Keys in Keyring") ?></strong>
  20  <?php elseif (is_a($pubkey_list, 'PEAR_Error')): ?>
  21  <strong><?php echo _("Error") ?>:</strong> <?php echo $pubkey_list->getMessage() ?>
  22  <?php else: ?>
  23  <table>
  24  <?php foreach ($pubkey_list as $val): $linkurl = Util::addParameter($selfURL, 'email', $val['email']); ?>
  25    <tr>
  26      <td><?php echo $val['name'] ?> (<?php echo $val['email'] ?>)</td>
  27      <td>&nbsp;&nbsp;[<?php echo Horde::link(Util::addParameter($linkurl, 'actionID', 'view_public_key'), sprintf(_("View %s Public Key"), $val['name']), null, 'view_key'); ?><?php echo _("View") ?></a>]&nbsp;[<?php echo Horde::link(Util::addParameter($linkurl, 'actionID', 'info_public_key'), sprintf(_("Information on %s Public Key"), $val['name']), null, 'info_key'); ?><?php echo _("Details") ?></a>]&nbsp;[<?php echo Horde::link(Util::addParameter($linkurl, 'actionID', 'delete_public_key'), sprintf(_("Delete %s Public Key"), $val['name']), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete this public key?")) . "')) { return true; } else { return false; }"); ?><?php echo _("Delete") ?></a>]</td>
  28    </tr>
  29  <?php endforeach; ?>
  30  </table>
  31  <?php endif; ?>
  32  </div>
  33  
  34  <br class="spacer" />
  35  <?php if (!$imp['file_upload']): ?>
  36    <span style="color:red"><?php echo _("Key import is not available. File upload is not enabled on this server.") ?></span>
  37  <?php elseif (!$GLOBALS['prefs']->getValue('add_source')): ?>
  38    <strong><?php echo _("Key import is not available. You have no address book defined to add your contacts.") ?></strong>
  39  <?php else: ?>
  40    <?php $public_import_url = Util::addParameter(Util::addParameter($selfURL, 'actionID', 'import_public_key'), 'reload', $selfURL); ?>
  41    <input type="submit" name="save" class="button" onclick="popup_imp('<?php echo $public_import_url ?>',750,275); return false;" value="<?php echo _("Import Public Key") ?>" />
  42    <?php echo Help::link('imp', 'pgp-import-pubkey') ?>
  43  <?php endif; ?>
  44  
  45  <br class="spacer" />
  46  <div class="header">
  47    <ul><li><?php echo Help::link('imp', 'pgp-overview-personalkey') ?></li></ul>
  48    <?php echo _("Your PGP Public/Private Keys") ?>
  49  </div>
  50  
  51  <div class="item">
  52  <?php if (is_a($secure_check, 'PEAR_Error')): ?>
  53  <strong><?php echo _("PGP Personal Keypair support requires a secure web connection.") ?></strong>
  54  </div>
  55  
  56  <?php
  57  elseif ($prefs->getValue('pgp_public_key') &&
  58          $prefs->getValue('pgp_private_key')):
  59      $viewpublic_url = Util::addParameter($selfURL, 'actionID', 'view_personal_public_key');
  60      $infopublic_url = Util::addParameter($selfURL, 'actionID', 'info_personal_public_key');
  61      $sendpublic_url = Util::addParameter($selfURL, 'actionID', 'send_public_key');
  62      $unload_url = Util::addParameter($selfURL, 'actionID', 'unset_passphrase');
  63      $viewprivate_url = Util::addParameter($selfURL, 'actionID', 'view_personal_private_key');
  64      $infoprivate_url = Util::addParameter($selfURL, 'actionID', 'info_personal_private_key');
  65  ?>
  66  
  67  <table>
  68    <tr>
  69      <td><?php echo _("Your Public Key") ?>:</td>
  70      <td>&nbsp;&nbsp;[<?php echo Horde::link($viewpublic_url, _("View Personal Public Key"), null, 'view_key') . _("View") ?></a>]&nbsp;[<?php echo Horde::link($infopublic_url, _("Information on Personal Public Key"), null, 'info_key') . _("Details") ?></a>]&nbsp;[<?php echo Horde::link($sendpublic_url, _("Send Key to Public Keyserver")) . _("Send Key to Public Keyserver") ?></a>]</td>
  71      <td><?php echo Help::link('imp', 'pgp-personalkey-public') ?></td>
  72    </tr>
  73    <tr>
  74      <td><?php echo _("Your Private Key") ?>:</td>
  75      <td>&nbsp;&nbsp;[<?php echo (empty($passphrase)) ? Horde::link('#', _("Enter Passphrase"), null, null, htmlspecialchars($openpgpwin) . ' return false;') . _("Enter Passphrase") : Horde::link($unload_url, _("Unload Passphrase")) . _("Unload Passphrase") ?></a>]&nbsp;[<?php echo Horde::link($viewprivate_url, _("View Personal Private Key"), null, 'view_key') . _("View") ?></a>]&nbsp;[<?php echo Horde::link($infoprivate_url, _("Information on Personal Private Key"), null, 'info_key') . _("Details") ?></a>]</td>
  76      <td><?php echo Help::link('imp', 'pgp-personalkey-private') ?></td>
  77    </tr>
  78  </table>
  79  </div>
  80  
  81  <br class="spacer" />
  82  <div class="nowrap">
  83    <input type="submit" name="delete" class="button" onclick="if (confirm('<?php echo addslashes(_("Are you sure you want to delete your keypair? (This is NOT recommended!)")) ?>')) { document.prefs.actionID.value='delete_key'; return true; } else { return false; }" value="<?php echo _("Delete Current Keys") ?>" />
  84    <?php echo Help::link('imp', 'pgp-personalkey-delete') ?>
  85  </div>
  86  
  87  <?php else: ?>
  88  
  89  <?php
  90  require_once 'Horde/Identity.php';
  91  $imp_identity = &Identity::singleton(array('imp', 'imp'));
  92  $personal_import_url = Util::addParameter($selfURL, 'actionID', 'import_personal_public_key');
  93  ?>
  94  <table>
  95    <tr>
  96      <td><?php echo _("Your Name") ?>:</td>
  97      <td>&nbsp;&nbsp;<input type="text" name="generate_realname" size="30" maxlength="60" class="fixed" value="<?php echo $imp_identity->getFullname(); ?>"/></td>
  98      <td><?php echo Help::link('imp', 'pgp-personalkey-create-name') ?></td>
  99    </tr>
 100    <tr>
 101      <td><?php echo _("Comment") ?>:</td>
 102      <td>&nbsp;&nbsp;<input type="text" name="generate_comment" size="30" maxlength="60" class="fixed" /></td>
 103      <td><?php echo Help::link('imp', 'pgp-personalkey-create-comment') ?></td>
 104    </tr>
 105    <tr>
 106      <td><?php echo _("E-mail Address") ?>:</td>
 107      <td>&nbsp;&nbsp;<input type="text" name="generate_email" size="30" maxlength="60" class="fixed" value="<?php echo $imp_identity->getFromAddress(); ?>"/></td>
 108      <td><?php echo Help::link('imp', 'pgp-personalkey-create-email') ?></td>
 109    </tr>
 110    <tr>
 111      <td><?php echo _("Key Length") ?>:</td>
 112      <td>&nbsp;
 113        <select name="generate_keylength">
 114          <option value="1024">1024</option>
 115          <option value="2048">2048</option>
 116        </select>
 117      </td>
 118      <td><?php echo Help::link('imp', 'pgp-personalkey-create-keylength') ?></td>
 119    </tr>
 120    <tr>
 121      <td><?php echo _("Passphrase") ?>:</td>
 122      <td>&nbsp;&nbsp;<input type="password" name="generate_passphrase1" size="30" maxlength="60" class="fixed" /></td>
 123      <td><?php echo Help::link('imp', 'pgp-personalkey-create-passphrase') ?></td>
 124    </tr>
 125    <tr>
 126      <td><?php echo _("Passphrase (Again)") ?>:</td>
 127      <td>&nbsp;&nbsp;<input type="password" name="generate_passphrase2" size="30" maxlength="60" class="fixed" /></td>
 128      <td>&nbsp;</td>
 129    </tr>
 130  </table>
 131  </div>
 132  
 133  <br class="spacer" />
 134  <div class="nowrap">
 135    <input type="submit" name="save" class="button" onclick="if (confirm('<?php echo addslashes(_("Key generation may take a long time to complete.  Continue with key generation?")) ?>')) { document.prefs.actionID.value='generate_key';return true; } else { return false; }" value="<?php echo _("Create Keys") ?>" />
 136    <?php if ($imp['file_upload']): ?>
 137    <input type="submit" name="save" class="button" onclick="popup_imp('<?php echo $personal_import_url ?>',750,275);return false;" value="<?php echo _("Import Keypair") ?>" />
 138    <?php endif; ?>
 139    <?php echo Help::link('imp', 'pgp-personalkey-create-actions') ?>
 140  </div>
 141  
 142  <?php endif; ?>
 143  
 144  <br class="spacer" />
 145  <div class="nowrap">
 146    <input type="submit" name="save" class="button" onclick="document.prefs.actionID.value='save_options';return true;" value="<?php echo _("Save Options") ?>" />
 147    <input type="button" name="back" class="button" onclick="document.location.href='<?php echo IMP::prefsURL(true) ?>'" value="<?php echo _("Return to Options") ?>" />
 148  </div>
 149  
 150  </form>


Généré le : Thu Nov 29 12:30:07 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics