Quote from: goldsky at Feb 08, 2011, 01:41 PM
delete the starting <?php and the ending ?> tags
пробовал тогда оно пишет:
--------------------------
if(IN_MANAGER_MODE!="true") die("INCLUDE_ORDERING_ERROR
Please use the MODx Content Manager instead of accessing this file directly."); if(!$modx->hasPermission(’exec_module’)) { $e->setError(3); $e->dumpError(); } if(isset($_REQUEST[’id’])) { $id = intval($_REQUEST[’id’]); } else { $id=0; } // make sure the id’s a number if(!is_numeric($id)) { echo "Passed ID is NaN!"; exit; } // check if user has access permission, except admins if($_SESSION[’mgrRole’]!=1){ $sql = "SELECT sma.usergroup,mg.member " . "FROM ".$modx->getFullTableName("site_module_access")." sma " . "LEFT JOIN ".$modx->getFullTableName("member_groups")." mg ON mg.user_group = sma.usergroup AND member=’".$modx->getLoginUserID()."’". "WHERE sma.module = ’$id’"; $rs = $modx->dbQuery($sql); //initialize permission to -1, if it stays -1 no permissions //attached so permission granted $permissionAccessInt = -1; while ($row = $modx->fetchRow($rs)) { if($row["usergroup"] && $row["member"]) { //if there are permissions and this member has permission, ofcourse //this is granted $permissionAccessInt = 1; } elseif ($permissionAccessInt==-1) { //if there are permissions but this member has no permission and the //variable was still in init state we set permission to 0; no permissions $permissionAccessInt = 0; } } if($permissionAccessInt==0) { echo ""; exit; } } // get module data $sql = "SELECT * " . "FROM ".$modx->getFullTableName("site_modules")." " . "WHERE id = $id;"; $rs = mysql_query($sql); $limit = mysql_num_rows($rs); if($limit>1) { echo ""; exit; } if($limit<1) { echo ""; exit; } $content = mysql_fetch_assoc($rs); if($content[’disabled’]) { echo ""; exit; } // load module configuration $parameter = array(); if(!empty($content["properties"])){ $tmpParams = explode("&",$content["properties"]); for($x=0; $xevent->params = &$params; // store params inside event object if(is_array($params)) { extract($params, EXTR_SKIP); } ob_start(); $mod = eval($moduleCode); $msg = ob_get_contents(); ob_end_clean(); if ($php_errormsg) { if(!strpos($php_errormsg,’Deprecated’)) { // ignore php5 strict errors // log error global $content; $modx->logEvent(1,3,"$php_errormsg
$msg",$content[’name’]." - Module"); if($modx->isBackend()) $modx->event->alert("".$content[’name’]." - Module"." runtime error:
An error occurred while loading the module. Please see the event log."); } } unset($modx->event->params); return $mod.$msg; }
---------------------------
А в логе только написана только первая ошибка.