コード例 #1
0
ファイル: markdownExtra.php プロジェクト: vistazp/boatseller
 protected function teardown()
 {
     #
     # Clearing Extra-specific variables.
     #
     $this->footnotes = array();
     $this->footnotes_ordered = array();
     $this->footnotes_ref_count = array();
     $this->footnotes_numbers = array();
     $this->abbr_desciptions = array();
     $this->abbr_word_re = '';
     parent::teardown();
 }
コード例 #2
0
ファイル: view.php プロジェクト: vistazp/boatseller
?>
</a>
    </h1>
    <h2 id="location"><?php 
echo htmlspecialchars($this->postPreview[0]['city']);
?>
, <?php 
echo $this->postPreview[0]['country'];
?>
</h2>
  </div>
  <div id="info" class="span-18 borderwithoutcolor">
      <h4>Job description</h4>
    <p id="description">
        <p><?php 
$html = \michelf\markdown::defaultTransform(htmlspecialchars($this->postPreview[0]['jobdescription']));
echo $html;
?>
</p>
      

    </p>
    <br />
    <p>
      <strong>Type of position:</strong> <?php 
echo $this->postPreview[0]['type_of_position'] == 'contractor' ? ' Contractor' : ' Permanent';
?>
<br />
      <strong>Work hours:</strong> <?php 
echo $this->postPreview[0]['work_hour'] == 'parttime' ? ' Part time' : ' Full time';
?>
コード例 #3
0
ファイル: feedback_model.php プロジェクト: vistazp/boatseller
    public function sendMailEachPost($postid)
    {
        $postData = $this->db->select('SELECT * FROM boat_post WHERE postid= :postid', array(':postid' => $postid));
        $mailList = $this->db->select('SELECT email FROM boat_subscriber WHERE notify= :notify', array(':notify' => '2'));
        //    print_r($postData);
        //    die;
        // несколько получателей
        $to = '*****@*****.**' . ', ';
        // обратите внимание на запятую
        $to .= '*****@*****.**';
        foreach ($mailList as $key => $value) {
            // текст письма
            //$sendDescription = str_replace(array("'", "\"", "#", "*"), "", htmlspecialchars($postData[0]['jobdescription']));
            $sendDescription = \michelf\markdown::defaultTransform(htmlspecialchars($postData[0]['jobdescription']));
            $sendTitle = str_replace(array("'", "\"", "#", "*"), "", htmlspecialchars($postData[0]['title']));
            // тема письма
            $subject = 'Dotnetnow Jobs: .NET Developer - [' . $sendTitle . ']';
            $message = '
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Dotnetnow.com</title>
    </head>
    <body>
        <div style="margin-left: auto; margin-right: auto; padding: 30px; color:#666; text-align:left; min-width:628px;">
            <table width="608" border="0" cellpadding="0" cellspacing="0" align="center" style="text-align:left; font-family: "Helvetica Neue", helvetica, arial, sans-serif;">
                <tr>
                    <td colspan="2"><img src="http://dotnetnow.com/public/images/logo.png" height="80" alt="DotNetNow" style="border: 0;" /></td>
                    <td align="right">
                        <p><span>Click to <a href="http://dotnetnow.com/email?email=' . $value['email'] . '">
                                    Update email settings</a> and</span><br/>
                            <span>change email delivery frequency.</span></p>
                    </td>
                </tr>
                <tr>
                    <td colspan="3">

                        <hr/>
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <br/>
                        <h3>New job posted on dotnetnow.com</h3>
                        <div>
                            <h3 style="margin-bottom:1px;"><a href="http://dotnetnow.com/jobs/view/' . $postData[0]['postid'] . '" style="color:#DA7B32;">' . $postData[0]['title'] . '</a> </h3>
                            <span style="color:gray;font-size:14px">' . $postData[0]['company'] . ' (' . $postData[0]['city'] . ', ' . $postData[0]['country'] . ')</span>
                            <p style="margin-top:4px;">
                            
                            ' . $sendDescription . '
                            </p>

                            (<a href="http://dotnetnow.com/jobs/view/' . $postData[0]['postid'] . '">Click for full details ...</a>)
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <hr/>
                        Follow us on Twitter for more jobs: <a href="https://twitter.com/dotnetnowboard">@dotnetnow</a>
                        <br/>
                        <hr/>
                        <p>Click for delivery options: <a href="http://dotnetnow.com/email?email=' . $value['email'] . '">update email settings</a></p>
                        <p>To be removed from this list, <a href="http://dotnetnow.com/email?email=' . $value['email'] . '">click here</a></p>

                    </td>
                </tr>
            </table>
        </div>
        
    </body>
</html>
';
            // Для отправки HTML-письма должен быть установлен заголовок Content-type
            $headers = 'MIME-Version: 1.0' . "\r\n";
            $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
            // Дополнительные заголовки
            $headers .= 'From: DotNetNow <*****@*****.**>' . "\r\n";
            // Отправляем
            mail($value['email'], $subject, $message, $headers);
        }
    }
コード例 #4
0
ファイル: index.php プロジェクト: vistazp/boatseller
    <label>Content</label><textarea id="markdown" type="text" name="content"><?php 
echo htmlspecialchars($this->test[0]['content']);
?>
</textarea><br />
    <label>&nbsp;</label><input type="submit" />
</form>
    
<hr />
<?php 
$html = \michelf\markdown::defaultTransform(htmlspecialchars($this->test[0]['content']));
echo $html;
?>
<hr />

<?php 
$html = \michelf\markdown::defaultTransform(strip_tags($this->test[0]['content']));
echo $html;
?>
<hr />

nl2br(strip_tags(htmlspecialchars
<p><?php 
echo $this->test[0]['title'];
?>
</p>
<p><?php 
echo nl2br(strip_tags(htmlspecialchars($this->test[0]['content']), '<b> <a>'));
?>
</p>
<hr />
nl2br(strip_tags