Пример #1
0
 public function shownotice()
 {
     $threadid = DB::connection('Forum')->select("select thread_id, title, post_date from xf_thread where node_id = 2 order by post_date desc limit 6");
     $id = 0;
     $message = array();
     foreach ($threadid as $id => $thread) {
         $messagebb = DB::connection('Forum')->table("xf_post")->where("thread_id", $thread->thread_id)->pluck("message");
         $message[$id] = FormatText::bbcode_to_html($messagebb);
         $id = $id++;
     }
     $data = array('page' => 'Download', 'id' => NULL, 'coin' => NULL, 'threads' => $threadid, 'message' => $message);
     return View::make('template/neon/notice')->with($data);
 }
Пример #2
0
            <html>
                <head>
                    <title>&nbsp;</title>
                    <link rel="stylesheet" type="text/css" href="../style/style.css"/>
                    <script type="text/javascript" src="../js/jquery-1.3.2.min.js"></script>
                </head>
                <body>
                    <p id="load" style="visibility:visible;"><img src="../pixmaps/loading.gif" width="16" height="16" /> <?php 
        echo _("Loading...");
        flush();
        ?>
</p>
            <?php 
        $result = $client->requestReport($report_unit, $report_format, $report_params, 'runReport');
        $POSTReportLabel = POST('reportLabel');
        $fileName = new FormatText($_SESSION['_user'] . ' ' . $POSTReportLabel);
        $fileUrl = "jasper_include/temp/" . $fileName->getName() . '.pdf';
        if (is_file($fileUrl)) {
            unlink($fileUrl);
        }
        $archivo = fopen($fileUrl, "w");
        fwrite($archivo, $result);
        fclose($archivo);
        function sendMail($from, $fromName, $to, $toName, $subject, $body, $attachment, $fileName)
        {
            $conf = $GLOBALS["CONF"];
            require_once 'classes/PHPMailer.inc';
            include "classes/PHPMailerSMTP.inc";
            // optional, gets called from within class.phpmailer.php if not already loaded
            $mail = new PHPMailer(true);
            // the true param means it will throw exceptions on errors, which we need to catch