Я получаю сообщение об ошибке ниже при создании пользовательского отчета
Ошибка: не удалось загрузить файл javascript ajax. Возможно URL
это неверно?
URL: site.com/js/xajax.js
А в консоли я вижу следующие сообщения:
function xajax_getReport(){return xajax.call("getReport", arguments, 1);}
Функция GetReport:
public function getReport() {
$xajaxResponse = new xajaxResponse();
$this->template->assign("report", true);
$user =& User::getInstance();
//$this->template->assign("calendarMode", "noactive");
if ($user) {
$today = date("Y-m-d H:i:s");
//$doctor = $user->getDoctor();
//$doctorSettings = $doctor->getDoctorSettings();
//if ($doctorSettings->getTestTour() == 2) $this->template->assign("showAA", true);
if ($user->getSubscriptionDueDate() < $today) {
$this->template->assign("notlogin", true);
//$this->template->assign("doctor", $doctor);
}
}
// $user = User::getInstance();
// exit('here');
$doctor = $user->getDoctor();
$userState = $user->getState();
$doctorSettings = $doctor->getDoctorSettings();
if ($doctorSettings->getQuizType(1)) $this->template->assign('showBasic',1);
$states = $doctor->getStateArray();
$stateShow = false;
foreach ($states as $state) {
if ($state == $userState) {
$stateShow = true;
break;
}
}
$this->template->assign("user", $user);
$this->template->assign("doctor", $doctor);
$this->template->assign("stateShow", $stateShow);
$this->template->assign("date",$_SESSION["date"]);
if (file_exists("flash/{$user->getId()}/{$_SESSION["date"]}/paramArray")){
$lastReportParams = Patient::getReportParams($user->getId(),$_SESSION["date"]);
$allow = $lastReportParams["allow"][(NA_SITE?NA:WLA)];
}
else $allow = ($doctor->getShowGraph()==2)?in_array($user->getState(),$doctor->getShowGraphStatesCode()):$doctor->getShowGraph();
$this->template->assign("allow", $allow);
//allow user to view the report or not
$date = $_SESSION['thedate'];
if (file_exists("flash/{$user->getId()}/{$date}/allow")){
//$this->template->assign("date", $_SESSION['date']);
$this->template->assign("allow", true);
}
$content = $this->renderTemplate("patient/test_result.tpl");
$xajaxResponse->addAssign("cont", "innerHTML", $content);
$xajaxResponse->addAssign("loader", "style.display", "none");
$exJS = HttpSession::get("exJS");
$errors = HttpSession::get("errors");
if ($errors)
$xajaxResponse->script("document.getElementById('pr_rep_ref').style.display = 'none';
document.getElementById('pr_rep').style.display = 'none';");
$xajaxResponse->script(HttpSession::get("exJS"));
// $xajaxResponse->addScriptCall("createFlash", "");
return $xajaxResponse->getXML();
}