İndex.php aşağıdaki gibidir metaları nereye ekleyebilirim
application/x-httpd-php index.php ( PHP script, UTF-8 Unicode text )
<?php
ob_start();
error_reporting(E_ALL^E_NOTICE);
header('Content-Type: text/html; charset=utf-8');
setlocale(LC_ALL, 'tr_TR.UTF-8');
/*
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
*/
include('application/settings.php');
include('application/db.php');
include('application/functions.php');
if(count($_POST)>0)
{
// Form mail gönderimi
if(isset($_POST['name']) && !empty($_POST['name']) && isset($_POST['email']) && !empty($_POST['email']) && filter_var($_POST['email'], FILTER_VALIDATE_EMAIL))
{
$subject = $site['name'].' İletişim Formu Mesajı';
$msg = '<p>Sitenin iletişim formundan aşağıdaki mesaj gönderilmiştir.</p>';
$msg .= '<ul><strong>Gönderen: </strong>'.$_POST['name'].' '.$_POST['surname'].' (<a href="mailto:'.$_POST['email'].'">'.$_POST['email'].'</a> '.$_POST['phone'].')<br>';
$msg .= '<strong>Gönderen IP: </strong>'.$_SERVER['REMOTE_ADDR'].'<br>';
$msg .= '<strong>Gönderim zamanı: </strong>'.date('d-m-Y H:i:s').'<br>';
$msg .= '<strong>Şirket: </strong>: '.$_POST['company'].'<br>';
$msg .= '<strong>Konu: </strong>: '.$_POST['subject'].'<br>';
$msg .= '<strong>Mesaj: </strong><pre>'.$_POST['message'].'</pre>';
$msg .= '</ul>';
$mailProccess = email($site['email'], $subject, $msg);
}
if(isset($_POST['email']) && !empty($_POST['email']) && filter_var($_POST['email'], FILTER_VALIDATE_EMAIL))
{
if(counter('emails', 'email', $_POST['email'])==0) $newsletterSql = sqlQ("INSERT INTO `emails` (`id`,`email`,`date`,`ip`,`status`) VALUES (NULL, '".$_POST['email']."', NOW(), '".$_SERVER['REMOTE_ADDR']."', '1');");
}
}
include('application/inc/head.php');
include('application/inc/header.php');
if(!isset($_GET['page']) || (isset($_GET['page']) && empty($_GET['page'])))
{
include('application/pages/main.php');
}
else if(!empty($_GET['page']))
{
if($_GET['page']=='contact') include('application/pages/contact.php');
else if($_GET['page']=='news') include('application/pages/news.php');
else if($_GET['page']=='references') include('application/pages/references.php');
else if($_GET['page']=='services') include('application/pages/services.php');
else if(is_numeric($_GET['page'])) include('application/pages/page.php');
}
else
{
include('application/pages/main.php');
}
include('application/inc/footer.php');
sqlQ("INSERT INTO `counter` (`id`,`ip`,`qa`,`tm`) VALUES (NULL, '".$_SERVER['REMOTE_ADDR']."', '".$_SERVER['QUERY_STRING']."', NOW());");