Jump to content

IntellectProductions

New Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by IntellectProductions

  1. os4d4Qd.png

     

    Looking: LOOKING FOR ONE MORE CLIENT

     

    Hello. My name is Haley.

     

    [ Web Design & Development ]

    I have been coding with HTML & CSS for 10 years and working with the Adobe Software for roughly the same amount of years.

    You can view some of my web designs below:

    Base Web Design Prices start at $200-250+ (coded as well). Please note that most of my clients estimate to $400-500.

     

    [ Programming ]

    I have also been programming with PHP and MySQL for 6 years with the jQuery library for 5 years.

    I program in an MVC structure with OOP standards, but can work VERY easily with procedural since that is the basic beginner style.

    I have used the CodeIgniter and FuelPHP frameworks. I work at a very fast pace.

    If you are needing references, please note me and I will give them to you.

     

    My base programming rate starts at $17/hr.

     

    I sometimes can do fixed prices for a certain project, but it's a VERY rough quote that you will receive so please do not expect it to be a permanent quote as hours can shift very quickly.

     

    [ Currently Working ]

    • I am currently working for www.dstable.com (getting a complete recode since previous programmer was inexperienced).

    [ Past History ]

    • I have also worked for www.misticpets.com, but resigned due to the lack of funding for the recode they wanted to go through.
    • I have also worked for www.utaisa.net, but the owner got scammed from an online transaction and the funds vanished.

    [ Contact Me ]

    I am available roughly 10-12 hours a day.

    You can contact me via messengers:

    Skype - h_schillig

    MSN - h_schillig@live.com

    Or email me at staff@intellectproductions.com

     

    [ Code Sample ]

    And last, but not least, here is a code sample:

    I guess I'll just post the Model for my registration... if you want to see the Controller and View, that's fine, but most of the code is done in the Model since it interacts with the database and all :P

    <?php
    class Model_Register extends \Orm\Model
    {
    protected static $_properties = array(
    'id',
    'user_name',
    'username',
    'password',
    'pin',
    'email',
    'birthdate',
    'gender',
    'createdate',
    'ip_add'
    );
    
    public static function register(Fieldset $form)
    {
    $form->add('user_name', 'Name:');
    $form->add('username', 'Username: <i>(Must be 3-25 characters/numbers)</i>')->add_rule('required')->add_rule('min_length', 3)->add_rule('max_length', 35);
    $form->add('password', 'Choose Password:', array('type' => 'password'))->add_rule('required');
    $form->add('password2', 'Re-type Password:', array('type' => 'password'))->add_rule('required');
    $form->add('pin', 'Pin: <i>(4 numeric characters)</i>', array('type' => 'password'))->add_rule('min_length', 4)->add_rule('max_length', 4);
    $form->add('pin2', 'Re-type Pin:', array('type' => 'password'))->add_rule('min_length', 4)->add_rule('max_length', 4);
    $form->add('email', 'E-mail: <i>(Must be valid for recovery settings)</i>')->add_rule('required')->add_rule('valid_email')->add_rule('max_length', 50);
    $form->add('email2', 'Re-type E-mail:')->add_rule('required')->add_rule('valid_email')->add_rule('max_length', 50);
    $form->add('birthdate', 'Birthdate:', array('class' => 'datepicker', 'placeholder' => 'yyyy-mm-dd'))->add_rule('required');
    $form->add('gender', 'Gender:', array('options' => array('1' => 'Male', '2' => 'Female'), 'type' => 'radio'));
    $form->add('submit', ' ', array('type' => 'submit', 'value' => 'Register'));
    return $form;
    }
    
    public static function validate_registration(Fieldset $form, $auth)
    {
    //matching fields
    $form->field('password')->add_rule('match_value', $form->field('password2')->get_attribute('value'));
    $form->field('pin')->add_rule('match_value', $form->field('pin2')->get_attribute('value'));
    $form->field('email')->add_rule('match_value', $form->field('email2')->get_attribute('value'));
    $form->field('username')->add_rule('match_pattern', '/[A-Za-z0-9]+/');
    //validate form
    $val = $form->validation();
    //set error messages
    $val->set_message('required', 'The field :field is required');
    $val->set_message('valid_email', 'The field :field must be a valid email');
    $val->set_message('match_value', 'The passwords do not match');
    $val->set_message('min_length', 'The field :field is too short in length.');
    $val->set_message('max_length', 'The field :field is too long in length.');
    if($val->run())
    {
    //retrieve all values
    $user_name = $form->field('user_name')->get_attribute('value');
    $username = $form->field('username')->get_attribute('value');
    $password = $form->field('password')->get_attribute('value');
    $pin = $form->field('pin')->get_attribute('value');
    $email = $form->field('email')->get_attribute('value');
    $birthdate = $form->field('birthdate')->get_attribute('value');
    $gender = $form->field('gender')->get_attribute('value');
    try
    {
    //pin and gender must be numeric values
    if(!is_numeric($pin) && !is_numeric($gender)) {
    throw new Exception('The pin field must be numeric');
    }
    //1 = male, 2 = female.. anything else is invalid
    if(!$gender==1 || !$gender==2) {
    throw new Exception('That is not a valid gender');
    }
    //check username pattern (only letters and numbers)
    if(!preg_match('/^[a-zA-Z0-9]+$/', $username)) {
    throw new Exception('Username can only consists of letters and numbers!');
    }
    //see if username already exists
    $result = DB::select('user_id')->from('user')->where('username', '=', $username)->execute();
    if(count($result) > 0) {
    throw new Exception('Username is already taken!');
    }
    
    //additional fields that need added to the database
    $ex_fields = array('birthdate' => $birthdate, 'gender' => $gender, 'ip_add' => $_SERVER['REMOTE_ADDR']);
    //optional fields
    $x_fields = array('user_name' => $user_name, 'pin' => $pin);
    foreach($x_fields AS $key => $value)
    {
    if(isset($value)) {
    //if value is set, add to additional fields array to insert into database
    $ex_fields[$key] = $value;
    }
    }
    //create new user
    $user = $auth->create_user($username, $password, $email, '1', $ex_fields);
    }
    catch (Exception $e)
    {
    $error = $e->getMessage();
    }
    if(isset($user))
    {
    // Turn on if you want user to be logged in after registration
    //$auth->login($username, $password);
    }
    else
    {
    if(isset($error))
    {
    $li = $error;
    }
    else
    {
    $li = 'Something went wrong with creating the user!';
    }
    $errors = Html::ul(array($li));
    return array('e_found' => true, 'errors' => $errors);
    }
    }
    else
    {
    $errors = $val->show_errors();
    return array('e_found' => true, 'errors' => $errors);
    }
    }
    }
    ?>
    

     

    Thank you,

    Haley

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.