Ejemplo n.º 1
0
 if ($_REQUEST['config'] == 10) {
     if (isset($_REQUEST["form"])) {
         $frmRegExp = new CForm('config.php', 'post');
         $frmRegExp->setName(S_REGULAR_EXPRESSION);
         $frmRegExp->addVar('form', get_request('form', 1));
         $from_rfr = get_request('form_refresh', 0);
         $frmRegExp->addVar('form_refresh', $from_rfr + 1);
         $frmRegExp->addVar('config', get_request('config', 10));
         if (isset($_REQUEST['regexpid'])) {
             $frmRegExp->addVar('regexpid', $_REQUEST['regexpid']);
         }
         $left_tab = new CTable();
         $left_tab->setCellPadding(3);
         $left_tab->setCellSpacing(3);
         $left_tab->addOption('border', 0);
         $left_tab->addRow(create_hat(S_REGULAR_EXPRESSION, get_regexp_form(), null, 'hat_regexp', get_profile('web.config.hats.hat_regexp.state', 1)));
         $right_tab = new CTable();
         $right_tab->setCellPadding(3);
         $right_tab->setCellSpacing(3);
         $right_tab->addOption('border', 0);
         $right_tab->addRow(create_hat(S_EXPRESSIONS, get_expressions_tab(), null, 'hat_expressions', get_profile('web.config.hats.hat_expressions.state', 1)));
         if (isset($_REQUEST['new_expression'])) {
             $right_tab->addRow(create_hat(S_NEW_EXPRESSION, get_expression_form(), null, 'hat_new_expression', get_profile('web.config.hats.hat_new_expression.state', 1)));
         }
         $td_l = new CCol($left_tab);
         $td_l->AddOption('valign', 'top');
         $td_r = new CCol($right_tab);
         $td_r->AddOption('valign', 'top');
         $outer_table = new CTable();
         $outer_table->AddOption('border', 0);
         $outer_table->SetCellPadding(1);
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
**/
$regExpForm = new CForm();
$regExpForm->setName('regularExpressionsForm');
$regExpForm->addVar('form', $this->data['form']);
$regExpForm->addVar('form_refresh', $this->data['form_refresh']);
$regExpForm->addVar('regexpid', get_request('regexpid'));
$regExpLeftTable = new CTable();
$regExpLeftTable->addRow(create_hat(_('Regular expression'), get_regexp_form(), null, 'hat_regexp'));
$regExpRightTable = new CTable();
$regExpRightTable->addRow(create_hat(_('Expressions'), get_expressions_tab(), null, 'hat_expressions'));
if (isset($_REQUEST['new_expression'])) {
    $hatTable = create_hat(_('New expression'), get_expression_form(), null, 'hat_new_expression');
    $hatTable->setAttribute('style', 'margin-top: 3px;');
    $regExpRightTable->addRow($hatTable);
}
$regExpLeftColumn = new CCol($regExpLeftTable);
$regExpLeftColumn->setAttribute('valign', 'top');
$regExpRightColumn = new CCol($regExpRightTable);
$regExpRightColumn->setAttribute('valign', 'top');
$regExpOuterTable = new CTable();
$regExpOuterTable->addRow(array($regExpLeftColumn, new CCol(' '), $regExpRightColumn));
$regExpForm->addItem($regExpOuterTable);
show_messages();
Ejemplo n.º 3
0
 if ($_REQUEST['config'] == 10) {
     if (isset($_REQUEST['form'])) {
         $frmRegExp = new CForm('config.php', 'post');
         $frmRegExp->setName(S_REGULAR_EXPRESSION);
         $frmRegExp->addVar('form', get_request('form', 1));
         $from_rfr = get_request('form_refresh', 0);
         $frmRegExp->addVar('form_refresh', $from_rfr + 1);
         $frmRegExp->addVar('config', get_request('config', 10));
         if (isset($_REQUEST['regexpid'])) {
             $frmRegExp->addVar('regexpid', $_REQUEST['regexpid']);
         }
         $left_tab = new CTable();
         $left_tab->setCellPadding(3);
         $left_tab->setCellSpacing(3);
         $left_tab->setAttribute('border', 0);
         $left_tab->addRow(create_hat(S_REGULAR_EXPRESSION, get_regexp_form(), null, 'hat_regexp'));
         $right_tab = new CTable();
         $right_tab->setCellPadding(3);
         $right_tab->setCellSpacing(3);
         $right_tab->setAttribute('border', 0);
         $right_tab->addRow(create_hat(S_EXPRESSIONS, get_expressions_tab(), null, 'hat_expressions'));
         if (isset($_REQUEST['new_expression'])) {
             $right_tab->addRow(create_hat(S_NEW_EXPRESSION, get_expression_form(), null, 'hat_new_expression'));
         }
         $td_l = new CCol($left_tab);
         $td_l->setAttribute('valign', 'top');
         $td_r = new CCol($right_tab);
         $td_r->setAttribute('valign', 'top');
         $outer_table = new CTable();
         $outer_table->setAttribute('border', 0);
         $outer_table->setCellPadding(1);