function validate() { $ret = parent::validate(); if (!$ret) { // The form returned an error. We need to generate a new CSRF token, in any. $token = $this->getElement('token'); if (!empty($token) && !PEAR::isError($token)) { $token->setValue(phpAds_SessionGetToken()); } } return $ret; }
function __construct($formName = '', $method = 'POST', $action = '', $target = '', $attributes = null, $trackSubmit = true) { parent::__construct($formName, $method, $action, $target, $attributes, $trackSubmit); $this->id = $formName; $this->forceClientValidation = false; $this->hasRequiredFields = false; //register custom fields parent::registerElementType('html', MAX_PATH . '/lib/OA/Admin/UI/component/Html.php', 'OA_Admin_UI_Component_Html'); parent::registerElementType('controls', MAX_PATH . '/lib/OA/Admin/UI/component/FormControls.php', 'OA_Admin_UI_Component_FormControls'); parent::registerElementType('break', MAX_PATH . '/lib/OA/Admin/UI/component/FormBreak.php', 'OA_Admin_UI_Component_FormBreak'); parent::registerElementType('custom', MAX_PATH . '/lib/OA/Admin/UI/component/CustomFormElement.php', 'OA_Admin_UI_Component_CustomFormElement'); parent::registerElementType('plugin-custom', MAX_PATH . '/lib/OA/Admin/UI/component/CustomPluginFormElement.php', 'OA_Admin_UI_Component_CustomPluginFormElement'); parent::registerElementType('script', MAX_PATH . '/lib/OA/Admin/UI/component/ScriptFormElement.php', 'OA_Admin_UI_Component_ScriptFormElement'); parent::registerElementType('plugin-script', MAX_PATH . '/lib/OA/Admin/UI/component/PluginScriptFormElement.php', 'OA_Admin_UI_Component_PluginScriptFormElement'); //register additional rules $this->registerRule('wholenumber', 'regex', '/^\\d+$/'); $this->registerRule('wholenumber-', 'regex', '/^\\d+$|^\\-$/'); $this->registerRule('formattednumber', 'regex', '/^\\d+$|^\\d(,\\d{3})+$/'); $this->registerRule('decimal', 'regex', '/^([+-])?\\d+(\\.\\d+)?$/'); $this->registerRule('decimalplaces', 'rule', 'OA_Admin_UI_Rule_DecimalPlaces', MAX_PATH . '/lib/OA/Admin/UI/component/rule/DecimalPlaces.php'); $this->registerRule('min', 'rule', 'OA_Admin_UI_Rule_Min', MAX_PATH . '/lib/OA/Admin/UI/component/rule/Min.php'); $this->registerRule('max', 'rule', 'OA_Admin_UI_Rule_Max', MAX_PATH . '/lib/OA/Admin/UI/component/rule/Max.php'); $this->registerRule('unique', 'rule', 'OA_Admin_UI_Rule_Unique', MAX_PATH . '/lib/OA/Admin/UI/component/rule/Unique.php'); $this->registerRule('equal', 'rule', 'OA_Admin_UI_Rule_Equal', MAX_PATH . '/lib/OA/Admin/UI/component/rule/Equal.php'); //register jquery rule adaptors $this->registerJQueryRuleAdaptor('required', MAX_PATH . '/lib/OA/Admin/UI/component/rule/QuickFormRequiredRuleAdaptor.php', 'OA_Admin_UI_Rule_JQueryRequiredRule'); $this->registerJQueryRuleAdaptor('minlength', MAX_PATH . '/lib/OA/Admin/UI/component/rule/QuickFormMinLengthRuleAdaptor.php', 'OA_Admin_UI_Rule_JQueryMinLengthRule'); $this->registerJQueryRuleAdaptor('maxlength', MAX_PATH . '/lib/OA/Admin/UI/component/rule/QuickFormMaxLengthRuleAdaptor.php', 'OA_Admin_UI_Rule_JQueryMaxLengthRule'); $this->registerJQueryRuleAdaptor('email', MAX_PATH . '/lib/OA/Admin/UI/component/rule/QuickFormEmailRuleAdaptor.php', 'OA_Admin_UI_Rule_JQueryEmailRule'); $this->registerJQueryRuleAdaptor('numeric', MAX_PATH . '/lib/OA/Admin/UI/component/rule/QuickFormDigitsRuleAdaptor.php', 'OA_Admin_UI_Rule_JQueryDigitsRule'); $this->registerJQueryRuleAdaptor('nonzero', MAX_PATH . '/lib/OA/Admin/UI/component/rule/QuickFormNonZeroRuleAdaptor.php', 'OA_Admin_UI_Rule_JQueryNonZeroRule'); $this->registerJQueryRuleAdaptor('decimal', MAX_PATH . '/lib/OA/Admin/UI/component/rule/QuickFormNumberRuleAdaptor.php', 'OA_Admin_UI_Rule_JQueryNumberRule'); $this->registerJQueryRuleAdaptor('min', MAX_PATH . '/lib/OA/Admin/UI/component/rule/QuickFormMinRuleAdaptor.php', 'OA_Admin_UI_Rule_JQueryMinRule'); $this->registerJQueryRuleAdaptor('max', MAX_PATH . '/lib/OA/Admin/UI/component/rule/QuickFormMaxRuleAdaptor.php', 'OA_Admin_UI_Rule_JQueryMaxRule'); $this->registerJQueryRuleAdaptor('decimalplaces', MAX_PATH . '/lib/OA/Admin/UI/component/rule/QuickFormDecimalPlacesAdaptor.php', 'OA_Admin_UI_Rule_QuickFormDecimalPlacesAdaptor'); $this->registerJQueryRuleAdaptor("unique", MAX_PATH . '/lib/OA/Admin/UI/component/rule/QuickFormUniqueRuleAdaptor.php', 'OA_Admin_UI_Rule_JQueryUniqueRule'); $this->registerJQueryRuleAdaptor("equal", MAX_PATH . '/lib/OA/Admin/UI/component/rule/QuickFormEqualRuleAdaptor.php', 'OA_Admin_UI_Rule_JQueryEqualRule'); //register element decorators $this->registerElementDecorator('tag', MAX_PATH . '/lib/OA/Admin/UI/component/decorator/HTMLTagDecorator.php', 'OA_Admin_UI_HTMLTagDecorator'); $this->registerElementDecorator('process', MAX_PATH . '/lib/OA/Admin/UI/component/decorator/ProcessingDecorator.php', 'OA_Admin_UI_ProcessingDecorator'); //apply flat class $this->setAttribute("class", "flat"); //trim spaces from all data sent by the user $this->applyFilter('__ALL__', 'trim'); $this->addElement('hidden', 'token', phpAds_SessionGetToken()); $this->addRule('token', 'Invalid request token', 'callback', 'phpAds_SessionValidateToken'); }
echo " </td>"; echo "</tr>"; // Space echo "<tr height='20' valign='top' " . ($i % 2 == 0 ? "bgcolor='#F6F6F6'" : "") . ">"; echo "<td> </td>"; // Action $action = $strUserlog[$row['action']]; $action = str_replace('{id}', $row['object'], $action); echo "<td height='20' colspan='2'><img src='" . OX::assetPath() . "/images/spacer.gif' height='16' width='16' align='absmiddle'> " . $action . "</td>"; echo "</tr>"; $i++; } if ($doUserLog->getRowCount() > 0) { echo "<tr height='1'><td colspan='4' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td></tr>"; echo "<tr><td height='25' colspan='2'>"; echo "<img src='" . OX::assetPath() . "/images/icon-recycle.gif' border='0' align='absmiddle'> <a href='userlog-delete.php?token=" . urlencode(phpAds_SessionGetToken()) . "'>" . $strDeleteLog . "</a>"; echo "</td><td height='25' colspan='2' align='" . $phpAds_TextAlignRight . "'>"; if ($start > 0) { echo "<a href='userlog-maintenance.php?start=" . ($start - 1) . "'>"; echo "<img src='" . OX::assetPath() . "/images/arrow-l.gif' border='0' align='absmiddle'>" . $strPrevious . "</a>"; } if ($count > ($start + 1) * $limit) { if ($start > 0) { echo " | "; } echo "<a href='userlog-maintenance.php?start=" . ($start + 1) . "'>"; echo $strNext . "<img src='" . OX::assetPath() . "/images/arrow-r.gif' border='0' align='absmiddle'></a>"; } echo "</td></tr>"; } echo "</table>";
/** * CVE-2013-5954 * * Helper method to allow the the required session token to be placed * into GET method calls for CRUD operations in templates. See * OA_Permission::checkSessionToken() method for details. */ public static function _add_session_token() { return 'token=' . urlencode(phpAds_SessionGetToken()); }
// ID echo "\t\t\t\t\t<td height='25'>" . $agency['agencyid'] . "</td>\n"; echo "\t\t\t\t\t<td height='25'> </td>\n"; echo "\t\t\t\t\t<td height='25'> </td>\n"; // Button - Channels echo "<td height='25'>"; if (OA_Permission::hasAccess($agency['account_id'])) { echo "<a href='account-switch.php?account_id={$agency['account_id']}'>"; echo $strSwitchAccount . "</a> "; } else { echo " "; } echo "</td>"; // Delete echo "\t\t\t\t\t<td height='25'>"; echo "<img src='" . OX::assetPath() . "/images/icon-recycle.gif' border='0' align='absmiddle' alt='{$strDelete}'> <a href='agency-delete.php?token=" . urlencode(phpAds_SessionGetToken()) . "&agencyid=" . $agency['agencyid'] . "&returnurl=agency-index.php'" . phpAds_DelConfirm($strConfirmDeleteAgency) . ">{$strDelete}</a> "; echo "</td>\n"; echo "\t\t\t\t</tr>\n"; echo "\t\t\t\t<tr height='1'>\n"; echo "\t\t\t\t\t<td colspan='6' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td>\n"; echo "\t\t\t\t</tr>\n"; $i++; } } echo "\t\t\t\t<tr>\n"; echo "\t\t\t\t\t<td height='25' colspan='4' align='" . $phpAds_TextAlignLeft . "' nowrap>"; if ($hideinactive == true) { echo " <img src='" . OX::assetPath() . "/images/icon-activate.gif' align='absmiddle' border='0'>"; echo " <a href='agency-index.php?hideinactive=0'>" . $strShowAll . "</a>"; echo " | " . $strInactiveAgenciesHidden; } else {
} /*-------------------------------------------------------*/ /* HTML framework */ /*-------------------------------------------------------*/ phpAds_PageHeader("plugin-index", new OA_Admin_UI_Model_PageHeaderModel($GLOBALS['strPlugins']), '', false, true); /*-------------------------------------------------------*/ /* Main code */ /*-------------------------------------------------------*/ if (is_null($oTpl)) { if (array_key_exists('selection', $_REQUEST) && $_REQUEST['selection'] == 'groups') { $oTpl = new OA_Admin_Template('plugin-group-index-list.html'); $oTpl->assign('aWarnings', $oComponentGroupManager->aWarnings); $oTpl->assign('selected', 'groups'); $oTpl->assign('aPlugins', $oComponentGroupManager->getComponentGroupsList()); } else { $oTpl = new OA_Admin_Template('plugin-index.html'); $oTpl->assign('selected', 'plugins'); $oTpl->assign('aPackages', $oPluginManager->getPackagesList()); $oTpl->assign('aWarnings', $oPluginManager->aWarnings); $oTpl->assign('aErrors', $oPluginManager->aErrors); $oTpl->assign('aMessages', $oPluginManager->aMessages); } } // Determine if config file is writable $configLocked = !OA_Admin_Settings::isConfigWritable(); $image = $configLocked ? 'closed' : 'open'; $oTpl->assign('configLocked', $configLocked); $oTpl->assign('image', $image); $oTpl->assign('token', phpAds_SessionGetToken()); $oTpl->display(); phpAds_PageFooter();
function addChannelPageTools($agencyid, $websiteId, $channelid, $channelType) { if ($channelType == 'publisher') { $deleteReturlUrl = MAX::constructUrl(MAX_URL_ADMIN, 'affiliate-channels.php'); } else { $deleteReturlUrl = MAX::constructUrl(MAX_URL_ADMIN, 'channel-index.php'); } //duplicate addPageLinkTool($GLOBALS["strDuplicate"], MAX::constructUrl(MAX_URL_ADMIN, "channel-modify.php?duplicate=true&agencyid={$agencyid}&affiliateid={$websiteId}&channelid={$channelid}&returnurl=" . urlencode(basename($_SERVER['SCRIPT_NAME']))), "iconTargetingChannelDuplicate"); //delete $deleteConfirm = phpAds_DelConfirm($GLOBALS['strConfirmDeleteChannel']); addPageLinkTool($GLOBALS["strDelete"], MAX::constructUrl(MAX_URL_ADMIN, "channel-delete.php?token=" . urlencode(phpAds_SessionGetToken()) . "&agencyid={$agencyid}&affiliateid={$websiteId}&channelid={$channelid}&returnurl={$deleteReturlUrl}"), "iconDelete", null, $deleteConfirm); }
function phpAds_SessionValidateToken($token) { static $result; if (!isset($result)) { $result = $token === phpAds_SessionGetToken(); phpAds_SessionDataRegister('token', null); } return $result; }
static function uninstallPluginPackage($pkgName, $noDb = true) { $_POST['token'] = phpAds_SessionGetToken(); $oPkgMgr =& TestEnv::getPluginPackageManager($noDb); $result = $oPkgMgr->uninstallPackage($pkgName, true); /*if (!$result) { $errormsg = 'TestEnv unable to uninstall plugins in '.$pkgName; foreach ($oPkgMgr->aErrors AS $i => $msg) { $errormsg.= '</br>'.$msg; } PEAR::raiseError($errormsg, PEAR_LOG_WARNING); }*/ return true; }
/** * Build and display the settings or preferences user interface * * @param array $aData A multi-dimensional array outlining what to * display for a setting or preference page. * See pages for examples of layout. * @param array $aErrors An array of error messages to display to * within the form. * @param integer $disableSubmit * @param string $imgPath */ function show($aData, $aErrors = array(), $disableSubmit = 0, $imgPath = "") { $aConf = $GLOBALS['_MAX']['CONF']; $aPref = $GLOBALS['_MAX']['PREF_EXTRA']; // Initialize tabindex (if not already done) global $tabindex; if (!isset($tabindex)) { $tabindex = 1; } // Determine if config file is writable $configLocked = !OA_Admin_Settings::isConfigWritable(); $image = $configLocked ? 'closed' : 'open'; $dependbuffer = "function phpAds_refreshEnabled() {\n"; $checkbuffer = ''; $usertypebuffer = ''; $helpbuffer = ''; // Iterate over the array of elements to display $count = count($aData); for ($i = 0; $i < $count; $i++) { // Get the section of elements to display $aSection = $aData[$i]; // Are there any items in the section that can be displayed? $showBreak = false; $showSection = false; foreach ($aSection['items'] as $itemKey => $aItem) { // The item has been set to be displayed - however, if this is // a preference section, it may not end up being shown, so test for this if ($this->_optionType == 'account-preferences') { // Don't test break items if ($aItem['type'] != 'break') { // What is the state of the preference item? $result = $this->_hideOrDisablePreference($aPref[$aItem['name']]['account_type']); if ($result == '' || $result == 'disable') { // The preference item is to be shown, so display the section $showSection = true; break; } } } else { // The item is not for a preference section, so display the section $showSection = true; break; } } // Where there any items in the section that will be displayed? if ($showSection == false) { // No, go to the next section continue; } // This section has been set to be displayed, so show its contents! if (isset($aErrors[$i])) { // Show the section header with the section error $this->_showStartSection($aSection['text'], $aErrors[$i], $disableSubmit, $imgPath); $showBreak = true; } else { // Show the section header $this->_showStartSection($aSection['text'], NULL, $disableSubmit, $imgPath); } $sectionHasRequiredField = false; foreach ($aSection['items'] as $aItem) { // Test to see if the item is a preference item, and if it needs to be hidden from the account in use if ($this->_optionType == 'account-preferences' || $this->_optionType == 'account-user') { $result = $this->_hideOrDisablePreference($aPref[$aItem['name']]['account_type']); if ($result == 'hide') { $aItem['visible'] = false; } } // Only display visible items if (!isset($aItem['visible']) || $aItem['visible']) { // Test to see if the item is a settings item, and if it needs to be disabled if ($this->_optionType == 'account-settings') { if (!$aItem['disabled']) { $aItem['disabled'] = $this->_disabledValue($aItem); if (!$aItem['disabled']) { $showBreak = true; } } } // Test to see if the item is a preference item, and if it needs to be disabled from the account in use if ($this->_optionType == 'account-preferences' || $this->_optionType == 'account-user') { $result = $this->_hideOrDisablePreference($aPref[$aItem['name']]['account_type']); if ($result == 'disable') { $aItem['disabled'] = true; $showBreak = false; } } // Update the JavaScript used to enable/disabled option items if (($this->_optionType == 'account-preferences' || $this->_optionType == 'account-preferences-user') && $aItem['type'] == 'statscolumns') { // The statscolumns data type needs to have some conversion work done to match // the more simple data structure used by other option items foreach ($aItem['rows'] as $aSubItem) { // Create two fake items for the label and rank $aLabelItem = array('name' => $aSubItem['name'] . '_label', 'depends' => $aSubItem['name'] . '==true'); $aRankItem = array('name' => $aSubItem['name'] . '_rank', 'depends' => $aSubItem['name'] . '==true', 'check' => 'wholeNumber'); $checkbuffer .= "max_formSetRequirements('" . $aSubItem['name'] . '_rank' . "', '" . addslashes($aSubItem['text']) . "', false, 'wholeNumber');\n"; // Add the fake item dependencies $dependbuffer .= $this->_showCheckDependancies($aData, $aLabelItem); $dependbuffer .= $this->_showCheckDependancies($aData, $aRankItem); } } else { if (!$aItem['disabled']) { $dependbuffer .= $this->_showCheckDependancies($aData, $aItem); } } // Display the option item if (count($aErrors)) { // Page is the result of an error message, get values from the input, // not from the settings configuration file or preferences in the database $value = ''; if (isset($aItem['name'])) { MAX_commonRegisterGlobalsArray(array($aItem['name'])); if (isset($GLOBALS[$aItem['name']])) { $value = stripslashes($GLOBALS[$aItem['name']]); if ($aErrors[0] != MAX_ERROR_YOU_HAVE_NO_TRACKERS && $aErrors[0] != MAX_ERROR_YOU_HAVE_NO_CAMPAIGNS) { if (isset($GLOBALS[$aItem['name'] . '_defVal'])) { $value = $GLOBALS[$aItem['name'] . '_defVal']; } } } } if ($aItem[type] != 'break') { $showBreak = true; } } else { // The page had no error, so, get the value for the item from an appropriate source unset($value); if (isset($aItem['name'])) { // Try to load the item value from the globals array if (isset($GLOBALS[$aItem['name'] . '_defVal'])) { $value = $GLOBALS[$aItem['name'] . '_defVal']; } // If that did not work, and the item is a setting, try to load the // item value from the settings configuration file if (is_null($value) && $this->_optionType == 'account-settings') { $aNameExploded = explode('_', $aItem['name'], 2); $aSettingSection = isset($aNameExploded[0]) ? $aNameExploded[0] : null; $aSettingKey = isset($aNameExploded[1]) ? $aNameExploded[1] : null; if (isset($aConf[$aSettingSection][$aSettingKey])) { // Load the configuration .php file value $value = $aConf[$aSettingSection][$aSettingKey]; } elseif (isset($aConf[$aItem['name']][0])) { // The value in the settings configuration file is an array, // so re-constitute into a comma separated list $value = implode(', ', $aConf[$aItem['name']]); } } // toggle the checkbox if a local db socket is being used if ($aSettingSection == 'database' && $aItem['name'] == 'database_localsocket') { $value = $aConf[$aSettingSection]['protocol'] == 'unix' ? true : false; } // toggle the checkbox if checkForUpdates (sync section) is disabled if ($aSettingSection == 'ui' && $aItem['name'] == 'ui_dashboardEnabled') { if (isset($aConf['sync']['checkForUpdates']) && $aConf['sync']['checkForUpdates'] == true) { $value = $aConf[$aSettingSection][$aSettingKey]; } else { $value = false; } } // If that did not work, and the item is a preference, try to load the // item value from the preferences values in the database if (is_null($value) && $this->_optionType == 'account-preferences') { // Deal with statistics column values separately if ($aItem['type'] == 'statscolumns') { foreach ($aItem['rows'] as $key => $aRow) { if (isset($aPref[$aRow['name']]['value'])) { $value[$aRow['name']]['base'] = $aPref[$aRow['name']]['value']; } if (isset($aPref[$aRow['name'] . '_label']['value'])) { $value[$aRow['name']]['label'] = $aPref[$aRow['name'] . '_label']['value']; } if (isset($aPref[$aRow['name'] . '_rank']['value'])) { $value[$aRow['name']]['rank'] = $aPref[$aRow['name'] . '_rank']['value']; } } } else { if (isset($aPref[$aItem['name']]['value'])) { $value = $aPref[$aItem['name']]['value']; } } } // If that did not work, try to load the value from the $aItem array itself if (is_null($value)) { if (isset($aItem['value'])) { $value = $aItem['value']; } } // If that did not work, set to an empty string if (is_null($value)) { $value = ''; } } if (!empty($value) && isset($aItem['preg_split']) && isset($aItem['merge'])) { $aValues = preg_split($aItem['preg_split'], $value); $value = implode($aItem['merge'], $aValues); } if ($aItem[type] != 'break') { $showBreak = true; } } // Display the item! switch ($aItem['type']) { case 'plaintext': $this->_showPlainText($aItem); break; case 'break': if ($showBreak) { $this->_showBreak($aItem, $imgPath); $showBreak = false; } break; case 'checkbox': $this->_showCheckbox($aItem, $value); break; case 'text': $this->_showText($aItem, $value); break; case 'url': $this->_showUrl($aItem, $value); break; case 'urln': $this->_showUrl($aItem, $value, 'n'); break; case 'urls': $this->_showUrl($aItem, $value, 's'); break; case 'textarea': $this->_showTextarea($aItem, $value); break; case 'password': $this->_showPassword($aItem, $value); break; case 'select': $this->_showSelect($aItem, $value, $disableSubmit); break; case 'statscolumns': $this->_showStatsColumns($aItem, $value); break; case 'hiddenfield': $this->_showHiddenField($aItem, $value); break; case 'hiddencheckbox': $this->_showHiddenCheckbox($aItem, $value); break; } // ??? if (isset($aItem['req'])) { $sectionHasRequiredField = true; } if (isset($aItem['check']) || isset($aItem['req'])) { if (!isset($aItem['check'])) { $aItem['check'] = ''; } if (!isset($aItem['req'])) { $aItem['req'] = false; } $checkbuffer .= "max_formSetRequirements('" . $aItem['name'] . "', '" . addslashes($aItem['text']) . "', " . ($aItem['req'] ? 'true' : 'false') . ", '" . $aItem['check'] . "');\n"; if (isset($aItem['unique'])) { $checkbuffer .= "max_formSetUnique('" . $aItem['name'] . "', '|" . addslashes(implode('|', $aItem['unique'])) . "|');\n"; } } if (isset($aItem['name'])) { $helpbuffer .= $this->_help($aItem['name']); } } } $this->_showEndSection($sectionHasRequiredField); } $this->_showHiddenField(array('name' => 'token', 'value' => phpAds_SessionGetToken()), ''); if (RV_INSTALLATION_STATUS == RV_INSTALLATION_STATUS_INSTALLED) { if ($disableSubmit != 0) { $max_file_size = $this->_display_to_bytes(ini_get('upload_max_filesize')); $max_post_size = $this->_display_to_bytes(ini_get('post_max_size')); if ($max_post_size > 0 && $max_post_size < $max_file_size) { $max_file_size = $max_post_size; } $this->oTpl->assign('max_file_size', $max_file_size); $this->oTpl->assign('max_post_size', $max_post_size); } } $this->oTpl->assign('this', $this); $this->oTpl->assign('aOption', $this->aOption); $this->oTpl->assign('configLocked', $configLocked); $this->oTpl->assign('image', $image); $this->oTpl->assign('formUrl', $_SERVER['SCRIPT_NAME']); $this->oTpl->assign('checkbuffer', $checkbuffer); $this->oTpl->assign('dependbuffer', $dependbuffer); $this->oTpl->assign('disableSubmit', $disableSubmit); $this->oTpl->assign('usertypebuffer', $usertypebuffer); $this->oTpl->assign('tabindex', $tabindex); $this->oTpl->assign('section', $aSettingSection); $this->oTpl->assign('optionType', $this->_optionType); $this->oTpl->assign('adminUser', OA_Permission::isAccount(OA_ACCOUNT_ADMIN)); $this->oTpl->assign('oxInstalled', RV_INSTALLATION_STATUS == RV_INSTALLATION_STATUS_INSTALLED); $this->oTpl->display(); }
/** * Returns hidden fields used in pages entity-user * * TODO - refactor this and move as class variables * * @param string $entityName * @param integer $entityId */ function _getHiddenFields($userData, $link, $entities = array()) { $hiddenFields = array(array('name' => 'submit', 'value' => true), array('name' => 'login', 'value' => $userData['username']), array('name' => 'link', 'value' => $link), array('name' => 'token', 'value' => phpAds_SessionGetToken())); $fields = array('userid', 'email_address'); foreach ($fields as $field) { if (!empty($userData[$field])) { $hiddenFields[] = array('name' => $field, 'value' => $userData[$field]); } } foreach ($entities as $entityName => $entityId) { $hiddenFields[] = array('name' => $entityName, 'value' => $entityId); } return $hiddenFields; }