Code: Select all
require_once(dirname(dirname(dirname(__FILE__))) . '/lib/xajax/xajax_core/xajax.inc.php');
function GetHeaderHTML() {
$xajax = new xajax();
$xajax->register(XAJAX_FUNCTION,'setProjectActiveState');
$xajax->processRequest();
return $xajax->getJavascript($config['root_url'] . '/lib/xajax')."\n";
}
function setProjectActiveState($projectId) {
$objResponse = new xajaxResponse();
$project = $this->getProjectsById($projectId);
$project->setIsActive(!$project->getIsActive());
$this->updateProject($project);
$objResponse->assign("contentlist", "innerHTML", display_content_list());
return $objResponse;
}
function display_content_list() {
$img = ($project->getIsActive()) ?
$gCms->variables['admintheme']->DisplayImage('icons/system/true.gif', $this->Lang('settoinactive'),'','','systemicon') :
$gCms->variables['admintheme']->DisplayImage('icons/system/false.gif', $this->Lang('settoactive'), '','','systemicon') ;
$thisurl = "../Modules/ProjectManagerProjectManager.module.php";
$list[$i]['isActive'] = "<a href=\"$thisurl&setProjectActiveState=".$project->getId()."\" onclick=\"xajax_setProjectActiveState(".$project->getId().");return false;\">".$img."</a>";
}
Code: Select all
PHP Warning: call_user_func_array() [<a href='function.call-user-func-array'>function.call-user-func-array</a>]: First argument is expected to be a valid callback, 'setProjectActiveState' was given in /path/to/root/v2/lib/xajax/xajax_core/plugin_layer/support/xajaxUserFunction.inc.php on line 230, referer: http://lightafuse.ca/v2/admin/moduleinterface.php?sp_=ae7903c6&module=ProjectManager