/**
  * @todo: 发送邮件
  * @author Saki <*****@*****.**>
  * @date 2015-1-4 下午2:19:39 
  * @version V1.0
  */
 private function send($info, $comment_info, $article_info)
 {
     if (isset($info['email'])) {
         $to_email = $info['email'];
         //接收对象邮件地址
         $to_name = $info['name'];
         //接收对象昵称
         if ($comment_info['is_admin'] == 0) {
             $from_name = $comment_info['name'] ? $comment_info['name'] : '匿名用户';
             //发送对象
         } else {
             $from_name = '站长';
         }
         $title = $this->getTitle($comment_info, $article_info);
         //邮件标题
         $content = $comment_info['content'];
         //邮件内容
         $url = 'http://www.500efuma.com' . U('Home/Article/view', array('id' => $comment_info['aid']));
         $body = getMail($to_name, $from_name, $article_info['title'], $content, $url);
         $is_send = sendMail($to_email, $to_email, $title, $body);
     }
 }
Example #2
0
    $stmt->execute();
    $stmt->store_result();
    $stmt->bind_result($m);
    $stmt->fetch();
    return $m;
}
function getMail($to, $ext = 'to', $mysqli)
{
    if ($ext == 'to') {
        $ml = explode(":", $to[0]['mail_to']);
    } else {
        if ($ext == 'cc') {
            $ml = explode(":", $to[0]['mail_cc']);
        } else {
            if ($ext == 'bcc') {
                $ml = explode(":", $to[0]['mail_bcc']);
            }
        }
    }
    $mlarr = array();
    for ($i = 0; $i < count($ml); $i++) {
        $mlarr[] = getMailEach($ml[$i], $mysqli);
    }
    return $mlarr;
}
echo "TO: " . implode(", ", getMail(getHeaders(8, $db), 'to', $db));
echo "<br/>";
echo "CC: " . implode(", ", getMail(getHeaders(8, $db), 'cc', $db));
echo "<br/>";
echo "BCC: " . implode(", ", getMail(getHeaders(8, $db), 'bcc', $db));
Example #3
0
function CreateRethoric($expression, $item, $object, $label, $start, $end, $target, $uri)
{
    //object: deo:Introduction, skos:Concept, sro:Abstract, deo:Materials, deo:Methods, deo:Results, sro:Discussion, sro:Conclusion
    global $annotation_ID;
    $annotation_ID = $annotation_ID + 1;
    $mail = getMail();
    $time = getTime();
    $subject = $item . "#" . $target;
    $Prefix = "  PREFIX sem: <http://www.ontologydesignpatterns.org/cp/owl/semiotics.owl#> \n\t\t\t\tPREFIX schema: <http://schema.org/>\n\t\t\t\tPREFIX oa: <http://www.w3.org/ns/oa#> \n\t\t\t\tPREFIX dlib: <{$uri}> \n\t\t\t\tPREFIX rsch: <http://vitali.web.cs.unibo.it/raschietto/> \n\t\t\t\tPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n\t\t\t\tPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n\t\t\t\tPREFIX deo: <http://purl.org/spar/deo/>\n\t\t\t\tPREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n\t\t\t\tPREFIX skos: <http://www.w3.org/2004/02/skos/core#>\n\t\t\t\tPREFIX sro: <http://salt.semanticauthoring.org/ontologies/sro#>";
    $Query = " INSERT DATA {\n\t" . Insert . "\n\t{\n\t\t<ann-retorica{$annotation_ID}> a oa:Annotation ; \n\t\t\t\t\t\t\t\t\trdfs:label \"Retorica\";\n\t  \t\t\t\t\t\t\t\toa:hasTarget <target-retorica{$annotation_ID}>;\n\t  \t\t\t\t\t\t\t\toa:annotatedBy <{$mail}> ;\n\t\t\t\t\t\t\t\t\toa:annotatedAt \"{$time}\";\n\t\t\t\t\t\t\t\t\toa:hasBody <body-retorica{$annotation_ID}>.\n\t    <target-retorica{$annotation_ID}> a oa:SpecificResource;\n\t\t\t\t\t\t\t\t\t    oa:hasSource dlib:{$item} ;\n\t\t\t\t\t\t\t\t\t    oa:hasSelector <selector-retorica{$annotation_ID}>.\n\t\t<selector-retorica{$annotation_ID}> a oa:FragmentSelector ;\n\t\t\t\t\t\t\t\t\t      rdf:value \"{$target}\" ;\n\t\t\t\t\t\t\t\t\t      oa:start \"{$start}\"^^xsd:nonNegativeInteger ;\n\t\t\t\t\t\t\t\t\t      oa:end \"{$end}\"^^xsd:nonNegativeInteger.\n\t\t<body-retorica{$annotation_ID}> a rdf:Statement ; \n\t\t\t\t\t\t\t         rdf:subject <dlib:{$subject}>;\n\t\t\t\t\t\t\t         rdf:predicate sem:denotes;\n\t\t\t\t\t\t\t         rdf:object {$object};\n\t\t\t\t\t\t\t         rdfs:label \"{$label}\".\n\t\t\t\t\t\t\t     }\n\t\t\t\t\t\t\t }";
    $answer = Update($Prefix . $Query);
    return $answer;
}
Example #4
0
function manejarSesionActiva_HTML_generarFormulario($smarty, $sDirLocalPlantillas, $infoLlamada, $infoCampania)
{
    $con = mysql_connect(rtHost, rtUser, rtPass);
    if (!$con) {
        die('Could not connect: ' . mysql_error());
    }
    mysql_select_db('rt', $con);
    mysql_query("SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'", $con);
    $sql = "select distinct Category from CustomFieldValues where CustomField = 4 order by Category";
    $query = mysql_query($sql) or die('Could not connect: ' . mysql_error());
    $html = '<div id="elastix-callcenter-formulario-3" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
    <table cellpadding="0" border="0">
            <tbody><tr>
                <th colspan="2"><h3>MẪU THÔNG TIN KHIẾU NẠI KHÁCH HÀNG</h3></th>
            </tr><tr><td></td></tr>
            <tr>
                <td><label>Tên khách hàng: </label></td>                
                <td>
					<input type="text" value="" class="elastix-callcenter-field ui-widget-content ui-corner-all" maxlength="250" size="50" id="' . custName . '" name="' . custName . '">
                </td>
            </tr>
            <tr>
                <td><label>Số điện thoại: </label></td>                
                <td>
					<input type="text" value="' . $infoLlamada['phone'] . '" class="elastix-callcenter-field 
ui-widget-content ui-corner-all" 
maxlength="250" size="50" id="' . custNum . '" name="' . custNum . '">
                </td>
            </tr>
            <tr>
                <td><label>Loại xử lý: </label></td>                
                <td>
					<select style="text-align:left"  class="elastix-callcenter-field ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" id="' . custCat . '" name="' . custCat . '" onchange="AjaxFunction(this.value);">
					<option value="">Select One</option>';
    while ($row = mysql_fetch_array($query)) {
        $html = $html . "<option values = '" . $row[0] . "'>" . $row[0] . "</option>";
    }
    $html = $html . '</select> </td></tr>           
			<tr>
                <td><label>Chi tiết: </label></td>                
                <td>
					<select style="text-align:left" class="elastix-callcenter-field ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" id="' . custSubcat . '" name="' . custSubcat . '">
					</select>
                </td>			
			</tr>			
            <tr>
                <td><label>Ghi chú/Mô tả: </label></td>                
                <td>
					<textarea class="elastix-callcenter-field ui-widget-content ui-corner-all" maxlength="1000" cols="50" rows="3" id="' . custDesc . '" name="' . custDesc . '"></textarea>
                </td>
            </tr>           
			<tr>
                <td><label>Resolved? </label></td>                
                <td>
					<input type="checkbox" onclick = "chkResolved(this)" value="No" class="elastix-callcenter-field ui-widget-content ui-corner-all" id="' . custRes . '" name="' . custRes . '">                				
					<input disabled="disabled" type="text" value="' . $infoLlamada['phone'] . '" class="elastix-callcenter-field ui-widget-content ui-corner-all" id="' . custCallerid . '" name="' . custCallerid . '">
					<input disabled="disabled" type="text" value="' . getMail(substr($infoLlamada['agent_number'], strpos($infoLlamada['agent_number'], "/") + 1)) . '" class="elastix-callcenter-field ui-widget-content ui-corner-all" id="' . agentEmail . '" name="' . agentEmail . '">
                </td>
            </tr> 	
    </tbody></table>
   </div>';
    mysql_close($con);
    $smarty->assign(array('FORMS' => $html, 'BTN_GUARDAR_FORMULARIOS' => _tr('Submit ticket'), 'FORM_HISTORY' => _tr(getFormHistory($infoLlamada['phone']))));
    return $smarty->fetch("{$sDirLocalPlantillas}/agent_console_formulario_edited.tpl");
}
echo "Hello";
sec_session_start();
function getMail($conn)
{
    echo "1";
    unset($hashid_sentfrom);
    echo "2";
    $friendself = $_POST["fcode"];
    $sqli = "SELECT filede FROM messages WHERE friendcode='{$friendself}'";
    foreach ($conn->query($sqli) as $row) {
        $delfile = $row['filede'];
        $count = $dbh->exec("DELETE FROM messages WHERE filede='{$delfile}'");
        unlink($delfile);
    }
}
$run = getMail($dbh);
// Unset all session values
$_SESSION = array();
// get session parameters
$params = session_get_cookie_params();
// Delete the actual cookie.
setcookie("UID", 'xXLoggedOut%00x455', time() - 42000, "/", "justiscraft.com");
setcookie(session_name(), '', time() - 42000, $params["path"], $params["domain"], $params["secure"], $params["httponly"]);
// Destroy session
mysql_free_result($result);
mysql_free_result($resulte);
mysql_free_result($resultv);
mysql_free_result($row);
mysql_free_result($con);
mysql_free_result();
session_destroy();