exit(1);
}
$userstoreentryid = mapi_msgstore_createentryid($store, $argv[1]);
if (!$userstoreentryid) {
    print "Unknown user\n";
    exit(1);
}
$userstore = mapi_openmsgstore($session, $userstoreentryid);
if (!$userstore) {
    print "Unable to open user store\n";
    exit(1);
}
isUnicodeStore($userstore);
$inbox = mapi_msgstore_getreceivefolder($userstore);
$root = mapi_msgstore_openentry($userstore);
$storeprops = mapi_getprops($userstore, array(PR_IPM_SENTMAIL_ENTRYID, PR_IPM_OUTBOX_ENTRYID, PR_IPM_WASTEBASKET_ENTRYID));
$inboxprops = mapi_getprops($inbox, array(PR_ENTRYID, PR_IPM_APPOINTMENT_ENTRYID, PR_IPM_CONTACT_ENTRYID, PR_IPM_DRAFTS_ENTRYID, PR_IPM_JOURNAL_ENTRYID, PR_IPM_NOTE_ENTRYID, PR_IPM_TASK_ENTRYID));
$rootprops = mapi_getprops($root, array(PR_ADDITIONAL_REN_ENTRYIDS));
$trans_array = translate($argv[2]);
renamefolder($userstore, $storeprops[PR_IPM_SENTMAIL_ENTRYID], utf8_decode($trans_array["Sent Items"]));
renamefolder($userstore, $storeprops[PR_IPM_OUTBOX_ENTRYID], utf8_decode($trans_array["Outbox"]));
renamefolder($userstore, $storeprops[PR_IPM_WASTEBASKET_ENTRYID], utf8_decode($trans_array["Deleted Items"]));
renamefolder($userstore, $inboxprops[PR_ENTRYID], utf8_decode($trans_array["Inbox"]));
renamefolder($userstore, $inboxprops[PR_IPM_APPOINTMENT_ENTRYID], utf8_decode($trans_array["Calendar"]));
renamefolder($userstore, $inboxprops[PR_IPM_CONTACT_ENTRYID], $trans_array["Contacts"]);
renamefolder($userstore, $inboxprops[PR_IPM_DRAFTS_ENTRYID], $trans_array["Drafts"]);
renamefolder($userstore, $inboxprops[PR_IPM_JOURNAL_ENTRYID], $trans_array["Journal"]);
renamefolder($userstore, $inboxprops[PR_IPM_NOTE_ENTRYID], utf8_decode($trans_array["Notes"]));
renamefolder($userstore, $inboxprops[PR_IPM_TASK_ENTRYID], utf8_decode($trans_array["Tasks"]));
renamefolder($userstore, $rootprops[PR_ADDITIONAL_REN_ENTRYIDS][4], utf8_decode($trans_array["Junk E-mail"]));
Exemple #2
0
    require 'application/modules/default/library/PHPMailer/PHPMailerAutoload.php';
}
if (!empty($_POST)) {
    $msgarray = array();
    if (isset($_POST['btnfinish']) && isset($_POST['mailcontent'])) {
        try {
            $mysqlPDO = new PDO('mysql:host=' . SENTRIFUGO_HOST . ';dbname=' . SENTRIFUGO_DBNAME . '', SENTRIFUGO_USERNAME, SENTRIFUGO_PASSWORD, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
            if (!$mysqlPDO) {
                $msgarray['error'] = 'Could not connect to specified database';
            } else {
                $generatedPswd = uniqid();
                $encodedPswd = md5($generatedPswd);
                $query = "update main_users  set emppassword = '******' where emailaddress = '" . SUPERADMIN_EMAIL . "' and id= 1 ";
                $mysqlPDO->query($query);
                $mail = sendconfirmationmail($_POST['mailcontent'], $generatedPswd);
                $renamefolder = renamefolder();
                if ($mail != 'true') {
                    if ($renamefolder == 'true') {
                        $msgarray['error'] = "<div>Problem encountered while sending mail to " . SUPERADMIN_EMAIL . "</div><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>Login Credentials for " . APPLICATION_NAME . "</div><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div style='color: rgb(105, 145, 61); font-weight: 400; margin-bottom: 14px; margin-top: 8px;'>Username : empp0001</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div style='color: rgb(105, 145, 61); font-weight: 400;'>Password : "******"</div><br/><br/>\n\t\t\t\t\t\t\t\t  \t\t\t\t\t\t<div style='margin-bottom: 20px;'>Follow this <a style='color: rgb(172, 88, 26); text-decoration: none;' href=" . BASE_URL . ">link</a> to open application.</div>";
                    } else {
                        $msgarray['error'] = "<div>Problem encountered while sending mail to " . SUPERADMIN_EMAIL . "</div><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>Login Credentials for " . APPLICATION_NAME . "</div><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div style='color: rgb(105, 145, 61); font-weight: 400; margin-bottom: 14px; margin-top: 8px;'>Username : empp0001</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div style='color: rgb(105, 145, 61); font-weight: 400;'>Password : "******"</div><br/><br/>\n\t\t\t\t\t\t\t\t  \t\t\t\t\t\t<div style='margin-bottom: 20px;'>After you delete, move or rename the install directory follow this  <a style='color: rgb(172, 88, 26); text-decoration: none;' href=" . BASE_URL . ">link</a> to access your application. While the install directory exists, only the Install Panel will be accessible.</div>";
                    }
                } else {
                    if ($renamefolder == 'true') {
                        $msgarray['error'] = "<div class='sucss_mess_info'>Mail has been succesfully sent to " . SUPERADMIN_EMAIL . "</div><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>Login Credentials for " . APPLICATION_NAME . "</div><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div style='color: rgb(105, 145, 61); font-weight: 400; margin-bottom: 14px; margin-top: 8px;'>Username : empp0001</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div style='color: rgb(105, 145, 61); font-weight: 400;'>Password : "******"</div><br/><br/>\n\t\t\t\t\t\t\t\t  \t\t\t\t\t\t<div style='margin-bottom: 20px;'>Follow this <a style='color: rgb(172, 88, 26); text-decoration: none;' href=" . BASE_URL . ">link</a> to open application.</div>";
                    } else {
                        $msgarray['error'] = "<div>Mail has been succesfully sent to " . SUPERADMIN_EMAIL . "</div><br/>\n\t\t\t\t\t\t\t\t  \t\t\t\t\t\t<div>Login Credentials for " . APPLICATION_NAME . "</div><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div style='color: rgb(105, 145, 61); font-weight: 400; margin-bottom: 14px; margin-top: 8px;'>Username : empp0001</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div style='color: rgb(105, 145, 61); font-weight: 400;'>Password : "******"</div><br/><br/>\n\t\t\t\t\t\t\t\t  \t\t\t\t\t\t<div style='margin-bottom: 20px;'>After you delete, move or rename the install directory follow this  <a style='color: rgb(172, 88, 26); text-decoration: none;' href=" . BASE_URL . ">link</a> to access your application. While the install directory exists, only the Install Panel will be accessible.</div>";
                    }
                }
            }
        } catch (PDOException $e) {