| 2728 |
$handler =& new contentHandler(); |
$handler =& new contentHandler(); |
| 2729 |
return $handler->getContentItemLinkCount(); |
return $handler->getContentItemLinkCount(); |
| 2730 |
} |
} |
| 2731 |
|
|
| 2732 |
|
function formId($option='', $task='', $my='') { |
| 2733 |
|
$option=trim($option);$task=trim($task); |
| 2734 |
|
if (!$option) die('Illegal option for mainframe formId in core.classes.php'); |
| 2735 |
|
if (!$task) die('Illegal task for mainframe formId in core.classes.php'); |
| 2736 |
|
if (!is_object($my)) die('Illegal user object for mainframe formId in core.classes.php'); |
| 2737 |
|
if (!session_id()) session_start(); |
| 2738 |
|
if (!isset($_SESSION['initiated'])) { |
| 2739 |
|
session_regenerate_id(); |
| 2740 |
|
$_SESSION['initiated'] = true; |
| 2741 |
|
} |
| 2742 |
|
$hash = md5(microtime().mt_rand()); |
| 2743 |
|
$_SESSION['mosfid'] = md5($hash.$option.$task.$my->id.mamboCore::get('mosConfig_secret')); |
| 2744 |
|
return $hash; |
| 2745 |
|
} |
| 2746 |
|
|
| 2747 |
|
function validFormId($option='', $task='', $my='') { |
| 2748 |
|
$option=trim($option);$task=trim($task); |
| 2749 |
|
if (!$option) die('Illegal option for mainframe validFormId in core.classes.php'); |
| 2750 |
|
if (!$task) die('Illegal task for mainframe validFormId in core.classes.php'); |
| 2751 |
|
if (!is_object($my)) die('Illegal user object for mainframe validFormId in core.classes.php'); |
| 2752 |
|
if (!isset($_REQUEST['f'])) die('Missing hash for mainframe validFormId in core.classes.php'); |
| 2753 |
|
if (!isset($_SESSION['mosfid'])) return false; |
| 2754 |
|
$valid = $_SESSION['mosfid'] == md5($_REQUEST['f'].$option.$task.$my->id.mamboCore::get('mosConfig_secret')); |
| 2755 |
|
unset($_SESSION['mosfid']); |
| 2756 |
|
return $valid; |
| 2757 |
|
} |
| 2758 |
|
|
| 2759 |
/** |
/** |
| 2760 |
* retained for backward compatability |
* retained for backward compatability |
| 2761 |
*/ |
*/ |