<?php
/*
Template Name: Talep Formu
*/
?>
<?php get_header(); ?>
<div id="globalContainer" class="grid01">
<div class="grid02 mTop20 mBottom20 mAuto">
<hr class="rool" />
</div>
<div class="clear"></div>
<div id="mainHeadline" class="grid03 mTop10 mAuto pLeft15 pRight15">
<?php wp_reset_query(); if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="text"><?php the_title(); ?></div>
<? endwhile;endif; ?>
</div>
<div class="clear"></div>
<div id="mainProduct" class="grid01 mTop20">
<div class="grid03 mAuto pLeft15 pRight15">
<div class="productList archive single">
<?php
if(isset($_POST['gonder']))
{
$ad = $_POST['ad'];
$mail = $_POST['mail'];
$adres = $_POST['adres'];
$ilce = $_POST['ilce'];
$il = $_POST['il'];
$tel = $_POST['tel'];
$gsm = $_POST['gsm'];
$faks = $_POST['faks'];
$marka = $_POST['marka'];
$ariza = $_POST['ariza'];
$taleb = $_POST['taleb'];
$icerik = 'İsim / Firma : ' . $ad . '<br />
Mail : ' . $mail . '<br />
Adres : ' . $adres . '<br />
İlçe : ' . $ilce . '<br />
İl : ' . $il . '<br />
Tel : ' . $tel . '<br />
Gsm : ' . $gsm . '<br />
Faks : ' . $faks . '<br />
Marka / Model : ' . $marka . '<br />
Arıza : ' . $ariza . '<br />
Talep : ' . $taleb;
$articleOption = array();
$articleOption['post_title'] = 'Arıza : '.$marka.'[ '.$ad.' ]';
$articleOption['post_type'] = 'talep';
$articleOption['post_content'] = $icerik;
$articleOption['post_status'] = 'pending';
$articleOption['post_author'] = 1;
if ($post_id = wp_insert_post($articleOption))
{
//mysql_query("UPDATE wp_posts SET post_content= '" . $icerik . "' WHERE id='" . $post_id . "'");
echo '<div class="succ">Talebiniz Alınmıştır. Yetkili Arkadaşlarımız En Kısa Sürede Size Geri Dönüş Yapacaktır.</div>';
}else{
echo '<div class="error">Bir Hata Oluştu. Lütfen Daha Sonra Tekrar Deneyiniz.</div>';
}
}
?>
<form action="" method="post">
<div class="talep-formu">
<span class="input">
<input type="text" class="input__field" id="input-1" value="<?php echo $ad; ?>" name="ad"/>
<label for="input-1" class="input__label" >
<span class="input__label-content">Ad Soyad / Firma Adı</span>
</label>
</span>
<span class="input">
<input type="text" class="input__field" id="input-2" value="<?php echo $mail; ?>" name="mail"/>
<label for="input-2" class="input__label">
<span class="input__label-content">E-Posta</span>
</label>
</span>
<span class="input">
<input type="text" class="input__field" id="input-3" value="<?php echo $adres; ?>" name="adres"/>
<label for="input-3" class="input__label">
<span class="input__label-content">Adres</span>
</label>
</span>
<span class="input">
<input type="text" class="input__field" id="input-4" value="<?php echo $ilce; ?>" name="ilce"/>
<label for="input-4" class="input__label">
<span class="input__label-content">İlçe</span>
</label>
</span>
<span class="input">
<input type="text" class="input__field" id="input-5" value="<?php echo $il; ?>" name="il"/>
<label for="input-5" class="input__label">
<span class="input__label-content">İl</span>
</label>
</span>
<span class="input">
<input type="text" class="input__field" id="input-6" value="<?php echo $tel; ?>" name="tel"/>
<label for="input-6" class="input__label">
<span class="input__label-content">Telefon</span>
</label>
</span>
<span class="input">
<input type="text" class="input__field" id="input-7" value="<?php echo $gsm; ?>" name="gsm"/>
<label for="input-7" class="input__label">
<span class="input__label-content">GSM</span>
</label>
</span>
<span class="input">
<input type="text" class="input__field" id="input-8" value="<?php echo $faks; ?>" name="faks"/>
<label for="input-8" class="input__label">
<span class="input__label-content">FAKS</span>
</label>
</span>
<span class="input">
<input type="text" class="input__field" id="input-10" value="<?php echo $marka; ?>" name="marka"/>
<label for="input-10" class="input__label">
<span class="input__label-content">Marka / Model</span>
</label>
</span>
<span class="input message">
<textarea class="input__field" id="input-11" name="ariza"><?php echo $ariza; ?></textarea>
<label for="input-11" class="input__label">
<span class="input__label-content">Arıza Durumu / Sebebi</span>
</label>
</span>
<span class="input message">
<textarea class="input__field" id="input-12" name="taleb"><?php echo $taleb; ?></textarea>
<label for="input-12" class="input__label">
<span class="input__label-content">Talebiniz</span>
</label>
</span>
<input type="submit" name="gonder"id="send-button" value="Gönder" />
</div>
</form>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>üstadlar elimde böyle bir taslak var ben bu form da herseyin zorunlu alan olmasını ve benim belirledigim bir mail adresine gönderilmesini istiyorum fakat bir türlü düzenleyemedim yardımcı olurmusunuz
iletişim formu zorunlu alan
0
●684
- 27-10-2017, 00:38:25