\documentclass[a4paper,12pt]{book}
%\usepackage[colorlinks,citecolor=blue]{hyperref}
\usepackage{graphicx} % inserting images
\usepackage{hyperref} % PDF links
\usepackage{setspace} % for switching between double/single space in document
\usepackage{fancyhdr} % package for changing Headings style
\usepackage{amsmath}
% \usepackage{perpage}
% setting the margins of page
\usepackage[nottoc]{tocbibind}
\usepackage[top=3cm,right=3cm,bottom=2.5cm,left=2.5cm]{geometry}                 
\usepackage{xepersian}
\usepackage{zref-perpage}
\zmakeperpage{footnote}
% tell tex engine address of folder containing your pictures
\graphicspath{{images/}}
% commands to print the page number in header
\pagestyle{fancy}
\cfoot{}
\lhead{\thepage}

% commands related to XePersian package
\settextfont[Scale=1]{Yas}
\setdigitfont[Scale=1]{Yas}
\setlatintextfont[Scale=1]{LinLibertine}
% -------------------------------------
%\makeperpage{footnote}
\begin{document}
\pagenumbering{harfi}
\tableofcontents
%\listoffigur
% \listoftables
% insert each of your chapters with a \inlcude{filename} command as below
\pagenumbering{arabic}
\doublespacing
\include{chap1}
%\include{chap2}
%\include{chap3}
%\include{chap4}
%\include{chap5}
%\include{chap6}
%\include{chap7}
% \singlespacing
% \include{references}
\end{document}