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


PHP icms_conv_nr2local函数代码示例

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


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

示例1: render

 /**
  * Render the Date field
  */
 public function render()
 {
     global $icmsConfigPersona;
     $ele_name = $this->getName();
     $ele_value = $this->getValue(false);
     $jstime = formatTimestamp($ele_value, _SHORTDATESTRING);
     include_once ICMS_ROOT_PATH . '/include/calendar' . ($icmsConfigPersona['use_jsjalali'] == true ? 'jalali' : '') . 'js.php';
     $result = "<input type='text' name='" . $ele_name . "' id='" . $ele_name . "' size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . date(_SHORTDATESTRING, $ele_value) . "'" . $this->getExtra() . " />&nbsp;&nbsp;<img src='" . ICMS_URL . "/images/calendar.png' alt='" . _CALENDAR . "' title='" . _CALENDAR . "' onclick='return showCalendar(\"" . $ele_name . "\");'>";
     if ($icmsConfigPersona['use_jsjalali']) {
         include_once ICMS_ROOT_PATH . '/include/jalali.php';
         $result = "<input id='tmp_" . $ele_name . "' readonly='readonly' size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . (_CALENDAR_TYPE == 'jalali' ? icms_conv_nr2local(jdate(_SHORTDATESTRING, $ele_value)) : date(_SHORTDATESTRING, $ele_value)) . "' /><input type='hidden' name='" . $ele_name . "' id='" . $ele_name . "' value='" . date(_SHORTDATESTRING, $ele_value) . "' " . $this->getExtra() . " />&nbsp;&nbsp;<img src='" . ICMS_URL . "/images/calendar.png' alt='" . _CALENDAR . "' title='" . _CALENDAR . "' id='btn_" . $ele_name . "'><script type='text/javascript'>\n\t\t\t\tCalendar.setup({\n\t\t\t\t\tinputField  : 'tmp_" . $ele_name . "',\n\t\t       \t\tifFormat    : '%Y-%m-%d',\n\t\t       \t\tbutton      : 'btn_" . $ele_name . "',\n        \t\t\tlangNumbers : true,\n        \t\t\tdateType\t: '" . _CALENDAR_TYPE . "',\n\t\t\t\t\tonUpdate\t: function(cal){document.getElementById('" . $ele_name . "').value = cal.date.print('%Y-%m-%d');}\n\t\t\t\t});\n\t\t\t</script>";
     }
     return $result;
 }
开发者ID:nao-pon,项目名称:impresscms,代码行数:17,代码来源:Date.php

示例2: formatTimestamp

 for ($i = 0; $i < $tcount; $i++) {
     $tplsetname = $tplsets[$i]->getVar('tplset_name');
     $installed_themes[] = $tplsetname;
     $class = $class == 'even' ? 'odd' : 'even';
     echo '<tr class="' . $class . '" align="center"><td  style="vertical-align: middle;" class="head">' . $tplsetname . '<br /><br /><span style="font-weight:normal;">' . $tplsets[$i]->getVar('tplset_desc') . '</span></td><td style="vertical-align: middle;">' . formatTimestamp($tplsets[$i]->getVar('tplset_created'), 's') . '</td><td align="' . _GLOBAL_LEFT . '"><ul>';
     $tplstats = $tpltpl_handler->getModuleTplCount($tplsetname);
     if (count($tplstats) > 0) {
         $module_handler = icms::handler('icms_module');
         echo '<ul>';
         foreach ($tplstats as $moddir => $filecount) {
             $module =& $module_handler->getByDirname($moddir);
             if (is_object($module)) {
                 if ($installed_mods[$moddir] > $filecount) {
                     $filecount = '<span style="color:#ff0000;">' . $filecount . '</span>';
                 }
                 echo '<li>' . $module->getVar('name') . ' [<a href="admin.php?fct=tplsets&amp;op=listtpl&amp;tplset=' . $tplsetname . '&amp;moddir=' . $moddir . '">' . _LIST . '</a> (<strong>' . icms_conv_nr2local($filecount) . '</strong>)]</li>';
             }
             unset($module);
         }
         $not_installed = array_diff(array_keys($installed_mods), array_keys($tplstats));
     } else {
         $not_installed =& array_keys($installed_mods);
     }
     foreach ($not_installed as $ni) {
         $module =& $module_handler->getByDirname($ni);
         echo '<li>' . $module->getVar('name') . ' <a href="admin.php?fct=tplsets&amp;op=listtpl&amp;tplset=' . $tplsetname . '&amp;moddir=' . $ni . '"><img src="' . ICMS_IMAGES_SET_URL . '/actions/view_choose.png" alt="' . _LIST . '" title="' . _LIST . '" /></a> (<span style="color:#ff0000; font-weight: bold;">0</span>)' . ' <a href="admin.php?fct=tplsets&amp;op=generatemod&amp;tplset=' . $tplsetname . '&amp;moddir=' . $ni . '"><img src="' . ICMS_IMAGES_SET_URL . '/actions/filenew2.png" alt="' . _MD_GENERATE . '" title="' . _MD_GENERATE . '" /></a></li>';
     }
     echo '</ul></td><td style="vertical-align: middle;">' . '<a href="admin.php?fct=tplsets&amp;op=download&amp;method=tar&amp;tplset=' . $tplsetname . '"><img src="' . ICMS_IMAGES_SET_URL . '/actions/filesave2.png" alt="' . _MD_DOWNLOAD . '" title="' . _MD_DOWNLOAD . '" /></a>&nbsp;<a href="admin.php?fct=tplsets&amp;op=clone&amp;tplset=' . $tplsetname . '"><img src="' . ICMS_IMAGES_SET_URL . '/actions/editcopy.png" alt="' . _CLONE . '" title="' . _CLONE . '" /></a>';
     if ($tplsetname != 'default' && $tplsetname != $icmsConfig['template_set']) {
         echo '&nbsp;<a href="admin.php?fct=tplsets&amp;op=delete&amp;tplset=' . $tplsetname . '"><img src="' . ICMS_IMAGES_SET_URL . '/actions/editdelete.png" alt="' . _DELETE . '" title="' . _DELETE . '" /></a>';
     }
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:31,代码来源:main.php

示例3: b_system_newmembers_show

/**
 * Shows the latest members that were added
 *
 * @param array $options The block options
 * @return array $block The newest members block array
 */
function b_system_newmembers_show($options) {
	global $icmsConfigUser;

	$block = array();
	$criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('level', 0, '>'));
	$limit = (!empty($options[0])) ? $options[0] : 10;
	$criteria->setOrder('DESC');
	$criteria->setSort('user_regdate');
	$criteria->setLimit($limit);
	$member_handler = icms::handler('icms_member');
	$newmembers = $member_handler->getUsers($criteria);
	$count = count($newmembers);
	for ($i = 0; $i < $count; $i++) {
		if ($options[1] == 1) {
			if ($newmembers[$i]->getVar('user_avatar') && $newmembers[$i]->getVar('user_avatar') != 'blank.gif' && $newmembers[$i]->getVar('user_avatar') != '') {
				$block['users'][$i]['avatar'] = ICMS_UPLOAD_URL . '/' . $newmembers[$i]->getVar('user_avatar');
			} elseif ($icmsConfigUser['avatar_allow_gravatar'] == 1) {
				$block['users'][$i]['avatar'] = $newmembers[$i]->gravatar('G', $icmsConfigUser['avatar_width']);
			} else {
				$block['users'][$i]['avatar'] = '';
			}
		} else {
			$block['users'][$i]['avatar'] = '';
		}
		$block['users'][$i]['id'] = $newmembers[$i]->getVar('uid');
		$block['users'][$i]['name'] = $newmembers[$i]->getVar('uname');
		$block['users'][$i]['joindate'] = formatTimestamp($newmembers[$i]->getVar('user_regdate'), 's');
		$block['users'][$i]['login_name'] = $newmembers[$i]->getVar('login_name');
	}
	if (!empty($options[2]) && $options[2] == 1) {
		$block['index_enabled'] = TRUE;
		$block['registered'] = icms_conv_nr2local($member_handler->getUserCount(new icms_db_criteria_Item('level')));
		$block['inactive'] = icms_conv_nr2local($member_handler->getUserCount(new icms_db_criteria_Item('level', 0)));
		$block['active'] = icms_conv_nr2local($member_handler->getUserCount(new icms_db_criteria_Item('level', 0, '>')));
		$block['lang_totalusers'] = _MB_SYSTEM_TOTAL_USERS;
		$block['lang_activeusers'] = _MB_SYSTEM_ACT_USERS;
		$block['lang_inactiveusers'] = _MB_SYSTEM_INACT_USERS;
	}
	return $block;
}
开发者ID:nao-pon,项目名称:impresscms,代码行数:46,代码来源:system_blocks.php

示例4: icms_convert_size

/**
 * Converts size to human readable text
 *
 * @param int $size	The size to convert
 * @return string The converted size
 * @todo Move to a static class method - String
 */
function icms_convert_size($size)
{
    if ($size >= 1073741824) {
        $ret = round($size / 1024 / 1024 / 1024, 1) . ' ' . _CORE_GIGABYTES_SHORTEN;
    } elseif ($size >= 1048576 && $size < 1073741824) {
        $ret = round($size / 1024 / 1024, 1) . ' ' . _CORE_MEGABYTES_SHORTEN;
    } elseif ($size >= 1024 && $size < 1048576) {
        $ret = round($size / 1024, 1) . ' ' . _CORE_KILOBYTES_SHORTEN;
    } else {
        $ret = $size . ' ' . _CORE_BYTES;
    }
    return icms_conv_nr2local($ret);
}
开发者ID:nao-pon,项目名称:impresscms,代码行数:20,代码来源:functions.php

示例5: trim

			? trim(filter_input(INPUT_POST, 'op'))
			: 'list'
		);
	if ($op == 'list') {
		icms_loadLanguageFile('system', 'preferences', TRUE);
		icms_cp_header();
		echo '<div class="CPbigTitle" style="background-image: url(' 
			. ICMS_URL . '/modules/system/admin/avatars/images/avatars_big.png)">' 
			. _MD_AVATARMAN . '</div><br />';
		$avt_handler = icms::handler('icms_data_avatar');
		$savatar_count = $avt_handler->getCount(new icms_db_criteria_Item('avatar_type', 'S'));
		$cavatar_count = $avt_handler->getCount(new icms_db_criteria_Item('avatar_type', 'C'));
		echo '<ul><li>' 
			. _MD_SYSAVATARS . ' (' . sprintf(_NUMIMAGES, '<strong>' . icms_conv_nr2local($savatar_count) . '</strong>') 
			. ') [<a href="admin.php?fct=avatars&amp;op=listavt&amp;type=S">' . _LIST . '</a>]</li><li>' 
			. _MD_CSTAVATARS . ' (' . sprintf(_NUMIMAGES, '<strong>' . icms_conv_nr2local($cavatar_count) . '</strong>') 
			. ') [<a href="admin.php?fct=avatars&amp;op=listavt&amp;type=C">' . _LIST 
			. '</a>]</li></ul>';
		$form = new icms_form_Theme(_MD_ADDAVT, 'avatar_form', 'admin.php', "post", TRUE);
		$form->setExtra('enctype="multipart/form-data"');
		$form->addElement(new icms_form_elements_Text(_IMAGENAME, 'avatar_name', 50, 255), TRUE);
		$form->addElement(new icms_form_elements_File(_IMAGEFILE, 'avatar_file', $icmsConfigUser['avatar_maxsize']));
		$form->addElement(new icms_form_elements_Text(_IMGWEIGHT, 'avatar_weight', 3, 4, 0));
		$form->addElement(new icms_form_elements_Radioyn(_IMGDISPLAY, 'avatar_display', 1, _YES, _NO));
		$restrictions  = _MD_AM_AVATARMAX . ": " . $icmsConfigUser['avatar_maxsize'] . "<br />";
		$restrictions .= _MD_AM_AVATARW . ": " . $icmsConfigUser['avatar_width'] . "px<br />";
		$restrictions .= _MD_AM_AVATARH . ": ". $icmsConfigUser['avatar_height']. "px";
		$form->addElement(new icms_form_elements_Label(_MD_RESTRICTIONS, $restrictions));
		$form->addElement(new icms_form_elements_Hidden('op', 'addfile'));
		$form->addElement(new icms_form_elements_Hidden('fct', 'avatars'));
		$form->addElement(new icms_form_elements_Button('', 'avt_button', _SUBMIT, 'submit'));
开发者ID:nao-pon,项目名称:impresscms,代码行数:31,代码来源:main.php

示例6: foreach

     }
 }
 if (!empty($_GET)) {
     foreach ($_GET as $k => $v) {
         ${$k} = StopXSS($v);
     }
 }
 $op = isset($_GET['op']) ? trim(filter_input(INPUT_GET, 'op')) : (isset($_POST['op']) ? trim(filter_input(INPUT_POST, 'op')) : 'list');
 if ($op == 'list') {
     icms_loadLanguageFile('system', 'preferences', TRUE);
     icms_cp_header();
     echo '<div class="CPbigTitle" style="background-image: url(' . ICMS_URL . '/modules/system/admin/avatars/images/avatars_big.png)">' . _MD_AVATARMAN . '</div><br />';
     $avt_handler = icms::handler('icms_data_avatar');
     $savatar_count = $avt_handler->getCount(new icms_db_criteria_Item('avatar_type', 'S'));
     $cavatar_count = $avt_handler->getCount(new icms_db_criteria_Item('avatar_type', 'C'));
     echo '<ul><li>' . _MD_SYSAVATARS . ' (' . sprintf(_NUMIMAGES, '<strong>' . icms_conv_nr2local($savatar_count) . '</strong>') . ') [<a href="admin.php?fct=avatars&amp;op=listavt&amp;type=S">' . _LIST . '</a>]</li><li>' . _MD_CSTAVATARS . ' (' . sprintf(_NUMIMAGES, '<strong>' . icms_conv_nr2local($cavatar_count) . '</strong>') . ') [<a href="admin.php?fct=avatars&amp;op=listavt&amp;type=C">' . _LIST . '</a>]</li></ul>';
     $form = new icms_form_Theme(_MD_ADDAVT, 'avatar_form', 'admin.php', "post", TRUE);
     $form->setExtra('enctype="multipart/form-data"');
     $form->addElement(new icms_form_elements_Text(_IMAGENAME, 'avatar_name', 50, 255), TRUE);
     $form->addElement(new icms_form_elements_File(_IMAGEFILE, 'avatar_file', $icmsConfigUser['avatar_maxsize']));
     $form->addElement(new icms_form_elements_Text(_IMGWEIGHT, 'avatar_weight', 3, 4, 0));
     $form->addElement(new icms_form_elements_Radioyn(_IMGDISPLAY, 'avatar_display', 1, _YES, _NO));
     $restrictions = _MD_AM_AVATARMAX . ": " . $icmsConfigUser['avatar_maxsize'] . "<br />";
     $restrictions .= _MD_AM_AVATARW . ": " . $icmsConfigUser['avatar_width'] . "px<br />";
     $restrictions .= _MD_AM_AVATARH . ": " . $icmsConfigUser['avatar_height'] . "px";
     $form->addElement(new icms_form_elements_Label(_MD_RESTRICTIONS, $restrictions));
     $form->addElement(new icms_form_elements_Hidden('op', 'addfile'));
     $form->addElement(new icms_form_elements_Hidden('fct', 'avatars'));
     $form->addElement(new icms_form_elements_Button('', 'avt_button', _SUBMIT, 'submit'));
     $form->display();
     icms_cp_footer();
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:31,代码来源:main.php

示例7: xoops_module_update_system

/**
 * Automatic update of the system module
 *
 * @param object $module reference to the module object
 * @param int $oldversion The old version of the database
 * @param int $dbVersion The database version
 * @return mixed
 */
function xoops_module_update_system(&$module, $oldversion = NULL, $dbVersion = NULL)
{
    global $icmsConfig, $xoTheme;
    $from_112 = $abortUpdate = FALSE;
    $oldversion = $module->getVar('version');
    if ($oldversion < 120) {
        $result = icms::$xoopsDB->query("SELECT t1.tpl_id FROM " . icms::$xoopsDB->prefix('tplfile') . " t1, " . icms::$xoopsDB->prefix('tplfile') . " t2 WHERE t1.tpl_module = t2.tpl_module AND t1.tpl_tplset=t2.tpl_tplset AND t1.tpl_file = t2.tpl_file AND t1.tpl_id > t2.tpl_id");
        $tplids = array();
        while (list($tplid) = icms::$xoopsDB->fetchRow($result)) {
            $tplids[] = $tplid;
        }
        if (count($tplids) > 0) {
            $tplfile_handler = icms::handler('icms_view_template_file');
            $duplicate_files = $tplfile_handler->getObjects(new icms_db_criteria_Item('tpl_id', "(" . implode(',', $tplids) . ")", "IN"));
            if (count($duplicate_files) > 0) {
                foreach (array_keys($duplicate_files) as $i) {
                    $tplfile_handler->delete($duplicate_files[$i]);
                }
            }
        }
    }
    $icmsDatabaseUpdater = icms_db_legacy_Factory::getDatabaseUpdater();
    //$dbVersion  = $module->getDBVersion();
    //$oldversion  = $module->getVar('version');
    ob_start();
    $dbVersion = $module->getDBVersion();
    echo sprintf(_DATABASEUPDATER_CURRENTVER, icms_conv_nr2local($dbVersion)) . '<br />';
    echo "<code>" . sprintf(_DATABASEUPDATER_UPDATE_TO, icms_conv_nr2local(ICMS_SYSTEM_DBVERSION)) . "<br />";
    /*
     * DEVELOPER, PLEASE NOTE !!!
     *
     * Everytime we add a new upgrade block here, the dbversion of the System Module will get
     * incremented. It is very important to modify the ICMS_SYSTEM_DBVERSION accordingly
     * in htdocs/include/version.php
     *
     * When we start a new major release, move all the previous version's upgrade scripts to
     * a separate file, to minimize file size and memory usage
     */
    $CleanWritingFolders = FALSE;
    if ($dbVersion < 40) {
        include 'update-112-to-122.php';
    }
    /*  Begin upgrade to version 1.3 */
    if (!$abortUpdate) {
        $newDbVersion = 41;
    }
    if ($dbVersion < $newDbVersion) {
        /* Add new tables and data for the help suggestions and quick search */
        $table = new icms_db_legacy_updater_Table('autosearch_cat');
        if (!$table->exists()) {
            $table->setStructure("`cid` int(11) NOT NULL auto_increment,\n\t\t\t\t `cat_name` varchar(255) NOT NULL,\n\t\t\t\t `cat_url` text NOT NULL,\n\t\t\t\t PRIMARY KEY (`cid`)");
            if (!$table->createTable()) {
                $abortUpdate = TRUE;
                $newDbVersion = 40;
            }
            if (!$abortUpdate) {
                icms_loadLanguageFile('system', 'admin');
                $search_cats = array("NULL, '" . _MD_AM_ADSENSES . "', '/modules/system/admin.php?fct=adsense'", "NULL, '" . _MD_AM_AUTOTASKS . "', '/modules/system/admin.php?fct=autotasks'", "NULL, '" . _MD_AM_AVATARS . "', '/modules/system/admin.php?fct=avatars'", "NULL, '" . _MD_AM_BANS . "', '/modules/system/admin.php?fct=banners'", "NULL, '" . _MD_AM_BKPOSAD . "', '/modules/system/admin.php?fct=blockspadmin'", "NULL, '" . _MD_AM_BKAD . "', '/modules/system/admin.php?fct=blocksadmin'", "NULL, '" . _MD_AM_COMMENTS . "', '/modules/system/admin.php?fct=comments'", "NULL, '" . _MD_AM_CUSTOMTAGS . "', '/modules/system/admin.php?fct=customtag'", "NULL, '" . _MD_AM_USER . "', '/modules/system/admin.php?fct=users'", "NULL, '" . _MD_AM_FINDUSER . "', '/modules/system/admin.php?fct=finduser'", "NULL, '" . _MD_AM_ADGS . "', '/modules/system/admin.php?fct=groups'", "NULL, '" . _MD_AM_IMAGES . "', '/modules/system/admin.php?fct=images'", "NULL, '" . _MD_AM_MLUS . "', '/modules/system/admin.php?fct=mailusers'", "NULL, '" . _MD_AM_MIMETYPES . "', '/modules/system/admin.php?fct=mimetype'", "NULL, '" . _MD_AM_MDAD . "', '/modules/system/admin.php?fct=modulesadmin'", "NULL, '" . _MD_AM_PREF . "', '/modules/system/admin.php?fct=preferences'", "NULL, '" . _MD_AM_RATINGS . "', '/modules/system/admin.php?fct=rating'", "NULL, '" . _MD_AM_SMLS . "', '/modules/system/admin.php?fct=smilies'", "NULL, '" . _MD_AM_PAGES . "', '/modules/system/admin.php?fct=pages'", "NULL, '" . _MD_AM_TPLSETS . "', '/modules/system/admin.php?fct=tplsets'", "NULL, '" . _MD_AM_RANK . "', '/modules/system/admin.php?fct=userrank'", "NULL, '" . _MD_AM_VERSION . "', '/modules/system/admin.php?fct=version'");
                foreach ($search_cats as $cat) {
                    $table->setData($cat);
                }
                $table->addData();
            }
            unset($table);
        }
        $table = new icms_db_legacy_updater_Table('autosearch_list');
        if (!$table->exists() && !$abortUpdate) {
            $table->setStructure("`id` int(11) NOT NULL auto_increment,\n\t\t\t\t `cat_id` int(11) NOT NULL,\n\t\t\t\t `name` varchar(255) NOT NULL,\n\t\t\t\t `img` varchar(255) NOT NULL,\n\t\t\t\t `desc` text NOT NULL,\n\t\t\t\t `url` text NOT NULL,\n\t\t\t\t PRIMARY KEY (`id`)");
            if (!$table->createTable()) {
                $abortUpdate = TRUE;
                $newDbVersion = 40;
            }
            if (!$abortUpdate) {
                icms_loadLanguageFile('system', 'admin');
                icms_loadLanguageFile('system', 'preferences', TRUE);
                $search_items = array("NULL, 1, '" . _MD_AM_ADSENSES . "', '/modules/system/admin/adsense/images/adsense_small.png', '" . _MD_AM_ADSENSES_DSC . "', '/modules/system/admin.php?fct=adsense'", "NULL, 2, '" . _MD_AM_AUTOTASKS . "', '/modules/system/admin/autotasks/images/autotasks_small.png', '" . _MD_AM_AUTOTASKS_DSC . "', '/modules/system/admin.php?fct=autotasks'", "NULL, 3, '" . _MD_AM_AVATARS . "', '/modules/system/admin/avatars/images/avatars_small.png', '" . _MD_AM_AVATARS_DSC . "', '/modules/system/admin.php?fct=avatars'", "NULL, 4, '" . _MD_AM_BANS . "', '/modules/system/admin/banners/images/banners_small.png', '" . _MD_AM_BANS_DSC . "', '/modules/system/admin.php?fct=banners'", "NULL, 5, '" . _MD_AM_BKPOSAD . "', '/modules/system/admin/blockspadmin/images/blockspadmin_small.png', '" . _MD_AM_BKPOSAD_DSC . "', '/modules/system/admin.php?fct=blockspadmin'", "NULL, 6, '" . _MD_AM_BKAD . "', '/modules/system/admin/blocksadmin/images/blocksadmin_small.png', '" . _MD_AM_BKAD_DSC . "', '/modules/system/admin.php?fct=blocksadmin'", "NULL, 7, '" . _MD_AM_COMMENTS . "', '/modules/system/admin/comments/images/comments_small.png', '" . _MD_AM_COMMENTS_DSC . "', '/modules/system/admin.php?fct=comments'", "NULL, 8, '" . _MD_AM_CUSTOMTAGS . "', '/modules/system/admin/customtag/images/customtag_small.png', '" . _MD_AM_CUSTOMTAGS_DSC . "', '/modules/system/admin.php?fct=customtag'", "NULL, 9, '" . _MD_AM_USER . "', '/modules/system/admin/users/images/users_small.png', '" . _MD_AM_USER_DSC . "', '/modules/system/admin.php?fct=users'", "NULL, 10, '" . _MD_AM_FINDUSER . "', '/modules/system/admin/findusers/images/findusers_small.png', '" . _MD_AM_FINDUSER_DSC . "', '/modules/system/admin.php?fct=findusers'", "NULL, 11, '" . _MD_AM_ADGS . "', '/modules/system/admin/groups/images/groups_small.png', '" . _MD_AM_ADGS_DSC . "', '/modules/system/admin.php?fct=groups'", "NULL, 12, '" . _MD_AM_IMAGES . "', '/modules/system/admin/images/images/images_small.png', '" . _MD_AM_IMAGES_DSC . "', '/modules/system/admin.php?fct=images'", "NULL, 13, '" . _MD_AM_MLUS . "', '/modules/system/admin/mailusers/images/mailusers_small.png', '" . _MD_AM_MLUS_DSC . "', '/modules/system/admin.php?fct=mailusers'", "NULL, 14, '" . _MD_AM_MIMETYPES . "', '/modules/system/admin/mimetype/images/mimetype_small.png', '" . _MD_AM_MIMETYPES_DSC . "', '/modules/system/admin.php?fct=mimetype'", "NULL, 15, '" . _MD_AM_MDAD . "', '/modules/system/admin/modulesadmin/images/modulesadmin_small.png', '" . _MD_AM_MDAD_DSC . "', '/modules/system/admin.php?fct=modulesadmin'", "NULL, 16, '" . _MD_AM_PREF . " - " . _MD_AM_AUTHENTICATION . "', '/modules/system/admin/preferences/images/preferences_small.png', '" . _MD_AM_AUTHENTICATION_DSC . "', '/modules/system/admin.php?fct=preferences&op=show&confcat_id=7'", "NULL, 16, '" . _MD_AM_PREF . " - " . _MD_AM_AUTOTASKS . "', '/modules/system/admin/preferences/images/preferences_small.png', '" . _MD_AM_AUTOTASKS_PREF_DSC . "', '/modules/system/admin.php?fct=preferences&op=show&confcat_id=13'", "NULL, 16, '" . _MD_AM_PREF . " - " . _MD_AM_CAPTCHA . "', '/modules/system/admin/preferences/images/preferences_small.png', '" . _MD_AM_CAPTCHA_DSC . "', '/modules/system/admin.php?fct=preferences&op=show&confcat_id=11'", "NULL, 16, '" . _MD_AM_PREF . " - " . _MD_AM_GENERAL . "', '/modules/system/admin/preferences/images/preferences_small.png', '" . _MD_AM_GENERAL_DSC . "', '/modules/system/admin.php?fct=preferences&op=show&confcat_id=1'", "NULL, 16, '" . _MD_AM_PREF . " - " . _MD_AM_PURIFIER . "', '/modules/system/admin/preferences/images/preferences_small.png', '" . _MD_AM_PURIFIER_DSC . "', '/modules/system/admin.php?fct=preferences&op=show&confcat_id=14'", "NULL, 16, '" . _MD_AM_PREF . " - " . _MD_AM_MAILER . "', '/modules/system/admin/preferences/images/preferences_small.png', '" . _MD_AM_MAILER_DSC . "', '/modules/system/admin.php?fct=preferences&op=show&confcat_id=6'", "NULL, 16, '" . _MD_AM_PREF . " - " . _MD_AM_METAFOOTER . "', '/modules/system/admin/preferences/images/preferences_small.png', '" . _MD_AM_METAFOOTER_DSC . "', '/modules/system/admin/preferences/images/preferences_small.png'", "NULL, 16, '" . _MD_AM_PREF . " - " . _MD_AM_MULTILANGUAGE . "', '/modules/system/admin/preferences/images/preferences_small.png', '" . _MD_AM_MULTILANGUAGE_DSC . "', '/modules/system/admin.php?fct=preferences&op=show&confcat_id=8'", "NULL, 16, '" . _MD_AM_PREF . " - " . _MD_AM_PERSON . "', '/modules/system/admin/preferences/images/preferences_small.png', '" . _MD_AM_PERSON_DSC . "', '/modules/system/admin.php?fct=preferences&op=show&confcat_id=10'", "NULL, 16, '" . _MD_AM_PREF . " - " . _MD_AM_PLUGINS . "', '/modules/system/admin/preferences/images/preferences_small.png', '" . _MD_AM_PLUGINS_DSC . "', '/modules/system/admin.php?fct=preferences&op=show&confcat_id=12'", "NULL, 16, '" . _MD_AM_PREF . " - " . _MD_AM_SEARCH . "', '/modules/system/admin/preferences/images/preferences_small.png', '" . _MD_AM_SEARCH_DSC . "', '/modules/system/admin.php?fct=preferences&op=show&confcat_id=5'", "NULL, 16, '" . _MD_AM_PREF . " - " . _MD_AM_USERSETTINGS . "', '/modules/system/admin/preferences/images/preferences_small.png', '" . _MD_AM_USERSETTINGS_DSC . "', '/modules/system/admin.php?fct=preferences&op=show&confcat_id=2'", "NULL, 16, '" . _MD_AM_PREF . " - " . _MD_AM_CENSOR . "', '/modules/system/admin/preferences/images/preferences_small.png', '" . _MD_AM_CENSOR_DSC . "', '/modules/system/admin.php?fct=preferences&op=show&confcat_id=4'", "NULL, 17, '" . _MD_AM_RATINGS . "', '/modules/system/admin/rating/images/rating_small.png', '" . _MD_AM_RATINGS_DSC . "', '/modules/system/admin.php?fct=rating'", "NULL, 18, '" . _MD_AM_SMLS . "', '/modules/system/admin/smilies/images/smilies_small.png', '" . _MD_AM_SMLS_DSC . "', '/modules/system/admin.php?fct=smilies'", "NULL, 19, '" . _MD_AM_PAGES . "', '/modules/system/admin/pages/images/pages_small.png', '" . _MD_AM_PAGES_DSC . "', '/modules/system/admin.php?fct=pages'", "NULL, 20, '" . _MD_AM_TPLSETS . "', '/modules/system/admin/tplsets/images/tplsets_small.png', '" . _MD_AM_TPLSETS_DSC . "', '/modules/system/admin.php?fct=tplsets'", "NULL, 21, '" . _MD_AM_RANK . "', '/modules/system/admin/userrank/images/userrank_small.png', '" . _MD_AM_RANK_DSC . "', '/modules/system/admin.php?fct=userrank'", "NULL, 22, '" . _MD_AM_VRSN . "', '/modules/system/admin/version/images/version_small.png', '" . _MD_AM_VRSN_DSC . "', '/modules/system/admin.php?fct=version'");
                foreach ($search_items as $item) {
                    $table->setData($item);
                }
                $table->addData();
            }
            unset($table);
        }
        /* Optimize old tables and fix data structures */
        $table = new icms_db_legacy_updater_Table('config');
        $icmsDatabaseUpdater->runQuery("ALTER TABLE `" . $table->name() . "` DROP INDEX conf_mod_cat_id, ADD INDEX mod_cat_order(conf_modid, conf_catid, conf_order)", 'Successfully altered the indexes on table config', '');
        unset($table);
        $table = new icms_db_legacy_updater_Table('group_permission');
        $table->addAlteredField('gperm_modid', "SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'", 'gperm_modid');
        $table->alterTable();
        $icmsDatabaseUpdater->runQuery("ALTER TABLE `" . $table->name() . "` DROP INDEX itemid, DROP INDEX groupid, DROP INDEX gperm_modid", 'Successfully dropped the indexes on table group_permission', '');
        $icmsDatabaseUpdater->runQuery("ALTER TABLE `" . $table->name() . "` ADD INDEX name_mod_group (gperm_name(10), gperm_modid, gperm_groupid)", 'Successfully added the indexes on table group_permission', '');
//.........这里部分代码省略.........
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:101,代码来源:update.php

示例8: render

 /**
  * Output buffering callback inserting logger dump in page output
  * Determines wheter output can be shown (based on permissions)
  * @param  string  $output
  * @return string  $output
  */
 public function render($output)
 {
     global $icmsModule;
     $this->addExtra('Included files', count(get_included_files()) . ' files');
     $this->addExtra(_CORE_MEMORYUSAGE, icms_conv_nr2local(icms_convert_size(memory_get_usage())));
     $groups = is_object(icms::$user) ? icms::$user->getGroups() : XOOPS_GROUP_ANONYMOUS;
     $moduleid = isset($icmsModule) && is_object($icmsModule) ? $icmsModule->getVar('mid') : 1;
     $gperm_handler = icms::handler('icms_member_groupperm');
     if (!$this->renderingEnabled || !$this->activated || !$gperm_handler->checkRight('enable_debug', $moduleid, $groups)) {
         return $output;
     }
     $this->renderingEnabled = $this->activated = false;
     $log = $this->dump($this->usePopup ? 'popup' : '');
     $pattern = '<!--{xo-logger-output}-->';
     $pos = strpos($output, $pattern);
     if ($pos !== false) {
         return substr($output, 0, $pos) . $log . substr($output, $pos + strlen($pattern));
     } else {
         return $output . $log;
     }
 }
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:27,代码来源:Logger.php

示例9: render

    /**
     * Render the Date field
     */
    public function render()
    {
        global $icmsConfigPersona;
        $ele_name = $this->getName();
        // ALTERED BY FREEFORM SOLUTIONS FOR THE DATE DEFAULT CHANGES IN FORMULIZE STANDALONE
        if ($icmsConfigPersona['use_jsjalali']) {
            include_once ICMS_ROOT_PATH . '/include/jalali.php';
        }
        if ($this->getValue(false) !== _DATE_DEFAULT) {
            $ele_value = date(_SHORTDATESTRING, $this->getValue(false));
            $jstime = formatTimestamp($this->getValue(false), _SHORTDATESTRING);
            if (_CALENDAR_TYPE == 'jalali') {
                $jalali_ele_value = icms_conv_nr2local(jdate(_SHORTDATESTRING, $ele_value));
            } else {
                $jalali_ele_value = $ele_value;
            }
        } else {
            $ele_value = $this->getValue(false);
            $jstime = formatTimestamp(time(), _SHORTDATESTRING);
            $jalali_ele_value = $ele_value;
        }
        include_once ICMS_ROOT_PATH . '/include/calendar' . ($icmsConfigPersona['use_jsjalali'] == true ? 'jalali' : '') . 'js.php';
        $result = "<input type='text' name='" . $ele_name . "' id='" . $ele_name . "' class=\"icms-date-box\" size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . $ele_value . "'" . $this->getExtra() . " />&nbsp;&nbsp;<img src='" . ICMS_URL . "/images/calendar.png' class='no-print' alt='" . _CALENDAR . "' title='" . _CALENDAR . "' id='btn_" . $ele_name . "' onclick='return showCalendar(\"" . $ele_name . "\");'>";
        if (false and $icmsConfigPersona['use_jsjalali']) {
            $dateFormat = dateFormatToStrftime(_SHORTDATESTRING);
            $result = "<input name='" . $ele_name . "' id='" . $ele_name . "' class=\"icms-date-box\" size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . $jalali_ele_value . "'" . $this->getExtra() . " />&nbsp;&nbsp;<img src='" . ICMS_URL . "/images/calendar.png' class='no-print' alt='" . _CALENDAR . "' title='" . _CALENDAR . "' id='btn_" . $ele_name . "'><script type='text/javascript'>\n\t\t\t\tCalendar.setup({\n\t\t\t\t\tinputField  : '" . $ele_name . "',\n\t\t\t\t\tifFormat    : '{$dateFormat}',\n\t\t\t\t\tbutton      : 'btn_" . $ele_name . "',\n\t\t\t\t\tlangNumbers : true,\n\t\t\t\t\tdateType    : '" . _CALENDAR_TYPE . "',\n\t\t\t\t\tonUpdate    : function(cal){document.getElementById('" . $ele_name . "').value = cal.date.print('{$dateFormat}');}\n\t\t\t\t});\n\t\t\t</script>";
        } else {
            $result = "<input type='text' name='" . $ele_name . "' id='" . $ele_name . "' class=\"icms-date-box\" size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . $ele_value . "'" . $this->getExtra() . " />";
            static $output_datepicker_defaults = true;
            if ($output_datepicker_defaults) {
                $ICMS_URL = ICMS_URL;
                // the jQuery datepicker wants a date format such as yy-mm-dd, or yy-m-d.
                // yyyy-mm-dd gives a date like '20142014-10-11', so only yy, not yyyy.
                $dateFormat = dateFormatToStrftime(_SHORTDATESTRING);
                $dateFormat = str_replace(array("%y", "%m", "%d"), array("yy", "m", "d"), strtolower($dateFormat));
                // note: datepicker_defaults is a var so it is available later for date elements with date limits
                $result .= <<<EOF
<script>
var datepicker_defaults = {
    dateFormat: "{$dateFormat}",
    changeMonth: true,
    changeYear: true,
    hideIfNoPrevNext: true, // do not show the prev/next links if they are disabled
    numberOfMonths: 1,
    yearRange: "c-20:c+20",
    showOn: "both",
    buttonImageOnly: true,
    buttonImage: "{$ICMS_URL}/images/calendar.png",
    buttonText: "Calendar"
};

jQuery(document).ready(function() {
    jQuery.datepicker.setDefaults(datepicker_defaults);
    jQuery(function() {
        jQuery(".icms-date-box").datepicker();
    });
});
</script>
EOF;
                $output_datepicker_defaults = false;
            }
        }
        return $result;
    }
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:67,代码来源:Date.php

示例10: sprintf

        $abortUpdate = true;
    }
    /* New config options and values for mail settings */
    $sql = 'UPDATE `' . icms::$xoopsDB->prefix('config') . '` SET `conf_order`=9 WHERE `conf_name`="sendmailpath"';
    $result = icms::$xoopsDB->query($sql);
    $icmsDatabaseUpdater->insertConfig(ICMS_CONF_MAILER, 'smtpsecure', '_MD_AM_SMTPSECURE', 'ssl', '_MD_AM_SMTPSECUREDESC', 'select', 'text', 7);
    $config_id = icms::$xoopsDB->getInsertId();
    $sql = "INSERT INTO " . icms::$xoopsDB->prefix('configoption') . " (confop_id, confop_name, confop_value, conf_id)" . " VALUES" . " (NULL, 'None', 'none', {$config_id}), " . " (NULL, 'SSL', 'ssl', {$config_id}), " . " (NULL, 'TLS', 'tls', {$config_id})";
    if (!icms::$xoopsDB->queryF($sql)) {
        $abortUpdate = true;
    }
    $icmsDatabaseUpdater->insertConfig(ICMS_CONF_MAILER, 'smtpauthport', '_MD_AM_SMTPAUTHPORT', '465', '_MD_AM_SMTPAUTHPORTDESC', 'textbox', 'int', 8);
    $icmsDatabaseUpdater->updateModuleDBVersion($newDbVersion, 'system');
    echo sprintf(_DATABASEUPDATER_UPDATE_OK, icms_conv_nr2local($newDbVersion)) . '<br />';
}
/* 1.2.2 release */
if (!$abortUpdate) {
    $newDbVersion = 40;
}
if ($dbVersion < $newDbVersion) {
    $file = ICMS_PLUGINS_PATH . '/csstidy/css_optimiser.php';
    if (file_exists($file)) {
        if (unlink($file)) {
            echo sprintf(_FILE_DELETED, $file) . '<br />';
        } else {
            icms_core_Message::error(sprintf(_CSSTIDY_VULN, $file));
        }
    }
    $icmsDatabaseUpdater->updateModuleDBVersion($newDbVersion, 'system');
    echo sprintf(_DATABASEUPDATER_UPDATE_OK, icms_conv_nr2local($newDbVersion)) . '<br />';
}
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:31,代码来源:update-112-to-122.php

示例11: BannerEdit

	/**
	 * Edit the banner
	 * @param int $bid banner id
	 */
	function BannerEdit($bid) {
		global $icmsConfig, $icmsModule;
		$bid = (int) $bid;
		icms_cp_header();
		$result=icms::$xoopsDB->query("SELECT cid, imptotal, impmade, clicks, imageurl, clickurl, htmlbanner, htmlcode FROM " . icms::$xoopsDB->prefix("banner") . " where bid='". (int) $bid . "'");
		list($cid, $imptotal, $impmade, $clicks, $imageurl, $clickurl, $htmlbanner, $htmlcode) = icms::$xoopsDB->fetchRow($result);
		echo"<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\">";
		echo"<h4>" . _AM_EDITBNR . "</h4>";
		if ($htmlbanner) {
			echo icms_core_DataFilter::checkVar($htmlcode, 'html', 'output');
		} else {
			if (strtolower(substr($imageurl, strrpos($imageurl, ".")))==".swf") {
				echo '<object type="application/x-shockwave-flash" data="' . $imageurl . '" width="468" height="60">';
				echo '<param name="movie" value="' . $imageurl . '" />';
				echo '<param name="quality" value="high" />';
				echo '</object>';
			} else {
				echo '<img src="' . $imageurl . '" alt="" />';
			}
		}
		echo "<form action='admin.php' method='post'>"
			. _AM_CLINAMET . "<select name='cid'>\n";
		$result = icms::$xoopsDB->query("SELECT cid, name FROM " . icms::$xoopsDB->prefix("bannerclient") . " where cid='". (int) $cid . "'");
		list($cid, $name) = icms::$xoopsDB->fetchRow($result);
		$name = icms_core_DataFilter::htmlSpecialChars($name);
		echo "<option value='$cid' selected='selected'>$name</option>";
		$result = icms::$xoopsDB->query("SELECT cid, name FROM " . icms::$xoopsDB->prefix("bannerclient"));
		while (list($ccid, $name) = icms::$xoopsDB->fetchRow($result)) {
			$name = icms_core_DataFilter::htmlSpecialChars($name);
			if ($cid != $ccid) {
				echo "<option value='$ccid'>$name</option>";
			}
		}
		echo "</select><br />";
		if ($imptotal == 0) {
			$impressions = "" . _AM_UNLIMIT . "";
		} else {
			$impressions = $imptotal;
		}
		echo _AM_ADDIMPT . "<input type='text' name='impadded' size='12' maxlength='11' /> " . _AM_PURCHT . "<strong>$impressions</strong> " . _AM_MADET . "<strong>" . icms_conv_nr2local($impmade) . "</strong><br />"
		. _AM_IMGURLT . "<input type='text' name='imageurl' size='50' maxlength='200' value='" . htmlspecialchars($imageurl, ENT_QUOTES) . "' /><br />"
		. _AM_CLICKURLT . "<input type='text' name='clickurl' size='50' maxlength='200' value='" . htmlspecialchars($clickurl, ENT_QUOTES) . "' /><br />"
		. _AM_USEHTML;
		if ($htmlbanner) {
			echo " <input type='checkbox' name='htmlbanner' value='1' checked='checked' />";
			echo "<br />" . _AM_CODEHTML
			. "<br /><textarea name='htmlcode' rows='6' cols='60'>" . icms_core_DataFilter::checkVar($htmlcode, 'html', 'edit')
			. "</textarea><br /><input type='hidden' name='bid' value='$bid' />"
			. "<input type='hidden' name='imptotal' value='$imptotal' />"
			. "<input type='hidden' name='fct' value='banners' />"
			. icms::$security->getTokenHTML()
			. "<input type='hidden' name='op' value='BannerChange' />"
			. "<input type='submit' value='" . _AM_CHGBNR . "' /></form>";
		} else {
			echo " <input type='checkbox' name='htmlbanner' value='1' />";
			echo "<br />" . _AM_CODEHTML
			. "<br /><textarea name='htmlcode' rows='6' cols='60'>" . icms_core_DataFilter::checkVar($htmlcode, 'text', 'output')
			. "</textarea><br /><input type='hidden' name='bid' value='$bid' />"
			. "<input type='hidden' name='imptotal' value='$imptotal' />"
			. "<input type='hidden' name='fct' value='banners' />"
			. icms::$security->getTokenHTML()
			. "<input type='hidden' name='op' value='BannerChange' />"
			. "<input type='submit' value='" . _AM_CHGBNR . "' /></form>";
		}
		echo "</td></tr></table>";
		icms_cp_footer();
	}
开发者ID:nao-pon,项目名称:impresscms,代码行数:71,代码来源:banners.php

示例12: icms_module_update


//.........这里部分代码省略.........
					if ((isset($blocks[$i]['template']) && trim($blocks[$i]['template']) != '')) {
						$content =& xoops_module_gettemplate($dirname, $blocks[$i]['template'], TRUE);
					}
					if (!$content) {
						$content = '';
					} else {
						$template = $blocks[$i]['template'];
					}
					$options = '';
					if (!empty($blocks[$i]['options'])) {
						$options = $blocks[$i]['options'];
					}
					$sql = "SELECT bid, name FROM " . icms::$xoopsDB->prefix('newblocks')
						. " WHERE mid='" . (int) $module->getVar('mid')
						. "' AND func_num='". (int) $i
						. "' AND show_func='" . addslashes($blocks[$i]['show_func'])
						. "' AND func_file='" . addslashes($blocks[$i]['file']) . "'";
					$fresult = icms::$xoopsDB->query($sql);
					$fcount = 0;
					while ($fblock = icms::$xoopsDB->fetchArray($fresult)) {
						$fcount++;
						$sql = "UPDATE " . icms::$xoopsDB->prefix("newblocks")
							. " SET name='" . addslashes($blocks[$i]['name'])
							. "', edit_func='" . addslashes($editfunc)
							. "', content='', template='" . $template
							. "', last_modified=" . time()
							. " WHERE bid='". (int) $fblock['bid'] . "'";
						$result = icms::$xoopsDB->query($sql);
						if (!$result) {
							$msgs[] = sprintf('&nbsp;&nbsp;' . _MD_AM_UPDATE_FAIL, $fblock['name']);
						} else {
							$msgs[] = sprintf('&nbsp;&nbsp;' . _MD_AM_BLOCK_UPDATED,
								'<strong>' . $fblock['name'] . '</strong>',
								'<strong>' . icms_conv_nr2local($fblock['bid']) . '</strong>');
							if ($template != '') {
								$tplfile =& $tplfile_handler->find('default', 'block', $fblock['bid']);
								if (count($tplfile) == 0) {
									$tplfile_new =& $tplfile_handler->create();
									$tplfile_new->setVar('tpl_module', $dirname);
									$tplfile_new->setVar('tpl_refid', (int) $fblock['bid']);
									$tplfile_new->setVar('tpl_tplset', 'default');
									$tplfile_new->setVar('tpl_file', $blocks[$i]['template'], TRUE);
									$tplfile_new->setVar('tpl_type', 'block');
								}
								else {
									$tplfile_new = $tplfile[0];
								}
								$tplfile_new->setVar('tpl_source', $content, TRUE);
								$tplfile_new->setVar('tpl_desc', $blocks[$i]['description'], TRUE);
								$tplfile_new->setVar('tpl_lastmodified', time());
								$tplfile_new->setVar('tpl_lastimported', 0);
								if (!$tplfile_handler->insert($tplfile_new)) {
									$msgs[] = sprintf('&nbsp;&nbsp;<span style="color:#ff0000;">'
										. _MD_AM_TEMPLATE_UPDATE_FAIL . '</span>', '<strong>' . $blocks[$i]['template'] . '</strong>');
								} else {
									$msgs[] = sprintf('&nbsp;&nbsp;' . _MD_AM_TEMPLATE_UPDATED, '<strong>' . $blocks[$i]['template'] . '</strong>');
									if ($icmsConfig['template_set'] == 'default') {
										if (!$icmsAdminTpl->template_touch($tplfile_new->getVar('tpl_id'))) {
											$msgs[] = sprintf('&nbsp;&nbsp;<span style="color:#ff0000;">'
												. _MD_AM_TEMPLATE_RECOMPILE_FAIL . '</span>', '<strong>' . $blocks[$i]['template'] . '</strong>');
										} else {
											$msgs[] = sprintf('&nbsp;&nbsp;' . _MD_AM_TEMPLATE_RECOMPILED, '<strong>' . $blocks[$i]['template'] . '</strong>');
										}
									}
								}
							}
开发者ID:nao-pon,项目名称:impresscms,代码行数:67,代码来源:modulesadmin.php

示例13: icms_ipf_Tree

 $com_rootid = $comment->getVar('com_rootid');
 // get all comments posted later within the same thread
 $thread_comments =& $comment_handler->getThread($com_rootid, $com_id);
 // construct a comment tree
 $xot = new icms_ipf_Tree($thread_comments, 'com_id', 'com_pid', 'com_rootid');
 $child_comments =& $xot->getAllChild($com_id);
 // add itself here
 $child_comments[$com_id] =& $comment;
 $msgs = array();
 $deleted_num = array();
 $member_handler = icms::handler('icms_member');
 foreach (array_keys($child_comments) as $i) {
     if (!$comment_handler->delete($child_comments[$i])) {
         $msgs[] = _CM_COMDELETENG . ' (ID: ' . icms_conv_nr2local($child_comments[$i]->getVar('com_id')) . ')';
     } else {
         $msgs[] = _CM_COMDELETED . ' (ID: ' . icms_conv_nr2local($child_comments[$i]->getVar('com_id')) . ')';
         // store poster ID and deleted post number into array for later use
         $poster_id = $child_comments[$i]->getVar('com_uid');
         if ($poster_id > 0) {
             $deleted_num[$poster_id] = !isset($deleted_num[$poster_id]) ? 1 : $deleted_num[$poster_id] + 1;
         }
     }
 }
 foreach ($deleted_num as $user_id => $post_num) {
     // update user posts
     $com_poster = $member_handler->getUser($user_id);
     if (is_object($com_poster)) {
         $member_handler->updateUserByField($com_poster, 'posts', $com_poster->getVar('posts') - $post_num);
     }
 }
 $com_itemid = $comment->getVar('com_itemid');
开发者ID:nao-pon,项目名称:impresscms,代码行数:31,代码来源:comment_delete.php

示例14: redirect_header

    }
} else {
    $thisUser = icms::handler('icms_member')->getUser($uid);
    if (!is_object($thisUser) || !$thisUser->isActive()) {
        redirect_header('index.php', 3, _US_SELECTNG);
    }
    $xoopsOption['template_main'] = 'system_userinfo.html';
    include ICMS_ROOT_PATH . '/header.php';
    $icmsTpl->assign('user_ownpage', FALSE);
}
if (is_object(icms::$user) && $isAdmin) {
    icms_makeSmarty(array('lang_editprofile' => _US_EDITPROFILE, 'lang_deleteaccount' => _US_DELACCOUNT, 'user_uid' => (int) $thisUser->getVar('uid')));
}
$userrank = $thisUser->rank();
$date = $thisUser->getVar('last_login');
icms_makeSmarty(array('user_avatarurl' => $icmsConfigUser['avatar_allow_gravatar'] == TRUE ? $thisUser->gravatar('G', $icmsConfigUser['avatar_width']) : ICMS_UPLOAD_URL . '/' . $thisUser->getVar('user_avatar'), 'user_websiteurl' => $thisUser->getVar('url', 'E') == '' ? '' : '<a href="' . $thisUser->getVar('url', 'E') . '" rel="external">' . $thisUser->getVar('url') . '</a>', 'lang_website' => _US_WEBSITE, 'user_realname' => $thisUser->getVar('name'), 'lang_realname' => _US_REALNAME, 'lang_avatar' => _US_AVATAR, 'lang_allaboutuser' => sprintf(_US_ALLABOUT, $thisUser->getVar('uname')), 'user_alwopenid' => $icmsConfigAuth['auth_openid'], 'lang_openid', $icmsConfigAuth['auth_openid'] == TRUE ? _US_OPENID_FORM_CAPTION : '', 'lang_email' => _US_EMAIL, 'lang_privmsg' => _US_PM, 'lang_icq' => _US_ICQ, 'user_icq' => $thisUser->getVar('user_icq'), 'lang_aim' => _US_AIM, 'user_aim' => $thisUser->getVar('user_aim'), 'lang_yim' => _US_YIM, 'user_yim' => $thisUser->getVar('user_yim'), 'lang_msnm' => _US_MSNM, 'user_msnm' => $thisUser->getVar('user_msnm'), 'lang_location' => _US_LOCATION, 'user_location' => $thisUser->getVar('user_from'), 'lang_occupation' => _US_OCCUPATION, 'user_occupation' => $thisUser->getVar('user_occ'), 'lang_interest' => _US_INTEREST, 'user_interest' => $thisUser->getVar('user_intrest'), 'lang_extrainfo' => _US_EXTRAINFO, 'user_extrainfo' => icms_core_DataFilter::checkVar($thisUser->getVar('bio', 'N'), 'text', 'output'), 'lang_statistics' => _US_STATISTICS, 'lang_membersince' => _US_MEMBERSINCE, 'user_joindate' => formatTimestamp($thisUser->getVar('user_regdate'), 's'), 'lang_rank' => _US_RANK, 'lang_posts' => _US_POSTS, 'lang_basicInfo' => _US_BASICINFO, 'lang_more' => _US_MOREABOUT, 'lang_myinfo' => _US_MYINFO, 'user_posts' => icms_conv_nr2local($thisUser->getVar('posts')), 'lang_lastlogin' => _US_LASTLOGIN, 'lang_notregistered' => _US_NOTREGISTERED, 'user_pmlink' => is_object(icms::$user) ? "<a href=\"javascript:openWithSelfMain('" . ICMS_URL . "/pmlite.php?send2=1&amp;to_userid=" . (int) $thisUser->getVar('uid') . "', 'pmlite', 800,680);\"><img src=\"" . ICMS_URL . "/images/icons/" . $icmsConfig['language'] . "/pm.gif\" alt=\"" . sprintf(_SENDPMTO, $thisUser->getVar('uname')) . "\" /></a>" : '', 'user_rankimage' => $userrank['image'] ? '<img src="' . $userrank['image'] . '" alt="' . $userrank['title'] . '" />' : '', 'user_ranktitle' => $userrank['title'], 'user_lastlogin' => !empty($date) ? formatTimestamp($thisUser->getVar('last_login'), 'm') : '', 'icms_pagetitle' => sprintf(_US_ALLABOUT, $thisUser->getVar('uname')), 'user_email' => $thisUser->getVar('user_viewemail') == TRUE || is_object(icms::$user) && (icms::$user->isAdmin() || icms::$user->getVar('uid') == $thisUser->getVar('uid')) ? $thisUser->getVar('email', 'E') : '&nbsp;', 'user_openid' => $icmsConfigAuth['auth_openid'] == TRUE && ($thisUser->getVar('user_viewoid') == TRUE || is_object(icms::$user) && (icms::$user->isAdmin() || icms::$user->getVar('uid') == $thisUser->getVar('uid'))) ? $thisUser->getVar('openid', 'E') : '&nbsp;'));
if ($icmsConfigUser['allwshow_sig'] == TRUE && strlen(trim($thisUser->getVar('user_sig', 'N'))) > 0) {
    icms_makeSmarty(array('user_showsignature' => TRUE, 'lang_signature' => _US_SIGNATURE, 'user_signature' => icms_core_DataFilter::checkVar($thisUser->getVar('user_sig', 'N'), 'html', 'output')));
}
$module_handler = icms::handler('icms_module');
$criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('hassearch', 1));
$criteria->add(new icms_db_criteria_Item('isactive', 1));
$mids = array_keys($module_handler->getList($criteria));
foreach ($mids as $mid) {
    if ($gperm_handler->checkRight('module_read', $mid, $groups)) {
        $module = $module_handler->get($mid);
        $results = $module->search('', '', 5, 0, (int) $thisUser->getVar('uid'));
        $count = count($results);
        if (is_array($results) && $count > 0) {
            for ($i = 0; $i < $count; $i++) {
                if (isset($results[$i]['image']) && $results[$i]['image'] != '') {
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:31,代码来源:userinfo.php

示例15: mysql_get_server_info

    $icmsAdminTpl->assign('latest_url', $icmsVersionChecker->latest_url);
    if (ICMS_VERSION_STATUS == 10 && $icmsVersionChecker->latest_status < 10) {
        // I'm running a final release so make sure to notify the user that the update is not a final
        $icmsAdminTpl->assign('not_a_final_comment', TRUE);
    }
} else {
    $checkerErrors = $icmsVersionChecker->getErrors(TRUE);
    if ($checkerErrors) {
        $icmsAdminTpl->assign('errors', $checkerErrors);
    }
}
$icmsAdminTpl->assign('your_version', $icmsVersionChecker->installed_version_name);
$icmsAdminTpl->assign('lang_php_vesion', PHP_VERSION);
$icmsAdminTpl->assign('lang_mysql_version', mysql_get_server_info());
$icmsAdminTpl->assign('lang_server_api', PHP_SAPI);
$icmsAdminTpl->assign('lang_os_name', PHP_OS);
$icmsAdminTpl->assign('safe_mode', ini_get('safe_mode') ? _CO_ICMS_ON : _CO_ICMS_OFF);
$icmsAdminTpl->assign('register_globals', ini_get('register_globals') ? _CO_ICMS_ON : _CO_ICMS_OFF);
$icmsAdminTpl->assign('magic_quotes_gpc', ini_get('magic_quotes_gpc') ? _CO_ICMS_ON : _CO_ICMS_OFF);
$icmsAdminTpl->assign('allow_url_fopen', ini_get('allow_url_fopen') ? _CO_ICMS_ON : _CO_ICMS_OFF);
$icmsAdminTpl->assign('fsockopen', function_exists('fsockopen') ? _CO_ICMS_ON : _CO_ICMS_OFF);
$icmsAdminTpl->assign('allow_call_time_pass_reference', ini_get('allow_call_time_pass_reference') ? _CO_ICMS_ON : _CO_ICMS_OFF);
$icmsAdminTpl->assign('post_max_size', icms_conv_nr2local(ini_get('post_max_size')));
$icmsAdminTpl->assign('max_input_time', icms_conv_nr2local(ini_get('max_input_time')));
$icmsAdminTpl->assign('output_buffering', icms_conv_nr2local(ini_get('output_buffering')));
$icmsAdminTpl->assign('max_execution_time', icms_conv_nr2local(ini_get('max_execution_time')));
$icmsAdminTpl->assign('memory_limit', icms_conv_nr2local(ini_get('memory_limit')));
$icmsAdminTpl->assign('file_uploads', ini_get('file_uploads') ? _CO_ICMS_ON : _CO_ICMS_OFF);
$icmsAdminTpl->assign('upload_max_filesize', icms_conv_nr2local(ini_get('upload_max_filesize')));
$icmsAdminTpl->display(ICMS_MODULES_PATH . '/system/templates/admin/system_adm_version.html');
icms_cp_footer();
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:31,代码来源:main.php


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