📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
b2be-ticaretscripti.demodesign.com.tr
/
boss
/
pages
📝
epostaduzenle.php
← Geri Dön
<?php if ($_GET['duzenle']) { $id = temizle($_GET['duzenle']); $sayfam = $ozy->query("select * from tiletisim where id=$id")->fetch(PDO::FETCH_ASSOC); ///Sayfa güncelleme kodları başlangıç if (isset($_POST['guncelle'])) { $adi = temizle($_POST['adi']); $epostalar = $_POST["epostalar"]; $epostalarimiz = implode(",", $epostalar); $konu = temizle($_POST['konu']); $mesaj = $_POST['mesaj']; $durum = $_POST['durum']; if ($durum == '1') { include "../mail/PHPMailerAutoload.php"; $mail = new PHPMailer(); $mail->IsSMTP(); //$mail->SMTPDebug = 1; // hata ayiklama: 1 = hata ve mesaj, 2 = sadece mesaj $mail->SMTPAuth = true; $mail->SMTPSecure = "$type"; // Güvenli baglanti icin ssl normal baglanti icin tls $mail->Host = "$sunucu"; // Mail sunucusuna ismi $mail->Port = "$port"; // Gucenli baglanti icin 465 Normal baglanti icin 587 $mail->IsHTML(true); $mail->SetLanguage("tr", "phpmailer/language"); $mail->CharSet = "utf-8"; $mail->Username = "$posta"; // Mail adresimizin kullanicı adi $mail->Password = "$esifre"; // Mail adresimizin sifresi $mail->SetFrom($mail->Username, '' . $siteadi . ''); $mail->AddAddress($posta); // Maili gonderecegimiz kisi yani alici foreach ($epostalar as $trr) { $topluepostalar = trim($trr, ","); $mail->AddCC($topluepostalar, $siteadi); } $mail->addReplyTo($posta, $siteadi); $mail->Subject = $konu; // Konu basligi $mail->Body = ' ' . $mesaj . ''; // Mailin icerigi if (!$mail->Send()) { } else { } } $stmt = $ozy->prepare("UPDATE tiletisim SET adi = ?, konu = ?, mesaj = ?, durum = ?, epostalar = ? WHERE id = ?"); $result2 = $stmt->execute([$adi, $konu, $mesaj, $durum, $epostalarimiz, $id]); if ($result2) { echo '<script type="text/javascript">$(document).ready(function(){toastr["success"]("Başarıyla toplu eposta iletildi.", "Başarılı");});</script>'; echo '<meta http-equiv="refresh" content="1; url=' . $url . '/boss/eposta-duzenle/' . $id . '">'; } else { echo '<script type="text/javascript">$(document).ready(function(){toastr["error"]("Üzgünüm bir hata oluştu :(", "Başarısız");});</script>'; } } ////Sayfa güncelleme kodları bitiş } if (isset($_POST['kaydet'])) { $adi = temizle($_POST['adi']); $epostalar = $_POST["epostalar"]; $epostalarimiz = implode(",", $epostalar); $konu = temizle($_POST['konu']); $mesaj = $_POST['mesaj']; $tarih = date('d.m.Y H:i:s'); $durum = $_POST['durum']; if ($durum == '1') { include "../mail/PHPMailerAutoload.php"; $mail = new PHPMailer(); $mail->IsSMTP(); //$mail->SMTPDebug = 1; // hata ayiklama: 1 = hata ve mesaj, 2 = sadece mesaj $mail->SMTPAuth = true; $mail->SMTPSecure = "$type"; // Güvenli baglanti icin ssl normal baglanti icin tls $mail->Host = "$sunucu"; // Mail sunucusuna ismi $mail->Port = "$port"; // Gucenli baglanti icin 465 Normal baglanti icin 587 $mail->IsHTML(true); $mail->SetLanguage("tr", "phpmailer/language"); $mail->CharSet = "utf-8"; $mail->Username = "$posta"; // Mail adresimizin kullanicı adi $mail->Password = "$esifre"; // Mail adresimizin sifresi $mail->SetFrom($mail->Username, '' . $siteadi . ''); $mail->AddAddress($posta); // Maili gonderecegimiz kisi yani alici foreach ($epostalar as $trr) { $topluepostalar = trim($trr, ","); $mail->AddCC($topluepostalar, $siteadi); } $mail->addReplyTo($posta, $siteadi); $mail->Subject = $konu; // Konu basligi $mail->Body = ' ' . $mesaj . ''; // Mailin icerigi if (!$mail->Send()) { } else { echo '<script type="text/javascript">$(document).ready(function(){toastr["success"]("Başarıyla toplu eposta iletildi.", "Başarılı");});</script>'; } } $stmt = $ozy->prepare("INSERT INTO tiletisim (adi, konu, mesaj, durum, epostalar,tarih) VALUES (?,?,?,?,?,?)"); $result2 = $stmt->execute([$adi, $konu, $mesaj, $durum, $epostalarimiz, $tarih]); if ($result2) { echo '<script type="text/javascript">$(document).ready(function(){toastr["success"]("Başarıyla şablon kayıt edildi.", "Başarılı");});</script>'; } else { echo '<script type="text/javascript">$(document).ready(function(){toastr["error"]("Üzgünüm bir hata oluştu :(", "Başarısız");});</script>'; } } ?> <div class="container-fluid"> <div class="row page-title"> <div class="col-sm-6"> <h3>Toplu Eposta</h3> </div> <div class="col-sm-6"> <nav> <ol class="breadcrumb justify-content-sm-end align-items-center"> <li class="breadcrumb-item"> <a href="/boss/anasayfa.php"> <svg class="svg-color"> <use href="datas/svg/iconly-sprite.svg#Home"></use> </svg> </a> </li> <li class="breadcrumb-item active">Toplu Eposta</li> </ol> </nav> </div> </div> </div> <div class="container-fluid ecommerce-dashboard"> <div class="row"> <div class="col-12 col-md-4"> <div class="card m-b-30"> <div class="card-body table-responsive"> <a href="eposta-gonder" class="btn btn-danger rounded btn-custom btn-block waves-effect waves-light" style="width: 100%;">Toplu Eposta Gönder</a> <br> <div class="mail-list m-t-10" style="display: flex;"> <a href="gelen-kutusu" style="width: 25%; text-align: center;"> <div style="margin: 5px; background: black; color: white; border-radius: 5px; padding: 5px;"> <span class="float-right"> <?php $gelen = $ozy->prepare("SELECT COUNT(*) FROM iletisim"); $gelen->execute(); $gelenmesajsayisi = $gelen->fetchColumn(); echo $gelenmesajsayisi; ?> </span> <i class="ti-archive mr-2"></i> Gelen </div> </a> <a href="gelen-kutusu?s=1" style="width: 25%; text-align: center;"> <div style="margin: 5px; background: black; color: white; border-radius: 5px; padding: 5px;"> <span class="float-right"> <?php $giden = $ozy->prepare("SELECT COUNT(*) FROM iletisim where giden='1'"); $giden->execute(); $gidenmesajsayisi = $giden->fetchColumn(); echo $gidenmesajsayisi; ?> </span> <i class="ti-location-arrow mr-2"></i> Cevaplanan </div> </a> <a href="gelen-kutusu?s=2" style="width: 25%; text-align: center;"> <div style="margin: 5px; background: black; color: white; border-radius: 5px; padding: 5px;"> <span class="float-right"> <?php $silinen = $ozy->prepare("SELECT COUNT(*) FROM iletisim where durum='0'"); $silinen->execute(); $silinenmesajsayisi = $silinen->fetchColumn(); echo $silinenmesajsayisi; ?> </span> <i class="ti-trash mr-2"></i> Silinen </div> </a> <a href="toplu-eposta" class="active" style="width: 25%; text-align: center;"> <div style="margin: 5px; background: black; color: white; border-radius: 5px; padding: 5px;"> <span class="float-right"> <?php $toplu = $ozy->prepare("SELECT COUNT(*) FROM tiletisim"); $toplu->execute(); $toplueposta = $toplu->fetchColumn(); echo $toplueposta; ?> </span> <i class="ti-pencil mr-2"></i>Toplu Eposta </div> </a> </div> </div> </div> </div> <div class="col-12 col-md-8"> <div class="card m-b-30"> <div class="card-body"> <form class="form-horizontal theme-form" action="" method="POST" enctype="multipart/form-data"> <div class="form-group mb-3"> <input type="text" class="form-control" name="adi" value="<?php echo $sayfam["adi"]; ?>" placeholder="Eposta Şablon Adı"> </div> <?php if ($_GET["duzenle"]) { ?> <div class="form-group mb-3"> <select style="min-height:300px;" class="form-control" name="epostalar[]" multiple="multiple"> <?php $katz12 = $ozy->query("select * from bayigrup where durum='1'")->fetchAll(PDO::FETCH_ASSOC); foreach ($katz12 as $dez12) { ?> <optgroup label="Bayi Grup - <?php echo $dez12["adi"]; ?>"> <?php $grup = $dez12["id"]; $katz1 = $ozy->query("select email from users where onay='1' and bayi='1' and bayigrup='$grup' group by email")->fetchAll(PDO::FETCH_ASSOC); foreach ($katz1 as $dez1) { ?> <?php $katidler = $sayfam["epostalar"]; $katidler = explode(",", $katidler); foreach ($katidler as $anahtar => $katdeger) { ?> <option <?php if ($dez1["email"] == $katdeger) { ?> selected="selected" <?php }}?> value="<?php echo $dez1["email"]; ?>"><?php echo $dez1["email"]; ?></option> <?php } ?> </optgroup> <?php } ?> <optgroup label="Üyeler"> <?php $katz = $ozy->query("select email from users where onay='1' and bayi!='1' group by email")->fetchAll(PDO::FETCH_ASSOC); foreach ($katz as $dez) { ?> <?php $katidler = $sayfam["epostalar"]; $katidler = explode(",", $katidler); foreach ($katidler as $anahtar => $katdeger) { ?> <option <?php if ($dez["email"] == $katdeger) { ?> selected="selected" <?php }} ?> value="<?php echo $dez["email"]; ?>"><?php echo $dez["email"]; ?></option> <?php } ?> </optgroup> <optgroup label="Ebülten"> <?php $kat = $ozy->query("select eposta from ebulten group by eposta")->fetchAll(PDO::FETCH_ASSOC); foreach ($kat as $de) { ?> <?php $katidler = $sayfam["epostalar"]; $katidler = explode(",", $katidler); foreach ($katidler as $anahtar => $katdeger) { ?> <option <?php if ($de["eposta"] == $katdeger) { ?> selected="selected" <?php }} ?> value="<?php echo $de["eposta"]; ?>"><?php echo $de["eposta"]; ?></option> <?php } ?> </optgroup> </select> </div> <?php } else { ?> <div class="form-group mb-3"> <select style="min-height:300px;" class="form-control" name="epostalar[]" multiple="multiple"> <?php $katz12 = $ozy->query("select * from bayigrup where durum='1'")->fetchAll(PDO::FETCH_ASSOC); foreach ($katz12 as $dez12) { ?> <optgroup label="Bayi Grup - <?php echo $dez12["adi"]; ?>"> <?php $grup = $dez12["id"]; $katz1 = $ozy->query("select email from users where onay='1' and bayi='1' and bayigrup='$grup' group by email")->fetchAll(PDO::FETCH_ASSOC); foreach ($katz1 as $dez1) { ?> <option selected="selected" value="<?php echo $dez1["email"]; ?>"><?php echo $dez1["email"]; ?></option> <?php } ?> </optgroup> <?php } ?> <optgroup label="Üyeler"> <?php $katz = $ozy->query("select email from users where onay='1' and bayi!='1' group by email")->fetchAll(PDO::FETCH_ASSOC); foreach ($katz as $dez) { ?> <option selected="selected" value="<?php echo $dez["email"]; ?>"><?php echo $dez["email"]; ?></option> <?php } ?> </optgroup> <optgroup label="Ebülten"> <?php $kat = $ozy->query("select eposta from ebulten group by eposta")->fetchAll(PDO::FETCH_ASSOC); foreach ($kat as $de) { ?> <option value="<?php echo $de["eposta"]; ?>" selected="selected"><?php echo $de["eposta"]; ?></option> <?php } ?> </optgroup> </select> </div> <?php } ?> <div class="form-group mb-3"> <input type="text" class="form-control" name="konu" placeholder="Konunuz" value="<?php echo $sayfam["konu"]; ?>"> </div> <?php if ($_GET["duzenle"]) { ?> <div class="form-group mb-3"> <label for="example-text-input" class="col-sm-5 form-label">Epostayı Şimdi Gönder</label> <div class="col-sm-7"> <input type="checkbox" <?php if ($sayfam["durum"] == "1") { ?> checked="" <?php } ?> value="1" data-toggle="toggle" data-onstyle="primary" data-offstyle="secondary" name="durum"> </div> </div> <?php } else { ?> <div class="form-group mb-3"> <label for="example-text-input" class="col-sm-5 form-label">Epostayı Şimdi Gönder</label> <div class="col-sm-7"> <input type="checkbox" checked="" value="1" data-toggle="toggle" data-onstyle="primary" data-offstyle="secondary" name="durum"> </div> </div> <?php } ?> <div class="form-group mb-3"> <textarea id="summernote" rows="6" name="mesaj" placeholder="Eposta İçeriğiniz"> <?php if ($sayfam["durum"] == "1") { ?> <?php echo $sayfam["mesaj"]; ?> <?php } else { ?> <body link="#00a5b5" vlink="#00a5b5" alink="#00a5b5"> <table class=" main contenttable" align="center" style="font-weight: normal;border-collapse: collapse;border: 0;margin-left: auto;margin-right: auto;padding: 0;font-family: Arial, sans-serif;color: #555559;background-color: white;font-size: 16px;line-height: 26px;width: 600px;"> <tr> <td class="border" style="border-collapse: collapse;border: 1px solid #eeeff0;margin: 0;padding: 0;-webkit-text-size-adjust: none;color: #555559;font-family: Arial, sans-serif;font-size: 16px;line-height: 26px;"> <table style="height: 800px !important;font-weight: normal;border-collapse: collapse;border: 0;margin: 0;padding: 0;font-family: Arial, sans-serif;"> <tr> <td colspan="4" valign="top" class="image-section" style="border-collapse: collapse;border: 0;margin: 0;padding: 0;-webkit-text-size-adjust: none;color: #555559;font-family: Arial, sans-serif;font-size: 16px;line-height: 26px;background-color: #fff;border-bottom: 4px solid #00a5b5"> <a href="<?php echo $ayar["siteurl"]; ?>"><img style="height: 70px;line-height: 1;width: 200px;margin: 10px;" class="top-image" src="<?php echo $ayar["siteurl"]; ?>/resimler/siteayarlari/<?php echo $ayar["logo"]; ?>" alt="<?php echo $ayar["siteadi"]; ?>"></a> </td> </tr> <tr> <td valign="top" class="side title" style="border-collapse: collapse;border: 0;margin: 0;padding: 20px;-webkit-text-size-adjust: none;color: #555559;font-family: Arial, sans-serif;font-size: 16px;line-height: 26px;vertical-align: top;background-color: white;border-top: none;"> <table style="font-weight: normal;border-collapse: collapse;border: 0;margin: 0;padding: 0;font-family: Arial, sans-serif;"> <tr> <td class="grey-block" style="border-collapse: collapse;border: 0;margin: 0;-webkit-text-size-adjust: none;color: #555559;font-family: Arial, sans-serif;font-size: 16px;line-height: 26px;background-color: #fff; text-align:center;"> <div class="mktEditable" id="cta"> <img class="top-image" src="<?php echo $ayar["siteurl"]; ?>/mail/webinar-no-text.png" width="560"/><br><br> <strong>Örnek Mesaj Alanıdır.</strong> <a href="" style="color:#ffffff; background-color: #ff8300; border: 10px solid #ff8300; border-radius: 3px; text-decoration:none;" target="_blank">Örnek Buton</a> </div> </td> </tr> <tr> <td valign="top" align="center" style="border-collapse: collapse;border: 0;margin: 0;padding: 0;-webkit-text-size-adjust: none;color: #555559;font-family: Arial, sans-serif;font-size: 16px;line-height: 26px;"> <table style="font-weight: normal;border-collapse: collapse;border: 0;margin: 0;padding: 0;font-family: Arial, sans-serif;"> <tr> <td align="center" valign="middle" class="social" style="border-collapse: collapse;border: 0;margin: 0;padding: 10px;-webkit-text-size-adjust: none;color: #555559;font-family: Arial, sans-serif;font-size: 16px;line-height: 26px;text-align: center;"> <table style="font-weight: normal;border-collapse: collapse;border: 0;margin: 0;padding: 0;font-family: Arial, sans-serif;"> <tr> <td style="border-collapse: collapse;border: 0;margin: 0;padding: 5px;-webkit-text-size-adjust: none;color: #555559;font-family: Arial, sans-serif;font-size: 16px;line-height: 26px;"><a target="_blank" href="<?php echo $ayar["siteurl"]; ?>/blog"><img src="<?php echo $ayar["siteurl"]; ?>/mail/rss-teal.png"></a></td> <td style="border-collapse: collapse;border: 0;margin: 0;padding: 5px;-webkit-text-size-adjust: none;color: #555559;font-family: Arial, sans-serif;font-size: 16px;line-height: 26px;"><a target="_blank" href="<?php echo $ayar["twitter"]; ?>"><img src="<?php echo $ayar["siteurl"]; ?>/mail/twitter-teal.png"></a></td> <td style="border-collapse: collapse;border: 0;margin: 0;padding: 5px;-webkit-text-size-adjust: none;color: #555559;font-family: Arial, sans-serif;font-size: 16px;line-height: 26px;"><a target="_blank" href="<?php echo $ayar["facebook"]; ?>"><img src="<?php echo $ayar["siteurl"]; ?>/mail/facebook-teal.png"></a></td> <td style="border-collapse: collapse;border: 0;margin: 0;padding: 5px;-webkit-text-size-adjust: none;color: #555559;font-family: Arial, sans-serif;font-size: 16px;line-height: 26px;"><a target="_blank" href="<?php echo $ayar["youtube"]; ?>"><img src="<?php echo $ayar["siteurl"]; ?>/mail/youtube-teal.png"></a></td> <td style="border-collapse: collapse;border: 0;margin: 0;padding: 5px;-webkit-text-size-adjust: none;color: #555559;font-family: Arial, sans-serif;font-size: 16px;line-height: 26px;"><a target="_blank" href="<?php echo $ayar["instagram"]; ?>"><img width="20px" height="20px" src="<?php echo $ayar["siteurl"]; ?>/mail/linkedin-teal.png"></a></td> <td style="border-collapse: collapse;border: 0;margin: 0;padding: 5px;-webkit-text-size-adjust: none;color: #555559;font-family: Arial, sans-serif;font-size: 16px;line-height: 26px;"><a target="_blank" href="<?php echo $ayar["googleplus"]; ?>"><img src="<?php echo $ayar["siteurl"]; ?>/mail/google-teal.png"></a></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr bgcolor="#fff" style="border-top: 4px solid #00a5b5;"> <td valign="top" style="border-collapse: collapse;border: 0;margin: 0;padding: 0;-webkit-text-size-adjust: none;color: #555559;font-family: Arial, sans-serif;font-size: 16px;line-height: 26px;background: #fff;text-align: center;"> <table style="font-weight: normal;border-collapse: collapse;border: 0;margin: 0;padding: 0;font-family: Arial, sans-serif;"> <tr> <td class="inside-footer" align="center" valign="middle" style="border-collapse: collapse;border: 0;margin: 0;padding: 20px;-webkit-text-size-adjust: none;color: #555559;font-family: Arial, sans-serif;font-size: 12px;line-height: 16px;vertical-align: middle;text-align: center;width: 580px;"> <div id="address" class="mktEditable"> <b><?php echo $ayar["siteadi"]; ?></b><br> <?php echo $ayar["adres"]; ?><br> <?php echo $ayar["tel"]; ?> <?php echo $ayar["email"]; ?><br> <a style="color: #00a5b5;" href="<?php echo $ayar["siteurl"]; ?>/iletisim/">Bize Ulaşın</a> </div> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </body> <?php } ?> </textarea> </div> <?php if ($_GET["duzenle"]) { ?> <button type="submit" name="guncelle" class="btn btn-danger waves-effect m-t-30" style="width: 100%; margin-block-start: 15px;">Toplu Eposta Gönder <i class="mdi mdi-share"></i></button> <?php } else { ?> <button type="submit" name="kaydet" class="btn btn-warning waves-effect m-t-30" style="width: 100%; margin-block-start: 15px;">Toplu Eposta Gönder<i class="mdi mdi-share"></i></button> <?php } ?> </form> </div> </div> </div> </div> </div>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula