• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP icms_loadLanguageFile函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Generate_PDF

/**
 * Generates a pdf file
 *
 * @param string $content	The content to put in the PDF file
 * @param string $doc_title	The title for the PDF file
 * @param string $doc_keywords	The keywords to put in the PDF file
 * @return string Generated output by the pdf (@link TCPDF) class
 */
function Generate_PDF($content, $doc_title, $doc_keywords)
{
    global $icmsConfig;
    require_once ICMS_PDF_LIB_PATH . '/tcpdf.php';
    icms_loadLanguageFile('core', 'pdf');
    $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true);
    // set document information
    $pdf->SetCreator(PDF_CREATOR);
    $pdf->SetAuthor(PDF_AUTHOR);
    $pdf->SetTitle($doc_title);
    $pdf->SetSubject($doc_title);
    $pdf->SetKeywords($doc_keywords);
    $sitename = $icmsConfig['sitename'];
    $siteslogan = $icmsConfig['slogan'];
    $pdfheader = icms_core_DataFilter::undoHtmlSpecialChars($sitename . ' - ' . $siteslogan);
    $pdf->SetHeaderData("logo.gif", PDF_HEADER_LOGO_WIDTH, $pdfheader, ICMS_URL);
    //set margins
    $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
    //set auto page breaks
    $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
    $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
    $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
    $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
    //set image scale factor
    $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
    $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
    $pdf->setLanguageArray($l);
    //set language items
    // set font
    $TextFont = @_PDF_LOCAL_FONT && file_exists(ICMS_PDF_LIB_PATH . '/fonts/' . _PDF_LOCAL_FONT . '.php') ? _PDF_LOCAL_FONT : 'dejavusans';
    $pdf->SetFont($TextFont);
    //initialize document
    $pdf->AliasNbPages();
    $pdf->AddPage();
    $pdf->writeHTML($content, true, 0);
    return $pdf->Output();
}
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:45,代码来源:pdf.php


示例17: redirect_header

 * @copyright	http://www.impresscms.org/ The ImpressCMS Project
 * @license	LICENSE.txt
 * @package	core
 * @since	XOOPS
 * @author	http://www.xoops.org The XOOPS Project
 * @author	modified by UnderDog <[email protected]>
 * @version	$Id: comment_reply.php 22037 2011-07-15 13:02:29Z mcdonald3072 $
 */
if (!defined('ICMS_ROOT_PATH') || !is_object($icmsModule)) {
    exit;
}
include_once ICMS_INCLUDE_PATH . '/comment_constants.php';
if ('system' != $icmsModule->getVar('dirname') && XOOPS_COMMENT_APPROVENONE == $icmsModuleConfig['com_rule'] || !is_object(icms::$user) && !$icmsModuleConfig['com_anonpost'] || !is_object($icmsModule)) {
    redirect_header(ICMS_URL . '/user.php', 1, _NOPERM);
}
icms_loadLanguageFile('core', 'comment');
$com_id = isset($_GET['com_id']) ? (int) $_GET['com_id'] : 0;
$com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : '';
if ($com_mode == '') {
    if (is_object(icms::$user)) {
        $com_mode = icms::$user->getVar('umode');
    } else {
        $com_mode = $icmsConfig['com_mode'];
    }
}
if (!isset($_GET['com_order'])) {
    if (is_object(icms::$user)) {
        $com_order = icms::$user->getVar('uorder');
    } else {
        $com_order = $icmsConfig['com_order'];
    }
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:31,代码来源:comment_reply.php


示例18: b_system_bookmarks_show

/**
 * Gathers and displays the current user's bookmarks
 * @since 1.2
 * @return array Array of bookmark links for the current user
 */
function b_system_bookmarks_show() {
	global $icmsConfig;
	$block = array();
	icms_loadLanguageFile('core', 'notification');
	// User must be logged in
	if (empty(icms::$user)) {
		return FALSE; // do not display block
	}
	// Get an array of all notifications for the selected user

	$notification_handler = icms::handler('icms_data_notification');
	$notifications =& $notification_handler->getByUser(icms::$user->getVar('uid'));

	// Generate the info for the template

	$module_handler = icms::handler('icms_module');

	$prev_modid = -1;

	$prev_item = -1;
	foreach ($notifications as $n) {
		$modid = $n->getVar('not_modid');
		if ($modid != $prev_modid) {
			$prev_modid = $modid;

			$prev_item = -1;
			$module =& $module_handler->get($modid);
			$module_name = $module->getVar('name');
			// Get the lookup function, if exists
			$not_config = $module->getInfo('notification');
			$lookup_func = '';
			if (!empty($not_config['lookup_file'])) {
				$lookup_file = ICMS_MODULES_PATH . '/' . $module->getVar('dirname') . '/' . $not_config['lookup_file'];
				if (file_exists($lookup_file)) {
					include_once $lookup_file;
					if (!empty($not_config['lookup_func']) && function_exists($not_config['lookup_func'])) {
						$lookup_func = $not_config['lookup_func'];
					}
				}
			}
		}

		$category = $n->getVar('not_category');
		$item = $n->getVar('not_itemid');
		if ($item != $prev_item) {
			$prev_item = $item;
			if (!empty($lookup_func)) {
				$item_info = $lookup_func($category, $item);
			} else {
				$item_info = array('name'=>'[' . _NOT_NAMENOTAVAILABLE . ']', 'url'=>'');
			}
		}

		if ($n->getVar('not_event') == 'bookmark') {
			$block[$module_name][] = array('name'=>$item_info['name'], 'url'=>$item_info['url']);
		}
	}

	return $block;
}
开发者ID:nao-pon,项目名称:impresscms,代码行数:65,代码来源:system_blocks.php


示例19: icms_loadLanguageFile

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP icon函数代码示例发布时间:2022-05-15
下一篇:
PHP icms_getModuleHandler函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap