示例#1
0
        $email = '*****@*****.**';
        $mail = new PHPMailer();
        //$mail->IsSMTP();
        $mail->SMTPDebug = true;
        $mail->SMTPSecure = 'ssl';
        $mail->Host = "tampilin.id";
        $mail->Port = 465;
        $mail->SMTPAuth = true;
        $mail->Username = "******";
        $mail->Password = "******";
        $mail->From = "*****@*****.**";
        $mail->FromName = "<no-reply> Tampilin Automated Email";
        $mail->Subject = "Tampilin.id is now here!";
        $mail->AddAddress($email);
        $mail->IsHTML(true);
        $mail->Body = generateHtml();
        $mail->Send();
    }
}
function generateHtml()
{
    $html = '<html>
<link href="https://fonts.googleapis.com/css?family=Lato:400,300"
	rel="stylesheet" type="text/css">
<div
	style="background-color: #2F2F3B; padding-top: 2%; padding-left: 3%; padding-bottom: 2%">
	<a href="http://tampilin.id" target="_blank"><img
		src="http://tampilin.id/images/tampilin_white_red.png" height="40" /></a>
</div>
<div style="padding-left: 3%; display: inline-block;">
	<h2
示例#2
0
    fprintf($html_fp, "</tr>\n");
    /*
    fprintf($html_fp,"<tr>\n");
    for($i=0;$i<24;$i++)
    {
    	fprintf($html_fp,"<td><img src=\"./img/hr%d.png\" width=\"10\"/></td>\n",($i%12)+1);
    }
    fprintf($html_fp,"</tr>\n");
    */
    fprintf($html_fp, "</table>\n");
    fclose($html_fp);
}
if (!isset($server)) {
    $server = "easy";
}
//$lastModeTime = strtotime(date("Y-m-d H:i:s")) - filemtime("stats_$server.html");
//printf("%d<br>",$lastModeTime);
if (!file_exists("stats_{$server}.html") || strtotime(date("Y-m-d H:i:s")) - filemtime("stats_{$server}.html") > 60 * 5) {
    generateHtml($server);
}
$html_fp = fopen("stats_{$server}.html", "rt");
while (!feof($html_fp)) {
    $line = fgets($html_fp, 2048);
    echo $line;
    $html_fp++;
}
fclose($html_fp);
?>
</body>
</html>
        $mail = new PHPMailer();
        // $mail->IsSMTP();
        $mail->SMTPDebug = true;
        $mail->SMTPSecure = 'ssl';
        $mail->Host = "tampilin.id";
        $mail->Port = 465;
        $mail->SMTPAuth = true;
        $mail->Username = "******";
        $mail->Password = "******";
        $mail->From = $email;
        $mail->FromName = $name;
        $mail->IsHTML(true);
        $mail->Subject = "Automatic Email From Your Personal Website";
        /* $mail->AddAddress ( "*****@*****.**", "Rendy Rian Sandhika" ); */
        $mail->AddAddress("*****@*****.**", "Theodorus Y.");
        $mail->Body = generateHtml($data->name, $data->email, $data->content);
        if ($mail->Send()) {
            ob_end_clean();
            echo true;
        } else {
            echo $mail->ErrorInfo;
        }
        return;
    } else {
        echo false;
    }
    return;
} else {
    echo false;
}
return;
示例#4
0
    if (substr($data['geom'], 0, 3) == "BOX") {
        foreach (explode(",", substr($data['geom'], 4, -1)) as $i) {
            foreach (explode(" ", $i) as $j) {
                $bbox_array[] = $j;
            }
        }
    }
    if ($type === "ort") {
        $title = $data['ort_name'];
    } elseif ($type === "ortsteil") {
        $title = $data['stadtteil_name'];
    } elseif ($type === "straße") {
        $title = $data['strasse_name'] . " " . $data["zusatz"];
    } elseif ($type === "adresse") {
        $title = $data["strasse"] . " " . $data["hausnummer"] . $data["hausnummerzusatz"] . " " . $data["zusatz"];
    } elseif ($type === "poi") {
        $title = $data['poi_titel'];
    } else {
        $title = "";
    }
    $bbox_string = implode(",", $bbox_array);
    if ($backend) {
        $href = 'javascript:map.zoomToExtent(new OpenLayers.Bounds(' . $bbox_string . '));';
    } else {
        $href = URL . '?BBOX=' . $bbox_string;
    }
    $resultJson["result"] .= generateHtml($href, $bbox_string, $data["type"], $title, $backend);
    $resultJson["array"][] = generateJson($bbox_array, $data["type"], $title);
}
header('Content-Type: application/json');
echo json_encode($resultJson);
示例#5
0
$DLL = "UnityEngine";
$VER = "5.2.3p1";
if (isset($_GET['dll'])) {
    $DLL = $_GET['dll'];
}
if (isset($_GET['ver'])) {
    $VER = $_GET['ver'];
}
?>

<?php 
$body = '';
//$body = @file_get_contents('cache.html');
//if(!$body){
//}
$body = generateHtml();
$html = file_get_contents("template.html");
$html = str_replace("{\$BODY}", $body, $html);
$html = str_replace("{\$DLL}", $DLL, $html);
$html = str_replace("{\$VER}", $VER, $html);
file_put_contents("{$DLL}_{$VER}.html", $html);
echo $html;
?>


<?php 
// ---------------------------------------------------------------------------
function generateHtml()
{
    global $DLL;
    global $VER;