function showLoggedIn() { echo "\n <table WIDTH='125' border='0' cellspacing='0' cellpadding='0' "; if ($this->XPOS >= 0 && $this->YPOS >= 0) { echo "style=\" background-repeat:repeat;background-image:url(pics/halftransparent.png);background-position: 0px 0px; position:absolute; top:" . $this->YPOS . "px; left:" . $this->XPOS . "px; \" "; } echo "\t >\n <tr>\n <td colspan='2' class='userstatus'> \n <font size='1'>\n\t\t\t<b>Sie sind angemeldet als:</b>\n </font>\n </td>\n </tr>\n <tr>\n <td WIDTH='40' class='userstatus'> \n <font size='1'>\n\t\t NAME:\n\t </font>\n </td>\n <td class='userstatus'> \n <font size='1'>\n\t\t\t <b>" . $this->USER->VORNAME . " " . $this->USER->NACHNAME . "</b><br> \n\t </font>\n </td>\n </tr>\n <tr>\n <td class='userstatus'> \n <font size='1'>\n\t\t STATUS:\n </font>\n </td>\n <td class='userstatus'> \n <font size='1'>\n\t\t\t <b>" . $this->USER->STATUS . "</b><br> \n </font>\n </td>\n </tr>\n <tr>\n <td colspan='2' class='userstatus'> "; $changeUserLink = new Link("index.php?run=changeMyProfile"); $changeUserLink->setText("Profil bearbeiten"); $changeUserLink->show(); echo "<br>"; $logoutLink = new Link("index.php?do=logout"); $logoutLink->setText("Abmelden"); $logoutLink->show(); echo "\n </td>\n </tr>\n </table>\n "; }
function getPicture() { $picHeight = $this->IMAGEHEIGHT; if ($picHeight <= 0) { $picHeight = 300; } $linkStartPos = strlen($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME'])); if (strlen(dirname($_SERVER['SCRIPT_NAME'])) <= 1) { $linkStartPos = $linkStartPos - 1; } $img = new Image(substr($this->PICS[$this->CURRENT_PICTURE], strlen($_SERVER['DOCUMENT_ROOT']) . dirname($_SERVER['SCRIPT_NAME'])), -1, -1, 0, $picHeight, 0); $img->setCommentsActive(true); $lnk = new Link(substr($this->PICS[$this->CURRENT_PICTURE], $linkStartPos), $img, false, $this->CURRENT_PICTURE, "newPic"); $lnk->show(); // Navigation $form = new Form($this->PARENT_PAGE); $aStr = ""; if ($this->LINKPREFIX != "" && strpos($this->LINKPREFIX, "=") > 0) { $this->LINKPREFIX = ereg_replace("&", "", $this->LINKPREFIX); $aStr = split("=", $this->LINKPREFIX); } $hiddenPath = new HiddenField("Current_BB_Path", substr($this->PATH, strlen($_SERVER['DOCUMENT_ROOT']))); $hiddenPage = new HiddenField("changeBbPage", $this->CURRENT_PAGE); $hiddenPic = new HiddenField("showPic", $this->CURRENT_PICTURE); $hiddenPref = new HiddenField($aStr[0], $aStr[1]); $form->add($hiddenPath); $form->add($hiddenPage); $form->add($hiddenPic); $form->add($hiddenPref); $btnNext = new Button("BB_Change_To_Next_Picture", "Nächstes Bild"); $btnPrev = new Button("BB_Change_To_Prev_Picture", "Voriges Bild"); $btnBackToList = new Button("BB_BackToList", "Zurück zur Übersicht"); $spacer = new Text("<br>"); $spacer->setFilter(false); $form->add($spacer); $form->add($btnPrev); $form->add($btnBackToList); $form->add($btnNext); return $form; }
/** * Zeigt das gesamte DIV an */ function show() { echo "<div "; if ($this->XPOS > 0 || $this->YPOS > 0) { $tmp = ":absolute; "; if ($this->YPOS > 0) { $tmp .= " top:" . $this->YPOS . "px; "; } if ($this->XPOS > 0) { $tmp .= " left:" . $this->XPOS . "px; "; } $this->setStyle("position", $tmp); } $this->getToolTipTag(); $this->showStyles(); echo " > "; if ($this->KOPFTEXT_NEED) { /* * Bei berechtigung, Kopftext bearbeiten. */ if ($_SESSION['config']->CURRENTUSER->STATUS == "admin" || $_SESSION['config']->CURRENTUSER->STATUS == "user") { if (isset($_REQUEST['changeHeadInfo']) && strlen($_REQUEST['changeHeadInfo']) > 5) { $ktRl = substr($_REQUEST['changeHeadInfo'], 5); $dbtbl = new DbTable($_SESSION['config']->DBCONNECT, "kopftexte", array("text"), "", "", "", "runlink = '" . $ktRl . "' "); if ($dbtbl->getRowCount() == 0) { $dbtblInsert = new DbTable($_SESSION['config']->DBCONNECT, "kopftexte", array("runlink", "parent", "text"), "", "", "", "runlink = '" . $ktRl . "' "); $dbtblInsert->insertRowByArray(array($ktRl, null, "")); $dbtbl->refresh(); } if (isset($_REQUEST['DbTableUpdate' . $dbtbl->TABLENAME]) && $_REQUEST['DbTableUpdate' . $dbtbl->TABLENAME] == "Speichern") { $dbtbl->doUpdate(); } $frm = $dbtbl->getUpdateAllMask(); $frm->add(new Hiddenfield("changeHeadInfo", $_REQUEST['changeHeadInfo'])); $frm->show(); } else { $sp = new Spacer(5); $sp->show(); $txKtb = new Text("Kopftext bearbeiten<br>"); $txKtb->setFilter(false); $lnk = new Link("?changeHeadInfo=Cnge-" . $_SESSION['runLink'], $txKtb); $lnk->show(); } } $tx = new Text(getKopfText()); $tx->setFilter(false); $tx->show(); } if ($this->getObjectCount() > 0) { foreach ($this->OBJECTS as $obj) { $obj->show(); } } //-------------- include $this->FILE; //-------------- echo "</div>"; }
/** * * Render a login box * * @param string $module The module we are in or will go to * @param boolean $ajaxLogin Whether or not to do ajax login * @return string The login box * @access public * */ public function renderLoginBox($module = NULL, $ajaxLogin = FALSE) { try { // Determine if we need to use https $useHTTPS = $this->objSysConfig->getValue('MOD_SECURITY_HTTPS', 'security'); // Set the formaction depending on whether it is going to use ajax or not. if (!$ajaxLogin) { // Set the action for the login form depending on if there is a module or not. if ($module != NULL) { $formAction = $this->uri(array('action' => 'login', 'mod' => $module), 'security'); } else { $formAction = $this->uri(array('action' => 'login'), 'login'); } if ($useHTTPS == '1' || $useHTTPS == 'TRUE') { $formAction = str_replace("http:", "https:", $formAction); } } else { // We want an ajax login. $formAction = 'javascript:void(0);'; } // Create a Form object. $objForm = new form('loginform', $formAction); $objFields = new fieldset(); $objFields->setLegend(' '); //--Create an element for the username $objInput = new textinput('username', '', 'text', '15'); $objInput->extra = 'maxlength="255"'; $objInput->setCss('required minlength(2)'); $objLabel = new label($this->objLanguage->languageText('word_username') . ': ', 'input_username'); //Add the username box to the form $objFields->addContent($objLabel->show() . '<br />'); $objFields->addContent($objInput->show() . '<br />'); //--- Create an element for the password $objInput = new textinput('password', '', 'password', '15'); $objInput->extra = 'maxlength="255"'; $objInput->setCss('required'); $objLabel = new label($this->objLanguage->languageText('word_password') . ': ', 'input_password'); $objFields->addContent($objLabel->show() . '<br />'); $objFields->addContent($objInput->show()); //--- Create an element for the network login radio $objElement = new checkbox("useLdap"); $objElement->setCSS("transparentbgnb"); $objElement->label = $this->objLanguage->languageText("phrase_networkid") . ' '; $ldap = ''; $objSysConfig = $this->getObject('dbsysconfig', 'sysconfig'); $showLDAPCheckBox = $objSysConfig->getValue('show_ldap_checkbox', 'security'); // Get a nonce $objNonce = $this->getObject('nonce', 'login'); $nonce = $objNonce->storeNonce(); // Create a hidden field for the nonce $objNonce = new hiddeninput('nonce', $nonce); $objNonce->extra = ' id=\'nonce\''; $nonce = $objNonce->show(); //----------------------------------------------------------------------------------------Checking this is a violation of the principle of chain of responsiblity @todo fix it if ($this->objConfig->getuseLDAP() && $showLDAPCheckBox == 'true') { $ldap .= $objElement->label . ' ' . $objElement->show(); } //--- Create an element for the remember me checkbox $objRElement = new checkbox("remember"); $objRElement->setCSS("transparentbgnb noborder"); $objRElement->label = $this->objLanguage->languageText("phrase_rememberme", "security"); $rem = $objRElement->show() . "<br />"; //--- Create a submit button $objButton = new button('submit', $this->objLanguage->languageText("word_login")); // Add the login icon $objButton->setIconClass("user"); // Set the button type to submit $objButton->setToSubmit(); // Give the button an ID for jQuery to grab. $objButton->setId('loginButton'); // Add the button to the form ----------------------------------------------------------- Note LDAP breaks the COR pattern $objFields->addContent($ldap . '<br />' . $nonce . $rem . "<div class='loginbuttonwrap'>" . $objButton->show() . '</div>'); $helpText = strtoupper($this->objLanguage->languageText('word_help', 'system')); $helpIcon = $this->objHelp->show('register', 'useradmin', $helpText); $resetLink = new Link($this->uri(array('action' => 'needpassword'), 'security')); $resetLink->link = $this->objLanguage->languageText('mod_security_forgotpassword'); // the help link $p = '<br/>' . $resetLink->show() . '<br />' . $helpIcon; $objFields->addContent($p); $objForm->addToForm($objFields->show()); return '<div id="login_block_wrapper">' . $objForm->show() . '</div>'; } catch (Exception $e) { customException::cleanUp(); } }
/** * Method to render a login box * @returns string */ public function renderLoginBox($module = NULL) { try { //set the action for the login form if ($module != NULL) { $formAction = $this->objEngine->uri(array('action' => 'login', 'mod' => $module), 'security'); } else { $formAction = $this->objEngine->uri(array('action' => 'login'), 'security'); } $useHTTPS = $this->objSysConfig->getValue('MOD_SECURITY_HTTPS', 'security'); if ($useHTTPS == '1') { $formAction = str_replace("http:", "https:", $formAction); } //Load up the various HTML classes $this->loadClass('button', 'htmlelements'); $this->loadClass('textinput', 'htmlelements'); $this->loadClass('checkbox', 'htmlelements'); $this->loadClass('link', 'htmlelements'); $this->loadClass('label', 'htmlelements'); $this->loadClass('fieldset', 'htmlelements'); $objBox = $this->newObject('alertbox', 'htmlelements'); $objIcon = $this->getObject('geticon', 'htmlelements'); // prepare the link for the oAuth providers $box = $this->oauthDisp(); $fb = $this->fbButton(); //fbConnect(); // Create a Form object $objForm = new form('loginform', $formAction); $objFields = new fieldset(); $objFields->setLegend(' '); //--Create an element for the username $objInput = new textinput('username', '', 'text', '15'); $objInput->extra = 'maxlength="255" placeholder="' . $this->objLanguage->languageText('word_username', 'system') . '"'; $objLabel = new label($this->objLanguage->languageText('word_username') . ': ', 'input_username'); //Add validation for username $objForm->addRule('username', $this->objLanguage->languageText("mod_login_unrequired", 'security', 'Please enter a username. A username is required in order to login.'), 'required'); //Add the username box to the form $this->objIcon->setIcon('user'); $objFields->addContent($this->objIcon->show()); $objFields->addContent($objInput->show() . '<br />'); //$objForm->addToForm(); //--- Create an element for the password $objInput = new textinput('password', '', 'password', '15'); $objInput->extra = 'maxlength="255" placeholder="' . $this->objLanguage->languageText('word_password', 'system') . '"'; $objLabel = new label($this->objLanguage->languageText('word_password') . ': ', 'input_password'); //Add the password box to the form //$objForm->addToForm(); $this->objIcon->setIcon('key'); $objFields->addContent($this->objIcon->show()); // $objFields->addContent($objLabel->show() . '<br />'); $objFields->addContent($objInput->show()); //--- Create an element for the network login radio $objElement = new checkbox("useLdap"); $objElement->setCSS("transparentbgnb"); $objElement->label = $this->objLanguage->languageText("phrase_networkid") . ' '; $ldap = ''; $objSysConfig = $this->getObject('dbsysconfig', 'sysconfig'); $showLDAPCheckBox = $objSysConfig->getValue('show_ldap_checkbox', 'security'); if ($this->objConfig->getuseLDAP() && $showLDAPCheckBox == 'true') { $ldap .= $objElement->label . ' ' . $objElement->show(); } //--- Create an element for the remember me checkbox $objRElement = new checkbox("remember"); $objRElement->setCSS("transparentbgnb noborder"); $objRElement->label = $this->objLanguage->languageText("phrase_rememberme", "security"); $rem = $objRElement->show() . "<br />"; //--- Create a submit button $objButton = new button('submit', $this->objLanguage->languageText("word_login")); // Add the login icon $objButton->setIconClass("user"); // Set the button type to submit $objButton->setToSubmit(); // Add the button to the form // openid / google /yahoo login // Open ID login code. $showOpenIdLogin = $objSysConfig->getValue('show_openidconnect_auth', 'security'); $openidlink = ""; if ($showOpenIdLogin == 'true') { // OpenId auth page is used for Google and Yahoo $objAltConfig = $this->getObject('altconfig', 'config'); $siteRoot = $objAltConfig->getSiteRoot(); $OPENID_AUTH_PAGE = $this->uri(array("action" => "openidconnect"), "security"); // Google icon $gIcon = $this->newObject('geticon', 'htmlelements'); $gIcon->setIcon('google'); $gIcon->alt = "Google ID"; $gIcon->extra = ' name="but_google" id="but_google2" onload="" '; // Facebook icon $fIcon = $this->newObject('geticon', 'htmlelements'); $fIcon->setIcon('facebook'); $fIcon->alt = "FB ID"; $fIcon->extra = ' name="but_fb" id="but_fb" onload="" '; $FB_AUTH_PAGE = $this->uri(array("action" => "initfacebooklogin", 'auth_site' => 'facebook'), "security"); // Yahoo icon $yIcon = $this->newObject('geticon', 'htmlelements'); $yIcon->setIcon('yahoo'); $yIcon->alt = "Yahoo ID"; $yIcon->extra = ' name="but_yahoo" id="but_yahoo" onload="" '; //Twitter icon $tIcon = $this->newObject('geticon', 'htmlelements'); $tIcon->setIcon('twitter', 'png'); $tIcon->alt = "TWITTER ID"; $tIcon->extra = ' name="but_twitter" id="but_twitter" onload="" '; $TWITTER_AUTH_PAGE = $this->uri(array("action" => "dotwitterlogin", 'auth_site' => 'twitter'), "security"); $TWITTER_AUTH_PAGE = str_replace("&", "&", $TWITTER_AUTH_PAGE); $openidloginlink = new link($this->uri(array("action" => "openidconnect"), "security")); $openidloginlink->link = '<h3>' . $this->objLanguage->languageText('mod_security_oauthheading', 'security') . '</h3>'; $sitePath = $objAltConfig->getSitePath(); // A google login icon linked to OpenID login with gooogle id. $googleTD = '<a href="' . $OPENID_AUTH_PAGE . '&auth_site=google" target="_top">' . $gIcon->show() . '</a>'; // A Yahoo login icon linked to OpenId login with Yahoo ID. $yahooTD = '<a href="' . $OPENID_AUTH_PAGE . '&auth_site=yahoo" target="_top">' . $yIcon->show() . '</a>'; // Facebook login icon with link to login page. $fbTD = '<a href="' . $FB_AUTH_PAGE . '" target="_top">' . $fIcon->show() . '</a>'; // Twitter login icon with link to login page. $twitterTD = '<a href="' . $TWITTER_AUTH_PAGE . '" target="_top">' . $tIcon->show() . '</a>'; //$twitterTD = NULL; <--- uncomment for commit until TWITTER AUTH is fixed // Explanation text for the textbox and Choose button $explainBox = '<div class="oid_explain">' . $this->objLanguage->languageText('mod_security_openidexplainbox', 'security') . '</div>'; // Title for the fieldset. $title = '<h3>' . $this->objLanguage->languageText('mod_security_openidlogintitle', 'security') . '</h3>'; $allowOpenIdForm = FALSE; if ($allowOpenIdForm) { // Allow login via any Open ID url, use mainly for testing. $openIdForm = new form('openlogiidnform', $this->uri(array("action" => "openidconnect", "auth_site" => "openid"))); $objInput = new textinput('openIDField', '', 'text', '30'); $objInput->extra = 'maxlength="255"'; $openIdForm->addToForm($explainBox . $objInput->show()); // The login via provided open ID URL button $openIdButton = new button('submit', $this->objLanguage->languageText("mod_security_openidlogin", 'security')); // Add the login icon $openIdButton->setIconClass("user"); // Set the button type to submit $openIdButton->setToSubmit(); $openIdForm->addToForm($openIdButton->show()); $opForm = '<hr/><br/>' . $openIdForm->show(); } else { $opForm = NULL; } $openIdFields = new fieldset(); $openIdFields->setLegend('<h3>' . $title . '</h3>'); $openIdFields->addContent($this->objLanguage->languageText('mod_security_oidliinstr', 'security', 'Login with one of the accounts indicated by the icons below')); $openIdFields->addContent('<hr>'); $openIdFields->addContent($fbTD . ' ' . $twitterTD . ' ' . $googleTD . ' ' . $yahooTD . ' ' . $opForm); $openidlink = '<div class="openidlogin">' . $openIdFields->show() . "</div>"; } $objFields->addContent($ldap . '<br />' . $rem . $box . "<div class='loginbuttonwrap'>" . $objButton->show() . '</div>' . $fb); $notice = $this->objLanguage->languageText('mod_security_forgotpassword'); $helpText = strtoupper($this->objLanguage->languageText('mod_security_helpmelogin', 'security', 'Yes, please help me to login')); $resetLink = new Link($this->uri(array('action' => 'needpassword'), 'security')); $resetLink->link = $helpText; // the help link $p = '<br />' . $notice . '<br/>' . $resetLink->show() . '<br />'; $objFields->addContent($p); $objForm->addToForm($objFields->show()); return $objForm->show() . $openidlink; } catch (Exception $e) { customException::cleanUp(); } }
$rMods[] = $module['module_id']; } $alink = new link(); if ($modules) { //asort($modules); natcasesort($modules); $count % 2 == 0 ? $oddOrEven = 'even' : ($oddOrEven = 'odd'); $objTable->addHeader($head, 'heading', 'align="left"'); $objTable->row_attributes = " onmouseover=\"this.className='tbl_ruler';\" onmouseout=\"this.className='" . $oddOrEven . "'; \""; $batchuninstall = $this->getParm('uninstall'); if ($batchuninstall) { $actiontotake = 'batchuninstall'; $batchButton = new Link($this->uri(array('cat' => $activeCat), 'modulecatalogue')); $batchButton->link = $this->objLanguage->languageText('mod_modulecatalogue_batchinstall', 'modulecatalogue'); $batchButton->extra = "class='pseudobutton'"; $batchChange = $batchButton->show(); $batchButton = new button('formsub'); $batchButton->setIconClass("wrench"); $batchButton->setValue($this->objLanguage->languageText('mod_modulecatalogue_uninstallselected', 'modulecatalogue')); $batchButton->extra = ' onclick="if(confirm(\'' . $this->objLanguage->languageText('mod_modulecatalogue_confirmbatchuninst', 'modulecatalogue') . '\')) {document.getElementById(\'form_batchform\').submit();}"'; $batchAction = $batchButton->show(); } else { $actiontotake = 'batchinstall'; $batchButton =& new Link($this->uri(array('cat' => $activeCat, 'uninstall' => '1'), 'modulecatalogue')); $batchButton->link = $this->objLanguage->languageText('mod_modulecatalogue_batchuninstall', 'modulecatalogue'); $batchButton->extra = "class='pseudobutton'"; $batchChange = $batchButton->show(); $batchButton =& new button('formsub'); $batchButton->setIconClass("wrench"); $batchButton->setValue($this->objLanguage->languageText('mod_modulecatalogue_installselected', 'modulecatalogue'));
/** * Zeigt den Button an. */ function show() { echo "<table "; $w = $this->WIDTH; if ($this->WIDTH < 2 * $this->MENUBUTTONLEFTWIDTH) { $w = 80 + 2 * $this->MENUBUTTONLEFTWIDTH; } echo " WIDTH='" . $w . "' "; if ($this->HEIGHT > 0) { echo " HEIGHT='" . $this->HEIGHT . "' "; } //Border, Padding und Spacing muss wegen bg hier fix auf null stehen echo " cellPADDING='0' cellSPACING='0' border='0'>"; if ($this->TEXT == $_SESSION['MENU_PARENT'] || $this->TEXT == $this->getLabelByRunlink($_SESSION['runLink'], $_SESSION['MENU_PARENT'])) { $this->TEXT = "<font color='" . $_SESSION['config']->COLORS['hover'] . "' >" . $this->TEXT . "</font>"; } $lnk = $this->LINK; if (strlen($row['parent']) > 0 && !strpos($lnk, "menuParent")) { $lnk .= "&menuParent=" . $row['parent']; } $l = new Link($lnk, $this->TEXT); echo "<tr height='" . $this->MENUBUTTONHEIGHT . "' >\r\n\t\t <th background='pics/menubutton/" . $this->MENUBUTTONSTYLE . "_title_01.png' width='" . $this->MENUBUTTONLEFTWIDTH . "'>\r\n\t </th>\r\n\t <th background='pics/menubutton/" . $this->MENUBUTTONSTYLE . "_title_02.png' WIDTH='" . ($this->WIDTH - 2 * $this->MENUBUTTONRIGHTWIDTH) . "' >\r\n\t "; $l->show(); echo "</th>\r\n\t\t </th>\r\n\t <th background='pics/menubutton/" . $this->MENUBUTTONSTYLE . "_title_03.png' width='" . $this->MENUBUTTONRIGHTWIDTH . "'>\r\n\t </th>\r\n </tr>\r\n </table>\r\n "; }