0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.188.245.152


Current Path : /proc/thread-self/root/var/www/html/phdadm/acu/
Upload File :
Current File : //proc/thread-self/root/var/www/html/phdadm/acu/uploaddoc.html

<div class="row clearfix" id="personal_det">
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
    <div class="card">
      <div class="card-header">
        <h2>Upload Documents</h2>
      </div>
      <div class="card-body">
        <div>
          <table>
            <tr>
              <td>
                Upload Photo <span style="color: red">(Only jpg/jpeg)</span>
              </td>
              <td>:</td>
              <td>
                <div id="image" src="">
                  <img
                    id="studphoto_img"
                    style="width: 160px; height: 150px; padding: 3px"
                    src=""
                  />
                </div>
                <input
                  type="file"
                  name="photo"
                  id="photopath"
                  accept=".jpg, .jpeg"
                  onchange="validateFile(this)"
                />
              </td>
              <td>
                <button
                  style="margin: 10px"
                  id="idChangePhoto"
                  class="btn btn-success"
                  onclick="photoupload()"
                >
                  Upload
                </button>
              </td>
              <td>
                <a target="_blank" id="viewphoto">View Photo</a>
              </td>
            </tr>
            <tr>
              <td>
                Upload Signature <span style="color: red">(Only jpg/jpeg)</span>
              </td>
              <td>:</td>
              <td>
                <input
                  type="file"
                  name="signature"
                  id="signature"
                  onchange="validateSign(this)"
                  accept=".jpg, .jpeg"
                />
              </td>
              <td>
                <button
                  style="margin: 10px"
                  id="idChangePhoto"
                  class="btn btn-success"
                  onclick="uploadSignature()"
                >
                  Upload
                </button>
              </td>
              <td><a target="_blank" id="viewsign">View Signature</a></td>
            </tr>
            <tr>
              <td>
                Upload Aadhaar / Passport
                <span style="color: red">(Only pdf)</span>
              </td>
              <td>:</td>
              <td>
                <input
                  type="file"
                  name="aadhaar"
                  id="aadhaar"
                  accept=".pdf"
                  onchange="validateDoc(this)"
                />
              </td>
              <td>
                <button
                  style="margin: 10px"
                  id="idChangePhoto"
                  class="btn btn-success"
                  onclick="uploadAadhaar()"
                >
                  Upload
                </button>
              </td>
              <td><a target="_blank" id="viewaadhaar">View Aadhaar</a></td>
            </tr>
            <tr>
              <td>
                Proof Certificate for Entrance Examination Exemption<br /><span
                  style="color: red"
                  >(Only pdf)</span
                >
              </td>
              <td>:</td>
              <td>
                <input
                  type="file"
                  name="proofcert"
                  id="proofcert"
                  accept=".pdf"
                  onchange="validateDoc(this)"
                />
              </td>
              <td>
                <button
                  style="margin: 10px"
                  id="idChangePhoto"
                  class="btn btn-success"
                  onclick="uploadProofCertificate()"
                >
                  Upload
                </button>
              </td>
              <td>
                <a target="_blank" id="viewproofcert">View Certificate</a>
              </td>
            </tr>
            <tr>
              <td>
                Upload No objection certificate from Organization<br /><span
                  style="color: red"
                  >(Only pdf)</span
                >
              </td>
              <td>:</td>
              <td>
                <input
                  type="file"
                  name="noc"
                  id="noc"
                  accept=".pdf"
                  onchange="validateDoc(this)"
                />
              </td>
              <td>
                <button
                  style="margin: 10px"
                  id="idChangePhoto"
                  class="btn btn-success"
                  onclick="uploadNOC()"
                >
                  Upload
                </button>
              </td>
              <td><a target="_blank" id="viewnoc">View NOC</a></td>
            </tr>
            <tr>
              <td>
                Upload Experience certificate
                <span style="color: red">(Only pdf)</span>
              </td>
              <td>:</td>
              <td>
                <input
                  type="file"
                  name="exp"
                  id="exp"
                  accept=".pdf"
                  onchange="validateDoc(this)"
                />
              </td>
              <td>
                <button
                  style="margin: 10px"
                  id="idChangePhoto"
                  class="btn btn-success"
                  onclick="uploadExperience()"
                >
                  Upload
                </button>
              </td>
              <td><a target="_blank" id="viewexp">View Exp. Certificate</a></td>
            </tr>
            <tr>
              <td>
                Upload Publications <span style="color: red">(Only pdf)</span>
              </td>
              <td>:</td>
              <td>
                <input
                  type="file"
                  name="Publications"
                  id="publications"
                  accept=".pdf"
                  onchange="validateDoc(this)"
                />
              </td>
              <td>
                <button
                  style="margin: 10px"
                  id="idChangePhoto"
                  class="btn btn-success"
                  onclick="uploadPublications()"
                >
                  Upload
                </button>
              </td>
              <td><a target="_blank" id="viewpub">View Publications</a></td>
            </tr>
            <!-- <tr>
            <td>
              Are you claiming for Ph.D Enterance Examination Exemption as per
              ACU-Ph.D Regulations 2022?
            </td>
            <td>:</td>
            <td><input type="file" name="phdexam" id="phdexam" /></td>
            <td>
              <button
                style="margin: 10px"
                id="phdexamfile"
                class="btn btn-success"
                onclick="ugcnetentrance()"
              >
                Upload
              </button>
            </td>
            <td><a target="_blank" id="viewphd">View PHD Exam </a></td>
          </tr> -->
          </table>
        </div>
      </div>
      <div class="clearfix"></div>
    </div>
  </div>
</div>
<script>
  function validateFile(input) {
    const file = input.files[0];
    const fileName = file.name;
    const fileType = file.type;

    if (fileType !== "image/jpeg") {
      alert("Please upload a .jpg or .jpeg file.");
      input.value = ""; // Clear the file input
      return;
    }

    const invalidChars = /[^a-zA-Z0-9.-]/;
    if (invalidChars.test(fileName)) {
      alert("File name should not contain special characters or spaces.");
      input.value = ""; // Clear the file input
      return;
    }

    document.getElementById("studphoto_img").src =
      window.URL.createObjectURL(file);
  }

  function validateSign(input) {
    const file = input.files[0];
    const fileName = file.name;
    const fileType = file.type;

    if (fileType !== "image/jpeg") {
      alert("Please upload a .jpg or .jpeg file.");
      input.value = "";
      return;
    }

    const invalidChars = /[^a-zA-Z0-9.-]/;
    if (invalidChars.test(fileName)) {
      alert("File name should not contain special characters or spaces.");
      input.value = "";
      return;
    }
  }

  function validateDoc(input) {
    const file = input.files[0];
    const fileName = file.name;
    const fileType = file.type;
    console.log(fileType);
    if (fileType !== "application/pdf") {
      alert("Please upload pdf file.");
      input.value = "";
      return;
    }

    const invalidChars = /[^a-zA-Z0-9.-]/;
    if (invalidChars.test(fileName)) {
      alert("File name should not contain special characters or spaces.");
      input.value = "";
      return;
    }
  }
</script>