summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2011-12-26 20:13:00 +0100
committerMichael Tänzer <neo@nhng.de>2011-12-26 20:13:00 +0100
commitab6709e038099a89e0f441b329ae68d5a415c666 (patch)
tree84c86816ec4ff5e7e6b937713f54e022366b50fb
parente9c8fd8bfe194b4d77cdf92b9a79452bad6198dd (diff)
parent751dc567419968b285e5fa0ab34171ac3dd950dc (diff)
downloadcacert-devel-ab6709e038099a89e0f441b329ae68d5a415c666.tar.gz
cacert-devel-ab6709e038099a89e0f441b329ae68d5a415c666.tar.xz
cacert-devel-ab6709e038099a89e0f441b329ae68d5a415c666.zip
Merge branch 'bug-957' into release
-rw-r--r--pages/account/24.php22
-rw-r--r--pages/account/27.php12
-rw-r--r--pages/account/32.php6
-rw-r--r--pages/account/33.php17
4 files changed, 37 insertions, 20 deletions
diff --git a/pages/account/24.php b/pages/account/24.php
index 19faa9f..7f56023 100644
--- a/pages/account/24.php
+++ b/pages/account/24.php
@@ -15,6 +15,16 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ ?>
+<?
+ // Reset session variables regarding Org's, present empty form
+ if (array_key_exists('O',$_SESSION['_config'])) $_SESSION['_config']['O'] = "";
+ if (array_key_exists('contact',$_SESSION['_config'])) $_SESSION['_config']['contact'] = "";
+ if (array_key_exists('L',$_SESSION['_config'])) $_SESSION['_config']['L'] = "";
+ if (array_key_exists('ST',$_SESSION['_config'])) $_SESSION['_config']['ST'] = "";
+ if (array_key_exists('C',$_SESSION['_config'])) $_SESSION['_config']['C'] = "";
+ if (array_key_exists('comments',$_SESSION['_config'])) $_SESSION['_config']['comments'] = "";
+
+?>
<form method="post" action="account.php">
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
<tr>
@@ -22,27 +32,27 @@
</tr>
<tr>
<td class="DataTD"><?=_("Organisation Name")?>:</td>
- <td class="DataTD"><input type="text" name="O" value="<?=array_key_exists('O',$_SESSION['_config'])?$_SESSION['_config']['O']:""?>" maxlength="50"></td>
+ <td class="DataTD"><input type="text" name="O" value="" maxlength="50" size="90"></td>
</tr>
<tr>
<td class="DataTD"><?=_("Contact Email")?>:</td>
- <td class="DataTD"><input type="text" name="contact" value="<?=array_key_exists('contact',$_SESSION['_config'])?$_SESSION['_config']['contact']:""?>"></td>
+ <td class="DataTD"><input type="text" name="contact" value="" size="90"></td>
</tr>
<tr>
<td class="DataTD"><?=_("Town/Suburb")?>:</td>
- <td class="DataTD"><input type="text" name="L" value="<?=array_key_exists('L',$_SESSION['_config'])?$_SESSION['_config']['L']:""?>"></td>
+ <td class="DataTD"><input type="text" name="L" value="" size="90"></td>
</tr>
<tr>
<td class="DataTD"><?=_("State/Province")?>:</td>
- <td class="DataTD"><input type="text" name="ST" value="<?=array_key_exists('ST',$_SESSION['_config'])?$_SESSION['_config']['ST']:""?>"></td>
+ <td class="DataTD"><input type="text" name="ST" value="" size="90"></td>
</tr>
<tr>
<td class="DataTD"><?=_("Country")?>:</td>
- <td class="DataTD"><input type="text" name="C" value="<?=array_key_exists('C',$_SESSION['_config'])?sanitizeHTML($_SESSION['_config']['C']):""?>" size="5">(2 letter <a href="http://www.iso.org/iso/english_country_names_and_code_elements">ISO code</a>)</td>
+ <td class="DataTD"><input type="text" name="C" value="" size="5">(2 letter <a href="http://www.iso.org/iso/english_country_names_and_code_elements">ISO code</a>)</td>
</tr>
<tr>
<td class="DataTD"><?=_("Comments")?>:</td>
- <td class="DataTD"><textarea name="comments" cols="35" rows="5"><?=array_key_exists('comments',$_SESSION['_config'])?$_SESSION['_config']['comments']:""?></textarea></td>
+ <td class="DataTD"><textarea name="comments" cols="60" rows="10"></textarea></td>
</tr>
<tr>
<td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Next")?>"></td>
diff --git a/pages/account/27.php b/pages/account/27.php
index 2cd52a8..9524620 100644
--- a/pages/account/27.php
+++ b/pages/account/27.php
@@ -25,27 +25,27 @@
</tr>
<tr>
<td class="DataTD"><?=_("Organisation Name")?>:</td>
- <td class="DataTD"><input type="text" name="O" value="<?=$row['O']?>"></td>
+ <td class="DataTD"><input type="text" name="O" value="<?=$row['O']?>" size="90"></td>
</tr>
<tr>
<td class="DataTD"><?=_("Contact Email")?>:</td>
- <td class="DataTD"><input type="text" name="contact" value="<?=($row['contact'])?>"></td>
+ <td class="DataTD"><input type="text" name="contact" value="<?=($row['contact'])?>" size="90"></td>
</tr>
<tr>
<td class="DataTD"><?=_("Town/Suburb")?>:</td>
- <td class="DataTD"><input type="text" name="L" value="<?=($row['L'])?>"></td>
+ <td class="DataTD"><input type="text" name="L" value="<?=($row['L'])?>" size="90"></td>
</tr>
<tr>
<td class="DataTD"><?=_("State/Province")?>:</td>
- <td class="DataTD"><input type="text" name="ST" value="<?=($row['ST'])?>"></td>
+ <td class="DataTD"><input type="text" name="ST" value="<?=($row['ST'])?>" size="90"></td>
</tr>
<tr>
<td class="DataTD"><?=_("Country")?>:</td>
- <td class="DataTD"><input type="text" name="C" value="<?=($row['C'])?>"></td>
+ <td class="DataTD"><input type="text" name="C" value="<?=($row['C'])?>" size="5"> (2 letter <a href="http://www.iso.org/iso/english_country_names_and_code_elements">ISO code</a>)</td>
</tr>
<tr>
<td class="DataTD"><?=_("Comments")?>:</td>
- <td class="DataTD"><textarea name="comments" cols=15 rows=5><?=($row['comments'])?></textarea></td>
+ <td class="DataTD"><textarea name="comments" cols=60 rows=10><?=($row['comments'])?></textarea></td>
</tr>
<tr>
<td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Update")?>"></td>
diff --git a/pages/account/32.php b/pages/account/32.php
index 00dc1ea..a05c927 100644
--- a/pages/account/32.php
+++ b/pages/account/32.php
@@ -38,10 +38,10 @@
$user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($row['memid'])."'"));
?>
<tr>
- <td class="DataTD"><a href='mailto:<?=$user['email']?>'><?=($user['fname'])?> <?=($user['lname'])?></a></td>
+ <td class="DataTD"><a href='mailto:<?=sanitizeHTML($user['email'])?>'><?=sanitizeHTML($user['fname'])?> <?=sanitizeHTML($user['lname'])?></a></td>
<td class="DataTD"><?=($row['masteracc'])?></a></td>
- <td class="DataTD"><?=($row['OU'])?></a></td>
- <td class="DataTD"><?=($row['comments'])?></a></td>
+ <td class="DataTD"><?=sanitizeHTML($row['OU'])?></a></td>
+ <td class="DataTD"><?=sanitizeHTML($row['comments'])?></a></td>
<? if($row['masteracc'] == 0 || $_SESSION['profile']['orgadmin'] == 1) { ?>
<td class="DataTD"><a href="account.php?id=34&amp;orgid=<?=$row['orgid']?>&amp;memid=<?=$row['memid']?>"><?=_("Delete")?></a></td>
<? } else { ?>
diff --git a/pages/account/33.php b/pages/account/33.php
index 4da8bed..376a8b9 100644
--- a/pages/account/33.php
+++ b/pages/account/33.php
@@ -18,6 +18,13 @@
<?
$query = "select * from `orginfo` where `id`='".intval($_REQUEST['orgid'])."'";
$row = mysql_fetch_assoc(mysql_query($query));
+
+ // Reset session variables regarding OrgAdmin's, present empty form
+ if (array_key_exists('email',$_SESSION['_config'])) $_SESSION['_config']['email']="";
+ if (array_key_exists('OU',$_SESSION['_config'])) $_SESSION['_config']['OU'] = "";
+ if (array_key_exists('masteracc',$_SESSION['_config'])) $_SESSION['_config']['masteracc'] = 0;
+ if (array_key_exists('comments',$_SESSION['_config'])) $_SESSION['_config']['comments'] = "";
+
?>
<form method="post" action="account.php">
<input type="hidden" name="orgid" value="<?=intval($_REQUEST['orgid'])?>">
@@ -27,24 +34,24 @@
</tr>
<tr>
<td class="DataTD"><?=_("Email")?>:</td>
- <td class="DataTD"><input type="text" name="email" value="<?=array_key_exists('email',$_SESSION['_config'])?sanitizeHTML($_SESSION['_config']['email']):""?>"></td>
+ <td class="DataTD"><input type="text" name="email" value=""></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=""></td>
</tr>
<? if($_SESSION['profile']['orgadmin'] == 1) { ?>
<tr>
<td class="DataTD"><?=_("Master Account")?>:</td>
<td class="DataTD"><select name="masteracc">
- <option value="0">No</option>
- <option value="1"<? if(array_key_exists('masteracc',$_SESSION['_config']) && $_SESSION['_config']['masteracc'] == 1) echo " selected='selected'"; ?>>Yes</option>
+ <option value="0">No</option> // make default option as of SA telco 2011-08-02 on bug 966
+ <option value="1">Yes</option>
</select></td>
</tr>
<? } ?>
<tr>
<td class="DataTD"><?=_("Comments")?>:</td>
- <td class="DataTD"><input type="text" name="comments" value="<?=array_key_exists('comments',$_SESSION['_config'])?$_SESSION['_config']['comments']:""?>"></td>
+ <td class="DataTD"><input type="text" name="comments" size=27 maxlength=20 value=""></td>
</tr>
<tr>
<td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Add")?>"></td>