!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/lampp/lib/php/doc/HTML_QuickForm/docs/   drwxr-xr-x
Free 13.77 GB of 61.93 GB (22.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     formrule.php (4.34 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
* Examples of usage for HTML_QuickForm: fancy validation with addFormRule()
*
* $Id: formrule.php 236645 2007-05-29 19:12:26Z avb $

* @category    HTML
* @package     HTML_QuickForm
* @author      Alexey Borzov <avb@php.net>
* @version     CVS: $Id: formrule.php 236645 2007-05-29 19:12:26Z avb $
* @ignore
*/

require_once 'HTML/QuickForm.php';

function 
_validate_shipping($values)
{
    
// In Real Life (tm) you will probably query your DB for these
    
$profiles = array('foo''bar''baz');
    
$errors   = array();
    switch (
$values['profile']) {
        case 
'personal'
            if (empty(
$values['persProfileName'])) {
                
$errors['persProfileName'] = 'Enter the profile name';
            } elseif (
in_array($values['persProfileName'], $profiles)) {
                
$errors['persProfileName'] = 'The profile already exists';
            }
            if (empty(
$values['persName']['first']) || empty($values['persName']['last'])) {
                
$errors['persName'] = 'Name is required';
            }
            if (empty(
$values['persAddress'])) {
                
$errors['persAddress'] = 'Address is required';
            }
            break;

        case 
'company'
            if (empty(
$values['compProfileName'])) {
                
$errors['compProfileName'] = 'Enter the profile name';
            } elseif (
in_array($values['compProfileName'], $profiles)) {
                
$errors['compProfileName'] = 'The profile already exists';
            }
            if (empty(
$values['compName'])) {
                
$errors['compName'] = 'Company name is required';
            }
            if (empty(
$values['compAddress'])) {
                
$errors['compAddress'] = 'Address is required';
            }
            break;

        case 
'existing'
        default:
            if (empty(
$values['profileName'])) {
                
$errors['profileName'] = 'Enter the profile name';
            } elseif (!
in_array($values['profileName'], $profiles)) {
                
$errors['profileName'] = 'The profile does not exist';
            }
            break;
    } 
// switch
    
return empty($errors)? true$errors;
}

$form =& new HTML_QuickForm('frmFancy');
$form->setDefaults(array(
    
'profile'     => 'existing',
    
'stuffAmount' => '1'
));
$renderer =& $form->defaultRenderer();
$renderer->setElementTemplate("\n\t<tr>\n\t\t<td style=\"white-space: nowrap; background-color: #F0F0F0;\" align=\"left\" valign=\"top\" colspan=\"2\"><b>{element}</b></td>\n\t</tr>"'profile');

$form->addElement('header'null'Choose stuff');
$form->addElement('select''stuffName''Stuff to send:', array('' => '--select--''n' => 'Nuts''b' => 'Bolts''f' => 'Flotsam''j' => 'Jetsam'));
$form->addElement('text',   'stuffAmount''Amount of stuff:', array('size' => 2'maxlength' => 2));


$form->addElement('header'null'Choose shipping profile');
$form->addElement('static''note''Note:''profiles \'foo\', \'bar\' and \'baz\' are considered existing');

$form->addElement('radio',  'profile'null'Use existing profile''existing');
$form->addElement('text',   'profileName''Profile name:', array('size' => 32'maxlength' => 32));

$form->addElement('radio',  'profile'null'New personal profile''personal');
$form->addElement('text',   'persProfileName''Profile name:', array('size' => 32'maxlength' => 32));
$name[] =& $form->createElement('text''first'null, array('size' => 14'maxlength' => 100));
$name[] =& $form->createElement('text''last'null, array('size' => 14'maxlength' => 100));
$form->addGroup($name'persName''Name (first, last):'' ');
$form->addElement('text',   'persAddress''Address:', array('size' => 32'maxlength' => 255));

$form->addElement('radio',  'profile'null'New company profile''company');
$form->addElement('text',   'compProfileName''Profile name:', array('size' => 32'maxlength' => 32));
$form->addElement('text',   'compName''Company name:', array('size' => 32'maxlength' => 100));
$form->addElement('text',   'compAddress''Address:', array('size' => 32'maxlength' => 255));

$form->addElement('submit'null'Send');

$form->addFormRule('_validate_shipping');

if (
$form->validate()) {
    echo 
"<pre>\n";
    
var_dump($form->exportValues());
    echo 
"</pre>\n";
}

$form->display();
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.4757 ]--