Ejemplo n.º 1
0
function displayPost($descriptor, $title, $content, $poster, $posted_date, $num_comments)
{
    $link_to_post = '<a href = "./post/' . $descriptor . '">';
    echo '<div class = "post">';
    echo '<h2>' . $link_to_post . $title . '</a></h2>';
    echo formatContent($content);
    echo '<div class = "post-footer">Posted by ' . $poster . ' at ' . convertDate($posted_date) . ' | ' . $link_to_post . $num_comments . ' comments</a></div>';
    echo '</div>';
}
Ejemplo n.º 2
0
function lastbooks()
{
    date_default_timezone_set('Europe/Rome');
    //echo "<table class=\"booklist\">";
    echo "<tr><th>Titolo</th><th>Autori</th><th>Anno</th><th>Prezzo</th><th>Stato</th><th>Data Aggiunta</th></tr>";
    $sql = "SELECT user_books.ID, title, author, year, price, status, notes, user_books.date, bookid\nFROM books, user_books WHERE bookid=books.ID AND user_books.venduto=0 ORDER BY user_books.date DESC LIMIT 10";
    $q = mysql_query($sql) or die("errore.<br>");
    while ($riga = mysql_fetch_array($q)) {
        echo "<tr><td><a href=\"#\" onclick=\"popup({$riga['0']});\">{$riga['1']}</a></td><td>{$riga['2']}</td><td>{$riga['3']}</td><td>{$riga['4']}</td>\n\t\t<td>" . quality($riga[5]) . "</td><td title=\"" . date('H:i - d/m/Y', strtotime($riga[7])) . "\">" . convertDate(strtotime($riga[7])) . "</td></tr>";
        /*date('H:i - d/m/Y',strtotime($riga[7]))."</td></tr>");*/
    }
    //echo "</table>";
}
Ejemplo n.º 3
0
function convertMessageDate($date, $use_today = false)
{
    $day = convertDate($date, "d");
    $month = convertDate($date, "m");
    $year = convertDate($date, "Y");
    $hour = convertDate($date, "H");
    $minute = convertDate($date, "i");
    $today = date("Ymd");
    if (date("Ymd") == $year . $month . $day || !$use_today) {
        $formatted_date = "{$day}. " . getMonth($month) . " um {$hour}:{$minute}";
    } else {
        $formatted_date = "{$day}. " . getMonth($month) . " {$year}";
    }
    return $formatted_date;
}
Ejemplo n.º 4
0
 /**
  * Send email from contact form
  *
  * @return void
  */
 protected function sendContactUsForm()
 {
     //info@hapjesenco.be
     //$contactFormData = $data;
     $amount = Input::json('personCount');
     $menuRaw = Input::json('selected_menu');
     $menuDecoded = base64_decode($menuRaw);
     $menuObj = json_decode($menuDecoded);
     $drinks = '';
     if (property_exists($menuObj, 'drinks') && property_exists($menuObj->drinks, 'selected') && $menuObj->drinks->selected == true) {
         $from = '';
         $to = '';
         if (property_exists($menuObj->drinks, 'from')) {
             $from = $menuObj->drinks->from;
         }
         if (property_exists($menuObj->drinks, 'to')) {
             $to = $menuObj->drinks->to;
         }
         $drinks = "\n\nGraag ook een offerte voor all-in drankenservice van " . $from . "u tot " . $to . "u. ";
     }
     $data = array('deliveryType' => 'bezorgen', 'hostname' => 'hapjesenco', 'firstname' => Input::json('firstname'), 'surname' => Input::json('lastname'), 'street' => Input::json('street'), 'number' => Input::json('housenumber'), 'postcode' => Input::json('zipcode'), 'city' => Input::json('city'), 'country' => Input::json('country'), 'companyName' => Input::json('companyName'), 'deliveryName' => Input::json('deliveryName'), 'VATnumber' => Input::json('VATnumber'), 'email' => Input::json('email'), 'phone' => Input::json('telephone'), 'orderDate' => convertDate(Input::json('date'), Input::json('time')), 'orderDateTime' => Input::json('time'), 'orderComment' => Input::json('multiText') . $drinks, 'product id' => Input::json('productId'), 'orderType' => 'estimate');
     $shoppingCart = $this->createShoppingCart($menuObj);
     $data['shoppingCart'] = $shoppingCart;
     $curl = new anlutro\cURL\cURL();
     $person_url = "http://beheer.cateringsoftware.nl/public/persons";
     $order_url = "http://beheer.cateringsoftware.nl/public/orders";
     $response = $curl->post($person_url, $data);
     $person_id = json_decode($response->body);
     $data['Person_id'] = $person_id->Person_id;
     $data['StoreFront_id'] = '1';
     $responseOrder = $curl->post($order_url, $data);
     $user = array('email' => '*****@*****.**', 'name' => 'Fingerfoodtruck');
     /*Mail::send('emails.contact', $data, function($message) use ($user)
     		{	
     			$message->from('*****@*****.**', 'Laravel');
     			$message->to($user['email'], $user['name'])->subject('Offerte aanvraag Fingerfoodtruck');
     			return 'success';
     		});*/
 }
Ejemplo n.º 5
0
$period = 92;
// Get the requested period, if blank choose the latest
$period = $_GET['period'];
if ($period < 1) {
    $SQL = "SELECT MAX(`period`) FROM `arpsc_ecrept`";
    $period = singleResult($SQL, $db);
}
$Volunteer_Rate = 18.11;
if ($period > 95) {
    // 2008 rate
    $Volunteer_Rate = 20.25;
}
// Display the month name for this report
$SQL = 'SELECT lastday FROM `periods` WHERE `periodno`=' . $period;
$usedate = singleResult($SQL, $db);
$Month = convertDate($usedate);
$yr = substr($usedate, 2, 2);
$mn = substr($usedate, 5, 2);
$DateShort = $yr . $mn;
$PaperSize = 'letter';
$Page_Width = 612;
$Page_Height = 792;
$Top_Margin = 30;
$Bottom_Margin = 57;
$Left_Margin = 30;
$Right_Margin = 25;
$Print_Width = $Page_Width - $Left_Margin - $Right_Margin;
$pdf = DocumentSetup($pdf, $Page_Width, $Page_Height, $Top_Margin, $Bottom_Margin, $Left_Margin, $Right_Margin, $Month);
//==============================================================================
//               FSD-96
//==============================================================================
?>

</h1>

<p class="fil-ariane">
	<strong>
		<a title="<?php 
echo $titre_categorie;
?>
" href="http://<?php 
echo $_SERVER['HTTP_HOST'];
?>
"></a>
	</strong>
</p>

<?php 
$page = pg_query("SELECT post_title, post_description, post_slug, post_date FROM csf_posts WHERE post_categorie = " . $id_categorie . " AND post_approved = '1' ORDER BY post_id DESC");
while ($affiche = pg_fetch_array($page)) {
    echo '<div><h2 class="h2"><a title="' . $affiche['post_title'] . '" href="http://' . $_SERVER['HTTP_HOST'] . '/' . $catSlug . '/' . $subCatSlug . '/' . sansPointPhp($affiche['post_slug']) . '">' . $affiche['post_title'] . '</a></h2><p>' . tronquer(nl2br($affiche['post_description'])) . '<br/><br/><span>' . convertDate($affiche['post_date']) . '</span></p></div>';
}
?>

</div>
<?php 
//include('footer.php');
?>
</div>
 
</body>
</html>
Ejemplo n.º 7
0
	<div style="text-align:center">
		<h1 style="	font-family: 'Impact', Charcoal, sans-serif">Game Schedule</h1>
		<p>
			Here you can find an index of Mass Mafia games: past, present, and future.<br>
			To join a game that hasn't started yet, simply click "view" next to that game.<br>
			You will be asked if you want to signup, and then you will be able to see other players in that game<br>
		</p>
	</div>
	<div style="font-family: Arial, Helvetica, sans-serif; text-align: center">
		<table style='margin: auto'> 
			<thead>
				<th>Start Date</th>
				<th>Type</th>
				<th></th>
			</thead>
			<?php 
$res = mysqli_query($con, "select * from schedule order by Start") or die("There's a problem with the database. Please try again later.");
while ($game = mysqli_fetch_array($res, MYSQLI_BOTH)) {
    echo "<tr>";
    echo "<td>" . convertDate($game['Start']) . "</td>";
    echo "<td>" . $game['Type'] . "</td>";
    echo "<td><a href='home.php?game=" . str_replace("-", "", $game['Start']) . "'>View</a></td>";
    echo "</tr>";
}
?>
	
		</table>
	</div>
	</body>
</html>
Ejemplo n.º 8
0
Archivo: bpl.php Proyecto: jjmcd/mi-nts
  <div id="main">

<?php 
// Initialize the latest data counter
$maxdate = 0;
// Get the requested period, if blank choose the latest
$period = $_GET['period'];
if ($period < 1) {
    $SQL = "SELECT MAX(period) FROM bpl";
    $period = singleResult($SQL, $db);
}
echo "    <center>\n";
// Display the month name for this report
$SQL = 'SELECT lastday FROM periods WHERE periodno=' . $period;
$usedate = singleResult($SQL, $db);
echo "<p><h1>Brass Pounder's League for " . convertDate($usedate) . "</h1></p>\n";
// Get the actual report data for this period
$SQL = 'SELECT `call`,`total`,`orig`,`sent`,`recd`,`deld`,`updated` FROM `bpl` WHERE `period`=' . $period . ' ORDER BY `total` DESC';
$result = getResult($SQL, $db);
echo "<table width=\"80%\">\n";
echo "<tr><th>Call</th><th>Orig</th><th>Sent</th><th>Rec'd</th><th>Del'd</th><th>Total</th></tr><tr>\n";
// We will remember rownum to alternate colors on the table
$rownum = 1;
while ($myrow = getRow($result, $db)) {
    $Obo = 0;
    if ($myrow[2] > 100) {
        $Obo = 1;
    } elseif ($myrow[2] + $myrow[5] > 100 && $myrow[5] < 100) {
        $Obo = 1;
    }
    $Dbo = 0;
Ejemplo n.º 9
0
    $mytimezone = $_GET["UTC"];
    //US TIMEZONE
    $timestamp = time();
    if (date('D', $timestamp) === 'Sat') {
        // if today's saturday.
        $session1day = date("m/d/Y", strtotime("Saturday"));
        $session2day = date("m/d/Y", strtotime("Saturday +1 week"));
    } else {
        // if today passed saturday
        $session1day = date("m/d/Y", strtotime("next Saturday"));
        $session2day = date("m/d/Y", strtotime("next Saturday +1 week"));
    }
    $appointment1 = $session1day . ' 10:00';
    $appointment2 = $session2day . ' 21:00';
    $getappointment1 = convertDate($appointment1, $mytimezone);
    $getappointment2 = convertDate($appointment2, $mytimezone);
}
$tzlist = DateTimeZone::listIdentifiers(DateTimeZone::ALL);
//echo sizeof($tzlist);
function generate_timezone_list()
{
    static $regions = array(DateTimeZone::AFRICA, DateTimeZone::AMERICA, DateTimeZone::ANTARCTICA, DateTimeZone::ASIA, DateTimeZone::ATLANTIC, DateTimeZone::AUSTRALIA, DateTimeZone::EUROPE, DateTimeZone::INDIAN, DateTimeZone::PACIFIC);
    $timezones = array();
    foreach ($regions as $region) {
        $timezones = array_merge($timezones, DateTimeZone::listIdentifiers($region));
    }
    $timezone_offsets = array();
    foreach ($timezones as $timezone) {
        $tz = new DateTimeZone($timezone);
        $timezone_offsets[$timezone] = $tz->getOffset(new DateTime());
    }
 private function viewAppointmentsTab($activeClass)
 {
     $class = $activeClass ? $activeClass : "tab-pane fade";
     global $wpdb;
     echo '<div class="' . $class . '" id="viewAppts">
             <div class="table-responsive"><table class="table table-hover table-bordered table-striped">
     <thead>
       <tr>
         <th>Appointment Date</th>
         <th>Appointment Time</th>
         <th>Purpose</th>
         <th>Venue</th>
         <th>Notes</th>
         <th>First Name</th>
         <th>Last Name</th>
         <th>Home Phone</th>
         <th>Cell Phone</th>
         <th>Customer Notes</th>
         <th>Options</th>
       </tr>
     </thead>
     <tbody>';
     $allAppointmentRows = $wpdb->get_results("SELECT ta.date AS 'Appointment_Date', ta.time AS 'Time', ta.purpose AS 'Purpose', ta.venue AS 'Venue', ta.notes AS 'Notes', tc.id_cd AS 'id_cd', tc.first_name AS 'First_Name', tc.last_name AS 'Last_Name', tc.phone_home AS 'Phone_Home', tc.phone_cell AS 'Phone_Cell', tc.notes AS 'Customer_Notes' FROM {$this->table_appointments} AS ta JOIN {$this->table_customerDetails} AS tc ON ta.id_cd = tc.id_cd ORDER BY ta.date DESC");
     if ($allAppointmentRows != NULL) {
         foreach ($allAppointmentRows as $oneApptsRow) {
             $id_cd = isset($oneApptsRow->id_cd) ? $oneApptsRow->id_cd : "";
             $appt_time = isset($oneApptsRow->Time) ? $oneApptsRow->Time : "";
             $appt_date = isset($oneApptsRow->Appointment_Date) ? $oneApptsRow->Appointment_Date : "";
             $appt_date = convertDate($appt_date, true);
             echo '<tr>
             <td>';
             echo $appt_date;
             echo '</td><td>';
             echo isset($oneApptsRow->Time) ? $oneApptsRow->Time : "";
             echo '</td><td>';
             echo isset($oneApptsRow->Purpose) ? $oneApptsRow->Purpose : "";
             echo '</td><td>';
             echo isset($oneApptsRow->Venue) ? $oneApptsRow->Venue : "";
             echo '</td><td>';
             echo isset($oneApptsRow->Notes) ? $oneApptsRow->Notes : "";
             echo '</td><td>';
             echo isset($oneApptsRow->First_Name) ? $oneApptsRow->First_Name : "";
             echo '</td><td>';
             echo isset($oneApptsRow->Last_Name) ? $oneApptsRow->Last_Name : "";
             echo '</td><td>';
             echo isset($oneApptsRow->Phone_Home) ? $oneApptsRow->Phone_Home : "";
             echo '</td><td>';
             echo isset($oneApptsRow->Phone_Cell) ? $oneApptsRow->Phone_Cell : "";
             echo '</td><td>';
             echo isset($oneApptsRow->Customer_Note) ? $oneApptsRow->Customer_Note : "";
             echo '</td><td name="' . $id_cd . '" abbr="' . $appt_time . '" axis="' . $appt_date . '"><a name="delApptView" id="delAppt">Delete</a></td></tr>';
         }
     } else {
         echo 'View Appointments. Nothing to display';
     }
     echo '</tbody></table> <button type="button" class="btn btn-default" onclick="reloadz()">Refresh</button>
   <p class="text-warning">Click Refresh to sync the list with the database for up-to-date info.</p> </div></div><!--Two final divs-->';
 }
Ejemplo n.º 11
0
     $proses = mysql_query($query);
     echo "<table>\n\t\t\t\t\t<tr><th>Tanggal</th><th>Id Transaksi</th><th>Kode Barang</th><th>Nama Barang</th><th>Harga Jual(Rp.)</th><th>Jumlah</th><th>Sub Total (Rp.)</th></tr>";
     if ($proses) {
         $id = 0;
         $tgl_lama = 0;
         $total = 0;
         while ($hasil = mysql_fetch_array($proses)) {
             if ($id != $hasil[id] && $id != 0) {
                 //hitung total
                 echo "<tr class=\"last_row\"><td colspan=\"6\" style=\"text-align: right\">Total :</td><td>{$total}</td></tr>";
                 $total = 0;
             }
             echo "<tr><td>";
             if ($id != $hasil[id]) {
                 $id = $hasil[id];
                 echo convertDate($hasil[tanggal]) . "</td><td>" . $id;
             } else {
                 echo "</td><td>";
             }
             $harga = $hasil[harga_beli] * (100 + $hasil[persen_markup]) / 100;
             echo "</td><td>{$hasil['kode']}</td><td>{$hasil['nama']}</td><td>{$harga}</td><td>{$hasil['jumlah']}</td><td>" . $harga * $hasil[jumlah] . "</td></tr>";
             $total += $harga * $hasil[jumlah];
         }
         //hitung total yg kelewat
         echo "<tr class=\"last_row\"><td colspan=\"6\" style=\"text-align: right\">Total :</td><td>{$total}</td></tr>";
     }
     echo "</table>";
     break;
 case 'pengguna_all':
     echo "<h1>DAFTAR SELURUH PENGGUNA</h1>";
     echo "<div class=\"box\">Tanggal Cetak: " . $tanggal . "</div>";
Ejemplo n.º 12
0
function addForfait($date_creat_forfait, $type_forfait, $nom_forfait, $prix_forfait, $critere_forfait, $comment_forfait, $nombre_duree_forfait, $unite_duree_forfait, $temps_forfait_illimite, $date_debut_forfait, $status_forfait, $nombre_temps_affectation, $unite_temps_affectation, $frequence_temps_affectation, $temps_affectation_occasionnel, $nombre_atelier_forfait)
{
    $date_creat_forfait = convertDate($date_creat_forfait);
    $date_debut_forfait = convertDate($date_debut_forfait);
    //$type_forfait=addslashes($type_forfait);
    $sql = "INSERT INTO `tab_forfait`(`id_forfait`, `date_creation_forfait`, `type_forfait`, `nom_forfait`, `prix_forfait`, `critere_forfait`, `commentaire_forfait`, `nombre_duree_forfait`, `unite_duree_forfait`, `temps_forfait_illimite`, `date_debut_forfait`, `status_forfait`, `nombre_temps_affectation`, `unite_temps_affectation`, `frequence_temps_affectation`, `temps_affectation_occasionnel`, `nombre_atelier_forfait`)\n        VALUES ('', '" . $date_creat_forfait . "', '" . $type_forfait . "', '" . $nom_forfait . "', '" . $prix_forfait . "', '" . $critere_forfait . "', '" . $comment_forfait . "', '" . $nombre_duree_forfait . "', '" . $unite_duree_forfait . "', '" . $temps_forfait_illimite . "', '" . $date_debut_forfait . "', '" . $status_forfait . "', '" . $nombre_temps_affectation . "', '" . $unite_temps_affectation . "', '" . $frequence_temps_affectation . "', '" . $temps_affectation_occasionnel . "', '" . $nombre_atelier_forfait . "' ) \n        ";
    $db = opendb();
    $result = mysqli_query($db, $sql);
    if (FALSE == $result) {
        return FALSE;
    } else {
        $ides = mysqli_insert_id($db);
        return $ides;
        //return TRUE;
    }
    closedb($db);
}
Ejemplo n.º 13
0
//S'il y a quelque chose
if (pg_num_rows($result1) != 0) {
    if ($nombre_article_csf_home == 1) {
        echo '<span class="dernier-article">Le dernier article</span>';
    } else {
        echo '<span class="dernier-article">Les ' . $nombre_article_csf_home . ' derniers articles</span>';
    }
    while ($affiche = pg_fetch_array($result1)) {
        //on va chercher le nom du dossier pour chaque article
        $dossier_article = pg_query("SELECT categorie_name, categorie_slug FROM csf_categories WHERE categorie_id = '" . pg_escape_string($affiche['post_categorie']) . "'");
        while ($nom_dossier = pg_fetch_array($dossier_article)) {
            $titre_categorie = $nom_dossier['categorie_name'];
            $nom_du_dossier = $nom_dossier['categorie_slug'];
        }
        //------fin nom de dossier---------------
        echo '<div class="cadre"><h2 class="h2"><a title="' . $affiche['post_title'] . '" href="http://' . $_SERVER['HTTP_HOST'] . '/' . $nom_du_dossier . '/' . sansPointPhp($affiche['post_slug']) . '">' . $affiche['post_title'] . '</a></h2>     <p>' . tronquer(nl2br($affiche['post_description'])) . '<br/><br/><span class="date">' . convertDate($affiche['post_date']) . ' � <strong><a title="' . $titre_categorie . '" href="http://' . $_SERVER['HTTP_HOST'] . '/' . $nom_du_dossier . '/">' . $titre_categorie . '</a></strong></span></p></div>';
    }
}
?>
   
    <!-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
  
    <!-- JavaScript -->
    <script src="js/jquery-1.10.2.js"></script>
    <script src="js/bootstrap.js"></script>
    <script src="js/modern-business.js"></script>

</body>

</html>
Ejemplo n.º 14
0
function getAllFavorites($token, $offset, $limit)
{
    $db = getDB();
    $decode = JWT::decode($token, TK);
    $account = $decode->account;
    $id_jabatan = $decode->id_jabatan;
    //    if ($jabatan->status) {
    $query = "SELECT surat.*, surat_terdistribusi.*, institusi.nama_institusi, surat_kode_hal.deskripsi FROM `surat_terdistribusi`, `surat`, `institusi`, `surat_kode_hal` WHERE (surat_terdistribusi.penerima=:account or surat_terdistribusi.penerima=:idJabatan) AND surat_terdistribusi.id_surat = surat.id_surat AND surat.kode_lembaga_pengirim = institusi.id_institusi AND surat.ditandatangani = '1' AND surat_kode_hal.kode_hal = surat.kode_hal AND surat_terdistribusi.isFavorite = :isFavorite ORDER BY surat.created DESC LIMIT :limit OFFSET :offset";
    //    } else {
    //        $query = "SELECT surat.*, surat_terdistribusi.*, operator.*, institusi.* FROM `surat_terdistribusi`, `surat`, `operator`, `institusi` WHERE surat_terdistribusi.penerima=:account AND surat_terdistribusi.id_surat = surat.id_surat AND surat.id_operator = operator.id_operator AND operator.id_institusi = institusi.id_institusi AND surat_terdistribusi.is_favorite='1' ORDER BY surat.created DESC";
    //    }
    $stmt = $db->prepare($query);
    $stmt->bindValue(":account", $account);
    $stmt->bindValue(":idJabatan", $id_jabatan);
    $stmt->bindValue(":limit", (int) $limit, PDO::PARAM_INT);
    $stmt->bindValue(":offset", (int) $offset, PDO::PARAM_INT);
    $stmt->bindValue(":isFavorite", 1, PDO::PARAM_INT);
    $stmt->execute();
    if ($stmt->rowCount() > 0) {
        $i = 0;
        while ($row = $stmt->fetch()) {
            if ($row['penerima'] == $id_jabatan) {
                $role = $id_jabatan;
            } else {
                $role = $account;
            }
            //            $output[$i] = array("pengirim" => $row['nama_institusi'], "id" => $row['id'], "hal" => $row['deskripsi'], "subject" => $row['subject_surat'], "role" => $role, "notif_web" => filter_var($row['notif_web'], FILTER_VALIDATE_BOOLEAN), "notif_app" => filter_var($row['notif_app'], FILTER_VALIDATE_BOOLEAN), "isFavorite" => filter_var($row['isFavorite'], FILTER_VALIDATE_BOOLEAN), "isUnread" => filter_var($row['isUnread'], FILTER_VALIDATE_BOOLEAN), "tanggal" => convertDate($row['tanggal_surat']));
            $output[$i] = array("pengirim" => $row['nama_institusi'], "id" => $row['id'], "hal" => $row['deskripsi'], "subject" => $row['subject_surat'], "role" => $role, "notif_web" => filter_var($row['notif_web'], FILTER_VALIDATE_BOOLEAN), "notif_app" => filter_var($row['notif_app'], FILTER_VALIDATE_BOOLEAN), "isFavorite" => filter_var($row['isFavorite'], FILTER_VALIDATE_BOOLEAN), "isUnread" => filter_var($row['isUnread'], FILTER_VALIDATE_BOOLEAN), "no_surat" => $row['no_surat'], "lampiran" => $row['lampiran'], "namaPenandatangan" => getAccountName($db, $row['penandatangan']), "jabatanPenandatangan" => getJabatan($db, $row['penandatangan']), "tanggal" => convertDate($row['tanggal_surat']), "isi" => $row['isi'], "tembusan" => $row['tembusan']);
            $i++;
        }
    } else {
        $output = [];
    }
    echo '{"count": ' . $stmt->rowCount() . ', "isUnreads": ' . countUnreads($token) . ', "isFavorites": ' . countFavorites($token) . ', "isUnsigned": ' . countUnsigned($token) . ', "result": ' . json_encode($output) . '}';
}
Ejemplo n.º 15
0
 <span class="glyphicon glyphicon-thumbs-down"></span> <?php 
    }
    ?>
 </td>
									<td><?php 
    if (strtoupper($row['Outdated']) == strtoupper("true")) {
        ?>
 <span class="glyphicon glyphicon-thumbs-up"></span> <?php 
    } else {
        ?>
 <span class="glyphicon glyphicon-thumbs-down"></span> <?php 
    }
    ?>
 </td>
									<td><?php 
    echo convertDate($row['LastUse']);
    ?>
</td>
								</tr>
								
								<?php 
}
?>
					</tbody>
				</table>
				<hr/>
				<button id="AddServer" class="btn btn-block btn-info" data-toggle="modal" data-target="#AddServerModal" ><span class="glyphicon glyphicon-plus-sign"></span> Add A Server <span class="glyphicon glyphicon-plus-sign"></span></button>
				<br/>
				<a href="https://github.com/ac3-profiles/profile-slave" class="btn btn-block btn-warning"><span class="glyphicon glyphicon-download-alt"></span> Get The Slave Script <span class="glyphicon glyphicon-download-alt"></span></a>
				<br/>		
				<div class="hline"></div>
Ejemplo n.º 16
0
$peopleIndex = $data[0];
$messages = $data[1];
/*
 * Messages sorted and ordered
 */
foreach ($messages as $message) {
    if (count($message[0]) == 2) {
        $person1 = cleanNames($message[0][0]);
        $person2 = cleanNames($message[0][1]);
        echo $person1 . "\t" . $person2 . "\r\n";
        //export
        for ($i = 1; $i < count($message); $i += 1) {
            //sprehod
            foreach ($message[$i] as $sporocilo) {
                $from = cleanNames($sporocilo[0]);
                $date = convertDate($sporocilo[1]);
                $to = '';
                if ($from == $person1) {
                    $to = $person2;
                } else {
                    $to = $person1;
                }
                //echo $from.' '.$to.' '.$date;
                //echo "\r\n";
                $sql = "INSERT INTO `traffic` VALUES('" . $from . "', '" . $to . "', '" . $date . "')";
                $PDO->query($sql);
            }
        }
        //*/
    }
}
Ejemplo n.º 17
0
 public function displayFieldValue($value, $type, $rule)
 {
     $displayFieldValue = $value;
     switch ($type) {
         case 'yesno':
             $displayFieldValue = $value == 1 ? 'Yes' : 'No';
             break;
         case 'select':
         case 'checkbox':
         case 'radio':
             $sql = "SELECT option_text FROM {$rule} WHERE option_value = ? AND language_code = 'en'";
             $pA = array('i', $value);
             $result = DB::query($sql, $pA);
             if ($result->getRows()) {
                 $displayFieldValue = $result->option_text;
             }
             break;
         case 'username':
             $user = new eCRFUser($value);
             $displayFieldValue = $user;
             break;
         case 'date':
             $displayFieldValue = convertDate($value);
             break;
         case 'datetime':
             $dt = splitDateTime($value);
             $time = $dt['time'];
             $date = convertDate($dt['date']);
             $displayFieldValue = $date . ' at ' . $time;
     }
     return $displayFieldValue;
 }
Ejemplo n.º 18
0
	
	// GET THE NUMBER OF RESULTS RETURNED FROM THE SQL QUERY
	$num_results = mysql_num_rows($result);
					  												  
	// ONLY SHOW THE LAST 10 ARTICLES, UNLESS THERE ARE LESS THAN 10 ARTICLES FROM THE LAST TWO WEEKS
	if ($num_results >= 10)
		$LimitToDisplay = 10;	
	else
		$LimitToDisplay = $num_results;	
					  
	for ($i=0; $i < $LimitToDisplay; $i++)
	{
		$row = mysql_fetch_array($result);
		
		//USE FUNCTION IN 'COMMON.PHP' TO CONVERT THE DATE FROM YYYY-MM-DD FORMAT TO MORE READABLE "MONTH DAY, YEAR" FORMAT
		$formattedDate = convertDate($row["DateSubmitted"]);
		
		// USE THE PHOTO THAT ACCOMPANIES THE ARTICLE, IF IT EXISTS.  IF NOT, USE THE STANDARD ENEWS IMAGE
		if ($row["Full_Photo"]) 
			$article_photo = "../images/MeredithCollege/enews/" . $row["Full_Photo"]; 	
		else 
		 	$article_photo = "../images/MeredithCollege/enews.png"; 	
		
		// MANIPULATE THE ARTICLE TITLE & PREVIEW DATA TO MAKE IT INTO A MANAGEABLE SIZE
		if (strlen($row["Title"]) > 50) 
			$article_title = substr($row["Title"], 0, 50) . "...";
		else 
			$article_title = $row["Title"];
		
		$preview = substr($row["preview"], 0, 55) . "...";
Ejemplo n.º 19
0
        continue;
    }
    $r = 0;
    $people = array();
    foreach ($requests->find(array("travel" => $k)) as $_k => $_v) {
        if ($_v['status'] == $status_is) {
            $people[] = generateUserLink($_v['user']);
            $r++;
        }
    }
    if ($r == 0) {
        //if there are no accepted/pending requests, do not show entry
        continue;
    }
    $i++;
    $v['date'] = convertDate($v['date'], false);
    $v['requesters'] = implode(", ", $people);
    $HTML[] = <<<EOF
\t\t<tr>
\t\t\t<td>{$i}
\t\t\t\t<a href="?product_request/edit/{$v['_id']}"><span class="glyphicon glyphicon-edit"></span></a>
\t\t\t<td><a href="?product_request/view/{$v['_id']}">{$v['from']}</a>

\t\t\t<td>{$v['to']}
\t\t\t<td>{$v['date']}
\t\t\t<td>{$v['requesters']}
\t\t\t<td><a href="?product_request/delete/{$v['_id']}"><span class="glyphicon glyphicon-remove"></span></a>
\t\t\t
\t\t</tr>
EOF;
}
Ejemplo n.º 20
0
                $productSchoolName[] = $schoolInfoArrayItem . "(" . $schoolInfoArrayItemValue['limit'] . ")";
                $schoolProductArray[$createdSchoolName] = $productSchoolName;
            }
        }
    }
}
$expireSoonArray = array();
$expiredArray = array();
$newSchoolList = array();
for ($i = 0; $i < count($createdSchools); $i++) {
    $schoolDir = "schools/" . $schoolDirArray[$i] . "/" . $schoolIdArray[$i];
    //echo "<br>" . $schoolDir;
    if (is_dir($schoolDir)) {
        $schoolID = $schoolIdArray[$i];
        $schoolExpire = $schoolExpireTime[$i];
        $b = convertDate($schoolExpire);
        $a = scanSchools($schoolDir, $schoolID, $schoolExpire, $b, $schoolProductArray[$schoolID]);
        $unixExpireTime = $a['unixExpireTime'];
        //echo "<br>" . $unixExpireTime . " " . $now;
        if ($unixExpireTime <= $now) {
            $expiredArray[] = $a;
        } else {
            if (!($unixExpireTime <= $expireSoon && $unixExpireTime > $now)) {
                $schoolList[] = $a;
            } else {
                $expireSoonArray[] = $a;
            }
        }
    }
}
uasort($expireSoonArray, 'sortExpireSoon');
Ejemplo n.º 21
0
  <div id="main">

<?php 
// Initialize the latest data counter
$maxdate = 0;
// Get the requested period, if blank choose the latest
$period = $_GET['period'];
if ($period < 1) {
    $SQL = "SELECT MAX(period) FROM sar";
    $period = singleResult($SQL, $db);
}
echo "    <center>\n";
// Display the month name for this report
$SQL = 'SELECT lastday FROM periods WHERE periodno=' . $period;
$usedate = singleResult($SQL, $db);
echo "<p><h1>Station Activity Report for " . convertDate($usedate) . "</h1></p>\n";
// Get the actual report data for this period
$SQL = 'SELECT call,total,notes,updated FROM `sar` WHERE `period`=' . $period . ' ORDER BY total DESC';
$result = getResult($SQL, $db);
echo "<table>\n";
echo "<tr><th>Call</th><th>Total</th><th>Comments</th></tr><tr>\n";
// We will remember rownum to alternate colors on the table
$rownum = 1;
while ($myrow = getRow($result, $db)) {
    // Keep track of the last date
    if ($myrow[3] > $maxdate) {
        $maxdate = $myrow[3];
    }
    // Calculate the link to the individual's reports
    $callrow = '<a class="OsRowL" href="sari.php?call=' . $myrow[0] . '">' . $myrow[0] . "</a>";
    // Switch between light and dark rows
Ejemplo n.º 22
0
        //Si le nombre de résultats est différent de 0, on continue
        if ($nb_resultats != 0) {
            //On affiche le nombre de résultats
            echo 'Il existe <b>' . $nb_resultats . '</b>';
            if ($nb_resultats > 1) {
                echo ' résultats';
            } else {
                echo ' résultat';
            }
            echo ' pour votre recherche " <b>' . $requete . '</b> " :<br/>';
            $i = "1";
            while ($donnees = pg_fetch_array($query)) {
                //On va chercher le nom de la catégorie
                $nom_categorie = pg_query("SELECT categorie_slug FROM csf_categories WHERE categorie_id = '" . pg_escape_string($donnees['post_categorie']) . "'");
                while ($cat = pg_fetch_array($nom_categorie)) {
                    echo '<div class="cadre"><big><big>' . $i . '-<a title="' . $donnees['post_title'] . '" href="http://' . $_SERVER['HTTP_HOST'] . '/' . $cat['categorie_slug'] . '/' . sansPointPhp($donnees['post_slug']) . '">' . $donnees['post_title'] . '</a></big></big><span class="date">' . convertDate($donnees['post_date']) . '</span><br/><p>' . $donnees['post_description'] . '</p></div>';
                    $i++;
                }
            }
        } else {
            echo '<div class="erreur">Nous n\'avons trouvé aucun résultats pour votre recherche " ' . $requete . ' " !</div>';
        }
    }
}
//On ferme if(isset($_POST['requete'])
?>

</div>
<?php 
include 'footer.php';
?>
Ejemplo n.º 23
0
    function showlist($ulrows, $total_results, $pageNav, $limitstart, $query_ext, $search = "")
    {
        $app =& JFactory::getApplication();
        $fbConfig =& CKunenaConfig::getInstance();
        $kunena_db =& JFactory::getDBO();
        if ($search == "") {
            $search = _KUNENA_USRL_SEARCH;
        }
        ?>

        <script type = "text/javascript">
            <!--
            function validate()
            {
                if ((document.usrlform.search == "") || (document.usrlform.search.value == ""))
                {
                    alert('<?php 
        echo _KUNENA_USRL_SEARCH_ALERT;
        ?>
');
                    return false;
                }
                else
                {
                    return true;
                }
            }
                    //-->
        </script>

        <?php 
        if ($fbConfig->joomlastyle < 1) {
            $boardclass = "fb_";
        }
        ?>
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr1">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr2">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr3">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr4">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr5">
        <table class = "fb_blocktable" id ="fb_userlist" border = "0" cellspacing = "0" cellpadding = "0" width="100%">
            <thead>
                <tr>
                    <th>
                        <table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
                            <tr>
                                <td align = "left">
                                    <div class = "fb_title_cover  fbm">
                                        <span class="fb_title fbl"> <?php 
        echo _KUNENA_USRL_USERLIST;
        ?>
</span>

                                        <?php 
        printf(_KUNENA_USRL_REGISTERED_USERS, $app->getCfg('sitename'), $total_results);
        ?>
                                    </div>
                                </td>

                                <td align = "right">
                                    <form name = "usrlform" method = "post" action = "<?php 
        echo CKunenaLink::GetUserlistURL();
        ?>
" onsubmit = "return validate()">
                                        <input type = "text"
                                            name = "search"
                                            class = "inputbox"
                                            style = "width:150px"
                                            maxlength = "100" value = "<?php 
        echo $search;
        ?>
" onblur = "if(this.value=='') this.value='<?php 
        echo $search;
        ?>
';" onfocus = "if(this.value=='<?php 
        echo $search;
        ?>
') this.value='';" />

                                        <input type = "image" src = "<?php 
        echo KUNENA_TMPLTMAINIMGURL . '/images/usl_search_icon.gif';
        ?>
" alt = "<?php 
        echo _KUNENA_USRL_SEARCH;
        ?>
" align = "top" style = "border: 0px;"/>
                                    </form>
                                </td>
                            </tr>
                        </table>
                    </th>
                </tr>
            </thead>

            <tbody>
                <tr>
                    <td class = "<?php 
        echo $boardclass;
        ?>
fb-userlistinfo">
                        <!-- Begin: Listing -->
                        <table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
                            <tr class = "fb_sth  fbs">
                                <th class = "th-1 frst <?php 
        echo $boardclass;
        ?>
sectiontableheader" align="center">
                                </th>

                                <?php 
        if ($fbConfig->userlist_online) {
            ?>

                                    <th class = "th-2 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_ONLINE;
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_avatar) {
            ?>

                                    <th class = "th-3 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_AVATAR;
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_name) {
            ?>

                                    <th class = "th-4 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_NAME;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=name&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=name&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_username) {
            ?>

                                    <th class = "th-5 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_USERNAME;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=username&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=username&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_group) {
            ?>

                                    <th class = "th-6 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_GROUP;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=group_id&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=group_id&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_posts) {
            ?>

                                    <th class = "th-7 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_POSTS;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=posts&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=posts&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_karma) {
            ?>

                                    <th class = "th-7 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_KARMA;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=karma&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=karma&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_email) {
            ?>

                                    <th class = "th-8 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_EMAIL;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=email&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=email&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_usertype) {
            ?>

                                    <th class = "th-9 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_USERTYPE;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=usertype&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=usertype&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_joindate) {
            ?>

                                    <th class = "th-10 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_JOIN_DATE;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=registerDate&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=registerDate&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                     </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_lastvisitdate) {
            ?>

                                    <th class = "th-11  <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_LAST_LOGIN;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=lastvisitDate&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=lastvisitDate&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

								  <?php 
        if ($fbConfig->userlist_userhits) {
            ?>
								<th class = "th-12 lst <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_HITS;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=uhits&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=uhits&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
								</th>
                                <?php 
        }
        ?>

                            </tr>

                            <?php 
        $i = 1;
        foreach ($ulrows as $ulrow) {
            $evenodd = $i % 2;
            if ($evenodd == 0) {
                $usrl_class = "sectiontableentry1";
            } else {
                $usrl_class = "sectiontableentry2";
            }
            $nr = $i + $limitstart;
            // Avatar
            $uslavatar = '';
            if ($fbConfig->avatar_src == "clexuspm") {
                $uslavatar = '<img  border="0" class="usl_avatar" src="' . MyPMSTools::getAvatarLinkWithID($ulrow->id, "s") . '" alt="" />';
            } else {
                if ($fbConfig->avatar_src == "cb") {
                    $kunenaProfile =& CKunenaCBProfile::getInstance();
                    $uslavatar = $kunenaProfile->showAvatar($ulrow->id);
                } else {
                    $kunena_db->setQuery("SELECT avatar FROM #__fb_users WHERE userid='{$ulrow->id}'");
                    $avatar = $kunena_db->loadResult();
                    if ($avatar != '') {
                        if (!file_exists(KUNENA_PATH_UPLOADED . DS . 'avatars/s_' . $avatar)) {
                            $uslavatar = '<img  border="0" class="usl_avatar" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $avatar . '" alt="" />';
                        } else {
                            $uslavatar = '<img  border="0" class="usl_avatar" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/s_' . $avatar . '" alt="" />';
                        }
                    } else {
                        $uslavatar = '<img  border="0" class="usl_avatar" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/s_nophoto.jpg" alt="" />';
                    }
                }
            }
            //
            ?>

                                <tr class = "<?php 
            echo $boardclass;
            echo $usrl_class;
            ?>
  fbm">
                                    <td class = "td-1 frst fbs" align="center">
<?php 
            echo $nr;
            ?>
                                    </td>

                                    <?php 
            if ($fbConfig->userlist_online) {
                ?>

                                        <td class = "td-2">
                                            <?php 
                // online - ofline status
                $sql = "SELECT COUNT(userid) FROM #__session WHERE userid='{$ulrow->id}'";
                $kunena_db->setQuery($sql);
                $isonline = $kunena_db->loadResult();
                if ($isonline && $ulrow->showOnline == 1) {
                    echo isset($fbIcons['onlineicon']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['onlineicon'] . '" border="0" alt="' . _MODLIST_ONLINE . '" />' : '  <img src="' . KUNENA_URLEMOTIONSPATH . 'onlineicon.gif" border="0"  alt="' . _MODLIST_ONLINE . '" />';
                } else {
                    echo isset($fbIcons['offlineicon']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['offlineicon'] . '" border="0" alt="' . _MODLIST_OFFLINE . '" />' : '  <img src="' . KUNENA_URLEMOTIONSPATH . 'offlineicon.gif" border="0"  alt="' . _MODLIST_OFFLINE . '" />';
                }
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_avatar) {
                ?>

                                        <td class = "td-3" align="center">
                                      <?php 
                if (strlen($uslavatar)) {
                    echo CKunenaLink::GetProfileLink($fbConfig, $ulrow->id, $uslavatar);
                } else {
                    echo '&nbsp;';
                }
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_name) {
                ?>

                                        <td class = "td-4  fbm" align="center">
						<?php 
                echo CKunenaLink::GetProfileLink($fbConfig, $ulrow->id, $ulrow->name);
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_username) {
                ?>

                                        <td class = "td-5  fbm" align="center">
						<?php 
                echo CKunenaLink::GetProfileLink($fbConfig, $ulrow->id, $ulrow->username);
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_group) {
                ?>

                                        <td class = "td-6  fbs" align="center">
                                            <span class = "view-group_<?php 
                echo $ulrow->group_id;
                ?>
"> <?php 
                echo $ulrow->title;
                ?>
 </span>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_posts) {
                ?>

                                        <td class = "td-7  fbs" align="center">
<?php 
                echo $ulrow->posts;
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_karma) {
                ?>

                                        <td class = "td-7 fbs" align="center">
<?php 
                echo $ulrow->karma;
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_email) {
                echo "\t\t<td class=\"td-8 fbs\"  align=\"center\"><a href=\"mailto:{$ulrow->email}\">{$ulrow->email}</a></td>\n";
            }
            if ($fbConfig->userlist_usertype) {
                echo "\t\t<td  class=\"td-9 fbs\"  align=\"center\">{$ulrow->usertype}</td>\n";
            }
            if ($fbConfig->userlist_joindate) {
                echo "\t\t<td  class=\"td-10 fbs\"  align=\"center\">" . convertDate($ulrow->registerDate) . "</td>\n";
            }
            if ($fbConfig->userlist_lastvisitdate) {
                echo "\t\t<td  class=\"td-11 fbs\"  align=\"center\">" . convertDate($ulrow->lastvisitDate) . "</td>\n";
            }
            ?>

                                    <td class = "td-12 lst fbs" align="center">
									 <?php 
            if ($fbConfig->userlist_userhits) {
                ?>
									<?php 
                echo $ulrow->uhits;
                ?>

                                    <?php 
            }
            ?>
									 </td>

                            <?php 
            echo "\t</tr>\n";
            $i++;
        }
        ?>

        </table>

		<form name = "usrlform" method = "post" action = "<?php 
        echo CKunenaLink::GetUserlistURL();
        ?>
" onsubmit = "return false;">
        <table width = "100%"  class="fb_userlist_pagenav" border = "0" cellspacing = "0" cellpadding = "0">
            <tr class = "fb_sth  fbs">
                <th class = "th-1  fbm" align = "center" style = "text-align:center;">

                            <?php 
        // TODO: fxstein - Need to perform SEO cleanup
        echo $pageNav->getPagesLinks(CKunenaLink::GetUserlistURL($query_ext));
        ?>
                </th>
            </tr>
        </table>



        <table class = "fb_blocktable" id="fb_userlist_bottom" style="border-bottom:0px;margin:0;" border = "0" cellspacing = "0" cellpadding = "0" width="100%">
                <tr>
                    <th  class = "th-right  fbs" align="right" style="text-align:right">
                     <?php 
        echo $pageNav->getPagesCounter();
        ?>
 | <?php 
        echo _KUNENA_USRL_DISPLAY_NR;
        ?>
 <?php 
        echo $pageNav->getLimitBox(CKunenaLink::GetUserlistURL($query_ext));
        ?>
                </th>
            </tr>
        </table>
		</form>

        </td>
	</tr>
  </tbody>
</table>
        <!-- Finish: Listing -->

</div>
</div>
</div>
</div>
</div>
        <?php 
        //(JJ) BEGIN: WHOISONLINE
        if (file_exists(KUNENA_ABSTMPLTPATH . '/plugin/who/whoisonline.php')) {
            include KUNENA_ABSTMPLTPATH . '/plugin/who/whoisonline.php';
        } else {
            include KUNENA_PATH_TEMPLATE_DEFAULT . DS . 'plugin/who/whoisonline.php';
        }
        //(JJ) FINISH: WHOISONLINE
        ?>
        <!-- Begin: Forum Jump -->
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr1">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr2">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr3">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr4">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr5">
        <table class = "fb_blocktable" id="fb_bottomarea"   border = "0" cellspacing = "0" cellpadding = "0">
            <thead>
                <tr>
                    <th  class = "th-right">
                        <?php 
        //(JJ) FINISH: CAT LIST BOTTOM
        if ($fbConfig->enableforumjump) {
            require_once KUNENA_PATH_LIB . DS . 'kunena.forumjump.php';
        }
        ?>
                    </th>
                </tr>
            </thead>
			<tbody><tr><td></td></tr></tbody>
		</table>
        </div>
</div>
</div>
</div>
</div>
        <!-- Finish: Forum Jump -->

<?php 
    }
//on voit si il y a quelque chose
if (pg_num_rows($article) == 0) {
    //S'il n'y a rien, on redirige vers l'index
    header("Status : 301 Moved Permanently");
    header('location:http://' . ROOT . '');
    exit;
} else {
    //il y a quelque chose
    while ($affiche = pg_fetch_array($article)) {
        //$id sert pour le système de commentaire
        $id = $affiche['post_id'];
        $titre = $affiche['post_title'];
        $description = $affiche['post_description'];
        $contenu = $affiche['post_content'];
        if (isset($affiche['post_date'])) {
            $date = convertDate($affiche['post_date']);
        }
        $commentaire = $affiche['post_comment'];
        $id_categorie = $affiche['post_categorie'];
    }
    $categorie = pg_query("SELECT categorie_name, categorie_slug FROM csf_categories WHERE categorie_id = '" . pg_escape_string($id_categorie) . "'");
    while ($affiche_categorie = pg_fetch_array($categorie)) {
        $titre_categorie = $affiche_categorie['categorie_name'];
        $categorie_slug = $affiche_categorie['categorie_slug'];
    }
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr-fr">
<head>
Ejemplo n.º 25
0
// DBのオープン
$dbHandler = new PDO(_BATCH_DB_DSN, _BATCH_DB_USER, _BATCH_DB_PASS);
$dbHandler->setAttribute(PDO::ATTR_PERSISTENT, True);
$dbHandler->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
//===============================================
// データの書き出し
foreach ($tableList as $table) {
    // テーブル名出力
    print $table . "\n";
    // 列名称の取得(Oracle専用になってるけどどうにかならないかな、、、)
    $columnNameList = array();
    $columnNameListForQuery = array();
    $results = $dbHandler->query("SELECT COLUMN_NAME FROM USER_TAB_COLUMNS WHERE TABLE_NAME='{$table}' ORDER BY COLUMN_ID");
    foreach ($results as $row) {
        $columnNameList[] = $row[0];
        $columnNameListForQuery[] = convertBlob(convertDate($row[0], $convertDateList), $conbertBlobList);
    }
    $results->closeCursor();
    print join("\t", $columnNameList);
    print "\n";
    // クエリーを発行
    if ($table == "PRODUCT_MST") {
        // 製品マスタは特別扱い
        //$querySql = "SELECT ".join(",",$columnNameListForQuery)." FROM PRODUCT_MST WHERE (COMPANY_ID,BC_BUNRUI) IN "
        //	. "(SELECT COMPANY_ID,BC_BUNRUI FROM WAREHOUSE_MST WHERE (COMPANY_ID,WAREHOUSE_ID) IN "
        //	. "(SELECT COMPANY_ID,WAREHOUSE_ID FROM TERMINAL_MST WHERE COMPANY_ID= :company_id AND TERMINAL_ID= :terminal ))";
        // 製品マスタは特別扱い
        if ($product_mst_upd_yms_hms == null) {
            $querySql = "SELECT " . join(",", $columnNameListForQuery) . " FROM PRODUCT_MST WHERE (COMPANY_ID,BC_BUNRUI) IN " . "(SELECT COMPANY_ID,BC_BUNRUI FROM WAREHOUSE_MST WHERE (COMPANY_ID,WAREHOUSE_ID) IN " . "(SELECT COMPANY_ID,WAREHOUSE_ID FROM TERMINAL_MST WHERE COMPANY_ID= :company_id AND TERMINAL_ID= :terminal ))";
        } else {
            // 製品マスタの最終更新日時がパラメータにあれば、最終更新日時以降のレコードのみ取得する
Ejemplo n.º 26
0
include "includes/blog.php";
$blogContent = $cache->get("home_page_blog");
if (!isset($blogContent) || empty($blogContent) || $blogContent == null) {
    ob_start();
    $res = getBlogData();
    if (empty($res) || $res->num_rows < 1) {
        echo "<h4>There's nothing here yet!</h4>";
    } else {
        while ($row = $res->fetch_assoc()) {
            ?>
								<h3 class="ctitle"><?php 
            echo ucwords($row['Title']);
            ?>
</h3>
								<p><csmall><?php 
            echo ucwords(convertDate($row['Date']));
            ?>
</csmall> | <csmall2>By: <?php 
            echo ucwords($row['Author']);
            ?>
</csmall2></p>
								<p><?php 
            echo str_replace(array("<strong/>", "<strong>"), "", $row['Post']);
            ?>
</p>
								<div class="hline"></div>
								<div class="spacing"></div>
								<?php 
        }
    }
    if (getTotalPosts() > 3) {
Ejemplo n.º 27
0
$maxdate = 0;
// Get the requested period, if blank choose the latest
$period = $_GET['period'];
if ($period < 1) {
    $SQL = "SELECT MAX(`period`) FROM `netreport`";
    $period = singleResult($SQL, $db);
}
echo "    <center>\n";
$lastperiod = $period;
echo "<p><h1>Net History</h1></p>\n";
echo "<table width=\"90%\">\n";
echo "<tr><th align=\"left\">Period</th><th>QNI</th><th>QTC" . "</th><th>QTR</th><th>Sess</th><th>Hours</th></tr>\n";
for ($period = $lastperiod; $period > 71; $period--) {
    // Display the month name for this report
    $SQL = 'SELECT `lastday` FROM `periods` WHERE `periodno`=' . $period;
    $periodname = convertDate(singleResult($SQL, $db));
    // Get the actual report data for this period
    $SQL = 'SELECT B.`netfullname`,A.`QNI`,A.`QTC`,A.`QTR`,A.`sessions`,' . 'A.`updated`,A.`manhours`,A.`netid` ' . 'FROM `netreport` A, `nets` B ' . 'WHERE A.`period`=' . $period . ' AND A.`netID`=B.`netID` ' . 'ORDER BY `QTC` DESC, `QNI` DESC';
    $result = getResult($SQL, $db);
    // We will use rownum to keep track of light and dark rows
    $rownum = 1;
    // The following variables are used to calculate totals for the month
    $TQNI = 0;
    $TQTC = 0;
    $TQTR = 0;
    $TSess = 0;
    $TMH = 0;
    // Loop through the rows of the result
    while ($myrow = getRow($result, $db)) {
        // Update the latest data date, if necessary
        if ($myrow[5] > $maxdate) {
Ejemplo n.º 28
0
?>
  <div id="main">

<?php 
// Initialize the latest data counter
$maxdate = 0;
// Get the requested period, if blank choose the latest
$period = $_GET['period'];
if ($period < 1) {
    $SQL = "SELECT MAX(period) FROM netreport";
    $period = singleResult($SQL, $db);
}
echo "    <center>\n";
// Display the month name for this report
$SQL = 'SELECT lastday FROM periods WHERE periodno=' . $period;
echo "    <p><h1>Public Service Honor Roll<br>for " . convertDate(singleResult($SQL, $db)) . "</h1></p>\n";
// Get the actual report data for this period
$SQL = 'SELECT `call`,`cat1`,`cat2`,`cat3`,`cat4`,`cat5`,`cat6`,`total`,`comment`,`updated` FROM `pshr` WHERE `period`=' . $period . ' ORDER BY `total` DESC';
$result = getResult($SQL, $db);
echo "    <table>\n";
echo "      <th>Call<th>Nets<th>Tfc<th>Appt<th>Plan<th>Emrg<th>Digi<th>Total<th>Comments<tr>\n";
// We will remember rownum to alternate colors in the table
$rownum = 1;
// Now loop through the rows of the data
while ($myrow = getRow($result, $db)) {
    // Keep track of the latest data
    if ($myrow[9] > $maxdate) {
        $maxdate = $myrow[9];
    }
    // Switch between light and dark rows
    if ($rownum != 0) {
Ejemplo n.º 29
0
  <style type="text/css" media="all">@import "css/arrl3c.css";</style>
  <link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.arrl-mi.org/?q=rss.xml" />
  <link rel="shortcut icon" href="/misc/favicon.ico" type="image/x-icon" />
  <!--<style type="text/css" media="all">@import "css/bluemarine.css";</style>-->
  <script type="text/javascript"> </script>
</head>

<body>
<div id="container">

<?php 
echo '  <div id="nonavbar">' . "\n";
echo "      &nbsp;\n";
echo '  </div>' . "\n";
echo '  <div id="main">' . "\n";
echo '  <p>"Michigan Section ARPSC Report for ' . convertDate($usedate) . "\"</p>\n";
?>
<p>
District,Juris,"Monthly Man Hours","Contrib Dollar Value","Total # ARES mbrs",Chg,Net,,"Public Service",,Emergency<br />
,,,,,,Num,"Man Hours",Num,"Man Hours",Num,"Man Hours"<br />
<?php 
//==================================================================================================
// S u m m a r y   L i n e s
//==================================================================================================
// Initialize maxdate to most recent county update
$q0 = 'SELECT MAX(`updated`) FROM `arpsc_counties`';
$r0 = getResult($q0, $db);
$row0 = getRow($r0, $db);
$maxdate = $row0[0];
// Loop through districts
$q1 = 'SELECT `districtkey`, `district_code` from `arpsc_districts` ORDER BY `district_code`';
Ejemplo n.º 30
0
function viewSurat($id, $token)
{
    global $app;
    $app->response->headers->set("Content-Type", "application/pdf");
    //include header
    include 'headerpdf.php';
    $req = json_decode($app->request->getBody(), true);
    //    $token = $req['token']; Jika menggunakan method POST
    //    $id = $req['id'];
    $decode = JWT::decode($token, TK);
    $account = $decode->account;
    $id_jabatan = $decode->id_jabatan;
    $dbh = getDB();
    //    setReads($dbh, $id);
    $query = "SELECT surat.*, surat_terdistribusi.penerima, surat_kode_hal.deskripsi, users.nama, jabatan.jabatan from surat, surat_terdistribusi, surat_kode_hal, users, jabatan WHERE surat_terdistribusi.id=:id_surat AND surat_terdistribusi.id_surat = surat.id_surat AND (surat_terdistribusi.penerima = :id_jabatan OR surat_terdistribusi.penerima = :account) AND surat.kode_hal = surat_kode_hal.kode_hal AND ((surat_terdistribusi.penerima = users.account) OR (surat_terdistribusi.penerima = users.id_jabatan AND users.id_jabatan = jabatan.id_jabatan))";
    $stmt = $dbh->prepare($query);
    $stmt->bindValue(':id_surat', (int) $id, PDO::PARAM_INT);
    $stmt->bindValue(':id_jabatan', $id_jabatan);
    $stmt->bindValue(':account', $account);
    try {
        $stmt->execute();
        $row = $stmt->fetch();
        $hal = $row['deskripsi'];
        // Mendapatkan deskripsi dari HAL
        $input = $row['isi'];
        // Mendapatkan isi dari surat
        //        $tjb = $row['jabatan'];
        //        $nama_pejabat = $row['nama'];
        $nosurat = $row['no_surat'];
        $lam = $row['lampiran'];
        $tanggal = convertDate($row['tanggal_surat']);
        $tjb = getJabatan($dbh, $row['penandatangan']);
        $nama_pejabat = getAccountName($dbh, $row['penandatangan']);
        $tembusan = explode("@+id/", $row['tembusan']);
        // Cari nama user berdasarkan jabatan parameter 'tujuan' //
        $query2 = "SELECT users.nama FROM users WHERE users.id_jabatan = :tujuan OR users.account = :tujuan";
        $stmt2 = $dbh->prepare($query2);
        $stmt2->bindValue(":tujuan", $row['penerima']);
        try {
            $stmt2->execute();
            if ($stmt2->rowCount() > 0) {
                // Jika ditemukan
                $row2 = $stmt2->fetch();
                $tujuan2 = $row2['nama'];
            } else {
                // Jika tidak ditemukan, berarti suratnya ditujukan kepada pejabat. Cari di tabel pejabat
                $tujuan2 = getJabatan($dbh, $row['penerima']);
            }
        } catch (PDOException $ex) {
            echo $ex->getMessage();
        }
    } catch (PDOException $e) {
        echo $e->getMessage();
    }
    // add a page
    $pdf->AddPage();
    //content PDF
    setlocale(LC_ALL, 'IND');
    //$nosurat = '999/UN.39.18/TU/15';
    //$tanggal = strftime("%d %B %Y");
    $lam = '2';
    //$hal = 'Pengajuan Peminjaman Scanner';
    $tujuan = 'KEPALA BIRO ADM. UMUM dan KEUANGAN (BAUK)';
    //$tujuan2 = 'KEPALA BIRO PERENCANAAN & SISTEM INFORMASI (BAPSI)';
    $tujuan3 = 'KA. UPT PERPUSTAKAAN';
    //$tjb = 'Ka. Pustikom';
    $nip = '197408242005011001';
    //$nama_pejabat = 'Hamidillah Adjie, ST';
    //a. first
    //$pdf->Cell(0, 0, 'Nomor                 :  '.$tes.'                                                                    '.$tanggal.'', 0, false, 'L', 0, '', 0, false, 'M', 'M');
    //$pdf->Ln(6);
    //$pdf->Cell(0, 0, 'Lamp                   :', 0, false, 'L', 0, '', 0, false, 'M', 'M');
    //$pdf->Ln(6);
    //$pdf->Cell(0, 0, 'Hal                   :', 0, false, 'L', 0, '', 0, false, 'M', 'M');
    //$pdf->Ln(6);
    $pdf->Ln(55);
    $pdf->SetFont('times', '', 12);
    //first
    $pdf->MultiCell(0, 0, '' . $tanggal . '', 0, 'L', 0, 0, 160, 53, true, 0, false, true, 0, 'M', true);
    //selisih turun cell 9
    $pdf->MultiCell(0, 0, 'No', 0, 'L', 0, 0, 25, 53, true, 0, false, true, 0, 'M', true);
    //25 : margin dari kiri 53: margin dari atas
    $pdf->MultiCell(0, 0, ':', 0, 'L', 0, 0, 50, 53, true, 0, false, true, 0, 'M', true);
    $pdf->MultiCell(0, 0, 'Lampiran', 0, 'L', 0, 0, 25, 61, true, 0, false, true, 0, 'M', true);
    $pdf->MultiCell(0, 0, ':', 0, 'L', 0, 0, 50, 61, true, 0, false, true, 0, 'M', true);
    $pdf->MultiCell(0, 0, 'Hal', 0, 'L', 0, 0, 25, 69, true, 0, false, true, 0, 'M', true);
    $pdf->MultiCell(0, 0, ':', 0, 'L', 0, 0, 50, 69, true, 0, false, true, 0, 'M', true);
    $pdf->MultiCell(0, 0, '' . $nosurat . '', 0, 'L', 0, 0, 53, 53, true, 0, false, true, 0, 'M', true);
    $pdf->MultiCell(0, 0, '' . $lam . '', 0, 'L', 0, 0, 53, 61, true, 0, false, true, 0, 'M', true);
    $pdf->MultiCell(90, 17, '' . $hal . '', 0, 'L', 0, 0, 53, 69, true, 0, false, true, 0, 'T', true);
    //second
    $pdf->MultiCell(0, 0, 'Yth.', 0, 'L', 0, 0, 25, 88, true, 0, false, true, 0, 'M', true);
    $pdf->MultiCell(90, 6, '' . $tujuan2 . '', 0, 'L', 0, 0, 33, 88, true, 0, false, true, 0, 'M', true);
    $pdf->MultiCell(90, 6, 'Universitas Negeri Jakarta', 0, 'L', 0, 0, 33, 93, true, 0, false, true, 0, 'M', true);
    //third
    //$input = str_replace('<br />', '\n', $_POST['isi']);
    $html = $input;
    $pdf->MultiCell(170, 0, '' . $input . '' . "\n", 0, 'J', 0, 1, 25, 105, true, 0, true, true, 0, 'T', true);
    //nilai 1 setelah J adalah posisi cell default berada dibawah
    //$pdf->MultiCell($w, $h, $txt, $border, $align, $fill, $ln, $x, $y, $reseth, $stretch, $ishtml, $autopadding, $maxh);
    ////$pdf->writeHTML($html);
    //
    $pdf->setCellMargins(0, 7, 0, 0);
    $pdf->MultiCell(170, 0, '' . $tjb . '', 0, 'L', 0, 1, 140, '', true, 0, false, true, 0, 'T', true);
    $pdf->setCellMargins(0, 23, 0, 0);
    $pdf->MultiCell(170, 0, '' . $nama_pejabat . '', 0, 'L', 0, 1, 140, '', true, 0, false, true, 0, 'T', true);
    $pdf->setCellMargins(0, 0, 0, 0);
    $pdf->MultiCell(170, 0, 'NIP' . ".{$nip}.", 0, 'L', 0, 1, 140, '', true, 0, false, true, 0, 'T', true);
    //Tembusan
    $pdf->setCellMargins(0, 10, 0, 0);
    $pdf->MultiCell(170, 0, 'Tembusan :', 0, 'L', 0, 1, 25, '', true, 0, false, true, 0, 'T', true);
    $pdf->setCellMargins(0, 0, 0, 0);
    for ($i = 0; $i < count($tembusan); $i++) {
        if ($tembusan[$i] != '') {
            $pdf->MultiCell(170, 0, $i + 1 . '. ' . getJabatan($dbh, $tembusan[$i]), 0, 'L', 0, 1, 25, '', true, 0, false, true, 0, 'T', true);
        }
    }
    // create some HTMNomor                 : L content
    //$html = '<span style="text-align:justify;">a <u>abc</u> abcdefghijkl (abcdef) abcdefg <b>abcdefghi</b> a ((abc)) abcd <img src="images/logo_example.png" border="0" height="41" width="41" /> <img src="images/tcpdf_box.svg" alt="test alt attribute" width="80" height="60" border="0" /> abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a <u>abc</u> abcd abcdef abcdefg <b>abcdefghi</b> a abc \(abcd\) abcdef abcdefg <b>abcdefghi</b> a abc \\\(abcd\\\) abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg abcdefghi a abc abcd <a href="http://tcpdf.org">abcdef abcdefg</a> start a abc before <span style="background-color:yellow">yellow color</span> after a abc abcd abcdef abcdefg abcdefghi a abc abcd end abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi<br />abcd abcdef abcdefg abcdefghi<br />abcd abcde abcdef</span>';
    //$html = "<span>Much playing will only make you happy temporarily</span>";
    //$input = $_POST['isi'];
    // set core font
    $pdf->SetFont('helvetica', '', 10);
    // output the HTML content
    //$pdf->writeHTML($html, true, 0, true, true);
    $pdf->Ln();
    // set UTF-8 Unicode font
    $pdf->SetFont('dejavusans', '', 10);
    // output the HTML content
    //$pdf->writeHTML($html, true, 0, true, true,'J');
    //$pdf->Write(0, $input);
    // reset pointer to the last page
    $pdf->lastPage();
    // ---------------------------------------------------------
    //Close and output PDF document
    $nama_pengirim = $_POST['sender'];
    $nama_file = $nosurat . '.pdf';
    $output = $pdf->Output('', 'S');
    $savePdf = addslashes($output);
    $pdf->Output($nama_file, 'I');
}