").addClass("page-link").attr({
href: "javascript:void(0)"
}).text("بعدی")
)
);
// Show the page links
$("#exampleshowpage").show();
showPage(1);
// Use event delegation, as these items are recreated later
$(document).on("click", ".pagination li.current-page:not(.active)", function () {
return showPage(+$(this).text());
});
$("#next-page").on("click", function () {
return showPage(currentPage + 1);
});
$("#previous-page").on("click", function () {
return showPage(currentPage - 1);
});
}
function getPageList(totalPages, page, maxLength) {
if (maxLength < 5) throw "maxLength must be at least 5";
function range(start, end) {
return Array.from(Array(end - start + 1), (_, i) => i + start);
}
var sideWidth = maxLength < 9 ? 1 : 2;
var leftWidth = (maxLength - sideWidth * 2 - 3) >> 1;
var rightWidth = (maxLength - sideWidth * 2 - 2) >> 1;
if (totalPages <= maxLength) {
// no breaks in list
return range(1, totalPages);
}
if (page <= maxLength - sideWidth - 1 - rightWidth) {
// no break on left of page
return range(1, maxLength - sideWidth - 1)
.concat(0, range(totalPages - sideWidth + 1, totalPages));
}
if (page >= totalPages - sideWidth - 1 - rightWidth) {
// no break on right of page
return range(1, sideWidth)
.concat(0, range(totalPages - sideWidth - 1 - rightWidth - leftWidth, totalPages));
}
// Breaks on both sides
return range(1, sideWidth)
.concat(0, range(page - leftWidth, page + rightWidth),
0, range(totalPages - sideWidth + 1, totalPages));
}
function showeachcard(data) {
var lidata = ""
datakolupgrade = data.upgrade_safety
datadanger_prevention = data.danger_prevention
datatechnical_building = data.technical_building
dataconstruction_rural = data.construction_rural
datamaintenance_project = data.maintenance_project
datatollhouse_management = data.tollhouse_management
for (var i = 0; i < datakolupgrade.length; i++) {
if (datakolupgrade[i].path != null) {
lidata = lidata + ''
} else {
lidata = lidata + ''
}
}
for (var i = 0; i < datadanger_prevention.length; i++) {
if (datadanger_prevention[i].path != null) {
lidata = lidata + ''
} else {
lidata = lidata + ''
}
}
for (var i = 0; i < datatechnical_building.length; i++) {
if (datatechnical_building[i].path != null) {
lidata = lidata + ''
} else {
lidata = lidata + ''
}
}
for (var i = 0; i < datamaintenance_project.length; i++) {
if (datamaintenance_project[i].path != null) {
lidata = lidata + ''
} else {
lidata = lidata + ''
}
}
for (var i = 0; i < datatollhouse_management.length; i++) {
// if ()
if (datatollhouse_management[i].path != null) {
lidata = lidata + ''
} else {
lidata = lidata + ''
}
}
$("#projectcontent").append(lidata)
paginateshowwwww()
}
$("#rookeshnegah").on('click', function () {
if (flagquery == 1) {
if (queryparams.indexOf("p_t") != -1) {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("?"));
window.history.replaceState({}, document.title, clean_uri);
}
location.reload()
window.location.href = window.location.href + "?p_t=1"
} else {
window.location.href = window.location.href + "&p_t=1"
}
} else {
window.location.href = window.location.href + "?p_t=1"
}
})
$("#hadesekhisz").on('click', function () {
if (flagquery == 1) {
if (queryparams.indexOf("p_t") != -1) {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("?"));
window.history.replaceState({}, document.title, clean_uri);
}
location.reload()
window.location.href = window.location.href + "?p_t=2"
} else {
window.location.href = window.location.href + "&p_t=2"
}
} else {
window.location.href = window.location.href + "?p_t=2"
}
})
$("#abnienegah").on('click', function () {
if (flagquery == 1) {
if (queryparams.indexOf("p_t") != -1) {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("?"));
window.history.replaceState({}, document.title, clean_uri);
}
location.reload()
window.location.href = window.location.href + "?p_t=4"
} else {
window.location.href = window.location.href + "&p_t=4"
}
} else {
window.location.href = window.location.href + "?p_t=4"
}
})
$("#rahdarkhanebeh").on('click', function () {
if (flagquery == 1) {
if (queryparams.indexOf("p_t") != -1) {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("?"));
window.history.replaceState({}, document.title, clean_uri);
}
location.reload()
window.location.href = window.location.href + "?p_t=5"
} else {
window.location.href = window.location.href + "&p_t=5"
}
} else {
window.location.href = window.location.href + "?p_t=5"
}
})
$("#erteghayeimeni").on('click', function () {
if (flagquery == 1) {
if (queryparams.indexOf("p_t") != -1) {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("?"));
window.history.replaceState({}, document.title, clean_uri);
}
location.reload()
window.location.href = window.location.href + "?p_t=3"
} else {
window.location.href = window.location.href + "&p_t=3"
}
} else {
window.location.href = window.location.href + "?p_t=3"
}
})
function showprojectdatafilter(data, number) {
var lidata = ""
for (var i = 0; i < data.length; i++) {
lidata = lidata + ''
}
$("#projectcontent").append(lidata)
paginateshowwwww()
}
function showimagefilter(data) {
if (data != null) {
return "https://rms.rmto.ir/storage" + data.slice(6)
}
else {
return "../dist/images/notavailable.jpg"
}
}
function showcountall(num) {
$("#countall").append(
'' + num + ''
)
counternum()
}
function counternum() {
$('.count-this').each(function () {
// Start the counting from a specified number - in this case, 0!
$(this).prop('Counter', 0).animate({
Counter: $(this).text()
}, {
// Speed of counter in ms, default animation style
duration: 2000,
easing: 'swing',
step: function (now) {
// Round up the number
$(this).text(Math.ceil(now));
}
});
});
}
// function showyearlist(obj) {
// var fullnum = 0;
// $.each(obj, function (key, value) {
// if (value != 0) {
// if (parseInt(key) > 1395) {
// // $("#startyear").append(' ' + key + '
(' + value + ')
')
// }
// else {
// fullnum += value
// }
// }
// })
// $("#startyear").append(' سال 1395 و ماقبل
(' + fullnum + ')
')
// }
function showyearfilter(num) {
var showfilter = ''
$("#card-tools").append(showfilter)
}
function showyearless(obj) {
var fullnum = 0;
console.log("obj", obj)
$.each(obj, function (key, value) {
if (value != 0) {
if (parseInt(key) > 1395) {
$("#startyear").append('' + key + ' (' + value + ')
')
} else {
fullnum += value;
}
}
})
if (fullnum == 0) {
}
else {
$("#startyear").append(' سال 1395 و ماقبل
(' + fullnum + ')
')
}
}
function showcountproject(obj) {
$("#rookeshnegah").append(
'(' + obj.maintenance_project_count + ')
'
)
$("#hadesekhisz").append(
'(' + obj.danger_prevention_count + ')
'
)
$("#erteghayeimeni").append(
'(' + obj.upgrade_safety_count + ')
'
)
$("#abnienegah").append(
'(' + obj.technical_building_count + ')
'
)
$("#rahdarkhanebeh").append(
'(' + obj.tollhouse_management_count + ')
'
)
}
function axisnumber(obj) {
$.each(obj, function (key, value) {
if (key == 1) {
$("#sharyani").append('(' + value + ')')
}
if (key == 2) {
$("#asli").append('(' + value + ')')
}
if (key == 3) {
$("#faryi").append('(' + value + ')')
}
if (key == 4) {
$("#roostayi").append('(' + value + ')')
}
})
}
function projecttypebama(array) {
$("#status0").append('(' + array[0] + ')')
$("#status1").append('(' + array[1] + ')')
$("#status2").append('(' + array[2] + ')')
$("#status3").append('(' + array[3] + ')')
$("#status4").append('(' + array[4] + ')')
$("#status5").append('(' + array[5] + ')')
$("#status6").append('(' + array[6] + ')')
$("#status7").append('(' + array[7] + ')')
$("#status8").append('(' + array[8] + ')')
}
function showprovincefilter() {
var provincearray = [];
var ostandata = [];
$.ajax({
url: "https://rms.rmto.ir/public/contents/provinces",
type: "GET",
success: function (result) {
provincearray = result.data
for (var i = 0; i < provincearray.length; i++) {
ostandata = ostandata + ' ' + provincearray[i].name_fa + '
'
}
$("#appendostan").append(ostandata);
},
error: function (error) {
},
});
}
function newsee(id) {
if (flagquery == 1) {
if (queryparams.indexOf("p_p") != -1) {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("?"));
window.history.replaceState({}, document.title, clean_uri);
}
location.reload()
window.location.href = window.location.href + "?p_p=" + id
} else {
window.location.href = window.location.href + "&p_p=" + id
}
} else {
window.location.href = window.location.href + "?p_p=" + id
}
}
function showcityappend(data) {
$("#appendcity").empty()
var citydata = ""
var citylist = [];
$.ajax({
url: "https://rms.rmto.ir/public/contents/provinces/" + data,
type: "GET",
success: function (result) {
citylist = result.data
console.log("citylist", citylist)
for (var i = 0; i < citylist.length; i++) {
citydata = citydata + ' ' + citylist[i].name_fa + '
'
}
console.log("citydata", citydata)
$("#appendcity").append(citydata)
},
error: function (error) {
},
});
}
for (var i = 0; i < 36; i++) {
$("#province" + i).click(function () {
alert("#province" + i)
// console.log("jiiii")
if (flagquery == 1) {
if (queryparams.indexOf("p_p") != -1) {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("?"));
window.history.replaceState({}, document.title, clean_uri);
}
location.reload()
window.location.href = window.location.href + "?p_p=" + i
} else {
window.location.href = window.location.href + "&p_p=" + i
}
} else {
window.location.href = window.location.href + "?p_p=" + i
}
});
}
function mehvartypefunc(num) {
if (flagquery == 1) {
if (queryparams.indexOf("r_t") != -1) {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("?"));
window.history.replaceState({}, document.title, clean_uri);
}
location.reload()
window.location.href = window.location.href + "?r_t=" + num
} else {
window.location.href = window.location.href + "&r_t=" + num
}
} else {
window.location.href = window.location.href + "?r_t=" + num
}
}
function projectstatus(id) {
if (flagquery == 1) {
if (queryparams.indexOf("p_s") != -1) {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("?"));
window.history.replaceState({}, document.title, clean_uri);
}
location.reload()
window.location.href = window.location.href + "?p_s=" + id
} else {
window.location.href = window.location.href + "&p_s=" + id
}
} else {
window.location.href = window.location.href + "?p_s=" + id
}
}
function showyearclick(num) {
if (flagquery == 1) {
if (queryparams.indexOf("p_y") != -1) {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("?"));
window.history.replaceState({}, document.title, clean_uri);
}
location.reload()
window.location.href = window.location.href + "?p_y=" + num
} else {
window.location.href = window.location.href + "&p_y=" + num
}
} else {
window.location.href = window.location.href + "?p_y=" + num
}
}
function projectimportance(id) {
if (flagquery == 1) {
if (queryparams.indexOf("p_r") != -1) {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("?"));
window.history.replaceState({}, document.title, clean_uri);
}
location.reload()
window.location.href = window.location.href + "?p_r=" + id
} else {
window.location.href = window.location.href + "&p_r=" + id
}
} else {
window.location.href = window.location.href + "?p_r=" + id
}
}
function showheaderfilter(query) {
if (urlParams.get('p_t') != null) {
if (urlParams.get('p_t') == 1) {
filterstring = filterstring + '\
روکش آسفالت (نگهداری راه ها )\
X\
'
$("#dropdown-projecttypeid").empty()
$("#dropdown-projecttypeid").append('\
روکش آسفالت (نگهداری راه ها)\

\
')
}
if (urlParams.get('p_t') == 2) {
filterstring = filterstring + '\
رفع نقاط حادثه خیز / پرتصادف\
X\
'
$("#dropdown-projecttypeid").empty()
$("#dropdown-projecttypeid").append('\
رفع نقاط حادثه خیز / پرتصادف\

\
')
}
if (urlParams.get('p_t') == 3) {
filterstring = filterstring + '\
ارتقای ایمنی راه\
X\
'
$("#dropdown-projecttypeid").empty()
$("#dropdown-projecttypeid").append('\
ارتقای ایمنی راه\

\
')
}
if (urlParams.get('p_t') == 4) {
filterstring = filterstring + '\
ابنیه فنی (نگهداری ابنیه فنی ) \
X\
'
$("#dropdown-projecttypeid").empty()
$("#dropdown-projecttypeid").append('\
ابنیه فنی (نگهداری ابنیه فنی )\

\
')
}
if (urlParams.get('p_t') == 5) {
filterstring = filterstring + '\
راهدارخانه ها (بهسازی و نوسازی )\
X\
'
$("#dropdown-projecttypeid").empty()
$("#dropdown-projecttypeid").append('\
راهدارخانه ها (بهسازی و نوسازی )\

\
')
}
// console.log("test" ,filterstring )
}
if (urlParams.get('p_p') != null) {
// alert("mn")
showprovincefilteredit(urlParams.get('p_p'))
} else {
showprovincefilter()
}
if (urlParams.get('r_t') != null) {
showmehvartype(urlParams.get('r_t'))
}
if (urlParams.get('p_s') != null) {
showprojectstatus(urlParams.get('p_s'))
}
if (urlParams.get('p_y') != null) {
showyearshownfilter(urlParams.get('p_y'))
}
if (urlParams.get('p_r') != null) {
showimportance(urlParams.get('p_r'))
}
$(".projectchoose").append(filterstring)
}
function showprovincefilteredit(id) {
var provincestring = ""
var ostanstring = ""
var provincearrayy = [];
$.ajax({
url: "https://rms.rmto.ir/public/contents/provinces",
type: "GET",
success: function (result) {
provincearrayy = result.data
for (var i = 0; i < provincearrayy.length; i++) {
if (provincearrayy[i].id == id) {
showcityappend(id)
console.log("lllll", provincearrayy[i].name_fa)
provincestring = provincestring + '\
' + provincearrayy[i].name_fa + '\
X\
'
ostanstring = ' ' + provincearrayy[i].name_fa + '
'
}
}
$("#appendostan").empty()
$("#appendostan").append(ostanstring)
$(".projectchoose").append(provincestring)
},
error: function (error) {
},
});
}
function getprovince() {
$.ajax({
url: "https://rms.rmto.ir/public/contents/provinces",
type: "GET",
success: function (result) {
provincesarray = result.data
},
error: function (error) {
},
});
}
function cityclick(num) {
if (flagquery == 1) {
// console.log("pitikohearflag1")
// console.log("quwery", queryparams.indexOf("p_c"))
if (queryparams.indexOf("p_c") != -1) {
// console.log("p_p;")
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("?"));
window.history.replaceState({}, document.title, clean_uri);
}
location.reload()
window.location.href = window.location.href + "?p_c=" + num
} else {
// console.log("clickcitytest")
window.location.href = window.location.href + "&p_c=" + num
}
} else {
// console.log("pitikohearflagelse")
window.location.href = window.location.href + "?p_c=" + num
}
}
function showmehvartype(id) {
var mehvarheader = ""
var mehvarfilter = ""
if (id == 1) {
mehvarfilter = 'شریانی
'
mehvarheader = ' شریانیX
'
} else if (id == 2) {
mehvarfilter = 'اصلی
'
mehvarheader = ' اصلیX
'
} else if (id == 3) {
mehvarfilter = 'فرعی
'
mehvarheader = ' فرعیX
'
} else if (id == 4) {
mehvarfilter = 'روستایی
'
mehvarheader = ' روستاییX
'
}
$(".mehvarshowdiv").empty()
$(".mehvarshowdiv").append(mehvarfilter)
$(".projectchoose").append(mehvarheader)
}
function showprojectstatus(id) {
var statusheader = ""
var statusfilter = ""
if (id == 0) {
statusfilter = ' توسط استان ها بروزرسانی نشده
'
statusheader = ' توسط استان ها بروزرسانی نشده X
'
} else if (id == 1) {
statusfilter = ' در دست برنامه ریزی اولیه
'
statusheader = ' در دست برنامه ریزی اولیه X
'
} else if (id == 2) {
statusfilter = ' در دست مطالعه و تهیه اسناد مناقصه
'
statusheader = ' در دست مطالعه و تهیه اسناد مناقصه X
'
} else if (id == 3) {
statusfilter = ' در دست مناقصه
'
statusheader = ' در دست مناقصه X
'
} else if (id == 4) {
statusfilter = ' در حال تجهیز کارگاه
'
statusheader = ' در حال تجهیز کارگاه X
'
} else if (id == 5) {
statusfilter = ' در حال اجرا فعال
'
statusheader = ' در حال اجرا فعال X
'
} else if (id == 6) {
statusfilter = ' در حال اجرا متوقف
'
statusheader = ' در حال اجرا متوقف X
'
} else if (id == 7) {
statusfilter = ' در حال اجرا فعال
'
statusheader = ' در حال اجرا فعال X
'
} else if (id == 8) {
statusfilter = ' در حال اجرا فعال
'
statusheader = ' در حال اجرا فعال X
'
}
$("#projectstatusshow").empty()
$("#showstatussec").empty()
$("#projectstatusshow").append(statusfilter)
$(".projectchoose").append(statusheader)
}
function showyearshownfilter(id) {
var stringyear = ""
var stringfilter = ""
if (id == 1395) {
stringyear = ' 1395
'
stringfilter = ' 1395 X
'
} else if (id == 1396) {
stringyear = ' 1396
'
stringfilter = ' 1396 X
'
} else if (id == 1397) {
stringyear = ' 1397
'
stringfilter = ' 1397 X
'
} else if (id == 1398) {
stringyear = ' 1398
'
stringfilter = ' 1398 X
'
} else if (id == 1399) {
stringyear = ' 1399
'
stringfilter = ' 1399 X
'
}
else if (id == 1400) {
stringyear = ' 1400
'
stringfilter = ' 1400 X
'
}
$(".startyear").empty()
$(".startyear").append(stringyear)
$(".projectchoose").append(stringfilter)
}
function showimportance(num) {
var importancestring = ""
var importancheader = ""
if (num == 3) {
importancestring = 'بسیار حایز اهمیت
'
importancheader = 'بسیار حایز اهمیت X
'
} else if (num == 2) {
importancestring = ' عادی
'
importancheader = ' عادی X
'
} else if (num == 1) {
importancestring = ' پروژه با اهمیت کم
'
importancheader = ' پروژه با اهمیت کم X
'
}
$("#importancediv").empty()
$("#importancediv").append(importancestring)
$(".projectchoose").append(importancheader)
}
$(document).on('click', '#p_r1', function () {
// alert("p_tremove1")
// code here
$("#importancediv").empty()
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
removeURLParameter(uri, 'p_r')
}
// location.reload()
});
$(document).on('click', '#p_r2', function () {
// alert("p_tremove2")
// code here
$("#importancediv").empty()
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
removeURLParameter(uri, 'p_r')
}
// location.reload()
});
$(document).on('click', '#p_r3', function () {
// alert("p_tremove3")
// code here
$("#importancediv").empty()
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
removeURLParameter(uri, 'p_r')
}
// location.reload()
});
$(document).on('click', '#p_tremove4', function () {
// alert("p_tremove4")
$("#p_t4").empty()
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
removeURLParameter(uri, 'p_t')
}
// location.reload()
// code here
});
$(document).on('click', '#p_tremove5', function () {
// alert("p_tremove5")
$("#p_t5").empty()
// location.reload()
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
// console.log("hipitikoo6666")
// var clean_uri = uri.substring(0, uri.indexOf("?"));
removeURLParameter(uri, 'p_t')
// window.history.replaceState({}, document.title, clean_uri);
}
// location.reload()
// code here
});
function removeURLParameter(url, parameter) {
console.log("hipitikoo", parameter)
//prefer to use l.search if you have a location/link object
var urlparts = url.split('?');
// console.log("urlparts", urlparts)
if (urlparts.length >= 2) {
console.log("lala")
var prefix = encodeURIComponent(parameter) + '=';
var pars = urlparts[1].split(/[&;]/g);
// console.log("pars", pars)
//reverse iteration as may be destructive
for (var i = pars.length; i-- > 0;) {
//idiom for string.startsWith
if (pars[i].lastIndexOf(prefix, 0) !== -1) {
pars.splice(i, 1);
}
}
// console.log("parss", pars)
if (pars.length > 0) {
url = urlparts[0] + '?' + pars.join('&');
} else {
url = urlparts[0]
}
// console.log("urlll", url)
window.location.href = url
// console.log("windowa", window.location.href)
// location.reload()
// return url;
} else {
console.log("urlllelse", url)
return url;
}
}
for (var i = 0; i <= 36; i++) {
$(document).on('click', '#p_p' + i, function () {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
removeURLParameter(uri, 'p_p')
}
// location.reload()
// code here
});
}
for (var i = 0; i <= 23; i++) {
$(document).on('click', '#p_s' + i, function () {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
removeURLParameter(uri, 'p_s')
}
// location.reload()
// code here
});
}
for (var i = 0; i <= 1000; i++) {
$(document).on('click', '#p_c' + i, function () {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
removeURLParameter(uri, 'p_c')
}
// location.reload()
// code here
});
}
for (var i = 0; i <= 4; i++) {
$(document).on('click', '#r_t' + i, function () {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
removeURLParameter(uri, 'r_t')
}
// location.reload()
// code here
});
}
for (var i = 0; i <= 5; i++) {
$(document).on('click', '#p_t' + i, function () {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
removeURLParameter(uri, 'p_t')
}
// location.reload()
// code here
});
}
for (var i = 0; i <= 15; i++) {
$(document).on('click', '#p_s' + i, function () {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
removeURLParameter(uri, 'p_s')
}
// location.reload()
// code here
});
}
for (var i = 0; i <= 5; i++) {
$(document).on('click', '#p_r' + i, function () {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
removeURLParameter(uri, 'p_r')
}
// location.reload()
// code here
});
}
for (var i = 0; i <= 6; i++) {
$(document).on('click', '#p_y' + i, function () {
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
removeURLParameter(uri, 'p_y')
}
// location.reload()
// code here
});
}
function showcityname(id, name) {
var cityfiltername = ""
var cityfilterdiv = ""
cityfiltername = '' + name + '
'
cityfilterdiv = '' + name + 'X
'
$("#dropdown-city").empty()
$("#dropdown-city").append(cityfiltername)
$(".projectchoose").append(cityfilterdiv)
}
function showprojectfa(str) {
if (str == null) {
// console.log("hi")
return "توسط استان بروزرسانی نشده است "
} else {
// console.log("byy")
return str
}
}
function showrating(num) {
// console.log("pitukooo")
if (num == null) {
return "-از 3"
} else {
return num + "از 3"
}
}
function showimage(num) {
if (num == 1) {
return "../dist/images/bamaicons/rookesh-bama.svg"
} else if (num == 2) {
return "../dist/images/bamaicons/dangerpoint-bama.svg"
} else if (num == 4) {
return "../dist/images/bamaicons/abniefani-bama.svg"
} else if (num == 5) {
return "../dist/images/bamaicons/green-home-bama.svg"
} else if (num == 3) {
return "../dist/images/bamaicons/oprative-bama.svg"
}
}
function showcitynumberproject(obj) {
$.each(obj, function (key, value) {
$("#province" + key).append('' + value + '')
})
}