1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: 192: 193: 194: 195: 196: 197: 198: 199: 200: 201: 202: 203: 204: 205: 206: 207: 208: 209: 210: 211: 212: 213: 214: 215: 216: 217: 218: 219: 220: 221: 222: 223: 224: 225: 226: 227: 228: 229: 230: 231: 232:
<?php
defined('ICMS_ROOT_PATH') or die('ImpressCMS root path not defined');
class icms_ipf_About {
public $_lang_aboutTitle;
public $_lang_author_info;
public $_lang_developer_lead;
public $_lang_developer_contributor;
public $_lang_developer_website;
public $_lang_developer_email;
public $_lang_developer_credits;
public $_lang_module_info;
public $_lang_module_status;
public $_lang_module_release_date;
public $_lang_module_demo;
public $_lang_module_support;
public $_lang_module_bug;
public $_lang_module_submit_bug;
public $_lang_module_feature;
public $_lang_module_submit_feature;
public $_lang_module_disclaimer;
public $_lang_author_word;
public $_lang_version_history;
public $_lang_by;
public $_tpl;
public function __construct($aboutTitle = _MODABOUT_ABOUT) {
global $icmsConfig;
icms_loadLanguageFile(icms::$module->getVar("dirname"), 'modinfo');
icms_loadLanguageFile('core', 'moduleabout');
$this->_aboutTitle = $aboutTitle;
$this->_lang_developer_contributor = _MODABOUT_DEVELOPER_CONTRIBUTOR;
$this->_lang_developer_website = _MODABOUT_DEVELOPER_WEBSITE;
$this->_lang_developer_email = _MODABOUT_DEVELOPER_EMAIL;
$this->_lang_developer_credits = _MODABOUT_DEVELOPER_CREDITS;
$this->_lang_module_info = _MODABOUT_MODULE_INFO;
$this->_lang_module_status = _MODABOUT_MODULE_STATUS;
$this->_lang_module_release_date =_MODABOUT_MODULE_RELEASE_DATE ;
$this->_lang_module_demo = _MODABOUT_MODULE_DEMO;
$this->_lang_module_support = _CO_ICMS_MODULE_SUPPORT;
$this->_lang_module_bug = _MODABOUT_MODULE_BUG;
$this->_lang_module_submit_bug = _MODABOUT_MODULE_SUBMIT_BUG;
$this->_lang_module_feature = _MODABOUT_MODULE_FEATURE;
$this->_lang_module_submit_feature = _CO_ICMS_MODULE_SUBMIT_FEATURE;
$this->_lang_module_disclaimer = _MODABOUT_MODULE_DISCLAIMER;
$this->_lang_author_word = _MODABOUT_AUTHOR_WORD;
$this->_lang_version_history = _MODABOUT_VERSION_HISTORY;
}
public function sanitize($value) {
return icms_core_DataFilter::checkVar($value, 'html', 'input');
}
public function render() {
global $icmsConfig;
icms_cp_header();
$module_handler = icms::handler('icms_module');
$versioninfo =& $module_handler->get(icms::$module->getVar('mid'));
icms::$module->displayAdminMenu(-1, $this->_aboutTitle . " " . $versioninfo->getInfo('name'));
$this->_tpl = new icms_view_Tpl();
$this->_tpl->assign('module_url', ICMS_URL . "/modules/" . icms::$module->getVar('dirname') . "/");
$this->_tpl->assign('module_image', $versioninfo->getInfo('image'));
$this->_tpl->assign('module_name', $versioninfo->getInfo('name'));
$this->_tpl->assign('module_version', $versioninfo->getInfo('version'));
$this->_tpl->assign('module_status_version', $versioninfo->getInfo('status_version'));
if ($versioninfo->getInfo('author_realname') != '') {
$author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")";
} else {
$author_name = $versioninfo->getInfo('author');
}
$this->_tpl->assign('module_author_name', $author_name);
$this->_tpl->assign('module_license', $versioninfo->getInfo('license'));
$this->_tpl->assign('module_credits', $versioninfo->getInfo('credits'));
$this->_tpl->assign('module_developer_lead', $versioninfo->getInfo('developer_lead'));
$this->_tpl->assign('module_developer_contributor', $versioninfo->getInfo('developer_contributor'));
$this->_tpl->assign('module_developer_website_url', $versioninfo->getInfo('developer_website_url'));
$this->_tpl->assign('module_developer_website_name', $versioninfo->getInfo('developer_website_name'));
$this->_tpl->assign('module_developer_email', $versioninfo->getInfo('developer_email'));
$people = $versioninfo->getInfo('people');
if ($people) {
$this->_tpl->assign('module_people_developers', isset($people['developers'])
? array_map(array($this, 'sanitize'), $people['developers'])
: false
);
$this->_tpl->assign('module_people_testers', isset($people['testers'])
? array_map(array($this, 'sanitize'), $people['testers'])
: false
);
$this->_tpl->assign('module_people_translators', isset($people['translators'])
? array_map(array($this, 'sanitize'), $people['translators'])
: false
);
$this->_tpl->assign('module_people_documenters', isset($people['documenters'])
? array_map(array($this, 'sanitize'), $people['documenters'])
: false
);
$this->_tpl->assign('module_people_other', isset($people['other'])
? array_map(array($this, 'sanitize'), $people['other'])
: false
);
}
$this->_tpl->assign('module_date', $versioninfo->getInfo('date'));
$this->_tpl->assign('module_status', $versioninfo->getInfo('status'));
$this->_tpl->assign('module_demo_site_url', $versioninfo->getInfo('demo_site_url'));
$this->_tpl->assign('module_demo_site_name', $versioninfo->getInfo('demo_site_name'));
$this->_tpl->assign('module_support_site_url', $versioninfo->getInfo('support_site_url'));
$this->_tpl->assign('module_support_site_name', $versioninfo->getInfo('support_site_name'));
$this->_tpl->assign('module_submit_bug', $versioninfo->getInfo('submit_bug'));
$this->_tpl->assign('module_submit_feature', $versioninfo->getInfo('submit_feature'));
$manual =$versioninfo->getInfo('manual');
if ($manual) {
$this->_tpl->assign('module_manual', isset($manual['wiki']) ? array_map(array($this, 'sanitize'), $manual['wiki']) : false);
}
$this->_tpl->assign('module_warning', icms_core_DataFilter::checkVar($versioninfo->getInfo('warning'), 'html', 'input'));
$this->_tpl->assign('module_author_word', $versioninfo->getInfo('author_word'));
$filename = ICMS_ROOT_PATH . '/modules/' . icms::$module->getVar('dirname') . '/changelog.txt';
if (is_file($filename)) {
$filesize = filesize($filename);
$handle = fopen($filename, 'r');
$this->_tpl->assign('module_version_history', icms_core_DataFilter::checkVar(fread($handle, $filesize), 'text', 'output'));
fclose($handle);
}
$filename = ICMS_ROOT_PATH . '/modules/' . icms::$module->getVar('dirname') . '/docs/changelog.txt';
if (is_file($filename)) {
$filesize = filesize($filename);
$handle = fopen($filename, 'r');
$this->_tpl->assign('module_version_history', icms_core_DataFilter::checkVar(fread($handle, $filesize), 'text', 'output'));
fclose($handle);
}
if (file_exists( ICMS_ROOT_PATH . '/modules/' . icms::$module->getVar('dirname') . '/docs/license.txt' )) {
$filename = ICMS_ROOT_PATH . '/modules/' . icms::$module->getVar('dirname') . '/docs/license.txt';
} elseif (file_exists( ICMS_ROOT_PATH . '/modules/' . icms::$module->getVar('dirname') . '/docs/' . $icmsConfig['language'] . '_license.txt' )) {
$filename = ICMS_ROOT_PATH . '/modules/' . icms::$module->getVar('dirname') . '/docs/' . $icmsConfig['language'] . '_license.txt';
} elseif (file_exists( ICMS_ROOT_PATH . '/modules/' . icms::$module->getVar('dirname') . '/license.txt' )) {
$filename = ICMS_ROOT_PATH . '/modules/' . icms::$module->getVar('dirname') . '/license.txt';
} elseif (file_exists( ICMS_ROOT_PATH . '/modules/' . icms::$module->getVar('dirname') . '/license/' . $icmsConfig['language'] . '_license.txt' )) {
$filename = ICMS_ROOT_PATH . '/modules/' . icms::$module->getVar('dirname') . '/license/' . $icmsConfig['language'] . '_license.txt';
} elseif (file_exists( ICMS_ROOT_PATH . '/modules/' . icms::$module->getVar('dirname') . '/license.txt' )) {
$filename = ICMS_ROOT_PATH . '/modules/' . icms::$module->getVar('dirname') . '/license.txt';
}
if (is_file($filename)) {
$filesize = filesize($filename);
$handle = fopen($filename, 'r');
$this->_tpl->assign('module_license_txt', icms_core_DataFilter::checkVar(fread($handle, $filesize), 'text', 'output'));
fclose($handle);
}
$this->_tpl->display('db:system_adm_moduleabout.html');
icms_cp_footer();
}
}