本文整理汇总了PHP中AMA_DataHandler::get_node_info方法的典型用法代码示例。如果您正苦于以下问题:PHP AMA_DataHandler::get_node_info方法的具体用法?PHP AMA_DataHandler::get_node_info怎么用?PHP AMA_DataHandler::get_node_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AMA_DataHandler
的用法示例。
在下文中一共展示了AMA_DataHandler::get_node_info方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parameter_controlFN
//.........这里部分代码省略.........
$_SESSION['sess_selected_tester'] = $selected_tester;
}
}
}
/*
* ADA tester data handler
* Data validation on $sess_selected_tester is performed by MultiPort::getDSN()
*/
/**
* giorgio 12/ago/2013
* set selected tester if it's not a multiprovider environment
*/
if (!MULTIPROVIDER && isset($GLOBALS['user_provider'])) {
$sess_selected_tester = $GLOBALS['user_provider'];
} else {
$sess_selected_tester = isset($_SESSION['sess_selected_tester']) ? $_SESSION['sess_selected_tester'] : null;
}
//$dh = AMA_DataHandler::instance(MultiPort::getDSN($sess_selected_tester));
$sess_selected_tester_dsn = MultiPort::getDSN($sess_selected_tester);
$_SESSION['sess_selected_tester_dsn'] = $sess_selected_tester_dsn;
$dh = new AMA_DataHandler($sess_selected_tester_dsn);
$GLOBALS['dh'] = $dh;
if (empty($GLOBALS['sess_id'])) {
$invalid_session = TRUE;
}
/*
* Node object
*/
// TODO: portare in sessione $nodeObj?
if (in_array('node', $thisUserNeededObjAr)) {
$id_node = isset($_REQUEST['id_node']) ? DataValidator::validate_node_id($_REQUEST['id_node']) : false;
$sess_id_node = isset($_SESSION['sess_id_node']) ? DataValidator::validate_node_id($_SESSION['sess_id_node']) : false;
if ($id_node !== FALSE) {
$dataHa = $dh->get_node_info($id_node);
if (AMA_DataHandler::isError($dataHa) || !is_array($dataHa)) {
$invalid_node = TRUE;
} else {
$_SESSION['sess_id_node'] = $id_node;
}
} elseif ($sess_id_node !== FALSE) {
$dataHa = $dh->get_node_info($sess_id_node);
if (AMA_DataHandler::isError($dataHa) || !is_array($dataHa)) {
$invalid_node = TRUE;
} else {
$_SESSION['sess_id_node'] = $sess_id_node;
}
} else {
$invalid_node = TRUE;
}
/**
* @author giorgio 18/mag/2015
*
* Could be that a non-student has request a node from
* the default tester in a multiprovider environment
* Check this before giving up an marking the node as invalid
*/
if (MULTIPROVIDER && $id_profile != AMA_TYPE_STUDENT && $invalid_node === true && $id_node !== false) {
$invalid_node = checkAndSetPublicTester('node', $id_node);
}
}
/*
* Course object
*/
if (in_array('course', $thisUserNeededObjAr)) {
$id_course = isset($_REQUEST['id_course']) ? DataValidator::is_uinteger($_REQUEST['id_course']) : false;
$sess_id_course = isset($_SESSION['sess_id_course']) ? DataValidator::is_uinteger($_SESSION['sess_id_course']) : false;