/** * Version of the SmartObject Framework */ include_once SMARTOBJECT_ROOT_PATH . "include/version.php"; include_once SMARTOBJECT_ROOT_PATH . "include/functions.php"; include_once SMARTOBJECT_ROOT_PATH . "include/xoops_core_common_functions.php"; /** * Some constants used by the SmartObjects */ define('_SMART_GETVAR', 1); define('_SMART_OBJECT_METHOD', 2); /** * Include the common language constants for the SmartObject Framework */ /* if (!defined('SMARTOBJECT_COMMON_CONSTANTS')) { $common_file = SMARTOBJECT_ROOT_PATH . "language/" . $xoopsConfig['language'] . "/common.php"; if (!file_exists($common_file)) { $common_file = SMARTOBJECT_ROOT_PATH . "language/english/common.php"; } include($common_file); define('SMARTOBJECT_COMMON_CONSTANTS', true); } */ // get current page $smart_current_page = smart_getCurrentPage(); // get previous page $smart_previous_page = smart_getenv('HTTP_REFERER'); include_once SMARTOBJECT_ROOT_PATH . "class/smartloader.php";
function getPrintAndMailLink($smartObj) { global $xoopsConfig; $printlink = $this->handler->_moduleUrl . "print.php?" . $this->handler->keyName . "=" . $smartObj->getVar($this->handler->keyName); $js = "javascript:openWithSelfMain('" . $printlink . "', 'smartpopup', 700, 519);"; $printlink = '<a href="' . $js . '"><img src="' . SMARTOBJECT_IMAGES_ACTIONS_URL . 'fileprint.png" alt="" style="vertical-align: middle;"/></a>'; $smartModule = smart_getModuleInfo($smartObj->handler->_moduleName); $link = smart_getCurrentPage(); $mid = $smartModule->getVar('mid'); $friendlink = "<a href=\"javascript:openWithSelfMain('" . SMARTOBJECT_URL . "sendlink.php?link=" . $link . "&mid=" . $mid . "', ',',',',',','sendmessage', 674, 500);\"><img src=\"" . SMARTOBJECT_IMAGES_ACTIONS_URL . "mail_send.png\" alt=\"" . _CO_SOBJECT_EMAIL . "\" title=\"" . _CO_SOBJECT_EMAIL . "\" style=\"vertical-align: middle;\"/></a>"; $ret = '<span id="smartobject_print_button">' . $printlink . " </span>" . '<span id="smartobject_mail_button">' . $friendlink . '</span>'; return $ret; }