load->helper('url'); $this->load->helper('form'); $link_back = 'admin/technology_tool'; $attr_description = array( 'name' => 'description', 'rows' => '5', 'cols' => '50', 'class' => 'textarea'); $attr_time = array( 'name' => 'time', 'class' => 'input'); $attr_score = array( 'name' => 'score', 'class' => 'input'); $opt_flag_ai = array( '0' => 'No', '1' => 'Yes'); $attr_num_creates = array( 'name' => 'num_creates', 'class' => 'input'); $attr_time_to_build = array( 'name' => 'time_to_build', 'class' => 'input'); $attr_cost_food = array( 'name' => 'cost_food', 'class' => 'input'); $attr_cost_wood = array( 'name' => 'cost_wood', 'class' => 'input'); $attr_cost_stone = array( 'name' => 'cost_stone', 'class' => 'input'); $attr_cost_iron = array( 'name' => 'cost_iron', 'class' => 'input'); $attr_cost_mana = array( 'name' => 'cost_mana', 'class' => 'input'); $attr_mod_max_food = array( 'name' => 'mod_max_food', 'class' => 'input'); $attr_mod_max_wood = array( 'name' => 'mod_max_wood', 'class' => 'input'); $attr_mod_max_stone = array( 'name' => 'mod_max_stone', 'class' => 'input'); $attr_mod_max_iron = array( 'name' => 'mod_max_iron', 'class' => 'input'); $attr_mod_max_mana = array( 'name' => 'mod_max_mana', 'class' => 'input'); $attr_mod_rate_food = array( 'name' => 'mod_rate_food', 'class' => 'input'); $attr_mod_rate_wood = array( 'name' => 'mod_rate_wood', 'class' => 'input'); $attr_mod_rate_stone = array( 'name' => 'mod_rate_stone', 'class' => 'input'); $attr_mod_rate_iron = array( 'name' => 'mod_rate_iron', 'class' => 'input'); $attr_mod_rate_mana = array( 'name' => 'mod_rate_mana', 'class' => 'input'); $attr_mod_percent_food = array( 'name' => 'mod_percent_food', 'class' => 'input'); $attr_mod_percent_wood = array( 'name' => 'mod_percent_wood', 'class' => 'input'); $attr_mod_percent_stone = array( 'name' => 'mod_percent_stone', 'class' => 'input'); $attr_mod_percent_iron = array( 'name' => 'mod_percent_iron', 'class' => 'input'); $attr_mod_percent_mana = array( 'name' => 'mod_percent_mana', 'class' => 'input'); $name_mod_spell_id = 'mod_spell_id'; $attr_mod_spell_id = 'class="drop"'; $name_mod_create_id = 'mod_create_id'; $attr_mod_create_id = 'class="drop"'; $attr_drop = 'class="drop"'; $name_is_secondary = 'is_secondary'; $attr_is_secondary = 'class="drop"'; $opt_is_secondary = array( '0' => 'Primary', '1' => 'Secondary'); $attr_submit = array( 'name' => 'submit', 'value' => 'Submit', 'class' => 'submit'); if ($new) { //set every value with set_value() $link_form = 'admin/technology'; $attr_description['value'] = set_value('description'); $attr_time['value'] = set_value('time'); $attr_score['value'] = set_value('score'); $attr_cost_food['value'] = set_value('cost_food'); $attr_cost_wood['value'] = set_value('cost_wood'); $attr_cost_stone['value'] = set_value('cost_stone'); $attr_cost_iron['value'] = set_value('cost_iron'); $attr_cost_mana['value'] = set_value('cost_mana'); $attr_mod_max_food['value'] = set_value('mod_max_food'); $attr_mod_max_wood['value'] = set_value('mod_max_wood'); $attr_mod_max_stone['value'] = set_value('mod_max_stone'); $attr_mod_max_iron['value'] = set_value('mod_max_iron'); $attr_mod_max_mana['value'] = set_value('mod_max_mana'); $attr_mod_rate_food['value'] = set_value('mod_rate_food'); $attr_mod_rate_wood['value'] = set_value('mod_rate_wood'); $attr_mod_rate_stone['value'] = set_value('mod_rate_stone'); $attr_mod_rate_iron['value'] = set_value('mod_rate_iron'); $attr_mod_rate_mana['value'] = set_value('mod_rate_mana'); $attr_mod_percent_food['value'] = set_value('mod_percent_food'); $attr_mod_percent_wood['value'] = set_value('mod_percent_wood'); $attr_mod_percent_stone['value'] = set_value('mod_percent_stone'); $attr_mod_percent_iron['value'] = set_value('mod_percent_iron'); $attr_mod_percent_mana['value'] = set_value('mod_percent_mana'); } else { //set every value from data sent $link_form = 'admin/technology/' . $technology['id']; $attr_description['value'] = $technology['description']; $attr_time['value'] = $technology['time']; $attr_score['value'] = $technology['score']; $attr_cost_food['value'] = $technology['cost_food']; $attr_cost_wood['value'] = $technology['cost_wood']; $attr_cost_stone['value'] = $technology['cost_stone']; $attr_cost_iron['value'] = $technology['cost_iron']; $attr_cost_mana['value'] = $technology['cost_mana']; $attr_mod_max_food['value'] = $technology['mod_max_food']; $attr_mod_max_wood['value'] = $technology['mod_max_wood']; $attr_mod_max_stone['value'] = $technology['mod_max_stone']; $attr_mod_max_iron['value'] = $technology['mod_max_iron']; $attr_mod_max_mana['value'] = $technology['mod_max_mana']; $attr_mod_rate_food['value'] = $technology['mod_rate_food']; $attr_mod_rate_wood['value'] = $technology['mod_rate_wood']; $attr_mod_rate_stone['value'] = $technology['mod_rate_stone']; $attr_mod_rate_iron['value'] = $technology['mod_rate_iron']; $attr_mod_rate_mana['value'] = $technology['mod_rate_mana']; $attr_mod_percent_food['value'] = $technology['mod_percent_food']; $attr_mod_percent_wood['value'] = $technology['mod_percent_wood']; $attr_mod_percent_stone['value'] = $technology['mod_percent_stone']; $attr_mod_percent_iron['value'] = $technology['mod_percent_iron']; $attr_mod_percent_mana['value'] = $technology['mod_percent_mana']; $sspid = $technology['mod_spell_id']; $smcid = $technology['mod_create_id']; $sflai = $technology['flag_ai']; $selissec = $technology['is_secondary']; } ?>
<-- Back
Creating! Editing!
Description:
Time:
Score:
Cost Food:
Cost Wood:
Cost Stone:
Cost iron:
Cost Mana:
Mod Max Food:
Mod Max Wood:
Mod Max Stone:
Mod Max Iron:
Mod Max Mana:
Mod Rate Food:
Mod Rate Wood:
Mod Rate Stone:
Mod Rate Iron:
Mod Rate Mana:
Mod Percent Food:
Mod Percent Wood:
Mod Percent Stone:
Mod Percent Iron:
Mod Percent Mana:
Mod Spell Id:
Mod Create Id:
Flag AI:
Type: