Esempio n. 1
0
function writeContent()
{
    global $sUser;
    addField(makeInput('Email Address', 'use_email', $sUser));
    addField(makePassword('Password', 'use_password'));
    addField(makeSubmit('Log In', 'login'));
    writeDataForm($_SERVER['REQUEST_URI'], 'login', 'login');
}
Esempio n. 2
0
function writeContent()
{
    global $aStates, $isPost, $sFirstName, $sLastName, $sEmail, $nPhone, $sAddress, $sAddress2, $sCity, $sState, $nZip, $sComments, $bSent;
    if ($bSent) {
        echo '<p>Thank you for contacting us.</p>';
    } else {
        addField(makeInput('First Name', 'con_firstname', $sFirstName), true);
        addField(makeInput('Last Name', 'con_lastname', $sLastName), true);
        addField(makeEmail('Email Address', 'con_email', $sEmail), true);
        addField(makeInput('Telephone', 'con_phone', $nPhone, 'size="13"'));
        addField(makeInput('Address', 'con_address', $sAddress, 'size="30"'));
        addField(makeInput('Address 2', 'con_address2', $sAddress2, 'size="30"'));
        addField(makeInput('City', 'con_city', $sCity));
        addField(makeSelect('State', 'con_state', $aStates, $sState));
        addField(makeInput('Zip', 'con_zip', $nZip, 'size="10" maxlength="5"'));
        addField(makeTextArea('Message', 'con_comments', $sComments, 'rows="5" cols="60"'));
        addField(makeSubmit('Send', 'send') . ' ' . makeCancel('Cancel', 'cancel'));
        writeDataForm('/contact.php', 'contact');
    }
}
Esempio n. 3
0
function writeContent()
{
    global $sId, $aStates, $isPost, $sName, $sEmail, $nPhone, $sAddress, $sAddress2, $sCity, $sState, $nZip, $bAdmin, $bActive;
    if (!empty($sId)) {
        addHidden('use_id', $sId);
    }
    addField(makeInput('Name', 'use_name', $sName), true);
    addField(makeEmail('Email Address', 'use_email', $sEmail), true);
    addField(makePassword('Password', 'use_password'));
    addField(makeInput('Phone', 'use_phone', $nPhone, 'size="13"'));
    addField(makeInput('Address', 'use_address', $sAddress, 'size="30"'));
    addField(makeInput('Address 2', 'use_address2', $sAddress2, 'size="30"'));
    addField(makeInput('City', 'use_city', $sCity));
    addField(makeSelect('State', 'use_state', $aStates, $sState));
    addField(makeInput('Zip', 'use_zip', $nZip, 'size="10"'));
    addField(makeCheckbox('Admin', 'use_admin', $bAdmin));
    addField(makeCheckbox('Active', 'use_active', $bActive));
    addField(makeSubmit('Save', 'save') . ' ' . makeCancel('Cancel', 'cancel'));
    writeDataForm($_SERVER['PHP_SELF'], 'user');
}
Esempio n. 4
0
addField('invoice_comment', 'textarea', 'Fakturakommentar', __('Comment that is displayed in the top of the invoice.'));
addField('invoice_internal_comment', 'textarea', 'Intern fakturakommentar', __('Internal comment on the invoice (not shown to the customer).'));
addField('invoice_electronic', 'radio', __('E-delivery'), __('Choose yes if the customer want to have the invoice delivery by e-mail.'));
// Address
//addField ('invoice_address_id',			'select',				_('Address'),				_('Choose a address from the customer. This will be the address that the invoice will be sent to.'));
//addID ('invoice_address_id', 'invoice_address_id');
addField('invoice_address', 'textarea', __('Address'), __('Choose a address from the customer. This will be the address that the invoice will be sent to. To change the addresses please press the edit button for the customer.'));
addID('invoice_address', 'invoice_address');
disableField('invoice_address');
addAfterField('invoice_address', '<br>' . '<input size="1" type="text" name="invoice_address_id2" disabled="disabled" id="invoice_address_id2">' . '<input type="button" value="Velg/endre adresse" onclick="chooseAddress(\'invoice_address_id\', \'invoice_address\'); return false;">' . '');
addField('invoice_address_id', 'hidden', '');
addID('invoice_address_id', 'invoice_address_id');
addField('invoice_email', 'text', __('E-mail'), __('E-mail that the customer wants the invoice delivery to.'));
addField('invoice_content', 'invoice_content', __('Content'));
addField('empty', '', '');
addField('submit3', 'submit', __('Save entry'));
function addOnchange($var, $value)
{
    global $entry_fields;
    $entry_fields[$var]['onchange'] = $value;
}
function addValue($var, $value)
{
    global $entry_fields;
    $entry_fields[$var]['value'] = $value;
}
function addValueArray($var, $value_array)
{
    global $entry_fields;
    $entry_fields[$var]['value_array'] = $value_array;
}
Esempio n. 5
0
function profile_db_upgrade_2()
{
    // Initialization
    $profile_field_handler = icms_getModuleHandler('field', basename(dirname(dirname(__FILE__))), 'profile');
    // add new fields
    $fieldid = addField('email', _US_EMAIL, '', 2, 'email', 1, 5, 0, array(), 1, 255, 1);
    addVisibility($fieldid, array(ICMS_GROUP_ADMIN, ICMS_GROUP_USERS), 0);
    // Copy images
    icms_core_Filesystem::copyRecursive(ICMS_ROOT_PATH . '/modules/' . basename(dirname(dirname(__FILE__))) . '/images/field', ICMS_UPLOAD_PATH . '/' . basename(dirname(dirname(__FILE__))) . '/field');
    // Assign Images to fields
    $profile_field_handler->updateAll('url', 'aim.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'user_aim')));
    $profile_field_handler->updateAll('url', 'bio.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'bio')));
    $profile_field_handler->updateAll('url', 'birthday.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'user_regdate')));
    $profile_field_handler->updateAll('url', 'clock.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'last_login')));
    $profile_field_handler->updateAll('url', 'comments.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'posts')));
    $profile_field_handler->updateAll('url', 'email.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'email')));
    $profile_field_handler->updateAll('url', 'house.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'user_from')));
    $profile_field_handler->updateAll('url', 'icq.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'user_icq')));
    $profile_field_handler->updateAll('url', 'interests.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'user_intrest')));
    $profile_field_handler->updateAll('url', 'msnm.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'user_msnm')));
    $profile_field_handler->updateAll('url', 'occ.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'user_occ')));
    $profile_field_handler->updateAll('url', 'openid.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'openid')));
    $profile_field_handler->updateAll('url', 'rank.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'rank')));
    $profile_field_handler->updateAll('url', 'signature.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'user_sig')));
    $profile_field_handler->updateAll('url', 'url.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'url')));
    $profile_field_handler->updateAll('url', 'username.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'name')));
    $profile_field_handler->updateAll('url', 'ym.gif', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'user_yim')));
    // update existing fields
    $profile_field_handler->updateAll('field_type', 'url', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'url')));
    $profile_field_handler->updateAll('field_type', 'location', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'user_from')));
    $profile_field_handler->updateAll('field_type', 'openid', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', 'openid')));
    $profile_field_handler->updateAll('field_edit', '0', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', '("posts", "openid", "user_viewoid")', 'IN')));
    $profile_field_handler->updateAll('system', '1', new icms_db_criteria_Compo(new icms_db_criteria_Item('field_name', '("' . implode('", "', $profile_field_handler->getUserVars()) . '")', 'IN')));
}