query("INSERT INTO phoenix_log.log (logo_id, hq_id, cs_id, logo_description) VALUES ('" . $logoId . "','" . $hqId . "','" . $csId . "','" . $logoDescription . "')");
return $result;
}
// Remove postparser tags
function convertSpecialMC($op) {
$op = convertSpecial($op);
if (substr($op, 0, 12) == "
";
$trId = $db_conn->getOne("SELECT tr.tr_id FROM phoenix.tour AS tr WHERE tr.jb_id = '" . $jb . "' AND tr.tr_sort = '1' ");
// if (!existsEntry("phoenix.genericdatacontainer",array("gdc_obj_type","jb","gdc_obj_id",$jb,"gdc_gen_fieldname",'survey'), $db_conn)) :
if (!existsEntry("phoenix.genericdatacontainer",array("gdc_obj_type","tr","gdc_obj_id",$trId,"gdc_gen_fieldname",'survey'), $db_conn)) :
if ($f_act == "send") :
if ($objType == "cs") :
$cmpId = $db_conn->getOne("SELECT cs.cmp_id FROM phoenix.customer AS cs WHERE cs.cs_id = '" . $objId . "' ");
$csEid = $db_conn->getOne("SELECT cs.cs_eid FROM phoenix.customer AS cs WHERE cs.cs_id = '" . $objId . "' ");
if ($cmpId != "" && $cmpId > "0") :
$hqId = $db_conn->getOne("SELECT cs.hq_id FROM phoenix.customer AS cs WHERE cs.cs_id = '" . $objId . "' ");
TA("B");
// Store responses
$err = "";
for ($i = 1; $i <= $questionArrayLen; $i++) :
$f_question = ${("f_" . pad($i,2))};
if ($f_question == "") : $f_question = "0"; endif;
// $tmpSqlQuery = "INSERT INTO phoenix.genericdatacontainer (gdc_obj_type, gdc_obj_id, gdc_gen_fieldname, gdc_content, gdc_context) VALUES ('jb', '" . $jb . "', 'survey', '" . $f_question . "', '1" . pad($i,2) . "')";
$tmpSqlQuery = "INSERT INTO phoenix.genericdatacontainer (gdc_obj_type, gdc_obj_id, gdc_gen_fieldname, gdc_content, gdc_context) VALUES ('tr', '" . $trId . "', 'survey', '" . $f_question . "', '1" . pad($i,2) . "')";
$result = $db_conn->query($tmpSqlQuery);
if (DB::isError($result)) {$err = "ERR";};
endfor;
if ($err == "") :
TA("C");
TA("E");
$f_annotation = trim($f_annotation);
$errMsg = "";
if ($f_annotation != "") :
$mailResult = false; // Init
$mailSenderAddress = getFieldValueFromClause("phoenix.parameter","par_value","par_key = 'MAIL_SURVEY_SENDER_ADDRESS' AND hq_id = '" . $hqId . "'", $db_conn);
if ($mailSenderAddress == "") : $mailSenderAddress = getFieldValueFromClause("phoenix.parameter","par_value","par_key = 'MAIL_SURVEY_SENDER_ADDRESS' AND hq_id = '0'", $db_conn); endif;
if ($mailSenderAddress == "") : $mailSenderAddress = getFieldValueFromClause("phoenix.parameter","par_value","par_key = 'MAIL_SENDER_ADDRESS' AND hq_id = '" . $hqId . "'", $db_conn); endif;
if ($mailSenderAddress == "") : $mailSenderAddress = getFieldValueFromClause("phoenix.parameter","par_value","par_key = 'MAIL_SENDER_ADDRESS' AND hq_id = '0'", $db_conn); endif;
if ($mailSenderAddress != "") :
$mailSubject = getLngt("Bewertung durch den Kunden") . " " . $csEid;
$mailText = $f_annotation;
$mailObj = new htmlMimeMail();
$mailObj->setFrom($mailSenderAddress);
if ($mailCcAddresses != "") :
$mailObj->setCc($mailCcAddresses);
endif;
if ($mailBccAddresses != "") :
$mailObj->setBcc($mailBccAddresses);
endif;
$mailObj->setSubject($mailSubject);
// Mail content
// $mailObj->setHtml($htmlOut, null, "./");
$mailObj->setText($mailText);
$mailToAddresses = getFieldValueFromClause("phoenix.parameter","par_value","par_key = 'MAIL_SURVEY_ADDRESS_TO' AND hq_id = '" . $hqId . "'", $db_conn);
if ($mailToAddresses == "") : $mailToAddresses = getFieldValueFromClause("phoenix.parameter","par_value","par_key = 'MAIL_SURVEY_ADDRESS_TO' AND hq_id = '0'", $db_conn); endif;
if ($mailToAddresses == "") : $mailToAddresses = $mailSenderAddress; endif;
if ($mailToAddresses != "" && checkEmailFormat($mailToAddresses)) :
$mailResult = $mailObj->send(array($mailToAddresses), 'smtp');
if (!$mailResult) :
$errMsg = "Fehler bei Versendung!";
endif;
else :
$errMsg = "Die Syntax der Mailadresse ist nicht korrekt!";
endif;
$mailObj = NULL;
else :
$errMsg = "Keine Senderadresse eingetragen!";
endif;
// Error handling
if (!$mailResult) :
// Send internal mail with error message
$errMsg = "BEWERTUNG :: [CS_ID:" . $objId . "][CS_EID:" . $csEid . "] :: " . $errMsg;
sendInternalMail($errMsg);
endif;
endif;
// Write logdata into log database
// writeToLogRemoteDB("96",$hqId,"","","","",$objId,"STATUS=OK|IP=" . $currentClientIP . "|MO_ID=" . $moId);
$out = "
| " . "Unsere Qualität auf dem Prüfstand." . " " . " |
| " . "Ihre Meinung ist uns wichtig!" . " " . " |
| " . "Bitte nehmen Sie sich kurz Zeit für uns. Unser Anspruch ist es, Ihnen ein hohes Maß an Qualität zu bieten. Mit Ihrem Feedback helfen Sie uns, diesem Anspruch gerecht zu werden." . " " . " |
| " . "[" . $i . ".] " . $questionArray[($i - 1)] . " |
| " . "" . " " . " |
| "; $out .= "" . "Ja" . ""; $out .= "" . "Neutral" . ""; $out .= "" . "Nein" . ""; $out .= "" . " |
| " . "" . "Ihre Anmerkungen:" . " |
| " . "" . " " . " |
| " . "" . " " . " |