Exemple #1
0
    </table>
    <div>
        <?php 
if ($action == 'c') {
    echo (string) drawSubmitButton("Create", "Create");
}
if ($action == 'u') {
    echo (string) drawSubmitButton("Update", "Update");
}
if ($action == 'd') {
    echo (string) drawSubmitButton("Delete", "Delete");
}
?>
        <form action="Company.php" method="post">
            <?php 
echo (string) drawSubmitButton("Return", "Return");
?>

        </form>
    </div>
</form>
<script src="JavaScripts/jquery-2.0.2.js"></script>








Exemple #2
0
function drawAdminTools_emailAccount($mailbox)
{
    global $adm_email_login;
    global $adm_email_pass;
    global $cyrus_used;
    $url_start = "<a href=\"" . $_SERVER["PHP_SELF"] . "?adm_email_login={$adm_email_login}&adm_email_pass={$adm_email_pass}&addrlink=" . $_REQUEST["addrlink"];
    $form_start = "<form action=\"" . $_SERVER["PHP_SELF"] . "\">\n<input type=\"hidden\" name=\"adm_email_login\" value=\"{$adm_email_login}\">\n<input type=\"hidden\" name=\"adm_email_pass\" value=\"{$adm_email_pass}\">\n<input type=\"hidden\" name=\"addrlink\" value=\"" . $_REQUEST["addrlink"] . "\">";
    // Draw the form for changing the password
    $left = "<h3>" . _("Change your password:"******"</h3>\n<table cellpadding=\"0\" cellspacing=\"0\">\n<tr>\n\t<td align=\"right\">" . $form_start . _("Password: "******"</td>\n\t<td><input type=\"hidden\" name=\"action\" value=\"dtcemail_change_pass\"><input type=\"password\" name=\"newpass1\" value=\"\"></td>\n</tr><tr>\n\t<td align=\"right\">" . _("Confirm password: "******"</td>\n\t<td><input type=\"password\" name=\"newpass2\" value=\"\"></td>\n</tr><tr>\n\t<td></td><td>" . drawSubmitButton(_("Ok")) . "</form></td>\n</tr></table>\n<br><br>";
    if ($mailbox["data"]["vacation_flag"] == "yes") {
        $use_vacation_msg_yes_checked = " checked ";
        $use_vacation_msg_no_checked = " ";
    } else {
        $use_vacation_msg_yes_checked = " ";
        $use_vacation_msg_no_checked = " checked ";
    }
    if (!$cyrus_used) {
        $left .= "<h3>" . _("Vacation message") . "</h3>\n  \t" . $form_start . "<input type=\"hidden\" name=\"action\" value=\"dtcemail_vacation_msg\">\n  <input type=\"radio\" name=\"use_vacation_msg\" value=\"yes\" {$use_vacation_msg_yes_checked}>" . _("Yes") . "<input type=\"radio\" name=\"use_vacation_msg\" value=\"no\" {$use_vacation_msg_no_checked}>" . _("No") . "\n  <br>\n  <textarea cols=\"40\" rows=\"7\" name=\"vacation_msg_txt\">" . $mailbox["data"]["vacation_text"] . "</textarea><br>\n  " . drawSubmitButton(_("Ok")) . "</form>";
    }
    if ($mailbox["data"]["localdeliver"] == "yes") {
        $deliverUrl = "{$url_start}&action=dtcemail_set_deliver_local&setval=no\"><font color=\"green\">" . _("Yes") . "</font></a>";
    } else {
        $deliverUrl = "{$url_start}&action=dtcemail_set_deliver_local&setval=yes\"><font color=\"red\">" . _("No") . "</font></a>";
    }
    if (!$cyrus_used) {
        $right = "<h3>" . _("Edit your mailbox redirections:") . "</h3>\n    " . _("Deliver messages locally in INBOX: ") . " {$deliverUrl}\n    <table cellpadding=\"0\" cellspacing=\"0\">\n    <tr>\n    \t<td align=\"right\">" . $form_start . _("Redirection 1: ") . "</td>\n    \t<td><input type=\"hidden\" name=\"action\" value=\"dtcemail_edit_redirect\"><input type=\"text\" name=\"redirect1\" value=\"" . $mailbox["data"]["redirect1"] . "\"></td>\n    </tr><tr>\n    \t<td>" . _("Redirection 2: ") . "</td>\n    \t<td><input type=\"text\" name=\"redirect2\" value=\"" . $mailbox["data"]["redirect2"] . "\"></td>\n    </tr><tr>\n    \t<td></td><td>" . drawSubmitButton(_("Ok")) . "</form></td>\n    </tr></table><br><br>";
        if ($mailbox["data"]["spam_mailbox_enable"] == "yes") {
            $spambox_yes_checked = " checked ";
            $spambox_no_checked = " ";
        } else {
            $spambox_yes_checked = " ";
            $spambox_no_checked = " checked ";
        }
        $right .= "<h3>" . _("Anti-SPAM control") . "</h3>\n    <table cellpadding=\"0\" cellspacing=\"0\">\n    <tr>\n    \t<td align=\"right\">Deliver spam to spambox:</td><td>" . $form_start . "<input type=\"hidden\" name=\"action\" value=\"dtcemail_spambox\">\n    <input type=\"radio\" name=\"spam_mailbox_enable\" value=\"yes\" {$spambox_yes_checked}>" . _("Yes") . "<input type=\"radio\" name=\"spam_mailbox_enable\" value=\"no\" {$spambox_no_checked}>" . _("No") . "</td>\n    </tr><tr>\n    \t<td align=\"right\">" . _("SPAM box name") . ":</td><td><input type=\"text\" name=\"spam_mailbox\" value=\"" . $mailbox["data"]["spam_mailbox"] . "\"></td>\n    </tr><tr>\n    \t<td></td><td>" . drawSubmitButton(_("Ok")) . "</form></td></tr></table>";
    } else {
        $right = "";
    }
    // Output the form
    $out = "<table width=\"100%\" heigh=\"1\">\n<tr>\n\t<td width=\"50%\" valign=\"top\">" . $left . "</td>\n\t<td width=\"4\" background=\"gfx/border_2.gif\"></td>\n\t<td valign=\"top\">" . $right . "</td>\n</tr>\n</table>\n";
    return $out;
}