예제 #1
0
function send_contact()
{
    global $realname, $company, $address, $address2, $address3, $postcode, $country;
    global $telephone, $email, $comments;
    //	$mail_to="*****@*****.**"
    $mail_to = "*****@*****.**";
    $mail_subject = "Henry Taunt Footsteps support";
    $mail_body = "\tCONTACT DETAILS\n\nFeedback from Henry Taunt Footsteps website:\n\n";
    $mail_body .= $realname . "\n" . $company . "\n";
    $mail_body .= $address . "\n" . $address2 . "\n" . $address3 . "\n" . $postcode . "\n" . $country . "\n\n";
    $mail_body .= "Phone - " . $telephone . "\n" . "E-mail - " . $email . "\n\n";
    $mail_body .= "Comments:" . "\n" . $comments . "\n\n";
    $mail_parts["mail_to"] = $mail_to;
    $mail_parts["mail_subject"] = $mail_subject;
    $mail_parts["mail_body"] = $mail_body;
    if (my_mail($mail_parts)) {
        user_message("You have just successfully sent to INVC an e-mail titled '{$mail_subject}'.", 2);
    } else {
        error_message("An unknown error occurred while attempting to send an e-mail titled '{$mail_subject}'.");
    }
}
예제 #2
0
<?php

session_start();
require_once 'wall_db.php';
header('location: wall.php');
if (isset($_POST['action']) && $_POST['action'] == "message") {
    user_message($_POST);
}
if (isset($_POST['action']) && $_POST['action'] == "comment") {
    user_comment($_POST);
}
//----------Validates comment ------------//
function user_comment($post)
{
    $_SESSION['errors'] = array();
    if (empty($post['comment'])) {
        $_SESSION['errors'][] = "Comment cannot be blank";
    }
    if (count($_SESSION['errors']) == 0) {
        $query = "INSERT INTO wall.comments (comment, created_at, updated_at, users_id, messages_id) VALUES ('{$post['comment']}', NOW(), NOW(), '{$_SESSION['user_id']}', '{$_POST['message_id']}');";
        $_SESSION['success_message'] = "Your comment has been posted";
        run_mysql_query($query);
    }
}
//----------Validates message ------------//
function user_message($post)
{
    $_SESSION['errors'] = array();
    if (empty($post['message'])) {
        $_SESSION['errors'][] = "Message cannot be blank";
    }
예제 #3
0
            if ($backupid >= 1) {
                $rhtml .= "<a href=\"javascript:wt_winpopup('incident_reassign.php?id={$assign->id}&amp;reason={$reason}&amp;backupid={$backupid}&amp;asktemp=temporary&amp;popup=yes','mini');\" title='{$strReassignTo} {$backupname}'>{$strAssignToBackup}</a> | ";
            }
            $rhtml .= "<a href=\"javascript:wt_winpopup('incident_reassign.php?id={$assign->id}&amp;reason={$reason}&amp;asktemp=temporary&amp;popup=yes','mini');\" title='{$strReassign}'>{$strAssignToOther}</a> | <a href='set_user_status.php?mode=deleteassign&amp;incidentid={$assign->incidentid}&amp;originalowner={$assign->originalowner}' title='{$strIgnoreThisAndDelete}'>{$strIgnore}</a></td>";
            $rhtml .= "</tr>\n";
        } elseif ($assign->owner != $assign->originalowner and $useraccepting == 'yes') {
            $show = TRUE;
            // display a row to assign the incident back to the original owner
            $rhtml .= "<tr class='shade2'>";
            $rhtml .= "<td>" . ldate($CONFIG['dateformat_datetime'], $assign->lastupdated) . "</td>";
            $rhtml .= "<td>" . user_realname($assign->owner, TRUE) . "</td>";
            $rhtml .= "<td>[<a href=\"javascript:wt_winpopup('incident_details.php?id={$assign->id}&amp;popup=yes', 'mini')\">{$assign->id}</a>] {$assign->title}</td>";
            $userstatus = user_status($assign->originalowner);
            $userstatusname = userstatus_name($userstatus);
            $origstatus = userstatus_name($assign->userstatus);
            $usermessage = user_message($assign->originalowner);
            $username = user_realname($assign->owner, TRUE);
            $rhtml .= "<td>" . sprintf($strOwnerXAcctingAgain, $userstatusname) . "<br />{$usermessage}</td>";
            $originalname = user_realname($assign->originalowner, TRUE);
            $reason = urlencode(trim("{$originalname} is now accepting incidents again. Previous status {$origstatus} and not accepting."));
            // FIXME i18n
            $rhtml .= "<td>";
            $rhtml .= "<a href=\"javascript:wt_winpopup('incident_reassign.php?id={$assign->id}&amp;reason={$reason}&amp;originalid={$assign->originalowner}&amp;popup=yes','mini');\" title='{$strReassignTo} {$originalname}'>{$strReturnToOriginalOwner}</a> | ";
            $rhtml .= "<a href=\"javascript:wt_winpopup('incident_reassign.php?id={$assign->id}&amp;reason={$reason}&amp;asktemp=temporary&amp;popup=yes','mini');\" title='{$strAssignToOther}'>{$strAssignToOther}</a> | <a href='set_user_status.php?mode=deleteassign&amp;incidentid={$assign->incidentid}&amp;originalowner={$assign->originalowner}' title='{$strIgnoreThisAndDelete}'>{$strIgnore}</a></td>";
            $rhtml .= "</tr>\n";
        }
    }
    $rhtml .= "</table>\n";
}
if ($show) {
    echo $rhtml;