Exemplo n.º 1
0
 } else {
     $sql = "SELECT * FROM `{$dbFeedbackForms}` WHERE id='{$formid}'";
     $result = mysql_query($sql);
     if (mysql_error()) {
         trigger_error(mysql_error(), E_USER_WARNING);
     }
     if (mysql_num_rows($result) < 1) {
         echo "<h2>{$strError}</h2>";
         echo "<p>{$strNoFeedBackFormToCompleteHere}</p>";
         echo "\n\n<!-- f: {$formid} r:{$respondent} rr:{$responseref} dh:{$decodehash}  hc:{$hashcode} -->\n\n";
     } else {
         $reqd = 0;
         while ($form = mysql_fetch_object($result)) {
             echo "<form action='feedback.php' method='post'>\n";
             echo "<h2>{$form->name}</h2>\n";
             echo "<p>{$strRelatingToIncident} <strong>#{$incidentid}</strong> &mdash; <strong>" . incident_title($incidentid) . "</strong><br />";
             echo sprintf($strOpenedbyXonY, contact_realname(incident_contact($incidentid)), ldate($CONFIG['dateformat_date'], db_read_column('opened', $dbIncidents, $incidentid)));
             echo ' &nbsp; ';
             echo sprintf($strClosedOnX, ldate($CONFIG['dateformat_date'], db_read_column('closed', $dbIncidents, $incidentid))) . ".</p>";
             if (!empty($_REQUEST['error'])) {
                 echo "<p style='color: red'>{$strErrorRequiredQuestionsNotCompleted}</p>";
             }
             echo nl2br($form->introduction);
             $qsql = "SELECT * FROM `{$dbFeedbackQuestions}` ";
             $qsql .= "WHERE formid='{$form->id}' ";
             $qsql .= "ORDER BY taborder ASC";
             $qresult = mysql_query($qsql);
             if (mysql_error()) {
                 trigger_error(mysql_error(), E_USER_WARNING);
             }
             while ($question = mysql_fetch_object($qresult)) {
Exemplo n.º 2
0
 while ($resp = mysql_fetch_object($result)) {
     $respondentarr = explode('-', $resp->respondent);
     $responserefarr = explode('-', $resp->responseref);
     $hashtext = urlencode($resp->formid) . "&&" . urlencode($resp->contactid) . "&&" . urlencode($resp->incidentid);
     // $hashcode=urlencode(trim(base64_encode(gzcompress(str_rot13($hashtext)))));
     $hashcode4 = str_rot13($hashtext);
     $hashcode3 = gzcompress($hashcode4);
     $hashcode2 = base64_encode($hashcode3);
     $hashcode1 = trim($hashcode2);
     $hashcode = urlencode($hashcode1);
     echo "<tr class='{$shade}'>";
     echo "<td>" . ldate($CONFIG['dateformat_datetime'], mysqlts2date($resp->created)) . "</td>";
     echo "<td><a href='contact_details.php?id={$resp->contactid}' title='{$resp->email}'>" . contact_realname($resp->contactid) . "</a></td>";
     echo "<td><a href=\"javascript:incident_details_window('{$resp->incidentid}','incident{$resp->incidentid}')\">";
     echo "{$strIncident} [{$resp->incidentid}]</a> - ";
     echo incident_title($resp->incidentid) . "</td>";
     $url = "feedback.php?ax={$hashcode}";
     if ($resp->multi == 'yes') {
         $url .= "&amp;rr=1";
     }
     echo "<td>";
     if ($resp->completed == 'no') {
         echo "<a href='{$url}' title='{$url}' target='_blank'>URL</a>";
     }
     $eurl = urlencode($url);
     $eref = urlencode($resp->responseref);
     if ($resp->completed == 'no') {
         //if ($resp->remind<1) echo "<a href='formactions.php?action=remind&amp;id={$resp->respid}&amp;url={$eurl}&amp;ref={$eref}' title='Send a reminder by email'>Remind</a>";
         //elseif ($resp->remind==1) echo "<a href='formactions.php?action=remind&amp;id={$resp->respid}&amp;url={$eurl}&amp;ref={$eref}' title='Send a Second reminder by email'>Remind Again</a>";
         //elseif ($resp->remind==2) echo "<a href='formactions.php?action=callremind&amp;id={$resp->respid}&amp;url={$eurl}&amp;ref={$eref}' title='Send a Third reminder by phone call, click here when its done'>Remind by Phone</a>";
         //else echo "<strike title='Already sent 3 reminders'>Remind</strike>";
Exemplo n.º 3
0
// Find out whether the service level in use allows reopening
$slsql = "SELECT allow_reopen FROM `{$dbServiceLevels}` ";
$slsql .= "WHERE tag = '{$incident->servicelevel}' ";
$slsql .= "AND priority = '{$incident->priority}' LIMIT 1";
$slresult = mysql_query($slsql);
if (mysql_error()) {
    trigger_error(mysql_error(), E_USER_WARNING);
}
if (mysql_num_rows($slresult) > 0) {
    $allow_reopen_obj = mysql_fetch_object($slresult);
}
$allow_reopen = $allow_reopen_obj->allow_reopen;
if ($allow_reopen == 'yes') {
    if (empty($submit)) {
        // No submit detected show update form
        $incident_title = incident_title($id);
        $title = "{$strReopen}: " . $id . " - " . $incident_title;
        include APPLICATION_INCPATH . 'incident_html_top.inc.php';
        echo "<h2>{$strReopenIncident}</h2>";
        if (!empty($updateid)) {
            $action = "&updateid={$updateid}";
        }
        echo "<form action='{$_SERVER['PHP_SELF']}?id={$id}{$action}' method='post'>";
        if (empty($updateid)) {
            echo "<table class='vertical'>";
            echo "<tr><th>{$strUpdate}</th><td><textarea name='bodytext' rows='20' ";
            echo "cols='60'></textarea></td></tr>";
            echo "<tr><th>{$strStatus}</th><td>" . incidentstatus_drop_down("newstatus", 1);
            echo "</td></tr>\n";
            echo "</table>";
        } else {
Exemplo n.º 4
0
    while ($related = mysql_fetch_object($rresult)) {
        if ($related->relatedid == $id) {
            if ($related->relation == 'child') {
                $linktitle = 'Child';
            } else {
                $linktitle = 'Sibling';
            }
            $linktitle .= ": " . incident_title($related->incidentid);
            echo "<a href='incident_details.php?id={$related->incidentid}' title='{$linktitle}'>{$related->incidentid}</a> ";
        } else {
            if ($related->relation == 'child') {
                $linktitle = 'Parent';
            } else {
                $linktitle = 'Sibling';
            }
            $linktitle .= ": " . incident_title($related->relatedid);
            echo "<a href='incident_details.php?id={$related->relatedid}' title='{$linktitle}'>{$related->relatedid}</a> ";
        }
        echo " &nbsp;";
    }
    echo "</td></tr>";
}
echo "</table>";
plugin_do('incident_details');
echo "</div>\n\n";
$offset = cleanvar($_REQUEST['offset']);
if (empty($offset)) {
    $offset = 0;
}
/**
    * @author Ivan Lucas
    echo "<table summary='Related Incidents' align='center'>";
    echo "<tr><th>{$strIncidentID}</th><th>{$strTitle}</th>";
    echo "<th>{$strRelationship}</th><th>{$strCreatedBy}</th>";
    echo "<th>{$strAction}</th></tr>\n";
    while ($related = mysql_fetch_object($rresult)) {
        echo "<tr>";
        if ($related->relatedid == $id) {
            $incidenttitle = incident_title($related->incidentid);
            if ($related->relation == 'child') {
                $relationship = 'Child';
            } else {
                $relationship = 'Sibling';
            }
            echo "<td><a href='incident_details.php?id={$related->incidentid}'>{$related->incidentid}</a></td>";
        } else {
            $incidenttitle = incident_title($related->relatedid);
            if ($related->relation == 'child') {
                $relationship = 'Parent';
            } else {
                $relationship = 'Sibling';
            }
            echo "<td><a href='incident_details.php?id={$related->relatedid}'>{$related->relatedid}</a></td>";
        }
        echo "<td>{$incidenttitle}</td>";
        echo "<td>{$relationship}</td>";
        echo "<td>" . user_realname($related->owner, TRUE) . "</td>";
        echo "<td><a href='incident_relationships.php?id={$id}&amp;rid={$related->id}&amp;action=delete'>{$strRemove}</a></td>";
        echo "</tr>\n";
    }
    echo "</table>";
} else {