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

PHP icms_core_DataFilter类代码示例

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

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



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

示例1: xoopsSmilies

/**
 * @deprecated	This is not used anywhere in the core
 * @todo		Remove after 2.0
 * Displays smilie image buttons used to insert smilie codes to a target textarea in a form
 * $textarea_id is a unique of the target textarea
 */
function xoopsSmilies($textarea_id)
{
    icms_core_Debug::setDeprecated('icms_form_elements_Dhtmltextarea.', sprintf(_CORE_REMOVE_IN_VERSION, '2.0'));
    $smiles =& icms_core_DataFilter::getSmileys();
    if (empty($smileys)) {
        if ($result = icms::$xoopsDB->query("SELECT * FROM " . icms::$xoopsDB->prefix('smiles') . " WHERE display='1'")) {
            while ($smiles = icms::$xoopsDB->fetchArray($result)) {
                //hack smilies move for the smilies !!
                echo "<img src='" . ICMS_UPLOAD_URL . "/" . htmlspecialchars($smiles['smile_url']) . "' border='0' onmouseover='style.cursor=\"hand\"' alt='' onclick='xoopsCodeSmilie(\"" . $textarea_id . "_tarea\", \" " . $smiles['code'] . " \");' />";
                //fin du hack
            }
        }
    } else {
        $count = count($smiles);
        for ($i = 0; $i < $count; $i++) {
            if ($smiles[$i]['display'] == 1) {
                //hack bis
                echo "<img src='" . ICMS_UPLOAD_URL . "/" . icms_core_DataFilter::htmlSpecialChars($smiles['smile_url']) . "' border='0' alt='' onclick='xoopsCodeSmilie(\"" . $textarea_id . "_tarea\", \" " . $smiles[$i]['code'] . " \");' onmouseover='style.cursor=\"hand\"' />";
                //fin du hack
            }
        }
    }
    //hack for more
    echo "&nbsp;[<a href='#moresmiley' onmouseover='style.cursor=\"hand\"' alt='' onclick='openWithSelfMain(\"" . ICMS_URL . "/misc.php?action=showpopups&amp;type=smilies&amp;target=" . $textarea_id . "_tarea\",\"smilies\",300,475);'>" . _MORE . "</a>]";
}
开发者ID:nao-pon,项目名称:impresscms,代码行数:31,代码来源:xoopscodes.php


示例2: 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


示例3: vardump

 /**
  * Output a dump of a variable
  * This takes the place of icms_debug_vardump()
  *
  * @param string $var
  */
 public static function vardump($var)
 {
     if (class_exists('icms_core_Textsanitizer')) {
         self::message(icms_core_DataFilter::checkVar(var_export($var, true), 'text', 'output'));
     } else {
         $var = var_export($var, true);
         $var = preg_replace("/(\r\n)|(\r)|(\n)/", "<br />", $var);
         self::message($var);
     }
 }
开发者ID:nao-pon,项目名称:impresscms,代码行数:16,代码来源:Debug.php


示例4: getViewItemLink

 /**
  * Build a link to the page represented by the symlink, if available
  * @return	string
  */
 public function getViewItemLink()
 {
     $url = substr($this->getVar('page_url', 'e'), 0, 7) == 'http://' ? $this->getVar('page_url', 'e') : ICMS_URL . '/' . $this->getVar('page_url', 'e');
     $url = icms_core_DataFilter::checkVar($url, 'url', 'host');
     if (!$url) {
         $ret = '';
     } else {
         $ret = '<a href="' . $url . '" alt="' . _PREVIEW . '" title="' . _PREVIEW . '" rel="external"><img src="' . ICMS_IMAGES_SET_URL . '/actions/viewmag.png" /></a>';
     }
     return $ret;
 }
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:15,代码来源:pages.php


示例5: textsanitizer_geshi_css_highlight

/**
 * Highlights the passed source code as css
 *
 * @param $source
 */
function textsanitizer_geshi_css_highlight($source)
{
    if (!@(include_once ICMS_LIBRARIES_PATH . '/geshi/geshi.php')) {
        return false;
    }
    $source = icms_core_DataFilter::undoHtmlSpecialChars($source);
    // Create the new GeSHi object, passing relevant stuff
    $geshi = new GeSHi($source, 'css');
    // Enclose the code in a <div>
    $geshi->set_header_type(GESHI_HEADER_NONE);
    // Sets the proper encoding charset other than "ISO-8859-1"
    $geshi->set_encoding(_CHARSET);
    $geshi->set_link_target("_blank");
    // Parse the code
    $code = $geshi->parse_code();
    $code = "<div class=\"icmsCodeCss\"><code>" . $code . "</code></div>";
    return $code;
}
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:23,代码来源:syntaxhighlightcss.php


示例6: 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


示例7: toArray

 /**
  * Overridding IcmsPersistable::toArray() method to add a few info
  *
  * @global array $icmsConfigUser user configuration
  * @return array of tribetopic info
  */
 public function toArray()
 {
     global $icmsConfigUser;
     $ret = parent::toArray();
     $ret['post_time'] = formatTimestamp($this->getVar('post_time', 'e'), 'm');
     $ret['poster_uname'] = icms_member_user_Handler::getUserLink($this->getVar('poster_uid'));
     $ret['userCanEditAndDelete'] = $this->userCanEditAndDelete();
     $thisUser = icms::handler('icms_member')->getUser($this->getVar('poster_uid'));
     if (is_object($thisUser)) {
         // get poster avatar
         $avatar = $thisUser->gravatar();
         if ($icmsConfigUser['avatar_allow_gravatar'] || strpos($avatar, 'http://www.gravatar.com/avatar/') === false) {
             $ret['poster_avatar'] = '<img src="' . $thisUser->gravatar() . '" />';
         }
         // get poster signature
         if (trim($thisUser->getVar('user_sig')) && $this->getVar('attachsig')) {
             $ret['poster_signature'] = icms_core_DataFilter::checkVar($thisUser->getVar('user_sig', 'N'), 'html', 'output');
         }
     }
     // rewrite edit and delete item links to work with tribes.php
     $ret['editItemLink'] = str_replace($this->handler->_itemname . '.php?op=mod', 'tribes.php?tribes_id=' . $this->getVar('tribes_id') . '&amp;topic_id=' . $this->getVar('topic_id') . '&amp;op=edittribepost', $this->getEditItemLink(false, true, true));
     $ret['deleteItemLink'] = str_replace($this->handler->_itemname . '.php?op=del', 'tribes.php?tribes_id=' . $this->getVar('tribes_id') . '&amp;topic_id=' . $this->getVar('topic_id') . '&amp;op=deltribepost', $this->getDeleteItemLink(false, true, true));
     return $ret;
 }
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:30,代码来源:Tribepost.php


示例8: _renderSmileys

 /**
  * prepare HTML for output of the smiley list.
  *
  * @return	string HTML
  */
 private function _renderSmileys()
 {
     $smiles =& icms_core_DataFilter::getSmileys();
     $ret = '';
     $count = count($smiles);
     $ele_name = $this->getName();
     for ($i = 0; $i < $count; $i++) {
         $ret .= "<img onclick='xoopsCodeSmilie(\"" . $ele_name . "_tarea\", \" " . $smiles[$i]['code'] . " \");' onmouseover='style.cursor=\"pointer\"' src='" . ICMS_UPLOAD_URL . "/" . htmlspecialchars($smiles[$i]['smile_url'], ENT_QUOTES) . "' border='0' alt='' />";
     }
     $ret .= "&nbsp;[<a href='#moresmiley' onclick='javascript:openWithSelfMain(\"" . ICMS_URL . "/misc.php?action=showpopups&amp;type=smilies&amp;target=" . $ele_name . "_tarea\",\"smilies\",300,475);'>" . _MORE . "</a>]";
     return $ret;
 }
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:17,代码来源:Dhtmltextarea.php


示例9: b_system_info_show

/**
 * Shows information about the user
 *
 * @param array $options The block options
 * @return array $block the block array
 */
function b_system_info_show($options) {
	global $icmsConfig;
	$block = array();
	if (!empty($options[3])) {
		$block['showgroups'] = TRUE;
		$result = icms::$xoopsDB->query("SELECT u.uid, u.uname, u.email, u.user_viewemail, u.user_avatar, g.name AS groupname FROM " 
			. icms::$xoopsDB->prefix("groups_users_link") . " l LEFT JOIN " . icms::$xoopsDB->prefix("users") 
			. " u ON l.uid=u.uid LEFT JOIN " . icms::$xoopsDB->prefix("groups") 
			. " g ON l.groupid=g.groupid WHERE g.group_type='Admin' ORDER BY l.groupid, u.uid");
		if (icms::$xoopsDB->getRowsNum($result) > 0) {
			$prev_caption = "";
			$i = 0;
			while  ($userinfo = icms::$xoopsDB->fetchArray($result)) {
				if ($prev_caption != $userinfo['groupname']) {
					$prev_caption = $userinfo['groupname'];
					$block['groups'][$i]['name'] = icms_core_DataFilter::htmlSpecialChars($userinfo['groupname']);
				}
				if (isset(icms::$user) && is_object(icms::$user)) {
					$block['groups'][$i]['users'][] = array('id' => $userinfo['uid'], 'name' => icms_core_DataFilter::htmlSpecialChars($userinfo['uname']), 'msglink' => "<a href=\"javascript:openWithSelfMain('" . ICMS_URL . "/pmlite.php?send2=1&amp;to_userid=" . $userinfo['uid'] . "','pmlite',800,680);\"><img src=\"" . ICMS_URL . "/images/icons/" . $GLOBALS["icmsConfig"]["language"] . "/pm_small.gif\" width=\"27px\" height=\"17px\" alt=\"\" /></a>", 'avatar' => ICMS_UPLOAD_URL . '/' . $userinfo['user_avatar']);
				} else {
					if ($userinfo['user_viewemail']) {
						$block['groups'][$i]['users'][] = array('id' => $userinfo['uid'], 'name' => icms_core_DataFilter::htmlSpecialChars($userinfo['uname']), 'msglink' => '<a href="mailto:' . $userinfo['email'] . '"><img src="' . ICMS_URL . '/images/icons/' . $GLOBALS["icmsConfig"]["language"] . '/em_small.gif" width="16px" height="14px" alt="" /></a>', 'avatar' => ICMS_UPLOAD_URL . '/' . $userinfo['user_avatar']);
					} else {
						$block['groups'][$i]['users'][] = array('id' => $userinfo['uid'], 'name' => icms_core_DataFilter::htmlSpecialChars($userinfo['uname']), 'msglink' => '&nbsp;', 'avatar' => ICMS_UPLOAD_URL . '/' . $userinfo['user_avatar']);
					}
				}
				$i++;
			}
		}
	} else {
		$block['showgroups'] = FALSE;
	}
	$block['logourl'] = ICMS_URL . '/images/' . $options[2];
	$block['recommendlink'] = "<a href=\"javascript:openWithSelfMain('" 
		. ICMS_URL . "/misc.php?action=showpopups&amp;type=friend&amp;op=sendform&amp;t=" . time() 
		. "','friend'," . $options[0] . "," . $options[1] . ")\">" . _MB_SYSTEM_RECO . "</a>";
	return $block;
}
开发者ID:nao-pon,项目名称:impresscms,代码行数:44,代码来源:system_blocks.php


示例10: renderWithPhp

	/**
	 * Rendering a custom tag that contains PHP
	 */
	public function renderWithPhp() {
		if (!$this->content && !$this->evaluated) {
			$ret = $this->getVar('customtag_content', 'e');
			$ret = icms_core_DataFilter::undoHtmlSpecialChars($ret);

			// check for PHP if we are not on admin side
			if (!defined('XOOPS_CPFUNC_LOADED' ) && $this->getVar('customtag_type') == ICMS_CUSTOMTAG_TYPE_PHP) {
				// we have PHP code, let's evaluate
				ob_start();
				echo eval($ret);
				$ret = ob_get_contents();
				ob_end_clean();
				$this->evaluated = TRUE;
			}
			$this->content = $ret;
		}
		return $this->content;
	}
开发者ID:nao-pon,项目名称:impresscms,代码行数:21,代码来源:customtag.php


示例11: time

     $uid = (int) $_POST['uid'];
     $user = $member_handler->getUser($uid);
 } else {
     $user = $member_handler->createUser();
     $user->setVar('user_regdate', time());
     $user->setVar('user_avatar', 'blank.gif');
     $user->setVar('uorder', $icmsConfig['com_order']);
     $user->setVar('umode', $icmsConfig['com_mode']);
 }
 $errors = array();
 $stop = '';
 $login_name = isset($_POST['login_name']) ? trim($_POST['login_name']) : '';
 $uname = isset($_POST['uname']) ? trim($_POST['uname']) : '';
 $email = isset($_POST['email']) ? trim($_POST['email']) : '';
 $pass = isset($_POST['password']) ? icms_core_DataFilter::stripSlashesGPC($_POST['password']) : '';
 $vpass = isset($_POST['vpass']) ? icms_core_DataFilter::stripSlashesGPC($_POST['vpass']) : '';
 icms_loadLanguageFile('core', 'user');
 $stop .= icms::handler('icms_member_user')->userCheck($login_name, $uname, $email, !$user->isNew() && $pass == '' ? false : $pass, $vpass, $user->isNew() ? 0 : $user->getVar('uid'));
 if ($user->getVar('uid') != icms::$user->getVar('uid')) {
     if ($pass != '') {
         $icmspass = new icms_core_Password();
         $salt = icms_core_Password::createSalt();
         $pass = $icmspass->encryptPass($pass, $salt, $icmsConfigUser['enc_type']);
         $user->setVar('pass', $pass);
         $user->setVar('pass_expired', 0);
         $user->setVar('enc_type', $icmsConfigUser['enc_type']);
         $user->setVar('salt', $salt);
     }
     $user->setVar('level', (int) $_POST['level']);
 }
 $user->setVar('uname', $uname);
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:31,代码来源:user.php


示例12: getOutputValue

 /**
  * Returns a value for output of this field
  *
  * @param icms_member_user_Object $user object to get the value of
  * @param mod_profile_Profile $profile object to get the value of
  * @global array $icmsConfigAuth
  * @return mixed
  **/
 public function getOutputValue(&$user, $profile)
 {
     global $icmsConfigAuth;
     $value = in_array($this->getVar('field_name'), $this->getUserVars()) ? $user->getVar($this->getVar('field_name')) : $profile->getVar($this->getVar('field_name'));
     switch ($this->getVar('field_type')) {
         case "textarea":
         case "dhtml":
             return icms_core_DataFilter::undoHtmlSpecialChars(str_replace('&amp;', '&', $value), 1);
             break;
         case "select":
         case "radio":
             $options = unserialize($this->getVar('field_options', 'n'));
             return isset($options[$value]) ? htmlspecialchars($options[$value]) : "";
             break;
         case "select_multi":
         case "checkbox":
             $options = unserialize($this->getVar('field_options', 'n'));
             $ret = array();
             if (count($options) > 0) {
                 foreach (array_keys($options) as $key) {
                     if (in_array($key, $value)) {
                         $ret[$key] = htmlspecialchars($options[$key]);
                     }
                 }
             }
             return $ret;
             break;
         case "group":
             //change to retrieve groups and return name of group
             return $value;
             break;
         case "group_multi":
             //change to retrieve groups and return array of group names
             return "";
             break;
         case "longdate":
             //return YYYY/MM/DD format - not optimal as it is not using local date format, but how do we do that
             //when we cannot convert it to a UNIX timestamp?
             return str_replace("-", "/", $value);
         case "date":
             if ($value > 0) {
                 return formatTimestamp($value, 's');
             }
             return "";
             break;
         case "datetime":
             if ($value > 0) {
                 return formatTimestamp($value, 'm');
             }
             return "";
             break;
         case "autotext":
             $value = $user->getVar($this->getVar('field_name'), 'n');
             //autotext can have HTML in it
             $value = str_replace("{X_UID}", $user->getVar("uid"), $value);
             $value = str_replace("{X_URL}", ICMS_URL, $value);
             $value = str_replace("{X_UNAME}", $user->getVar("uname"), $value);
             return $value;
             break;
         case "rank":
             $userrank = $user->rank();
             return '<img src="' . $userrank['image'] . '" alt="' . $userrank['title'] . '" />&nbsp;' . $userrank['title'];
             break;
         case "yesno":
             return $value ? _YES : _NO;
             break;
         case "timezone":
             $timezones = icms_form_elements_select_Timezone::getTimeZoneList();
             return $timezones[str_replace('.0', '', $value)];
             break;
         case "image":
             if ($value == "") {
                 return '';
             }
             return "<img src='" . ICMS_UPLOAD_URL . "/" . basename(dirname(dirname(__FILE__))) . "/" . $value . "' alt='image' />";
             break;
         case "url":
             if ($value == "") {
                 return '';
             }
             return icms_core_DataFilter::makeClickable(formatURL($value));
         case "location":
             if ($value == "") {
                 return '';
             }
             return $value . '&nbsp;<a href="http://maps.google.com/?q=' . $value . '" target="_blank" ><img src="' . ICMS_URL . '/modules/' . basename(dirname(dirname(__FILE__))) . '/images/mapsgoogle.gif" alt="" /></a>';
         case "email":
             if ($value == "") {
                 return '';
             }
             if ($user->getVar('user_viewemail') || is_object(icms::$user) && (icms::$user->isAdmin() || icms::$user->getVar('uid') == $user->getVar('uid'))) {
                 return '<a href="mailto:' . $value . '">' . $value . '</a>';
//.........这里部分代码省略.........
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:101,代码来源:Field.php


示例13: elseif

                 $xoopsMailer->setToEmails($toUser->getVar('email'));
                 if (icms::$user->getVar('user_viewemail')) {
                     $xoopsMailer->setFromEmail(icms::$user->getVar('email'));
                     $xoopsMailer->setFromName(icms::$user->getVar('uname'));
                 } else {
                     $xoopsMailer->setFromEmail($icmsConfig['adminmail']);
                     $xoopsMailer->setFromName($icmsConfig['sitename']);
                 }
                 $xoopsMailer->setTemplate('new_pm.tpl');
                 $xoopsMailer->assign('X_SITENAME', $icmsConfig['sitename']);
                 $xoopsMailer->assign('X_SITEURL', ICMS_URL . "/");
                 $xoopsMailer->assign('X_ADMINMAIL', $icmsConfig['adminmail']);
                 $xoopsMailer->assign('X_UNAME', $toUser->getVar('uname'));
                 $xoopsMailer->assign('X_FROMUNAME', icms::$user->getVar('uname'));
                 $xoopsMailer->assign('X_SUBJECT', icms_core_DataFilter::stripSlashesGPC($_POST['subject']));
                 $xoopsMailer->assign('X_MESSAGE', icms_core_DataFilter::stripSlashesGPC($_POST['message']));
                 $xoopsMailer->assign('X_ITEM_URL', ICMS_URL . "/viewpmsg.php");
                 $xoopsMailer->setSubject(sprintf(_PM_MESSAGEPOSTED_EMAILSUBJ, $icmsConfig['sitename']));
                 $xoopsMailer->send();
             }
             echo "<br /><br /><div style='text-align:center;'><h4>" . _PM_MESSAGEPOSTED . "</h4><br />\r\n\t\t\t\t\t<a href=\"javascript:window.opener.location='" . ICMS_URL . "/viewpmsg.php';window.close();\">" . _PM_CLICKHERE . "</a><br /><br />\r\n\t\t\t\t\t<a href=\"javascript:window.close();\">" . _PM_ORCLOSEWINDOW . "</a></div>";
         }
     }
 } elseif ($reply == 1 || $send == 1 || $send2 == 1) {
     if ($reply == 1) {
         $pm_handler = icms::handler('icms_data_privmessage');
         $pm =& $pm_handler->get($msg_id);
         if ($pm->getVar("to_userid") == (int) icms::$user->getVar('uid')) {
             $pm_uname = icms_member_user_Object::getUnameFromId($pm->getVar("from_userid"));
             $message = "[quote]\n";
             $message .= sprintf(_PM_USERWROTE, $pm_uname);
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:31,代码来源:pmlite.php


示例14: icms_form_elements_Colorpicker

					$ele = new icms_form_elements_Colorpicker($title, $config[$i]->getVar('conf_name'), icms_core_DataFilter::htmlSpecialChars($config[$i]->getConfValueForOutput()));
					break;
						
				case 'hidden' :
					$ele = new icms_form_elements_Hidden($config[$i]->getVar('conf_name'), icms_core_DataFilter::htmlSpecialChars($config[$i]->getConfValueForOutput()));
					break;
						
				case 'select_pages' :
					$content_handler = & icms_getModuleHandler('content', 'content');
					$ele = new icms_form_elements_Select($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
					$ele->addOptionArray($content_handler->getContentList());
					break;
						
				case 'textbox' :
				default :
					$ele = new icms_form_elements_Text($title, $config[$i]->getVar('conf_name'), 50, 255, icms_core_DataFilter::htmlSpecialChars($config[$i]->getConfValueForOutput()));
					break;
			}
			$hidden = new icms_form_elements_Hidden('conf_ids[]', $config[$i]->getVar('conf_id'));
			$form->addElement($ele);
			$form->addElement($hidden);
			unset($ele, $hidden);
		}
		$form->addElement(new icms_form_elements_Hidden('op', 'save'));
		$form->addElement(new icms_form_elements_Button('', 'button', _GO, 'submit'));
		icms_cp_header();
		if ($module->getInfo('hasAdmin') == TRUE) {
			$modlink = '<a href="' . ICMS_MODULES_URL . '/' . $module->getVar('dirname') . '/' . $module->getInfo('adminindex') . '">' . $modname . '</a>';
		} else {
			$modlink = $modname;
		}
开发者ID:nao-pon,项目名称:impresscms,代码行数:31,代码来源:main.php


示例15: isset

             $salt = icms_core_Password::createSalt();
             $pass = $icmspass->encryptPass($pass, $salt, $icmsConfigUser['enc_type']);
             $edituser->setVar('pass', $pass);
             $edituser->setVar('pass_expired', 0);
             $edituser->setVar('enc_type', $icmsConfigUser['enc_type']);
             $edituser->setVar('salt', $salt);
         }
         $edituser->setVar('level', (int) $_POST['level']);
     }
 } else {
     if ($icmsConfigUser['allow_chguname'] == 1) {
         $edituser->setVar('uname', $uname);
     }
 }
 if ($icmsConfigAuth['auth_openid'] == 1) {
     $edituser->setVar('openid', icms_core_DataFilter::stripSlashesGPC(trim($_POST['openid'])));
     $edituser->setVar('user_viewoid', isset($_POST['user_viewoid']) ? (int) $_POST['user_viewoid'] : 0);
 }
 // ALTERED BY FREEFORM SOLUTIONS TO SUPPORT USERS CHANGING THEIR OWN PASSWORDS FROM A SINGLE PROFILE PAGE
 // A REPEAT OF THE CODE BLOCK JUST ABOVE, TO HANDLE THE CASE WHERE THE USER IS UPDATING THEIR OWN PASSWORD
 if ($pass != '' and $edituser->getVar('uid') == icms::$user->getVar('uid')) {
     $icmspass = new icms_core_Password();
     $salt = icms_core_Password::createSalt();
     $pass = $icmspass->encryptPass($pass, $salt, $icmsConfigUser['enc_type']);
     $edituser->setVar('pass', $pass);
     $edituser->setVar('pass_expired', 0);
     $edituser->setVar('enc_type', $icmsConfigUser['enc_type']);
     $edituser->setVar('salt', $salt);
 }
 // Dynamic fields
 $profile_handler = icms_getmodulehandler('profile', basename(dirname(__FILE__)), 'profile');
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:31,代码来源:edituser.php


示例16: str_replace

<?php
/**
 * Privacy policy display page
 *
 * This page displays the privacy policy of the site
 *
 * @copyright	The ImpressCMS Project http://www.impresscms.org/
 * @license		http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL)
 * @package		core
 * @since		1.0
 * @author		m0nty_
 * @version		$Id: privpolicy.php 11072 2011-03-14 15:52:14Z m0nty_ $
 */

$xoopsOption['pagetype'] = 'privpolicy';
include 'mainfile.php';
if ($icmsConfigUser['priv_dpolicy'] == false) {
	redirect_header('index.php', 2, _US_NOPERMISS);
}

$xoopsOption['template_main'] = 'system_privpolicy.html';
include ICMS_ROOT_PATH.'/header.php';

$xoopsTpl->assign('priv_poltype', 'page');
$priv = str_replace('{X_SITEURL}', ICMS_URL.'/', $icmsConfigUser['priv_policy']);
$priv = str_replace('{X_SITENAME}', $icmsConfig['sitename'], $priv);
$priv = icms_core_DataFilter::checkVar($priv, 'html', 'output');
$xoopsTpl->assign('priv_policy', $priv);
$xoopsTpl->assign('lang_privacy_policy', _PRV_PRIVACY_POLICY);

include ICMS_ROOT_PATH.'/footer.php';
开发者ID:nao-pon,项目名称:impresscms,代码行数:31,代码来源:privpolicy.php


示例17: defined

 *
 * @copyright	http://www.xoops.org/ The XOOPS Project
 * @copyright	XOOPS_copyrights.txt
 * @copyright	http://www.impresscms.org/ The ImpressCMS Project
 * @license	LICENSE.txt
 * @package		Administration
 * @subpackage	Comments
 * @since	XOOPS
 * @author	http://www.xoops.org The XOOPS Project
 * @author	modified by UnderDog <[email protected]>
 * @version		SVN: $Id: commentform.inc.php 20768 2011-02-06 00:02:25Z skenow $
 */
defined("ICMS_ROOT_PATH") || die("ImpressCMS root path not defined");
$cform = new icms_form_Theme(_CM_POSTCOMMENT, "commentform", "postcomment.php", "post", true);
if (!preg_match("/^re:/i", $subject)) {
    $subject = "Re: " . icms_core_DataFilter::icms_substr($subject, 0, 56);
}
$cform->addElement(new icms_form_elements_Text(_CM_TITLE, 'subject', 50, 255, $subject), true);
$icons_radio = new icms_form_elements_Radio(_MESSAGEICON, 'icon', $icon);
$subject_icons = icms_core_Filesystem::getFileList(ICMS_ROOT_PATH . "/images/subject/", '', array('gif', 'jpg', 'png'));
foreach ($subject_icons as $iconfile) {
    $icons_radio->addOption($iconfile, '<img src="' . ICMS_IMAGES_URL . '/subject/' . $iconfile . '" alt="" />');
}
$cform->addElement($icons_radio);
$cform->addElement(new icms_form_elements_Dhtmltextarea(_CM_MESSAGE, 'message', $message, 10, 50), true);
$option_tray = new icms_form_elements_Tray(_OPTIONS, '<br />');
if (icms::$user) {
    if ($icmsConfig['anonpost'] == true) {
        $noname_checkbox = new icms_form_elements_Checkbox('', 'noname', $noname);
        $noname_checkbox->addOption(1, _POSTANON);
        $option_tray->addElement($noname_checkbox);
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:31,代码来源:commentform.inc.php


示例18: icms_loadLanguageFile

icms_loadLanguageFile('core', 'user');
$uname = !isset($_POST['uname']) ? '' : trim($_POST['uname']);
$pass = !isset($_POST['pass']) ? '' : trim($_POST['pass']);
/**
 * Commented out for OpenID , we need to change it to make a better validation if OpenID is used
 */
/*if ($uname == '' || $pass == '') {
 redirect_header(ICMS_URL.'/user.php', 1, _US_INCORRECTLOGIN);
 exit();
 }*/
$member_handler = icms::handler('icms_member');
icms_loadLanguageFile('core', 'auth');
$icmsAuth =& icms_auth_Factory::getAuthConnection(icms_core_DataFilter::addSlashes($uname));
// uname&email hack GIJ
$uname4sql = addslashes(icms_core_DataFilter::stripSlashesGPC($uname));
$pass4sql = addslashes(icms_core_DataFilter::stripSlashesGPC($pass));
/*if (strstr( $uname , '@' )) {
 // check by email if uname includes '@'
 $criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('email', $uname4sql ));
 $criteria->add(new icms_db_criteria_Item('pass', $pass4sql));
 $user_handler = icms::handler('icms_member_user');
 $users =& $user_handler->getObjects($criteria, false);
 if (empty( $users ) || count( $users ) != 1 ) $user = false ;
 else $user = $users[0] ;
 unset( $users ) ;
 } */
if (empty($user) || !is_object($user)) {
    $user =& $icmsAuth->authenticate($uname4sql, $pass4sql);
}
// end of uname&email hack GIJ
if (false != $user) {
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:31,代码来源:checklogin.php


示例19: redirect_header

 * @license		LICENSE.txt
 * @package		Member
 * @subpackage	Users
 * @author		marcan <[email protected]>
 * @author	    Sina Asghari (aka stranger) <[email protected]>
 * @version		$Id: invite.php 21047 2011-03-14 15:52:14Z m0nty_ $
 */
$xoopsOption['pagetype'] = 'user';
include 'mainfile.php';
// If not a user and invite needs one, redirect
if ($icmsConfigUser['activation_type'] == 3 && $icmsConfigUser['allow_register'] == 0 && !is_object(icms::$user)) {
    redirect_header('index.php', 6, _US_INVITEBYMEMBER);
    exit;
}
$op = !isset($_POST['op']) ? 'invite' : $_POST['op'];
$email = isset($_POST['email']) ? trim(icms_core_DataFilter::stripSlashesGPC($_POST['email'])) : '';
switch ($op) {
    case 'finish':
        include 'header.php';
        $stop = '';
        if (!icms::$security->check()) {
            $stop .= implode('<br />', icms::$security->getErrors()) . "<br />";
        }
        $icmsCaptcha = icms_form_elements_captcha_Object::instance();
        if (!$icmsCaptcha->verify()) {
            $stop .= $icmsCaptcha->getMessage() . '<br />';
        }
        if (!checkEmail($email)) {
            $stop .= _US_INVALIDMAIL . '<br />';
        }
        if (empty($stop)) {
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:31,代码来源:invite.php


示例20: implode

			}
		} else {
			$err = implode('<br />', $uploader->getErrors(FALSE));
			echo $err;
		}
		echo '</code><br /><a href="admin.php?fct=tplsets">' . _MD_AM_BTOTADMIN . '</a>';
		icms_cp_footer();
		break;

	case 'previewtpl':
		if (!icms::$security->check()) {
			redirect_header('admin.php?fct=tplsets', 3, implode('<br />', icms::$security->getErrors()));
		}

			
		$html = icms_core_DataFilter::stripSlashesGPC($html);
		$tpltpl_handler =& icms::handler('icms_view_template_file');
		$tplfile =& $tpltpl_handler->get($id, TRUE);
		$xoopsTpl = new icms_view_Tpl();

		if (is_object($tplfile)) {
			$dummylayout = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
			. '<html><head><meta http-equiv="content-type" content="text/html; charset=' . _CHARSET 
			. '" /><meta http-equiv="content-language" content="' . _LANGCODE 
			. '" /><title>' . $icmsConfig['sitename'] . '</title>'
			. '<link rel="stylesheet" type="text/css" media="screen" href="' . ICMS_URL . '/icms' 
				. (( defined('_ADM_USE_RTL') && _ADM_USE_RTL ) 
					? '_rtl'
					:'') 
				. '.css" /><link rel="stylesheet" type="text/css" media="screen" href="' 
				. xoops_getcss($icmsConfig['theme_set']) . '" />';
开发者ID:nao-pon,项目名称:impresscms,代码行数:31,代码来源:main.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP icms_core_Debug类代码示例发布时间:2022-05-23
下一篇:
PHP icms类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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