本文整理汇总了PHP中Label::setStyle方法的典型用法代码示例。如果您正苦于以下问题:PHP Label::setStyle方法的具体用法?PHP Label::setStyle怎么用?PHP Label::setStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Label
的用法示例。
在下文中一共展示了Label::setStyle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Label
<?php
/**
* ManiaPress: a suite to display your WordPress install directly in Maniaplanet.
*
* @see http://code.google.com/p/maniapress/
* @copyright Copyright (c) 2011-2012 NADEO (http://www.nadeo.com)
* @license http://www.gnu.org/licenses/lgpl.html LGPL License 3
* @version $Revision$:
* @author $Author$:
* @date $Date$:
*/
get_header('single');
if (have_posts()) {
the_post();
get_template_part('content', 'single');
} else {
$ui = new Label(120 / 1.5);
$ui->setScale(1.5);
$ui->setHalign('center');
$ui->setPosition(0, 40, 0.2);
$ui->enableAutonewline();
$ui->setStyle(Label::TextButtonSmall);
$ui->setText('Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.');
$ui->save();
}
get_sidebar('single');
get_footer('single');
示例2: userIsAuthentificated
/**
* Method userIsAuthentificated
* @access protected
* @param mixed $strUserRights
* @param mixed $redirect
* @param mixed $redirect_url
* @since 1.1.11
*/
protected function userIsAuthentificated($strUserRights, $redirect, $redirect_url)
{
$this->page_object->setUserRights($strUserRights);
$_SESSION['wsp-login'] = $this->getLogin();
if ($redirect) {
if ($this->authentication_msg) {
$str_msg = new Label(__(AUTHENTICATION_LOGIN_OK_REDIRECT));
$str_msg->setStyle("text-shadow:#888888 1px 1px 1px;");
$this->error_obj->add($str_msg->setColor($this->color_ok));
}
if ($redirect_url == "") {
$this->page_object->redirect($this->page_object->getBaseLanguageURL() . WSP_ADMIN_URL . "/admin.html");
} else {
if (strtoupper($redirect_url) == "REFERER") {
if ($this->getReferer() != "") {
$this->page_object->redirect($this->getReferer());
} else {
$this->page_object->redirect($this->page_object->getBaseLanguageURL() . WSP_ADMIN_URL . "/admin.html");
}
} else {
$this->page_object->redirect($redirect_url);
}
}
} else {
if ($this->authentication_msg) {
$str_msg = new Label(__(AUTHENTICATION_LOGIN_OK));
$str_msg->setStyle("text-shadow:#888888 1px 1px 1px;");
$this->error_obj->add($str_msg->setColor($this->color_ok));
}
}
}
示例3: connect
/**
* Method connect
* @access public
* @param boolean $redirect [default value: true]
* @param string $redirect_url [default value: REFERER]
* @return boolean
* @since 1.1.11
*/
public function connect($redirect = true, $redirect_url = 'REFERER')
{
$ldap = @ldap_connect($this->ldap_host, $this->ldap_port);
// doit être un serveur LDAP valide !
if ($ldap !== false) {
$r = @ldap_bind($ldap, $this->getLogin() . $this->ldap_user_domain, $this->getPassword());
if ($r !== false) {
$filter = "(sAMAccountName=" . $this->getLogin() . ")";
$result = @ldap_search($ldap, $this->ldap_dn, $filter);
if ($result !== false) {
$strUserRights = $this->default_right;
$info = ldap_get_entries($ldap, $result);
if (isset($info[0])) {
$this->ldap_user_info = $info[0];
if (isset($info[0]["memberof"])) {
$rights_exists = false;
for ($i = 0; $i < sizeof($info[0]["memberof"]); $i++) {
$tmp_rights = $info[0]["memberof"][$i];
foreach ($this->rights_mapping as $key => $value) {
if ($this->rights_mapping[$i][0] == $key) {
$strUserRights = $value;
$rights_exists = true;
break;
}
}
if ($rights_exists == true) {
break;
}
}
}
$this->userIsAuthentificated($strUserRights, $redirect, $redirect_url);
} else {
$str_msg = new Label(__(AUTHENTICATION_ERROR_LOGIN_PASS));
$str_msg->setStyle("text-shadow:#888888 1px 1px 1px;");
$this->error_obj->add($str_msg->setColor($this->color_error));
return false;
}
} else {
throw new NewException("Unable to search on LDAP server", 0, getDebugBacktrace(1));
}
} else {
$str_msg = new Label(__(AUTHENTICATION_ERROR_LOGIN_PASS));
$str_msg->setStyle("text-shadow:#888888 1px 1px 1px;");
$this->error_obj->add($str_msg->setColor($this->color_error));
return false;
}
ldap_unbind($ldap);
ldap_close($ldap);
return true;
} else {
throw new NewException("Unable to connect on LDAP server", 0, getDebugBacktrace(1));
}
}