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


PHP icms_cp_header函数代码示例

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


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

示例1: editrating

function editrating($showmenu = FALSE, $ratingid = 0)
{
    global $icms_rating_handler, $icmsAdminTpl;
    icms_cp_header();
    $ratingObj = $icms_rating_handler->get($ratingid);
    if (!$ratingObj->isNew()) {
        $sform = $ratingObj->getForm(_CO_ICMS_RATINGS_EDIT, 'addrating');
        $sform->assign($icmsAdminTpl);
        $icmsAdminTpl->assign('icms_rating_title', _CO_ICMS_RATINGS_EDIT_INFO);
        $icmsAdminTpl->display('db:admin/rating/system_adm_rating.html');
    } else {
        $ratingObj->hideFieldFromForm(array('item', 'itemid', 'uid', 'date', 'rate'));
        if (isset($_POST['op'])) {
            $controller = new icms_ipf_Controller($icms_rating_handler);
            $controller->postDataToObject($ratingObj);
            if ($_POST['op'] == 'changedField') {
                switch ($_POST['changedField']) {
                    case 'dirname':
                        $ratingObj->showFieldOnForm(array('item', 'itemid', 'uid', 'date', 'rate'));
                        break;
                }
            }
        }
        $sform = $ratingObj->getForm(_CO_ICMS_RATINGS_CREATE, 'addrating');
        $sform->assign($icmsAdminTpl);
        $icmsAdminTpl->assign('icms_rating_title', _CO_ICMS_RATINGS_CREATE_INFO);
        $icmsAdminTpl->display('db:admin/rating/system_adm_rating.html');
    }
}
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:29,代码来源:main.php

示例2: editcustomtag

/**
 * Generate the form for editing a custom tag
 * 
 * @param $customtagid	unique identifier for the custom tag
 * @param $clone		are you cloning an existing custom tag?
 */
function editcustomtag($customtagid = 0, $clone = FALSE)
{
    global $icms_customtag_handler, $icmsAdminTpl;
    icms_cp_header();
    $customtagObj = $icms_customtag_handler->get($customtagid);
    if (isset($_POST["op"]) && $_POST["op"] == "changedField" && in_array($_POST["changedField"], array("customtag_type"))) {
        $controller = new icms_ipf_Controller($icms_customtag_handler);
        $controller->postDataToObject($customtagObj);
    }
    switch ($customtagObj->getVar("customtag_type")) {
        case ICMS_CUSTOMTAG_TYPE_XCODES:
            break;
        case ICMS_CUSTOMTAG_TYPE_HTML:
            $customtagObj->setControl("customtag_content", array("name" => "source", "syntax" => "html"));
            break;
        case ICMS_CUSTOMTAG_TYPE_PHP:
            $customtagObj->setControl("customtag_content", array("name" => "source", "syntax" => "php"));
            break;
        default:
            break;
    }
    if (!$clone && !$customtagObj->isNew()) {
        $sform = $customtagObj->getForm(_CO_ICMS_CUSTOMTAG_EDIT, "addcustomtag");
        $sform->assign($icmsAdminTpl);
        $icmsAdminTpl->assign("icms_custom_tag_title", _CO_ICMS_CUSTOMTAG_EDIT_INFO);
        $icmsAdminTpl->display("db:admin/customtag/system_adm_customtag.html");
    } else {
        $customtagObj->setVar("customtagid", 0);
        $customtagObj->setVar("tag", "");
        $sform = $customtagObj->getForm(_CO_ICMS_CUSTOMTAG_CREATE, "addcustomtag");
        $sform->assign($icmsAdminTpl);
        $icmsAdminTpl->assign("icms_custom_tag_title", _CO_ICMS_CUSTOMTAG_CREATE_INFO);
        $icmsAdminTpl->display("db:admin/customtag/system_adm_customtag.html");
    }
}
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:41,代码来源:main.php

示例3: SmilesEdit

/**
 * Logic and rendering for editing a smilie
 * 
 * @param int $id
 */
function SmilesEdit($id)
{
    $db =& icms_db_Factory::instance();
    icms_cp_header();
    echo '<a href="admin.php?fct=smilies">' . _AM_SMILESCONTROL . '</a>&nbsp;<span style="font-weight:bold;">&raquo;&raquo;</span>&nbsp;' . _AM_EDITSMILE . '<br /><br />';
    if ($getsmiles = $db->query("SELECT * FROM " . $db->prefix("smiles") . " WHERE id = '" . (int) $id . "'")) {
        $numsmiles = $db->getRowsNum($getsmiles);
        if ($numsmiles == 0) {
            //EMPTY
        } else {
            if ($smiles = $db->fetchArray($getsmiles)) {
                $smiles['smile_code'] = icms_core_DataFilter::htmlSpecialChars($smiles['code']);
                $smiles['smile_url'] = icms_core_DataFilter::htmlSpecialChars($smiles['smile_url']);
                $smiles['smile_desc'] = icms_core_DataFilter::htmlSpecialChars($smiles['emotion']);
                $smiles['smile_display'] = $smiles['display'];
                $smiles['smile_form'] = _AM_EDITSMILE;
                $smiles['op'] = 'SmilesSave';
                include ICMS_MODULES_PATH . '/system/admin/smilies/smileform.php';
                $smile_form->addElement(new icms_form_elements_Hidden('old_smile', $smiles['smile_url']));
                $smile_form->display();
            }
        }
    } else {
        echo _AM_CNRFTSD;
    }
    icms_cp_footer();
}
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:32,代码来源:smilies.php

示例4: editautotasks

/**
 * Method for editing autotask entries
 * 
 * @param boolean	$showmenu		This parameter is not used - why is it here?
 * @param int		$autotasksid	The unique identifier for the autotask
 * @param boolean	$clone			Indicator if an autotask is being created from another
 */
function editautotasks($showmenu = FALSE, $autotasksid = 0, $clone = FALSE)
{
    global $icms_autotasks_handler, $icmsAdminTpl;
    icms_cp_header();
    $autotasksObj = $icms_autotasks_handler->get($autotasksid);
    if (!$clone && !$autotasksObj->isNew()) {
        $sform = $autotasksObj->getForm(_CO_ICMS_AUTOTASKS_EDIT, 'addautotasks');
        $sform->assign($icmsAdminTpl);
        $icmsAdminTpl->display('db:admin/autotasks/system_adm_autotasks.html');
    } else {
        $autotasksObj->setVar('sat_id', 0);
        $sform = $autotasksObj->getForm(_CO_ICMS_AUTOTASKS_CREATE, 'addautotasks');
        $sform->assign($icmsAdminTpl);
        $icmsAdminTpl->display('db:admin/autotasks/system_adm_autotasks.html');
    }
}
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:23,代码来源:main.php

示例5: edituserrank

/**
 * Logic and rendering for editing user ranks
 * 
 * @param bool	$showmenu	Unnecessary? Not in any other location
 * @param int	$rank_id	Unique ID for the rank entry
 * @param bool	$clone		Are you cloning an existing rank?
 */
function edituserrank($showmenu = FALSE, $rank_id = 0, $clone = FALSE)
{
    global $icms_userrank_handler, $icmsAdminTpl;
    icms_cp_header();
    $userrankObj = $icms_userrank_handler->get($rank_id);
    if (!$clone && !$userrankObj->isNew()) {
        $sform = $userrankObj->getForm(_CO_ICMS_USERRANKS_EDIT, "adduserrank");
        $sform->assign($icmsAdminTpl);
        $icmsAdminTpl->assign("icms_userrank_title", _CO_ICMS_USERRANKS_EDIT_INFO);
        $icmsAdminTpl->display("db:admin/userrank/system_adm_userrank.html");
    } else {
        $userrankObj->setVar("rank_id", 0);
        $sform = $userrankObj->getForm(_CO_ICMS_USERRANKS_CREATE, "adduserrank");
        $sform->assign($icmsAdminTpl);
        $icmsAdminTpl->assign("icms_userrank_title", _CO_ICMS_USERRANKS_CREATE_INFO);
        $icmsAdminTpl->display("db:admin/userrank/system_adm_userrank.html");
    }
}
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:25,代码来源:main.php

示例6: editmimetype

/**
 * Logic and rendering for mimetypes management
 * 
 * @param bool	$showmenu	Doesn't appear to have any current functionality
 * @param int	$mimetypeid	Unique ID for mimetype entry
 */
function editmimetype($showmenu = FALSE, $mimetypeid = 0)
{
    global $icms_mimetype_handler, $icmsAdminTpl;
    icms_cp_header();
    $mimetypeObj = $icms_mimetype_handler->get($mimetypeid);
    if (!$mimetypeObj->isNew()) {
        $sform = $mimetypeObj->getForm(_CO_ICMS_MIMETYPE_EDIT, 'addmimetype');
        $sform->assign($icmsAdminTpl);
        $icmsAdminTpl->assign('icms_mimetype_title', _CO_ICMS_MIMETYPE_EDIT_INFO);
        $icmsAdminTpl->display('db:admin/mimetype/system_adm_mimetype.html');
    } else {
        $mimetypeObj->setVar('mimetypeid', 0);
        $mimetypeObj->setVar('extension', '');
        $sform = $mimetypeObj->getForm(_CO_ICMS_MIMETYPE_CREATE, 'addmimetype');
        $sform->assign($icmsAdminTpl);
        $icmsAdminTpl->assign('icms_mimetype_title', _CO_ICMS_MIMETYPE_CREATE_INFO);
        $icmsAdminTpl->display('db:admin/mimetype/system_adm_mimetype.html');
    }
}
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:25,代码来源:main.php

示例7: editadsense

/**
 * Edit AdSense entries
 * 
 * @param $showmenu		This parameter is not used (why is it here?)
 * @param $adsenseid	Unique identifier of the AdSense unit
 * @param $clone		Is this cloning an existing AdSense unit?
 */
function editadsense($showmenu = FALSE, $adsenseid = 0, $clone = FALSE)
{
    global $icms_adsense_handler, $icmsAdminTpl;
    icms_cp_header();
    $adsenseObj = $icms_adsense_handler->get($adsenseid);
    if (!$clone && !$adsenseObj->isNew()) {
        $sform = $adsenseObj->getForm(_CO_ICMS_ADSENSES_EDIT, 'addadsense');
        $sform->assign($icmsAdminTpl);
        $icmsAdminTpl->assign('icms_adsense_title', _CO_ICMS_ADSENSES_EDIT_INFO);
        $icmsAdminTpl->display('db:admin/adsense/system_adm_adsense.html');
    } else {
        $adsenseObj->setVar('adsenseid', 0);
        $adsenseObj->setVar('tag', '');
        $sform = $adsenseObj->getForm(_CO_ICMS_ADSENSES_CREATE, 'addadsense');
        $sform->assign($icmsAdminTpl);
        $icmsAdminTpl->assign('icms_adsense_title', _CO_ICMS_ADSENSES_CREATE_INFO);
        $icmsAdminTpl->display('db:admin/adsense/system_adm_adsense.html');
    }
}
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:26,代码来源:main.php

示例8: xoops_cp_header

/**
 * Backwards compatibility function.
 *
 * @since XOOPS
 * @version $Id: cp_functions.php 12115 2012-11-18 16:10:55Z fiammy $
 * @deprecated use icms_cp_header instead
 * @todo		Remove in version 1.4 -  - all occurrences in the core have been removed
 *
 * @author The Xoops Project <http://www.xoops.org>
 * @author Gustavo Pilla (aka nekro) <nekro@impresscms.org>
 */
function xoops_cp_header()
{
    icms_core_Debug::setDeprecated('icms_cp_header', sprintf(_CORE_REMOVE_IN_VERSION, '1.4'));
    icms_cp_header();
}
开发者ID:nao-pon,项目名称:impresscms,代码行数:16,代码来源:cp_functions.php

示例9: redirect_header

         if ($obj->getVar('content_status', 'e') != $_POST['content_status'][$k]) {
             $obj->setVar('content_status', (int) $_POST['content_status'][$k]);
             $changed = true;
         }
         if ($obj->getVar('content_visibility', 'e') != $_POST['content_visibility'][$k]) {
             $obj->setVar('content_visibility', (int) $_POST['content_visibility'][$k]);
             $changed = true;
         }
         if ($changed) {
             $content_content_handler->insert($obj);
         }
     }
     redirect_header('content.php', 2, _AM_CONTENT_CONTENT_MODIFIED);
     break;
 default:
     icms_cp_header();
     icms::$module->displayAdminMenu(0, _AM_CONTENT_CONTENTS);
     $criteria = new icms_db_criteria_Compo();
     $criteria->add(new icms_db_criteria_Item('content_pid', $clean_content_pid));
     $objectTable = new icms_ipf_view_Table($content_content_handler, $criteria);
     $objectTable->addColumn(new icms_ipf_view_Column('content_title', false, false, 'getPreviewItemLink'));
     $objectTable->addColumn(new icms_ipf_view_Column('content_subs', 'center', 100));
     $objectTable->addColumn(new icms_ipf_view_Column('counter', 'center', 100));
     $objectTable->addColumn(new icms_ipf_view_Column('content_status', 'center', 150, 'getContent_statusControl'));
     $objectTable->addColumn(new icms_ipf_view_Column('content_visibility', 'center', 150, 'getContent_visibleControl'));
     $objectTable->addColumn(new icms_ipf_view_Column('content_published_date', 'center', 150));
     $objectTable->addActionButton('changedField', false, _SUBMIT);
     $objectTable->addCustomAction('getViewItemLink');
     $objectTable->addCustomAction('getCloneItemLink');
     $objectTable->addIntroButton('addcontent', 'content.php?op=mod' . ($clean_content_pid ? '&amp;content_pid=' . $clean_content_pid : ''), _AM_CONTENT_CONTENT_CREATE);
     $objectTable->addQuickSearch(array('content_title', 'content_body'));
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:31,代码来源:content.php

示例10: modifyGroup

/**
 * Modify settings for a group
 * @param int $g_id	Unique group ID
 */
function modifyGroup($g_id) {
	$userstart = $memstart = 0;
	if (!empty($_POST['userstart'])) {
		$userstart = (int) $_POST['userstart'];
	} elseif (!empty($_GET['userstart'])) {
		$userstart = (int) $_GET['userstart'];
	}
	if (!empty($_POST['memstart'])) {
		$memstart = (int) $_POST['memstart'];
	} elseif (!empty($_GET['memstart'])) {
		$memstart = (int) $_GET['memstart'];
	}
	icms_cp_header();
	echo '<div class="CPbigTitle" style="background-image: url(' . ICMS_MODULES_URL . '/system/admin/groups/images/groups_big.png)"><a href="admin.php?fct=groups">'. _AM_GROUPSMAIN .'</a>&nbsp;<span style="font-weight:bold;">&raquo;&raquo;</span>&nbsp;'. _AM_MODIFYADG . '</div><br />';
	$member_handler = icms::handler('icms_member');
	$thisgroup =& $member_handler->getGroup($g_id);
	$name_value = $thisgroup->getVar("name", "E");
	$desc_value = $thisgroup->getVar("description", "E");
	$moduleperm_handler = icms::handler('icms_member_groupperm');
	$a_mod_value =& $moduleperm_handler->getItemIds('module_admin', $thisgroup->getVar('groupid'));
	$r_mod_value =& $moduleperm_handler->getItemIds('module_read', $thisgroup->getVar('groupid'));
	$ed_mod_value =& $moduleperm_handler->getItemIds('use_wysiwygeditor', $thisgroup->getVar('groupid'));
	$debug_mod_value =& $moduleperm_handler->getItemIds('enable_debug', $thisgroup->getVar('groupid'));
	$group_manager_value =& $moduleperm_handler->getItemIds('group_manager', $thisgroup->getVar('groupid'));
	$gperm_handler = icms::handler('icms_member_groupperm');
	$r_block_value =& $gperm_handler->getItemIds('block_read', $g_id);
	$op_value = "update";
	$submit_value = _AM_UPDATEADG;
	$g_id_value = $thisgroup->getVar("groupid");
	$type_value = $thisgroup->getVar("group_type", "E");
	$form_title = _AM_MODIFYADG;
	if (XOOPS_GROUP_ADMIN == $g_id) {
		$s_cat_disable = TRUE;
	}

	$sysperm_handler = icms::handler('icms_member_groupperm');
	$s_cat_value =& $sysperm_handler->getItemIds('system_admin', $g_id);

	include ICMS_MODULES_PATH . "/system/admin/groups/groupform.php";
	echo "<br /><h4 style='text-align:" . _GLOBAL_LEFT . "'>" . _AM_EDITMEMBER . "</h4>";
	$usercount = $member_handler->getUserCount(new icms_db_criteria_Item('level', 0, '>'));
	$member_handler = icms::handler('icms_member');
	$membercount = $member_handler->getUserCountByGroup($g_id);
	if ($usercount < 200 && $membercount < 200) {
		// do the old way only when counts are small
		$mlist = array();
		$members =& $member_handler->getUsersByGroup($g_id, FALSE);
		if (count($members) > 0) {
			$member_criteria = new icms_db_criteria_Item('uid', "(" . implode(',', $members) . ")", "IN");
			$member_criteria->setSort('uname');
			$mlist = $member_handler->getUserList($member_criteria);
		}
		$criteria = new icms_db_criteria_Item('level', 0, '>');
		$criteria->setSort('uname');
		$userslist =& $member_handler->getUserList($criteria);
		$users =& array_diff($userslist, $mlist);
		echo '<table class="outer"><tr><th align="center">' . _AM_NONMEMBERS . '<br />';

		echo '</th><th></th><th align="center">' . _AM_MEMBERS . '<br />';
		echo '</th></tr><tr><td class="even">'
		. '<form action="admin.php" method="post">'
		. '<select name="uids[]" size="10" multiple="multiple">' . "\n";
		foreach ($users as $u_id => $u_name) {
			echo '<option value="' . (int) $u_id . '">' . $u_name . '</option>' . "\n";
		}
		echo '</select>';
		echo "</td><td align='center' class='odd'><input type='hidden' name='op' value='addUser' />" 
		. icms::$security->getTokenHTML() 
		. "<input type='hidden' name='fct' value='groups' /><input type='hidden' name='groupid' value='" 
		. $thisgroup->getVar("groupid") 
		. "' /><input type='submit' name='submit' value='" 
		. _AM_ADDBUTTON . "' /></form><br /><form action='admin.php' method='post' />"
		. "<input type='hidden' name='op' value='delUser' />" 
		. icms::$security->getTokenHTML() 
		. "<input type='hidden' name='fct' value='groups' /><input type='hidden' name='groupid' value='" 
		. $thisgroup->getVar("groupid") 
		. "' /><input type='submit' name='submit' value='" 
		. _AM_DELBUTTON . "' /></td><td class='even'>";
		echo "<select name='uids[]' size='10' multiple='multiple'>";
		foreach ($mlist as $m_id => $m_name) {
			echo '<option value="' . (int) $m_id . '">' . $m_name . '</option>' . "\n";
		}
		echo "</select>";
		echo '</td></tr></form></table>';
	} else {
		$members =& $member_handler->getUsersByGroup($g_id, FALSE, 200, $memstart);
		$mlist = array();
		if (count($members) > 0) {
			$member_criteria = new icms_db_criteria_Item('uid', "(" . implode(',', $members) . ")", "IN");
			$member_criteria->setSort('uname');
			$mlist = $member_handler->getUserList($member_criteria);
		}
		echo '<a href="' . ICMS_MODULES_URL . '/system/admin.php?fct=findusers&amp;group=' . (int) $g_id . '">' . _AM_FINDU4GROUP . '</a><br />';
		echo '<form action="admin.php" method="post"><table class="outer"><tr><th align="center">' . _AM_MEMBERS . '<br />';
		$nav = new icms_view_PageNav($membercount, 200, $memstart, "memstart", "fct=groups&amp;op=modify&amp;g_id=" . (int) $g_id);
		echo $nav->renderNav(4);
//.........这里部分代码省略.........
开发者ID:nao-pon,项目名称:impresscms,代码行数:101,代码来源:groups.php

示例11: handleObjectDeletion

 /**
  * Handles deletion of an object which keyid is passed as a GET param
  *
  * @param string $redir_page redirect page after deleting the object
  * @return bool
  */
 public function handleObjectDeletion($confirm_msg = false, $op = 'del', $userSide = false)
 {
     global $impresscms;
     $objectid = isset($_REQUEST[$this->handler->keyName]) ? (int) $_REQUEST[$this->handler->keyName] : 0;
     $icmsObj = $this->handler->get($objectid);
     if ($icmsObj->isNew()) {
         redirect_header("javascript:history.go(-1)", 3, _CO_ICMS_NOT_SELECTED);
         exit;
     }
     $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0;
     if ($confirm) {
         if (!$this->handler->delete($icmsObj)) {
             redirect_header($_POST['redirect_page'], 3, _CO_ICMS_DELETE_ERROR . $icmsObj->getHtmlErrors());
             exit;
         }
         redirect_header($_POST['redirect_page'], 3, _CO_ICMS_DELETE_SUCCESS);
         exit;
     } else {
         // no confirm: show deletion condition
         icms_cp_header();
         if (!$confirm_msg) {
             $confirm_msg = _CO_ICMS_DELETE_CONFIRM;
         }
         $hiddens = array('op' => $op, $this->handler->keyName => $icmsObj->getVar($this->handler->keyName), 'confirm' => 1, 'redirect_page' => $impresscms->urls['previouspage']);
         if ($this->handler->_moduleName == 'system') {
             $hiddens['fct'] = isset($_GET['fct']) ? $_GET['fct'] : false;
         }
         icms_core_Message::confirm($hiddens, xoops_getenv('SCRIPT_NAME'), sprintf($confirm_msg, $icmsObj->getVar($this->handler->identifierName)), _CO_ICMS_DELETE);
         icms_cp_footer();
     }
     exit;
 }
开发者ID:nao-pon,项目名称:impresscms,代码行数:38,代码来源:Controller.php

示例12: imanager_delfileok

/**
 * Logic and rendering for deleting an image
 * @param int $image_id	Unique ID for the image to be deleted
 * @param int $redir	Optional. If set, the image category to display after deleting the image
 */
function imanager_delfileok($image_id, $redir = NULL) {
	if (!icms::$security->check()) {
		redirect_header('admin.php?fct=images', 3, implode('<br />', icms::$security->getErrors()));
	}
	$image_id = (int) $image_id;
	if ($image_id <= 0) {
		redirect_header('admin.php?fct=images', 1);
	}
	$image_handler = icms::handler('icms_image');
	$image =& $image_handler->get($image_id);
	if (!is_object($image)) {
		redirect_header('admin.php?fct=images', 1);
	}
	$imgcat_handler = icms::handler('icms_image_category');
	$imagecategory  =& $imgcat_handler->get((int) $image->getVar('imgcat_id'));
	$categ_path = $imgcat_handler->getCategFolder($imagecategory);
	if (!$image_handler->delete($image)) {
		icms_cp_header();
		icms_core_Message::error(sprintf(_MD_FAILDEL, $image->getVar('image_id')));
		icms_cp_footer();
		exit();
	}
	@unlink($categ_path . '/' . $image->getVar('image_name'));
	if (isset($redir)) {
		$redir = '&op=listimg&imgcat_id=' . $redir;
	} else {
		$redir = '';
	}
	redirect_header('admin.php?fct=images' . $redir, 2, _MD_AM_DBUPDATED);
}
开发者ID:nao-pon,项目名称:impresscms,代码行数:35,代码来源:main.php

示例13: updateUser

/**
 * Updates the member profile, saving the changes to the database
 *
 * @param $uid
 * @param $uname
 * @param $login_name
 * @param $name
 * @param $url
 * @param $email
 * @param $user_icq
 * @param $user_aim
 * @param $user_yim
 * @param $user_msnm
 * @param $user_from
 * @param $user_occ
 * @param $user_intrest
 * @param $user_viewemail
 * @param $user_avatar
 * @param $user_sig
 * @param $attachsig
 * @param $theme
 * @param $pass
 * @param $pass2
 * @param $rank
 * @param $bio
 * @param $uorder
 * @param $umode
 * @param $notify_method
 * @param $notify_mode
 * @param $timezone_offset
 * @param $user_mailok
 * @param $language
 * @param $openid
 * @param $user_viewoid
 * @param $pass_expired
 * @param $groups
 */
function updateUser($uid, $uname, $login_name, $name, $url, $email, $user_icq, $user_aim, $user_yim,
					$user_msnm, $user_from, $user_occ, $user_intrest, $user_viewemail, $user_avatar,
					$user_sig, $attachsig, $theme, $pass, $pass2, $rank, $bio, $uorder, $umode, $notify_method,
					$notify_mode, $timezone_offset, $user_mailok, $language, $openid, $user_viewoid,
					$pass_expired, $groups = array()
					) {
	global $icmsConfig, $icmsModule, $icmsConfigUser;
	$member_handler = icms::handler('icms_member');
	$edituser =& $member_handler->getUser($uid);
	if ($edituser->getVar('uname') != $uname && $member_handler->getUserCount(new icms_db_criteria_Item('uname', $uname)) > 0 || $edituser->getVar('login_name') != $login_name && $member_handler->getUserCount(new icms_db_criteria_Item('login_name', $login_name)) > 0) {
		icms_cp_header();
		echo '<div class="CPbigTitle" style="background-image: url(' . ICMS_MODULES_URL . '/system/admin/users/images/users_big.png)">' . _MD_AM_USER . '</div><br />';
		echo _AM_UNAME . ' ' . $uname . ' ' . _AM_ALREADY_EXISTS;
		icms_cp_footer();
	} else {
		$edituser->setVar('name', $name);
		$edituser->setVar('uname', $uname);
		$edituser->setVar('login_name', $login_name);
		$edituser->setVar('email', $email);
		$edituser->setVar('openid', $openid);
		$user_viewoid = (isset($user_viewoid) && $user_viewoid == 1) ? 1 : 0;
		$edituser->setVar('user_viewoid', $user_viewoid);
		$url = isset($url) ? formatURL($url) : '';
		$edituser->setVar('url', $url);
		$edituser->setVar('user_icq', $user_icq);
		$edituser->setVar('user_from', $user_from);
		if ($icmsConfigUser['allow_htsig'] == 0) {
			$signature = strip_tags(icms_core_DataFilter::codeDecode($user_sig, 1));
			$edituser->setVar('user_sig', icms_core_DataFilter::icms_substr($signature, 0, (int) $icmsConfigUser['sig_max_length']));
		} else {
			$signature = icms_core_DataFilter::checkVar($user_sig, 'html', 'input');
			$edituser->setVar('user_sig', $signature);
		}
		$user_viewemail = (isset($user_viewemail) && $user_viewemail == 1) ? 1 : 0;
		$edituser->setVar('user_viewemail', $user_viewemail);
		$edituser->setVar('user_aim', $user_aim);
		$edituser->setVar('user_yim', $user_yim);
		$edituser->setVar('user_msnm', $user_msnm);
		$attachsig = (isset($attachsig) && $attachsig == 1) ? 1 : 0;
		$edituser->setVar('attachsig', $attachsig);
		$edituser->setVar('timezone_offset', $timezone_offset);
		$edituser->setVar('uorder', $uorder);
		$edituser->setVar('umode', $umode);
		$edituser->setVar('notify_method', $notify_method);
		$edituser->setVar('notify_mode', $notify_mode);
		$edituser->setVar('bio', $bio);
		$edituser->setVar('rank', $rank);
		$edituser->setVar('user_occ', $user_occ);
		$edituser->setVar('user_intrest', $user_intrest);
		$edituser->setVar('user_mailok', $user_mailok);
		$edituser->setVar('language', $language);
		if ($pass2 != '') {
			if ($pass != $pass2) {
				icms_cp_header();
				echo "<strong>" . _AM_STNPDNM . "</strong>";
				icms_cp_footer();
				exit();
			}

			$icmspass = new icms_core_Password();
			$edituser->setVar('pass_expired', $pass_expired);
			$pass = $icmspass->encryptPass($pass);
			$edituser->setVar('pass', $pass);
//.........这里部分代码省略.........
开发者ID:nao-pon,项目名称:impresscms,代码行数:101,代码来源:users.php

示例14: render

 /**
  * Render the whole About page of a module
  *
  */
 public function render()
 {
     global $icmsModule, $icmsConfig;
     icms_cp_header();
     $module_handler = icms::handler('icms_module');
     $versioninfo =& $module_handler->get($icmsModule->getVar('mid'));
     $icmsModule->displayAdminMenu(-1, $this->_aboutTitle . " " . $versioninfo->getInfo('name'));
     $this->_tpl = new icms_view_Tpl();
     $this->_tpl->assign('module_url', ICMS_URL . "/modules/" . $icmsModule->getVar('dirname') . "/");
     $this->_tpl->assign('module_image', $versioninfo->getInfo('image'));
     $this->_tpl->assign('module_name', $versioninfo->getInfo('name'));
     $this->_tpl->assign('module_version', $versioninfo->getInfo('version'));
     $this->_tpl->assign('module_status_version', $versioninfo->getInfo('status_version'));
     // Left headings...
     if ($versioninfo->getInfo('author_realname') != '') {
         $author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")";
     } else {
         $author_name = $versioninfo->getInfo('author');
     }
     $this->_tpl->assign('module_author_name', $author_name);
     $this->_tpl->assign('module_license', $versioninfo->getInfo('license'));
     $this->_tpl->assign('module_credits', $versioninfo->getInfo('credits'));
     // Developers Information
     $this->_tpl->assign('module_developer_lead', $versioninfo->getInfo('developer_lead'));
     $this->_tpl->assign('module_developer_contributor', $versioninfo->getInfo('developer_contributor'));
     $this->_tpl->assign('module_developer_website_url', $versioninfo->getInfo('developer_website_url'));
     $this->_tpl->assign('module_developer_website_name', $versioninfo->getInfo('developer_website_name'));
     $this->_tpl->assign('module_developer_email', $versioninfo->getInfo('developer_email'));
     $people = $versioninfo->getInfo('people');
     if ($people) {
         $this->_tpl->assign('module_people_developers', isset($people['developers']) ? array_map(array($this, 'sanitize'), $people['developers']) : false);
         $this->_tpl->assign('module_people_testers', isset($people['testers']) ? array_map(array($this, 'sanitize'), $people['testers']) : false);
         $this->_tpl->assign('module_people_translators', isset($people['translators']) ? array_map(array($this, 'sanitize'), $people['translators']) : false);
         $this->_tpl->assign('module_people_documenters', isset($people['documenters']) ? array_map(array($this, 'sanitize'), $people['documenters']) : false);
         $this->_tpl->assign('module_people_other', isset($people['other']) ? array_map(array($this, 'sanitize'), $people['other']) : false);
     }
     //$this->_tpl->assign('module_developers', $versioninfo->getInfo('developer_email'));
     // Module Development information
     $this->_tpl->assign('module_date', $versioninfo->getInfo('date'));
     $this->_tpl->assign('module_status', $versioninfo->getInfo('status'));
     $this->_tpl->assign('module_demo_site_url', $versioninfo->getInfo('demo_site_url'));
     $this->_tpl->assign('module_demo_site_name', $versioninfo->getInfo('demo_site_name'));
     $this->_tpl->assign('module_support_site_url', $versioninfo->getInfo('support_site_url'));
     $this->_tpl->assign('module_support_site_name', $versioninfo->getInfo('support_site_name'));
     $this->_tpl->assign('module_submit_bug', $versioninfo->getInfo('submit_bug'));
     $this->_tpl->assign('module_submit_feature', $versioninfo->getInfo('submit_feature'));
     // Manual
     $manual = $versioninfo->getInfo('manual');
     if ($manual) {
         $this->_tpl->assign('module_manual', isset($manual['wiki']) ? array_map(array($this, 'sanitize'), $manual['wiki']) : false);
     }
     // Warning
     $this->_tpl->assign('module_warning', icms_core_DataFilter::checkVar($versioninfo->getInfo('warning'), 'html', 'input'));
     // Author's note
     $this->_tpl->assign('module_author_word', $versioninfo->getInfo('author_word'));
     // For changelog thanks to 3Dev
     //global $icmsModule;
     $filename = ICMS_ROOT_PATH . '/modules/' . $icmsModule->getVar('dirname') . '/changelog.txt';
     if (is_file($filename)) {
         $filesize = filesize($filename);
         $handle = fopen($filename, 'r');
         $this->_tpl->assign('module_version_history', icms_core_DataFilter::checkVar(fread($handle, $filesize), 'text', 'output'));
         fclose($handle);
     }
     $filename = ICMS_ROOT_PATH . '/modules/' . $icmsModule->getVar('dirname') . '/docs/changelog.txt';
     if (is_file($filename)) {
         $filesize = filesize($filename);
         $handle = fopen($filename, 'r');
         $this->_tpl->assign('module_version_history', icms_core_DataFilter::checkVar(fread($handle, $filesize), 'text', 'output'));
         fclose($handle);
     }
     // For license thanks to 3Dev
     if (file_exists(ICMS_ROOT_PATH . '/modules/' . $icmsModule->getVar('dirname') . '/docs/license.txt')) {
         $filename = ICMS_ROOT_PATH . '/modules/' . $icmsModule->getVar('dirname') . '/docs/license.txt';
     } elseif (file_exists(ICMS_ROOT_PATH . '/modules/' . $icmsModule->getVar('dirname') . '/docs/' . $icmsConfig['language'] . '_license.txt')) {
         $filename = ICMS_ROOT_PATH . '/modules/' . $icmsModule->getVar('dirname') . '/docs/' . $icmsConfig['language'] . '_license.txt';
     } elseif (file_exists(ICMS_ROOT_PATH . '/modules/' . $icmsModule->getVar('dirname') . '/license.txt')) {
         $filename = ICMS_ROOT_PATH . '/modules/' . $icmsModule->getVar('dirname') . '/license.txt';
     } elseif (file_exists(ICMS_ROOT_PATH . '/modules/' . $icmsModule->getVar('dirname') . '/license/' . $icmsConfig['language'] . '_license.txt')) {
         $filename = ICMS_ROOT_PATH . '/modules/' . $icmsModule->getVar('dirname') . '/license/' . $icmsConfig['language'] . '_license.txt';
     } elseif (file_exists(ICMS_ROOT_PATH . '/modules/' . $icmsModule->getVar('dirname') . '/license.txt')) {
         $filename = ICMS_ROOT_PATH . '/modules/' . $icmsModule->getVar('dirname') . '/license.txt';
     }
     if (is_file($filename)) {
         $filesize = filesize($filename);
         $handle = fopen($filename, 'r');
         $this->_tpl->assign('module_license_txt', icms_core_DataFilter::checkVar(fread($handle, $filesize), 'text', 'output'));
         fclose($handle);
     }
     $this->_tpl->display(ICMS_ROOT_PATH . '/modules/system/templates/admin/system_adm_moduleabout.html');
     icms_cp_footer();
 }
开发者ID:nao-pon,项目名称:impresscms,代码行数:96,代码来源:About.php

示例15: BannerClientEdit

	/**
	 * Edits a client's information
	 * @param int $cid client id
	 */
	function BannerClientEdit($cid) {
		global $icmsConfig, $icmsModule;
		icms_cp_header();
		$result = icms::$xoopsDB->query("SELECT name, contact, email, login, passwd, extrainfo FROM " . icms::$xoopsDB->prefix("bannerclient") . " WHERE cid='". (int) $cid . "'");
		list($name, $contact, $email, $login, $passwd, $extrainfo) = icms::$xoopsDB->fetchRow($result);
		$name = icms_core_DataFilter::htmlSpecialChars($name);
		$contact = icms_core_DataFilter::htmlSpecialChars($contact);
		$email = icms_core_DataFilter::htmlSpecialChars($email);
		$login = icms_core_DataFilter::htmlSpecialChars($login);
		$passwd = icms_core_DataFilter::htmlSpecialChars($passwd);
		$extrainfo = icms_core_DataFilter::htmlSpecialChars($extrainfo);
		echo "<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\">";
		echo "<h4>" . _AM_EDITADVCLI . "</h4><form action='admin.php' method='post'>"
		. _AM_CLINAMET . "<input type='text' name='name' value='$name' size='30' maxlength='60' /><br />"
		. _AM_CONTNAMET . "<input type='text' name='contact' value='$contact' size='30' maxlength='60' /><br />"
		. _AM_CONTMAILT . "<input type='text' name='email' size='30' maxlength='60' value='$email' /><br />"
		. _AM_CLILOGINT . "<input type='text' name='login' size='12' maxlength='10' value='$login' /><br />"
		. _AM_CLIPASST . "<input type='text' name='passwd' size='12' maxlength='10' value='$passwd' /><br />"
		. _AM_EXTINFO . "<br /><textarea name='extrainfo' cols='60' rows='10' />$extrainfo</textarea><br />"
		. "<input type='hidden' name='cid' value='$cid' />"
		. "<input type='hidden' name='op' value='BannerClientChange' />"
		. icms::$security->getTokenHTML()
		. "<input type='hidden' name='fct' value='banners' /><input type='submit' value='" . _AM_CHGCLI . "' />";
		echo "</td></tr></table>";
		icms_cp_footer();
	}
开发者ID:nao-pon,项目名称:impresscms,代码行数:30,代码来源:banners.php


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