Esempio n. 1
0
function getDescription($url, $type = null)
{
    $metaTags = getMetaTags($url);
    $desc = null;
    $ogdesc = null;
    for ($i = 0; $i < $metaTags->length; $i++) {
        $metaTag = $metaTags->item($i);
        if (strtolower($metaTag->getAttribute('name')) == 'description') {
            $desc = $metaTag->getAttribute('content');
        }
        if (strtolower($metaTag->getAttribute('property')) == 'og:description') {
            $ogdesc = $metaTag->getAttribute('content');
        }
    }
    if ($type = 'og') {
        if ($ogdesc) {
            return $ogdesc;
        } else {
            return 'no description found';
        }
    } else {
        if ($desc) {
            return $desc;
        } else {
            if ($ogdesc) {
                return $ogdesc;
            } else {
                return 'no description found';
            }
        }
    }
}
Esempio n. 2
0
    ?>
<html <?php 
    echo getHTMLTagContent();
    ?>
>
  <head>
    <script type="text/javascript" charset="UTF-8" src="<?php 
    echo getScriptJS(__FILE__);
    ?>
"></script>
<?php 
    include "application_" . $_SESSION['language'] . ".php";
    include "mailfunctions_" . $_SESSION['language'] . ".php";
    ?>
    <?php 
    echo getMetaTags();
    ?>
    <title><?php 
    echo $_SESSION['Application_title'];
    ?>
 <convert>#label=243<convert></title>
    <link rel="stylesheet" type="text/css" href="../css/details.css" />
    <link rel="stylesheet" type="text/css" href="../css/global.css" />
    <link rel="stylesheet" type="text/css" href="../css/global_p.css" media="print" />
<?php 
}
if ($part == "js" || !$parted) {
    ?>
		<script type="text/javascript" src="../scripts/lib/proj4js-combined.CRO.1.0.0.js"></script>
		<!--script type="text/javascript" src="../scripts/converter.class.js"></script-->
		<script type="text/javascript" src="../scripts/jquery-1.4.2.min.js"></script>
Esempio n. 3
0
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <?php 
print getMetaTags();
?>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title><?php 
print getTitle();
?>
 &raquo; Editing <?php 
print getPage();
?>
</title>
        <link rel="stylesheet" type="text/css" href="<?php 
print getCSSURL();
?>
" />
    </head>
    <body>
        <div id="navigation">
            <p><a href="<?php 
print getHomeURL();
?>
">Home</a>
            | <a href="<?php 
print getGlobalHistoryURL();
?>
">History</a>
            <?php 
if (getUser() != "") {
    ?>
Esempio n. 4
0
function sendMail($mail_dest, $subject, $mail_body, $from_email = "", $add_cc_email = "", $send_a_copy = true)
{
    $mail_subject = "[" . $_SESSION['Application_name'] . "]" . " " . $subject;
    if ($from_email == "") {
        $from_email = $_SESSION['Application_mail'];
    }
    $reply_email = $from_email;
    $header_date = date("D, j M Y H:i:s");
    //-0600"); // avec offset horaire
    //HTML Content
    $css = 'body
          {
            font-family: arial, sans-serif;
            font-size: 9pt;
            background-color: white; 
            color: black;
          }
          
          a
          {
            text-decoration: none;
            color: #34558A;
            border-bottom: dotted 1px #458EFF;
          }
          
          a:hover
          {
            color: #FFA713;
            border-bottom: dotted 1px #FFA713;
          }';
    $html_text_body = getDoctype(false) . '<html ' . getHTMLTagContent() . '><head>' . getMetaTags() . '<style type="text/css">' . $css . '</style><title>' . $subject . '</title></head><body>' . $mail_body . '</body></html>';
    //TXT Content
    $plain_text_body = HTML2TxtMail($mail_body);
    $mime_boundary = md5(uniqid(mt_rand()));
    $mime_boundary_header = chr(34) . $mime_boundary . chr(34);
    $mail_header = 'From: ' . $from_email . "\n";
    if ($add_cc_email != "") {
        $mail_header .= 'Cc: ' . $add_cc_email . "\n";
    }
    if ($send_a_copy) {
        $mail_header .= 'Bcc: ' . $_SESSION['Application_mail'] . "\n";
    }
    $mail_header .= 'Reply-To: ' . $reply_email . "\n";
    $mail_header .= 'Return-Path: ' . $reply_email . "\n";
    $mail_header .= 'MIME-Version: 1.0' . "\n";
    $mail_header .= 'Content-Type: multipart/alternative;' . "\n";
    $mail_header .= '     boundary=' . $mime_boundary . "\n";
    $mail_header .= 'X-Mailer: PHP/' . phpversion() . "\n";
    $mail_header .= 'Date: ' . $header_date . "\n";
    //-----------------------------------------------
    // TXT
    //-----------------------------------------------
    $mail_body = 'This is a multi-part message in MIME format.' . "\n\n";
    $mail_body .= '--' . $mime_boundary . "\n";
    $mail_body .= 'Content-Type: text/plain; charset=UTF-8' . "\n";
    $mail_body .= 'Content-Transfer-Encoding: 8bit' . "\n\n";
    $mail_body .= $plain_text_body . "\n\n";
    //-----------------------------------------------
    // HTML
    //-----------------------------------------------
    $mail_body .= '--' . $mime_boundary . "\n";
    $mail_body .= 'Content-Type: text/html; charset=UTF-8' . "\n";
    $mail_body .= 'Content-Transfer-Encoding: 8bit' . "\n\n";
    $mail_body .= $html_text_body . "\n\n";
    $mail_body .= '--' . $mime_boundary . '--' . "\n";
    return mail($mail_dest, $mail_subject, $mail_body, $mail_header);
}