<?php echo validation_errors(); ?> <label>device Name</label> <input type="text" class="input-xlarge" name="deviceName" value="<?php echo deviceManagement::_check_value($stored_sess_info, 'deviceName'); ?> "> <label>device Type</label> <?php echo form_dropdown('deviceType', $devices, deviceManagement::_check_value($stored_sess_info, 'deviceTypeID')); ?> <label>device brand</label> <?php echo form_dropdown('deviceBrand', $brands, deviceManagement::_check_value($stored_sess_info, 'brandID')); ?> <?php img(deviceManagement::_check_value($stored_sess_info, 'devicePhoto')); ?> <label>Photo</label> <input type="file" name="userfile" class="input-xlarge"> </div> </div> </div> <?php echo form_close();
?> <div id="myTabContent" class="tab-content"> <div class="tab-pane active in" id="home"> <?php echo validation_errors('<div class="alert alert-danger">', '</div>'); ?> <?php /*if the session has attributes*/ $attrs = null; if (in_array('attributes', array_keys($stored_sess_info))) { $attrs = unserialize($stored_sess_info['attributes']); //var_dump($attrs); } //var_dump($attributes); if (isset($attributes) && is_array($attributes)) { foreach ($attributes as $attr) { /*checking the value of the attr*/ $field_array = deviceManagement::_check_value($attrs, $attr->id); echo '<label>' . $attr->enName . '</label>'; deviceManagement::_generate_field($attr->id, $attr->attributeType, deviceManagement::_check_value($field_array, 'value')); echo " " . $attr->name; } } ?> </div> </div> </div> <?php echo form_close();