bug 782: added format for XHTML, typo fixing
authorINOPIAE <inopiae@cacert.org>
Tue, 14 May 2013 22:20:08 +0000 (00:20 +0200)
committerINOPIAE <inopiae@cacert.org>
Tue, 14 May 2013 22:20:08 +0000 (00:20 +0200)
13 files changed:
includes/account.php
pages/account/10.php
pages/account/12.php
pages/account/16.php
pages/account/18.php
pages/account/20.php
pages/account/22.php
pages/account/3.php
pages/account/5.php
pages/account/8.php
pages/gpg/0.php
pages/gpg/2.php
www/gpg.php

index a53cdc7..01edb4b 100644 (file)
                        $csr = clean_csr($_REQUEST['optionalCSR']);
                }
                if(trim($_REQUEST['description']) != ""){
-       $_SESSION['_config']['description']= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
-    }else{
-       $_SESSION['_config']['description']= "";
-    }
+                       $_SESSION['_config']['description']= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
+               }else{
+                       $_SESSION['_config']['description']= "";
+               }
        }
 
        if($oldid == 4)
 
        if($oldid == 12 && array_key_exists('change',$_REQUEST) && $_REQUEST['change'] != "")
        {
-       showheader(_("My CAcert.org Account!"));
-       foreach($_REQUEST as $id => $val)
-       {
-               if(substr($id,0,14)=="check_comment_")
+               showheader(_("My CAcert.org Account!"));
+               foreach($_REQUEST as $id => $val)
                {
-                       $cid = intval(substr($id,14));
-                       if(!empty($_REQUEST['check_comment_'.$cid])) {
-                               $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
-                               mysql_query("update `domaincerts` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
+                       if(substr($id,0,14)=="check_comment_")
+                       {
+                               $cid = intval(substr($id,14));
+                               if(!empty($_REQUEST['check_comment_'.$cid])) {
+                                       $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
+                                       mysql_query("update `domaincerts` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
+                               }
                        }
                }
-       }
-       echo(_("Certificate settings have been changed.")."<br/>\n");
-       showfooter();
-       exit;
+               echo(_("Certificate settings have been changed.")."<br/>\n");
+               showfooter();
+               exit;
        }
 
 
        if($oldid == 6  && $_REQUEST['certid'] != "")
        {
                if(trim($_REQUEST['description']) != ""){
-       $description= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
-    }else{
-       $description= "";
-    }
+                       $description= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
+               }else{
+                       $description= "";
+       }
 
-               if(trim($_REQUEST['disablelogin']) == "1"){
-       $disablelogin = 1;
-    }else{
-       $disablelogin = 0;
-    }
+       if(trim($_REQUEST['disablelogin']) == "1"){
+               $disablelogin = 1;
+       }else{
+               $disablelogin = 0;
+       }
 
-      mysql_query("update `emailcerts` set `disablelogin`='$disablelogin', `description`='description' where `id`='".$_REQUEST['certid']."' and `memid`='".$_SESSION['profile']['id']."'");
+       mysql_query("update `emailcerts` set `disablelogin`='$disablelogin', `description`='description' where `id`='".$_REQUEST['certid']."' and `memid`='".$_SESSION['profile']['id']."'");
 
  }
        if($oldid == 13 && $process != "")
                if($_SESSION['_config']['rootcert'] < 1 || $_SESSION['_config']['rootcert'] > 2)
                        $_SESSION['_config']['rootcert'] = 1;
 
-    if(trim($_REQUEST['description']) != ""){
-        $_SESSION['_config']['description']= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
-    }else{
-        $_SESSION['_config']['description']= "";
-    }
+               if(trim($_REQUEST['description']) != ""){
+                       $_SESSION['_config']['description']= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
+               }else{
+                       $_SESSION['_config']['description']= "";
+               }
 
                if(@count($_SESSION['_config']['emails']) > 0)
                        $id = 17;
 
        if($oldid == 18 && array_key_exists('change',$_REQUEST) && $_REQUEST['change'] != "")
        {
-       showheader(_("My CAcert.org Account!"));
-       foreach($_REQUEST as $id => $val)
-       {
-               if(substr($id,0,14)=="check_comment_")
+               showheader(_("My CAcert.org Account!"));
+               foreach($_REQUEST as $id => $val)
                {
-                       $cid = intval(substr($id,14));
-                       if(!empty($_REQUEST['check_comment_'.$cid])) {
-                               $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
-                               mysql_query("update `orgemailcerts` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
+                       if(substr($id,0,14)=="check_comment_")
+                       {
+                               $cid = intval(substr($id,14));
+                               if(!empty($_REQUEST['check_comment_'.$cid])) {
+                                       $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
+                                       mysql_query("update `orgemailcerts` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
+                               }
                        }
                }
-       }
-       echo(_("Certificate settings have been changed.")."<br/>\n");
-       showfooter();
-       exit;
+               echo(_("Certificate settings have been changed.")."<br/>\n");
+               showfooter();
+               exit;
        }
 
 
                }
 
                if(trim($_REQUEST['description']) != ""){
-       $_SESSION['_config']['description']= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
-    }else{
-       $_SESSION['_config']['description']= "";
-    }
+                       $_SESSION['_config']['description']= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
+               }else{
+                       $_SESSION['_config']['description']= "";
+               }
 
                $_SESSION['_config']['tmpfname'] = tempnam("/tmp", "id20CSR");
                $fp = fopen($_SESSION['_config']['tmpfname'], "w");
 
        if($oldid == 22 && array_key_exists('change',$_REQUEST) && $_REQUEST['change'] != "")
        {
-       showheader(_("My CAcert.org Account!"));
-       foreach($_REQUEST as $id => $val)
-       {
-               if(substr($id,0,14)=="check_comment_")
+               showheader(_("My CAcert.org Account!"));
+               foreach($_REQUEST as $id => $val)
                {
-                       $cid = intval(substr($id,14));
-                       if(!empty($_REQUEST['check_comment_'.$cid])) {
-                               $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
-                               mysql_query("update `orgdomaincerts` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
+                       if(substr($id,0,14)=="check_comment_")
+                       {
+                               $cid = intval(substr($id,14));
+                               if(!empty($_REQUEST['check_comment_'.$cid])) {
+                                       $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
+                                       mysql_query("update `orgdomaincerts` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
+                               }
                        }
                }
-       }
-       echo(_("Certificate settings have been changed.")."<br/>\n");
-       showfooter();
-       exit;
+               echo(_("Certificate settings have been changed.")."<br/>\n");
+               showfooter();
+               exit;
        }
 
 
index f5527ab..848077a 100644 (file)
 
 <form method="post" action="account.php">
 <? if($_SESSION['profile']['points'] >= 50) { ?>
-<input type="radio" name="rootcert" value="1"> <?=_("Sign by class 1 root certificate")?><br>
-<input type="radio" name="rootcert" value="2" checked> <?=_("Sign by class 3 root certificate")?><br>
+<input type="radio" name="rootcert" value="1"/> <?=_("Sign by class 1 root certificate")?><br />
+<input type="radio" name="rootcert" value="2" checked/> <?=_("Sign by class 3 root certificate")?><br />
 <p><?=_("Please note: The class 3 root certificate needs to be setup in your webserver as a chained certificate, while slightly more complicated to setup, this root certificate is more likely to be trusted by more people.")?></p>
 <? } ?>
-<p> <?=_("Optional comment, only used in the certifictate overview")?><br>
-       <input type="text" name="description" maxlength="80" size=80></p>
+<p><?=_("Optional comment, only used in the certifictate overview")?><br>
+       <input type="text" name="description" maxlength="80" size=80/></p>
 <p><?=_("Paste your CSR(Certificate Signing Request) below...")?></p>
 <textarea name="CSR" cols="80" rows="15"></textarea><br>
-<input type="submit" name="process" value="<?=_("Submit")?>">
-<input type="hidden" name="oldid" value="<?=$id?>">
+<input type="submit" name="process" value="<?=_("Submit")?>"/>
+<input type="hidden" name="oldid" value="<?=$id?>"/>
 </form>
index 44c5739..ffd4ae8 100644 (file)
@@ -69,9 +69,9 @@
 ?>
   <tr>
 <? if($verified != _("Pending") && $verified != _("Revoked")) { ?>
-    <td class="DataTD"><input type="checkbox" name="revokeid[]" value="<?=$row['id']?>"></td>
+    <td class="DataTD"><input type="checkbox" name="revokeid[]" value="<?=$row['id']?>"/></td>
 <? } else if($verified != _("Revoked")) { ?>
-    <td class="DataTD"><input type="checkbox" name="delid[]" value="<?=$row['id']?>"></td>
+    <td class="DataTD"><input type="checkbox" name="delid[]" value="<?=$row['id']?>"/></td>
 <? } else { ?>
     <td class="DataTD">&nbsp;</td>
 <? } ?>
 <? } ?>
   <tr>
     <td class="DataTD" colspan="8">
-      <?=_("* Comment is NOT included in the certificate as it is inteded for your personal reference only. To change the comment go to the certificate view with hitting email address.")?>
+      <?=_("* Comment is NOT included in the certificate as it is intended for your personal reference only. To change the comment go to the certificate view with hitting email address.")?>
     </td>
   </tr>
   <tr>
-    <td class="DataTD" colspan="6"><input type="submit" name="renew" value="<?=_("Renew")?>">&#160;&#160;&#160;&#160;
+    <td class="DataTD" colspan="6"><input type="submit" name="renew" value="<?=_("Renew")?>"/>&#160;&#160;&#160;&#160;
            <input type="submit" name="revoke" value="<?=_("Revoke/Delete")?>"></td>
-       <td class="DataTD" colspan="2"><input type="submit" name="change" value="<?=_("Change settings")?>"> </td>
+       <td class="DataTD" colspan="2"><input type="submit" name="change" value="<?=_("Change settings")?>"/> </td>
   </tr>
 <? } ?>
 </table>
-<input type="hidden" name="oldid" value="<?=$id?>">
-<input type="hidden" name="csrf" value="<?=make_csrf('srvcerchange')?>" />
+<input type="hidden" name="oldid" value="<?=$id?>"/>
+<input type="hidden" name="csrf" value="<?=make_csrf('srvcerchange')?>"/>
 </form>
 <p><?=_("From here you can delete pending requests, or revoke valid certificates.")?></p>
index 338878d..6f055d7 100644 (file)
        foreach($_SESSION['_config']['emails'] as $val) { ?>
   <tr>
     <td class="DataTD"><?=_("Email")?>:</td>
-    <td class="DataTD"><input type="text" name="emails[]" value="<?=$val?>"></td>
+    <td class="DataTD"><input type="text" name="emails[]" value="<?=$val?>"/></td>
   </tr>
 <? } ?>
   <tr>
     <td class="DataTD"><?=_("Email")?>:</td>
-    <td class="DataTD"><input type="text" name="emails[]"></td>
+    <td class="DataTD"><input type="text" name="emails[]"/></td>
   </tr>
   <tr>
     <td class="DataTD"><?=_("Name")?>:</td>
-    <td class="DataTD"><input type="text" name="name" value="<?=array_key_exists('name',$_SESSION['_config'])?($_SESSION['_config']['name']):''?>"></td>
+    <td class="DataTD"><input type="text" name="name" value="<?=array_key_exists('name',$_SESSION['_config'])?($_SESSION['_config']['name']):''?>"/></td>
   </tr>
   <tr>
     <td class="DataTD"><?=_("Department")?>:</td>
-    <td class="DataTD"><input type="text" name="OU" value="<?=array_key_exists('OU',$_SESSION['_config'])?($_SESSION['_config']['OU']):''?>"></td>
+    <td class="DataTD"><input type="text" name="OU" value="<?=array_key_exists('OU',$_SESSION['_config'])?($_SESSION['_config']['OU']):''?>"/></td>
   </tr>
   <tr>
     <td class="DataTD" colspan="2" align="left">
-        <input type="radio" name="rootcert" value="1" checked> <?=_("Sign by class 1 root certificate")?><br>
-        <input type="radio" name="rootcert" value="2"> <?=_("Sign by class 3 root certificate")?><br>
+        <input type="radio" name="rootcert" value="1" checked /> <?=_("Sign by class 1 root certificate")?><br />
+        <input type="radio" name="rootcert" value="2" /> <?=_("Sign by class 3 root certificate")?><br />
         <?=str_replace("\n", "<br>\n", wordwrap(_("Please note: The class 3 root certificate needs to be imported into your email program as well as the class 1 root certificate so your email program can build a full trust path chain. Until we are included in browsers this might not be a desirable option for most people"), 60))?>
     </td>
   </tr>
 <? } ?>
    <tr>
    <td class="DataTD" colspan="2" align="left">
-      <?=_("Optional comment, only used in the certifictate overview")?><br>
-       <input type="text" name="description" maxlength="80" size=80>
+      <?=_("Optional comment, only used in the certifictate overview")?><br />
+       <input type="text" name="description" maxlength="80" size=80 />
    </td>
   </tr>
   <tr>
     <td class="DataTD" colspan="2"><input type="submit" name="add_email" value="<?=_("Another Email")?>">
-                       <input type="submit" name="process" value="<?=_("Next")?>"></td>
+                       <input type="submit" name="process" value="<?=_("Next")?>" /></td>
   </tr>
 </table>
 <input type="hidden" name="oldid" value="<?=$id?>">
index e736977..2267689 100644 (file)
@@ -91,7 +91,7 @@
 <? } ?>
   <tr>
     <td class="DataTD" colspan="8">
-      <?=_("* Comment is NOT included in the certificate as it is inteded for your personal reference only. To change the comment go to the certificate view with hitting email address.")?>
+      <?=_("* Comment is NOT included in the certificate as it is intended for your personal reference only. To change the comment go to the certificate view with hitting email address.")?>
     </td>
   </tr>
   <tr>
index 5e91e77..0187013 100644 (file)
 <p><?=_("If the Subscriber's name and/or domain name registration change the subscriber will immediately inform CAcert Inc. who shall revoke the digital certificate. When the Digital Certificate expires or is revoked the company will permanently remove the certificate from the server on which it is installed and will not use it for any purpose thereafter. The person responsible for key management and security is fully authorized to install and utilize the certificate to represent this organization's electronic presence.")?></p>
 
 <form method="post" action="account.php">
-<input type="radio" name="rootcert" value="1"> <?=_("Sign by class 1 root certificate")?><br>
-<input type="radio" name="rootcert" value="2" checked> <?=_("Sign by class 3 root certificate")?><br>
-<p> <?=_("Optional comment, only used in the certifictate overview")?><br>
-       <input type="text" name="description" maxlength="80" size=80></p>
+<input type="radio" name="rootcert" value="1" /> <?=_("Sign by class 1 root certificate")?><br />
+<input type="radio" name="rootcert" value="2" checked /> <?=_("Sign by class 3 root certificate")?><br />
+<p> <?=_("Optional comment, only used in the certifictate overview")?><br />
+       <input type="text" name="description" maxlength="80" size=80 /></p>
 <p><?=_("Please note: The class 3 root certificate needs to be setup in your webserver as a chained certificate, while slightly more complicated to setup, this root certificate is more likely to be trusted by more people.")?></p>
 <p><?=_("Paste your CSR below...")?></p>
-<textarea name="CSR" cols="80" rows="15"></textarea><br> 
-<input type="submit" name="process" value="<?=_("Submit")?>">
-<input type="hidden" name="oldid" value="<?=$id?>">
-</form>
+<textarea name="CSR" cols="80" rows="15"></textarea><br />
+<input type="submit" name="process" value="<?=_("Submit")?>" />
+<input type="hidden" name="oldid" value="<?=$id?>" />
+</form>
\ No newline at end of file
index 5d53582..f5ba920 100644 (file)
 <? } ?>
   <tr>
     <td class="DataTD" colspan="8">
-      <?=_("* Comment is NOT included in the certificate as it is inteded for your personal reference only. To change the comment go to the certificate view with hitting email address.")?>
+      <?=_("* Comment is NOT included in the certificate as it is intended for your personal reference only. To change the comment go to the certificate view with hitting email address.")?>
     </td>
   </tr>
   <tr>
-    <td class="DataTD" colspan="6"><input type="submit" name="renew" value="<?=_("Renew")?>">&#160;&#160;&#160;&#160;
-           <input type="submit" name="revoke" value="<?=_("Revoke/Delete")?>"></td>
-    <td class="DataTD" colspan="2"><input type="submit" name="change" value="<?=_("Change settings")?>"> </td>
+    <td class="DataTD" colspan="6"><input type="submit" name="renew" value="<?=_("Renew")?>" />&#160;&#160;&#160;&#160;
+           <input type="submit" name="revoke" value="<?=_("Revoke/Delete")?>" /></td>
+    <td class="DataTD" colspan="2"><input type="submit" name="change" value="<?=_("Change settings")?>" /> </td>
   </tr>
 <? } ?>
 </table>
-<input type="hidden" name="oldid" value="<?=$id?>">
+<input type="hidden" name="oldid" value="<?=$id?>" />
 <input type="hidden" name="csrf" value="<?=make_csrf('orgsrvcerchange')?>" />
 </form>
 <p><?=_("From here you can delete pending requests, or revoke valid certificates.")?></p>
index b92f4fa..c2165c2 100644 (file)
@@ -53,25 +53,25 @@ if($_SESSION['profile']['points'] >= 50)
        $suffix = $_SESSION['profile']['suffix'];
 ?>
     <td class="DataTD" colspan="2" align="left">
-      <input type="radio" name="rootcert" value="1" checked> <?=_("Sign by class 1 root certificate")?><br>
-      <input type="radio" name="rootcert" value="2"> <?=_("Sign by class 3 root certificate")?><br>
-      <?=str_replace("\n", "<br>\n", wordwrap(_("Please note: The class 3 root certificate needs to be imported into your email program as well as the class 1 root certificate so your email program can build a full trust path chain. Until we are included in browsers this might not be a desirable option for most people"), 125))?>
+      <input type="radio" name="rootcert" value="1" checked /> <?=_("Sign by class 1 root certificate")?><br />
+      <input type="radio" name="rootcert" value="2" /> <?=_("Sign by class 3 root certificate")?><br />
+      <?=str_replace("\n", "<br />\n", wordwrap(_("Please note: The class 3 root certificate needs to be imported into your email program as well as the class 1 root certificate so your email program can build a full trust path chain. Until we are included in browsers this might not be a desirable option for most people"), 125))?>
     </td>
   </tr>
   <tr>
     <td class="DataTD" colspan="2" align="left">
-      <input type="radio" name="incname" value="0" checked> <?=_("No Name")?><br>
-      <? if($fname && $lname) { ?><input type="radio" name="incname" value="1"> <?=_("Include")?> '<?=$fname." ".$lname?>'<br><? } ?>
-      <? if($fname && $mname && $lname) { ?><input type="radio" name="incname" value="2"> <?=_("Include")?> '<?=$fname." ".$mname." ".$lname?>'<br><? } ?>
-      <? if($fname && $lname && $suffix) { ?><input type="radio" name="incname" value="3"> <?=_("Include")?> '<?=$fname." ".$lname." ".$suffix?>'<br><? } ?>
-      <? if($fname && $mname && $lname && $suffix) { ?><input type="radio" name="incname" value="4"> <?=_("Include")?> '<?=$fname." ".$mname." ".$lname." ".$suffix?>'<br><? } ?>
+      <input type="radio" name="incname" value="0" checked /> <?=_("No Name")?><br />
+      <? if($fname && $lname) { ?><input type="radio" name="incname" value="1" /> <?=_("Include")?> '<?=$fname." ".$lname?>'<br /><? } ?>
+      <? if($fname && $mname && $lname) { ?><input type="radio" name="incname" value="2" /> <?=_("Include")?> '<?=$fname." ".$mname." ".$lname?>'<br /><? } ?>
+      <? if($fname && $lname && $suffix) { ?><input type="radio" name="incname" value="3" /> <?=_("Include")?> '<?=$fname." ".$lname." ".$suffix?>'<br /><? } ?>
+      <? if($fname && $mname && $lname && $suffix) { ?><input type="radio" name="incname" value="4" /> <?=_("Include")?> '<?=$fname." ".$mname." ".$lname." ".$suffix?>'<br /><? } ?>
     </td>
   </tr>
 <? } ?>
 <? if($_SESSION['profile']['points'] >= 100 && $_SESSION['profile']['codesign'] > 0) { ?>
   <tr>
     <td class="DataTD" align="left">
-      <input type="checkbox" name="codesign" value="1"> <?=_("Code Signing")?></td>
+      <input type="checkbox" name="codesign" value="1" /> <?=_("Code Signing")?></td>
     <td class="DataTD" align="left">
       <?=_("Please Note: By ticking this box you will automatically have your name included in any certificates.")?>
     </td>
@@ -80,14 +80,14 @@ if($_SESSION['profile']['points'] >= 50)
 
   <tr>
     <td class="DataTD" colspan="2" align="left">
-      <input type="checkbox" name="login" value="1" checked="checked"> <?=_("Enable certificate login with this certificate")?><br>
+      <input type="checkbox" name="login" value="1" checked="checked" /> <?=_("Enable certificate login with this certificate")?><br />
       <?=_("By allowing certificate login, this certificate can be used to login into this account at https://secure.cacert.org/ .")?><br/>
     </td>
   </tr>
   <tr>
    <td class="DataTD" colspan="2" align="left">
-      <?=_("Optional comment, only used in the certifictate overview max. 100 characters")?><br>
-       <input type="text" name="description" maxlength="100" size="100">
+      <?=_("Optional comment, only used in the certifictate overview max. 100 characters")?><br />
+       <input type="text" name="description" maxlength="100" size="100" />
    </td>
   </tr>
 
@@ -99,8 +99,8 @@ if($_SESSION['profile']['points'] >= 50)
 
   <tr name="expert">
     <td class="DataTD" colspan="2" align="left">
-       <input type="radio" name="SSO" value="0" checked> <?=_("No Single Sign On ID")?><br>
-       <input type="radio" name="SSO" value="1"> <?=_("Add Single Sign On ID Information")?><br>
+       <input type="radio" name="SSO" value="0" checked /> <?=_("No Single Sign On ID")?><br />
+       <input type="radio" name="SSO" value="1" /> <?=_("Add Single Sign On ID Information")?><br />
        <?=str_replace("\n", "<br>\n", wordwrap(_("By adding Single Sign On (SSO) ID information to your certificates this could be used to track you, you can also issue certificates with no email addresses that are useful only for Authentication. Please see a more detailed description on our WIKI about it."), 125))?>
        <a href="http://wiki.cacert.org/wiki/SSO"><?=_("SSO WIKI Entry")?></a>
     </td>
@@ -114,10 +114,10 @@ if($_SESSION['profile']['points'] >= 50)
     <td class="DataTD" colspan="2"><textarea name="optionalCSR" cols="80" rows="5"></textarea></td>
  </tr>
  <tr>
-    <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Next")?>"></td>
+    <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Next")?>" /></td>
   </tr>
 </table>
-<input type="hidden" name="oldid" value="<?=$id?>">
+<input type="hidden" name="oldid" value="<?=$id?>" />
 </form>
 
 <script language="javascript">
index 515d33f..22b581f 100644 (file)
 
   <tr>
     <td class="DataTD" colspan="9">
-      <?=_("* Comment is NOT included in the certificate as it is inteded for your personal reference only. To change the comment go to the certificate view with hitting email address.")?>
+      <?=_("* Comment is NOT included in the certificate as it is intended for your personal reference only. To change the comment go to the certificate view with hitting email address.")?>
     </td>
   </tr>
 
   <tr>
-    <td class="DataTD" colspan="5"><input type="submit" name="renew" value="<?=_("Renew")?>">&#160;&#160;&#160;&#160;
-                       <input type="submit" name="revoke" value="<?=_("Revoke/Delete")?>"></td>
+    <td class="DataTD" colspan="5"><input type="submit" name="renew" value="<?=_("Renew")?>" />&#160;&#160;&#160;&#160;
+                       <input type="submit" name="revoke" value="<?=_("Revoke/Delete")?>" /></td>
 
-    <td class="DataTD" colspan="4"><input type="submit" name="change" value="<?=_("Change settings")?>"> </td>
+    <td class="DataTD" colspan="4"><input type="submit" name="change" value="<?=_("Change settings")?>" /> </td>
 
   </tr>
 <? } ?>
 </table>
-<input type="hidden" name="oldid" value="<?=$id?>">
+<input type="hidden" name="oldid" value="<?=$id?>" />
 <input type="hidden" name="csrf" value="<?=make_csrf('clicerchange')?>" />
 </form>
 <p><?=_("From here you can delete pending requests, or revoke valid certificates.")?></p>
index 6b3de01..79448d1 100644 (file)
@@ -25,7 +25,7 @@
   if(is_array($_SESSION['_config']['addy']))
        foreach($_SESSION['_config']['addy'] as $add) { ?>
   <tr>
-    <td class="DataTD" width="75"><input type="radio" name="authaddy" value="<?=$add?>"<? if($tagged == 0) { echo " checked=\"checked\""; $tagged = 1; } ?>></td>
+    <td class="DataTD" width="75"><input type="radio" name="authaddy" value="<?=$add?>"<? if($tagged == 0) { echo " checked=\"checked\""; $tagged = 1; } ?> /></td>
     <td class="DataTD" width="175"><?=$add?></td>
   </tr>
 <? } ?>
@@ -34,5 +34,5 @@
   </tr>
 </table>
 <input type="hidden" name="csrf" value="<?=make_csrf('ctcinfo')?>" />
-<input type="hidden" name="oldid" value="<?=$id?>">
+<input type="hidden" name="oldid" value="<?=$id?>" />
 </form>
index 319c2f9..7c7a37b 100644 (file)
@@ -19,9 +19,9 @@
 ?>
 <p><?=_("Paste your own public OpenPGP key below. It should not contain a picture. CAcert will sign your key after submission.")?></p>
 <form method="post" action="gpg.php">
-<p> <?=_("Optional comment, only used in the certifictate overview")?><br>
-       <input type="text" name="description" maxlength="80" size=80></p>
-<textarea name="CSR" cols="80" rows="15"><?=array_key_exists('CSR',$_POST)?strip_tags($_POST['CSR']):""?></textarea><br>
-<input type="submit" name="process" value="<?=_("Submit")?>">
-<input type="hidden" name="oldid" value="<?=$id?>">
+<p><?=_("Optional comment, only used in the certifictate overview")?><br />
+       <input type="text" name="description" maxlength="80" size=80 /></p>
+<textarea name="CSR" cols="80" rows="15"><?=array_key_exists('CSR',$_POST)?strip_tags($_POST['CSR']):""?></textarea><br />
+<input type="submit" name="process" value="<?=_("Submit")?>" />
+<input type="hidden" name="oldid" value="<?=$id?>" />
 </form>
index 1773dfa..087b5fe 100644 (file)
 <? } ?>
   <tr>
     <td class="DataTD" colspan="6">
-      <?=_("* Comment is NOT included in the certificate as it is inteded for your personal reference only. To change the comment go to the certificate view with hitting email address.")?>
+      <?=_("* Comment is NOT included in the certificate as it is intended for your personal reference only. To change the comment go to the certificate view with hitting email address.")?>
     </td>
   </tr>
   <tr>
-    <td class="DataTD" colspan="6"><input type="submit" name="change" value="<?=_("Change settings")?>"> </td>
+    <td class="DataTD" colspan="6"><input type="submit" name="change" value="<?=_("Change settings")?>" /> </td>
   </tr>
 </table>
-<input type="hidden" name="oldid" value="<?=$id?>">
+<input type="hidden" name="oldid" value="<?=$id?>" />
 </form>
index 132e522..9356aea 100644 (file)
@@ -250,10 +250,10 @@ function verifyEmail($email)
                        if($emailok) $multiple++;
 
                        if(trim($_REQUEST['description']) == ""){
-       $description= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
-      }else{
-       $description= "";
-      }
+                               $description= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
+                       }else{
+                               $description= "";
+                       }
                }
                $resulttable.="</table>";
 
@@ -341,7 +341,7 @@ function verifyEmail($email)
                                }
 
                                $mail="";
-                               if (preg_match("/<([\w.-]*\@[\w.-]*)>/", $bits[9],$match)) {
+                               if (preg_match("/<([\w.-]*\@[\w.-]*)>/", $bits[9],$match)) {
                                        //echo "Found: ".$match[1];
                                        $mail = trim(hex2bin($match[1]));
                                }
@@ -391,82 +391,76 @@ function verifyEmail($email)
                        }
                }
 
+               if(count($ToBeDeleted)>0)
+               {
+                       $descriptorspec = array(
+                               0 => array("pipe", "r"),  // stdin is a pipe that the child will read from
+                               1 => array("pipe", "w"),  // stdout is a pipe that the child will write to
+                               2 => array("pipe", "w") // stderr is a file to write to
+                       );
 
+                       $stderr = fopen('php://stderr', 'w');
 
+                       //echo "Keyid: $keyid\n";
 
-        if(count($ToBeDeleted)>0)
-       {
+                       $process = proc_open("/usr/bin/gpg --homedir $cwd --no-tty --command-fd 0 --status-fd 1 --logger-fd 2 --edit-key $keyid", $descriptorspec, $pipes);
 
+                       //echo "Process: $process\n";
+                       //fputs($stderr,"Process: $process\n");
+
+                       if (is_resource($process)) {
+                       //echo("it is a resource\n");
+                       // $pipes now looks like this:
+                       // 0 => writeable handle connected to child stdin
+                       // 1 => readable handle connected to child stdout
+                       // Any error output will be appended to /tmp/error-output.txt
+                               while (!feof($pipes[1]))
+                               {
+                                       $buffer = fgets($pipes[1], 4096);
+                                       //echo $buffer;
 
-               $descriptorspec = array(
-                       0 => array("pipe", "r"),  // stdin is a pipe that the child will read from
-                       1 => array("pipe", "w"),  // stdout is a pipe that the child will write to
-                       2 => array("pipe", "w") // stderr is a file to write to
-               );
-
-               $stderr = fopen('php://stderr', 'w');
-
-
-               //echo "Keyid: $keyid\n";
-
-               $process = proc_open("/usr/bin/gpg --homedir $cwd --no-tty --command-fd 0 --status-fd 1 --logger-fd 2 --edit-key $keyid", $descriptorspec, $pipes);
-
-               //echo "Process: $process\n";
-               //fputs($stderr,"Process: $process\n");
-
-               if (is_resource($process)) {
-               //echo("it is a resource\n");
-               // $pipes now looks like this:
-               // 0 => writeable handle connected to child stdin
-               // 1 => readable handle connected to child stdout
-               // Any error output will be appended to /tmp/error-output.txt
-                       while (!feof($pipes[1]))
-                       {
-                               $buffer = fgets($pipes[1], 4096);
-                               //echo $buffer;
-
-      if($buffer == "[GNUPG:] GET_BOOL keyedit.sign_all.okay\n")
-      {
-        fputs($pipes[0],"yes\n");
-      }
-      elseif($buffer == "[GNUPG:] GOT_IT\n")
-      {
-      }
-      elseif(ereg("^\[GNUPG:\] GET_BOOL keyedit\.remove\.uid\.okay\s*",$buffer))
-      {
-        fputs($pipes[0],"yes\n");
-      }
-      elseif(ereg("^\[GNUPG:\] GET_LINE keyedit\.prompt\s*",$buffer))
-      {
-        if(count($ToBeDeleted)>0)
-        {
-         $delthisuid=array_pop($ToBeDeleted);
-         //echo "Deleting an UID $delthisuid\n";
-          fputs($pipes[0],"uid ".$delthisuid."\n");
-        }
-        else
-        {
-         //echo "Saving\n";
-          fputs($pipes[0],$state?"save\n":"deluid\n");
-          $state++;
-        }
-      }
-      elseif($buffer == "[GNUPG:] GOOD_PASSPHRASE\n")
-      {
-      }
-      elseif(ereg("^\[GNUPG:\] KEYEXPIRED ",$buffer))
-      {
-        echo "Key expired!\n";
-       exit;
-      }
-      elseif($buffer == "")
-      {
-        //echo "Empty!\n";
-      }
-      else
-      {
-        echo "ERROR: UNKNOWN $buffer\n";
-      }
+                       if($buffer == "[GNUPG:] GET_BOOL keyedit.sign_all.okay\n")
+                       {
+                               fputs($pipes[0],"yes\n");
+                       }
+                       elseif($buffer == "[GNUPG:] GOT_IT\n")
+                       {
+                       }
+                       elseif(ereg("^\[GNUPG:\] GET_BOOL keyedit\.remove\.uid\.okay\s*",$buffer))
+                       {
+                               fputs($pipes[0],"yes\n");
+                       }
+                       elseif(ereg("^\[GNUPG:\] GET_LINE keyedit\.prompt\s*",$buffer))
+                       {
+                               if(count($ToBeDeleted)>0)
+                               {
+                                       $delthisuid=array_pop($ToBeDeleted);
+                                       //echo "Deleting an UID $delthisuid\n";
+                                       fputs($pipes[0],"uid ".$delthisuid."\n");
+                               }
+                               else
+                               {
+                                       //echo "Saving\n";
+                                       fputs($pipes[0],$state?"save\n":"deluid\n");
+                                       $state++;
+                               }
+                       }
+                       elseif($buffer == "[GNUPG:] GOOD_PASSPHRASE\n")
+                       {
+                       }
+                       elseif(ereg("^\[GNUPG:\] KEYEXPIRED ",$buffer))
+                       {
+                               echo "Key expired!\n";
+                               exit;
+                       }
+                       elseif($buffer == "")
+                       {
+                               //echo "Empty!\n";
+                       }
+                       else
+                       {
+                               echo "ERROR: UNKNOWN $buffer\n";
+                       }
 
 
                        }
@@ -515,24 +509,24 @@ function verifyEmail($email)
                exit;
        }
 
-if($oldid == 2 && array_key_exists('change',$_REQUEST) && $_REQUEST['change'] != "")
-{
-       showheader(_("My CAcert.org Account!"));
-       foreach($_REQUEST as $id => $val)
+       if($oldid == 2 && array_key_exists('change',$_REQUEST) && $_REQUEST['change'] != "")
        {
-               if(substr($id,0,14)=="check_comment_")
+               showheader(_("My CAcert.org Account!"));
+               foreach($_REQUEST as $id => $val)
                {
-                       $cid = intval(substr($id,14));
-                       if(!empty($_REQUEST['check_comment_'.$cid])) {
-                               $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
-                               mysql_query("update `gpg` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
+                       if(substr($id,0,14)=="check_comment_")
+                       {
+                               $cid = intval(substr($id,14));
+                               if(!empty($_REQUEST['check_comment_'.$cid])) {
+                                       $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
+                                       mysql_query("update `gpg` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
+                               }
                        }
                }
+               echo(_("Certificate settings have been changed.")."<br/>\n");
+               showfooter();
+               exit;
        }
-       echo(_("Certificate settings have been changed.")."<br/>\n");
-       showfooter();
-       exit;
-}
 
        $id = intval($id);