本文整理汇总了PHP中text_filter函数的典型用法代码示例。如果您正苦于以下问题:PHP text_filter函数的具体用法?PHP text_filter怎么用?PHP text_filter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了text_filter函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Header
if (!defined('AURACMS_admin')) {
Header("Location: ../index.php");
exit;
}
$script_include[] = $JS_SCRIPT;
$admin = '';
if (!cek_login()) {
$admin .= '<h4 class="bg">Access Denied !!!!!!</h4>';
} else {
global $koneksi_db, $PHP_SELF, $theme, $error;
if ($_GET['aksi'] == "") {
$admin .= '<div class="panel panel-info">
<div class="panel-heading"><b>Edit Password</b></div>';
if (isset($_POST["submit"])) {
$user = text_filter($_POST['user']);
$password0 = md5($_POST["password0"]);
$password1 = $_POST["password1"];
$password2 = $_POST["password2"];
$hasil = $koneksi_db->sql_query("SELECT password FROM useraura WHERE user='{$user}'");
while ($data = $koneksi_db->sql_fetchrow($hasil)) {
$password = $data['password'];
}
$error = '';
if (!$password0) {
$error .= "Error: Please enter your Old Password!<br />";
}
if (!$password1) {
$error .= "Error: Please enter new password!<br />";
}
if (!$password2) {
示例2: md5
$files = $_FILES['gambar']['name'];
$tmp_files = $_FILES['gambar']['tmp_name'];
$namagambar = md5(rand(1, 100) . $files) . '.jpg';
$tempnews = 'mod/photo/images/temp/';
$uploaddir = $tempnews . $namagambar;
$uploads = move_uploaded_file($tmp_files, $uploaddir);
if (file_exists($uploaddir)) {
@chmod($uploaddir, 0644);
}
$tnews = 'mod/photo/images/thumb/';
$gnews = 'mod/photo/images/normal/';
$small = $tnews . $namagambar;
$nsmall = $gnews . $namagambar;
create_thumbnail($uploaddir, $nsmall, $new_width = 520, $new_height = 'auto', $quality = 100);
$judul = text_filter($_POST['judul']);
$kategori = text_filter($_POST['kategori']);
$namafile_name = $_FILES['gambar']['name'];
$gambar = $_POST['gambarlama'];
$desc = $_POST['desc'];
unlink($uploaddir);
unlink($tnews . $gambar);
unlink($gnews . $gambar);
$hasil = $koneksi_db->sql_query("UPDATE photo SET judul='{$judul}',ket='{$desc}',kategori='{$kategori}', gambar='{$namagambar}' WHERE id='{$id}'");
if ($hasil) {
$admin .= '<div class="alert alert-success fade in">
<button data-dismiss="alert" class="close close-sm" type="button">
<i class="icon-remove"></i>
</button>
<strong>Wall Done !</strong> <br>Photo berhasil di Edit.
</div>';
$style_include[] = '<meta http-equiv="refresh" content="1; url=?pilih=photo&mod=yes" />';
示例3: edit_document
/**
* Edit a document based on $_POST and $_GET parameters 'dir' and 'path'
*
* @param array $_course array
* @return void
*/
function edit_document($_course)
{
global $_configuration;
$dir = isset($_GET['dir']) ? $_GET['dir'] : $_POST['dir'];
// please do not modify this dirname formatting
if (strstr($dir, '..')) {
$dir = '/';
}
if ($dir[0] == '.') {
$dir = substr($dir, 1);
}
if ($dir[0] != '/') {
$dir = '/' . $dir;
}
if ($dir[strlen($dir) - 1] != '/') {
$dir .= '/';
}
$filepath = api_get_path('SYS_COURSE_PATH') . $_course['path'] . '/document' . $dir;
if (!is_dir($filepath)) {
$filepath = api_get_path('SYS_COURSE_PATH') . $_course['path'] . '/document/';
$dir = '/';
}
$table_doc = Database::get_course_table(TABLE_DOCUMENT);
if (isset($_POST['path']) && !empty($_POST['path'])) {
$sql = "SELECT path\n\t\t\t\t\t\tFROM " . $table_doc . "\n\t\t\t\t\t\tWHERE id = " . Database::escape_string($_POST['path']);
$res = Database::query($sql, __FILE__, __LINE__);
$row = Database::fetch_array($res);
$content = stripslashes($_POST['content_lp']);
$file = $filepath . $row['path'];
if ($fp = @fopen($file, 'w')) {
$content = text_filter($content);
$content = str_replace(api_get_path('WEB_COURSE_PATH'), $_configuration['url_append'] . '/courses/', $content);
// change the path of mp3 to absolute
// first regexp deals with ../../../ urls
$content = preg_replace("|(flashvars=\"file=)(\\.+/)+|", "\$1" . api_get_path(REL_COURSE_PATH) . $_course['path'] . '/document/', $content);
//second regexp deals with audio/ urls
$content = preg_replace("|(flashvars=\"file=)([^/]+)/|", "\$1" . api_get_path(REL_COURSE_PATH) . $_course['path'] . '/document/$2/', $content);
fputs($fp, $content);
fclose($fp);
}
}
}
示例4: int_filter
}
$admin .= '
</select>*/
$admin .= '<br />
<label>Keterangan</label><br /><textarea rows="10" cols="40" name="url">' . $url . '</textarea><br />
<input type="submit" name="submit" value="Buat">
</form> ';
$admin .= '</div>';
}
if ($_GET['aksi'] == "edittopic") {
$id = int_filter($_GET['id']);
$admin .= '<div class="border">';
$admin .= '<b>Edit Topik Baru dengan Id = ' . $id . '</b>';
$admin .= '</div>';
if (isset($_POST['submit'])) {
$menu = text_filter($_POST['menu']);
$url = $_POST['url'];
$seftitle = AuraCMSSEO($menu);
$parentid = $_POST['parentid'];
$parentid = '0';
$total = $koneksi_db->sql_query("SELECT * FROM topik WHERE topik = '" . $_POST['menu'] . "' and id != '" . $id . "'");
$jumlah = $koneksi_db->sql_numrows($total);
$error = '';
if ($jumlah) {
$error .= "Error: Duplicate Title of Topic {$judul}!<br />";
}
if (!$menu) {
$error .= "Error: Please enter Title of Topic!<br />";
}
if (!$url) {
$error .= "Error: Please enter Description of Topic!<br />";
示例5: listLinksAndCategories
public static function listLinksAndCategories($course_id, $session_id, $categoryId, $show = 'none', $token = null)
{
$tbl_link = Database::get_course_table(TABLE_LINK);
$_user = api_get_user_info();
$categoryId = intval($categoryId);
/* Action Links */
echo '<div class="actions">';
if (api_is_allowed_to_edit(null, true)) {
echo '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&action=addlink&category_id=' . $categoryId . '">' . Display::return_icon('new_link.png', get_lang('LinkAdd'), '', ICON_SIZE_MEDIUM) . '</a>';
echo '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&action=addcategory&category_id=' . $categoryId . '">' . Display::return_icon('new_folder.png', get_lang('CategoryAdd'), '', ICON_SIZE_MEDIUM) . '</a>';
}
$categories = Link::getLinkCategories($course_id, $session_id);
$count = count($categories);
if (!empty($count)) {
echo '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&action=list&show=none">';
echo Display::return_icon('view_remove.png', get_lang('shownone'), '', ICON_SIZE_MEDIUM) . '</a>';
echo '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&action=list&show=all">';
echo Display::return_icon('view_tree.png', get_lang('showall'), '', ICON_SIZE_MEDIUM) . '</a>';
}
echo '</div>';
// Displaying the links which have no category (thus category = 0 or NULL),
// if none present this will not be displayed
$sql = "SELECT * FROM {$tbl_link}\n WHERE c_id = {$course_id} AND category_id=0 OR category_id IS NULL";
$result = Database::query($sql);
$count = Database::num_rows($result);
if ($count !== 0) {
echo '<table class="data_table">';
echo '<tr><th style="font-weight: bold; text-align:left;padding-left: 10px;">' . get_lang('General') . '</th></tr>';
echo '</table>';
self::showlinksofcategory(0);
}
$i = 0;
$view = '0';
$counter = 0;
foreach ($categories as $myrow) {
// Student don't see invisible categories.
if (!api_is_allowed_to_edit(null, true)) {
if ($myrow['visibility'] == 0) {
continue;
}
}
// Validation when belongs to a session
$showChildren = $categoryId == $myrow['id'] || $show == 'all';
$session_img = api_get_session_image($myrow['session_id'], $_user['status']);
$myrow['description'] = text_filter($myrow['description']);
$strVisibility = '';
$visibilityClass = null;
if ($myrow['visibility'] == '1') {
$strVisibility = '<a href="link.php?' . api_get_cidreq() . '&sec_token=' . $token . '&action=invisible&id=' . $myrow['id'] . '&scope=' . TOOL_LINK_CATEGORY . '" title="' . get_lang('Hide') . '">' . Display::return_icon('visible.png', get_lang('Hide'), array(), ICON_SIZE_SMALL) . '</a>';
} elseif ($myrow['visibility'] == '0') {
$visibilityClass = 'invisible';
$strVisibility = ' <a href="link.php?' . api_get_cidreq() . '&sec_token=' . $token . '&action=visible&id=' . $myrow['id'] . '&scope=' . TOOL_LINK_CATEGORY . '" title="' . get_lang('Show') . '">' . Display::return_icon('invisible.png', get_lang('Show'), array(), ICON_SIZE_SMALL) . '</a>';
}
echo '<tr>';
echo '<table class="data_table">';
echo '<tr>';
echo '<th width="81%" style="font-weight: bold; text-align:left;padding-left: 5px;">';
if ($showChildren) {
echo '<a class="' . $visibilityClass . '" href="' . api_get_self() . '?' . api_get_cidreq() . '&category_id=">';
echo Display::return_icon('view_remove.png');
} else {
echo '<a class="' . $visibilityClass . '" href="' . api_get_self() . '?' . api_get_cidreq() . '&category_id=' . $myrow['id'] . '">';
echo Display::return_icon('view_tree.png');
}
echo ' ' . Security::remove_XSS($myrow['category_title']) . '</a>
<br /> ' . $myrow['description'];
echo '</th>';
if (api_is_allowed_to_edit(null, true)) {
if ($session_id == $myrow['session_id']) {
echo '<th>';
echo $strVisibility;
Link::showCategoryAdminTools($myrow, $counter, count($categories));
echo '</th>';
} else {
echo '<th>' . get_lang('EditionNotAvailableFromSession');
}
}
echo '</tr>';
echo '</table>';
if ($showChildren) {
echo Link::showlinksofcategory($myrow['id']);
}
echo '</tr>';
echo '</th>';
echo '</tr>';
echo '</table>';
echo '</tr>';
$counter++;
/*
if ($myrow['visibility'] == '1') {
if (isset($urlview[$i]) && $urlview[$i] == '1') {
$newurlview = $urlview;
$newurlview[$i] = '0';
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&urlview='.Security::remove_XSS($newurlview).'">';
echo '<img src="../img/icons/22/view_remove.png" /> '.Security::remove_XSS($myrow['category_title']).'</a>
<br /> '.$myrow['description'];
echo '</th>';
if (api_is_allowed_to_edit(null, true)) {
if ($session_id == $myrow['session_id']) {
//.........这里部分代码省略.........
示例6: int_filter
$admin .= "\n</select><br />\n<label>Isi keterangan</label><br /><textarea name='message' cols='40' rows='20' id='textarea1'>{$konten}</textarea><br />\n<label>Dokumen</label><br /><input type='file' name='dokumen' size='53'><br />\n<input type='submit' value='Kirim' name='submit'>\n</form></div>";
}
if ($_GET['aksi'] == "editnews") {
$id = int_filter($_GET['id']);
$topik = int_filter($_GET['topik']);
$admin .= '<div class="border">';
$admin .= '<b>Edit Download Dengan Id =' . $id . '</b>';
$admin .= '</div>';
if (isset($_POST['submit'])) {
define("GIS_GIF", 1);
define("GIS_JPG", 2);
define("GIS_PNG", 3);
define("GIS_SWF", 4);
include "includes/hft_image.php";
$judul = text_filter($_POST['judul']);
$konten = text_filter($_POST['message']);
$dokumen_name = $_FILES['dokumen']['name'];
$error = '';
if (!$judul) {
$error .= "Error: Please enter Title of Download!<br />";
}
//if (!$konten) $error .= "Error: Please enter Content of Download!<br />";
if ($error) {
$admin .= '<div class="error">' . $error . '</div>';
} else {
if (!empty($dokumen_name)) {
$dokumen = $_FILES['dokumen']['name'];
$type_dokumen = $_FILES['dokumen']['type'];
$tmp_dokumen = $_FILES['dokumen']['tmp_name'];
$tempdokumen = 'mod/download/dokumen/';
$namadokumen = $dokumen;
示例7: kirim_mail
function kirim_mail($email, $smail, $subject, $message, $id = "", $pr = "")
{
$email = text_filter($email);
$smail = text_filter($smail);
$subject = text_filter($subject);
$id = intval($id);
$pr = !$pr ? "3" : "" . intval($pr) . "";
$mheader = "MIME-Version: 1.0\n" . "Content-Type: text/html; charset=utf-8\n" . "Reply-To: \"{$smail}\" <{$smail}>\n" . "From: \"{$smail}\" <{$smail}>\n" . "Return-Path: <{$smail}>\n" . "X-Priority: {$pr}\n" . "X-Mailer: Teamworks v2.3 Mailer\n";
@mail($email, $subject, $message, $mheader);
}
示例8: selectDescription
/**
* returns the question description
*
* @author Olivier Brouckaert
* @return string - question description
*/
function selectDescription()
{
$this->description = text_filter($this->description);
return $this->description;
}
示例9: int_filter
<td style="padding-right:5px;padding-bottom:5px;"></td>
<td style="padding-left:5px;padding-bottom:5px;"></td>
<td style="padding-left:5px;padding-bottom:5px;"><input type="submit" name="submit" value="Submit" class="button"></td>
</tr>
</table>
</form>
</div>';
}
##########################
# EDIT ONGKIR
##########################
if ($_GET['aksi'] == 'edit_ongkir') {
$idk = int_filter($_GET['idk']);
if (isset($_POST['submit'])) {
$kota = text_filter($_POST['kota']);
$ongkir = text_filter($_POST['ongkir']);
$error = '';
if (!$kota) {
$error .= "Error: Silahkan isi kota tujuan!<br />";
}
if (!$ongkir) {
$error .= "Error: Silahkan isi harga pengiriman!<br />";
}
if ($error) {
$tengah .= '<div class="error">' . $error . '</div>';
} else {
$hasil = $koneksi_db->sql_query("UPDATE ongkir SET kota='{$kota}',ongkir='{$ongkir}' WHERE idk='{$idk}'");
if ($hasil) {
$tengah .= '<div class="sukses">Ongkos Kirim berhasil di update</div>';
$style_include[] = '<meta http-equiv="refresh" content="1; url=?pilih=ongkir&mod=yes" />';
} else {
示例10: edit_document
/**
* Edit a document based on $_POST and $_GET parameters 'dir' and 'path'
* @param array $_course array
* @return void
*/
public function edit_document($_course)
{
$course_id = api_get_course_int_id();
global $_configuration;
$dir = isset($_GET['dir']) ? $_GET['dir'] : $_POST['dir'];
// Please, do not modify this dirname formatting.
if (strstr($dir, '..')) {
$dir = '/';
}
if ($dir[0] == '.') {
$dir = substr($dir, 1);
}
if ($dir[0] != '/') {
$dir = '/' . $dir;
}
if ($dir[strlen($dir) - 1] != '/') {
$dir .= '/';
}
$filepath = api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/document' . $dir;
if (!is_dir($filepath)) {
$filepath = api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/document/';
$dir = '/';
}
$table_doc = Database::get_course_table(TABLE_DOCUMENT);
if (isset($_POST['path']) && !empty($_POST['path'])) {
$document_id = intval($_POST['path']);
$sql = "SELECT path FROM " . $table_doc . " WHERE c_id = {$course_id} AND id = " . $document_id;
$res = Database::query($sql);
$row = Database::fetch_array($res);
$content = stripslashes($_POST['content_lp']);
$file = $filepath . $row['path'];
if ($fp = @fopen($file, 'w')) {
$content = text_filter($content);
$content = str_replace(api_get_path(WEB_COURSE_PATH), $_configuration['url_append'] . '/courses/', $content);
// Change the path of mp3 to absolute.
// The first regexp deals with ../../../ urls.
$content = preg_replace("|(flashvars=\"file=)(\\.+/)+|", "\$1" . api_get_path(REL_COURSE_PATH) . $_course['path'] . '/document/', $content);
// The second regexp deals with audio/ urls.
$content = preg_replace("|(flashvars=\"file=)([^/]+)/|", "\$1" . api_get_path(REL_COURSE_PATH) . $_course['path'] . '/document/$2/', $content);
fputs($fp, $content);
fclose($fp);
$sql_update = "UPDATE " . $table_doc . " SET title='" . Database::escape_string($_POST['title']) . "' WHERE c_id = " . $course_id . " AND id = " . $document_id;
Database::query($sql_update);
}
}
}
示例11: int_filter
##########################
# EDIT PRODUK
##########################
if ($_GET['aksi'] == 'edit_produk') {
$id = int_filter($_GET['id']);
if (isset($_POST['submit'])) {
define("GIS_GIF", 1);
define("GIS_JPG", 2);
define("GIS_PNG", 3);
define("GIS_SWF", 4);
include "includes/hft_image.php";
$judul = text_filter($_POST['judul']);
$kategori = text_filter($_POST['kategori']);
$desc = $_POST['desc'];
$gambar = $_FILES['gambar']['name'];
$gambar_lama = text_filter($_POST['gambar_lama']);
$gambartambahan = $_FILES['gambartambahan']['name'];
$tgl = $_POST['tgl'];
$client = $_POST['client'];
$kota = $_POST['kota'];
$jenis = $_POST['jenis'];
$error = '';
if (!$judul) {
$error .= "Error: Silahkan Isi Nama Produknya!<br />";
}
if (!$desc) {
$error .= "Error: Silahkan Isi Keterangannya!<br />";
}
if ($error) {
$tengah .= '<div class="error">' . $error . '</div>';
} else {
示例12: int_filter
</tr>
</table>
</form>
</div>';
}
##########################
# EDIT BANK
##########################
if ($_GET['aksi'] == 'edit_bank') {
$id = int_filter($_GET['id']);
if (isset($_POST['submit'])) {
$bank = text_filter($_POST['bank']);
$nama = text_filter($_POST['nama']);
$rekening = $_POST['rekening'];
$logo = $_FILES['logo']['name'];
$logo_lama = text_filter($_POST['gambar_logo']);
$error = '';
if (!$bank) {
$error .= "Error: Silahkan Isi Nama Bank Anda!<br />";
}
if (!$nama) {
$error .= "Error: Silahkan Isi Nama Akun Bank Anda!<br />";
}
if (!$rekening) {
$error .= "Error: Silahkan Isi Nomor Rekening Bank Anda!<br />";
}
if ($error) {
$tengah .= '<div class="error">' . $error . '</div>';
}
$hasil = $koneksi_db->sql_query("UPDATE bank SET bank='{$bank}',nama='{$nama}',rekening='{$rekening}' WHERE id='{$id}'");
if ($hasil) {
示例13: exportitem
//.........这里部分代码省略.........
if ($barreMois != api_format_date($start_date_local, "%m")) {
// 3.1.1 Update the check value for the month bar.
$barreMois = api_format_date($start_date_local, "%m");
// 3.1.2 Display the month bar.
$expcontent .= "<tr><td id=\"title\" colspan=\"2\" class=\"month\" valign=\"top\">".api_format_date($start_date_local, "%B %Y")."</td></tr>";
}
// 3.2 Display the agenda items (of this month): the date, hour and title.
$db_date = (int) api_format_date($start_date_local, "%d");
if ($_GET['day'] != $db_date) {
// 3.2.1.a If the day given in the URL (might not be set) is different from this element's day, use style 'data'.
$expcontent .= "<tr><td class=\"data\" colspan='2'>";
} else {
// 3.2.1.b Else (same day) use style 'datanow'.
$expcontent .= "<tr><td class=\"datanow\" colspan='2'>";
}
// 3.2.2 Mark an anchor for this date.
$expcontent .= "<a name=\"".$db_date."\"></a>"; // anchoring
// 3.2.3 Write the date and time of this event to the export string.
$expcontent .= api_format_date($start_date_local);
// 3.2.4 If a duration is set, write it, otherwise ignore.
if ($myrow['duration'] == '') {
$expcontent .= "<br />";
} else {
$expcontent .= " / ".$langLasting." ".$myrow['duration']."<br />"; //langLasting comes from lang/x/agenda.inc.php
}
// 3.2.5 Write the title.
$expcontent .= $myrow['title'];
$expcontent .= "</td></tr>";
// 3.2.6 Prepare the content of the agenda item.
$content = $myrow['content'];
// 3.2.7 Make clickable???
$content = make_clickable($content);
$content = text_filter($content);
// 3.2.8 Write the prepared content to the export string.
$expcontent .= "<tr><td class=\"text\" colspan='2'>";
$expcontent .= $content;
$expcontent .= "</td></tr>";
// Displaying the agenda item of this month: the added resources.
// This part is not included into LP export.
/*if (check_added_resources("Agenda", $myrow['id'])) {
$content.= "<tr><td colspan='2'>";
$content.= "<i>".get_lang('AddedResources')."</i><br />";
display_added_resources("Agenda", $myrow['id']);
$content.= "</td></tr>";
}*/
}
// 4. Finish the export string.
$expcontent .= "<tr></table>";
break;
// ANNOUNCEMENT BEGIN
case 'Ad_Valvas':
// 1. Get the announcement data from the database
$tbl_announcement = Database::get_course_table(TABLE_ANNOUNCEMENT);
$sql = "SELECT * FROM $tbl_announcement WHERE c_id = $course_id AND id='$item_id'";
$result = Database::query($sql);
// 2. Initialise export string
$expcontent .= "<table class=\"data_table\">";
// 3. For each announcement matching the query
while ($myrow = Database::fetch_array($result)) {
示例14: foreach
foreach ($resultcategories as $myrow) {
// Validation when belongs to a session
$session_img = api_get_session_image($myrow['session_id'], $_user['status']);
//if (!isset($urlview)) {
if ($urlview == '') {
// No $view set in the url, thus for each category link it should be all zeros except it's own
makedefaultviewcode($i);
} else {
$view = $urlview;
$view[$i] = '1';
}
// If the $urlview has a 1 for this categorie, this means it is expanded and should be desplayed as a
// - instead of a +, the category is no longer clickable and all the links of this category are displayed
$myrow['description'] = text_filter($myrow['description']);
$strVisibility = '';
if ($myrow['visibility'] == '1') {
$strVisibility = '<a href="link.php?' . api_get_cidreq() . '&sec_token='.$token.'&action=invisible&id=' . $myrow['id'] . '&scope=' . TOOL_LINK_CATEGORY . '" title="' . get_lang('Hide') . '">' .
Display :: return_icon('visible.png', get_lang('Hide'), array (), ICON_SIZE_SMALL) . '</a>';
} elseif ($myrow['visibility'] == '0') {
$strVisibility = ' <a href="link.php?' . api_get_cidreq() . '&sec_token='.$token.'&action=visible&id=' . $myrow['id'] . '&scope=' . TOOL_LINK_CATEGORY . '" title="' . get_lang('Show') . '">' .
Display :: return_icon('invisible.png', get_lang('Show'), array (), ICON_SIZE_SMALL) . '</a>';
}
if ($myrow['visibility'] == '1') {
if (isset($urlview[$i]) && $urlview[$i] == '1') {
$newurlview = $urlview;
$newurlview[$i] = '0';
echo '<tr>';
示例15: Header
/**
* Teamworks v2.3
* http://www.teamworks.co.id
* December 03, 2007 07:29:56 AM
* Author: Teamworks Creative - reky@teamworks.co.id - +6285732037068 - pin 25b7edd4
*/
if (!defined('AURACMS_CONTENT')) {
Header("Location: ../index.php");
exit;
}
global $koneksi_db, $email_master, $judul_situs, $alamatkantor;
$index_hal = 1;
if (isset($_POST['submit'])) {
$nama = text_filter($_POST['nama']);
$email = text_filter($_POST['email']);
$pesan = nl2br(text_filter($_POST['pesan'], 2));
$error = '';
if (!is_valid_email($email)) {
$error .= "Error: E-Mail address invalid!<br />";
}
$gfx_check = $_POST['gfx_check'];
if (!$nama) {
$error .= "Error: Please enter your name!<br />";
}
if (!$pesan) {
$error .= "Error: Please enter a message!<br />";
}
// $code = substr(hexdec(md5("".date("F j")."".$_POST['random_num']."".$sitekey."")), 2, 6);
if ($gfx_check != $_SESSION['Var_session'] or !isset($_SESSION['Var_session'])) {
$error .= "Security Code Invalid <br />";
}