Diligent web site
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
Nikola Ignjatovic 2f040f461a Added readme.md file 5 роки тому
.vs https://dilig.net/portfolio.html 5 роки тому
PHPMailer_5.2.0 Apply fomr and small bugs 5 роки тому
customizer Initial web site commit. 5 роки тому
documents Scroll and background 5 роки тому
images Developing header.php 5 роки тому
industries Added header.php 5 роки тому
scripts Added header.php 5 роки тому
services Added header.php 5 роки тому
styles Developing header.php 5 роки тому
teams Back to top update 5 роки тому
webfonts Added header.php 5 роки тому
README.md Added readme.md file 5 роки тому
apply.php Added header.php 5 роки тому
careers.php Added header.php 5 роки тому
contact_form.php Developing header.php 5 роки тому
footer.php Developing header.php 5 роки тому
header.php Added header.php 5 роки тому
header.txt Developing header.php 5 роки тому
index.php Developing header.php 5 роки тому
job_apply.php fixes 5 роки тому
portfolio.php Added header.php 5 роки тому
style.css Added header.php 5 роки тому

README.md

diligent-site

Diligent web site

Pre requirements:

* installed wamp server (https://sourceforge.net/projects/wampserver/)

* installed git (https://git-scm.com/downloads)

When the WAMP is installed, click the WAMP server icon > Apache > httpd.conf, then change the line Listen 80 to Listen 8080 or any port you want.

Go to (http://176.104.105.124:3000/diligent/diligent-site.git/), clone this repository to www folder of WAMP server and run a website from a browser with localhost:defined_port/index.php (ex: localhost:8080/index.php)

First of all, this project contains the following file types:

  1. Type of file which sends an email

    1. contact_form.PHP - sends email from homepage contact form and
    2. job_apply.PHP which sends email from apply form),
  2. Type of file which is included in every single page

    1. header.php which is included in the top of the body and

    2. footer.php which is included in the bottom of the body

  3. Regular type of PHP file (the rest).

Sending email

This project uses PHPMailer 5.2.0

For email sending, needed to make an instance of PHPMailer and use method send from that class.

Before that, needed to setup email:

``` $mail = new PHPMailer(); //make instance of PHPMailer

$mail->IsSMTP(); // telling the class to use SMTP

$mail->SMTPSecure = "tls";   // enable SMTP authentication

$mail->Host = "smtp.site.com"; // sets the SMTP server

$mail->Port = 587; // sets SMTP port

$mail->Username  = "yourname@yourdomain"; // SMTP username

$mail->Password  = "yourpassword";     // SMTP password

$mail->SetFrom("sender@gmail.com", "Sender"); //set email which sends a message


#add attachment to email

$resume_file = $_FILES["resume-file"];

$data = substr($resume, strpos($resume, ","));// everything except header of document

$filename = $resume_name; //fileName

$encoding = "base64"; // encoding type

$type =  substr( $resume , 6 , strpos($resume, ";") - 5); // type of document

$mail->AddStringAttachment(base64_decode($data), $resume_name, $encoding, $type);   //add attachment


$mail->Subject = "Subject"; //add subject

$mail->Body = "Message"; //add message

$mail->AddAddress('reciever@gmail.com', "Reciever"); //add email which recieves message

$mail->IsHtml(true); //enable html message instead of text


$mail->send(); //send email ```

When ‘resume-file’ is sent using POST method, it can be found in $_FILES array, but other parameters can be found in $_POST array

When input (type file is used) in html form, need to add enctype=“multipart/form-data” and setup:

    contentType: false, cache: false, processData:false, url: "myscript.PHP?call=upload" ('?call=upload' added after script name) in ajax submit

styles/custom.css is a file which uses developers to add a new feature to the website, style.css is used for bug fixing inold style

For checking validation of file, needed to use (https://www.freeformatter.com/html-validator.html)

Every single page uses keywords (diligent, software, development, company, it, and specific words for that domain). It is located in meta (keywords) in the head of the document

In order to use google captcha in html form, needed to include after including custom.js script, after that need to add one html element for captcha above the submit button. Define id to that element and data-sitekey=“site_key”, where sitekey is google capctha key. After that at the end of custom.js file (before onloadCallback function) add new function for verification and call it in onloadCallback function