+ $i = 1;
+ $name = 'form_for_' . $i;
+ global $$name;
+ while (isset($$name))
+ {
+ $name = 'delete_' . $i;
+ global $$name;
+ if (isset($$name)) {
+ return true;
+ }
+
+ $i ++;
+ $name = 'form_for_' . $i;
+ global $$name;
+ }
+ return false;
+ }
+
+ function CheckAndDoPromote() {
+ global $username, $data_dir, $full_name, $email_address, $reply_to;
+
+ $i = 1;
+ $name = 'form_for_' . $i;
+ global $$name;
+ while (isset($$name)) {
+ $name = 'promote_' . $i;
+ global $$name;
+ if (isset($$name) && $i > 1) {
+ do_hook('options_identities_renumber', $i, $i - 1);
+
+ $nameA = 'full_name' . $i;
+ $nameB = 'full_name' . ($i - 1);
+ global $$nameA, $$nameB;
+ $temp = $$nameA;
+ $$nameA = $$nameB;
+ $$nameB = $temp;
+
+ $nameA = 'email_address' . $i;
+ $nameB = 'email_address' . ($i - 1);
+ global $$nameA, $$nameB;
+ $temp = $$nameA;
+ $$nameA = $$nameB;
+ $$nameB = $temp;
+
+ $nameA = 'reply_to' . $i;
+ $nameB = 'reply_to' . ($i - 1);
+ global $$nameA, $$nameB;
+ $temp = $$nameA;
+ $$nameA = $$nameB;
+ $$nameB = $temp;
+
+ return true;
+ }
+
+ $i ++;
+ $name = 'form_for_' . $i;
+ global $$name;
+ }
+ return false;
+ }
+
+ function LoadInfo(&$n, &$e, &$r, $post) {
+ global $username, $data_dir;
+
+ $n = getPref($data_dir, $username, 'full_name' . $post);
+ $e = getPref($data_dir, $username, 'email_address' . $post);
+ $r = getPref($data_dir, $username, 'reply_to' . $post);
+
+ if ($n != '' || $e != '' || $r != '')
+ return true;
+ }
+
+function sti_input( $title, $hd, $data, $post, $bg ) {
+
+ echo "<tr$bg><td align=right nowrap>$title:".
+ '</td><td>'.
+ '<input size=50 type=text value="' . htmlspecialchars($data) .
+ "\" name=\"$hd$post\"></td></tr>";