本文整理汇总了PHP中Label::setColor方法的典型用法代码示例。如果您正苦于以下问题:PHP Label::setColor方法的具体用法?PHP Label::setColor怎么用?PHP Label::setColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Label
的用法示例。
在下文中一共展示了Label::setColor方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onClickUnblock
public function onClickUnblock($sender)
{
$this->captcha_error_obj->emptyObject();
if ($this->captcha->check()) {
WspBannedVisitors::resetBannedIP($this->getRemoteIP());
$this->refreshPage();
} else {
$error = new Label(__(ERROR_CAPTCHA));
$error->setColor("red");
$this->captcha_error_obj->add($error);
}
}
示例2: Load
public function Load()
{
$dialog_update = new DialogBox(__(UPDATE_FRAMEWORK), new Url($this->getBaseLanguageURL() . "wsp-admin/update/update-framework.call?update=" . $_GET['update'] . "&parent_dialog_level=" . DialogBox::getCurrentDialogBoxLevel()));
$dialog_update->displayFormURL()->modal();
$button_yes = new Button($this);
$button_yes->onClickJs($dialog_update->render())->setValue(__(UPDATE_FRAMEWORK_YES));
$button_no = new Button($this);
$button_no->onClickJs(DialogBox::closeAll())->setValue(__(UPDATE_FRAMEWORK_NO));
$table_yes_no = new Table();
$table_yes_no->addRowColumns($button_yes, " ", $button_no);
if ($_GET['update'] == "update-wsp") {
$warning_lbl = new Label(__(UPDATE_FRAMEWORK_WSP_WARNING));
$warning_lbl->setColor("red")->setItalic();
$this->render = new Object(__(UPDATE_FRAMEWORK_CONFIRM, $_GET['text']), "<br/><br/>", $warning_lbl, "<br/><br/>", $table_yes_no);
} else {
$this->render = new Object(__(UPDATE_FRAMEWORK_CONFIRM, $_GET['text']), "<br/><br/>", $table_yes_no);
}
$this->render->setAlign(Object::ALIGN_CENTER);
}
示例3: createAction
public function createAction()
{
$this->haveAccess();
$O_label = new Label();
$O_label->setLabel($_POST['label']);
$O_label->setModel($_POST['model']);
$O_label->setReference($_POST['reference']);
$O_label->setDescription($_POST['description']);
$O_label->setLifetime($_POST['lifetime']);
$O_label->setControlCycle($_POST['control_cycle']);
$O_label->setNotice($_POST['notice']);
$O_label->setProcedure($_POST['procedure']);
$O_label->setImage($_POST['image']);
$O_label->setSize($_POST['size']);
$O_label->setColor($_POST['color']);
$O_label->setCategoryEpiId($_POST['category_epi_id']);
$O_labelMapper = new LabelMapper();
$I_labelId = $O_labelMapper->insert($O_label);
die(header('Location:/label/paginate/1'));
}
示例4: 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));
}
}
}
示例5: Load
//.........这里部分代码省略.........
// if URL is detect as bad but can be redirect to good URL
if ($redirect_bad_url_to_http != "") {
$redirect_bad_url_to = str_replace(":/", "", str_replace("://", "", $redirect_bad_url_to_http)) . "://" . $redirect_bad_url_to;
}
$this->redirect($redirect_bad_url_to);
$msg_redirect = new Label(__(REDIRECT_URL_TO, $redirect_bad_url_to, $redirect_bad_url_to));
$this->render = new ErrorTemplate($msg_redirect, parent::$PAGE_TITLE);
} else {
// display the error page if the URL is correct
$error_msg_title = "";
$array_code_error = array(401, 403, 404, 500);
if (in_array($_GET['error-redirect'], $array_code_error)) {
$_SESSION['calling_page'] = "";
$error_msg = constant("ERROR_" . $_GET['error-redirect'] . "_MSG");
parent::$PAGE_TITLE = constant("ERROR_" . $_GET['error-redirect'] . "_MSG") . " - " . __(SITE_NAME);
$error_msg_title = constant("ERROR_" . $_GET['error-redirect'] . "_MSG");
} else {
if ($_SESSION['calling_page'] == "error-page") {
if (isset($_GET['error-redirect-url']) && $_GET['error-redirect-url'] != "") {
$error_msg = __(ERROR_PAGE_MSG, $_GET['error-redirect-url']);
} else {
if ($this->getRefererURL() != "") {
$error_msg = __(ERROR_PAGE_MSG, $this->getRefererURL());
} else {
$error_msg = __(ERROR_PAGE_MSG, "");
}
}
} else {
$error_msg = __(ERROR_PAGE_MSG, $_SESSION['calling_page']);
}
$error_msg_title = __(ERROR_PAGE);
}
$error_msg = new Label($error_msg, true);
$obj_error_msg = new Object(new Picture("wsp/img/warning.png", 48, 48, 0, "absmidlle"), "<br/>", $error_msg->setColor("red"));
$obj_error_msg->add("<br/><br/>", __(MAIN_PAGE_GO_BACK), new Link(BASE_URL, Link::TARGET_NONE, __(SITE_NAME)));
$this->render = new ErrorTemplate($obj_error_msg, $error_msg_title);
// check if URL is not banned
if (!isset($_GET['banned_url'])) {
if (file_exists(dirname(__FILE__) . "/../../wsp/config/banned_url.cnf")) {
$list_banned_url = file_get_contents(dirname(__FILE__) . "/../../wsp/config/banned_url.cnf");
$array_banned_url = explode("\n", str_replace("\r", "", $list_banned_url));
} else {
$array_banned_url = array();
}
if (find($this->getCurrentUrl(), $this->getBaseLanguageURL()) > 0) {
$url_without_base = str_replace($this->getBaseLanguageURL(), "", $this->getCurrentUrl());
} else {
$url_without_base = str_replace($this->getBaseURL(), "", $this->getCurrentUrl());
}
if (isset($_GET['error-redirect-url']) && $_GET['error-redirect-url'] != "") {
if (find($_GET['error-redirect-url'], $this->getBaseLanguageURL()) > 0) {
$url_without_base = str_replace($this->getBaseLanguageURL(), "", $_GET['error-redirect-url']);
} else {
$url_without_base = str_replace($this->getBaseURL(), "", $_GET['error-redirect-url']);
}
}
if ($url_without_base[0] != '/') {
$url_without_base = "/" . $url_without_base;
}
$url_without_base_array = split("\\?", $url_without_base);
$url_without_base = $url_without_base_array[0];
if (in_array(trim($url_without_base), $array_banned_url)) {
$_GET['banned_url'] = "true";
}
}
$nb_user_bad_url_access = 0;
示例6: setColor
/**
* Change axis and axis title color
*
* @param awColor $color
*/
public function setColor(awColor $color)
{
$this->color = $color;
$this->title->setColor($color);
}
示例7: 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));
}
}
示例8: setColor
/**
* Change axis and axis title color
*
* @param $color
*/
function setColor($color)
{
$this->color = $color;
$this->title->setColor($color);
}