当前位置: 首页>>代码示例>>PHP>>正文


PHP icms_loadLanguageFile函数代码示例

本文整理汇总了PHP中icms_loadLanguageFile函数的典型用法代码示例。如果您正苦于以下问题:PHP icms_loadLanguageFile函数的具体用法?PHP icms_loadLanguageFile怎么用?PHP icms_loadLanguageFile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了icms_loadLanguageFile函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: eventAfterSaveSystemAdminPreferencesItems

	/**
	 * Do this event when saving item
	 *
	 * @param array config array
	 */
	function eventAfterSaveSystemAdminPreferencesItems($array) {
		if (!isset($array[ICMS_CONF_AUTOTASKS])) return;
		$handler = icms_getModuleHandler('autotasks', 'system');
		$handler->virtual_config = array();
		$array = &$array[ICMS_CONF_AUTOTASKS];
		$vconfig1 = array();
		$vconfig2 = array();
		foreach ($array as $key => $values) {
			$vconfig1[$key] = $values[0];
			$vconfig2[$key] = $values[1];
		}
		$handler->enableVirtualConfig($vconfig1);
		$system = $handler->getCurrentSystemHandler(true);
		if ($system->isEnabled()) {
			$system->stop();
		}
		$handler->enableVirtualConfig($vconfig2);
		$system = $handler->getCurrentSystemHandler(true);
		if ($rez = $system->canRun()) {
			$time = (int) ($handler->getRealTasksRunningTime());
			$rez = $system->start($time);
		} else {
			icms_loadLanguageFile('system', 'autotasks', true);
			icms_core_Message::error(_CO_ICMS_AUTOTASKS_INIT_ERROR);
			return false;
		}
		$handler->disableVirtualConfig();
	}
开发者ID:nao-pon,项目名称:impresscms,代码行数:33,代码来源:autotasks.php

示例2: profile_db_upgrade_1

function profile_db_upgrade_1()
{
    icms_loadLanguageFile('core', 'user');
    icms_loadLanguageFile('core', 'notification');
    addStep(_MI_PROFILE_CAT_BASEINFO, '', 1, 0);
    addStep(_MI_PROFILE_CAT_EXTINFO, '', 2, 1);
    addCategory(_MI_PROFILE_CAT_PERSONAL, 1);
    addCategory(_MI_PROFILE_CAT_MESSAGING, 3);
    addCategory(_MI_PROFILE_CAT_SETTINGS1, 4);
    addCategory(_MI_PROFILE_CAT_COMMUNITY, 2);
    include_once ICMS_ROOT_PATH . '/include/notification_constants.php';
    $umode_options = array('nest' => _NESTED, 'flat' => _FLAT, 'thread' => _THREADED);
    $uorder_options = array(0 => _OLDESTFIRST, 1 => _NEWESTFIRST);
    $notify_mode_options = array(XOOPS_NOTIFICATION_MODE_SENDALWAYS => _NOT_MODE_SENDALWAYS, XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE => _NOT_MODE_SENDONCE, XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT => _NOT_MODE_SENDONCEPERLOGIN);
    $notify_method_options = array(XOOPS_NOTIFICATION_METHOD_DISABLE => _NOT_METHOD_DISABLE, XOOPS_NOTIFICATION_METHOD_PM => _NOT_METHOD_PM, XOOPS_NOTIFICATION_METHOD_EMAIL => _NOT_METHOD_EMAIL);
    $fieldid = addField('name', _US_REALNAME, '', 1, 'textbox', 1, 1, 1, array(), 1, 255);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN, ICMS_GROUP_USERS), 0);
    $fieldid = addField('user_from', _US_LOCATION, '', 1, 'location', 1, 2, 1, array(), 2, 255);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN, ICMS_GROUP_USERS), 0);
    $fieldid = addField('user_occ', _US_OCCUPATION, '', 1, 'textbox', 1, 3, 1, array(), 2, 255);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN, ICMS_GROUP_USERS), 0);
    $fieldid = addField('user_intrest', _US_INTEREST, '', 1, 'textbox', 1, 4, 1, array(), 2, 255);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN, ICMS_GROUP_USERS), 0);
    $fieldid = addField('bio', _US_EXTRAINFO, '', 1, 'textarea', 2, 5, 1, array(), 2, 0);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN, ICMS_GROUP_USERS), 0);
    $fieldid = addField('user_aim', _US_AIM, '', 2, 'textbox', 1, 1, 1, array(), 2, 255);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN, ICMS_GROUP_USERS), 0);
    $fieldid = addField('user_icq', _US_ICQ, '', 2, 'textbox', 1, 2, 1, array(), 2, 255);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN, ICMS_GROUP_USERS), 0);
    $fieldid = addField('user_msnm', _US_MSNM, '', 2, 'textbox', 1, 3, 1, array(), 2, 255);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN, ICMS_GROUP_USERS), 0);
    $fieldid = addField('user_yim', _US_YIM, '', 2, 'textbox', 1, 4, 1, array(), 2, 255);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN, ICMS_GROUP_USERS), 0);
    $fieldid = addField('user_viewemail', _US_ALLOWVIEWEMAIL, '', 3, 'yesno', 3, 1, 1, array(), 1, 1);
    $fieldid = addField('attachsig', _US_SHOWSIG, '', 3, 'yesno', 3, 2, 1, array(), 0, 1);
    $fieldid = addField('user_mailok', _US_MAILOK, '', 3, 'yesno', 3, 3, 1, array(), 1, 1);
    $fieldid = addField('theme', _US_SELECT_THEME, '', 3, 'theme', 1, 4, 1, array(), 0, 0);
    $fieldid = addField('language', _US_SELECT_LANG, '', 3, 'language', 1, 5, 1, array(), 0, 0);
    $fieldid = addField('umode', _US_CDISPLAYMODE, '', 3, 'select', 3, 6, 1, $umode_options, 0, 0);
    $fieldid = addField('uorder', _US_CSORTORDER, '', 3, 'select', 3, 7, 1, $uorder_options, 0, 0);
    $fieldid = addField('notify_mode', _NOT_NOTIFYMODE, '', 3, 'select', 3, 8, 1, $notify_mode_options, 0, 0);
    $fieldid = addField('notify_method', _NOT_NOTIFYMETHOD, '', 3, 'select', 3, 9, 1, $notify_method_options, 0, 0);
    $fieldid = addField('timezone_offset', _US_TIMEZONE, '', 3, 'timezone', 1, 10, 1, array(), 2, 0);
    $fieldid = addField('user_viewoid', _US_ALLOWVIEWEMAILOPENID, '', 3, 'yesno', 3, 11, 0, array(), 1, 1);
    $fieldid = addField('url', _US_WEBSITE, '', 4, 'url', 1, 1, 1, array(), 1, 255);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN, ICMS_GROUP_USERS), 0);
    $fieldid = addField('posts', _US_POSTS, '', 4, 'textbox', 3, 2, 0, array(), 0, 255);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN, ICMS_GROUP_USERS), 0);
    $fieldid = addField('rank', _US_RANK, '', 4, 'rank', 3, 3, 1, array(), 0, 0);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN, ICMS_GROUP_USERS), 0);
    $fieldid = addField('user_regdate', _US_MEMBERSINCE, '', 4, 'datetime', 3, 4, 0, array(), 0, 10);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN, ICMS_GROUP_USERS), 0);
    $fieldid = addField('last_login', _US_LASTLOGIN, '', 4, 'datetime', 3, 5, 0, array(), 0, 10);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN, ICMS_GROUP_USERS), 0);
    $fieldid = addField('openid', _US_OPENID_FORM_CAPTION, '', 4, 'textbox', 1, 6, 0, array(), 1, 255);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN), 0);
    $fieldid = addField('user_sig', _US_SIGNATURE, '', 4, 'dhtml', 1, 7, 1, array(), 0, 0);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN, ICMS_GROUP_USERS), 0);
    return true;
}
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:60,代码来源:onupdate.inc.php

示例3: instance

 /**
  * Get a reference to the only instance of database class and connects to DB
  *
  * if the class has not been instantiated yet, this will also take
  * care of that
  *
  * @static
  * @return      object  Reference to the only instance of database class
  */
 public static function instance()
 {
     if (self::$xoopsInstance !== false) {
         return self::$xoopsInstance;
     }
     $allowWebChanges = defined('XOOPS_DB_PROXY') ? false : true;
     if (substr(XOOPS_DB_TYPE, 0, 4) == 'pdo.') {
         self::$xoopsInstance = new icms_db_legacy_PdoDatabase(self::$pdoInstance, $allowWebChanges);
     } else {
         if (defined('XOOPS_DB_ALTERNATIVE') && class_exists(XOOPS_DB_ALTERNATIVE)) {
             $class = XOOPS_DB_ALTERNATIVE;
         } else {
             $class = 'icms_db_legacy_' . XOOPS_DB_TYPE;
             $class .= $allowWebChanges ? '_Safe' : '_Proxy';
         }
         self::$xoopsInstance = new $class();
         self::$xoopsInstance->setLogger(icms::$logger);
         if (!self::$xoopsInstance->connect()) {
             icms_loadLanguageFile('core', 'core');
             trigger_error(_CORE_DB_NOTRACEDB, E_USER_ERROR);
         }
     }
     self::$xoopsInstance->setPrefix(XOOPS_DB_PREFIX);
     return self::$xoopsInstance;
 }
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:34,代码来源:Factory.php

示例4: setDeprecated

 /**
  * Provides a backtrace for deprecated methods and functions, will be in the error section of debug
  * This takes the place of icms_deprecated()
  *
  * @param string $replacement Method or function to be used instead of the deprecated method or function
  * @param string $extra Additional information to provide about the change
  */
 public static function setDeprecated($replacement = '', $extra = '')
 {
     if (defined("ICMS_TRACK_DEPRECATED") and !ICMS_TRACK_DEPRECATED) {
         //error_log("icms_core_Debug::setDeprecated('$replacement', '$extra');");
         return;
         // if we're not actively upgrading deprecated functions, no need to spend time tracking them
     }
     icms_loadLanguageFile('core', 'core');
     $trace = debug_backtrace();
     array_shift($trace);
     $level = $msg = $message = '';
     $pre = '<strong><em>(' . _CORE_DEPRECATED . ')</em></strong> - ';
     if ($trace[0]['function'] != 'include' && $trace[0]['function'] != 'include_once' && $trace[0]['function'] != 'require' && $trace[0]['function'] != 'require_once') {
         $pre .= $trace[0]['function'] . ': ';
     }
     foreach ($trace as $step) {
         $level .= '-';
         if (isset($step['file'])) {
             $message .= $level . $msg . (isset($step['class']) ? $step['class'] : '') . (isset($step['type']) ? $step['type'] : '') . sprintf(_CORE_DEPRECATED_MSG, $step['function'], str_replace(array(ICMS_TRUST_PATH, ICMS_ROOT_PATH), array("TRUSTPATH", "ROOTPATH"), $step['file']), $step['line']);
         }
         $msg = _CORE_DEPRECATED_CALLEDBY;
     }
     $logger = icms_core_Logger::instance();
     $logger->addDeprecated($pre . ($replacement ? ' <strong><em>' . sprintf(_CORE_DEPRECATED_REPLACEMENT, $replacement) . '</em></strong>.' : '') . ($extra ? ' <strong><em>' . $extra . '</em></strong>' : '') . _CORE_DEPRECATED_CALLSTACK . $message);
 }
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:32,代码来源:Debug.php

示例5: __construct

 /**
  * Constructor
  * @param	object    $object   reference to targetobject (@link icms_ipf_Object)
  * @param	string    $key      the form name
  */
 public function __construct($object, $key)
 {
     icms_loadLanguageFile('system', 'blocksadmin', TRUE);
     parent::__construct(_AM_VISIBLEIN, ' ', $key . '_visiblein_tray');
     $visible_label = new icms_form_elements_Label('', '<select name="visiblein[]" id="visiblein[]" multiple="multiple" size="10">' . $this->getPageSelOptions($object->getVar('visiblein')) . '</select>');
     $this->addElement($visible_label);
 }
开发者ID:nao-pon,项目名称:impresscms,代码行数:12,代码来源:Page.php

示例6: getCountryList

 /**
  * Gets list of countries
  *
  * @return  array	 $country_list   list of countries
  */
 public static function getCountryList()
 {
     icms_loadLanguageFile('core', 'countries');
     $country_list = array("" => "-", "AD" => _COUNTRY_AD, "AE" => _COUNTRY_AE, "AF" => _COUNTRY_AF, "AG" => _COUNTRY_AG, "AI" => _COUNTRY_AI, "AL" => _COUNTRY_AL, "AM" => _COUNTRY_AM, "AN" => _COUNTRY_AN, "AO" => _COUNTRY_AO, "AQ" => _COUNTRY_AQ, "AR" => _COUNTRY_AR, "AS" => _COUNTRY_AS, "AT" => _COUNTRY_AT, "AU" => _COUNTRY_AU, "AW" => _COUNTRY_AW, "AX" => _COUNTRY_AX, "AZ" => _COUNTRY_AZ, "BA" => _COUNTRY_BA, "BB" => _COUNTRY_BB, "BD" => _COUNTRY_BD, "BE" => _COUNTRY_BE, "BF" => _COUNTRY_BF, "BG" => _COUNTRY_BG, "BH" => _COUNTRY_BH, "BI" => _COUNTRY_BI, "BJ" => _COUNTRY_BJ, "BL" => _COUNTRY_BL, "BM" => _COUNTRY_BM, "BN" => _COUNTRY_BN, "BO" => _COUNTRY_BO, "BQ" => _COUNTRY_BQ, "BR" => _COUNTRY_BR, "BS" => _COUNTRY_BS, "BT" => _COUNTRY_BT, "BV" => _COUNTRY_BV, "BW" => _COUNTRY_BW, "BY" => _COUNTRY_BY, "BZ" => _COUNTRY_BZ, "CA" => _COUNTRY_CA, "CC" => _COUNTRY_CC, "CD" => _COUNTRY_CD, "CF" => _COUNTRY_CF, "CG" => _COUNTRY_CG, "CH" => _COUNTRY_CH, "CI" => _COUNTRY_CI, "CK" => _COUNTRY_CK, "CL" => _COUNTRY_CL, "CM" => _COUNTRY_CM, "CN" => _COUNTRY_CN, "CO" => _COUNTRY_CO, "CR" => _COUNTRY_CR, "CU" => _COUNTRY_CU, "CV" => _COUNTRY_CV, "CX" => _COUNTRY_CX, "CY" => _COUNTRY_CY, "CZ" => _COUNTRY_CZ, "DE" => _COUNTRY_DE, "DJ" => _COUNTRY_DJ, "DK" => _COUNTRY_DK, "DM" => _COUNTRY_DM, "DO" => _COUNTRY_DO, "DZ" => _COUNTRY_DZ, "EC" => _COUNTRY_EC, "EE" => _COUNTRY_EE, "EG" => _COUNTRY_EG, "EH" => _COUNTRY_EH, "ER" => _COUNTRY_ER, "ES" => _COUNTRY_ES, "ET" => _COUNTRY_ET, "FI" => _COUNTRY_FI, "FJ" => _COUNTRY_FJ, "FK" => _COUNTRY_FK, "FM" => _COUNTRY_FM, "FO" => _COUNTRY_FO, "FR" => _COUNTRY_FR, "GA" => _COUNTRY_GA, "GB" => _COUNTRY_GB, "GD" => _COUNTRY_GD, "GE" => _COUNTRY_GE, "GF" => _COUNTRY_GF, "GG" => _COUNTRY_GG, "GH" => _COUNTRY_GH, "GI" => _COUNTRY_GI, "GL" => _COUNTRY_GL, "GM" => _COUNTRY_GM, "GN" => _COUNTRY_GN, "GP" => _COUNTRY_GP, "GQ" => _COUNTRY_GQ, "GR" => _COUNTRY_GR, "GS" => _COUNTRY_GS, "GT" => _COUNTRY_GT, "GU" => _COUNTRY_GU, "GW" => _COUNTRY_GW, "GY" => _COUNTRY_GY, "HK" => _COUNTRY_HK, "HM" => _COUNTRY_HM, "HN" => _COUNTRY_HN, "HR" => _COUNTRY_HR, "HT" => _COUNTRY_HT, "HU" => _COUNTRY_HU, "ID" => _COUNTRY_ID, "IE" => _COUNTRY_IE, "IL" => _COUNTRY_IL, "IM" => _COUNTRY_IM, "IN" => _COUNTRY_IN, "IO" => _COUNTRY_IO, "IQ" => _COUNTRY_IQ, "IR" => _COUNTRY_IR, "IS" => _COUNTRY_IS, "IT" => _COUNTRY_IT, "JE" => _COUNTRY_JE, "JM" => _COUNTRY_JM, "JO" => _COUNTRY_JO, "JP" => _COUNTRY_JP, "KE" => _COUNTRY_KE, "KG" => _COUNTRY_KG, "KH" => _COUNTRY_KH, "KI" => _COUNTRY_KI, "KM" => _COUNTRY_KM, "KN" => _COUNTRY_KN, "KP" => _COUNTRY_KP, "KR" => _COUNTRY_KR, "KW" => _COUNTRY_KW, "KY" => _COUNTRY_KY, "KZ" => _COUNTRY_KZ, "LA" => _COUNTRY_LA, "LB" => _COUNTRY_LB, "LC" => _COUNTRY_LC, "LI" => _COUNTRY_LI, "LK" => _COUNTRY_LK, "LR" => _COUNTRY_LR, "LS" => _COUNTRY_LS, "LT" => _COUNTRY_LT, "LU" => _COUNTRY_LU, "LV" => _COUNTRY_LV, "LY" => _COUNTRY_LY, "MA" => _COUNTRY_MA, "MC" => _COUNTRY_MC, "MD" => _COUNTRY_MD, "ME" => _COUNTRY_ME, "MF" => _COUNTRY_MF, "MG" => _COUNTRY_MG, "MH" => _COUNTRY_MH, "MK" => _COUNTRY_MK, "ML" => _COUNTRY_ML, "MM" => _COUNTRY_MM, "MN" => _COUNTRY_MN, "MO" => _COUNTRY_MO, "MP" => _COUNTRY_MP, "MQ" => _COUNTRY_MQ, "MR" => _COUNTRY_MR, "MS" => _COUNTRY_MS, "MT" => _COUNTRY_MT, "MU" => _COUNTRY_MU, "MV" => _COUNTRY_MV, "MW" => _COUNTRY_MW, "MX" => _COUNTRY_MX, "MY" => _COUNTRY_MY, "MZ" => _COUNTRY_MZ, "NA" => _COUNTRY_NA, "NC" => _COUNTRY_NC, "NE" => _COUNTRY_NE, "NF" => _COUNTRY_NF, "NG" => _COUNTRY_NG, "NI" => _COUNTRY_NI, "NL" => _COUNTRY_NL, "NO" => _COUNTRY_NO, "NP" => _COUNTRY_NP, "NR" => _COUNTRY_NR, "NU" => _COUNTRY_NU, "NZ" => _COUNTRY_NZ, "OM" => _COUNTRY_OM, "PA" => _COUNTRY_PA, "PE" => _COUNTRY_PE, "PF" => _COUNTRY_PF, "PG" => _COUNTRY_PG, "PH" => _COUNTRY_PH, "PK" => _COUNTRY_PK, "PL" => _COUNTRY_PL, "PM" => _COUNTRY_PM, "PN" => _COUNTRY_PN, "PR" => _COUNTRY_PR, "PS" => _COUNTRY_PS, "PT" => _COUNTRY_PT, "PW" => _COUNTRY_PW, "PY" => _COUNTRY_PY, "QA" => _COUNTRY_QA, "RE" => _COUNTRY_RE, "RO" => _COUNTRY_RO, "RS" => _COUNTRY_RS, "RU" => _COUNTRY_RU, "RW" => _COUNTRY_RW, "SA" => _COUNTRY_SA, "SB" => _COUNTRY_SB, "SC" => _COUNTRY_SC, "SD" => _COUNTRY_SD, "SE" => _COUNTRY_SE, "SG" => _COUNTRY_SG, "SH" => _COUNTRY_SH, "SI" => _COUNTRY_SI, "SJ" => _COUNTRY_SJ, "SK" => _COUNTRY_SK, "SL" => _COUNTRY_SL, "SM" => _COUNTRY_SM, "SN" => _COUNTRY_SN, "SO" => _COUNTRY_SO, "SR" => _COUNTRY_SR, "SS" => _COUNTRY_SS, "ST" => _COUNTRY_ST, "SV" => _COUNTRY_SV, "SX" => _COUNTRY_SX, "SY" => _COUNTRY_SY, "SZ" => _COUNTRY_SZ, "TC" => _COUNTRY_TC, "TD" => _COUNTRY_TD, "TF" => _COUNTRY_TF, "TG" => _COUNTRY_TG, "TH" => _COUNTRY_TH, "TJ" => _COUNTRY_TJ, "TK" => _COUNTRY_TK, "TL" => _COUNTRY_TL, "TM" => _COUNTRY_TM, "TN" => _COUNTRY_TN, "TO" => _COUNTRY_TO, "TR" => _COUNTRY_TR, "TT" => _COUNTRY_TT, "TV" => _COUNTRY_TV, "TW" => _COUNTRY_TW, "TZ" => _COUNTRY_TZ, "UA" => _COUNTRY_UA, "UG" => _COUNTRY_UG, "UK" => _COUNTRY_UK, "UM" => _COUNTRY_UM, "US" => _COUNTRY_US, "UY" => _COUNTRY_UY, "UZ" => _COUNTRY_UZ, "VA" => _COUNTRY_VA, "VC" => _COUNTRY_VC, "VE" => _COUNTRY_VE, "VG" => _COUNTRY_VG, "VI" => _COUNTRY_VI, "VN" => _COUNTRY_VN, "VU" => _COUNTRY_VU, "WF" => _COUNTRY_WF, "WS" => _COUNTRY_WS, "YE" => _COUNTRY_YE, "YT" => _COUNTRY_YT, "ZA" => _COUNTRY_ZA, "ZM" => _COUNTRY_ZM, "ZW" => _COUNTRY_ZW);
     asort($country_list);
     reset($country_list);
     return $country_list;
 }
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:13,代码来源:Country.php

示例7: __construct

 /**
  * Constructor
  * @param	object    $object   reference to targetobject (@link icms_ipf_Object)
  * @param	string    $key      the form name
  */
 public function __construct($object, $key)
 {
     $var = $object->vars[$key];
     $control = $object->controls[$key];
     icms_loadLanguageFile('core', 'user');
     parent::__construct($var['form_caption'] . '<br />' . _US_TYPEPASSTWICE, ' ', $key . '_password_tray');
     $password_box1 = new icms_form_elements_Password('', $key . '1', 10, 32, '', FALSE, "password_adv");
     $this->addElement($password_box1);
     $this->_key = $key;
 }
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:15,代码来源:Passwordtray.php

示例8: __construct

 public function __construct()
 {
     icms_loadLanguageFile('core', 'xoopsmailerlocal');
     if (class_exists('XoopsMailerLocal')) {
         $this->multimailer = new XoopsMailerLocal();
     } else {
         $this->multimailer = new icms_messaging_Handler();
     }
     $this->reset();
 }
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:10,代码来源:Handler.php

示例9: __construct

 /**
  * Constructor
  * @param	object    $object   reference to targetobject (@link icms_ipf_Object)
  * @param	string    $key      the form name
  */
 public function __construct($object, $key)
 {
     $var = $object->vars[$key];
     parent::__construct($var['form_caption'], '<br /><br />', $key . '_signature_tray');
     icms_loadLanguageFile('core', 'user');
     $signature_textarea = new icms_form_elements_Dhtmltextarea('', $key, $object->getVar($key, 'e'));
     $this->addElement($signature_textarea);
     $attach_checkbox = new icms_form_elements_Checkbox('', 'attachsig', $object->getVar('attachsig', 'e'));
     $attach_checkbox->addOption(1, _US_SHOWSIG);
     $this->addElement($attach_checkbox);
 }
开发者ID:nao-pon,项目名称:impresscms,代码行数:16,代码来源:Signature.php

示例10: b_profile_usermenu_show

function b_profile_usermenu_show($options)
{
    global $icmsConfigUser;
    if (!is_object(icms::$user)) {
        return;
    }
    icms_loadLanguageFile(basename(dirname(dirname(__FILE__))), 'modinfo');
    $block = array();
    $dirname = basename(dirname(dirname(__FILE__)));
    $config_handler = icms::handler('icms_config');
    $privmessage_handler = icms::handler('icms_data_privmessage');
    $module = icms::handler('icms_module')->getByDirname($dirname, TRUE);
    $criteria = new icms_db_criteria_Compo();
    $criteria->add(new icms_db_criteria_Item('read_msg', 0));
    $criteria->add(new icms_db_criteria_Item('to_userid', icms::$user->getVar('uid')));
    $newmsg = $privmessage_handler->getCount($criteria);
    $i = 0;
    if (icms::$user->isAdmin()) {
        $block[++$i]['name'] = _MB_SYSTEM_ADMENU;
        $block[$i]['url'] = ICMS_URL . "/admin.php";
    }
    $block[++$i]['name'] = _MB_SYSTEM_VACNT;
    $block[$i]['url'] = ICMS_URL . "/modules/" . $dirname . "/" . ($module->config['profile_social'] ? "index.php?uid=" . icms::$user->getVar('uid') : "userinfo.php?uid=" . icms::$user->getVar('uid'));
    $block[++$i]['name'] = _MB_SYSTEM_INBOX;
    $block[$i]['url'] = ICMS_URL . "/viewpmsg.php";
    $block[$i]['extra'] = $newmsg;
    $block[++$i]['name'] = _MB_SYSTEM_NOTIF;
    $block[$i]['url'] = ICMS_URL . "/notifications.php";
    if ($module->config['profile_social']) {
        $block[++$i]['name'] = _MI_PROFILE_SEARCH;
        $block[$i]['url'] = ICMS_URL . "/modules/" . $dirname . "/search.php";
    }
    $block[++$i]['name'] = _MI_PROFILE_EDITACCOUNT;
    $block[$i]['url'] = ICMS_URL . "/modules/" . $dirname . "/edituser.php";
    $block[++$i]['name'] = _MI_PROFILE_CHANGEPASS;
    $block[$i]['url'] = ICMS_URL . "/modules/" . $dirname . "/changepass.php";
    if ($icmsConfigUser['allow_chgmail']) {
        $block[++$i]['name'] = _MI_PROFILE_CHANGEMAIL;
        $block[$i]['url'] = ICMS_URL . "/modules/" . $dirname . "/changemail.php";
    }
    if ($icmsConfigUser['self_delete']) {
        $block[++$i]['name'] = _MI_PROFILE_DELETEACCOUNT;
        $block[$i]['url'] = ICMS_URL . "/modules/" . $dirname . "/edituser.php?op=delete";
    }
    if ($module->config['profile_social']) {
        $block[++$i]['name'] = _MI_PROFILE_MYCONFIGS;
        $block[$i]['url'] = ICMS_URL . "/modules/" . $dirname . "/configs.php";
    }
    $block[++$i]['name'] = _MB_SYSTEM_LOUT;
    $block[$i]['url'] = ICMS_URL . "/user.php?op=logout";
    return $block;
}
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:52,代码来源:blocks.php

示例11: __construct

 /**
  * Constructor
  * @param	object    $object   reference to targetobject (@link icms_ipf_Object)
  * @param	string    $key      the form name
  */
 public function __construct($object, $key)
 {
     $var = $object->vars[$key];
     parent::__construct($var['form_caption'], ' ', 'options_tray');
     $func = $object->getVar('edit_func');
     require_once ICMS_ROOT_PATH . "/modules/" . $object->handler->getModuleDirname($object->getVar('mid', 'e')) . "/blocks/" . $object->getVar('func_file');
     icms_loadLanguageFile($object->handler->getModuleDirname($object->getVar('mid', 'e')), 'blocks');
     if (!function_exists($func)) {
         return;
     }
     $visible_label = new icms_form_elements_Label('', $func(explode('|', $object->getVar('options'))));
     $this->addElement($visible_label);
 }
开发者ID:nao-pon,项目名称:impresscms,代码行数:18,代码来源:Blockoptions.php

示例12: setDeprecated

 /**
  * Provides a backtrace for deprecated methods and functions, will be in the error section of debug
  * This takes the place of icms_deprecated()
  *
  * @param string $replacement Method or function to be used instead of the deprecated method or function
  * @param string $extra Additional information to provide about the change
  */
 public static function setDeprecated($replacement = '', $extra = '')
 {
     icms_loadLanguageFile('core', 'core');
     $trace = debug_backtrace();
     array_shift($trace);
     $level = $msg = $message = '';
     $pre = '<strong><em>(' . _CORE_DEPRECATED . ')</em></strong> - ';
     if ($trace[0]['function'] != 'include' && $trace[0]['function'] != 'include_once' && $trace[0]['function'] != 'require' && $trace[0]['function'] != 'require_once') {
         $pre .= $trace[0]['function'] . ': ';
     }
     foreach ($trace as $step) {
         $level .= '-';
         if (isset($step['file'])) {
             $message .= $level . $msg . (isset($step['class']) ? $step['class'] : '') . (isset($step['type']) ? $step['type'] : '') . sprintf(_CORE_DEPRECATED_MSG, $step['function'], str_replace(array(ICMS_TRUST_PATH, ICMS_ROOT_PATH), array("TRUSTPATH", "ROOTPATH"), $step['file']), $step['line']);
         }
         $msg = _CORE_DEPRECATED_CALLEDBY;
     }
     $logger = icms_core_Logger::instance();
     $logger->addDeprecated($pre . ($replacement ? ' <strong><em>' . sprintf(_CORE_DEPRECATED_REPLACEMENT, $replacement) . '</em></strong>.' : '') . ($extra ? ' <strong><em>' . $extra . '</em></strong>' : '') . _CORE_DEPRECATED_CALLSTACK . $message);
 }
开发者ID:nao-pon,项目名称:impresscms,代码行数:27,代码来源:Debug.php

示例13: elseif

 /**
  * Get a reference to the only instance of database class and connects to DB
  *
  * if the class has not been instantiated yet, this will also take
  * care of that
  *
  * @static
  * @staticvar   object  The only instance of database class
  * @return      object  Reference to the only instance of database class
  */
 public static function &instance()
 {
     static $instance;
     if (!isset($instance)) {
         if (defined('XOOPS_DB_ALTERNATIVE') && class_exists(XOOPS_DB_ALTERNATIVE)) {
             $class = XOOPS_DB_ALTERNATIVE;
         } elseif (!defined('XOOPS_DB_PROXY')) {
             $class = 'icms_db_legacy_' . XOOPS_DB_TYPE . '_Safe';
         } else {
             $class = 'icms_db_legacy_' . XOOPS_DB_TYPE . '_Proxy';
         }
         $instance = new $class();
         $instance->setLogger(icms_core_Logger::instance());
         $instance->setPrefix(XOOPS_DB_PREFIX);
         if (!$instance->connect()) {
             icms_loadLanguageFile('core', 'core');
             trigger_error(_CORE_DB_NOTRACEDB, E_USER_ERROR);
         }
     }
     return $instance;
 }
开发者ID:nao-pon,项目名称:impresscms,代码行数:31,代码来源:Factory.php

示例14: __construct

 /**
  * Constructor
  *
  * @param	string	$caption
  * @param	string	$name
  * @param	mixed	$value			Pre-selected value (or array of them).
  *									For an item with massive members, such as "Registered Users", "$value" should be used to store selected temporary users only instead of all members of that item
  * @param	bool	$include_anon	Include user "anonymous"?
  * @param	int		$size			Number or rows. "1" makes a drop-down-list.
  * @param	bool	$multiple	   Allow multiple selections?
  */
 public function __construct($caption, $name, $include_anon = FALSE, $value = NULL, $size = 1, $multiple = FALSE, $showremovedusers = FALSE, $justremovedusers = FALSE)
 {
     $limit = 200;
     $select_element = new icms_form_elements_Select('', $name, $value, $size, $multiple);
     if ($include_anon) {
         $select_element->addOption(0, $GLOBALS['icmsConfig']['anonymous']);
     }
     $member_handler = icms::handler('icms_member');
     $user_count = $member_handler->getUserCount();
     $value = is_array($value) ? $value : (empty($value) ? array() : array($value));
     if ($user_count > $limit && count($value) > 0) {
         $criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item("uid", "(" . implode(",", $value) . ")", "IN"));
     } else {
         $criteria = new icms_db_criteria_Compo();
         $criteria->setLimit($limit);
     }
     $criteria->setSort('uname');
     if (!$showremovedusers) {
         $criteria->add(new icms_db_criteria_Item('level', '-1', '!='));
     } elseif ($showremovedusers && $justremovedusers) {
         $criteria->add(new icms_db_criteria_Item('level', '-1'));
     }
     $criteria->setOrder('ASC');
     $users = $member_handler->getUserList($criteria);
     $select_element->addOptionArray($users);
     if ($user_count <= $limit) {
         parent::__construct($caption, "", $name);
         $this->addElement($select_element);
         return;
     }
     icms_loadLanguageFile('core', 'findusers');
     $js_addusers = "<script type=\"text/javascript\">\r\n\t\t\t\t\tfunction addusers(opts){\r\n\t\t\t\t\t\tvar num = opts.substring(0, opts.indexOf(\":\"));\r\n\t\t\t\t\t\topts = opts.substring(opts.indexOf(\":\")+1, opts.length);\r\n\t\t\t\t\t\tvar sel = xoopsGetElementById(\"" . $name . ($multiple ? "[]" : "") . "\");\r\n\t\t\t\t\t\tvar arr = new Array(num);\r\n\t\t\t\t\t\tfor (var n=0; n < num; n++) {\r\n\t\t\t\t\t\t\tvar nm = opts.substring(0, opts.indexOf(\":\"));\r\n\t\t\t\t\t\t\topts = opts.substring(opts.indexOf(\":\")+1, opts.length);\r\n\t\t\t\t\t\t\tvar val = opts.substring(0, opts.indexOf(\":\"));\r\n\t\t\t\t\t\t\topts = opts.substring(opts.indexOf(\":\")+1, opts.length);\r\n\t\t\t\t\t\t\tvar txt = opts.substring(0, nm - val.length);\r\n\t\t\t\t\t\t\topts = opts.substring(nm - val.length, opts.length);\r\n\t\t\t\t\t\t\tvar added = false;\r\n\t\t\t\t\t\t\tfor (var k = 0; k < sel.options.length; k++) {\r\n\t\t\t\t\t\t\t\tif (sel.options[k].value == val){\r\n\t\t\t\t\t\t\t\t\tadded = true;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (added == false) {\r\n\t\t\t\t\t\t\t\tsel.options[k] = new Option(txt, val);\r\n\t\t\t\t\t\t\t\tsel.options[k].selected = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t</script>";
     $token = icms::$security->createToken();
     $action_tray = new icms_form_elements_Tray("", " | ");
     $action_tray->addElement(new icms_form_elements_Label('', "<a href='#' onclick='var sel = xoopsGetElementById(\"" . $name . ($multiple ? "[]" : "") . "\");for (var i = sel.options.length-1; i >= 0; i--) {if (!sel.options[i].selected) {sel.options[i] = null;}}; return false;'>" . _MA_USER_REMOVE . "</a>"));
     $action_tray->addElement(new icms_form_elements_Label('', "<a href='#' onclick='openWithSelfMain(\"" . ICMS_URL . "/include/findusers.php?target={$name}&amp;multiple={$multiple}&amp;token={$token}\", \"userselect\", 800, 600, null); return false;' >" . _MA_USER_MORE . "</a>" . $js_addusers));
     parent::__construct($caption, '<br /><br />', $name);
     $this->addElement($select_element);
     $this->addElement($action_tray);
 }
开发者ID:nao-pon,项目名称:impresscms,代码行数:51,代码来源:User.php

示例15: __construct

 /**
  * Constructor
  *
  * Initiate the object, based on $icmsModule
  *
  * @param string $aboutTitle text used in the extreme right caption of the menu
  * @return icms_ipf_About
  */
 public function __construct($aboutTitle = _MODABOUT_ABOUT)
 {
     global $icmsModule, $icmsConfig;
     icms_loadLanguageFile($icmsModule->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;
 }
开发者ID:nao-pon,项目名称:impresscms,代码行数:31,代码来源:About.php


注:本文中的icms_loadLanguageFile函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。